@invariant.guru/cli 0.8.0 → 0.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +359 -359
- package/dist/ui/assets/Editor-0hQt3BGG.js +38 -0
- package/dist/ui/assets/{MarkdownBody-CcVHXls4.js → MarkdownBody-BZDzSb5s.js} +4 -4
- package/dist/ui/assets/Preview-DDmkokv0.js +1 -0
- package/dist/ui/assets/index-CviOvvQi.js +260 -0
- package/dist/ui/assets/index-DJDYH97C.css +1 -0
- package/dist/ui/index.html +28 -3
- package/package.json +1 -1
- package/dist/ui/assets/Editor-3agHSmvf.js +0 -38
- package/dist/ui/assets/Preview-U3gSQ1_T.js +0 -1
- package/dist/ui/assets/index-BMAvvVXL.js +0 -253
- package/dist/ui/assets/index-DWu1unkU.css +0 -1
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,o)=>(o=n==null?{}:e(i(n)),c(r||!n||!n.__esModule||!a.call(n,`default`)?t(o,`default`,{value:n,enumerable:!0}):o,n));(function(){let e=document.createElement(`link`).relList;if(e&&e.supports&&e.supports(`modulepreload`))return;for(let e of document.querySelectorAll(`link[rel="modulepreload"]`))n(e);new MutationObserver(e=>{for(let t of e)if(t.type===`childList`)for(let e of t.addedNodes)e.tagName===`LINK`&&e.rel===`modulepreload`&&n(e)}).observe(document,{childList:!0,subtree:!0});function t(e){let t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),t.credentials=e.crossOrigin===`use-credentials`?`include`:e.crossOrigin===`anonymous`?`omit`:`same-origin`,t}function n(e){if(e.ep)return;e.ep=!0;let n=t(e);fetch(e.href,n)}})();var u=o(((e,t)=>{(function(){function n(e,t){Object.defineProperty(a.prototype,e,{get:function(){console.warn(`%s(...) is deprecated in plain JavaScript React classes. %s`,t[0],t[1])}})}function r(e){return typeof e!=`object`||!e?null:(e=xe&&e[xe]||e[`@@iterator`],typeof e==`function`?e:null)}function i(e,t){e=(e=e.constructor)&&(e.displayName||e.name)||`ReactClass`;var n=e+`.`+t;Se[n]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",t,e),Se[n]=!0)}function a(e,t,n){this.props=e,this.context=t,this.refs=we,this.updater=n||Ce}function o(){}function s(e,t,n){this.props=e,this.context=t,this.refs=we,this.updater=n||Ce}function c(){}function l(e){return``+e}function u(e){try{l(e);var t=!1}catch{t=!0}if(t){t=console;var n=t.error,r=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return n.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,r),l(e)}}function d(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===De?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case ue:return`Fragment`;case fe:return`Profiler`;case de:return`StrictMode`;case ge:return`Suspense`;case _e:return`SuspenseList`;case be:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case le:return`Portal`;case me:return e.displayName||`Context`;case pe:return(e._context.displayName||`Context`)+`.Consumer`;case he:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case ve:return t=e.displayName||null,t===null?d(e.type)||`Memo`:t;case ye:t=e._payload,e=e._init;try{return d(e(t))}catch{}}return null}function f(e){if(e===ue)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===ye)return`<...>`;try{var t=d(e);return t?`<`+t+`>`:`<...>`}catch{return`<...>`}}function p(){var e=O.A;return e===null?null:e.getOwner()}function m(){return Error(`react-stack-top-frame`)}function h(e){if(Oe.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function g(e,t){function n(){Ae||(Ae=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function _(){var e=d(this.type);return Me[e]||(Me[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function v(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:ce,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:_}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function y(e,t){return t=v(e.type,t,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(t._store.validated=e._store.validated),t}function b(e){x(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===ye&&(e._payload.status===`fulfilled`?x(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function x(e){return typeof e==`object`&&!!e&&e.$$typeof===ce}function ee(e){var t={"=":`=0`,":":`=2`};return`$`+e.replace(/[=:]/g,function(e){return t[e]})}function te(e,t){return typeof e==`object`&&e&&e.key!=null?(u(e.key),ee(``+e.key)):t.toString(36)}function ne(e){switch(e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason;default:switch(typeof e.status==`string`?e.then(c,c):(e.status=`pending`,e.then(function(t){e.status===`pending`&&(e.status=`fulfilled`,e.value=t)},function(t){e.status===`pending`&&(e.status=`rejected`,e.reason=t)})),e.status){case`fulfilled`:return e.value;case`rejected`:throw e.reason}}throw e}function S(e,t,n,i,a){var o=typeof e;(o===`undefined`||o===`boolean`)&&(e=null);var s=!1;if(e===null)s=!0;else switch(o){case`bigint`:case`string`:case`number`:s=!0;break;case`object`:switch(e.$$typeof){case ce:case le:s=!0;break;case ye:return s=e._init,S(s(e._payload),t,n,i,a)}}if(s){s=e,a=a(s);var c=i===``?`.`+te(s,0):i;return Ee(a)?(n=``,c!=null&&(n=c.replace(Ie,`$&/`)+`/`),S(a,t,n,``,function(e){return e})):a!=null&&(x(a)&&(a.key!=null&&(s&&s.key===a.key||u(a.key)),n=y(a,n+(a.key==null||s&&s.key===a.key?``:(``+a.key).replace(Ie,`$&/`)+`/`)+c),i!==``&&s!=null&&x(s)&&s.key==null&&s._store&&!s._store.validated&&(n._store.validated=2),a=n),t.push(a)),1}if(s=0,c=i===``?`.`:i+`:`,Ee(e))for(var l=0;l<e.length;l++)i=e[l],o=c+te(i,l),s+=S(i,t,n,o,a);else if(l=r(e),typeof l==`function`)for(l===e.entries&&(Fe||console.warn(`Using Maps as children is not supported. Use an array of keyed ReactElements instead.`),Fe=!0),e=l.call(e),l=0;!(i=e.next()).done;)i=i.value,o=c+te(i,l++),s+=S(i,t,n,o,a);else if(o===`object`){if(typeof e.then==`function`)return S(ne(e),t,n,i,a);throw t=String(e),Error(`Objects are not valid as a React child (found: `+(t===`[object Object]`?`object with keys {`+Object.keys(e).join(`, `)+`}`:t)+`). If you meant to render a collection of children, use an array instead.`)}return s}function re(e,t,n){if(e==null)return e;var r=[],i=0;return S(e,r,``,``,function(e){return t.call(n,e,i++)}),r}function ie(e){if(e._status===-1){var t=e._ioInfo;t!=null&&(t.start=t.end=performance.now()),t=e._result;var n=t();if(n.then(function(t){if(e._status===0||e._status===-1){e._status=1,e._result=t;var r=e._ioInfo;r!=null&&(r.end=performance.now()),n.status===void 0&&(n.status=`fulfilled`,n.value=t)}},function(t){if(e._status===0||e._status===-1){e._status=2,e._result=t;var r=e._ioInfo;r!=null&&(r.end=performance.now()),n.status===void 0&&(n.status=`rejected`,n.reason=t)}}),t=e._ioInfo,t!=null){t.value=n;var r=n.displayName;typeof r==`string`&&(t.name=r)}e._status===-1&&(e._status=0,e._result=n)}if(e._status===1)return t=e._result,t===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
+
|
|
3
|
+
Your code should look like:
|
|
4
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
+
|
|
6
|
+
Did you accidentally put curly braces around the import?`,t),`default`in t||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
+
|
|
8
|
+
Your code should look like:
|
|
9
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,t),t.default;throw e._result}function C(){var e=O.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
+
2. You might be breaking the Rules of Hooks
|
|
12
|
+
3. You might have more than one copy of React in the same app
|
|
13
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function ae(){O.asyncTransitions--}function w(e){if(ze===null)try{var n=(`require`+Math.random()).slice(0,7);ze=(t&&t[n]).call(t,`timers`).setImmediate}catch{ze=function(e){!1===Re&&(Re=!0,typeof MessageChannel>`u`&&console.error(`This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning.`));var t=new MessageChannel;t.port1.onmessage=e,t.port2.postMessage(void 0)}}return ze(e)}function T(e){return 1<e.length&&typeof AggregateError==`function`?AggregateError(e):e[0]}function oe(e,t){t!==Be-1&&console.error(`You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. `),Be=t}function E(e,t,n){var r=O.actQueue;if(r!==null){if(r.length!==0)try{se(r),w(function(){return E(e,t,n)});return}catch(e){O.thrownErrors.push(e)}else O.actQueue=null}0<O.thrownErrors.length?(r=T(O.thrownErrors),O.thrownErrors.length=0,n(r)):t(e)}function se(e){if(!He){He=!0;var t=0;try{for(;t<e.length;t++){var n=e[t];do{O.didUsePromise=!1;var r=n(!1);if(r!==null){if(O.didUsePromise){e[t]=n,e.splice(0,t);return}n=r}else break}while(1)}e.length=0}catch(n){e.splice(0,t+1),O.thrownErrors.push(n)}finally{He=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ce=Symbol.for(`react.transitional.element`),le=Symbol.for(`react.portal`),ue=Symbol.for(`react.fragment`),de=Symbol.for(`react.strict_mode`),fe=Symbol.for(`react.profiler`),pe=Symbol.for(`react.consumer`),me=Symbol.for(`react.context`),he=Symbol.for(`react.forward_ref`),ge=Symbol.for(`react.suspense`),_e=Symbol.for(`react.suspense_list`),ve=Symbol.for(`react.memo`),ye=Symbol.for(`react.lazy`),be=Symbol.for(`react.activity`),xe=Symbol.iterator,Se={},Ce={isMounted:function(){return!1},enqueueForceUpdate:function(e){i(e,`forceUpdate`)},enqueueReplaceState:function(e){i(e,`replaceState`)},enqueueSetState:function(e){i(e,`setState`)}},D=Object.assign,we={};Object.freeze(we),a.prototype.isReactComponent={},a.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`)},a.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,`forceUpdate`)};var Te={isMounted:[`isMounted`,`Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks.`],replaceState:[`replaceState`,`Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236).`]};for(We in Te)Te.hasOwnProperty(We)&&n(We,Te[We]);o.prototype=a.prototype,Te=s.prototype=new o,Te.constructor=s,D(Te,a.prototype),Te.isPureReactComponent=!0;var Ee=Array.isArray,De=Symbol.for(`react.client.reference`),O={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},Oe=Object.prototype.hasOwnProperty,ke=console.createTask?console.createTask:function(){return null};Te={react_stack_bottom_frame:function(e){return e()}};var Ae,je,Me={},Ne=Te.react_stack_bottom_frame.bind(Te,m)(),Pe=ke(f(m)),Fe=!1,Ie=/\/+/g,Le=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)},Re=!1,ze=null,Be=0,Ve=!1,He=!1,Ue=typeof queueMicrotask==`function`?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:w;Te=Object.freeze({__proto__:null,c:function(e){return C().useMemoCache(e)}});var We={map:re,forEach:function(e,t,n){re(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return re(e,function(){t++}),t},toArray:function(e){return re(e,function(e){return e})||[]},only:function(e){if(!x(e))throw Error(`React.Children.only expected to receive a single React element child.`);return e}};e.Activity=be,e.Children=We,e.Component=a,e.Fragment=ue,e.Profiler=fe,e.PureComponent=s,e.StrictMode=de,e.Suspense=ge,e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O,e.__COMPILER_RUNTIME=Te,e.act=function(e){var t=O.actQueue,n=Be;Be++;var r=O.actQueue=t===null?[]:t,i=!1;try{var a=e()}catch(e){O.thrownErrors.push(e)}if(0<O.thrownErrors.length)throw oe(t,n),e=T(O.thrownErrors),O.thrownErrors.length=0,e;if(typeof a==`object`&&a&&typeof a.then==`function`){var o=a;return Ue(function(){i||Ve||(Ve=!0,console.error(`You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);`))}),{then:function(e,a){i=!0,o.then(function(i){if(oe(t,n),n===0){try{se(r),w(function(){return E(i,e,a)})}catch(e){O.thrownErrors.push(e)}if(0<O.thrownErrors.length){var o=T(O.thrownErrors);O.thrownErrors.length=0,a(o)}}else e(i)},function(e){oe(t,n),0<O.thrownErrors.length?(e=T(O.thrownErrors),O.thrownErrors.length=0,a(e)):a(e)})}}}var s=a;if(oe(t,n),n===0&&(se(r),r.length!==0&&Ue(function(){i||Ve||(Ve=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),O.actQueue=null),0<O.thrownErrors.length)throw e=T(O.thrownErrors),O.thrownErrors.length=0,e;return{then:function(e,t){i=!0,n===0?(O.actQueue=r,w(function(){return E(s,e,t)})):e(s)}}},e.cache=function(e){return function(){return e.apply(null,arguments)}},e.cacheSignal=function(){return null},e.captureOwnerStack=function(){var e=O.getCurrentStack;return e===null?null:e()},e.cloneElement=function(e,t,n){if(e==null)throw Error(`The argument must be a React element, but you passed `+e+`.`);var r=D({},e.props),i=e.key,a=e._owner;if(t!=null){var o;a:{if(Oe.call(t,`ref`)&&(o=Object.getOwnPropertyDescriptor(t,`ref`).get)&&o.isReactWarning){o=!1;break a}o=t.ref!==void 0}for(s in o&&(a=p()),h(t)&&(u(t.key),i=``+t.key),t)!Oe.call(t,s)||s===`key`||s===`__self`||s===`__source`||s===`ref`&&t.ref===void 0||(r[s]=t[s])}var s=arguments.length-2;if(s===1)r.children=n;else if(1<s){o=Array(s);for(var c=0;c<s;c++)o[c]=arguments[c+2];r.children=o}for(r=v(e.type,i,r,a,e._debugStack,e._debugTask),i=2;i<arguments.length;i++)b(arguments[i]);return r},e.createContext=function(e){return e={$$typeof:me,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:pe,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},e.createElement=function(e,t,n){for(var r=2;r<arguments.length;r++)b(arguments[r]);r={};var i=null;if(t!=null)for(c in je||!(`__self`in t)||`key`in t||(je=!0,console.warn(`Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform`)),h(t)&&(u(t.key),i=``+t.key),t)Oe.call(t,c)&&c!==`key`&&c!==`__self`&&c!==`__source`&&(r[c]=t[c]);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];Object.freeze&&Object.freeze(o),r.children=o}if(e&&e.defaultProps)for(c in a=e.defaultProps,a)r[c]===void 0&&(r[c]=a[c]);i&&g(r,typeof e==`function`?e.displayName||e.name||`Unknown`:e);var c=1e4>O.recentlyCreatedOwnerStacks++;return v(e,i,r,p(),c?Error(`react-stack-top-frame`):Ne,c?ke(f(e)):Pe)},e.createRef=function(){var e={current:null};return Object.seal(e),e},e.forwardRef=function(e){e!=null&&e.$$typeof===ve?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e==`function`?e.length!==0&&e.length!==2&&console.error(`forwardRef render functions accept exactly two parameters: props and ref. %s`,e.length===1?`Did you forget to use the ref parameter?`:`Any additional parameter will be undefined.`):console.error(`forwardRef requires a render function but was given %s.`,e===null?`null`:typeof e),e!=null&&e.defaultProps!=null&&console.error(`forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?`);var t={$$typeof:he,render:e},n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.isValidElement=x,e.lazy=function(e){e={_status:-1,_result:e};var t={$$typeof:ye,_payload:e,_init:ie},n={name:`lazy`,start:-1,end:-1,value:null,owner:null,debugStack:Error(`react-stack-top-frame`),debugTask:console.createTask?console.createTask(`lazy()`):null};return e._ioInfo=n,t._debugInfo=[{awaited:n}],t},e.memo=function(e,t){e??console.error(`memo: The first argument must be a component. Instead received: %s`,e===null?`null`:typeof e),t={$$typeof:ve,type:e,compare:t===void 0?null:t};var n;return Object.defineProperty(t,"displayName",{enumerable:!1,configurable:!0,get:function(){return n},set:function(t){n=t,e.name||e.displayName||(Object.defineProperty(e,"name",{value:t}),e.displayName=t)}}),t},e.startTransition=function(e){var t=O.T,n={};n._updatedFibers=new Set,O.T=n;try{var r=e(),i=O.S;i!==null&&i(n,r),typeof r==`object`&&r&&typeof r.then==`function`&&(O.asyncTransitions++,r.then(ae,ae),r.then(c,Le))}catch(e){Le(e)}finally{t===null&&n._updatedFibers&&(e=n._updatedFibers.size,n._updatedFibers.clear(),10<e&&console.warn(`Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.`)),t!==null&&n.types!==null&&(t.types!==null&&t.types!==n.types&&console.error(`We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.`),t.types=n.types),O.T=t}},e.unstable_useCacheRefresh=function(){return C().useCacheRefresh()},e.use=function(e){return C().use(e)},e.useActionState=function(e,t,n){return C().useActionState(e,t,n)},e.useCallback=function(e,t){return C().useCallback(e,t)},e.useContext=function(e){var t=C();return e.$$typeof===pe&&console.error(`Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?`),t.useContext(e)},e.useDebugValue=function(e,t){return C().useDebugValue(e,t)},e.useDeferredValue=function(e,t){return C().useDeferredValue(e,t)},e.useEffect=function(e,t){return e??console.warn(`React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?`),C().useEffect(e,t)},e.useEffectEvent=function(e){return C().useEffectEvent(e)},e.useId=function(){return C().useId()},e.useImperativeHandle=function(e,t,n){return C().useImperativeHandle(e,t,n)},e.useInsertionEffect=function(e,t){return e??console.warn(`React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?`),C().useInsertionEffect(e,t)},e.useLayoutEffect=function(e,t){return e??console.warn(`React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?`),C().useLayoutEffect(e,t)},e.useMemo=function(e,t){return C().useMemo(e,t)},e.useOptimistic=function(e,t){return C().useOptimistic(e,t)},e.useReducer=function(e,t,n){return C().useReducer(e,t,n)},e.useRef=function(e){return C().useRef(e)},e.useState=function(e){return C().useState(e)},e.useSyncExternalStore=function(e,t,n){return C().useSyncExternalStore(e,t,n)},e.useTransition=function(){return C().useTransition()},e.version=`19.2.8`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),d=o(((e,t)=>{t.exports=u()})),f=o((e=>{(function(){function t(){if(x=!1,S){var t=e.unstable_now();C=t;var n=!0;try{a:{y=!1,b&&(b=!1,te(re),re=-1),v=!0;var a=_;try{b:{for(o(t),g=r(p);g!==null&&!(g.expirationTime>t&&c());){var u=g.callback;if(typeof u==`function`){g.callback=null,_=g.priorityLevel;var d=u(g.expirationTime<=t);if(t=e.unstable_now(),typeof d==`function`){g.callback=d,o(t),n=!0;break b}g===r(p)&&i(p),o(t)}else i(p);g=r(p)}if(g!==null)n=!0;else{var f=r(m);f!==null&&l(s,f.startTime-t),n=!1}}break a}finally{g=null,_=a,v=!1}n=void 0}}finally{n?ae():S=!1}}}function n(e,t){var n=e.length;e.push(t);a:for(;0<n;){var r=n-1>>>1,i=e[r];if(0<a(i,t))e[r]=t,e[n]=i,n=r;else break a}}function r(e){return e.length===0?null:e[0]}function i(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,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,c=e[s],l=s+1,u=e[l];if(0>a(c,n))l<i&&0>a(u,c)?(e[r]=u,e[l]=n,r=l):(e[r]=c,e[s]=n,r=s);else if(l<i&&0>a(u,n))e[r]=u,e[l]=n,r=l;else break a}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return n===0?e.id-t.id:n}function o(e){for(var t=r(m);t!==null;){if(t.callback===null)i(m);else if(t.startTime<=e)i(m),t.sortIndex=t.expirationTime,n(p,t);else break;t=r(m)}}function s(e){if(b=!1,o(e),!y){if(r(p)!==null)y=!0,S||(S=!0,ae());else{var t=r(m);t!==null&&l(s,t.startTime-e)}}}function c(){return x?!0:!(e.unstable_now()-C<ie)}function l(t,n){re=ee(function(){t(e.unstable_now())},n)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),e.unstable_now=void 0,typeof performance==`object`&&typeof performance.now==`function`){var u=performance;e.unstable_now=function(){return u.now()}}else{var d=Date,f=d.now();e.unstable_now=function(){return d.now()-f}}var p=[],m=[],h=1,g=null,_=3,v=!1,y=!1,b=!1,x=!1,ee=typeof setTimeout==`function`?setTimeout:null,te=typeof clearTimeout==`function`?clearTimeout:null,ne=typeof setImmediate<`u`?setImmediate:null,S=!1,re=-1,ie=5,C=-1;if(typeof ne==`function`)var ae=function(){ne(t)};else if(typeof MessageChannel<`u`){var w=new MessageChannel,T=w.port2;w.port1.onmessage=t,ae=function(){T.postMessage(null)}}else ae=function(){ee(t,0)};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`):ie=0<e?Math.floor(1e3/e):5},e.unstable_getCurrentPriorityLevel=function(){return _},e.unstable_next=function(e){switch(_){case 1:case 2:case 3:var t=3;break;default:t=_}var n=_;_=t;try{return e()}finally{_=n}},e.unstable_requestPaint=function(){x=!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=_;_=e;try{return t()}finally{_=n}},e.unstable_scheduleCallback=function(t,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,t){case 1:var c=-1;break;case 2:c=250;break;case 5:c=1073741823;break;case 4:c=1e4;break;default:c=5e3}return c=a+c,t={id:h++,callback:i,priorityLevel:t,startTime:a,expirationTime:c,sortIndex:-1},a>o?(t.sortIndex=a,n(m,t),r(p)===null&&t===r(m)&&(b?(te(re),re=-1):b=!0,l(s,a-o))):(t.sortIndex=c,n(p,t),y||v||(y=!0,S||(S=!0,ae()))),t},e.unstable_shouldYield=c,e.unstable_wrapCallback=function(e){var t=_;return function(){var n=_;_=t;try{return e.apply(this,arguments)}finally{_=n}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),p=o(((e,t)=>{t.exports=f()})),m=o((e=>{(function(){function t(){}function n(e){return``+e}function r(e,t,r){var i=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{n(i);var a=!1}catch{a=!0}return a&&(console.error(`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,typeof Symbol==`function`&&Symbol.toStringTag&&i[Symbol.toStringTag]||i.constructor.name||`Object`),n(i)),{$$typeof:u,key:i==null?null:``+i,children:e,containerInfo:t,implementation:r}}function i(e,t){if(e===`font`)return``;if(typeof t==`string`)return t===`use-credentials`?t:``}function a(e){return e===null?"`null`":e===void 0?"`undefined`":e===``?`an empty string`:`something with type "`+typeof e+`"`}function o(e){return e===null?"`null`":e===void 0?"`undefined`":e===``?`an empty string`:typeof e==`string`?JSON.stringify(e):typeof e==`number`?"`"+e+"`":`something with type "`+typeof e+`"`}function s(){var e=f.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
14
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
15
|
+
2. You might be breaking the Rules of Hooks
|
|
16
|
+
3. You might have more than one copy of React in the same app
|
|
17
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var c=d(),l={d:{f:t,r:function(){throw Error(`Invalid form element. requestFormReset must be passed a form that was rendered by React.`)},D:t,C:t,L:t,m:t,X:t,S:t,M:t},p:0,findDOMNode:null},u=Symbol.for(`react.portal`),f=c.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;typeof Map==`function`&&Map.prototype!=null&&typeof Map.prototype.forEach==`function`&&typeof Set==`function`&&Set.prototype!=null&&typeof Set.prototype.clear==`function`&&typeof Set.prototype.forEach==`function`||console.error(`React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://reactjs.org/link/react-polyfills`),e.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,e.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(`Target container is not a DOM element.`);return r(e,t,null,n)},e.flushSync=function(e){var t=f.T,n=l.p;try{if(f.T=null,l.p=2,e)return e()}finally{f.T=t,l.p=n,l.d.f()&&console.error(`flushSync was called from inside a lifecycle method. React cannot flush when React is already rendering. Consider moving this call to a scheduler task or micro task.`)}},e.preconnect=function(e,t){typeof e==`string`&&e?t!=null&&typeof t!=`object`?console.error("ReactDOM.preconnect(): Expected the `options` argument (second) to be an object but encountered %s instead. The only supported option at this time is `crossOrigin` which accepts a string.",o(t)):t!=null&&typeof t.crossOrigin!=`string`&&console.error("ReactDOM.preconnect(): Expected the `crossOrigin` option (second argument) to be a string but encountered %s instead. Try removing this option or passing a string value instead.",a(t.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(e)),typeof e==`string`&&(t?(t=t.crossOrigin,t=typeof t==`string`?t===`use-credentials`?t:``:void 0):t=null,l.d.C(e,t))},e.prefetchDNS=function(e){if(typeof e!=`string`||!e)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(e));else if(1<arguments.length){var t=arguments[1];typeof t==`object`&&t.hasOwnProperty(`crossOrigin`)?console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. It looks like the you are attempting to set a crossOrigin property for this DNS lookup hint. Browsers do not perform DNS queries using CORS and setting this attribute on the resource hint has no effect. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",o(t)):console.error("ReactDOM.prefetchDNS(): Expected only one argument, `href`, but encountered %s as a second argument instead. This argument is reserved for future options and is currently disallowed. Try calling ReactDOM.prefetchDNS() with just a single string argument, `href`.",o(t))}typeof e==`string`&&l.d.D(e)},e.preinit=function(e,t){if(typeof e==`string`&&e?typeof t!=`object`||!t?console.error("ReactDOM.preinit(): Expected the `options` argument (second) to be an object with an `as` property describing the type of resource to be preinitialized but encountered %s instead.",o(t)):t.as!==`style`&&t.as!==`script`&&console.error('ReactDOM.preinit(): Expected the `as` property in the `options` argument (second) to contain a valid value describing the type of resource to be preinitialized but encountered %s instead. Valid values for `as` are "style" and "script".',o(t.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",a(e)),typeof e==`string`&&t&&typeof t.as==`string`){var n=t.as,r=i(n,t.crossOrigin),s=typeof t.integrity==`string`?t.integrity:void 0,c=typeof t.fetchPriority==`string`?t.fetchPriority:void 0;n===`style`?l.d.S(e,typeof t.precedence==`string`?t.precedence:void 0,{crossOrigin:r,integrity:s,fetchPriority:c}):n===`script`&&l.d.X(e,{crossOrigin:r,integrity:s,fetchPriority:c,nonce:typeof t.nonce==`string`?t.nonce:void 0})}},e.preinitModule=function(e,t){var n=``;if(typeof e==`string`&&e||(n+=" The `href` argument encountered was "+a(e)+`.`),t!==void 0&&typeof t!=`object`?n+=" The `options` argument encountered was "+a(t)+`.`:t&&`as`in t&&t.as!==`script`&&(n+=" The `as` option encountered was "+o(t.as)+`.`),n)console.error("ReactDOM.preinitModule(): Expected up to two arguments, a non-empty `href` string and, optionally, an `options` object with a valid `as` property.%s",n);else switch(n=t&&typeof t.as==`string`?t.as:`script`,n){case`script`:break;default:n=o(n),console.error('ReactDOM.preinitModule(): Currently the only supported "as" type for this function is "script" but received "%s" instead. This warning was generated for `href` "%s". In the future other module types will be supported, aligning with the import-attributes proposal. Learn more here: (https://github.com/tc39/proposal-import-attributes)',n,e)}typeof e==`string`&&(typeof t==`object`&&t?(t.as==null||t.as===`script`)&&(n=i(t.as,t.crossOrigin),l.d.M(e,{crossOrigin:n,integrity:typeof t.integrity==`string`?t.integrity:void 0,nonce:typeof t.nonce==`string`?t.nonce:void 0})):t??l.d.M(e))},e.preload=function(e,t){var n=``;if(typeof e==`string`&&e||(n+=" The `href` argument encountered was "+a(e)+`.`),typeof t!=`object`||!t?n+=" The `options` argument encountered was "+a(t)+`.`:typeof t.as==`string`&&t.as||(n+=" The `as` option encountered was "+a(t.as)+`.`),n&&console.error('ReactDOM.preload(): Expected two arguments, a non-empty `href` string and an `options` object with an `as` property valid for a `<link rel="preload" as="..." />` tag.%s',n),typeof e==`string`&&typeof t==`object`&&t&&typeof t.as==`string`){n=t.as;var r=i(n,t.crossOrigin);l.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){var n=``;typeof e==`string`&&e||(n+=" The `href` argument encountered was "+a(e)+`.`),t!==void 0&&typeof t!=`object`?n+=" The `options` argument encountered was "+a(t)+`.`:t&&`as`in t&&typeof t.as!=`string`&&(n+=" The `as` option encountered was "+a(t.as)+`.`),n&&console.error('ReactDOM.preloadModule(): Expected two arguments, a non-empty `href` string and, optionally, an `options` object with an `as` property valid for a `<link rel="modulepreload" as="..." />` tag.%s',n),typeof e==`string`&&(t?(n=i(t.as,t.crossOrigin),l.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})):l.d.m(e))},e.requestFormReset=function(e){l.d.r(e)},e.unstable_batchedUpdates=function(e,t){return e(t)},e.useFormState=function(e,t,n){return s().useFormState(e,t,n)},e.useFormStatus=function(){return s().useHostTransitionStatus()},e.version=`19.2.8`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),h=o(((e,t)=>{t.exports=m()})),g=o((e=>{(function(){function t(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function n(e,t,r,i){if(r>=t.length)return i;var a=t[r],o=Uf(e)?e.slice():Tf({},e);return o[a]=n(e[a],t,r+1,i),o}function r(e,t,n){if(t.length!==n.length)console.warn(`copyWithRename() expects paths of the same length`);else{for(var r=0;r<n.length-1;r++)if(t[r]!==n[r]){console.warn(`copyWithRename() expects paths to be the same except for the deepest key`);return}return i(e,t,n,0)}}function i(e,t,n,r){var a=t[r],o=Uf(e)?e.slice():Tf({},e);return r+1===t.length?(o[n[r]]=o[a],Uf(o)?o.splice(a,1):delete o[a]):o[a]=i(e[a],t,n,r+1),o}function a(e,t,n){var r=t[n],i=Uf(e)?e.slice():Tf({},e);return n+1===t.length?(Uf(i)?i.splice(r,1):delete i[r],i):(i[r]=a(e[r],t,n+1),i)}function o(){return!1}function s(){return null}function c(){console.error(`Do not call Hooks inside useEffect(...), useMemo(...), or other built-in Hooks. You can only call Hooks at the top level of your React function. For more information, see https://react.dev/link/rules-of-hooks`)}function l(){console.error(`Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().`)}function u(){}function f(){}function m(e){var t=[];return e.forEach(function(e){t.push(e)}),t.sort().join(`, `)}function g(e,t,n,r){return new vr(e,t,n,r)}function _(e,t){e.context===Mg&&(Yd(e.current,2,t,e,null,null),nl())}function v(e,t){if(Ng!==null){var n=t.staleFamilies;t=t.updatedFamilies,El(),_r(e.current,t,n),nl()}}function y(e){Ng=e}function b(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function x(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,t.flags&4098&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function ee(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 te(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 ne(e){if(x(e)!==e)throw Error(`Unable to find node on an unmounted component.`)}function S(e){var t=e.alternate;if(!t){if(t=x(e),t===null)throw Error(`Unable to find node on an unmounted component.`);return t===e?e:null}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var a=i.alternate;if(a===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return ne(i),e;if(a===r)return ne(i),t;a=a.sibling}throw Error(`Unable to find node on an unmounted component.`)}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,s=i.child;s;){if(s===n){o=!0,n=i,r=a;break}if(s===r){o=!0,r=i,n=a;break}s=s.sibling}if(!o){for(s=a.child;s;){if(s===n){o=!0,n=a,r=i;break}if(s===r){o=!0,r=a,n=i;break}s=s.sibling}if(!o)throw Error(`Child was not found in either parent set. This indicates a bug in React related to the return pointer. Please file an issue.`)}}if(n.alternate!==r)throw Error(`Return fibers should always be each others' alternates. This error is likely caused by a bug in React. Please file an issue.`)}if(n.tag!==3)throw Error(`Unable to find node on an unmounted component.`);return n.stateNode.current===n?e:t}function re(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=re(e),t!==null)return t;e=e.sibling}return null}function ie(e){return typeof e!=`object`||!e?null:(e=Vf&&e[Vf]||e[`@@iterator`],typeof e==`function`?e:null)}function C(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===Hf?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case kf:return`Fragment`;case jf:return`Profiler`;case Af:return`StrictMode`;case Ff:return`Suspense`;case If:return`SuspenseList`;case zf:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case Of:return`Portal`;case Nf:return e.displayName||`Context`;case Mf:return(e._context.displayName||`Context`)+`.Consumer`;case Pf:var t=e.render;return e=e.displayName,e||=(e=t.displayName||t.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case Lf:return t=e.displayName||null,t===null?C(e.type)||`Memo`:t;case Rf:t=e._payload,e=e._init;try{return C(e(t))}catch{}}return null}function ae(e){return typeof e.tag==`number`?w(e):typeof e.name==`string`?e.name:null}function w(e){var t=e.type;switch(e.tag){case 31:return`Activity`;case 24:return`Cache`;case 9:return(t._context.displayName||`Context`)+`.Consumer`;case 10:return t.displayName||`Context`;case 18:return`DehydratedFragment`;case 11:return e=t.render,e=e.displayName||e.name||``,t.displayName||(e===``?`ForwardRef`:`ForwardRef(`+e+`)`);case 7:return`Fragment`;case 26:case 27:case 5:return t;case 4:return`Portal`;case 3:return`Root`;case 6:return`Text`;case 16:return C(t);case 8:return t===Af?`StrictMode`:`Mode`;case 22:return`Offscreen`;case 12:return`Profiler`;case 21:return`Scope`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 25:return`TracingMarker`;case 1:case 0:case 14:case 15:if(typeof t==`function`)return t.displayName||t.name||null;if(typeof t==`string`)return t;break;case 29:if(t=e._debugInfo,t!=null){for(var n=t.length-1;0<=n;n--)if(typeof t[n].name==`string`)return t[n].name}if(e.return!==null)return w(e.return)}return null}function T(e){return{current:e}}function oe(e,t){0>Jf?console.error(`Unexpected pop.`):(t!==qf[Jf]&&console.error(`Unexpected Fiber popped.`),e.current=Kf[Jf],Kf[Jf]=null,qf[Jf]=null,Jf--)}function E(e,t,n){Jf++,Kf[Jf]=e.current,qf[Jf]=n,e.current=t}function se(e){return e===null&&console.error(`Expected host context to exist. This error is likely caused by a bug in React. Please file an issue.`),e}function ce(e,t){E(Zf,t,e),E(Xf,e,e),E(Yf,null,e);var n=t.nodeType;switch(n){case 9:case 11:n=n===9?`#document`:`#fragment`,t=(t=t.documentElement)&&(t=t.namespaceURI)?Fu(t):US;break;default:if(n=t.tagName,t=t.namespaceURI)t=Fu(t),t=Iu(t,n);else switch(n){case`svg`:t=WS;break;case`math`:t=GS;break;default:t=US}}n=n.toLowerCase(),n=Ht(null,n),n={context:t,ancestorInfo:n},oe(Yf,e),E(Yf,n,e)}function le(e){oe(Yf,e),oe(Xf,e),oe(Zf,e)}function ue(){return se(Yf.current)}function de(e){e.memoizedState!==null&&E(Qf,e,e);var t=se(Yf.current),n=e.type,r=Iu(t.context,n);n=Ht(t.ancestorInfo,n),r={context:r,ancestorInfo:n},t!==r&&(E(Xf,e,e),E(Yf,r,e))}function fe(e){Xf.current===e&&(oe(Yf,e),oe(Xf,e)),Qf.current===e&&(oe(Qf,e),bC._currentValue=yC)}function pe(){}function me(){if($f===0){ep=console.log,tp=console.info,np=console.warn,rp=console.error,ip=console.group,ap=console.groupCollapsed,op=console.groupEnd;var e={configurable:!0,enumerable:!0,value:pe,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}$f++}function he(){if($f--,$f===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:Tf({},e,{value:ep}),info:Tf({},e,{value:tp}),warn:Tf({},e,{value:np}),error:Tf({},e,{value:rp}),group:Tf({},e,{value:ip}),groupCollapsed:Tf({},e,{value:ap}),groupEnd:Tf({},e,{value:op})})}0>$f&&console.error(`disabledDepth fell below zero. This is a bug in React. Please file an issue.`)}function ge(e){var t=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=t,e.startsWith(`Error: react-stack-top-frame
|
|
18
|
+
`)&&(e=e.slice(29)),t=e.indexOf(`
|
|
19
|
+
`),t!==-1&&(e=e.slice(t+1)),t=e.indexOf(`react_stack_bottom_frame`),t!==-1&&(t=e.lastIndexOf(`
|
|
20
|
+
`,t)),t!==-1)e=e.slice(0,t);else return``;return e}function _e(e){if(sp===void 0)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);sp=t&&t[1]||``,cp=-1<e.stack.indexOf(`
|
|
21
|
+
at`)?` (<anonymous>)`:-1<e.stack.indexOf(`@`)?`@unknown:0:0`:``}return`
|
|
22
|
+
`+sp+e+cp}function ve(e,t){if(!e||lp)return``;var n=up.get(e);if(n!==void 0)return n;lp=!0,n=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var r=null;r=G.H,G.H=null,me();try{var i={DetermineComponentFrameRoot:function(){try{if(t){var n=function(){throw Error()};if(Object.defineProperty(n.prototype,"props",{set:function(){throw Error()}}),typeof Reflect==`object`&&Reflect.construct){try{Reflect.construct(n,[])}catch(e){var r=e}Reflect.construct(e,[],n)}else{try{n.call()}catch(e){r=e}e.call(n.prototype)}}else{try{throw Error()}catch(e){r=e}(n=e())&&typeof n.catch==`function`&&n.catch(function(){})}}catch(e){if(e&&r&&typeof e.stack==`string`)return[e.stack,r.stack]}return[null,null]}};i.DetermineComponentFrameRoot.displayName=`DetermineComponentFrameRoot`;var a=Object.getOwnPropertyDescriptor(i.DetermineComponentFrameRoot,`name`);a&&a.configurable&&Object.defineProperty(i.DetermineComponentFrameRoot,"name",{value:`DetermineComponentFrameRoot`});var o=i.DetermineComponentFrameRoot(),s=o[0],c=o[1];if(s&&c){var l=s.split(`
|
|
23
|
+
`),u=c.split(`
|
|
24
|
+
`);for(o=a=0;a<l.length&&!l[a].includes(`DetermineComponentFrameRoot`);)a++;for(;o<u.length&&!u[o].includes(`DetermineComponentFrameRoot`);)o++;if(a===l.length||o===u.length)for(a=l.length-1,o=u.length-1;1<=a&&0<=o&&l[a]!==u[o];)o--;for(;1<=a&&0<=o;a--,o--)if(l[a]!==u[o]){if(a!==1||o!==1)do if(a--,o--,0>o||l[a]!==u[o]){var d=`
|
|
25
|
+
`+l[a].replace(` at new `,` at `);return e.displayName&&d.includes(`<anonymous>`)&&(d=d.replace(`<anonymous>`,e.displayName)),typeof e==`function`&&up.set(e,d),d}while(1<=a&&0<=o);break}}}finally{lp=!1,G.H=r,he(),Error.prepareStackTrace=n}return l=(l=e?e.displayName||e.name:``)?_e(l):``,typeof e==`function`&&up.set(e,l),l}function ye(e,t){switch(e.tag){case 26:case 27:case 5:return _e(e.type);case 16:return _e(`Lazy`);case 13:return e.child!==t&&t!==null?_e(`Suspense Fallback`):_e(`Suspense`);case 19:return _e(`SuspenseList`);case 0:case 15:return ve(e.type,!1);case 11:return ve(e.type.render,!1);case 1:return ve(e.type,!0);case 31:return _e(`Activity`);default:return``}}function be(e){try{var t=``,n=null;do{t+=ye(e,n);var r=e._debugInfo;if(r)for(var i=r.length-1;0<=i;i--){var a=r[i];if(typeof a.name==`string`){var o=t;a:{var s=a.name,c=a.env,l=a.debugLocation;if(l!=null){var u=ge(l),d=u.lastIndexOf(`
|
|
26
|
+
`),f=d===-1?u:u.slice(d+1);if(f.indexOf(s)!==-1){var p=`
|
|
27
|
+
`+f;break a}}p=_e(s+(c?` [`+c+`]`:``))}t=o+p}}n=e,e=e.return}while(e);return t}catch(e){return`
|
|
28
|
+
Error generating stack: `+e.message+`
|
|
29
|
+
`+e.stack}}function xe(e){return(e=e?e.displayName||e.name:``)?_e(e):``}function Se(){if(dp===null)return null;var e=dp._debugOwner;return e==null?null:ae(e)}function Ce(){if(dp===null)return``;var e=dp;try{var t=``;switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=_e(e.type);break;case 13:t+=_e(`Suspense`);break;case 19:t+=_e(`SuspenseList`);break;case 31:t+=_e(`Activity`);break;case 30:case 0:case 15:case 1:e._debugOwner||t!==``||(t+=xe(e.type));break;case 11:e._debugOwner||t!==``||(t+=xe(e.type.render))}for(;e;)if(typeof e.tag==`number`){var n=e;e=n._debugOwner;var r=n._debugStack;if(e&&r){var i=ge(r);i!==``&&(t+=`
|
|
30
|
+
`+i)}}else if(e.debugStack!=null){var a=e.debugStack;(e=e.owner)&&a&&(t+=`
|
|
31
|
+
`+ge(a))}else break;var o=t}catch(e){o=`
|
|
32
|
+
Error generating stack: `+e.message+`
|
|
33
|
+
`+e.stack}return o}function D(e,t,n,r,i,a,o){var s=dp;we(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,n,r,i,a,o)):t(n,r,i,a,o)}finally{we(s)}throw Error(`runWithFiberInDEV should never be called in production. This is a bug in React.`)}function we(e){G.getCurrentStack=e===null?null:Ce,fp=!1,dp=e}function Te(e){return typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`}function Ee(e){try{return De(e),!1}catch{return!0}}function De(e){return``+e}function O(e,t){if(Ee(e))return console.error("The provided `%s` attribute is an unsupported type %s. This value must be coerced to a string before using it here.",t,Te(e)),De(e)}function Oe(e,t){if(Ee(e))return console.error("The provided `%s` CSS property is an unsupported type %s. This value must be coerced to a string before using it here.",t,Te(e)),De(e)}function ke(e){if(Ee(e))return console.error(`Form field values (value, checked, defaultValue, or defaultChecked props) must be strings, not %s. This value must be coerced to a string before using it here.`,Te(e)),De(e)}function Ae(e){if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>`u`)return!1;var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled)return!0;if(!t.supportsFiber)return console.error(`The installed version of React DevTools is too old and will not work with the current version of React. Please update React DevTools. https://react.dev/link/react-devtools`),!0;try{Dp=t.inject(e),Op=t}catch(e){console.error(`React instrumentation encountered an error: %o.`,e)}return!!t.checkDCE}function je(e){if(typeof Tp==`function`&&Ep(e),Op&&typeof Op.setStrictMode==`function`)try{Op.setStrictMode(Dp,e)}catch(e){kp||(kp=!0,console.error(`React instrumentation encountered an error: %o`,e))}}function Me(e){return e>>>=0,e===0?32:31-(Mp(e)/Np|0)|0}function Ne(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return console.error(`Should have found matching lanes. This is a bug in React.`),e}}function Pe(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=Ne(n))):i=Ne(o):i=Ne(s)):(r=s&~a,r===0?(o&=s,o===0?n||(n=s&~e,n!==0&&(i=Ne(n))):i=Ne(o)):i=Ne(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 Fe(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Ie(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 console.error(`Should have found matching lanes. This is a bug in React.`),-1}}function Le(){var e=Ip;return Ip<<=1,!(Ip&62914560)&&(Ip=4194304),e}function Re(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function ze(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Be(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-jp(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&&Ve(e,r,0),a!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=a&~(o&~t))}function Ve(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-jp(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function He(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-jp(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function Ue(e,t){var n=t&-t;return n=n&42?1:We(n),(n&(e.suspendedLanes|t))===0?n:0}function We(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 Ge(e,t,n){if(Ap)for(e=e.pendingUpdatersLaneMap;0<n;){var r=31-jp(n),i=1<<r;e[r].add(t),n&=~i}}function Ke(e,t){if(Ap)for(var n=e.pendingUpdatersLaneMap,r=e.memoizedUpdaters;0<t;){var i=31-jp(t);e=1<<i,i=n[i],0<i.size&&(i.forEach(function(e){var t=e.alternate;t!==null&&r.has(t)||r.add(e)}),i.clear()),t&=~e}}function qe(e){return e&=-e,Lp!==0&&Lp<e?Rp!==0&&Rp<e?e&134217727?zp:Bp:Rp:Lp}function Je(){var e=Wf.p;return e===0?(e=window.event,e===void 0?zp:sf(e.type)):e}function Ye(e,t){var n=Wf.p;try{return Wf.p=e,t()}finally{Wf.p=n}}function Xe(e){delete e[Hp],delete e[Up],delete e[Gp],delete e[Kp],delete e[qp]}function Ze(e){var t=e[Hp];if(t)return t;for(var n=e.parentNode;n;){if(t=n[Wp]||n[Hp]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=gd(e);e!==null;){if(n=e[Hp])return n;e=gd(e)}return t}e=n,n=e.parentNode}return null}function Qe(e){if(e=e[Hp]||e[Wp]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function $e(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(`getNodeFromInstance: Invalid argument.`)}function k(e){var t=e[Jp];return t||=e[Jp]={hoistableStyles:new Map,hoistableScripts:new Map},t}function et(e){e[Yp]=!0}function tt(e,t){A(e,t),A(e+`Capture`,t)}function A(e,t){Zp[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Zp[e]=t;var n=e.toLowerCase();for(Qp[n]=e,e===`onDoubleClick`&&(Qp.ondblclick=e),e=0;e<t.length;e++)Xp.add(t[e])}function nt(e,t){$p[t.type]||t.onChange||t.onInput||t.readOnly||t.disabled||t.value==null||console.error(e===`select`?"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set `onChange`.":"You provided a `value` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultValue`. Otherwise, set either `onChange` or `readOnly`."),t.onChange||t.readOnly||t.disabled||t.checked==null||console.error("You provided a `checked` prop to a form field without an `onChange` handler. This will render a read-only field. If the field should be mutable use `defaultChecked`. Otherwise, set either `onChange` or `readOnly`.")}function rt(e){return pp.call(nm,e)?!0:pp.call(tm,e)?!1:em.test(e)?nm[e]=!0:(tm[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function it(e,t,n){if(rt(t)){if(!e.hasAttribute(t)){switch(typeof n){case`symbol`:case`object`:return n;case`function`:return n;case`boolean`:if(!1===n)return n}return n===void 0?void 0:null}return e=e.getAttribute(t),e===``&&!0===n||(O(n,t),e===``+n?n:e)}}function at(e,t,n){if(rt(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}}O(n,t),e.setAttribute(t,``+n)}}}function ot(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}O(n,t),e.setAttribute(t,``+n)}}function st(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}O(r,n),e.setAttributeNS(t,n,``+r)}}function ct(e){switch(typeof e){case`bigint`:case`boolean`:case`number`:case`string`:case`undefined`:return e;case`object`:return ke(e),e;default:return``}}function lt(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()===`input`&&(t===`checkbox`||t===`radio`)}function ut(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){ke(e),n=``+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(e){ke(e),n=``+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function dt(e){if(!e._valueTracker){var t=lt(e)?`checked`:`value`;e._valueTracker=ut(e,t,``+e[t])}}function ft(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r=``;return e&&(r=lt(e)?e.checked?`true`:`false`:e.value),e=r,e!==n&&(t.setValue(e),!0)}function pt(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 mt(e){return e.replace(rm,function(e){return`\\`+e.charCodeAt(0).toString(16)+` `})}function ht(e,t){t.checked===void 0||t.defaultChecked===void 0||am||(console.error(`%s contains an input of type %s with both checked and defaultChecked props. Input elements must be either controlled or uncontrolled (specify either the checked prop, or the defaultChecked prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components`,Se()||`A component`,t.type),am=!0),t.value===void 0||t.defaultValue===void 0||im||(console.error(`%s contains an input of type %s with both value and defaultValue props. Input elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled input element and remove one of these props. More info: https://react.dev/link/controlled-components`,Se()||`A component`,t.type),im=!0)}function gt(e,t,n,r,i,a,o,s){e.name=``,o!=null&&typeof o!=`function`&&typeof o!=`symbol`&&typeof o!=`boolean`?(O(o,`type`),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=``+ct(t)):e.value!==``+ct(t)&&(e.value=``+ct(t)),t==null?n==null?r!=null&&e.removeAttribute(`value`):vt(e,o,ct(n)):vt(e,o,ct(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`?(O(s,`name`),e.name=``+ct(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`&&(O(a,`type`),e.type=a),t!=null||n!=null){if(!(a!==`submit`&&a!==`reset`||t!=null)){dt(e);return}n=n==null?``:``+ct(n),t=t==null?n:``+ct(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`&&(O(o,`name`),e.name=o),dt(e)}function vt(e,t,n){t===`number`&&pt(e.ownerDocument)===e||e.defaultValue===``+n||(e.defaultValue=``+n)}function yt(e,t){t.value??(typeof t.children==`object`&&t.children!==null?Cf.Children.forEach(t.children,function(e){e==null||typeof e==`string`||typeof e==`number`||typeof e==`bigint`||sm||(sm=!0,console.error("Cannot infer the option value of complex children. Pass a `value` prop or use a plain string as children to <option>."))}):t.dangerouslySetInnerHTML==null||cm||(cm=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||om||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),om=!0)}function bt(){var e=Se();return e?`
|
|
34
|
+
|
|
35
|
+
Check the render method of \``+e+"`.":``}function xt(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=``+ct(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 St(e,t){for(e=0;e<um.length;e++){var n=um[e];if(t[n]!=null){var r=Uf(t[n]);t.multiple&&!r?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",n,bt()):!t.multiple&&r&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",n,bt())}}t.value===void 0||t.defaultValue===void 0||lm||(console.error(`Select elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled select element and remove one of these props. More info: https://react.dev/link/controlled-components`),lm=!0)}function j(e,t){t.value===void 0||t.defaultValue===void 0||dm||(console.error(`%s contains a textarea with both value and defaultValue props. Textarea elements must be either controlled or uncontrolled (specify either the value prop, or the defaultValue prop, but not both). Decide between using a controlled or uncontrolled textarea and remove one of these props. More info: https://react.dev/link/controlled-components`,Se()||`A component`),dm=!0),t.children!=null&&t.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function Ct(e,t,n){if(t!=null&&(t=``+ct(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n==null?``:``+ct(n)}function wt(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(Uf(r)){if(1<r.length)throw Error(`<textarea> can only have at most one child.`);r=r[0]}n=r}n??=``,t=n}n=ct(t),e.defaultValue=n,r=e.textContent,r===n&&r!==``&&r!==null&&(e.value=r),dt(e)}function Tt(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?Tt(e.children[0],t):e}function Et(e){return` `+` `.repeat(e)}function Dt(e){return`+ `+` `.repeat(e)}function Ot(e){return`- `+` `.repeat(e)}function kt(e){switch(e.tag){case 26:case 27:case 5:return e.type;case 16:return`Lazy`;case 31:return`Activity`;case 13:return`Suspense`;case 19:return`SuspenseList`;case 0:case 15:return e=e.type,e.displayName||e.name||null;case 11:return e=e.type.render,e.displayName||e.name||null;case 1:return e=e.type,e.displayName||e.name||null;default:return null}}function At(e,t){return fm.test(e)?(e=JSON.stringify(e),e.length>t-2?8>t?`{"..."}`:`{`+e.slice(0,t-7)+`..."}`:`{`+e+`}`):e.length>t?5>t?`{"..."}`:e.slice(0,t-3)+`...`:e}function jt(e,t,n){var r=120-2*n;if(t===null)return Dt(n)+At(e,r)+`
|
|
36
|
+
`;if(typeof t==`string`){for(var i=0;i<t.length&&i<e.length&&t.charCodeAt(i)===e.charCodeAt(i);i++);return i>r-8&&10<i&&(e=`...`+e.slice(i-8),t=`...`+t.slice(i-8)),Dt(n)+At(e,r)+`
|
|
37
|
+
`+Ot(n)+At(t,r)+`
|
|
38
|
+
`}return Et(n)+At(e,r)+`
|
|
39
|
+
`}function Mt(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(e,t){return t})}function Nt(e,t){switch(typeof e){case`string`:return e=JSON.stringify(e),e.length>t?5>t?`"..."`:e.slice(0,t-4)+`..."`:e;case`object`:if(e===null)return`null`;if(Uf(e))return`[...]`;if(e.$$typeof===Df)return(t=C(e.type))?`<`+t+`>`:`<...>`;var n=Mt(e);if(n===`Object`){for(var r in n=``,t-=2,e)if(e.hasOwnProperty(r)){var i=JSON.stringify(r);if(i!==`"`+r+`"`&&(r=i),t-=r.length-2,i=Nt(e[r],15>t?t:15),t-=i.length,0>t){n+=n===``?`...`:`, ...`;break}n+=(n===``?``:`,`)+r+`:`+i}return`{`+n+`}`}return n;case`function`:return(t=e.displayName||e.name)?`function `+t:`function`;default:return String(e)}}function Pt(e,t){return typeof e!=`string`||fm.test(e)?`{`+Nt(e,t-2)+`}`:e.length>t-2?5>t?`"..."`:`"`+e.slice(0,t-5)+`..."`:`"`+e+`"`}function Ft(e,t,n){var r=120-n.length-e.length,i=[],a;for(a in t)if(t.hasOwnProperty(a)&&a!==`children`){var o=Pt(t[a],120-n.length-a.length-1);r-=a.length+o.length+2,i.push(a+`=`+o)}return i.length===0?n+`<`+e+`>
|
|
40
|
+
`:0<r?n+`<`+e+` `+i.join(` `)+`>
|
|
41
|
+
`:n+`<`+e+`
|
|
42
|
+
`+n+` `+i.join(`
|
|
43
|
+
`+n+` `)+`
|
|
44
|
+
`+n+`>
|
|
45
|
+
`}function It(e,t,n){var r=``,i=Tf({},t),a;for(a in e)if(e.hasOwnProperty(a)){delete i[a];var o=120-2*n-a.length-2,s=Nt(e[a],o);t.hasOwnProperty(a)?(o=Nt(t[a],o),r+=Dt(n)+a+`: `+s+`
|
|
46
|
+
`,r+=Ot(n)+a+`: `+o+`
|
|
47
|
+
`):r+=Dt(n)+a+`: `+s+`
|
|
48
|
+
`}for(var c in i)i.hasOwnProperty(c)&&(e=Nt(i[c],120-2*n-c.length-2),r+=Ot(n)+c+`: `+e+`
|
|
49
|
+
`);return r}function Lt(e,t,n,r){var i=``,a=new Map;for(l in n)n.hasOwnProperty(l)&&a.set(l.toLowerCase(),l);if(a.size===1&&a.has(`children`))i+=Ft(e,t,Et(r));else{for(var o in t)if(t.hasOwnProperty(o)&&o!==`children`){var s=120-2*(r+1)-o.length-1,c=a.get(o.toLowerCase());if(c!==void 0){a.delete(o.toLowerCase());var l=t[o];c=n[c];var u=Pt(l,s);s=Pt(c,s),typeof l==`object`&&l&&typeof c==`object`&&c&&Mt(l)===`Object`&&Mt(c)===`Object`&&(2<Object.keys(l).length||2<Object.keys(c).length||-1<u.indexOf(`...`)||-1<s.indexOf(`...`))?i+=Et(r+1)+o+`={{
|
|
50
|
+
`+It(l,c,r+2)+Et(r+1)+`}}
|
|
51
|
+
`:(i+=Dt(r+1)+o+`=`+u+`
|
|
52
|
+
`,i+=Ot(r+1)+o+`=`+s+`
|
|
53
|
+
`)}else i+=Et(r+1)+o+`=`+Pt(t[o],s)+`
|
|
54
|
+
`}a.forEach(function(e){if(e!==`children`){var t=120-2*(r+1)-e.length-1;i+=Ot(r+1)+e+`=`+Pt(n[e],t)+`
|
|
55
|
+
`}}),i=i===``?Et(r)+`<`+e+`>
|
|
56
|
+
`:Et(r)+`<`+e+`
|
|
57
|
+
`+i+Et(r)+`>
|
|
58
|
+
`}return e=n.children,t=t.children,typeof e==`string`||typeof e==`number`||typeof e==`bigint`?(a=``,(typeof t==`string`||typeof t==`number`||typeof t==`bigint`)&&(a=``+t),i+=jt(a,``+e,r+1)):(typeof t==`string`||typeof t==`number`||typeof t==`bigint`)&&(i=e==null?i+jt(``+t,null,r+1):i+jt(``+t,void 0,r+1)),i}function Rt(e,t){var n=kt(e);if(n===null){for(n=``,e=e.child;e;)n+=Rt(e,t),e=e.sibling;return n}return Et(t)+`<`+n+`>
|
|
59
|
+
`}function zt(e,t){var n=Tt(e,t);if(n!==e&&(e.children.length!==1||e.children[0]!==n))return Et(t)+`...
|
|
60
|
+
`+zt(n,t+1);n=``;var r=e.fiber._debugInfo;if(r)for(var i=0;i<r.length;i++){var a=r[i].name;typeof a==`string`&&(n+=Et(t)+`<`+a+`>
|
|
61
|
+
`,t++)}if(r=``,i=e.fiber.pendingProps,e.fiber.tag===6)r=jt(i,e.serverProps,t),t++;else if(a=kt(e.fiber),a!==null){if(e.serverProps===void 0){r=t;var o=120-2*r-a.length-2,s=``;for(l in i)if(i.hasOwnProperty(l)&&l!==`children`){var c=Pt(i[l],15);if(o-=l.length+c.length+2,0>o){s+=` ...`;break}s+=` `+l+`=`+c}r=Et(r)+`<`+a+s+`>
|
|
62
|
+
`,t++}else e.serverProps===null?(r=Ft(a,i,Dt(t)),t++):typeof e.serverProps==`string`?console.error(`Should not have matched a non HostText fiber to a Text node. This is a bug in React.`):(r=Lt(a,i,e.serverProps,t),t++)}var l=``;for(i=e.fiber.child,a=0;i&&a<e.children.length;)o=e.children[a],o.fiber===i?(l+=zt(o,t),a++):l+=Rt(i,t),i=i.sibling;for(i&&0<e.children.length&&(l+=Et(t)+`...
|
|
63
|
+
`),i=e.serverTail,e.serverProps===null&&t--,e=0;e<i.length;e++)a=i[e],l=typeof a==`string`?l+(Ot(t)+At(a,120-2*t)+`
|
|
64
|
+
`):l+Ft(a.type,a.props,Ot(t));return n+r+l}function Bt(e){try{return`
|
|
65
|
+
|
|
66
|
+
`+zt(e,0)}catch{return``}}function Vt(e,t,n){for(var r=t,i=null,a=0;r;)r===e&&(a=0),i={fiber:r,children:i===null?[]:[i],serverProps:r===t?n:r===e?null:void 0,serverTail:[],distanceFromLeaf:a},a++,r=r.return;return i===null?``:Bt(i).replaceAll(/^[+-]/gm,`>`)}function Ht(e,t){var n=Tf({},e||_m),r={tag:t};return mm.indexOf(t)!==-1&&(n.aTagInScope=null,n.buttonTagInScope=null,n.nobrTagInScope=null),hm.indexOf(t)!==-1&&(n.pTagInButtonScope=null),pm.indexOf(t)!==-1&&t!==`address`&&t!==`div`&&t!==`p`&&(n.listItemTagAutoclosing=null,n.dlItemTagAutoclosing=null),n.current=r,t===`form`&&(n.formTag=r),t===`a`&&(n.aTagInScope=r),t===`button`&&(n.buttonTagInScope=r),t===`nobr`&&(n.nobrTagInScope=r),t===`p`&&(n.pTagInButtonScope=r),t===`li`&&(n.listItemTagAutoclosing=r),(t===`dd`||t===`dt`)&&(n.dlItemTagAutoclosing=r),t===`#document`||t===`html`?n.containerTagInScope=null:n.containerTagInScope||=r,e!==null||t!==`#document`&&t!==`html`&&t!==`body`?!0===n.implicitRootScope&&(n.implicitRootScope=!1):n.implicitRootScope=!0,n}function Ut(e,t,n){switch(t){case`select`:return e===`hr`||e===`option`||e===`optgroup`||e===`script`||e===`template`||e===`#text`;case`optgroup`:return e===`option`||e===`#text`;case`option`:return e===`#text`;case`tr`:return e===`th`||e===`td`||e===`style`||e===`script`||e===`template`;case`tbody`:case`thead`:case`tfoot`:return e===`tr`||e===`style`||e===`script`||e===`template`;case`colgroup`:return e===`col`||e===`template`;case`table`:return e===`caption`||e===`colgroup`||e===`tbody`||e===`tfoot`||e===`thead`||e===`style`||e===`script`||e===`template`;case`head`:return e===`base`||e===`basefont`||e===`bgsound`||e===`link`||e===`meta`||e===`title`||e===`noscript`||e===`noframes`||e===`style`||e===`script`||e===`template`;case`html`:if(n)break;return e===`head`||e===`body`||e===`frameset`;case`frameset`:return e===`frame`;case`#document`:if(!n)return e===`html`}switch(e){case`h1`:case`h2`:case`h3`:case`h4`:case`h5`:case`h6`:return t!==`h1`&&t!==`h2`&&t!==`h3`&&t!==`h4`&&t!==`h5`&&t!==`h6`;case`rp`:case`rt`:return gm.indexOf(t)===-1;case`caption`:case`col`:case`colgroup`:case`frameset`:case`frame`:case`tbody`:case`td`:case`tfoot`:case`th`:case`thead`:case`tr`:return t==null;case`head`:return n||t===null;case`html`:return n&&t===`#document`||t===null;case`body`:return n&&(t===`#document`||t===`html`)||t===null}return!0}function Wt(e,t){switch(e){case`address`:case`article`:case`aside`:case`blockquote`:case`center`:case`details`:case`dialog`:case`dir`:case`div`:case`dl`:case`fieldset`:case`figcaption`:case`figure`:case`footer`:case`header`:case`hgroup`:case`main`:case`menu`:case`nav`:case`ol`:case`p`:case`section`:case`summary`:case`ul`:case`pre`:case`listing`:case`table`:case`hr`:case`xmp`:case`h1`:case`h2`:case`h3`:case`h4`:case`h5`:case`h6`:return t.pTagInButtonScope;case`form`:return t.formTag||t.pTagInButtonScope;case`li`:return t.listItemTagAutoclosing;case`dd`:case`dt`:return t.dlItemTagAutoclosing;case`button`:return t.buttonTagInScope;case`a`:return t.aTagInScope;case`nobr`:return t.nobrTagInScope}return null}function Gt(e,t){for(;e;){switch(e.tag){case 5:case 26:case 27:if(e.type===t)return e}e=e.return}return null}function Kt(e,t){t||=_m;var n=t.current;if(t=(n=Ut(e,n&&n.tag,t.implicitRootScope)?null:n)?null:Wt(e,t),t=n||t,!t)return!0;var r=t.tag;if(t=String(!!n)+`|`+e+`|`+r,vm[t])return!1;vm[t]=!0;var i=(t=dp)?Gt(t.return,r):null,a=t!==null&&i!==null?Vt(i,t,null):``,o=`<`+e+`>`;return n?(n=``,r===`table`&&e===`tr`&&(n+=` Add a <tbody>, <thead> or <tfoot> to your code to match the DOM tree generated by the browser.`),console.error(`In HTML, %s cannot be a child of <%s>.%s
|
|
67
|
+
This will cause a hydration error.%s`,o,r,n,a)):console.error(`In HTML, %s cannot be a descendant of <%s>.
|
|
68
|
+
This will cause a hydration error.%s`,o,r,a),t&&(e=t.return,i===null||e===null||i===e&&e._debugOwner===t._debugOwner||D(i,function(){console.error(`<%s> cannot contain a nested %s.
|
|
69
|
+
See this log for the ancestor stack trace.`,r,o)})),!1}function qt(e,t,n){if(n||Ut(`#text`,t,!1))return!0;if(n=`#text|`+t,vm[n])return!1;vm[n]=!0;var r=(n=dp)?Gt(n,t):null;return n=n!==null&&r!==null?Vt(r,n,n.tag===6?null:{children:null}):``,/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
|
|
70
|
+
This will cause a hydration error.%s`,t,n):console.error(`In HTML, whitespace text nodes cannot be a child of <%s>. Make sure you don't have any extra whitespace between tags on each line of your source code.
|
|
71
|
+
This will cause a hydration error.%s`,t,n),!1}function Jt(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}function Yt(e){return e.replace(wm,function(e,t){return t.toUpperCase()})}function Xt(e,t,n){var r=t.indexOf(`--`)===0;r||(-1<t.indexOf(`-`)?Em.hasOwnProperty(t)&&Em[t]||(Em[t]=!0,console.error(`Unsupported style property %s. Did you mean %s?`,t,Yt(t.replace(Cm,`ms-`)))):Sm.test(t)?Em.hasOwnProperty(t)&&Em[t]||(Em[t]=!0,console.error(`Unsupported vendor-prefixed style property %s. Did you mean %s?`,t,t.charAt(0).toUpperCase()+t.slice(1))):!Tm.test(n)||Dm.hasOwnProperty(n)&&Dm[n]||(Dm[n]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,n.replace(Tm,``))),typeof n==`number`&&(isNaN(n)?Om||(Om=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(n)||km||(km=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",t)))),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||Am.has(t)?t===`float`?e.cssFloat=n:(Oe(n,t),e[t]=(``+n).trim()):e[t]=n+`px`}function Zt(e,t,n){if(t!=null&&typeof t!=`object`)throw Error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");if(t&&Object.freeze(t),e=e.style,n!=null){if(t){var r={};if(n){for(var i in n)if(n.hasOwnProperty(i)&&!t.hasOwnProperty(i))for(var a=ym[i]||[i],o=0;o<a.length;o++)r[a[o]]=i}for(var s in t)if(t.hasOwnProperty(s)&&(!n||n[s]!==t[s]))for(i=ym[s]||[s],a=0;a<i.length;a++)r[i[a]]=s;for(var c in s={},t)for(i=ym[c]||[c],a=0;a<i.length;a++)s[i[a]]=c;for(var l in c={},r)if(i=r[l],(a=s[l])&&i!==a&&(o=i+`,`+a,!c[o])){c[o]=!0,o=console;var u=t[i];o.error.call(o,`%s a style property during rerender (%s) when a conflicting property is set (%s) can lead to styling bugs. To avoid this, don't mix shorthand and non-shorthand properties for the same value; instead, replace the shorthand with separate values.`,u==null||typeof u==`boolean`||u===``?`Removing`:`Updating`,i,a)}}for(var d in n)!n.hasOwnProperty(d)||t!=null&&t.hasOwnProperty(d)||(d.indexOf(`--`)===0?e.setProperty(d,``):d===`float`?e.cssFloat=``:e[d]=``);for(var f in t)l=t[f],t.hasOwnProperty(f)&&n[f]!==l&&Xt(e,f,l)}else for(r in t)t.hasOwnProperty(r)&&Xt(e,r,t[r])}function Qt(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}}function $t(e){return Nm.get(e)||e}function en(e,t){if(pp.call(Im,t)&&Im[t])return!0;if(Rm.test(t)){if(e=`aria-`+t.slice(4).toLowerCase(),e=Fm.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Im[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),Im[t]=!0}if(Lm.test(t)){if(e=t.toLowerCase(),e=Fm.hasOwnProperty(e)?e:null,e==null)return Im[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),Im[t]=!0)}return!0}function tn(e,t){var n=[],r;for(r in t)en(e,r)||n.push(r);t=n.map(function(e){return"`"+e+"`"}).join(`, `),n.length===1?console.error(`Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props`,t,e):1<n.length&&console.error(`Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props`,t,e)}function nn(e,t,n,r){if(pp.call(Bm,t)&&Bm[t])return!0;var i=t.toLowerCase();if(i===`onfocusin`||i===`onfocusout`)return console.error(`React uses onFocus and onBlur instead of onFocusIn and onFocusOut. All React events are normalized to bubble, so onFocusIn and onFocusOut are not needed/supported by React.`),Bm[t]=!0;if(typeof n==`function`&&(e===`form`&&t===`action`||e===`input`&&t===`formAction`||e===`button`&&t===`formAction`))return!0;if(r!=null){if(e=r.possibleRegistrationNames,r.registrationNameDependencies.hasOwnProperty(t))return!0;if(r=e.hasOwnProperty(i)?e[i]:null,r!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",t,r),Bm[t]=!0;if(Vm.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),Bm[t]=!0}else if(Vm.test(t))return Hm.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Bm[t]=!0;if(Um.test(t)||Wm.test(t))return!0;if(i===`innerhtml`)return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Bm[t]=!0;if(i===`aria`)return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Bm[t]=!0;if(i===`is`&&n!=null&&typeof n!=`string`)return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof n),Bm[t]=!0;if(typeof n==`number`&&isNaN(n))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Bm[t]=!0;if(Pm.hasOwnProperty(i)){if(i=Pm[i],i!==t)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",t,i),Bm[t]=!0}else if(t!==i)return console.error("React does not recognize the `%s` prop on a DOM element. If you intentionally want it to appear in the DOM as a custom attribute, spell it as lowercase `%s` instead. If you accidentally passed it from a parent component, remove it from the DOM element.",t,i),Bm[t]=!0;switch(t){case`dangerouslySetInnerHTML`:case`children`:case`style`:case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:return!0;case`innerText`:case`textContent`:return!0}switch(typeof n){case`boolean`:switch(t){case`autoFocus`:case`checked`:case`multiple`:case`muted`:case`selected`:case`contentEditable`:case`spellCheck`:case`draggable`:case`value`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:case`capture`:case`download`:case`inert`:return!0;default:return i=t.toLowerCase().slice(0,5),i===`data-`||i===`aria-`||(n?console.error('Received `%s` for a non-boolean attribute `%s`.\n\nIf you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.',n,t,t,n,t):console.error(`Received \`%s\` for a non-boolean attribute \`%s\`.
|
|
72
|
+
|
|
73
|
+
If you want to write it to the DOM, pass a string instead: %s="%s" or %s={value.toString()}.
|
|
74
|
+
|
|
75
|
+
If you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.`,n,t,t,n,t,t,t),Bm[t]=!0)}case`function`:case`symbol`:return Bm[t]=!0,!1;case`string`:if(n===`false`||n===`true`){switch(t){case`checked`:case`selected`:case`multiple`:case`muted`:case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:case`inert`:break;default:return!0}console.error("Received the string `%s` for the boolean attribute `%s`. %s Did you mean %s={%s}?",n,t,n===`false`?`The browser will interpret it as a truthy value.`:`Although this works, it will not work as expected if you pass the string "false".`,t,n),Bm[t]=!0}}return!0}function rn(e,t,n){var r=[],i;for(i in t)nn(e,i,t[i],n)||r.push(i);t=r.map(function(e){return"`"+e+"`"}).join(`, `),r.length===1?console.error(`Invalid value for prop %s on <%s> tag. Either remove it from the element, or pass a string or number value to keep it in the DOM. For details, see https://react.dev/link/attribute-behavior `,t,e):1<r.length&&console.error(`Invalid values for props %s on <%s> tag. Either remove them from the element, or pass a string or number value to keep them in the DOM. For details, see https://react.dev/link/attribute-behavior `,t,e)}function an(e){return Gm.test(``+e)?`javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')`:e}function on(){}function sn(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function cn(e){var t=Qe(e);if(t&&(e=t.stateNode)){var n=e[Up]||null;a:switch(e=t.stateNode,t.type){case`input`:if(gt(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(O(t,`name`),n=n.querySelectorAll(`input[name="`+mt(``+t)+`"][type="radio"]`),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[Up]||null;if(!i)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");gt(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&ft(r)}break a;case`textarea`:Ct(e,n.value,n.defaultValue);break a;case`select`:t=n.value,t!=null&&xt(e,!!n.multiple,t,!1)}}}function ln(e,t,n){if(Ym)return e(t,n);Ym=!0;try{return e(t)}finally{if(Ym=!1,(qm!==null||Jm!==null)&&(nl(),qm&&(t=qm,e=Jm,Jm=qm=null,cn(t),e)))for(t=0;t<e.length;t++)cn(e[t])}}function un(e,t){var n=e.stateNode;if(n===null)return null;var r=n[Up]||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("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof n+"` type.");return n}function dn(){if(th)return th;var e,t=eh,n=t.length,r,i=`value`in $m?$m.value:$m.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 th=i.slice(e,1<r?1-r:void 0)}function fn(e){var t=e.keyCode;return`charCode`in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function pn(){return!0}function mn(){return!1}function hn(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(i.defaultPrevented==null?!1===i.returnValue:i.defaultPrevented)?pn:mn,this.isPropagationStopped=mn,this}return Tf(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():typeof e.returnValue!=`unknown`&&(e.returnValue=!1),this.isDefaultPrevented=pn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():typeof e.cancelBubble!=`unknown`&&(e.cancelBubble=!0),this.isPropagationStopped=pn)},persist:function(){},isPersistent:pn}),t}function gn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=yh[e])?!!t[e]:!1}function _n(){return gn}function vn(e,t){switch(e){case`keyup`:return Eh.indexOf(t.keyCode)!==-1;case`keydown`:return t.keyCode!==Dh;case`keypress`:case`mousedown`:case`focusout`:return!0;default:return!1}}function yn(e){return e=e.detail,typeof e==`object`&&`data`in e?e.data:null}function bn(e,t){switch(e){case`compositionend`:return yn(t);case`keypress`:return t.which===Mh?(Ph=!0,Nh):null;case`textInput`:return e=t.data,e===Nh&&Ph?null:e;default:return null}}function xn(e,t){if(Fh)return e===`compositionend`||!Oh&&vn(e,t)?(e=dn(),th=eh=$m=null,Fh=!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 jh&&t.locale!==`ko`?null:t.data;default:return null}}function Sn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t===`input`?!!Ih[e.type]:t===`textarea`}function Cn(e){if(!Xm)return!1;e=`on`+e;var t=e in document;return t||=(t=document.createElement(`div`),t.setAttribute(e,`return;`),typeof t[e]==`function`),t}function wn(e,t,n,r){qm?Jm?Jm.push(r):Jm=[r]:qm=r,t=cu(t,`onChange`),0<t.length&&(n=new rh(`onChange`,`change`,null,n,r),e.push({event:n,listeners:t}))}function Tn(e){tu(e,0)}function En(e){if(ft($e(e)))return e}function Dn(e,t){if(e===`change`)return t}function On(){Lh&&(Lh.detachEvent(`onpropertychange`,kn),Rh=Lh=null)}function kn(e){if(e.propertyName===`value`&&En(Rh)){var t=[];wn(t,Rh,e,sn(e)),ln(Tn,t)}}function An(e,t,n){e===`focusin`?(On(),Lh=t,Rh=n,Lh.attachEvent(`onpropertychange`,kn)):e===`focusout`&&On()}function jn(e){if(e===`selectionchange`||e===`keyup`||e===`keydown`)return En(Rh)}function Mn(e,t){if(e===`click`)return En(t)}function Nn(e,t){if(e===`input`||e===`change`)return En(t)}function Pn(e,t){return e===t&&(e!==0||1/e==1/t)||e!==e&&t!==t}function Fn(e,t){if(Bh(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(!pp.call(t,i)||!Bh(e[i],t[i]))return!1}return!0}function In(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Ln(e,t){var n=In(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=In(n)}}function Rn(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Rn(e,t.parentNode):`contains`in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function zn(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=pt(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=pt(e.document)}return t}function Bn(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`)}function Vn(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;Gh||Hh==null||Hh!==pt(r)||(r=Hh,`selectionStart`in r&&Bn(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}),Wh&&Fn(Wh,r)||(Wh=r,r=cu(Uh,`onSelect`),0<r.length&&(t=new rh(`onSelect`,`select`,null,t,n),e.push({event:t,listeners:r}),t.target=Hh)))}function Hn(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n[`Webkit`+e]=`webkit`+t,n[`Moz`+e]=`moz`+t,n}function Un(e){if(qh[e])return qh[e];if(!Kh[e])return e;var t=Kh[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in Jh)return qh[e]=t[n];return e}function Wn(e,t){ng.set(e,t),tt(t,[e])}function Gn(e){for(var t=ug,n=0;n<e.length;n++){var r=e[n];if(typeof r==`object`&&r){if(Uf(r)&&r.length===2&&typeof r[0]==`string`){if(t!==ug&&t!==pg)return dg;t=pg}else return dg}else{if(typeof r==`function`||typeof r==`string`&&50<r.length||t!==ug&&t!==fg)return dg;t=fg}}return t}function Kn(e,t,n,r){for(var i in e)pp.call(e,i)&&i[0]!==`_`&&qn(i,e[i],t,n,r)}function qn(e,t,n,r,i){switch(typeof t){case`object`:if(t===null){t=`null`;break}if(t.$$typeof===Df){var a=C(t.type)||`…`,o=t.key;t=t.props;var s=Object.keys(t),c=s.length;if(o==null&&c===0){t=`<`+a+` />`;break}if(3>r||c===1&&s[0]===`children`&&o==null){t=`<`+a+` … />`;break}for(var l in n.push([i+`\xA0\xA0`.repeat(r)+e,`<`+a]),o!==null&&qn(`key`,o,n,r+1,i),e=!1,t)l===`children`?t.children!=null&&(!Uf(t.children)||0<t.children.length)&&(e=!0):pp.call(t,l)&&l[0]!==`_`&&qn(l,t[l],n,r+1,i);n.push([``,e?`>…</`+a+`>`:`/>`]);return}if(a=Object.prototype.toString.call(t),a=a.slice(8,a.length-1),a===`Array`){if(l=Gn(t),l===fg||l===ug){t=JSON.stringify(t);break}if(l===pg){for(n.push([i+`\xA0\xA0`.repeat(r)+e,``]),e=0;e<t.length;e++)a=t[e],qn(a[0],a[1],n,r+1,i);return}}if(a===`Promise`){if(t.status===`fulfilled`){if(a=n.length,qn(e,t.value,n,r,i),n.length>a){n=n[a],n[1]=`Promise<`+(n[1]||`Object`)+`>`;return}}else if(t.status===`rejected`&&(a=n.length,qn(e,t.reason,n,r,i),n.length>a)){n=n[a],n[1]=`Rejected Promise<`+n[1]+`>`;return}n.push([`\xA0\xA0`.repeat(r)+e,`Promise`]);return}a===`Object`&&(l=Object.getPrototypeOf(t))&&typeof l.constructor==`function`&&(a=l.constructor.name),n.push([i+`\xA0\xA0`.repeat(r)+e,a===`Object`?3>r?``:`…`:a]),3>r&&Kn(t,n,r+1,i);return;case`function`:t=t.name===``?`() => {}`:t.name+`() {}`;break;case`string`:t=t===lg?`…`:JSON.stringify(t);break;case`undefined`:t=`undefined`;break;case`boolean`:t=t?`true`:`false`;break;default:t=String(t)}n.push([i+`\xA0\xA0`.repeat(r)+e,t])}function Jn(e,t,n,r){var i=!0;for(o in e)o in t||(n.push([mg+`\xA0\xA0`.repeat(r)+o,`…`]),i=!1);for(var a in t)if(a in e){var o=e[a],s=t[a];if(o!==s){if(r===0&&a===`children`)i=`\xA0\xA0`.repeat(r)+a,n.push([mg+i,`…`],[hg+i,`…`]);else{if(!(3<=r)){if(typeof o==`object`&&typeof s==`object`&&o!==null&&s!==null&&o.$$typeof===s.$$typeof){if(s.$$typeof===Df){if(o.type===s.type&&o.key===s.key){o=C(s.type)||`…`,i=`\xA0\xA0`.repeat(r)+a,o=`<`+o+` … />`,n.push([mg+i,o],[hg+i,o]),i=!1;continue}}else{var c=Object.prototype.toString.call(o),l=Object.prototype.toString.call(s);if(c===l&&(l===`[object Object]`||l===`[object Array]`)){c=[gg+`\xA0\xA0`.repeat(r)+a,l===`[object Array]`?`Array`:``],n.push(c),l=n.length,Jn(o,s,n,r+1)?l===n.length&&(c[1]=`Referentially unequal but deeply equal objects. Consider memoization.`):i=!1;continue}}}else if(typeof o==`function`&&typeof s==`function`&&o.name===s.name&&o.length===s.length&&(c=Function.prototype.toString.call(o),l=Function.prototype.toString.call(s),c===l)){o=s.name===``?`() => {}`:s.name+`() {}`,n.push([gg+`\xA0\xA0`.repeat(r)+a,o+` Referentially unequal function closure. Consider memoization.`]);continue}}qn(a,o,n,r,mg),qn(a,s,n,r,hg)}i=!1}}else n.push([hg+`\xA0\xA0`.repeat(r)+a,`…`]),i=!1;return i}function M(e){bg=e&63?`Blocking`:e&64?`Gesture`:e&4194176?`Transition`:e&62914560?`Suspense`:e&2080374784?`Idle`:`Other`}function Yn(e,t,n,r){_g&&(Cg.start=t,Cg.end=n,Sg.color=`warning`,Sg.tooltipText=r,Sg.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,r,Cg)):performance.measure(r,Cg))}function Xn(e,t,n){Yn(e,t,n,`Reconnect`)}function Zn(e,t,n,r,i){var a=w(e);if(a!==null&&_g){var o=e.alternate,s=e.actualDuration;if(o===null||o.child!==e.child)for(var c=e.child;c!==null;c=c.sibling)s-=c.actualDuration;r=.5>s?r?`tertiary-light`:`primary-light`:10>s?r?`tertiary`:`primary`:100>s?r?`tertiary-dark`:`primary-dark`:`error`;var l=e.memoizedProps;s=e._debugTask,l!==null&&o!==null&&o.memoizedProps!==l?(c=[wg],l=Jn(o.memoizedProps,l,c,0),1<c.length&&(l&&!xg&&(o.lanes&i)===0&&100<e.actualDuration?(xg=!0,c[0]=Eg,Sg.color=`warning`,Sg.tooltipText=Tg):(Sg.color=r,Sg.tooltipText=a),Sg.properties=c,Cg.start=t,Cg.end=n,s==null?performance.measure(``+a,Cg):s.run(performance.measure.bind(performance,``+a,Cg)))):s==null?console.timeStamp(a,t,n,vg,void 0,r):s.run(console.timeStamp.bind(console,a,t,n,vg,void 0,r))}}function N(e,t,n,r){if(_g){var i=w(e);if(i!==null){for(var a=null,o=[],s=0;s<r.length;s++){var c=r[s];a==null&&c.source!==null&&(a=c.source._debugTask),c=c.value,o.push([`Error`,typeof c==`object`&&c&&typeof c.message==`string`?String(c.message):String(c)])}e.key!==null&&qn(`key`,e.key,o,0,``),e.memoizedProps!==null&&Kn(e.memoizedProps,o,0,``),a??=e._debugTask,e={start:t,end:n,detail:{devtools:{color:`error`,track:vg,tooltipText:e.tag===13?`Hydration failed`:`Error boundary caught an error`,properties:o}}},a?a.run(performance.measure.bind(performance,``+i,e)):performance.measure(``+i,e)}}}function Qn(e,t,n,r,i){if(i!==null){if(_g){var a=w(e);if(a!==null){r=[];for(var o=0;o<i.length;o++){var s=i[o].value;r.push([`Error`,typeof s==`object`&&s&&typeof s.message==`string`?String(s.message):String(s)])}e.key!==null&&qn(`key`,e.key,r,0,``),e.memoizedProps!==null&&Kn(e.memoizedProps,r,0,``),t={start:t,end:n,detail:{devtools:{color:`error`,track:vg,tooltipText:`A lifecycle or effect errored`,properties:r}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,``+a,t)):performance.measure(``+a,t)}}}else a=w(e),a!==null&&_g&&(i=1>r?`secondary-light`:100>r?`secondary`:500>r?`secondary-dark`:`error`,(e=e._debugTask)?e.run(console.timeStamp.bind(console,a,t,n,vg,void 0,i)):console.timeStamp(a,t,n,vg,void 0,i))}function $n(e,t,n,r){if(_g&&!(t<=e)){var i=(n&738197653)===n?`tertiary-dark`:`primary-dark`;n=(n&536870912)===n?`Prepared`:(n&201326741)===n?`Hydrated`:`Render`,r?r.run(console.timeStamp.bind(console,n,e,t,bg,yg,i)):console.timeStamp(n,e,t,bg,yg,i)}}function er(e,t,n,r){!_g||t<=e||(n=(n&738197653)===n?`tertiary-dark`:`primary-dark`,r?r.run(console.timeStamp.bind(console,`Prewarm`,e,t,bg,yg,n)):console.timeStamp(`Prewarm`,e,t,bg,yg,n))}function tr(e,t,n,r){!_g||t<=e||(n=(n&738197653)===n?`tertiary-dark`:`primary-dark`,r?r.run(console.timeStamp.bind(console,`Suspended`,e,t,bg,yg,n)):console.timeStamp(`Suspended`,e,t,bg,yg,n))}function nr(e,t,n,r,i,a){if(_g&&!(t<=e)){n=[];for(var o=0;o<r.length;o++){var s=r[o].value;n.push([`Recoverable Error`,typeof s==`object`&&s&&typeof s.message==`string`?String(s.message):String(s)])}e={start:e,end:t,detail:{devtools:{color:`primary-dark`,track:bg,trackGroup:yg,tooltipText:i?`Hydration Failed`:`Recovered after Error`,properties:n}}},a?a.run(performance.measure.bind(performance,`Recovered`,e)):performance.measure(`Recovered`,e)}}function rr(e,t,n,r){!_g||t<=e||(r?r.run(console.timeStamp.bind(console,`Errored`,e,t,bg,yg,`error`)):console.timeStamp(`Errored`,e,t,bg,yg,`error`))}function ir(e,t,n,r){!_g||t<=e||(r?r.run(console.timeStamp.bind(console,n,e,t,bg,yg,`secondary-light`)):console.timeStamp(n,e,t,bg,yg,`secondary-light`))}function ar(e,t,n,r,i){if(_g&&!(t<=e)){for(var a=[],o=0;o<n.length;o++){var s=n[o].value;a.push([`Error`,typeof s==`object`&&s&&typeof s.message==`string`?String(s.message):String(s)])}e={start:e,end:t,detail:{devtools:{color:`error`,track:bg,trackGroup:yg,tooltipText:r?`Remaining Effects Errored`:`Commit Errored`,properties:a}}},i?i.run(performance.measure.bind(performance,`Errored`,e)):performance.measure(`Errored`,e)}}function or(e,t,n){!_g||t<=e||(n?n.run(console.timeStamp.bind(console,`Animating`,e,t,bg,yg,`secondary-dark`)):console.timeStamp(`Animating`,e,t,bg,yg,`secondary-dark`))}function sr(){for(var e=Ag,t=jg=Ag=0;t<e;){var n=kg[t];kg[t++]=null;var r=kg[t];kg[t++]=null;var i=kg[t];kg[t++]=null;var a=kg[t];if(kg[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&&dr(n,i,a)}}function cr(e,t,n,r){kg[Ag++]=e,kg[Ag++]=t,kg[Ag++]=n,kg[Ag++]=r,jg|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function lr(e,t,n,r){return cr(e,t,n,r),fr(e)}function ur(e,t){return cr(e,null,null,t),fr(e)}function dr(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&Dg||(i=!0)),e=a,a=a.return;return e.tag===3?(a=e.stateNode,i&&t!==null&&(i=31-jp(n),e=a.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),a):null}function fr(e){if(Kx>Gx)throw Zx=Kx=0,Qx=qx=null,Error(`Maximum update depth exceeded. This can happen when a component repeatedly calls setState inside componentWillUpdate or componentDidUpdate. React limits the number of nested updates to prevent infinite loops.`);Zx>Xx&&(Zx=0,Qx=null,console.error(`Maximum update depth exceeded. This can happen when a component calls setState inside useEffect, but useEffect either doesn't have a dependency array, or one of the dependencies changes on every render.`)),e.alternate===null&&e.flags&4098&&Rl(e);for(var t=e,n=t.return;n!==null;)t.alternate===null&&t.flags&4098&&Rl(e),t=n,n=t.return;return t.tag===3?t.stateNode:null}function pr(e){if(Ng===null)return e;var t=Ng(e);return t===void 0?e:t.current}function mr(e){if(Ng===null)return e;var t=Ng(e);return t===void 0?e!=null&&typeof e.render==`function`&&(t=pr(e.render),e.render!==t)?(t={$$typeof:Pf,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function hr(e,t){if(Ng===null)return!1;var n=e.elementType;t=t.type;var r=!1,i=typeof t==`object`&&t?t.$$typeof:null;switch(e.tag){case 1:typeof t==`function`&&(r=!0);break;case 0:(typeof t==`function`||i===Rf)&&(r=!0);break;case 11:(i===Pf||i===Rf)&&(r=!0);break;case 14:case 15:(i===Lf||i===Rf)&&(r=!0);break;default:return!1}return!!(r&&(e=Ng(n),e!==void 0&&e===Ng(t)))}function gr(e){Ng!==null&&typeof WeakSet==`function`&&(Pg===null&&(Pg=new WeakSet),Pg.add(e))}function _r(e,t,n){do{var r=e,i=r.alternate,a=r.child,o=r.sibling,s=r.tag;r=r.type;var c=null;switch(s){case 0:case 15:case 1:c=r;break;case 11:c=r.render}if(Ng===null)throw Error(`Expected resolveFamily to be set during hot reload.`);var l=!1;if(r=!1,c!==null&&(c=Ng(c),c!==void 0&&(n.has(c)?r=!0:t.has(c)&&(s===1?r=!0:l=!0))),Pg!==null&&(Pg.has(e)||i!==null&&Pg.has(i))&&(r=!0),r&&(e._debugNeedsRemount=!0),(r||l)&&(i=ur(e,2),i!==null&&Qc(i,e,2)),a===null||r||_r(a,t,n),o===null)break;e=o}while(1)}function vr(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,this.actualDuration=-0,this.actualStartTime=-1.1,this.treeBaseDuration=this.selfBaseDuration=-0,this._debugTask=this._debugStack=this._debugOwner=this._debugInfo=null,this._debugNeedsRemount=!1,this._debugHookTypes=null,zg||typeof Object.preventExtensions!=`function`||Object.preventExtensions(this)}function yr(e){return e=e.prototype,!(!e||!e.isReactComponent)}function br(e,t){var n=e.alternate;switch(n===null?(n=g(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n._debugOwner=e._debugOwner,n._debugStack=e._debugStack,n._debugTask=e._debugTask,n._debugHookTypes=e._debugHookTypes,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null,n.actualDuration=-0,n.actualStartTime=-1.1),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n.selfBaseDuration=e.selfBaseDuration,n.treeBaseDuration=e.treeBaseDuration,n._debugInfo=e._debugInfo,n._debugNeedsRemount=e._debugNeedsRemount,n.tag){case 0:case 15:n.type=pr(e.type);break;case 1:n.type=pr(e.type);break;case 11:n.type=mr(e.type)}return n}function xr(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null,e.selfBaseDuration=0,e.treeBaseDuration=0):(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,_debugThenableState:t._debugThenableState},e.selfBaseDuration=n.selfBaseDuration,e.treeBaseDuration=n.treeBaseDuration),e}function Sr(e,t,n,r,i,a){var o=0,s=e;if(typeof e==`function`)yr(e)&&(o=1),s=pr(s);else if(typeof e==`string`)o=ue(),o=zd(e,n,o)?26:e===`html`||e===`head`||e===`body`?27:5;else a:switch(e){case zf:return t=g(31,n,t,i),t.elementType=zf,t.lanes=a,t;case kf:return wr(n.children,i,a,t);case Af:o=8,i|=Ig,i|=Lg;break;case jf:return e=n,r=i,typeof e.id!=`string`&&console.error('Profiler must specify an "id" of type `string` as a prop. Received the type `%s` instead.',typeof e.id),t=g(12,e,t,r|q),t.elementType=jf,t.lanes=a,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case Ff:return t=g(13,n,t,i),t.elementType=Ff,t.lanes=a,t;case If:return t=g(19,n,t,i),t.elementType=If,t.lanes=a,t;default:if(typeof e==`object`&&e)switch(e.$$typeof){case Nf:o=10;break a;case Mf:o=9;break a;case Pf:o=11,s=mr(s);break a;case Lf:o=14;break a;case Rf:o=16,s=null;break a}s=``,(e===void 0||typeof e==`object`&&e&&Object.keys(e).length===0)&&(s+=` You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.`),e===null?n=`null`:Uf(e)?n=`array`:e!==void 0&&e.$$typeof===Df?(n=`<`+(C(e.type)||`Unknown`)+` />`,s=` Did you accidentally export a JSX literal instead of a component?`):n=typeof e,(o=r?ae(r):null)&&(s+=`
|
|
76
|
+
|
|
77
|
+
Check the render method of \``+o+"`."),o=29,n=Error(`Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: `+(n+`.`+s)),s=null}return t=g(o,n,t,i),t.elementType=e,t.type=s,t.lanes=a,t._debugOwner=r,t}function Cr(e,t,n){return t=Sr(e.type,e.key,e.props,e._owner,t,n),t._debugOwner=e._owner,t._debugStack=e._debugStack,t._debugTask=e._debugTask,t}function wr(e,t,n,r){return e=g(7,e,r,t),e.lanes=n,e}function Tr(e,t,n){return e=g(6,e,null,t),e.lanes=n,e}function Er(e){var t=g(18,null,null,K);return t.stateNode=e,t}function Dr(e,t,n){return t=g(4,e.children===null?[]:e.children,e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Or(e,t){if(typeof e==`object`&&e){var n=Bg.get(e);return n===void 0?(t={value:e,source:t,stack:be(t)},Bg.set(e,t),t):n}return{value:e,source:t,stack:be(t)}}function kr(e,t){Fr(),Vg[Hg++]=Wg,Vg[Hg++]=Ug,Ug=e,Wg=t}function Ar(e,t,n){Fr(),Gg[Kg++]=Jg,Gg[Kg++]=Yg,Gg[Kg++]=qg,qg=e;var r=Jg;e=Yg;var i=32-jp(r)-1;r&=~(1<<i),n+=1;var a=32-jp(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Jg=1<<32-jp(t)+i|n<<i|r,Yg=a+e}else Jg=1<<a|n<<i|r,Yg=e}function jr(e){Fr(),e.return!==null&&(kr(e,1),Ar(e,1,0))}function Mr(e){for(;e===Ug;)Ug=Vg[--Hg],Vg[Hg]=null,Wg=Vg[--Hg],Vg[Hg]=null;for(;e===qg;)qg=Gg[--Kg],Gg[Kg]=null,Yg=Gg[--Kg],Gg[Kg]=null,Jg=Gg[--Kg],Gg[Kg]=null}function Nr(){return Fr(),qg===null?null:{id:Jg,overflow:Yg}}function Pr(e,t){Fr(),Gg[Kg++]=Jg,Gg[Kg++]=Yg,Gg[Kg++]=qg,Jg=t.id,Yg=t.overflow,qg=e}function Fr(){Qg||console.error(`Expected to be hydrating. This is a bug in React. Please file an issue.`)}function Ir(e,t){if(e.return===null){if(e_===null)e_={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t};else{if(e_.fiber!==e)throw Error(`Saw multiple hydration diff roots in a pass. This is a bug in React.`);e_.distanceFromLeaf>t&&(e_.distanceFromLeaf=t)}return e_}var n=Ir(e.return,t+1).children;return 0<n.length&&n[n.length-1].fiber===e?(n=n[n.length-1],n.distanceFromLeaf>t&&(n.distanceFromLeaf=t),n):(t={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t},n.push(t),t)}function Lr(){Qg&&console.error(`We should not be hydrating here. This is a bug in React. Please file a bug.`)}function Rr(e,t){$g||(e=Ir(e,0),e.serverProps=null,t!==null&&(t=pd(t),e.serverTail.push(t)))}function zr(e){var t=1<arguments.length&&arguments[1]!==void 0&&arguments[1],n=``,r=e_;throw r!==null&&(e_=null,n=Bt(r)),Gr(Or(Error(`Hydration failed because the server rendered `+(t?`text`:`HTML`)+` didn't match the client. As a result this tree will be regenerated on the client. This can happen if a SSR-ed Client Component used:
|
|
78
|
+
|
|
79
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
80
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
81
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
82
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
83
|
+
- Invalid HTML tag nesting.
|
|
84
|
+
|
|
85
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
86
|
+
|
|
87
|
+
https://react.dev/link/hydration-mismatch`+n),e)),r_}function Br(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Hp]=e,t[Up]=r,du(n,r),n){case`dialog`:nu(`cancel`,t),nu(`close`,t);break;case`iframe`:case`object`:case`embed`:nu(`load`,t);break;case`video`:case`audio`:for(n=0;n<fS.length;n++)nu(fS[n],t);break;case`source`:nu(`error`,t);break;case`img`:case`image`:case`link`:nu(`error`,t),nu(`load`,t);break;case`details`:nu(`toggle`,t);break;case`input`:nt(`input`,r),nu(`invalid`,t),ht(t,r),_t(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case`option`:yt(t,r);break;case`select`:nt(`select`,r),nu(`invalid`,t),St(t,r);break;case`textarea`:nt(`textarea`,r),nu(`invalid`,t),j(t,r),wt(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!=`string`&&typeof n!=`number`&&typeof n!=`bigint`||t.textContent===``+n||!0===r.suppressHydrationWarning||_u(t.textContent,n)?(r.popover!=null&&(nu(`beforetoggle`,t),nu(`toggle`,t)),r.onScroll!=null&&nu(`scroll`,t),r.onScrollEnd!=null&&nu(`scrollend`,t),r.onClick!=null&&(t.onclick=on),t=!0):t=!1,t||zr(e,!0)}function Vr(e){for(Xg=e.return;Xg;)switch(Xg.tag){case 5:case 31:case 13:n_=!1;return;case 27:case 3:n_=!0;return;default:Xg=Xg.return}}function Hr(e){if(e!==Xg)return!1;if(!Qg)return Vr(e),Qg=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=n===`form`||n===`button`||Lu(e.type,e.memoizedProps)),n=!n),n&&Zg){for(n=Zg;n;){var r=Ir(e,0),i=pd(n);r.serverTail.push(i),n=i.type===`Suspense`?hd(n):fd(n.nextSibling)}zr(e)}if(Vr(e),t===13){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(`Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.`);Zg=hd(e)}else if(t===31){if(e=e.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(`Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.`);Zg=hd(e)}else t===27?(t=Zg,Ju(e.type)?(e=nC,nC=null,Zg=e):Zg=t):Zg=Xg?fd(e.stateNode.nextSibling):null;return!0}function Ur(){Zg=Xg=null,$g=Qg=!1}function Wr(){var e=t_;return e!==null&&(mx===null?mx=e:mx.push.apply(mx,e),t_=null),e}function Gr(e){t_===null?t_=[e]:t_.push(e)}function Kr(){var e=e_;if(e!==null){e_=null;for(var t=Bt(e);0<e.children.length;)e=e.children[0];D(e.fiber,function(){console.error(`A tree hydrated but some attributes of the server rendered HTML didn't match the client properties. This won't be patched up. This can happen if a SSR-ed Client Component used:
|
|
88
|
+
|
|
89
|
+
- A server/client branch \`if (typeof window !== 'undefined')\`.
|
|
90
|
+
- Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
|
|
91
|
+
- Date formatting in a user's locale which doesn't match the server.
|
|
92
|
+
- External changing data without sending a snapshot of it along with the HTML.
|
|
93
|
+
- Invalid HTML tag nesting.
|
|
94
|
+
|
|
95
|
+
It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
|
|
96
|
+
|
|
97
|
+
%s%s`,`https://react.dev/link/hydration-mismatch`,t)})}}function qr(){c_=s_=null,l_=!1}function Jr(e,t,n){E(i_,t._currentValue,e),t._currentValue=n,E(a_,t._currentRenderer,e),t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==o_&&console.error(`Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.`),t._currentRenderer=o_}function Yr(e,t){e._currentValue=i_.current;var n=a_.current;oe(a_,t),e._currentRenderer=n,oe(i_,t)}function Xr(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}e!==n&&console.error(`Expected to find the propagation root when scheduling context work. This error is likely caused by a bug in React. Please file an issue.`)}function Zr(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var a=i.dependencies;if(a!==null){var o=i.child;a=a.firstContext;a:for(;a!==null;){var s=a;a=i;for(var c=0;c<t.length;c++)if(s.context===t[c]){a.lanes|=n,s=a.alternate,s!==null&&(s.lanes|=n),Xr(a.return,n,e),r||(o=null);break a}a=s.next}}else if(i.tag===18){if(o=i.return,o===null)throw Error(`We just came from a parent so we must have had a parent. This is a bug in React.`);o.lanes|=n,a=o.alternate,a!==null&&(a.lanes|=n),Xr(o,n,e),o=null}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===e){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}}function Qr(e,t,n,r){e=null;for(var i=t,a=!1;i!==null;){if(!a){if(i.flags&524288)a=!0;else if(i.flags&262144)break}if(i.tag===10){var o=i.alternate;if(o===null)throw Error(`Should have a current fiber. This is a bug in React.`);if(o=o.memoizedProps,o!==null){var s=i.type;Bh(i.pendingProps.value,o.value)||(e===null?e=[s]:e.push(s))}}else if(i===Qf.current){if(o=i.alternate,o===null)throw Error(`Should have a current fiber. This is a bug in React.`);o.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e===null?e=[bC]:e.push(bC))}i=i.return}e!==null&&Zr(t,e,n,r),t.flags|=262144}function $r(e){for(e=e.firstContext;e!==null;){if(!Bh(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ei(e){s_=e,c_=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function ti(e){return l_&&console.error(`Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().`),ri(s_,e)}function ni(e,t){return s_===null&&ei(e),ri(e,t)}function ri(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},c_===null){if(e===null)throw Error(`Context can only be read while React is rendering. In classes, you can read it in the render method or getDerivedStateFromProps. In function components, you can read it directly in the function body, but not inside Hooks like useReducer() or useMemo().`);c_=t,e.dependencies={lanes:0,firstContext:t,_debugThenableState:null},e.flags|=524288}else c_=c_.next=t;return n}function ii(){return{controller:new u_,data:new Map,refCount:0}}function ai(e){e.controller.signal.aborted&&console.warn(`A cache instance was retained after it was already freed. This likely indicates a bug in React.`),e.refCount++}function oi(e){e.refCount--,0>e.refCount&&console.warn(`A cache instance was released after it was already freed. This likely indicates a bug in React.`),e.refCount===0&&d_(f_,function(){e.controller.abort()})}function si(e,t,n){e&127?0>O_&&(O_=m_(),k_=h_(t),j_=t,n!=null&&(M_=w(n)),(Hb&(Nb|Pb))!==Mb&&(E_=!0,A_=g_),e=Bu(),t=zu(),e!==F_||t!==P_?F_=-1.1:t!==null&&(A_=g_),N_=e,P_=t):e&4194048&&0>z_&&(z_=m_(),V_=h_(t),H_=t,n!=null&&(U_=w(n)),0>R_)&&(e=Bu(),t=zu(),(e!==K_||t!==G_)&&(K_=-1.1),W_=e,G_=t)}function ci(e){if(0>O_){O_=m_(),k_=e._debugTask==null?null:e._debugTask,(Hb&(Nb|Pb))!==Mb&&(A_=g_);var t=Bu(),n=zu();t!==F_||n!==P_?F_=-1.1:n!==null&&(A_=g_),N_=t,P_=n}0>z_&&(z_=m_(),V_=e._debugTask==null?null:e._debugTask,0>R_)&&(e=Bu(),t=zu(),(e!==K_||t!==G_)&&(K_=-1.1),W_=e,G_=t)}function li(){var e=C_;return C_=0,e}function ui(e){var t=C_;return C_=e,t}function di(e){var t=C_;return C_+=e,t}function fi(){Y=J=-1.1}function pi(){var e=J;return J=-1.1,e}function mi(e){0<=e&&(J=e)}function hi(){var e=w_;return w_=-0,e}function gi(e){0<=e&&(w_=e)}function _i(){var e=T_;return T_=null,e}function vi(){var e=E_;return E_=!1,e}function yi(e){S_=m_(),0>e.actualStartTime&&(e.actualStartTime=S_)}function bi(e){if(0<=S_){var t=m_()-S_;e.actualDuration+=t,e.selfBaseDuration=t,S_=-1}}function xi(e){if(0<=S_){var t=m_()-S_;e.actualDuration+=t,S_=-1}}function Si(){if(0<=S_){var e=m_(),t=e-S_;S_=-1,C_+=t,w_+=t,Y=e}}function Ci(e){T_===null&&(T_=[]),T_.push(e),x_===null&&(x_=[]),x_.push(e)}function wi(){S_=m_(),0>J&&(J=S_)}function Ti(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function Ei(e,t){if(nv===null){var n=nv=[];rv=0,iv=W(),av={status:`pending`,value:void 0,then:function(e){n.push(e)}}}return rv++,t.then(Di,Di),t}function Di(){if(--rv===0&&(-1<z_||(R_=-1.1),nv!==null)){av!==null&&(av.status=`fulfilled`);var e=nv;nv=null,iv=0,av=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function Oi(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}function ki(){var e=sv.current;return e===null?Ub.pooledCache:e}function Ai(e,t){t===null?E(sv,sv.current,e):E(sv,t.pool,e)}function ji(){var e=ki();return e===null?null:{parent:p_._currentValue,pool:e}}function Mi(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function Ni(e){return e=e.status,e===`fulfilled`||e===`rejected`}function P(e,t,n){G.actQueue!==null&&(G.didUsePromise=!0);var r=e.thenables;if(n=r[n],n===void 0?r.push(t):n!==t&&(e.didWarnAboutUncachedPromise||(e.didWarnAboutUncachedPromise=!0,console.error(`A component was suspended by an uncached promise. Creating promises inside a Client Component or hook is not yet supported, except via a Suspense-compatible library or framework.`)),t.then(on,on),t=n),t._debugInfo===void 0){e=performance.now(),r=t.displayName;var i={name:typeof r==`string`?r:`Promise`,start:e,end:e,value:t};t._debugInfo=[{awaited:i}],t.status!==`fulfilled`&&t.status!==`rejected`&&(e=function(){i.end=performance.now()},t.then(e,e))}switch(t.status){case`fulfilled`:return t.value;case`rejected`:throw e=t.reason,Ii(e),e;default:if(typeof t.status==`string`)t.then(on,on);else{if(e=Ub,e!==null&&100<e.shellSuspendCounter)throw Error("An unknown Component is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.");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,Ii(e),e}throw Bv=t,Vv=!0,Iv}}function Pi(e){try{return Fv(e)}catch(e){throw typeof e==`object`&&e&&typeof e.then==`function`?(Bv=e,Vv=!0,Iv):e}}function Fi(){if(Bv===null)throw Error(`Expected a suspended thenable. This is a bug in React. Please file an issue.`);var e=Bv;return Bv=null,Vv=!1,e}function Ii(e){if(e===Iv||e===Rv)throw Error("Hooks are not supported inside an async component. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.")}function Li(e){var t=X;return e!=null&&(X=t===null?e:t.concat(e)),t}function Ri(){var e=X;if(e!=null){for(var t=e.length-1;0<=t;t--)if(e[t].name!=null){var n=e[t].debugTask;if(n!=null)return n}}return null}function zi(e,t,n){for(var r=Object.keys(e.props),i=0;i<r.length;i++){var a=r[i];if(a!==`children`&&a!==`key`){t===null&&(t=Cr(e,n.mode,0),t._debugInfo=X,t.return=n),D(t,function(e){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",e)},a);break}}}function Bi(e){var t=Uv;return Uv+=1,Hv===null&&(Hv=Mi()),P(Hv,e,t)}function Vi(e,t){t=t.props.ref,e.ref=t===void 0?null:t}function Hi(e,t){throw t.$$typeof===Ef?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
|
|
98
|
+
- Multiple copies of the "react" package is used.
|
|
99
|
+
- A library pre-bundled an old copy of "react" or "react/jsx-runtime".
|
|
100
|
+
- A compiler tries to "inline" JSX instead of using the runtime.`):(e=Object.prototype.toString.call(t),Error(`Objects are not valid as a React child (found: `+(e===`[object Object]`?`object with keys {`+Object.keys(t).join(`, `)+`}`:e)+`). If you meant to render a collection of children, use an array instead.`))}function Ui(e,t){var n=Ri();n===null?Hi(e,t):n.run(Hi.bind(null,e,t))}function Wi(e,t){var n=w(e)||`Component`;qv[n]||(qv[n]=!0,t=t.displayName||t.name||`Component`,e.tag===3?console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
101
|
+
root.render(%s)`,t,t,t):console.error(`Functions are not valid as a React child. This may happen if you return %s instead of <%s /> from render. Or maybe you meant to call this function rather than return it.
|
|
102
|
+
<%s>{%s}</%s>`,t,t,n,t,n))}function Gi(e,t){var n=Ri();n===null?Wi(e,t):n.run(Wi.bind(null,e,t))}function Ki(e,t){var n=w(e)||`Component`;Jv[n]||(Jv[n]=!0,t=String(t),e.tag===3?console.error(`Symbols are not valid as a React child.
|
|
103
|
+
root.render(%s)`,t):console.error(`Symbols are not valid as a React child.
|
|
104
|
+
<%s>%s</%s>`,n,t,n))}function qi(e,t){var n=Ri();n===null?Ki(e,t):n.run(Ki.bind(null,e,t))}function Ji(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 i(e,t){return e=br(e,t),e.index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?(r=t.alternate,r===null?(t.flags|=67108866,n):(r=r.index,r<n?(t.flags|=67108866,n):r)):(t.flags|=1048576,n)}function o(t){return e&&t.alternate===null&&(t.flags|=67108866),t}function s(e,t,n,r){return t===null||t.tag!==6?(t=Tr(n,e.mode,r),t.return=e,t._debugOwner=e,t._debugTask=e._debugTask,t._debugInfo=X,t):(t=i(t,n),t.return=e,t._debugInfo=X,t)}function c(e,t,n,r){var a=n.type;return a===kf?(t=u(e,t,n.props.children,r,n.key),zi(n,t,e),t):t!==null&&(t.elementType===a||hr(t,n)||typeof a==`object`&&a&&a.$$typeof===Rf&&Pi(a)===t.type)?(t=i(t,n.props),Vi(t,n),t.return=e,t._debugOwner=n._owner,t._debugInfo=X,t):(t=Cr(n,e.mode,r),Vi(t,n),t.return=e,t._debugInfo=X,t)}function l(e,t,n,r){return t===null||t.tag!==4||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?(t=Dr(n,e.mode,r),t.return=e,t._debugInfo=X,t):(t=i(t,n.children||[]),t.return=e,t._debugInfo=X,t)}function u(e,t,n,r,a){return t===null||t.tag!==7?(t=wr(n,e.mode,r,a),t.return=e,t._debugOwner=e,t._debugTask=e._debugTask,t._debugInfo=X,t):(t=i(t,n),t.return=e,t._debugInfo=X,t)}function d(e,t,n){if(typeof t==`string`&&t!==``||typeof t==`number`||typeof t==`bigint`)return t=Tr(``+t,e.mode,n),t.return=e,t._debugOwner=e,t._debugTask=e._debugTask,t._debugInfo=X,t;if(typeof t==`object`&&t){switch(t.$$typeof){case Df:return n=Cr(t,e.mode,n),Vi(n,t),n.return=e,e=Li(t._debugInfo),n._debugInfo=X,X=e,n;case Of:return t=Dr(t,e.mode,n),t.return=e,t._debugInfo=X,t;case Rf:var r=Li(t._debugInfo);return t=Pi(t),e=d(e,t,n),X=r,e}if(Uf(t)||ie(t))return n=wr(t,e.mode,n,null),n.return=e,n._debugOwner=e,n._debugTask=e._debugTask,e=Li(t._debugInfo),n._debugInfo=X,X=e,n;if(typeof t.then==`function`)return r=Li(t._debugInfo),e=d(e,Bi(t),n),X=r,e;if(t.$$typeof===Nf)return d(e,ni(e,t),n);Ui(e,t)}return typeof t==`function`&&Gi(e,t),typeof t==`symbol`&&qi(e,t),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?s(e,t,``+n,r):null;if(typeof n==`object`&&n){switch(n.$$typeof){case Df:return n.key===i?(i=Li(n._debugInfo),e=c(e,t,n,r),X=i,e):null;case Of:return n.key===i?l(e,t,n,r):null;case Rf:return i=Li(n._debugInfo),n=Pi(n),e=p(e,t,n,r),X=i,e}if(Uf(n)||ie(n))return i===null?(i=Li(n._debugInfo),e=u(e,t,n,r,null),X=i,e):null;if(typeof n.then==`function`)return i=Li(n._debugInfo),e=p(e,t,Bi(n),r),X=i,e;if(n.$$typeof===Nf)return p(e,t,ni(e,n),r);Ui(e,n)}return typeof n==`function`&&Gi(e,n),typeof n==`symbol`&&qi(e,n),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,s(t,e,``+r,i);if(typeof r==`object`&&r){switch(r.$$typeof){case Df:return n=e.get(r.key===null?n:r.key)||null,e=Li(r._debugInfo),t=c(t,n,r,i),X=e,t;case Of:return e=e.get(r.key===null?n:r.key)||null,l(t,e,r,i);case Rf:var a=Li(r._debugInfo);return r=Pi(r),t=m(e,t,n,r,i),X=a,t}if(Uf(r)||ie(r))return n=e.get(n)||null,e=Li(r._debugInfo),t=u(t,n,r,i,null),X=e,t;if(typeof r.then==`function`)return a=Li(r._debugInfo),t=m(e,t,n,Bi(r),i),X=a,t;if(r.$$typeof===Nf)return m(e,t,n,ni(t,r),i);Ui(t,r)}return typeof r==`function`&&Gi(t,r),typeof r==`symbol`&&qi(t,r),null}function h(e,t,n,r){if(typeof n!=`object`||!n)return r;switch(n.$$typeof){case Df:case Of:f(e,t,n);var i=n.key;if(typeof i!=`string`)break;if(r===null){r=new Set,r.add(i);break}if(!r.has(i)){r.add(i);break}D(t,function(){console.error("Encountered two children with the same key, `%s`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.",i)});break;case Rf:n=Pi(n),h(e,t,n,r)}return r}function _(i,o,s,c){for(var l=null,u=null,f=null,g=o,_=o=0,v=null;g!==null&&_<s.length;_++){g.index>_?(v=g,g=null):v=g.sibling;var y=p(i,g,s[_],c);if(y===null){g===null&&(g=v);break}l=h(i,y,s[_],l),e&&g&&y.alternate===null&&t(i,g),o=a(y,o,_),f===null?u=y:f.sibling=y,f=y,g=v}if(_===s.length)return n(i,g),Qg&&kr(i,_),u;if(g===null){for(;_<s.length;_++)g=d(i,s[_],c),g!==null&&(l=h(i,g,s[_],l),o=a(g,o,_),f===null?u=g:f.sibling=g,f=g);return Qg&&kr(i,_),u}for(g=r(g);_<s.length;_++)v=m(g,i,_,s[_],c),v!==null&&(l=h(i,v,s[_],l),e&&v.alternate!==null&&g.delete(v.key===null?_:v.key),o=a(v,o,_),f===null?u=v:f.sibling=v,f=v);return e&&g.forEach(function(e){return t(i,e)}),Qg&&kr(i,_),u}function v(i,o,s,c){if(s==null)throw Error(`An iterable object provided no iterator.`);for(var l=null,u=null,f=o,g=o=0,_=null,v=null,y=s.next();f!==null&&!y.done;g++,y=s.next()){f.index>g?(_=f,f=null):_=f.sibling;var b=p(i,f,y.value,c);if(b===null){f===null&&(f=_);break}v=h(i,b,y.value,v),e&&f&&b.alternate===null&&t(i,f),o=a(b,o,g),u===null?l=b:u.sibling=b,u=b,f=_}if(y.done)return n(i,f),Qg&&kr(i,g),l;if(f===null){for(;!y.done;g++,y=s.next())f=d(i,y.value,c),f!==null&&(v=h(i,f,y.value,v),o=a(f,o,g),u===null?l=f:u.sibling=f,u=f);return Qg&&kr(i,g),l}for(f=r(f);!y.done;g++,y=s.next())_=m(f,i,g,y.value,c),_!==null&&(v=h(i,_,y.value,v),e&&_.alternate!==null&&f.delete(_.key===null?g:_.key),o=a(_,o,g),u===null?l=_:u.sibling=_,u=_);return e&&f.forEach(function(e){return t(i,e)}),Qg&&kr(i,g),l}function y(e,r,a,s){if(typeof a==`object`&&a&&a.type===kf&&a.key===null&&(zi(a,null,e),a=a.props.children),typeof a==`object`&&a){switch(a.$$typeof){case Df:var c=Li(a._debugInfo);a:{for(var l=a.key;r!==null;){if(r.key===l){if(l=a.type,l===kf){if(r.tag===7){n(e,r.sibling),s=i(r,a.props.children),s.return=e,s._debugOwner=a._owner,s._debugInfo=X,zi(a,s,e),e=s;break a}}else if(r.elementType===l||hr(r,a)||typeof l==`object`&&l&&l.$$typeof===Rf&&Pi(l)===r.type){n(e,r.sibling),s=i(r,a.props),Vi(s,a),s.return=e,s._debugOwner=a._owner,s._debugInfo=X,e=s;break a}n(e,r);break}t(e,r),r=r.sibling}a.type===kf?(s=wr(a.props.children,e.mode,s,a.key),s.return=e,s._debugOwner=e,s._debugTask=e._debugTask,s._debugInfo=X,zi(a,s,e),e=s):(s=Cr(a,e.mode,s),Vi(s,a),s.return=e,s._debugInfo=X,e=s)}return e=o(e),X=c,e;case Of:a:{for(c=a,a=c.key;r!==null;){if(r.key===a){if(r.tag===4&&r.stateNode.containerInfo===c.containerInfo&&r.stateNode.implementation===c.implementation){n(e,r.sibling),s=i(r,c.children||[]),s.return=e,e=s;break a}n(e,r);break}t(e,r),r=r.sibling}s=Dr(c,e.mode,s),s.return=e,e=s}return o(e);case Rf:return c=Li(a._debugInfo),a=Pi(a),e=y(e,r,a,s),X=c,e}if(Uf(a))return c=Li(a._debugInfo),e=_(e,r,a,s),X=c,e;if(ie(a)){if(c=Li(a._debugInfo),l=ie(a),typeof l!=`function`)throw Error(`An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.`);var u=l.call(a);return u===a?(e.tag!==0||Object.prototype.toString.call(e.type)!==`[object GeneratorFunction]`||Object.prototype.toString.call(u)!==`[object Generator]`)&&(Gv||console.error("Using Iterators as children is unsupported and will likely yield unexpected results because enumerating a generator mutates it. You may convert it to an array with `Array.from()` or the `[...spread]` operator before rendering. You can also use an Iterable that can iterate multiple times over the same items."),Gv=!0):a.entries!==l||Wv||(console.error(`Using Maps as children is not supported. Use an array of keyed ReactElements instead.`),Wv=!0),e=v(e,r,u,s),X=c,e}if(typeof a.then==`function`)return c=Li(a._debugInfo),e=y(e,r,Bi(a),s),X=c,e;if(a.$$typeof===Nf)return y(e,r,ni(e,a),s);Ui(e,a)}return typeof a==`string`&&a!==``||typeof a==`number`||typeof a==`bigint`?(c=``+a,r!==null&&r.tag===6?(n(e,r.sibling),s=i(r,c),s.return=e,e=s):(n(e,r),s=Tr(c,e.mode,s),s.return=e,s._debugOwner=e,s._debugTask=e._debugTask,s._debugInfo=X,e=s),o(e)):(typeof a==`function`&&Gi(e,a),typeof a==`symbol`&&qi(e,a),n(e,r))}return function(e,t,n,r){var i=X;X=null;try{Uv=0;var a=y(e,t,n,r);return Hv=null,a}catch(t){if(t===Iv||t===Rv)throw t;var o=g(29,t,null,e.mode);o.lanes=r,o.return=e;var s=o._debugInfo=X;if(o._debugOwner=e._debugOwner,o._debugTask=e._debugTask,s!=null){for(var c=s.length-1;0<=c;c--)if(typeof s[c].stack==`string`){o._debugOwner=s[c],o._debugTask=s[c].debugTask;break}}return o}finally{X=i}}}function Yi(e,t){var n=Uf(e);return e=!n&&typeof ie(e)==`function`,n||e?(n=n?`array`:`iterable`,console.error(`A nested %s was passed to row #%s in <SuspenseList />. Wrap it in an additional SuspenseList to configure its revealOrder: <SuspenseList revealOrder=...> ... <SuspenseList revealOrder=...>{%s}</SuspenseList> ... </SuspenseList>`,n,t,n),!1):!0}function Xi(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Zi(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 Qi(e){return{lane:e,tag:Zv,payload:null,callback:null,next:null}}function $i(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,ry===r&&!ny){var i=w(e);console.error(`An update (setState, replaceState, or forceUpdate) was scheduled from inside an update function. Update functions should be pure, with zero side-effects. Consider using componentDidUpdate or a callback.
|
|
105
|
+
|
|
106
|
+
Please update the following component: %s`,i),ny=!0}return(Hb&Nb)===Mb?(cr(e,r,t,n),fr(e)):(i=r.pending,i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=fr(e),dr(e,null,n),t)}function ea(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,He(e,n)}}function ta(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,a=null;if(n=n.firstBaseUpdate,n!==null){do{var o={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};a===null?i=a=o:a=a.next=o,n=n.next}while(n!==null);a===null?i=a=t:a=a.next=t}else i=a=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function na(){if(iy){var e=av;if(e!==null)throw e}}function ra(e,t,n,r){iy=!1;var i=e.updateQueue;ty=!1,ry=i.shared;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?($&f)===f:(r&f)===f){f!==0&&f===iv&&(iy=!0),u!==null&&(u=u.next={lane:0,tag:s.tag,payload:s.payload,callback:null,next:null});a:{f=e;var m=s,h=t,g=n;switch(m.tag){case Qv:if(m=m.payload,typeof m==`function`){l_=!0;var _=m.call(g,d,h);if(f.mode&Ig){je(!0);try{m.call(g,d,h)}finally{je(!1)}}l_=!1,d=_;break a}d=m;break a;case ey:f.flags=f.flags&-65537|128;case Zv:if(_=m.payload,typeof _==`function`){if(l_=!0,m=_.call(g,d,h),f.mode&Ig){je(!0);try{_.call(g,d,h)}finally{je(!1)}}l_=!1}else m=_;if(m==null)break a;d=Tf({},d,m);break a;case $v:ty=!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),cx|=o,e.lanes=o,e.memoizedState=d}ry=null}function ia(e,t){if(typeof e!=`function`)throw Error(`Invalid argument passed as callback. Expected a function. Instead received: `+e);e.call(t)}function aa(e,t){var n=e.shared.hiddenCallbacks;if(n!==null)for(e.shared.hiddenCallbacks=null,e=0;e<n.length;e++)ia(n[e],t)}function oa(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)ia(n[e],t)}function sa(e,t){var n=ox;E(oy,n,e),E(ay,t,e),ox=n|t.baseLanes}function ca(e){E(oy,ox,e),E(ay,ay.current,e)}function la(e){ox=oy.current,oe(ay,e),oe(oy,e)}function ua(e){var t=e.alternate;E(dy,dy.current&ly,e),E(sy,e,e),cy===null&&(t===null||ay.current!==null||t.memoizedState!==null)&&(cy=e)}function F(e){E(dy,dy.current,e),E(sy,e,e),cy===null&&(cy=e)}function da(e){e.tag===22?(E(dy,dy.current,e),E(sy,e,e),cy===null&&(cy=e)):fa(e)}function fa(e){E(dy,dy.current,e),E(sy,sy.current,e)}function pa(e){oe(sy,e),cy===e&&(cy=null),oe(dy,e)}function ma(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||ld(n)||ud(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder===`forwards`||t.memoizedProps.revealOrder===`backwards`||t.memoizedProps.revealOrder===`unstable_legacy-backwards`||t.memoizedProps.revealOrder===`together`)){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}function ha(){var e=Q;Ny===null?Ny=[e]:Ny.push(e)}function I(){var e=Q;if(Ny!==null&&(Py++,Ny[Py]!==e)){var t=w(Z);if(!vy.has(t)&&(vy.add(t),Ny!==null)){for(var n=``,r=0;r<=Py;r++){var i=Ny[r],a=r===Py?e:i;for(i=r+1+`. `+i;30>i.length;)i+=` `;i+=a+`
|
|
107
|
+
`,n+=i}console.error(`React has detected a change in the order of Hooks called by %s. This will lead to bugs and errors if not fixed. For more information, read the Rules of Hooks: https://react.dev/link/rules-of-hooks
|
|
108
|
+
|
|
109
|
+
Previous render Next render
|
|
110
|
+
------------------------------------------------------
|
|
111
|
+
%s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
112
|
+
`,t,n)}}}function ga(e){e==null||Uf(e)||console.error("%s received a final argument that is not an array (instead, received `%s`). When specified, the final argument must be an array.",Q,typeof e)}function _a(){var e=w(Z);xy.has(e)||(xy.add(e),console.error(`ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.`,e))}function va(){throw Error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
113
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
114
|
+
2. You might be breaking the Rules of Hooks
|
|
115
|
+
3. You might have more than one copy of React in the same app
|
|
116
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function ya(e,t){if(Fy)return!1;if(t===null)return console.error(`%s received a final argument during this render, but not during the previous render. Even though the final argument is optional, its type cannot change between renders.`,Q),!1;e.length!==t.length&&console.error(`The final argument passed to %s changed size between renders. The order and size of this array must remain constant.
|
|
117
|
+
|
|
118
|
+
Previous: %s
|
|
119
|
+
Incoming: %s`,Q,`[`+t.join(`, `)+`]`,`[`+e.join(`, `)+`]`);for(var n=0;n<t.length&&n<e.length;n++)if(!Bh(e[n],t[n]))return!1;return!0}function ba(e,t,n,r,i,a){Sy=a,Z=t,Ny=e===null?null:e._debugHookTypes,Py=-1,Fy=e!==null&&e.type!==t.type,(Object.prototype.toString.call(n)===`[object AsyncFunction]`||Object.prototype.toString.call(n)===`[object AsyncGeneratorFunction]`)&&(a=w(Z),by.has(a)||(by.add(a),console.error("%s is an async Client Component. Only Server Components can be async at the moment. This error is often caused by accidentally adding `'use client'` to a module that was originally written for the server.",a===null?`An unknown Component`:`<`+a+`>`))),t.memoizedState=null,t.updateQueue=null,t.lanes=0,G.H=e!==null&&e.memoizedState!==null?zy:Ny===null?Ly:Ry,Dy=a=(t.mode&Ig)!==K;var o=yv(n,r,i);if(Dy=!1,Ey&&(o=Sa(t,n,r,i)),a){je(!0);try{o=Sa(t,n,r,i)}finally{je(!1)}}return xa(e,t),o}function xa(e,t){t._debugHookTypes=Ny,t.dependencies===null?Ay!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:Ay}):t.dependencies._debugThenableState=Ay,G.H=Iy;var n=Cy!==null&&Cy.next!==null;if(Sy=0,Ny=Q=wy=Cy=Z=null,Py=-1,e!==null&&(e.flags&65011712)!=(t.flags&65011712)&&console.error(`Internal React error: Expected static flag was missing. Please notify the React team.`),Ty=!1,ky=0,Ay=null,n)throw Error(`Rendered fewer hooks than expected. This may be caused by an accidental early return statement.`);e===null||ab||(e=e.dependencies,e!==null&&$r(e)&&(ab=!0)),Vv?(Vv=!1,e=!0):e=!1,e&&(t=w(t)||`Unknown`,yy.has(t)||by.has(t)||(yy.add(t),console.error("`use` was called from inside a try/catch block. This is not allowed and can lead to unexpected behavior. To handle errors triggered by `use`, wrap your component in a error boundary.")))}function Sa(e,t,n,r){Z=e;var i=0;do{if(Ey&&(Ay=null),ky=0,Ey=!1,i>=My)throw Error(`Too many re-renders. React limits the number of renders to prevent an infinite loop.`);if(i+=1,Fy=!1,wy=Cy=null,e.updateQueue!=null){var a=e.updateQueue;a.lastEffect=null,a.events=null,a.stores=null,a.memoCache!=null&&(a.memoCache.index=0)}Py=-1,G.H=By,a=yv(t,n,r)}while(Ey);return a}function Ca(){var e=G.H,t=e.useState()[0];return t=typeof t.then==`function`?Aa(t):t,e=e.useState()[0],(Cy===null?null:Cy.memoizedState)!==e&&(Z.flags|=1024),t}function wa(){var e=Oy!==0;return Oy=0,e}function Ta(e,t,n){t.updateQueue=e.updateQueue,t.flags=(t.mode&Lg)===K?t.flags&-2053:t.flags&-402655237,e.lanes&=~n}function Ea(e){if(Ty){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}Ty=!1}Sy=0,Ny=wy=Cy=Z=null,Py=-1,Q=null,Ey=!1,ky=Oy=0,Ay=null}function Da(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return wy===null?Z.memoizedState=wy=e:wy=wy.next=e,wy}function Oa(){if(Cy===null){var e=Z.alternate;e=e===null?null:e.memoizedState}else e=Cy.next;var t=wy===null?Z.memoizedState:wy.next;if(t!==null)wy=t,Cy=e;else{if(e===null)throw Z.alternate===null?Error(`Update hook called on initial render. This is likely a bug in React. Please file an issue.`):Error(`Rendered more hooks than during the previous render.`);Cy=e,e={memoizedState:Cy.memoizedState,baseState:Cy.baseState,baseQueue:Cy.baseQueue,queue:Cy.queue,next:null},wy===null?Z.memoizedState=wy=e:wy=wy.next=e}return wy}function ka(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Aa(e){var t=ky;return ky+=1,Ay===null&&(Ay=Mi()),e=P(Ay,e,t),t=Z,(wy===null?t.memoizedState:wy.next)===null&&(t=t.alternate,G.H=t!==null&&t.memoizedState!==null?zy:Ly),e}function ja(e){if(typeof e==`object`&&e){if(typeof e.then==`function`)return Aa(e);if(e.$$typeof===Nf)return ti(e)}throw Error(`An unsupported type was passed to use(): `+String(e))}function Ma(e){var t=null,n=Z.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=Z.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=ka(),Z.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0||Fy)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=Bf;else n.length!==e&&console.error(`Expected a constant size argument for each invocation of useMemoCache. The previous cache was allocated with size %s but size %s was requested.`,n.length,e);return t.index++,n}function Na(e,t){return typeof t==`function`?t(e):t}function Pa(e,t,n){var r=Da();if(n!==void 0){var i=n(t);if(Dy){je(!0);try{n(t)}finally{je(!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=R.bind(null,Z,e),[r.memoizedState,e]}function Fa(e){return Ia(Oa(),Cy,e)}function Ia(e,t,n){var r=e.queue;if(r===null)throw Error(`Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)`);r.lastRenderedReducer=n;var i=e.baseQueue,a=r.pending;if(a!==null){if(i!==null){var o=i.next;i.next=a.next,a.next=o}t.baseQueue!==i&&console.error(`Internal error: Expected work-in-progress queue to be a clone. This is a bug in React.`),t.baseQueue=i=a,r.pending=null}if(a=e.baseState,i===null)e.memoizedState=a;else{t=i.next;var s=o=null,c=null,l=t,u=!1;do{var d=l.lane&-536870913;if(d===l.lane?(Sy&d)===d:($&d)===d){var f=l.revertLane;if(f===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null}),d===iv&&(u=!0);else if((Sy&f)===f){l=l.next,f===iv&&(u=!0);continue}else d={lane:0,revertLane:l.revertLane,gesture:null,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null},c===null?(s=c=d,o=a):c=c.next=d,Z.lanes|=f,cx|=f;d=l.action,Dy&&n(a,d),a=l.hasEagerState?l.eagerState:n(a,d)}else f={lane:d,revertLane:l.revertLane,gesture:l.gesture,action:l.action,hasEagerState:l.hasEagerState,eagerState:l.eagerState,next:null},c===null?(s=c=f,o=a):c=c.next=f,Z.lanes|=d,cx|=d;l=l.next}while(l!==null&&l!==t);if(c===null?o=a:c.next=s,!Bh(a,e.memoizedState)&&(ab=!0,u&&(n=av,n!==null)))throw n;e.memoizedState=a,e.baseState=o,e.baseQueue=c,r.lastRenderedState=a}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function La(e){var t=Oa(),n=t.queue;if(n===null)throw Error(`Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)`);n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(i!==null){n.pending=null;var o=i=i.next;do a=e(a,o.action),o=o.next;while(o!==i);Bh(a,t.memoizedState)||(ab=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function Ra(e,t,n){var r=Z,i=Da();if(Qg){if(n===void 0)throw Error(`Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.`);var a=n();_y||a===n()||(console.error(`The result of getServerSnapshot should be cached to avoid an infinite loop`),_y=!0)}else{if(a=t(),_y||(n=t(),Bh(a,n)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),_y=!0)),Ub===null)throw Error(`Expected a work-in-progress root. This is a bug in React. Please file an issue.`);$&127||Ba(r,t,a)}return i.memoizedState=a,n={value:a,getSnapshot:t},i.queue=n,po(Va.bind(null,r,n,e),[e]),r.flags|=2048,co(py|gy,{destroy:void 0},L.bind(null,r,n,a,t),null),a}function za(e,t,n){var r=Z,i=Oa(),a=Qg;if(a){if(n===void 0)throw Error(`Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.`);n=n()}else if(n=t(),!_y){var o=t();Bh(n,o)||(console.error(`The result of getSnapshot should be cached to avoid an infinite loop`),_y=!0)}if((o=!Bh((Cy||i).memoizedState,n))&&(i.memoizedState=n,ab=!0),i=i.queue,fo(2048,gy,Va.bind(null,r,i,e),[e]),i.getSnapshot!==t||o||wy!==null&&wy.memoizedState.tag&py){if(r.flags|=2048,co(py|gy,{destroy:void 0},L.bind(null,r,i,n,t),null),Ub===null)throw Error(`Expected a work-in-progress root. This is a bug in React. Please file an issue.`);a||Sy&127||Ba(r,t,n)}return n}function Ba(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=Z.updateQueue,t===null?(t=ka(),Z.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function L(e,t,n,r){t.value=n,t.getSnapshot=r,Ha(t)&&Ua(e)}function Va(e,t,n){return n(function(){Ha(t)&&(si(2,`updateSyncExternalStore()`,e),Ua(e))})}function Ha(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Bh(e,n)}catch{return!0}}function Ua(e){var t=ur(e,2);t!==null&&Qc(t,e,2)}function Wa(e){var t=Da();if(typeof e==`function`){var n=e;if(e=n(),Dy){je(!0);try{n()}finally{je(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:e},t}function Ga(e){e=Wa(e);var t=e.queue,n=Ho.bind(null,Z,t);return t.dispatch=n,[e.memoizedState,n]}function Ka(e){var t=Da();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=Wo.bind(null,Z,!0,n),n.dispatch=t,[e,t]}function qa(e,t){return Ja(Oa(),Cy,e,t)}function Ja(e,t,n,r){return e.baseState=n,Ia(e,Cy,typeof r==`function`?r:Na)}function Ya(e,t){var n=Oa();return Cy===null?(n.baseState=e,[e,n.queue.dispatch]):Ja(n,Cy,e,t)}function Xa(e,t,n,r,i){if(Go(e))throw Error(`Cannot update form state while rendering.`);if(e=t.action,e!==null){var a={payload:i,action:e,next:null,isTransition:!0,status:`pending`,value:null,reason:null,listeners:[],then:function(e){a.listeners.push(e)}};G.T===null?a.isTransition=!1:n(!0),r(a),n=t.pending,n===null?(a.next=t.pending=a,Za(t,a)):(a.next=n.next,t.pending=n.next=a)}}function Za(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var a=G.T,o={};o._updatedFibers=new Set,G.T=o;try{var s=n(i,r),c=G.S;c!==null&&c(o,s),Qa(e,t,s)}catch(n){eo(e,t,n)}finally{a!==null&&o.types!==null&&(a.types!==null&&a.types!==o.types&&console.error(`We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.`),a.types=o.types),G.T=a,a===null&&o._updatedFibers&&(e=o._updatedFibers.size,o._updatedFibers.clear(),10<e&&console.warn(`Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.`))}}else try{o=n(i,r),Qa(e,t,o)}catch(n){eo(e,t,n)}}function Qa(e,t,n){typeof n==`object`&&n&&typeof n.then==`function`?(G.asyncTransitions++,n.then(Ao,Ao),n.then(function(n){$a(e,t,n)},function(n){return eo(e,t,n)}),t.isTransition||console.error("An async function with useActionState was called outside of a transition. This is likely not what you intended (for example, isPending will not update correctly). Either call the returned function inside startTransition, or pass it to an `action` or `formAction` prop.")):$a(e,t,n)}function $a(e,t,n){t.status=`fulfilled`,t.value=n,to(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,Za(e,n)))}function eo(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status=`rejected`,t.reason=n,to(t),t=t.next;while(t!==r)}e.action=null}function to(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function no(e,t){return t}function ro(e,t){if(Qg){var n=Ub.formState;if(n!==null){a:{var r=Z;if(Qg){if(Zg){b:{for(var i=Zg,a=n_;i.nodeType!==8;){if(!a){i=null;break b}if(i=fd(i.nextSibling),i===null){i=null;break b}}a=i.data,i=a===zS||a===BS?i:null}if(i){Zg=fd(i.nextSibling),r=i.data===zS;break a}}zr(r)}r=!1}r&&(t=n[0])}}return n=Da(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:no,lastRenderedState:t},n.queue=r,n=Ho.bind(null,Z,r),r.dispatch=n,r=Wa(!1),a=Wo.bind(null,Z,!1,r.queue),r=Da(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=Xa.bind(null,Z,i,a,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function io(e){return ao(Oa(),Cy,e)}function ao(e,t,n){if(t=Ia(e,t,no)[0],e=Fa(Na)[0],typeof t==`object`&&t&&typeof t.then==`function`)try{var r=Aa(t)}catch(e){throw e===Iv?Rv:e}else r=t;t=Oa();var i=t.queue,a=i.dispatch;return n!==t.memoizedState&&(Z.flags|=2048,co(py|gy,{destroy:void 0},oo.bind(null,i,n),null)),[r,a,e]}function oo(e,t){e.action=t}function so(e){var t=Oa(),n=Cy;if(n!==null)return ao(t,n,e);Oa(),t=t.memoizedState,n=Oa();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function co(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=Z.updateQueue,t===null&&(t=ka(),Z.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 lo(e){var t=Da();return e={current:e},t.memoizedState=e}function uo(e,t,n,r){var i=Da();Z.flags|=e,i.memoizedState=co(py|t,{destroy:void 0},n,r===void 0?null:r)}function fo(e,t,n,r){var i=Oa();r=r===void 0?null:r;var a=i.memoizedState.inst;Cy!==null&&r!==null&&ya(r,Cy.memoizedState.deps)?i.memoizedState=co(t,a,n,r):(Z.flags|=e,i.memoizedState=co(py|t,a,n,r))}function po(e,t){(Z.mode&Lg)===K?uo(8390656,gy,e,t):uo(276826112,gy,e,t)}function mo(e){Z.flags|=4;var t=Z.updateQueue;if(t===null)t=ka(),Z.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function ho(e){var t=Da(),n={impl:e};return t.memoizedState=n,function(){if((Hb&Nb)!==Mb)throw Error(`A function wrapped in useEffectEvent can't be called during rendering.`);return n.impl.apply(void 0,arguments)}}function go(e){var t=Oa().memoizedState;return mo({ref:t,nextImpl:e}),function(){if((Hb&Nb)!==Mb)throw Error(`A function wrapped in useEffectEvent can't be called during rendering.`);return t.impl.apply(void 0,arguments)}}function _o(e,t){var n=4194308;return(Z.mode&Lg)!==K&&(n|=134217728),uo(n,hy,e,t)}function vo(e,t){if(typeof t==`function`){e=e();var n=t(e);return function(){typeof n==`function`?n():t(null)}}if(t!=null)return t.hasOwnProperty(`current`)||console.error(`Expected useImperativeHandle() first argument to either be a ref callback or React.createRef() object. Instead received: %s.`,`an object with keys {`+Object.keys(t).join(`, `)+`}`),e=e(),t.current=e,function(){t.current=null}}function yo(e,t,n){typeof t!=`function`&&console.error(`Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.`,t===null?`null`:typeof t),n=n==null?null:n.concat([e]);var r=4194308;(Z.mode&Lg)!==K&&(r|=134217728),uo(r,hy,vo.bind(null,t,e),n)}function bo(e,t,n){typeof t!=`function`&&console.error(`Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.`,t===null?`null`:typeof t),n=n==null?null:n.concat([e]),fo(4,hy,vo.bind(null,t,e),n)}function xo(e,t){return Da().memoizedState=[e,t===void 0?null:t],e}function So(e,t){var n=Oa();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&ya(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Co(e,t){var n=Da();t=t===void 0?null:t;var r=e();if(Dy){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r}function wo(e,t){var n=Oa();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&ya(t,r[1]))return r[0];if(r=e(),Dy){je(!0);try{e()}finally{je(!1)}}return n.memoizedState=[r,t],r}function To(e,t){return Oo(Da(),e,t)}function Eo(e,t){return ko(Oa(),Cy.memoizedState,e,t)}function Do(e,t){var n=Oa();return Cy===null?Oo(n,e,t):ko(n,Cy.memoizedState,e,t)}function Oo(e,t,n){return n===void 0||Sy&1073741824&&!($&261930)?e.memoizedState=t:(e.memoizedState=n,e=Zc(),Z.lanes|=e,cx|=e,n)}function ko(e,t,n,r){return Bh(n,t)?n:ay.current===null?!(Sy&42)||Sy&1073741824&&!($&261930)?(ab=!0,e.memoizedState=n):(e=Zc(),Z.lanes|=e,cx|=e,t):(e=Oo(e,n,r),Bh(e,t)||(ab=!0),e)}function Ao(){G.asyncTransitions--}function jo(e,t,n,r,i){var a=Wf.p;Wf.p=a!==0&&a<Rp?a:Rp;var o=G.T,s={};s._updatedFibers=new Set,G.T=s,Wo(e,!1,t,n);try{var c=i(),l=G.S;if(l!==null&&l(s,c),typeof c==`object`&&c&&typeof c.then==`function`){G.asyncTransitions++,c.then(Ao,Ao);var u=Oi(c,r);Uo(e,t,u,Xc(e))}else Uo(e,t,r,Xc(e))}catch(n){Uo(e,t,{then:function(){},status:`rejected`,reason:n},Xc(e))}finally{Wf.p=a,o!==null&&s.types!==null&&(o.types!==null&&o.types!==s.types&&console.error(`We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React.`),o.types=s.types),G.T=o,o===null&&s._updatedFibers&&(e=s._updatedFibers.size,s._updatedFibers.clear(),10<e&&console.warn(`Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.`))}}function Mo(e,t,n,r){if(e.tag!==5)throw Error(`Expected the form instance to be a HostComponent. This is a bug in React.`);var i=No(e).queue;ci(e),jo(e,i,t,yC,n===null?u:function(){return Po(e),n(r)})}function No(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:yC,baseState:yC,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:yC},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Na,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Po(e){G.T===null&&console.error(`requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.`);var t=No(e);t.next===null&&(t=e.alternate.memoizedState),Uo(e,t.next.queue,{},Xc(e))}function Fo(){var e=Wa(!1);return e=jo.bind(null,Z,e.queue,!0,!1),Da().memoizedState=e,[!1,e]}function Io(){var e=Fa(Na)[0],t=Oa().memoizedState;return[typeof e==`boolean`?e:Aa(e),t]}function Lo(){var e=La(Na)[0],t=Oa().memoizedState;return[typeof e==`boolean`?e:Aa(e),t]}function Ro(){return ti(bC)}function zo(){var e=Da(),t=Ub.identifierPrefix;if(Qg){var n=Yg,r=Jg;n=(r&~(1<<32-jp(r)-1)).toString(32)+n,t=`_`+t+`R_`+n,n=Oy++,0<n&&(t+=`H`+n.toString(32)),t+=`_`}else n=jy++,t=`_`+t+`r_`+n.toString(32)+`_`;return e.memoizedState=t}function Bo(){return Da().memoizedState=Vo.bind(null,Z)}function Vo(e,t){for(var n=e.return;n!==null;){switch(n.tag){case 24:case 3:var r=Xc(n),i=Qi(r),a=$i(n,i,r);a!==null&&(si(r,`refresh()`,e),Qc(a,n,r),ea(a,n,r)),e=ii(),t!=null&&a!==null&&console.error(`The seed argument is not enabled outside experimental channels.`),i.payload={cache:e};return}n=n.return}}function R(e,t,n){var r=arguments;typeof r[3]==`function`&&console.error(`State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().`),r=Xc(e);var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};Go(e)?Ko(t,i):(i=lr(e,t,i,r),i!==null&&(si(r,`dispatch()`,e),Qc(i,e,r),qo(i,t,r)))}function Ho(e,t,n){var r=arguments;typeof r[3]==`function`&&console.error(`State updates from the useState() and useReducer() Hooks don't support the second callback argument. To execute a side effect after rendering, declare it in the component body with useEffect().`),r=Xc(e),Uo(e,t,n,r)&&si(r,`setState()`,e)}function Uo(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Go(e))Ko(t,i);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null)){var o=G.H;G.H=Hy;try{var s=t.lastRenderedState,c=a(s,n);if(i.hasEagerState=!0,i.eagerState=c,Bh(c,s))return cr(e,t,i,0),Ub===null&&sr(),!1}catch{}finally{G.H=o}}if(n=lr(e,t,i,r),n!==null)return Qc(n,e,r),qo(n,t,r),!0}return!1}function Wo(e,t,n,r){if(G.T===null&&iv===0&&console.error(`An optimistic state update occurred outside a transition or action. To fix, move the update to an action, or wrap with startTransition.`),r={lane:2,revertLane:W(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Go(e)){if(t)throw Error(`Cannot update optimistic state while rendering.`);console.error(`Cannot call startTransition while rendering.`)}else t=lr(e,n,r,2),t!==null&&(si(2,`setOptimistic()`,e),Qc(t,e,2))}function Go(e){var t=e.alternate;return e===Z||t!==null&&t===Z}function Ko(e,t){Ey=Ty=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function qo(e,t,n){if(n&4194048){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,He(e,n)}}function Jo(e){if(e!==null&&typeof e!=`function`){var t=String(e);eb.has(t)||(eb.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function Yo(e,t,n,r){var i=e.memoizedState,a=n(r,i);if(e.mode&Ig){je(!0);try{a=n(r,i)}finally{je(!1)}}a===void 0&&(t=C(t)||`Component`,Xy.has(t)||(Xy.add(t),console.error(`%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.`,t))),i=a==null?i:Tf({},i,a),e.memoizedState=i,e.lanes===0&&(e.updateQueue.baseState=i)}function Xo(e,t,n,r,i,a,o){var s=e.stateNode;if(typeof s.shouldComponentUpdate==`function`){if(n=s.shouldComponentUpdate(r,a,o),e.mode&Ig){je(!0);try{n=s.shouldComponentUpdate(r,a,o)}finally{je(!1)}}return n===void 0&&console.error(`%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.`,C(t)||`Component`),n}return t.prototype&&t.prototype.isPureReactComponent?!Fn(n,r)||!Fn(i,a):!0}function Zo(e,t,n,r){var i=t.state;typeof t.componentWillReceiveProps==`function`&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps==`function`&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==i&&(e=w(e)||`Component`,Gy.has(e)||(Gy.add(e),console.error(`%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.`,e)),tb.enqueueReplaceState(t,t.state,null))}function Qo(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=Tf({},n)),e)n[i]===void 0&&(n[i]=e[i]);return n}function $o(e){cg(e),console.warn(`%s
|
|
120
|
+
|
|
121
|
+
%s
|
|
122
|
+
`,nb?`An error occurred in the <`+nb+`> component.`:`An error occurred in one of your React components.`,`Consider adding an error boundary to your tree to customize error handling behavior.
|
|
123
|
+
Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function es(e){var t=nb?`The above error occurred in the <`+nb+`> component.`:`The above error occurred in one of your React components.`,n=`React will try to recreate this component tree from scratch using the error boundary you provided, `+((rb||`Anonymous`)+`.`);if(typeof e==`object`&&e&&typeof e.environmentName==`string`){var r=e.environmentName;e=[`%o
|
|
124
|
+
|
|
125
|
+
%s
|
|
126
|
+
|
|
127
|
+
%s
|
|
128
|
+
`,e,t,n].slice(0),typeof e[0]==`string`?e.splice(0,1,xC+` `+e[0],SC,wC+r+wC,CC):e.splice(0,0,xC,SC,wC+r+wC,CC),e.unshift(console),r=TC.apply(console.error,e),r()}else console.error(`%o
|
|
129
|
+
|
|
130
|
+
%s
|
|
131
|
+
|
|
132
|
+
%s
|
|
133
|
+
`,e,t,n)}function ts(e){cg(e)}function ns(e,t){try{nb=t.source?w(t.source):null,rb=null;var n=t.value;if(G.actQueue!==null)G.thrownErrors.push(n);else{var r=e.onUncaughtError;r(n,{componentStack:t.stack})}}catch(e){setTimeout(function(){throw e})}}function rs(e,t,n){try{nb=n.source?w(n.source):null,rb=w(t);var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(e){setTimeout(function(){throw e})}}function is(e,t,n){return n=Qi(n),n.tag=ey,n.payload={element:null},n.callback=function(){D(t.source,ns,e,t)},n}function as(e){return e=Qi(e),e.tag=ey,e}function os(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(){gr(n),D(r.source,rs,t,n,r)}}var o=n.stateNode;o!==null&&typeof o.componentDidCatch==`function`&&(e.callback=function(){gr(n),D(r.source,rs,t,n,r),typeof i!=`function`&&(Cx===null?Cx=new Set([this]):Cx.add(this)),Dv(this,r),typeof i==`function`||!(n.lanes&2)&&console.error(`%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.`,w(n)||`Unknown`)})}function ss(e,t,n,r,i){if(n.flags|=32768,Ap&&zl(e,i),typeof r==`object`&&r&&typeof r.then==`function`){if(t=n.alternate,t!==null&&Qr(t,n,i,!0),Qg&&($g=!0),n=sy.current,n!==null){switch(n.tag){case 31:case 13:return cy===null?ul():n.alternate===null&&sx===Fb&&(sx=Rb),n.flags&=-257,n.flags|=65536,n.lanes=i,r===zv?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),Al(e,r,i)),!1;case 22:return n.flags|=65536,r===zv?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)),Al(e,r,i)),!1}throw Error(`Unexpected Suspense handler tag (`+n.tag+`). This is a bug in React.`)}return Al(e,r,i),ul(),!1}if(Qg)return $g=!0,t=sy.current,t===null?(r!==r_&&Gr(Or(Error(`There was an error while hydrating but React was able to recover by instead client rendering the entire root.`,{cause:r}),n)),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=Or(r,n),i=is(e.stateNode,r,i),ta(e,i),sx!==zb&&(sx=Lb)):(!(t.flags&65536)&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==r_&&Gr(Or(Error(`There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.`,{cause:r}),n))),!1;var a=Or(Error(`There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.`,{cause:r}),n);if(px===null?px=[a]:px.push(a),sx!==zb&&(sx=Lb),t===null)return!0;r=Or(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=is(n.stateNode,r,e),ta(n,e),!1;case 1:if(t=n.type,a=n.stateNode,!(n.flags&128)&&(typeof t.getDerivedStateFromError==`function`||a!==null&&typeof a.componentDidCatch==`function`&&(Cx===null||!Cx.has(a))))return n.flags|=65536,i&=-i,n.lanes|=i,i=as(i),os(i,e,n,r),ta(n,i),!1}n=n.return}while(n!==null);return!1}function cs(e,t,n,r){t.child=e===null?Xv(t,null,n,r):Yv(t,e.child,n,r)}function ls(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 ei(t),r=ba(e,t,n,o,a,i),s=wa(),e!==null&&!ab?(Ta(e,t,i),Ns(e,t,i)):(Qg&&s&&jr(t),t.flags|=1,cs(e,t,r,i),t.child)}function us(e,t,n,r,i){if(e===null){var a=n.type;return typeof a==`function`&&!yr(a)&&a.defaultProps===void 0&&n.compare===null?(n=pr(a),t.tag=15,t.type=n,Cs(t,a),ds(e,t,n,r,i)):(e=Sr(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,!Ps(e,i)){var o=a.memoizedProps;if(n=n.compare,n=n===null?Fn:n,n(o,r)&&e.ref===t.ref)return Ns(e,t,i)}return t.flags|=1,e=br(a,r),e.ref=t.ref,e.return=t,t.child=e}function ds(e,t,n,r,i){if(e!==null){var a=e.memoizedProps;if(Fn(a,r)&&e.ref===t.ref&&t.type===e.type){if(ab=!1,t.pendingProps=r=a,Ps(e,i))e.flags&131072&&(ab=!0);else return t.lanes=e.lanes,Ns(e,t,i)}}return ys(e,t,n,r,i)}function fs(e,t,n,r){var i=r.children,a=e===null?null:e.memoizedState;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:Dg,_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 ms(e,t,a,n,r)}if(n&536870912)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Ai(t,a===null?null:a.cachePool),a===null?ca(t):sa(t,a),da(t);else return r=t.lanes=536870912,ms(e,t,a===null?n:a.baseLanes|n,n,r)}else a===null?(e!==null&&Ai(t,null),ca(t),fa(t)):(Ai(t,a.cachePool),sa(t,a),fa(t),t.memoizedState=null);return cs(e,t,i,n),t.child}function ps(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:Dg,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function ms(e,t,n,r,i){var a=ki();return a=a===null?null:{parent:p_._currentValue,pool:a},t.memoizedState={baseLanes:n,cachePool:a},e!==null&&Ai(t,null),ca(t),da(t),e!==null&&Qr(e,t,r,!0),t.childLanes=i,null}function hs(e,t){var n=t.hidden;return n!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
|
|
134
|
+
- <Activity %s>
|
|
135
|
+
+ <Activity %s>`,!0===n?`hidden`:!1===n?`hidden={false}`:`hidden={...}`,n?`mode="hidden"`:`mode="visible"`),t=Os({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function gs(e,t,n){return Yv(t,e.child,null,n),e=hs(t,t.pendingProps),e.flags|=2,pa(t),t.memoizedState=null,e}function _s(e,t,n){var r=t.pendingProps,i=!!(t.flags&128);if(t.flags&=-129,e===null){if(Qg){if(r.mode===`hidden`)return e=hs(t,r),t.lanes=536870912,ps(null,e);if(F(t),(e=Zg)?(n=cd(e,n_),n=n!==null&&n.data===kS?n:null,n!==null&&(r={dehydrated:n,treeContext:Nr(),retryLane:536870912,hydrationErrors:null},t.memoizedState=r,r=Er(n),r.return=t,t.child=r,Xg=t,Zg=null)):n=null,n===null)throw Rr(t,e),zr(t);return t.lanes=536870912,null}return hs(t,r)}var a=e.memoizedState;if(a!==null){var o=a.dehydrated;if(F(t),i){if(t.flags&256)t.flags&=-257,t=gs(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(`Client rendering an Activity suspended it again. This is a bug in React.`)}else if(Lr(),n&536870912&&H(t),ab||Qr(e,t,n,!1),i=(n&e.childLanes)!==0,ab||i){if(r=Ub,r!==null&&(o=Ue(r,n),o!==0&&o!==a.retryLane))throw a.retryLane=o,ur(e,o),Qc(r,e,o),ib;ul(),t=gs(e,t,n)}else e=a.treeContext,Zg=fd(o.nextSibling),Xg=t,Qg=!0,t_=null,$g=!1,e_=null,n_=!1,e!==null&&Pr(t,e),t=hs(t,r),t.flags|=4096;return t}return a=e.child,r={mode:r.mode,children:r.children},n&536870912&&(n&e.lanes)!==0&&H(t),e=br(a,r),e.ref=t.ref,t.child=e,e.return=t,e}function vs(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(`Expected ref to be a function, an object returned by React.createRef(), or undefined/null.`);(e===null||e.ref!==n)&&(t.flags|=4194816)}}function ys(e,t,n,r,i){if(n.prototype&&typeof n.prototype.render==`function`){var a=C(n)||`Unknown`;ob[a]||(console.error(`The <%s /> component appears to have a render method, but doesn't extend React.Component. This is likely to cause errors. Change %s to extend React.Component instead.`,a,a),ob[a]=!0)}return t.mode&Ig&&cv.recordLegacyContextWarning(t,null),e===null&&(Cs(t,t.type),n.contextTypes&&(a=C(n)||`Unknown`,cb[a]||(cb[a]=!0,console.error(`%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with React.useContext() instead. (https://react.dev/link/legacy-context)`,a)))),ei(t),n=ba(e,t,n,r,void 0,i),r=wa(),e!==null&&!ab?(Ta(e,t,i),Ns(e,t,i)):(Qg&&r&&jr(t),t.flags|=1,cs(e,t,n,i),t.child)}function bs(e,t,n,r,i,a){return ei(t),Py=-1,Fy=e!==null&&e.type!==t.type,t.updateQueue=null,n=Sa(t,r,n,i),xa(e,t),r=wa(),e!==null&&!ab?(Ta(e,t,a),Ns(e,t,a)):(Qg&&r&&jr(t),t.flags|=1,cs(e,t,n,a),t.child)}function xs(e,t,n,r,i){switch(s(t)){case!1:var a=t.stateNode,o=new t.type(t.memoizedProps,a.context).state;a.updater.enqueueSetState(a,o,null);break;case!0:t.flags|=128,t.flags|=65536,a=Error(`Simulated error coming from DevTools`);var c=i&-i;if(t.lanes|=c,o=Ub,o===null)throw Error(`Expected a work-in-progress root. This is a bug in React. Please file an issue.`);c=as(c),os(c,o,t,Or(a,t)),ta(t,c)}if(ei(t),t.stateNode===null){if(o=Mg,a=n.contextType,`contextType`in n&&a!==null&&(a===void 0||a.$$typeof!==Nf)&&!$y.has(n)&&($y.add(n),c=a===void 0?` However, it is set to undefined. This can be caused by a typo or by mixing up named and default imports. This can also happen due to a circular dependency, so try moving the createContext() call to a separate file.`:typeof a==`object`?a.$$typeof===Mf?` Did you accidentally pass the Context.Consumer instead?`:` However, it is set to an object with keys {`+Object.keys(a).join(`, `)+`}.`:` However, it is set to a `+typeof a+`.`,console.error(`%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s`,C(n)||`Component`,c)),typeof a==`object`&&a&&(o=ti(a)),a=new n(r,o),t.mode&Ig){je(!0);try{a=new n(r,o)}finally{je(!1)}}if(o=t.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=tb,t.stateNode=a,a._reactInternals=t,a._reactInternalInstance=Wy,typeof n.getDerivedStateFromProps==`function`&&o===null&&(o=C(n)||`Component`,Ky.has(o)||(Ky.add(o),console.error("`%s` uses `getDerivedStateFromProps` but its initial state is %s. This is not recommended. Instead, define the initial state by assigning an object to `this.state` in the constructor of `%s`. This ensures that `getDerivedStateFromProps` arguments have a consistent shape.",o,a.state===null?`null`:`undefined`,o))),typeof n.getDerivedStateFromProps==`function`||typeof a.getSnapshotBeforeUpdate==`function`){var l=c=o=null;if(typeof a.componentWillMount==`function`&&!0!==a.componentWillMount.__suppressDeprecationWarning?o=`componentWillMount`:typeof a.UNSAFE_componentWillMount==`function`&&(o=`UNSAFE_componentWillMount`),typeof a.componentWillReceiveProps==`function`&&!0!==a.componentWillReceiveProps.__suppressDeprecationWarning?c=`componentWillReceiveProps`:typeof a.UNSAFE_componentWillReceiveProps==`function`&&(c=`UNSAFE_componentWillReceiveProps`),typeof a.componentWillUpdate==`function`&&!0!==a.componentWillUpdate.__suppressDeprecationWarning?l=`componentWillUpdate`:typeof a.UNSAFE_componentWillUpdate==`function`&&(l=`UNSAFE_componentWillUpdate`),o!==null||c!==null||l!==null){a=C(n)||`Component`;var u=typeof n.getDerivedStateFromProps==`function`?`getDerivedStateFromProps()`:`getSnapshotBeforeUpdate()`;Jy.has(a)||(Jy.add(a),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
|
|
136
|
+
|
|
137
|
+
%s uses %s but also contains the following legacy lifecycles:%s%s%s
|
|
138
|
+
|
|
139
|
+
The above lifecycles should be removed. Learn more about this warning here:
|
|
140
|
+
https://react.dev/link/unsafe-component-lifecycles`,a,u,o===null?``:`
|
|
141
|
+
`+o,c===null?``:`
|
|
142
|
+
`+c,l===null?``:`
|
|
143
|
+
`+l))}}a=t.stateNode,o=C(n)||`Component`,a.render||(n.prototype&&typeof n.prototype.render==`function`?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",o):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",o)),!a.getInitialState||a.getInitialState.isReactClassApproved||a.state||console.error(`getInitialState was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Did you mean to define a state property instead?`,o),a.getDefaultProps&&!a.getDefaultProps.isReactClassApproved&&console.error(`getDefaultProps was defined on %s, a plain JavaScript class. This is only supported for classes created using React.createClass. Use a static property to define defaultProps instead.`,o),a.contextType&&console.error(`contextType was defined as an instance property on %s. Use a static property to define contextType instead.`,o),n.childContextTypes&&!Qy.has(n)&&(Qy.add(n),console.error(`%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)`,o)),n.contextTypes&&!Zy.has(n)&&(Zy.add(n),console.error(`%s uses the legacy contextTypes API which was removed in React 19. Use React.createContext() with static contextType instead. (https://react.dev/link/legacy-context)`,o)),typeof a.componentShouldUpdate==`function`&&console.error(`%s has a method called componentShouldUpdate(). Did you mean shouldComponentUpdate()? The name is phrased as a question because the function is expected to return a value.`,o),n.prototype&&n.prototype.isPureReactComponent&&a.shouldComponentUpdate!==void 0&&console.error(`%s has a method called shouldComponentUpdate(). shouldComponentUpdate should not be used when extending React.PureComponent. Please extend React.Component if shouldComponentUpdate is used.`,C(n)||`A pure component`),typeof a.componentDidUnmount==`function`&&console.error(`%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?`,o),typeof a.componentDidReceiveProps==`function`&&console.error(`%s has a method called componentDidReceiveProps(). But there is no such lifecycle method. If you meant to update the state in response to changing props, use componentWillReceiveProps(). If you meant to fetch data or run side-effects or mutations after React has updated the UI, use componentDidUpdate().`,o),typeof a.componentWillRecieveProps==`function`&&console.error(`%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?`,o),typeof a.UNSAFE_componentWillRecieveProps==`function`&&console.error(`%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?`,o),c=a.props!==r,a.props!==void 0&&c&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",o),a.defaultProps&&console.error(`Setting defaultProps as an instance property on %s is not supported and will be ignored. Instead, define defaultProps as a static property on %s.`,o,o),typeof a.getSnapshotBeforeUpdate!=`function`||typeof a.componentDidUpdate==`function`||qy.has(n)||(qy.add(n),console.error(`%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.`,C(n))),typeof a.getDerivedStateFromProps==`function`&&console.error(`%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.`,o),typeof a.getDerivedStateFromError==`function`&&console.error(`%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.`,o),typeof n.getSnapshotBeforeUpdate==`function`&&console.error(`%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.`,o),(c=a.state)&&(typeof c!=`object`||Uf(c))&&console.error(`%s.state: must be set to an object or null`,o),typeof a.getChildContext==`function`&&typeof n.childContextTypes!=`object`&&console.error(`%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().`,o),a=t.stateNode,a.props=r,a.state=t.memoizedState,a.refs={},Xi(t),o=n.contextType,a.context=typeof o==`object`&&o?ti(o):Mg,a.state===r&&(o=C(n)||`Component`,Yy.has(o)||(Yy.add(o),console.error(`%s: It is not recommended to assign props directly to state because updates to props won't be reflected in state. In most cases, it is better to use props directly.`,o))),t.mode&Ig&&cv.recordLegacyContextWarning(t,a),cv.recordUnsafeLifecycleWarnings(t,a),a.state=t.memoizedState,o=n.getDerivedStateFromProps,typeof o==`function`&&(Yo(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&&(console.error(`%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.`,w(t)||`Component`),tb.enqueueReplaceState(a,a.state,null)),ra(t,r,a,i),na(),a.state=t.memoizedState),typeof a.componentDidMount==`function`&&(t.flags|=4194308),(t.mode&Lg)!==K&&(t.flags|=134217728),a=!0}else if(e===null){a=t.stateNode;var d=t.memoizedProps;c=Qo(n,d),a.props=c;var f=a.context;l=n.contextType,o=Mg,typeof l==`object`&&l&&(o=ti(l)),u=n.getDerivedStateFromProps,l=typeof u==`function`||typeof a.getSnapshotBeforeUpdate==`function`,d=t.pendingProps!==d,l||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(d||f!==o)&&Zo(t,a,r,o),ty=!1;var p=t.memoizedState;a.state=p,ra(t,r,a,i),na(),f=t.memoizedState,d||p!==f||ty?(typeof u==`function`&&(Yo(t,n,u,r),f=t.memoizedState),(c=ty||Xo(t,n,c,r,p,f,o))?(l||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),(t.mode&Lg)!==K&&(t.flags|=134217728)):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),(t.mode&Lg)!==K&&(t.flags|=134217728),t.memoizedProps=r,t.memoizedState=f),a.props=r,a.state=f,a.context=o,a=c):(typeof a.componentDidMount==`function`&&(t.flags|=4194308),(t.mode&Lg)!==K&&(t.flags|=134217728),a=!1)}else{a=t.stateNode,Zi(e,t),o=t.memoizedProps,l=Qo(n,o),a.props=l,u=t.pendingProps,p=a.context,f=n.contextType,c=Mg,typeof f==`object`&&f&&(c=ti(f)),d=n.getDerivedStateFromProps,(f=typeof d==`function`||typeof a.getSnapshotBeforeUpdate==`function`)||typeof a.UNSAFE_componentWillReceiveProps!=`function`&&typeof a.componentWillReceiveProps!=`function`||(o!==u||p!==c)&&Zo(t,a,r,c),ty=!1,p=t.memoizedState,a.state=p,ra(t,r,a,i),na();var m=t.memoizedState;o!==u||p!==m||ty||e!==null&&e.dependencies!==null&&$r(e.dependencies)?(typeof d==`function`&&(Yo(t,n,d,r),m=t.memoizedState),(l=ty||Xo(t,n,l,r,p,m,c)||e!==null&&e.dependencies!==null&&$r(e.dependencies))?(f||typeof a.UNSAFE_componentWillUpdate!=`function`&&typeof a.componentWillUpdate!=`function`||(typeof a.componentWillUpdate==`function`&&a.componentWillUpdate(r,m,c),typeof a.UNSAFE_componentWillUpdate==`function`&&a.UNSAFE_componentWillUpdate(r,m,c)),typeof a.componentDidUpdate==`function`&&(t.flags|=4),typeof a.getSnapshotBeforeUpdate==`function`&&(t.flags|=1024)):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=m),a.props=r,a.state=m,a.context=c,a=l):(typeof a.componentDidUpdate!=`function`||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=4),typeof a.getSnapshotBeforeUpdate!=`function`||o===e.memoizedProps&&p===e.memoizedState||(t.flags|=1024),a=!1)}if(c=a,vs(e,t),o=!!(t.flags&128),c||o){if(c=t.stateNode,we(t),o&&typeof n.getDerivedStateFromError!=`function`)n=null,S_=-1;else if(n=xv(c),t.mode&Ig){je(!0);try{xv(c)}finally{je(!1)}}t.flags|=1,e!==null&&o?(t.child=Yv(t,e.child,null,i),t.child=Yv(t,null,n,i)):cs(e,t,n,i),t.memoizedState=c.state,e=t.child}else e=Ns(e,t,i);return i=t.stateNode,a&&i.props!==r&&(ub||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",w(t)||`a component`),ub=!0),e}function Ss(e,t,n,r){return Ur(),t.flags|=256,cs(e,t,n,r),t.child}function Cs(e,t){t&&t.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
|
|
144
|
+
%s.childContextTypes = ...`,t.displayName||t.name||`Component`),typeof t.getDerivedStateFromProps==`function`&&(e=C(t)||`Unknown`,lb[e]||(console.error(`%s: Function components do not support getDerivedStateFromProps.`,e),lb[e]=!0)),typeof t.contextType==`object`&&t.contextType!==null&&(t=C(t)||`Unknown`,sb[t]||(console.error(`%s: Function components do not support contextType.`,t),sb[t]=!0))}function ws(e){return{baseLanes:e,cachePool:ji()}}function Ts(e,t,n){return e=e===null?0:e.childLanes&~n,t&&(e|=dx),e}function Es(e,t,n){var r,i=t.pendingProps;o(t)&&(t.flags|=128);var a=!1,s=!!(t.flags&128);if((r=s)||(r=e!==null&&e.memoizedState===null?!1:(dy.current&uy)!==0),r&&(a=!0,t.flags&=-129),r=!!(t.flags&32),t.flags&=-33,e===null){if(Qg){if(a?ua(t):fa(t),(e=Zg)?(n=cd(e,n_),n=n!==null&&n.data!==kS?n:null,n!==null&&(r={dehydrated:n,treeContext:Nr(),retryLane:536870912,hydrationErrors:null},t.memoizedState=r,r=Er(n),r.return=t,t.child=r,Xg=t,Zg=null)):n=null,n===null)throw Rr(t,e),zr(t);return ud(n)?t.lanes=32:t.lanes=536870912,null}var c=i.children;if(i=i.fallback,a){fa(t);var l=t.mode;return c=Os({mode:`hidden`,children:c},l),i=wr(i,l,n,null),c.return=t,i.return=t,c.sibling=i,t.child=c,i=t.child,i.memoizedState=ws(n),i.childLanes=Ts(e,r,n),t.memoizedState=pb,ps(null,i)}return ua(t),Ds(t,c)}var u=e.memoizedState;if(u!==null){var d=u.dehydrated;if(d!==null){if(s)t.flags&256?(ua(t),t.flags&=-257,t=ks(e,t,n)):t.memoizedState===null?(fa(t),c=i.fallback,l=t.mode,i=Os({mode:`visible`,children:i.children},l),c=wr(c,l,n,null),c.flags|=2,i.return=t,c.return=t,i.sibling=c,t.child=i,Yv(t,e.child,null,n),i=t.child,i.memoizedState=ws(n),i.childLanes=Ts(e,r,n),t.memoizedState=pb,t=ps(null,i)):(fa(t),t.child=e.child,t.flags|=128,t=null);else if(ua(t),Lr(),n&536870912&&H(t),ud(d)){if(r=d.nextSibling&&d.nextSibling.dataset,r){c=r.dgst;var f=r.msg;l=r.stck;var p=r.cstck}a=f,r=c,i=l,d=p,c=a,l=d,c=Error(c||`The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering.`),c.stack=i||``,c.digest=r,r=l===void 0?null:l,i={value:c,source:null,stack:r},typeof r==`string`&&Bg.set(c,i),Gr(i),t=ks(e,t,n)}else if(ab||Qr(e,t,n,!1),r=(n&e.childLanes)!==0,ab||r){if(r=Ub,r!==null&&(i=Ue(r,n),i!==0&&i!==u.retryLane))throw u.retryLane=i,ur(e,i),Qc(r,e,i),ib;ld(d)||ul(),t=ks(e,t,n)}else ld(d)?(t.flags|=192,t.child=e.child,t=null):(e=u.treeContext,Zg=fd(d.nextSibling),Xg=t,Qg=!0,t_=null,$g=!1,e_=null,n_=!1,e!==null&&Pr(t,e),t=Ds(t,i.children),t.flags|=4096);return t}}return a?(fa(t),c=i.fallback,l=t.mode,p=e.child,d=p.sibling,i=br(p,{mode:`hidden`,children:i.children}),i.subtreeFlags=p.subtreeFlags&65011712,d===null?(c=wr(c,l,n,null),c.flags|=2):c=br(d,c),c.return=t,i.return=t,i.sibling=c,t.child=i,ps(null,i),i=t.child,c=e.child.memoizedState,c===null?c=ws(n):(l=c.cachePool,l===null?l=ji():(p=p_._currentValue,l=l.parent===p?l:{parent:p,pool:p}),c={baseLanes:c.baseLanes|n,cachePool:l}),i.memoizedState=c,i.childLanes=Ts(e,r,n),t.memoizedState=pb,ps(e.child,i)):(u!==null&&(n&62914560)===n&&(n&e.lanes)!==0&&H(t),ua(t),n=e.child,e=n.sibling,n=br(n,{mode:`visible`,children:i.children}),n.return=t,n.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n,t.memoizedState=null,n)}function Ds(e,t){return t=Os({mode:`visible`,children:t},e.mode),t.return=e,e.child=t}function Os(e,t){return e=g(22,e,null,t),e.lanes=0,e}function ks(e,t,n){return Yv(t,e.child,null,n),e=Ds(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function As(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),Xr(e.return,t,n)}function js(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 Ms(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail,o=r.children,s=dy.current;if((r=(s&uy)!==0)?(s=s&ly|uy,t.flags|=128):s&=ly,E(dy,s,t),s=i??`null`,i!==`forwards`&&i!==`unstable_legacy-backwards`&&i!==`together`&&i!==`independent`&&!db[s]){if(db[s]=!0,i==null)console.error(`The default for the <SuspenseList revealOrder="..."> prop is changing. To be future compatible you must explictly specify either "independent" (the current default), "together", "forwards" or "legacy_unstable-backwards".`);else if(i===`backwards`)console.error(`The rendering order of <SuspenseList revealOrder="backwards"> is changing. To be future compatible you must specify revealOrder="legacy_unstable-backwards" instead.`);else if(typeof i==`string`)switch(i.toLowerCase()){case`together`:case`forwards`:case`backwards`:case`independent`:console.error(`"%s" is not a valid value for revealOrder on <SuspenseList />. Use lowercase "%s" instead.`,i,i.toLowerCase());break;case`forward`:case`backward`:console.error(`"%s" is not a valid value for revealOrder on <SuspenseList />. React uses the -s suffix in the spelling. Use "%ss" instead.`,i,i.toLowerCase());break;default:console.error(`"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?`,i)}else console.error(`%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?`,i)}s=a??`null`,fb[s]||(a==null?(i===`forwards`||i===`backwards`||i===`unstable_legacy-backwards`)&&(fb[s]=!0,console.error(`The default for the <SuspenseList tail="..."> prop is changing. To be future compatible you must explictly specify either "visible" (the current default), "collapsed" or "hidden".`)):a!==`visible`&&a!==`collapsed`&&a!==`hidden`?(fb[s]=!0,console.error(`"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?`,a)):i!==`forwards`&&i!==`backwards`&&i!==`unstable_legacy-backwards`&&(fb[s]=!0,console.error(`<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?`,a)));a:if((i===`forwards`||i===`backwards`||i===`unstable_legacy-backwards`)&&o!=null&&!1!==o){if(Uf(o)){for(s=0;s<o.length;s++)if(!Yi(o[s],s))break a}else if(s=ie(o),typeof s==`function`){if(s=s.call(o))for(var c=s.next(),l=0;!c.done;c=s.next()){if(!Yi(c.value,l))break a;l++}}else console.error(`A single row was passed to a <SuspenseList revealOrder="%s" />. This is not useful since it needs multiple rows. Did you mean to pass multiple children or an array?`,i)}if(cs(e,t,o,n),Qg?(Fr(),o=Wg):o=0,!r&&e!==null&&e.flags&128)a:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&As(e,n,t);else if(e.tag===19)As(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break a;for(;e.sibling===null;){if(e.return===null||e.return===t)break a;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case`forwards`:for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&ma(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),js(t,!1,i,n,a,o);break;case`backwards`:case`unstable_legacy-backwards`:for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&ma(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}js(t,!0,n,null,a,o);break;case`together`:js(t,!1,null,null,void 0,o);break;default:t.memoizedState=null}return t.child}function Ns(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),S_=-1,cx|=t.lanes,(n&t.childLanes)===0){if(e!==null){if(Qr(e,t,n,!1),(n&t.childLanes)===0)return null}else return null}if(e!==null&&t.child!==e.child)throw Error(`Resuming work not yet implemented.`);if(t.child!==null){for(e=t.child,n=br(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=br(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function Ps(e,t){return(e.lanes&t)!==0||(e=e.dependencies,!!(e!==null&&$r(e)))}function Fs(e,t,n){switch(t.tag){case 3:ce(t,t.stateNode.containerInfo),Jr(t,p_,e.memoizedState.cache),Ur();break;case 27:case 5:de(t);break;case 4:ce(t,t.stateNode.containerInfo);break;case 10:Jr(t,t.type,t.memoizedProps.value);break;case 12:(n&t.childLanes)!==0&&(t.flags|=4),t.flags|=2048;var r=t.stateNode;r.effectDuration=-0,r.passiveEffectDuration=-0;break;case 31:if(t.memoizedState!==null)return t.flags|=128,F(t),null;break;case 13:if(r=t.memoizedState,r!==null)return r.dehydrated===null?(n&t.child.childLanes)===0?(ua(t),e=Ns(e,t,n),e===null?null:e.sibling):Es(e,t,n):(ua(t),t.flags|=128,null);ua(t);break;case 19:var i=!!(e.flags&128);if(r=(n&t.childLanes)!==0,r||=(Qr(e,t,n,!1),(n&t.childLanes)!==0),i){if(r)return Ms(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),E(dy,dy.current,t),r)break;return null;case 22:return t.lanes=0,fs(e,t,n,t.pendingProps);case 24:Jr(t,p_,e.memoizedState.cache)}return Ns(e,t,n)}function Is(e,t,n){if(t._debugNeedsRemount&&e!==null){n=Sr(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes),n._debugStack=t._debugStack,n._debugTask=t._debugTask;var r=t.return;if(r===null)throw Error(`Cannot swap the root fiber.`);if(e.alternate=null,t.alternate=null,n.index=t.index,n.sibling=t.sibling,n.return=t.return,n.ref=t.ref,n._debugInfo=t._debugInfo,t===r.child)r.child=n;else{var i=r.child;if(i===null)throw Error(`Expected parent to have a child.`);for(;i.sibling!==t;)if(i=i.sibling,i===null)throw Error(`Expected to find the previous sibling.`);i.sibling=n}return t=r.deletions,t===null?(r.deletions=[e],r.flags|=16):t.push(e),n.flags|=2,n}if(e!==null){if(e.memoizedProps!==t.pendingProps||t.type!==e.type)ab=!0;else{if(!Ps(e,n)&&!(t.flags&128))return ab=!1,Fs(e,t,n);ab=!!(e.flags&131072)}}else ab=!1,(r=Qg)&&(Fr(),r=!!(t.flags&1048576)),r&&(r=t.index,Fr(),Ar(t,Wg,r));switch(t.lanes=0,t.tag){case 16:a:if(r=t.pendingProps,e=Pi(t.elementType),t.type=e,typeof e==`function`)yr(e)?(r=Qo(e,r),t.tag=1,t.type=e=pr(e),t=xs(null,t,e,r,n)):(t.tag=0,Cs(t,e),t.type=e=pr(e),t=ys(null,t,e,r,n));else{if(e!=null){if(i=e.$$typeof,i===Pf){t.tag=11,t.type=e=mr(e),t=ls(null,t,e,r,n);break a}if(i===Lf){t.tag=14,t=us(null,t,e,r,n);break a}}throw t=``,typeof e==`object`&&e&&e.$$typeof===Rf&&(t=` Did you wrap a component in React.lazy() more than once?`),n=C(e)||e,Error(`Element type is invalid. Received a promise that resolves to: `+n+`. Lazy element type must resolve to a class or function.`+t)}return t;case 0:return ys(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=Qo(r,t.pendingProps),xs(e,t,r,i,n);case 3:a:{if(ce(t,t.stateNode.containerInfo),e===null)throw Error(`Should have a current fiber. This is a bug in React.`);r=t.pendingProps;var a=t.memoizedState;i=a.element,Zi(e,t),ra(t,r,null,n);var o=t.memoizedState;if(r=o.cache,Jr(t,p_,r),r!==a.cache&&Zr(t,[p_],n,!0),na(),r=o.element,a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){t=Ss(e,t,r,n);break a}if(r!==i){i=Or(Error(`This root received an early update, before anything was able hydrate. Switched the entire root to client rendering.`),t),Gr(i),t=Ss(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(Zg=fd(e.firstChild),Xg=t,Qg=!0,t_=null,$g=!1,e_=null,n_=!0,n=Xv(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling}else{if(Ur(),r===i){t=Ns(e,t,n);break a}cs(e,t,r,n)}t=t.child}return t;case 26:return vs(e,t),e===null?(n=Td(t.type,null,t.pendingProps,null))?t.memoizedState=n:Qg||(n=t.type,e=t.pendingProps,r=se(Zf.current),r=Pu(r).createElement(n),r[Hp]=t,r[Up]=e,bu(r,n,e),et(r),t.stateNode=r):t.memoizedState=Td(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return de(t),e===null&&Qg&&(r=se(Zf.current),i=ue(),r=t.stateNode=bd(t.type,t.pendingProps,r,i,!1),$g||(i=Au(r,t.type,t.pendingProps,i),i!==null&&(Ir(t,0).serverProps=i)),Xg=t,n_=!0,i=Zg,Ju(t.type)?(nC=i,Zg=fd(r.firstChild)):Zg=i),cs(e,t,t.pendingProps.children,n),vs(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Qg&&(a=ue(),r=Kt(t.type,a.ancestorInfo),i=Zg,(o=!i)||(o=od(i,t.type,t.pendingProps,n_),o===null?a=!1:(t.stateNode=o,$g||(a=Au(o,t.type,t.pendingProps,a),a!==null&&(Ir(t,0).serverProps=a)),Xg=t,Zg=fd(o.firstChild),n_=!1,a=!0),o=!a),o&&(r&&Rr(t,i),zr(t))),de(t),i=t.type,a=t.pendingProps,o=e===null?null:e.memoizedProps,r=a.children,Lu(i,a)?r=null:o!==null&&Lu(i,o)&&(t.flags|=32),t.memoizedState!==null&&(i=ba(e,t,Ca,null,null,n),bC._currentValue=i),vs(e,t),cs(e,t,r,n),t.child;case 6:return e===null&&Qg&&(n=t.pendingProps,e=ue(),r=e.ancestorInfo.current,n=r==null||qt(n,r.tag,e.ancestorInfo.implicitRootScope),e=Zg,(r=!e)||(r=sd(e,t.pendingProps,n_),r===null?r=!1:(t.stateNode=r,Xg=t,Zg=null,r=!0),r=!r),r&&(n&&Rr(t,e),zr(t))),null;case 13:return Es(e,t,n);case 4:return ce(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=Yv(t,null,r,n):cs(e,t,r,n),t.child;case 11:return ls(e,t,t.type,t.pendingProps,n);case 7:return cs(e,t,t.pendingProps,n),t.child;case 8:return cs(e,t,t.pendingProps.children,n),t.child;case 12:return t.flags|=4,t.flags|=2048,r=t.stateNode,r.effectDuration=-0,r.passiveEffectDuration=-0,cs(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.type,i=t.pendingProps,a=i.value,`value`in i||mb||(mb=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),Jr(t,r,a),cs(e,t,i.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,typeof r!=`function`&&console.error(`A context consumer was rendered with multiple children, or a child that isn't a function. A context consumer expects a single child that is a function. If you did pass a function, make sure there is no trailing or leading whitespace around it.`),ei(t),i=ti(i),r=yv(r,i,void 0),t.flags|=1,cs(e,t,r,n),t.child;case 14:return us(e,t,t.type,t.pendingProps,n);case 15:return ds(e,t,t.type,t.pendingProps,n);case 19:return Ms(e,t,n);case 31:return _s(e,t,n);case 22:return fs(e,t,n,t.pendingProps);case 24:return ei(t),r=ti(p_),e===null?(i=ki(),i===null&&(i=Ub,a=ii(),i.pooledCache=a,ai(a),a!==null&&(i.pooledCacheLanes|=n),i=a),t.memoizedState={parent:r,cache:i},Xi(t),Jr(t,p_,i)):((e.lanes&n)!==0&&(Zi(e,t),ra(t,null,null,n),na()),i=e.memoizedState,a=t.memoizedState,i.parent===r?(r=a.cache,Jr(t,p_,r),r!==i.cache&&Zr(t,[p_],n,!0)):(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),Jr(t,p_,r))),cs(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(`Unknown unit of work tag (`+t.tag+`). This error is likely caused by a bug in React. Please file an issue.`)}function Ls(e){e.flags|=4}function Rs(e,t,n,r,i){if((t=(e.mode&Rg)!==K)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i){if(e.stateNode.complete)e.flags|=8192;else if(sl())e.flags|=8192;else throw Bv=zv,Lv}}else e.flags&=-16777217}function zs(e,t){if(t.type!==`stylesheet`||(t.state.loading&sC)!==rC)e.flags&=-16777217;else if(e.flags|=16777216,!Bd(t)){if(sl())e.flags|=8192;else throw Bv=zv,Lv}}function Bs(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag===22?536870912:Le(),e.lanes|=t,fx|=t)}function Vs(e,t){if(!Qg)switch(e.tailMode){case`hidden`:t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case`collapsed`:n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Hs(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t){if((e.mode&q)!==K){for(var i=e.selfBaseDuration,a=e.child;a!==null;)n|=a.lanes|a.childLanes,r|=a.subtreeFlags&65011712,r|=a.flags&65011712,i+=a.treeBaseDuration,a=a.sibling;e.treeBaseDuration=i}else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling}else if((e.mode&q)!==K){i=e.actualDuration,a=e.selfBaseDuration;for(var o=e.child;o!==null;)n|=o.lanes|o.childLanes,r|=o.subtreeFlags,r|=o.flags,i+=o.actualDuration,a+=o.treeBaseDuration,o=o.sibling;e.actualDuration=i,e.treeBaseDuration=a}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 Us(e,t,n){var r=t.pendingProps;switch(Mr(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Hs(t),null;case 1:return Hs(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),Yr(p_,t),le(t),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(Hr(t)?(Kr(),Ls(t)):e===null||e.memoizedState.isDehydrated&&!(t.flags&256)||(t.flags|=1024,Wr())),Hs(t),null;case 26:var i=t.type,a=t.memoizedState;return e===null?(Ls(t),a===null?(Hs(t),Rs(t,i,null,r,n)):(Hs(t),zs(t,a))):a?a===e.memoizedState?(Hs(t),t.flags&=-16777217):(Ls(t),Hs(t),zs(t,a)):(e=e.memoizedProps,e!==r&&Ls(t),Hs(t),Rs(t,i,e,r,n)),null;case 27:if(fe(t),n=se(Zf.current),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ls(t);else{if(!r){if(t.stateNode===null)throw Error(`We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.`);return Hs(t),null}e=ue(),Hr(t)?Br(t,e):(e=bd(i,r,n,e,!0),t.stateNode=e,Ls(t))}return Hs(t),null;case 5:if(fe(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&Ls(t);else{if(!r){if(t.stateNode===null)throw Error(`We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.`);return Hs(t),null}var o=ue();if(Hr(t))Br(t,o);else{switch(a=se(Zf.current),Kt(i,o.ancestorInfo),o=o.context,a=Pu(a),o){case WS:a=a.createElementNS(Mm,i);break;case GS:a=a.createElementNS(jm,i);break;default:switch(i){case`svg`:a=a.createElementNS(Mm,i);break;case`math`:a=a.createElementNS(jm,i);break;case`script`:a=a.createElement(`div`),a.innerHTML=`<script><\/script>`,a=a.removeChild(a.firstChild);break;case`select`:a=typeof r.is==`string`?a.createElement(`select`,{is:r.is}):a.createElement(`select`),r.multiple?a.multiple=!0:r.size&&(a.size=r.size);break;default:a=typeof r.is==`string`?a.createElement(i,{is:r.is}):a.createElement(i),i.indexOf(`-`)===-1&&(i!==i.toLowerCase()&&console.error(`<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.`,i),Object.prototype.toString.call(a)!==`[object HTMLUnknownElement]`||pp.call(JS,i)||(JS[i]=!0,console.error(`The tag <%s> is unrecognized in this browser. If you meant to render a React component, start its name with an uppercase letter.`,i)))}}a[Hp]=t,a[Up]=r;a:for(o=t.child;o!==null;){if(o.tag===5||o.tag===6)a.appendChild(o.stateNode);else if(o.tag!==4&&o.tag!==27&&o.child!==null){o.child.return=o,o=o.child;continue}if(o===t)break a;for(;o.sibling===null;){if(o.return===null||o.return===t)break a;o=o.return}o.sibling.return=o.return,o=o.sibling}t.stateNode=a;a:switch(bu(a,i,r),i){case`button`:case`input`:case`select`:case`textarea`:r=!!r.autoFocus;break a;case`img`:r=!0;break a;default:r=!1}r&&Ls(t)}}return Hs(t),Rs(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&Ls(t);else{if(typeof r!=`string`&&t.stateNode===null)throw Error(`We must have new props for new mounts. This error is likely caused by a bug in React. Please file an issue.`);if(e=se(Zf.current),n=ue(),Hr(t)){if(e=t.stateNode,n=t.memoizedProps,i=!$g,r=null,a=Xg,a!==null)switch(a.tag){case 3:i&&(i=md(e,n,r),i!==null&&(Ir(t,0).serverProps=i));break;case 27:case 5:r=a.memoizedProps,i&&(i=md(e,n,r),i!==null&&(Ir(t,0).serverProps=i))}e[Hp]=t,e=!!(e.nodeValue===n||r!==null&&!0===r.suppressHydrationWarning||_u(e.nodeValue,n)),e||zr(t,!0)}else i=n.ancestorInfo.current,i!=null&&qt(r,i.tag,n.ancestorInfo.implicitRootScope),e=Pu(e).createTextNode(r),e[Hp]=t,t.stateNode=e}return Hs(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=Hr(t),n!==null){if(e===null){if(!r)throw Error(`A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.`);if(e=t.memoizedState,e=e===null?null:e.dehydrated,!e)throw Error(`Expected to have a hydrated activity instance. This error is likely caused by a bug in React. Please file an issue.`);e[Hp]=t,Hs(t),(t.mode&q)!==K&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else Kr(),Ur(),!(t.flags&128)&&(n=t.memoizedState=null),t.flags|=4,Hs(t),(t.mode&q)!==K&&n!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else n=Wr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(pa(t),t):(pa(t),null);if(t.flags&128)throw Error(`Client rendering an Activity suspended it again. This is a bug in React.`)}return Hs(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=r,a=Hr(t),i!==null&&i.dehydrated!==null){if(e===null){if(!a)throw Error(`A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.`);if(a=t.memoizedState,a=a===null?null:a.dehydrated,!a)throw Error(`Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.`);a[Hp]=t,Hs(t),(t.mode&q)!==K&&i!==null&&(i=t.child,i!==null&&(t.treeBaseDuration-=i.treeBaseDuration))}else Kr(),Ur(),!(t.flags&128)&&(i=t.memoizedState=null),t.flags|=4,Hs(t),(t.mode&q)!==K&&i!==null&&(i=t.child,i!==null&&(t.treeBaseDuration-=i.treeBaseDuration));i=!1}else i=Wr(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(pa(t),t):(pa(t),null)}return pa(t),t.flags&128?(t.lanes=n,(t.mode&q)!==K&&Ti(t),t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),a=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(a=r.memoizedState.cachePool.pool),a!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Bs(t,t.updateQueue),Hs(t),(t.mode&q)!==K&&n&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return le(t),e===null&&iu(t.stateNode.containerInfo),Hs(t),null;case 10:return Yr(t.type,t),Hs(t),null;case 19:if(oe(dy,t),r=t.memoizedState,r===null)return Hs(t),null;if(i=!!(t.flags&128),a=r.rendering,a===null){if(i)Vs(r,!1);else{if(sx!==Fb||e!==null&&e.flags&128)for(e=t.child;e!==null;){if(a=ma(e),a!==null){for(t.flags|=128,Vs(r,!1),e=a.updateQueue,t.updateQueue=e,Bs(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)xr(n,e),n=n.sibling;return E(dy,dy.current&ly|uy,t),Qg&&kr(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&vp()>yx&&(t.flags|=128,i=!0,Vs(r,!1),t.lanes=4194304)}}else{if(!i){if(e=ma(a),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Bs(t,e),Vs(r,!0),r.tail===null&&r.tailMode===`hidden`&&!a.alternate&&!Qg)return Hs(t),null}else 2*vp()-r.renderingStartTime>yx&&n!==536870912&&(t.flags|=128,i=!0,Vs(r,!1),t.lanes=4194304)}r.isBackwards?(a.sibling=t.child,t.child=a):(e=r.last,e===null?t.child=a:e.sibling=a,r.last=a)}return r.tail===null?(Hs(t),null):(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=vp(),e.sibling=null,n=dy.current,n=i?n&ly|uy:n&ly,E(dy,n,t),Qg&&kr(t,r.treeForkCount),e);case 22:case 23:return pa(t),la(t),r=t.memoizedState!==null,e===null?r&&(t.flags|=8192):e.memoizedState!==null!==r&&(t.flags|=8192),r?n&536870912&&!(t.flags&128)&&(Hs(t),t.subtreeFlags&6&&(t.flags|=8192)):Hs(t),n=t.updateQueue,n!==null&&Bs(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&&oe(sv,t),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),Yr(p_,t),Hs(t),null;case 25:return null;case 30:return null}throw Error(`Unknown unit of work tag (`+t.tag+`). This error is likely caused by a bug in React. Please file an issue.`)}function Ws(e,t){switch(Mr(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&q)!==K&&Ti(t),t):null;case 3:return Yr(p_,t),le(t),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return fe(t),null;case 31:if(t.memoizedState!==null){if(pa(t),t.alternate===null)throw Error(`Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.`);Ur()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&q)!==K&&Ti(t),t):null;case 13:if(pa(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(`Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.`);Ur()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&q)!==K&&Ti(t),t):null;case 19:return oe(dy,t),null;case 4:return le(t),null;case 10:return Yr(t.type,t),null;case 22:case 23:return pa(t),la(t),e!==null&&oe(sv,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&q)!==K&&Ti(t),t):null;case 24:return Yr(p_,t),null;case 25:return null;default:return null}}function z(e,t){switch(Mr(t),t.tag){case 3:Yr(p_,t),le(t);break;case 26:case 27:case 5:fe(t);break;case 4:le(t);break;case 31:t.memoizedState!==null&&pa(t);break;case 13:pa(t);break;case 19:oe(dy,t);break;case 10:Yr(t.type,t);break;case 22:case 23:pa(t),la(t),e!==null&&oe(sv,t);break;case 24:Yr(p_,t)}}function Gs(e){return(e.mode&q)!==K}function Ks(e,t){Gs(e)?(wi(),Js(t,e),Si()):Js(t,e)}function qs(e,t,n){Gs(e)?(wi(),Ys(n,e,t),Si()):Ys(n,e,t)}function Js(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,(e&my)!==fy&&($x=!0),r=D(t,jv,n),(e&my)!==fy&&($x=!1),r!==void 0&&typeof r!=`function`)){var a=void 0;a=(n.tag&hy)===0?(n.tag&my)===0?`useEffect`:`useInsertionEffect`:`useLayoutEffect`;var o=void 0;o=r===null?` You returned null. If your effect does not require clean up, return undefined (or nothing).`:typeof r.then==`function`?`
|
|
145
|
+
|
|
146
|
+
It looks like you wrote `+a+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
|
|
147
|
+
|
|
148
|
+
`+a+`(() => {
|
|
149
|
+
async function fetchData() {
|
|
150
|
+
// You can await here
|
|
151
|
+
const response = await MyAPI.getData(someId);
|
|
152
|
+
// ...
|
|
153
|
+
}
|
|
154
|
+
fetchData();
|
|
155
|
+
}, [someId]); // Or [] if effect doesn't need props or state
|
|
156
|
+
|
|
157
|
+
Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:` You returned: `+r,D(t,function(e,t){console.error(`%s must not return anything besides a function, which is used for clean-up.%s`,e,t)},a,o)}n=n.next}while(n!==i)}}catch(e){kl(t,t.return,e)}}function Ys(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;s!==void 0&&(o.destroy=void 0,(e&my)!==fy&&($x=!0),i=t,D(i,Nv,i,n,s),(e&my)!==fy&&($x=!1))}r=r.next}while(r!==a)}}catch(e){kl(t,t.return,e)}}function Xs(e,t){Gs(e)?(wi(),Js(t,e),Si()):Js(t,e)}function Zs(e,t,n){Gs(e)?(wi(),Ys(n,e,t),Si()):Ys(n,e,t)}function Qs(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;e.type.defaultProps||`ref`in e.memoizedProps||ub||(n.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",w(e)||`instance`),n.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before processing the update queue. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",w(e)||`instance`));try{D(e,oa,t,n)}catch(t){kl(e,e.return,t)}}}function $s(e,t,n){return e.getSnapshotBeforeUpdate(t,n)}function ec(e,t){var n=t.memoizedProps,r=t.memoizedState;t=e.stateNode,e.type.defaultProps||`ref`in e.memoizedProps||ub||(t.props!==e.memoizedProps&&console.error("Expected %s props to match memoized props before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",w(e)||`instance`),t.state!==e.memoizedState&&console.error("Expected %s state to match memoized state before getSnapshotBeforeUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",w(e)||`instance`));try{var i=Qo(e.type,n),a=D(e,$s,t,i,r);n=hb,a!==void 0||n.has(e.type)||(n.add(e.type),D(e,function(){console.error(`%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.`,w(e))})),t.__reactInternalSnapshotBeforeUpdate=a}catch(t){kl(e,e.return,t)}}function tc(e,t,n){n.props=Qo(e.type,e.memoizedProps),n.state=e.memoizedState,Gs(e)?(wi(),D(e,kv,e,t,n),Si()):D(e,kv,e,t,n)}function nc(e){var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var n=e.stateNode;break;case 30:n=e.stateNode;break;default:n=e.stateNode}if(typeof t==`function`){if(Gs(e))try{wi(),e.refCleanup=t(n)}finally{Si()}else e.refCleanup=t(n)}else typeof t==`string`?console.error(`String refs are no longer supported.`):t.hasOwnProperty(`current`)||console.error(`Unexpected ref object provided for %s. Use either a ref-setter function or React.createRef().`,w(e)),t.current=n}}function rc(e,t){try{D(e,nc,e)}catch(n){kl(e,t,n)}}function ic(e,t){var n=e.ref,r=e.refCleanup;if(n!==null){if(typeof r==`function`)try{if(Gs(e))try{wi(),D(e,r)}finally{Si(e)}else D(e,r)}catch(n){kl(e,t,n)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n==`function`)try{if(Gs(e))try{wi(),D(e,n,null)}finally{Si(e)}else D(e,n,null)}catch(n){kl(e,t,n)}else n.current=null}}function ac(e,t,n,r){var i=e.memoizedProps,a=i.id,o=i.onCommit;i=i.onRender,t=t===null?`mount`:`update`,ev&&(t=`nested-update`),typeof i==`function`&&i(a,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,n),typeof o==`function`&&o(a,t,r,n)}function oc(e,t,n,r){var i=e.memoizedProps;e=i.id,i=i.onPostCommit,t=t===null?`mount`:`update`,ev&&(t=`nested-update`),typeof i==`function`&&i(e,t,r,n)}function sc(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{D(e,Hu,r,t,n,e)}catch(t){kl(e,e.return,t)}}function B(e,t,n){try{D(e,Wu,e.stateNode,e.type,n,t,e)}catch(t){kl(e,e.return,t)}}function cc(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Ju(e.type)||e.tag===4}function lc(e){a:for(;;){for(;e.sibling===null;){if(e.return===null||cc(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&&Ju(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 uc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(qu(n),(n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n).insertBefore(e,t)):(qu(n),t=n.nodeType===9?n.body:n.nodeName===`HTML`?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=on));else if(r!==4&&(r===27&&Ju(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(uc(e,t,n),e=e.sibling;e!==null;)uc(e,t,n),e=e.sibling}function dc(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&Ju(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(dc(e,t,n),e=e.sibling;e!==null;)dc(e,t,n),e=e.sibling}function fc(e){for(var t,n=e.return;n!==null;){if(cc(n)){t=n;break}n=n.return}if(t==null)throw Error(`Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.`);switch(t.tag){case 27:t=t.stateNode,n=lc(e),dc(e,n,t);break;case 5:n=t.stateNode,t.flags&32&&(Gu(n),t.flags&=-33),t=lc(e),dc(e,t,n);break;case 3:case 4:t=t.stateNode.containerInfo,n=lc(e),uc(e,n,t);break;default:throw Error(`Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.`)}}function pc(e){var t=e.stateNode,n=e.memoizedProps;try{D(e,xd,e.type,n,t,e)}catch(t){kl(e,e.return,t)}}function mc(e,t){return t.tag===31?(t=t.memoizedState,e.memoizedState!==null&&t===null):t.tag===13?(e=e.memoizedState,t=t.memoizedState,e!==null&&e.dehydrated!==null&&(t===null||t.dehydrated===null)):t.tag===3&&e.memoizedState.isDehydrated&&!(t.flags&256)}function hc(e,t){if(e=e.containerInfo,KS=LC,e=zn(e),Bn(e)){if(`selectionStart`in e)var n={start:e.selectionStart,end:e.selectionEnd};else a:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,a=r.focusNode;r=r.focusOffset;try{n.nodeType,a.nodeType}catch{n=null;break a}var o=0,s=-1,c=-1,l=0,u=0,d=e,f=null;b:for(;;){for(var p;d!==n||i!==0&&d.nodeType!==3||(s=o+i),d!==a||r!==0&&d.nodeType!==3||(c=o+r),d.nodeType===3&&(o+=d.nodeValue.length),(p=d.firstChild)!==null;)f=d,d=p;for(;;){if(d===e)break b;if(f===n&&++l===i&&(s=o),f===a&&++u===r&&(c=o),(p=d.nextSibling)!==null)break;d=f,f=d.parentNode}d=p}n=s===-1||c===-1?null:{start:s,end:c}}else n=null}n||={start:0,end:0}}else n=null;for(qS={focusedElem:e,selectionRange:n},LC=!1,bb=t;bb!==null;)if(t=bb,e=t.child,t.subtreeFlags&1028&&e!==null)e.return=t,bb=e;else for(;bb!==null;){switch(e=t=bb,n=e.alternate,i=e.flags,e.tag){case 0:if(i&4&&(e=e.updateQueue,e=e===null?null:e.events,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:i&1024&&n!==null&&ec(e,n);break;case 3:if(i&1024){if(e=e.stateNode.containerInfo,n=e.nodeType,n===9)ad(e);else if(n===1)switch(e.nodeName){case`HEAD`:case`HTML`:case`BODY`:ad(e);break;default:e.textContent=``}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if(i&1024)throw Error(`This unit of work tag should not have side-effects. This error is likely caused by a bug in React. Please file an issue.`)}if(e=t.sibling,e!==null){e.return=t.return,bb=e;break}bb=t.return}}function gc(e,t,n){var r=pi(),i=hi(),a=_i(),o=vi(),s=n.flags;switch(n.tag){case 0:case 11:case 15:Oc(e,n),s&4&&Ks(n,hy|py);break;case 1:if(Oc(e,n),s&4){if(e=n.stateNode,t===null)n.type.defaultProps||`ref`in n.memoizedProps||ub||(e.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",w(n)||`instance`),e.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before componentDidMount. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",w(n)||`instance`)),Gs(n)?(wi(),D(n,Cv,n,e),Si()):D(n,Cv,n,e);else{var c=Qo(n.type,t.memoizedProps);t=t.memoizedState,n.type.defaultProps||`ref`in n.memoizedProps||ub||(e.props!==n.memoizedProps&&console.error("Expected %s props to match memoized props before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.props`. Please file an issue.",w(n)||`instance`),e.state!==n.memoizedState&&console.error("Expected %s state to match memoized state before componentDidUpdate. This might either be because of a bug in React, or because a component reassigns its own `this.state`. Please file an issue.",w(n)||`instance`)),Gs(n)?(wi(),D(n,Tv,n,e,c,t,e.__reactInternalSnapshotBeforeUpdate),Si()):D(n,Tv,n,e,c,t,e.__reactInternalSnapshotBeforeUpdate)}}s&64&&Qs(n),s&512&&rc(n,n.return);break;case 3:if(t=li(),Oc(e,n),s&64&&(s=n.updateQueue,s!==null)){if(c=null,n.child!==null)switch(n.child.tag){case 27:case 5:c=n.child.stateNode;break;case 1:c=n.child.stateNode}try{D(n,oa,s,c)}catch(e){kl(n,n.return,e)}}e.effectDuration+=ui(t);break;case 27:t===null&&s&4&&pc(n);case 26:case 5:if(Oc(e,n),t===null){if(s&4)sc(n);else if(s&64){e=n.type,t=n.memoizedProps,c=n.stateNode;try{D(n,Uu,c,e,t,n)}catch(e){kl(n,n.return,e)}}}s&512&&rc(n,n.return);break;case 12:if(s&4){s=li(),Oc(e,n),e=n.stateNode,e.effectDuration+=di(s);try{D(n,ac,n,t,y_,e.effectDuration)}catch(e){kl(n,n.return,e)}}else Oc(e,n);break;case 31:Oc(e,n),s&4&&bc(e,n);break;case 13:Oc(e,n),s&4&&xc(e,n),s&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=Nl.bind(null,n),dd(e,s))));break;case 22:if(s=n.memoizedState!==null||gb,!s){t=t!==null&&t.memoizedState!==null||_b,c=gb;var l=_b;gb=s,(_b=t)&&!l?(Mc(e,n,!!(n.subtreeFlags&8772)),(n.mode&q)!==K&&0<=J&&0<=Y&&.05<Y-J&&Xn(n,J,Y)):Oc(e,n),gb=c,_b=l}break;case 30:break;default:Oc(e,n)}(n.mode&q)!==K&&0<=J&&0<=Y&&((E_||.05<w_)&&Qn(n,J,Y,w_,T_),n.alternate===null&&n.return!==null&&n.return.alternate!==null&&.05<Y-J&&(mc(n.return.alternate,n.return)||Yn(n,J,Y,`Mount`))),mi(r),gi(i),T_=a,E_=o}function _c(e){var t=e.alternate;t!==null&&(e.alternate=null,_c(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&Xe(t)),e.stateNode=null,e._debugOwner=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function vc(e,t,n){for(n=n.child;n!==null;)yc(e,t,n),n=n.sibling}function yc(e,t,n){if(Op&&typeof Op.onCommitFiberUnmount==`function`)try{Op.onCommitFiberUnmount(Dp,n)}catch(e){kp||(kp=!0,console.error(`React instrumentation encountered an error: %o`,e))}var r=pi(),i=hi(),a=_i(),o=vi();switch(n.tag){case 26:_b||ic(n,t),vc(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(e=n.stateNode,e.parentNode.removeChild(e));break;case 27:_b||ic(n,t);var s=Cb,c=wb;Ju(n.type)&&(Cb=n.stateNode,wb=!1),vc(e,t,n),D(n,Sd,n.stateNode),Cb=s,wb=c;break;case 5:_b||ic(n,t);case 6:if(s=Cb,c=wb,Cb=null,vc(e,t,n),Cb=s,wb=c,Cb!==null){if(wb)try{D(n,Xu,Cb,n.stateNode)}catch(e){kl(n,t,e)}else try{D(n,Yu,Cb,n.stateNode)}catch(e){kl(n,t,e)}}break;case 18:Cb!==null&&(wb?(e=Cb,Zu(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e,n.stateNode),_f(e)):Zu(Cb,n.stateNode));break;case 4:s=Cb,c=wb,Cb=n.stateNode.containerInfo,wb=!0,vc(e,t,n),Cb=s,wb=c;break;case 0:case 11:case 14:case 15:Ys(my,n,t),_b||qs(n,t,hy),vc(e,t,n);break;case 1:_b||(ic(n,t),s=n.stateNode,typeof s.componentWillUnmount==`function`&&tc(n,t,s)),vc(e,t,n);break;case 21:vc(e,t,n);break;case 22:_b=(s=_b)||n.memoizedState!==null,vc(e,t,n),_b=s;break;default:vc(e,t,n)}(n.mode&q)!==K&&0<=J&&0<=Y&&(E_||.05<w_)&&Qn(n,J,Y,w_,T_),mi(r),gi(i),T_=a,E_=o}function bc(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{D(t,vd,e)}catch(e){kl(t,t.return,e)}}}function xc(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{D(t,yd,e)}catch(e){kl(t,t.return,e)}}function Sc(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new yb),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new yb),t;default:throw Error(`Unexpected Suspense handler tag (`+e.tag+`). This is a bug in React.`)}}function Cc(e,t){var n=Sc(e);t.forEach(function(t){if(!n.has(t)){if(n.add(t),Ap){if(xb!==null&&Sb!==null)zl(Sb,xb);else throw Error(`Expected finished root and lanes to be set. This is a bug in React.`)}var r=Pl.bind(null,e,t);t.then(r,r)}})}function wc(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=e,a=t,o=n[r],s=pi(),c=a;a:for(;c!==null;){switch(c.tag){case 27:if(Ju(c.type)){Cb=c.stateNode,wb=!1;break a}break;case 5:Cb=c.stateNode,wb=!1;break a;case 3:case 4:Cb=c.stateNode.containerInfo,wb=!0;break a}c=c.return}if(Cb===null)throw Error(`Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.`);yc(i,a,o),Cb=null,wb=!1,(o.mode&q)!==K&&0<=J&&0<=Y&&.05<Y-J&&Yn(o,J,Y,`Unmount`),mi(s),i=o,a=i.alternate,a!==null&&(a.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Tc(t,e),t=t.sibling}function Tc(e,t){var n=pi(),r=hi(),i=_i(),a=vi(),o=e.alternate,s=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:wc(t,e),Ec(e),s&4&&(Ys(my|py,e,e.return),Js(my|py,e),qs(e,e.return,hy|py));break;case 1:if(wc(t,e),Ec(e),s&512&&(_b||o===null||ic(o,o.return)),s&64&&gb&&(s=e.updateQueue,s!==null&&(o=s.callbacks,o!==null))){var c=s.shared.hiddenCallbacks;s.shared.hiddenCallbacks=c===null?o:c.concat(o)}break;case 26:if(c=Tb,wc(t,e),Ec(e),s&512&&(_b||o===null||ic(o,o.return)),s&4){var l=o===null?null:o.memoizedState;if(s=e.memoizedState,o===null){if(s===null){if(e.stateNode===null){a:{s=e.type,o=e.memoizedProps,c=c.ownerDocument||c;b:switch(s){case`title`:l=c.getElementsByTagName(`title`)[0],(!l||l[Yp]||l[Hp]||l.namespaceURI===Mm||l.hasAttribute(`itemprop`))&&(l=c.createElement(s),c.head.insertBefore(l,c.querySelector(`head > title`))),bu(l,s,o),l[Hp]=e,et(l),s=l;break a;case`link`:var u=Ld(`link`,`href`,c).get(s+(o.href||``));if(u){for(var d=0;d<u.length;d++)if(l=u[d],l.getAttribute(`href`)===(o.href==null||o.href===``?null:o.href)&&l.getAttribute(`rel`)===(o.rel==null?null:o.rel)&&l.getAttribute(`title`)===(o.title==null?null:o.title)&&l.getAttribute(`crossorigin`)===(o.crossOrigin==null?null:o.crossOrigin)){u.splice(d,1);break b}}l=c.createElement(s),bu(l,s,o),c.head.appendChild(l);break;case`meta`:if(u=Ld(`meta`,`content`,c).get(s+(o.content||``))){for(d=0;d<u.length;d++)if(l=u[d],O(o.content,`content`),l.getAttribute(`content`)===(o.content==null?null:``+o.content)&&l.getAttribute(`name`)===(o.name==null?null:o.name)&&l.getAttribute(`property`)===(o.property==null?null:o.property)&&l.getAttribute(`http-equiv`)===(o.httpEquiv==null?null:o.httpEquiv)&&l.getAttribute(`charset`)===(o.charSet==null?null:o.charSet)){u.splice(d,1);break b}}l=c.createElement(s),bu(l,s,o),c.head.appendChild(l);break;default:throw Error(`getNodesForType encountered a type it did not expect: "`+s+`". This is a bug in React.`)}l[Hp]=e,et(l),s=l}e.stateNode=s}else Rd(c,e.type,e.stateNode)}else e.stateNode=Nd(c,s,e.memoizedProps)}else l===s?s===null&&e.stateNode!==null&&B(e,e.memoizedProps,o.memoizedProps):(l===null?o.stateNode!==null&&(o=o.stateNode,o.parentNode.removeChild(o)):l.count--,s===null?Rd(c,e.type,e.stateNode):Nd(c,s,e.memoizedProps))}break;case 27:wc(t,e),Ec(e),s&512&&(_b||o===null||ic(o,o.return)),o!==null&&s&4&&B(e,e.memoizedProps,o.memoizedProps);break;case 5:if(wc(t,e),Ec(e),s&512&&(_b||o===null||ic(o,o.return)),e.flags&32){c=e.stateNode;try{D(e,Gu,c)}catch(t){kl(e,e.return,t)}}s&4&&e.stateNode!=null&&(c=e.memoizedProps,B(e,c,o===null?c:o.memoizedProps)),s&1024&&(vb=!0,e.type!==`form`&&console.error(`Unexpected host component type. Expected a form. This is a bug in React.`));break;case 6:if(wc(t,e),Ec(e),s&4){if(e.stateNode===null)throw Error(`This should have a text node initialized. This error is likely caused by a bug in React. Please file an issue.`);s=e.memoizedProps,o=o===null?s:o.memoizedProps,c=e.stateNode;try{D(e,Ku,c,o,s)}catch(t){kl(e,e.return,t)}}break;case 3:if(c=li(),fC=null,l=Tb,Tb=Cd(t.containerInfo),wc(t,e),Tb=l,Ec(e),s&4&&o!==null&&o.memoizedState.isDehydrated)try{D(e,_d,t.containerInfo)}catch(t){kl(e,e.return,t)}vb&&(vb=!1,Dc(e)),t.effectDuration+=ui(c);break;case 4:s=Tb,Tb=Cd(e.stateNode.containerInfo),wc(t,e),Ec(e),Tb=s;break;case 12:s=li(),wc(t,e),Ec(e),e.stateNode.effectDuration+=di(s);break;case 31:wc(t,e),Ec(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Cc(e,s)));break;case 13:wc(t,e),Ec(e),e.child.flags&8192&&e.memoizedState!==null!=(o!==null&&o.memoizedState!==null)&&(gx=vp()),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Cc(e,s)));break;case 22:c=e.memoizedState!==null;var f=o!==null&&o.memoizedState!==null,p=gb,m=_b;if(gb=p||c,_b=m||f,wc(t,e),_b=m,gb=p,f&&!c&&!p&&!m&&(e.mode&q)!==K&&0<=J&&0<=Y&&.05<Y-J&&Xn(e,J,Y),Ec(e),s&8192)a:for(t=e.stateNode,t._visibility=c?t._visibility&~Dg:t._visibility|Dg,!c||o===null||f||gb||_b||(Ac(e),(e.mode&q)!==K&&0<=J&&0<=Y&&.05<Y-J&&Yn(e,J,Y,`Disconnect`)),o=null,t=e;;){if(t.tag===5||t.tag===26){if(o===null){f=o=t;try{l=f.stateNode,c?D(f,ed,l):D(f,rd,f.stateNode,f.memoizedProps)}catch(e){kl(f,f.return,e)}}}else if(t.tag===6){if(o===null){f=t;try{u=f.stateNode,c?D(f,td,u):D(f,id,u,f.memoizedProps)}catch(e){kl(f,f.return,e)}}}else if(t.tag===18){if(o===null){f=t;try{d=f.stateNode,c?D(f,$u,d):D(f,nd,f.stateNode)}catch(e){kl(f,f.return,e)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break a;for(;t.sibling===null;){if(t.return===null||t.return===e)break a;o===t&&(o=null),t=t.return}o===t&&(o=null),t.sibling.return=t.return,t=t.sibling}s&4&&(s=e.updateQueue,s!==null&&(o=s.retryQueue,o!==null&&(s.retryQueue=null,Cc(e,o))));break;case 19:wc(t,e),Ec(e),s&4&&(s=e.updateQueue,s!==null&&(e.updateQueue=null,Cc(e,s)));break;case 30:break;case 21:break;default:wc(t,e),Ec(e)}(e.mode&q)!==K&&0<=J&&0<=Y&&((E_||.05<w_)&&Qn(e,J,Y,w_,T_),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<Y-J&&(mc(e.return.alternate,e.return)||Yn(e,J,Y,`Mount`))),mi(n),gi(r),T_=i,E_=a}function Ec(e){var t=e.flags;if(t&2){try{D(e,fc,e)}catch(t){kl(e,e.return,t)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function Dc(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;Dc(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function Oc(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)gc(e,t.alternate,t),t=t.sibling}function kc(e){var t=pi(),n=hi(),r=_i(),i=vi();switch(e.tag){case 0:case 11:case 14:case 15:qs(e,e.return,hy),Ac(e);break;case 1:ic(e,e.return);var a=e.stateNode;typeof a.componentWillUnmount==`function`&&tc(e,e.return,a),Ac(e);break;case 27:D(e,Sd,e.stateNode);case 26:case 5:ic(e,e.return),Ac(e);break;case 22:e.memoizedState===null&&Ac(e);break;case 30:Ac(e);break;default:Ac(e)}(e.mode&q)!==K&&0<=J&&0<=Y&&(E_||.05<w_)&&Qn(e,J,Y,w_,T_),mi(t),gi(n),T_=r,E_=i}function Ac(e){for(e=e.child;e!==null;)kc(e),e=e.sibling}function jc(e,t,n,r){var i=pi(),a=hi(),o=_i(),s=vi(),c=n.flags;switch(n.tag){case 0:case 11:case 15:Mc(e,n,r),Ks(n,hy);break;case 1:if(Mc(e,n,r),t=n.stateNode,typeof t.componentDidMount==`function`&&D(n,Cv,n,t),t=n.updateQueue,t!==null){e=n.stateNode;try{D(n,aa,t,e)}catch(e){kl(n,n.return,e)}}r&&c&64&&Qs(n),rc(n,n.return);break;case 27:pc(n);case 26:case 5:Mc(e,n,r),r&&t===null&&c&4&&sc(n),rc(n,n.return);break;case 12:if(r&&c&4){c=li(),Mc(e,n,r),r=n.stateNode,r.effectDuration+=di(c);try{D(n,ac,n,t,y_,r.effectDuration)}catch(e){kl(n,n.return,e)}}else Mc(e,n,r);break;case 31:Mc(e,n,r),r&&c&4&&bc(e,n);break;case 13:Mc(e,n,r),r&&c&4&&xc(e,n);break;case 22:n.memoizedState===null&&Mc(e,n,r),rc(n,n.return);break;case 30:break;default:Mc(e,n,r)}(n.mode&q)!==K&&0<=J&&0<=Y&&(E_||.05<w_)&&Qn(n,J,Y,w_,T_),mi(i),gi(a),T_=o,E_=s}function Mc(e,t,n){for(n&&=!!(t.subtreeFlags&8772),t=t.child;t!==null;)jc(e,t.alternate,t,n),t=t.sibling}function Nc(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&&ai(e),n!=null&&oi(n))}function Pc(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(ai(t),e!=null&&oi(e))}function Fc(e,t,n,r,i){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(t=t.child;t!==null;){var a=t.sibling;Ic(e,t,n,r,a===null?i:a.actualStartTime),t=a}}function Ic(e,t,n,r,i){var a=pi(),o=hi(),s=_i(),c=vi(),l=xg,u=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&q)!==K&&0<t.actualStartTime&&t.flags&1&&Zn(t,t.actualStartTime,i,Eb,n),Fc(e,t,n,r,i),u&2048&&Xs(t,gy|py);break;case 1:(t.mode&q)!==K&&0<t.actualStartTime&&(t.flags&128?N(t,t.actualStartTime,i,[]):t.flags&1&&Zn(t,t.actualStartTime,i,Eb,n)),Fc(e,t,n,r,i);break;case 3:var d=li(),f=Eb;Eb=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&!(t.flags&256),Fc(e,t,n,r,i),Eb=f,u&2048&&(n=null,t.alternate!==null&&(n=t.alternate.memoizedState.cache),r=t.memoizedState.cache,r!==n&&(ai(r),n!=null&&oi(n))),e.passiveEffectDuration+=ui(d);break;case 12:if(u&2048){u=li(),Fc(e,t,n,r,i),e=t.stateNode,e.passiveEffectDuration+=di(u);try{D(t,oc,t,t.alternate,y_,e.passiveEffectDuration)}catch(e){kl(t,t.return,e)}}else Fc(e,t,n,r,i);break;case 31:u=Eb,d=t.alternate===null?null:t.alternate.memoizedState,f=t.memoizedState,d!==null&&f===null?(f=t.deletions,f!==null&&0<f.length&&f[0].tag===18?(Eb=!1,d=d.hydrationErrors,d!==null&&N(t,t.actualStartTime,i,d)):Eb=!0):Eb=!1,Fc(e,t,n,r,i),Eb=u;break;case 13:u=Eb,d=t.alternate===null?null:t.alternate.memoizedState,f=t.memoizedState,d===null||d.dehydrated===null||f!==null&&f.dehydrated!==null?Eb=!1:(f=t.deletions,f!==null&&0<f.length&&f[0].tag===18?(Eb=!1,d=d.hydrationErrors,d!==null&&N(t,t.actualStartTime,i,d)):Eb=!0),Fc(e,t,n,r,i),Eb=u;break;case 23:break;case 22:f=t.stateNode,d=t.alternate,t.memoizedState===null?f._visibility&Og?Fc(e,t,n,r,i):(f._visibility|=Og,Lc(e,t,n,r,!!(t.subtreeFlags&10256)||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),i),(t.mode&q)===K||Eb||(e=t.actualStartTime,0<=e&&.05<i-e&&Xn(t,e,i),0<=J&&0<=Y&&.05<Y-J&&Xn(t,J,Y))):f._visibility&Og?Fc(e,t,n,r,i):zc(e,t,n,r,i),u&2048&&Nc(d,t);break;case 24:Fc(e,t,n,r,i),u&2048&&Pc(t.alternate,t);break;default:Fc(e,t,n,r,i)}(t.mode&q)!==K&&((e=!Eb&&t.alternate===null&&t.return!==null&&t.return.alternate!==null)&&(n=t.actualStartTime,0<=n&&.05<i-n&&Yn(t,n,i,`Mount`)),0<=J&&0<=Y&&((E_||.05<w_)&&Qn(t,J,Y,w_,T_),e&&.05<Y-J&&Yn(t,J,Y,`Mount`))),mi(a),gi(o),T_=s,E_=c,xg=l}function Lc(e,t,n,r,i,a){for(i&&=!!(t.subtreeFlags&10256)||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),t=t.child;t!==null;){var o=t.sibling;Rc(e,t,n,r,i,o===null?a:o.actualStartTime),t=o}}function Rc(e,t,n,r,i,a){var o=pi(),s=hi(),c=_i(),l=vi(),u=xg;i&&(t.mode&q)!==K&&0<t.actualStartTime&&t.flags&1&&Zn(t,t.actualStartTime,a,Eb,n);var d=t.flags;switch(t.tag){case 0:case 11:case 15:Lc(e,t,n,r,i,a),Xs(t,gy);break;case 23:break;case 22:var f=t.stateNode;t.memoizedState===null?(f._visibility|=Og,Lc(e,t,n,r,i,a)):f._visibility&Og?Lc(e,t,n,r,i,a):zc(e,t,n,r,a),i&&d&2048&&Nc(t.alternate,t);break;case 24:Lc(e,t,n,r,i,a),i&&d&2048&&Pc(t.alternate,t);break;default:Lc(e,t,n,r,i,a)}(t.mode&q)!==K&&0<=J&&0<=Y&&(E_||.05<w_)&&Qn(t,J,Y,w_,T_),mi(o),gi(s),T_=c,E_=l,xg=u}function zc(e,t,n,r,i){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(var a=t.child;a!==null;){t=a.sibling;var o=e,s=n,c=r,l=t===null?i:t.actualStartTime,u=xg;(a.mode&q)!==K&&0<a.actualStartTime&&a.flags&1&&Zn(a,a.actualStartTime,l,Eb,s);var d=a.flags;switch(a.tag){case 22:zc(o,a,s,c,l),d&2048&&Nc(a.alternate,a);break;case 24:zc(o,a,s,c,l),d&2048&&Pc(a.alternate,a);break;default:zc(o,a,s,c,l)}xg=u,a=t}}function Bc(e,t,n){if(e.subtreeFlags&Db)for(e=e.child;e!==null;)Vc(e,t,n),e=e.sibling}function Vc(e,t,n){switch(e.tag){case 26:Bc(e,t,n),e.flags&Db&&e.memoizedState!==null&&Vd(n,Tb,e.memoizedState,e.memoizedProps);break;case 5:Bc(e,t,n);break;case 3:case 4:var r=Tb;Tb=Cd(e.stateNode.containerInfo),Bc(e,t,n),Tb=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=Db,Db=16777216,Bc(e,t,n),Db=r):Bc(e,t,n));break;default:Bc(e,t,n)}}function Hc(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 Uc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n],i=pi();bb=r,qc(r,e),(r.mode&q)!==K&&0<=J&&0<=Y&&.05<Y-J&&Yn(r,J,Y,`Unmount`),mi(i)}Hc(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Wc(e),e=e.sibling}function Wc(e){var t=pi(),n=hi(),r=_i(),i=vi();switch(e.tag){case 0:case 11:case 15:Uc(e),e.flags&2048&&Zs(e,e.return,gy|py);break;case 3:var a=li();Uc(e),e.stateNode.passiveEffectDuration+=ui(a);break;case 12:a=li(),Uc(e),e.stateNode.passiveEffectDuration+=di(a);break;case 22:a=e.stateNode,e.memoizedState!==null&&a._visibility&Og&&(e.return===null||e.return.tag!==13)?(a._visibility&=~Og,Gc(e),(e.mode&q)!==K&&0<=J&&0<=Y&&.05<Y-J&&Yn(e,J,Y,`Disconnect`)):Uc(e);break;default:Uc(e)}(e.mode&q)!==K&&0<=J&&0<=Y&&(E_||.05<w_)&&Qn(e,J,Y,w_,T_),mi(t),gi(n),E_=i,T_=r}function Gc(e){var t=e.deletions;if(e.flags&16){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n],i=pi();bb=r,qc(r,e),(r.mode&q)!==K&&0<=J&&0<=Y&&.05<Y-J&&Yn(r,J,Y,`Unmount`),mi(i)}Hc(e)}for(e=e.child;e!==null;)Kc(e),e=e.sibling}function Kc(e){var t=pi(),n=hi(),r=_i(),i=vi();switch(e.tag){case 0:case 11:case 15:Zs(e,e.return,gy),Gc(e);break;case 22:var a=e.stateNode;a._visibility&Og&&(a._visibility&=~Og,Gc(e));break;default:Gc(e)}(e.mode&q)!==K&&0<=J&&0<=Y&&(E_||.05<w_)&&Qn(e,J,Y,w_,T_),mi(t),gi(n),E_=i,T_=r}function qc(e,t){for(;bb!==null;){var n=bb,r=n,i=t,a=pi(),o=hi(),s=_i(),c=vi();switch(r.tag){case 0:case 11:case 15:Zs(r,i,gy);break;case 23:case 22:r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(i=r.memoizedState.cachePool.pool,i!=null&&ai(i));break;case 24:oi(r.memoizedState.cache)}if((r.mode&q)!==K&&0<=J&&0<=Y&&(E_||.05<w_)&&Qn(r,J,Y,w_,T_),mi(a),gi(o),E_=c,T_=s,r=n.child,r!==null)r.return=n,bb=r;else a:for(n=e;bb!==null;){if(r=bb,a=r.sibling,o=r.return,_c(r),r===n){bb=null;break a}if(a!==null){a.return=o,bb=a;break a}bb=o}}}function Jc(){Ab.forEach(function(e){return e()})}function Yc(){var e=typeof IS_REACT_ACT_ENVIRONMENT<`u`?IS_REACT_ACT_ENVIRONMENT:void 0;return e||G.actQueue===null||console.error(`The current testing environment is not configured to support act(...)`),e}function Xc(e){if((Hb&Nb)!==Mb&&$!==0)return $&-$;var t=G.T;return t===null?Je():(t._updatedFibers||=new Set,t._updatedFibers.add(e),W())}function Zc(){if(dx===0){if(!($&536870912)||Qg){var e=Fp;Fp<<=1,!(Fp&3932160)&&(Fp=262144),dx=e}else dx=536870912}return e=sy.current,e!==null&&(e.flags|=32),dx}function Qc(e,t,n){if($x&&console.error(`useInsertionEffect must not schedule updates.`),Jx&&(Yx=!0),(e===Ub&&(tx===qb||tx===ex)||e.cancelPendingCommit!==null)&&(al(e,0),tl(e,$,dx,!1)),ze(e,n),(Hb&Nb)!==Mb&&e===Ub){if(fp)switch(t.tag){case 0:case 11:case 15:e=Wb&&w(Wb)||`Unknown`,nS.has(e)||(nS.add(e),t=w(t)||`Unknown`,console.error("Cannot update a component (`%s`) while rendering a different component (`%s`). To locate the bad setState() call inside `%s`, follow the stack trace as described in https://react.dev/link/setstate-in-render",t,e,e));break;case 1:tS||=(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),!0)}}else Ap&&Ge(e,t,n),Vl(t),e===Ub&&((Hb&Nb)===Mb&&(lx|=n),sx===zb&&tl(e,$,dx,!1)),Hl(e)}function V(e,t,n){if((Hb&(Nb|Pb))!==Mb)throw Error(`Should not already be working.`);if($!==0&&Wb!==null){var r=Wb,i=vp();switch(Q_){case Jb:case qb:var a=$_;_g&&((r=r._debugTask)?r.run(console.timeStamp.bind(console,`Suspended`,a,i,vg,void 0,`primary-light`)):console.timeStamp(`Suspended`,a,i,vg,void 0,`primary-light`));break;case ex:a=$_,_g&&((r=r._debugTask)?r.run(console.timeStamp.bind(console,`Action`,a,i,vg,void 0,`primary-light`)):console.timeStamp(`Action`,a,i,vg,void 0,`primary-light`));break;default:_g&&(r=i-$_,3>r||console.timeStamp(`Blocked`,$_,i,vg,void 0,5>r?`primary-light`:10>r?`primary`:100>r?`primary-dark`:`error`))}}a=(n=!n&&!(t&127)&&(t&e.expiredLanes)===0||Fe(e,t))?fl(e,t):U(e,t,!0);var o=n;do{if(a===Fb){ix&&!n&&tl(e,t,0,!1),t=tx,$_=m_(),Q_=t;break}if(r=vp(),i=e.current.alternate,o&&!el(i)){M(t),i=v_,a=r,!_g||a<=i||(Sx?Sx.run(console.timeStamp.bind(console,`Teared Render`,i,a,bg,yg,`error`)):console.timeStamp(`Teared Render`,i,a,bg,yg,`error`)),il(t,r),a=U(e,t,!1),o=!1;continue}if(a===Lb){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){M(t),rr(v_,r,t,Sx),il(t,r),t=s;a:{r=e,a=o,o=px;var c=r.current.memoizedState.isDehydrated;if(c&&(al(r,s).flags|=256),s=U(r,s,!1),s!==Lb){if(ax&&!c){r.errorRecoveryDisabledLanes|=a,lx|=a,a=zb;break a}r=mx,mx=o,r!==null&&(mx===null?mx=r:mx.push.apply(mx,r))}a=s}if(o=!1,a!==Lb)continue;r=vp()}}if(a===Ib){M(t),rr(v_,r,t,Sx),il(t,r),al(e,0),tl(e,t,0,!0);break}a:{switch(n=e,a){case Fb:case Ib:throw Error(`Root did not complete. This is a bug in React.`);case zb:if((t&4194048)!==t)break;case Bb:M(t),er(v_,r,t,Sx),il(t,r),i=t,i&127?I_=r:i&4194048&&(q_=r),tl(n,t,dx,!rx);break a;case Lb:mx=null;break;case Rb:case Vb:break;default:throw Error(`Unknown root exit status.`)}if(G.actQueue!==null)bl(n,i,t,mx,xx,hx,dx,lx,fx,a,null,null,v_,r);else{if((t&62914560)===t&&(o=gx+vx-vp(),10<o)){if(tl(n,t,dx,!rx),Pe(n,0,!0)!==0)break a;Lx=t,n.timeoutHandle=ZS($c.bind(null,n,i,mx,xx,hx,t,dx,lx,fx,rx,a,`Throttled`,v_,r),o);break a}$c(n,i,mx,xx,hx,t,dx,lx,fx,rx,a,null,v_,r)}}break}while(1);Hl(e)}function $c(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.timeoutHandle=$S;var m=t.subtreeFlags,h=null;if((m&8192||(m&16785408)==16785408)&&(h={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:on},Vc(t,a,h),m=(a&62914560)===a?gx-vp():(a&4194048)===a?_x-vp():0,m=Hd(h,m),m!==null)){Lx=a,e.cancelPendingCommit=m(bl.bind(null,e,t,a,n,r,i,o,s,c,u,h,h.waitingForViewTransition?`Waiting for the previous Animation`:0<h.count?0<h.imgCount?`Suspended on CSS and Images`:`Suspended on CSS`:h.imgCount===1?`Suspended on an Image`:0<h.imgCount?`Suspended on Images`:null,f,p)),tl(e,a,o,!l);return}bl(e,t,a,n,r,i,o,s,c,u,h,d,f,p)}function el(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(!Bh(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 tl(e,t,n,r){t&=~ux,t&=~lx,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var a=31-jp(i),o=1<<a;r[a]=-1,i&=~o}n!==0&&Ve(e,n,t)}function nl(){return(Hb&(Nb|Pb))!==Mb||(Ul(0,!1),!1)}function rl(){if(Wb!==null){if(tx===Gb)var e=Wb.return;else e=Wb,qr(),Ea(e),Hv=null,Uv=0,e=Wb;for(;e!==null;)z(e.alternate,e),e=e.return;Wb=null}}function il(e,t){e&127&&(D_=t),e&4194048&&(L_=t),e&62914560&&(J_=t),e&2080374784&&(Y_=t)}function al(e,t){_g&&(console.timeStamp(`Blocking Track`,.003,.003,`Blocking`,yg,`primary-light`),console.timeStamp(`Transition Track`,.003,.003,`Transition`,yg,`primary-light`),console.timeStamp(`Suspense Track`,.003,.003,`Suspense`,yg,`primary-light`),console.timeStamp(`Idle Track`,.003,.003,`Idle`,yg,`primary-light`));var n=v_;if(v_=m_(),$!==0&&0<n){if(M($),sx===Rb||sx===zb)er(n,v_,t,Sx);else{var r=v_,i=Sx;if(_g&&!(r<=n)){var a=(t&738197653)===t?`tertiary-dark`:`primary-dark`,o=(t&536870912)===t?`Prewarm`:(t&201326741)===t?`Interrupted Hydration`:`Interrupted Render`;i?i.run(console.timeStamp.bind(console,o,n,r,bg,yg,a)):console.timeStamp(o,n,r,bg,yg,a)}}il($,v_)}if(n=Sx,Sx=null,t&127){Sx=k_,i=0<=O_&&O_<D_?D_:O_,r=0<=N_&&N_<D_?D_:N_,a=0<=r?r:0<=i?i:v_,0<=I_?(M(2),tr(I_,a,t,n)):X_&127&&(M(2),or(D_,a,Z_)),n=i;var s=r,c=P_,l=0<F_,u=A_===g_,d=A_===__;if(i=v_,r=k_,a=j_,o=M_,_g){if(bg=`Blocking`,0<n?n>i&&(n=i):n=i,0<s?s>n&&(s=n):s=n,c!==null&&n>s){var f=l?`secondary-light`:`warning`;r?r.run(console.timeStamp.bind(console,l?`Consecutive`:`Event: `+c,s,n,bg,yg,f)):console.timeStamp(l?`Consecutive`:`Event: `+c,s,n,bg,yg,f)}i>n&&(s=u?`error`:(t&738197653)===t?`tertiary-light`:`primary-light`,u=d?`Promise Resolved`:u?`Cascading Update`:5<i-n?`Update Blocked`:`Update`,d=[],o!=null&&d.push([`Component name`,o]),a!=null&&d.push([`Method name`,a]),n={start:n,end:i,detail:{devtools:{properties:d,track:bg,trackGroup:yg,color:s}}},r?r.run(performance.measure.bind(performance,u,n)):performance.measure(u,n))}O_=-1.1,A_=0,M_=j_=null,I_=-1.1,F_=N_,N_=-1.1,D_=m_()}if(t&4194048&&(Sx=V_,i=0<=R_&&R_<L_?L_:R_,n=0<=z_&&z_<L_?L_:z_,r=0<=W_&&W_<L_?L_:W_,a=0<=r?r:0<=n?n:v_,0<=q_?(M(256),tr(q_,a,t,Sx)):X_&4194048&&(M(256),or(L_,a,Z_)),d=r,s=G_,c=0<K_,l=B_===__,a=v_,r=V_,o=H_,u=U_,_g&&(bg=`Transition`,0<n?n>a&&(n=a):n=a,0<i?i>n&&(i=n):i=n,0<d?d>i&&(d=i):d=i,i>d&&s!==null&&(f=c?`secondary-light`:`warning`,r?r.run(console.timeStamp.bind(console,c?`Consecutive`:`Event: `+s,d,i,bg,yg,f)):console.timeStamp(c?`Consecutive`:`Event: `+s,d,i,bg,yg,f)),n>i&&(r?r.run(console.timeStamp.bind(console,`Action`,i,n,bg,yg,`primary-dark`)):console.timeStamp(`Action`,i,n,bg,yg,`primary-dark`)),a>n&&(i=l?`Promise Resolved`:5<a-n?`Update Blocked`:`Update`,d=[],u!=null&&d.push([`Component name`,u]),o!=null&&d.push([`Method name`,o]),n={start:n,end:a,detail:{devtools:{properties:d,track:bg,trackGroup:yg,color:`primary-light`}}},r?r.run(performance.measure.bind(performance,i,n)):performance.measure(i,n))),z_=R_=-1.1,B_=0,q_=-1.1,K_=W_,W_=-1.1,L_=m_()),t&62914560&&X_&62914560&&(M(4194304),or(J_,v_,Z_)),t&2080374784&&X_&2080374784&&(M(268435456),or(Y_,v_,Z_)),n=e.timeoutHandle,n!==$S&&(e.timeoutHandle=$S,QS(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Lx=0,rl(),Ub=e,Wb=n=br(e.current,null),$=t,tx=Gb,nx=null,rx=!1,ix=Fe(e,t),ax=!1,sx=Fb,fx=dx=ux=lx=cx=0,mx=px=null,hx=!1,t&8&&(t|=t&32),r=e.entangledLanes,r!==0)for(e=e.entanglements,r&=t;0<r;)i=31-jp(r),a=1<<i,t|=e[i],r&=~a;return ox=t,sr(),e=og(),1e3<e-ig&&(G.recentlyCreatedOwnerStacks=0,ig=e),cv.discardPendingWarnings(),n}function ol(e,t){Z=null,G.H=Iy,G.getCurrentStack=null,fp=!1,dp=null,t===Iv||t===Rv?(t=Fi(),tx=Jb):t===Lv?(t=Fi(),tx=Yb):tx=t===ib?$b:typeof t==`object`&&t&&typeof t.then==`function`?Zb:Kb,nx=t;var n=Wb;n===null?(sx=Ib,ns(e,Or(t,e.current))):n.mode&q&&bi(n)}function sl(){var e=sy.current;return e===null?!0:($&4194048)===$?cy===null:($&62914560)===$||$&536870912?e===cy:!1}function cl(){var e=G.H;return G.H=Iy,e===null?Iy:e}function ll(){var e=G.A;return G.A=Ob,e}function H(e){Sx===null&&(Sx=e._debugTask==null?null:e._debugTask)}function ul(){sx=zb,rx||($&4194048)!==$&&sy.current!==null||(ix=!0),!(cx&134217727)&&!(lx&134217727)||Ub===null||tl(Ub,$,dx,!1)}function U(e,t,n){var r=Hb;Hb|=Nb;var i=cl(),a=ll();if(Ub!==e||$!==t){if(Ap){var o=e.memoizedUpdaters;0<o.size&&(zl(e,$),o.clear()),Ke(e,t)}xx=null,al(e,t)}t=!1,o=sx;a:do try{if(tx!==Gb&&Wb!==null){var s=Wb,c=nx;switch(tx){case $b:rl(),o=Bb;break a;case Jb:case qb:case ex:case Zb:sy.current===null&&(t=!0);var l=tx;if(tx=Gb,nx=null,_l(e,s,c,l),n&&ix){o=Fb;break a}break;default:l=tx,tx=Gb,nx=null,_l(e,s,c,l)}}dl(),o=sx;break}catch(t){ol(e,t)}while(1);return t&&e.shellSuspendCounter++,qr(),Hb=r,G.H=i,G.A=a,Wb===null&&(Ub=null,$=0,sr()),o}function dl(){for(;Wb!==null;)ml(Wb)}function fl(e,t){var n=Hb;Hb|=Nb;var r=cl(),i=ll();if(Ub!==e||$!==t){if(Ap){var a=e.memoizedUpdaters;0<a.size&&(zl(e,$),a.clear()),Ke(e,t)}xx=null,yx=vp()+bx,al(e,t)}else ix=Fe(e,t);a:do try{if(tx!==Gb&&Wb!==null)b:switch(t=Wb,a=nx,tx){case Kb:tx=Gb,nx=null,_l(e,t,a,Kb);break;case qb:case ex:if(Ni(a)){tx=Gb,nx=null,hl(t);break}t=function(){tx!==qb&&tx!==ex||Ub!==e||(tx=Qb),Hl(e)},a.then(t,t);break a;case Jb:tx=Qb;break a;case Yb:tx=Xb;break a;case Qb:Ni(a)?(tx=Gb,nx=null,hl(t)):(tx=Gb,nx=null,_l(e,t,a,Qb));break;case Xb:var o=null;switch(Wb.tag){case 26:o=Wb.memoizedState;case 5:case 27:var s=Wb;if(o?Bd(o):s.stateNode.complete){tx=Gb,nx=null;var c=s.sibling;if(c!==null)Wb=c;else{var l=s.return;l===null?Wb=null:(Wb=l,vl(l))}break b}break;default:console.error(`Unexpected type of fiber triggered a suspensey commit. This is a bug in React.`)}tx=Gb,nx=null,_l(e,t,a,Xb);break;case Zb:tx=Gb,nx=null,_l(e,t,a,Zb);break;case $b:rl(),sx=Bb;break a;default:throw Error(`Unexpected SuspendedReason. This is a bug in React.`)}G.actQueue===null?pl():dl();break}catch(t){ol(e,t)}while(1);return qr(),G.H=r,G.A=i,Hb=n,Wb===null?(Ub=null,$=0,sr(),sx):Fb}function pl(){for(;Wb!==null&&!gp();)ml(Wb)}function ml(e){var t=e.alternate;(e.mode&q)===K?t=D(e,Is,t,e,ox):(yi(e),t=D(e,Is,t,e,ox),bi(e)),e.memoizedProps=e.pendingProps,t===null?vl(e):Wb=t}function hl(e){var t=D(e,gl,e);e.memoizedProps=e.pendingProps,t===null?vl(e):Wb=t}function gl(e){var t=e.alternate,n=(e.mode&q)!==K;switch(n&&yi(e),e.tag){case 15:case 0:t=bs(t,e,e.pendingProps,e.type,void 0,$);break;case 11:t=bs(t,e,e.pendingProps,e.type.render,e.ref,$);break;case 5:Ea(e);default:z(t,e),e=Wb=xr(e,ox),t=Is(t,e,ox)}return n&&bi(e),t}function _l(e,t,n,r){qr(),Ea(t),Hv=null,Uv=0;var i=t.return;try{if(ss(e,i,t,n,$)){sx=Ib,ns(e,Or(n,e.current)),Wb=null;return}}catch(t){if(i!==null)throw Wb=i,t;sx=Ib,ns(e,Or(n,e.current)),Wb=null;return}t.flags&32768?(Qg||r===Kb?e=!0:ix||$&536870912?e=!1:(rx=e=!0,(r===qb||r===ex||r===Jb||r===Zb)&&(r=sy.current,r!==null&&r.tag===13&&(r.flags|=16384))),yl(t,e)):vl(t)}function vl(e){var t=e;do{if(t.flags&32768){yl(t,rx);return}var n=t.alternate;if(e=t.return,yi(t),n=D(t,Us,n,t,ox),(t.mode&q)!==K&&xi(t),n!==null){Wb=n;return}if(t=t.sibling,t!==null){Wb=t;return}Wb=t=e}while(t!==null);sx===Fb&&(sx=Vb)}function yl(e,t){do{var n=Ws(e.alternate,e);if(n!==null){n.flags&=32767,Wb=n;return}if((e.mode&q)!==K){xi(e),n=e.actualDuration;for(var r=e.child;r!==null;)n+=r.actualDuration,r=r.sibling;e.actualDuration=n}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){Wb=e;return}Wb=e=n}while(e!==null);sx=Bb,Wb=null}function bl(e,t,n,r,i,a,o,s,c,l,u,d,f,p){e.cancelPendingCommit=null;do El();while(Px!==Ox);if(cv.flushLegacyContextWarning(),cv.flushPendingUnsafeLifecycleWarnings(),(Hb&(Nb|Pb))!==Mb)throw Error(`Should not already be working.`);if(M(n),l===Lb?rr(f,p,n,Sx):r===null?$n(f,p,n,Sx):nr(f,p,n,r,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&!!(t.flags&256),Sx),t!==null){if(n===0&&console.error(`finishedLanes should not be empty during a commit. This is a bug in React.`),t===e.current)throw Error(`Cannot commit the same tree as before. This error is likely caused by a bug in React. Please file an issue.`);if(a=t.lanes|t.childLanes,a|=jg,Be(e,n,a,o,s,c),e===Ub&&(Wb=Ub=null,$=0),Ix=t,Fx=e,Lx=n,Rx=a,Bx=i,Vx=r,zx=p,Hx=d,Ux=wx,Wx=null,t.actualDuration!==0||t.subtreeFlags&10256||t.flags&10256?(e.callbackNode=null,e.callbackPriority=0,Bl(Sp,function(){return XS=window.event,Ux===wx&&(Ux=Ex),Dl(),null})):(e.callbackNode=null,e.callbackPriority=0),x_=null,y_=m_(),d!==null&&ir(p,y_,d,Sx),r=!!(t.flags&13878),t.subtreeFlags&13878||r){r=G.T,G.T=null,i=Wf.p,Wf.p=Lp,o=Hb,Hb|=Pb;try{hc(e,t,n)}finally{Hb=o,Wf.p=i,G.T=r}}Px=kx,xl(),Sl(),Cl()}}function xl(){if(Px===kx){Px=Ox;var e=Fx,t=Ix,n=Lx,r=!!(t.flags&13878);if(t.subtreeFlags&13878||r){r=G.T,G.T=null;var i=Wf.p;Wf.p=Lp;var a=Hb;Hb|=Pb;try{xb=n,Sb=e,fi(),Tc(t,e),Sb=xb=null,n=qS;var o=zn(e.containerInfo),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&Rn(s.ownerDocument.documentElement,s)){if(c!==null&&Bn(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 _=Ln(s,h),v=Ln(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}}LC=!!KS,qS=KS=null}finally{Hb=a,Wf.p=i,G.T=r}}e.current=t,Px=Ax}}function Sl(){if(Px===Ax){Px=Ox;var e=Wx;if(e!==null){y_=m_();var t=b_,n=y_;!_g||n<=t||(Z_?Z_.run(console.timeStamp.bind(console,e,t,n,bg,yg,`secondary-light`)):console.timeStamp(e,t,n,bg,yg,`secondary-light`))}e=Fx,t=Ix,n=Lx;var r=!!(t.flags&8772);if(t.subtreeFlags&8772||r){r=G.T,G.T=null;var i=Wf.p;Wf.p=Lp;var a=Hb;Hb|=Pb;try{xb=n,Sb=e,fi(),gc(e,t.alternate,t),Sb=xb=null}finally{Hb=a,Wf.p=i,G.T=r}}e=zx,t=Hx,b_=m_(),e=t===null?e:y_,t=b_,n=Ux===Tx,r=Sx,x_===null?!_g||t<=e||(r?r.run(console.timeStamp.bind(console,n?`Commit Interrupted View Transition`:`Commit`,e,t,bg,yg,n?`error`:`secondary-dark`)):console.timeStamp(n?`Commit Interrupted View Transition`:`Commit`,e,t,bg,yg,n?`error`:`secondary-dark`)):ar(e,t,x_,!1,r),Px=jx}}function Cl(){if(Px===Mx||Px===jx){if(Px===Mx){var e=b_;b_=m_();var t=b_,n=Ux===Tx;!_g||t<=e||(Z_?Z_.run(console.timeStamp.bind(console,n?`Interrupted View Transition`:`Starting Animation`,e,t,bg,yg,n?`error`:`secondary-light`)):console.timeStamp(n?`Interrupted View Transition`:`Starting Animation`,e,t,bg,yg,n?` error`:`secondary-light`)),Ux!==Tx&&(Ux=Dx)}Px=Ox,_p(),e=Fx;var r=Ix;t=Lx,n=Vx;var i=r.actualDuration!==0||!!(r.subtreeFlags&10256)||!!(r.flags&10256);i?Px=Nx:(Px=Ox,Ix=Fx=null,Tl(e,e.pendingLanes),Zx=0,Qx=null);var a=e.pendingLanes;if(a===0&&(Cx=null),i||Ll(e),a=qe(t),r=r.stateNode,Op&&typeof Op.onCommitFiberRoot==`function`)try{var o=(r.current.flags&128)==128;switch(a){case Lp:var s=bp;break;case Rp:s=xp;break;case zp:s=Sp;break;case Bp:s=wp;break;default:s=Sp}Op.onCommitFiberRoot(Dp,r,s,o)}catch(e){kp||(kp=!0,console.error(`React instrumentation encountered an error: %o`,e))}if(Ap&&e.memoizedUpdaters.clear(),Jc(),n!==null){o=G.T,s=Wf.p,Wf.p=Lp,G.T=null;try{var c=e.onRecoverableError;for(r=0;r<n.length;r++){var l=n[r],u=wl(l.stack);D(l.source,c,l.value,u)}}finally{G.T=o,Wf.p=s}}Lx&3&&El(),Hl(e),a=e.pendingLanes,t&261930&&a&42?(tv=!0,e===qx?Kx++:(Kx=0,qx=e)):Kx=0,i||il(t,b_),Ul(0,!1)}}function wl(e){return e={componentStack:e},Object.defineProperty(e,"digest",{get:function(){console.error(`You are accessing "digest" from the errorInfo object passed to onRecoverableError. This property is no longer provided as part of errorInfo but can be accessed as a property of the Error instance itself.`)}}),e}function Tl(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,oi(t)))}function El(){return xl(),Sl(),Cl(),Dl()}function Dl(){if(Px!==Nx)return!1;var e=Fx,t=Rx;Rx=0;var n=qe(Lx),r=zp===0||zp>n?zp:n;n=G.T;var i=Wf.p;try{Wf.p=r,G.T=null;var a=Bx;Bx=null,r=Fx;var o=Lx;if(Px=Ox,Ix=Fx=null,Lx=0,(Hb&(Nb|Pb))!==Mb)throw Error(`Cannot flush passive effects while already rendering.`);M(o),Jx=!0,Yx=!1;var s=0;if(x_=null,s=vp(),Ux===Dx)or(b_,s,Z_);else{var c=b_,l=s,u=Ux===Ex;!_g||l<=c||(Sx?Sx.run(console.timeStamp.bind(console,u?`Waiting for Paint`:`Waiting`,c,l,bg,yg,`secondary-light`)):console.timeStamp(u?`Waiting for Paint`:`Waiting`,c,l,bg,yg,`secondary-light`))}c=Hb,Hb|=Pb;var d=r.current;fi(),Wc(d);var f=r.current;d=zx,fi(),Ic(r,f,o,a,d),Ll(r),Hb=c;var p=vp();if(f=s,d=Sx,x_===null?!_g||p<=f||(d?d.run(console.timeStamp.bind(console,`Remaining Effects`,f,p,bg,yg,`secondary-dark`)):console.timeStamp(`Remaining Effects`,f,p,bg,yg,`secondary-dark`)):ar(f,p,x_,!0,d),il(o,p),Ul(0,!1),Yx?r===Qx?Zx++:(Zx=0,Qx=r):Zx=0,Yx=Jx=!1,Op&&typeof Op.onPostCommitFiberRoot==`function`)try{Op.onPostCommitFiberRoot(Dp,r)}catch(e){kp||(kp=!0,console.error(`React instrumentation encountered an error: %o`,e))}var m=r.current.stateNode;return m.effectDuration=0,m.passiveEffectDuration=0,!0}finally{Wf.p=i,G.T=n,Tl(e,t)}}function Ol(e,t,n){t=Or(n,t),Ci(t),t=is(e.stateNode,t,2),e=$i(e,t,2),e!==null&&(ze(e,2),Hl(e))}function kl(e,t,n){if($x=!1,e.tag===3)Ol(e,e,n);else{for(;t!==null;){if(t.tag===3){Ol(t,e,n);return}if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError==`function`||typeof r.componentDidCatch==`function`&&(Cx===null||!Cx.has(r))){e=Or(n,e),Ci(e),n=as(2),r=$i(t,n,2),r!==null&&(os(n,r,t,e),ze(r,2),Hl(r));return}}t=t.return}console.error(`Internal React error: Attempted to capture a commit phase error inside a detached tree. This indicates a bug in React. Potential causes include deleting the same fiber more than once, committing an already-finished tree, or an inconsistent return pointer.
|
|
158
|
+
|
|
159
|
+
Error message:
|
|
160
|
+
|
|
161
|
+
%s`,n)}}function Al(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new jb;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)||(ax=!0,i.add(n),r=jl.bind(null,e,t,n),Ap&&zl(e,n),t.then(r,r))}function jl(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,n&127?0>O_&&(D_=O_=m_(),k_=h_(`Promise Resolved`),A_=__):n&4194048&&0>z_&&(L_=z_=m_(),V_=h_(`Promise Resolved`),B_=__),Yc()&&G.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
|
|
162
|
+
|
|
163
|
+
When testing, code that resolves suspended data should be wrapped into act(...):
|
|
164
|
+
|
|
165
|
+
act(() => {
|
|
166
|
+
/* finish loading suspended data */
|
|
167
|
+
});
|
|
168
|
+
/* assert on the output */
|
|
169
|
+
|
|
170
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`),Ub===e&&($&n)===n&&(sx===zb||sx===Rb&&($&62914560)===$&&vp()-gx<vx?(Hb&Nb)===Mb&&al(e,0):ux|=n,fx===$&&(fx=0)),Hl(e)}function Ml(e,t){t===0&&(t=Le()),e=ur(e,t),e!==null&&(ze(e,t),Hl(e))}function Nl(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),Ml(e,n)}function Pl(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(`Pinged unknown suspense boundary type. This is probably a bug in React.`)}r!==null&&r.delete(t),Ml(e,n)}function Fl(e,t,n){if(t.subtreeFlags&67117056)for(t=t.child;t!==null;){var r=e,i=t,a=i.type===Af;a=n||a,i.tag===22?i.memoizedState===null&&(a&&i.flags&8192?D(i,Il,r,i):i.subtreeFlags&67108864&&D(i,Fl,r,i,a)):i.flags&67108864?a&&D(i,Il,r,i):Fl(r,i,a),t=t.sibling}}function Il(e,t){je(!0);try{kc(t),Kc(t),jc(e,t.alternate,t,!1),Rc(e,t,0,null,!1,0)}finally{je(!1)}}function Ll(e){var t=!0;e.current.mode&(Ig|Lg)||(t=!1),Fl(e,e.current,t)}function Rl(e){if((Hb&Nb)===Mb){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=w(e)||`ReactComponent`,eS!==null){if(eS.has(t))return;eS.add(t)}else eS=new Set([t]);D(e,function(){console.error(`Can't perform a React state update on a component that hasn't mounted yet. This indicates that you have a side-effect in your render function that asynchronously tries to update the component. Move this work to useEffect instead.`)})}}}function zl(e,t){Ap&&e.memoizedUpdaters.forEach(function(n){Ge(e,n,t)})}function Bl(e,t){var n=G.actQueue;return n===null?mp(e,t):(n.push(t),rS)}function Vl(e){Yc()&&G.actQueue===null&&D(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
|
|
171
|
+
|
|
172
|
+
When testing, code that causes React state updates should be wrapped into act(...):
|
|
173
|
+
|
|
174
|
+
act(() => {
|
|
175
|
+
/* fire events that update state */
|
|
176
|
+
});
|
|
177
|
+
/* assert on the output */
|
|
178
|
+
|
|
179
|
+
This ensures that you're testing the behavior the user would see in the browser. Learn more at https://react.dev/link/wrap-tests-with-act`,w(e))})}function Hl(e){e!==aS&&e.next===null&&(aS===null?iS=aS=e:aS=aS.next=e),cS=!0,G.actQueue===null?oS||(oS=!0,Xl()):sS||(sS=!0,Xl())}function Ul(e,t){if(!lS&&cS){lS=!0;do for(var n=!1,r=iS;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-jp(42|e)+1)-1,a&=i&~(o&~s),a=a&201326741?a&201326741|1:a?a|2:0}a!==0&&(n=!0,Jl(r,a))}else a=$,a=Pe(r,r===Ub?a:0,r.cancelPendingCommit!==null||r.timeoutHandle!==$S),!(a&3)||Fe(r,a)||(n=!0,Jl(r,a))}r=r.next}while(n);lS=!1}}function Wl(){XS=window.event,Gl()}function Gl(){cS=sS=oS=!1;var e=0;uS!==0&&Ru()&&(e=uS);for(var t=vp(),n=null,r=iS;r!==null;){var i=r.next,a=Kl(r,t);a===0?(r.next=null,n===null?iS=i:n.next=i,i===null&&(aS=n)):(n=r,(e!==0||a&3)&&(cS=!0)),r=i}Px!==Ox&&Px!==Nx||Ul(e,!1),uS!==0&&(uS=0)}function Kl(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes&-62914561;0<a;){var o=31-jp(a),s=1<<o,c=i[o];c===-1?((s&n)===0||(s&r)!==0)&&(i[o]=Ie(s,t)):c<=t&&(e.expiredLanes|=s),a&=~s}if(t=Ub,n=$,n=Pe(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==$S),r=e.callbackNode,n===0||e===t&&(tx===qb||tx===ex)||e.cancelPendingCommit!==null)return r!==null&&Yl(r),e.callbackNode=null,e.callbackPriority=0;if(!(n&3)||Fe(e,n)){if(t=n&-n,t!==e.callbackPriority||G.actQueue!==null&&r!==dS)Yl(r);else return t;switch(qe(n)){case Lp:case Rp:n=xp;break;case zp:n=Sp;break;case Bp:n=wp;break;default:n=Sp}return r=ql.bind(null,e),G.actQueue===null?n=mp(n,r):(G.actQueue.push(r),n=dS),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&Yl(r),e.callbackPriority=2,e.callbackNode=null,2}function ql(e,t){if(tv=ev=!1,XS=window.event,Px!==Ox&&Px!==Nx)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(Ux===wx&&(Ux=Ex),El()&&e.callbackNode!==n)return null;var r=$;return r=Pe(e,e===Ub?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==$S),r===0?null:(V(e,r,t),Kl(e,vp()),e.callbackNode!=null&&e.callbackNode===n?ql.bind(null,e):null)}function Jl(e,t){if(El())return null;ev=tv,tv=!1,V(e,t,!0)}function Yl(e){e!==dS&&e!==null&&hp(e)}function Xl(){G.actQueue!==null&&G.actQueue.push(function(){return Gl(),null}),tC(function(){(Hb&(Nb|Pb))===Mb?Gl():mp(bp,Wl)})}function W(){if(uS===0){var e=iv;e===0&&(e=Pp,Pp<<=1,!(Pp&261888)&&(Pp=256)),uS=e}return uS}function Zl(e){return e==null||typeof e==`symbol`||typeof e==`boolean`?null:typeof e==`function`?e:(O(e,`action`),an(``+e))}function Ql(e,t){var n=t.ownerDocument.createElement(`input`);return n.name=t.name,n.value=t.value,e.id&&n.setAttribute(`form`,e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function $l(e,t,n,r,i){if(t===`submit`&&n&&n.stateNode===i){var a=Zl((i[Up]||null).action),o=r.submitter;o&&(t=(t=o[Up]||null)?Zl(t.formAction):o.getAttribute(`formAction`),t!==null&&(a=t,o=null));var s=new rh(`action`,`action`,null,r,i);e.push({event:s,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(uS!==0){var e=o?Ql(i,o):new FormData(i),t={pending:!0,data:e,method:i.method,action:a};Object.freeze(t),Mo(n,t,null,e)}}else typeof a==`function`&&(s.preventDefault(),e=o?Ql(i,o):new FormData(i),t={pending:!0,data:e,method:i.method,action:a},Object.freeze(t),Mo(n,t,a,e))},currentTarget:i}]})}}function eu(e,t,n){e.currentTarget=n;try{t(e)}catch(e){cg(e)}e.currentTarget=null}function tu(e,t){t=!!(t&4);for(var n=0;n<e.length;n++){var r=e[n];a:{var i=void 0,a=r.event;if(r=r.listeners,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!==i&&a.isPropagationStopped())break a;c===null?eu(a,s,l):D(c,eu,a,s,l),i=c}else for(o=0;o<r.length;o++){if(s=r[o],c=s.instance,l=s.currentTarget,s=s.listener,c!==i&&a.isPropagationStopped())break a;c===null?eu(a,s,l):D(c,eu,a,s,l),i=c}}}}function nu(e,t){pS.has(e)||console.error(`Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.`,e);var n=t[Gp];n===void 0&&(n=t[Gp]=new Set);var r=e+`__bubble`;n.has(r)||(au(t,e,2,!1),n.add(r))}function ru(e,t,n){pS.has(e)&&!t&&console.error(`Did not expect a listenToNativeEvent() call for "%s" in the bubble phase. This is a bug in React. Please file an issue.`,e);var r=0;t&&(r|=4),au(n,e,r,t)}function iu(e){if(!e[mS]){e[mS]=!0,Xp.forEach(function(t){t!==`selectionchange`&&(pS.has(t)||ru(t,!1,e),ru(t,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[mS]||(t[mS]=!0,ru(`selectionchange`,!1,t))}}function au(e,t,n,r){switch(sf(t)){case Lp:var i=tf;break;case Rp:i=nf;break;default:i=rf}n=i.bind(null,t,n,e),i=void 0,!Zm||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 ou(e,t,n,r,i){var a=r;if(!(t&1)&&!(t&2)&&r!==null)a:for(;;){if(r===null)return;var o=r.tag;if(o===3||o===4){var s=r.stateNode.containerInfo;if(s===i)break;if(o===4)for(o=r.return;o!==null;){var c=o.tag;if((c===3||c===4)&&o.stateNode.containerInfo===i)return;o=o.return}for(;s!==null;){if(o=Ze(s),o===null)return;if(c=o.tag,c===5||c===6||c===26||c===27){r=a=o;continue a}s=s.parentNode}}r=r.return}ln(function(){var r=a,i=sn(n),o=[];a:{var s=ng.get(e);if(s!==void 0){var c=rh,l=e;switch(e){case`keypress`:if(fn(n)===0)break a;case`keydown`:case`keyup`:c=bh;break;case`focusin`:l=`focus`,c=fh;break;case`focusout`:l=`blur`,c=fh;break;case`beforeblur`:case`afterblur`:c=fh;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`:c=uh;break;case`drag`:case`dragend`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`dragstart`:case`drop`:c=dh;break;case`touchcancel`:case`touchend`:case`touchmove`:case`touchstart`:c=Sh;break;case Yh:case Xh:case Zh:c=ph;break;case tg:c=Ch;break;case`scroll`:case`scrollend`:c=ah;break;case`wheel`:c=wh;break;case`copy`:case`cut`:case`paste`:c=mh;break;case`gotpointercapture`:case`lostpointercapture`:case`pointercancel`:case`pointerdown`:case`pointermove`:case`pointerout`:case`pointerover`:case`pointerup`:c=xh;break;case`toggle`:case`beforetoggle`:c=Th}var u=!!(t&4),d=!u&&(e===`scroll`||e===`scrollend`),f=u?s===null?null:s+`Capture`:s;u=[];for(var p=r,m;p!==null;){var h=p;if(m=h.stateNode,h=h.tag,h!==5&&h!==26&&h!==27||m===null||f===null||(h=un(p,f),h!=null&&u.push(su(p,h,m))),d)break;p=p.return}0<u.length&&(s=new c(s,l,null,n,i),o.push({event:s,listeners:u}))}}if(!(t&7)){a:{if(s=e===`mouseover`||e===`pointerover`,c=e===`mouseout`||e===`pointerout`,s&&n!==Km&&(l=n.relatedTarget||n.fromElement)&&(Ze(l)||l[Wp]))break a;if((c||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,c?(l=n.relatedTarget||n.toElement,c=r,l=l?Ze(l):null,l!==null&&(d=x(l),u=l.tag,l!==d||u!==5&&u!==27&&u!==6)&&(l=null)):(c=null,l=r),c!==l)){if(u=uh,h=`onMouseLeave`,f=`onMouseEnter`,p=`mouse`,(e===`pointerout`||e===`pointerover`)&&(u=xh,h=`onPointerLeave`,f=`onPointerEnter`,p=`pointer`),d=c==null?s:$e(c),m=l==null?s:$e(l),s=new u(h,p+`leave`,c,n,i),s.target=d,s.relatedTarget=m,h=null,Ze(i)===r&&(u=new u(f,p+`enter`,l,n,i),u.target=m,u.relatedTarget=d,h=u),d=h,c&&l)b:{for(u=lu,f=c,p=l,m=0,h=f;h;h=u(h))m++;h=0;for(var g=p;g;g=u(g))h++;for(;0<m-h;)f=u(f),m--;for(;0<h-m;)p=u(p),h--;for(;m--;){if(f===p||p!==null&&f===p.alternate){u=f;break b}f=u(f),p=u(p)}u=null}else u=null;c!==null&&uu(o,s,c,u,!1),l!==null&&d!==null&&uu(o,d,l,u,!0)}}a:{if(s=r?$e(r):window,c=s.nodeName&&s.nodeName.toLowerCase(),c===`select`||c===`input`&&s.type===`file`)var _=Dn;else if(Sn(s)){if(zh)_=Nn;else{_=jn;var v=An}}else c=s.nodeName,!c||c.toLowerCase()!==`input`||s.type!==`checkbox`&&s.type!==`radio`?r&&Qt(r.elementType)&&(_=Dn):_=Mn;if(_&&=_(e,r)){wn(o,_,n,i);break a}v&&v(e,s,r),e===`focusout`&&r&&s.type===`number`&&r.memoizedProps.value!=null&&vt(s,`number`,s.value)}switch(v=r?$e(r):window,e){case`focusin`:(Sn(v)||v.contentEditable===`true`)&&(Hh=v,Uh=r,Wh=null);break;case`focusout`:Wh=Uh=Hh=null;break;case`mousedown`:Gh=!0;break;case`contextmenu`:case`mouseup`:case`dragend`:Gh=!1,Vn(o,n,i);break;case`selectionchange`:if(Vh)break;case`keydown`:case`keyup`:Vn(o,n,i)}var y;if(Oh)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 Fh?vn(e,n)&&(b=`onCompositionEnd`):e===`keydown`&&n.keyCode===Dh&&(b=`onCompositionStart`);b&&(jh&&n.locale!==`ko`&&(Fh||b!==`onCompositionStart`?b===`onCompositionEnd`&&Fh&&(y=dn()):($m=i,eh=`value`in $m?$m.value:$m.textContent,Fh=!0)),v=cu(r,b),0<v.length&&(b=new hh(b,e,null,n,i),o.push({event:b,listeners:v}),y?b.data=y:(y=yn(n),y!==null&&(b.data=y)))),(y=Ah?bn(e,n):xn(e,n))&&(b=cu(r,`onBeforeInput`),0<b.length&&(v=new gh(`onBeforeInput`,`beforeinput`,null,n,i),o.push({event:v,listeners:b}),v.data=y)),$l(o,e,r,n,i)}tu(o,t)})}function su(e,t,n){return{instance:e,listener:t,currentTarget:n}}function cu(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=un(e,n),i!=null&&r.unshift(su(e,i,a)),i=un(e,t),i!=null&&r.push(su(e,i,a))),e.tag===3)return r;e=e.return}return[]}function lu(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function uu(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=un(n,a),l!=null&&o.unshift(su(n,l,c))):i||(l=un(n,a),l!=null&&o.push(su(n,l,c)))),n=n.return}o.length!==0&&e.push({event:t,listeners:o})}function du(e,t){tn(e,t),e!==`input`&&e!==`textarea`&&e!==`select`||t==null||t.value!==null||zm||(zm=!0,e===`select`&&t.multiple?console.error("`value` prop on `%s` should not be null. Consider using an empty array when `multiple` is set to `true` to clear the component or `undefined` for uncontrolled components.",e):console.error("`value` prop on `%s` should not be null. Consider using an empty string to clear the component or `undefined` for uncontrolled components.",e));var n={registrationNameDependencies:Zp,possibleRegistrationNames:Qp};Qt(e)||typeof t.is==`string`||rn(e,t,n),t.contentEditable&&!t.suppressContentEditableWarning&&t.children!=null&&console.error("A component is `contentEditable` and contains `children` managed by React. It is now your responsibility to guarantee that none of those nodes are unexpectedly modified or duplicated. This is probably not intentional.")}function fu(e,t,n,r){t!==n&&(n=gu(n),gu(t)!==n&&(r[e]=t))}function pu(e,t,n){t.forEach(function(t){n[Su(t)]=t===`style`?Cu(e):e.getAttribute(t)})}function mu(e,t){!1===t?console.error("Expected `%s` listener to be a function, instead got `false`.\n\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.",e,e,e):console.error("Expected `%s` listener to be a function, instead got a value of `%s` type.",e,typeof t)}function hu(e,t){return e=e.namespaceURI===jm||e.namespaceURI===Mm?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function gu(e){return Ee(e)&&(console.error(`The provided HTML markup uses a value of unsupported type %s. This value must be coerced to a string before using it here.`,Te(e)),De(e)),(typeof e==`string`?e:``+e).replace(CS,`
|
|
180
|
+
`).replace(wS,``)}function _u(e,t){return t=gu(t),gu(e)===t}function vu(e,t,n,r,i,a){switch(n){case`children`:typeof r==`string`?(qt(r,t,!1),t===`body`||t===`textarea`&&r===``||Jt(e,r)):(typeof r==`number`||typeof r==`bigint`)&&(qt(``+r,t,!1),t!==`body`&&Jt(e,``+r));break;case`className`:ot(e,`class`,r);break;case`tabIndex`:ot(e,`tabindex`,r);break;case`dir`:case`role`:case`viewBox`:case`width`:case`height`:ot(e,n,r);break;case`style`:Zt(e,r,a);break;case`data`:if(t!==`object`){ot(e,`data`,r);break}case`src`:case`href`:if(r===``&&(t!==`a`||n!==`href`)){console.error(n===`src`?`An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.`:`An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.`,n,n),e.removeAttribute(n);break}if(r==null||typeof r==`function`||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}O(r,n),r=an(``+r),e.setAttribute(n,r);break;case`action`:case`formAction`:if(r!=null&&(t===`form`?n===`formAction`?console.error(`You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>.`):typeof r==`function`&&(i.encType==null&&i.method==null||bS||(bS=!0,console.error(`Cannot specify a encType or method for a form that specifies a function as the action. React provides those automatically. They will get overridden.`)),i.target==null||yS||(yS=!0,console.error(`Cannot specify a target for a form that specifies a function as the action. The function will always be executed in the same window.`))):t===`input`||t===`button`?n===`action`?console.error(`You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>.`):t!==`input`||i.type===`submit`||i.type===`image`||_S?t!==`button`||i.type==null||i.type===`submit`||_S?typeof r==`function`&&(i.name==null||vS||(vS=!0,console.error(`Cannot specify a "name" prop for a button that specifies a function as a formAction. React needs it to encode which action should be invoked. It will get overridden.`)),i.formEncType==null&&i.formMethod==null||bS||(bS=!0,console.error(`Cannot specify a formEncType or formMethod for a button that specifies a function as a formAction. React provides those automatically. They will get overridden.`)),i.formTarget==null||yS||(yS=!0,console.error(`Cannot specify a formTarget for a button that specifies a function as a formAction. The function will always be executed in the same window.`))):(_S=!0,console.error(`A button can only specify a formAction along with type="submit" or no type.`)):(_S=!0,console.error(`An input can only specify a formAction along with type="submit" or type="image".`)):console.error(n===`action`?`You can only pass the action prop to <form>.`:`You can only pass the formAction prop to <input> or <button>.`)),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 a==`function`&&(n===`formAction`?(t!==`input`&&vu(e,t,`name`,i.name,i,null),vu(e,t,`formEncType`,i.formEncType,i,null),vu(e,t,`formMethod`,i.formMethod,i,null),vu(e,t,`formTarget`,i.formTarget,i,null)):(vu(e,t,`encType`,i.encType,i,null),vu(e,t,`method`,i.method,i,null),vu(e,t,`target`,i.target,i,null))),r==null||typeof r==`symbol`||typeof r==`boolean`){e.removeAttribute(n);break}O(r,n),r=an(``+r),e.setAttribute(n,r);break;case`onClick`:r!=null&&(typeof r!=`function`&&mu(n,r),e.onclick=on);break;case`onScroll`:r!=null&&(typeof r!=`function`&&mu(n,r),nu(`scroll`,e));break;case`onScrollEnd`:r!=null&&(typeof r!=`function`&&mu(n,r),nu(`scrollend`,e));break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(i.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");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}O(r,n),n=an(``+r),e.setAttributeNS(TS,`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`?(O(r,n),e.setAttribute(n,``+r)):e.removeAttribute(n);break;case`inert`:r!==``||SS[n]||(SS[n]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",n));case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:r&&typeof r!=`function`&&typeof r!=`symbol`?e.setAttribute(n,``):e.removeAttribute(n);break;case`capture`:case`download`:!0===r?e.setAttribute(n,``):!1!==r&&r!=null&&typeof r!=`function`&&typeof r!=`symbol`?(O(r,n),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?(O(r,n),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):(O(r,n),e.setAttribute(n,r));break;case`popover`:nu(`beforetoggle`,e),nu(`toggle`,e),at(e,`popover`,r);break;case`xlinkActuate`:st(e,TS,`xlink:actuate`,r);break;case`xlinkArcrole`:st(e,TS,`xlink:arcrole`,r);break;case`xlinkRole`:st(e,TS,`xlink:role`,r);break;case`xlinkShow`:st(e,TS,`xlink:show`,r);break;case`xlinkTitle`:st(e,TS,`xlink:title`,r);break;case`xlinkType`:st(e,TS,`xlink:type`,r);break;case`xmlBase`:st(e,ES,`xml:base`,r);break;case`xmlLang`:st(e,ES,`xml:lang`,r);break;case`xmlSpace`:st(e,ES,`xml:space`,r);break;case`is`:a!=null&&console.error(`Cannot update the "is" prop after it has been initialized.`),at(e,`is`,r);break;case`innerText`:case`textContent`:break;case`popoverTarget`:xS||typeof r!=`object`||!r||(xS=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",r));default:!(2<n.length)||n[0]!==`o`&&n[0]!==`O`||n[1]!==`n`&&n[1]!==`N`?(n=$t(n),at(e,n,r)):Zp.hasOwnProperty(n)&&r!=null&&typeof r!=`function`&&mu(n,r)}}function yu(e,t,n,r,i,a){switch(n){case`style`:Zt(e,r,a);break;case`dangerouslySetInnerHTML`:if(r!=null){if(typeof r!=`object`||!(`__html`in r))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(n=r.__html,n!=null){if(i.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=n}}break;case`children`:typeof r==`string`?Jt(e,r):(typeof r==`number`||typeof r==`bigint`)&&Jt(e,``+r);break;case`onScroll`:r!=null&&(typeof r!=`function`&&mu(n,r),nu(`scroll`,e));break;case`onScrollEnd`:r!=null&&(typeof r!=`function`&&mu(n,r),nu(`scrollend`,e));break;case`onClick`:r!=null&&(typeof r!=`function`&&mu(n,r),e.onclick=on);break;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`innerHTML`:case`ref`:break;case`innerText`:case`textContent`:break;default:if(Zp.hasOwnProperty(n))r!=null&&typeof r!=`function`&&mu(n,r);else a:{if(n[0]===`o`&&n[1]===`n`&&(i=n.endsWith(`Capture`),t=n.slice(2,i?n.length-7:void 0),a=e[Up]||null,a=a==null?null:a[n],typeof a==`function`&&e.removeEventListener(t,a,i),typeof r==`function`)){typeof a!=`function`&&a!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break a}n in e?e[n]=r:!0===r?e.setAttribute(n,``):at(e,n,r)}}}function bu(e,t,n){switch(du(t,n),t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`img`:nu(`error`,e),nu(`load`,e);var r=!1,i=!1,a;for(a in n)if(n.hasOwnProperty(a)){var o=n[a];if(o!=null)switch(a){case`src`:r=!0;break;case`srcSet`:i=!0;break;case`children`:case`dangerouslySetInnerHTML`:throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:vu(e,t,a,o,n,null)}}i&&vu(e,t,`srcSet`,n.srcSet,n,null),r&&vu(e,t,`src`,n.src,n,null);return;case`input`:nt(`input`,n),nu(`invalid`,e);var s=a=o=i=null,c=null,l=null;for(r in n)if(n.hasOwnProperty(r)){var u=n[r];if(u!=null)switch(r){case`name`:i=u;break;case`type`:o=u;break;case`checked`:c=u;break;case`defaultChecked`:l=u;break;case`value`:a=u;break;case`defaultValue`:s=u;break;case`children`:case`dangerouslySetInnerHTML`:if(u!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:vu(e,t,r,u,n,null)}}ht(e,n),_t(e,a,s,c,l,o,i,!1);return;case`select`:for(i in nt(`select`,n),nu(`invalid`,e),r=o=a=null,n)if(n.hasOwnProperty(i)&&(s=n[i],s!=null))switch(i){case`value`:a=s;break;case`defaultValue`:o=s;break;case`multiple`:r=s;default:vu(e,t,i,s,n,null)}St(e,n),t=a,n=o,e.multiple=!!r,t==null?n!=null&&xt(e,!!r,n,!0):xt(e,!!r,t,!1);return;case`textarea`:for(o in nt(`textarea`,n),nu(`invalid`,e),a=i=r=null,n)if(n.hasOwnProperty(o)&&(s=n[o],s!=null))switch(o){case`value`:r=s;break;case`defaultValue`:i=s;break;case`children`:a=s;break;case`dangerouslySetInnerHTML`:if(s!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:vu(e,t,o,s,n,null)}j(e,n),wt(e,r,i,a);return;case`option`:for(c in yt(e,n),n)if(n.hasOwnProperty(c)&&(r=n[c],r!=null))switch(c){case`selected`:e.selected=r&&typeof r!=`function`&&typeof r!=`symbol`;break;default:vu(e,t,c,r,n,null)}return;case`dialog`:nu(`beforetoggle`,e),nu(`toggle`,e),nu(`cancel`,e),nu(`close`,e);break;case`iframe`:case`object`:nu(`load`,e);break;case`video`:case`audio`:for(r=0;r<fS.length;r++)nu(fS[r],e);break;case`image`:nu(`error`,e),nu(`load`,e);break;case`details`:nu(`toggle`,e);break;case`embed`:case`source`:case`link`:nu(`error`,e),nu(`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(l in n)if(n.hasOwnProperty(l)&&(r=n[l],r!=null))switch(l){case`children`:case`dangerouslySetInnerHTML`:throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:vu(e,t,l,r,n,null)}return;default:if(Qt(t)){for(u in n)n.hasOwnProperty(u)&&(r=n[u],r!==void 0&&yu(e,t,u,r,n,void 0));return}}for(s in n)n.hasOwnProperty(s)&&(r=n[s],r!=null&&vu(e,t,s,r,n,null))}function xu(e,t,n,r){switch(du(t,r),t){case`div`:case`span`:case`svg`:case`path`:case`a`:case`g`:case`p`:case`li`:break;case`input`:var i=null,a=null,o=null,s=null,c=null,l=null,u=null;for(p in n){var d=n[p];if(n.hasOwnProperty(p)&&d!=null)switch(p){case`checked`:break;case`value`:break;case`defaultValue`:c=d;default:r.hasOwnProperty(p)||vu(e,t,p,null,r,d)}}for(var f in r){var p=r[f];if(d=n[f],r.hasOwnProperty(f)&&(p!=null||d!=null))switch(f){case`type`:a=p;break;case`name`:i=p;break;case`checked`:l=p;break;case`defaultChecked`:u=p;break;case`value`:o=p;break;case`defaultValue`:s=p;break;case`children`:case`dangerouslySetInnerHTML`:if(p!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:p!==d&&vu(e,t,f,p,r,d)}}t=n.type===`checkbox`||n.type===`radio`?n.checked!=null:n.value!=null,r=r.type===`checkbox`||r.type===`radio`?r.checked!=null:r.value!=null,t||!r||gS||(console.error(`A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components`),gS=!0),!t||r||hS||(console.error(`A component is changing a controlled input to be uncontrolled. This is likely caused by the value changing from a defined to undefined, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component. More info: https://react.dev/link/controlled-components`),hS=!0),gt(e,o,s,c,l,u,a,i);return;case`select`:for(a in p=o=s=f=null,n)if(c=n[a],n.hasOwnProperty(a)&&c!=null)switch(a){case`value`:break;case`multiple`:p=c;default:r.hasOwnProperty(a)||vu(e,t,a,null,r,c)}for(i in r)if(a=r[i],c=n[i],r.hasOwnProperty(i)&&(a!=null||c!=null))switch(i){case`value`:f=a;break;case`defaultValue`:s=a;break;case`multiple`:o=a;default:a!==c&&vu(e,t,i,a,r,c)}r=s,t=o,n=p,f==null?!!n!=!!t&&(r==null?xt(e,!!t,t?[]:``,!1):xt(e,!!t,r,!0)):xt(e,!!t,f,!1);return;case`textarea`:for(s in p=f=null,n)if(i=n[s],n.hasOwnProperty(s)&&i!=null&&!r.hasOwnProperty(s))switch(s){case`value`:break;case`children`:break;default:vu(e,t,s,null,r,i)}for(o in r)if(i=r[o],a=n[o],r.hasOwnProperty(o)&&(i!=null||a!=null))switch(o){case`value`:f=i;break;case`defaultValue`:p=i;break;case`children`:break;case`dangerouslySetInnerHTML`:if(i!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:i!==a&&vu(e,t,o,i,r,a)}Ct(e,f,p);return;case`option`:for(var m in n)if(f=n[m],n.hasOwnProperty(m)&&f!=null&&!r.hasOwnProperty(m))switch(m){case`selected`:e.selected=!1;break;default:vu(e,t,m,null,r,f)}for(c in r)if(f=r[c],p=n[c],r.hasOwnProperty(c)&&f!==p&&(f!=null||p!=null))switch(c){case`selected`:e.selected=f&&typeof f!=`function`&&typeof f!=`symbol`;break;default:vu(e,t,c,f,r,p)}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 h in n)f=n[h],n.hasOwnProperty(h)&&f!=null&&!r.hasOwnProperty(h)&&vu(e,t,h,null,r,f);for(l in r)if(f=r[l],p=n[l],r.hasOwnProperty(l)&&f!==p&&(f!=null||p!=null))switch(l){case`children`:case`dangerouslySetInnerHTML`:if(f!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:vu(e,t,l,f,r,p)}return;default:if(Qt(t)){for(var g in n)f=n[g],n.hasOwnProperty(g)&&f!==void 0&&!r.hasOwnProperty(g)&&yu(e,t,g,void 0,r,f);for(u in r)f=r[u],p=n[u],!r.hasOwnProperty(u)||f===p||f===void 0&&p===void 0||yu(e,t,u,f,r,p);return}}for(var _ in n)f=n[_],n.hasOwnProperty(_)&&f!=null&&!r.hasOwnProperty(_)&&vu(e,t,_,null,r,f);for(d in r)f=r[d],p=n[d],!r.hasOwnProperty(d)||f===p||f==null&&p==null||vu(e,t,d,f,r,p)}function Su(e){switch(e){case`class`:return`className`;case`for`:return`htmlFor`;default:return e}}function Cu(e){var t={};e=e.style;for(var n=0;n<e.length;n++){var r=e[n];t[r]=e.getPropertyValue(r)}return t}function wu(e,t,n){if(t!=null&&typeof t!=`object`)console.error("The `style` prop expects a mapping from style properties to values, not a string. For example, style={{marginRight: spacing + 'em'}} when using JSX.");else{var r,i=r=``,a;for(a in t)if(t.hasOwnProperty(a)){var o=t[a];o!=null&&typeof o!=`boolean`&&o!==``&&(a.indexOf(`--`)===0?(Oe(o,a),r+=i+a+`:`+(``+o).trim()):typeof o!=`number`||o===0||Am.has(a)?(Oe(o,a),r+=i+a.replace(bm,`-$1`).toLowerCase().replace(xm,`-ms-`)+`:`+(``+o).trim()):r+=i+a.replace(bm,`-$1`).toLowerCase().replace(xm,`-ms-`)+`:`+o+`px`,i=`;`)}r||=null,t=e.getAttribute(`style`),t!==r&&(r=gu(r),gu(t)!==r&&(n.style=Cu(e)))}}function Tu(e,t,n,r,i,a){if(i.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:return}else if(r!=null)switch(typeof r){case`function`:case`symbol`:case`boolean`:break;default:if(O(r,t),e===``+r)return}fu(t,e,r,a)}function Eu(e,t,n,r,i,a){if(i.delete(n),e=e.getAttribute(n),e===null){switch(typeof r){case`function`:case`symbol`:return}if(!r)return}else switch(typeof r){case`function`:case`symbol`:break;default:if(r)return}fu(t,e,r,a)}function Du(e,t,n,r,i,a){if(i.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case`undefined`:case`function`:case`symbol`:return}else if(r!=null)switch(typeof r){case`function`:case`symbol`:break;default:if(O(r,n),e===``+r)return}fu(t,e,r,a)}function Ou(e,t,n,r,i,a){if(i.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:return;default:if(isNaN(r))return}else if(r!=null)switch(typeof r){case`function`:case`symbol`:case`boolean`:break;default:if(!isNaN(r)&&(O(r,t),e===``+r))return}fu(t,e,r,a)}function ku(e,t,n,r,i,a){if(i.delete(n),e=e.getAttribute(n),e===null)switch(typeof r){case`undefined`:case`function`:case`symbol`:case`boolean`:return}else if(r!=null)switch(typeof r){case`function`:case`symbol`:case`boolean`:break;default:if(O(r,t),n=an(``+r),e===n)return}fu(t,e,r,a)}function Au(e,t,n,r){for(var i={},a=new Set,o=e.attributes,s=0;s<o.length;s++)switch(o[s].name.toLowerCase()){case`value`:break;case`checked`:break;case`selected`:break;default:a.add(o[s].name)}if(Qt(t)){for(var c in n)if(n.hasOwnProperty(c)){var l=n[c];if(l!=null){if(Zp.hasOwnProperty(c))typeof l!=`function`&&mu(c,l);else if(!0!==n.suppressHydrationWarning)switch(c){case`children`:typeof l!=`string`&&typeof l!=`number`||fu(`children`,e.textContent,l,i);continue;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:continue;case`dangerouslySetInnerHTML`:o=e.innerHTML,l=l?l.__html:void 0,l!=null&&(l=hu(e,l),fu(c,o,l,i));continue;case`style`:a.delete(c),wu(e,l,i);continue;case`offsetParent`:case`offsetTop`:case`offsetLeft`:case`offsetWidth`:case`offsetHeight`:case`isContentEditable`:case`outerText`:case`outerHTML`:a.delete(c.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",c);continue;case`className`:a.delete(`class`),o=it(e,`class`,l),fu(`className`,o,l,i);continue;default:r.context===US&&t!==`svg`&&t!==`math`?a.delete(c.toLowerCase()):a.delete(c),o=it(e,c,l),fu(c,o,l,i)}}}}else for(l in n)if(n.hasOwnProperty(l)&&(c=n[l],c!=null)){if(Zp.hasOwnProperty(l))typeof c!=`function`&&mu(l,c);else if(!0!==n.suppressHydrationWarning)switch(l){case`children`:typeof c!=`string`&&typeof c!=`number`||fu(`children`,e.textContent,c,i);continue;case`suppressContentEditableWarning`:case`suppressHydrationWarning`:case`value`:case`checked`:case`selected`:case`defaultValue`:case`defaultChecked`:case`innerHTML`:case`ref`:continue;case`dangerouslySetInnerHTML`:o=e.innerHTML,c=c?c.__html:void 0,c!=null&&(c=hu(e,c),o!==c&&(i[l]={__html:o}));continue;case`className`:Tu(e,l,`class`,c,a,i);continue;case`tabIndex`:Tu(e,l,`tabindex`,c,a,i);continue;case`style`:a.delete(l),wu(e,c,i);continue;case`multiple`:a.delete(l),fu(l,e.multiple,c,i);continue;case`muted`:a.delete(l),fu(l,e.muted,c,i);continue;case`autoFocus`:a.delete(`autofocus`),fu(l,e.autofocus,c,i);continue;case`data`:if(t!==`object`){a.delete(l),o=e.getAttribute(`data`),fu(l,o,c,i);continue}case`src`:case`href`:if(!(c!==``||t===`a`&&l===`href`||t===`object`&&l===`data`)){console.error(l===`src`?`An empty string ("") was passed to the %s attribute. This may cause the browser to download the whole page again over the network. To fix this, either do not render the element at all or pass null to %s instead of an empty string.`:`An empty string ("") was passed to the %s attribute. To fix this, either do not render the element at all or pass null to %s instead of an empty string.`,l,l);continue}ku(e,l,l,c,a,i);continue;case`action`:case`formAction`:if(o=e.getAttribute(l),typeof c==`function`){a.delete(l.toLowerCase()),l===`formAction`?(a.delete(`name`),a.delete(`formenctype`),a.delete(`formmethod`),a.delete(`formtarget`)):(a.delete(`enctype`),a.delete(`method`),a.delete(`target`));continue}if(o===DS){a.delete(l.toLowerCase()),fu(l,`function`,c,i);continue}ku(e,l,l.toLowerCase(),c,a,i);continue;case`xlinkHref`:ku(e,l,`xlink:href`,c,a,i);continue;case`contentEditable`:Du(e,l,`contenteditable`,c,a,i);continue;case`spellCheck`:Du(e,l,`spellcheck`,c,a,i);continue;case`draggable`:case`autoReverse`:case`externalResourcesRequired`:case`focusable`:case`preserveAlpha`:Du(e,l,l,c,a,i);continue;case`allowFullScreen`:case`async`:case`autoPlay`:case`controls`:case`default`:case`defer`:case`disabled`:case`disablePictureInPicture`:case`disableRemotePlayback`:case`formNoValidate`:case`hidden`:case`loop`:case`noModule`:case`noValidate`:case`open`:case`playsInline`:case`readOnly`:case`required`:case`reversed`:case`scoped`:case`seamless`:case`itemScope`:Eu(e,l,l.toLowerCase(),c,a,i);continue;case`capture`:case`download`:a:{s=e;var u=o=l,d=i;if(a.delete(u),s=s.getAttribute(u),s===null)switch(typeof c){case`undefined`:case`function`:case`symbol`:break a;default:if(!1===c)break a}else if(c!=null)switch(typeof c){case`function`:case`symbol`:break;case`boolean`:if(!0===c&&s===``)break a;break;default:if(O(c,o),s===``+c)break a}fu(o,s,c,d)}continue;case`cols`:case`rows`:case`size`:case`span`:a:{if(s=e,u=o=l,d=i,a.delete(u),s=s.getAttribute(u),s===null)switch(typeof c){case`undefined`:case`function`:case`symbol`:case`boolean`:break a;default:if(isNaN(c)||1>c)break a}else if(c!=null)switch(typeof c){case`function`:case`symbol`:case`boolean`:break;default:if(!(isNaN(c)||1>c)&&(O(c,o),s===``+c))break a}fu(o,s,c,d)}continue;case`rowSpan`:Ou(e,l,`rowspan`,c,a,i);continue;case`start`:Ou(e,l,l,c,a,i);continue;case`xHeight`:Tu(e,l,`x-height`,c,a,i);continue;case`xlinkActuate`:Tu(e,l,`xlink:actuate`,c,a,i);continue;case`xlinkArcrole`:Tu(e,l,`xlink:arcrole`,c,a,i);continue;case`xlinkRole`:Tu(e,l,`xlink:role`,c,a,i);continue;case`xlinkShow`:Tu(e,l,`xlink:show`,c,a,i);continue;case`xlinkTitle`:Tu(e,l,`xlink:title`,c,a,i);continue;case`xlinkType`:Tu(e,l,`xlink:type`,c,a,i);continue;case`xmlBase`:Tu(e,l,`xml:base`,c,a,i);continue;case`xmlLang`:Tu(e,l,`xml:lang`,c,a,i);continue;case`xmlSpace`:Tu(e,l,`xml:space`,c,a,i);continue;case`inert`:c!==``||SS[l]||(SS[l]=!0,console.error("Received an empty string for a boolean attribute `%s`. This will treat the attribute as if it were false. Either pass `false` to silence this warning, or pass `true` if you used an empty string in earlier versions of React to indicate this attribute is true.",l)),Eu(e,l,l,c,a,i);continue;default:if(!(2<l.length)||l[0]!==`o`&&l[0]!==`O`||l[1]!==`n`&&l[1]!==`N`){s=$t(l),o=!1,r.context===US&&t!==`svg`&&t!==`math`?a.delete(s.toLowerCase()):(u=l.toLowerCase(),u=Pm.hasOwnProperty(u)&&Pm[u]||null,u!==null&&u!==l&&(o=!0,a.delete(u)),a.delete(s));a:if(u=e,d=s,s=c,rt(d)){if(u.hasAttribute(d))u=u.getAttribute(d),O(s,d),s=u===``+s?s:u;else{switch(typeof s){case`function`:case`symbol`:break a;case`boolean`:if(u=d.toLowerCase().slice(0,5),u!==`data-`&&u!==`aria-`)break a}s=s===void 0?void 0:null}}else s=void 0;o||fu(l,s,c,i)}}}return 0<a.size&&!0!==n.suppressHydrationWarning&&pu(e,a,i),Object.keys(i).length===0?null:i}function ju(e,t){switch(e.length){case 0:return``;case 1:return e[0];case 2:return e[0]+` `+t+` `+e[1];default:return e.slice(0,-1).join(`, `)+`, `+t+` `+e[e.length-1]}}function Mu(e){switch(e){case`css`:case`script`:case`font`:case`img`:case`image`:case`input`:case`link`:return!0;default:return!1}}function Nu(){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&&Mu(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&&Mu(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}function Pu(e){return e.nodeType===9?e:e.ownerDocument}function Fu(e){switch(e){case Mm:return WS;case jm:return GS;default:return US}}function Iu(e,t){if(e===US)switch(t){case`svg`:return WS;case`math`:return GS;default:return US}return e===WS&&t===`foreignObject`?US:e}function Lu(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}function Ru(){var e=window.event;return e&&e.type===`popstate`?e!==YS&&(YS=e,!0):(YS=null,!1)}function zu(){var e=window.event;return e&&e!==XS?e.type:null}function Bu(){var e=window.event;return e&&e!==XS?e.timeStamp:-1.1}function Vu(e){setTimeout(function(){throw e})}function Hu(e,t,n){switch(t){case`button`:case`input`:case`select`:case`textarea`:n.autoFocus&&e.focus();break;case`img`:n.src?e.src=n.src:n.srcSet&&(e.srcset=n.srcSet)}}function Uu(){}function Wu(e,t,n,r){xu(e,t,n,r),e[Up]=r}function Gu(e){Jt(e,``)}function Ku(e,t,n){e.nodeValue=n}function qu(e){if(!e.__reactWarnedAboutChildrenConflict){var t=e[Up]||null;if(t!==null){var n=Qe(e);n!==null&&(typeof t.children==`string`||typeof t.children==`number`?(e.__reactWarnedAboutChildrenConflict=!0,D(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "children" text content using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})):t.dangerouslySetInnerHTML!=null&&(e.__reactWarnedAboutChildrenConflict=!0,D(n,function(){console.error('Cannot use a ref on a React element as a container to `createRoot` or `createPortal` if that element also sets "dangerouslySetInnerHTML" using React. It should be a leaf with no children. Otherwise it\'s ambiguous which children should be used.')})))}}}function Ju(e){return e===`head`}function Yu(e,t){e.removeChild(t)}function Xu(e,t){(e.nodeType===9?e.body:e.nodeName===`HTML`?e.ownerDocument.body:e).removeChild(t)}function Zu(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===MS||n===AS){if(r===0){e.removeChild(i),_f(t);return}r--}else if(n===jS||n===NS||n===PS||n===FS||n===kS)r++;else if(n===IS)Sd(e.ownerDocument.documentElement);else if(n===RS){n=e.ownerDocument.head,Sd(n);for(var a=n.firstChild;a;){var o=a.nextSibling,s=a.nodeName;a[Yp]||s===`SCRIPT`||s===`STYLE`||s===`LINK`&&a.rel.toLowerCase()===`stylesheet`||n.removeChild(a),a=o}}else n===LS&&Sd(e.ownerDocument.body)}n=i}while(n);_f(t)}function Qu(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===MS){if(e===0)break;e--}else n!==jS&&n!==NS&&n!==PS&&n!==FS||e++}n=r}while(n)}function $u(e){Qu(e,!0)}function ed(e){e=e.style,typeof e.setProperty==`function`?e.setProperty(`display`,`none`,`important`):e.display=`none`}function td(e){e.nodeValue=``}function nd(e){Qu(e,!1)}function rd(e,t){t=t[HS],t=t!=null&&t.hasOwnProperty(`display`)?t.display:null,e.style.display=t==null||typeof t==`boolean`?``:(``+t).trim()}function id(e,t){e.nodeValue=t}function ad(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`:ad(n),Xe(n);continue;case`SCRIPT`:case`STYLE`:continue;case`LINK`:if(n.rel.toLowerCase()===`stylesheet`)continue}e.removeChild(n)}}function od(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`){O(i.name,`name`);var a=i.name==null?null:``+i.name;if(i.type===`hidden`&&e.getAttribute(`name`)===a)return e}else return e}else if(!e[Yp])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=fd(e.nextSibling),e===null)break}return null}function sd(e,t,n){if(t===``)return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!n||(e=fd(e.nextSibling),e===null))return null;return e}function cd(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!==`INPUT`||e.type!==`hidden`)&&!t||(e=fd(e.nextSibling),e===null))return null;return e}function ld(e){return e.data===NS||e.data===PS}function ud(e){return e.data===FS||e.data===NS&&e.ownerDocument.readyState!==VS}function dd(e,t){var n=e.ownerDocument;if(e.data===PS)e._reactRetry=t;else if(e.data!==NS||n.readyState!==VS)t();else{var r=function(){t(),n.removeEventListener(`DOMContentLoaded`,r)};n.addEventListener(`DOMContentLoaded`,r),e._reactRetry=r}}function fd(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===jS||t===FS||t===NS||t===PS||t===kS||t===zS||t===BS)break;if(t===MS||t===AS)return null}}return e}function pd(e){if(e.nodeType===1){for(var t=e.nodeName.toLowerCase(),n={},r=e.attributes,i=0;i<r.length;i++){var a=r[i];n[Su(a.name)]=a.name.toLowerCase()===`style`?Cu(e):a.value}return{type:t,props:n}}return e.nodeType===8?e.data===kS?{type:`Activity`,props:{}}:{type:`Suspense`,props:{}}:e.nodeValue}function md(e,t,n){return n===null||!0!==n[OS]?(e.nodeValue===t?e=null:(t=gu(t),e=gu(e.nodeValue)===t?null:e.nodeValue),e):null}function hd(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===MS||n===AS){if(t===0)return fd(e.nextSibling);t--}else n!==jS&&n!==FS&&n!==NS&&n!==PS&&n!==kS||t++}e=e.nextSibling}return null}function gd(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n===jS||n===FS||n===NS||n===PS||n===kS){if(t===0)return e;t--}else n!==MS&&n!==AS||t++}e=e.previousSibling}return null}function _d(e){_f(e)}function vd(e){_f(e)}function yd(e){_f(e)}function bd(e,t,n,r,i){switch(i&&Kt(e,r.ancestorInfo),t=Pu(n),e){case`html`:if(e=t.documentElement,!e)throw Error(`React expected an <html> element (document.documentElement) to exist in the Document but one was not found. React never removes the documentElement for any Document it renders into so the cause is likely in some other script running on this page.`);return e;case`head`:if(e=t.head,!e)throw Error(`React expected a <head> element (document.head) to exist in the Document but one was not found. React never removes the head for any Document it renders into so the cause is likely in some other script running on this page.`);return e;case`body`:if(e=t.body,!e)throw Error(`React expected a <body> element (document.body) to exist in the Document but one was not found. React never removes the body for any Document it renders into so the cause is likely in some other script running on this page.`);return e;default:throw Error(`resolveSingletonInstance was called with an element type that is not supported. This is a bug in React.`)}}function xd(e,t,n,r){if(!n[Wp]&&Qe(n)){var i=n.tagName.toLowerCase();console.error(`You are mounting a new %s component when a previous one has not first unmounted. It is an error to render more than one %s component at a time and attributes and children of these components will likely fail in unpredictable ways. Please only render a single instance of <%s> and if you need to mount a new one, ensure any previous ones have unmounted first.`,i,i,i)}switch(e){case`html`:case`head`:case`body`:break;default:console.error(`acquireSingletonInstance was called with an element type that is not supported. This is a bug in React.`)}for(i=n.attributes;i.length;)n.removeAttributeNode(i[0]);bu(n,e,t),n[Hp]=r,n[Up]=t}function Sd(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);Xe(e)}function Cd(e){return typeof e.getRootNode==`function`?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function wd(e,t,n){var r=dC;if(r&&typeof t==`string`&&t){var i=mt(t);i=`link[rel="`+e+`"][href="`+i+`"]`,typeof n==`string`&&(i+=`[crossorigin="`+n+`"]`),lC.has(i)||(lC.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement(`link`),bu(t,`link`,e),et(t),r.head.appendChild(t)))}}function Td(e,t,n,r){var i=(i=Zf.current)?Cd(i):null;if(!i)throw Error(`"resourceRoot" was expected to exist. This is a bug in React.`);switch(e){case`meta`:case`title`:return null;case`style`:return typeof n.precedence==`string`&&typeof n.href==`string`?(n=Dd(n.href),t=k(i).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=Dd(n.href);var a=k(i).hoistableStyles,o=a.get(e);if(!o&&(i=i.ownerDocument||i,o={type:`stylesheet`,instance:null,count:0,state:{loading:rC,preload:null}},a.set(e,o),(a=i.querySelector(Od(e)))&&!a._p&&(o.instance=a,o.state.loading=iC|sC),!cC.has(e))){var s={rel:`preload`,as:`style`,href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy};cC.set(e,s),a||Ad(i,e,s,o.state)}if(t&&r===null)throw n=`
|
|
181
|
+
|
|
182
|
+
- `+Ed(t)+`
|
|
183
|
+
+ `+Ed(n),Error("Expected <link> not to update to be updated to a stylesheet with precedence. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+n);return o}if(t&&r!==null)throw n=`
|
|
184
|
+
|
|
185
|
+
- `+Ed(t)+`
|
|
186
|
+
+ `+Ed(n),Error("Expected stylesheet with precedence to not be updated to a different kind of <link>. Check the `rel`, `href`, and `precedence` props of this component. Alternatively, check whether two different <link> components render in the same slot or share the same key."+n);return null;case`script`:return t=n.async,n=n.src,typeof n==`string`&&t&&typeof t!=`function`&&typeof t!=`symbol`?(n=jd(n),t=k(i).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(`getResource encountered a type it did not expect: "`+e+`". this is a bug in React.`)}}function Ed(e){var t=0,n=`<link`;return typeof e.rel==`string`?(t++,n+=` rel="`+e.rel+`"`):pp.call(e,`rel`)&&(t++,n+=` rel="`+(e.rel===null?`null`:`invalid type `+typeof e.rel)+`"`),typeof e.href==`string`?(t++,n+=` href="`+e.href+`"`):pp.call(e,`href`)&&(t++,n+=` href="`+(e.href===null?`null`:`invalid type `+typeof e.href)+`"`),typeof e.precedence==`string`?(t++,n+=` precedence="`+e.precedence+`"`):pp.call(e,`precedence`)&&(t++,n+=` precedence={`+(e.precedence===null?`null`:`invalid type `+typeof e.precedence)+`}`),Object.getOwnPropertyNames(e).length>t&&(n+=` ...`),n+` />`}function Dd(e){return`href="`+mt(e)+`"`}function Od(e){return`link[rel="stylesheet"][`+e+`]`}function kd(e){return Tf({},e,{"data-precedence":e.precedence,precedence:null})}function Ad(e,t,n,r){e.querySelector(`link[rel="preload"][as="style"][`+t+`]`)?r.loading=iC:(t=e.createElement(`link`),r.preload=t,t.addEventListener(`load`,function(){return r.loading|=iC}),t.addEventListener(`error`,function(){return r.loading|=aC}),bu(t,`link`,n),et(t),e.head.appendChild(t))}function jd(e){return`[src="`+mt(e)+`"]`}function Md(e){return`script[async]`+e}function Nd(e,t,n){if(t.count++,t.instance===null)switch(t.type){case`style`:var r=e.querySelector(`style[data-href~="`+mt(n.href)+`"]`);if(r)return t.instance=r,et(r),r;var i=Tf({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement(`style`),et(r),bu(r,`style`,i),Pd(r,n.precedence,e),t.instance=r;case`stylesheet`:i=Dd(n.href);var a=e.querySelector(Od(i));if(a)return t.state.loading|=sC,t.instance=a,et(a),a;r=kd(n),(i=cC.get(i))&&Fd(r,i),a=(e.ownerDocument||e).createElement(`link`),et(a);var o=a;return o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),bu(a,`link`,r),t.state.loading|=sC,Pd(a,n.precedence,e),t.instance=a;case`script`:return a=jd(n.src),(i=e.querySelector(Md(a)))?(t.instance=i,et(i),i):(r=n,(i=cC.get(a))&&(r=Tf({},n),Id(r,i)),e=e.ownerDocument||e,i=e.createElement(`script`),et(i),bu(i,`link`,r),e.head.appendChild(i),t.instance=i);case`void`:return null;default:throw Error(`acquireResource encountered a resource type it did not expect: "`+t.type+`". this is a bug in React.`)}else t.type===`stylesheet`&&(t.state.loading&sC)===rC&&(r=t.instance,t.state.loading|=sC,Pd(r,n.precedence,e));return t.instance}function Pd(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 Fd(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.title??=t.title}function Id(e,t){e.crossOrigin??=t.crossOrigin,e.referrerPolicy??=t.referrerPolicy,e.integrity??=t.integrity}function Ld(e,t,n){if(fC===null){var r=new Map,i=fC=new Map;i.set(n,r)}else i=fC,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[Yp]||a[Hp]||e===`link`&&a.getAttribute(`rel`)===`stylesheet`)&&a.namespaceURI!==Mm){var o=a.getAttribute(t)||``;o=e+o;var s=r.get(o);s?s.push(a):r.set(o,[a])}}return r}function Rd(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t===`title`?e.querySelector(`head > title`):null)}function zd(e,t,n){var r=!n.ancestorInfo.containerTagInScope;if(n.context===WS||t.itemProp!=null)return!r||t.itemProp==null||e!==`meta`&&e!==`title`&&e!==`style`&&e!==`link`&&e!==`script`||console.error("Cannot render a <%s> outside the main document if it has an `itemProp` prop. `itemProp` suggests the tag belongs to an `itemScope` which can appear anywhere in the DOM. If you were intending for React to hoist this <%s> remove the `itemProp` prop. Otherwise, try moving this tag into the <head> or <body> of the Document.",e,e),!1;switch(e){case`meta`:case`title`:return!0;case`style`:if(typeof t.precedence!=`string`||typeof t.href!=`string`||t.href===``){r&&console.error('Cannot render a <style> outside the main document without knowing its precedence and a unique href key. React can hoist and deduplicate <style> tags if you provide a `precedence` prop along with an `href` prop that does not conflict with the `href` values used in any other hoisted <style> or <link rel="stylesheet" ...> tags. Note that hoisting <style> tags is considered an advanced feature that most will not use directly. Consider moving the <style> tag to the <head> or consider adding a `precedence="default"` and `href="some unique resource identifier"`.');break}return!0;case`link`:if(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``||t.onLoad||t.onError){if(t.rel===`stylesheet`&&typeof t.precedence==`string`){e=t.href;var i=t.onError,a=t.disabled;n=[],t.onLoad&&n.push("`onLoad`"),i&&n.push("`onError`"),a!=null&&n.push("`disabled`"),i=ju(n,`and`),i+=n.length===1?` prop`:` props`,a=n.length===1?`an `+i:`the `+i,n.length&&console.error('React encountered a <link rel="stylesheet" href="%s" ... /> with a `precedence` prop that also included %s. The presence of loading and error handlers indicates an intent to manage the stylesheet loading state from your from your Component code and React will not hoist or deduplicate this stylesheet. If your intent was to have React hoist and deduplciate this stylesheet using the `precedence` prop remove the %s, otherwise remove the `precedence` prop.',e,a,i)}r&&(typeof t.rel!=`string`||typeof t.href!=`string`||t.href===``?console.error("Cannot render a <link> outside the main document without a `rel` and `href` prop. Try adding a `rel` and/or `href` prop to this <link> or moving the link into the <head> tag"):(t.onError||t.onLoad)&&console.error(`Cannot render a <link> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>.`));break}switch(t.rel){case`stylesheet`:return e=t.precedence,t=t.disabled,typeof e!=`string`&&r&&console.error(`Cannot render a <link rel="stylesheet" /> outside the main document without knowing its precedence. Consider adding precedence="default" or moving it into the root <head> tag.`),typeof e==`string`&&t==null;default:return!0}case`script`:if(e=t.async&&typeof t.async!=`function`&&typeof t.async!=`symbol`,!e||t.onLoad||t.onError||!t.src||typeof t.src!=`string`){r&&(e?t.onLoad||t.onError?console.error(`Cannot render a <script> with onLoad or onError listeners outside the main document. Try removing onLoad={...} and onError={...} or moving it into the root <head> tag or somewhere in the <body>.`):console.error("Cannot render a <script> outside the main document without `async={true}` and a non-empty `src` prop. Ensure there is a valid `src` and either make the script async or move it into the root <head> tag or somewhere in the <body>."):console.error(`Cannot render a sync or defer <script> outside the main document without knowing its order. Try adding async="" or moving it into the root <head> tag.`));break}return!0;case`noscript`:case`template`:r&&console.error(`Cannot render <%s> outside the main document. Try moving it into the root <head> tag.`,e)}return!1}function Bd(e){return e.type!==`stylesheet`||(e.state.loading&oC)!==rC}function Vd(e,t,n,r){if(n.type===`stylesheet`&&(typeof r.media!=`string`||!1!==matchMedia(r.media).matches)&&(n.state.loading&sC)===rC){if(n.instance===null){var i=Dd(r.href),a=t.querySelector(Od(i));if(a){t=a._p,typeof t==`object`&&t&&typeof t.then==`function`&&(e.count++,e=Ud.bind(e),t.then(e,e)),n.state.loading|=sC,n.instance=a,et(a);return}a=t.ownerDocument||t,r=kd(r),(i=cC.get(i))&&Fd(r,i),a=a.createElement(`link`),et(a);var o=a;o._p=new Promise(function(e,t){o.onload=e,o.onerror=t}),bu(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&oC)===rC&&(e.count++,n=Ud.bind(e),t.addEventListener(`load`,n),t.addEventListener(`error`,n))}}function Hd(e,t){return e.stylesheets&&e.count===0&&Wd(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&Wd(e,e.stylesheets),e.unsuspend){var t=e.unsuspend;e.unsuspend=null,t()}},pC+t);0<e.imgBytes&&gC===0&&(gC=125*Nu()*hC);var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Wd(e,e.stylesheets),e.unsuspend)){var t=e.unsuspend;e.unsuspend=null,t()}},(e.imgBytes>gC?50:mC)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Ud(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Wd(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Wd(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,vC=new Map,t.forEach(Gd,e),vC=null,Ud.call(e))}function Gd(e,t){if(!(t.state.loading&sC)){var n=vC.get(e);if(n)var r=n.get(_C);else{n=new Map,vC.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(_C,r)}i=t.instance,o=i.getAttribute(`data-precedence`),a=n.get(o)||r,a===r&&n.set(_C,i),n.set(o,i),this.count++,r=Ud.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|=sC}}function Kd(e,t,n,r,i,a,o,s,c){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=$S,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Re(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Re(0),this.hiddenUpdates=Re(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=a,this.onRecoverableError=o,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map,this.passiveEffectDuration=this.effectDuration=-0,this.memoizedUpdaters=new Set,e=this.pendingUpdatersLaneMap=[],t=0;31>t;t++)e.push(new Set);this._debugRootType=n?`hydrateRoot()`:`createRoot()`}function qd(e,t,n,r,i,a,o,s,c,l,u,d){return e=new Kd(e,t,n,o,c,l,u,d,s),t=Fg,!0===a&&(t|=Ig|Lg),t|=q,a=g(3,null,null,t),e.current=a,a.stateNode=e,t=ii(),ai(t),e.pooledCache=t,ai(t),a.memoizedState={element:r,isDehydrated:n,cache:t},Xi(a),e}function Jd(e){return e?(e=Mg,e):Mg}function Yd(e,t,n,r,i,a){if(Op&&typeof Op.onScheduleFiberRoot==`function`)try{Op.onScheduleFiberRoot(Dp,r,n)}catch(e){kp||(kp=!0,console.error(`React instrumentation encountered an error: %o`,e))}i=Jd(i),r.context===null?r.context=i:r.pendingContext=i,fp&&dp!==null&&!EC&&(EC=!0,console.error(`Render methods should be a pure function of props and state; triggering nested component updates from render is not allowed. If necessary, trigger nested updates in componentDidUpdate.
|
|
187
|
+
|
|
188
|
+
Check the render method of %s.`,w(dp)||`Unknown`)),r=Qi(t),r.payload={element:n},a=a===void 0?null:a,a!==null&&(typeof a!=`function`&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",a),r.callback=a),n=$i(e,r,t),n!==null&&(si(t,`root.render()`,null),Qc(n,e,t),ea(n,e,t))}function Xd(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function Zd(e,t){Xd(e,t),(e=e.alternate)&&Xd(e,t)}function Qd(e){if(e.tag===13||e.tag===31){var t=ur(e,67108864);t!==null&&Qc(t,e,67108864),Zd(e,67108864)}}function $d(e){if(e.tag===13||e.tag===31){var t=Xc(e);t=We(t);var n=ur(e,t);n!==null&&Qc(n,e,t),Zd(e,t)}}function ef(){return dp}function tf(e,t,n,r){var i=G.T;G.T=null;var a=Wf.p;try{Wf.p=Lp,rf(e,t,n,r)}finally{Wf.p=a,G.T=i}}function nf(e,t,n,r){var i=G.T;G.T=null;var a=Wf.p;try{Wf.p=Rp,rf(e,t,n,r)}finally{Wf.p=a,G.T=i}}function rf(e,t,n,r){if(LC){var i=af(r);if(i===null)ou(e,t,r,RC,n),cf(e,r);else if(uf(i,e,t,n,r))r.stopPropagation();else if(cf(e,r),t&4&&-1<KC.indexOf(e)){for(;i!==null;){var a=Qe(i);if(a!==null)switch(a.tag){case 3:if(a=a.stateNode,a.current.memoizedState.isDehydrated){var o=Ne(a.pendingLanes);if(o!==0){var s=a;for(s.pendingLanes|=2,s.entangledLanes|=2;o;){var c=1<<31-jp(o);s.entanglements[1]|=c,o&=~c}Hl(a),(Hb&(Nb|Pb))===Mb&&(yx=vp()+bx,Ul(0,!1))}}break;case 31:case 13:s=ur(a,2),s!==null&&Qc(s,a,2),nl(),Zd(a,2)}if(a=af(r),a===null&&ou(e,t,r,RC,n),a===i)break;i=a}i!==null&&r.stopPropagation()}else ou(e,t,r,null,n)}}function af(e){return e=sn(e),of(e)}function of(e){if(RC=null,e=Ze(e),e!==null){var t=x(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=ee(t),e!==null)return e;e=null}else if(n===31){if(e=te(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 RC=e,null}function sf(e){switch(e){case`beforetoggle`:case`cancel`:case`click`:case`close`:case`contextmenu`:case`copy`:case`cut`:case`auxclick`:case`dblclick`:case`dragend`:case`dragstart`:case`drop`:case`focusin`:case`focusout`:case`input`:case`invalid`:case`keydown`:case`keypress`:case`keyup`:case`mousedown`:case`mouseup`:case`paste`:case`pause`:case`play`:case`pointercancel`:case`pointerdown`:case`pointerup`:case`ratechange`:case`reset`:case`resize`:case`seeked`:case`submit`:case`toggle`:case`touchcancel`:case`touchend`:case`touchstart`:case`volumechange`:case`change`:case`selectionchange`:case`textInput`:case`compositionstart`:case`compositionend`:case`compositionupdate`:case`beforeblur`:case`afterblur`:case`beforeinput`:case`blur`:case`fullscreenchange`:case`focus`:case`hashchange`:case`popstate`:case`select`:case`selectstart`:return Lp;case`drag`:case`dragenter`:case`dragexit`:case`dragleave`:case`dragover`:case`mousemove`:case`mouseout`:case`mouseover`:case`pointermove`:case`pointerout`:case`pointerover`:case`scroll`:case`touchmove`:case`wheel`:case`mouseenter`:case`mouseleave`:case`pointerenter`:case`pointerleave`:return Rp;case`message`:switch(yp()){case bp:return Lp;case xp:return Rp;case Sp:case Cp:return zp;case wp:return Bp;default:return zp}default:return zp}}function cf(e,t){switch(e){case`focusin`:case`focusout`:BC=null;break;case`dragenter`:case`dragleave`:VC=null;break;case`mouseover`:case`mouseout`:HC=null;break;case`pointerover`:case`pointerout`:UC.delete(t.pointerId);break;case`gotpointercapture`:case`lostpointercapture`:WC.delete(t.pointerId)}}function lf(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=Qe(t),t!==null&&Qd(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function uf(e,t,n,r,i){switch(t){case`focusin`:return BC=lf(BC,e,t,n,r,i),!0;case`dragenter`:return VC=lf(VC,e,t,n,r,i),!0;case`mouseover`:return HC=lf(HC,e,t,n,r,i),!0;case`pointerover`:var a=i.pointerId;return UC.set(a,lf(UC.get(a)||null,e,t,n,r,i)),!0;case`gotpointercapture`:return a=i.pointerId,WC.set(a,lf(WC.get(a)||null,e,t,n,r,i)),!0}return!1}function df(e){var t=Ze(e.target);if(t!==null){var n=x(t);if(n!==null){if(t=n.tag,t===13){if(t=ee(n),t!==null){e.blockedOn=t,Ye(e.priority,function(){$d(n)});return}}else if(t===31){if(t=te(n),t!==null){e.blockedOn=t,Ye(e.priority,function(){$d(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 ff(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=af(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n),i=r;Km!==null&&console.error(`Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue.`),Km=i,n.target.dispatchEvent(r),Km===null&&console.error(`Expected currently replaying event to not be null. This error is likely caused by a bug in React. Please file an issue.`),Km=null}else return t=Qe(n),t!==null&&Qd(t),e.blockedOn=n,!1;t.shift()}return!0}function pf(e,t,n){ff(e)&&n.delete(t)}function mf(){zC=!1,BC!==null&&ff(BC)&&(BC=null),VC!==null&&ff(VC)&&(VC=null),HC!==null&&ff(HC)&&(HC=null),UC.forEach(pf),WC.forEach(pf)}function hf(e,t){e.blockedOn===t&&(e.blockedOn=null,zC||(zC=!0,Sf.unstable_scheduleCallback(Sf.unstable_NormalPriority,mf)))}function gf(e){qC!==e&&(qC=e,Sf.unstable_scheduleCallback(Sf.unstable_NormalPriority,function(){qC===e&&(qC=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(of(r||n)===null)continue;break}var a=Qe(n);a!==null&&(e.splice(t,3),t-=3,n={pending:!0,data:i,method:n.method,action:r},Object.freeze(n),Mo(a,n,r,i))}}))}function _f(e){function t(t){return hf(t,e)}BC!==null&&hf(BC,e),VC!==null&&hf(VC,e),HC!==null&&hf(HC,e),UC.forEach(t),WC.forEach(t);for(var n=0;n<GC.length;n++){var r=GC[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<GC.length&&(n=GC[0],n.blockedOn===null);)df(n),n.blockedOn===null&&GC.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[Up]||null;if(typeof a==`function`)o||gf(n);else if(o){var s=null;if(a&&a.hasAttribute(`formAction`)){if(i=a,o=a[Up]||null)s=o.formAction;else if(of(i)!==null)continue}else s=o.action;typeof s==`function`?n[r+1]=s:(n.splice(r,3),r-=3),gf(n)}}}function vf(){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 yf(e){this._internalRoot=e}function bf(e){this._internalRoot=e}function xf(e){e[Wp]&&(e._reactRootContainer?console.error(`You are calling ReactDOMClient.createRoot() on a container that was previously passed to ReactDOM.render(). This is not supported.`):console.error(`You are calling ReactDOMClient.createRoot() on a container that has already been passed to createRoot() before. Instead, call root.render() on the existing root instead if you want to update it.`))}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var Sf=p(),Cf=d(),wf=h(),Tf=Object.assign,Ef=Symbol.for(`react.element`),Df=Symbol.for(`react.transitional.element`),Of=Symbol.for(`react.portal`),kf=Symbol.for(`react.fragment`),Af=Symbol.for(`react.strict_mode`),jf=Symbol.for(`react.profiler`),Mf=Symbol.for(`react.consumer`),Nf=Symbol.for(`react.context`),Pf=Symbol.for(`react.forward_ref`),Ff=Symbol.for(`react.suspense`),If=Symbol.for(`react.suspense_list`),Lf=Symbol.for(`react.memo`),Rf=Symbol.for(`react.lazy`),zf=Symbol.for(`react.activity`),Bf=Symbol.for(`react.memo_cache_sentinel`),Vf=Symbol.iterator,Hf=Symbol.for(`react.client.reference`),Uf=Array.isArray,G=Cf.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Wf=wf.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Gf=Object.freeze({pending:!1,data:null,method:null,action:null}),Kf=[],qf=[],Jf=-1,Yf=T(null),Xf=T(null),Zf=T(null),Qf=T(null),$f=0,ep,tp,np,rp,ip,ap,op;pe.__reactDisabledLog=!0;var sp,cp,lp=!1,up=new(typeof WeakMap==`function`?WeakMap:Map),dp=null,fp=!1,pp=Object.prototype.hasOwnProperty,mp=Sf.unstable_scheduleCallback,hp=Sf.unstable_cancelCallback,gp=Sf.unstable_shouldYield,_p=Sf.unstable_requestPaint,vp=Sf.unstable_now,yp=Sf.unstable_getCurrentPriorityLevel,bp=Sf.unstable_ImmediatePriority,xp=Sf.unstable_UserBlockingPriority,Sp=Sf.unstable_NormalPriority,Cp=Sf.unstable_LowPriority,wp=Sf.unstable_IdlePriority,Tp=Sf.log,Ep=Sf.unstable_setDisableYieldValue,Dp=null,Op=null,kp=!1,Ap=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`,jp=Math.clz32?Math.clz32:Me,Mp=Math.log,Np=Math.LN2,Pp=256,Fp=262144,Ip=4194304,Lp=2,Rp=8,zp=32,Bp=268435456,Vp=Math.random().toString(36).slice(2),Hp=`__reactFiber$`+Vp,Up=`__reactProps$`+Vp,Wp=`__reactContainer$`+Vp,Gp=`__reactEvents$`+Vp,Kp=`__reactListeners$`+Vp,qp=`__reactHandles$`+Vp,Jp=`__reactResources$`+Vp,Yp=`__reactMarker$`+Vp,Xp=new Set,Zp={},Qp={},$p={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},em=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]*$`),tm={},nm={},rm=/[\n"\\]/g,im=!1,am=!1,om=!1,sm=!1,cm=!1,lm=!1,um=[`value`,`defaultValue`],dm=!1,fm=/["'&<>\n\t]|^\s|\s$/,pm=`address applet area article aside base basefont bgsound blockquote body br button caption center col colgroup dd details dir div dl dt embed fieldset figcaption figure footer form frame frameset h1 h2 h3 h4 h5 h6 head header hgroup hr html iframe img input isindex li link listing main marquee menu menuitem meta nav noembed noframes noscript object ol p param plaintext pre script section select source style summary table tbody td template textarea tfoot th thead title tr track ul wbr xmp`.split(` `),mm=`applet caption html table td th marquee object template foreignObject desc title`.split(` `),hm=mm.concat([`button`]),gm=`dd dt li option optgroup p rp rt`.split(` `),_m={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},vm={},ym={animation:`animationDelay animationDirection animationDuration animationFillMode animationIterationCount animationName animationPlayState animationTimingFunction`.split(` `),background:`backgroundAttachment backgroundClip backgroundColor backgroundImage backgroundOrigin backgroundPositionX backgroundPositionY backgroundRepeat backgroundSize`.split(` `),backgroundPosition:[`backgroundPositionX`,`backgroundPositionY`],border:`borderBottomColor borderBottomStyle borderBottomWidth borderImageOutset borderImageRepeat borderImageSlice borderImageSource borderImageWidth borderLeftColor borderLeftStyle borderLeftWidth borderRightColor borderRightStyle borderRightWidth borderTopColor borderTopStyle borderTopWidth`.split(` `),borderBlockEnd:[`borderBlockEndColor`,`borderBlockEndStyle`,`borderBlockEndWidth`],borderBlockStart:[`borderBlockStartColor`,`borderBlockStartStyle`,`borderBlockStartWidth`],borderBottom:[`borderBottomColor`,`borderBottomStyle`,`borderBottomWidth`],borderColor:[`borderBottomColor`,`borderLeftColor`,`borderRightColor`,`borderTopColor`],borderImage:[`borderImageOutset`,`borderImageRepeat`,`borderImageSlice`,`borderImageSource`,`borderImageWidth`],borderInlineEnd:[`borderInlineEndColor`,`borderInlineEndStyle`,`borderInlineEndWidth`],borderInlineStart:[`borderInlineStartColor`,`borderInlineStartStyle`,`borderInlineStartWidth`],borderLeft:[`borderLeftColor`,`borderLeftStyle`,`borderLeftWidth`],borderRadius:[`borderBottomLeftRadius`,`borderBottomRightRadius`,`borderTopLeftRadius`,`borderTopRightRadius`],borderRight:[`borderRightColor`,`borderRightStyle`,`borderRightWidth`],borderStyle:[`borderBottomStyle`,`borderLeftStyle`,`borderRightStyle`,`borderTopStyle`],borderTop:[`borderTopColor`,`borderTopStyle`,`borderTopWidth`],borderWidth:[`borderBottomWidth`,`borderLeftWidth`,`borderRightWidth`,`borderTopWidth`],columnRule:[`columnRuleColor`,`columnRuleStyle`,`columnRuleWidth`],columns:[`columnCount`,`columnWidth`],flex:[`flexBasis`,`flexGrow`,`flexShrink`],flexFlow:[`flexDirection`,`flexWrap`],font:`fontFamily fontFeatureSettings fontKerning fontLanguageOverride fontSize fontSizeAdjust fontStretch fontStyle fontVariant fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition fontWeight lineHeight`.split(` `),fontVariant:`fontVariantAlternates fontVariantCaps fontVariantEastAsian fontVariantLigatures fontVariantNumeric fontVariantPosition`.split(` `),gap:[`columnGap`,`rowGap`],grid:`gridAutoColumns gridAutoFlow gridAutoRows gridTemplateAreas gridTemplateColumns gridTemplateRows`.split(` `),gridArea:[`gridColumnEnd`,`gridColumnStart`,`gridRowEnd`,`gridRowStart`],gridColumn:[`gridColumnEnd`,`gridColumnStart`],gridColumnGap:[`columnGap`],gridGap:[`columnGap`,`rowGap`],gridRow:[`gridRowEnd`,`gridRowStart`],gridRowGap:[`rowGap`],gridTemplate:[`gridTemplateAreas`,`gridTemplateColumns`,`gridTemplateRows`],listStyle:[`listStyleImage`,`listStylePosition`,`listStyleType`],margin:[`marginBottom`,`marginLeft`,`marginRight`,`marginTop`],marker:[`markerEnd`,`markerMid`,`markerStart`],mask:`maskClip maskComposite maskImage maskMode maskOrigin maskPositionX maskPositionY maskRepeat maskSize`.split(` `),maskPosition:[`maskPositionX`,`maskPositionY`],outline:[`outlineColor`,`outlineStyle`,`outlineWidth`],overflow:[`overflowX`,`overflowY`],padding:[`paddingBottom`,`paddingLeft`,`paddingRight`,`paddingTop`],placeContent:[`alignContent`,`justifyContent`],placeItems:[`alignItems`,`justifyItems`],placeSelf:[`alignSelf`,`justifySelf`],textDecoration:[`textDecorationColor`,`textDecorationLine`,`textDecorationStyle`],textEmphasis:[`textEmphasisColor`,`textEmphasisStyle`],transition:[`transitionDelay`,`transitionDuration`,`transitionProperty`,`transitionTimingFunction`],wordWrap:[`overflowWrap`]},bm=/([A-Z])/g,xm=/^ms-/,Sm=/^(?:webkit|moz|o)[A-Z]/,Cm=/^-ms-/,wm=/-(.)/g,Tm=/;\s*$/,Em={},Dm={},Om=!1,km=!1,Am=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(` `)),jm=`http://www.w3.org/1998/Math/MathML`,Mm=`http://www.w3.org/2000/svg`,Nm=new Map([[`acceptCharset`,`accept-charset`],[`htmlFor`,`for`],[`httpEquiv`,`http-equiv`],[`crossOrigin`,`crossorigin`],[`accentHeight`,`accent-height`],[`alignmentBaseline`,`alignment-baseline`],[`arabicForm`,`arabic-form`],[`baselineShift`,`baseline-shift`],[`capHeight`,`cap-height`],[`clipPath`,`clip-path`],[`clipRule`,`clip-rule`],[`colorInterpolation`,`color-interpolation`],[`colorInterpolationFilters`,`color-interpolation-filters`],[`colorProfile`,`color-profile`],[`colorRendering`,`color-rendering`],[`dominantBaseline`,`dominant-baseline`],[`enableBackground`,`enable-background`],[`fillOpacity`,`fill-opacity`],[`fillRule`,`fill-rule`],[`floodColor`,`flood-color`],[`floodOpacity`,`flood-opacity`],[`fontFamily`,`font-family`],[`fontSize`,`font-size`],[`fontSizeAdjust`,`font-size-adjust`],[`fontStretch`,`font-stretch`],[`fontStyle`,`font-style`],[`fontVariant`,`font-variant`],[`fontWeight`,`font-weight`],[`glyphName`,`glyph-name`],[`glyphOrientationHorizontal`,`glyph-orientation-horizontal`],[`glyphOrientationVertical`,`glyph-orientation-vertical`],[`horizAdvX`,`horiz-adv-x`],[`horizOriginX`,`horiz-origin-x`],[`imageRendering`,`image-rendering`],[`letterSpacing`,`letter-spacing`],[`lightingColor`,`lighting-color`],[`markerEnd`,`marker-end`],[`markerMid`,`marker-mid`],[`markerStart`,`marker-start`],[`overlinePosition`,`overline-position`],[`overlineThickness`,`overline-thickness`],[`paintOrder`,`paint-order`],[`panose-1`,`panose-1`],[`pointerEvents`,`pointer-events`],[`renderingIntent`,`rendering-intent`],[`shapeRendering`,`shape-rendering`],[`stopColor`,`stop-color`],[`stopOpacity`,`stop-opacity`],[`strikethroughPosition`,`strikethrough-position`],[`strikethroughThickness`,`strikethrough-thickness`],[`strokeDasharray`,`stroke-dasharray`],[`strokeDashoffset`,`stroke-dashoffset`],[`strokeLinecap`,`stroke-linecap`],[`strokeLinejoin`,`stroke-linejoin`],[`strokeMiterlimit`,`stroke-miterlimit`],[`strokeOpacity`,`stroke-opacity`],[`strokeWidth`,`stroke-width`],[`textAnchor`,`text-anchor`],[`textDecoration`,`text-decoration`],[`textRendering`,`text-rendering`],[`transformOrigin`,`transform-origin`],[`underlinePosition`,`underline-position`],[`underlineThickness`,`underline-thickness`],[`unicodeBidi`,`unicode-bidi`],[`unicodeRange`,`unicode-range`],[`unitsPerEm`,`units-per-em`],[`vAlphabetic`,`v-alphabetic`],[`vHanging`,`v-hanging`],[`vIdeographic`,`v-ideographic`],[`vMathematical`,`v-mathematical`],[`vectorEffect`,`vector-effect`],[`vertAdvY`,`vert-adv-y`],[`vertOriginX`,`vert-origin-x`],[`vertOriginY`,`vert-origin-y`],[`wordSpacing`,`word-spacing`],[`writingMode`,`writing-mode`],[`xmlnsXlink`,`xmlns:xlink`],[`xHeight`,`x-height`]]),Pm={accept:`accept`,acceptcharset:`acceptCharset`,"accept-charset":`acceptCharset`,accesskey:`accessKey`,action:`action`,allowfullscreen:`allowFullScreen`,alt:`alt`,as:`as`,async:`async`,autocapitalize:`autoCapitalize`,autocomplete:`autoComplete`,autocorrect:`autoCorrect`,autofocus:`autoFocus`,autoplay:`autoPlay`,autosave:`autoSave`,capture:`capture`,cellpadding:`cellPadding`,cellspacing:`cellSpacing`,challenge:`challenge`,charset:`charSet`,checked:`checked`,children:`children`,cite:`cite`,class:`className`,classid:`classID`,classname:`className`,cols:`cols`,colspan:`colSpan`,content:`content`,contenteditable:`contentEditable`,contextmenu:`contextMenu`,controls:`controls`,controlslist:`controlsList`,coords:`coords`,crossorigin:`crossOrigin`,dangerouslysetinnerhtml:`dangerouslySetInnerHTML`,data:`data`,datetime:`dateTime`,default:`default`,defaultchecked:`defaultChecked`,defaultvalue:`defaultValue`,defer:`defer`,dir:`dir`,disabled:`disabled`,disablepictureinpicture:`disablePictureInPicture`,disableremoteplayback:`disableRemotePlayback`,download:`download`,draggable:`draggable`,enctype:`encType`,enterkeyhint:`enterKeyHint`,fetchpriority:`fetchPriority`,for:`htmlFor`,form:`form`,formmethod:`formMethod`,formaction:`formAction`,formenctype:`formEncType`,formnovalidate:`formNoValidate`,formtarget:`formTarget`,frameborder:`frameBorder`,headers:`headers`,height:`height`,hidden:`hidden`,high:`high`,href:`href`,hreflang:`hrefLang`,htmlfor:`htmlFor`,httpequiv:`httpEquiv`,"http-equiv":`httpEquiv`,icon:`icon`,id:`id`,imagesizes:`imageSizes`,imagesrcset:`imageSrcSet`,inert:`inert`,innerhtml:`innerHTML`,inputmode:`inputMode`,integrity:`integrity`,is:`is`,itemid:`itemID`,itemprop:`itemProp`,itemref:`itemRef`,itemscope:`itemScope`,itemtype:`itemType`,keyparams:`keyParams`,keytype:`keyType`,kind:`kind`,label:`label`,lang:`lang`,list:`list`,loop:`loop`,low:`low`,manifest:`manifest`,marginwidth:`marginWidth`,marginheight:`marginHeight`,max:`max`,maxlength:`maxLength`,media:`media`,mediagroup:`mediaGroup`,method:`method`,min:`min`,minlength:`minLength`,multiple:`multiple`,muted:`muted`,name:`name`,nomodule:`noModule`,nonce:`nonce`,novalidate:`noValidate`,open:`open`,optimum:`optimum`,pattern:`pattern`,placeholder:`placeholder`,playsinline:`playsInline`,poster:`poster`,preload:`preload`,profile:`profile`,radiogroup:`radioGroup`,readonly:`readOnly`,referrerpolicy:`referrerPolicy`,rel:`rel`,required:`required`,reversed:`reversed`,role:`role`,rows:`rows`,rowspan:`rowSpan`,sandbox:`sandbox`,scope:`scope`,scoped:`scoped`,scrolling:`scrolling`,seamless:`seamless`,selected:`selected`,shape:`shape`,size:`size`,sizes:`sizes`,span:`span`,spellcheck:`spellCheck`,src:`src`,srcdoc:`srcDoc`,srclang:`srcLang`,srcset:`srcSet`,start:`start`,step:`step`,style:`style`,summary:`summary`,tabindex:`tabIndex`,target:`target`,title:`title`,type:`type`,usemap:`useMap`,value:`value`,width:`width`,wmode:`wmode`,wrap:`wrap`,about:`about`,accentheight:`accentHeight`,"accent-height":`accentHeight`,accumulate:`accumulate`,additive:`additive`,alignmentbaseline:`alignmentBaseline`,"alignment-baseline":`alignmentBaseline`,allowreorder:`allowReorder`,alphabetic:`alphabetic`,amplitude:`amplitude`,arabicform:`arabicForm`,"arabic-form":`arabicForm`,ascent:`ascent`,attributename:`attributeName`,attributetype:`attributeType`,autoreverse:`autoReverse`,azimuth:`azimuth`,basefrequency:`baseFrequency`,baselineshift:`baselineShift`,"baseline-shift":`baselineShift`,baseprofile:`baseProfile`,bbox:`bbox`,begin:`begin`,bias:`bias`,by:`by`,calcmode:`calcMode`,capheight:`capHeight`,"cap-height":`capHeight`,clip:`clip`,clippath:`clipPath`,"clip-path":`clipPath`,clippathunits:`clipPathUnits`,cliprule:`clipRule`,"clip-rule":`clipRule`,color:`color`,colorinterpolation:`colorInterpolation`,"color-interpolation":`colorInterpolation`,colorinterpolationfilters:`colorInterpolationFilters`,"color-interpolation-filters":`colorInterpolationFilters`,colorprofile:`colorProfile`,"color-profile":`colorProfile`,colorrendering:`colorRendering`,"color-rendering":`colorRendering`,contentscripttype:`contentScriptType`,contentstyletype:`contentStyleType`,cursor:`cursor`,cx:`cx`,cy:`cy`,d:`d`,datatype:`datatype`,decelerate:`decelerate`,descent:`descent`,diffuseconstant:`diffuseConstant`,direction:`direction`,display:`display`,divisor:`divisor`,dominantbaseline:`dominantBaseline`,"dominant-baseline":`dominantBaseline`,dur:`dur`,dx:`dx`,dy:`dy`,edgemode:`edgeMode`,elevation:`elevation`,enablebackground:`enableBackground`,"enable-background":`enableBackground`,end:`end`,exponent:`exponent`,externalresourcesrequired:`externalResourcesRequired`,fill:`fill`,fillopacity:`fillOpacity`,"fill-opacity":`fillOpacity`,fillrule:`fillRule`,"fill-rule":`fillRule`,filter:`filter`,filterres:`filterRes`,filterunits:`filterUnits`,floodopacity:`floodOpacity`,"flood-opacity":`floodOpacity`,floodcolor:`floodColor`,"flood-color":`floodColor`,focusable:`focusable`,fontfamily:`fontFamily`,"font-family":`fontFamily`,fontsize:`fontSize`,"font-size":`fontSize`,fontsizeadjust:`fontSizeAdjust`,"font-size-adjust":`fontSizeAdjust`,fontstretch:`fontStretch`,"font-stretch":`fontStretch`,fontstyle:`fontStyle`,"font-style":`fontStyle`,fontvariant:`fontVariant`,"font-variant":`fontVariant`,fontweight:`fontWeight`,"font-weight":`fontWeight`,format:`format`,from:`from`,fx:`fx`,fy:`fy`,g1:`g1`,g2:`g2`,glyphname:`glyphName`,"glyph-name":`glyphName`,glyphorientationhorizontal:`glyphOrientationHorizontal`,"glyph-orientation-horizontal":`glyphOrientationHorizontal`,glyphorientationvertical:`glyphOrientationVertical`,"glyph-orientation-vertical":`glyphOrientationVertical`,glyphref:`glyphRef`,gradienttransform:`gradientTransform`,gradientunits:`gradientUnits`,hanging:`hanging`,horizadvx:`horizAdvX`,"horiz-adv-x":`horizAdvX`,horizoriginx:`horizOriginX`,"horiz-origin-x":`horizOriginX`,ideographic:`ideographic`,imagerendering:`imageRendering`,"image-rendering":`imageRendering`,in2:`in2`,in:`in`,inlist:`inlist`,intercept:`intercept`,k1:`k1`,k2:`k2`,k3:`k3`,k4:`k4`,k:`k`,kernelmatrix:`kernelMatrix`,kernelunitlength:`kernelUnitLength`,kerning:`kerning`,keypoints:`keyPoints`,keysplines:`keySplines`,keytimes:`keyTimes`,lengthadjust:`lengthAdjust`,letterspacing:`letterSpacing`,"letter-spacing":`letterSpacing`,lightingcolor:`lightingColor`,"lighting-color":`lightingColor`,limitingconeangle:`limitingConeAngle`,local:`local`,markerend:`markerEnd`,"marker-end":`markerEnd`,markerheight:`markerHeight`,markermid:`markerMid`,"marker-mid":`markerMid`,markerstart:`markerStart`,"marker-start":`markerStart`,markerunits:`markerUnits`,markerwidth:`markerWidth`,mask:`mask`,maskcontentunits:`maskContentUnits`,maskunits:`maskUnits`,mathematical:`mathematical`,mode:`mode`,numoctaves:`numOctaves`,offset:`offset`,opacity:`opacity`,operator:`operator`,order:`order`,orient:`orient`,orientation:`orientation`,origin:`origin`,overflow:`overflow`,overlineposition:`overlinePosition`,"overline-position":`overlinePosition`,overlinethickness:`overlineThickness`,"overline-thickness":`overlineThickness`,paintorder:`paintOrder`,"paint-order":`paintOrder`,panose1:`panose1`,"panose-1":`panose1`,pathlength:`pathLength`,patterncontentunits:`patternContentUnits`,patterntransform:`patternTransform`,patternunits:`patternUnits`,pointerevents:`pointerEvents`,"pointer-events":`pointerEvents`,points:`points`,pointsatx:`pointsAtX`,pointsaty:`pointsAtY`,pointsatz:`pointsAtZ`,popover:`popover`,popovertarget:`popoverTarget`,popovertargetaction:`popoverTargetAction`,prefix:`prefix`,preservealpha:`preserveAlpha`,preserveaspectratio:`preserveAspectRatio`,primitiveunits:`primitiveUnits`,property:`property`,r:`r`,radius:`radius`,refx:`refX`,refy:`refY`,renderingintent:`renderingIntent`,"rendering-intent":`renderingIntent`,repeatcount:`repeatCount`,repeatdur:`repeatDur`,requiredextensions:`requiredExtensions`,requiredfeatures:`requiredFeatures`,resource:`resource`,restart:`restart`,result:`result`,results:`results`,rotate:`rotate`,rx:`rx`,ry:`ry`,scale:`scale`,security:`security`,seed:`seed`,shaperendering:`shapeRendering`,"shape-rendering":`shapeRendering`,slope:`slope`,spacing:`spacing`,specularconstant:`specularConstant`,specularexponent:`specularExponent`,speed:`speed`,spreadmethod:`spreadMethod`,startoffset:`startOffset`,stddeviation:`stdDeviation`,stemh:`stemh`,stemv:`stemv`,stitchtiles:`stitchTiles`,stopcolor:`stopColor`,"stop-color":`stopColor`,stopopacity:`stopOpacity`,"stop-opacity":`stopOpacity`,strikethroughposition:`strikethroughPosition`,"strikethrough-position":`strikethroughPosition`,strikethroughthickness:`strikethroughThickness`,"strikethrough-thickness":`strikethroughThickness`,string:`string`,stroke:`stroke`,strokedasharray:`strokeDasharray`,"stroke-dasharray":`strokeDasharray`,strokedashoffset:`strokeDashoffset`,"stroke-dashoffset":`strokeDashoffset`,strokelinecap:`strokeLinecap`,"stroke-linecap":`strokeLinecap`,strokelinejoin:`strokeLinejoin`,"stroke-linejoin":`strokeLinejoin`,strokemiterlimit:`strokeMiterlimit`,"stroke-miterlimit":`strokeMiterlimit`,strokewidth:`strokeWidth`,"stroke-width":`strokeWidth`,strokeopacity:`strokeOpacity`,"stroke-opacity":`strokeOpacity`,suppresscontenteditablewarning:`suppressContentEditableWarning`,suppresshydrationwarning:`suppressHydrationWarning`,surfacescale:`surfaceScale`,systemlanguage:`systemLanguage`,tablevalues:`tableValues`,targetx:`targetX`,targety:`targetY`,textanchor:`textAnchor`,"text-anchor":`textAnchor`,textdecoration:`textDecoration`,"text-decoration":`textDecoration`,textlength:`textLength`,textrendering:`textRendering`,"text-rendering":`textRendering`,to:`to`,transform:`transform`,transformorigin:`transformOrigin`,"transform-origin":`transformOrigin`,typeof:`typeof`,u1:`u1`,u2:`u2`,underlineposition:`underlinePosition`,"underline-position":`underlinePosition`,underlinethickness:`underlineThickness`,"underline-thickness":`underlineThickness`,unicode:`unicode`,unicodebidi:`unicodeBidi`,"unicode-bidi":`unicodeBidi`,unicoderange:`unicodeRange`,"unicode-range":`unicodeRange`,unitsperem:`unitsPerEm`,"units-per-em":`unitsPerEm`,unselectable:`unselectable`,valphabetic:`vAlphabetic`,"v-alphabetic":`vAlphabetic`,values:`values`,vectoreffect:`vectorEffect`,"vector-effect":`vectorEffect`,version:`version`,vertadvy:`vertAdvY`,"vert-adv-y":`vertAdvY`,vertoriginx:`vertOriginX`,"vert-origin-x":`vertOriginX`,vertoriginy:`vertOriginY`,"vert-origin-y":`vertOriginY`,vhanging:`vHanging`,"v-hanging":`vHanging`,videographic:`vIdeographic`,"v-ideographic":`vIdeographic`,viewbox:`viewBox`,viewtarget:`viewTarget`,visibility:`visibility`,vmathematical:`vMathematical`,"v-mathematical":`vMathematical`,vocab:`vocab`,widths:`widths`,wordspacing:`wordSpacing`,"word-spacing":`wordSpacing`,writingmode:`writingMode`,"writing-mode":`writingMode`,x1:`x1`,x2:`x2`,x:`x`,xchannelselector:`xChannelSelector`,xheight:`xHeight`,"x-height":`xHeight`,xlinkactuate:`xlinkActuate`,"xlink:actuate":`xlinkActuate`,xlinkarcrole:`xlinkArcrole`,"xlink:arcrole":`xlinkArcrole`,xlinkhref:`xlinkHref`,"xlink:href":`xlinkHref`,xlinkrole:`xlinkRole`,"xlink:role":`xlinkRole`,xlinkshow:`xlinkShow`,"xlink:show":`xlinkShow`,xlinktitle:`xlinkTitle`,"xlink:title":`xlinkTitle`,xlinktype:`xlinkType`,"xlink:type":`xlinkType`,xmlbase:`xmlBase`,"xml:base":`xmlBase`,xmllang:`xmlLang`,"xml:lang":`xmlLang`,xmlns:`xmlns`,"xml:space":`xmlSpace`,xmlnsxlink:`xmlnsXlink`,"xmlns:xlink":`xmlnsXlink`,xmlspace:`xmlSpace`,y1:`y1`,y2:`y2`,y:`y`,ychannelselector:`yChannelSelector`,z:`z`,zoomandpan:`zoomAndPan`},Fm={"aria-current":0,"aria-description":0,"aria-details":0,"aria-disabled":0,"aria-hidden":0,"aria-invalid":0,"aria-keyshortcuts":0,"aria-label":0,"aria-roledescription":0,"aria-autocomplete":0,"aria-checked":0,"aria-expanded":0,"aria-haspopup":0,"aria-level":0,"aria-modal":0,"aria-multiline":0,"aria-multiselectable":0,"aria-orientation":0,"aria-placeholder":0,"aria-pressed":0,"aria-readonly":0,"aria-required":0,"aria-selected":0,"aria-sort":0,"aria-valuemax":0,"aria-valuemin":0,"aria-valuenow":0,"aria-valuetext":0,"aria-atomic":0,"aria-busy":0,"aria-live":0,"aria-relevant":0,"aria-dropeffect":0,"aria-grabbed":0,"aria-activedescendant":0,"aria-colcount":0,"aria-colindex":0,"aria-colspan":0,"aria-controls":0,"aria-describedby":0,"aria-errormessage":0,"aria-flowto":0,"aria-labelledby":0,"aria-owns":0,"aria-posinset":0,"aria-rowcount":0,"aria-rowindex":0,"aria-rowspan":0,"aria-setsize":0,"aria-braillelabel":0,"aria-brailleroledescription":0,"aria-colindextext":0,"aria-rowindextext":0},Im={},Lm=RegExp(`^(aria)-[: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]*$`),Rm=RegExp(`^(aria)[A-Z][: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]*$`),zm=!1,Bm={},Vm=/^on./,Hm=/^on[^A-Z]/,Um=RegExp(`^(aria)-[: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]*$`),Wm=RegExp(`^(aria)[A-Z][: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]*$`),Gm=/^[\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,Km=null,qm=null,Jm=null,Ym=!1,Xm=!(typeof window>`u`||window.document===void 0||window.document.createElement===void 0),Zm=!1;if(Xm)try{var Qm={};Object.defineProperty(Qm,"passive",{get:function(){Zm=!0}}),window.addEventListener(`test`,Qm,Qm),window.removeEventListener(`test`,Qm,Qm)}catch{Zm=!1}var $m=null,eh=null,th=null,nh={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rh=hn(nh),ih=Tf({},nh,{view:0,detail:0}),ah=hn(ih),oh,sh,ch,lh=Tf({},ih,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:_n,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return`movementX`in e?e.movementX:(e!==ch&&(ch&&e.type===`mousemove`?(oh=e.screenX-ch.screenX,sh=e.screenY-ch.screenY):sh=oh=0,ch=e),oh)},movementY:function(e){return`movementY`in e?e.movementY:sh}}),uh=hn(lh),dh=hn(Tf({},lh,{dataTransfer:0})),fh=hn(Tf({},ih,{relatedTarget:0})),ph=hn(Tf({},nh,{animationName:0,elapsedTime:0,pseudoElement:0})),mh=hn(Tf({},nh,{clipboardData:function(e){return`clipboardData`in e?e.clipboardData:window.clipboardData}})),hh=hn(Tf({},nh,{data:0})),gh=hh,_h={Esc:`Escape`,Spacebar:` `,Left:`ArrowLeft`,Up:`ArrowUp`,Right:`ArrowRight`,Down:`ArrowDown`,Del:`Delete`,Win:`OS`,Menu:`ContextMenu`,Apps:`ContextMenu`,Scroll:`ScrollLock`,MozPrintableKey:`Unidentified`},vh={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`},yh={Alt:`altKey`,Control:`ctrlKey`,Meta:`metaKey`,Shift:`shiftKey`},bh=hn(Tf({},ih,{key:function(e){if(e.key){var t=_h[e.key]||e.key;if(t!==`Unidentified`)return t}return e.type===`keypress`?(e=fn(e),e===13?`Enter`:String.fromCharCode(e)):e.type===`keydown`||e.type===`keyup`?vh[e.keyCode]||`Unidentified`:``},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:_n,charCode:function(e){return e.type===`keypress`?fn(e):0},keyCode:function(e){return e.type===`keydown`||e.type===`keyup`?e.keyCode:0},which:function(e){return e.type===`keypress`?fn(e):e.type===`keydown`||e.type===`keyup`?e.keyCode:0}})),xh=hn(Tf({},lh,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Sh=hn(Tf({},ih,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:_n})),Ch=hn(Tf({},nh,{propertyName:0,elapsedTime:0,pseudoElement:0})),wh=hn(Tf({},lh,{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})),Th=hn(Tf({},nh,{newState:0,oldState:0})),Eh=[9,13,27,32],Dh=229,Oh=Xm&&`CompositionEvent`in window,kh=null;Xm&&`documentMode`in document&&(kh=document.documentMode);var Ah=Xm&&`TextEvent`in window&&!kh,jh=Xm&&(!Oh||kh&&8<kh&&11>=kh),Mh=32,Nh=String.fromCharCode(Mh),Ph=!1,Fh=!1,Ih={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},Lh=null,Rh=null,zh=!1;Xm&&(zh=Cn(`input`)&&(!document.documentMode||9<document.documentMode));var Bh=typeof Object.is==`function`?Object.is:Pn,Vh=Xm&&`documentMode`in document&&11>=document.documentMode,Hh=null,Uh=null,Wh=null,Gh=!1,Kh={animationend:Hn(`Animation`,`AnimationEnd`),animationiteration:Hn(`Animation`,`AnimationIteration`),animationstart:Hn(`Animation`,`AnimationStart`),transitionrun:Hn(`Transition`,`TransitionRun`),transitionstart:Hn(`Transition`,`TransitionStart`),transitioncancel:Hn(`Transition`,`TransitionCancel`),transitionend:Hn(`Transition`,`TransitionEnd`)},qh={},Jh={};Xm&&(Jh=document.createElement(`div`).style,`AnimationEvent`in window||(delete Kh.animationend.animation,delete Kh.animationiteration.animation,delete Kh.animationstart.animation),`TransitionEvent`in window||delete Kh.transitionend.transition);var Yh=Un(`animationend`),Xh=Un(`animationiteration`),Zh=Un(`animationstart`),Qh=Un(`transitionrun`),$h=Un(`transitionstart`),eg=Un(`transitioncancel`),tg=Un(`transitionend`),ng=new Map,rg=`abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel`.split(` `);rg.push(`scrollEnd`);var ig=0;if(typeof performance==`object`&&typeof performance.now==`function`)var ag=performance,og=function(){return ag.now()};else{var sg=Date;og=function(){return sg.now()}}var cg=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)},lg=`This object has been omitted by React in the console log to avoid sending too much data from the server. Try logging smaller or more specific objects.`,ug=0,dg=1,fg=2,pg=3,mg=`–\xA0`,hg=`+\xA0`,gg=` \xA0`,_g=typeof console<`u`&&typeof console.timeStamp==`function`&&typeof performance<`u`&&typeof performance.measure==`function`,vg=`Components ⚛`,yg=`Scheduler ⚛`,bg=`Blocking`,xg=!1,Sg={color:`primary`,properties:null,tooltipText:``,track:vg},Cg={start:-0,end:-0,detail:{devtools:Sg}},wg=[`Changed Props`,``],Tg=`This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.`,Eg=[`Changed Props`,Tg],Dg=1,Og=2,kg=[],Ag=0,jg=0,Mg={};Object.freeze(Mg);var Ng=null,Pg=null,K=0,Fg=1,q=2,Ig=8,Lg=16,Rg=32,zg=!1;try{Object.preventExtensions({})}catch{zg=!0}var Bg=new WeakMap,Vg=[],Hg=0,Ug=null,Wg=0,Gg=[],Kg=0,qg=null,Jg=1,Yg=``,Xg=null,Zg=null,Qg=!1,$g=!1,e_=null,t_=null,n_=!1,r_=Error(`Hydration Mismatch Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.`),i_=T(null),a_=T(null),o_={},s_=null,c_=null,l_=!1,u_=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()})}},d_=Sf.unstable_scheduleCallback,f_=Sf.unstable_NormalPriority,p_={$$typeof:Nf,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},m_=Sf.unstable_now,h_=console.createTask?console.createTask:function(){return null},g_=1,__=2,v_=-0,y_=-0,b_=-0,x_=null,S_=-1.1,C_=-0,w_=-0,J=-1.1,Y=-1.1,T_=null,E_=!1,D_=-0,O_=-1.1,k_=null,A_=0,j_=null,M_=null,N_=-1.1,P_=null,F_=-1.1,I_=-1.1,L_=-0,R_=-1.1,z_=-1.1,B_=0,V_=null,H_=null,U_=null,W_=-1.1,G_=null,K_=-1.1,q_=-1.1,J_=-0,Y_=-0,X_=0,Z_=null,Q_=0,$_=-1.1,ev=!1,tv=!1,nv=null,rv=0,iv=0,av=null,ov=G.S;G.S=function(e,t){if(_x=vp(),typeof t==`object`&&t&&typeof t.then==`function`){if(0>R_&&0>z_){R_=m_();var n=Bu(),r=zu();(n!==K_||r!==G_)&&(K_=-1.1),W_=n,G_=r}Ei(e,t)}ov!==null&&ov(e,t)};var sv=T(null),cv={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},lv=[],uv=[],dv=[],fv=[],pv=[],mv=[],hv=new Set;cv.recordUnsafeLifecycleWarnings=function(e,t){hv.has(e.type)||(typeof t.componentWillMount==`function`&&!0!==t.componentWillMount.__suppressDeprecationWarning&&lv.push(e),e.mode&Ig&&typeof t.UNSAFE_componentWillMount==`function`&&uv.push(e),typeof t.componentWillReceiveProps==`function`&&!0!==t.componentWillReceiveProps.__suppressDeprecationWarning&&dv.push(e),e.mode&Ig&&typeof t.UNSAFE_componentWillReceiveProps==`function`&&fv.push(e),typeof t.componentWillUpdate==`function`&&!0!==t.componentWillUpdate.__suppressDeprecationWarning&&pv.push(e),e.mode&Ig&&typeof t.UNSAFE_componentWillUpdate==`function`&&mv.push(e))},cv.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<lv.length&&(lv.forEach(function(t){e.add(w(t)||`Component`),hv.add(t.type)}),lv=[]);var t=new Set;0<uv.length&&(uv.forEach(function(e){t.add(w(e)||`Component`),hv.add(e.type)}),uv=[]);var n=new Set;0<dv.length&&(dv.forEach(function(e){n.add(w(e)||`Component`),hv.add(e.type)}),dv=[]);var r=new Set;0<fv.length&&(fv.forEach(function(e){r.add(w(e)||`Component`),hv.add(e.type)}),fv=[]);var i=new Set;0<pv.length&&(pv.forEach(function(e){i.add(w(e)||`Component`),hv.add(e.type)}),pv=[]);var a=new Set;if(0<mv.length&&(mv.forEach(function(e){a.add(w(e)||`Component`),hv.add(e.type)}),mv=[]),0<t.size){var o=m(t);console.error(`Using UNSAFE_componentWillMount in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
189
|
+
|
|
190
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
191
|
+
|
|
192
|
+
Please update the following components: %s`,o)}0<r.size&&(o=m(r),console.error(`Using UNSAFE_componentWillReceiveProps in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
193
|
+
|
|
194
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
195
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
196
|
+
|
|
197
|
+
Please update the following components: %s`,o)),0<a.size&&(o=m(a),console.error(`Using UNSAFE_componentWillUpdate in strict mode is not recommended and may indicate bugs in your code. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
198
|
+
|
|
199
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
200
|
+
|
|
201
|
+
Please update the following components: %s`,o)),0<e.size&&(o=m(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
202
|
+
|
|
203
|
+
* Move code with side effects to componentDidMount, and set initial state in the constructor.
|
|
204
|
+
* Rename componentWillMount to UNSAFE_componentWillMount to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
205
|
+
|
|
206
|
+
Please update the following components: %s`,o)),0<n.size&&(o=m(n),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
207
|
+
|
|
208
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
209
|
+
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://react.dev/link/derived-state
|
|
210
|
+
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
211
|
+
|
|
212
|
+
Please update the following components: %s`,o)),0<i.size&&(o=m(i),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
|
|
213
|
+
|
|
214
|
+
* Move data fetching code or side effects to componentDidUpdate.
|
|
215
|
+
* Rename componentWillUpdate to UNSAFE_componentWillUpdate to suppress this warning in non-strict mode. In React 18.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run \`npx react-codemod rename-unsafe-lifecycles\` in your project source folder.
|
|
216
|
+
|
|
217
|
+
Please update the following components: %s`,o))};var gv=new Map,_v=new Set;cv.recordLegacyContextWarning=function(e,t){for(var n=null,r=e;r!==null;)r.mode&Ig&&(n=r),r=r.return;n===null?console.error(`Expected to find a StrictMode component in a strict mode tree. This error is likely caused by a bug in React. Please file an issue.`):!_v.has(e.type)&&(r=gv.get(n),e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext==`function`)&&(r===void 0&&(r=[],gv.set(n,r)),r.push(e))},cv.flushLegacyContextWarning=function(){gv.forEach(function(e){if(e.length!==0){var t=e[0],n=new Set;e.forEach(function(e){n.add(w(e)||`Component`),_v.add(e.type)});var r=m(n);D(t,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
|
|
218
|
+
|
|
219
|
+
The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
|
|
220
|
+
|
|
221
|
+
Please update the following components: %s
|
|
222
|
+
|
|
223
|
+
Learn more about this warning here: https://react.dev/link/legacy-context`,r)})}})},cv.discardPendingWarnings=function(){lv=[],uv=[],dv=[],fv=[],pv=[],mv=[],gv=new Map};var vv={react_stack_bottom_frame:function(e,t,n){var r=fp;fp=!0;try{return e(t,n)}finally{fp=r}}},yv=vv.react_stack_bottom_frame.bind(vv),bv={react_stack_bottom_frame:function(e){var t=fp;fp=!0;try{return e.render()}finally{fp=t}}},xv=bv.react_stack_bottom_frame.bind(bv),Sv={react_stack_bottom_frame:function(e,t){try{t.componentDidMount()}catch(t){kl(e,e.return,t)}}},Cv=Sv.react_stack_bottom_frame.bind(Sv),wv={react_stack_bottom_frame:function(e,t,n,r,i){try{t.componentDidUpdate(n,r,i)}catch(t){kl(e,e.return,t)}}},Tv=wv.react_stack_bottom_frame.bind(wv),Ev={react_stack_bottom_frame:function(e,t){var n=t.stack;e.componentDidCatch(t.value,{componentStack:n===null?``:n})}},Dv=Ev.react_stack_bottom_frame.bind(Ev),Ov={react_stack_bottom_frame:function(e,t,n){try{n.componentWillUnmount()}catch(n){kl(e,t,n)}}},kv=Ov.react_stack_bottom_frame.bind(Ov),Av={react_stack_bottom_frame:function(e){var t=e.create;return e=e.inst,t=t(),e.destroy=t}},jv=Av.react_stack_bottom_frame.bind(Av),Mv={react_stack_bottom_frame:function(e,t,n){try{n()}catch(n){kl(e,t,n)}}},Nv=Mv.react_stack_bottom_frame.bind(Mv),Pv={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},Fv=Pv.react_stack_bottom_frame.bind(Pv),Iv=Error("Suspense Exception: This is not a real error! It's an implementation detail of `use` to interrupt the current render. You must either rethrow it immediately, or move the `use` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary, or call the promise's `.catch` method and pass the result to `use`."),Lv=Error(`Suspense Exception: This is not a real error, and should not leak into userspace. If you're seeing this, it's likely a bug in React.`),Rv=Error("Suspense Exception: This is not a real error! It's an implementation detail of `useActionState` to interrupt the current render. You must either rethrow it immediately, or move the `useActionState` call outside of the `try/catch` block. Capturing without rethrowing will lead to unexpected behavior.\n\nTo handle async errors, wrap your component in an error boundary."),zv={then:function(){console.error(`Internal React error: A listener was unexpectedly attached to a "noop" thenable. This is a bug in React. Please file an issue.`)}},Bv=null,Vv=!1,Hv=null,Uv=0,X=null,Wv,Gv=Wv=!1,Kv={},qv={},Jv={};f=function(e,t,n){if(typeof n==`object`&&n&&n._store&&(!n._store.validated&&n.key==null||n._store.validated===2)){if(typeof n._store!=`object`)throw Error(`React Component in warnForMissingKey should have a _store. This error is likely caused by a bug in React. Please file an issue.`);n._store.validated=1;var r=w(e),i=r||`null`;if(!Kv[i]){Kv[i]=!0,n=n._owner,e=e._debugOwner;var a=``;e&&typeof e.tag==`number`&&(i=w(e))&&(a=`
|
|
224
|
+
|
|
225
|
+
Check the render method of \``+i+"`."),a||r&&(a=`
|
|
226
|
+
|
|
227
|
+
Check the top-level render call using <`+r+`>.`);var o=``;n!=null&&e!==n&&(r=null,typeof n.tag==`number`?r=w(n):typeof n.name==`string`&&(r=n.name),r&&(o=` It was passed a child from `+r+`.`)),D(t,function(){console.error(`Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.`,a,o)})}}};var Yv=Ji(!0),Xv=Ji(!1),Zv=0,Qv=1,$v=2,ey=3,ty=!1,ny=!1,ry=null,iy=!1,ay=T(null),oy=T(0),sy=T(null),cy=null,ly=1,uy=2,dy=T(0),fy=0,py=1,my=2,hy=4,gy=8,_y,vy=new Set,yy=new Set,by=new Set,xy=new Set,Sy=0,Z=null,Cy=null,wy=null,Ty=!1,Ey=!1,Dy=!1,Oy=0,ky=0,Ay=null,jy=0,My=25,Q=null,Ny=null,Py=-1,Fy=!1,Iy={readContext:ti,use:ja,useCallback:va,useContext:va,useEffect:va,useImperativeHandle:va,useLayoutEffect:va,useInsertionEffect:va,useMemo:va,useReducer:va,useRef:va,useState:va,useDebugValue:va,useDeferredValue:va,useTransition:va,useSyncExternalStore:va,useId:va,useHostTransitionStatus:va,useFormState:va,useActionState:va,useOptimistic:va,useMemoCache:va,useCacheRefresh:va};Iy.useEffectEvent=va;var Ly=null,Ry=null,zy=null,By=null,Vy=null,Hy=null,Uy=null;Ly={readContext:function(e){return ti(e)},use:ja,useCallback:function(e,t){return Q=`useCallback`,ha(),ga(t),xo(e,t)},useContext:function(e){return Q=`useContext`,ha(),ti(e)},useEffect:function(e,t){return Q=`useEffect`,ha(),ga(t),po(e,t)},useImperativeHandle:function(e,t,n){return Q=`useImperativeHandle`,ha(),ga(n),yo(e,t,n)},useInsertionEffect:function(e,t){Q=`useInsertionEffect`,ha(),ga(t),uo(4,my,e,t)},useLayoutEffect:function(e,t){return Q=`useLayoutEffect`,ha(),ga(t),_o(e,t)},useMemo:function(e,t){Q=`useMemo`,ha(),ga(t);var n=G.H;G.H=Vy;try{return Co(e,t)}finally{G.H=n}},useReducer:function(e,t,n){Q=`useReducer`,ha();var r=G.H;G.H=Vy;try{return Pa(e,t,n)}finally{G.H=r}},useRef:function(e){return Q=`useRef`,ha(),lo(e)},useState:function(e){Q=`useState`,ha();var t=G.H;G.H=Vy;try{return Ga(e)}finally{G.H=t}},useDebugValue:function(){Q=`useDebugValue`,ha()},useDeferredValue:function(e,t){return Q=`useDeferredValue`,ha(),To(e,t)},useTransition:function(){return Q=`useTransition`,ha(),Fo()},useSyncExternalStore:function(e,t,n){return Q=`useSyncExternalStore`,ha(),Ra(e,t,n)},useId:function(){return Q=`useId`,ha(),zo()},useFormState:function(e,t){return Q=`useFormState`,ha(),_a(),ro(e,t)},useActionState:function(e,t){return Q=`useActionState`,ha(),ro(e,t)},useOptimistic:function(e){return Q=`useOptimistic`,ha(),Ka(e)},useHostTransitionStatus:Ro,useMemoCache:Ma,useCacheRefresh:function(){return Q=`useCacheRefresh`,ha(),Bo()},useEffectEvent:function(e){return Q=`useEffectEvent`,ha(),ho(e)}},Ry={readContext:function(e){return ti(e)},use:ja,useCallback:function(e,t){return Q=`useCallback`,I(),xo(e,t)},useContext:function(e){return Q=`useContext`,I(),ti(e)},useEffect:function(e,t){return Q=`useEffect`,I(),po(e,t)},useImperativeHandle:function(e,t,n){return Q=`useImperativeHandle`,I(),yo(e,t,n)},useInsertionEffect:function(e,t){Q=`useInsertionEffect`,I(),uo(4,my,e,t)},useLayoutEffect:function(e,t){return Q=`useLayoutEffect`,I(),_o(e,t)},useMemo:function(e,t){Q=`useMemo`,I();var n=G.H;G.H=Vy;try{return Co(e,t)}finally{G.H=n}},useReducer:function(e,t,n){Q=`useReducer`,I();var r=G.H;G.H=Vy;try{return Pa(e,t,n)}finally{G.H=r}},useRef:function(e){return Q=`useRef`,I(),lo(e)},useState:function(e){Q=`useState`,I();var t=G.H;G.H=Vy;try{return Ga(e)}finally{G.H=t}},useDebugValue:function(){Q=`useDebugValue`,I()},useDeferredValue:function(e,t){return Q=`useDeferredValue`,I(),To(e,t)},useTransition:function(){return Q=`useTransition`,I(),Fo()},useSyncExternalStore:function(e,t,n){return Q=`useSyncExternalStore`,I(),Ra(e,t,n)},useId:function(){return Q=`useId`,I(),zo()},useActionState:function(e,t){return Q=`useActionState`,I(),ro(e,t)},useFormState:function(e,t){return Q=`useFormState`,I(),_a(),ro(e,t)},useOptimistic:function(e){return Q=`useOptimistic`,I(),Ka(e)},useHostTransitionStatus:Ro,useMemoCache:Ma,useCacheRefresh:function(){return Q=`useCacheRefresh`,I(),Bo()},useEffectEvent:function(e){return Q=`useEffectEvent`,I(),ho(e)}},zy={readContext:function(e){return ti(e)},use:ja,useCallback:function(e,t){return Q=`useCallback`,I(),So(e,t)},useContext:function(e){return Q=`useContext`,I(),ti(e)},useEffect:function(e,t){Q=`useEffect`,I(),fo(2048,gy,e,t)},useImperativeHandle:function(e,t,n){return Q=`useImperativeHandle`,I(),bo(e,t,n)},useInsertionEffect:function(e,t){return Q=`useInsertionEffect`,I(),fo(4,my,e,t)},useLayoutEffect:function(e,t){return Q=`useLayoutEffect`,I(),fo(4,hy,e,t)},useMemo:function(e,t){Q=`useMemo`,I();var n=G.H;G.H=Hy;try{return wo(e,t)}finally{G.H=n}},useReducer:function(e,t,n){Q=`useReducer`,I();var r=G.H;G.H=Hy;try{return Fa(e,t,n)}finally{G.H=r}},useRef:function(){return Q=`useRef`,I(),Oa().memoizedState},useState:function(){Q=`useState`,I();var e=G.H;G.H=Hy;try{return Fa(Na)}finally{G.H=e}},useDebugValue:function(){Q=`useDebugValue`,I()},useDeferredValue:function(e,t){return Q=`useDeferredValue`,I(),Eo(e,t)},useTransition:function(){return Q=`useTransition`,I(),Io()},useSyncExternalStore:function(e,t,n){return Q=`useSyncExternalStore`,I(),za(e,t,n)},useId:function(){return Q=`useId`,I(),Oa().memoizedState},useFormState:function(e){return Q=`useFormState`,I(),_a(),io(e)},useActionState:function(e){return Q=`useActionState`,I(),io(e)},useOptimistic:function(e,t){return Q=`useOptimistic`,I(),qa(e,t)},useHostTransitionStatus:Ro,useMemoCache:Ma,useCacheRefresh:function(){return Q=`useCacheRefresh`,I(),Oa().memoizedState},useEffectEvent:function(e){return Q=`useEffectEvent`,I(),go(e)}},By={readContext:function(e){return ti(e)},use:ja,useCallback:function(e,t){return Q=`useCallback`,I(),So(e,t)},useContext:function(e){return Q=`useContext`,I(),ti(e)},useEffect:function(e,t){Q=`useEffect`,I(),fo(2048,gy,e,t)},useImperativeHandle:function(e,t,n){return Q=`useImperativeHandle`,I(),bo(e,t,n)},useInsertionEffect:function(e,t){return Q=`useInsertionEffect`,I(),fo(4,my,e,t)},useLayoutEffect:function(e,t){return Q=`useLayoutEffect`,I(),fo(4,hy,e,t)},useMemo:function(e,t){Q=`useMemo`,I();var n=G.H;G.H=Uy;try{return wo(e,t)}finally{G.H=n}},useReducer:function(e,t,n){Q=`useReducer`,I();var r=G.H;G.H=Uy;try{return La(e,t,n)}finally{G.H=r}},useRef:function(){return Q=`useRef`,I(),Oa().memoizedState},useState:function(){Q=`useState`,I();var e=G.H;G.H=Uy;try{return La(Na)}finally{G.H=e}},useDebugValue:function(){Q=`useDebugValue`,I()},useDeferredValue:function(e,t){return Q=`useDeferredValue`,I(),Do(e,t)},useTransition:function(){return Q=`useTransition`,I(),Lo()},useSyncExternalStore:function(e,t,n){return Q=`useSyncExternalStore`,I(),za(e,t,n)},useId:function(){return Q=`useId`,I(),Oa().memoizedState},useFormState:function(e){return Q=`useFormState`,I(),_a(),so(e)},useActionState:function(e){return Q=`useActionState`,I(),so(e)},useOptimistic:function(e,t){return Q=`useOptimistic`,I(),Ya(e,t)},useHostTransitionStatus:Ro,useMemoCache:Ma,useCacheRefresh:function(){return Q=`useCacheRefresh`,I(),Oa().memoizedState},useEffectEvent:function(e){return Q=`useEffectEvent`,I(),go(e)}},Vy={readContext:function(e){return l(),ti(e)},use:function(e){return c(),ja(e)},useCallback:function(e,t){return Q=`useCallback`,c(),ha(),xo(e,t)},useContext:function(e){return Q=`useContext`,c(),ha(),ti(e)},useEffect:function(e,t){return Q=`useEffect`,c(),ha(),po(e,t)},useImperativeHandle:function(e,t,n){return Q=`useImperativeHandle`,c(),ha(),yo(e,t,n)},useInsertionEffect:function(e,t){Q=`useInsertionEffect`,c(),ha(),uo(4,my,e,t)},useLayoutEffect:function(e,t){return Q=`useLayoutEffect`,c(),ha(),_o(e,t)},useMemo:function(e,t){Q=`useMemo`,c(),ha();var n=G.H;G.H=Vy;try{return Co(e,t)}finally{G.H=n}},useReducer:function(e,t,n){Q=`useReducer`,c(),ha();var r=G.H;G.H=Vy;try{return Pa(e,t,n)}finally{G.H=r}},useRef:function(e){return Q=`useRef`,c(),ha(),lo(e)},useState:function(e){Q=`useState`,c(),ha();var t=G.H;G.H=Vy;try{return Ga(e)}finally{G.H=t}},useDebugValue:function(){Q=`useDebugValue`,c(),ha()},useDeferredValue:function(e,t){return Q=`useDeferredValue`,c(),ha(),To(e,t)},useTransition:function(){return Q=`useTransition`,c(),ha(),Fo()},useSyncExternalStore:function(e,t,n){return Q=`useSyncExternalStore`,c(),ha(),Ra(e,t,n)},useId:function(){return Q=`useId`,c(),ha(),zo()},useFormState:function(e,t){return Q=`useFormState`,c(),ha(),ro(e,t)},useActionState:function(e,t){return Q=`useActionState`,c(),ha(),ro(e,t)},useOptimistic:function(e){return Q=`useOptimistic`,c(),ha(),Ka(e)},useMemoCache:function(e){return c(),Ma(e)},useHostTransitionStatus:Ro,useCacheRefresh:function(){return Q=`useCacheRefresh`,ha(),Bo()},useEffectEvent:function(e){return Q=`useEffectEvent`,c(),ha(),ho(e)}},Hy={readContext:function(e){return l(),ti(e)},use:function(e){return c(),ja(e)},useCallback:function(e,t){return Q=`useCallback`,c(),I(),So(e,t)},useContext:function(e){return Q=`useContext`,c(),I(),ti(e)},useEffect:function(e,t){Q=`useEffect`,c(),I(),fo(2048,gy,e,t)},useImperativeHandle:function(e,t,n){return Q=`useImperativeHandle`,c(),I(),bo(e,t,n)},useInsertionEffect:function(e,t){return Q=`useInsertionEffect`,c(),I(),fo(4,my,e,t)},useLayoutEffect:function(e,t){return Q=`useLayoutEffect`,c(),I(),fo(4,hy,e,t)},useMemo:function(e,t){Q=`useMemo`,c(),I();var n=G.H;G.H=Hy;try{return wo(e,t)}finally{G.H=n}},useReducer:function(e,t,n){Q=`useReducer`,c(),I();var r=G.H;G.H=Hy;try{return Fa(e,t,n)}finally{G.H=r}},useRef:function(){return Q=`useRef`,c(),I(),Oa().memoizedState},useState:function(){Q=`useState`,c(),I();var e=G.H;G.H=Hy;try{return Fa(Na)}finally{G.H=e}},useDebugValue:function(){Q=`useDebugValue`,c(),I()},useDeferredValue:function(e,t){return Q=`useDeferredValue`,c(),I(),Eo(e,t)},useTransition:function(){return Q=`useTransition`,c(),I(),Io()},useSyncExternalStore:function(e,t,n){return Q=`useSyncExternalStore`,c(),I(),za(e,t,n)},useId:function(){return Q=`useId`,c(),I(),Oa().memoizedState},useFormState:function(e){return Q=`useFormState`,c(),I(),io(e)},useActionState:function(e){return Q=`useActionState`,c(),I(),io(e)},useOptimistic:function(e,t){return Q=`useOptimistic`,c(),I(),qa(e,t)},useMemoCache:function(e){return c(),Ma(e)},useHostTransitionStatus:Ro,useCacheRefresh:function(){return Q=`useCacheRefresh`,I(),Oa().memoizedState},useEffectEvent:function(e){return Q=`useEffectEvent`,c(),I(),go(e)}},Uy={readContext:function(e){return l(),ti(e)},use:function(e){return c(),ja(e)},useCallback:function(e,t){return Q=`useCallback`,c(),I(),So(e,t)},useContext:function(e){return Q=`useContext`,c(),I(),ti(e)},useEffect:function(e,t){Q=`useEffect`,c(),I(),fo(2048,gy,e,t)},useImperativeHandle:function(e,t,n){return Q=`useImperativeHandle`,c(),I(),bo(e,t,n)},useInsertionEffect:function(e,t){return Q=`useInsertionEffect`,c(),I(),fo(4,my,e,t)},useLayoutEffect:function(e,t){return Q=`useLayoutEffect`,c(),I(),fo(4,hy,e,t)},useMemo:function(e,t){Q=`useMemo`,c(),I();var n=G.H;G.H=Hy;try{return wo(e,t)}finally{G.H=n}},useReducer:function(e,t,n){Q=`useReducer`,c(),I();var r=G.H;G.H=Hy;try{return La(e,t,n)}finally{G.H=r}},useRef:function(){return Q=`useRef`,c(),I(),Oa().memoizedState},useState:function(){Q=`useState`,c(),I();var e=G.H;G.H=Hy;try{return La(Na)}finally{G.H=e}},useDebugValue:function(){Q=`useDebugValue`,c(),I()},useDeferredValue:function(e,t){return Q=`useDeferredValue`,c(),I(),Do(e,t)},useTransition:function(){return Q=`useTransition`,c(),I(),Lo()},useSyncExternalStore:function(e,t,n){return Q=`useSyncExternalStore`,c(),I(),za(e,t,n)},useId:function(){return Q=`useId`,c(),I(),Oa().memoizedState},useFormState:function(e){return Q=`useFormState`,c(),I(),so(e)},useActionState:function(e){return Q=`useActionState`,c(),I(),so(e)},useOptimistic:function(e,t){return Q=`useOptimistic`,c(),I(),Ya(e,t)},useMemoCache:function(e){return c(),Ma(e)},useHostTransitionStatus:Ro,useCacheRefresh:function(){return Q=`useCacheRefresh`,I(),Oa().memoizedState},useEffectEvent:function(e){return Q=`useEffectEvent`,c(),I(),go(e)}};var Wy={},Gy=new Set,Ky=new Set,qy=new Set,Jy=new Set,Yy=new Set,Xy=new Set,Zy=new Set,Qy=new Set,$y=new Set,eb=new Set;Object.freeze(Wy);var tb={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Xc(e),i=Qi(r);i.payload=t,n!=null&&(Jo(n),i.callback=n),t=$i(e,i,r),t!==null&&(si(r,`this.setState()`,e),Qc(t,e,r),ea(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Xc(e),i=Qi(r);i.tag=Qv,i.payload=t,n!=null&&(Jo(n),i.callback=n),t=$i(e,i,r),t!==null&&(si(r,`this.replaceState()`,e),Qc(t,e,r),ea(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Xc(e),r=Qi(n);r.tag=$v,t!=null&&(Jo(t),r.callback=t),t=$i(e,r,n),t!==null&&(si(n,`this.forceUpdate()`,e),Qc(t,e,n),ea(t,e,n))}},nb=null,rb=null,ib=Error(`This is not a real error. It's an implementation detail of React's selective hydration feature. If this leaks into userspace, it's a bug in React. Please file an issue.`),ab=!1,ob={},sb={},cb={},lb={},ub=!1,db={},fb={},pb={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},mb=!1,hb=null;hb=new Set;var gb=!1,_b=!1,vb=!1,yb=typeof WeakSet==`function`?WeakSet:Set,bb=null,xb=null,Sb=null,Cb=null,wb=!1,Tb=null,Eb=!1,Db=8192,Ob={getCacheForType:function(e){var t=ti(p_),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return ti(p_).controller.signal},getOwner:function(){return dp}};if(typeof Symbol==`function`&&Symbol.for){var kb=Symbol.for;kb(`selector.component`),kb(`selector.has_pseudo_class`),kb(`selector.role`),kb(`selector.test_id`),kb(`selector.text`)}var Ab=[],jb=typeof WeakMap==`function`?WeakMap:Map,Mb=0,Nb=2,Pb=4,Fb=0,Ib=1,Lb=2,Rb=3,zb=4,Bb=6,Vb=5,Hb=Mb,Ub=null,Wb=null,$=0,Gb=0,Kb=1,qb=2,Jb=3,Yb=4,Xb=5,Zb=6,Qb=7,$b=8,ex=9,tx=Gb,nx=null,rx=!1,ix=!1,ax=!1,ox=0,sx=Fb,cx=0,lx=0,ux=0,dx=0,fx=0,px=null,mx=null,hx=!1,gx=0,_x=0,vx=300,yx=1/0,bx=500,xx=null,Sx=null,Cx=null,wx=0,Tx=1,Ex=2,Dx=3,Ox=0,kx=1,Ax=2,jx=3,Mx=4,Nx=5,Px=0,Fx=null,Ix=null,Lx=0,Rx=0,zx=-0,Bx=null,Vx=null,Hx=null,Ux=wx,Wx=null,Gx=50,Kx=0,qx=null,Jx=!1,Yx=!1,Xx=50,Zx=0,Qx=null,$x=!1,eS=null,tS=!1,nS=new Set,rS={},iS=null,aS=null,oS=!1,sS=!1,cS=!1,lS=!1,uS=0,dS={};(function(){for(var e=0;e<rg.length;e++){var t=rg[e],n=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),Wn(n,`on`+t)}Wn(Yh,`onAnimationEnd`),Wn(Xh,`onAnimationIteration`),Wn(Zh,`onAnimationStart`),Wn(`dblclick`,`onDoubleClick`),Wn(`focusin`,`onFocus`),Wn(`focusout`,`onBlur`),Wn(Qh,`onTransitionRun`),Wn($h,`onTransitionStart`),Wn(eg,`onTransitionCancel`),Wn(tg,`onTransitionEnd`)})(),A(`onMouseEnter`,[`mouseout`,`mouseover`]),A(`onMouseLeave`,[`mouseout`,`mouseover`]),A(`onPointerEnter`,[`pointerout`,`pointerover`]),A(`onPointerLeave`,[`pointerout`,`pointerover`]),tt(`onChange`,`change click focusin focusout input keydown keyup selectionchange`.split(` `)),tt(`onSelect`,`focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange`.split(` `)),tt(`onBeforeInput`,[`compositionend`,`keypress`,`textInput`,`paste`]),tt(`onCompositionEnd`,`compositionend focusout keydown keypress keyup mousedown`.split(` `)),tt(`onCompositionStart`,`compositionstart focusout keydown keypress keyup mousedown`.split(` `)),tt(`onCompositionUpdate`,`compositionupdate focusout keydown keypress keyup mousedown`.split(` `));var fS=`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(` `),pS=new Set(`beforetoggle cancel close invalid load scroll scrollend toggle`.split(` `).concat(fS)),mS=`_reactListening`+Math.random().toString(36).slice(2),hS=!1,gS=!1,_S=!1,vS=!1,yS=!1,bS=!1,xS=!1,SS={},CS=/\r\n?/g,wS=/\u0000|\uFFFD/g,TS=`http://www.w3.org/1999/xlink`,ES=`http://www.w3.org/XML/1998/namespace`,DS=`javascript:throw new Error('React form unexpectedly submitted.')`,OS=`suppressHydrationWarning`,kS=`&`,AS=`/&`,jS=`$`,MS=`/$`,NS=`$?`,PS=`$~`,FS=`$!`,IS=`html`,LS=`body`,RS=`head`,zS=`F!`,BS=`F`,VS=`loading`,HS=`style`,US=0,WS=1,GS=2,KS=null,qS=null,JS={dialog:!0,webview:!0},YS=null,XS=void 0,ZS=typeof setTimeout==`function`?setTimeout:void 0,QS=typeof clearTimeout==`function`?clearTimeout:void 0,$S=-1,eC=typeof Promise==`function`?Promise:void 0,tC=typeof queueMicrotask==`function`?queueMicrotask:eC===void 0?ZS:function(e){return eC.resolve(null).then(e).catch(Vu)},nC=null,rC=0,iC=1,aC=2,oC=3,sC=4,cC=new Map,lC=new Set,uC=Wf.d;Wf.d={f:function(){var e=uC.f(),t=nl();return e||t},r:function(e){var t=Qe(e);t!==null&&t.tag===5&&t.type===`form`?Po(t):uC.r(e)},D:function(e){uC.D(e),wd(`dns-prefetch`,e,null)},C:function(e,t){uC.C(e,t),wd(`preconnect`,e,t)},L:function(e,t,n){uC.L(e,t,n);var r=dC;if(r&&e&&t){var i=`link[rel="preload"][as="`+mt(t)+`"]`;t===`image`&&n&&n.imageSrcSet?(i+=`[imagesrcset="`+mt(n.imageSrcSet)+`"]`,typeof n.imageSizes==`string`&&(i+=`[imagesizes="`+mt(n.imageSizes)+`"]`)):i+=`[href="`+mt(e)+`"]`;var a=i;switch(t){case`style`:a=Dd(e);break;case`script`:a=jd(e)}cC.has(a)||(e=Tf({rel:`preload`,href:t===`image`&&n&&n.imageSrcSet?void 0:e,as:t},n),cC.set(a,e),r.querySelector(i)!==null||t===`style`&&r.querySelector(Od(a))||t===`script`&&r.querySelector(Md(a))||(t=r.createElement(`link`),bu(t,`link`,e),et(t),r.head.appendChild(t)))}},m:function(e,t){uC.m(e,t);var n=dC;if(n&&e){var r=t&&typeof t.as==`string`?t.as:`script`,i=`link[rel="modulepreload"][as="`+mt(r)+`"][href="`+mt(e)+`"]`,a=i;switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:a=jd(e)}if(!cC.has(a)&&(e=Tf({rel:`modulepreload`,href:e},t),cC.set(a,e),n.querySelector(i)===null)){switch(r){case`audioworklet`:case`paintworklet`:case`serviceworker`:case`sharedworker`:case`worker`:case`script`:if(n.querySelector(Md(a)))return}r=n.createElement(`link`),bu(r,`link`,e),et(r),n.head.appendChild(r)}}},X:function(e,t){uC.X(e,t);var n=dC;if(n&&e){var r=k(n).hoistableScripts,i=jd(e),a=r.get(i);a||(a=n.querySelector(Md(i)),a||(e=Tf({src:e,async:!0},t),(t=cC.get(i))&&Id(e,t),a=n.createElement(`script`),et(a),bu(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}},S:function(e,t,n){uC.S(e,t,n);var r=dC;if(r&&e){var i=k(r).hoistableStyles,a=Dd(e);t||=`default`;var o=i.get(a);if(!o){var s={loading:rC,preload:null};if(o=r.querySelector(Od(a)))s.loading=iC|sC;else{e=Tf({rel:`stylesheet`,href:e,"data-precedence":t},n),(n=cC.get(a))&&Fd(e,n);var c=o=r.createElement(`link`);et(c),bu(c,`link`,e),c._p=new Promise(function(e,t){c.onload=e,c.onerror=t}),c.addEventListener(`load`,function(){s.loading|=iC}),c.addEventListener(`error`,function(){s.loading|=aC}),s.loading|=sC,Pd(o,t,r)}o={type:`stylesheet`,instance:o,count:1,state:s},i.set(a,o)}}},M:function(e,t){uC.M(e,t);var n=dC;if(n&&e){var r=k(n).hoistableScripts,i=jd(e),a=r.get(i);a||(a=n.querySelector(Md(i)),a||(e=Tf({src:e,async:!0,type:`module`},t),(t=cC.get(i))&&Id(e,t),a=n.createElement(`script`),et(a),bu(a,`link`,e),n.head.appendChild(a)),a={type:`script`,instance:a,count:1,state:null},r.set(i,a))}}};var dC=typeof document>`u`?null:document,fC=null,pC=6e4,mC=800,hC=500,gC=0,_C=null,vC=null,yC=Gf,bC={$$typeof:Nf,Provider:null,Consumer:null,_currentValue:yC,_currentValue2:yC,_threadCount:0},xC=`%c%s%c`,SC=`background: #e6e6e6;background: light-dark(rgba(0,0,0,0.1), rgba(255,255,255,0.25));color: #000000;color: light-dark(#000000, #ffffff);border-radius: 2px`,CC=``,wC=` `,TC=Function.prototype.bind,EC=!1,DC=null,OC=null,kC=null,AC=null,jC=null,MC=null,NC=null,PC=null,FC=null,IC=null;DC=function(e,r,i,a){r=t(e,r),r!==null&&(i=n(r.memoizedState,i,0,a),r.memoizedState=i,r.baseState=i,e.memoizedProps=Tf({},e.memoizedProps),i=ur(e,2),i!==null&&Qc(i,e,2))},OC=function(e,n,r){n=t(e,n),n!==null&&(r=a(n.memoizedState,r,0),n.memoizedState=r,n.baseState=r,e.memoizedProps=Tf({},e.memoizedProps),r=ur(e,2),r!==null&&Qc(r,e,2))},kC=function(e,n,i,a){n=t(e,n),n!==null&&(i=r(n.memoizedState,i,a),n.memoizedState=i,n.baseState=i,e.memoizedProps=Tf({},e.memoizedProps),i=ur(e,2),i!==null&&Qc(i,e,2))},AC=function(e,t,r){e.pendingProps=n(e.memoizedProps,t,0,r),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ur(e,2),t!==null&&Qc(t,e,2)},jC=function(e,t){e.pendingProps=a(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ur(e,2),t!==null&&Qc(t,e,2)},MC=function(e,t,n){e.pendingProps=r(e.memoizedProps,t,n),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=ur(e,2),t!==null&&Qc(t,e,2)},NC=function(e){var t=ur(e,2);t!==null&&Qc(t,e,2)},PC=function(e){var t=Le(),n=ur(e,t);n!==null&&Qc(n,e,t)},FC=function(e){s=e},IC=function(e){o=e};var LC=!0,RC=null,zC=!1,BC=null,VC=null,HC=null,UC=new Map,WC=new Map,GC=[],KC=`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(` `),qC=null;if(bf.prototype.render=yf.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(`Cannot update an unmounted root.`);var n=arguments;typeof n[1]==`function`?console.error(`does not support the second callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().`):b(n[1])?console.error(`You passed a container to the second argument of root.render(...). You don't need to pass it again since you already passed it to create the root.`):n[1]!==void 0&&console.error(`You passed a second argument to root.render(...) but it only accepts one argument.`),n=e;var r=t.current;Yd(r,Xc(r),n,t,null,null)},bf.prototype.unmount=yf.prototype.unmount=function(){var e=arguments;if(typeof e[0]==`function`&&console.error(`does not support a callback argument. To execute a side effect after rendering, declare it in a component body with useEffect().`),e=this._internalRoot,e!==null){this._internalRoot=null;var t=e.containerInfo;(Hb&(Nb|Pb))!==Mb&&console.error(`Attempted to synchronously unmount a root while React was already rendering. React cannot finish unmounting the root until the current render has completed, which may lead to a race condition.`),Yd(e.current,2,null,e,null,null),nl(),t[Wp]=null}},bf.prototype.unstable_scheduleHydration=function(e){if(e){var t=Je();e={blockedOn:null,target:e,priority:t};for(var n=0;n<GC.length&&t!==0&&t<GC[n].priority;n++);GC.splice(n,0,e),n===0&&df(e)}},(function(){var e=Cf.version;if(e!==`19.2.8`)throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
|
|
228
|
+
- react: `+(e+`
|
|
229
|
+
- react-dom: 19.2.8
|
|
230
|
+
Learn more: https://react.dev/warnings/version-mismatch`))})(),typeof Map==`function`&&Map.prototype!=null&&typeof Map.prototype.forEach==`function`&&typeof Set==`function`&&Set.prototype!=null&&typeof Set.prototype.clear==`function`&&typeof Set.prototype.forEach==`function`||console.error(`React depends on Map and Set built-in types. Make sure that you load a polyfill in older browsers. https://react.dev/link/react-polyfills`),Wf.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render==`function`?Error(`Unable to find node on an unmounted component.`):(e=Object.keys(e).join(`,`),Error(`Argument appears to not be a ReactComponent. Keys: `+e));return e=S(t),e=e===null?null:re(e),e=e===null?null:e.stateNode,e},!(function(){var e={bundleType:1,version:`19.2.8`,rendererPackageName:`react-dom`,currentDispatcherRef:G,reconcilerVersion:`19.2.8`};return e.overrideHookState=DC,e.overrideHookStateDeletePath=OC,e.overrideHookStateRenamePath=kC,e.overrideProps=AC,e.overridePropsDeletePath=jC,e.overridePropsRenamePath=MC,e.scheduleUpdate=NC,e.scheduleRetry=PC,e.setErrorHandler=FC,e.setSuspenseHandler=IC,e.scheduleRefresh=v,e.scheduleRoot=_,e.setRefreshHandler=y,e.getCurrentFiber=ef,Ae(e)})()&&Xm&&window.top===window.self&&(-1<navigator.userAgent.indexOf(`Chrome`)&&navigator.userAgent.indexOf(`Edge`)===-1||-1<navigator.userAgent.indexOf(`Firefox`))){var JC=window.location.protocol;/^(https?|file):$/.test(JC)&&console.info(`%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools`+(JC===`file:`?`
|
|
231
|
+
You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:``),`font-weight:bold`)}e.createRoot=function(e,t){if(!b(e))throw Error(`Target container is not a DOM element.`);xf(e);var n=!1,r=``,i=$o,a=es,o=ts;return t!=null&&(t.hydrate?console.warn(`hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead.`):typeof t==`object`&&t&&t.$$typeof===Df&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
|
|
232
|
+
|
|
233
|
+
let root = createRoot(domContainer);
|
|
234
|
+
root.render(<App />);`),!0===t.unstable_strictMode&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(a=t.onCaughtError),t.onRecoverableError!==void 0&&(o=t.onRecoverableError)),t=qd(e,1,!1,null,null,n,r,null,i,a,o,vf),e[Wp]=t.current,iu(e),new yf(t)},e.hydrateRoot=function(e,t,n){if(!b(e))throw Error(`Target container is not a DOM element.`);xf(e),t===void 0&&console.error(`Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)`);var r=!1,i=``,a=$o,o=es,s=ts,c=null;return n!=null&&(!0===n.unstable_strictMode&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(a=n.onUncaughtError),n.onCaughtError!==void 0&&(o=n.onCaughtError),n.onRecoverableError!==void 0&&(s=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=qd(e,1,!0,t,n??null,r,i,c,a,o,s,vf),t.context=Jd(null),n=t.current,r=Xc(n),r=We(r),i=Qi(r),i.callback=null,$i(n,i,r),si(r,`hydrateRoot()`,null),n=r,t.current.lanes=n,ze(t,n),Hl(t),e[Wp]=t.current,iu(e),new bf(t)},e.version=`19.2.8`,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<`u`&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop==`function`&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})),_=o(((e,t)=>{t.exports=g()})),v=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(){}},y=new class extends v{#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`}},b={setTimeout:(e,t)=>setTimeout(e,t),clearTimeout:e=>clearTimeout(e),setInterval:(e,t)=>setInterval(e,t),clearInterval:e=>clearInterval(e)},x=new class{#e=b;#t=!1;setTimeoutProvider(e){this.#t&&e!==this.#e&&console.error(`[timeoutManager]: Switching provider after calls to previous provider might result in unexpected behavior.`,{previous:this.#e,provider:e}),this.#e=e,this.#t=!1}setTimeout(e,t){return this.#t=!0,this.#e.setTimeout(e,t)}clearTimeout(e){this.#e.clearTimeout(e)}setInterval(e,t){return this.#t=!0,this.#e.setInterval(e,t)}clearInterval(e){this.#e.clearInterval(e)}};function ee(e){setTimeout(e,0)}var te=typeof window>`u`||`Deno`in globalThis;function ne(){}function S(e,t){return typeof e==`function`?e(t):e}function re(e){return typeof e==`number`&&e>=0&&e!==1/0}function ie(e,t){return Math.max(e+(t||0)-Date.now(),0)}function C(e,t){return typeof e==`function`?e(t):e}function ae(e,t){return typeof e==`function`?e(t):e}function w(e,t){let{type:n=`all`,exact:r,fetchStatus:i,predicate:a,queryKey:o,stale:s}=e;if(o){if(r){if(t.queryHash!==oe(o,t.options))return!1}else if(!se(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 T(e,t){let{exact:n,status:r,predicate:i,mutationKey:a}=e;if(a){if(!t.options.mutationKey)return!1;if(n){if(E(t.options.mutationKey)!==E(a))return!1}else if(!se(t.options.mutationKey,a))return!1}return!(r&&t.state.status!==r||i&&!i(t))}function oe(e,t){return(t?.queryKeyHashFn||E)(e)}function E(e){return JSON.stringify(e,(e,t)=>fe(t)?Object.keys(t).sort().reduce((e,n)=>(e[n]=t[n],e),{}):t)}function se(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)){for(let n=0;n<t.length;n++)if(!se(e[n],t[n]))return!1;return!0}let n=Object.keys(t);for(let r of n)if(!se(e[r],t[r]))return!1;return!0}return!1}var ce=Object.prototype.hasOwnProperty;function le(e,t,n=0){if(e===t)return e;if(n>500)return t;let r=de(e)&&de(t);if(!r&&!(fe(e)&&fe(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:ce.call(e,o))&&c++;continue}if(u===null||d===null||typeof u!=`object`||typeof d!=`object`){s[o]=d;continue}let f=le(u,d,n+1);s[o]=f,f===u&&c++}return i===o&&c===i?e:s}function ue(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 de(e){return Array.isArray(e)&&e.length===Object.keys(e).length}function fe(e){if(!pe(e))return!1;let t=e.constructor;if(t===void 0)return!0;let n=t.prototype;return!(!pe(n)||!n.hasOwnProperty(`isPrototypeOf`)||Object.getPrototypeOf(e)!==Object.prototype)}function pe(e){return Object.prototype.toString.call(e)===`[object Object]`}function me(e){return new Promise(t=>{x.setTimeout(t,e)})}function he(e,t,n){if(typeof n.structuralSharing==`function`)return n.structuralSharing(e,t);if(n.structuralSharing!==!1)try{return le(e,t)}catch(e){throw console.error(`Structural sharing requires data to be JSON serializable. To fix this, turn off structuralSharing or return JSON-serializable data from your queryFn. [${n.queryHash}]: ${e}`),e}return t}function ge(e,t,n=0){let r=[...e,t];return n&&r.length>n?r.slice(1):r}function _e(e,t,n=0){let r=[t,...e];return n&&r.length>n?r.slice(0,-1):r}var ve=Symbol();function ye(e,t){return e.queryFn===ve&&console.error(`Attempted to invoke queryFn when set to skipToken. This is likely a configuration error. Query hash: '${e.queryHash}'`),!e.queryFn&&t?.initialPromise?()=>t.initialPromise:!e.queryFn||e.queryFn===ve?()=>Promise.reject(Error(`Missing queryFn: '${e.queryHash}'`)):e.queryFn}function be(e,t){return typeof e==`function`?e(...t):!!e}function xe(e,t,n){let r=!1,i;return Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(i??=t(),r?i:(r=!0,i.aborted?n():i.addEventListener(`abort`,n,{once:!0}),i))}),e}var Se=(()=>{let e=()=>te;return{isServer(){return e()},setIsServer(t){e=t}}})();function Ce(){let e,t,n=new Promise((n,r)=>{e=n,t=r});n.status=`pending`,n.catch(()=>{});function r(e){Object.assign(n,e),delete n.resolve,delete n.reject}return n.resolve=t=>{r({status:`fulfilled`,value:t}),e(t)},n.reject=e=>{r({status:`rejected`,reason:e}),t(e)},n}var D=ee;function we(){let e=[],t=0,n=e=>{e()},r=e=>{e()},i=D,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 Te=we(),Ee=new class extends v{#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 De(e){return Math.min(1e3*2**e,3e4)}function O(e){return(e??`online`)!==`online`||Ee.isOnline()}var Oe=class extends Error{constructor(e){super(`CancelledError`),this.revert=e?.revert,this.silent=e?.silent}};function ke(e){let t=!1,n=0,r,i=Ce(),a=()=>i.status!==`pending`,o=t=>{if(!a()){let n=new Oe(t);f(n),e.onCancel?.(n)}},s=()=>{t=!0},c=()=>{t=!1},l=()=>y.isFocused()&&(e.networkMode===`always`||Ee.isOnline())&&e.canRun(),u=()=>O(e.networkMode)&&e.canRun(),d=e=>{a()||(r?.(),i.resolve(e))},f=e=>{a()||(r?.(),i.reject(e))},p=()=>new Promise(t=>{r=e=>{(a()||l())&&t(e)},e.onPause?.()}).then(()=>{r=void 0,a()||e.onContinue?.()}),m=()=>{if(a())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(d).catch(r=>{if(a())return;let i=e.retry??(Se.isServer()?0:3),o=e.retryDelay??De,s=typeof o==`function`?o(n,r):o,c=i===!0||typeof i==`number`&&n<i||typeof i==`function`&&i(n,r);if(t||!c){f(r);return}n++,e.onFail?.(n,r),me(s).then(()=>l()?void 0:p()).then(()=>{t?f(r):m()})})};return{promise:i,status:()=>i.status,cancel:o,continue:()=>(r?.(),i),cancelRetry:s,continueRetry:c,canStart:u,start:()=>(u()?m():p().then(m),i)}}var Ae=class{#e;destroy(){this.clearGcTimeout()}scheduleGc(){this.clearGcTimeout(),re(this.gcTime)&&(this.#e=x.setTimeout(()=>{this.optionalRemove()},this.gcTime))}updateGcTime(e){this.gcTime=Math.max(this.gcTime||0,e??(Se.isServer()?1/0:3e5))}clearGcTimeout(){this.#e!==void 0&&(x.clearTimeout(this.#e),this.#e=void 0)}};function je(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=>{xe(e,()=>t.signal,()=>n=!0)},u=ye(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?_e:ge;return{pages:c(e.pages,o,s),pageParams:c(e.pageParams,r,s)}};if(i&&a.length){let e=i===`backward`,t=e?Ne:Me,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]??r.initialPageParam:Me(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 Me(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 Ne(e,{pages:t,pageParams:n}){return t.length>0?e.getPreviousPageParam?.(t[0],t,n[0],n):void 0}var Pe=class extends Ae{#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=Le(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=Le(this.options);e.data!==void 0&&(this.setState(Ie(e.data,e.dataUpdatedAt)),this.#t=e)}}optionalRemove(){!this.observers.length&&this.state.fetchStatus===`idle`&&this.#r.remove(this)}setData(e,t){let n=he(this.state.data,e,this.options);return this.#l({data:n,type:`success`,dataUpdatedAt:t?.updatedAt,manual:t?.manual}),n}setState(e){this.#l({type:`setState`,state:e})}cancel(e){let t=this.#a?.promise;return this.#a?.cancel(e),t?t.then(ne).catch(ne):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=>ae(e.options.enabled,this)!==!1)}isDisabled(){return this.getObserversCount()>0?!this.isActive():this.options.queryFn===ve||!this.isFetched()}isFetched(){return this.state.dataUpdateCount+this.state.errorUpdateCount>0}isStatic(){return this.getObserversCount()>0&&this.observers.some(e=>C(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:!ie(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){this.observers.includes(e)&&(this.observers=this.observers.filter(t=>t!==e),this.observers.length||(this.#a&&(this.#s||this.#c()?this.#a.cancel({revert:!0}):this.#a.cancelRetry()),this.scheduleGc()),this.#r.notify({type:`observerRemoved`,query:this,observer:e}))}getObserversCount(){return this.observers.length}#c(){return this.state.fetchStatus===`paused`&&this.state.status===`pending`}invalidate(){this.state.isInvalidated||this.#l({type:`invalidate`})}async fetch(e,t){if(this.state.fetchStatus!==`idle`&&this.#a?.status()!==`rejected`){if(this.state.data!==void 0&&t?.cancelRefetch)this.cancel({silent:!0});else if(this.#a)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)}Array.isArray(this.options.queryKey)||console.error(`As of v4, queryKey needs to be an Array. If you are using a string like 'repoData', please change it to an Array, e.g. ['repoData']`);let n=new AbortController,r=e=>{Object.defineProperty(e,"signal",{enumerable:!0,get:()=>(this.#s=!0,n.signal)})},i=()=>{let e=ye(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`?je(this.options.pages):this.options.behavior)?.onFetch(a,this),this.#n=this.state,(this.state.fetchStatus===`idle`||this.state.fetchMeta!==a.fetchOptions?.meta)&&this.#l({type:`fetch`,meta:a.fetchOptions?.meta}),this.#a=ke({initialPromise:t?.initialPromise,fn:a.fetchFn,onCancel:e=>{e instanceof Oe&&e.revert&&this.setState({...this.#n,fetchStatus:`idle`}),n.abort()},onFail:(e,t)=>{this.#l({type:`failed`,failureCount:e,error:t})},onPause:()=>{this.#l({type:`pause`})},onContinue:()=>{this.#l({type:`continue`})},retry:a.options.retry,retryDelay:a.options.retryDelay,networkMode:a.options.networkMode,canRun:()=>!0});try{let e=await this.#a.start();if(e===void 0)throw console.error(`Query data cannot be undefined. Please make sure to return a value other than undefined from your query function. Affected query key: ${this.queryHash}`),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 Oe){if(e.silent)return this.#a.promise;if(e.revert){if(this.state.data===void 0)throw e;return this.state.data}}throw this.#l({type:`error`,error:e}),this.#r.config.onError?.(e,this),this.#r.config.onSettled?.(this.state.data,e,this),e}finally{this.scheduleGc()}}#l(e){let t=t=>{switch(e.type){case`failed`:return{...t,fetchFailureCount:e.failureCount,fetchFailureReason:e.error};case`pause`:return{...t,fetchStatus:`paused`};case`continue`:return{...t,fetchStatus:`fetching`};case`fetch`:return{...t,...Fe(t.data,this.options),fetchMeta:e.meta??null};case`success`:let n={...t,...Ie(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),Te.batch(()=>{this.observers.forEach(e=>{e.onQueryUpdate()}),this.#r.notify({query:this,type:`updated`,action:e})})}};function Fe(e,t){return{fetchFailureCount:0,fetchFailureReason:null,fetchStatus:O(t.networkMode)?`fetching`:`paused`,...e===void 0&&{error:null,status:`pending`}}}function Ie(e,t){return{data:e,dataUpdatedAt:t??Date.now(),error:null,isInvalidated:!1,status:`success`}}function Le(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 Re=class extends v{constructor(e,t){super(),this.options=t,this.#e=e,this.#s=null,this.#o=Ce(),this.bindMethods(),this.setOptions(t)}#e;#t=void 0;#n=void 0;#r=void 0;#i;#a;#o;#s;#c;#l;#u;#d;#f;#p;#m=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),Be(this.#t,this.options)?this.#h():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Ve(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Ve(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 ae(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&&!ue(this.options,t)&&this.#e.getQueryCache().notify({type:`observerOptionsUpdated`,query:this.#t,observer:this});let r=this.hasListeners();r&&He(this.#t,n,this.options,t)&&this.#h(),this.updateResult(),r&&(this.#t!==n||ae(this.options.enabled,this.#t)!==ae(t.enabled,this.#t)||C(this.options.staleTime,this.#t)!==C(t.staleTime,this.#t))&&this.#g();let i=this.#_();r&&(this.#t!==n||ae(this.options.enabled,this.#t)!==ae(t.enabled,this.#t)||i!==this.#p)&&this.#v(i)}getOptimisticResult(e){let t=this.#e.getQueryCache().build(this.#e,e),n=this.createResult(t,e);return We(this,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),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&this.#o.status===`pending`&&this.#o.reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){this.#m.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);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return this.#h({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#r))}#h(e){this.#S();let t=this.#t.fetch(this.options,e);return e?.throwOnError||(t=t.catch(ne)),t}#g(){this.#b();let e=C(this.options.staleTime,this.#t);if(Se.isServer()||this.#r.isStale||!re(e))return;let t=ie(this.#r.dataUpdatedAt,e)+1;this.#d=x.setTimeout(()=>{this.#r.isStale||this.updateResult()},t)}#_(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#v(e){this.#x(),this.#p=e,!(Se.isServer()||ae(this.options.enabled,this.#t)===!1||!re(this.#p)||this.#p===0)&&(this.#f=x.setInterval(()=>{(this.options.refetchIntervalInBackground||y.isFocused())&&this.#h()},this.#p))}#y(){this.#g(),this.#v(this.#_())}#b(){this.#d!==void 0&&(x.clearTimeout(this.#d),this.#d=void 0)}#x(){this.#f!==void 0&&(x.clearInterval(this.#f),this.#f=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&&Be(e,t),o=i&&He(e,n,t,r);(a||o)&&(l={...l,...Fe(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.#u?.state.data,this.#u):t.placeholderData,e!==void 0&&(m=`success`,d=he(i?.data,e,t),u=!0)}if(t.select&&d!==void 0&&!h){if(i&&d===a?.data&&t.select===this.#c)d=this.#l;else try{this.#c=t.select,d=t.select(d),d=he(i?.data,d,t),this.#l=d,this.#s=null}catch(e){this.#s=e}}this.#s&&(f=this.#s,d=this.#l,p=Date.now(),m=`error`);let g=l.fetchStatus===`fetching`,_=m===`pending`,v=m===`error`,y=_&&g,b=d!==void 0,x={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:Ue(e,t),refetch:this.refetch,promise:this.#o,isEnabled:ae(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=x.data!==void 0,r=x.status===`error`&&!t,i=e=>{r?e.reject(x.error):t&&e.resolve(x.data)},a=()=>{let e=this.#o=x.promise=Ce();i(e)},o=this.#o;switch(o.status){case`pending`:e.queryHash===n.queryHash&&i(o);break;case`fulfilled`:(r||x.data!==o.value)&&a();break;case`rejected`:(!r||x.error!==o.reason)&&a()}}return x}updateResult(){let e=this.#r,t=this.createResult(this.#t,this.options);this.#i=this.#t.state,this.#a=this.options,this.#i.data!==void 0&&(this.#u=this.#t),!ue(t,e)&&(this.#r=t,this.#C({listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!this.#m.size)return!0;let r=new Set(n??this.#m);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)})})()}))}#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()}#C(e){Te.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#r)}),this.#e.getQueryCache().notify({query:this.#t,type:`observerResultsUpdated`})})}};function ze(e,t){return ae(t.enabled,e)!==!1&&e.state.data===void 0&&(e.state.status!==`error`||ae(t.retryOnMount,e)!==!1)}function Be(e,t){return ze(e,t)||e.state.data!==void 0&&Ve(e,t,t.refetchOnMount)}function Ve(e,t,n){if(ae(t.enabled,e)!==!1&&C(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Ue(e,t)}return!1}function He(e,t,n,r){return(e!==t||ae(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Ue(e,n)}function Ue(e,t){return ae(t.enabled,e)!==!1&&e.isStaleByTime(C(t.staleTime,e))}function We(e,t){return!ue(e.getCurrentResult(),t)}var Ge=class extends Ae{#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||Ke(),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.execute(this.state.variables)}async execute(e){let t=()=>{this.#i({type:`continue`})},n={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};this.#r=ke({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)});let r=this.state.status===`pending`,i=!this.#r.canStart();try{if(r)t();else{this.#i({type:`pending`,variables:e,isPaused:i}),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:i})}let a=await this.#r.start();return await this.#n.config.onSuccess?.(a,e,this.state.context,this,n),await this.options.onSuccess?.(a,e,this.state.context,n),await this.#n.config.onSettled?.(a,null,this.state.variables,this.state.context,this,n),await this.options.onSettled?.(a,null,e,this.state.context,n),this.#i({type:`success`,data:a}),a}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.#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),Te.batch(()=>{this.#t.forEach(t=>{t.onMutationUpdate(e)}),this.#n.notify({mutation:this,type:`updated`,action:e})})}};function Ke(){return{context:void 0,data:void 0,error:null,failureCount:0,failureReason:null,isPaused:!1,status:`idle`,variables:void 0,submittedAt:0}}var qe=class extends v{constructor(e={}){super(),this.config=e,this.#e=new Set,this.#t=new Map,this.#n=0}#e;#t;#n;build(e,t,n){let r=new Ge({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=Je(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=Je(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=Je(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=Je(e);return typeof t==`string`?(this.#t.get(t)?.find(t=>t!==e&&t.state.isPaused))?.continue()??Promise.resolve():Promise.resolve()}clear(){Te.batch(()=>{this.#e.forEach(e=>{this.notify({type:`removed`,mutation:e})}),this.#e.clear(),this.#t.clear()})}getAll(){return Array.from(this.#e)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>T(t,e))}findAll(e={}){return this.getAll().filter(t=>T(e,t))}notify(e){Te.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return Te.batch(()=>Promise.all(e.map(e=>e.continue().catch(ne))))}};function Je(e){return e.options.scope?.id}var Ye=class extends v{#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),ue(this.options,t)||this.#e.getMutationCache().notify({type:`observerOptionsUpdated`,mutation:this.#n,observer:this}),t?.mutationKey&&this.options.mutationKey&&E(t.mutationKey)!==E(this.options.mutationKey)?this.reset():this.#n?.state.status===`pending`&&this.#n.setOptions(this.options)}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??Ke();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){Te.batch(()=>{if(this.#r&&this.hasListeners()){let t=this.#t.variables,n=this.#t.context,r={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type===`success`){try{this.#r.onSuccess?.(e.data,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(e.data,null,t,n,r)}catch(e){Promise.reject(e)}}else if(e?.type===`error`){try{this.#r.onError?.(e.error,t,n,r)}catch(e){Promise.reject(e)}try{this.#r.onSettled?.(void 0,e.error,t,n,r)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#t)})})}},Xe=class extends v{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,n){let r=t.queryKey,i=t.queryHash??oe(r,t),a=this.get(i);return a||(a=new Pe({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){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:`removed`,query:e}))}clear(){Te.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=>w(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>w(e,t)):t}notify(e){Te.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){Te.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){Te.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},Ze=class{#e;#t;#n;#r;#i;#a;#o;#s;constructor(e={}){this.#e=e.queryCache||new Xe,this.#t=e.mutationCache||new qe,this.#n=e.defaultOptions||{},this.#r=new Map,this.#i=new Map,this.#a=0}mount(){this.#a++,this.#a===1&&(this.#o=y.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#e.onFocus())}),this.#s=Ee.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(C(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=S(t,i);if(a!==void 0)return this.#e.build(this,r).setData(a,{...n,manual:!0})}setQueriesData(e,t,n){return Te.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;Te.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let n=this.#e;return Te.batch(()=>(n.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:`active`,...e},t)))}cancelQueries(e,t={}){let n={revert:!0,...t},r=Te.batch(()=>this.#e.findAll(e).map(e=>e.cancel(n)));return Promise.all(r).then(ne).catch(ne)}invalidateQueries(e,t={}){return Te.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=Te.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(ne)),e.state.fetchStatus===`paused`?Promise.resolve():t}));return Promise.all(r).then(ne)}fetchQuery(e){let t=this.defaultQueryOptions(e);t.retry===void 0&&(t.retry=!1);let n=this.#e.build(this,t);return n.isStaleByTime(C(t.staleTime,n))?n.fetch(t):Promise.resolve(n.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(ne).catch(ne)}fetchInfiniteQuery(e){return e._type=`infinite`,this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(ne).catch(ne)}ensureInfiniteQueryData(e){return e._type=`infinite`,this.ensureQueryData(e)}resumePausedMutations(){return Ee.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(E(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#r.values()],n={};return t.forEach(t=>{se(e,t.queryKey)&&Object.assign(n,t.defaultOptions)}),n}setMutationDefaults(e,t){this.#i.set(E(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#i.values()],n={};return t.forEach(t=>{se(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||=oe(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===ve&&(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()}},Qe=o((e=>{(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case ne:return`Suspense`;case S:return`SuspenseList`;case C:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case _:return`Portal`;case ee:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case te:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case ie:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===v)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===ie)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=w.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(T.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){se||(se=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function l(){var e=t(this.type);return ce[e]||(ce[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:g,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function f(e,n,i,o,l,d){var f=n.children;if(f!==void 0){if(o){if(oe(f)){for(o=0;o<f.length;o++)p(f[o]);Object.freeze&&Object.freeze(f)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`)}else p(f)}if(T.call(n,`key`)){f=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,de[f+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
235
|
+
let props = %s;
|
|
236
|
+
<%s {...props} />
|
|
237
|
+
React keys must be passed directly to JSX without using spread:
|
|
238
|
+
let props = %s;
|
|
239
|
+
<%s key={someKey} {...props} />`,o,f,m,f),de[f+o]=!0)}if(f=null,i!==void 0&&(r(i),f=``+i),s(n)&&(r(n.key),f=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return f&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,f,i,a(),l,d)}function p(e){m(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===ie&&(e._payload.status===`fulfilled`?m(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function m(e){return typeof e==`object`&&!!e&&e.$$typeof===g}var h=d(),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),ee=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),ne=Symbol.for(`react.suspense`),S=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),C=Symbol.for(`react.activity`),ae=Symbol.for(`react.client.reference`),w=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,oe=Array.isArray,E=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var se,ce={},le=h.react_stack_bottom_frame.bind(h,o)(),ue=E(i(o)),de={};e.Fragment=v,e.jsx=function(e,t,n){var r=1e4>w.recentlyCreatedOwnerStacks++;return f(e,t,n,!1,r?Error(`react-stack-top-frame`):le,r?E(i(e)):ue)},e.jsxs=function(e,t,n){var r=1e4>w.recentlyCreatedOwnerStacks++;return f(e,t,n,!0,r?Error(`react-stack-top-frame`):le,r?E(i(e)):ue)}})()})),$e=o(((e,t)=>{t.exports=Qe()})),k=l(d(),1),et=$e(),tt=k.createContext(void 0),A=e=>{let t=k.useContext(tt);if(e)return e;if(!t)throw Error(`No QueryClient set, use QueryClientProvider to set one`);return t},nt=({client:e,children:t})=>(k.useEffect(()=>(e.mount(),()=>{e.unmount()}),[e]),(0,et.jsx)(tt.Provider,{value:e,children:t})),rt=k.createContext(!1),it=()=>k.useContext(rt);rt.Provider;function at(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ot=k.createContext(at()),st=()=>k.useContext(ot),ct=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?be(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},lt=e=>{k.useEffect(()=>{e.clearReset()},[e])},ut=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||be(n,[e.error,r])),dt=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))}},ft=(e,t)=>e.isLoading&&e.isFetching&&!t,pt=(e,t)=>e?.suspense&&t.isPending,mt=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function ht(e,t,n){if(typeof e!=`object`||Array.isArray(e))throw Error(`Bad argument type. Starting with v5, only the "Object" form is allowed when calling query related functions. Please use the error stack to find the culprit call. More info here: https://tanstack.com/query/latest/docs/react/guides/migrating-to-v5#supports-a-single-signature-one-object`);let r=it(),i=st(),a=A(n),o=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(o);let s=a.getQueryCache().get(o.queryHash);o.queryFn||console.error(`[${o.queryHash}]: No queryFn was passed as an option, and no default queryFn was found. The queryFn parameter is only optional when using a default queryFn. More info here: https://tanstack.com/query/latest/docs/framework/react/guides/default-query-function`);let c=e.subscribed!==!1;o._optimisticResults=r?`isRestoring`:c?`optimistic`:void 0,dt(o),ct(o,i,s),lt(i);let l=!a.getQueryCache().get(o.queryHash),[u]=k.useState(()=>new t(a,o)),d=u.getOptimisticResult(o),f=!r&&c;if(k.useSyncExternalStore(k.useCallback(e=>{let t=f?u.subscribe(Te.batchCalls(e)):ne;return u.updateResult(),t},[u,f]),()=>u.getCurrentResult(),()=>u.getCurrentResult()),k.useEffect(()=>{u.setOptions(o)},[o,u]),pt(o,d))throw mt(o,u,i);if(ut({result:d,errorResetBoundary:i,throwOnError:o.throwOnError,query:s,suspense:o.suspense}))throw d.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(o,d),o.experimental_prefetchInRender&&!Se.isServer()&&ft(d,r)&&(l?mt(o,u,i):s?.promise)?.catch(ne).finally(()=>{u.updateResult()}),o.notifyOnChangeProps?d:u.trackResult(d)}function gt(e,t){return ht(e,Re,t)}function _t(e,t){let n=A(t),[r]=k.useState(()=>new Ye(n,e));k.useEffect(()=>{r.setOptions(e)},[r,e]);let i=k.useSyncExternalStore(k.useCallback(e=>r.subscribe(Te.batchCalls(e)),[r]),()=>r.getCurrentResult(),()=>r.getCurrentResult()),a=k.useCallback((e,t)=>{r.mutate(e,t).catch(ne)},[r]);if(i.error&&be(r.options.throwOnError,[i.error]))throw i.error;return{...i,mutate:a,mutateAsync:i.mutate}}var vt=_();function yt(e){let t=e.split(/[^A-Za-z0-9]+/).filter(e=>e.length>0);return t.length===0?`??`:t.length===1?t[0].slice(0,2).toUpperCase():`${t[0][0]}${t[1][0]}`.toUpperCase()}function bt(e){if(!e)return;let t=Date.parse(e);if(Number.isNaN(t))return;let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<60)return`just now`;let r=Math.round(n/60);if(r<60)return`${r}m ago`;let i=Math.round(r/60);if(i<24)return`${i}h ago`;let a=Math.round(i/24);if(a<30)return`${a}d ago`;let o=Math.round(a/30);return o<12?`${o}mo ago`:`${Math.round(o/12)}y ago`}var xt=o((e=>{(function(){function t(e){if(e==null)return null;if(typeof e==`function`)return e.$$typeof===ae?null:e.displayName||e.name||null;if(typeof e==`string`)return e;switch(e){case v:return`Fragment`;case b:return`Profiler`;case y:return`StrictMode`;case ne:return`Suspense`;case S:return`SuspenseList`;case C:return`Activity`}if(typeof e==`object`)switch(typeof e.tag==`number`&&console.error(`Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue.`),e.$$typeof){case _:return`Portal`;case ee:return e.displayName||`Context`;case x:return(e._context.displayName||`Context`)+`.Consumer`;case te:var n=e.render;return e=e.displayName,e||=(e=n.displayName||n.name||``,e===``?`ForwardRef`:`ForwardRef(`+e+`)`),e;case re:return n=e.displayName||null,n===null?t(e.type)||`Memo`:n;case ie:n=e._payload,e=e._init;try{return t(e(n))}catch{}}return null}function n(e){return``+e}function r(e){try{n(e);var t=!1}catch{t=!0}if(t){t=console;var r=t.error,i=typeof Symbol==`function`&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||`Object`;return r.call(t,`The provided key is an unsupported type %s. This value must be coerced to a string before using it here.`,i),n(e)}}function i(e){if(e===v)return`<>`;if(typeof e==`object`&&e&&e.$$typeof===ie)return`<...>`;try{var n=t(e);return n?`<`+n+`>`:`<...>`}catch{return`<...>`}}function a(){var e=w.A;return e===null?null:e.getOwner()}function o(){return Error(`react-stack-top-frame`)}function s(e){if(T.call(e,`key`)){var t=Object.getOwnPropertyDescriptor(e,`key`).get;if(t&&t.isReactWarning)return!1}return e.key!==void 0}function c(e,t){function n(){se||(se=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",t))}n.isReactWarning=!0,Object.defineProperty(e,"key",{get:n,configurable:!0})}function l(){var e=t(this.type);return ce[e]||(ce[e]=!0,console.error(`Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.`)),e=this.props.ref,e===void 0?null:e}function u(e,t,n,r,i,a){var o=n.ref;return e={$$typeof:g,type:e,key:t,props:n,_owner:r},(o===void 0?null:o)===null?Object.defineProperty(e,"ref",{enumerable:!1,value:null}):Object.defineProperty(e,"ref",{enumerable:!1,get:l}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:i}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:a}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function f(e,n,i,o,l,d){var f=n.children;if(f!==void 0){if(o){if(oe(f)){for(o=0;o<f.length;o++)p(f[o]);Object.freeze&&Object.freeze(f)}else console.error(`React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.`)}else p(f)}if(T.call(n,`key`)){f=t(e);var m=Object.keys(n).filter(function(e){return e!==`key`});o=0<m.length?`{key: someKey, `+m.join(`: ..., `)+`: ...}`:`{key: someKey}`,de[f+o]||(m=0<m.length?`{`+m.join(`: ..., `)+`: ...}`:`{}`,console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
240
|
+
let props = %s;
|
|
241
|
+
<%s {...props} />
|
|
242
|
+
React keys must be passed directly to JSX without using spread:
|
|
243
|
+
let props = %s;
|
|
244
|
+
<%s key={someKey} {...props} />`,o,f,m,f),de[f+o]=!0)}if(f=null,i!==void 0&&(r(i),f=``+i),s(n)&&(r(n.key),f=``+n.key),`key`in n)for(var h in i={},n)h!==`key`&&(i[h]=n[h]);else i=n;return f&&c(i,typeof e==`function`?e.displayName||e.name||`Unknown`:e),u(e,f,i,a(),l,d)}function p(e){m(e)?e._store&&(e._store.validated=1):typeof e==`object`&&e&&e.$$typeof===ie&&(e._payload.status===`fulfilled`?m(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function m(e){return typeof e==`object`&&!!e&&e.$$typeof===g}var h=d(),g=Symbol.for(`react.transitional.element`),_=Symbol.for(`react.portal`),v=Symbol.for(`react.fragment`),y=Symbol.for(`react.strict_mode`),b=Symbol.for(`react.profiler`),x=Symbol.for(`react.consumer`),ee=Symbol.for(`react.context`),te=Symbol.for(`react.forward_ref`),ne=Symbol.for(`react.suspense`),S=Symbol.for(`react.suspense_list`),re=Symbol.for(`react.memo`),ie=Symbol.for(`react.lazy`),C=Symbol.for(`react.activity`),ae=Symbol.for(`react.client.reference`),w=h.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,T=Object.prototype.hasOwnProperty,oe=Array.isArray,E=console.createTask?console.createTask:function(){return null};h={react_stack_bottom_frame:function(e){return e()}};var se,ce={},le=h.react_stack_bottom_frame.bind(h,o)(),ue=E(i(o)),de={};e.Fragment=v,e.jsxDEV=function(e,t,n,r){var a=1e4>w.recentlyCreatedOwnerStacks++;return f(e,t,n,r,a?Error(`react-stack-top-frame`):le,a?E(i(e)):ue)}})()})),St=o(((e,t)=>{t.exports=xt()})),j=St(),Ct=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/shell/Rail.tsx`;function wt(e){return[{key:`sessions`,label:`Sessions`,route:{name:`sessions`,projectId:e},icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`rect`,{x:`3`,y:`3.5`,width:`14`,height:`13`,rx:`2.5`},void 0,!1,{fileName:Ct,lineNumber:35,columnNumber:9},this),(0,j.jsxDEV)(`path`,{d:`M6.5 8h7M6.5 11.5h4.5`},void 0,!1,{fileName:Ct,lineNumber:36,columnNumber:9},this)]},void 0,!0,{fileName:Ct,lineNumber:34,columnNumber:7},this)},{key:`reviews`,label:`Reviews`,route:{name:`reviews`,projectId:e},icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`path`,{d:`M3.5 4.5h13v9h-7.5L6 16.5v-3H3.5z`},void 0,!1,{fileName:Ct,lineNumber:46,columnNumber:9},this),(0,j.jsxDEV)(`path`,{d:`M7 8h6M7 10.75h3.5`},void 0,!1,{fileName:Ct,lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:Ct,lineNumber:45,columnNumber:7},this)},{key:`packages`,label:`Packages`,route:{name:`packages`,projectId:e},icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`path`,{d:`M10 2.8 16.5 6v8L10 17.2 3.5 14V6z`},void 0,!1,{fileName:Ct,lineNumber:57,columnNumber:9},this),(0,j.jsxDEV)(`path`,{d:`M3.5 6 10 9.4 16.5 6M10 9.4v7.8`},void 0,!1,{fileName:Ct,lineNumber:58,columnNumber:9},this)]},void 0,!0,{fileName:Ct,lineNumber:56,columnNumber:7},this)},{key:`settings`,label:`Settings`,route:{name:`settings`,projectId:e},icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`circle`,{cx:`10`,cy:`10`,r:`2.6`},void 0,!1,{fileName:Ct,lineNumber:68,columnNumber:9},this),(0,j.jsxDEV)(`path`,{d:`M10 2.6v2M10 15.4v2M2.6 10h2M15.4 10h2M4.8 4.8l1.4 1.4M13.8 13.8l1.4 1.4M15.2 4.8l-1.4 1.4M6.2 13.8l-1.4 1.4`},void 0,!1,{fileName:Ct,lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:Ct,lineNumber:67,columnNumber:7},this)}]}function Tt({route:e,projectId:t,card:n,onNavigate:r,onOpenPalette:i,onOpenHub:a,onSwitchProject:o,live:s}){let c=n?.name??`Project`;return(0,j.jsxDEV)(`nav`,{className:`rail`,"aria-label":`Primary`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`rail__hub`,onClick:a,title:`All projects (⇧⌘H)`,children:[(0,j.jsxDEV)(`svg`,{viewBox:`0 0 24 24`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`path`,{d:`M12 3.2 20 7.6v8.8L12 20.8 4 16.4V7.6z`},void 0,!1,{fileName:Ct,lineNumber:100,columnNumber:11},this),(0,j.jsxDEV)(`path`,{d:`M12 8.4v7.2`},void 0,!1,{fileName:Ct,lineNumber:101,columnNumber:11},this)]},void 0,!0,{fileName:Ct,lineNumber:99,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`visually-hidden`,children:`All projects`},void 0,!1,{fileName:Ct,lineNumber:103,columnNumber:9},this)]},void 0,!0,{fileName:Ct,lineNumber:98,columnNumber:7},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`rail__project rail__project--${n?.color??`indigo`}`,onClick:o,title:`${c}${n?` — ${n.directory}`:``}\nSwitch project (⌘P)`,children:[(0,j.jsxDEV)(`span`,{className:`rail__monogram`,children:yt(c)},void 0,!1,{fileName:Ct,lineNumber:112,columnNumber:9},this),(0,j.jsxDEV)(`svg`,{className:`rail__chevron`,viewBox:`0 0 12 12`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M3 4.5 6 7.5 9 4.5`},void 0,!1,{fileName:Ct,lineNumber:114,columnNumber:11},this)},void 0,!1,{fileName:Ct,lineNumber:113,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`visually-hidden`,children:[`Switch project — currently `,c]},void 0,!0,{fileName:Ct,lineNumber:116,columnNumber:9},this)]},void 0,!0,{fileName:Ct,lineNumber:106,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`rail__items`,children:wt(t).map(t=>{let n=t.route.name===e.name||t.key===`reviews`&&e.name===`review`||t.key===`sessions`&&e.name===`session`;return(0,j.jsxDEV)(`button`,{type:`button`,className:`rail__item${n?` is-active`:``}`,onClick:()=>r(t.route),title:t.label,"aria-current":n?`page`:void 0,children:[t.icon,(0,j.jsxDEV)(`span`,{className:`visually-hidden`,children:t.label},void 0,!1,{fileName:Ct,lineNumber:137,columnNumber:15},this)]},t.key,!0,{fileName:Ct,lineNumber:128,columnNumber:13},this)})},void 0,!1,{fileName:Ct,lineNumber:119,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`rail__foot`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`rail__item`,onClick:i,title:`Command palette (⌘K)`,children:[(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`rect`,{x:`3`,y:`4.5`,width:`14`,height:`11`,rx:`2.5`},void 0,!1,{fileName:Ct,lineNumber:146,columnNumber:13},this),(0,j.jsxDEV)(`path`,{d:`M6.5 9 8.6 11 6.5 13M11 13h3`},void 0,!1,{fileName:Ct,lineNumber:147,columnNumber:13},this)]},void 0,!0,{fileName:Ct,lineNumber:145,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`visually-hidden`,children:`Command palette`},void 0,!1,{fileName:Ct,lineNumber:149,columnNumber:11},this)]},void 0,!0,{fileName:Ct,lineNumber:144,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`rail__live rail__live--${s}`,title:s===`live`?`Live — watching for changes`:s===`connecting`?`Connecting…`:`Disconnected — retrying`},void 0,!1,{fileName:Ct,lineNumber:151,columnNumber:9},this)]},void 0,!0,{fileName:Ct,lineNumber:143,columnNumber:7},this)]},void 0,!0,{fileName:Ct,lineNumber:97,columnNumber:5},this)}var Et=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ui/SelectCheckbox.tsx`;function Dt({checked:e,label:t,disabled:n,onChange:r}){return(0,j.jsxDEV)(`input`,{type:`checkbox`,className:`select-box`,"aria-label":t,checked:e,disabled:n,onClick:e=>e.stopPropagation(),onChange:e=>{let t=e.nativeEvent;r(e.target.checked,{range:t.shiftKey===!0})}},void 0,!1,{fileName:Et,lineNumber:20,columnNumber:5},this)}function Ot({state:e,label:t,disabled:n,onChange:r}){let i=(0,k.useRef)(null);return(0,k.useEffect)(()=>{i.current&&(i.current.indeterminate=e===`some`)},[e]),(0,j.jsxDEV)(`input`,{ref:i,type:`checkbox`,className:`select-box`,"aria-label":t,"aria-checked":e===`some`?`mixed`:e===`all`,checked:e===`all`,disabled:n,onClick:e=>e.stopPropagation(),onChange:()=>r(e!==`all`)},void 0,!1,{fileName:Et,lineNumber:55,columnNumber:5},this)}var kt=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ui/StatusGlyph.tsx`;function At({status:e,kind:t=`plan`,size:n=10}){return(0,j.jsxDEV)(`span`,{className:`glyph glyph--${e}${t===`review`?` glyph--kind-review`:``}`,style:{width:n,height:n},"aria-hidden":`true`,children:[(e===`in-progress`||e===`planning`)&&(0,j.jsxDEV)(`span`,{className:`glyph__pulse`},void 0,!1,{fileName:kt,lineNumber:41,columnNumber:63},this),e===`review`&&(0,j.jsxDEV)(`span`,{className:`glyph__ring`},void 0,!1,{fileName:kt,lineNumber:42,columnNumber:31},this),e===`executed`&&(0,j.jsxDEV)(`svg`,{className:`glyph__check`,viewBox:`0 0 10 10`,focusable:`false`,children:(0,j.jsxDEV)(`path`,{d:`M2.2 5.2 4.1 7 7.8 3.2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`},void 0,!1,{fileName:kt,lineNumber:45,columnNumber:11},this)},void 0,!1,{fileName:kt,lineNumber:44,columnNumber:9},this)]},void 0,!0,{fileName:kt,lineNumber:36,columnNumber:5},this)}var jt=[`reviewing`,`triage`,`fixes`,`done`],Mt={reviewing:`Reviewing`,triage:`Triage`,fixes:`Fixes`,done:`Done`};function Nt(e,t){return e.kind===`review`?Ft(e.status,t):Pt(e.status)}function Pt(e){switch(e){case`draft`:return{label:`Draft`,holder:`you`,hint:`No plan yet — paste the execute line to have an agent write one.`,action:{kind:`copy-execute`}};case`planning`:return{label:`Planning`,holder:`agent`,hint:`An agent is reading the task and writing the plan.`,action:{kind:`none`}};case`planned`:return{label:`Planned`,holder:`you`,hint:`A plan is written and waiting for your go-ahead.`,action:{kind:`write-plan`}};case`in-progress`:return{label:`Building`,holder:`agent`,hint:`An agent is implementing this plan.`,action:{kind:`none`}};case`executed`:return{label:`Done`,holder:`you`,hint:`The work is finished — this is the moment a review is worth asking for.`,action:{kind:`request-review`}};default:return{label:`Review`,holder:`you`,hint:`This plan session claims the review status, which only a review session may hold.`,action:{kind:`none`}}}}function Ft(e,t){let n=t?.counts,r=t?.status===`published`;switch(e){case`draft`:return{label:`Awaiting reviewer`,holder:`agent`,hint:`Paste the execute line into a NEW conversation — a fresh agent has not seen the plan.`,action:{kind:`copy-execute`},step:`reviewing`};case`planning`:return{label:`Reviewing`,holder:`agent`,hint:`An agent is reading the diff and writing the review document.`,action:{kind:`none`},step:`reviewing`};case`in-progress`:return{label:`Fixing`,holder:`agent`,hint:`An agent is implementing the comments you staged.`,action:{kind:`none`},step:`fixes`};case`review`:return n&&n.open===0?{label:`Triaged`,holder:`you`,hint:`Every comment is decided — plan the changes, or publish them to GitLab.`,action:{kind:`triage`,openCount:0},step:`triage`}:{label:n?`Triage · ${n.open}`:`Triage`,holder:`you`,hint:n?`${n.open} of ${n.total} comment(s) still need a decision.`:`Every comment is waiting for a decision.`,action:{kind:`triage`,openCount:n?.open??0},step:`triage`};case`planned`:return{label:`Fixes planned`,holder:`you`,hint:`The comments you staged are written into the Plan — paste the execute line to implement them.`,action:{kind:`copy-execute`},step:`fixes`};case`executed`:return r?{label:`Published`,holder:`you`,hint:`The staged comments are on the merge request — nothing left to implement here.`,action:{kind:`none`},step:`done`}:n&&n.staged===0&&n.total>0?{label:`Closed`,holder:`you`,hint:`Every comment was discarded, so there was nothing to implement.`,action:{kind:`none`},step:`done`}:{label:`Fixed`,holder:`you`,hint:`The staged comments have been implemented.`,action:{kind:`none`},step:`done`};default:return{label:`Review`,holder:`you`,hint:`Unknown review stage.`,action:{kind:`none`},step:`reviewing`}}}function It(e,t){let n=jt.indexOf(e),r=jt.indexOf(t);return n===r?0:n<r?-1:1}var Lt=[`in-progress`,`planning`,`review`,`draft`,`planned`,`executed`],Rt={"in-progress":`Building`,planning:`Planning`,review:`Review`,draft:`Draft`,planned:`Planned`,executed:`Done`},zt=Lt.filter(e=>e!==`review`),Bt="`Review` is set by writing a review, and cleared by planning its changes or publishing them.",Vt=[`blocker`,`major`,`minor`,`nit`,`praise`],Ht={blocker:`Blocker`,major:`Major`,minor:`Minor`,nit:`Nit`,praise:`Praise`},Ut=[`correctness`,`security`,`performance`,`architecture`,`test`,`docs`,`style`],Wt=[`agents`,`skills`,`commands`,`rules`,`contexts`,`instructions`],Gt=[`claude`,`codex`,`cursor`,`aider`,`copilot`],Kt=[`indigo`,`violet`,`plum`,`teal`,`sand`,`rose`,`sky`,`moss`],qt=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ui/StatusPill.tsx`;function Jt({status:e,kind:t=`plan`,review:n,onChange:r,onTriage:i,disabled:a}){let[o,s]=(0,k.useState)(!1),c=(0,k.useRef)(null);(0,k.useEffect)(()=>{if(!o)return;let e=e=>{c.current?.contains(e.target)||s(!1)},t=e=>{e.key===`Escape`&&s(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[o]);let l=Nt({kind:t,status:e},n),u=`pill pill--${e}${t===`review`?` pill--kind-review`:``}`;if(e===`review`&&i)return(0,j.jsxDEV)(`button`,{type:`button`,className:`${u} pill--interactive`,onClick:i,disabled:a,title:l.hint,children:[(0,j.jsxDEV)(At,{status:e,kind:t},void 0,!1,{fileName:qt,lineNumber:69,columnNumber:9},this),l.label]},void 0,!0,{fileName:qt,lineNumber:62,columnNumber:7},this);if(!r)return(0,j.jsxDEV)(`span`,{className:u,title:l.hint,children:[(0,j.jsxDEV)(At,{status:e,kind:t},void 0,!1,{fileName:qt,lineNumber:78,columnNumber:9},this),l.label]},void 0,!0,{fileName:qt,lineNumber:77,columnNumber:7},this);let d=t===`review`?Lt:zt;return(0,j.jsxDEV)(`div`,{className:`pill-menu`,ref:c,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`${u} pill--interactive`,onClick:()=>s(e=>!e),disabled:a,title:l.hint,"aria-haspopup":`menu`,"aria-expanded":o,children:[(0,j.jsxDEV)(At,{status:e,kind:t},void 0,!1,{fileName:qt,lineNumber:99,columnNumber:9},this),l.label,(0,j.jsxDEV)(`svg`,{className:`pill__caret`,viewBox:`0 0 10 10`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M2.5 4 5 6.5 7.5 4`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`,strokeLinejoin:`round`},void 0,!1,{fileName:qt,lineNumber:102,columnNumber:11},this)},void 0,!1,{fileName:qt,lineNumber:101,columnNumber:9},this)]},void 0,!0,{fileName:qt,lineNumber:90,columnNumber:7},this),o&&(0,j.jsxDEV)(`div`,{className:`pill-menu__list`,role:`menu`,children:[d.map(i=>{let a=i===`review`,o=Nt({kind:t,status:i},n).label;return(0,j.jsxDEV)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":i===e,"aria-disabled":a||void 0,title:a?"`Review` is set by writing a review, and cleared by planning its changes or publishing them.":void 0,className:`pill-menu__item${i===e?` is-active`:``}${a?` is-locked`:``}`,onClick:()=>{a||(s(!1),i!==e&&r(i))},children:[(0,j.jsxDEV)(At,{status:i,kind:t},void 0,!1,{fileName:qt,lineNumber:129,columnNumber:17},this),o,a&&(0,j.jsxDEV)(`span`,{className:`pill-menu__lock`,"aria-hidden":`true`,title:"`Review` is set by writing a review, and cleared by planning its changes or publishing them.",children:`🔒`},void 0,!1,{fileName:qt,lineNumber:132,columnNumber:19},this)]},i,!0,{fileName:qt,lineNumber:113,columnNumber:15},this)}),t===`review`&&(0,j.jsxDEV)(`p`,{className:`pill-menu__note`,children:"`Review` is set by writing a review, and cleared by planning its changes or publishing them."},void 0,!1,{fileName:qt,lineNumber:140,columnNumber:33},this)]},void 0,!0,{fileName:qt,lineNumber:108,columnNumber:9},this)]},void 0,!0,{fileName:qt,lineNumber:89,columnNumber:5},this)}var Yt=[[60,1,`s`],[3600,60,`m`],[86400,3600,`h`],[2592e3,86400,`d`]];function Xt(e){let t=new Date(e).getTime();if(Number.isNaN(t))return`—`;let n=Math.max(0,Math.round((Date.now()-t)/1e3));if(n<10)return`just now`;for(let[e,t,r]of Yt)if(n<e)return`${Math.floor(n/t)}${r} ago`;return new Date(t).toLocaleDateString(void 0,{month:`short`,day:`numeric`})}function Zt(e){let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString()}function Qt(e){return e<1024?`${e} B`:e<1048576?`${(e/1024).toFixed(1)} KB`:`${(e/1024/1024).toFixed(1)} MB`}function $t(e,t){if(t.length===0)return 0;let n=e.toLowerCase(),r=t.toLowerCase(),i=0,a=0,o=0;for(let e of r){let t=n.indexOf(e,a);if(t===-1)return null;o=t===a?o+1:0,i+=10+o*6,(t===0||/[\s\-_/.]/.test(n[t-1]))&&(i+=8),i-=Math.min(t-a,12),a=t+1}return i-n.length*.05}async function en(e){try{return await navigator.clipboard.writeText(e),!0}catch{return!1}}function tn(e,t=46){if(e.length<=t)return e;let n=e.split(`/`),r=[],i=1;for(let e=n.length-1;e>=0;--e){let a=i+n[e].length+1;if(a>t&&r.length>0)break;r.unshift(n[e]),i=a}return`…/${r.join(`/`)}`}var nn=[`.xml`,`.md`];function rn(e){let t=e.split(`/`).pop()??e,n=nn.find(e=>t.toLowerCase().endsWith(e));return n?t.slice(0,-n.length):t}function an(e,t,n){return e.filter(e=>(t===`all`||e.status===t)&&(n===`all`||e.severity===n))}function on(e,t){let n=e.findIndex(e=>e.id===t);return(n===-1?e:[...e.slice(n+1),...e.slice(0,n)]).find(e=>e.id!==t&&e.status===`open`)}function sn(e,t){let n={},r=t.title.trim();return r!==e.title&&(n.title=r),t.body!==e.body&&(n.body=t.body),t.severity!==e.severity&&(n.severity=t.severity),t.category!==e.category&&(n.category=t.category),n}function cn(e){if(e.total===0)return{kind:`empty`,label:`This review has no comments.`};if(e.open>0)return{kind:`blocked`,openCount:e.open,label:`${e.open} still need${e.open===1?`s`:``} a decision`};let t=`Ready · ${e.staged} staged · ${e.discarded} discarded`;return e.staged===0?{kind:`ready`,action:`close`,label:t}:{kind:`ready`,action:`plan`,label:t}}function ln(e,t,n,r){if(!(e===`none`||!t))return`${e}://file/${t}/${n}:${r??1}`}function un(e,t){if(e.reviewFile){let n=rn(e.reviewFile),r=t.find(e=>e.slug===n);if(r)return r}return t.find(t=>t.sessionId===e.id)}function dn(e,t){return un(e,t)?.counts}function fn(e,t=[]){let n=new Map;for(let r of e)n.set(r.id,{session:r,review:un(r,t),children:[],contextOnly:!1});let r=[],i=[],a=[];for(let t of e){let e=n.get(t.id);if(t.kind!==`review`){r.push(e);continue}if(!t.parent){i.push(e);continue}let o=n.get(t.parent);if(o){o.children.push(e);continue}a.push(e)}return{roots:r,standalone:i,orphaned:a}}function pn(e,t){let n=e=>{let n=e.children.filter(e=>t.has(e.session.id)),r=t.has(e.session.id);if(!(!r&&n.length===0))return{...e,contextOnly:!r,children:r?e.children:n}};return{roots:e.roots.map(n).filter(mn),standalone:e.standalone.map(n).filter(mn),orphaned:e.orphaned.map(n).filter(mn)}}function mn(e){return e!==void 0}function hn(e,t){let n=[];for(let r of e.roots){let e=r.children.length,i=e>0,a=i&&!t.has(r.session.id);if(n.push({kind:`session`,node:r,depth:0,hasChildren:i,expanded:a,childCount:e}),a)for(let e of r.children)n.push({kind:`session`,node:e,depth:1,hasChildren:!1,expanded:!1,childCount:0})}for(let t of[{id:`standalone`,nodes:e.standalone},{id:`orphaned`,nodes:e.orphaned}])if(t.nodes.length!==0){n.push({kind:`group`,id:t.id,count:t.nodes.length});for(let e of t.nodes)n.push({kind:`session`,node:e,depth:1,hasChildren:!1,expanded:!1,childCount:0})}return n}var gn=new Set;function _n(e,t,n,r){let i=fn(e,n);return t?hn(pn(i,t),gn):hn(i,r)}function vn(e){return e.filter(e=>e.kind===`session`).map(e=>e.node.session)}var yn=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/SessionTree.tsx`;function bn({sessions:e,allSessions:t,reviews:n,focusedId:r,onFocus:i,onOpen:a,onStatusChange:o,filter:s,collapsed:c,onToggleCollapsed:l,selection:u}){let d=(0,k.useRef)(null),f=s.trim().length>0,p=(0,k.useMemo)(()=>f?new Set(e.map(e=>e.id)):void 0,[f,e]),m=(0,k.useMemo)(()=>_n(t,p,n,c),[t,p,n,c]);(0,k.useEffect)(()=>{d.current?.scrollIntoView({block:`nearest`})},[r]);let h=(0,k.useCallback)(e=>l(e),[l]),g=(0,k.useMemo)(()=>{let e=fn(t,n);return new Set(e.roots.filter(e=>e.children.length>0).map(e=>e.session.id))},[t,n]);return(0,k.useEffect)(()=>{let e=e=>{if(!r||!g.has(r))return;let t=e.target;if(t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`)||e.key!==`ArrowLeft`&&e.key!==`ArrowRight`)return;let n=!c.has(r);(e.key===`ArrowRight`&&!n||e.key===`ArrowLeft`&&n)&&(e.preventDefault(),h(r))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[r,g,c,h]),m.length===0?(0,j.jsxDEV)(`div`,{className:`page-state`,children:`Nothing matches this filter.`},void 0,!1,{fileName:yn,lineNumber:104,columnNumber:12},this):(0,j.jsxDEV)(`div`,{className:`list${u.count>0?` is-selecting`:``}`,children:(0,j.jsxDEV)(`table`,{className:`list__table tree`,role:`treegrid`,"aria-label":`Sessions and their reviews`,children:[(0,j.jsxDEV)(`thead`,{children:(0,j.jsxDEV)(`tr`,{children:[(0,j.jsxDEV)(`th`,{scope:`col`,className:`list__select`,children:(0,j.jsxDEV)(Ot,{state:u.headerState,label:`Select every session on screen`,onChange:e=>e?u.selectAll():u.clear()},void 0,!1,{fileName:yn,lineNumber:113,columnNumber:15},this)},void 0,!1,{fileName:yn,lineNumber:112,columnNumber:13},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Session`},void 0,!1,{fileName:yn,lineNumber:119,columnNumber:13},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Stage`},void 0,!1,{fileName:yn,lineNumber:120,columnNumber:13},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Updated`},void 0,!1,{fileName:yn,lineNumber:121,columnNumber:13},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Size`},void 0,!1,{fileName:yn,lineNumber:122,columnNumber:13},this)]},void 0,!0,{fileName:yn,lineNumber:111,columnNumber:11},this)},void 0,!1,{fileName:yn,lineNumber:110,columnNumber:9},this),(0,j.jsxDEV)(`tbody`,{children:m.map(e=>{if(e.kind===`group`){let t=e.id===`standalone`;return(0,j.jsxDEV)(`tr`,{className:`tree__group tree__group--${e.id}`,children:(0,j.jsxDEV)(`td`,{colSpan:5,children:[(0,j.jsxDEV)(`span`,{className:`tree__group-title`,children:[t?`Standalone reviews`:`Orphaned reviews`,` (`,e.count,`)`]},void 0,!0,{fileName:yn,lineNumber:132,columnNumber:21},this),(0,j.jsxDEV)(`span`,{className:`tree__group-hint`,children:t?`Reviews of a branch on its own — deliberately tied to no session.`:`The session these reviewed is gone. Open one to link it to another.`},void 0,!1,{fileName:yn,lineNumber:135,columnNumber:21},this)]},void 0,!0,{fileName:yn,lineNumber:131,columnNumber:19},this)},e.id,!1,{fileName:yn,lineNumber:130,columnNumber:17},this)}let{node:t,depth:n,hasChildren:s,expanded:c,childCount:l}=e,f=t.session,p=u.isSelected(f.id),m=f.kind===`review`&&f.status===`executed`;return(0,j.jsxDEV)(`tr`,{ref:f.id===r?d:void 0,role:`row`,"aria-level":n+1,"aria-expanded":s?c:void 0,className:[n===1?`tree__row--child`:`tree__row--root`,f.kind===`review`?`tree__row--review`:``,m?`is-settled`:``,t.contextOnly?`is-context`:``,f.id===r?`is-focused`:``,p?`is-selected`:``].filter(Boolean).join(` `),"aria-selected":p,onClick:()=>{i(f.id),a(f.id)},children:[(0,j.jsxDEV)(`td`,{className:`list__select`,onClick:e=>e.stopPropagation(),children:(0,j.jsxDEV)(Dt,{checked:p,label:`Select ${f.title}`,onChange:(e,t)=>{i(f.id),u.toggle(f.id,t)}},void 0,!1,{fileName:yn,lineNumber:173,columnNumber:19},this)},void 0,!1,{fileName:yn,lineNumber:172,columnNumber:17},this),(0,j.jsxDEV)(`td`,{children:(0,j.jsxDEV)(`div`,{className:`tree__cell`,children:[n===0?(0,j.jsxDEV)(`button`,{type:`button`,className:`tree__twisty${s?``:` is-empty`}`,"aria-label":c?`Collapse`:`Expand`,tabIndex:s?0:-1,onClick:e=>{e.stopPropagation(),s&&h(f.id)},children:s?c?`▾`:`▸`:``},void 0,!1,{fileName:yn,lineNumber:188,columnNumber:23},this):(0,j.jsxDEV)(`span`,{className:`tree__elbow`,"aria-hidden":`true`,children:`└─`},void 0,!1,{fileName:yn,lineNumber:201,columnNumber:23},this),(0,j.jsxDEV)(`div`,{className:`tree__identity`,children:[(0,j.jsxDEV)(`div`,{className:`list__title`,children:[f.kind===`review`&&(0,j.jsxDEV)(`span`,{className:`tree__kicker`,children:[`Review`,f.branch&&(0,j.jsxDEV)(`span`,{className:`tree__branch`,children:f.branch},void 0,!1,{fileName:yn,lineNumber:209,columnNumber:48},this)]},void 0,!0,{fileName:yn,lineNumber:207,columnNumber:27},this),f.title,s&&!c&&(0,j.jsxDEV)(`span`,{className:`tree__child-count`,title:`Show the reviews of this session`,children:[l,` review`,l===1?``:`s`]},void 0,!0,{fileName:yn,lineNumber:217,columnNumber:27},this),f.issue&&(0,j.jsxDEV)(`a`,{className:`tree__issue`,href:f.issue.url,target:`_blank`,rel:`noreferrer`,title:`Open ${f.issue.key} in Linear`,onClick:e=>e.stopPropagation(),children:f.issue.key},void 0,!1,{fileName:yn,lineNumber:228,columnNumber:27},this)]},void 0,!0,{fileName:yn,lineNumber:205,columnNumber:23},this),f.excerpt.length>0&&!f.excerpt.startsWith(f.title.replace(/…$/,``).trim())&&(0,j.jsxDEV)(`div`,{className:`list__excerpt`,children:f.excerpt},void 0,!1,{fileName:yn,lineNumber:242,columnNumber:27},this)]},void 0,!0,{fileName:yn,lineNumber:204,columnNumber:21},this)]},void 0,!0,{fileName:yn,lineNumber:186,columnNumber:19},this)},void 0,!1,{fileName:yn,lineNumber:185,columnNumber:17},this),(0,j.jsxDEV)(`td`,{onClick:e=>e.stopPropagation(),children:(0,j.jsxDEV)(Jt,{status:f.status,kind:f.kind,review:t.review,onChange:e=>o(f.id,e),onTriage:()=>{i(f.id),a(f.id)}},void 0,!1,{fileName:yn,lineNumber:248,columnNumber:19},this)},void 0,!1,{fileName:yn,lineNumber:247,columnNumber:17},this),(0,j.jsxDEV)(`td`,{className:`list__meta`,title:f.updated,children:Xt(f.updated)},void 0,!1,{fileName:yn,lineNumber:256,columnNumber:17},this),(0,j.jsxDEV)(`td`,{className:`list__meta`,children:Qt(f.sizeBytes)},void 0,!1,{fileName:yn,lineNumber:257,columnNumber:17},this)]},f.id,!0,{fileName:yn,lineNumber:153,columnNumber:15},this)})},void 0,!1,{fileName:yn,lineNumber:125,columnNumber:9},this)]},void 0,!0,{fileName:yn,lineNumber:109,columnNumber:7},this)},void 0,!1,{fileName:yn,lineNumber:108,columnNumber:5},this)}var xn=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ui/BulkBar.tsx`;function Sn({count:e,hiddenCount:t,noun:n,busy:r,onClear:i,children:a}){return(0,j.jsxDEV)(`div`,{className:`bulkbar`,role:`region`,"aria-label":`Bulk actions`,children:[(0,j.jsxDEV)(`div`,{className:`bulkbar__summary`,children:[(0,j.jsxDEV)(`span`,{className:`bulkbar__count`,"aria-live":`polite`,children:[(0,j.jsxDEV)(`strong`,{children:e},void 0,!1,{fileName:xn,lineNumber:27,columnNumber:11},this),` `,n,e===1?``:`s`,` selected`]},void 0,!0,{fileName:xn,lineNumber:26,columnNumber:9},this),t>0&&(0,j.jsxDEV)(`span`,{className:`bulkbar__hint`,title:`These stay selected — the filter is only hiding them.`,children:[t,` hidden by filter`]},void 0,!0,{fileName:xn,lineNumber:31,columnNumber:11},this)]},void 0,!0,{fileName:xn,lineNumber:25,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`bulkbar__actions`,children:a},void 0,!1,{fileName:xn,lineNumber:40,columnNumber:7},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,disabled:r,onClick:i,children:[`Clear `,(0,j.jsxDEV)(`kbd`,{className:`bulkbar__key`,children:`esc`},void 0,!1,{fileName:xn,lineNumber:43,columnNumber:15},this)]},void 0,!0,{fileName:xn,lineNumber:42,columnNumber:7},this)]},void 0,!0,{fileName:xn,lineNumber:24,columnNumber:5},this)}var Cn=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ui/ConfirmDialog.tsx`;function wn({title:e,body:t,confirmLabel:n=`Discard`,cancelLabel:r=`Cancel`,tone:i=`danger`,onConfirm:a,onCancel:o}){let s=(0,k.useRef)(null),c=(0,k.useId)(),l=(0,k.useId)();return(0,k.useEffect)(()=>{s.current?.focus()},[]),(0,j.jsxDEV)(`div`,{className:`modal__confirm`,role:`alertdialog`,"aria-modal":`true`,"aria-labelledby":c,"aria-describedby":l,onKeyDown:e=>{e.key===`Escape`&&(e.stopPropagation(),e.preventDefault(),o())},children:(0,j.jsxDEV)(`div`,{className:`modal__confirm-card`,children:[(0,j.jsxDEV)(`h3`,{id:c,className:`modal__confirm-title`,children:e},void 0,!1,{fileName:Cn,lineNumber:60,columnNumber:9},this),(0,j.jsxDEV)(`p`,{id:l,className:`modal__text`,children:t},void 0,!1,{fileName:Cn,lineNumber:61,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`modal__confirm-actions`,children:[(0,j.jsxDEV)(`button`,{ref:s,type:`button`,className:`button button--ghost`,onClick:o,children:r},void 0,!1,{fileName:Cn,lineNumber:63,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--${i}`,onClick:a,children:n},void 0,!1,{fileName:Cn,lineNumber:66,columnNumber:11},this)]},void 0,!0,{fileName:Cn,lineNumber:62,columnNumber:9},this)]},void 0,!0,{fileName:Cn,lineNumber:59,columnNumber:7},this)},void 0,!1,{fileName:Cn,lineNumber:44,columnNumber:5},this)}var Tn=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ui/Modal.tsx`,En=(0,k.createContext)(void 0);function Dn(){let e=(0,k.useContext)(En);if(!e)throw Error(`useModalClose must be used inside a <Modal>`);return e}var On=`a[href], button, input, select, textarea, [tabindex]`;function kn(e){return Array.from(e.querySelectorAll(On)).filter(e=>e.hasAttribute(`disabled`)||e.getAttribute(`aria-hidden`)===`true`||e.getAttribute(`tabindex`)===`-1`?!1:!(e instanceof HTMLInputElement&&e.type===`hidden`))}function An(e){let t=e.querySelector(`[data-autofocus]`);if(t)return t;let n=e.querySelector(`.modal__body`);return(n?kn(n)[0]:void 0)??e}function jn({title:e,onClose:t,children:n,footer:r,width:i=560,dirty:a=!1,confirmClose:o,closeOnOverlayClick:s=!0}){let c=(0,k.useRef)(null),[l,u]=(0,k.useState)(!1),d=(0,k.useId)(),f=(0,k.useRef)(t),p=(0,k.useRef)(a),m=(0,k.useRef)(l);(0,k.useEffect)(()=>{f.current=t,p.current=a,m.current=l});let h=(0,k.useRef)(null),g=(0,k.useRef)(!1),_=(0,k.useCallback)(e=>{if(!p.current){f.current();return}e!==`overlay`&&u(!0)},[]);(0,k.useEffect)(()=>{let e=c.current;if(!e)return;let t=document.activeElement instanceof HTMLElement?document.activeElement:null,n=An(e);n.focus(),h.current=n;let r=e=>{if(e.key===`Escape`){if(e.stopPropagation(),m.current){u(!1);return}_(`escape`)}},i=t=>{let n=t.target instanceof HTMLElement?t.target:null;if(n&&e.contains(n)){n.closest(`.modal__confirm`)||(h.current=n);return}g.current||(t.relatedTarget===null||n===document.body)&&(g.current=!0,(h.current?.isConnected?h.current:An(e)).focus(),g.current=!1)},a=()=>{document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)||(h.current?.isConnected?h.current:An(e)).focus()};return document.addEventListener(`keydown`,r),document.addEventListener(`focusin`,i),window.addEventListener(`focus`,a),()=>{document.removeEventListener(`keydown`,r),document.removeEventListener(`focusin`,i),window.removeEventListener(`focus`,a),t?.isConnected&&t.focus()}},[_]);let v=e=>{if(e.key!==`Tab`||!c.current)return;let t=kn(c.current);if(t.length===0)return;let n=t[0],r=t[t.length-1],i=document.activeElement;if(e.shiftKey&&(i===n||i===c.current)){e.preventDefault(),r.focus();return}!e.shiftKey&&i===r&&(e.preventDefault(),n.focus())},y=()=>{u(!1),h.current?.isConnected&&h.current.focus()},b=(0,k.useCallback)(()=>_(`button`),[_]);return(0,j.jsxDEV)(En.Provider,{value:b,children:(0,j.jsxDEV)(`div`,{className:`overlay`,onMouseDown:e=>{e.target===e.currentTarget&&s&&_(`overlay`)},children:(0,j.jsxDEV)(`div`,{className:`modal`,style:{maxWidth:i},role:`dialog`,"aria-modal":`true`,"aria-labelledby":d,tabIndex:-1,ref:c,onKeyDown:v,children:[(0,j.jsxDEV)(`header`,{className:`modal__header`,children:[(0,j.jsxDEV)(`h2`,{className:`modal__title`,id:d,children:e},void 0,!1,{fileName:Tn,lineNumber:235,columnNumber:13},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`icon-button`,onClick:b,"aria-label":`Close`,children:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 14 14`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M3.5 3.5l7 7M10.5 3.5l-7 7`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`},void 0,!1,{fileName:Tn,lineNumber:238,columnNumber:17},this)},void 0,!1,{fileName:Tn,lineNumber:237,columnNumber:15},this)},void 0,!1,{fileName:Tn,lineNumber:236,columnNumber:13},this)]},void 0,!0,{fileName:Tn,lineNumber:234,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`modal__body`,children:n},void 0,!1,{fileName:Tn,lineNumber:242,columnNumber:11},this),r&&(0,j.jsxDEV)(`footer`,{className:`modal__footer`,children:r},void 0,!1,{fileName:Tn,lineNumber:243,columnNumber:22},this),l&&(0,j.jsxDEV)(wn,{title:o?.title??`Discard what you typed?`,body:o?.body??`This dialog holds text that has not been submitted. Closing it loses that text.`,confirmLabel:o?.confirmLabel??`Discard`,cancelLabel:o?.cancelLabel??`Keep editing`,onConfirm:()=>{u(!1),f.current()},onCancel:y},void 0,!1,{fileName:Tn,lineNumber:246,columnNumber:13},this)]},void 0,!0,{fileName:Tn,lineNumber:224,columnNumber:9},this)},void 0,!1,{fileName:Tn,lineNumber:216,columnNumber:7},this)},void 0,!1,{fileName:Tn,lineNumber:215,columnNumber:5},this)}var Mn=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ui/Toasts.tsx`,Nn=(0,k.createContext)(()=>void 0);function Pn(){return(0,k.useContext)(Nn)}var Fn=3400;function In({children:e}){let[t,n]=(0,k.useState)([]),r=(0,k.useCallback)((e,t=`info`)=>{let r=Date.now()+Math.random();n(n=>[...n,{id:r,message:e,tone:t}]),setTimeout(()=>n(e=>e.filter(e=>e.id!==r)),Fn)},[]),i=(0,k.useMemo)(()=>r,[r]);return(0,j.jsxDEV)(Nn.Provider,{value:i,children:[e,(0,j.jsxDEV)(`div`,{className:`toasts`,role:`status`,"aria-live":`polite`,children:t.map(e=>(0,j.jsxDEV)(`div`,{className:`toast toast--${e.tone}`,children:e.message},e.id,!1,{fileName:Mn,lineNumber:35,columnNumber:11},this))},void 0,!1,{fileName:Mn,lineNumber:33,columnNumber:7},this)]},void 0,!0,{fileName:Mn,lineNumber:31,columnNumber:5},this)}function Ln(){if(typeof document>`u`)return``;let e=document.querySelector(`meta[name="invariant-ui-token"]`)?.content??``;return e.startsWith(`__`)?``:e}var Rn=Ln(),zn=class extends Error{status;code;detail;constructor(e,t,n,r={code:t,message:n}){super(n),this.status=e,this.code=t,this.detail=r,this.name=`ApiError`}get isConflict(){return this.status===409&&this.code.endsWith(`CONFLICT`)}get isMergeConflict(){return this.code===`SESSION_MERGE_CONFLICT`}get isNotTriaged(){return this.code===`REVIEW_NOT_TRIAGED`}get transcript(){return this.detail.transcript}get commandLine(){return this.detail.commandLine}get openCount(){return this.detail.openCount??0}};async function Bn(e,t={}){let n=await fetch(e,{...t,headers:{"Content-Type":`application/json`,Authorization:`Bearer ${Rn}`,...t.headers??{}}});if(!n.ok){let e=await n.json().catch(()=>void 0);throw new zn(n.status,e?.error.code??`UNKNOWN`,e?.error.message??`Request failed with ${n.status}.`,e?.error)}if(n.status!==204)return await n.json()}function Vn(e){return{...e,tags:e.tags??[],issues:e.issues??[],reviewSessionIds:e.reviewSessionIds??[]}}function Hn(e){let t=(t,n={})=>Bn(`/api/p/${encodeURIComponent(e)}${t.replace(/^\/api/,``)}`,n);return{projectId:e,project:()=>t(`/api/project`),listSessions:async()=>{let e=await t(`/api/sessions`);return{...e,sessions:(e.sessions??[]).map(Vn)}},getSession:async e=>Vn(await t(`/api/sessions/${e}`)),saveSession:async e=>{let n=await t(`/api/sessions/${e.sessionId}`,{method:`PUT`,headers:e.force?{}:{"If-Match":e.etag},body:JSON.stringify({body:e.body,baseBody:e.baseBody,force:e.force===!0})});return{session:Vn(n.session),merged:n.merged}},stashSessionBody:e=>t(`/api/sessions/${e.sessionId}/stash`,{method:`POST`,body:JSON.stringify({body:e.body})}),setStatus:async e=>Vn(await t(`/api/sessions/${e.sessionId}/status`,{method:`PATCH`,body:JSON.stringify({status:e.status,summary:e.summary})})),createSession:async e=>{let n=await t(`/api/sessions`,{method:`POST`,body:JSON.stringify(e)});return{...n,session:Vn(n.session)}},linkReviewParent:async e=>Vn(await t(`/api/sessions/${e.sessionId}/parent`,{method:`PATCH`,body:JSON.stringify({parentSessionId:e.parentSessionId})})),archiveSession:e=>t(`/api/sessions/${e}`,{method:`DELETE`}),migrateHeader:async e=>({migrated:((await t(e?`/api/sessions/${e}/migrate-header`:`/api/sessions/migrate-header`,{method:`POST`})).migrated??[]).map(Vn)}),git:()=>t(`/api/git`),listReviews:()=>t(`/api/reviews`),getReview:e=>t(`/api/reviews/${e}`),archiveReview:e=>t(`/api/reviews/${e}`,{method:`DELETE`}),requestReview:async e=>{let n=await t(`sessionId`in e?`/api/sessions/${e.sessionId}/review`:`/api/reviews`,{method:`POST`,body:JSON.stringify(`sessionId`in e?{base:e.base}:{standalone:!0,base:e.base})});return{...n,session:Vn(n.session)}},updateComment:e=>t(`/api/reviews/${e.slug}/comments/${e.commentId}`,{method:`PATCH`,headers:{"If-Match":e.etag},body:JSON.stringify({status:e.status,expectedStatus:e.expectedStatus,severity:e.severity,category:e.category,title:e.title,body:e.body})}),bulkUpdateComments:e=>t(`/api/reviews/${e.slug}/comments/bulk`,{method:`POST`,headers:{"If-Match":e.etag},body:JSON.stringify({ids:e.ids,status:e.status,expectedStatus:e.expectedStatus})}),planReviewChanges:async e=>{let n=await t(`/api/reviews/${e}/plan-changes`,{method:`POST`});return{...n,session:Vn(n.session)}},publishPreflight:(e,n)=>{let r=n?`?mergeRequestIid=${n}`:``;return t(`/api/reviews/${e}/publish/preflight${r}`)},publishReview:async e=>await t(`/api/reviews/${e.slug}/publish`,{method:`POST`,body:JSON.stringify({mergeRequestIid:e.mergeRequestIid,dryRun:e.dryRun,only:e.only})}),publisherSettings:()=>t(`/api/settings/publisher`),savePublisherSettings:e=>t(`/api/settings/publisher`,{method:`PUT`,body:JSON.stringify(e)}),removePublisherSettings:()=>t(`/api/settings/publisher`,{method:`DELETE`}),testPublisherSettings:()=>t(`/api/settings/publisher/test`,{method:`POST`}),integrations:()=>t(`/api/integrations`),linearSettings:()=>t(`/api/integrations/linear`),saveLinearSettings:e=>t(`/api/integrations/linear`,{method:`PUT`,body:JSON.stringify(e)}),removeLinearSettings:()=>t(`/api/integrations/linear`,{method:`DELETE`}),testLinearSettings:()=>t(`/api/integrations/linear/test`,{method:`POST`}),searchIssues:e=>{let n=new URLSearchParams({q:e.query});return e.teamKey&&n.set(`team`,e.teamKey),e.limit!==void 0&&n.set(`limit`,String(e.limit)),t(`/api/integrations/linear/issues?${n.toString()}`)},sessionIssue:e=>t(`/api/sessions/${e}/issue`),linkSessionIssue:async e=>Vn(await t(`/api/sessions/${e.sessionId}/issue`,{method:`POST`,body:JSON.stringify({reference:e.reference})})),unlinkSessionIssue:async e=>Vn(await t(`/api/sessions/${e}/issue`,{method:`DELETE`})),pullIssueSpec:async e=>Vn(await t(`/api/sessions/${e.sessionId}/issue/pull`,{method:`POST`,body:JSON.stringify({force:e.force===!0})})),pushIssueSpec:e=>t(`/api/sessions/${e.sessionId}/issue/push`,{method:`POST`,body:JSON.stringify({force:e.force===!0})}),targetSettings:()=>t(`/api/settings/targets`),saveTargetSettings:e=>t(`/api/settings/targets`,{method:`PUT`,body:JSON.stringify({targets:e})}),source:e=>{let n=new URLSearchParams({path:e.path});return e.line!==void 0&&n.set(`line`,String(e.line)),e.radius!==void 0&&n.set(`radius`,String(e.radius)),t(`/api/source?${n.toString()}`)},packages:()=>t(`/api/packages`),package:e=>t(`/api/packages/${Wn(e)}`),registryPackages:()=>t(`/api/registry/packages`),skillCatalog:(e,n)=>t(`/api/skills?view=${e}&page=${n}`),searchSkills:(e,n)=>{let r=new URLSearchParams({q:e});return n&&r.set(`owner`,n),t(`/api/skills/search?${r.toString()}`)},skillDetail:e=>t(`/api/skills/${encodeURIComponent(e.owner)}/${encodeURIComponent(e.repo)}/${encodeURIComponent(e.slug)}`),installPackage:e=>t(`/api/packages`,{method:`POST`,body:JSON.stringify(e)}),uninstallPackage:e=>t(`/api/packages/${Wn(e)}`,{method:`DELETE`}),applyPackageItems:e=>t(`/api/packages/${Wn(e.packageName)}/items`,{method:`POST`,body:JSON.stringify({add:e.add,remove:e.remove,all:e.all,sync:e.sync})}),sync:(e={})=>t(`/api/sync`,{method:`POST`,body:JSON.stringify(e)})}}var Un={projects:()=>Bn(`/api/projects`),preferences:()=>Bn(`/api/preferences`),saveTheme:e=>Bn(`/api/preferences/appearance`,{method:`PUT`,body:JSON.stringify({theme:e})}),project:(e,t={})=>Bn(`/api/projects/${encodeURIComponent(e)}${t.includeGit?`?include=git`:``}`),addProject:e=>Bn(`/api/projects`,{method:`POST`,body:JSON.stringify({path:e})}),updateProject:(e,t)=>Bn(`/api/projects/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)}),createGroup:(e,t)=>Bn(`/api/project-groups`,{method:`POST`,body:JSON.stringify({name:e,color:t})}),updateGroup:(e,t)=>Bn(`/api/project-groups/${encodeURIComponent(e)}`,{method:`PATCH`,body:JSON.stringify(t)}),deleteGroup:e=>Bn(`/api/project-groups/${encodeURIComponent(e)}`,{method:`DELETE`}),removeProject:e=>Bn(`/api/projects/${encodeURIComponent(e)}`,{method:`DELETE`}),markOpened:e=>Bn(`/api/projects/${encodeURIComponent(e)}/open`,{method:`POST`}),instance:()=>Bn(`/api/instance`),shutdown:()=>Bn(`/api/shutdown`,{method:`POST`}),eventsUrl:(e=[])=>{let t=new URLSearchParams({token:Rn});return e.length>0&&t.set(`projects`,e.join(`,`)),`/api/events?${t.toString()}`}};function Wn(e){return encodeURIComponent(e)}var Gn=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/lib/project-context.tsx`,Kn=(0,k.createContext)(void 0);function qn({projectId:e,card:t,children:n}){let r=(0,k.useMemo)(()=>({projectId:e,card:t,api:Hn(e)}),[e,t]);return(0,j.jsxDEV)(Kn.Provider,{value:r,children:n},void 0,!1,{fileName:Gn,lineNumber:38,columnNumber:10},this)}function Jn(){let e=(0,k.useContext)(Kn);if(!e)throw Error(`This component must be rendered inside a ProjectProvider.`);return e}function M(){return Jn().api}function Yn(){return Jn().projectId}var Xn={projects:[`projects`],project:e=>[`projects`,e],instance:[`instance`],preferences:[`preferences`]};function Zn(e){let t=[`p`,e];return{root:t,project:[...t,`project`],sessions:[...t,`sessions`],session:e=>[...t,`session`,e],git:[...t,`git`],reviews:[...t,`reviews`],review:e=>[...t,`review`,e],packages:[...t,`packages`],package:e=>[...t,`package`,e],registry:[...t,`registry`],skillCatalog:(e,n)=>[...t,`skills`,e,n],skillSearch:(e,n)=>[...t,`skills`,`search`,e,n??``],skillDetail:(e,n,r)=>[...t,`skills`,`detail`,e,n,r],publisherSettings:[...t,`settings`,`publisher`],integrations:[...t,`integrations`],linearSettings:[...t,`integrations`,`linear`],issueSearch:e=>[...t,`integrations`,`linear`,`search`,e],sessionIssue:e=>[...t,`session`,e,`issue`],targetSettings:[...t,`settings`,`targets`],publishPreflight:(e,n)=>[...t,`publish-preflight`,e,n??0]}}function N(){let e=Yn();return(0,k.useMemo)(()=>Zn(e),[e])}function Qn(){let e=M();return gt({queryKey:N().project,queryFn:e.project,staleTime:6e4})}function $n(){let e=M();return gt({queryKey:N().sessions,queryFn:e.listSessions})}function er(e){let t=M();return gt({queryKey:N().session(e??``),queryFn:()=>t.getSession(e),enabled:e!==void 0})}function tr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.setStatus,onSuccess:e=>{n.setQueryData(t.session(e.id),e),n.invalidateQueries({queryKey:t.sessions})}})}function nr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.saveSession,onSuccess:({session:e})=>{n.setQueryData(t.session(e.id),e),n.invalidateQueries({queryKey:t.sessions})}})}function rr(){return _t({mutationFn:M().stashSessionBody})}function ir(){let e=M(),t=N(),n=A();return _t({mutationFn:e.createSession,onSuccess:()=>n.invalidateQueries({queryKey:t.sessions})})}function ar(){let e=M(),t=N(),n=A();return _t({mutationFn:e.linkReviewParent,onSuccess:e=>{n.setQueryData(t.session(e.id),e),n.invalidateQueries({queryKey:t.sessions})}})}function or(){let e=M(),t=N(),n=A();return _t({mutationFn:e.archiveSession,onSuccess:()=>n.invalidateQueries({queryKey:t.sessions})})}function sr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.archiveReview,onSuccess:()=>{n.invalidateQueries({queryKey:t.reviews}),n.invalidateQueries({queryKey:t.sessions})}})}function cr(){let e=M(),t=N(),n=A();return _t({mutationFn:t=>e.migrateHeader(t),onSuccess:()=>n.invalidateQueries({queryKey:t.sessions})})}function lr(){let e=M();return gt({queryKey:N().git,queryFn:e.git,staleTime:15e3})}function ur(){let e=M();return gt({queryKey:N().reviews,queryFn:e.listReviews})}function dr(e){let t=M();return gt({queryKey:N().review(e??``),queryFn:()=>t.getReview(e),enabled:e!==void 0})}function fr(e,t,n){e.setQueryData(t.review(n.slug),n),e.invalidateQueries({queryKey:t.reviews}),n.sessionId&&e.invalidateQueries({queryKey:t.session(n.sessionId)})}function pr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.updateComment,onSuccess:e=>fr(n,t,e)})}function mr(){let e=M(),t=N(),n=A();return _t({mutationFn:t=>e.bulkUpdateComments(t),onSuccess:e=>fr(n,t,e)})}function hr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.requestReview,onSuccess:()=>{n.invalidateQueries({queryKey:t.sessions}),n.invalidateQueries({queryKey:t.reviews})}})}function gr(){let e=M(),t=N(),n=A();return _t({mutationFn:t=>e.planReviewChanges(t),onSuccess:e=>{fr(n,t,e.review),n.setQueryData(t.session(e.session.id),e.session),n.invalidateQueries({queryKey:t.sessions})}})}function _r(e,t,n=!0){let r=M();return gt({queryKey:N().publishPreflight(e??``,t),queryFn:()=>r.publishPreflight(e,t),enabled:n&&e!==void 0,retry:!1,gcTime:0,staleTime:0})}function vr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.publishReview,onSuccess:e=>{e.dryRun||(fr(n,t,e.review),e.session&&(n.setQueryData(t.session(e.session.id),e.session),n.invalidateQueries({queryKey:t.sessions})))}})}function yr(){let e=M();return gt({queryKey:N().publisherSettings,queryFn:e.publisherSettings})}function br(){let e=M(),t=N(),n=A();return _t({mutationFn:e.savePublisherSettings,onSuccess:e=>n.setQueryData(t.publisherSettings,e)})}function xr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.removePublisherSettings,onSuccess:e=>n.setQueryData(t.publisherSettings,e)})}function Sr(){return _t({mutationFn:M().testPublisherSettings})}function Cr(){let e=M();return gt({queryKey:N().integrations,queryFn:e.integrations,staleTime:6e4})}function wr(e){let{data:t}=Cr();return(t?.integrations??[]).some(t=>t.configured&&t.capabilities.includes(e))}function Tr(){let e=M();return gt({queryKey:N().linearSettings,queryFn:e.linearSettings})}function Er(){let e=M(),t=N(),n=A();return _t({mutationFn:e.saveLinearSettings,onSuccess:e=>{n.setQueryData(t.linearSettings,e),n.invalidateQueries({queryKey:t.integrations})}})}function Dr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.removeLinearSettings,onSuccess:e=>{n.setQueryData(t.linearSettings,e),n.invalidateQueries({queryKey:t.integrations})}})}function Or(){let e=M(),t=N(),n=A();return _t({mutationFn:e.testLinearSettings,onSuccess:()=>void n.invalidateQueries({queryKey:t.linearSettings})})}function kr(e,t=!0){let n=M(),r=N(),i=e.trim();return gt({queryKey:r.issueSearch(i),queryFn:()=>n.searchIssues({query:i}),enabled:t&&i.length>=2,staleTime:3e4,retry:!1})}function Ar(e,t=!0){let n=M();return gt({queryKey:N().sessionIssue(e??``),queryFn:()=>n.sessionIssue(e),enabled:t&&e!==void 0,staleTime:15e3,retry:!1})}function jr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.linkSessionIssue,onSuccess:e=>Fr(n,t,e)})}function Mr(){let e=M(),t=N(),n=A();return _t({mutationFn:t=>e.unlinkSessionIssue(t),onSuccess:e=>Fr(n,t,e)})}function Nr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.pullIssueSpec,onSuccess:e=>Fr(n,t,e)})}function Pr(){let e=M(),t=N(),n=A();return _t({mutationFn:e.pushIssueSpec,onSuccess:e=>Fr(n,t,e.session)})}function Fr(e,t,n){e.setQueryData(t.session(n.id),n),e.invalidateQueries({queryKey:t.sessions}),e.invalidateQueries({queryKey:t.sessionIssue(n.id)})}function Ir(){let e=M();return gt({queryKey:N().targetSettings,queryFn:e.targetSettings})}function Lr(){let e=M(),t=N(),n=A();return _t({mutationFn:t=>e.saveTargetSettings(t),onSuccess:e=>{n.setQueryData(t.targetSettings,e.settings),n.invalidateQueries({queryKey:t.project}),n.invalidateQueries({queryKey:t.packages})}})}function Rr(){let e=M();return gt({queryKey:N().packages,queryFn:e.packages})}function zr(e,t,n=!0){let r=M();return gt({queryKey:N().skillCatalog(e,t),queryFn:()=>r.skillCatalog(e,t),enabled:n,retry:!1,staleTime:3e5})}function Br(e,t){let n=M(),r=N(),i=e.trim();return gt({queryKey:r.skillSearch(i,t),queryFn:()=>n.searchSkills(i,t),enabled:i.length>=2,retry:!1,staleTime:6e4})}function Vr(e){let t=M();return gt({queryKey:N().skillDetail(e?.owner??``,e?.repo??``,e?.slug??``),queryFn:()=>t.skillDetail(e),enabled:e!==void 0,retry:!1,staleTime:6e5})}function Hr(e,t,n){e.invalidateQueries({queryKey:t.packages}),n&&e.invalidateQueries({queryKey:t.package(n)}),e.invalidateQueries({queryKey:t.project})}function Ur(){let e=M(),t=N(),n=A();return _t({mutationFn:e.installPackage,onSuccess:e=>Hr(n,t,e.package?.name)})}function Wr(){let e=M(),t=N(),n=A();return _t({mutationFn:t=>e.uninstallPackage(t),onSuccess:()=>Hr(n,t)})}function Gr(){let e=M(),t=N(),n=A();return _t({mutationFn:t=>e.applyPackageItems(t),onSuccess:e=>{n.setQueryData(t.package(e.package.name),e.package),Hr(n,t,e.package.name)}})}function Kr(){let e=M(),t=N(),n=A();return _t({mutationFn:t=>e.sync(t),onSuccess:e=>{e.checked||n.invalidateQueries({queryKey:t.packages})}})}var qr=[`session.created`,`session.updated`,`session.deleted`,`session.status.changed`,`session.title.changed`,`session.saved`,`session.step.completed`,`session.parent.linked`,`session.issue.linked`,`session.issue.unlinked`,`session.issue.pulled`,`session.issue.pushed`,`session.header.migrated`,`session.archived`],Jr=[`review.created`,`review.updated`,`review.deleted`,`review.comment.decided`,`review.comment.edited`,`review.plan-changes.applied`,`review.published`,`review.archived`];function Yr(){let e=Yn(),t=N(),n=A(),[r,i]=(0,k.useState)(`connecting`);return(0,k.useEffect)(()=>{let r=new EventSource(Un.eventsUrl([e])),a=t=>{try{let n=JSON.parse(t.data);return n.projectId&&n.projectId!==e?void 0:n}catch{return{}}},o=e=>{let r=a(e);r&&(n.invalidateQueries({queryKey:t.sessions}),r.sessionId&&n.invalidateQueries({queryKey:t.session(r.sessionId)}))},s=e=>{let r=a(e);r&&(n.invalidateQueries({queryKey:t.reviews}),n.invalidateQueries({queryKey:t.sessions}),r.slug&&n.invalidateQueries({queryKey:t.review(r.slug)}))};r.onopen=()=>i(`live`),r.onerror=()=>i(`offline`);for(let e of qr)r.addEventListener(e,o);for(let e of Jr)r.addEventListener(e,s);r.addEventListener(`packages.changed`,e=>{a(e)&&(n.invalidateQueries({queryKey:t.packages}),n.invalidateQueries({queryKey:t.project}),n.invalidateQueries({queryKey:[...t.root,`package`]}))}),r.addEventListener(`projects.changed`,()=>{n.invalidateQueries({queryKey:Xn.projects})});let c=()=>{n.invalidateQueries({queryKey:t.sessions}),n.invalidateQueries({queryKey:t.reviews}),n.invalidateQueries({queryKey:t.packages})};return window.addEventListener(`focus`,c),()=>{r.close(),window.removeEventListener(`focus`,c)}},[n,t,e]),r}function Xr(e={}){return gt({queryKey:Xn.projects,queryFn:Un.projects,staleTime:3e3,refetchInterval:e.poll!==!1&&15e3})}function Zr(){return gt({queryKey:Xn.preferences,queryFn:Un.preferences,staleTime:3e4,refetchOnWindowFocus:!0})}function Qr(){let e=A();return _t({mutationFn:e=>Un.saveTheme(e),onSuccess:t=>e.setQueryData(Xn.preferences,e=>e&&{...e,...t})})}function $r(){return gt({queryKey:Xn.instance,queryFn:Un.instance,staleTime:3e4})}function ei(){let e=A();return _t({mutationFn:e=>Un.addProject(e),onSuccess:()=>e.invalidateQueries({queryKey:Xn.projects})})}function ti(){let e=A();return _t({mutationFn:e=>Un.removeProject(e),onSuccess:(t,n)=>{e.invalidateQueries({queryKey:Xn.projects}),e.removeQueries({queryKey:[`p`,n]})}})}function ni(){let e=A();return _t({mutationFn:e=>Un.updateProject(e.projectId,{displayName:e.displayName,groupId:e.groupId,color:e.color}),onSuccess:()=>e.invalidateQueries({queryKey:Xn.projects})})}function ri(){let e=A();return _t({mutationFn:e=>Un.createGroup(e.name,e.color),onSuccess:()=>e.invalidateQueries({queryKey:Xn.projects})})}function ii(){let e=A();return _t({mutationFn:e=>Un.deleteGroup(e),onSuccess:()=>e.invalidateQueries({queryKey:Xn.projects})})}function ai(){let e=A();return _t({mutationFn:e=>Un.updateGroup(e.groupId,{name:e.name,color:e.color,collapsed:e.collapsed,order:e.order}),onMutate:async t=>{await e.cancelQueries({queryKey:Xn.projects});let n=e.getQueryData(Xn.projects);return n&&e.setQueryData(Xn.projects,{...n,groups:n.groups.map(e=>e.id===t.groupId?{...e,name:t.name??e.name,color:t.color??e.color,collapsed:t.collapsed??e.collapsed}:e)}),{previous:n}},onError:(t,n,r)=>{r?.previous&&e.setQueryData(Xn.projects,r.previous)},onSettled:()=>e.invalidateQueries({queryKey:Xn.projects})})}var oi=3e4;function si(){let e=A();return(0,k.useCallback)((t,n)=>{Un.markOpened(t).catch(()=>void 0),!(!n||n===t)&&(e.cancelQueries({queryKey:[`p`,n]}),window.setTimeout(()=>{e.removeQueries({queryKey:[`p`,n]})},oi))},[e])}async function ci(e,t,n={}){let r=Math.max(1,n.concurrency??4),i={ok:[],failed:[]},a=0;return await Promise.all(Array.from({length:Math.min(r,e.length)},async()=>{for(;a<e.length;){let n=e[a++];try{i.ok.push({id:n,value:await t(n)})}catch(e){i.failed.push({id:n,error:e instanceof Error?e:Error(String(e))})}}})),i}function li(e,t){let n=e.ok.length+e.failed.length,r=`${t.noun}${n===1?``:`s`}`;if(e.failed.length===0)return{message:`${t.done} ${n} ${r}`,tone:`success`};let i=e.failed[0].error.message;if(e.ok.length===0){let e=n===1?`the ${r}`:`any of the ${n} ${r}`;return{message:`Could not ${t.doing} ${e} — ${i}`,tone:`danger`}}return{message:`${t.done} ${e.ok.length} of ${n} — ${e.failed.length} failed: ${i}`,tone:`danger`}}function ui(e,t){let n={eligible:[],locked:[],unchanged:[]};for(let r of e)r.status===`review`?n.locked.push(r):r.status===t?n.unchanged.push(r):n.eligible.push(r);return n}function di(e){let t=new Set(e.map(e=>e.id));return e.filter(e=>e.kind===`plan`).reduce((e,n)=>e+n.reviewSessionIds.filter(e=>!t.has(e)).length,0)}var fi=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/SessionBulkBar.tsx`;function pi({sessions:e,count:t,hiddenCount:n,onClear:r,onNarrow:i,pendingStatus:a,onPendingStatusHandled:o,archiveRequested:s,onArchiveRequestHandled:c}){let l=Pn(),u=tr(),d=or(),[f,p]=(0,k.useState)(!1),[m,h]=(0,k.useState)(!1),[g,_]=(0,k.useState)(!1),v=(0,k.useRef)(null),y=e.filter(e=>e.status!==`review`).length,b=di(e);(0,k.useEffect)(()=>{if(!f)return;let e=e=>{v.current?.contains(e.target)||p(!1)},t=e=>{e.key===`Escape`&&(e.stopPropagation(),p(!1))};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[f]);let x=async n=>{p(!1);let a=ui(e,n),o=Nt({kind:`plan`,status:n}).label;if(a.eligible.length===0){l(a.locked.length>0?`Nothing to change — ${a.locked.length===t?`every`:`the rest of the`} selected session is in Review. ${Bt}`:`Already ${o.toLowerCase()}.`,`info`);return}_(!0);let s=await ci(a.eligible.map(e=>e.id),e=>u.mutateAsync({sessionId:e,status:n}));if(s.failed.length===0){let e=a.locked.length;l(`Moved ${s.ok.length} to ${o}`+(e>0?` · ${e} left in Review`:``),e>0?`info`:`success`),r()}else{let{message:e,tone:t}=li(s,{done:`Moved`,doing:`move`,noun:`session`});l(e,t),i(s.failed.map(e=>e.id))}_(!1)},ee=async()=>{h(!1),_(!0);let t=await ci(e.map(e=>e.id),e=>d.mutateAsync(e)),{message:n,tone:a}=li(t,{done:`Archived`,doing:`archive`,noun:`session`});l(n,a),t.failed.length===0?r():i(t.failed.map(e=>e.id)),_(!1)},te=(0,k.useRef)(x);return te.current=x,(0,k.useEffect)(()=>{a&&(o(),te.current(a))},[a,o]),(0,k.useEffect)(()=>{s&&(c(),h(!0))},[s,c]),(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(Sn,{count:t,hiddenCount:n,noun:`session`,busy:g,onClear:r,children:[(0,j.jsxDEV)(`div`,{className:`pill-menu bulkbar__menu`,ref:v,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:g||y===0,title:y===0?Bt:void 0,"aria-haspopup":`menu`,"aria-expanded":f,onClick:()=>p(e=>!e),children:g?`Moving…`:`Set status`},void 0,!1,{fileName:fi,lineNumber:159,columnNumber:11},this),f&&(0,j.jsxDEV)(`div`,{className:`pill-menu__list pill-menu__list--up`,role:`menu`,children:[zt.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,role:`menuitem`,className:`pill-menu__item`,onClick:()=>void x(e),children:[(0,j.jsxDEV)(At,{status:e},void 0,!1,{fileName:fi,lineNumber:181,columnNumber:19},this),Nt({kind:`plan`,status:e}).label]},e,!0,{fileName:fi,lineNumber:174,columnNumber:17},this)),y<t&&(0,j.jsxDEV)(`p`,{className:`pill-menu__note`,children:[t-y,` of these sit in Review. `,"`Review` is set by writing a review, and cleared by planning its changes or publishing them."]},void 0,!0,{fileName:fi,lineNumber:186,columnNumber:17},this)]},void 0,!0,{fileName:fi,lineNumber:172,columnNumber:13},this)]},void 0,!0,{fileName:fi,lineNumber:158,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--danger`,disabled:g||t===0,onClick:()=>h(!0),children:g?`Working…`:`Archive`},void 0,!1,{fileName:fi,lineNumber:194,columnNumber:9},this)]},void 0,!0,{fileName:fi,lineNumber:157,columnNumber:7},this),m&&(0,j.jsxDEV)(jn,{title:`Archive ${t} session${t===1?``:`s`}?`,onClose:()=>h(!1),footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:()=>h(!1),children:`Cancel`},void 0,!1,{fileName:fi,lineNumber:210,columnNumber:15},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--danger`,onClick:()=>void ee(),children:`Archive`},void 0,!1,{fileName:fi,lineNumber:217,columnNumber:15},this)]},void 0,!0,{fileName:fi,lineNumber:209,columnNumber:13},this),children:[(0,j.jsxDEV)(`p`,{className:`modal__text`,children:[`The files move to `,(0,j.jsxDEV)(`code`,{children:`.invariant/sessions/.archive/`},void 0,!1,{fileName:fi,lineNumber:224,columnNumber:31},this),` and stay readable on disk.`]},void 0,!0,{fileName:fi,lineNumber:223,columnNumber:11},this),b>0&&(0,j.jsxDEV)(`p`,{className:`modal__text modal__text--muted`,children:[b,` review`,b===1?``:`s`,` of this work `,b===1?`is`:`are`,` `,`not in the selection, and will be left orphaned on the Reviews page.`]},void 0,!0,{fileName:fi,lineNumber:227,columnNumber:13},this)]},void 0,!0,{fileName:fi,lineNumber:205,columnNumber:9},this)]},void 0,!0,{fileName:fi,lineNumber:156,columnNumber:5},this)}var mi=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/ConflictBanner.tsx`;function hi({conflictCount:e,onOpenMerge:t,onKeepMine:n,onTakeTheirs:r}){return(0,j.jsxDEV)(`div`,{className:`banner banner--warning`,role:`alert`,children:[(0,j.jsxDEV)(`div`,{className:`banner__text`,children:[(0,j.jsxDEV)(`strong`,{children:`The agent changed the same lines you did.`},void 0,!1,{fileName:mi,lineNumber:33,columnNumber:9},this),` `,e===1?`1 spot needs`:`${e} spots need`,` your call — everything else was merged.`]},void 0,!0,{fileName:mi,lineNumber:32,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`banner__actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:t,children:`Open the merge`},void 0,!1,{fileName:mi,lineNumber:38,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:n,children:`Keep mine`},void 0,!1,{fileName:mi,lineNumber:41,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:()=>{window.confirm(`Discard your edits and take the version on disk?`)&&r()},children:`Take theirs`},void 0,!1,{fileName:mi,lineNumber:44,columnNumber:9},this)]},void 0,!0,{fileName:mi,lineNumber:37,columnNumber:7},this)]},void 0,!0,{fileName:mi,lineNumber:31,columnNumber:5},this)}var gi=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/ReviewPanel.tsx`;function _i({session:e,onOpenSession:t,onToast:n}){let{data:r}=lr(),{data:i}=$n(),{data:a}=ur(),o=hr(),s=(i?.sessions??[]).filter(t=>t.parent===e.id),c=a?.reviews??[];if(s.length>0){let e=s.reduce((e,t)=>e+(dn(t,c)?.open??0),0);return(0,j.jsxDEV)(`div`,{className:`banner banner--review`,children:(0,j.jsxDEV)(`div`,{className:`banner__text`,children:[(0,j.jsxDEV)(`strong`,{children:e>0?`${e} comment${e===1?``:`s`} waiting on you.`:`Reviewed.`},void 0,!1,{fileName:gi,lineNumber:44,columnNumber:11},this),` `,s.length===1?`One review session points at this work.`:`${s.length} review sessions point at this work.`,(0,j.jsxDEV)(`ul`,{className:`review-links`,children:s.map(e=>(0,j.jsxDEV)(`li`,{className:`review-links__item`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:()=>t(e.id),children:e.branch??e.title},void 0,!1,{fileName:gi,lineNumber:56,columnNumber:17},this),(0,j.jsxDEV)(Jt,{status:e.status,kind:e.kind,review:un(e,c)},void 0,!1,{fileName:gi,lineNumber:63,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`review-links__time`,title:e.updated,children:Xt(e.updated)},void 0,!1,{fileName:gi,lineNumber:68,columnNumber:17},this)]},e.id,!0,{fileName:gi,lineNumber:55,columnNumber:15},this))},void 0,!1,{fileName:gi,lineNumber:53,columnNumber:11},this)]},void 0,!0,{fileName:gi,lineNumber:43,columnNumber:9},this)},void 0,!1,{fileName:gi,lineNumber:42,columnNumber:7},this)}let l=r!==void 0&&!r.canReview;return(0,j.jsxDEV)(`div`,{className:`banner banner--review`,children:[(0,j.jsxDEV)(`div`,{className:`banner__text`,children:[(0,j.jsxDEV)(`strong`,{children:`No review yet.`},void 0,!1,{fileName:gi,lineNumber:84,columnNumber:9},this),` `,l?r?.reason:r?.branch?`A fresh agent can read the ${r.changedFileCount}-file diff on ${r.branch} without seeing this plan.`:`A fresh agent can read the diff without seeing this plan.`]},void 0,!0,{fileName:gi,lineNumber:83,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`banner__actions`,children:(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:l||o.isPending,title:l?r?.reason:void 0,onClick:()=>o.mutate({sessionId:e.id},{onSuccess:async e=>{await en(e.executeLine),n(e.guidance,`success`),t(e.session.id)},onError:e=>n(e instanceof Error?e.message:`Could not create the review.`,`danger`)}),children:o.isPending?`Creating…`:`Request review`},void 0,!1,{fileName:gi,lineNumber:92,columnNumber:9},this)},void 0,!1,{fileName:gi,lineNumber:91,columnNumber:7},this)]},void 0,!0,{fileName:gi,lineNumber:82,columnNumber:5},this)}var vi=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/ReviewStageStrip.tsx`;function yi({status:e,review:t,onTriage:n,onCopyExecuteLine:r}){let i=Nt({kind:`review`,status:e},t),a=t?.counts,o=i.step??`reviewing`;return(0,j.jsxDEV)(`div`,{className:`stage`,children:[(0,j.jsxDEV)(`ol`,{className:`stage__steps`,children:jt.map((e,t)=>{let n=It(e,o);return(0,j.jsxDEV)(`li`,{className:`stage__step${n===0?` is-current`:n<0?` is-done`:``}`,"aria-current":n===0?`step`:void 0,children:[(0,j.jsxDEV)(`span`,{className:`stage__index`,"aria-hidden":`true`,children:t+1},void 0,!1,{fileName:vi,lineNumber:46,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`stage__label`,children:[Mt[e],e===`triage`&&a&&a.open>0&&(0,j.jsxDEV)(`span`,{className:`stage__badge`,children:a.open},void 0,!1,{fileName:vi,lineNumber:50,columnNumber:19},this)]},void 0,!0,{fileName:vi,lineNumber:47,columnNumber:15},this)]},e,!0,{fileName:vi,lineNumber:41,columnNumber:13},this)})},void 0,!1,{fileName:vi,lineNumber:37,columnNumber:7},this),(0,j.jsxDEV)(`p`,{className:`stage__hint`,children:[(0,j.jsxDEV)(`span`,{className:`stage__holder stage__holder--${i.holder}`,children:i.holder===`you`?`Waiting on you`:`Agent working`},void 0,!1,{fileName:vi,lineNumber:59,columnNumber:9},this),i.hint]},void 0,!0,{fileName:vi,lineNumber:58,columnNumber:7},this),i.action.kind===`triage`&&n&&(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:n,children:i.action.openCount===0?`Open the comments`:`Triage ${i.action.openCount} comment${i.action.openCount===1?``:`s`}`},void 0,!1,{fileName:vi,lineNumber:66,columnNumber:9},this),i.action.kind===`copy-execute`&&r&&(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:r,children:`Copy execute line`},void 0,!1,{fileName:vi,lineNumber:76,columnNumber:9},this)]},void 0,!0,{fileName:vi,lineNumber:36,columnNumber:5},this)}var bi=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/LinkParentModal.tsx`;function xi({review:e,candidates:t,busy:n,onClose:r,onLink:i}){let[a,o]=(0,k.useState)(``),[s,c]=(0,k.useState)(),l=(0,k.useMemo)(()=>{let e=a.trim().toLowerCase(),n=t.filter(e=>e.kind!==`review`);return e.length===0?n:n.filter(t=>`${t.title} ${t.excerpt} ${t.tags.join(` `)}`.toLowerCase().includes(e))},[t,a]);return(0,j.jsxDEV)(jn,{title:`Link this review to a session`,onClose:r,dirty:s!==void 0,confirmClose:{title:`Discard this pick?`,body:`You chose a session but have not linked it yet. Closing forgets the choice.`},footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:e.branch??e.title},void 0,!1,{fileName:bi,lineNumber:48,columnNumber:11},this),(0,j.jsxDEV)(Si,{},void 0,!1,{fileName:bi,lineNumber:49,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:!s||n,onClick:()=>{s&&i(s)},children:n?`Linking…`:`Link`},void 0,!1,{fileName:bi,lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:bi,lineNumber:47,columnNumber:9},this),children:[(0,j.jsxDEV)(`p`,{className:`empty__text`,children:[`A review is a verdict on a session's work. Pick the session this one judges — it moves under it in the tree, and its `,(0,j.jsxDEV)(`code`,{children:`<parent>`},void 0,!1,{fileName:bi,lineNumber:63,columnNumber:30},this),` is written into the file.`]},void 0,!0,{fileName:bi,lineNumber:61,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`field`,children:[(0,j.jsxDEV)(`label`,{className:`field__label`,htmlFor:`link-parent-filter`,children:`Find a session`},void 0,!1,{fileName:bi,lineNumber:67,columnNumber:9},this),(0,j.jsxDEV)(`input`,{id:`link-parent-filter`,className:`field__input`,"data-autofocus":!0,value:a,placeholder:`Filter by title…`,onChange:e=>o(e.target.value)},void 0,!1,{fileName:bi,lineNumber:68,columnNumber:9},this)]},void 0,!0,{fileName:bi,lineNumber:66,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`picker`,children:l.length===0?(0,j.jsxDEV)(`p`,{className:`panel__empty`,children:`No session matches.`},void 0,!1,{fileName:bi,lineNumber:80,columnNumber:11},this):l.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,className:`picker__item${s===e.id?` is-active`:``}`,onClick:()=>c(e.id),children:[(0,j.jsxDEV)(`span`,{className:`picker__title`,children:e.title},void 0,!1,{fileName:bi,lineNumber:89,columnNumber:15},this),(0,j.jsxDEV)(Jt,{status:e.status,kind:e.kind},void 0,!1,{fileName:bi,lineNumber:90,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`picker__meta`,children:Xt(e.updated)},void 0,!1,{fileName:bi,lineNumber:91,columnNumber:15},this)]},e.id,!0,{fileName:bi,lineNumber:83,columnNumber:13},this))},void 0,!1,{fileName:bi,lineNumber:78,columnNumber:7},this)]},void 0,!0,{fileName:bi,lineNumber:38,columnNumber:5},this)}function Si(){let e=Dn();return(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:e,children:`Cancel`},void 0,!1,{fileName:bi,lineNumber:104,columnNumber:5},this)}var Ci=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/LinkIssueModal.tsx`,wi=/^(https?:\/\/|[A-Za-z][A-Za-z0-9]{0,9}-\d{1,7}$)/;function Ti({sessionTitle:e,busy:t,onClose:n,onLink:r}){let[i,a]=(0,k.useState)(``),[o,s]=(0,k.useState)(),c=i.trim(),l=wi.test(c),u=kr(c,!l),d=(0,k.useMemo)(()=>u.data?.issues??[],[u.data]);(0,k.useEffect)(()=>{o&&!d.some(e=>e.id===o.id)&&s(void 0)},[d,o]);let f=o?.url??(l?c:``),p=f.length>0&&!t;return(0,j.jsxDEV)(jn,{title:`Link this session to a Linear issue`,onClose:n,dirty:c.length>0,confirmClose:{title:`Discard this?`,body:`You have typed something but have not linked it yet. Closing forgets it.`},footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:e},void 0,!1,{fileName:Ci,lineNumber:61,columnNumber:11},this),(0,j.jsxDEV)(Ei,{},void 0,!1,{fileName:Ci,lineNumber:62,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:!p,onClick:()=>r(f),children:t?`Linking…`:`Link`},void 0,!1,{fileName:Ci,lineNumber:63,columnNumber:11},this)]},void 0,!0,{fileName:Ci,lineNumber:60,columnNumber:9},this),children:[(0,j.jsxDEV)(`p`,{className:`empty__text`,children:`The issue's description becomes this session's spec block — whatever a colleague already wrote is what you start from. Nothing else about the issue is touched, and nothing else about the session is sent.`},void 0,!1,{fileName:Ci,lineNumber:74,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`field`,children:[(0,j.jsxDEV)(`label`,{className:`field__label`,htmlFor:`link-issue-input`,children:`Issue URL, key, or something to search for`},void 0,!1,{fileName:Ci,lineNumber:81,columnNumber:9},this),(0,j.jsxDEV)(`input`,{id:`link-issue-input`,className:`field__input`,"data-autofocus":!0,value:i,placeholder:`https://linear.app/acme/issue/ENG-123 — or ENG-123 — or “cache invalidation”`,onChange:e=>{a(e.target.value),s(void 0)}},void 0,!1,{fileName:Ci,lineNumber:84,columnNumber:9},this),l&&(0,j.jsxDEV)(`span`,{className:`field__hint`,children:[`That looks like an issue. Press `,(0,j.jsxDEV)(`strong`,{children:`Link`},void 0,!1,{fileName:Ci,lineNumber:97,columnNumber:45},this),` — it is resolved before anything is written, and you will be told if there is no such issue.`]},void 0,!0,{fileName:Ci,lineNumber:96,columnNumber:11},this)]},void 0,!0,{fileName:Ci,lineNumber:80,columnNumber:7},this),!l&&c.length>=2&&(0,j.jsxDEV)(`div`,{className:`picker`,children:u.isPending?(0,j.jsxDEV)(`p`,{className:`panel__empty`,children:`Searching…`},void 0,!1,{fileName:Ci,lineNumber:106,columnNumber:13},this):u.isError?(0,j.jsxDEV)(`p`,{className:`panel__empty`,children:u.error instanceof Error?u.error.message:`Linear could not be reached.`},void 0,!1,{fileName:Ci,lineNumber:108,columnNumber:13},this):d.length===0?(0,j.jsxDEV)(`p`,{className:`panel__empty`,children:`No issue matches.`},void 0,!1,{fileName:Ci,lineNumber:112,columnNumber:13},this):d.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,className:`picker__item${o?.id===e.id?` is-active`:``}`,onClick:()=>s(e),children:[(0,j.jsxDEV)(`span`,{className:`picker__key`,children:e.key},void 0,!1,{fileName:Ci,lineNumber:121,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`picker__title`,children:e.title},void 0,!1,{fileName:Ci,lineNumber:122,columnNumber:17},this),e.state&&(0,j.jsxDEV)(`span`,{className:`picker__meta`,children:e.state},void 0,!1,{fileName:Ci,lineNumber:123,columnNumber:33},this),(0,j.jsxDEV)(`span`,{className:`picker__meta`,children:Xt(e.updatedAt)},void 0,!1,{fileName:Ci,lineNumber:124,columnNumber:17},this)]},e.id,!0,{fileName:Ci,lineNumber:115,columnNumber:15},this))},void 0,!1,{fileName:Ci,lineNumber:104,columnNumber:9},this)]},void 0,!0,{fileName:Ci,lineNumber:51,columnNumber:5},this)}function Ei(){let e=Dn();return(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:e,children:`Cancel`},void 0,!1,{fileName:Ci,lineNumber:138,columnNumber:5},this)}var Di=`modulepreload`,Oi=function(e){return`/`+e},ki={},Ai=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e=document.getElementsByTagName(`link`),i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?import.meta.resolve(e):new URL(e,import.meta.url).href}r=o(t.map(t=>{if(t=Oi(t,n),t=s(t),t in ki)return;ki[t]=!0;let r=t.endsWith(`.css`);for(let n=e.length-1;n>=0;n--){let i=e[n];if(i.href===t&&(!r||i.rel===`stylesheet`))return}let i=document.createElement(`link`);if(i.rel=r?`stylesheet`:Di,r||(i.as=`script`),i.crossOrigin=``,i.href=t,a&&i.setAttribute(`nonce`,a),document.head.appendChild(i),r)return new Promise((e,n)=>{i.addEventListener(`load`,e),i.addEventListener(`error`,()=>n(Error(`Unable to preload CSS for ${t}`)))})}))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})},ji=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ui/Markdown.tsx`,Mi=(0,k.lazy)(()=>Ai(()=>import(`./MarkdownBody-BZDzSb5s.js`).then(e=>({default:e.MarkdownBody})),[]));function Ni({source:e,compact:t=!1}){if(e.trim().length===0)return null;let n=`markdown${t?` markdown--compact`:``}`;return(0,j.jsxDEV)(k.Suspense,{fallback:(0,j.jsxDEV)(`div`,{className:`${n} markdown--pending`,children:e},void 0,!1,{fileName:ji,lineNumber:29,columnNumber:25},this),children:(0,j.jsxDEV)(Mi,{source:e,className:n},void 0,!1,{fileName:ji,lineNumber:30,columnNumber:7},this)},void 0,!1,{fileName:ji,lineNumber:29,columnNumber:5},this)}var P=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/IssueSpecPanel.tsx`;function Pi({session:e,spec:t}){let n=Pn(),r=e.issue,{data:i}=Ar(e.id,r!==void 0),{data:a}=Tr(),o=Nr(),s=Pr(),c=Mr(),[l,u]=(0,k.useState)(!1),[d,f]=(0,k.useState)(),[p,m]=(0,k.useState)(!1);if(!r)return null;let h=o.isPending||s.isPending||c.isPending,g=(t?.content??``).trim().length===0,_=(e,t)=>{if(e instanceof zn&&e.code===`ISSUE_SYNC_CONFLICT`){f({direction:t,local:String(e.detail.local??``),remote:String(e.detail.remote??``),message:e.message});return}n(e instanceof Error?e.message:`That did not work.`,`danger`)},v=(t=!1)=>o.mutate({sessionId:e.id,force:t},{onSuccess:()=>{f(void 0),n(`Pulled ${r.key} into the spec`,`success`)},onError:e=>_(e,`pull`)}),y=(t=!1)=>s.mutate({sessionId:e.id,force:t},{onSuccess:e=>{f(void 0),n(`Sent ${Math.max(1,Math.round(e.bytes/100)/10)} KB to ${e.issueKey}`,`success`)},onError:e=>_(e,`push`)});return(0,j.jsxDEV)(`section`,{className:`spec${i?.remote?.changed||i?.local.changed?` spec--drifted`:``}`,children:[(0,j.jsxDEV)(`header`,{className:`spec__head`,children:[(0,j.jsxDEV)(`a`,{className:`spec__key`,href:r.url,target:`_blank`,rel:`noreferrer`,children:r.key},void 0,!1,{fileName:P,lineNumber:101,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`spec__title`,children:i?.remote?.title??`Linear issue`},void 0,!1,{fileName:P,lineNumber:104,columnNumber:9},this),i?.remote?.state&&(0,j.jsxDEV)(`span`,{className:`spec__state`,children:i.remote.state},void 0,!1,{fileName:P,lineNumber:105,columnNumber:34},this),(0,j.jsxDEV)(`span`,{className:`spec__stamp`,children:Ii(i,t)},void 0,!1,{fileName:P,lineNumber:106,columnNumber:9},this)]},void 0,!0,{fileName:P,lineNumber:100,columnNumber:7},this),i?.remoteError&&(0,j.jsxDEV)(`p`,{className:`spec__note`,children:i.remoteError},void 0,!1,{fileName:P,lineNumber:109,columnNumber:30},this),g?(0,j.jsxDEV)(`div`,{className:`spec__empty`,children:[(0,j.jsxDEV)(`p`,{className:`spec__empty-lead`,children:`This issue has no description yet — in Linear or here. Ask an agent to write one, or type it in the editor.`},void 0,!1,{fileName:P,lineNumber:113,columnNumber:11},this),(0,j.jsxDEV)(`pre`,{className:`spec__ghost`,"aria-hidden":`true`,children:a?.issueTemplate??``},void 0,!1,{fileName:P,lineNumber:119,columnNumber:11},this)]},void 0,!0,{fileName:P,lineNumber:112,columnNumber:9},this):(0,j.jsxDEV)(`div`,{className:`spec__body`,children:(0,j.jsxDEV)(Ni,{source:t?.content??``,compact:!0},void 0,!1,{fileName:P,lineNumber:123,columnNumber:11},this)},void 0,!1,{fileName:P,lineNumber:122,columnNumber:9},this),(0,j.jsxDEV)(`footer`,{className:`spec__foot`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:async()=>{let t=`synthesise the plan of ${e.path} into its <issue-spec> block, following the project issue template`;n(await en(t)?`Synthesis line copied`:`Could not copy`,`success`)},children:`Copy synthesis line`},void 0,!1,{fileName:P,lineNumber:128,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`split`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid split__main`,disabled:h||g,title:g?`There is nothing to send yet.`:`Replace ${r.key}'s description`,onClick:()=>y(),children:s.isPending?`Sending…`:`Push to ${r.key}`},void 0,!1,{fileName:P,lineNumber:140,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid split__toggle`,"aria-haspopup":`menu`,"aria-expanded":l,"aria-label":`Other sync actions`,onClick:()=>u(e=>!e),children:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 12 12`,"aria-hidden":`true`,width:`12`,height:`12`,children:(0,j.jsxDEV)(`path`,{d:`M2.5 4.5 6 8l3.5-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},void 0,!1,{fileName:P,lineNumber:158,columnNumber:15},this)},void 0,!1,{fileName:P,lineNumber:157,columnNumber:13},this)},void 0,!1,{fileName:P,lineNumber:149,columnNumber:11},this),l&&(0,j.jsxDEV)(`div`,{className:`split__menu`,role:`menu`,children:[(0,j.jsxDEV)(`button`,{type:`button`,role:`menuitem`,className:`split__item`,disabled:h,onClick:()=>{u(!1),v()},children:(0,j.jsxDEV)(`span`,{className:`split__body`,children:[(0,j.jsxDEV)(`span`,{className:`split__label`,children:[`Pull from `,r.key]},void 0,!0,{fileName:P,lineNumber:173,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`split__detail`,children:`Replace this block with the issue's description`},void 0,!1,{fileName:P,lineNumber:174,columnNumber:19},this)]},void 0,!0,{fileName:P,lineNumber:172,columnNumber:17},this)},void 0,!1,{fileName:P,lineNumber:165,columnNumber:15},this),(0,j.jsxDEV)(`button`,{type:`button`,role:`menuitem`,className:`split__item`,disabled:h,onClick:()=>{u(!1),m(!0)},children:(0,j.jsxDEV)(`span`,{className:`split__body`,children:[(0,j.jsxDEV)(`span`,{className:`split__label`,children:`Unlink`},void 0,!1,{fileName:P,lineNumber:185,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`split__detail`,children:`Keep the text, stop syncing it`},void 0,!1,{fileName:P,lineNumber:186,columnNumber:19},this)]},void 0,!0,{fileName:P,lineNumber:184,columnNumber:17},this)},void 0,!1,{fileName:P,lineNumber:177,columnNumber:15},this)]},void 0,!0,{fileName:P,lineNumber:164,columnNumber:13},this)]},void 0,!0,{fileName:P,lineNumber:139,columnNumber:9},this)]},void 0,!0,{fileName:P,lineNumber:127,columnNumber:7},this),d&&(0,j.jsxDEV)(Fi,{conflict:d,issueKey:r.key,busy:h,onClose:()=>f(void 0),onTakeRemote:()=>v(!0),onKeepLocal:()=>y(!0)},void 0,!1,{fileName:P,lineNumber:195,columnNumber:9},this),p&&(0,j.jsxDEV)(wn,{title:`Unlink ${r.key}?`,body:`The spec stays in this session. It just stops syncing, and nothing changes in Linear.`,confirmLabel:`Unlink`,onCancel:()=>m(!1),onConfirm:()=>{m(!1),c.mutate(e.id,{onSuccess:()=>n(`Session unlinked`,`success`),onError:e=>n(e instanceof Error?e.message:`Could not unlink.`,`danger`)})}},void 0,!1,{fileName:P,lineNumber:206,columnNumber:9},this)]},void 0,!0,{fileName:P,lineNumber:99,columnNumber:5},this)}function Fi({conflict:e,issueKey:t,busy:n,onClose:r,onTakeRemote:i,onKeepLocal:a}){return(0,j.jsxDEV)(`div`,{className:`spec__conflict`,children:[(0,j.jsxDEV)(`p`,{className:`spec__conflict-lead`,children:e.message},void 0,!1,{fileName:P,lineNumber:249,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`spec__conflict-pair`,children:[(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`h4`,{className:`spec__conflict-heading`,children:`This session`},void 0,!1,{fileName:P,lineNumber:253,columnNumber:11},this),(0,j.jsxDEV)(`pre`,{className:`spec__conflict-text`,children:e.local},void 0,!1,{fileName:P,lineNumber:254,columnNumber:11},this)]},void 0,!0,{fileName:P,lineNumber:252,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`h4`,{className:`spec__conflict-heading`,children:[t,` in Linear`]},void 0,!0,{fileName:P,lineNumber:257,columnNumber:11},this),(0,j.jsxDEV)(`pre`,{className:`spec__conflict-text`,children:e.remote},void 0,!1,{fileName:P,lineNumber:258,columnNumber:11},this)]},void 0,!0,{fileName:P,lineNumber:256,columnNumber:9},this)]},void 0,!0,{fileName:P,lineNumber:251,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`spec__conflict-actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:r,children:`Leave both alone`},void 0,!1,{fileName:P,lineNumber:263,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:n,onClick:i,children:`Take Linear's`},void 0,!1,{fileName:P,lineNumber:266,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:n,onClick:a,children:`Keep mine`},void 0,!1,{fileName:P,lineNumber:269,columnNumber:9},this)]},void 0,!0,{fileName:P,lineNumber:262,columnNumber:7},this)]},void 0,!0,{fileName:P,lineNumber:248,columnNumber:5},this)}function Ii(e,t){if(e?.remote?.changed)return`Linear changed`;if(e?.local.changed)return`local edits`;let n=e?.local.syncedAt??t?.syncedAt;return n?`synced ${Xt(n)}`:`never synced`}var Li=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/AgentBriefPanel.tsx`;function Ri({brief:e}){let{projectId:t}=Jn(),[n,r]=(0,k.useState)(()=>Hi(t)),[i,a]=(0,k.useState)(!1),o=(0,k.useCallback)(()=>{r(e=>(Ui(t,!e),!e))},[t]);if(!e)return null;let s=`agent-brief-header`,c=`agent-brief-body`;return(0,j.jsxDEV)(`section`,{className:`brief${n?` is-open`:``}`,"aria-labelledby":s,children:[(0,j.jsxDEV)(`button`,{type:`button`,id:s,className:`brief__header`,"aria-expanded":n,"aria-controls":c,onClick:o,children:[(0,j.jsxDEV)(`svg`,{className:`brief__chevron`,viewBox:`0 0 12 12`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M4.5 2.5 8 6l-3.5 3.5`},void 0,!1,{fileName:Li,lineNumber:52,columnNumber:11},this)},void 0,!1,{fileName:Li,lineNumber:51,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`brief__label`,children:`Agent instructions`},void 0,!1,{fileName:Li,lineNumber:54,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`brief__summary`,children:zi(e)},void 0,!1,{fileName:Li,lineNumber:55,columnNumber:9},this)]},void 0,!0,{fileName:Li,lineNumber:43,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`brief__panel`,id:c,role:`region`,"aria-labelledby":s,inert:!n,children:(0,j.jsxDEV)(`div`,{className:`brief__panel-inner`,children:[e.protocol&&(0,j.jsxDEV)(`pre`,{className:`brief__protocol`,children:e.protocol},void 0,!1,{fileName:Li,lineNumber:68,columnNumber:13},this),e.context&&(0,j.jsxDEV)(`div`,{className:`brief__part`,children:[(0,j.jsxDEV)(`h3`,{className:`brief__part-title`,children:`Context`},void 0,!1,{fileName:Li,lineNumber:73,columnNumber:15},this),(0,j.jsxDEV)(Ni,{source:e.context,compact:!0},void 0,!1,{fileName:Li,lineNumber:74,columnNumber:15},this)]},void 0,!0,{fileName:Li,lineNumber:72,columnNumber:13},this),e.included&&(0,j.jsxDEV)(`div`,{className:`brief__part${i?` is-open`:``}`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`brief__part-toggle`,"aria-expanded":i,onClick:()=>a(e=>!e),children:[(0,j.jsxDEV)(`svg`,{className:`brief__chevron`,viewBox:`0 0 12 12`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M4.5 2.5 8 6l-3.5 3.5`},void 0,!1,{fileName:Li,lineNumber:91,columnNumber:19},this)},void 0,!1,{fileName:Li,lineNumber:90,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`brief__part-title`,children:`Included instructions`},void 0,!1,{fileName:Li,lineNumber:93,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`brief__part-size`,children:Bi(e.included)},void 0,!1,{fileName:Li,lineNumber:94,columnNumber:17},this)]},void 0,!0,{fileName:Li,lineNumber:84,columnNumber:15},this),i&&(0,j.jsxDEV)(Ni,{source:e.included,compact:!0},void 0,!1,{fileName:Li,lineNumber:96,columnNumber:32},this)]},void 0,!0,{fileName:Li,lineNumber:79,columnNumber:13},this),e.other&&(0,j.jsxDEV)(`pre`,{className:`brief__protocol`,children:e.other},void 0,!1,{fileName:Li,lineNumber:100,columnNumber:27},this)]},void 0,!0,{fileName:Li,lineNumber:62,columnNumber:9},this)},void 0,!1,{fileName:Li,lineNumber:61,columnNumber:7},this)]},void 0,!0,{fileName:Li,lineNumber:42,columnNumber:5},this)}function zi(e){let t=[];return e.protocol&&t.push(`status protocol`),e.context&&t.push(`context`),e.included&&t.push(`included instructions`),t.length===0&&t.push(`preamble`),t.push(`${e.lines} lines`),t.join(` · `)}function Bi(e){return`${Math.max(1,Math.round(e.length/100)/10)} KB`}function Vi(e){return`invariant.ui.agent-brief-open:${e}`}function Hi(e){try{return window.localStorage.getItem(Vi(e))===`true`}catch{return!1}}function Ui(e,t){try{t?window.localStorage.setItem(Vi(e),`true`):window.localStorage.removeItem(Vi(e))}catch{}}var Wi=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/SourcePeek.tsx`,Gi=12;function Ki({file:e,line:t,endLine:n}){let r=M(),{data:i,isLoading:a,error:o}=gt({queryKey:[`p`,r.projectId,`source`,e,t??0],queryFn:()=>r.source({path:e,line:t,radius:Gi}),staleTime:3e4});if(a)return(0,j.jsxDEV)(`div`,{className:`peek peek--state`,children:`Loading…`},void 0,!1,{fileName:Wi,lineNumber:29,columnNumber:25},this);if(o||!i)return(0,j.jsxDEV)(`div`,{className:`peek peek--state`,children:`This file is not readable from here — it may have moved since the review was written.`},void 0,!1,{fileName:Wi,lineNumber:32,columnNumber:7},this);let s=t??i.startLine,c=n??s;return(0,j.jsxDEV)(`div`,{className:`peek`,children:[(0,j.jsxDEV)(`div`,{className:`peek__head`,children:[i.path,` · lines `,i.startLine,`–`,i.endLine,` of `,i.totalLines]},void 0,!0,{fileName:Wi,lineNumber:43,columnNumber:7},this),(0,j.jsxDEV)(`pre`,{className:`peek__code`,children:i.lines.map((e,t)=>{let n=i.startLine+t;return(0,j.jsxDEV)(`div`,{className:`peek__line${n>=s&&n<=c?` is-highlighted`:``}`,children:[(0,j.jsxDEV)(`span`,{className:`peek__number`,children:n},void 0,!1,{fileName:Wi,lineNumber:52,columnNumber:15},this),(0,j.jsxDEV)(`code`,{children:e.length>0?e:` `},void 0,!1,{fileName:Wi,lineNumber:53,columnNumber:15},this)]},n,!0,{fileName:Wi,lineNumber:51,columnNumber:13},this)})},void 0,!1,{fileName:Wi,lineNumber:46,columnNumber:7},this)]},void 0,!0,{fileName:Wi,lineNumber:42,columnNumber:5},this)}var qi=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/CommentEditor.tsx`;function Ji({title:e,body:t,severity:n,category:r,busy:i,onCancel:a,onSave:o}){let[s,c]=(0,k.useState)(e),[l,u]=(0,k.useState)(t),[d,f]=(0,k.useState)(n),[p,m]=(0,k.useState)(r),h={title:s.trim(),body:l,severity:d,category:p},g=h.title.length>0;return(0,j.jsxDEV)(`div`,{className:`comment-editor`,children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Title`},void 0,!1,{fileName:qi,lineNumber:57,columnNumber:9},this),(0,j.jsxDEV)(`input`,{className:`field__input`,value:s,maxLength:120,autoFocus:!0,onChange:e=>c(e.target.value),onKeyDown:e=>{e.key===`Escape`&&a()}},void 0,!1,{fileName:qi,lineNumber:58,columnNumber:9},this)]},void 0,!0,{fileName:qi,lineNumber:56,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`comment-editor__classification`,children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Severity`},void 0,!1,{fileName:qi,lineNumber:72,columnNumber:11},this),(0,j.jsxDEV)(`select`,{className:`select select--${d}`,value:d,onChange:e=>f(e.target.value),onKeyDown:e=>{e.key===`Escape`&&a()},children:Vt.map(e=>(0,j.jsxDEV)(`option`,{value:e,children:Ht[e]},e,!1,{fileName:qi,lineNumber:80,columnNumber:15},this))},void 0,!1,{fileName:qi,lineNumber:73,columnNumber:11},this)]},void 0,!0,{fileName:qi,lineNumber:71,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Category`},void 0,!1,{fileName:qi,lineNumber:86,columnNumber:11},this),(0,j.jsxDEV)(`select`,{className:`select`,value:p,onChange:e=>m(e.target.value),onKeyDown:e=>{e.key===`Escape`&&a()},children:Ut.map(e=>(0,j.jsxDEV)(`option`,{value:e,children:e},e,!1,{fileName:qi,lineNumber:94,columnNumber:15},this))},void 0,!1,{fileName:qi,lineNumber:87,columnNumber:11},this)]},void 0,!0,{fileName:qi,lineNumber:85,columnNumber:9},this)]},void 0,!0,{fileName:qi,lineNumber:70,columnNumber:7},this),(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Detail`},void 0,!1,{fileName:qi,lineNumber:101,columnNumber:9},this),(0,j.jsxDEV)(`textarea`,{className:`field__input field__input--area`,value:l,rows:6,onChange:e=>u(e.target.value),onKeyDown:e=>{e.key===`Escape`&&a()}},void 0,!1,{fileName:qi,lineNumber:102,columnNumber:9},this)]},void 0,!0,{fileName:qi,lineNumber:100,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`comment-editor__actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:a,children:`Cancel`},void 0,!1,{fileName:qi,lineNumber:112,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:i||!g,onClick:()=>o(h,!1),children:`Save`},void 0,!1,{fileName:qi,lineNumber:113,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:i||!g,onClick:()=>o(h,!0),children:`Save & stage`},void 0,!1,{fileName:qi,lineNumber:121,columnNumber:9},this)]},void 0,!0,{fileName:qi,lineNumber:111,columnNumber:7},this)]},void 0,!0,{fileName:qi,lineNumber:55,columnNumber:5},this)}function Yi(e){return e.toLowerCase().replace(/[^a-z0-9]+/g,`-`).replace(/^-+|-+$/g,``)}function Xi(e){let t=[],n=!1;for(let r of e.split(`
|
|
245
|
+
`)){if(r.trimStart().startsWith("```")){n=!n;continue}if(n)continue;let e=r.match(/^(#{1,3})\s+(.+?)\s*$/);if(!e)continue;let i=e[2].replace(/[*_`]/g,``);t.push({level:e[1].length,text:i,slug:Yi(i)})}return t}function Zi(e,t){let n=[...e.matchAll(/`+/g)].reduce((e,t)=>Math.max(e,t[0].length),0),r="`".repeat(Math.max(3,n+1));return`${r}${t??``}\n${e}\n${r}`}var Qi=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/CommentCard.tsx`,$i={open:`○`,staged:`✓`,discarded:`✗`};function ea(e){let{comment:t}=e,[n,r]=(0,k.useState)(!1),[i,a]=(0,k.useState)(!1),o=t.status!==`open`;return(0,j.jsxDEV)(`article`,{className:`comment comment--${t.status} comment--${t.severity}${e.focused?` is-focused`:``}`,"aria-label":`${t.severity} — ${t.title}`,onClick:e.onFocus,children:[(0,j.jsxDEV)(`header`,{className:`comment__head`,onClick:e.onToggle,role:`button`,tabIndex:-1,children:[(0,j.jsxDEV)(`span`,{className:`comment__glyph`,"aria-hidden":`true`,children:$i[t.status]},void 0,!1,{fileName:Qi,lineNumber:56,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`comment__severity comment__severity--${t.severity}`,children:Ht[t.severity]},void 0,!1,{fileName:Qi,lineNumber:57,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`comment__category`,children:t.category},void 0,!1,{fileName:Qi,lineNumber:60,columnNumber:9},this),t.location&&(0,j.jsxDEV)(`span`,{className:`comment__location`,children:t.location},void 0,!1,{fileName:Qi,lineNumber:61,columnNumber:30},this),(0,j.jsxDEV)(`h3`,{className:`comment__title`,children:t.title},void 0,!1,{fileName:Qi,lineNumber:62,columnNumber:9},this),t.edited&&(0,j.jsxDEV)(`span`,{className:`chip`,title:`Edited ${t.edited}`,children:`edited`},void 0,!1,{fileName:Qi,lineNumber:63,columnNumber:28},this)]},void 0,!0,{fileName:Qi,lineNumber:55,columnNumber:7},this),e.expanded&&(0,j.jsxDEV)(`div`,{className:`comment__body`,children:n?(0,j.jsxDEV)(Ji,{title:t.title,body:t.body,severity:t.severity,category:t.category,busy:e.busy,onCancel:()=>r(!1),onSave:(t,n)=>{r(!1),e.onEdit(t,n)}},void 0,!1,{fileName:Qi,lineNumber:69,columnNumber:13},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`div`,{className:`comment__prose`,children:(0,j.jsxDEV)(Ni,{source:t.body,compact:!0},void 0,!1,{fileName:Qi,lineNumber:86,columnNumber:17},this)},void 0,!1,{fileName:Qi,lineNumber:85,columnNumber:15},this),t.discussion&&(0,j.jsxDEV)(`div`,{className:`comment__discussion`,children:(0,j.jsxDEV)(Ni,{source:t.discussion,compact:!0},void 0,!1,{fileName:Qi,lineNumber:91,columnNumber:19},this)},void 0,!1,{fileName:Qi,lineNumber:90,columnNumber:17},this),t.suggestion&&(0,j.jsxDEV)(`div`,{className:`comment__suggestion`,children:[(0,j.jsxDEV)(`div`,{className:`comment__suggestion-head`,children:[(0,j.jsxDEV)(`span`,{className:`comment__suggestion-label`,children:[`Suggestion`,t.suggestionLang?` · ${t.suggestionLang}`:``]},void 0,!0,{fileName:Qi,lineNumber:98,columnNumber:21},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:async()=>{let n=await en(t.suggestion);e.onToast(n?`Suggestion copied`:`Could not copy`,`success`)},children:`Copy`},void 0,!1,{fileName:Qi,lineNumber:101,columnNumber:21},this)]},void 0,!0,{fileName:Qi,lineNumber:97,columnNumber:19},this),(0,j.jsxDEV)(Ni,{source:Zi(t.suggestion,t.suggestionLang),compact:!0},void 0,!1,{fileName:Qi,lineNumber:112,columnNumber:19},this)]},void 0,!0,{fileName:Qi,lineNumber:96,columnNumber:17},this),t.file&&(0,j.jsxDEV)(`div`,{className:`comment__location-row`,children:[(0,j.jsxDEV)(`span`,{className:`comment__path`,children:t.location},void 0,!1,{fileName:Qi,lineNumber:121,columnNumber:19},this),ln(e.editorScheme,e.projectDirectory,t.file,t.line)&&(0,j.jsxDEV)(`a`,{className:`link-button`,href:ln(e.editorScheme,e.projectDirectory,t.file,t.line),children:`Open in editor`},void 0,!1,{fileName:Qi,lineNumber:123,columnNumber:21},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:async()=>{let n=await en(t.location);e.onToast(n?`Location copied`:`Could not copy`,`success`)},children:`Copy`},void 0,!1,{fileName:Qi,lineNumber:135,columnNumber:19},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:()=>a(e=>!e),children:i?`Hide code`:`Peek`},void 0,!1,{fileName:Qi,lineNumber:145,columnNumber:19},this)]},void 0,!0,{fileName:Qi,lineNumber:120,columnNumber:17},this),i&&t.file&&(0,j.jsxDEV)(Ki,{file:t.file,line:t.line,endLine:t.endLine},void 0,!1,{fileName:Qi,lineNumber:156,columnNumber:17},this)]},void 0,!0,{fileName:Qi,lineNumber:82,columnNumber:13},this)},void 0,!1,{fileName:Qi,lineNumber:67,columnNumber:9},this),e.expanded&&!n&&(0,j.jsxDEV)(`footer`,{className:`comment__actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost${t.status===`discarded`?` is-active`:``}`,disabled:e.busy,onClick:()=>e.onDecide(`discarded`),children:`Discard`},void 0,!1,{fileName:Qi,lineNumber:165,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:e.busy,onClick:()=>r(!0),children:`Edit`},void 0,!1,{fileName:Qi,lineNumber:173,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid${t.status===`staged`?` is-active`:``}`,disabled:e.busy,onClick:()=>e.onDecide(`staged`),children:`Stage`},void 0,!1,{fileName:Qi,lineNumber:181,columnNumber:11},this),o&&(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,disabled:e.busy,onClick:()=>e.onDecide(`open`),children:`Undo`},void 0,!1,{fileName:Qi,lineNumber:190,columnNumber:13},this)]},void 0,!0,{fileName:Qi,lineNumber:164,columnNumber:9},this)]},void 0,!0,{fileName:Qi,lineNumber:48,columnNumber:5},this)}var ta=`plan-changes`;function na(e){return`invariant.ui.review-cta:${e??`unknown`}`}function ra(e){try{return window.localStorage.getItem(na(e))===`publish`?`publish`:ta}catch{return ta}}function ia(e,t){try{window.localStorage.setItem(na(t),e)}catch{}}function aa(e){return e?[`plan-changes`,`publish`]:[`plan-changes`]}function oa(e,t){return aa(t).includes(e)?e:ta}function sa(e,t){let{counts:n}=t,r=n.open===0,i=n.staged===0;if(e===`plan-changes`){let e=r&&i?`Close review`:`Plan changes →`;return r?t.sessionId?{label:e,enabled:!0}:{label:e,enabled:!1,hint:`This review is tied to no session, so there is nothing to plan into.`}:{label:e,enabled:!1,hint:`Stage or discard every comment first.`}}let a=`Publish to ${t.publisherName}…`;return r?i?{label:a,enabled:!1,hint:`Every comment was discarded — there is nothing to publish.`}:t.canPublish?t.publishAvailable?{label:a,enabled:!0,hint:`${n.staged} staged comment(s) will be sent as drafts.`}:{label:a,enabled:!1,hint:`${t.publisherName} is not connected for this project.`}:{label:a,enabled:!1,hint:`This review is missing the commit shas a discussion needs to anchor to.`}:{label:a,enabled:!1,hint:`Stage or discard every comment first.`}}var ca=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/ReviewActions.tsx`,la=[{mode:`plan-changes`,label:`Plan changes`,detail:`Staged comments become the session’s Plan`},{mode:`publish`,label:`Publish to GitLab`,detail:`Staged comments become draft comments on the merge request`}];function ua({review:e,projectDirectory:t,publishAvailable:n,publisherName:r,busy:i,onPlanChanges:a,onPublish:o}){let[s,c]=(0,k.useState)(ta),[l,u]=(0,k.useState)(!1),d=(0,k.useRef)(null);(0,k.useEffect)(()=>c(oa(ra(t),n)),[t,n]),(0,k.useEffect)(()=>{if(!l)return;let e=e=>{d.current?.contains(e.target)||u(!1)},t=e=>{e.key===`Escape`&&u(!1)};return document.addEventListener(`mousedown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`mousedown`,e),document.removeEventListener(`keydown`,t)}},[l]);let f=aa(n),p=la.filter(e=>f.includes(e.mode)),m=sa(s,{counts:e.counts,canPublish:e.canPublish,sessionId:e.sessionId,publishAvailable:n,publisherName:r}),h=e=>{c(e),ia(e,t),u(!1)},g=()=>{s===`publish`?o():a()};return p.length<2?(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:i||!m.enabled,title:m.hint,onClick:g,children:m.label},void 0,!1,{fileName:ca,lineNumber:115,columnNumber:7},this):(0,j.jsxDEV)(`div`,{className:`split`,ref:d,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid split__main`,disabled:i||!m.enabled,title:m.hint,onClick:g,children:m.label},void 0,!1,{fileName:ca,lineNumber:129,columnNumber:7},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid split__toggle`,"aria-haspopup":`menu`,"aria-expanded":l,"aria-label":`Choose what this button does`,onClick:()=>u(e=>!e),children:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 12 12`,"aria-hidden":`true`,width:`12`,height:`12`,children:(0,j.jsxDEV)(`path`,{d:`M2.5 4.5 6 8l3.5-3.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`},void 0,!1,{fileName:ca,lineNumber:148,columnNumber:11},this)},void 0,!1,{fileName:ca,lineNumber:147,columnNumber:9},this)},void 0,!1,{fileName:ca,lineNumber:139,columnNumber:7},this),l&&(0,j.jsxDEV)(`div`,{className:`split__menu`,role:`menu`,children:p.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,role:`menuitemradio`,"aria-checked":s===e.mode,className:`split__item${s===e.mode?` is-active`:``}`,onClick:()=>h(e.mode),children:[(0,j.jsxDEV)(`span`,{className:`split__check`,"aria-hidden":`true`,children:s===e.mode?`✓`:``},void 0,!1,{fileName:ca,lineNumber:165,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`split__body`,children:[(0,j.jsxDEV)(`span`,{className:`split__label`,children:e.label},void 0,!1,{fileName:ca,lineNumber:167,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`split__detail`,children:e.detail},void 0,!1,{fileName:ca,lineNumber:168,columnNumber:19},this)]},void 0,!0,{fileName:ca,lineNumber:166,columnNumber:17},this)]},e.mode,!0,{fileName:ca,lineNumber:157,columnNumber:15},this))},void 0,!1,{fileName:ca,lineNumber:154,columnNumber:9},this)]},void 0,!0,{fileName:ca,lineNumber:128,columnNumber:5},this)}var F=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/PublishModal.tsx`,da={exact:`on its line`,snapped:`snapped to the nearest changed line`,file:`on the whole file`,general:`as a general comment`};function fa({review:e,onClose:t,onOpenSettings:n}){let r=Pn(),[i,a]=(0,k.useState)(),[o,s]=(0,k.useState)(!1),[c,l]=(0,k.useState)(),u=_r(e.slug,i,c===void 0),d=vr(),f=c?.failures.map(e=>e.commentId)??[],p=t=>{d.mutate({slug:e.slug,mergeRequestIid:i,only:t},{onSuccess:e=>{l(e),e.failures.length===0&&r(`${e.created.length+e.updated.length} draft comment(s) created`,`success`)},onError:e=>r(I(e),`danger`)})};return c?(0,j.jsxDEV)(jn,{title:`Published as drafts`,width:640,onClose:t,footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:[`Nobody is notified until you press `,(0,j.jsxDEV)(`strong`,{children:`Submit review`},void 0,!1,{fileName:F,lineNumber:65,columnNumber:50},this),` in GitLab.`]},void 0,!0,{fileName:F,lineNumber:64,columnNumber:13},this),f.length>0&&(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:d.isPending,onClick:()=>p(f),children:[`Retry `,f.length,` failed`]},void 0,!0,{fileName:F,lineNumber:68,columnNumber:15},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:t,children:`Done`},void 0,!1,{fileName:F,lineNumber:77,columnNumber:13},this)]},void 0,!0,{fileName:F,lineNumber:63,columnNumber:11},this),children:(0,j.jsxDEV)(ma,{result:c},void 0,!1,{fileName:F,lineNumber:81,columnNumber:9},this)},void 0,!1,{fileName:F,lineNumber:58,columnNumber:7},this):(0,j.jsxDEV)(jn,{title:`Publish to GitLab`,width:640,onClose:t,footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:[`These are created as `,(0,j.jsxDEV)(`strong`,{children:`pending`},void 0,!1,{fileName:F,lineNumber:94,columnNumber:34},this),` comments. You submit the review yourself.`]},void 0,!0,{fileName:F,lineNumber:93,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:t,children:`Cancel`},void 0,!1,{fileName:F,lineNumber:96,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:d.isPending||u.isLoading||u.data===void 0,onClick:()=>p(),children:d.isPending?`Creating…`:`Create ${u.data?.targets.length??e.counts.staged} draft comment(s)`},void 0,!1,{fileName:F,lineNumber:97,columnNumber:11},this)]},void 0,!0,{fileName:F,lineNumber:92,columnNumber:9},this),children:[u.isLoading&&(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Resolving the merge request…`},void 0,!1,{fileName:F,lineNumber:110,columnNumber:31},this),u.error&&(0,j.jsxDEV)(ha,{error:u.error,onOpenSettings:n},void 0,!1,{fileName:F,lineNumber:112,columnNumber:27},this),u.data&&(0,j.jsxDEV)(`div`,{className:`publish`,children:[(0,j.jsxDEV)(`dl`,{className:`publish__facts`,children:[(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Project`},void 0,!1,{fileName:F,lineNumber:118,columnNumber:15},this),(0,j.jsxDEV)(`dd`,{children:[(0,j.jsxDEV)(`a`,{href:u.data.projectUrl,target:`_blank`,rel:`noreferrer`,children:u.data.projectPath},void 0,!1,{fileName:F,lineNumber:120,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`publish__source`,children:u.data.projectPathSource===`origin`?`from origin`:`overridden`},void 0,!1,{fileName:F,lineNumber:123,columnNumber:17},this)]},void 0,!0,{fileName:F,lineNumber:119,columnNumber:15},this)]},void 0,!0,{fileName:F,lineNumber:117,columnNumber:13},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Merge request`},void 0,!1,{fileName:F,lineNumber:129,columnNumber:15},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`a`,{href:u.data.mergeRequest.url,target:`_blank`,rel:`noreferrer`,children:[`!`,u.data.mergeRequest.iid,` `,u.data.mergeRequest.title]},void 0,!0,{fileName:F,lineNumber:131,columnNumber:17},this)},void 0,!1,{fileName:F,lineNumber:130,columnNumber:15},this)]},void 0,!0,{fileName:F,lineNumber:128,columnNumber:13},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Diff`},void 0,!1,{fileName:F,lineNumber:137,columnNumber:15},this),(0,j.jsxDEV)(`dd`,{children:[u.data.changedFileCount,` file(s) · head`,` `,(0,j.jsxDEV)(`code`,{children:u.data.mergeRequest.headSha.slice(0,7)},void 0,!1,{fileName:F,lineNumber:140,columnNumber:17},this)]},void 0,!0,{fileName:F,lineNumber:138,columnNumber:15},this)]},void 0,!0,{fileName:F,lineNumber:136,columnNumber:13},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Sending`},void 0,!1,{fileName:F,lineNumber:144,columnNumber:15},this),(0,j.jsxDEV)(`dd`,{children:[u.data.targets.length,` staged comment(s)`,u.data.alreadyPublished>0&&` · ${u.data.alreadyPublished} already on GitLab (they will be updated)`]},void 0,!0,{fileName:F,lineNumber:145,columnNumber:15},this)]},void 0,!0,{fileName:F,lineNumber:143,columnNumber:13},this),u.data.username&&(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Acting as`},void 0,!1,{fileName:F,lineNumber:153,columnNumber:17},this),(0,j.jsxDEV)(`dd`,{children:[`@`,u.data.username]},void 0,!0,{fileName:F,lineNumber:154,columnNumber:17},this)]},void 0,!0,{fileName:F,lineNumber:152,columnNumber:15},this)]},void 0,!0,{fileName:F,lineNumber:116,columnNumber:11},this),u.data.originProjectPath&&(0,j.jsxDEV)(`p`,{className:`publish__warning`,children:[`Publishing to `,(0,j.jsxDEV)(`strong`,{children:u.data.projectPath},void 0,!1,{fileName:F,lineNumber:161,columnNumber:29},this),`, which is not this repository’s origin (`,u.data.originProjectPath,`).`]},void 0,!0,{fileName:F,lineNumber:160,columnNumber:13},this),u.data.drift&&(0,j.jsxDEV)(`p`,{className:`publish__warning`,children:[`This review was written against`,` `,(0,j.jsxDEV)(`code`,{children:u.data.drift.reviewHeadSha.slice(0,7)},void 0,!1,{fileName:F,lineNumber:169,columnNumber:15},this),`; the merge request is now at`,` `,(0,j.jsxDEV)(`code`,{children:u.data.drift.mergeRequestHeadSha.slice(0,7)},void 0,!1,{fileName:F,lineNumber:170,columnNumber:15},this),` — line numbers may have moved.`]},void 0,!0,{fileName:F,lineNumber:167,columnNumber:13},this),u.data.candidates.length>1&&(0,j.jsxDEV)(`label`,{className:`publish__picker`,children:[(0,j.jsxDEV)(`span`,{children:`Merge request`},void 0,!1,{fileName:F,lineNumber:177,columnNumber:15},this),(0,j.jsxDEV)(`select`,{className:`select`,value:i??u.data.mergeRequest.iid,onChange:e=>a(Number(e.target.value)),children:u.data.candidates.map(e=>(0,j.jsxDEV)(`option`,{value:e.iid,children:[`!`,e.iid,` — `,e.title]},e.iid,!0,{fileName:F,lineNumber:184,columnNumber:19},this))},void 0,!1,{fileName:F,lineNumber:178,columnNumber:15},this)]},void 0,!0,{fileName:F,lineNumber:176,columnNumber:13},this),(0,j.jsxDEV)(pa,{targets:u.data.targets},void 0,!1,{fileName:F,lineNumber:192,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:()=>s(e=>!e),children:o?`▾ hide every target`:`▸ show every target`},void 0,!1,{fileName:F,lineNumber:194,columnNumber:11},this),o&&(0,j.jsxDEV)(`ul`,{className:`publish__targets`,children:u.data.targets.map(e=>(0,j.jsxDEV)(`li`,{className:`publish__target is-${e.kind}`,children:[(0,j.jsxDEV)(`span`,{className:`comment__severity comment__severity--${e.severity}`,children:e.severity},void 0,!1,{fileName:F,lineNumber:206,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`publish__target-title`,title:e.title,children:e.title},void 0,!1,{fileName:F,lineNumber:209,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`publish__target-where`,title:e.detail,children:[e.file?`${e.file}${e.line?`:${e.line}`:``}`:`general`,` — `,da[e.kind]]},void 0,!0,{fileName:F,lineNumber:210,columnNumber:19},this)]},e.commentId,!0,{fileName:F,lineNumber:205,columnNumber:17},this))},void 0,!1,{fileName:F,lineNumber:203,columnNumber:13},this)]},void 0,!0,{fileName:F,lineNumber:115,columnNumber:9},this)]},void 0,!0,{fileName:F,lineNumber:87,columnNumber:5},this)}function pa({targets:e}){let t=t=>e.filter(e=>e.kind===t).length,n=[t(`exact`)>0&&`${t(`exact`)} exact`,t(`snapped`)>0&&`${t(`snapped`)} snapped`,t(`file`)>0&&`${t(`file`)} file-level`,t(`general`)>0&&`${t(`general`)} general`].filter(Boolean);return(0,j.jsxDEV)(`p`,{className:`publish__summary`,children:n.join(` · `)||`Nothing to send.`},void 0,!1,{fileName:F,lineNumber:235,columnNumber:10},this)}function ma({result:e}){let t=Pn(),n=e.created.length+e.updated.length;return(0,j.jsxDEV)(`div`,{className:`publish`,children:[(0,j.jsxDEV)(`p`,{className:`publish__result`,children:[(0,j.jsxDEV)(`strong`,{children:n},void 0,!1,{fileName:F,lineNumber:245,columnNumber:9},this),` draft comment(s) on`,` `,(0,j.jsxDEV)(`a`,{href:e.url,target:`_blank`,rel:`noreferrer`,children:[`!`,e.mergeRequestIid]},void 0,!0,{fileName:F,lineNumber:246,columnNumber:9},this),e.skipped.length>0&&` · ${e.skipped.length} already submitted, left alone`]},void 0,!0,{fileName:F,lineNumber:244,columnNumber:7},this),e.session&&(0,j.jsxDEV)(`p`,{className:`publish__closed`,children:[`This review is closed — its session moved to `,(0,j.jsxDEV)(`strong`,{children:`Done`},void 0,!1,{fileName:F,lineNumber:255,columnNumber:56},this),`.`]},void 0,!0,{fileName:F,lineNumber:254,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`publish__links`,children:[(0,j.jsxDEV)(`a`,{className:`button button--subtle`,href:e.url,target:`_blank`,rel:`noreferrer`,children:`Open merge request ↗`},void 0,!1,{fileName:F,lineNumber:260,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`icon-button`,title:`Copy the merge request link`,"aria-label":`Copy the merge request link`,onClick:async()=>{t(await en(e.url)?`Link copied`:`Could not copy`,`success`)},children:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`rect`,{x:`5.5`,y:`5.5`,width:`8`,height:`8`,rx:`2`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`},void 0,!1,{fileName:F,lineNumber:273,columnNumber:13},this),(0,j.jsxDEV)(`path`,{d:`M10.5 5.5v-1a2 2 0 0 0-2-2h-4a2 2 0 0 0-2 2v4a2 2 0 0 0 2 2h1`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.4`,strokeLinecap:`round`},void 0,!1,{fileName:F,lineNumber:275,columnNumber:13},this)]},void 0,!0,{fileName:F,lineNumber:272,columnNumber:11},this)},void 0,!1,{fileName:F,lineNumber:263,columnNumber:9},this)]},void 0,!0,{fileName:F,lineNumber:259,columnNumber:7},this),e.failures.length>0&&(0,j.jsxDEV)(`ul`,{className:`publish__failures`,children:e.failures.map(e=>(0,j.jsxDEV)(`li`,{children:[(0,j.jsxDEV)(`code`,{children:e.commentId},void 0,!1,{fileName:F,lineNumber:285,columnNumber:15},this),` — `,e.message]},e.commentId,!0,{fileName:F,lineNumber:284,columnNumber:13},this))},void 0,!1,{fileName:F,lineNumber:282,columnNumber:9},this)]},void 0,!0,{fileName:F,lineNumber:243,columnNumber:5},this)}function ha({error:e,onOpenSettings:t}){let n=e instanceof zn?e.code:``,r=n===`PUBLISHER_NOT_CONFIGURED`||n===`PUBLISHER_PROJECT_MISMATCH`;return(0,j.jsxDEV)(`div`,{className:`publish__error`,children:[(0,j.jsxDEV)(`p`,{children:I(e)},void 0,!1,{fileName:F,lineNumber:304,columnNumber:7},this),r&&(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:t,children:`Open publishing settings`},void 0,!1,{fileName:F,lineNumber:306,columnNumber:9},this)]},void 0,!0,{fileName:F,lineNumber:303,columnNumber:5},this)}function I(e){return e instanceof zn||e instanceof Error?e.message:`That did not work.`}var ga=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/ReviewPane.tsx`,_a=[`all`,`open`,`staged`,`discarded`];function va({review:e,projectDirectory:t,editorScheme:n=`vscode`,onPlanned:r,onOpenSettings:i}){let a=Pn(),o=pr(),s=mr(),c=gr(),l=wr(`review.publish`),[u,d]=(0,k.useState)(!1),[f,p]=(0,k.useState)(`all`),[m,h]=(0,k.useState)(`all`),[g,_]=(0,k.useState)(),[v,y]=(0,k.useState)(),b=(0,k.useMemo)(()=>e.runs.flatMap(e=>e.comments),[e]),x=(0,k.useMemo)(()=>an(b,f,m),[b,f,m]);(0,k.useEffect)(()=>{if(x.length===0){_(void 0);return}(!g||!x.some(e=>e.id===g))&&_(x[0].id)},[x,g]);let ee=o.isPending||s.isPending,te=(t,n)=>{o.mutate({slug:e.slug,commentId:t.id,etag:e.etag,expectedStatus:t.status,status:n},{onError:e=>ba(e,a),onSuccess:()=>{if(n===`open`)return;let e=on(x,t.id);e&&(_(e.id),y(e.id))}})},ne=(t,n,r)=>{let i=sn(t,n);Object.keys(i).length===0&&!r||o.mutate({slug:e.slug,commentId:t.id,etag:e.etag,expectedStatus:t.status,...i,status:r?`staged`:void 0},{onError:e=>ba(e,a),onSuccess:()=>{i.severity&&m!==`all`&&i.severity!==m&&a(`Reclassified as ${Ht[i.severity].toLowerCase()} — hidden by the current filter.`,`info`)}})},S=()=>{let t=x.filter(e=>e.status!==`staged`).map(e=>e.id);t.length!==0&&s.mutate({slug:e.slug,ids:t,status:`staged`,etag:e.etag,expectedStatus:`open`},{onSuccess:()=>a(`Staged ${t.length} comment(s)`,`success`),onError:e=>ba(e,a)})};xa({enabled:!ee,comments:x,focusedId:g,onFocus:_,onToggle:e=>y(t=>t===e?void 0:e),onDecide:(e,t)=>{let n=x.find(t=>t.id===e);n&&te(n,t)},onExpand:y,onStageAll:S});let re=e.counts,ie=cn(re);return(0,j.jsxDEV)(`div`,{className:`review`,children:[(0,j.jsxDEV)(`div`,{className:`review__scroll`,children:[(0,j.jsxDEV)(`div`,{className:`review__summary`,children:e.runs.map((t,n)=>(0,j.jsxDEV)(`section`,{className:`review__run`,children:[(0,j.jsxDEV)(`header`,{className:`review__run-head`,children:[(0,j.jsxDEV)(`span`,{className:`review__run-label`,children:e.runs.length>1?`Run ${n+1}`:`Summary`},void 0,!1,{fileName:ga,lineNumber:195,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`chip`,title:t.headSha,children:t.headSha.slice(0,7)},void 0,!1,{fileName:ga,lineNumber:198,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`review__run-counts`,children:[t.counts.total,` comment`,t.counts.total===1?``:`s`]},void 0,!0,{fileName:ga,lineNumber:199,columnNumber:17},this),t.status===`published`&&(0,j.jsxDEV)(`span`,{className:`chip`,title:`Every staged comment in this run reached the code host`,children:`published`},void 0,!1,{fileName:ga,lineNumber:203,columnNumber:19},this)]},void 0,!0,{fileName:ga,lineNumber:194,columnNumber:15},this),(0,j.jsxDEV)(Ni,{source:t.summary,compact:!0},void 0,!1,{fileName:ga,lineNumber:210,columnNumber:15},this)]},t.id,!0,{fileName:ga,lineNumber:193,columnNumber:13},this))},void 0,!1,{fileName:ga,lineNumber:191,columnNumber:9},this),(0,j.jsxDEV)(`header`,{className:`review__toolbar`,children:[(0,j.jsxDEV)(`div`,{className:`segmented`,role:`tablist`,"aria-label":`Filter by decision`,children:_a.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,role:`tab`,"aria-selected":f===e,className:`segmented__item${f===e?` is-active`:``}`,onClick:()=>p(e),children:e===`all`?`All ${re.total}`:`${ya(e)} ${re[e]}`},e,!1,{fileName:ga,lineNumber:218,columnNumber:15},this))},void 0,!1,{fileName:ga,lineNumber:216,columnNumber:11},this),(0,j.jsxDEV)(`select`,{className:`select`,value:m,"aria-label":`Filter by severity`,onChange:e=>h(e.target.value),children:[(0,j.jsxDEV)(`option`,{value:`all`,children:`Any severity`},void 0,!1,{fileName:ga,lineNumber:237,columnNumber:13},this),Vt.map(e=>(0,j.jsxDEV)(`option`,{value:e,children:e},e,!1,{fileName:ga,lineNumber:239,columnNumber:15},this))]},void 0,!0,{fileName:ga,lineNumber:231,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:ee||x.every(e=>e.status===`staged`),onClick:S,title:`Stage every comment matching the current filter (⇧S)`,children:`Stage all shown`},void 0,!1,{fileName:ga,lineNumber:243,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:async()=>{a(await en(e.path)?`Path copied`:`Could not copy`,`success`)},children:e.path},void 0,!1,{fileName:ga,lineNumber:253,columnNumber:11},this)]},void 0,!0,{fileName:ga,lineNumber:215,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`review__list`,children:x.length===0?(0,j.jsxDEV)(`p`,{className:`panel__empty`,children:`Nothing matches this filter.`},void 0,!1,{fileName:ga,lineNumber:266,columnNumber:13},this):x.map(e=>(0,j.jsxDEV)(ea,{comment:e,projectDirectory:t,editorScheme:n,focused:e.id===g,expanded:e.id===v,busy:ee,onFocus:()=>_(e.id),onToggle:()=>y(t=>t===e.id?void 0:e.id),onDecide:t=>te(e,t),onEdit:(t,n)=>ne(e,t,n),onToast:a},e.id,!1,{fileName:ga,lineNumber:269,columnNumber:15},this))},void 0,!1,{fileName:ga,lineNumber:264,columnNumber:9},this)]},void 0,!0,{fileName:ga,lineNumber:190,columnNumber:7},this),(0,j.jsxDEV)(`footer`,{className:`review__foot`,children:[(0,j.jsxDEV)(`span`,{className:`review__gate${ie.kind===`ready`?` is-ready`:``}`,children:ie.label},void 0,!1,{fileName:ga,lineNumber:289,columnNumber:9},this),(0,j.jsxDEV)(ua,{review:e,projectDirectory:t,publishAvailable:l,publisherName:`GitLab`,busy:c.isPending,onPublish:()=>d(!0),onPlanChanges:()=>c.mutate(e.slug,{onSuccess:e=>{a(e.guidance,`success`),en(e.executeLine),r?.(e.session.id)},onError:e=>ba(e,a)})},void 0,!1,{fileName:ga,lineNumber:296,columnNumber:9},this)]},void 0,!0,{fileName:ga,lineNumber:288,columnNumber:7},this),u&&(0,j.jsxDEV)(fa,{review:e,onClose:()=>d(!1),onOpenSettings:()=>{d(!1),i?.()}},void 0,!1,{fileName:ga,lineNumber:317,columnNumber:9},this)]},void 0,!0,{fileName:ga,lineNumber:182,columnNumber:5},this)}function ya(e){return e[0].toUpperCase()+e.slice(1)}function ba(e,t){if(e instanceof zn&&e.isNotTriaged){t(`${e.openCount} comment(s) still need a decision.`,`danger`);return}if(e instanceof zn&&e.isConflict){t(`That comment changed on disk — reload before deciding on it again.`,`danger`);return}t(e instanceof Error?e.message:`That did not work.`,`danger`)}function xa(e){(0,k.useEffect)(()=>{let t=t=>{if(!e.enabled)return;let n=t.target;if(n&&(n.tagName===`INPUT`||n.tagName===`TEXTAREA`||n.isContentEditable))return;let r=e.comments.findIndex(t=>t.id===e.focusedId),i=t=>{if(e.comments.length===0)return;let n=Math.min(Math.max(r+t,0),e.comments.length-1);e.onFocus(e.comments[n].id)};if(t.shiftKey&&t.key.toLowerCase()===`s`){t.preventDefault(),e.onStageAll();return}if(!(t.metaKey||t.ctrlKey||t.altKey))switch(t.key){case`j`:i(1);return;case`k`:i(-1);return;case`Enter`:e.focusedId&&(t.preventDefault(),e.onToggle(e.focusedId));return;case`s`:e.focusedId&&(t.preventDefault(),e.onDecide(e.focusedId,`staged`));return;case`d`:e.focusedId&&(t.preventDefault(),e.onDecide(e.focusedId,`discarded`));return;case`e`:e.focusedId&&(t.preventDefault(),e.onExpand(e.focusedId));return}};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e])}var Sa=/^##[ \t]+Task[ \t]*\r?$/,Ca=/^#[ \t]+Session:[ \t]+session-[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}[ \t]*\r?$/,wa=/^<Instructions>[ \t]*\r?$/,Ta=/^<\/Instructions>[ \t]*\r?$/,Ea=/^##[ \t]+Context[ \t]*\r?$/,Da=/^##[ \t]+Included Instructions[ \t]*\r?$/,Oa=/^[ \t]*(```|~~~)/;function ka(e){return wa.test(e)||Ea.test(e)||Da.test(e)}function Aa(e){let t=e.split(`
|
|
246
|
+
`),n=t.findIndex(e=>Sa.test(e));if(n===-1)return{body:e};let r=t.slice(0,n),i=t.slice(n).join(`
|
|
247
|
+
`);return r.filter(e=>e.trim().length>0&&!Ca.test(e)).length===0?{body:i}:{body:i,brief:ja(r)}}function ja(e){let t=[],n,r,i,a=0;for(;a<e.length;){let o=e[a];if(Ca.test(o)){a+=1;continue}if(wa.test(o)){let t=Ma(e,a+1,Ta);if(t!==-1){n=Pa(e.slice(a+1,t)).join(`
|
|
248
|
+
`),a=t+1;continue}}if(Ea.test(o)||Da.test(o)){let t=Na(e,a+1),n=Pa(e.slice(a+1,t)).join(`
|
|
249
|
+
`);Ea.test(o)?r=n:i=n,a=t;continue}t.push(o),a+=1}let o=Pa(t).join(`
|
|
250
|
+
`);return{protocol:n,context:r,included:i,other:o.length>0?o:void 0,lines:Pa(e).length}}function Ma(e,t,n){for(let r=t;r<e.length;r+=1)if(n.test(e[r]))return r;return-1}function Na(e,t){for(let n=t;n<e.length;n+=1)if(ka(e[n]))return n;return e.length}function Pa(e){let t=0,n=e.length;for(;t<n&&e[t].trim().length===0;)t+=1;for(;n>t&&e[n-1].trim().length===0;)--n;return e.slice(t,n)}function Fa(e){let t=e.split(`
|
|
251
|
+
`),n=[],r=!1,i=0;for(;i<t.length;){let e=t[i];if(Oa.test(e)){r=!r,n.push(e),i+=1;continue}if(!r&&e.trim().startsWith(`<!--`)){let e=Ma(t,i,/-->[ \t]*\r?$/);if(e!==-1){i=e+1;continue}}n.push(e),i+=1}return n.join(`
|
|
252
|
+
`)}var Ia=/^[ \t]*<issue-spec\b([^>]*)>[ \t]*$/,La=/^[ \t]*<\/issue-spec>[ \t]*$/,Ra=/^[ \t]*<!--[ \t]*issue-spec:/;function za(e){let t=e.split(`
|
|
253
|
+
`);for(let n=0;n<t.length;n+=1){let r=t[n].match(Ia);if(!r)continue;let i=t.findIndex((e,t)=>t>n&&La.test(e));if(i===-1)return{body:e};let a=n>0&&Ra.test(t[n-1])?n-1:n;return{body:[t.slice(0,a).join(`
|
|
254
|
+
`).replace(/\s+$/,``),t.slice(i+1).join(`
|
|
255
|
+
`).replace(/^\s+/,``)].filter(e=>e.length>0).join(`
|
|
256
|
+
|
|
257
|
+
`),spec:{content:t.slice(n+1,i).join(`
|
|
258
|
+
`).replace(/^\n+|\n+$/g,``),syncedAt:Ba(r[1]??``,`synced-at`)}}}return{body:e}}function Ba(e,t){let n=e.match(RegExp(`${t}="([^"]*)"`))?.[1]?.trim();return n&&n.length>0?n:void 0}var L=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/SessionPage.tsx`,Va=(0,k.lazy)(()=>Ai(()=>import(`./Editor-0hQt3BGG.js`).then(e=>({default:e.Editor})),[])),Ha=(0,k.lazy)(()=>Ai(()=>import(`./Preview-DDmkokv0.js`).then(e=>({default:e.Preview})),[])),Ua=1200,Wa=/^<{7} yours\r?$/m;function Ga({sessionId:e,mode:t,onModeChange:n,onBack:r,onArchived:i,onOpenSession:a,onOpenSettings:o}){let s=Pn(),{data:c,isLoading:l,error:u}=er(e),{data:d}=Qn(),{data:f}=$n(),p=nr(),m=tr(),h=or(),g=wr(`issue.link`),_=jr(),v=cr(),y=ar(),b=rr(),{data:x}=dr((0,k.useMemo)(()=>c?.reviewFile?rn(c.reviewFile):void 0,[c?.reviewFile])),[ee,te]=(0,k.useState)(`review`),[ne,S]=(0,k.useState)(!1),[re,ie]=(0,k.useState)(!1),[C,ae]=(0,k.useState)(),[w,T]=(0,k.useState)(),oe=(0,k.useRef)(``),E=(0,k.useRef)(``),se=(0,k.useRef)(null),ce=C!==void 0&&C!==E.current;(0,k.useEffect)(()=>{c&&oe.current!==c.etag&&(C===void 0||C===E.current)&&(oe.current=c.etag,E.current=c.body,ae(c.body),T(void 0))},[c,C]);let le=(0,k.useCallback)((t,n=!1)=>{c&&p.mutate({sessionId:e,body:t,etag:oe.current,baseBody:E.current,force:n},{onSuccess:({session:e,merged:t})=>{oe.current=e.etag,E.current=e.body,ae(e.body),T(void 0),t&&s(`Merged the agent’s changes into yours.`,`info`)},onError:e=>{if(e instanceof zn&&e.isMergeConflict){T({merged:e.detail.mergedPreview??``,theirs:e.detail.currentContent??``,etag:e.detail.actualEtag??``,count:e.detail.conflictCount??1});return}s(e instanceof Error?e.message:`Could not save.`,`danger`)}})},[p,c,e,s]),ue=(0,k.useCallback)((e,t,n)=>{oe.current=e,E.current=t,ae(n),T(void 0)},[]),de=(0,k.useCallback)(()=>{C!==void 0&&ce&&le(C)},[C,ce,le]);(0,k.useEffect)(()=>{if(!(!ce||C===void 0||w)&&!Wa.test(C))return se.current&&clearTimeout(se.current),se.current=setTimeout(()=>le(C),Ua),()=>{se.current&&clearTimeout(se.current)}},[C,ce,w,le]);let fe=(0,k.useMemo)(()=>f?.sessions??[],[f]),pe=(0,k.useMemo)(()=>c?.parent?fe.find(e=>e.id===c.parent):void 0,[fe,c?.parent]),me=(0,k.useMemo)(()=>c?`execute instructions from ${c.path}`:``,[c]);if((0,k.useEffect)(()=>{!c||c.kind!==`review`||te(c.status===`review`?`review`:`plan`)},[c?.id,c?.status,c?.kind]),l)return(0,j.jsxDEV)(`div`,{className:`page-state`,children:`Loading session…`},void 0,!1,{fileName:L,lineNumber:223,columnNumber:25},this);if(u||!c)return(0,j.jsxDEV)(`div`,{className:`page-state`,children:[(0,j.jsxDEV)(`p`,{children:`This session could not be loaded.`},void 0,!1,{fileName:L,lineNumber:227,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:r,children:`Back to sessions`},void 0,!1,{fileName:L,lineNumber:228,columnNumber:9},this)]},void 0,!0,{fileName:L,lineNumber:226,columnNumber:7},this);let he=C??c.body,{body:ge,brief:_e}=Aa(he),{body:ve,spec:ye}=za(ge),be=Fa(ve),xe=c.kind===`review`,Se=!xe||ee===`plan`;return(0,j.jsxDEV)(`div`,{className:`session`,children:[(0,j.jsxDEV)(`header`,{className:`session__head`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`icon-button`,onClick:r,title:`Back (Esc)`,"aria-label":`Back`,children:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M9.5 3.5 5 8l4.5 4.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`},void 0,!1,{fileName:L,lineNumber:252,columnNumber:13},this)},void 0,!1,{fileName:L,lineNumber:251,columnNumber:11},this)},void 0,!1,{fileName:L,lineNumber:250,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`session__identity`,children:[(0,j.jsxDEV)(`h1`,{className:`session__title`,children:c.title},void 0,!1,{fileName:L,lineNumber:258,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`session__meta`,children:[(0,j.jsxDEV)(`span`,{className:`session__stamp session__stamp--created`,title:Zt(c.created),children:[`created `,Xt(c.created)]},void 0,!0,{fileName:L,lineNumber:260,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`session__stamp session__stamp--created`,"aria-hidden":`true`,children:`·`},void 0,!1,{fileName:L,lineNumber:263,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`session__stamp`,title:Zt(c.updated),children:[`updated `,Xt(c.updated)]},void 0,!0,{fileName:L,lineNumber:264,columnNumber:13},this),ce&&(0,j.jsxDEV)(`span`,{className:`session__dirty`,children:C!==void 0&&Wa.test(C)?`unsaved — resolve the conflict markers`:`unsaved`},void 0,!1,{fileName:L,lineNumber:268,columnNumber:15},this),p.isPending&&(0,j.jsxDEV)(`span`,{className:`session__saving`,children:`saving…`},void 0,!1,{fileName:L,lineNumber:274,columnNumber:32},this)]},void 0,!0,{fileName:L,lineNumber:259,columnNumber:11},this),xe&&(0,j.jsxDEV)(`div`,{className:`session__lineage`,children:[(0,j.jsxDEV)(`span`,{className:`session__kicker`,children:`Review`},void 0,!1,{fileName:L,lineNumber:279,columnNumber:15},this),c.branch&&(0,j.jsxDEV)(`span`,{className:`session__branch`,children:c.branch},void 0,!1,{fileName:L,lineNumber:280,columnNumber:34},this),pe?(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:()=>a(pe.id),title:`Open the session under review`,children:[`↳ `,pe.title]},void 0,!0,{fileName:L,lineNumber:282,columnNumber:17},this):c.parent?(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button link-button--danger`,onClick:()=>S(!0),children:`↳ unlinked — the session this reviewed is gone`},void 0,!1,{fileName:L,lineNumber:293,columnNumber:17},this):(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:()=>S(!0),children:`↳ standalone — link to a session`},void 0,!1,{fileName:L,lineNumber:301,columnNumber:17},this)]},void 0,!0,{fileName:L,lineNumber:278,columnNumber:13},this)]},void 0,!0,{fileName:L,lineNumber:257,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`session__controls`,children:[(0,j.jsxDEV)(Jt,{status:c.status,kind:c.kind,review:x,onTriage:()=>te(`review`),onChange:t=>m.mutate({sessionId:e,status:t},{onError:()=>s(`Could not change the status.`,`danger`)})},void 0,!1,{fileName:L,lineNumber:310,columnNumber:11},this),xe&&(0,j.jsxDEV)(`div`,{className:`segmented`,role:`tablist`,"aria-label":`Session view`,children:[`review`,`plan`].map(e=>(0,j.jsxDEV)(`button`,{type:`button`,role:`tab`,"aria-selected":ee===e,className:`segmented__item${ee===e?` is-active`:``}`,onClick:()=>te(e),children:[e===`review`?`Comments`:`Fix plan`,e===`review`&&x&&x.counts.open>0&&(0,j.jsxDEV)(`span`,{className:`segmented__badge`,children:x.counts.open},void 0,!1,{fileName:L,lineNumber:336,columnNumber:21},this)]},e,!0,{fileName:L,lineNumber:326,columnNumber:17},this))},void 0,!1,{fileName:L,lineNumber:324,columnNumber:13},this),Se&&(0,j.jsxDEV)(`div`,{className:`segmented`,role:`tablist`,"aria-label":`View mode`,children:[`preview`,`edit`,`split`].map(e=>(0,j.jsxDEV)(`button`,{type:`button`,role:`tab`,"aria-selected":t===e,className:`segmented__item${t===e?` is-active`:``}`,onClick:()=>n(e),title:e===`preview`?`Preview (⇧⌘V)`:e===`edit`?`Edit (⇧⌘V)`:`Split`,children:e[0].toUpperCase()+e.slice(1)},e,!1,{fileName:L,lineNumber:346,columnNumber:17},this))},void 0,!1,{fileName:L,lineNumber:344,columnNumber:13},this),(0,j.jsxDEV)(`div`,{className:`session__actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:async()=>{s(await en(me)?`Execute line copied`:`Could not copy`,`success`)},children:`Copy execute line`},void 0,!1,{fileName:L,lineNumber:362,columnNumber:13},this),g&&!c.issue&&(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:()=>ie(!0),title:`Give this session a counterpart in Linear`,children:`Link to Linear`},void 0,!1,{fileName:L,lineNumber:372,columnNumber:15},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:()=>{window.confirm(`Archive this session? The file moves to .invariant/sessions/.archive/`)&&h.mutate(e,{onSuccess:()=>{s(`Session archived`,`success`),i()},onError:()=>s(`Could not archive the session.`,`danger`)})},children:`Archive`},void 0,!1,{fileName:L,lineNumber:381,columnNumber:13},this)]},void 0,!0,{fileName:L,lineNumber:361,columnNumber:11},this)]},void 0,!0,{fileName:L,lineNumber:309,columnNumber:9},this)]},void 0,!0,{fileName:L,lineNumber:249,columnNumber:7},this),xe&&(0,j.jsxDEV)(yi,{status:c.status,review:x,onTriage:()=>te(`review`),onCopyExecuteLine:async()=>{s(await en(me)?`Execute line copied`:`Could not copy`,`success`)}},void 0,!1,{fileName:L,lineNumber:399,columnNumber:9},this),w&&(0,j.jsxDEV)(hi,{conflictCount:w.count,onOpenMerge:()=>{ue(w.etag,w.theirs,w.merged)},onKeepMine:()=>{C!==void 0&&le(C,!0)},onTakeTheirs:async()=>{C!==void 0&&await b.mutateAsync({sessionId:e,body:C}),ue(w.etag,w.theirs,w.theirs),s(`Your version was parked in .invariant/sessions/.conflicts/`,`info`)}},void 0,!1,{fileName:L,lineNumber:410,columnNumber:9},this),c.needsMigration&&(0,j.jsxDEV)(`div`,{className:`banner banner--warning`,children:[(0,j.jsxDEV)(`div`,{className:`banner__text`,children:[(0,j.jsxDEV)(`strong`,{children:`This session has no canonical header.`},void 0,!1,{fileName:L,lineNumber:434,columnNumber:13},this),` `,c.issues[0]]},void 0,!0,{fileName:L,lineNumber:433,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`banner__actions`,children:(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:()=>v.mutate(e,{onSuccess:()=>s(`Header migrated`,`success`),onError:()=>s(`Could not migrate the header.`,`danger`)}),children:`Fix header`},void 0,!1,{fileName:L,lineNumber:437,columnNumber:13},this)},void 0,!1,{fileName:L,lineNumber:436,columnNumber:11},this)]},void 0,!0,{fileName:L,lineNumber:432,columnNumber:9},this),!xe&&c.status===`executed`&&(0,j.jsxDEV)(_i,{session:c,onOpenSession:a,onToast:s},void 0,!1,{fileName:L,lineNumber:454,columnNumber:9},this),xe&&ee===`review`?x?(0,j.jsxDEV)(va,{review:x,projectDirectory:d?.directory,onPlanned:()=>te(`plan`),onOpenSettings:o},void 0,!1,{fileName:L,lineNumber:463,columnNumber:11},this):(0,j.jsxDEV)(`div`,{className:`page-state`,children:`The review document has not been written yet. Paste the execute line into a new agent conversation, and the comments will appear here as soon as it saves them.`},void 0,!1,{fileName:L,lineNumber:470,columnNumber:11},this):(0,j.jsxDEV)(j.Fragment,{children:[t!==`edit`&&(0,j.jsxDEV)(Ri,{brief:_e},void 0,!1,{fileName:L,lineNumber:477,columnNumber:31},this),c.issue&&t!==`edit`&&(0,j.jsxDEV)(Pi,{session:c,spec:ye},void 0,!1,{fileName:L,lineNumber:479,columnNumber:48},this),(0,j.jsxDEV)(`div`,{className:`session__body session__body--${t}`,children:(0,j.jsxDEV)(k.Suspense,{fallback:(0,j.jsxDEV)(`div`,{className:`page-state`,children:`Loading…`},void 0,!1,{fileName:L,lineNumber:482,columnNumber:33},this),children:[t!==`preview`&&(0,j.jsxDEV)(Va,{value:he,onChange:ae,onSave:de},void 0,!1,{fileName:L,lineNumber:483,columnNumber:38},this),t!==`edit`&&(0,j.jsxDEV)(Ha,{body:be,withToc:t===`preview`},void 0,!1,{fileName:L,lineNumber:485,columnNumber:17},this)]},void 0,!0,{fileName:L,lineNumber:482,columnNumber:13},this)},void 0,!1,{fileName:L,lineNumber:481,columnNumber:11},this)]},void 0,!0,{fileName:L,lineNumber:476,columnNumber:9},this),re&&(0,j.jsxDEV)(Ti,{sessionTitle:c.title,busy:_.isPending,onClose:()=>ie(!1),onLink:t=>_.mutate({sessionId:e,reference:t},{onSuccess:e=>{ie(!1),s(`Linked to ${e.issue?.key??`Linear`}`,`success`)},onError:e=>s(e instanceof Error?e.message:`Could not link.`,`danger`)})},void 0,!1,{fileName:L,lineNumber:493,columnNumber:9},this),ne&&(0,j.jsxDEV)(xi,{review:c,candidates:fe,busy:y.isPending,onClose:()=>S(!1),onLink:t=>y.mutate({sessionId:e,parentSessionId:t},{onSuccess:()=>{S(!1),s(`Review linked`,`success`)},onError:e=>s(e instanceof Error?e.message:`Could not link the review.`,`danger`)})},void 0,!1,{fileName:L,lineNumber:514,columnNumber:9},this)]},void 0,!0,{fileName:L,lineNumber:248,columnNumber:5},this)}var Ka={prompt:``,context:``,full:!1};function qa(e){return`invariant.ui.session-draft:${e??`unknown`}`}function Ja(e){return e.prompt.trim().length===0&&e.context.trim().length===0&&!e.full}function Ya(e){try{let t=window.localStorage.getItem(qa(e));if(!t)return Ka;let n=JSON.parse(t);if(typeof n!=`object`||!n)return Ka;let r=n;return{prompt:typeof r.prompt==`string`?r.prompt:``,context:typeof r.context==`string`?r.context:``,full:r.full===!0}}catch{return Ka}}function Xa(e,t){try{if(Ja(e)){window.localStorage.removeItem(qa(t));return}window.localStorage.setItem(qa(t),JSON.stringify(e))}catch{}}function Za(e){try{window.localStorage.removeItem(qa(e))}catch{}}var Qa=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/sessions/NewSessionModal.tsx`;function $a({busy:e,projectDirectory:t,onClose:n,onSubmit:r}){let[i]=(0,k.useState)(()=>Ya(t)),[a,o]=(0,k.useState)(i.prompt),[s,c]=(0,k.useState)(i.context),[l,u]=(0,k.useState)(i.full),d=(0,k.useRef)(!Ja(i)),f=!Ja({prompt:a,context:s,full:l});(0,k.useEffect)(()=>{let e=window.setTimeout(()=>Xa({prompt:a,context:s,full:l},t),300);return()=>window.clearTimeout(e)},[a,s,l,t]);let p=()=>{let n=a.trim();n.length===0||e||(Za(t),r({prompt:n,context:s.trim()||void 0,full:l||void 0}))};return(0,j.jsxDEV)(jn,{title:`New session`,onClose:()=>{Za(t),n()},width:620,dirty:f,confirmClose:{title:`Discard this session?`,body:"Your task description has not been sent to `invariant plan`. Closing loses what you typed.",confirmLabel:`Discard`,cancelLabel:`Keep editing`},footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:d.current?`Restored your last draft`:(0,j.jsxDEV)(j.Fragment,{children:[`Runs `,(0,j.jsxDEV)(`code`,{children:`invariant plan`},void 0,!1,{fileName:Qa,lineNumber:64,columnNumber:72},this),` in this project`]},void 0,!0,{fileName:Qa,lineNumber:64,columnNumber:65},this)},void 0,!1,{fileName:Qa,lineNumber:63,columnNumber:11},this),(0,j.jsxDEV)(eo,{},void 0,!1,{fileName:Qa,lineNumber:66,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:p,disabled:e||a.trim().length===0,children:e?`Creating…`:`Create session ⌘↵`},void 0,!1,{fileName:Qa,lineNumber:67,columnNumber:11},this)]},void 0,!0,{fileName:Qa,lineNumber:62,columnNumber:9},this),children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Task`},void 0,!1,{fileName:Qa,lineNumber:74,columnNumber:9},this),(0,j.jsxDEV)(`textarea`,{className:`field__input field__input--area`,"data-autofocus":!0,rows:6,value:a,placeholder:`Describe what should be planned and built…`,onChange:e=>o(e.target.value),onKeyDown:e=>{(e.metaKey||e.ctrlKey)&&e.key===`Enter`&&(e.preventDefault(),p())}},void 0,!1,{fileName:Qa,lineNumber:75,columnNumber:9},this)]},void 0,!0,{fileName:Qa,lineNumber:73,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`field-row`,children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`Context `,(0,j.jsxDEV)(`span`,{className:`field__optional`,children:`optional`},void 0,!1,{fileName:Qa,lineNumber:90,columnNumber:50},this)]},void 0,!0,{fileName:Qa,lineNumber:90,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,value:s,placeholder:`package/context-name`,onChange:e=>c(e.target.value)},void 0,!1,{fileName:Qa,lineNumber:91,columnNumber:11},this)]},void 0,!0,{fileName:Qa,lineNumber:89,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`checkbox`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.target.checked)},void 0,!1,{fileName:Qa,lineNumber:100,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:[`Inline full instructions (`,(0,j.jsxDEV)(`code`,{children:`--full`},void 0,!1,{fileName:Qa,lineNumber:101,columnNumber:43},this),`)`]},void 0,!0,{fileName:Qa,lineNumber:101,columnNumber:11},this)]},void 0,!0,{fileName:Qa,lineNumber:99,columnNumber:9},this)]},void 0,!0,{fileName:Qa,lineNumber:88,columnNumber:7},this)]},void 0,!0,{fileName:Qa,lineNumber:46,columnNumber:5},this)}function eo(){let e=Dn();return(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:e,children:`Cancel`},void 0,!1,{fileName:Qa,lineNumber:112,columnNumber:5},this)}function to(e){let t={slugs:[],sessionIds:[],skipped:0};for(let n of e)n.document&&n.slug?t.slugs.push(n.slug):n.reviewSession?t.sessionIds.push(n.reviewSession.id):t.skipped+=1;return t}function no(e){return e.slugs.length+e.sessionIds.length}function ro(e){let t=[];return e.slugs.length>0&&t.push(`${e.slugs.length} document${e.slugs.length===1?``:`s`} move to the review directory’s .archive/, along with the review sessions that wrote them`),e.sessionIds.length>0&&t.push(`${e.sessionIds.length} review${e.sessionIds.length===1?``:`s`} not written yet move to .invariant/sessions/.archive/`),`${t.length>0?`${t.join(`. `)}.`:`Nothing to move.`} The sessions under review are not touched.`}var io=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/ReviewBulkBar.tsx`;function ao({entries:e,count:t,hiddenCount:n,onClear:r,onNarrow:i}){let a=Pn(),o=sr(),s=or(),[c,l]=(0,k.useState)(!1),[u,d]=(0,k.useState)(!1),f=to(e),p=async()=>{d(!0),l(!1);let[t,n]=await Promise.all([ci(f.slugs,e=>o.mutateAsync(e)),ci(f.sessionIds,e=>s.mutateAsync(e))]),c={ok:[...t.ok,...n.ok],failed:[...t.failed,...n.failed]},{message:u,tone:p}=li(c,{done:`Archived`,doing:`archive`,noun:`review`});if(a(u,p),c.failed.length===0)r();else{let t=new Set(c.failed.map(e=>e.id));i(e.filter(e=>e.slug!==void 0&&t.has(e.slug)||e.reviewSession!==void 0&&t.has(e.reviewSession.id)).map(e=>e.key))}d(!1)};return(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(Sn,{count:t,hiddenCount:n,noun:`review`,busy:u,onClear:r,children:(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--danger`,disabled:u||no(f)===0,title:no(f)===0?`Nothing in this selection can be archived.`:void 0,onClick:()=>l(!0),children:u?`Archiving…`:`Archive`},void 0,!1,{fileName:io,lineNumber:80,columnNumber:9},this)},void 0,!1,{fileName:io,lineNumber:79,columnNumber:7},this),c&&(0,j.jsxDEV)(jn,{title:`Archive ${no(f)} review${no(f)===1?``:`s`}?`,onClose:()=>l(!1),footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:()=>l(!1),children:`Cancel`},void 0,!1,{fileName:io,lineNumber:97,columnNumber:15},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--danger`,onClick:()=>void p(),children:`Archive`},void 0,!1,{fileName:io,lineNumber:104,columnNumber:15},this)]},void 0,!0,{fileName:io,lineNumber:96,columnNumber:13},this),children:[(0,j.jsxDEV)(`p`,{className:`modal__text`,children:ro(f)},void 0,!1,{fileName:io,lineNumber:110,columnNumber:11},this),(0,j.jsxDEV)(`p`,{className:`modal__text modal__text--muted`,children:`Nothing is deleted — every file stays readable on disk.`},void 0,!1,{fileName:io,lineNumber:111,columnNumber:11},this)]},void 0,!0,{fileName:io,lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:io,lineNumber:78,columnNumber:5},this)}var oo={hub:{key:`hub`,title:`Projects`,summary:`What a project is here, how to add one, and how to move between them.`,version:1},sessions:{key:`sessions`,title:`Sessions`,summary:`Writing a session, handing it to an agent, and reading the status back.`,version:1},reviews:{key:`reviews`,title:`Reviews`,summary:`Asking for a review, triaging the comments, and turning them into work.`,version:1},packages:{key:`packages`,title:`Packages`,summary:`Installing a package, choosing which items are active, and syncing your agents.`,version:1}},so=[`hub`,`sessions`,`reviews`,`packages`];function co(){return so.map(e=>oo[e]).filter(e=>e.loomId!==void 0)}function lo(e){switch(e.name){case`hub`:return`hub`;case`sessions`:case`session`:return`sessions`;case`reviews`:case`review`:return`reviews`;case`packages`:case`skills`:return`packages`;default:return}}var uo=`invariant.tutorial.watched`,fo=`invariant.tutorial.auto-open`,po=[`hub`];function mo(){try{let e=window.localStorage.getItem(uo);if(!e)return{};let t=JSON.parse(e);if(typeof t!=`object`||!t)return{};let n={};for(let e of so){let r=t[e];typeof r==`number`&&(n[e]=r)}return n}catch{return{}}}function ho(e){let t={...mo(),[e]:oo[e].version};return xo(uo,JSON.stringify(t)),t}function go(){return xo(uo,JSON.stringify({})),{}}function _o(){try{return window.localStorage.getItem(fo)!==`off`}catch{return!0}}function vo(e){xo(fo,e?`on`:`off`)}function yo(e,t){if(t.loomId===void 0)return!1;let n=e[t.key];return n===void 0||n<t.version}function bo({tutorial:e,watched:t,autoOpen:n,overlayPresent:r,playerOpen:i}){return!n||!po.includes(e.key)||r||i?!1:yo(t,e)}function xo(e,t){try{window.localStorage.setItem(e,t)}catch{}}var So=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/tutorials/TutorialProvider.tsx`,Co=(0,k.createContext)(void 0);function wo(){let e=(0,k.useContext)(Co);if(!e)throw Error(`useTutorials must be used inside a <TutorialProvider>`);return e}function To(e){let{watched:t}=wo(),n=oo[e];if(n.loomId!==void 0)return{tutorial:n,unwatched:yo(t,n)}}var Eo=600;function Do({activeKey:e,children:t}){let[n,r]=(0,k.useState)(),[i,a]=(0,k.useState)(()=>mo()),[o,s]=(0,k.useState)(()=>_o()),c=(0,k.useRef)(1),l=(0,k.useRef)(void 0);l.current=n;let u=(0,k.useCallback)(e=>{oo[e].loomId!==void 0&&(r({key:e,state:`expanded`,session:c.current++}),a(ho(e)))},[]),d=(0,k.useCallback)(()=>r(e=>e&&{...e,state:`expanded`}),[]),f=(0,k.useCallback)(()=>r(e=>e&&{...e,state:`mini`}),[]),p=(0,k.useCallback)(()=>r(void 0),[]),m=(0,k.useCallback)(e=>{vo(e),s(e)},[]),h=(0,k.useCallback)(()=>a(go()),[]),g=(0,k.useRef)(!1);(0,k.useEffect)(()=>{if(!e||g.current)return;let t=window.setTimeout(()=>{bo({tutorial:oo[e],watched:mo(),autoOpen:_o(),overlayPresent:document.querySelector(`.overlay`)!==null,playerOpen:l.current!==void 0})&&(g.current=!0,u(e))},Eo);return()=>window.clearTimeout(t)},[e,u]);let _=(0,k.useMemo)(()=>({viewing:n,watched:i,autoOpen:o,open:u,expand:d,minimise:f,close:p,setAutoOpen:m,forgetWatched:h}),[n,i,o,u,d,f,p,m,h]);return(0,j.jsxDEV)(Co.Provider,{value:_,children:t},void 0,!1,{fileName:So,lineNumber:162,columnNumber:10},this)}var Oo=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/tutorials/TutorialButton.tsx`;function ko({surface:e}){let t=To(e),{open:n}=wo();return t?(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle tutorial-button`,onClick:()=>n(e),title:`Watch the ${t.tutorial.title} intro — ${t.tutorial.summary}`,"aria-label":t.unwatched?`Watch intro — not watched yet`:`Watch intro`,children:[(0,j.jsxDEV)(`svg`,{className:`tutorial-button__glyph`,viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`circle`,{cx:`10`,cy:`10`,r:`7`},void 0,!1,{fileName:Oo,lineNumber:35,columnNumber:9},this),(0,j.jsxDEV)(`path`,{d:`M8.5 7.2 13 10l-4.5 2.8z`},void 0,!1,{fileName:Oo,lineNumber:36,columnNumber:9},this)]},void 0,!0,{fileName:Oo,lineNumber:34,columnNumber:7},this),`Watch intro`,t.unwatched&&(0,j.jsxDEV)(`span`,{className:`tutorial-button__dot`,"aria-hidden":`true`},void 0,!1,{fileName:Oo,lineNumber:39,columnNumber:27},this)]},void 0,!0,{fileName:Oo,lineNumber:27,columnNumber:5},this):null}function Ao(e,t){let n=new Map(t.map(e=>[e.id,e])),r=t.filter(e=>e.kind===`review`),i=new Map;for(let e of r){if(!e.reviewFile)continue;let t=rn(e.reviewFile);i.set(t,[...i.get(t)??[],e])}let a=new Set,o=[];for(let t of e){let e=i.get(t.slug)??[],r=t.sessionId?n.get(t.sessionId):void 0,s=r??Mo(e);for(let t of e)a.add(t.id);r&&a.add(r.id);let c=s?.parent?n.get(s.parent):void 0;o.push({key:t.slug,slug:t.slug,branch:t.branch,path:t.path,document:t,reviewSession:s,subject:c,link:jo(s,c),state:t.counts.open>0?`triage`:`settled`,updated:No(t.updated,s?.updated)})}for(let e of r){if(a.has(e.id))continue;let t=e.parent?n.get(e.parent):void 0;o.push({key:e.id,slug:e.reviewFile?rn(e.reviewFile):void 0,branch:e.branch??e.title,path:e.reviewFile,reviewSession:e,subject:t,link:jo(e,t),state:`pending`,updated:e.updated})}return o.sort((e,t)=>e.state===`triage`==(t.state===`triage`)?t.updated.localeCompare(e.updated):e.state===`triage`?-1:1)}function jo(e,t){return e?t?`attached`:e.parent?`orphaned`:`standalone`:`unowned`}function Mo(e){return e.reduce((e,t)=>!e||t.updated.localeCompare(e.updated)>0?t:e,void 0)}function No(e,t){return t&&t.localeCompare(e)>0?t:e}var Po={selected:new Set};function Fo(e,t,n,r={}){let i=new Set(e.selected);if(r.range&&e.anchor!==void 0){let r=t.indexOf(e.anchor),a=t.indexOf(n);if(r!==-1&&a!==-1){let[n,o]=r<=a?[r,a]:[a,r];for(let e of t.slice(n,o+1))i.add(e);return{selected:i,anchor:e.anchor}}}return i.has(n)?i.delete(n):i.add(n),{selected:i,anchor:n}}function Io(e,t){return{selected:new Set([...e.selected,...t]),anchor:e.anchor}}function Lo(e,t){if(e.selected.size===0)return e;let n=[...e.selected].filter(e=>t.has(e));return n.length===e.selected.size?e:{selected:new Set(n),anchor:e.anchor!==void 0&&t.has(e.anchor)?e.anchor:void 0}}function Ro(e,t){let n=Bo(e,t);return t.length>0&&n===t.length?`all`:n>0?`some`:`none`}function zo(e,t){return e.size-Bo(e,t)}function Bo(e,t){return t.reduce((t,n)=>e.has(n)?t+1:t,0)}function Vo(e,t=e){let[n,r]=(0,k.useState)(Po),i=(0,k.useRef)(e);i.current=e;let a=(0,k.useMemo)(()=>new Set(t),[t]);(0,k.useEffect)(()=>{r(e=>Lo(e,a))},[a]);let o=(0,k.useCallback)((e,t)=>{r(n=>Fo(n,i.current,e,t))},[]),s=(0,k.useCallback)(()=>{r(e=>Io(e,i.current))},[]),c=(0,k.useCallback)(()=>r(Po),[]),l=(0,k.useCallback)(e=>{r({selected:new Set(e)})},[]),{selected:u}=n;return{selected:u,count:u.size,isSelected:(0,k.useCallback)(e=>u.has(e),[u]),toggle:o,selectAll:s,clear:c,replace:l,headerState:Ro(u,e),hiddenCount:zo(u,e)}}var R=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/ReviewsPage.tsx`;function Ho({onOpen:e,onOpenSession:t,onReviewBranch:n}){let{data:r,isLoading:i}=ur(),{data:a}=Qn(),{data:o,isLoading:s}=$n(),c=(0,k.useMemo)(()=>Ao(r?.reviews??[],o?.sessions??[]),[r,o]),l=c.filter(e=>e.state===`pending`).length,u=Vo((0,k.useMemo)(()=>c.map(e=>e.key),[c])),d=(0,k.useMemo)(()=>c.filter(e=>u.isSelected(e.key)),[c,u]);return(0,k.useEffect)(()=>{let e=e=>{let t=e.target;if(!(t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`))){if((e.metaKey||e.ctrlKey)&&e.key.toLowerCase()===`a`){e.preventDefault(),u.selectAll();return}e.key===`Escape`&&u.count>0&&(e.stopPropagation(),u.clear())}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[u]),i||s?(0,j.jsxDEV)(`div`,{className:`page-state`,children:`Loading reviews…`},void 0,!1,{fileName:R,lineNumber:69,columnNumber:44},this):c.length===0?(0,j.jsxDEV)(`div`,{className:`empty`,children:[(0,j.jsxDEV)(`h2`,{className:`empty__title`,children:`No reviews yet`},void 0,!1,{fileName:R,lineNumber:74,columnNumber:9},this),(0,j.jsxDEV)(`p`,{className:`empty__text`,children:[`A review is an XML file in `,(0,j.jsxDEV)(`code`,{children:r?.directory??`doc/review`},void 0,!1,{fileName:R,lineNumber:76,columnNumber:38},this),` holding one pass over a branch, read by a fresh agent that has not seen the plan. There are two ways in: finish a session and use `,(0,j.jsxDEV)(`strong`,{children:`Request review`},void 0,!1,{fileName:R,lineNumber:78,columnNumber:36},this),` there, or review the branch you are on right now — for work no session of yours covers.`]},void 0,!0,{fileName:R,lineNumber:75,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:n,children:`Review a branch`},void 0,!1,{fileName:R,lineNumber:81,columnNumber:9},this)]},void 0,!0,{fileName:R,lineNumber:73,columnNumber:7},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`header`,{className:`topbar`,children:[(0,j.jsxDEV)(`div`,{className:`topbar__identity`,children:[(0,j.jsxDEV)(`h1`,{className:`topbar__title`,children:`Reviews`},void 0,!1,{fileName:R,lineNumber:92,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`topbar__path`,children:a?.name??r?.directory},void 0,!1,{fileName:R,lineNumber:93,columnNumber:11},this)]},void 0,!0,{fileName:R,lineNumber:91,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`topbar__controls`,children:[(0,j.jsxDEV)(`div`,{className:`topbar__counts`,children:[(0,j.jsxDEV)(`span`,{className:`count count--review`,title:`Awaiting triage`,children:[(0,j.jsxDEV)(`span`,{className:`count__value`,children:r?.awaitingTriage??0},void 0,!1,{fileName:R,lineNumber:98,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`count__label`,children:`Awaiting triage`},void 0,!1,{fileName:R,lineNumber:99,columnNumber:15},this)]},void 0,!0,{fileName:R,lineNumber:97,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`count count--planning`,title:`Reviews an agent is still writing`,children:[(0,j.jsxDEV)(`span`,{className:`count__value`,children:l},void 0,!1,{fileName:R,lineNumber:102,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`count__label`,children:`In flight`},void 0,!1,{fileName:R,lineNumber:103,columnNumber:15},this)]},void 0,!0,{fileName:R,lineNumber:101,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`count count--planned`,title:`Staged`,children:[(0,j.jsxDEV)(`span`,{className:`count__value`,children:r?.counts.staged??0},void 0,!1,{fileName:R,lineNumber:106,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`count__label`,children:`Staged`},void 0,!1,{fileName:R,lineNumber:107,columnNumber:15},this)]},void 0,!0,{fileName:R,lineNumber:105,columnNumber:13},this)]},void 0,!0,{fileName:R,lineNumber:96,columnNumber:11},this),(0,j.jsxDEV)(ko,{surface:`reviews`},void 0,!1,{fileName:R,lineNumber:111,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:n,children:`Review a branch`},void 0,!1,{fileName:R,lineNumber:113,columnNumber:11},this)]},void 0,!0,{fileName:R,lineNumber:95,columnNumber:9},this)]},void 0,!0,{fileName:R,lineNumber:90,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`list${u.count>0?` is-selecting`:``}`,children:(0,j.jsxDEV)(`table`,{className:`list__table list__table--reviews`,children:[(0,j.jsxDEV)(`colgroup`,{children:[(0,j.jsxDEV)(`col`,{className:`col--select`},void 0,!1,{fileName:R,lineNumber:127,columnNumber:13},this),(0,j.jsxDEV)(`col`,{className:`col--branch`},void 0,!1,{fileName:R,lineNumber:128,columnNumber:13},this),(0,j.jsxDEV)(`col`,{className:`col--work`},void 0,!1,{fileName:R,lineNumber:129,columnNumber:13},this),(0,j.jsxDEV)(`col`,{className:`col--triage`},void 0,!1,{fileName:R,lineNumber:130,columnNumber:13},this),(0,j.jsxDEV)(`col`,{className:`col--runs`},void 0,!1,{fileName:R,lineNumber:131,columnNumber:13},this),(0,j.jsxDEV)(`col`,{className:`col--updated`},void 0,!1,{fileName:R,lineNumber:132,columnNumber:13},this)]},void 0,!0,{fileName:R,lineNumber:126,columnNumber:11},this),(0,j.jsxDEV)(`thead`,{children:(0,j.jsxDEV)(`tr`,{children:[(0,j.jsxDEV)(`th`,{scope:`col`,className:`list__select`,children:(0,j.jsxDEV)(Ot,{state:u.headerState,label:`Select every review`,onChange:e=>e?u.selectAll():u.clear()},void 0,!1,{fileName:R,lineNumber:137,columnNumber:17},this)},void 0,!1,{fileName:R,lineNumber:136,columnNumber:15},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Branch`},void 0,!1,{fileName:R,lineNumber:143,columnNumber:15},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Work under review`},void 0,!1,{fileName:R,lineNumber:144,columnNumber:15},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Triage`},void 0,!1,{fileName:R,lineNumber:145,columnNumber:15},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Runs`},void 0,!1,{fileName:R,lineNumber:146,columnNumber:15},this),(0,j.jsxDEV)(`th`,{scope:`col`,children:`Updated`},void 0,!1,{fileName:R,lineNumber:147,columnNumber:15},this)]},void 0,!0,{fileName:R,lineNumber:135,columnNumber:13},this)},void 0,!1,{fileName:R,lineNumber:134,columnNumber:11},this),(0,j.jsxDEV)(`tbody`,{children:c.map(n=>{let r=n.state===`pending`,i=u.isSelected(n.key);return(0,j.jsxDEV)(`tr`,{className:[r?`reviews__row--pending`:``,i?`is-selected`:``].filter(Boolean).join(` `)||void 0,"aria-selected":i,onClick:()=>n.slug&&n.document?e(n.slug):n.reviewSession&&t(n.reviewSession.id),children:[(0,j.jsxDEV)(`td`,{className:`list__select`,onClick:e=>e.stopPropagation(),children:(0,j.jsxDEV)(Dt,{checked:i,label:`Select the review of ${n.branch}`,onChange:(e,t)=>u.toggle(n.key,t)},void 0,!1,{fileName:R,lineNumber:170,columnNumber:21},this)},void 0,!1,{fileName:R,lineNumber:169,columnNumber:19},this),(0,j.jsxDEV)(`td`,{children:[(0,j.jsxDEV)(`div`,{className:`list__title cell-clip`,title:n.branch,children:n.branch},void 0,!1,{fileName:R,lineNumber:177,columnNumber:21},this),(0,j.jsxDEV)(`div`,{className:`list__excerpt cell-clip`,title:r?`Not written yet — the agent writes it to ${n.path??`the review directory`}`:n.path,children:n.path??`—`},void 0,!1,{fileName:R,lineNumber:178,columnNumber:21},this)]},void 0,!0,{fileName:R,lineNumber:176,columnNumber:19},this),(0,j.jsxDEV)(`td`,{onClick:e=>e.stopPropagation(),children:(0,j.jsxDEV)(Uo,{entry:n,onOpenSession:t},void 0,!1,{fileName:R,lineNumber:190,columnNumber:21},this)},void 0,!1,{fileName:R,lineNumber:189,columnNumber:19},this),(0,j.jsxDEV)(`td`,{onClick:e=>e.stopPropagation(),children:(0,j.jsxDEV)(Wo,{entry:n},void 0,!1,{fileName:R,lineNumber:193,columnNumber:21},this)},void 0,!1,{fileName:R,lineNumber:192,columnNumber:19},this),(0,j.jsxDEV)(`td`,{className:`list__meta`,children:n.document?.runCount??`—`},void 0,!1,{fileName:R,lineNumber:195,columnNumber:19},this),(0,j.jsxDEV)(`td`,{className:`list__meta`,title:n.updated,children:Xt(n.updated)},void 0,!1,{fileName:R,lineNumber:196,columnNumber:19},this)]},n.key,!0,{fileName:R,lineNumber:155,columnNumber:17},this)})},void 0,!1,{fileName:R,lineNumber:150,columnNumber:11},this)]},void 0,!0,{fileName:R,lineNumber:120,columnNumber:9},this)},void 0,!1,{fileName:R,lineNumber:119,columnNumber:7},this),u.count>0&&(0,j.jsxDEV)(ao,{entries:d,count:u.count,hiddenCount:u.hiddenCount,onClear:u.clear,onNarrow:u.replace},void 0,!1,{fileName:R,lineNumber:205,columnNumber:9},this)]},void 0,!0,{fileName:R,lineNumber:89,columnNumber:5},this)}function Uo({entry:e,onOpenSession:t}){return e.subject?(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button cell-clip`,title:e.subject.title,onClick:()=>t(e.subject?.id),children:e.subject.title},void 0,!1,{fileName:R,lineNumber:233,columnNumber:7},this):e.link===`unowned`?(0,j.jsxDEV)(`span`,{className:`reviews__standalone`,title:`No review session in this project owns this file`,children:`—`},void 0,!1,{fileName:R,lineNumber:246,columnNumber:7},this):(0,j.jsxDEV)(`span`,{className:`reviews__standalone`,title:e.link===`orphaned`?`The session this reviewed is no longer listed`:`This review covers a branch on its own`,children:e.link},void 0,!1,{fileName:R,lineNumber:253,columnNumber:5},this)}function Wo({entry:e}){if(!e.document){let t=e.reviewSession?Nt(e.reviewSession):void 0;return(0,j.jsxDEV)(`span`,{className:`pill pill--pending`,title:t?.hint??`No review document yet.`,children:t?.label??`Not written yet`},void 0,!1,{fileName:R,lineNumber:274,columnNumber:7},this)}return(0,j.jsxDEV)(Go,{review:e.document},void 0,!1,{fileName:R,lineNumber:279,columnNumber:10},this)}function Go({review:e}){return e.counts.open>0?(0,j.jsxDEV)(`span`,{className:`pill pill--review`,title:`${e.counts.total} comment(s) in this review`,children:[e.counts.open,` of `,e.counts.total,` awaiting`]},void 0,!0,{fileName:R,lineNumber:285,columnNumber:7},this):e.status===`published`?(0,j.jsxDEV)(`span`,{className:`pill pill--executed`,title:`Staged comments were sent to the code host`,children:[`Published · `,e.counts.staged,` sent`]},void 0,!0,{fileName:R,lineNumber:294,columnNumber:7},this):(0,j.jsxDEV)(`span`,{className:`pill pill--executed`,children:[e.counts.staged,` staged · `,e.counts.discarded,` discarded`]},void 0,!0,{fileName:R,lineNumber:300,columnNumber:5},this)}var Ko=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/ReviewPage.tsx`;function qo({slug:e,onBack:t,onOpenSession:n,onOpenSettings:r}){let{data:i,isLoading:a,error:o}=dr(e),{data:s}=Qn();return a?(0,j.jsxDEV)(`div`,{className:`page-state`,children:`Loading review…`},void 0,!1,{fileName:Ko,lineNumber:22,columnNumber:25},this):o||!i?(0,j.jsxDEV)(`div`,{className:`page-state`,children:[(0,j.jsxDEV)(`p`,{children:`This review could not be loaded.`},void 0,!1,{fileName:Ko,lineNumber:26,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:t,children:`Back to reviews`},void 0,!1,{fileName:Ko,lineNumber:27,columnNumber:9},this)]},void 0,!0,{fileName:Ko,lineNumber:25,columnNumber:7},this):(0,j.jsxDEV)(`div`,{className:`session`,children:[(0,j.jsxDEV)(`header`,{className:`session__head`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`icon-button`,onClick:t,title:`Back (Esc)`,"aria-label":`Back`,children:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 16 16`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M9.5 3.5 5 8l4.5 4.5`,fill:`none`,stroke:`currentColor`,strokeWidth:`1.6`,strokeLinecap:`round`,strokeLinejoin:`round`},void 0,!1,{fileName:Ko,lineNumber:37,columnNumber:13},this)},void 0,!1,{fileName:Ko,lineNumber:36,columnNumber:11},this)},void 0,!1,{fileName:Ko,lineNumber:35,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`session__identity`,children:[(0,j.jsxDEV)(`h1`,{className:`session__title`,children:i.branch},void 0,!1,{fileName:Ko,lineNumber:43,columnNumber:11},this),(0,j.jsxDEV)(Jo,{review:i,project:s},void 0,!1,{fileName:Ko,lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:Ko,lineNumber:42,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`session__controls`,children:i.sessionId&&(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:()=>n(i.sessionId),children:`Open session`},void 0,!1,{fileName:Ko,lineNumber:49,columnNumber:13},this)},void 0,!1,{fileName:Ko,lineNumber:47,columnNumber:9},this)]},void 0,!0,{fileName:Ko,lineNumber:34,columnNumber:7},this),(0,j.jsxDEV)(va,{review:i,projectDirectory:s?.directory,onPlanned:n,onOpenSettings:r},void 0,!1,{fileName:Ko,lineNumber:60,columnNumber:7},this)]},void 0,!0,{fileName:Ko,lineNumber:33,columnNumber:5},this)}function Jo({review:e,project:t}){return(0,j.jsxDEV)(`div`,{className:`session__meta`,children:[(0,j.jsxDEV)(`span`,{children:[`base `,e.base]},void 0,!0,{fileName:Ko,lineNumber:79,columnNumber:7},this),(0,j.jsxDEV)(`span`,{"aria-hidden":`true`,children:`·`},void 0,!1,{fileName:Ko,lineNumber:80,columnNumber:7},this),(0,j.jsxDEV)(`span`,{title:e.scope.baseSha,children:e.scope.baseSha.slice(0,7)},void 0,!1,{fileName:Ko,lineNumber:81,columnNumber:7},this),(0,j.jsxDEV)(`span`,{"aria-hidden":`true`,children:`→`},void 0,!1,{fileName:Ko,lineNumber:82,columnNumber:7},this),(0,j.jsxDEV)(`span`,{title:e.scope.headSha,children:e.scope.headSha.slice(0,7)},void 0,!1,{fileName:Ko,lineNumber:83,columnNumber:7},this),e.runCount>1&&(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{"aria-hidden":`true`,children:`·`},void 0,!1,{fileName:Ko,lineNumber:86,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:[e.runCount,` runs`]},void 0,!0,{fileName:Ko,lineNumber:87,columnNumber:11},this)]},void 0,!0,{fileName:Ko,lineNumber:85,columnNumber:9},this),t&&(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{"aria-hidden":`true`,children:`·`},void 0,!1,{fileName:Ko,lineNumber:92,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:t.name},void 0,!1,{fileName:Ko,lineNumber:93,columnNumber:11},this)]},void 0,!0,{fileName:Ko,lineNumber:91,columnNumber:9},this)]},void 0,!0,{fileName:Ko,lineNumber:78,columnNumber:5},this)}var Yo=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/reviews/ReviewBranchModal.tsx`;function Xo({busy:e,onClose:t,onSubmit:n}){let{data:r,isLoading:i}=lr(),[a,o]=(0,k.useState)(``),[s,c]=(0,k.useState)(!1);(0,k.useEffect)(()=>{s||!r?.baseBranch||o(r.baseBranch)},[r?.baseBranch,s]);let l=r!==void 0&&!r.canReview,u=a.trim();return(0,j.jsxDEV)(jn,{title:`Review a branch`,onClose:t,dirty:s&&u!==(r?.baseBranch??``),confirmClose:{title:`Discard this base ref?`,body:`You changed the ref the diff is measured from. Closing goes back to the project default.`},footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:`This review will not be tied to any session.`},void 0,!1,{fileName:Yo,lineNumber:48,columnNumber:11},this),(0,j.jsxDEV)(Zo,{},void 0,!1,{fileName:Yo,lineNumber:49,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:e||l||i,title:l?r?.reason:void 0,onClick:()=>n({base:u.length>0&&u!==r?.baseBranch?u:void 0}),children:e?`Creating…`:`Create review session`},void 0,!1,{fileName:Yo,lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:Yo,lineNumber:47,columnNumber:9},this),children:[(0,j.jsxDEV)(`p`,{className:`empty__text`,children:[`A fresh agent reads this branch's diff and writes its findings into`,` `,(0,j.jsxDEV)(`code`,{children:`doc/review/<branch>.xml`},void 0,!1,{fileName:Yo,lineNumber:70,columnNumber:9},this),`. Use this for work no session of yours covers — a branch you pulled from someone else.`]},void 0,!0,{fileName:Yo,lineNumber:68,columnNumber:7},this),i?(0,j.jsxDEV)(`p`,{className:`panel__empty`,children:`Reading the branch…`},void 0,!1,{fileName:Yo,lineNumber:75,columnNumber:9},this):l?(0,j.jsxDEV)(`div`,{className:`banner banner--warning`,children:(0,j.jsxDEV)(`div`,{className:`banner__text`,children:r?.reason},void 0,!1,{fileName:Yo,lineNumber:78,columnNumber:11},this)},void 0,!1,{fileName:Yo,lineNumber:77,columnNumber:9},this):(0,j.jsxDEV)(`dl`,{className:`scope`,children:[(0,j.jsxDEV)(`div`,{className:`scope__row`,children:[(0,j.jsxDEV)(`dt`,{className:`scope__term`,children:`Branch`},void 0,!1,{fileName:Yo,lineNumber:83,columnNumber:13},this),(0,j.jsxDEV)(`dd`,{className:`scope__value`,children:r?.branch},void 0,!1,{fileName:Yo,lineNumber:84,columnNumber:13},this)]},void 0,!0,{fileName:Yo,lineNumber:82,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`scope__row`,children:[(0,j.jsxDEV)(`dt`,{className:`scope__term`,children:`Diff`},void 0,!1,{fileName:Yo,lineNumber:87,columnNumber:13},this),(0,j.jsxDEV)(`dd`,{className:`scope__value`,children:[r?.changedFileCount,` file`,r?.changedFileCount===1?``:`s`,r?.hasStagedChanges?` · staged changes included`:` · nothing staged`]},void 0,!0,{fileName:Yo,lineNumber:88,columnNumber:13},this)]},void 0,!0,{fileName:Yo,lineNumber:86,columnNumber:11},this),r?.headSha&&(0,j.jsxDEV)(`div`,{className:`scope__row`,children:[(0,j.jsxDEV)(`dt`,{className:`scope__term`,children:`Head`},void 0,!1,{fileName:Yo,lineNumber:95,columnNumber:15},this),(0,j.jsxDEV)(`dd`,{className:`scope__value scope__value--mono`,title:r.headSha,children:r.headSha.slice(0,7)},void 0,!1,{fileName:Yo,lineNumber:96,columnNumber:15},this)]},void 0,!0,{fileName:Yo,lineNumber:94,columnNumber:13},this)]},void 0,!0,{fileName:Yo,lineNumber:81,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`field`,children:[(0,j.jsxDEV)(`label`,{className:`field__label`,htmlFor:`review-base`,children:[`Base ref `,(0,j.jsxDEV)(`span`,{className:`field__optional`,children:`— what the diff is measured from`},void 0,!1,{fileName:Yo,lineNumber:106,columnNumber:20},this)]},void 0,!0,{fileName:Yo,lineNumber:105,columnNumber:9},this),(0,j.jsxDEV)(`input`,{id:`review-base`,className:`field__input`,"data-autofocus":!0,value:a,placeholder:`origin/main`,onChange:e=>{c(!0),o(e.target.value)}},void 0,!1,{fileName:Yo,lineNumber:108,columnNumber:9},this)]},void 0,!0,{fileName:Yo,lineNumber:104,columnNumber:7},this)]},void 0,!0,{fileName:Yo,lineNumber:38,columnNumber:5},this)}function Zo(){let e=Dn();return(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:e,children:`Cancel`},void 0,!1,{fileName:Yo,lineNumber:125,columnNumber:5},this)}var Qo=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/PackageList.tsx`;function $o({packages:e,selected:t,filter:n,onFilter:r,onSelect:i,dirty:a}){let o=n.trim().toLowerCase(),s=e.filter(e=>o.length===0||e.name.toLowerCase().includes(o)).sort((e,t)=>e.activeCount>0==t.activeCount>0?e.name.localeCompare(t.name):e.activeCount>0?-1:1);return(0,j.jsxDEV)(`div`,{className:`packages__list`,children:[(0,j.jsxDEV)(`div`,{className:`packages__filter`,children:(0,j.jsxDEV)(`input`,{className:`filter__input`,value:n,placeholder:`Filter packages…`,"aria-label":`Filter packages`,spellCheck:!1,onChange:e=>r(e.target.value)},void 0,!1,{fileName:Qo,lineNumber:38,columnNumber:9},this)},void 0,!1,{fileName:Qo,lineNumber:37,columnNumber:7},this),s.length===0?(0,j.jsxDEV)(`p`,{className:`packages__list-empty`,children:[`No package matches “`,n,`”.`]},void 0,!0,{fileName:Qo,lineNumber:49,columnNumber:9},this):(0,j.jsxDEV)(`ul`,{className:`packages__rows`,children:s.map(e=>(0,j.jsxDEV)(`li`,{children:(0,j.jsxDEV)(`button`,{type:`button`,className:`packages__row${e.name===t?` is-selected`:``}`,onClick:()=>i(e.name),"aria-current":e.name===t?`true`:void 0,children:[(0,j.jsxDEV)(`span`,{className:`packages__dot packages__dot--${e.activeCount>0?`on`:`off`}`},void 0,!1,{fileName:Qo,lineNumber:60,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`packages__row-body`,children:[(0,j.jsxDEV)(`span`,{className:`packages__row-name`,children:[e.name,a.has(e.name)&&(0,j.jsxDEV)(`span`,{className:`packages__row-dirty`,title:`Unapplied changes`,children:`•`},void 0,!1,{fileName:Qo,lineNumber:65,columnNumber:23},this)]},void 0,!0,{fileName:Qo,lineNumber:62,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`packages__row-meta`,children:[(0,j.jsxDEV)(`span`,{className:`chip`,children:e.source},void 0,!1,{fileName:Qo,lineNumber:71,columnNumber:21},this),(0,j.jsxDEV)(es,{pkg:e},void 0,!1,{fileName:Qo,lineNumber:72,columnNumber:21},this)]},void 0,!0,{fileName:Qo,lineNumber:70,columnNumber:19},this)]},void 0,!0,{fileName:Qo,lineNumber:61,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`packages__row-count`,children:[e.activeCount,`/`,e.totalCount]},void 0,!0,{fileName:Qo,lineNumber:75,columnNumber:17},this)]},void 0,!0,{fileName:Qo,lineNumber:54,columnNumber:15},this)},e.name,!1,{fileName:Qo,lineNumber:53,columnNumber:13},this))},void 0,!1,{fileName:Qo,lineNumber:51,columnNumber:9},this)]},void 0,!0,{fileName:Qo,lineNumber:36,columnNumber:5},this)}function es({pkg:e}){return e.presence===`cached-only`?(0,j.jsxDEV)(`span`,{className:`chip`,title:`Installed in the cache but not listed in invariant.json`,children:`not declared`},void 0,!1,{fileName:Qo,lineNumber:94,columnNumber:7},this):e.presence===`declared-only`?(0,j.jsxDEV)(`span`,{className:`chip chip--warning`,title:`Listed in invariant.json but not installed here`,children:`not installed`},void 0,!1,{fileName:Qo,lineNumber:101,columnNumber:7},this):null}var ts={add:[],remove:[]};function ns(e){return`${e.type}/${e.name}`}function rs(e,t){let n=ns(t);return e.filter(e=>ns(e)!==n)}function is(e,t){let n=ns(t);return e.some(e=>ns(e)===n)}function as(e,t,n){let r={type:t.type,name:t.name},i={add:rs(e.add,r),remove:rs(e.remove,r)};return n===t.active?i:n?{...i,add:[...i.add,r]}:{...i,remove:[...i.remove,r]}}function os(e,t,n,r){return t.filter(e=>e.type===n).reduce((e,t)=>as(e,t,r),e)}function ss(e,t,n){return t.reduce((e,t)=>as(e,t,n),e)}function cs(e,t){let n={type:t.type,name:t.name};return is(e.add,n)?`adding`:is(e.remove,n)?`removing`:`unchanged`}function ls(e,t){let n=cs(e,t);return n===`adding`||n!==`removing`&&t.active}function us(e,t,n){let r=t.filter(e=>e.type===n);if(r.length===0)return`none`;let i=r.filter(t=>ls(e,t)).length;return i===0?`none`:i===r.length?`all`:`some`}function ds(e){return e.add.length+e.remove.length}function fs(e){return ds(e)===0}function ps(e){return Wt.filter(t=>e.some(e=>e.type===t))}var ms={agents:`agent`,skills:`skill`,commands:`command`,rules:`rule`,contexts:`context`,instructions:`instruction`};function hs(e,t){return`${ms[t.type]}:${e}/${t.name}`}function gs(e,t,n={}){let r=[];return t.remove.length>0&&r.push(`invariant remove ${t.remove.map(t=>hs(e,t)).join(` `)}`),t.add.length>0&&r.push(`invariant add ${t.add.map(t=>hs(e,t)).join(` `)}`),n.sync&&r.length>0&&r.push(`invariant sync`),r}function _s(e,t={}){return`invariant install ${[vs(e),...[t.activate===!1?`--no-add`:void 0,t.sync?`--sync`:void 0].filter(Boolean)].join(` `)}`}function vs(e){if(e.kind===`github`)return`github:${e.owner}/${e.repo}${e.ref?`#${e.ref}`:``}`;if(e.kind===`skills`){let t=e.slug?`/${e.slug}`:``;return`skills:${e.owner}/${e.repo}${t}${e.ref?`#${e.ref}`:``}`}return`${e.name}${e.version?`@${e.version}`:``}`}function ys(e){let[t,n,r]=e.trim().replace(/^https?:\/\/(www\.)?skills\.sh\//i,``).replace(/^skills:/i,``).replace(/[?#].*$/,``).replace(/^\/+|\/+$/g,``).split(`/`);return{owner:t||void 0,repo:n||void 0,slug:r||void 0}}function bs(e){let[t,n]=e.trim().replace(/^https?:\/\/(www\.)?github\.com\//i,``).replace(/^git@github\.com:/i,``).replace(/\.git$/i,``).replace(/^\/+|\/+$/g,``).split(`/`);return{owner:t||void 0,repo:n||void 0}}function xs(e){if(e.source===`skills`&&e.sourceUrl){let{owner:t,repo:n}=ys(e.sourceUrl);if(t&&n)return{kind:`skills`,owner:t,repo:n}}if(e.source===`github`&&e.sourceUrl){let{owner:t,repo:n}=bs(e.sourceUrl);if(t&&n)return{kind:`github`,owner:t,repo:n}}return{kind:`registry`,name:e.name}}var Ss=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/ItemTypeGroup.tsx`,Cs="invariant.json activates this whole type at once. `invariant remove` cannot undo that entry, so edit invariant.json to change it.";function ws({type:e,items:t,pending:n,locked:r,disabled:i,onToggleItem:a,onToggleType:o}){let s=t.filter(t=>t.type===e),c=us(n,t,e),l=s.filter(e=>ls(n,e)).length;return(0,j.jsxDEV)(`section`,{className:`packages__group`,children:[(0,j.jsxDEV)(`header`,{className:`packages__group-head`,children:[(0,j.jsxDEV)(`label`,{className:`packages__group-toggle`,children:[(0,j.jsxDEV)(Ot,{state:c,disabled:i||r,onChange:t=>o(e,t),label:`All ${e}`},void 0,!1,{fileName:Ss,lineNumber:37,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`packages__group-name`,children:e},void 0,!1,{fileName:Ss,lineNumber:43,columnNumber:11},this)]},void 0,!0,{fileName:Ss,lineNumber:36,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`packages__group-count`,children:[l,`/`,s.length]},void 0,!0,{fileName:Ss,lineNumber:46,columnNumber:9},this),r&&(0,j.jsxDEV)(`span`,{className:`chip chip--warning`,title:Cs,children:`declared type-wide`},void 0,!1,{fileName:Ss,lineNumber:51,columnNumber:11},this)]},void 0,!0,{fileName:Ss,lineNumber:35,columnNumber:7},this),(0,j.jsxDEV)(`ul`,{className:`packages__items`,children:s.map(e=>{let t=cs(n,e);return(0,j.jsxDEV)(`li`,{className:`packages__item${t===`unchanged`?``:` is-staged-${t===`adding`?`add`:`remove`}`}`,children:[(0,j.jsxDEV)(`label`,{className:`packages__item-label`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:ls(n,e),disabled:i||r,onChange:t=>a(e,t.target.checked),title:r?Cs:void 0},void 0,!1,{fileName:Ss,lineNumber:66,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`packages__item-name`,title:e.canonicalPath,children:e.name},void 0,!1,{fileName:Ss,lineNumber:73,columnNumber:17},this),e.qualifiedName!==e.name&&(0,j.jsxDEV)(`span`,{className:`packages__item-installed`,title:e.canonicalPath,children:e.qualifiedName},void 0,!1,{fileName:Ss,lineNumber:79,columnNumber:19},this)]},void 0,!0,{fileName:Ss,lineNumber:65,columnNumber:15},this),t!==`unchanged`&&(0,j.jsxDEV)(`span`,{className:`packages__item-flag`,children:t===`adding`?`will add`:`will remove`},void 0,!1,{fileName:Ss,lineNumber:85,columnNumber:17},this)]},e.name,!0,{fileName:Ss,lineNumber:61,columnNumber:13},this)})},void 0,!1,{fileName:Ss,lineNumber:57,columnNumber:7},this)]},void 0,!0,{fileName:Ss,lineNumber:34,columnNumber:5},this)}var Ts=/\u001b\[[0-9;]*m/g;function Es(e){return e.replace(Ts,``)}var Ds=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/Transcript.tsx`;function Os({output:e,commandLine:t}){let n=Es(e).trim();return n.length===0&&!t?null:(0,j.jsxDEV)(`div`,{className:`transcript`,children:[t&&(0,j.jsxDEV)(`div`,{className:`transcript__command`,children:[`$ `,t]},void 0,!0,{fileName:Ds,lineNumber:22,columnNumber:23},this),n.length>0&&(0,j.jsxDEV)(`pre`,{className:`transcript__body`,children:n},void 0,!1,{fileName:Ds,lineNumber:23,columnNumber:27},this)]},void 0,!0,{fileName:Ds,lineNumber:21,columnNumber:5},this)}var ks=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/PackageDetail.tsx`;function As({pkg:e,pending:t,busy:n,failure:r,onToggleItem:i,onToggleType:a,onStageAll:o,onUninstall:s,onInstallMissing:c,onDismissFailure:l}){let u=ps(e.items),d=new Set(e.typeWideActive);return(0,j.jsxDEV)(`section`,{className:`packages__detail`,"aria-label":`${e.name} contents`,children:[(0,j.jsxDEV)(`header`,{className:`packages__detail-head`,children:[(0,j.jsxDEV)(`div`,{className:`packages__identity`,children:[(0,j.jsxDEV)(`h2`,{className:`packages__title`,children:[e.name,(0,j.jsxDEV)(`span`,{className:`packages__version`,children:[`@`,e.version]},void 0,!0,{fileName:ks,lineNumber:48,columnNumber:13},this)]},void 0,!0,{fileName:ks,lineNumber:46,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`packages__meta`,children:[(0,j.jsxDEV)(js,{pkg:e},void 0,!1,{fileName:ks,lineNumber:51,columnNumber:13},this),e.author&&(0,j.jsxDEV)(`span`,{className:`packages__author`,children:e.author},void 0,!1,{fileName:ks,lineNumber:52,columnNumber:28},this)]},void 0,!0,{fileName:ks,lineNumber:50,columnNumber:11},this),e.description&&(0,j.jsxDEV)(`p`,{className:`packages__description`,children:e.description},void 0,!1,{fileName:ks,lineNumber:54,columnNumber:31},this)]},void 0,!0,{fileName:ks,lineNumber:45,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`packages__detail-actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:n||e.totalCount===0||e.activeCount===e.totalCount,onClick:()=>o(!0),children:`Add all`},void 0,!1,{fileName:ks,lineNumber:58,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:n||e.activeCount===0,onClick:()=>o(!1),children:`Remove all`},void 0,!1,{fileName:ks,lineNumber:66,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--danger`,disabled:n,onClick:s,children:`Uninstall`},void 0,!1,{fileName:ks,lineNumber:74,columnNumber:11},this)]},void 0,!0,{fileName:ks,lineNumber:57,columnNumber:9},this)]},void 0,!0,{fileName:ks,lineNumber:44,columnNumber:7},this),r&&(0,j.jsxDEV)(`div`,{className:`packages__failure`,role:`alert`,children:[(0,j.jsxDEV)(`div`,{className:`packages__failure-head`,children:[(0,j.jsxDEV)(`strong`,{children:r.message},void 0,!1,{fileName:ks,lineNumber:83,columnNumber:13},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:l,children:`Dismiss`},void 0,!1,{fileName:ks,lineNumber:84,columnNumber:13},this)]},void 0,!0,{fileName:ks,lineNumber:82,columnNumber:11},this),(0,j.jsxDEV)(Os,{output:r.transcript??``,commandLine:r.commandLine},void 0,!1,{fileName:ks,lineNumber:88,columnNumber:11},this)]},void 0,!0,{fileName:ks,lineNumber:81,columnNumber:9},this),e.presence===`declared-only`?(0,j.jsxDEV)(`div`,{className:`packages__notice`,children:[(0,j.jsxDEV)(`p`,{children:[(0,j.jsxDEV)(`strong`,{children:e.name},void 0,!1,{fileName:ks,lineNumber:95,columnNumber:13},this),` is declared in `,(0,j.jsxDEV)(`code`,{children:`invariant.json`},void 0,!1,{fileName:ks,lineNumber:95,columnNumber:56},this),` but is not installed in this checkout — the usual cause is a colleague adding it and this working copy never fetching it.`]},void 0,!0,{fileName:ks,lineNumber:94,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:n,onClick:c,children:`Install it`},void 0,!1,{fileName:ks,lineNumber:99,columnNumber:11},this)]},void 0,!0,{fileName:ks,lineNumber:93,columnNumber:9},this):e.totalCount===0?(0,j.jsxDEV)(`p`,{className:`packages__empty-note`,children:`This package ships no items.`},void 0,!1,{fileName:ks,lineNumber:104,columnNumber:9},this):(0,j.jsxDEV)(`div`,{className:`packages__tree`,children:u.map(r=>(0,j.jsxDEV)(ws,{type:r,items:e.items,pending:t,locked:d.has(r),disabled:n,onToggleItem:i,onToggleType:a},r,!1,{fileName:ks,lineNumber:108,columnNumber:13},this))},void 0,!1,{fileName:ks,lineNumber:106,columnNumber:9},this)]},void 0,!0,{fileName:ks,lineNumber:43,columnNumber:5},this)}function js({pkg:e}){let t=e.source===`github`?`github`:e.source===`skills`?`skills.sh`:`registry`;return e.sourceUrl?(0,j.jsxDEV)(`a`,{className:`chip chip--link`,href:e.sourceUrl,target:`_blank`,rel:`noreferrer`,children:[t,` ↗`]},void 0,!0,{fileName:ks,lineNumber:131,columnNumber:7},this):(0,j.jsxDEV)(`span`,{className:`chip`,children:t},void 0,!1,{fileName:ks,lineNumber:136,columnNumber:10},this)}var Ms=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/PendingChangesBar.tsx`;function Ns({packageName:e,pending:t,sync:n,busy:r,running:i,onSyncChange:a,onDiscard:o,onApply:s}){let c=gs(e,t,{sync:n});return(0,j.jsxDEV)(`div`,{className:`packages__bar`,role:`region`,"aria-live":`polite`,"aria-label":`Pending changes`,children:[(0,j.jsxDEV)(`div`,{className:`packages__bar-summary`,children:[(0,j.jsxDEV)(`span`,{className:`packages__bar-counts`,children:[t.add.length>0&&(0,j.jsxDEV)(`strong`,{children:[t.add.length,` to add`]},void 0,!0,{fileName:Ms,lineNumber:39,columnNumber:38},this),t.add.length>0&&t.remove.length>0&&` · `,t.remove.length>0&&(0,j.jsxDEV)(`strong`,{children:[t.remove.length,` to remove`]},void 0,!0,{fileName:Ms,lineNumber:41,columnNumber:41},this)]},void 0,!0,{fileName:Ms,lineNumber:38,columnNumber:9},this),(0,j.jsxDEV)(`code`,{className:`packages__bar-preview`,title:c.join(`
|
|
259
|
+
`),children:i??c.join(` · `)},void 0,!1,{fileName:Ms,lineNumber:43,columnNumber:9},this)]},void 0,!0,{fileName:Ms,lineNumber:37,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`packages__bar-actions`,children:[(0,j.jsxDEV)(`label`,{className:`checkbox`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:n,disabled:r,onChange:e=>a(e.target.checked)},void 0,!1,{fileName:Ms,lineNumber:50,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:[`Run `,(0,j.jsxDEV)(`code`,{children:`sync`},void 0,!1,{fileName:Ms,lineNumber:57,columnNumber:17},this),` after`]},void 0,!0,{fileName:Ms,lineNumber:56,columnNumber:11},this)]},void 0,!0,{fileName:Ms,lineNumber:49,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,disabled:r,onClick:o,children:`Discard`},void 0,!1,{fileName:Ms,lineNumber:60,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:r,onClick:s,children:r?`Applying…`:`Apply`},void 0,!1,{fileName:Ms,lineNumber:63,columnNumber:9},this)]},void 0,!0,{fileName:Ms,lineNumber:48,columnNumber:7},this)]},void 0,!0,{fileName:Ms,lineNumber:36,columnNumber:5},this)}function Ps(e){return e.toLowerCase().replace(/[^a-z0-9._-]/g,`-`).replace(/-+/g,`-`).replace(/^[-.]+|[-.]+$/g,``)}function Fs(e){return e.replace(/^@/,``).replace(/\//g,`-`).toLowerCase().replace(/[^a-z0-9._-]/g,`-`).replace(/-+/g,`-`).replace(/^[-.]+|[-.]+$/g,``)}function Is(e,t){let n=Fs(e);return!n||t===n||t.startsWith(`${n}-`)?t:`${n}-${t}`}function Ls(e,t){return`@${Ps(e)}/${Ps(t)}`}function Rs(e,t,n,r=`.agents`){return`${r}/skills/${Is(Ls(e,t),Ps(n))}`}function zs(e,t,n,r=`.claude`){return`${r}/skills/${Is(Ls(e,t),Ps(n))}`}function Bs(e){return!Number.isFinite(e)||e<=0?`0`:e>=1e6?`${Vs(e/1e6)}M`:e>=1e3?`${Vs(e/1e3)}K`:String(Math.round(e))}function Vs(e){return e.toFixed(1).replace(/\.0$/,``)}function Hs(e){return`${new Intl.NumberFormat(`en-US`).format(Math.max(0,Math.round(e)))} installs`}function Us(e){return e<1024?`${e} B`:e<1048576?`${Vs(e/1024)} KB`:`${Vs(e/1048576)} MB`}function Ws(e){if(!e)return;let t=Date.parse(e);if(Number.isNaN(t))return;let n=Math.floor((Date.now()-t)/864e5);return n<=0?`today`:n===1?`yesterday`:n<30?`${n}d ago`:n<365?`${Math.floor(n/30)}mo ago`:`${Math.floor(n/365)}y ago`}var z=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/InstallPackageModal.tsx`;function Gs({busy:e,error:t,onClose:n,onSubmit:r,onBrowseSkills:i}){let[a,o]=(0,k.useState)(`github`),[s,c]=(0,k.useState)(``),[l,u]=(0,k.useState)(``),[d,f]=(0,k.useState)(``),[p,m]=(0,k.useState)(!0),[h,g]=(0,k.useState)(!1),_=(0,k.useMemo)(()=>ys(d),[d]),v=a===`skills`&&!_.repo?d:``,y=Br(v),b=(0,k.useMemo)(()=>{if(a===`github`){let{owner:e,repo:t}=bs(s);return!e||!t?void 0:{kind:`github`,owner:e,repo:t,ref:l.trim()||void 0}}let{owner:e,repo:t,slug:n}=_;if(!(!e||!t))return{kind:`skills`,owner:e,repo:t,slug:n}},[a,s,l,_]),x=b?.kind===`skills`&&b.slug?zs(b.owner,b.repo,b.slug):void 0,ee=()=>{!b||e||r({source:b,activate:p,sync:h})},te=e=>{e.key===`Enter`&&(e.preventDefault(),ee())};return(0,j.jsxDEV)(jn,{title:`Install package`,onClose:n,width:640,dirty:[s,l,d].some(e=>e.trim().length>0),confirmClose:{title:`Discard this package?`,body:`Nothing has been installed yet. Closing loses what you typed.`},footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:[`Runs in `,a===`github`?`GitHub`:`Skills.sh`,` mode`]},void 0,!0,{fileName:z,lineNumber:96,columnNumber:11},this),(0,j.jsxDEV)(qs,{},void 0,!1,{fileName:z,lineNumber:97,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:e||!b,onClick:ee,children:e?`Installing…`:`Install`},void 0,!1,{fileName:z,lineNumber:98,columnNumber:11},this)]},void 0,!0,{fileName:z,lineNumber:95,columnNumber:9},this),children:[(0,j.jsxDEV)(`div`,{className:`segmented`,role:`tablist`,"aria-label":`Package source`,children:[`github`,`skills`].map(e=>(0,j.jsxDEV)(`button`,{type:`button`,role:`tab`,"aria-selected":a===e,className:`segmented__item${a===e?` is-active`:``}`,onClick:()=>o(e),children:e===`github`?`GitHub`:`Skills.sh`},e,!1,{fileName:z,lineNumber:111,columnNumber:11},this))},void 0,!1,{fileName:z,lineNumber:109,columnNumber:7},this),a===`github`?(0,j.jsxDEV)(`div`,{className:`field-row`,children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Repository`},void 0,!1,{fileName:z,lineNumber:127,columnNumber:13},this),(0,j.jsxDEV)(`input`,{className:`field__input`,"data-autofocus":!0,value:s,placeholder:`owner/repo`,onChange:e=>c(e.target.value),onKeyDown:te},void 0,!1,{fileName:z,lineNumber:128,columnNumber:13},this)]},void 0,!0,{fileName:z,lineNumber:126,columnNumber:11},this),(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`Ref `,(0,j.jsxDEV)(`span`,{className:`field__optional`,children:`optional`},void 0,!1,{fileName:z,lineNumber:139,columnNumber:19},this)]},void 0,!0,{fileName:z,lineNumber:138,columnNumber:13},this),(0,j.jsxDEV)(`input`,{className:`field__input`,value:l,placeholder:`branch, tag or commit`,onChange:e=>u(e.target.value),onKeyDown:te},void 0,!1,{fileName:z,lineNumber:141,columnNumber:13},this)]},void 0,!0,{fileName:z,lineNumber:137,columnNumber:11},this)]},void 0,!0,{fileName:z,lineNumber:125,columnNumber:9},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Skill`},void 0,!1,{fileName:z,lineNumber:153,columnNumber:13},this),(0,j.jsxDEV)(`input`,{className:`field__input`,"data-autofocus":!0,value:d,placeholder:`search, or paste owner/repo/skill`,spellCheck:!1,onChange:e=>f(e.target.value),onKeyDown:te},void 0,!1,{fileName:z,lineNumber:154,columnNumber:13},this)]},void 0,!0,{fileName:z,lineNumber:152,columnNumber:11},this),(0,j.jsxDEV)(Ks,{loading:y.isLoading&&v.length>=2,unavailable:y.isError||y.data?.unavailable===!0,query:v,skills:y.data?.skills??[],selected:b?.kind===`skills`?`${b.owner}/${b.repo}/${b.slug??``}`:``,onPick:e=>{f(`${e.owner}/${e.repo}/${e.slug}`)}},void 0,!1,{fileName:z,lineNumber:165,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:i,children:`Browse all skills →`},void 0,!1,{fileName:z,lineNumber:174,columnNumber:11},this)]},void 0,!0,{fileName:z,lineNumber:151,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`packages__install-options`,children:[(0,j.jsxDEV)(`label`,{className:`checkbox`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:p,onChange:e=>m(e.target.checked)},void 0,!1,{fileName:z,lineNumber:182,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:a===`skills`?`Activate now`:`Activate all items now`},void 0,!1,{fileName:z,lineNumber:183,columnNumber:11},this)]},void 0,!0,{fileName:z,lineNumber:181,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`checkbox`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:h,onChange:e=>g(e.target.checked)},void 0,!1,{fileName:z,lineNumber:186,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:[`Run `,(0,j.jsxDEV)(`code`,{children:`sync`},void 0,!1,{fileName:z,lineNumber:188,columnNumber:17},this),` after`]},void 0,!0,{fileName:z,lineNumber:187,columnNumber:11},this)]},void 0,!0,{fileName:z,lineNumber:185,columnNumber:9},this)]},void 0,!0,{fileName:z,lineNumber:180,columnNumber:7},this),x&&(0,j.jsxDEV)(`div`,{className:`packages__preview`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Installs as`},void 0,!1,{fileName:z,lineNumber:195,columnNumber:11},this),(0,j.jsxDEV)(`code`,{className:`packages__preview-line`,children:x},void 0,!1,{fileName:z,lineNumber:196,columnNumber:11},this)]},void 0,!0,{fileName:z,lineNumber:194,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`packages__preview`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Command`},void 0,!1,{fileName:z,lineNumber:201,columnNumber:9},this),(0,j.jsxDEV)(`code`,{className:`packages__preview-line`,children:b?_s(b,{activate:p,sync:h}):`invariant install …`},void 0,!1,{fileName:z,lineNumber:202,columnNumber:9},this)]},void 0,!0,{fileName:z,lineNumber:200,columnNumber:7},this),t&&(0,j.jsxDEV)(`p`,{className:`packages__inline-error`,role:`alert`,children:t},void 0,!1,{fileName:z,lineNumber:208,columnNumber:9},this)]},void 0,!0,{fileName:z,lineNumber:85,columnNumber:5},this)}function Ks({loading:e,unavailable:t,query:n,skills:r,selected:i,onPick:a}){return n.length<2?(0,j.jsxDEV)(`p`,{className:`packages__picker-note`,children:[`Type two characters to search skills.sh, or paste `,(0,j.jsxDEV)(`code`,{children:`owner/repo/skill`},void 0,!1,{fileName:z,lineNumber:240,columnNumber:59},this),`.`]},void 0,!0,{fileName:z,lineNumber:239,columnNumber:7},this):e?(0,j.jsxDEV)(`p`,{className:`packages__picker-note`,children:`Searching skills.sh…`},void 0,!1,{fileName:z,lineNumber:244,columnNumber:23},this):t?(0,j.jsxDEV)(`p`,{className:`packages__picker-note`,children:[`skills.sh is unreachable — paste `,(0,j.jsxDEV)(`code`,{children:`owner/repo/skill`},void 0,!1,{fileName:z,lineNumber:248,columnNumber:42},this),` to install anyway.`]},void 0,!0,{fileName:z,lineNumber:247,columnNumber:7},this):r.length===0?(0,j.jsxDEV)(`p`,{className:`packages__picker-note`,children:[`No skill matches “`,n,`”.`]},void 0,!0,{fileName:z,lineNumber:253,columnNumber:12},this):(0,j.jsxDEV)(`ul`,{className:`packages__picker`,children:r.slice(0,20).map(e=>{let t=`${e.owner}/${e.repo}/${e.slug}`;return(0,j.jsxDEV)(`li`,{children:(0,j.jsxDEV)(`button`,{type:`button`,className:`packages__picker-item${i===t?` is-selected`:``}`,onClick:()=>a(e),children:[(0,j.jsxDEV)(`span`,{className:`packages__picker-name`,children:[e.name,e.isOfficial&&(0,j.jsxDEV)(`span`,{className:`chip chip--official`,children:`official`},void 0,!1,{fileName:z,lineNumber:269,columnNumber:38},this)]},void 0,!0,{fileName:z,lineNumber:267,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`packages__picker-text`,children:[e.source,(0,j.jsxDEV)(`span`,{className:`skills__installs`,title:Hs(e.installs),children:[Bs(e.installs),` installs`]},void 0,!0,{fileName:z,lineNumber:273,columnNumber:17},this)]},void 0,!0,{fileName:z,lineNumber:271,columnNumber:15},this)]},void 0,!0,{fileName:z,lineNumber:262,columnNumber:13},this)},t,!1,{fileName:z,lineNumber:261,columnNumber:11},this)})},void 0,!1,{fileName:z,lineNumber:257,columnNumber:5},this)}function qs(){let e=Dn();return(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:e,children:`Cancel`},void 0,!1,{fileName:z,lineNumber:289,columnNumber:5},this)}var Js=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/UninstallConfirm.tsx`;function Ys({packageName:e,busy:t,onClose:n,onConfirm:r}){return(0,j.jsxDEV)(jn,{title:`Uninstall ${e}?`,onClose:n,width:520,footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:[`Runs `,(0,j.jsxDEV)(`code`,{children:[`invariant uninstall `,e]},void 0,!0,{fileName:Js,lineNumber:19,columnNumber:18},this)]},void 0,!0,{fileName:Js,lineNumber:18,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:n,children:`Cancel`},void 0,!1,{fileName:Js,lineNumber:21,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--danger`,disabled:t,onClick:r,children:t?`Uninstalling…`:`Uninstall`},void 0,!1,{fileName:Js,lineNumber:24,columnNumber:11},this)]},void 0,!0,{fileName:Js,lineNumber:17,columnNumber:9},this),children:[(0,j.jsxDEV)(`p`,{className:`modal__text`,children:[`This removes the cached package, its entry in `,(0,j.jsxDEV)(`code`,{children:`invariant.json`},void 0,!1,{fileName:Js,lineNumber:31,columnNumber:55},this),`, and every item it added to your target folders.`]},void 0,!0,{fileName:Js,lineNumber:30,columnNumber:7},this),(0,j.jsxDEV)(`p`,{className:`modal__text modal__text--muted`,children:`Reinstalling brings it all back. Files you wrote yourself are not touched.`},void 0,!1,{fileName:Js,lineNumber:34,columnNumber:7},this)]},void 0,!0,{fileName:Js,lineNumber:12,columnNumber:5},this)}var Xs=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/SyncPanel.tsx`;function Zs({busy:e,result:t,error:n,targets:r,onClose:i,onRun:a}){let[o,s]=(0,k.useState)(``),[c,l]=(0,k.useState)(!1),u=e=>a({target:o===``?void 0:o,check:e,force:c||void 0}),d=Gt.filter(e=>r.includes(e));return(0,j.jsxDEV)(jn,{title:`Sync`,onClose:i,width:680,footer:(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`modal__hint`,children:`Regenerates target folders from the active items`},void 0,!1,{fileName:Xs,lineNumber:40,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:e,onClick:()=>u(!0),children:`Check only`},void 0,!1,{fileName:Xs,lineNumber:41,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:e,onClick:()=>u(!1),children:e?`Syncing…`:`Sync`},void 0,!1,{fileName:Xs,lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:Xs,lineNumber:39,columnNumber:9},this),children:[(0,j.jsxDEV)(`div`,{className:`field-row`,children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`Target `,(0,j.jsxDEV)(`span`,{className:`field__optional`,children:`all configured`},void 0,!1,{fileName:Xs,lineNumber:53,columnNumber:20},this)]},void 0,!0,{fileName:Xs,lineNumber:52,columnNumber:11},this),(0,j.jsxDEV)(`select`,{className:`field__input`,value:o,disabled:e||d.length===0,onChange:e=>s(e.target.value),children:[(0,j.jsxDEV)(`option`,{value:``,children:`Every configured target`},void 0,!1,{fileName:Xs,lineNumber:61,columnNumber:13},this),d.map(e=>(0,j.jsxDEV)(`option`,{value:e,children:e},e,!1,{fileName:Xs,lineNumber:63,columnNumber:15},this))]},void 0,!0,{fileName:Xs,lineNumber:55,columnNumber:11},this)]},void 0,!0,{fileName:Xs,lineNumber:51,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`checkbox`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:c,disabled:e,onChange:e=>l(e.target.checked)},void 0,!1,{fileName:Xs,lineNumber:71,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:[`Replace hand-edited files (`,(0,j.jsxDEV)(`code`,{children:`--force`},void 0,!1,{fileName:Xs,lineNumber:78,columnNumber:40},this),`)`]},void 0,!0,{fileName:Xs,lineNumber:77,columnNumber:11},this)]},void 0,!0,{fileName:Xs,lineNumber:70,columnNumber:9},this)]},void 0,!0,{fileName:Xs,lineNumber:50,columnNumber:7},this),n?(0,j.jsxDEV)(`div`,{className:`packages__result packages__result--danger`,role:`alert`,children:[(0,j.jsxDEV)(`strong`,{children:n.message},void 0,!1,{fileName:Xs,lineNumber:85,columnNumber:11},this),(0,j.jsxDEV)(Os,{output:n.transcript??``,commandLine:n.commandLine},void 0,!1,{fileName:Xs,lineNumber:86,columnNumber:11},this)]},void 0,!0,{fileName:Xs,lineNumber:84,columnNumber:9},this):t?(0,j.jsxDEV)(`div`,{className:`packages__result packages__result--${$s(t)}`,role:`status`,children:[(0,j.jsxDEV)(`strong`,{children:Qs(t)},void 0,!1,{fileName:Xs,lineNumber:90,columnNumber:11},this),t.checked&&t.drift&&(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid packages__result-action`,disabled:e,onClick:()=>u(!1),children:`Sync now`},void 0,!1,{fileName:Xs,lineNumber:92,columnNumber:13},this),(0,j.jsxDEV)(Os,{output:t.run.output,commandLine:t.run.commandLine},void 0,!1,{fileName:Xs,lineNumber:101,columnNumber:11},this)]},void 0,!0,{fileName:Xs,lineNumber:89,columnNumber:9},this):(0,j.jsxDEV)(`p`,{className:`packages__picker-note`,children:[(0,j.jsxDEV)(`strong`,{children:`Check only`},void 0,!1,{fileName:Xs,lineNumber:105,columnNumber:11},this),` reports drift without writing anything — the same thing CI runs.`]},void 0,!0,{fileName:Xs,lineNumber:104,columnNumber:9},this)]},void 0,!0,{fileName:Xs,lineNumber:34,columnNumber:5},this)}function Qs(e){return e.checked?e.drift?`Out of sync`:`Everything is in sync`:e.ok?`Synced`:`Sync failed`}function $s(e){return e.checked?e.drift?`warning`:`success`:e.ok?`success`:`danger`}var ec=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/packages/PackagesPage.tsx`;function tc({installOpen:e,syncOpen:t,onInstallOpenChange:n,onSyncOpenChange:r,onBrowseSkills:i}){let a=Pn(),{data:o,isLoading:s}=Rr(),[c,l]=(0,k.useState)(),[u,d]=(0,k.useState)(``),[f,p]=(0,k.useState)(ts),[m,h]=(0,k.useState)(!1),[g,_]=(0,k.useState)(),[v,y]=(0,k.useState)(!1),[b,x]=(0,k.useState)(),[ee,te]=(0,k.useState)(),[ne,S]=(0,k.useState)(),re=Ur(),ie=Wr(),C=Gr(),ae=Kr(),w=(0,k.useMemo)(()=>o?.packages??[],[o]),T=(0,k.useMemo)(()=>w.find(e=>e.name===c),[w,c]);(0,k.useEffect)(()=>{if(w.length===0){l(void 0);return}(!c||!w.some(e=>e.name===c))&&l(w[0].name)},[w,c]);let oe=e=>{e!==c&&(l(e),p(ts),_(void 0))},E=C.isPending||ie.isPending||re.isPending,se=async()=>{if(!(!T||fs(f))){_(void 0);try{let e=await C.mutateAsync({packageName:T.name,add:f.add,remove:f.remove,sync:m||void 0});p(ts),a(`Applied ${e.runs.length} command${e.runs.length===1?``:`s`}`,`success`)}catch(e){_(nc(e))}}},ce=e=>{T&&p(t=>ss(t,T.items,e))},le=async()=>{if(T)try{await ie.mutateAsync(T.name),y(!1),p(ts),a(`Uninstalled ${T.name}`,`success`)}catch(e){y(!1),_(nc(e))}},ue=async e=>{S(void 0);try{let t=await re.mutateAsync(e);n(!1),t.package?(l(t.package.name),p(ts),a(`Installed ${t.package.name}@${t.package.version}`,`success`)):a(`Installed`,`success`)}catch(e){S(nc(e).message)}},de=async e=>{te(void 0),x(void 0);try{x(await ae.mutateAsync(e))}catch(e){te(nc(e))}},fe=e&&(0,j.jsxDEV)(Gs,{busy:re.isPending,error:ne,onClose:()=>{n(!1),S(void 0)},onSubmit:e=>void ue(e),onBrowseSkills:()=>{n(!1),i()}},void 0,!1,{fileName:ec,lineNumber:178,columnNumber:5},this),pe=t&&(0,j.jsxDEV)(Zs,{busy:ae.isPending,result:b,error:ee,targets:o?.targets??[],onClose:()=>{r(!1),x(void 0),te(void 0)},onRun:e=>void de(e)},void 0,!1,{fileName:ec,lineNumber:194,columnNumber:5},this);return s?(0,j.jsxDEV)(`div`,{className:`page-state`,children:`Loading packages…`},void 0,!1,{fileName:ec,lineNumber:208,columnNumber:25},this):o&&!o.initialized?(0,j.jsxDEV)(`div`,{className:`empty`,children:[(0,j.jsxDEV)(`h2`,{className:`empty__title`,children:`This directory is not an Invariant project`},void 0,!1,{fileName:ec,lineNumber:213,columnNumber:9},this),(0,j.jsxDEV)(`p`,{className:`empty__text`,children:[`Packages live in `,(0,j.jsxDEV)(`code`,{children:`invariant.json`},void 0,!1,{fileName:ec,lineNumber:215,columnNumber:28},this),`, and there is none in`,` `,(0,j.jsxDEV)(`code`,{children:o.directory},void 0,!1,{fileName:ec,lineNumber:216,columnNumber:11},this),` yet. Initializing picks which assistants to sync to, so it is a terminal step rather than a button here:`]},void 0,!0,{fileName:ec,lineNumber:214,columnNumber:9},this),(0,j.jsxDEV)(`code`,{className:`packages__preview-line`,children:`invariant init claude`},void 0,!1,{fileName:ec,lineNumber:219,columnNumber:9},this)]},void 0,!0,{fileName:ec,lineNumber:212,columnNumber:7},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`header`,{className:`topbar`,children:[(0,j.jsxDEV)(`div`,{className:`topbar__identity`,children:[(0,j.jsxDEV)(`h1`,{className:`topbar__title`,children:`Packages`},void 0,!1,{fileName:ec,lineNumber:228,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`topbar__path`,title:o?.directory,children:o?.name??o?.directory},void 0,!1,{fileName:ec,lineNumber:229,columnNumber:11},this)]},void 0,!0,{fileName:ec,lineNumber:227,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`topbar__controls`,children:[(0,j.jsxDEV)(`div`,{className:`topbar__counts`,children:[(0,j.jsxDEV)(`span`,{className:`count`,title:`Installed packages`,children:[(0,j.jsxDEV)(`span`,{className:`count__value`,children:o?.totals.packages??0},void 0,!1,{fileName:ec,lineNumber:237,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`count__label`,children:`Packages`},void 0,!1,{fileName:ec,lineNumber:238,columnNumber:15},this)]},void 0,!0,{fileName:ec,lineNumber:236,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`count count--in-progress`,title:`Active items across every package`,children:[(0,j.jsxDEV)(`span`,{className:`count__value`,children:o?.totals.activeItems??0},void 0,!1,{fileName:ec,lineNumber:241,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`count__label`,children:[`of `,o?.totals.totalItems??0,` items active`]},void 0,!0,{fileName:ec,lineNumber:242,columnNumber:15},this)]},void 0,!0,{fileName:ec,lineNumber:240,columnNumber:13},this)]},void 0,!0,{fileName:ec,lineNumber:235,columnNumber:11},this),(0,j.jsxDEV)(ko,{surface:`packages`},void 0,!1,{fileName:ec,lineNumber:246,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:i,children:`Browse skills`},void 0,!1,{fileName:ec,lineNumber:248,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:()=>r(!0),children:`Sync`},void 0,!1,{fileName:ec,lineNumber:251,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:()=>n(!0),children:`Install package`},void 0,!1,{fileName:ec,lineNumber:254,columnNumber:11},this)]},void 0,!0,{fileName:ec,lineNumber:234,columnNumber:9},this)]},void 0,!0,{fileName:ec,lineNumber:226,columnNumber:7},this),w.length===0?(0,j.jsxDEV)(`div`,{className:`empty`,children:[(0,j.jsxDEV)(`h2`,{className:`empty__title`,children:`No packages yet`},void 0,!1,{fileName:ec,lineNumber:262,columnNumber:11},this),(0,j.jsxDEV)(`p`,{className:`empty__text`,children:`A package bundles agents, skills, commands, rules, contexts and instructions that this project can activate. Install one from a GitHub repository, or browse the skills.sh catalogue, then choose which of its items your assistants actually see.`},void 0,!1,{fileName:ec,lineNumber:263,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`empty__actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:()=>n(!0),children:`Install package`},void 0,!1,{fileName:ec,lineNumber:269,columnNumber:13},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:i,children:`Browse skills`},void 0,!1,{fileName:ec,lineNumber:272,columnNumber:13},this)]},void 0,!0,{fileName:ec,lineNumber:268,columnNumber:11},this)]},void 0,!0,{fileName:ec,lineNumber:261,columnNumber:9},this):(0,j.jsxDEV)(`div`,{className:`packages`,children:[(0,j.jsxDEV)($o,{packages:w,selected:c,filter:u,onFilter:d,onSelect:oe,dirty:new Set(c&&!fs(f)?[c]:[])},void 0,!1,{fileName:ec,lineNumber:279,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`packages__pane`,children:T?(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(As,{pkg:T,pending:f,busy:E,failure:g,onToggleItem:(e,t)=>p(n=>as(n,e,t)),onToggleType:(e,t)=>p(n=>os(n,T.items,e,t)),onStageAll:ce,onUninstall:()=>y(!0),onInstallMissing:()=>void ue({source:xs(T)}),onDismissFailure:()=>_(void 0)},void 0,!1,{fileName:ec,lineNumber:291,columnNumber:17},this),!fs(f)&&(0,j.jsxDEV)(Ns,{packageName:T.name,pending:f,sync:m,busy:C.isPending,running:C.isPending?gs(T.name,f,{sync:m})[0]:void 0,onSyncChange:h,onDiscard:()=>p(ts),onApply:()=>void se()},void 0,!1,{fileName:ec,lineNumber:309,columnNumber:19},this)]},void 0,!0,{fileName:ec,lineNumber:290,columnNumber:15},this):(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Select a package.`},void 0,!1,{fileName:ec,lineNumber:326,columnNumber:15},this)},void 0,!1,{fileName:ec,lineNumber:288,columnNumber:11},this)]},void 0,!0,{fileName:ec,lineNumber:278,columnNumber:9},this),v&&T&&(0,j.jsxDEV)(Ys,{packageName:T.name,busy:ie.isPending,onClose:()=>y(!1),onConfirm:()=>void le()},void 0,!1,{fileName:ec,lineNumber:333,columnNumber:9},this),fe,pe]},void 0,!0,{fileName:ec,lineNumber:225,columnNumber:5},this)}function nc(e){return e instanceof zn?{message:e.message,commandLine:e.commandLine,transcript:e.transcript}:{message:e instanceof Error?e.message:String(e)}}var rc=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/skills/Sparkline.tsx`;function ic({values:e,title:t}){if(e.length<2)return null;let n=Math.max(...e),r=Math.min(...e),i=n-r,a=e.map((t,n)=>{let a=n/(e.length-1)*46+1,o=i===0?7:13-(t-r)/i*12;return`${a.toFixed(1)},${o.toFixed(1)}`});return(0,j.jsxDEV)(`svg`,{className:`skills__sparkline`,viewBox:`0 0 48 14`,width:48,height:14,"aria-hidden":`true`,focusable:`false`,children:[t&&(0,j.jsxDEV)(`title`,{children:t},void 0,!1,{fileName:rc,lineNumber:40,columnNumber:17},this),(0,j.jsxDEV)(`polyline`,{points:a.join(` `),fill:`none`,stroke:`currentColor`,strokeWidth:`1.25`,strokeLinecap:`round`,strokeLinejoin:`round`},void 0,!1,{fileName:rc,lineNumber:41,columnNumber:7},this)]},void 0,!0,{fileName:rc,lineNumber:32,columnNumber:5},this)}var ac=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/skills/SkillList.tsx`;function oc(e){return`${e.owner}/${e.repo}/${e.slug}`}function sc({skills:e,selected:t,installedSources:n,onSelect:r}){return(0,j.jsxDEV)(`ul`,{className:`skills__rows`,role:`listbox`,"aria-label":`Skills`,children:e.map(e=>{let i=oc(e),a=i===t;return(0,j.jsxDEV)(`li`,{children:(0,j.jsxDEV)(`button`,{type:`button`,role:`option`,"aria-selected":a,className:`skills__row${a?` is-selected`:``}`,onClick:()=>r(e),children:[(0,j.jsxDEV)(`span`,{className:`skills__row-body`,children:[(0,j.jsxDEV)(`span`,{className:`skills__row-name`,children:[(0,j.jsxDEV)(`span`,{className:`skills__row-label`,children:e.name},void 0,!1,{fileName:ac,lineNumber:43,columnNumber:19},this),e.isOfficial&&(0,j.jsxDEV)(`span`,{className:`chip chip--official`,children:`official`},void 0,!1,{fileName:ac,lineNumber:44,columnNumber:40},this),n.has(e.source)&&(0,j.jsxDEV)(`span`,{className:`chip`,children:`installed`},void 0,!1,{fileName:ac,lineNumber:45,columnNumber:58},this)]},void 0,!0,{fileName:ac,lineNumber:42,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`skills__row-source`,children:e.source},void 0,!1,{fileName:ac,lineNumber:47,columnNumber:17},this)]},void 0,!0,{fileName:ac,lineNumber:41,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`skills__row-meta`,children:[(0,j.jsxDEV)(`span`,{className:`skills__installs`,title:Hs(e.installs),children:Bs(e.installs)},void 0,!1,{fileName:ac,lineNumber:51,columnNumber:17},this),e.installsYesterday!==void 0&&(0,j.jsxDEV)(`span`,{className:`skills__delta`,title:`Installs yesterday`,children:[`+`,Bs(e.installsYesterday),`/d`]},void 0,!0,{fileName:ac,lineNumber:55,columnNumber:19},this),(0,j.jsxDEV)(ic,{values:e.weeklyInstalls,title:e.weeklyInstalls.join(` · `)},void 0,!1,{fileName:ac,lineNumber:59,columnNumber:17},this)]},void 0,!0,{fileName:ac,lineNumber:50,columnNumber:15},this)]},void 0,!0,{fileName:ac,lineNumber:34,columnNumber:13},this)},i,!1,{fileName:ac,lineNumber:33,columnNumber:11},this)})},void 0,!1,{fileName:ac,lineNumber:27,columnNumber:5},this)}var B=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/skills/SkillPreview.tsx`;function cc({listing:e,detail:t,loading:n,failed:r,installed:i,busy:a,onInstall:o}){let[s,c]=(0,k.useState)(!0),[l,u]=(0,k.useState)(!1),d=Rs(e.owner,e.repo,e.slug),f=zs(e.owner,e.repo,e.slug),p=_s({kind:`skills`,owner:e.owner,repo:e.repo,slug:e.slug},{activate:s,sync:l});return(0,j.jsxDEV)(`section`,{className:`skills__preview`,children:[(0,j.jsxDEV)(`header`,{className:`skills__preview-head`,children:[(0,j.jsxDEV)(`h2`,{className:`skills__preview-title`,children:[e.name,e.isOfficial&&(0,j.jsxDEV)(`span`,{className:`chip chip--official`,children:`official`},void 0,!1,{fileName:B,lineNumber:55,columnNumber:34},this),i&&(0,j.jsxDEV)(`span`,{className:`chip`,children:`installed`},void 0,!1,{fileName:B,lineNumber:56,columnNumber:25},this)]},void 0,!0,{fileName:B,lineNumber:53,columnNumber:9},this),(0,j.jsxDEV)(`p`,{className:`skills__preview-source`,children:e.source},void 0,!1,{fileName:B,lineNumber:58,columnNumber:9},this),(0,j.jsxDEV)(`p`,{className:`skills__preview-links`,children:[(0,j.jsxDEV)(`a`,{className:`chip chip--link`,href:t?.catalogUrl??`https://www.skills.sh/${e.source}/${e.slug}`,target:`_blank`,rel:`noreferrer`,children:`skills.sh ↗`},void 0,!1,{fileName:B,lineNumber:61,columnNumber:11},this),(0,j.jsxDEV)(`a`,{className:`chip chip--link`,href:t?.repository.url??`https://github.com/${e.source}`,target:`_blank`,rel:`noreferrer`,children:`GitHub ↗`},void 0,!1,{fileName:B,lineNumber:69,columnNumber:11},this)]},void 0,!0,{fileName:B,lineNumber:60,columnNumber:9},this)]},void 0,!0,{fileName:B,lineNumber:52,columnNumber:7},this),(0,j.jsxDEV)(`dl`,{className:`skills__stats`,children:[(0,j.jsxDEV)(lc,{label:`Installs`,value:Bs(e.installs),title:Hs(e.installs)},void 0,!1,{fileName:B,lineNumber:81,columnNumber:9},this),(0,j.jsxDEV)(lc,{label:`This week`,value:uc(e)},void 0,!1,{fileName:B,lineNumber:82,columnNumber:9},this),(0,j.jsxDEV)(lc,{label:`Stars`,value:t?.repository.stars===void 0?`—`:Bs(t.repository.stars)},void 0,!1,{fileName:B,lineNumber:83,columnNumber:9},this),(0,j.jsxDEV)(lc,{label:`License`,value:t?.repository.license??`—`},void 0,!1,{fileName:B,lineNumber:84,columnNumber:9},this),(0,j.jsxDEV)(lc,{label:`Pushed`,value:Ws(t?.repository.pushedAt)??`—`},void 0,!1,{fileName:B,lineNumber:85,columnNumber:9},this)]},void 0,!0,{fileName:B,lineNumber:80,columnNumber:7},this),r?(0,j.jsxDEV)(`p`,{className:`skills__note`,children:`skills.sh could not describe this skill. Installing still works — the files come from GitHub.`},void 0,!1,{fileName:B,lineNumber:89,columnNumber:9},this):n?(0,j.jsxDEV)(`p`,{className:`skills__note`,children:`Loading the skill…`},void 0,!1,{fileName:B,lineNumber:94,columnNumber:9},this):(0,j.jsxDEV)(j.Fragment,{children:[t?.description&&(0,j.jsxDEV)(`p`,{className:`skills__description`,children:t.description},void 0,!1,{fileName:B,lineNumber:97,columnNumber:35},this),(0,j.jsxDEV)(`div`,{className:`skills__files`,children:[(0,j.jsxDEV)(`p`,{className:`field__label`,children:[`Files (`,t?.files.length??0,`)`]},void 0,!0,{fileName:B,lineNumber:100,columnNumber:13},this),(0,j.jsxDEV)(`ul`,{className:`skills__file-list`,children:t?.files.map(e=>(0,j.jsxDEV)(`li`,{children:[(0,j.jsxDEV)(`code`,{children:e.path},void 0,!1,{fileName:B,lineNumber:104,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`skills__file-size`,children:Us(e.bytes)},void 0,!1,{fileName:B,lineNumber:105,columnNumber:19},this)]},e.path,!0,{fileName:B,lineNumber:103,columnNumber:17},this))},void 0,!1,{fileName:B,lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:B,lineNumber:99,columnNumber:11},this)]},void 0,!0,{fileName:B,lineNumber:96,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`skills__install-as`,children:[(0,j.jsxDEV)(`p`,{className:`field__label`,children:`Installs as`},void 0,!1,{fileName:B,lineNumber:114,columnNumber:9},this),(0,j.jsxDEV)(`code`,{className:`packages__preview-line`,children:d},void 0,!1,{fileName:B,lineNumber:115,columnNumber:9},this),(0,j.jsxDEV)(`code`,{className:`packages__preview-line`,children:f},void 0,!1,{fileName:B,lineNumber:116,columnNumber:9},this),(0,j.jsxDEV)(`p`,{className:`skills__note`,children:[`The whole `,(0,j.jsxDEV)(`code`,{children:e.source},void 0,!1,{fileName:B,lineNumber:118,columnNumber:21},this),` repository is cached as one package`,t&&(0,j.jsxDEV)(j.Fragment,{children:[` (`,(0,j.jsxDEV)(`code`,{children:t.install.packageName},void 0,!1,{fileName:B,lineNumber:119,columnNumber:26},this),`)`]},void 0,!0,{fileName:B,lineNumber:119,columnNumber:22},this),`; only this skill is activated. The name carries its package, which is why it is not just`,` `,(0,j.jsxDEV)(`code`,{children:e.slug},void 0,!1,{fileName:B,lineNumber:121,columnNumber:11},this),`.`]},void 0,!0,{fileName:B,lineNumber:117,columnNumber:9},this)]},void 0,!0,{fileName:B,lineNumber:113,columnNumber:7},this),(0,j.jsxDEV)(`p`,{className:`skills__note`,children:[`Installing copies files into `,(0,j.jsxDEV)(`code`,{children:`.invariant/cache`},void 0,!1,{fileName:B,lineNumber:126,columnNumber:38},this),`. Nothing runs. Security audits live on`,` `,(0,j.jsxDEV)(`a`,{href:t?.catalogUrl??`https://www.skills.sh`,target:`_blank`,rel:`noreferrer`,children:`skills.sh ↗`},void 0,!1,{fileName:B,lineNumber:128,columnNumber:9},this),`.`]},void 0,!0,{fileName:B,lineNumber:125,columnNumber:7},this),t?.skillMarkdown&&(0,j.jsxDEV)(`details`,{className:`skills__skill-md`,children:[(0,j.jsxDEV)(`summary`,{children:`SKILL.md`},void 0,!1,{fileName:B,lineNumber:136,columnNumber:11},this),(0,j.jsxDEV)(Ni,{source:t.skillMarkdown,compact:!0},void 0,!1,{fileName:B,lineNumber:137,columnNumber:11},this)]},void 0,!0,{fileName:B,lineNumber:135,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`skills__actions`,children:[(0,j.jsxDEV)(`label`,{className:`checkbox`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:s,onChange:e=>c(e.target.checked)},void 0,!1,{fileName:B,lineNumber:143,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:`Activate now`},void 0,!1,{fileName:B,lineNumber:144,columnNumber:11},this)]},void 0,!0,{fileName:B,lineNumber:142,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`checkbox`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:l,onChange:e=>u(e.target.checked)},void 0,!1,{fileName:B,lineNumber:147,columnNumber:11},this),(0,j.jsxDEV)(`span`,{children:[`Run `,(0,j.jsxDEV)(`code`,{children:`sync`},void 0,!1,{fileName:B,lineNumber:149,columnNumber:17},this),` after`]},void 0,!0,{fileName:B,lineNumber:148,columnNumber:11},this)]},void 0,!0,{fileName:B,lineNumber:146,columnNumber:9},this)]},void 0,!0,{fileName:B,lineNumber:141,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`packages__preview`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Command`},void 0,!1,{fileName:B,lineNumber:155,columnNumber:9},this),(0,j.jsxDEV)(`code`,{className:`packages__preview-line`,children:p},void 0,!1,{fileName:B,lineNumber:156,columnNumber:9},this)]},void 0,!0,{fileName:B,lineNumber:154,columnNumber:7},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:a,onClick:()=>o({activate:s,sync:l}),children:a?`Installing…`:i?`Reinstall skill`:`Install skill`},void 0,!1,{fileName:B,lineNumber:159,columnNumber:7},this)]},void 0,!0,{fileName:B,lineNumber:51,columnNumber:5},this)}function lc({label:e,value:t,title:n}){return(0,j.jsxDEV)(`div`,{className:`skills__stat`,children:[(0,j.jsxDEV)(`dt`,{className:`skills__stat-label`,children:e},void 0,!1,{fileName:B,lineNumber:174,columnNumber:7},this),(0,j.jsxDEV)(`dd`,{className:`skills__stat-value`,title:n,children:t},void 0,!1,{fileName:B,lineNumber:175,columnNumber:7},this)]},void 0,!0,{fileName:B,lineNumber:173,columnNumber:5},this)}function uc(e){let t=e.weeklyInstalls[e.weeklyInstalls.length-1];return t===void 0?`—`:Bs(t)}var dc=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/skills/SkillsBrowserPage.tsx`,fc=[{value:`all-time`,label:`Popular`},{value:`trending`,label:`Trending`},{value:`hot`,label:`Hot`}];function pc({onBack:e}){let t=Pn(),[n,r]=(0,k.useState)(()=>mc()),[i,a]=(0,k.useState)(0),[o,s]=(0,k.useState)(``),[c,l]=(0,k.useState)(``),[u,d]=(0,k.useState)(),[f,p]=(0,k.useState)([]),m=(0,k.useRef)(null),h=zr(n,i),g=Br(c),_=Rr(),v=Ur(),y=Vr(u?{owner:u.owner,repo:u.repo,slug:u.slug}:void 0);(0,k.useEffect)(()=>{let e=setTimeout(()=>l(o.trim()),200);return()=>clearTimeout(e)},[o]),(0,k.useEffect)(()=>{localStorage.setItem(`invariant.skills.view`,n),a(0),p([])},[n]),(0,k.useEffect)(()=>{h.data&&p(e=>h.data.page===0?h.data.skills:[...e,...h.data.skills])},[h.data]);let b=c.length>=2,x=b?g.data?.skills??[]:f,ee=(0,k.useMemo)(()=>{let e=new Set;for(let t of _.data?.packages??[]){let n=t.sourceUrl?.match(/^(?:skills|github):([^/#]+)\/([^/#]+)/);n&&e.add(`${n[1]}/${n[2]}`)}return e},[_.data]);(0,k.useEffect)(()=>{let t=t=>{let r=t.target instanceof HTMLElement&&[`INPUT`,`TEXTAREA`].includes(t.target.tagName);if(t.key===`/`&&!r){t.preventDefault(),m.current?.focus();return}r||(t.key===`ArrowDown`||t.key===`j`?n(1):t.key===`ArrowUp`||t.key===`k`?n(-1):t.key===`Escape`&&e())},n=e=>{if(x.length===0)return;let t=u?x.findIndex(e=>oc(e)===oc(u)):-1,n=Math.min(Math.max(t+e,0),x.length-1);d(x[n])};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[x,u,e]);let te=b?g.isError||g.data?.unavailable===!0:h.isError||h.data?.unavailable===!0,ne=async e=>{if(u)try{let n=await v.mutateAsync({source:{kind:`skills`,owner:u.owner,repo:u.repo,slug:u.slug},activate:e.activate,sync:e.sync});t(`Installed ${n.package?.name??u.name}`,`success`)}catch(e){t(e instanceof zn?e.message:String(e),`danger`)}};return(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`header`,{className:`topbar`,children:[(0,j.jsxDEV)(`div`,{className:`topbar__identity`,children:[(0,j.jsxDEV)(`h1`,{className:`topbar__title`,children:`Browse skills`},void 0,!1,{fileName:dc,lineNumber:144,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`topbar__path`,children:[`skills.sh`,h.data&&h.data.total>0&&(0,j.jsxDEV)(j.Fragment,{children:[` · `,new Intl.NumberFormat(`en-US`).format(h.data.total),` indexed`]},void 0,!0,{fileName:dc,lineNumber:148,columnNumber:15},this)]},void 0,!0,{fileName:dc,lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:dc,lineNumber:143,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`topbar__controls`,children:(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:e,children:`Back to packages`},void 0,!1,{fileName:dc,lineNumber:154,columnNumber:11},this)},void 0,!1,{fileName:dc,lineNumber:153,columnNumber:9},this)]},void 0,!0,{fileName:dc,lineNumber:142,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`skills`,children:[(0,j.jsxDEV)(`div`,{className:`skills__list`,children:[(0,j.jsxDEV)(`div`,{className:`skills__filters`,children:[(0,j.jsxDEV)(`input`,{ref:m,className:`filter__input`,value:o,placeholder:`Search skills… ( / )`,"aria-label":`Search skills`,spellCheck:!1,onChange:e=>s(e.target.value)},void 0,!1,{fileName:dc,lineNumber:163,columnNumber:13},this),(0,j.jsxDEV)(`div`,{className:`segmented`,role:`tablist`,"aria-label":`Ranking`,children:fc.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,role:`tab`,"aria-selected":n===e.value,className:`segmented__item${n===e.value?` is-active`:``}`,disabled:b,onClick:()=>r(e.value),children:e.label},e.value,!1,{fileName:dc,lineNumber:175,columnNumber:17},this))},void 0,!1,{fileName:dc,lineNumber:173,columnNumber:13},this)]},void 0,!0,{fileName:dc,lineNumber:162,columnNumber:11},this),te?(0,j.jsxDEV)(`div`,{className:`skills__empty`,children:[(0,j.jsxDEV)(`p`,{className:`skills__note`,children:`skills.sh is unreachable. Installing by identifier still works:`},void 0,!1,{fileName:dc,lineNumber:192,columnNumber:15},this),(0,j.jsxDEV)(`code`,{className:`packages__preview-line`,children:`invariant install skills:owner/repo/skill`},void 0,!1,{fileName:dc,lineNumber:195,columnNumber:15},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:()=>b?g.refetch():h.refetch(),children:`Retry`},void 0,!1,{fileName:dc,lineNumber:198,columnNumber:15},this)]},void 0,!0,{fileName:dc,lineNumber:191,columnNumber:13},this):x.length===0?(0,j.jsxDEV)(`p`,{className:`skills__note`,children:h.isLoading||g.isLoading?`Loading the catalogue…`:`No skill matches “${c}”.`},void 0,!1,{fileName:dc,lineNumber:207,columnNumber:13},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(sc,{skills:x,selected:u?oc(u):void 0,installedSources:ee,onSelect:d},void 0,!1,{fileName:dc,lineNumber:214,columnNumber:15},this),!b&&h.data?.hasMore&&(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle skills__more`,disabled:h.isFetching,onClick:()=>a(e=>e+1),children:h.isFetching?`Loading…`:`Load more`},void 0,!1,{fileName:dc,lineNumber:222,columnNumber:17},this)]},void 0,!0,{fileName:dc,lineNumber:213,columnNumber:13},this)]},void 0,!0,{fileName:dc,lineNumber:161,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`skills__pane`,children:u?(0,j.jsxDEV)(cc,{listing:u,detail:y.data,loading:y.isLoading,failed:y.isError,installed:ee.has(u.source),busy:v.isPending,onInstall:e=>void ne(e)},void 0,!1,{fileName:dc,lineNumber:237,columnNumber:13},this):(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Select a skill.`},void 0,!1,{fileName:dc,lineNumber:247,columnNumber:13},this)},void 0,!1,{fileName:dc,lineNumber:235,columnNumber:9},this)]},void 0,!0,{fileName:dc,lineNumber:160,columnNumber:7},this)]},void 0,!0,{fileName:dc,lineNumber:141,columnNumber:5},this)}function mc(){let e=localStorage.getItem(`invariant.skills.view`);return e===`trending`||e===`hot`?e:`all-time`}var hc={project:`project`,machine:`this machine`,browser:`this browser`},gc={project:`Written into this repository — everyone who clones it gets this.`,machine:`Held by the daemon on this machine, for every project it serves.`,browser:`Remembered by this browser only. Never leaves it.`},_c=[`project`,`machine`,`browser`],vc=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/SectionRow.tsx`,yc={configured:`configured`,"not-configured":`not set up`,attention:`needs attention`,"read-only":``};function bc({section:e,summary:t,open:n,dirty:r,focused:i,linked:a,onToggle:o,onFocus:s,children:c}){let l=(0,k.useRef)(null),u=`settings-${e.id}-header`,d=`settings-${e.id}-body`;(0,k.useEffect)(()=>{a&&l.current?.scrollIntoView?.({block:`start`,behavior:`smooth`})},[a]);let f=r?`attention`:t.state;return(0,j.jsxDEV)(`section`,{ref:l,id:`settings-${e.id}`,className:[`config-row`,n?`is-open`:``,i?`is-focused`:``,a?`is-linked`:``,`config-row--${f}`].filter(Boolean).join(` `),"aria-labelledby":u,children:[(0,j.jsxDEV)(`button`,{type:`button`,id:u,className:`config-row__header`,"aria-expanded":n,"aria-controls":d,onClick:()=>{s(),o()},children:[(0,j.jsxDEV)(`span`,{className:`config-row__icon`,"aria-hidden":`true`,children:e.icon},void 0,!1,{fileName:vc,lineNumber:87,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`config-row__identity`,children:[(0,j.jsxDEV)(`span`,{className:`config-row__title`,children:[e.title,r&&(0,j.jsxDEV)(`span`,{className:`config-row__dirty`,children:`unsaved`},void 0,!1,{fileName:vc,lineNumber:94,columnNumber:23},this)]},void 0,!0,{fileName:vc,lineNumber:92,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`config-row__summary${t.loading?` is-loading`:``}`,title:t.headline,children:t.headline},void 0,!1,{fileName:vc,lineNumber:96,columnNumber:11},this)]},void 0,!0,{fileName:vc,lineNumber:91,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`config-row__meta`,children:[yc[f]&&(0,j.jsxDEV)(`span`,{className:`config-state config-state--${f}`,children:[(0,j.jsxDEV)(`span`,{className:`config-state__dot`,"aria-hidden":`true`},void 0,!1,{fileName:vc,lineNumber:104,columnNumber:15},this),yc[f]]},void 0,!0,{fileName:vc,lineNumber:103,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`chip config-row__scope`,title:gc[e.scope],children:hc[e.scope]},void 0,!1,{fileName:vc,lineNumber:108,columnNumber:11},this)]},void 0,!0,{fileName:vc,lineNumber:101,columnNumber:9},this),(0,j.jsxDEV)(`svg`,{className:`config-row__chevron`,viewBox:`0 0 12 12`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M4.5 2.5 8 6l-3.5 3.5`},void 0,!1,{fileName:vc,lineNumber:114,columnNumber:11},this)},void 0,!1,{fileName:vc,lineNumber:113,columnNumber:9},this)]},void 0,!0,{fileName:vc,lineNumber:76,columnNumber:7},this),t.alert&&(0,j.jsxDEV)(`p`,{className:`config-row__alert`,children:t.alert},void 0,!1,{fileName:vc,lineNumber:120,columnNumber:25},this),(0,j.jsxDEV)(`div`,{className:`config-row__panel`,id:d,role:`region`,"aria-labelledby":u,inert:!n,children:(0,j.jsxDEV)(`div`,{className:`config-row__panel-inner`,children:c},void 0,!1,{fileName:vc,lineNumber:132,columnNumber:9},this)},void 0,!1,{fileName:vc,lineNumber:125,columnNumber:7},this)]},void 0,!0,{fileName:vc,lineNumber:62,columnNumber:5},this)}var xc=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/SectionSpine.tsx`;function Sc({sections:e,summaries:t,dirty:n,activeId:r,onSelect:i}){let a=_c.map(t=>({scope:t,sections:e.filter(e=>e.scope===t)})).filter(e=>e.sections.length>0);return(0,j.jsxDEV)(`nav`,{className:`config-spine`,"aria-label":`Configuration sections`,children:a.map(e=>(0,j.jsxDEV)(`div`,{className:`config-spine__group`,children:[(0,j.jsxDEV)(`h2`,{className:`config-spine__scope`,children:Cc(e.scope)},void 0,!1,{fileName:xc,lineNumber:36,columnNumber:11},this),(0,j.jsxDEV)(`ul`,{className:`config-spine__list`,children:e.sections.map(e=>{let a=t[e.id],o=n.has(e.id)?`attention`:a?.state??`read-only`;return(0,j.jsxDEV)(`li`,{children:(0,j.jsxDEV)(`button`,{type:`button`,className:`config-spine__item${r===e.id?` is-active`:``}`,"aria-current":r===e.id?`true`:void 0,onClick:()=>i(e.id),children:[(0,j.jsxDEV)(`span`,{className:`config-state__dot config-state__dot--${o}`,"aria-hidden":`true`},void 0,!1,{fileName:xc,lineNumber:49,columnNumber:21},this),(0,j.jsxDEV)(`span`,{className:`config-spine__label`,children:e.title},void 0,!1,{fileName:xc,lineNumber:50,columnNumber:21},this)]},void 0,!0,{fileName:xc,lineNumber:43,columnNumber:19},this)},e.id,!1,{fileName:xc,lineNumber:42,columnNumber:17},this)})},void 0,!1,{fileName:xc,lineNumber:37,columnNumber:11},this)]},e.scope,!0,{fileName:xc,lineNumber:35,columnNumber:9},this))},void 0,!1,{fileName:xc,lineNumber:33,columnNumber:5},this)}function Cc(e){return hc[e]===`project`?`this project`:hc[e]}var wc=[{id:`indigo`,label:`Indigo`,description:`The original. Dark indigo and periwinkle.`,colorScheme:`dark`},{id:`graphite`,label:`Graphite`,description:`Dark and near-neutral. The hue drains out of the chrome so status is the only colour on screen.`,colorScheme:`dark`},{id:`paper`,label:`Paper`,description:`Light. White surfaces and ink text, with the status colours darkened to hold their meaning.`,colorScheme:`light`}],Tc=`indigo`,Ec=`invariant.theme`;function Dc(e){return wc.some(t=>t.id===e)}function Oc(e){return wc.find(t=>t.id===e)??wc[0]}function kc(){try{let e=window.localStorage.getItem(Ec);return Dc(e)?e:Tc}catch{return Tc}}function Ac(e){if(typeof document>`u`)return;document.documentElement.dataset.dsTheme=e;let t=document.querySelector(`meta[name="color-scheme"]`);t&&(t.content=Oc(e).colorScheme);try{window.localStorage.setItem(Ec,e)}catch{}}function jc(){return(0,k.useSyncExternalStore)(Mc,Nc,()=>Tc)}function Mc(e){if(typeof document>`u`)return()=>{};let t=new MutationObserver(e);return t.observe(document.documentElement,{attributeFilter:[`data-ds-theme`]}),()=>t.disconnect()}function Nc(){if(typeof document>`u`)return Tc;let e=document.documentElement.dataset.dsTheme;return Dc(e)?e:Tc}var Pc={state:`read-only`,headline:`…`,loading:!0};function Fc(e){return e?{state:`read-only`,headline:`${e.name} · ${tn(e.directory)}`,searchText:`${e.directory} ${e.sessionsDirectory}`}:Pc}function Ic(e){if(!e)return Pc;let t=e.options.filter(e=>e.enabled),n=`${t.map(e=>e.displayName).join(`, `)||`none`} · ${t.length} of ${e.options.length}`,r=e.options.map(e=>`${e.name} ${e.displayName}`).join(` `),i=t.filter(e=>!e.present);return i.length>0?{state:`attention`,headline:n,alert:`${i.map(e=>e.displayName).join(`, `)} ${i.length===1?`is`:`are`} configured but nothing has been written for ${i.length===1?`it`:`them`} yet. Sync to create the folders.`,searchText:r}:{state:`configured`,headline:n,searchText:r}}function Lc(e){if(!e)return Pc;let t=e.projectPath??e.remote?.projectPath,n=e.tokenHint?`····${e.tokenHint}`:void 0,r=e.source===`environment`?`GITLAB_TOKEN from the environment`:n,i=e.configured?[t,r].filter(Boolean).join(` · `):`no token — publishing a review will ask for one`,a=`gitlab ${e.host??``} ${t??``} ${e.remote?.url??``}`;return e.mismatch?{state:`attention`,headline:i,alert:`Saved for ${e.mismatch.storedRemote}, but this project's origin is now ${e.mismatch.currentRemote}. Publishing is refused until you save again.`,searchText:a}:e.configured&&!e.gitignored?{state:`attention`,headline:i,alert:`${e.storedAt} is not git-ignored — check before you commit.`,searchText:a}:{state:e.configured?`configured`:`not-configured`,headline:i,searchText:a}}function Rc(e){if(!e)return Pc;let t=`linear issue spec sync template ${e.workspace??``} ${e.teamKey??``}`;if(!e.configured)return{state:e.enabled?`attention`:`not-configured`,headline:e.enabled?`declared, but this machine has no API key`:`not connected — sessions cannot link to an issue`,alert:e.enabled?`This project expects a Linear key and this machine does not have one. Paste one to link sessions to issues.`:void 0,searchText:t};let n=e.issueTemplateIsDefault?`default template`:`custom template`,r=e.apiKeyHint?`····${e.apiKeyHint}`:`key from the environment`,i=[e.workspace,e.teamKey,n,r].filter(Boolean).join(` · `);return!e.gitignored&&e.source===`stored`?{state:`attention`,headline:i,alert:`${e.storedAt} is not git-ignored — check before you commit.`,searchText:t}:{state:`configured`,headline:i,searchText:t}}function zc(e){return{state:`configured`,headline:`${e.reviewCta===`publish`?`publish first`:`plan changes first`} · skills ${e.skillsView}${e.intros.total>0?` · ${e.intros.watched}/${e.intros.total} intros watched`:``}`,searchText:`preferences remembered browser local storage draft reset intro video tutorial loom`}}function Bc(e){return e?{state:`read-only`,headline:`:${e.port} · pid ${e.pid} · v${e.version} · ${e.projectCount} project${e.projectCount===1?``:`s`}`,searchText:`daemon server port pid version registry ${e.registryPath} stop shutdown`}:Pc}function Vc(e){if(!e)return Pc;let t=e.appearance.theme,n=Oc(Dc(t)?t:`indigo`);return{state:`configured`,headline:`${n.label} · ${n.colorScheme}`,searchText:`theme dark light appearance indigo graphite paper contrast colour color`}}var Hc=`invariant.skills.view`,Uc=[`popular`,`trending`,`hot`];function Wc(){try{let e=window.localStorage.getItem(Hc);return Uc.includes(e)?e:`popular`}catch{return`popular`}}function Gc(e){try{window.localStorage.setItem(Hc,e)}catch{}}function Kc(e){return{reviewCta:Jc(e),skillsView:Wc(),hasSessionDraft:!Ja(Ya(e)),intros:qc()}}function qc(){let e=mo(),t=co();return{total:t.length,watched:t.filter(t=>!yo(e,t)).length}}function Jc(e){try{return window.localStorage.getItem(na(e))===`publish`?`publish`:ta}catch{return ta}}function Yc(e){return[Hc,na(e),qa(e),uo,fo]}function Xc(e){let t=[];for(let n of Yc(e))try{if(window.localStorage.getItem(n)===null)continue;window.localStorage.removeItem(n),t.push(n)}catch{}return t}var Zc=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/sections/AppearanceSection.tsx`;function Qc({onDirtyChange:e}){let t=Pn(),{data:n,isLoading:r}=Zr(),i=Qr();if((0,k.useEffect)(()=>e(!1),[e]),r||!n)return(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Loading…`},void 0,!1,{fileName:Zc,lineNumber:31,columnNumber:34},this);let a=n.appearance.theme,o=Dc(a)?a:`indigo`,s=e=>{e!==o&&(Ac(e),i.mutate(e,{onError:e=>{Ac(o),t(e instanceof Error?e.message:`Could not save the theme`,`danger`)}}))};return(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`p`,{className:`config-lede`,children:`Held by the daemon for every project it serves, so choosing here changes every project on this machine — and every browser pointed at it. The default stays Indigo; nothing else about the interface moves.`},void 0,!1,{fileName:Zc,lineNumber:49,columnNumber:7},this),(0,j.jsxDEV)(`fieldset`,{className:`config-themes`,children:[(0,j.jsxDEV)(`legend`,{className:`visually-hidden`,children:`Theme`},void 0,!1,{fileName:Zc,lineNumber:56,columnNumber:9},this),wc.map(e=>(0,j.jsxDEV)(`label`,{className:`config-theme${o===e.id?` is-active`:``}`,children:[(0,j.jsxDEV)(`input`,{type:`radio`,name:`ui-theme`,className:`visually-hidden`,checked:o===e.id,onChange:()=>s(e.id)},void 0,!1,{fileName:Zc,lineNumber:62,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`config-theme__preview`,"data-ds-theme":e.id,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`span`,{className:`config-theme__rail`},void 0,!1,{fileName:Zc,lineNumber:73,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`config-theme__page`,children:[(0,j.jsxDEV)(`span`,{className:`config-theme__line config-theme__line--strong`},void 0,!1,{fileName:Zc,lineNumber:75,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`config-theme__line`},void 0,!1,{fileName:Zc,lineNumber:76,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`config-theme__status`,children:[(0,j.jsxDEV)(`i`,{className:`config-theme__dot config-theme__dot--accent`},void 0,!1,{fileName:Zc,lineNumber:78,columnNumber:19},this),(0,j.jsxDEV)(`i`,{className:`config-theme__dot config-theme__dot--success`},void 0,!1,{fileName:Zc,lineNumber:79,columnNumber:19},this),(0,j.jsxDEV)(`i`,{className:`config-theme__dot config-theme__dot--warning`},void 0,!1,{fileName:Zc,lineNumber:80,columnNumber:19},this),(0,j.jsxDEV)(`i`,{className:`config-theme__dot config-theme__dot--review`},void 0,!1,{fileName:Zc,lineNumber:81,columnNumber:19},this),(0,j.jsxDEV)(`i`,{className:`config-theme__dot config-theme__dot--danger`},void 0,!1,{fileName:Zc,lineNumber:82,columnNumber:19},this)]},void 0,!0,{fileName:Zc,lineNumber:77,columnNumber:17},this)]},void 0,!0,{fileName:Zc,lineNumber:74,columnNumber:15},this)]},void 0,!0,{fileName:Zc,lineNumber:72,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`config-theme__name`,children:e.label},void 0,!1,{fileName:Zc,lineNumber:86,columnNumber:13},this),(0,j.jsxDEV)(`span`,{className:`config-theme__hint`,children:e.description},void 0,!1,{fileName:Zc,lineNumber:87,columnNumber:13},this)]},e.id,!0,{fileName:Zc,lineNumber:58,columnNumber:11},this))]},void 0,!0,{fileName:Zc,lineNumber:55,columnNumber:7},this),(0,j.jsxDEV)(`dl`,{className:`config-facts`,children:(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Stored in`},void 0,!1,{fileName:Zc,lineNumber:94,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:n.path},void 0,!1,{fileName:Zc,lineNumber:95,columnNumber:11},this)]},void 0,!0,{fileName:Zc,lineNumber:93,columnNumber:9},this)},void 0,!1,{fileName:Zc,lineNumber:92,columnNumber:7},this)]},void 0,!0,{fileName:Zc,lineNumber:48,columnNumber:5},this)}var V=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/sections/ProjectSection.tsx`;function $c({onDirtyChange:e}){let t=Pn(),{data:n}=Qn(),{projectId:r,card:i}=Jn(),a=ni(),{data:o}=Xr({poll:!1}),s=o?.groups??[],[c,l]=(0,k.useState)(``);(0,k.useEffect)(()=>{i&&l(e=>e||i.name)},[i]);let u=i!==void 0&&c.trim().length>0&&c.trim()!==i.name;return(0,k.useEffect)(()=>e(u),[u,e]),!n||!i?(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Loading…`},void 0,!1,{fileName:V,lineNumber:37,columnNumber:33},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`p`,{className:`config-lede`,children:`This UI is pinned to one directory per project, and every project setting below is written inside it. Opening another project reads another set of files.`},void 0,!1,{fileName:V,lineNumber:41,columnNumber:7},this),(0,j.jsxDEV)(`dl`,{className:`config-facts`,children:[(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Directory`},void 0,!1,{fileName:V,lineNumber:48,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`button`,{type:`button`,className:`config-copy`,title:`Copy`,onClick:async()=>t(await en(n.directory)?`Path copied`:`Could not copy`,`success`),children:(0,j.jsxDEV)(`code`,{children:n.directory},void 0,!1,{fileName:V,lineNumber:58,columnNumber:15},this)},void 0,!1,{fileName:V,lineNumber:50,columnNumber:13},this)},void 0,!1,{fileName:V,lineNumber:49,columnNumber:11},this)]},void 0,!0,{fileName:V,lineNumber:47,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Name in the manifest`},void 0,!1,{fileName:V,lineNumber:63,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`code`,{children:n.name},void 0,!1,{fileName:V,lineNumber:64,columnNumber:15},this)},void 0,!1,{fileName:V,lineNumber:64,columnNumber:11},this)]},void 0,!0,{fileName:V,lineNumber:62,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Sessions`},void 0,!1,{fileName:V,lineNumber:67,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`code`,{children:n.sessionsDirectory},void 0,!1,{fileName:V,lineNumber:68,columnNumber:15},this)},void 0,!1,{fileName:V,lineNumber:68,columnNumber:11},this)]},void 0,!0,{fileName:V,lineNumber:66,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Packages`},void 0,!1,{fileName:V,lineNumber:71,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:[n.packageCount,` installed · `,n.activeItemCount,` item`,n.activeItemCount===1?``:`s`,` activated`]},void 0,!0,{fileName:V,lineNumber:72,columnNumber:11},this)]},void 0,!0,{fileName:V,lineNumber:70,columnNumber:9},this),i.git?.isRepository&&(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Branch`},void 0,!1,{fileName:V,lineNumber:79,columnNumber:13},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`code`,{children:i.git.branch??`detached`},void 0,!1,{fileName:V,lineNumber:80,columnNumber:17},this)},void 0,!1,{fileName:V,lineNumber:80,columnNumber:13},this)]},void 0,!0,{fileName:V,lineNumber:78,columnNumber:11},this)]},void 0,!0,{fileName:V,lineNumber:46,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`config-form`,children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`Name on this machine`,(0,j.jsxDEV)(`span`,{className:`field__badge`,children:`hub card`},void 0,!1,{fileName:V,lineNumber:89,columnNumber:13},this)]},void 0,!0,{fileName:V,lineNumber:87,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,value:c,placeholder:n.name,onChange:e=>l(e.target.value)},void 0,!1,{fileName:V,lineNumber:91,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`field__hint`,children:[`What the hub and the rail call this project. It is stored in the machine's project registry, not in `,(0,j.jsxDEV)(`code`,{children:`invariant.json`},void 0,!1,{fileName:V,lineNumber:99,columnNumber:30},this),`, so it never reaches your colleagues.`,i.displayName!==void 0&&(0,j.jsxDEV)(j.Fragment,{children:[` `,(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:()=>a.mutate({projectId:r,displayName:null},{onSuccess:()=>{l(n.name),t(`Back to the manifest name`,`success`)}}),children:[`Reset to “`,n.name,`”`]},void 0,!0,{fileName:V,lineNumber:103,columnNumber:17},this)]},void 0,!0,{fileName:V,lineNumber:101,columnNumber:15},this)]},void 0,!0,{fileName:V,lineNumber:97,columnNumber:11},this)]},void 0,!0,{fileName:V,lineNumber:86,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Group`},void 0,!1,{fileName:V,lineNumber:126,columnNumber:11},this),(0,j.jsxDEV)(`select`,{className:`field__input`,value:i.groupId??``,onChange:e=>a.mutate({projectId:r,groupId:e.target.value===``?null:e.target.value},{onSuccess:()=>t(`Group updated`,`success`),onError:e=>t(e instanceof Error?e.message:`That did not work.`,`danger`)}),children:[(0,j.jsxDEV)(`option`,{value:``,children:`Ungrouped`},void 0,!1,{fileName:V,lineNumber:141,columnNumber:13},this),s.map(e=>(0,j.jsxDEV)(`option`,{value:e.id,children:e.name},e.id,!1,{fileName:V,lineNumber:143,columnNumber:15},this))]},void 0,!0,{fileName:V,lineNumber:127,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`field__hint`,children:s.length===0?`No groups yet — make one from the projects screen.`:`Which section this project sits under on the projects screen.`},void 0,!1,{fileName:V,lineNumber:148,columnNumber:11},this)]},void 0,!0,{fileName:V,lineNumber:125,columnNumber:9},this),(0,j.jsxDEV)(`fieldset`,{className:`config-swatches`,children:[(0,j.jsxDEV)(`legend`,{className:`field__label`,children:`Colour`},void 0,!1,{fileName:V,lineNumber:156,columnNumber:11},this),Kt.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,className:`config-swatch config-swatch--${e}${i.color===e?` is-active`:``}`,"aria-label":e,"aria-pressed":i.color===e,title:e,onClick:()=>a.mutate({projectId:r,color:e})},e,!1,{fileName:V,lineNumber:158,columnNumber:13},this))]},void 0,!0,{fileName:V,lineNumber:155,columnNumber:9},this)]},void 0,!0,{fileName:V,lineNumber:85,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`config-actions`,children:(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:!u||a.isPending,onClick:()=>a.mutate({projectId:r,displayName:c.trim()},{onSuccess:()=>t(`Project renamed`,`success`),onError:e=>t(e instanceof Error?e.message:`That did not work.`,`danger`)}),children:a.isPending?`Saving…`:`Save`},void 0,!1,{fileName:V,lineNumber:172,columnNumber:9},this)},void 0,!1,{fileName:V,lineNumber:171,columnNumber:7},this)]},void 0,!0,{fileName:V,lineNumber:40,columnNumber:5},this)}function el(e){return{wanted:e.options.filter(e=>e.enabled).map(e=>e.name)}}function tl(e,t,n,r){let i=new Set(e.wanted);return r?i.add(n):i.delete(n),{wanted:t.options.map(e=>e.name).filter(e=>i.has(e))}}function nl(e,t){return e.wanted.includes(t)}function rl(e,t){let n=t.options.filter(e=>e.enabled).map(e=>e.name);return{add:e.wanted.filter(e=>!n.includes(e)),remove:n.filter(t=>!e.wanted.includes(t))}}function il(e,t){let n=rl(e,t);return n.add.length>0||n.remove.length>0}function al(e){if(e.wanted.length===0)return`A project needs at least one target — everything invariant writes is written for one.`}function ol(e,t){let{add:n,remove:r}=rl(e,t),i=[];return n.length>0&&i.push(`invariant target add ${n.join(` `)}`),r.length>0&&i.push(`invariant target remove ${r.join(` `)}`),i}var sl=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/sections/TargetsSection.tsx`;function cl({onDirtyChange:e}){let t=Pn(),{data:n,isLoading:r}=Ir(),i=Lr(),a=Kr(),[o,s]=(0,k.useState)(),[c,l]=(0,k.useState)(),[u,d]=(0,k.useState)();(0,k.useEffect)(()=>{n&&s(e=>e??el(n))},[n]);let f=n&&o?il(o,n):!1;if((0,k.useEffect)(()=>e(f),[f,e]),r||!n||!o)return(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Loading…`},void 0,!1,{fileName:sl,lineNumber:47,columnNumber:50},this);let p=al(o),m=ol(o,n),h=i.isPending||a.isPending;return(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`p`,{className:`config-lede`,children:`Every activated item is stored once in the canonical store and written out for each target below. Turning one on writes its folders; turning one off leaves what is already there alone — those files may have been edited by hand.`},void 0,!1,{fileName:sl,lineNumber:73,columnNumber:7},this),(0,j.jsxDEV)(`ul`,{className:`config-choices`,children:n.options.map(e=>{let t=nl(o,e.name),r=t!==e.enabled;return(0,j.jsxDEV)(`li`,{className:`config-choice${r?` is-staged`:``}`,children:[(0,j.jsxDEV)(`label`,{className:`config-choice__label`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:t,disabled:h,onChange:t=>s(tl(o,n,e.name,t.target.checked))},void 0,!1,{fileName:sl,lineNumber:86,columnNumber:17},this),(0,j.jsxDEV)(`span`,{className:`config-choice__name`,children:e.displayName},void 0,!1,{fileName:sl,lineNumber:94,columnNumber:17},this),(0,j.jsxDEV)(`code`,{className:`config-choice__id`,children:e.name},void 0,!1,{fileName:sl,lineNumber:95,columnNumber:17},this)]},void 0,!0,{fileName:sl,lineNumber:85,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`config-choice__paths`,title:e.generatedPaths.join(`
|
|
260
|
+
`),children:e.generatedPaths.join(` `)},void 0,!1,{fileName:sl,lineNumber:98,columnNumber:15},this),r?(0,j.jsxDEV)(`span`,{className:`config-choice__flag`,children:t?`will add`:`will remove`},void 0,!1,{fileName:sl,lineNumber:103,columnNumber:17},this):e.enabled&&!e.present?(0,j.jsxDEV)(`span`,{className:`chip chip--warning`,title:`Nothing has been written for this target yet.`,children:`not synced`},void 0,!1,{fileName:sl,lineNumber:105,columnNumber:17},this):null]},e.name,!0,{fileName:sl,lineNumber:84,columnNumber:13},this)})},void 0,!1,{fileName:sl,lineNumber:79,columnNumber:7},this),(0,j.jsxDEV)(`dl`,{className:`config-facts`,children:(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Written to`},void 0,!1,{fileName:sl,lineNumber:116,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`code`,{children:n.manifestPath},void 0,!1,{fileName:sl,lineNumber:117,columnNumber:15},this)},void 0,!1,{fileName:sl,lineNumber:117,columnNumber:11},this)]},void 0,!0,{fileName:sl,lineNumber:115,columnNumber:9},this)},void 0,!1,{fileName:sl,lineNumber:114,columnNumber:7},this),m.length>0&&(0,j.jsxDEV)(`div`,{className:`config-plan`,children:[(0,j.jsxDEV)(`span`,{className:`config-plan__label`,children:`This will run`},void 0,!1,{fileName:sl,lineNumber:123,columnNumber:11},this),m.map(e=>(0,j.jsxDEV)(`code`,{className:`config-plan__line`,children:e},e,!1,{fileName:sl,lineNumber:125,columnNumber:13},this))]},void 0,!0,{fileName:sl,lineNumber:122,columnNumber:9},this),p&&(0,j.jsxDEV)(`p`,{className:`config-warning`,children:p},void 0,!1,{fileName:sl,lineNumber:130,columnNumber:19},this),c&&(0,j.jsxDEV)(`div`,{className:`config-failure`,children:[(0,j.jsxDEV)(`p`,{children:c.message},void 0,!1,{fileName:sl,lineNumber:134,columnNumber:11},this),c.transcript&&(0,j.jsxDEV)(Os,{output:c.transcript},void 0,!1,{fileName:sl,lineNumber:135,columnNumber:34},this)]},void 0,!0,{fileName:sl,lineNumber:133,columnNumber:9},this),u&&(0,j.jsxDEV)(`div`,{className:`config-failure`,children:[(0,j.jsxDEV)(`p`,{children:u.message},void 0,!1,{fileName:sl,lineNumber:141,columnNumber:11},this),u.transcript&&(0,j.jsxDEV)(Os,{output:u.transcript},void 0,!1,{fileName:sl,lineNumber:142,columnNumber:37},this)]},void 0,!0,{fileName:sl,lineNumber:140,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`config-actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:h,title:`Report drift without writing anything`,onClick:()=>{d(void 0),l(void 0),a.mutate({check:!0},{onSuccess:e=>d({message:e.drift?`Out of sync — the target folders do not match the canonical store.`:`In sync. Every target folder matches the canonical store.`,transcript:e.run.output}),onError:e=>l(ll(e))})},children:a.isPending?`Checking…`:`Check for drift`},void 0,!1,{fileName:sl,lineNumber:147,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:h,onClick:()=>{d(void 0),l(void 0),a.mutate({},{onSuccess:e=>{d({message:`Synced.`,transcript:e.run.output}),t(`Targets synced`,`success`)},onError:e=>l(ll(e))})},children:`Sync now`},void 0,!1,{fileName:sl,lineNumber:173,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:h||!f||p!==void 0,onClick:()=>{l(void 0),d(void 0),i.mutate([...o.wanted],{onSuccess:e=>{s(el(e.settings));let{add:r,remove:i}=rl(o,n);t([r.length>0?`added ${r.join(`, `)}`:``,i.length>0?`removed ${i.join(`, `)}`:``].filter(Boolean).join(` · `)||`Targets unchanged`,`success`)},onError:e=>l(ll(e))})},children:i.isPending?`Applying…`:`Apply`},void 0,!1,{fileName:sl,lineNumber:195,columnNumber:9},this)]},void 0,!0,{fileName:sl,lineNumber:146,columnNumber:7},this)]},void 0,!0,{fileName:sl,lineNumber:72,columnNumber:5},this)}function ll(e){return e instanceof zn?{message:e.message,transcript:e.transcript}:{message:e instanceof Error?e.message:`That did not work.`}}var H=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/sections/GitLabSection.tsx`;function ul({onDirtyChange:e}){let t=Pn(),{data:n,isLoading:r}=yr(),i=br(),a=xr(),o=Sr(),[s,c]=(0,k.useState)(``),[l,u]=(0,k.useState)(``),[d,f]=(0,k.useState)(``),[p,m]=(0,k.useState)();(0,k.useEffect)(()=>{n&&(c(e=>e||n.host||``),u(e=>e||n.projectPath||``))},[n]);let h=d.trim().length>0;if((0,k.useEffect)(()=>e(h),[h,e]),r||!n)return(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Loading…`},void 0,!1,{fileName:H,lineNumber:48,columnNumber:38},this);let g=n.remote?.projectPath,_=l.length>0&&g!==void 0&&l!==g;return(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`p`,{className:`config-lede`,children:[`Push a triaged review to GitLab as `,(0,j.jsxDEV)(`strong`,{children:`draft`},void 0,!1,{fileName:H,lineNumber:56,columnNumber:44},this),` merge-request comments. Nothing is submitted for you — you press `,(0,j.jsxDEV)(`em`,{children:`Submit review`},void 0,!1,{fileName:H,lineNumber:57,columnNumber:39},this),` in GitLab yourself.`]},void 0,!0,{fileName:H,lineNumber:55,columnNumber:7},this),(0,j.jsxDEV)(`dl`,{className:`config-facts`,children:[(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`This project`},void 0,!1,{fileName:H,lineNumber:62,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`code`,{children:n.directory},void 0,!1,{fileName:H,lineNumber:63,columnNumber:15},this)},void 0,!1,{fileName:H,lineNumber:63,columnNumber:11},this)]},void 0,!0,{fileName:H,lineNumber:61,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Shared with the team`},void 0,!1,{fileName:H,lineNumber:66,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:[(0,j.jsxDEV)(`code`,{children:`invariant.json`},void 0,!1,{fileName:H,lineNumber:68,columnNumber:13},this),` — the host and project path. The token is not.`]},void 0,!0,{fileName:H,lineNumber:67,columnNumber:11},this)]},void 0,!0,{fileName:H,lineNumber:65,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Origin remote`},void 0,!1,{fileName:H,lineNumber:72,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:n.remote?.url?(0,j.jsxDEV)(`code`,{children:n.remote.url},void 0,!1,{fileName:H,lineNumber:73,columnNumber:39},this):`none — this project has no origin`},void 0,!1,{fileName:H,lineNumber:73,columnNumber:11},this)]},void 0,!0,{fileName:H,lineNumber:71,columnNumber:9},this)]},void 0,!0,{fileName:H,lineNumber:60,columnNumber:7},this),n.source===`environment`&&(0,j.jsxDEV)(`p`,{className:`config-note`,children:[`Using `,(0,j.jsxDEV)(`code`,{children:`GITLAB_TOKEN`},void 0,!1,{fileName:H,lineNumber:79,columnNumber:17},this),` from the environment this daemon was started in. Saving a token here replaces it for this project.`]},void 0,!0,{fileName:H,lineNumber:78,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`config-form`,children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`GitLab host`},void 0,!1,{fileName:H,lineNumber:86,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,value:s,placeholder:`https://gitlab.com`,onChange:e=>c(e.target.value)},void 0,!1,{fileName:H,lineNumber:87,columnNumber:11},this)]},void 0,!0,{fileName:H,lineNumber:85,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`Project path`,(0,j.jsxDEV)(`span`,{className:`field__badge`,children:_?`overridden`:`from origin`},void 0,!1,{fileName:H,lineNumber:98,columnNumber:13},this)]},void 0,!0,{fileName:H,lineNumber:96,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,value:l,placeholder:`group/project`,onChange:e=>u(e.target.value)},void 0,!1,{fileName:H,lineNumber:100,columnNumber:11},this),_&&(0,j.jsxDEV)(`span`,{className:`field__hint`,children:[`This is not `,(0,j.jsxDEV)(`code`,{children:g},void 0,!1,{fileName:H,lineNumber:108,columnNumber:27},this),`, which is what origin says. Every publish will say so.`]},void 0,!0,{fileName:H,lineNumber:107,columnNumber:13},this)]},void 0,!0,{fileName:H,lineNumber:95,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`Personal access token`,n.tokenHint&&(0,j.jsxDEV)(`span`,{className:`field__badge`,children:[`stored ····`,n.tokenHint]},void 0,!0,{fileName:H,lineNumber:116,columnNumber:36},this)]},void 0,!0,{fileName:H,lineNumber:114,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,type:`password`,autoComplete:`off`,value:d,placeholder:n.tokenHint?`Leave empty to keep the stored token`:`glpat-…`,onChange:e=>f(e.target.value)},void 0,!1,{fileName:H,lineNumber:118,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`field__hint`,children:[`Needs the `,(0,j.jsxDEV)(`code`,{children:`api`},void 0,!1,{fileName:H,lineNumber:127,columnNumber:23},this),` scope — `,(0,j.jsxDEV)(`code`,{children:`read_api`},void 0,!1,{fileName:H,lineNumber:127,columnNumber:48},this),` cannot write a comment. Stored in`,` `,(0,j.jsxDEV)(`code`,{children:n.storedAt},void 0,!1,{fileName:H,lineNumber:128,columnNumber:13},this),` (0600), for this project only. It is never sent to this page and never written to the repository.`]},void 0,!0,{fileName:H,lineNumber:126,columnNumber:11},this)]},void 0,!0,{fileName:H,lineNumber:113,columnNumber:9},this)]},void 0,!0,{fileName:H,lineNumber:84,columnNumber:7},this),p&&(0,j.jsxDEV)(`p`,{className:`config-verdict${p.ok?` is-ok`:` is-bad`}`,children:p.ok?`Connected as @${p.username} · ${p.projectPath}`:p.message},void 0,!1,{fileName:H,lineNumber:135,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`config-actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:o.isPending||!n.configured,title:n.configured?void 0:`Save a token first.`,onClick:()=>o.mutate(void 0,{onSuccess:m,onError:e=>m({publisher:`gitlab`,ok:!1,message:e instanceof Error?e.message:`That did not work.`})}),children:o.isPending?`Testing…`:`Test connection`},void 0,!1,{fileName:H,lineNumber:143,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,disabled:a.isPending||n.source!==`stored`,onClick:()=>a.mutate(void 0,{onSuccess:()=>{f(``),m(void 0),t(`Publishing settings removed`,`success`)}}),children:`Remove`},void 0,!1,{fileName:H,lineNumber:163,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:i.isPending||!n.configured&&d.trim().length===0,onClick:()=>i.mutate({host:s.trim()||void 0,projectPath:l.trim()||void 0,token:d.trim()||void 0},{onSuccess:()=>{f(``),m(void 0),t(`Publishing settings saved`,`success`)},onError:e=>t(e instanceof Error?e.message:`That did not work.`,`danger`)}),children:i.isPending?`Saving…`:`Save`},void 0,!1,{fileName:H,lineNumber:180,columnNumber:9},this)]},void 0,!0,{fileName:H,lineNumber:142,columnNumber:7},this)]},void 0,!0,{fileName:H,lineNumber:54,columnNumber:5},this)}var U=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/sections/LinearSection.tsx`;function dl({onDirtyChange:e}){let t=Pn(),{data:n,isLoading:r}=Tr(),i=Er(),a=Dr(),o=Or(),[s,c]=(0,k.useState)(``),[l,u]=(0,k.useState)(``),[d,f]=(0,k.useState)(``),[p,m]=(0,k.useState)(!1),[h,g]=(0,k.useState)(!1),[_,v]=(0,k.useState)();(0,k.useEffect)(()=>{n&&(c(e=>e||n.teamKey||``),f(e=>e.length>0?e:n.issueTemplate))},[n]);let y=l.trim().length>0||p&&d!==n?.issueTemplate;if((0,k.useEffect)(()=>e(y),[y,e]),r||!n)return(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Loading…`},void 0,!1,{fileName:U,lineNumber:53,columnNumber:38},this);let b=_?.workspace??n.workspace;return(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`p`,{className:`config-lede`,children:`Link a session to a Linear issue, and sync one block of it — the human-facing spec — in either direction. The session body itself is never sent: it is a conversation with an agent, and the issue is for a colleague.`},void 0,!1,{fileName:U,lineNumber:59,columnNumber:7},this),(0,j.jsxDEV)(`dl`,{className:`config-facts`,children:[(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Workspace`},void 0,!1,{fileName:U,lineNumber:67,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:b?(0,j.jsxDEV)(`code`,{children:b},void 0,!1,{fileName:U,lineNumber:68,columnNumber:28},this):`unknown until you test the connection`},void 0,!1,{fileName:U,lineNumber:68,columnNumber:11},this)]},void 0,!0,{fileName:U,lineNumber:66,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Shared with the team`},void 0,!1,{fileName:U,lineNumber:71,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:[(0,j.jsxDEV)(`code`,{children:`invariant.json`},void 0,!1,{fileName:U,lineNumber:73,columnNumber:13},this),` — the team key and the issue template. The API key is not.`]},void 0,!0,{fileName:U,lineNumber:72,columnNumber:11},this)]},void 0,!0,{fileName:U,lineNumber:70,columnNumber:9},this)]},void 0,!0,{fileName:U,lineNumber:65,columnNumber:7},this),n.enabled&&!n.configured&&(0,j.jsxDEV)(`p`,{className:`config-note`,children:`This project expects Linear, and this machine has no key for it. Sessions here cannot link to an issue until you paste one.`},void 0,!1,{fileName:U,lineNumber:79,columnNumber:9},this),n.source===`environment`&&(0,j.jsxDEV)(`p`,{className:`config-note`,children:[`Using `,(0,j.jsxDEV)(`code`,{children:`LINEAR_API_KEY`},void 0,!1,{fileName:U,lineNumber:87,columnNumber:17},this),` from the environment this daemon was started in. Saving a key here replaces it for this project.`]},void 0,!0,{fileName:U,lineNumber:86,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`config-form`,children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`API key`,n.apiKeyHint&&(0,j.jsxDEV)(`span`,{className:`field__badge`,children:[`stored ····`,n.apiKeyHint]},void 0,!0,{fileName:U,lineNumber:96,columnNumber:37},this)]},void 0,!0,{fileName:U,lineNumber:94,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,type:`password`,autoComplete:`off`,value:l,placeholder:n.apiKeyHint?`Leave empty to keep the stored key`:`lin_api_…`,onChange:e=>u(e.target.value)},void 0,!1,{fileName:U,lineNumber:98,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`field__hint`,children:[`A personal API key from Linear → Settings → Security & access. Stored in`,` `,(0,j.jsxDEV)(`code`,{children:n.storedAt},void 0,!1,{fileName:U,lineNumber:108,columnNumber:13},this),` (0600), for this project only. It is never sent to this page and never written to the repository.`]},void 0,!0,{fileName:U,lineNumber:106,columnNumber:11},this)]},void 0,!0,{fileName:U,lineNumber:93,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`Default team`,(0,j.jsxDEV)(`span`,{className:`field__badge`,children:`shared`},void 0,!1,{fileName:U,lineNumber:116,columnNumber:13},this)]},void 0,!0,{fileName:U,lineNumber:114,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,value:s,placeholder:`ENG`,onChange:e=>c(e.target.value.toUpperCase())},void 0,!1,{fileName:U,lineNumber:118,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`field__hint`,children:[`Narrows the issue search when you link a session. A search across a whole workspace is a list nobody can pick from.`,_?.teamKeys&&_.teamKeys.length>0&&(0,j.jsxDEV)(j.Fragment,{children:[` This key can see: `,(0,j.jsxDEV)(`code`,{children:_.teamKeys.join(`, `)},void 0,!1,{fileName:U,lineNumber:128,columnNumber:36},this),`.`]},void 0,!0,{fileName:U,lineNumber:128,columnNumber:15},this)]},void 0,!0,{fileName:U,lineNumber:124,columnNumber:11},this)]},void 0,!0,{fileName:U,lineNumber:113,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:[`Issue template`,(0,j.jsxDEV)(`span`,{className:`field__badge`,children:`shared`},void 0,!1,{fileName:U,lineNumber:136,columnNumber:13},this),n.issueTemplateIsDefault&&(0,j.jsxDEV)(`span`,{className:`field__badge`,children:`default`},void 0,!1,{fileName:U,lineNumber:137,columnNumber:49},this)]},void 0,!0,{fileName:U,lineNumber:134,columnNumber:11},this),(0,j.jsxDEV)(`textarea`,{className:`field__input field__input--area`,rows:12,spellCheck:!1,value:d,onChange:e=>{f(e.target.value),m(!0)}},void 0,!1,{fileName:U,lineNumber:139,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`field__hint`,children:[`The shape an agent aims its synthesis at — decisions and acceptance criteria, not implementation steps. Written into `,(0,j.jsxDEV)(`code`,{children:`invariant.json`},void 0,!1,{fileName:U,lineNumber:151,columnNumber:48},this),`, so it arrives in a merge request like any other agreement. Empty it to go back to the default.`]},void 0,!0,{fileName:U,lineNumber:149,columnNumber:11},this)]},void 0,!0,{fileName:U,lineNumber:133,columnNumber:9},this)]},void 0,!0,{fileName:U,lineNumber:92,columnNumber:7},this),h&&(0,j.jsxDEV)(`div`,{className:`config-preview`,children:(0,j.jsxDEV)(Ni,{source:d,compact:!0},void 0,!1,{fileName:U,lineNumber:159,columnNumber:11},this)},void 0,!1,{fileName:U,lineNumber:158,columnNumber:9},this),_&&(0,j.jsxDEV)(`p`,{className:`config-verdict${_.ok?` is-ok`:` is-bad`}`,children:_.ok?`Connected as ${_.username}${b?` · ${b}`:``}`:_.message},void 0,!1,{fileName:U,lineNumber:164,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`config-actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:()=>g(e=>!e),children:h?`Hide preview`:`Preview template`},void 0,!1,{fileName:U,lineNumber:172,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,disabled:o.isPending||!n.configured,title:n.configured?void 0:`Save a key first.`,onClick:()=>o.mutate(void 0,{onSuccess:v,onError:e=>v({integration:`linear`,ok:!1,message:e instanceof Error?e.message:`That did not work.`})}),children:o.isPending?`Testing…`:`Test connection`},void 0,!1,{fileName:U,lineNumber:180,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,disabled:a.isPending||n.source!==`stored`,onClick:()=>a.mutate(void 0,{onSuccess:()=>{u(``),v(void 0),t(`Linear API key removed`,`success`)}}),children:`Remove key`},void 0,!1,{fileName:U,lineNumber:200,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,disabled:i.isPending||!n.configured&&l.trim().length===0,onClick:()=>i.mutate({teamKey:s.trim()||void 0,issueTemplate:p?d:void 0,apiKey:l.trim()||void 0},{onSuccess:()=>{u(``),m(!1),v(void 0),t(`Linear settings saved`,`success`)},onError:e=>t(e instanceof Error?e.message:`That did not work.`,`danger`)}),children:i.isPending?`Saving…`:`Save`},void 0,!1,{fileName:U,lineNumber:217,columnNumber:9},this)]},void 0,!0,{fileName:U,lineNumber:171,columnNumber:7},this)]},void 0,!0,{fileName:U,lineNumber:58,columnNumber:5},this)}var fl=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/sections/WorkspaceSection.tsx`,pl=[{value:`plan-changes`,label:`Plan changes`,hint:`Turn the staged comments into work for an agent.`},{value:`publish`,label:`Publish`,hint:`Send the staged comments to the merge request as drafts.`}],ml=[{value:`popular`,label:`Popular`},{value:`trending`,label:`Trending`},{value:`hot`,label:`Hot`}];function hl({onDirtyChange:e}){let t=Pn(),{data:n}=Qn(),r=n?.directory,[i,a]=(0,k.useState)(()=>Kc(r));return(0,k.useEffect)(()=>a(Kc(r)),[r]),(0,k.useEffect)(()=>e(!1),[e]),(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`p`,{className:`config-lede`,children:`Held in this browser's local storage, per project where it makes sense to be. Nothing here reaches the daemon, the repository, or anyone else — and a different browser, or a private window, starts from the defaults.`},void 0,!1,{fileName:fl,lineNumber:61,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`config-form`,children:[(0,j.jsxDEV)(`fieldset`,{className:`config-choice-group`,children:[(0,j.jsxDEV)(`legend`,{className:`field__label`,children:`Review footer offers first`},void 0,!1,{fileName:fl,lineNumber:69,columnNumber:11},this),pl.map(e=>(0,j.jsxDEV)(`label`,{className:`config-radio`,children:[(0,j.jsxDEV)(`input`,{type:`radio`,name:`review-cta`,checked:i.reviewCta===e.value,onChange:()=>{ia(e.value,r),a(Kc(r))}},void 0,!1,{fileName:fl,lineNumber:72,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`config-radio__label`,children:e.label},void 0,!1,{fileName:fl,lineNumber:81,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`config-radio__hint`,children:e.hint},void 0,!1,{fileName:fl,lineNumber:82,columnNumber:15},this)]},e.value,!0,{fileName:fl,lineNumber:71,columnNumber:13},this))]},void 0,!0,{fileName:fl,lineNumber:68,columnNumber:9},this),(0,j.jsxDEV)(`fieldset`,{className:`config-choice-group`,children:[(0,j.jsxDEV)(`legend`,{className:`field__label`,children:`Skills catalogue opens on`},void 0,!1,{fileName:fl,lineNumber:88,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`segmented`,children:ml.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,className:`segmented__item${i.skillsView===e.value?` is-active`:``}`,"aria-pressed":i.skillsView===e.value,onClick:()=>{Gc(e.value),a(Kc(r))},children:e.label},e.value,!1,{fileName:fl,lineNumber:91,columnNumber:15},this))},void 0,!1,{fileName:fl,lineNumber:89,columnNumber:11},this)]},void 0,!0,{fileName:fl,lineNumber:87,columnNumber:9},this)]},void 0,!0,{fileName:fl,lineNumber:67,columnNumber:7},this),(0,j.jsxDEV)(gl,{onChange:()=>a(Kc(r))},void 0,!1,{fileName:fl,lineNumber:108,columnNumber:7},this),(0,j.jsxDEV)(`dl`,{className:`config-facts`,children:(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Unsent session draft`},void 0,!1,{fileName:fl,lineNumber:112,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:i.hasSessionDraft?`One is waiting — the New session dialog will open with it.`:`None.`},void 0,!1,{fileName:fl,lineNumber:113,columnNumber:11},this)]},void 0,!0,{fileName:fl,lineNumber:111,columnNumber:9},this)},void 0,!1,{fileName:fl,lineNumber:110,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`config-actions`,children:(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:()=>{let e=Xc(r);a(Kc(r)),t(e.length===0?`Nothing was remembered for this project.`:`Forgot ${e.length} remembered value${e.length===1?``:`s`}`,`success`)},children:`Forget what this browser remembers`},void 0,!1,{fileName:fl,lineNumber:122,columnNumber:9},this)},void 0,!1,{fileName:fl,lineNumber:121,columnNumber:7},this)]},void 0,!0,{fileName:fl,lineNumber:60,columnNumber:5},this)}function gl({onChange:e}){let{watched:t,autoOpen:n,open:r,setAutoOpen:i,forgetWatched:a}=wo(),o=co();return o.length===0?null:(0,j.jsxDEV)(`div`,{className:`config-form`,children:(0,j.jsxDEV)(`fieldset`,{className:`config-choice-group`,children:[(0,j.jsxDEV)(`legend`,{className:`field__label`,children:`Intro videos`},void 0,!1,{fileName:fl,lineNumber:160,columnNumber:9},this),(0,j.jsxDEV)(`label`,{className:`config-radio`,children:[(0,j.jsxDEV)(`input`,{type:`checkbox`,checked:n,onChange:t=>{i(t.target.checked),e()}},void 0,!1,{fileName:fl,lineNumber:163,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`config-radio__label`,children:`Play the Projects intro on a first visit`},void 0,!1,{fileName:fl,lineNumber:171,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`config-radio__hint`,children:`Only that one, only once. Every other intro waits behind its own “Watch intro” button.`},void 0,!1,{fileName:fl,lineNumber:172,columnNumber:11},this)]},void 0,!0,{fileName:fl,lineNumber:162,columnNumber:9},this),(0,j.jsxDEV)(`ul`,{className:`intro-list`,children:o.map(n=>(0,j.jsxDEV)(`li`,{className:`intro-list__row`,children:[(0,j.jsxDEV)(`span`,{className:`intro-list__title`,children:n.title},void 0,!1,{fileName:fl,lineNumber:180,columnNumber:15},this),(0,j.jsxDEV)(`span`,{className:`intro-list__state`,children:yo(t,n)?`Not watched`:`Watched`},void 0,!1,{fileName:fl,lineNumber:181,columnNumber:15},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:()=>{r(n.key),e()},children:`Play`},void 0,!1,{fileName:fl,lineNumber:184,columnNumber:15},this)]},n.key,!0,{fileName:fl,lineNumber:179,columnNumber:13},this))},void 0,!1,{fileName:fl,lineNumber:177,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`config-actions`,children:(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:()=>{a(),e()},children:`Mark every intro unwatched`},void 0,!1,{fileName:fl,lineNumber:199,columnNumber:11},this)},void 0,!1,{fileName:fl,lineNumber:198,columnNumber:9},this)]},void 0,!0,{fileName:fl,lineNumber:159,columnNumber:7},this)},void 0,!1,{fileName:fl,lineNumber:158,columnNumber:5},this)}var _l=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/sections/ServerSection.tsx`;function vl({onDirtyChange:e}){let t=Pn(),{data:n}=$r(),{data:r}=yr(),[i,a]=(0,k.useState)(!1);return(0,k.useEffect)(()=>e(!1),[e]),n?(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`p`,{className:`config-lede`,children:`One daemon serves every project you have registered. It holds no credentials of its own — each project's are read from that project's directory when a publish asks for them.`},void 0,!1,{fileName:_l,lineNumber:28,columnNumber:7},this),(0,j.jsxDEV)(`dl`,{className:`config-facts`,children:[(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Listening on`},void 0,!1,{fileName:_l,lineNumber:35,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`code`,{children:[`http://127.0.0.1:`,n.port]},void 0,!0,{fileName:_l,lineNumber:36,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:36,columnNumber:11},this)]},void 0,!0,{fileName:_l,lineNumber:34,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Process`},void 0,!1,{fileName:_l,lineNumber:39,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:[`pid `,n.pid,` · started `,Xt(yl(n.uptimeSeconds))]},void 0,!0,{fileName:_l,lineNumber:40,columnNumber:11},this)]},void 0,!0,{fileName:_l,lineNumber:38,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Version`},void 0,!1,{fileName:_l,lineNumber:43,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`code`,{children:n.version},void 0,!1,{fileName:_l,lineNumber:44,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:44,columnNumber:11},this)]},void 0,!0,{fileName:_l,lineNumber:42,columnNumber:9},this),(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`Project registry`},void 0,!1,{fileName:_l,lineNumber:47,columnNumber:11},this),(0,j.jsxDEV)(`dd`,{children:(0,j.jsxDEV)(`code`,{children:n.registryPath},void 0,!1,{fileName:_l,lineNumber:48,columnNumber:15},this)},void 0,!1,{fileName:_l,lineNumber:48,columnNumber:11},this)]},void 0,!0,{fileName:_l,lineNumber:46,columnNumber:9},this),r&&(0,j.jsxDEV)(`div`,{children:[(0,j.jsxDEV)(`dt`,{children:`This project's token file`},void 0,!1,{fileName:_l,lineNumber:52,columnNumber:13},this),(0,j.jsxDEV)(`dd`,{children:[(0,j.jsxDEV)(`code`,{children:r.storedAt},void 0,!1,{fileName:_l,lineNumber:54,columnNumber:15},this),r.configured?r.gitignored?` — git-ignored`:` — not git-ignored`:` — nothing stored`]},void 0,!0,{fileName:_l,lineNumber:53,columnNumber:13},this)]},void 0,!0,{fileName:_l,lineNumber:51,columnNumber:11},this)]},void 0,!0,{fileName:_l,lineNumber:33,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`config-actions config-actions--danger`,children:i?(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`config-confirm`,children:`Stop the server for every project? This page will stop responding.`},void 0,!1,{fileName:_l,lineNumber:68,columnNumber:13},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:()=>a(!1),children:`Cancel`},void 0,!1,{fileName:_l,lineNumber:71,columnNumber:13},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--danger`,onClick:async()=>{a(!1),await Un.shutdown().catch(()=>void 0),t(`UI stopping…`,`info`)},children:`Stop it`},void 0,!1,{fileName:_l,lineNumber:74,columnNumber:13},this)]},void 0,!0,{fileName:_l,lineNumber:67,columnNumber:11},this):(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--danger`,onClick:()=>a(!0),children:`Stop this UI server`},void 0,!1,{fileName:_l,lineNumber:87,columnNumber:11},this)},void 0,!1,{fileName:_l,lineNumber:65,columnNumber:7},this)]},void 0,!0,{fileName:_l,lineNumber:27,columnNumber:5},this):(0,j.jsxDEV)(`p`,{className:`page-state`,children:`Loading…`},void 0,!1,{fileName:_l,lineNumber:24,columnNumber:25},this)}function yl(e){return new Date(Date.now()-e*1e3).toISOString()}var bl=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/registry.tsx`,xl=[{id:`project`,title:`Project`,scope:`project`,keywords:`directory path name colour color rename identity sessions packages branch`,icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M3 5.5A1.5 1.5 0 0 1 4.5 4h3l1.5 2h6.5A1.5 1.5 0 0 1 17 7.5v7A1.5 1.5 0 0 1 15.5 16h-11A1.5 1.5 0 0 1 3 14.5z`},void 0,!1,{fileName:bl,lineNumber:49,columnNumber:9},void 0)},void 0,!1,{fileName:bl,lineNumber:48,columnNumber:7},void 0),useSummary:()=>Fc(Qn().data),Body:$c},{id:`targets`,title:`Agent targets`,scope:`project`,keywords:`claude cursor codex aider copilot sync materialize drift agents folder`,icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`circle`,{cx:`10`,cy:`10`,r:`6.5`},void 0,!1,{fileName:bl,lineNumber:62,columnNumber:9},void 0),(0,j.jsxDEV)(`circle`,{cx:`10`,cy:`10`,r:`2.5`},void 0,!1,{fileName:bl,lineNumber:63,columnNumber:9},void 0),(0,j.jsxDEV)(`path`,{d:`M10 1.5v2M10 16.5v2M1.5 10h2M16.5 10h2`},void 0,!1,{fileName:bl,lineNumber:64,columnNumber:9},void 0)]},void 0,!0,{fileName:bl,lineNumber:61,columnNumber:7},void 0),useSummary:()=>Ic(Ir().data),Body:cl},{id:`gitlab`,title:`GitLab`,scope:`project`,keywords:`gitlab token credentials merge request review publish api scope integration publishing`,icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`path`,{d:`M10 13.5V3.5M6.5 7 10 3.5 13.5 7`},void 0,!1,{fileName:bl,lineNumber:78,columnNumber:9},void 0),(0,j.jsxDEV)(`path`,{d:`M3.5 12.5v3a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1v-3`},void 0,!1,{fileName:bl,lineNumber:79,columnNumber:9},void 0)]},void 0,!0,{fileName:bl,lineNumber:77,columnNumber:7},void 0),useSummary:()=>Lc(yr().data),Body:ul},{id:`linear`,title:`Linear`,scope:`project`,keywords:`linear issue ticket spec sync template api key team workspace integration`,icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`rect`,{x:`3.5`,y:`3.5`,width:`13`,height:`13`,rx:`3`},void 0,!1,{fileName:bl,lineNumber:92,columnNumber:9},void 0),(0,j.jsxDEV)(`path`,{d:`M6.5 12.5 12.5 6.5`},void 0,!1,{fileName:bl,lineNumber:93,columnNumber:9},void 0)]},void 0,!0,{fileName:bl,lineNumber:91,columnNumber:7},void 0),useSummary:()=>Rc(Tr().data),Body:dl},{id:`appearance`,title:`Appearance`,scope:`machine`,keywords:`theme dark light appearance colour color contrast indigo graphite paper palette`,icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`circle`,{cx:`10`,cy:`10`,r:`6.5`},void 0,!1,{fileName:bl,lineNumber:106,columnNumber:9},void 0),(0,j.jsxDEV)(`path`,{d:`M10 3.5a6.5 6.5 0 0 0 0 13z`},void 0,!1,{fileName:bl,lineNumber:107,columnNumber:9},void 0)]},void 0,!0,{fileName:bl,lineNumber:105,columnNumber:7},void 0),useSummary:()=>Vc(Zr().data),Body:Qc},{id:`server`,title:`Server & data`,scope:`machine`,keywords:`daemon port pid version registry stop shutdown quit instance`,icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`rect`,{x:`3`,y:`4`,width:`14`,height:`5`,rx:`1.5`},void 0,!1,{fileName:bl,lineNumber:120,columnNumber:9},void 0),(0,j.jsxDEV)(`rect`,{x:`3`,y:`11`,width:`14`,height:`5`,rx:`1.5`},void 0,!1,{fileName:bl,lineNumber:121,columnNumber:9},void 0),(0,j.jsxDEV)(`path`,{d:`M6 6.5h.01M6 13.5h.01`},void 0,!1,{fileName:bl,lineNumber:122,columnNumber:9},void 0)]},void 0,!0,{fileName:bl,lineNumber:119,columnNumber:7},void 0),useSummary:()=>Bc($r().data),Body:vl},{id:`workspace`,title:`This browser`,scope:`browser`,keywords:`preferences local storage draft review footer skills catalogue reset forget`,icon:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 20 20`,"aria-hidden":`true`,children:[(0,j.jsxDEV)(`rect`,{x:`2.5`,y:`4`,width:`15`,height:`10`,rx:`1.5`},void 0,!1,{fileName:bl,lineNumber:135,columnNumber:9},void 0),(0,j.jsxDEV)(`path`,{d:`M7 16.5h6M10 14v2.5`},void 0,!1,{fileName:bl,lineNumber:136,columnNumber:9},void 0)]},void 0,!0,{fileName:bl,lineNumber:134,columnNumber:7},void 0),useSummary:()=>zc(Kc(Jn().card?.directory)),Body:hl}],Sl=xl.map(e=>e.id),Cl={publishing:`gitlab`};function wl(e){if(e!==void 0)return Cl[e]??e}function Tl(e,t){let n=t.trim();if(n.length===0)return{sections:e.map(e=>e.section)};let r=e.filter(e=>El(e,n)).map(e=>e.section);return{sections:r,autoExpandId:r.length===1?r[0].id:void 0}}function El(e,t){return Dl(e).toLowerCase().includes(t.toLowerCase())?!0:$t(e.section.title,t)!==null}function Dl({section:e,summary:t}){return[e.title,e.keywords,hc[e.scope],t.headline,t.searchText??``].join(` `)}var Ol=`invariant.ui.settingsOpen`,kl=new Set;function Al(e,t){let n=new Set(t);return new Set([...e].filter(e=>n.has(e)))}function jl(e,t){let n=new Set(e);return n.has(t)?n.delete(t):n.add(t),n}function Ml(e,t){return e.has(t)?new Set(e):new Set([...e,t])}function Nl(e){try{let t=window.localStorage.getItem(Ol);if(!t)return new Set;let n=JSON.parse(t);return Array.isArray(n)?Al(n.filter(e=>typeof e==`string`),e):new Set}catch{return new Set}}function Pl(e){try{window.localStorage.setItem(Ol,JSON.stringify([...e]))}catch{}}var Fl=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/settings/ConfigurationPage.tsx`;function Il({section:e,onSectionChange:t}){let n=Pn(),{data:r}=Qn(),[i,a]=(0,k.useState)(kl),[o,s]=(0,k.useState)(kl),[c,l]=(0,k.useState)(``),[u,d]=(0,k.useState)(),[f,p]=(0,k.useState)(),m=(0,k.useRef)(null);(0,k.useEffect)(()=>a(Nl(Sl)),[]);let h=(0,k.useCallback)(e=>{a(e),Pl(e)},[]),g={};for(let e of xl)g[e.id]=e.useSummary();let{sections:_,autoExpandId:v}=(0,k.useMemo)(()=>Tl(xl.map(e=>({section:e,summary:g[e.id]})),c),[c,...xl.map(e=>g[e.id].headline)]);(0,k.useEffect)(()=>{v&&h(Ml(i,v))},[v]),(0,k.useEffect)(()=>{let t=wl(e);if(!t||!Sl.includes(t))return;a(e=>{let n=Ml(e,t);return Pl(n),n}),d(t),p(t);let n=window.setTimeout(()=>p(void 0),1200);return()=>window.clearTimeout(n)},[e]);let y=(0,k.useCallback)(e=>{let n=jl(i,e);h(n),t(n.has(e)?e:void 0)},[i,h,t]),b=(0,k.useCallback)((e,t)=>{s(n=>{if(n.has(e)===t)return n;let r=new Set(n);return t?r.add(e):r.delete(e),r})},[]),x=xl.filter(e=>o.has(e.id)),ee=xl.filter(e=>g[e.id].state===`attention`);(0,k.useEffect)(()=>{if(x.length===0)return;let e=e=>e.preventDefault();return window.addEventListener(`beforeunload`,e),()=>window.removeEventListener(`beforeunload`,e)},[x.length]);let te=(0,k.useCallback)(e=>{a(t=>{let n=Ml(t,e);return Pl(n),n}),d(e),p(e),window.setTimeout(()=>p(void 0),1200),t(e)},[t]);return Rl({ids:_.map(e=>e.id),focusedId:u,onFocus:d,onToggle:y,onOpen:e=>h(Ml(i,e)),onClose:e=>i.has(e)&&y(e),onFilter:()=>document.querySelector(`.config-filter__input`)?.focus()}),(0,j.jsxDEV)(`div`,{className:`config`,children:[(0,j.jsxDEV)(`header`,{className:`topbar config__topbar`,children:[(0,j.jsxDEV)(`div`,{className:`topbar__identity`,children:[(0,j.jsxDEV)(`h1`,{className:`topbar__title`,children:`Configuration`},void 0,!1,{fileName:Fl,lineNumber:158,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`topbar__path`,title:r?`${r.directory} — click to copy`:void 0,onClick:async()=>{r&&n(await en(r.directory)?`Path copied`:`Could not copy`,`success`)},children:r?tn(r.directory):``},void 0,!1,{fileName:Fl,lineNumber:159,columnNumber:11},this)]},void 0,!0,{fileName:Fl,lineNumber:157,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`topbar__controls`,children:[ee.length>0&&(0,j.jsxDEV)(`button`,{type:`button`,className:`config-attention`,onClick:()=>te(ee[0].id),title:ee.map(e=>e.title).join(`, `),children:[(0,j.jsxDEV)(`span`,{className:`config-state__dot config-state__dot--attention`,"aria-hidden":`true`},void 0,!1,{fileName:Fl,lineNumber:180,columnNumber:15},this),ee.length,` need`,ee.length===1?`s`:``,` attention`]},void 0,!0,{fileName:Fl,lineNumber:174,columnNumber:13},this),(0,j.jsxDEV)(`div`,{className:`filter filter--compact config-filter`,children:(0,j.jsxDEV)(`input`,{className:`filter__input config-filter__input`,value:c,placeholder:`Filter options… /`,"aria-label":`Filter options`,onChange:e=>l(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(l(``),e.currentTarget.blur())}},void 0,!1,{fileName:Fl,lineNumber:186,columnNumber:13},this)},void 0,!1,{fileName:Fl,lineNumber:185,columnNumber:11},this)]},void 0,!0,{fileName:Fl,lineNumber:172,columnNumber:9},this)]},void 0,!0,{fileName:Fl,lineNumber:156,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`config__body`,children:[(0,j.jsxDEV)(Sc,{sections:_,summaries:g,dirty:o,activeId:u,onSelect:te},void 0,!1,{fileName:Fl,lineNumber:204,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`config__list`,ref:m,children:_.length===0?(0,j.jsxDEV)(`p`,{className:`page-state`,children:[`Nothing matches “`,c,`”.`]},void 0,!0,{fileName:Fl,lineNumber:214,columnNumber:13},this):_.map(e=>(0,j.jsxDEV)(bc,{section:e,summary:g[e.id],open:i.has(e.id),dirty:o.has(e.id),focused:u===e.id,linked:f===e.id,onToggle:()=>y(e.id),onFocus:()=>d(e.id),children:i.has(e.id)||o.has(e.id)?(0,j.jsxDEV)(e.Body,{onDirtyChange:t=>b(e.id,t)},void 0,!1,{fileName:Fl,lineNumber:231,columnNumber:19},this):null},e.id,!1,{fileName:Fl,lineNumber:217,columnNumber:15},this))},void 0,!1,{fileName:Fl,lineNumber:212,columnNumber:9},this)]},void 0,!0,{fileName:Fl,lineNumber:203,columnNumber:7},this),x.length>0&&(0,j.jsxDEV)(`footer`,{className:`config-unsaved`,children:[(0,j.jsxDEV)(`span`,{className:`config-unsaved__text`,children:[`Unsaved changes in `,x.map(e=>e.title).join(`, `)]},void 0,!0,{fileName:Fl,lineNumber:241,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:()=>te(x[0].id),children:`Review`},void 0,!1,{fileName:Fl,lineNumber:244,columnNumber:11},this)]},void 0,!0,{fileName:Fl,lineNumber:240,columnNumber:9},this)]},void 0,!0,{fileName:Fl,lineNumber:155,columnNumber:5},this)}function Ll(e){let t=e;return t?t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable:!1}function Rl(e){let t=(0,k.useRef)(e);(0,k.useEffect)(()=>{t.current=e}),(0,k.useEffect)(()=>{let e=e=>{let{ids:n,focusedId:r,onFocus:i,onToggle:a,onOpen:o,onClose:s,onFilter:c}=t.current;if(e.key===`/`&&!Ll(e.target)){e.preventDefault(),c();return}if(Ll(e.target)||e.metaKey||e.ctrlKey||n.length===0)return;let l=r?n.indexOf(r):-1,u=t=>{e.preventDefault();let r=l===-1?0:Math.min(Math.max(l+t,0),n.length-1);i(n[r])};switch(e.key){case`j`:case`ArrowDown`:u(1);return;case`k`:case`ArrowUp`:u(-1);return;case`ArrowRight`:r&&o(r);return;case`ArrowLeft`:r&&s(r);return;case`Enter`:case` `:r&&(e.preventDefault(),a(r));return}};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[])}var zl=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/palette/CommandPalette.tsx`,Bl=40,Vl={root:`Search sessions and commands…`,projects:`Switch to a project…`,groups:`Move to a group…`},Hl={root:``,projects:`Project`,groups:`Group`};function Ul({actions:e,initialScope:t=`root`,onClose:n}){let[r,i]=(0,k.useState)(t),[a,o]=(0,k.useState)(``),[s,c]=(0,k.useState)(0),l=(0,k.useRef)(null),u=(0,k.useMemo)(()=>e.filter(e=>(e.scopedTo??`root`)===r),[e,r]),d=(0,k.useMemo)(()=>a.trim().length===0?u.slice(0,Bl):u.map(e=>({action:e,score:$t(`${e.title} ${e.group} ${e.keywords??``}`,a.trim())})).filter(e=>e.score!==null).sort((e,t)=>t.score-e.score).slice(0,Bl).map(e=>e.action),[u,a]);(0,k.useEffect)(()=>{c(0)},[a,r]),(0,k.useEffect)(()=>{let e=l.current?.querySelector(`[data-active="true"]`);e instanceof HTMLElement&&e.scrollIntoView?.({block:`nearest`})},[s,d]);let f=e=>{if(e.scope){i(e.scope),o(``);return}n(),e.run()},p=e=>{if(e.key===`ArrowDown`||e.key===`n`&&e.ctrlKey){e.preventDefault(),c(e=>(e+1)%Math.max(d.length,1));return}if(e.key===`ArrowUp`||e.key===`p`&&e.ctrlKey){e.preventDefault(),c(e=>(e-1+Math.max(d.length,1))%Math.max(d.length,1));return}if(e.key===`Enter`){e.preventDefault();let t=d[s];t&&f(t);return}if(e.key===`Backspace`&&a.length===0&&r!==`root`){e.preventDefault(),i(`root`);return}if(e.key===`Escape`){if(e.preventDefault(),r!==`root`){i(`root`);return}n()}},m=``;return(0,j.jsxDEV)(`div`,{className:`overlay overlay--top`,onMouseDown:e=>{e.target===e.currentTarget&&n()},children:(0,j.jsxDEV)(`div`,{className:`palette`,role:`dialog`,"aria-modal":`true`,"aria-label":`Command palette`,children:[(0,j.jsxDEV)(`div`,{className:`palette__field`,children:[r!==`root`&&(0,j.jsxDEV)(`span`,{className:`palette__scope`,children:Hl[r]},void 0,!1,{fileName:zl,lineNumber:138,columnNumber:32},this),(0,j.jsxDEV)(`input`,{className:`palette__input`,autoFocus:!0,value:a,placeholder:Vl[r],onChange:e=>o(e.target.value),onKeyDown:p,"aria-label":Vl[r]},void 0,!1,{fileName:zl,lineNumber:139,columnNumber:11},this)]},void 0,!0,{fileName:zl,lineNumber:137,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`palette__list`,ref:l,role:`listbox`,children:[d.length===0&&(0,j.jsxDEV)(`p`,{className:`palette__empty`,children:`No matches`},void 0,!1,{fileName:zl,lineNumber:151,columnNumber:36},this),d.map((e,t)=>{let n=e.group===m?void 0:e.group;return m=e.group,(0,j.jsxDEV)(`div`,{children:[n&&(0,j.jsxDEV)(`div`,{className:`palette__group`,children:n},void 0,!1,{fileName:zl,lineNumber:159,columnNumber:28},this),(0,j.jsxDEV)(`button`,{type:`button`,role:`option`,"aria-selected":t===s,"data-active":t===s,className:`palette__item${t===s?` is-active`:``}`,onMouseMove:()=>c(t),onClick:()=>f(e),children:[e.status&&(0,j.jsxDEV)(At,{status:e.status},void 0,!1,{fileName:zl,lineNumber:169,columnNumber:37},this),(0,j.jsxDEV)(`span`,{className:`palette__title`,children:e.title},void 0,!1,{fileName:zl,lineNumber:170,columnNumber:19},this),e.hint&&(0,j.jsxDEV)(`span`,{className:`palette__hint`,children:e.hint},void 0,!1,{fileName:zl,lineNumber:171,columnNumber:35},this),e.shortcut&&(0,j.jsxDEV)(`kbd`,{className:`palette__shortcut`,children:e.shortcut},void 0,!1,{fileName:zl,lineNumber:172,columnNumber:39},this)]},void 0,!0,{fileName:zl,lineNumber:160,columnNumber:17},this)]},e.id,!0,{fileName:zl,lineNumber:158,columnNumber:15},this)})]},void 0,!0,{fileName:zl,lineNumber:150,columnNumber:9},this),(0,j.jsxDEV)(`footer`,{className:`palette__foot`,children:[(0,j.jsxDEV)(`kbd`,{children:`↑`},void 0,!1,{fileName:zl,lineNumber:180,columnNumber:11},this),(0,j.jsxDEV)(`kbd`,{children:`↓`},void 0,!1,{fileName:zl,lineNumber:180,columnNumber:23},this),` navigate `,(0,j.jsxDEV)(`kbd`,{children:`↵`},void 0,!1,{fileName:zl,lineNumber:180,columnNumber:45},this),` run`,` `,r===`root`?(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`kbd`,{children:`esc`},void 0,!1,{fileName:zl,lineNumber:181,columnNumber:33},this),` close`]},void 0,!0,{fileName:zl,lineNumber:181,columnNumber:31},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`kbd`,{children:`⌫`},void 0,!1,{fileName:zl,lineNumber:181,columnNumber:61},this),` back`]},void 0,!0,{fileName:zl,lineNumber:181,columnNumber:59},this)]},void 0,!0,{fileName:zl,lineNumber:179,columnNumber:9},this)]},void 0,!0,{fileName:zl,lineNumber:136,columnNumber:7},this)},void 0,!1,{fileName:zl,lineNumber:135,columnNumber:5},this)}var Wl=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/palette/ShortcutSheet.tsx`,Gl=[{title:`Projects`,rows:[[`⌘P`,`Switch project`],[`⇧⌘H`,`All projects`],[`⌫`,`Leave the project list, back to the full palette`]]},{title:`Global`,rows:[[`⌘K`,`Command palette`],[`N`,`New session`],[`/`,`Focus the filter`],[`⇧⌘R`,`Copy the execute line of the session in front of you`],[`?`,`This sheet`]]},{title:`Dashboard`,rows:[[`J / K`,`Move between sessions`],[`← / →`,`Collapse / expand a session's reviews`],[`↵`,`Open the focused session`],[`1 – 5`,`Set status: Review is machine-set, so it is not one of the five`]]},{title:`Selection`,rows:[[`X`,`Tick the focused row`],[`⇧X`,`Tick it and everything back to the last one you ticked`],[`⌘A`,`Tick every row on screen`],[`1 – 5`,`Send the whole selection to that status`],[`⌘⌫`,`Archive the selection`],[`Esc`,`Let the selection go`]]},{title:`Review triage`,rows:[[`J / K`,`Move between comments`],[`↵`,`Expand the focused comment`],[`S`,`Stage it`],[`D`,`Discard it`],[`E`,`Edit its wording`],[`⇧S`,`Stage everything matching the filter`]]},{title:`Session`,rows:[[`⇧⌘V`,`Toggle preview / edit`],[`S`,`Split view`],[`⌘S`,`Save now`],[`Esc`,`Back to the dashboard`]]},{title:`Intro videos`,rows:[[`⌘K → intro`,`Watch the intro for the page you are on`],[`Esc`,`Minimise the video — it keeps playing beside the app`]]}];function Kl({onClose:e}){return(0,j.jsxDEV)(jn,{title:`Keyboard shortcuts`,onClose:e,width:520,children:(0,j.jsxDEV)(`div`,{className:`shortcuts`,children:Gl.map(e=>(0,j.jsxDEV)(`section`,{className:`shortcuts__group`,children:[(0,j.jsxDEV)(`h3`,{className:`shortcuts__title`,children:e.title},void 0,!1,{fileName:Wl,lineNumber:77,columnNumber:13},this),e.rows.map(([e,t])=>(0,j.jsxDEV)(`div`,{className:`shortcuts__row`,children:[(0,j.jsxDEV)(`kbd`,{children:e},void 0,!1,{fileName:Wl,lineNumber:80,columnNumber:17},this),(0,j.jsxDEV)(`span`,{children:t},void 0,!1,{fileName:Wl,lineNumber:81,columnNumber:17},this)]},e,!0,{fileName:Wl,lineNumber:79,columnNumber:15},this))]},e.title,!0,{fileName:Wl,lineNumber:76,columnNumber:11},this))},void 0,!1,{fileName:Wl,lineNumber:74,columnNumber:7},this)},void 0,!1,{fileName:Wl,lineNumber:73,columnNumber:5},this)}var ql=`Ungrouped`;function Jl({projects:e,groups:t,currentProjectId:n,onSwitch:r}){let i=[...t].sort((e,t)=>e.order-t.order),a=new Map(i.map(e=>[e.id,e.name])),o=i.map(t=>({label:t.name,cards:e.filter(e=>e.groupId===t.id)}));return o.push({label:t.length===0?`Switch project`:ql,cards:e.filter(e=>!e.groupId||!a.has(e.groupId))}),o.flatMap(e=>e.cards.map(t=>({id:`switch-to-${t.id}`,group:e.label,scopedTo:`projects`,title:t.name,hint:Yl(t,n),keywords:[t.directory,t.manifestName??``,t.groupId?a.get(t.groupId)??``:``,`project switch`].join(` `),run:()=>r(t.id)})))}function Yl(e,t){if(e.id===t)return`current`;let n=e.attention?.awaitingDecision??0,r=e.attention?.openReviewComments??0,i=[n>0?`${n} awaiting you`:``,r>0?`${r} comments`:``].filter(e=>e.length>0);return i.length>0?i.join(` · `):tn(e.directory)}function Xl({groups:e,card:t,onPick:n,onCreate:r}){let i=[...e].sort((e,t)=>e.order-t.order).map(e=>({id:`move-to-${e.id}`,group:`Move to group`,scopedTo:`groups`,title:e.name,hint:t?.groupId===e.id?`current`:void 0,keywords:`group move file`,run:()=>n(e)}));return t?.groupId&&i.push({id:`move-to-none`,group:`Move to group`,scopedTo:`groups`,title:ql,hint:`take it out of its group`,keywords:`ungroup none remove`,run:()=>n(null)}),i.push({id:`move-to-new`,group:`Move to group`,scopedTo:`groups`,title:`New group…`,hint:`create one and move it there`,keywords:`new group create`,run:r}),i}var W=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/ProjectApp.tsx`;function Zl({projectId:e,route:t,navigate:n,projects:r,groups:i,card:a,onOpenHub:o,onSwitchProject:s}){let c=Pn(),l=Yr(),{data:u}=Qn(),{data:d,isLoading:f}=$n(),p=tr(),m=ir(),h=cr(),g=hr(),{data:_}=ur(),{data:v}=lr(),[y,b]=(0,k.useState)(gn),[x,ee]=(0,k.useState)(`preview`),[te,ne]=(0,k.useState)(``),[S,re]=(0,k.useState)(),[ie,C]=(0,k.useState)(),[ae,w]=(0,k.useState)(!1),[T,oe]=(0,k.useState)(!1),[E,se]=(0,k.useState)(!1),[ce,le]=(0,k.useState)(!1),[ue,de]=(0,k.useState)(!1),fe=(0,k.useCallback)(()=>w(!1),[]),pe=(0,k.useCallback)(()=>oe(!1),[]),me=(0,k.useCallback)(()=>C(void 0),[]),he=(0,k.useCallback)(()=>de(!1),[]),[ge,_e]=(0,k.useState)(),[ve,ye]=(0,k.useState)(!1),be=(0,k.useMemo)(()=>d?.sessions??[],[d]),xe=(0,k.useMemo)(()=>{let e=te.trim();return e.length===0?be:be.map(t=>({session:t,score:$t(`${t.title} ${t.excerpt} ${t.tags.join(` `)}`,e)})).filter(e=>e.score!==null).sort((e,t)=>t.score-e.score).map(e=>e.session)},[be,te]),Se=(0,k.useMemo)(()=>vn(_n(be,te.trim().length>0?new Set(xe.map(e=>e.id)):void 0,_?.reviews??[],y)),[be,xe,te,_,y]),Ce=Vo((0,k.useMemo)(()=>Se.map(e=>e.id),[Se]),(0,k.useMemo)(()=>be.map(e=>e.id),[be])),D=(0,k.useMemo)(()=>be.filter(e=>Ce.isSelected(e.id)),[be,Ce]),we=Ce.clear;(0,k.useEffect)(()=>{t.name!==`sessions`&&we()},[t.name,we]);let Te=(0,k.useCallback)(e=>{b(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]),Ee=(0,k.useCallback)(e=>{let t=be.find(t=>t.id===e);if(!(!t||!u))return`execute instructions from ${u.sessionsDirectory}/${t.file}`},[be,u]),De=(0,k.useCallback)(()=>{let e=t.name===`session`?t.sessionId:S,n=e?Ee(e):void 0;if(!n){c(`No session in focus — open one, or pick one from the list.`,`info`);return}en(n).then(e=>c(e?`Execute line copied`:`Could not copy`,e?`success`:`danger`))},[t,S,Ee,c]),O=(0,k.useCallback)(()=>{let e=t.name===`session`?t.sessionId:S,n=e?be.find(t=>t.id===e):void 0;if(!n||!u){c(`No session in focus — open one, or pick one from the list.`,`info`);return}if(!n.issue){c(`That session is not linked to an issue.`,`info`);return}en(`synthesise the plan of ${u.sessionsDirectory}/${n.file} into its <issue-spec> block, following the project issue template`).then(e=>c(e?`Synthesis line copied`:`Could not copy`,e?`success`:`danger`))},[t,S,be,u,c]),Oe=(0,k.useCallback)(t=>{re(t),n({name:`session`,projectId:e,sessionId:t})},[n]),ke=(0,k.useCallback)(t=>n({name:`review`,projectId:e,slug:t}),[n]),Ae=(0,k.useCallback)(e=>{g.mutate(e,{onSuccess:async e=>{oe(!1),await en(e.executeLine),c(e.guidance,`success`),Oe(e.session.id)},onError:e=>c(e instanceof Error?e.message:`Could not create the review.`,`danger`)})},[g,Oe,c]),je=(0,k.useCallback)(e=>Ae({sessionId:e}),[Ae]),Me=(0,k.useCallback)((e,t)=>{p.mutate({sessionId:e,status:t},{onError:()=>c(`Could not change the status.`,`danger`),onSuccess:e=>{e.status===`executed`&&e.kind!==`review`&&(e.reviewSessionIds.length>0||v&&!v.canReview||c(`Marked done — request a review from the session page.`,`info`))}})},[p,c,v]),Ne=(0,k.useCallback)(e=>{m.mutate(e,{onSuccess:async e=>{w(!1),await en(e.executeLine),c(`Session created — execute line copied`,`success`),ee(`edit`),Oe(e.session.id)},onError:e=>c(e instanceof Error?e.message:`Could not create the session.`,`danger`)})},[m,Oe,c]),{open:Pe}=wo(),Fe=$l({sessions:be,route:t,project:u?.directory,projects:r,groups:i,currentProjectId:e,onSwitchProject:s,onOpenHub:o,onOpenSession:Oe,onChangeStatus:Me,onNew:()=>w(!0),onSetMode:ee,onShortcuts:()=>de(!0),onWatchIntro:Pe,onMigrateAll:()=>h.mutate(void 0,{onSuccess:e=>c(`Migrated ${e.migrated.length} session(s)`,`success`),onError:()=>c(`Could not migrate headers.`,`danger`)}),onGoToSessions:()=>n({name:`sessions`,projectId:e}),onGoToReviews:()=>n({name:`reviews`,projectId:e}),onGoToPackages:()=>n({name:`packages`,projectId:e}),onGoToSettings:t=>n({name:`settings`,projectId:e,...t?{section:t}:{}}),onInstallPackage:()=>{n({name:`packages`,projectId:e}),se(!0)},onSyncProject:()=>{n({name:`packages`,projectId:e}),le(!0)},onBrowseSkills:()=>n({name:`skills`,projectId:e}),onReviewBranch:()=>oe(!0),onCopyExecuteLine:De,onCopySynthesisLine:O,onOpenReview:ke,onRequestReview:je,reviews:_?.reviews??[],canReview:v?.canReview??!1,onStop:async()=>{window.confirm(`Stop this UI server? The page will stop responding.`)&&(await Un.shutdown().catch(()=>void 0),c(`UI stopping…`,`info`))},toast:c});return tu({enabled:!ae&&!ue&&!T,paletteOpen:ie!==void 0,onPalette:()=>C(e=>e===void 0?`root`:void 0),onSwitcher:()=>C(`projects`),onHub:o,onNew:()=>w(!0),onShortcuts:()=>de(!0),onCopyExecuteLine:De,onFilter:()=>document.querySelector(`.filter__input`)?.focus(),onTogglePreview:()=>ee(e=>e===`edit`?`preview`:`edit`),onSplit:()=>ee(`split`),onEscape:()=>{if(Ce.count>0){Ce.clear();return}t.name===`session`?n({name:`sessions`,projectId:e}):t.name===`review`&&n({name:`reviews`,projectId:e})},onMove:e=>{if(t.name!==`sessions`||Se.length===0)return;let n=Se.findIndex(e=>e.id===S),r=n===-1?0:Math.min(Math.max(n+e,0),Se.length-1);re(Se[r].id)},onOpenFocused:()=>{t.name===`sessions`&&S&&Oe(S)},onStatusDigit:e=>{let n=zt[e];if(!n)return;if(t.name===`sessions`&&Ce.count>0){_e(n);return}let r=t.name===`session`?t.sessionId:S;r&&Me(r,n)},onToggleSelect:e=>{t.name!==`sessions`||!S||Ce.toggle(S,{range:e})},onSelectAll:()=>{t.name===`sessions`&&Ce.selectAll()},onArchiveSelected:()=>{t.name===`sessions`&&Ce.count>0&&ye(!0)},hasSelection:Ce.count>0,isSessionRoute:t.name===`session`}),(0,j.jsxDEV)(`div`,{className:`app app--project app--${a?.color??`indigo`}`,"data-tutorial-inert":!0,children:[(0,j.jsxDEV)(Tt,{route:t,projectId:e,card:a,onNavigate:n,onOpenPalette:()=>C(`root`),onOpenHub:o,onSwitchProject:()=>C(`projects`),live:l},void 0,!1,{fileName:W,lineNumber:419,columnNumber:7},this),(0,j.jsxDEV)(`main`,{className:`main`,children:t.name===`session`?(0,j.jsxDEV)(Ga,{sessionId:t.sessionId,mode:x,onModeChange:ee,onBack:()=>n({name:`sessions`,projectId:e}),onArchived:()=>n({name:`sessions`,projectId:e}),onOpenSession:Oe,onOpenSettings:()=>n({name:`settings`,projectId:e,section:`publishing`})},void 0,!1,{fileName:W,lineNumber:432,columnNumber:11},this):t.name===`reviews`?(0,j.jsxDEV)(Ho,{onOpen:ke,onOpenSession:Oe,onReviewBranch:()=>oe(!0)},void 0,!1,{fileName:W,lineNumber:442,columnNumber:11},this):t.name===`review`?(0,j.jsxDEV)(qo,{slug:t.slug,onBack:()=>n({name:`reviews`,projectId:e}),onOpenSession:Oe,onOpenSettings:()=>n({name:`settings`,projectId:e,section:`publishing`})},void 0,!1,{fileName:W,lineNumber:448,columnNumber:11},this):t.name===`settings`?(0,j.jsxDEV)(Il,{section:t.section,onSectionChange:t=>n({name:`settings`,projectId:e,...t?{section:t}:{}})},void 0,!1,{fileName:W,lineNumber:455,columnNumber:11},this):t.name===`packages`?(0,j.jsxDEV)(tc,{installOpen:E,syncOpen:ce,onInstallOpenChange:se,onSyncOpenChange:le,onBrowseSkills:()=>n({name:`skills`,projectId:e})},void 0,!1,{fileName:W,lineNumber:462,columnNumber:11},this):t.name===`skills`?(0,j.jsxDEV)(pc,{onBack:()=>n({name:`packages`,projectId:e})},void 0,!1,{fileName:W,lineNumber:470,columnNumber:11},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`header`,{className:`topbar`,children:[(0,j.jsxDEV)(`div`,{className:`topbar__identity`,children:[(0,j.jsxDEV)(`nav`,{className:`crumbs`,"aria-label":`Breadcrumb`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`crumbs__link`,onClick:o,children:`Projects`},void 0,!1,{fileName:W,lineNumber:476,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`crumbs__sep`,children:`/`},void 0,!1,{fileName:W,lineNumber:479,columnNumber:19},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`crumbs__link`,onClick:()=>C(`projects`),children:a?.name??u?.name??`Project`},void 0,!1,{fileName:W,lineNumber:482,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`crumbs__sep`,children:`/`},void 0,!1,{fileName:W,lineNumber:489,columnNumber:19},this),(0,j.jsxDEV)(`span`,{className:`crumbs__here`,children:`Sessions`},void 0,!1,{fileName:W,lineNumber:490,columnNumber:19},this)]},void 0,!0,{fileName:W,lineNumber:475,columnNumber:17},this),(0,j.jsxDEV)(`h1`,{className:`topbar__title`,children:u?.name??`Sessions`},void 0,!1,{fileName:W,lineNumber:492,columnNumber:17},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`topbar__path`,title:u?`${u.directory} — click to copy`:void 0,onClick:async()=>{u&&c(await en(u.directory)?`Path copied`:`Could not copy`,`success`)},children:u?tn(u.directory):``},void 0,!1,{fileName:W,lineNumber:493,columnNumber:17},this)]},void 0,!0,{fileName:W,lineNumber:474,columnNumber:15},this),(0,j.jsxDEV)(`div`,{className:`topbar__controls`,children:[(0,j.jsxDEV)(`div`,{className:`topbar__counts`,children:Lt.map(e=>(0,j.jsxDEV)(`span`,{className:`count count--${e}`,title:Rt[e],children:[(0,j.jsxDEV)(`span`,{className:`count__value`,children:d?.counts[e]??0},void 0,!1,{fileName:W,lineNumber:511,columnNumber:23},this),(0,j.jsxDEV)(`span`,{className:`count__label`,children:Rt[e]},void 0,!1,{fileName:W,lineNumber:512,columnNumber:23},this)]},e,!0,{fileName:W,lineNumber:510,columnNumber:21},this))},void 0,!1,{fileName:W,lineNumber:508,columnNumber:17},this),(0,j.jsxDEV)(`div`,{className:`filter filter--compact`,children:(0,j.jsxDEV)(`input`,{className:`filter__input`,value:te,placeholder:`Filter… /`,onChange:e=>ne(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(ne(``),e.currentTarget.blur())},"aria-label":`Filter sessions`},void 0,!1,{fileName:W,lineNumber:520,columnNumber:19},this)},void 0,!1,{fileName:W,lineNumber:519,columnNumber:17},this),(0,j.jsxDEV)(ko,{surface:`sessions`},void 0,!1,{fileName:W,lineNumber:530,columnNumber:17},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:()=>w(!0),children:`New session`},void 0,!1,{fileName:W,lineNumber:532,columnNumber:17},this)]},void 0,!0,{fileName:W,lineNumber:507,columnNumber:15},this)]},void 0,!0,{fileName:W,lineNumber:473,columnNumber:13},this),d&&d.needingMigration>0&&(0,j.jsxDEV)(`div`,{className:`banner banner--warning`,children:[(0,j.jsxDEV)(`div`,{className:`banner__text`,children:[(0,j.jsxDEV)(`strong`,{children:[d.needingMigration,` session(s)`]},void 0,!0,{fileName:W,lineNumber:541,columnNumber:19},this),` have no canonical `,(0,j.jsxDEV)(`code`,{children:`<session-meta>`},void 0,!1,{fileName:W,lineNumber:541,columnNumber:89},this),` header.`]},void 0,!0,{fileName:W,lineNumber:540,columnNumber:17},this),(0,j.jsxDEV)(`div`,{className:`banner__actions`,children:(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--subtle`,onClick:()=>h.mutate(void 0,{onSuccess:e=>c(`Migrated ${e.migrated.length} session(s)`,`success`),onError:()=>c(`Could not migrate headers.`,`danger`)}),children:`Migrate all`},void 0,!1,{fileName:W,lineNumber:544,columnNumber:19},this)},void 0,!1,{fileName:W,lineNumber:543,columnNumber:17},this)]},void 0,!0,{fileName:W,lineNumber:539,columnNumber:15},this),f?(0,j.jsxDEV)(`div`,{className:`page-state`,children:`Loading sessions…`},void 0,!1,{fileName:W,lineNumber:561,columnNumber:15},this):be.length===0?(0,j.jsxDEV)(Ql,{onNew:()=>w(!0)},void 0,!1,{fileName:W,lineNumber:563,columnNumber:15},this):(0,j.jsxDEV)(bn,{sessions:xe,allSessions:be,reviews:_?.reviews??[],filter:te,focusedId:S,onFocus:re,onOpen:Oe,onStatusChange:Me,collapsed:y,onToggleCollapsed:Te,selection:Ce},void 0,!1,{fileName:W,lineNumber:565,columnNumber:15},this),Ce.count>0&&(0,j.jsxDEV)(pi,{sessions:D,count:Ce.count,hiddenCount:Ce.hiddenCount,onClear:Ce.clear,onNarrow:Ce.replace,pendingStatus:ge,onPendingStatusHandled:()=>_e(void 0),archiveRequested:ve,onArchiveRequestHandled:()=>ye(!1)},void 0,!1,{fileName:W,lineNumber:581,columnNumber:15},this)]},void 0,!0,{fileName:W,lineNumber:472,columnNumber:11},this)},void 0,!1,{fileName:W,lineNumber:430,columnNumber:7},this),ie&&(0,j.jsxDEV)(Ul,{actions:Fe,initialScope:ie,onClose:me},void 0,!1,{fileName:W,lineNumber:598,columnNumber:9},this),ae&&(0,j.jsxDEV)($a,{busy:m.isPending,projectDirectory:u?.directory,onClose:fe,onSubmit:Ne},void 0,!1,{fileName:W,lineNumber:601,columnNumber:9},this),T&&(0,j.jsxDEV)(Xo,{busy:g.isPending,onClose:pe,onSubmit:({base:e})=>Ae({standalone:!0,base:e})},void 0,!1,{fileName:W,lineNumber:609,columnNumber:9},this),ue&&(0,j.jsxDEV)(Kl,{onClose:he},void 0,!1,{fileName:W,lineNumber:615,columnNumber:25},this)]},void 0,!0,{fileName:W,lineNumber:418,columnNumber:5},this)}function Ql({onNew:e}){return(0,j.jsxDEV)(`div`,{className:`empty`,children:[(0,j.jsxDEV)(`h2`,{className:`empty__title`,children:`No sessions yet`},void 0,!1,{fileName:W,lineNumber:623,columnNumber:7},this),(0,j.jsxDEV)(`p`,{className:`empty__text`,children:[`A session is a markdown file in `,(0,j.jsxDEV)(`code`,{children:`.invariant/sessions`},void 0,!1,{fileName:W,lineNumber:625,columnNumber:41},this),` holding one task, its plan, and its status. Create one here, then paste its execute line into your agent.`]},void 0,!0,{fileName:W,lineNumber:624,columnNumber:7},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:e,children:`New session`},void 0,!1,{fileName:W,lineNumber:628,columnNumber:7},this)]},void 0,!0,{fileName:W,lineNumber:622,columnNumber:5},this)}function $l(e){return(0,k.useMemo)(()=>{let t=e.route,n=t.name===`session`?e.sessions.find(e=>e.id===t.sessionId):void 0,r=[{id:`new`,group:`Actions`,title:`New session…`,shortcut:`N`,run:e.onNew},{id:`switch-project`,group:`Actions`,title:`Switch project…`,shortcut:`⌘P`,keywords:`project switch change repository workspace`,scope:`projects`,run:()=>void 0},{id:`go-hub`,group:`Actions`,title:`All projects`,shortcut:`⇧⌘H`,keywords:`hub projects home overview`,run:e.onOpenHub},{id:`go-sessions`,group:`Actions`,title:`Go to sessions`,keywords:`dashboard home`,run:e.onGoToSessions},{id:`go-reviews`,group:`Actions`,title:`Go to reviews`,keywords:`review comments triage`,run:e.onGoToReviews},{id:`go-packages`,group:`Actions`,title:`Go to packages`,keywords:`package install add remove inspect`,run:e.onGoToPackages},...xl.map(t=>({id:`go-settings-${t.id}`,group:`Settings`,title:`Settings: ${t.title}`,hint:hc[t.scope],keywords:`settings configuration ${t.keywords}`,run:()=>e.onGoToSettings(t.id)})),{id:`install-package`,group:`Packages`,title:`Install package…`,keywords:`github skills.sh registry add dependency`,run:e.onInstallPackage},{id:`browse-skills`,group:`Packages`,title:`Browse skills…`,hint:`The skills.sh catalogue`,keywords:`skills.sh catalogue browse search install skill agent`,run:e.onBrowseSkills},{id:`sync-project`,group:`Packages`,title:`Sync…`,hint:`Regenerate target folders`,keywords:`sync regenerate claude cursor drift check`,run:e.onSyncProject},{id:`review-branch`,group:`Actions`,title:`Review a branch…`,hint:`Tied to no session`,keywords:`standalone review branch diff someone else`,run:e.onReviewBranch},{id:`copy-synthesis-line`,group:`Actions`,title:`Copy the synthesis line`,hint:`Ask an agent to write the issue spec`,keywords:`linear issue spec synthesis summary paste agent`,run:e.onCopySynthesisLine},{id:`copy-execute-line`,group:`Actions`,title:`Copy the execute line`,shortcut:`⇧⌘R`,keywords:`paste agent run session`,run:e.onCopyExecuteLine},{id:`migrate`,group:`Actions`,title:`Migrate all session headers`,keywords:`fix header meta`,run:e.onMigrateAll},{id:`shortcuts`,group:`Actions`,title:`Keyboard shortcuts`,shortcut:`?`,run:e.onShortcuts},{id:`stop`,group:`Actions`,title:`Stop this UI server`,keywords:`quit shutdown exit`,run:e.onStop},...nu(e.route,e.onWatchIntro)];if(e.project&&r.push({id:`copy-project`,group:`Actions`,title:`Copy project path`,hint:e.project,run:async()=>{e.toast(await en(e.project)?`Path copied`:`Could not copy`,`success`)}}),n){r.push({id:`mode-preview`,group:`This session`,title:`Preview`,shortcut:`⇧⌘V`,run:()=>e.onSetMode(`preview`)},{id:`mode-edit`,group:`This session`,title:`Edit`,shortcut:`⇧⌘V`,run:()=>e.onSetMode(`edit`)},{id:`mode-split`,group:`This session`,title:`Split`,shortcut:`S`,run:()=>e.onSetMode(`split`)}),n.kind===`plan`&&n.status===`executed`&&e.canReview&&r.push({id:`request-review`,group:`This session`,title:`Request review`,keywords:`diff branch code review`,run:()=>e.onRequestReview(n.id)}),n.reviewFile&&r.push({id:`open-review-file`,group:`This session`,title:`Open the review document`,hint:n.reviewFile,run:()=>e.onOpenReview(rn(n.reviewFile))});for(let t of zt)t!==n.status&&r.push({id:`status-${t}`,group:`This session`,title:`Set status: ${Nt({kind:n.kind,status:t}).label}`,status:t,run:()=>e.onChangeStatus(n.id,t)});n.status===`review`&&r.push({id:`status-locked`,group:`This session`,title:`Why can I not change this status?`,hint:Bt,keywords:`review status locked triage`,run:()=>e.toast(Bt,`info`)})}r.push(...Jl({projects:e.projects,groups:e.groups,currentProjectId:e.currentProjectId,onSwitch:e.onSwitchProject}));for(let t of e.reviews)r.push({id:`open-review-${t.slug}`,group:`Go to review`,title:t.branch,hint:t.counts.open>0?`${t.counts.open} awaiting triage`:`${t.counts.staged} staged`,keywords:`${t.path} review comments`,run:()=>e.onOpenReview(t.slug)});for(let t of e.sessions){let n=Nt(t,un(t,e.reviews));r.push({id:`open-${t.id}`,group:t.kind===`review`?`Go to review session`:`Go to session`,title:t.title,hint:t.kind===`review`?`${n.label} · ${t.branch??``}`.trim():n.label,status:t.status,keywords:`${t.excerpt} ${t.tags.join(` `)} ${t.branch??``}`,run:()=>e.onOpenSession(t.id)})}return r},[e])}function eu(e){let t=e;return t?t.tagName===`INPUT`||t.tagName===`TEXTAREA`||t.isContentEditable||t.closest(`.cm-editor`)!==null:!1}function tu(e){(0,k.useEffect)(()=>{let t=t=>{let n=t.metaKey||t.ctrlKey;if(n&&t.key.toLowerCase()===`k`){t.preventDefault(),e.onPalette();return}if(n&&!t.shiftKey&&t.key.toLowerCase()===`p`){t.preventDefault(),e.onSwitcher();return}if(n&&t.shiftKey&&t.key.toLowerCase()===`h`){t.preventDefault(),e.onHub();return}if(n&&t.shiftKey&&t.key.toLowerCase()===`v`){t.preventDefault(),e.onTogglePreview();return}if(n&&t.shiftKey&&t.key.toLowerCase()===`r`){t.preventDefault(),e.onCopyExecuteLine();return}if(!(!e.enabled||e.paletteOpen)){if(t.key===`Escape`&&!eu(t.target)){e.onEscape();return}if(!eu(t.target)){if(n&&t.key.toLowerCase()===`a`&&!e.isSessionRoute){t.preventDefault(),e.onSelectAll();return}if(n&&t.key===`Backspace`&&e.hasSelection){t.preventDefault(),e.onArchiveSelected();return}switch(t.key){case`x`:case`X`:t.preventDefault(),e.onToggleSelect(t.shiftKey);return;case`n`:t.preventDefault(),e.onNew();return;case`/`:t.preventDefault(),e.onFilter();return;case`?`:t.preventDefault(),e.onShortcuts();return;case`j`:e.onMove(1);return;case`k`:e.onMove(-1);return;case`ArrowDown`:e.isSessionRoute||(t.preventDefault(),e.onMove(1));return;case`ArrowUp`:e.isSessionRoute||(t.preventDefault(),e.onMove(-1));return;case`Enter`:e.isSessionRoute||e.onOpenFocused();return;case`e`:e.isSessionRoute&&e.onTogglePreview();return;case`p`:e.isSessionRoute&&e.onTogglePreview();return;case`s`:e.isSessionRoute&&e.onSplit();return;case`1`:case`2`:case`3`:case`4`:case`5`:e.onStatusDigit(Number(t.key)-1);return}}}};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e])}function nu(e,t){let n=lo(e);return co().sort((e,t)=>Number(t.key===n)-Number(e.key===n)).map(e=>({id:`intro-${e.key}`,group:`Help`,title:e.key===n?`Watch the intro for this page`:`Watch the ${e.title} intro`,hint:e.summary,keywords:`intro tutorial video loom help onboarding guide ${e.title}`,run:()=>t(e.key)}))}var ru=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/hub/ProjectRow.tsx`;function iu({card:e,focused:t,renaming:n,onFocus:r,onOpen:i,onRename:a,onCommitRename:o,onCancelRename:s,onMove:c,onCopyPath:l,onRemove:u,onInitialize:d}){let f=e.state!==`ok`,p=bt(e.lastActivityAt),m=e.counts,h=(m?.[`in-progress`]??0)+(m?.planning??0),g=e.attention?.awaitingDecision??0,_=e.attention?.openReviewComments??0,v=e.displayName&&e.manifestName&&e.manifestName!==e.displayName?e.manifestName:void 0,y=(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`project-row__monogram`,"aria-hidden":`true`,children:yt(e.name)},void 0,!1,{fileName:ru,lineNumber:61,columnNumber:7},this),(0,j.jsxDEV)(`span`,{className:`project-row__identity`,children:n?(0,j.jsxDEV)(ou,{initial:e.displayName??e.name,canReset:e.displayName!==void 0,onCommit:o,onCancel:s},void 0,!1,{fileName:ru,lineNumber:67,columnNumber:11},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`project-row__name`,children:e.name},void 0,!1,{fileName:ru,lineNumber:75,columnNumber:13},this),v&&(0,j.jsxDEV)(`span`,{className:`project-row__secondary`,children:v},void 0,!1,{fileName:ru,lineNumber:76,columnNumber:27},this)]},void 0,!0,{fileName:ru,lineNumber:74,columnNumber:11},this)},void 0,!1,{fileName:ru,lineNumber:65,columnNumber:7},this),(0,j.jsxDEV)(`span`,{className:`project-row__path`,title:e.directory,children:tn(e.directory)},void 0,!1,{fileName:ru,lineNumber:81,columnNumber:7},this),f?(0,j.jsxDEV)(`span`,{className:`project-row__problem`,children:e.problem??su(e.state)},void 0,!1,{fileName:ru,lineNumber:86,columnNumber:9},this):(0,j.jsxDEV)(j.Fragment,{children:[(0,j.jsxDEV)(`span`,{className:`project-row__branch`,children:e.git?.branch&&(0,j.jsxDEV)(`span`,{className:`chip chip--branch`,children:e.git.branch},void 0,!1,{fileName:ru,lineNumber:90,columnNumber:34},this)},void 0,!1,{fileName:ru,lineNumber:89,columnNumber:11},this),(0,j.jsxDEV)(au,{value:h,label:`in flight`},void 0,!1,{fileName:ru,lineNumber:92,columnNumber:11},this),(0,j.jsxDEV)(au,{value:g,label:`awaiting you`,tone:`waiting`},void 0,!1,{fileName:ru,lineNumber:93,columnNumber:11},this),(0,j.jsxDEV)(au,{value:_,label:`open comments`},void 0,!1,{fileName:ru,lineNumber:94,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`project-row__activity`,children:p??``},void 0,!1,{fileName:ru,lineNumber:95,columnNumber:11},this)]},void 0,!0,{fileName:ru,lineNumber:88,columnNumber:9},this)]},void 0,!0,{fileName:ru,lineNumber:60,columnNumber:5},this);return(0,j.jsxDEV)(`div`,{className:`project-row project-row--${e.color}${t?` is-focused`:``}${f?` is-unavailable`:``}`,"data-project-id":e.id,onMouseEnter:r,children:[n?(0,j.jsxDEV)(`div`,{className:`project-row__open is-renaming`,children:y},void 0,!1,{fileName:ru,lineNumber:113,columnNumber:9},this):(0,j.jsxDEV)(`button`,{type:`button`,className:`project-row__open`,onClick:i,disabled:f,"aria-label":`Open ${e.name}`,children:y},void 0,!1,{fileName:ru,lineNumber:115,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`project-row__actions`,children:[e.state===`uninitialized`&&(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:d,children:`How to fix`},void 0,!1,{fileName:ru,lineNumber:128,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:a,children:`Rename`},void 0,!1,{fileName:ru,lineNumber:132,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:c,children:`Move to…`},void 0,!1,{fileName:ru,lineNumber:135,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:l,children:`Copy path`},void 0,!1,{fileName:ru,lineNumber:138,columnNumber:9},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:u,children:`Remove`},void 0,!1,{fileName:ru,lineNumber:143,columnNumber:9},this)]},void 0,!0,{fileName:ru,lineNumber:126,columnNumber:7},this)]},void 0,!0,{fileName:ru,lineNumber:102,columnNumber:5},this)}function au({value:e,label:t,tone:n}){return e===0?(0,j.jsxDEV)(`span`,{className:`project-row__count is-zero`,"aria-hidden":`true`,children:`·`},void 0,!1,{fileName:ru,lineNumber:155,columnNumber:7},this):(0,j.jsxDEV)(`span`,{className:`project-row__count${n?` is-${n}`:``}`,title:`${e} ${t}`,children:e},void 0,!1,{fileName:ru,lineNumber:161,columnNumber:5},this)}function ou({initial:e,canReset:t,onCommit:n,onCancel:r}){let[i,a]=(0,k.useState)(e),o=(0,k.useRef)(null),s=(0,k.useRef)(!1);(0,k.useEffect)(()=>{o.current?.focus(),o.current?.select()},[]);let c=e=>{s.current||(s.current=!0,n(e))};return(0,j.jsxDEV)(`span`,{className:`project-row__rename`,children:[(0,j.jsxDEV)(`input`,{ref:o,className:`project-row__rename-input`,value:i,"aria-label":`Project name on this machine`,onChange:e=>a(e.target.value),onBlur:()=>c(i.trim().length>0?i.trim():null),onKeyDown:e=>{e.stopPropagation(),e.key===`Enter`&&(e.preventDefault(),c(i.trim().length>0?i.trim():null)),e.key===`Escape`&&(e.preventDefault(),s.current=!0,r())}},void 0,!1,{fileName:ru,lineNumber:203,columnNumber:7},this),t&&(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onMouseDown:e=>{e.preventDefault(),c(null)},children:`Reset`},void 0,!1,{fileName:ru,lineNumber:224,columnNumber:9},this)]},void 0,!0,{fileName:ru,lineNumber:202,columnNumber:5},this)}function su(e){switch(e){case`missing`:return`missing`;case`uninitialized`:return`not initialized`;case`unreadable`:return`unreadable`;default:return``}}var cu=`__ungrouped__`;function lu({projects:e,groups:t,filter:n}){let r=n.trim(),i=r.length>0,a=new Map(t.map(e=>[e.id,e.name])),o=i?uu(e,r,a):e;if(t.length===0){let e={id:cu,name:`Projects`,projects:o,collapsed:!1,synthetic:!0};return{sections:o.length>0?[e]:[],rows:o.map(e=>({kind:`project`,id:e.id,card:e,sectionId:cu})),flat:!0,matched:o.length}}let s=[...t].sort((e,t)=>e.order-t.order).map(e=>({id:e.id,name:e.name,color:e.color,projects:o.filter(t=>t.groupId===e.id),collapsed:!i&&e.collapsed,synthetic:!1})),c=o.filter(e=>!e.groupId||!a.has(e.groupId));c.length>0&&s.push({id:cu,name:`Ungrouped`,projects:c,collapsed:!1,synthetic:!0});let l=s.filter(e=>e.projects.length>0||!i&&!e.synthetic),u=[];for(let e of l)if(u.push({kind:`group`,id:e.id,section:e}),!e.collapsed)for(let t of e.projects)u.push({kind:`project`,id:t.id,card:t,sectionId:e.id});return{sections:l,rows:u,flat:!1,matched:o.length}}function uu(e,t,n){return e.map(e=>({project:e,score:$t([e.name,e.displayName??``,e.manifestName??``,e.directory,e.groupId?n.get(e.groupId)??``:``].join(` `),t)})).filter(e=>e.score!==null).sort((e,t)=>t.score-e.score).map(e=>e.project)}function du(e,t,n){if(e.length===0)return;let r=e.findIndex(e=>e.id===t);return r===-1?e[n===1?0:e.length-1].id:e[Math.min(Math.max(r+n,0),e.length-1)].id}function fu(e,t){let n=e.find(e=>e.id===t);if(n)return n.kind===`group`?n.id:n.sectionId}function pu(e){return e.reduce((e,t)=>({working:e.working+(t.counts?.[`in-progress`]??0)+(t.counts?.planning??0),waiting:e.waiting+(t.attention?.awaitingDecision??0),comments:e.comments+(t.attention?.openReviewComments??0)}),{working:0,waiting:0,comments:0})}var mu=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/hub/ProjectGroupSection.tsx`;function hu({section:e,focused:t,headerless:n,onFocus:r,onToggle:i,onRename:a,onDelete:o,children:s}){if(n)return(0,j.jsxDEV)(`div`,{className:`hub-group__rows`,children:s},void 0,!1,{fileName:mu,lineNumber:36,columnNumber:26},this);let c=pu(e.projects),l=`group-${e.id}`;return(0,j.jsxDEV)(`section`,{className:`hub-group${e.color?` hub-group--${e.color}`:``}${t?` is-focused`:``}`,"data-group-id":e.id,children:[(0,j.jsxDEV)(`div`,{className:`hub-group__head`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`hub-group__toggle`,"aria-expanded":!e.collapsed,"aria-controls":l,onClick:i,onMouseEnter:r,children:[(0,j.jsxDEV)(`svg`,{className:`hub-group__caret${e.collapsed?` is-collapsed`:``}`,viewBox:`0 0 12 12`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M4 2.5 8 6l-4 3.5z`},void 0,!1,{fileName:mu,lineNumber:62,columnNumber:13},this)},void 0,!1,{fileName:mu,lineNumber:57,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`hub-group__name`,children:e.name},void 0,!1,{fileName:mu,lineNumber:64,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`hub-group__count`,children:e.projects.length===0?`empty`:e.projects.length},void 0,!1,{fileName:mu,lineNumber:65,columnNumber:11},this)]},void 0,!0,{fileName:mu,lineNumber:49,columnNumber:9},this),(0,j.jsxDEV)(`span`,{className:`hub-group__totals`,children:[c.working>0&&(0,j.jsxDEV)(`span`,{children:[c.working,` in flight`]},void 0,!0,{fileName:mu,lineNumber:71,columnNumber:34},this),c.waiting>0&&(0,j.jsxDEV)(`span`,{className:`hub-group__waiting`,children:[c.waiting,` awaiting you`]},void 0,!0,{fileName:mu,lineNumber:73,columnNumber:13},this)]},void 0,!0,{fileName:mu,lineNumber:70,columnNumber:9},this),!e.synthetic&&(0,j.jsxDEV)(`span`,{className:`hub-group__actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:a,children:`Rename`},void 0,!1,{fileName:mu,lineNumber:81,columnNumber:13},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`link-button`,onClick:o,children:`Delete`},void 0,!1,{fileName:mu,lineNumber:84,columnNumber:13},this)]},void 0,!0,{fileName:mu,lineNumber:80,columnNumber:11},this)]},void 0,!0,{fileName:mu,lineNumber:48,columnNumber:7},this),(0,j.jsxDEV)(`div`,{className:`hub-group__rows`,id:l,role:`group`,"aria-label":e.name,hidden:e.collapsed,children:e.projects.length===0?(0,j.jsxDEV)(`p`,{className:`hub-group__empty`,children:`No projects — move one here with “Move to…”.`},void 0,!1,{fileName:mu,lineNumber:93,columnNumber:11},this):s},void 0,!1,{fileName:mu,lineNumber:91,columnNumber:7},this)]},void 0,!0,{fileName:mu,lineNumber:42,columnNumber:5},this)}var gu=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/hub/AddProjectModal.tsx`;function _u({busy:e,onClose:t,onSubmit:n,error:r}){let[i,a]=(0,k.useState)(``),o=i.trim();return(0,j.jsxDEV)(jn,{title:`Add project`,onClose:t,children:(0,j.jsxDEV)(`form`,{className:`form`,onSubmit:t=>{t.preventDefault(),o.length>0&&!e&&n(o)},children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Project folder`},void 0,!1,{fileName:gu,lineNumber:34,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,autoFocus:!0,value:i,placeholder:`~/dev/my-project`,spellCheck:!1,onChange:e=>a(e.target.value)},void 0,!1,{fileName:gu,lineNumber:35,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`field__hint`,children:[`The folder holding `,(0,j.jsxDEV)(`code`,{children:`invariant.json`},void 0,!1,{fileName:gu,lineNumber:44,columnNumber:32},this),`. `,(0,j.jsxDEV)(`code`,{children:`~`},void 0,!1,{fileName:gu,lineNumber:44,columnNumber:61},this),` works.`]},void 0,!0,{fileName:gu,lineNumber:43,columnNumber:11},this)]},void 0,!0,{fileName:gu,lineNumber:33,columnNumber:9},this),r!==void 0&&(0,j.jsxDEV)(vu,{error:r},void 0,!1,{fileName:gu,lineNumber:48,columnNumber:33},this),(0,j.jsxDEV)(`div`,{className:`form__actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:t,children:`Cancel`},void 0,!1,{fileName:gu,lineNumber:51,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`submit`,className:`button button--solid`,disabled:e||o.length===0,children:e?`Adding…`:`Add project`},void 0,!1,{fileName:gu,lineNumber:54,columnNumber:11},this)]},void 0,!0,{fileName:gu,lineNumber:50,columnNumber:9},this)]},void 0,!0,{fileName:gu,lineNumber:26,columnNumber:7},this)},void 0,!1,{fileName:gu,lineNumber:25,columnNumber:5},this)}function vu({error:e}){return e instanceof zn&&e.code===`PROJECT_NOT_INITIALIZED`?(0,j.jsxDEV)(`p`,{className:`form__error`,children:[`That folder is not an Invariant project yet. Run `,(0,j.jsxDEV)(`code`,{children:`invariant init`},void 0,!1,{fileName:gu,lineNumber:71,columnNumber:58},this),` there, then add it.`]},void 0,!0,{fileName:gu,lineNumber:70,columnNumber:7},this):e instanceof zn&&e.code===`PROJECT_ALREADY_REGISTERED`?(0,j.jsxDEV)(`p`,{className:`form__error`,children:e.message},void 0,!1,{fileName:gu,lineNumber:76,columnNumber:12},this):e instanceof zn&&e.code===`PROJECT_PATH_MISSING`?(0,j.jsxDEV)(`p`,{className:`form__error`,children:`No such folder. Check the path and try again.`},void 0,!1,{fileName:gu,lineNumber:79,columnNumber:12},this):(0,j.jsxDEV)(`p`,{className:`form__error`,children:e instanceof Error?e.message:`That project could not be added.`},void 0,!1,{fileName:gu,lineNumber:82,columnNumber:5},this)}var yu=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/hub/GroupModal.tsx`;function bu({initial:e,busy:t,error:n,onClose:r,onSubmit:i}){let[a,o]=(0,k.useState)(e?.name??``),[s,c]=(0,k.useState)(e?.color),l=a.trim();return(0,j.jsxDEV)(jn,{title:e?`Rename group`:`New group`,onClose:r,children:(0,j.jsxDEV)(`form`,{className:`form`,onSubmit:e=>{e.preventDefault(),l.length>0&&!t&&i({name:l,color:s})},children:[(0,j.jsxDEV)(`label`,{className:`field`,children:[(0,j.jsxDEV)(`span`,{className:`field__label`,children:`Name`},void 0,!1,{fileName:yu,lineNumber:36,columnNumber:11},this),(0,j.jsxDEV)(`input`,{className:`field__input`,autoFocus:!0,value:a,placeholder:`Work`,maxLength:64,onChange:e=>o(e.target.value)},void 0,!1,{fileName:yu,lineNumber:37,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`field__hint`,children:`Groups live in this machine's project registry — they never reach your colleagues.`},void 0,!1,{fileName:yu,lineNumber:45,columnNumber:11},this)]},void 0,!0,{fileName:yu,lineNumber:35,columnNumber:9},this),(0,j.jsxDEV)(`fieldset`,{className:`config-swatches`,children:[(0,j.jsxDEV)(`legend`,{className:`field__label`,children:`Colour`},void 0,!1,{fileName:yu,lineNumber:51,columnNumber:11},this),Kt.map(e=>(0,j.jsxDEV)(`button`,{type:`button`,className:`config-swatch config-swatch--${e}${s===e?` is-active`:``}`,"aria-label":e,"aria-pressed":s===e,title:e,onClick:()=>c(t=>t===e?void 0:e)},e,!1,{fileName:yu,lineNumber:53,columnNumber:13},this))]},void 0,!0,{fileName:yu,lineNumber:50,columnNumber:9},this),n!==void 0&&(0,j.jsxDEV)(`p`,{className:`form__error`,children:n instanceof zn&&n.code===`PROJECT_GROUP_NAME_TAKEN`||n instanceof Error?n.message:`That group could not be saved.`},void 0,!1,{fileName:yu,lineNumber:68,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`form__actions`,children:[(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:r,children:`Cancel`},void 0,!1,{fileName:yu,lineNumber:78,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`submit`,className:`button button--solid`,disabled:t||l.length===0,children:t?`Saving…`:e?`Rename`:`Create group`},void 0,!1,{fileName:yu,lineNumber:81,columnNumber:11},this)]},void 0,!0,{fileName:yu,lineNumber:77,columnNumber:9},this)]},void 0,!0,{fileName:yu,lineNumber:28,columnNumber:7},this)},void 0,!1,{fileName:yu,lineNumber:27,columnNumber:5},this)}var xu=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/hub/HubPage.tsx`;function Su({onOpenProject:e,onRequestMove:t}){let n=Pn(),{data:r,isLoading:i}=Xr(),{data:a}=$r(),o=ei(),s=ti(),c=ni(),l=ri(),u=ai(),d=ii(),[f,p]=(0,k.useState)(``),[m,h]=(0,k.useState)(!1),[g,_]=(0,k.useState)(),[v,y]=(0,k.useState)(),[b,x]=(0,k.useState)(),[ee,te]=(0,k.useState)(),[ne,S]=(0,k.useState)(),re=(0,k.useMemo)(()=>r?.projects??[],[r]),ie=(0,k.useMemo)(()=>r?.groups??[],[r]),C=(0,k.useMemo)(()=>lu({projects:re,groups:ie,filter:f}),[re,ie,f]),ae=(0,k.useCallback)(t=>e(t),[e]),w=(0,k.useCallback)(async e=>{n(await en(e)?`Path copied`:`Could not copy`,`success`)},[n]),T=(0,k.useCallback)(e=>{let t=ie.find(t=>t.id===e);t&&u.mutate({groupId:e,collapsed:!t.collapsed})},[ie,u]),oe=(0,k.useCallback)((e,t)=>{S(void 0),(t??void 0)!==e.displayName&&c.mutate({projectId:e.id,displayName:t},{onSuccess:()=>n(t?`Renamed to ${t}`:`Back to the manifest name`,`success`),onError:e=>n(e instanceof Error?e.message:`That rename did not work.`,`danger`)})},[n,c]),E=(0,k.useCallback)(e=>{if(t){t(e);return}n(`Press ⌘K, then “Move to group…”.`,`info`)},[t,n]),se=(0,k.useCallback)(e=>{h(!1),o.reset();let t=re.some(t=>t.id!==e.id&&t.name.toLowerCase()===e.name.toLowerCase());if(te(e.id),t){S(e.id),n(`Another project is called “${e.name}” — give this one a name.`,`info`);return}n(`Added ${e.name}`,`success`)},[o,re,n]),ce=m||g!==void 0||v!==void 0||b!==void 0,le=(0,k.useRef)({list:C,focusedId:ee,renamingId:ne,modalOpen:ce});return le.current={list:C,focusedId:ee,renamingId:ne,modalOpen:ce},(0,k.useEffect)(()=>{let e=e=>{let t=e.target;if(t&&(t.tagName===`INPUT`||t.tagName===`TEXTAREA`))return;let{list:n,focusedId:r,renamingId:i,modalOpen:a}=le.current;if(a||i)return;let o=n.rows,s=o.find(e=>e.id===r),c=t=>{e.preventDefault(),te(du(o,r,t))};if(e.key===`j`||e.key===`ArrowDown`)return c(1);if(e.key===`k`||e.key===`ArrowUp`)return c(-1);if(e.key===`/`){e.preventDefault(),document.querySelector(`.filter__input`)?.focus();return}if(e.key===`h`||e.key===`ArrowLeft`){e.preventDefault();let t=fu(o,r);if(!t||t===`__ungrouped__`)return;te(t);let i=n.sections.find(e=>e.id===t);i&&!i.collapsed&&T(t);return}if(e.key===`l`||e.key===`ArrowRight`){e.preventDefault(),s?.kind===`group`&&s.section.collapsed&&T(s.id);return}if(e.key===` `&&s?.kind===`group`){e.preventDefault(),s.section.synthetic||T(s.id);return}if(e.key===`Enter`&&s){if(e.preventDefault(),s.kind===`group`){s.section.synthetic||T(s.id);return}s.card.state===`ok`&&ae(s.card.id);return}if((e.key===`F2`||e.key===`r`)&&s?.kind===`project`){e.preventDefault(),S(s.card.id);return}e.key===`m`&&s?.kind===`project`&&(e.preventDefault(),E(s.card))};return window.addEventListener(`keydown`,e),()=>window.removeEventListener(`keydown`,e)},[ae,E,T]),(0,j.jsxDEV)(`div`,{className:`hub`,children:[(0,j.jsxDEV)(`header`,{className:`hub__head`,children:[(0,j.jsxDEV)(`div`,{className:`hub__identity`,children:[(0,j.jsxDEV)(`h1`,{className:`hub__title`,children:`Projects`},void 0,!1,{fileName:xu,lineNumber:236,columnNumber:11},this),(0,j.jsxDEV)(`p`,{className:`hub__subtitle`,children:re.length===0?`None yet`:`${re.length} project${re.length===1?``:`s`} on this machine`},void 0,!1,{fileName:xu,lineNumber:237,columnNumber:11},this)]},void 0,!0,{fileName:xu,lineNumber:235,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`hub__controls`,children:[(0,j.jsxDEV)(`div`,{className:`filter filter--compact`,children:(0,j.jsxDEV)(`input`,{className:`filter__input`,value:f,placeholder:`Filter… /`,onChange:e=>p(e.target.value),onKeyDown:e=>{e.key===`Escape`&&(p(``),e.currentTarget.blur())},"aria-label":`Filter projects`},void 0,!1,{fileName:xu,lineNumber:246,columnNumber:13},this)},void 0,!1,{fileName:xu,lineNumber:245,columnNumber:11},this),(0,j.jsxDEV)(ko,{surface:`hub`},void 0,!1,{fileName:xu,lineNumber:260,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--ghost`,onClick:()=>_({}),children:`New group`},void 0,!1,{fileName:xu,lineNumber:262,columnNumber:11},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:()=>h(!0),children:`Add project`},void 0,!1,{fileName:xu,lineNumber:269,columnNumber:11},this)]},void 0,!0,{fileName:xu,lineNumber:244,columnNumber:9},this)]},void 0,!0,{fileName:xu,lineNumber:234,columnNumber:7},this),i?(0,j.jsxDEV)(`div`,{className:`page-state`,children:`Loading projects…`},void 0,!1,{fileName:xu,lineNumber:276,columnNumber:9},this):re.length===0&&ie.length===0?(0,j.jsxDEV)(Cu,{registryPath:r?.registryPath,onAdd:()=>h(!0)},void 0,!1,{fileName:xu,lineNumber:278,columnNumber:9},this):C.rows.length===0?(0,j.jsxDEV)(`div`,{className:`page-state`,children:[`No project matches “`,f,`”.`]},void 0,!0,{fileName:xu,lineNumber:280,columnNumber:9},this):(0,j.jsxDEV)(`div`,{className:`hub__list`,role:`list`,children:C.sections.map(e=>(0,j.jsxDEV)(hu,{section:e,headerless:C.flat,focused:e.id===ee,onFocus:()=>te(e.id),onToggle:()=>T(e.id),onRename:()=>_({editing:ie.find(t=>t.id===e.id)}),onDelete:()=>x(ie.find(t=>t.id===e.id)),children:e.projects.map(e=>(0,j.jsxDEV)(iu,{card:e,focused:e.id===ee,renaming:e.id===ne,onFocus:()=>te(e.id),onOpen:()=>ae(e.id),onRename:()=>S(e.id),onCommitRename:t=>oe(e,t),onCancelRename:()=>S(void 0),onMove:()=>E(e),onCopyPath:()=>void w(e.directory),onRemove:()=>y(e),onInitialize:()=>n(`Run \`invariant init\` in ${e.directory}, then reload.`,`info`)},e.id,!1,{fileName:xu,lineNumber:299,columnNumber:17},this))},e.id,!1,{fileName:xu,lineNumber:284,columnNumber:13},this))},void 0,!1,{fileName:xu,lineNumber:282,columnNumber:9},this),a&&(0,j.jsxDEV)(`footer`,{className:`hub__foot`,children:[(0,j.jsxDEV)(`span`,{children:[`invariant ui v`,a.version,` · port `,a.port,` · pid `,a.pid]},void 0,!0,{fileName:xu,lineNumber:324,columnNumber:11},this),(0,j.jsxDEV)(`span`,{className:`hub__registry`,title:a.registryPath,children:a.registryPath},void 0,!1,{fileName:xu,lineNumber:327,columnNumber:11},this)]},void 0,!0,{fileName:xu,lineNumber:323,columnNumber:9},this),m&&(0,j.jsxDEV)(_u,{busy:o.isPending,error:o.error??void 0,onClose:()=>{o.reset(),h(!1)},onSubmit:e=>o.mutate(e,{onSuccess:se})},void 0,!1,{fileName:xu,lineNumber:334,columnNumber:9},this),g&&(0,j.jsxDEV)(bu,{initial:g.editing?{name:g.editing.name,color:g.editing.color}:void 0,busy:l.isPending||u.isPending,error:(g.editing?u.error:l.error)??void 0,onClose:()=>{l.reset(),u.reset(),_(void 0)},onSubmit:({name:e,color:t})=>{let n=g.editing,r=()=>{l.reset(),u.reset(),_(void 0)};if(n){u.mutate({groupId:n.id,name:e,color:t},{onSuccess:r});return}l.mutate({name:e,color:t},{onSuccess:r})}},void 0,!1,{fileName:xu,lineNumber:346,columnNumber:9},this),b&&(0,j.jsxDEV)(wn,{title:`Delete ${b.name}?`,body:`The projects in it stay registered — they move back to Ungrouped.`,confirmLabel:`Delete group`,cancelLabel:`Keep`,onCancel:()=>x(void 0),onConfirm:()=>{let e=b;x(void 0),d.mutate(e.id,{onSuccess:t=>n(t.ungrouped>0?`Deleted ${e.name} — ${t.ungrouped} project${t.ungrouped===1?``:`s`} ungrouped`:`Deleted ${e.name}`,`success`),onError:()=>n(`Could not delete that group.`,`danger`)})}},void 0,!1,{fileName:xu,lineNumber:376,columnNumber:9},this),v&&(0,j.jsxDEV)(wn,{title:`Remove ${v.name}?`,body:`This only removes it from this list. Nothing in ${v.directory} is touched, and adding the path again restores everything.`,confirmLabel:`Remove`,cancelLabel:`Keep`,onCancel:()=>y(void 0),onConfirm:()=>{let e=v;y(void 0),s.mutate(e.id,{onSuccess:()=>n(`Removed ${e.name} from the list`,`success`),onError:()=>n(`Could not remove that project.`,`danger`)})}},void 0,!1,{fileName:xu,lineNumber:402,columnNumber:9},this)]},void 0,!0,{fileName:xu,lineNumber:233,columnNumber:5},this)}function Cu({registryPath:e,onAdd:t}){return(0,j.jsxDEV)(`div`,{className:`empty`,children:[(0,j.jsxDEV)(`h2`,{className:`empty__title`,children:`No projects yet`},void 0,!1,{fileName:xu,lineNumber:426,columnNumber:7},this),(0,j.jsxDEV)(`p`,{className:`empty__text`,children:[`Add the folder of a project you have run `,(0,j.jsxDEV)(`code`,{children:`invariant init`},void 0,!1,{fileName:xu,lineNumber:428,columnNumber:50},this),` in. The UI serves them all from here — one server, one tab, however many repositories you work in.`]},void 0,!0,{fileName:xu,lineNumber:427,columnNumber:7},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`button button--solid`,onClick:t,children:`Add project`},void 0,!1,{fileName:xu,lineNumber:431,columnNumber:7},this),e&&(0,j.jsxDEV)(`p`,{className:`empty__footnote`,children:[`The list lives in `,(0,j.jsxDEV)(`code`,{children:e},void 0,!1,{fileName:xu,lineNumber:434,columnNumber:29},this),`.`]},void 0,!0,{fileName:xu,lineNumber:433,columnNumber:9},this)]},void 0,!0,{fileName:xu,lineNumber:425,columnNumber:5},this)}var wu=`https://www.loom.com`;function Tu(e,t={}){let n=new URLSearchParams({hide_owner:`true`,hide_share:`true`,hide_title:`true`,hideEmbedTopBar:`true`});return t.autoplay&&n.set(`autoplay`,`1`),`${wu}/embed/${encodeURIComponent(e)}?${n.toString()}`}function Eu(e){return`${wu}/share/${encodeURIComponent(e)}`}var Du=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/features/tutorials/TutorialPlayer.tsx`,Ou=320,ku=208;function Au(){let{viewing:e,expand:t,minimise:n,close:r}=wo(),i=(0,k.useId)(),[a,o]=(0,k.useState)({x:0,y:0}),s=(0,k.useRef)(null),c=e?.state===`expanded`,l=e?.session;(0,k.useEffect)(()=>o({x:0,y:0}),[l]),(0,k.useEffect)(()=>{if(!c)return;let e=e=>{e.key===`Escape`&&(e.stopPropagation(),n())};return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[c,n]),(0,k.useEffect)(()=>{let e=document.querySelector(`[data-tutorial-inert]`);if(e)return c?e.setAttribute(`inert`,``):e.removeAttribute(`inert`),()=>e.removeAttribute(`inert`)},[c]);let u=(0,k.useCallback)(e=>{c||e.button!==0||(s.current={pointer:{x:e.clientX,y:e.clientY},offset:a},e.currentTarget.setPointerCapture(e.pointerId))},[c,a]),d=(0,k.useCallback)(e=>{let t=s.current;if(!t)return;let n=Math.max(0,window.innerWidth-Ou-40),r=Math.max(0,window.innerHeight-ku-40);o({x:ju(t.offset.x+(e.clientX-t.pointer.x),-n,0),y:ju(t.offset.y+(e.clientY-t.pointer.y),-r,0)})},[]),f=(0,k.useCallback)(e=>{s.current&&(s.current=null,e.currentTarget.hasPointerCapture(e.pointerId)&&e.currentTarget.releasePointerCapture(e.pointerId))},[]);if(!e)return null;let p=oo[e.key],m=p.loomId;return m?(0,j.jsxDEV)(j.Fragment,{children:[c&&(0,j.jsxDEV)(`div`,{className:`tutorial__backdrop`,onMouseDown:n},void 0,!1,{fileName:Du,lineNumber:110,columnNumber:20},this),(0,j.jsxDEV)(`div`,{className:`tutorial tutorial--${e.state}`,style:c?void 0:{transform:`translate(${a.x}px, ${a.y}px)`},role:c?`dialog`:`region`,"aria-modal":c?!0:void 0,"aria-labelledby":i,children:[(0,j.jsxDEV)(`header`,{className:`tutorial__head`,onPointerDown:u,onPointerMove:d,onPointerUp:f,onPointerCancel:f,children:[(0,j.jsxDEV)(`div`,{className:`tutorial__identity`,children:[(0,j.jsxDEV)(`h2`,{className:`tutorial__title`,id:i,children:[p.title,` — intro`]},void 0,!0,{fileName:Du,lineNumber:127,columnNumber:13},this),c&&(0,j.jsxDEV)(`p`,{className:`tutorial__summary`,children:p.summary},void 0,!1,{fileName:Du,lineNumber:130,columnNumber:26},this)]},void 0,!0,{fileName:Du,lineNumber:126,columnNumber:11},this),(0,j.jsxDEV)(`div`,{className:`tutorial__controls`,children:[(0,j.jsxDEV)(`a`,{className:`tutorial__link`,href:Eu(m),target:`_blank`,rel:`noreferrer noopener`,title:`Open on Loom`,children:`Loom ↗`},void 0,!1,{fileName:Du,lineNumber:137,columnNumber:13},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`icon-button`,onClick:c?n:t,title:c?`Minimise — keeps playing beside the app`:`Expand`,"aria-label":c?`Minimise the intro`:`Expand the intro`,children:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 14 14`,"aria-hidden":`true`,children:c?(0,j.jsxDEV)(`path`,{d:`M2.5 8.5h3v3M11.5 5.5h-3v-3`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`},void 0,!1,{fileName:Du,lineNumber:156,columnNumber:19},this):(0,j.jsxDEV)(`path`,{d:`M5.5 2.5h-3v3M8.5 11.5h3v-3`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`,strokeLinejoin:`round`,fill:`none`},void 0,!1,{fileName:Du,lineNumber:158,columnNumber:19},this)},void 0,!1,{fileName:Du,lineNumber:154,columnNumber:15},this)},void 0,!1,{fileName:Du,lineNumber:147,columnNumber:13},this),(0,j.jsxDEV)(`button`,{type:`button`,className:`icon-button`,onClick:r,title:`Close the intro`,"aria-label":`Close the intro`,children:(0,j.jsxDEV)(`svg`,{viewBox:`0 0 14 14`,"aria-hidden":`true`,children:(0,j.jsxDEV)(`path`,{d:`M3.5 3.5l7 7M10.5 3.5l-7 7`,stroke:`currentColor`,strokeWidth:`1.5`,strokeLinecap:`round`},void 0,!1,{fileName:Du,lineNumber:171,columnNumber:17},this)},void 0,!1,{fileName:Du,lineNumber:170,columnNumber:15},this)},void 0,!1,{fileName:Du,lineNumber:163,columnNumber:13},this)]},void 0,!0,{fileName:Du,lineNumber:133,columnNumber:11},this)]},void 0,!0,{fileName:Du,lineNumber:119,columnNumber:9},this),(0,j.jsxDEV)(`div`,{className:`tutorial__frame`,children:(0,j.jsxDEV)(`iframe`,{className:`tutorial__iframe`,src:Tu(m,{autoplay:!0}),title:`${p.title} intro video`,allow:`fullscreen; picture-in-picture; autoplay`,allowFullScreen:!0,referrerPolicy:`strict-origin-when-cross-origin`},e.session,!1,{fileName:Du,lineNumber:178,columnNumber:11},this)},void 0,!1,{fileName:Du,lineNumber:177,columnNumber:9},this)]},void 0,!0,{fileName:Du,lineNumber:112,columnNumber:7},this)]},void 0,!0,{fileName:Du,lineNumber:109,columnNumber:5},this):null}function ju(e,t,n){return Math.min(Math.max(e,t),n)}var Mu=/^\/p\/([^/]+)(\/.*)?$/;function Nu(e){return e.name!==`hub`&&e.name!==`not-found`}function Pu(e){if(e===`/`||e===``||e===`/projects`)return{name:`hub`};let t=e.match(Mu);if(!t)return{name:`not-found`,path:e};let n=decodeURIComponent(t[1]),r=t[2]??`/`;if(r===`/`||r===`/sessions`)return{name:`sessions`,projectId:n};let i=r.match(/^\/sessions\/([^/]+)$/);if(i)return{name:`session`,projectId:n,sessionId:decodeURIComponent(i[1])};if(r===`/reviews`)return{name:`reviews`,projectId:n};let a=r.match(/^\/reviews\/([^/]+)$/);if(a)return{name:`review`,projectId:n,slug:decodeURIComponent(a[1])};if(r===`/packages`)return{name:`packages`,projectId:n};if(r===`/packages/skills`)return{name:`skills`,projectId:n};if(r===`/settings`)return{name:`settings`,projectId:n};let o=r.match(/^\/settings\/([^/]+)$/);return o?{name:`settings`,projectId:n,section:decodeURIComponent(o[1])}:{name:`not-found`,path:e}}function Fu(e){if(e.name===`hub`||e.name===`not-found`)return`/`;let t=`/p/${encodeURIComponent(e.projectId)}`;switch(e.name){case`sessions`:return`${t}/sessions`;case`session`:return`${t}/sessions/${encodeURIComponent(e.sessionId)}`;case`reviews`:return`${t}/reviews`;case`review`:return`${t}/reviews/${encodeURIComponent(e.slug)}`;case`packages`:return`${t}/packages`;case`skills`:return`${t}/packages/skills`;case`settings`:return e.section?`${t}/settings/${encodeURIComponent(e.section)}`:`${t}/settings`;default:return`/`}}function Iu(e,t){if(e.startsWith(`/p/`))return;let n=Pu(`/p/${encodeURIComponent(t)}${e}`);return n.name===`not-found`?void 0:n}function Lu(){let[e,t]=(0,k.useState)(()=>Pu(window.location.pathname));return(0,k.useEffect)(()=>{let e=()=>t(Pu(window.location.pathname));return window.addEventListener(`popstate`,e),()=>window.removeEventListener(`popstate`,e)},[]),{route:e,navigate:(0,k.useCallback)(e=>{let n=Fu(e);n!==window.location.pathname&&window.history.pushState({},``,n),t(e)},[]),back:(0,k.useCallback)(()=>window.history.back(),[])}}var Ru=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/App.tsx`;function zu(){let{route:e,navigate:t}=Lu(),{data:n}=Xr({poll:e.name===`hub`}),r=si(),i=(0,k.useMemo)(()=>n?.projects??[],[n]),a=(0,k.useMemo)(()=>n?.groups??[],[n]),o=Nu(e)?e.projectId:void 0,s=i.find(e=>e.id===o),c=(0,k.useRef)(void 0);(0,k.useEffect)(()=>{o&&c.current!==o&&(r(o,c.current),c.current=o),o||(c.current=void 0)},[o,r]);let l=(0,k.useCallback)(e=>t({name:`sessions`,projectId:e}),[t]);(0,k.useEffect)(()=>{if(e.name!==`not-found`||!n)return;let r=n.lastActiveProjectId??i[0]?.id;if(!r)return;let a=Iu(e.path,r);a&&(window.history.replaceState({},``,Fu(a)),t(a))},[e,n,i,t]);let[u,d]=(0,k.useState)(),f=Bu(),p=(0,k.useCallback)(e=>{e!==o&&l(e)},[o,l]);if((0,k.useEffect)(()=>{if(Nu(e))return;let t=e=>{(e.metaKey||e.ctrlKey)&&(e.key.toLowerCase()===`p`||e.key.toLowerCase()===`k`)&&(e.preventDefault(),d(`projects`))};return window.addEventListener(`keydown`,t),()=>window.removeEventListener(`keydown`,t)},[e]),Nu(e))return(0,j.jsxDEV)(Do,{activeKey:lo(e),children:[(0,j.jsxDEV)(qn,{projectId:e.projectId,card:s,children:(0,j.jsxDEV)(Zl,{projectId:e.projectId,route:e,navigate:t,projects:i,groups:a,card:s,onOpenHub:()=>t({name:`hub`}),onSwitchProject:p},e.projectId,!1,{fileName:Ru,lineNumber:102,columnNumber:11},this)},e.projectId,!1,{fileName:Ru,lineNumber:101,columnNumber:9},this),(0,j.jsxDEV)(Au,{},void 0,!1,{fileName:Ru,lineNumber:114,columnNumber:9},this)]},void 0,!0,{fileName:Ru,lineNumber:100,columnNumber:7},this);let m=[...Jl({projects:i,groups:a,currentProjectId:o,onSwitch:p}),...f.card?Xl({groups:a,card:f.card,onPick:f.pick,onCreate:f.startCreate}):[]];return(0,j.jsxDEV)(Do,{activeKey:lo(e),children:[(0,j.jsxDEV)(`div`,{className:`app app--hub`,"data-tutorial-inert":!0,children:[(0,j.jsxDEV)(`main`,{className:`main`,children:(0,j.jsxDEV)(Su,{onOpenProject:l,onRequestMove:e=>{f.start(e),d(`groups`)}},void 0,!1,{fileName:Ru,lineNumber:143,columnNumber:11},this)},void 0,!1,{fileName:Ru,lineNumber:142,columnNumber:9},this),u&&(0,j.jsxDEV)(Ul,{actions:m,initialScope:u,onClose:()=>{d(void 0),f.cancel()}},void 0,!1,{fileName:Ru,lineNumber:153,columnNumber:11},this),f.creating&&(0,j.jsxDEV)(bu,{busy:f.busy,error:f.error,onClose:f.cancel,onSubmit:f.createAndFile},void 0,!1,{fileName:Ru,lineNumber:164,columnNumber:11},this)]},void 0,!0,{fileName:Ru,lineNumber:141,columnNumber:7},this),(0,j.jsxDEV)(Au,{},void 0,!1,{fileName:Ru,lineNumber:173,columnNumber:7},this)]},void 0,!0,{fileName:Ru,lineNumber:137,columnNumber:5},this)}function Bu(){let e=Pn(),t=ni(),n=ri(),[r,i]=(0,k.useState)(),[a,o]=(0,k.useState)(!1),s=(0,k.useCallback)((n,r,i)=>{t.mutate({projectId:n.id,groupId:r},{onSuccess:()=>e(r?`${n.name} → ${i}`:`${n.name} is no longer in a group`,`success`),onError:t=>e(t instanceof Error?t.message:`That move did not work.`,`danger`)})},[e,t]),c=(0,k.useCallback)(()=>{o(!1),i(void 0),n.reset()},[n]);return{card:r,creating:a,busy:n.isPending||t.isPending,error:n.error??void 0,start:e=>{o(!1),i(e)},startCreate:()=>o(!0),cancel:c,pick:e=>{r&&s(r,e?.id??null,e?.name??``),i(void 0)},createAndFile:({name:e,color:t})=>{let i=r;n.mutate({name:e,color:t},{onSuccess:e=>{i&&s(i,e.id,e.name),c()}})}}}var Vu=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/lib/ThemeProvider.tsx`;function Hu({children:e}){let t=A(),{data:n}=Zr(),r=n?.appearance.theme;return(0,k.useEffect)(()=>{Dc(r)&&Ac(r)},[r]),(0,k.useEffect)(()=>{let e=e=>{if(e.key!==`invariant.theme`)return;let n=e.newValue??kc();Dc(n)&&(Ac(n),t.invalidateQueries({queryKey:Xn.preferences}))};return window.addEventListener(`storage`,e),()=>window.removeEventListener(`storage`,e)},[t]),(0,j.jsxDEV)(j.Fragment,{children:e},void 0,!1,{fileName:Vu,lineNumber:46,columnNumber:10},this)}var Uu=`/Users/yann/dev/invariant-guru/invariant-cli/apps/cli/ui/src/main.tsx`,Wu=new Ze({defaultOptions:{queries:{refetchOnWindowFocus:!1,retry:1,staleTime:5e3}}});(0,vt.createRoot)(document.getElementById(`root`)).render((0,j.jsxDEV)(k.StrictMode,{children:(0,j.jsxDEV)(nt,{client:Wu,children:(0,j.jsxDEV)(Hu,{children:(0,j.jsxDEV)(In,{children:(0,j.jsxDEV)(zu,{},void 0,!1,{fileName:Uu,lineNumber:33,columnNumber:11},void 0)},void 0,!1,{fileName:Uu,lineNumber:32,columnNumber:9},void 0)},void 0,!1,{fileName:Uu,lineNumber:31,columnNumber:7},void 0)},void 0,!1,{fileName:Uu,lineNumber:30,columnNumber:5},void 0)},void 0,!1,{fileName:Uu,lineNumber:29,columnNumber:3},void 0));export{Ni as a,o as c,Yi as i,s as l,jc as n,St as o,Xi as r,d as s,Oc as t,l as u};
|