@c4a/server-cli 0.4.12-alpha.3 → 0.4.12-beta.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/index.js +3123 -888
  2. package/package.json +2 -1
  3. package/serve.js +4406 -1468
  4. package/web/assets/index-B1KeXpYL.css +1 -0
  5. package/web/assets/index-B1zrTc3w.js +12 -0
  6. package/web/assets/index-B6uGMtfP.css +1 -0
  7. package/web/assets/index-BCzQnf3x.css +1 -0
  8. package/web/assets/index-BMVKFQ7h.js +238 -0
  9. package/web/assets/index-BRwgHwhm.js +12 -0
  10. package/web/assets/index-BXaK4HKi.js +12 -0
  11. package/web/assets/index-BaBWjAP7.css +1 -0
  12. package/web/assets/index-Be3yvSxB.js +12 -0
  13. package/web/assets/index-Bh0nrxkS.css +1 -0
  14. package/web/assets/index-BjM7CFih.js +12 -0
  15. package/web/assets/index-ByCT34eF.css +1 -0
  16. package/web/assets/index-C6uqUNjs.js +238 -0
  17. package/web/assets/index-CU-x3HVJ.js +12 -0
  18. package/web/assets/index-CVcqJsfJ.js +12 -0
  19. package/web/assets/index-Cs1wjzzB.css +1 -0
  20. package/web/assets/index-D0FYwi5D.css +1 -0
  21. package/web/assets/index-D9pKIRoL.js +12 -0
  22. package/web/assets/index-DHMM5gmZ.js +12 -0
  23. package/web/assets/index-DMIK6qP9.js +12 -0
  24. package/web/assets/index-DW-afpe4.js +12 -0
  25. package/web/assets/index-DaUMALOp.css +1 -0
  26. package/web/assets/index-DfXQnmId.js +12 -0
  27. package/web/assets/index-DisDw0E0.css +1 -0
  28. package/web/assets/index-Dm-_KwmC.css +1 -0
  29. package/web/assets/index-DmRvWfJA.js +12 -0
  30. package/web/assets/index-Drfhm6bu.js +12 -0
  31. package/web/assets/index-DvnO8hAI.js +12 -0
  32. package/web/assets/index-JdgClnFG.css +1 -0
  33. package/web/assets/index-P648JtKx.js +12 -0
  34. package/web/assets/index-ZtrM6iGG.js +12 -0
  35. package/web/index.html +2 -2
@@ -0,0 +1,238 @@
1
+ function xR(n,o){for(var l=0;l<o.length;l++){const c=o[l];if(typeof c!="string"&&!Array.isArray(c)){for(const u in c)if(u!=="default"&&!(u in n)){const d=Object.getOwnPropertyDescriptor(c,u);d&&Object.defineProperty(n,u,d.get?d:{enumerable:!0,get:()=>c[u]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const u of document.querySelectorAll('link[rel="modulepreload"]'))c(u);new MutationObserver(u=>{for(const d of u)if(d.type==="childList")for(const p of d.addedNodes)p.tagName==="LINK"&&p.rel==="modulepreload"&&c(p)}).observe(document,{childList:!0,subtree:!0});function l(u){const d={};return u.integrity&&(d.integrity=u.integrity),u.referrerPolicy&&(d.referrerPolicy=u.referrerPolicy),u.crossOrigin==="use-credentials"?d.credentials="include":u.crossOrigin==="anonymous"?d.credentials="omit":d.credentials="same-origin",d}function c(u){if(u.ep)return;u.ep=!0;const d=l(u);fetch(u.href,d)}})();function vR(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var Ab={exports:{}},Vf={},Vb={exports:{}},nu={exports:{}};nu.exports;var K1;function NR(){return K1||(K1=1,(function(n,o){(function(){function l(w,A){Object.defineProperty(d.prototype,w,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",A[0],A[1])}})}function c(w){return w===null||typeof w!="object"?null:(w=ot&&w[ot]||w["@@iterator"],typeof w=="function"?w:null)}function u(w,A){w=(w=w.constructor)&&(w.displayName||w.name)||"ReactClass";var O=w+"."+A;ct[O]||(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.",A,w),ct[O]=!0)}function d(w,A,O){this.props=w,this.context=A,this.refs=Xe,this.updater=O||jt}function p(){}function b(w,A,O){this.props=w,this.context=A,this.refs=Xe,this.updater=O||jt}function g(){}function y(w){return""+w}function E(w){try{y(w);var A=!1}catch{A=!0}if(A){A=console;var O=A.error,B=typeof Symbol=="function"&&Symbol.toStringTag&&w[Symbol.toStringTag]||w.constructor.name||"Object";return O.call(A,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",B),y(w)}}function x(w){if(w==null)return null;if(typeof w=="function")return w.$$typeof===ds?null:w.displayName||w.name||null;if(typeof w=="string")return w;switch(w){case P:return"Fragment";case Re:return"Profiler";case fe:return"StrictMode";case Je:return"Suspense";case yt:return"SuspenseList";case ye:return"Activity"}if(typeof w=="object")switch(typeof w.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),w.$$typeof){case Te:return"Portal";case lt:return w.displayName||"Context";case we:return(w._context.displayName||"Context")+".Consumer";case Ut:var A=w.render;return w=w.displayName,w||(w=A.displayName||A.name||"",w=w!==""?"ForwardRef("+w+")":"ForwardRef"),w;case Ct:return A=w.displayName||null,A!==null?A:x(w.type)||"Memo";case ra:A=w._payload,w=w._init;try{return x(w(A))}catch{}}return null}function S(w){if(w===P)return"<>";if(typeof w=="object"&&w!==null&&w.$$typeof===ra)return"<...>";try{var A=x(w);return A?"<"+A+">":"<...>"}catch{return"<...>"}}function _(){var w=Ee.A;return w===null?null:w.getOwner()}function R(){return Error("react-stack-top-frame")}function z(w){if(qa.call(w,"key")){var A=Object.getOwnPropertyDescriptor(w,"key").get;if(A&&A.isReactWarning)return!1}return w.key!==void 0}function H(w,A){function O(){Wt||(Wt=!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)",A))}O.isReactWarning=!0,Object.defineProperty(w,"key",{get:O,configurable:!0})}function Y(){var w=x(this.type);return Sa[w]||(Sa[w]=!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.")),w=this.props.ref,w!==void 0?w:null}function K(w,A,O,B,oe,Ne){var le=O.ref;return w={$$typeof:he,type:w,key:A,props:O,_owner:B},(le!==void 0?le:null)!==null?Object.defineProperty(w,"ref",{enumerable:!1,get:Y}):Object.defineProperty(w,"ref",{enumerable:!1,value:null}),w._store={},Object.defineProperty(w._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(w,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(w,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:oe}),Object.defineProperty(w,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ne}),Object.freeze&&(Object.freeze(w.props),Object.freeze(w)),w}function Z(w,A){return A=K(w.type,A,w.props,w._owner,w._debugStack,w._debugTask),w._store&&(A._store.validated=w._store.validated),A}function J(w){ee(w)?w._store&&(w._store.validated=1):typeof w=="object"&&w!==null&&w.$$typeof===ra&&(w._payload.status==="fulfilled"?ee(w._payload.value)&&w._payload.value._store&&(w._payload.value._store.validated=1):w._store&&(w._store.validated=1))}function ee(w){return typeof w=="object"&&w!==null&&w.$$typeof===he}function ce(w){var A={"=":"=0",":":"=2"};return"$"+w.replace(/[=:]/g,function(O){return A[O]})}function de(w,A){return typeof w=="object"&&w!==null&&w.key!=null?(E(w.key),ce(""+w.key)):A.toString(36)}function k(w){switch(w.status){case"fulfilled":return w.value;case"rejected":throw w.reason;default:switch(typeof w.status=="string"?w.then(g,g):(w.status="pending",w.then(function(A){w.status==="pending"&&(w.status="fulfilled",w.value=A)},function(A){w.status==="pending"&&(w.status="rejected",w.reason=A)})),w.status){case"fulfilled":return w.value;case"rejected":throw w.reason}}throw w}function G(w,A,O,B,oe){var Ne=typeof w;(Ne==="undefined"||Ne==="boolean")&&(w=null);var le=!1;if(w===null)le=!0;else switch(Ne){case"bigint":case"string":case"number":le=!0;break;case"object":switch(w.$$typeof){case he:case Te:le=!0;break;case ra:return le=w._init,G(le(w._payload),A,O,B,oe)}}if(le){le=w,oe=oe(le);var $e=B===""?"."+de(le,0):B;return ba(oe)?(O="",$e!=null&&(O=$e.replace(Ht,"$&/")+"/"),G(oe,A,O,"",function(Dt){return Dt})):oe!=null&&(ee(oe)&&(oe.key!=null&&(le&&le.key===oe.key||E(oe.key)),O=Z(oe,O+(oe.key==null||le&&le.key===oe.key?"":(""+oe.key).replace(Ht,"$&/")+"/")+$e),B!==""&&le!=null&&ee(le)&&le.key==null&&le._store&&!le._store.validated&&(O._store.validated=2),oe=O),A.push(oe)),1}if(le=0,$e=B===""?".":B+":",ba(w))for(var Me=0;Me<w.length;Me++)B=w[Me],Ne=$e+de(B,Me),le+=G(B,A,O,Ne,oe);else if(Me=c(w),typeof Me=="function")for(Me===w.entries&&(tt||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),tt=!0),w=Me.call(w),Me=0;!(B=w.next()).done;)B=B.value,Ne=$e+de(B,Me++),le+=G(B,A,O,Ne,oe);else if(Ne==="object"){if(typeof w.then=="function")return G(k(w),A,O,B,oe);throw A=String(w),Error("Objects are not valid as a React child (found: "+(A==="[object Object]"?"object with keys {"+Object.keys(w).join(", ")+"}":A)+"). If you meant to render a collection of children, use an array instead.")}return le}function I(w,A,O){if(w==null)return w;var B=[],oe=0;return G(w,B,"","",function(Ne){return A.call(O,Ne,oe++)}),B}function be(w){if(w._status===-1){var A=w._ioInfo;A!=null&&(A.start=A.end=performance.now()),A=w._result;var O=A();if(O.then(function(oe){if(w._status===0||w._status===-1){w._status=1,w._result=oe;var Ne=w._ioInfo;Ne!=null&&(Ne.end=performance.now()),O.status===void 0&&(O.status="fulfilled",O.value=oe)}},function(oe){if(w._status===0||w._status===-1){w._status=2,w._result=oe;var Ne=w._ioInfo;Ne!=null&&(Ne.end=performance.now()),O.status===void 0&&(O.status="rejected",O.reason=oe)}}),A=w._ioInfo,A!=null){A.value=O;var B=O.displayName;typeof B=="string"&&(A.name=B)}w._status===-1&&(w._status=0,w._result=O)}if(w._status===1)return A=w._result,A===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?`,A),"default"in A||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'))`,A),A.default;throw w._result}function se(){var w=Ee.H;return w===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.`),w}function ae(){Ee.asyncTransitions--}function pe(w){if(ga===null)try{var A=("require"+Math.random()).slice(0,7);ga=(n&&n[A]).call(n,"timers").setImmediate}catch{ga=function(B){ta===!1&&(ta=!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 oe=new MessageChannel;oe.port1.onmessage=B,oe.port2.postMessage(void 0)}}return ga(w)}function De(w){return 1<w.length&&typeof AggregateError=="function"?new AggregateError(w):w[0]}function te(w,A){A!==wa-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. "),wa=A}function ue(w,A,O){var B=Ee.actQueue;if(B!==null)if(B.length!==0)try{ne(B),pe(function(){return ue(w,A,O)});return}catch(oe){Ee.thrownErrors.push(oe)}else Ee.actQueue=null;0<Ee.thrownErrors.length?(B=De(Ee.thrownErrors),Ee.thrownErrors.length=0,O(B)):A(w)}function ne(w){if(!ia){ia=!0;var A=0;try{for(;A<w.length;A++){var O=w[A];do{Ee.didUsePromise=!1;var B=O(!1);if(B!==null){if(Ee.didUsePromise){w[A]=O,w.splice(0,A);return}O=B}else break}while(!0)}w.length=0}catch(oe){w.splice(0,A+1),Ee.thrownErrors.push(oe)}finally{ia=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var he=Symbol.for("react.transitional.element"),Te=Symbol.for("react.portal"),P=Symbol.for("react.fragment"),fe=Symbol.for("react.strict_mode"),Re=Symbol.for("react.profiler"),we=Symbol.for("react.consumer"),lt=Symbol.for("react.context"),Ut=Symbol.for("react.forward_ref"),Je=Symbol.for("react.suspense"),yt=Symbol.for("react.suspense_list"),Ct=Symbol.for("react.memo"),ra=Symbol.for("react.lazy"),ye=Symbol.for("react.activity"),ot=Symbol.iterator,ct={},jt={isMounted:function(){return!1},enqueueForceUpdate:function(w){u(w,"forceUpdate")},enqueueReplaceState:function(w){u(w,"replaceState")},enqueueSetState:function(w){u(w,"setState")}},qt=Object.assign,Xe={};Object.freeze(Xe),d.prototype.isReactComponent={},d.prototype.setState=function(w,A){if(typeof w!="object"&&typeof w!="function"&&w!=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,w,A,"setState")},d.prototype.forceUpdate=function(w){this.updater.enqueueForceUpdate(this,w,"forceUpdate")};var xt={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(ke in xt)xt.hasOwnProperty(ke)&&l(ke,xt[ke]);p.prototype=d.prototype,xt=b.prototype=new p,xt.constructor=b,qt(xt,d.prototype),xt.isPureReactComponent=!0;var ba=Array.isArray,ds=Symbol.for("react.client.reference"),Ee={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},qa=Object.prototype.hasOwnProperty,Gt=console.createTask?console.createTask:function(){return null};xt={react_stack_bottom_frame:function(w){return w()}};var Wt,ea,Sa={},_e=xt.react_stack_bottom_frame.bind(xt,R)(),Pe=Gt(S(R)),tt=!1,Ht=/\/+/g,$t=typeof reportError=="function"?reportError:function(w){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var A=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof w=="object"&&w!==null&&typeof w.message=="string"?String(w.message):String(w),error:w});if(!window.dispatchEvent(A))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",w);return}console.error(w)},ta=!1,ga=null,wa=0,ja=!1,ia=!1,fs=typeof queueMicrotask=="function"?function(w){queueMicrotask(function(){return queueMicrotask(w)})}:pe;xt=Object.freeze({__proto__:null,c:function(w){return se().useMemoCache(w)}});var ke={map:I,forEach:function(w,A,O){I(w,function(){A.apply(this,arguments)},O)},count:function(w){var A=0;return I(w,function(){A++}),A},toArray:function(w){return I(w,function(A){return A})||[]},only:function(w){if(!ee(w))throw Error("React.Children.only expected to receive a single React element child.");return w}};o.Activity=ye,o.Children=ke,o.Component=d,o.Fragment=P,o.Profiler=Re,o.PureComponent=b,o.StrictMode=fe,o.Suspense=Je,o.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=Ee,o.__COMPILER_RUNTIME=xt,o.act=function(w){var A=Ee.actQueue,O=wa;wa++;var B=Ee.actQueue=A!==null?A:[],oe=!1;try{var Ne=w()}catch(Me){Ee.thrownErrors.push(Me)}if(0<Ee.thrownErrors.length)throw te(A,O),w=De(Ee.thrownErrors),Ee.thrownErrors.length=0,w;if(Ne!==null&&typeof Ne=="object"&&typeof Ne.then=="function"){var le=Ne;return fs(function(){oe||ja||(ja=!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(Me,Dt){oe=!0,le.then(function(ya){if(te(A,O),O===0){try{ne(B),pe(function(){return ue(ya,Me,Dt)})}catch(Ts){Ee.thrownErrors.push(Ts)}if(0<Ee.thrownErrors.length){var js=De(Ee.thrownErrors);Ee.thrownErrors.length=0,Dt(js)}}else Me(ya)},function(ya){te(A,O),0<Ee.thrownErrors.length&&(ya=De(Ee.thrownErrors),Ee.thrownErrors.length=0),Dt(ya)})}}}var $e=Ne;if(te(A,O),O===0&&(ne(B),B.length!==0&&fs(function(){oe||ja||(ja=!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(() => ...)"))}),Ee.actQueue=null),0<Ee.thrownErrors.length)throw w=De(Ee.thrownErrors),Ee.thrownErrors.length=0,w;return{then:function(Me,Dt){oe=!0,O===0?(Ee.actQueue=B,pe(function(){return ue($e,Me,Dt)})):Me($e)}}},o.cache=function(w){return function(){return w.apply(null,arguments)}},o.cacheSignal=function(){return null},o.captureOwnerStack=function(){var w=Ee.getCurrentStack;return w===null?null:w()},o.cloneElement=function(w,A,O){if(w==null)throw Error("The argument must be a React element, but you passed "+w+".");var B=qt({},w.props),oe=w.key,Ne=w._owner;if(A!=null){var le;e:{if(qa.call(A,"ref")&&(le=Object.getOwnPropertyDescriptor(A,"ref").get)&&le.isReactWarning){le=!1;break e}le=A.ref!==void 0}le&&(Ne=_()),z(A)&&(E(A.key),oe=""+A.key);for($e in A)!qa.call(A,$e)||$e==="key"||$e==="__self"||$e==="__source"||$e==="ref"&&A.ref===void 0||(B[$e]=A[$e])}var $e=arguments.length-2;if($e===1)B.children=O;else if(1<$e){le=Array($e);for(var Me=0;Me<$e;Me++)le[Me]=arguments[Me+2];B.children=le}for(B=K(w.type,oe,B,Ne,w._debugStack,w._debugTask),oe=2;oe<arguments.length;oe++)J(arguments[oe]);return B},o.createContext=function(w){return w={$$typeof:lt,_currentValue:w,_currentValue2:w,_threadCount:0,Provider:null,Consumer:null},w.Provider=w,w.Consumer={$$typeof:we,_context:w},w._currentRenderer=null,w._currentRenderer2=null,w},o.createElement=function(w,A,O){for(var B=2;B<arguments.length;B++)J(arguments[B]);B={};var oe=null;if(A!=null)for(Me in ea||!("__self"in A)||"key"in A||(ea=!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")),z(A)&&(E(A.key),oe=""+A.key),A)qa.call(A,Me)&&Me!=="key"&&Me!=="__self"&&Me!=="__source"&&(B[Me]=A[Me]);var Ne=arguments.length-2;if(Ne===1)B.children=O;else if(1<Ne){for(var le=Array(Ne),$e=0;$e<Ne;$e++)le[$e]=arguments[$e+2];Object.freeze&&Object.freeze(le),B.children=le}if(w&&w.defaultProps)for(Me in Ne=w.defaultProps,Ne)B[Me]===void 0&&(B[Me]=Ne[Me]);oe&&H(B,typeof w=="function"?w.displayName||w.name||"Unknown":w);var Me=1e4>Ee.recentlyCreatedOwnerStacks++;return K(w,oe,B,_(),Me?Error("react-stack-top-frame"):_e,Me?Gt(S(w)):Pe)},o.createRef=function(){var w={current:null};return Object.seal(w),w},o.forwardRef=function(w){w!=null&&w.$$typeof===Ct?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof w!="function"?console.error("forwardRef requires a render function but was given %s.",w===null?"null":typeof w):w.length!==0&&w.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",w.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),w!=null&&w.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var A={$$typeof:Ut,render:w},O;return Object.defineProperty(A,"displayName",{enumerable:!1,configurable:!0,get:function(){return O},set:function(B){O=B,w.name||w.displayName||(Object.defineProperty(w,"name",{value:B}),w.displayName=B)}}),A},o.isValidElement=ee,o.lazy=function(w){w={_status:-1,_result:w};var A={$$typeof:ra,_payload:w,_init:be},O={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return w._ioInfo=O,A._debugInfo=[{awaited:O}],A},o.memo=function(w,A){w==null&&console.error("memo: The first argument must be a component. Instead received: %s",w===null?"null":typeof w),A={$$typeof:Ct,type:w,compare:A===void 0?null:A};var O;return Object.defineProperty(A,"displayName",{enumerable:!1,configurable:!0,get:function(){return O},set:function(B){O=B,w.name||w.displayName||(Object.defineProperty(w,"name",{value:B}),w.displayName=B)}}),A},o.startTransition=function(w){var A=Ee.T,O={};O._updatedFibers=new Set,Ee.T=O;try{var B=w(),oe=Ee.S;oe!==null&&oe(O,B),typeof B=="object"&&B!==null&&typeof B.then=="function"&&(Ee.asyncTransitions++,B.then(ae,ae),B.then(g,$t))}catch(Ne){$t(Ne)}finally{A===null&&O._updatedFibers&&(w=O._updatedFibers.size,O._updatedFibers.clear(),10<w&&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.")),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),Ee.T=A}},o.unstable_useCacheRefresh=function(){return se().useCacheRefresh()},o.use=function(w){return se().use(w)},o.useActionState=function(w,A,O){return se().useActionState(w,A,O)},o.useCallback=function(w,A){return se().useCallback(w,A)},o.useContext=function(w){var A=se();return w.$$typeof===we&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),A.useContext(w)},o.useDebugValue=function(w,A){return se().useDebugValue(w,A)},o.useDeferredValue=function(w,A){return se().useDeferredValue(w,A)},o.useEffect=function(w,A){return w==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),se().useEffect(w,A)},o.useEffectEvent=function(w){return se().useEffectEvent(w)},o.useId=function(){return se().useId()},o.useImperativeHandle=function(w,A,O){return se().useImperativeHandle(w,A,O)},o.useInsertionEffect=function(w,A){return w==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),se().useInsertionEffect(w,A)},o.useLayoutEffect=function(w,A){return w==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),se().useLayoutEffect(w,A)},o.useMemo=function(w,A){return se().useMemo(w,A)},o.useOptimistic=function(w,A){return se().useOptimistic(w,A)},o.useReducer=function(w,A,O){return se().useReducer(w,A,O)},o.useRef=function(w){return se().useRef(w)},o.useState=function(w){return se().useState(w)},o.useSyncExternalStore=function(w,A,O){return se().useSyncExternalStore(w,A,O)},o.useTransition=function(){return se().useTransition()},o.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(nu,nu.exports)),nu.exports}var W1;function bu(){return W1||(W1=1,Vb.exports=NR()),Vb.exports}var eS;function SR(){if(eS)return Vf;eS=1;return(function(){function n(P){if(P==null)return null;if(typeof P=="function")return P.$$typeof===be?null:P.displayName||P.name||null;if(typeof P=="string")return P;switch(P){case H:return"Fragment";case K:return"Profiler";case Y:return"StrictMode";case ce:return"Suspense";case de:return"SuspenseList";case I:return"Activity"}if(typeof P=="object")switch(typeof P.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),P.$$typeof){case z:return"Portal";case J:return P.displayName||"Context";case Z:return(P._context.displayName||"Context")+".Consumer";case ee:var fe=P.render;return P=P.displayName,P||(P=fe.displayName||fe.name||"",P=P!==""?"ForwardRef("+P+")":"ForwardRef"),P;case k:return fe=P.displayName||null,fe!==null?fe:n(P.type)||"Memo";case G:fe=P._payload,P=P._init;try{return n(P(fe))}catch{}}return null}function o(P){return""+P}function l(P){try{o(P);var fe=!1}catch{fe=!0}if(fe){fe=console;var Re=fe.error,we=typeof Symbol=="function"&&Symbol.toStringTag&&P[Symbol.toStringTag]||P.constructor.name||"Object";return Re.call(fe,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",we),o(P)}}function c(P){if(P===H)return"<>";if(typeof P=="object"&&P!==null&&P.$$typeof===G)return"<...>";try{var fe=n(P);return fe?"<"+fe+">":"<...>"}catch{return"<...>"}}function u(){var P=se.A;return P===null?null:P.getOwner()}function d(){return Error("react-stack-top-frame")}function p(P){if(ae.call(P,"key")){var fe=Object.getOwnPropertyDescriptor(P,"key").get;if(fe&&fe.isReactWarning)return!1}return P.key!==void 0}function b(P,fe){function Re(){te||(te=!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)",fe))}Re.isReactWarning=!0,Object.defineProperty(P,"key",{get:Re,configurable:!0})}function g(){var P=n(this.type);return ue[P]||(ue[P]=!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.")),P=this.props.ref,P!==void 0?P:null}function y(P,fe,Re,we,lt,Ut){var Je=Re.ref;return P={$$typeof:R,type:P,key:fe,props:Re,_owner:we},(Je!==void 0?Je:null)!==null?Object.defineProperty(P,"ref",{enumerable:!1,get:g}):Object.defineProperty(P,"ref",{enumerable:!1,value:null}),P._store={},Object.defineProperty(P._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(P,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(P,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:lt}),Object.defineProperty(P,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:Ut}),Object.freeze&&(Object.freeze(P.props),Object.freeze(P)),P}function E(P,fe,Re,we,lt,Ut){var Je=fe.children;if(Je!==void 0)if(we)if(pe(Je)){for(we=0;we<Je.length;we++)x(Je[we]);Object.freeze&&Object.freeze(Je)}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 x(Je);if(ae.call(fe,"key")){Je=n(P);var yt=Object.keys(fe).filter(function(ra){return ra!=="key"});we=0<yt.length?"{key: someKey, "+yt.join(": ..., ")+": ...}":"{key: someKey}",Te[Je+we]||(yt=0<yt.length?"{"+yt.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
14
+ let props = %s;
15
+ <%s {...props} />
16
+ React keys must be passed directly to JSX without using spread:
17
+ let props = %s;
18
+ <%s key={someKey} {...props} />`,we,Je,yt,Je),Te[Je+we]=!0)}if(Je=null,Re!==void 0&&(l(Re),Je=""+Re),p(fe)&&(l(fe.key),Je=""+fe.key),"key"in fe){Re={};for(var Ct in fe)Ct!=="key"&&(Re[Ct]=fe[Ct])}else Re=fe;return Je&&b(Re,typeof P=="function"?P.displayName||P.name||"Unknown":P),y(P,Je,Re,u(),lt,Ut)}function x(P){S(P)?P._store&&(P._store.validated=1):typeof P=="object"&&P!==null&&P.$$typeof===G&&(P._payload.status==="fulfilled"?S(P._payload.value)&&P._payload.value._store&&(P._payload.value._store.validated=1):P._store&&(P._store.validated=1))}function S(P){return typeof P=="object"&&P!==null&&P.$$typeof===R}var _=bu(),R=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),Y=Symbol.for("react.strict_mode"),K=Symbol.for("react.profiler"),Z=Symbol.for("react.consumer"),J=Symbol.for("react.context"),ee=Symbol.for("react.forward_ref"),ce=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),k=Symbol.for("react.memo"),G=Symbol.for("react.lazy"),I=Symbol.for("react.activity"),be=Symbol.for("react.client.reference"),se=_.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,ae=Object.prototype.hasOwnProperty,pe=Array.isArray,De=console.createTask?console.createTask:function(){return null};_={react_stack_bottom_frame:function(P){return P()}};var te,ue={},ne=_.react_stack_bottom_frame.bind(_,d)(),he=De(c(d)),Te={};Vf.Fragment=H,Vf.jsxDEV=function(P,fe,Re,we){var lt=1e4>se.recentlyCreatedOwnerStacks++;return E(P,fe,Re,we,lt?Error("react-stack-top-frame"):ne,lt?De(c(P)):he)}})(),Vf}var tS;function wR(){return tS||(tS=1,Ab.exports=SR()),Ab.exports}var f=wR();const Fe=n=>typeof n=="string",Wc=()=>{let n,o;const l=new Promise((c,u)=>{n=c,o=u});return l.resolve=n,l.reject=o,l},aS=n=>n==null?"":""+n,ER=(n,o,l)=>{n.forEach(c=>{o[c]&&(l[c]=o[c])})},DR=/###/g,sS=n=>n&&n.indexOf("###")>-1?n.replace(DR,"."):n,nS=n=>!n||Fe(n),lu=(n,o,l)=>{const c=Fe(o)?o.split("."):o;let u=0;for(;u<c.length-1;){if(nS(n))return{};const d=sS(c[u]);!n[d]&&l&&(n[d]=new l),Object.prototype.hasOwnProperty.call(n,d)?n=n[d]:n={},++u}return nS(n)?{}:{obj:n,k:sS(c[u])}},oS=(n,o,l)=>{const{obj:c,k:u}=lu(n,o,Object);if(c!==void 0||o.length===1){c[u]=l;return}let d=o[o.length-1],p=o.slice(0,o.length-1),b=lu(n,p,Object);for(;b.obj===void 0&&p.length;)d=`${p[p.length-1]}.${d}`,p=p.slice(0,p.length-1),b=lu(n,p,Object),b?.obj&&typeof b.obj[`${b.k}.${d}`]<"u"&&(b.obj=void 0);b.obj[`${b.k}.${d}`]=l},_R=(n,o,l,c)=>{const{obj:u,k:d}=lu(n,o,Object);u[d]=u[d]||[],u[d].push(l)},Ff=(n,o)=>{const{obj:l,k:c}=lu(n,o);if(l&&Object.prototype.hasOwnProperty.call(l,c))return l[c]},RR=(n,o,l)=>{const c=Ff(n,l);return c!==void 0?c:Ff(o,l)},_4=(n,o,l)=>{for(const c in o)c!=="__proto__"&&c!=="constructor"&&(c in n?Fe(n[c])||n[c]instanceof String||Fe(o[c])||o[c]instanceof String?l&&(n[c]=o[c]):_4(n[c],o[c],l):n[c]=o[c]);return n},oi=n=>n.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&");var kR={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;","/":"&#x2F;"};const UR=n=>Fe(n)?n.replace(/[&<>"'\/]/g,o=>kR[o]):n;class CR{constructor(o){this.capacity=o,this.regExpMap=new Map,this.regExpQueue=[]}getRegExp(o){const l=this.regExpMap.get(o);if(l!==void 0)return l;const c=new RegExp(o);return this.regExpQueue.length===this.capacity&&this.regExpMap.delete(this.regExpQueue.shift()),this.regExpMap.set(o,c),this.regExpQueue.push(o),c}}const jR=[" ",",","?","!",";"],TR=new CR(20),OR=(n,o,l)=>{o=o||"",l=l||"";const c=jR.filter(p=>o.indexOf(p)<0&&l.indexOf(p)<0);if(c.length===0)return!0;const u=TR.getRegExp(`(${c.map(p=>p==="?"?"\\?":p).join("|")})`);let d=!u.test(n);if(!d){const p=n.indexOf(l);p>0&&!u.test(n.substring(0,p))&&(d=!0)}return d},ng=(n,o,l=".")=>{if(!n)return;if(n[o])return Object.prototype.hasOwnProperty.call(n,o)?n[o]:void 0;const c=o.split(l);let u=n;for(let d=0;d<c.length;){if(!u||typeof u!="object")return;let p,b="";for(let g=d;g<c.length;++g)if(g!==d&&(b+=l),b+=c[g],p=u[b],p!==void 0){if(["string","number","boolean"].indexOf(typeof p)>-1&&g<c.length-1)continue;d+=g-d+1;break}u=p}return u},du=n=>n?.replace("_","-"),AR={type:"logger",log(n){this.output("log",n)},warn(n){this.output("warn",n)},error(n){this.output("error",n)},output(n,o){console?.[n]?.apply?.(console,o)}};class Xf{constructor(o,l={}){this.init(o,l)}init(o,l={}){this.prefix=l.prefix||"i18next:",this.logger=o||AR,this.options=l,this.debug=l.debug}log(...o){return this.forward(o,"log","",!0)}warn(...o){return this.forward(o,"warn","",!0)}error(...o){return this.forward(o,"error","")}deprecate(...o){return this.forward(o,"warn","WARNING DEPRECATED: ",!0)}forward(o,l,c,u){return u&&!this.debug?null:(Fe(o[0])&&(o[0]=`${c}${this.prefix} ${o[0]}`),this.logger[l](o))}create(o){return new Xf(this.logger,{prefix:`${this.prefix}:${o}:`,...this.options})}clone(o){return o=o||this.options,o.prefix=o.prefix||this.prefix,new Xf(this.logger,o)}}var Pn=new Xf;class Jf{constructor(){this.observers={}}on(o,l){return o.split(" ").forEach(c=>{this.observers[c]||(this.observers[c]=new Map);const u=this.observers[c].get(l)||0;this.observers[c].set(l,u+1)}),this}off(o,l){if(this.observers[o]){if(!l){delete this.observers[o];return}this.observers[o].delete(l)}}emit(o,...l){this.observers[o]&&Array.from(this.observers[o].entries()).forEach(([u,d])=>{for(let p=0;p<d;p++)u(...l)}),this.observers["*"]&&Array.from(this.observers["*"].entries()).forEach(([u,d])=>{for(let p=0;p<d;p++)u.apply(u,[o,...l])})}}class rS extends Jf{constructor(o,l={ns:["translation"],defaultNS:"translation"}){super(),this.data=o||{},this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.options.ignoreJSONStructure===void 0&&(this.options.ignoreJSONStructure=!0)}addNamespaces(o){this.options.ns.indexOf(o)<0&&this.options.ns.push(o)}removeNamespaces(o){const l=this.options.ns.indexOf(o);l>-1&&this.options.ns.splice(l,1)}getResource(o,l,c,u={}){const d=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,p=u.ignoreJSONStructure!==void 0?u.ignoreJSONStructure:this.options.ignoreJSONStructure;let b;o.indexOf(".")>-1?b=o.split("."):(b=[o,l],c&&(Array.isArray(c)?b.push(...c):Fe(c)&&d?b.push(...c.split(d)):b.push(c)));const g=Ff(this.data,b);return!g&&!l&&!c&&o.indexOf(".")>-1&&(o=b[0],l=b[1],c=b.slice(2).join(".")),g||!p||!Fe(c)?g:ng(this.data?.[o]?.[l],c,d)}addResource(o,l,c,u,d={silent:!1}){const p=d.keySeparator!==void 0?d.keySeparator:this.options.keySeparator;let b=[o,l];c&&(b=b.concat(p?c.split(p):c)),o.indexOf(".")>-1&&(b=o.split("."),u=l,l=b[1]),this.addNamespaces(l),oS(this.data,b,u),d.silent||this.emit("added",o,l,c,u)}addResources(o,l,c,u={silent:!1}){for(const d in c)(Fe(c[d])||Array.isArray(c[d]))&&this.addResource(o,l,d,c[d],{silent:!0});u.silent||this.emit("added",o,l,c)}addResourceBundle(o,l,c,u,d,p={silent:!1,skipCopy:!1}){let b=[o,l];o.indexOf(".")>-1&&(b=o.split("."),u=c,c=l,l=b[1]),this.addNamespaces(l);let g=Ff(this.data,b)||{};p.skipCopy||(c=JSON.parse(JSON.stringify(c))),u?_4(g,c,d):g={...g,...c},oS(this.data,b,g),p.silent||this.emit("added",o,l,c)}removeResourceBundle(o,l){this.hasResourceBundle(o,l)&&delete this.data[o][l],this.removeNamespaces(l),this.emit("removed",o,l)}hasResourceBundle(o,l){return this.getResource(o,l)!==void 0}getResourceBundle(o,l){return l||(l=this.options.defaultNS),this.getResource(o,l)}getDataByLanguage(o){return this.data[o]}hasLanguageSomeTranslations(o){const l=this.getDataByLanguage(o);return!!(l&&Object.keys(l)||[]).find(u=>l[u]&&Object.keys(l[u]).length>0)}toJSON(){return this.data}}var R4={processors:{},addPostProcessor(n){this.processors[n.name]=n},handle(n,o,l,c,u){return n.forEach(d=>{o=this.processors[d]?.process(o,l,c,u)??o}),o}};const k4=Symbol("i18next/PATH_KEY");function VR(){const n=[],o=Object.create(null);let l;return o.get=(c,u)=>(l?.revoke?.(),u===k4?n:(n.push(u),l=Proxy.revocable(c,o),l.proxy)),Proxy.revocable(Object.create(null),o).proxy}function og(n,o){const{[k4]:l}=n(VR());return l.join(o?.keySeparator??".")}const iS={},Mb=n=>!Fe(n)&&typeof n!="boolean"&&typeof n!="number";class Qf extends Jf{constructor(o,l={}){super(),ER(["resourceStore","languageUtils","pluralResolver","interpolator","backendConnector","i18nFormat","utils"],o,this),this.options=l,this.options.keySeparator===void 0&&(this.options.keySeparator="."),this.logger=Pn.create("translator")}changeLanguage(o){o&&(this.language=o)}exists(o,l={interpolation:{}}){const c={...l};if(o==null)return!1;const u=this.resolve(o,c);if(u?.res===void 0)return!1;const d=Mb(u.res);return!(c.returnObjects===!1&&d)}extractFromKey(o,l){let c=l.nsSeparator!==void 0?l.nsSeparator:this.options.nsSeparator;c===void 0&&(c=":");const u=l.keySeparator!==void 0?l.keySeparator:this.options.keySeparator;let d=l.ns||this.options.defaultNS||[];const p=c&&o.indexOf(c)>-1,b=!this.options.userDefinedKeySeparator&&!l.keySeparator&&!this.options.userDefinedNsSeparator&&!l.nsSeparator&&!OR(o,c,u);if(p&&!b){const g=o.match(this.interpolator.nestingRegexp);if(g&&g.length>0)return{key:o,namespaces:Fe(d)?[d]:d};const y=o.split(c);(c!==u||c===u&&this.options.ns.indexOf(y[0])>-1)&&(d=y.shift()),o=y.join(u)}return{key:o,namespaces:Fe(d)?[d]:d}}translate(o,l,c){let u=typeof l=="object"?{...l}:l;if(typeof u!="object"&&this.options.overloadTranslationOptionHandler&&(u=this.options.overloadTranslationOptionHandler(arguments)),typeof u=="object"&&(u={...u}),u||(u={}),o==null)return"";typeof o=="function"&&(o=og(o,{...this.options,...u})),Array.isArray(o)||(o=[String(o)]);const d=u.returnDetails!==void 0?u.returnDetails:this.options.returnDetails,p=u.keySeparator!==void 0?u.keySeparator:this.options.keySeparator,{key:b,namespaces:g}=this.extractFromKey(o[o.length-1],u),y=g[g.length-1];let E=u.nsSeparator!==void 0?u.nsSeparator:this.options.nsSeparator;E===void 0&&(E=":");const x=u.lng||this.language,S=u.appendNamespaceToCIMode||this.options.appendNamespaceToCIMode;if(x?.toLowerCase()==="cimode")return S?d?{res:`${y}${E}${b}`,usedKey:b,exactUsedKey:b,usedLng:x,usedNS:y,usedParams:this.getUsedParamsDetails(u)}:`${y}${E}${b}`:d?{res:b,usedKey:b,exactUsedKey:b,usedLng:x,usedNS:y,usedParams:this.getUsedParamsDetails(u)}:b;const _=this.resolve(o,u);let R=_?.res;const z=_?.usedKey||b,H=_?.exactUsedKey||b,Y=["[object Number]","[object Function]","[object RegExp]"],K=u.joinArrays!==void 0?u.joinArrays:this.options.joinArrays,Z=!this.i18nFormat||this.i18nFormat.handleAsObject,J=u.count!==void 0&&!Fe(u.count),ee=Qf.hasDefaultValue(u),ce=J?this.pluralResolver.getSuffix(x,u.count,u):"",de=u.ordinal&&J?this.pluralResolver.getSuffix(x,u.count,{ordinal:!1}):"",k=J&&!u.ordinal&&u.count===0,G=k&&u[`defaultValue${this.options.pluralSeparator}zero`]||u[`defaultValue${ce}`]||u[`defaultValue${de}`]||u.defaultValue;let I=R;Z&&!R&&ee&&(I=G);const be=Mb(I),se=Object.prototype.toString.apply(I);if(Z&&I&&be&&Y.indexOf(se)<0&&!(Fe(K)&&Array.isArray(I))){if(!u.returnObjects&&!this.options.returnObjects){this.options.returnedObjectHandler||this.logger.warn("accessing an object - but returnObjects options is not enabled!");const ae=this.options.returnedObjectHandler?this.options.returnedObjectHandler(z,I,{...u,ns:g}):`key '${b} (${this.language})' returned an object instead of string.`;return d?(_.res=ae,_.usedParams=this.getUsedParamsDetails(u),_):ae}if(p){const ae=Array.isArray(I),pe=ae?[]:{},De=ae?H:z;for(const te in I)if(Object.prototype.hasOwnProperty.call(I,te)){const ue=`${De}${p}${te}`;ee&&!R?pe[te]=this.translate(ue,{...u,defaultValue:Mb(G)?G[te]:void 0,joinArrays:!1,ns:g}):pe[te]=this.translate(ue,{...u,joinArrays:!1,ns:g}),pe[te]===ue&&(pe[te]=I[te])}R=pe}}else if(Z&&Fe(K)&&Array.isArray(R))R=R.join(K),R&&(R=this.extendTranslation(R,o,u,c));else{let ae=!1,pe=!1;!this.isValidLookup(R)&&ee&&(ae=!0,R=G),this.isValidLookup(R)||(pe=!0,R=b);const te=(u.missingKeyNoValueFallbackToKey||this.options.missingKeyNoValueFallbackToKey)&&pe?void 0:R,ue=ee&&G!==R&&this.options.updateMissing;if(pe||ae||ue){if(this.logger.log(ue?"updateKey":"missingKey",x,y,b,ue?G:R),p){const P=this.resolve(b,{...u,keySeparator:!1});P&&P.res&&this.logger.warn("Seems the loaded translations were in flat JSON format instead of nested. Either set keySeparator: false on init or make sure your translations are published in nested format.")}let ne=[];const he=this.languageUtils.getFallbackCodes(this.options.fallbackLng,u.lng||this.language);if(this.options.saveMissingTo==="fallback"&&he&&he[0])for(let P=0;P<he.length;P++)ne.push(he[P]);else this.options.saveMissingTo==="all"?ne=this.languageUtils.toResolveHierarchy(u.lng||this.language):ne.push(u.lng||this.language);const Te=(P,fe,Re)=>{const we=ee&&Re!==R?Re:te;this.options.missingKeyHandler?this.options.missingKeyHandler(P,y,fe,we,ue,u):this.backendConnector?.saveMissing&&this.backendConnector.saveMissing(P,y,fe,we,ue,u),this.emit("missingKey",P,y,fe,R)};this.options.saveMissing&&(this.options.saveMissingPlurals&&J?ne.forEach(P=>{const fe=this.pluralResolver.getSuffixes(P,u);k&&u[`defaultValue${this.options.pluralSeparator}zero`]&&fe.indexOf(`${this.options.pluralSeparator}zero`)<0&&fe.push(`${this.options.pluralSeparator}zero`),fe.forEach(Re=>{Te([P],b+Re,u[`defaultValue${Re}`]||G)})}):Te(ne,b,G))}R=this.extendTranslation(R,o,u,_,c),pe&&R===b&&this.options.appendNamespaceToMissingKey&&(R=`${y}${E}${b}`),(pe||ae)&&this.options.parseMissingKeyHandler&&(R=this.options.parseMissingKeyHandler(this.options.appendNamespaceToMissingKey?`${y}${E}${b}`:b,ae?R:void 0,u))}return d?(_.res=R,_.usedParams=this.getUsedParamsDetails(u),_):R}extendTranslation(o,l,c,u,d){if(this.i18nFormat?.parse)o=this.i18nFormat.parse(o,{...this.options.interpolation.defaultVariables,...c},c.lng||this.language||u.usedLng,u.usedNS,u.usedKey,{resolved:u});else if(!c.skipInterpolation){c.interpolation&&this.interpolator.init({...c,interpolation:{...this.options.interpolation,...c.interpolation}});const g=Fe(o)&&(c?.interpolation?.skipOnVariables!==void 0?c.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables);let y;if(g){const x=o.match(this.interpolator.nestingRegexp);y=x&&x.length}let E=c.replace&&!Fe(c.replace)?c.replace:c;if(this.options.interpolation.defaultVariables&&(E={...this.options.interpolation.defaultVariables,...E}),o=this.interpolator.interpolate(o,E,c.lng||this.language||u.usedLng,c),g){const x=o.match(this.interpolator.nestingRegexp),S=x&&x.length;y<S&&(c.nest=!1)}!c.lng&&u&&u.res&&(c.lng=this.language||u.usedLng),c.nest!==!1&&(o=this.interpolator.nest(o,(...x)=>d?.[0]===x[0]&&!c.context?(this.logger.warn(`It seems you are nesting recursively key: ${x[0]} in key: ${l[0]}`),null):this.translate(...x,l),c)),c.interpolation&&this.interpolator.reset()}const p=c.postProcess||this.options.postProcess,b=Fe(p)?[p]:p;return o!=null&&b?.length&&c.applyPostProcessor!==!1&&(o=R4.handle(b,o,l,this.options&&this.options.postProcessPassResolved?{i18nResolved:{...u,usedParams:this.getUsedParamsDetails(c)},...c}:c,this)),o}resolve(o,l={}){let c,u,d,p,b;return Fe(o)&&(o=[o]),o.forEach(g=>{if(this.isValidLookup(c))return;const y=this.extractFromKey(g,l),E=y.key;u=E;let x=y.namespaces;this.options.fallbackNS&&(x=x.concat(this.options.fallbackNS));const S=l.count!==void 0&&!Fe(l.count),_=S&&!l.ordinal&&l.count===0,R=l.context!==void 0&&(Fe(l.context)||typeof l.context=="number")&&l.context!=="",z=l.lngs?l.lngs:this.languageUtils.toResolveHierarchy(l.lng||this.language,l.fallbackLng);x.forEach(H=>{this.isValidLookup(c)||(b=H,!iS[`${z[0]}-${H}`]&&this.utils?.hasLoadedNamespace&&!this.utils?.hasLoadedNamespace(b)&&(iS[`${z[0]}-${H}`]=!0,this.logger.warn(`key "${u}" for languages "${z.join(", ")}" won't get resolved as namespace "${b}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")),z.forEach(Y=>{if(this.isValidLookup(c))return;p=Y;const K=[E];if(this.i18nFormat?.addLookupKeys)this.i18nFormat.addLookupKeys(K,E,Y,H,l);else{let J;S&&(J=this.pluralResolver.getSuffix(Y,l.count,l));const ee=`${this.options.pluralSeparator}zero`,ce=`${this.options.pluralSeparator}ordinal${this.options.pluralSeparator}`;if(S&&(l.ordinal&&J.indexOf(ce)===0&&K.push(E+J.replace(ce,this.options.pluralSeparator)),K.push(E+J),_&&K.push(E+ee)),R){const de=`${E}${this.options.contextSeparator||"_"}${l.context}`;K.push(de),S&&(l.ordinal&&J.indexOf(ce)===0&&K.push(de+J.replace(ce,this.options.pluralSeparator)),K.push(de+J),_&&K.push(de+ee))}}let Z;for(;Z=K.pop();)this.isValidLookup(c)||(d=Z,c=this.getResource(Y,H,Z,l))}))})}),{res:c,usedKey:u,exactUsedKey:d,usedLng:p,usedNS:b}}isValidLookup(o){return o!==void 0&&!(!this.options.returnNull&&o===null)&&!(!this.options.returnEmptyString&&o==="")}getResource(o,l,c,u={}){return this.i18nFormat?.getResource?this.i18nFormat.getResource(o,l,c,u):this.resourceStore.getResource(o,l,c,u)}getUsedParamsDetails(o={}){const l=["defaultValue","ordinal","context","replace","lng","lngs","fallbackLng","ns","keySeparator","nsSeparator","returnObjects","returnDetails","joinArrays","postProcess","interpolation"],c=o.replace&&!Fe(o.replace);let u=c?o.replace:o;if(c&&typeof o.count<"u"&&(u.count=o.count),this.options.interpolation.defaultVariables&&(u={...this.options.interpolation.defaultVariables,...u}),!c){u={...u};for(const d of l)delete u[d]}return u}static hasDefaultValue(o){const l="defaultValue";for(const c in o)if(Object.prototype.hasOwnProperty.call(o,c)&&l===c.substring(0,l.length)&&o[c]!==void 0)return!0;return!1}}class lS{constructor(o){this.options=o,this.supportedLngs=this.options.supportedLngs||!1,this.logger=Pn.create("languageUtils")}getScriptPartFromCode(o){if(o=du(o),!o||o.indexOf("-")<0)return null;const l=o.split("-");return l.length===2||(l.pop(),l[l.length-1].toLowerCase()==="x")?null:this.formatLanguageCode(l.join("-"))}getLanguagePartFromCode(o){if(o=du(o),!o||o.indexOf("-")<0)return o;const l=o.split("-");return this.formatLanguageCode(l[0])}formatLanguageCode(o){if(Fe(o)&&o.indexOf("-")>-1){let l;try{l=Intl.getCanonicalLocales(o)[0]}catch{}return l&&this.options.lowerCaseLng&&(l=l.toLowerCase()),l||(this.options.lowerCaseLng?o.toLowerCase():o)}return this.options.cleanCode||this.options.lowerCaseLng?o.toLowerCase():o}isSupportedCode(o){return(this.options.load==="languageOnly"||this.options.nonExplicitSupportedLngs)&&(o=this.getLanguagePartFromCode(o)),!this.supportedLngs||!this.supportedLngs.length||this.supportedLngs.indexOf(o)>-1}getBestMatchFromCodes(o){if(!o)return null;let l;return o.forEach(c=>{if(l)return;const u=this.formatLanguageCode(c);(!this.options.supportedLngs||this.isSupportedCode(u))&&(l=u)}),!l&&this.options.supportedLngs&&o.forEach(c=>{if(l)return;const u=this.getScriptPartFromCode(c);if(this.isSupportedCode(u))return l=u;const d=this.getLanguagePartFromCode(c);if(this.isSupportedCode(d))return l=d;l=this.options.supportedLngs.find(p=>{if(p===d)return p;if(!(p.indexOf("-")<0&&d.indexOf("-")<0)&&(p.indexOf("-")>0&&d.indexOf("-")<0&&p.substring(0,p.indexOf("-"))===d||p.indexOf(d)===0&&d.length>1))return p})}),l||(l=this.getFallbackCodes(this.options.fallbackLng)[0]),l}getFallbackCodes(o,l){if(!o)return[];if(typeof o=="function"&&(o=o(l)),Fe(o)&&(o=[o]),Array.isArray(o))return o;if(!l)return o.default||[];let c=o[l];return c||(c=o[this.getScriptPartFromCode(l)]),c||(c=o[this.formatLanguageCode(l)]),c||(c=o[this.getLanguagePartFromCode(l)]),c||(c=o.default),c||[]}toResolveHierarchy(o,l){const c=this.getFallbackCodes((l===!1?[]:l)||this.options.fallbackLng||[],o),u=[],d=p=>{p&&(this.isSupportedCode(p)?u.push(p):this.logger.warn(`rejecting language code not found in supportedLngs: ${p}`))};return Fe(o)&&(o.indexOf("-")>-1||o.indexOf("_")>-1)?(this.options.load!=="languageOnly"&&d(this.formatLanguageCode(o)),this.options.load!=="languageOnly"&&this.options.load!=="currentOnly"&&d(this.getScriptPartFromCode(o)),this.options.load!=="currentOnly"&&d(this.getLanguagePartFromCode(o))):Fe(o)&&d(this.formatLanguageCode(o)),c.forEach(p=>{u.indexOf(p)<0&&d(this.formatLanguageCode(p))}),u}}const cS={zero:0,one:1,two:2,few:3,many:4,other:5},uS={select:n=>n===1?"one":"other",resolvedOptions:()=>({pluralCategories:["one","other"]})};class MR{constructor(o,l={}){this.languageUtils=o,this.options=l,this.logger=Pn.create("pluralResolver"),this.pluralRulesCache={}}clearCache(){this.pluralRulesCache={}}getRule(o,l={}){const c=du(o==="dev"?"en":o),u=l.ordinal?"ordinal":"cardinal",d=JSON.stringify({cleanedCode:c,type:u});if(d in this.pluralRulesCache)return this.pluralRulesCache[d];let p;try{p=new Intl.PluralRules(c,{type:u})}catch{if(typeof Intl>"u")return this.logger.error("No Intl support, please use an Intl polyfill!"),uS;if(!o.match(/-|_/))return uS;const g=this.languageUtils.getLanguagePartFromCode(o);p=this.getRule(g,l)}return this.pluralRulesCache[d]=p,p}needsPlural(o,l={}){let c=this.getRule(o,l);return c||(c=this.getRule("dev",l)),c?.resolvedOptions().pluralCategories.length>1}getPluralFormsOfKey(o,l,c={}){return this.getSuffixes(o,c).map(u=>`${l}${u}`)}getSuffixes(o,l={}){let c=this.getRule(o,l);return c||(c=this.getRule("dev",l)),c?c.resolvedOptions().pluralCategories.sort((u,d)=>cS[u]-cS[d]).map(u=>`${this.options.prepend}${l.ordinal?`ordinal${this.options.prepend}`:""}${u}`):[]}getSuffix(o,l,c={}){const u=this.getRule(o,c);return u?`${this.options.prepend}${c.ordinal?`ordinal${this.options.prepend}`:""}${u.select(l)}`:(this.logger.warn(`no plural rule found for: ${o}`),this.getSuffix("dev",l,c))}}const dS=(n,o,l,c=".",u=!0)=>{let d=RR(n,o,l);return!d&&u&&Fe(l)&&(d=ng(n,l,c),d===void 0&&(d=ng(o,l,c))),d},zb=n=>n.replace(/\$/g,"$$$$");class fS{constructor(o={}){this.logger=Pn.create("interpolator"),this.options=o,this.format=o?.interpolation?.format||(l=>l),this.init(o)}init(o={}){o.interpolation||(o.interpolation={escapeValue:!0});const{escape:l,escapeValue:c,useRawValueToEscape:u,prefix:d,prefixEscaped:p,suffix:b,suffixEscaped:g,formatSeparator:y,unescapeSuffix:E,unescapePrefix:x,nestingPrefix:S,nestingPrefixEscaped:_,nestingSuffix:R,nestingSuffixEscaped:z,nestingOptionsSeparator:H,maxReplaces:Y,alwaysFormat:K}=o.interpolation;this.escape=l!==void 0?l:UR,this.escapeValue=c!==void 0?c:!0,this.useRawValueToEscape=u!==void 0?u:!1,this.prefix=d?oi(d):p||"{{",this.suffix=b?oi(b):g||"}}",this.formatSeparator=y||",",this.unescapePrefix=E?"":x||"-",this.unescapeSuffix=this.unescapePrefix?"":E||"",this.nestingPrefix=S?oi(S):_||oi("$t("),this.nestingSuffix=R?oi(R):z||oi(")"),this.nestingOptionsSeparator=H||",",this.maxReplaces=Y||1e3,this.alwaysFormat=K!==void 0?K:!1,this.resetRegExp()}reset(){this.options&&this.init(this.options)}resetRegExp(){const o=(l,c)=>l?.source===c?(l.lastIndex=0,l):new RegExp(c,"g");this.regexp=o(this.regexp,`${this.prefix}(.+?)${this.suffix}`),this.regexpUnescape=o(this.regexpUnescape,`${this.prefix}${this.unescapePrefix}(.+?)${this.unescapeSuffix}${this.suffix}`),this.nestingRegexp=o(this.nestingRegexp,`${this.nestingPrefix}((?:[^()"']+|"[^"]*"|'[^']*'|\\((?:[^()]|"[^"]*"|'[^']*')*\\))*?)${this.nestingSuffix}`)}interpolate(o,l,c,u){let d,p,b;const g=this.options&&this.options.interpolation&&this.options.interpolation.defaultVariables||{},y=_=>{if(_.indexOf(this.formatSeparator)<0){const Y=dS(l,g,_,this.options.keySeparator,this.options.ignoreJSONStructure);return this.alwaysFormat?this.format(Y,void 0,c,{...u,...l,interpolationkey:_}):Y}const R=_.split(this.formatSeparator),z=R.shift().trim(),H=R.join(this.formatSeparator).trim();return this.format(dS(l,g,z,this.options.keySeparator,this.options.ignoreJSONStructure),H,c,{...u,...l,interpolationkey:z})};this.resetRegExp();const E=u?.missingInterpolationHandler||this.options.missingInterpolationHandler,x=u?.interpolation?.skipOnVariables!==void 0?u.interpolation.skipOnVariables:this.options.interpolation.skipOnVariables;return[{regex:this.regexpUnescape,safeValue:_=>zb(_)},{regex:this.regexp,safeValue:_=>this.escapeValue?zb(this.escape(_)):zb(_)}].forEach(_=>{for(b=0;d=_.regex.exec(o);){const R=d[1].trim();if(p=y(R),p===void 0)if(typeof E=="function"){const H=E(o,d,u);p=Fe(H)?H:""}else if(u&&Object.prototype.hasOwnProperty.call(u,R))p="";else if(x){p=d[0];continue}else this.logger.warn(`missed to pass in variable ${R} for interpolating ${o}`),p="";else!Fe(p)&&!this.useRawValueToEscape&&(p=aS(p));const z=_.safeValue(p);if(o=o.replace(d[0],z),x?(_.regex.lastIndex+=p.length,_.regex.lastIndex-=d[0].length):_.regex.lastIndex=0,b++,b>=this.maxReplaces)break}}),o}nest(o,l,c={}){let u,d,p;const b=(g,y)=>{const E=this.nestingOptionsSeparator;if(g.indexOf(E)<0)return g;const x=g.split(new RegExp(`${oi(E)}[ ]*{`));let S=`{${x[1]}`;g=x[0],S=this.interpolate(S,p);const _=S.match(/'/g),R=S.match(/"/g);((_?.length??0)%2===0&&!R||(R?.length??0)%2!==0)&&(S=S.replace(/'/g,'"'));try{p=JSON.parse(S),y&&(p={...y,...p})}catch(z){return this.logger.warn(`failed parsing options string in nesting for key ${g}`,z),`${g}${E}${S}`}return p.defaultValue&&p.defaultValue.indexOf(this.prefix)>-1&&delete p.defaultValue,g};for(;u=this.nestingRegexp.exec(o);){let g=[];p={...c},p=p.replace&&!Fe(p.replace)?p.replace:p,p.applyPostProcessor=!1,delete p.defaultValue;const y=/{.*}/.test(u[1])?u[1].lastIndexOf("}")+1:u[1].indexOf(this.formatSeparator);if(y!==-1&&(g=u[1].slice(y).split(this.formatSeparator).map(E=>E.trim()).filter(Boolean),u[1]=u[1].slice(0,y)),d=l(b.call(this,u[1].trim(),p),p),d&&u[0]===o&&!Fe(d))return d;Fe(d)||(d=aS(d)),d||(this.logger.warn(`missed to resolve ${u[1]} for nesting ${o}`),d=""),g.length&&(d=g.reduce((E,x)=>this.format(E,x,c.lng,{...c,interpolationkey:u[1].trim()}),d.trim())),o=o.replace(u[0],d),this.regexp.lastIndex=0}return o}}const zR=n=>{let o=n.toLowerCase().trim();const l={};if(n.indexOf("(")>-1){const c=n.split("(");o=c[0].toLowerCase().trim();const u=c[1].substring(0,c[1].length-1);o==="currency"&&u.indexOf(":")<0?l.currency||(l.currency=u.trim()):o==="relativetime"&&u.indexOf(":")<0?l.range||(l.range=u.trim()):u.split(";").forEach(p=>{if(p){const[b,...g]=p.split(":"),y=g.join(":").trim().replace(/^'+|'+$/g,""),E=b.trim();l[E]||(l[E]=y),y==="false"&&(l[E]=!1),y==="true"&&(l[E]=!0),isNaN(y)||(l[E]=parseInt(y,10))}})}return{formatName:o,formatOptions:l}},mS=n=>{const o={};return(l,c,u)=>{let d=u;u&&u.interpolationkey&&u.formatParams&&u.formatParams[u.interpolationkey]&&u[u.interpolationkey]&&(d={...d,[u.interpolationkey]:void 0});const p=c+JSON.stringify(d);let b=o[p];return b||(b=n(du(c),u),o[p]=b),b(l)}},LR=n=>(o,l,c)=>n(du(l),c)(o);class HR{constructor(o={}){this.logger=Pn.create("formatter"),this.options=o,this.init(o)}init(o,l={interpolation:{}}){this.formatSeparator=l.interpolation.formatSeparator||",";const c=l.cacheInBuiltFormats?mS:LR;this.formats={number:c((u,d)=>{const p=new Intl.NumberFormat(u,{...d});return b=>p.format(b)}),currency:c((u,d)=>{const p=new Intl.NumberFormat(u,{...d,style:"currency"});return b=>p.format(b)}),datetime:c((u,d)=>{const p=new Intl.DateTimeFormat(u,{...d});return b=>p.format(b)}),relativetime:c((u,d)=>{const p=new Intl.RelativeTimeFormat(u,{...d});return b=>p.format(b,d.range||"day")}),list:c((u,d)=>{const p=new Intl.ListFormat(u,{...d});return b=>p.format(b)})}}add(o,l){this.formats[o.toLowerCase().trim()]=l}addCached(o,l){this.formats[o.toLowerCase().trim()]=mS(l)}format(o,l,c,u={}){const d=l.split(this.formatSeparator);if(d.length>1&&d[0].indexOf("(")>1&&d[0].indexOf(")")<0&&d.find(b=>b.indexOf(")")>-1)){const b=d.findIndex(g=>g.indexOf(")")>-1);d[0]=[d[0],...d.splice(1,b)].join(this.formatSeparator)}return d.reduce((b,g)=>{const{formatName:y,formatOptions:E}=zR(g);if(this.formats[y]){let x=b;try{const S=u?.formatParams?.[u.interpolationkey]||{},_=S.locale||S.lng||u.locale||u.lng||c;x=this.formats[y](b,_,{...E,...u,...S})}catch(S){this.logger.warn(S)}return x}else this.logger.warn(`there was no format function for ${y}`);return b},o)}}const $R=(n,o)=>{n.pending[o]!==void 0&&(delete n.pending[o],n.pendingCount--)};class BR extends Jf{constructor(o,l,c,u={}){super(),this.backend=o,this.store=l,this.services=c,this.languageUtils=c.languageUtils,this.options=u,this.logger=Pn.create("backendConnector"),this.waitingReads=[],this.maxParallelReads=u.maxParallelReads||10,this.readingCalls=0,this.maxRetries=u.maxRetries>=0?u.maxRetries:5,this.retryTimeout=u.retryTimeout>=1?u.retryTimeout:350,this.state={},this.queue=[],this.backend?.init?.(c,u.backend,u)}queueLoad(o,l,c,u){const d={},p={},b={},g={};return o.forEach(y=>{let E=!0;l.forEach(x=>{const S=`${y}|${x}`;!c.reload&&this.store.hasResourceBundle(y,x)?this.state[S]=2:this.state[S]<0||(this.state[S]===1?p[S]===void 0&&(p[S]=!0):(this.state[S]=1,E=!1,p[S]===void 0&&(p[S]=!0),d[S]===void 0&&(d[S]=!0),g[x]===void 0&&(g[x]=!0)))}),E||(b[y]=!0)}),(Object.keys(d).length||Object.keys(p).length)&&this.queue.push({pending:p,pendingCount:Object.keys(p).length,loaded:{},errors:[],callback:u}),{toLoad:Object.keys(d),pending:Object.keys(p),toLoadLanguages:Object.keys(b),toLoadNamespaces:Object.keys(g)}}loaded(o,l,c){const u=o.split("|"),d=u[0],p=u[1];l&&this.emit("failedLoading",d,p,l),!l&&c&&this.store.addResourceBundle(d,p,c,void 0,void 0,{skipCopy:!0}),this.state[o]=l?-1:2,l&&c&&(this.state[o]=0);const b={};this.queue.forEach(g=>{_R(g.loaded,[d],p),$R(g,o),l&&g.errors.push(l),g.pendingCount===0&&!g.done&&(Object.keys(g.loaded).forEach(y=>{b[y]||(b[y]={});const E=g.loaded[y];E.length&&E.forEach(x=>{b[y][x]===void 0&&(b[y][x]=!0)})}),g.done=!0,g.errors.length?g.callback(g.errors):g.callback())}),this.emit("loaded",b),this.queue=this.queue.filter(g=>!g.done)}read(o,l,c,u=0,d=this.retryTimeout,p){if(!o.length)return p(null,{});if(this.readingCalls>=this.maxParallelReads){this.waitingReads.push({lng:o,ns:l,fcName:c,tried:u,wait:d,callback:p});return}this.readingCalls++;const b=(y,E)=>{if(this.readingCalls--,this.waitingReads.length>0){const x=this.waitingReads.shift();this.read(x.lng,x.ns,x.fcName,x.tried,x.wait,x.callback)}if(y&&E&&u<this.maxRetries){setTimeout(()=>{this.read.call(this,o,l,c,u+1,d*2,p)},d);return}p(y,E)},g=this.backend[c].bind(this.backend);if(g.length===2){try{const y=g(o,l);y&&typeof y.then=="function"?y.then(E=>b(null,E)).catch(b):b(null,y)}catch(y){b(y)}return}return g(o,l,b)}prepareLoading(o,l,c={},u){if(!this.backend)return this.logger.warn("No backend was added via i18next.use. Will not load resources."),u&&u();Fe(o)&&(o=this.languageUtils.toResolveHierarchy(o)),Fe(l)&&(l=[l]);const d=this.queueLoad(o,l,c,u);if(!d.toLoad.length)return d.pending.length||u(),null;d.toLoad.forEach(p=>{this.loadOne(p)})}load(o,l,c){this.prepareLoading(o,l,{},c)}reload(o,l,c){this.prepareLoading(o,l,{reload:!0},c)}loadOne(o,l=""){const c=o.split("|"),u=c[0],d=c[1];this.read(u,d,"read",void 0,void 0,(p,b)=>{p&&this.logger.warn(`${l}loading namespace ${d} for language ${u} failed`,p),!p&&b&&this.logger.log(`${l}loaded namespace ${d} for language ${u}`,b),this.loaded(o,p,b)})}saveMissing(o,l,c,u,d,p={},b=()=>{}){if(this.services?.utils?.hasLoadedNamespace&&!this.services?.utils?.hasLoadedNamespace(l)){this.logger.warn(`did not save key "${c}" as the namespace "${l}" was not yet loaded`,"This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!");return}if(!(c==null||c==="")){if(this.backend?.create){const g={...p,isUpdate:d},y=this.backend.create.bind(this.backend);if(y.length<6)try{let E;y.length===5?E=y(o,l,c,u,g):E=y(o,l,c,u),E&&typeof E.then=="function"?E.then(x=>b(null,x)).catch(b):b(null,E)}catch(E){b(E)}else y(o,l,c,u,b,g)}!o||!o[0]||this.store.addResource(o[0],l,c,u)}}}const Lb=()=>({debug:!1,initAsync:!0,ns:["translation"],defaultNS:["translation"],fallbackLng:["dev"],fallbackNS:!1,supportedLngs:!1,nonExplicitSupportedLngs:!1,load:"all",preload:!1,simplifyPluralSuffix:!0,keySeparator:".",nsSeparator:":",pluralSeparator:"_",contextSeparator:"_",partialBundledLanguages:!1,saveMissing:!1,updateMissing:!1,saveMissingTo:"fallback",saveMissingPlurals:!0,missingKeyHandler:!1,missingInterpolationHandler:!1,postProcess:!1,postProcessPassResolved:!1,returnNull:!1,returnEmptyString:!0,returnObjects:!1,joinArrays:!1,returnedObjectHandler:!1,parseMissingKeyHandler:!1,appendNamespaceToMissingKey:!1,appendNamespaceToCIMode:!1,overloadTranslationOptionHandler:n=>{let o={};if(typeof n[1]=="object"&&(o=n[1]),Fe(n[1])&&(o.defaultValue=n[1]),Fe(n[2])&&(o.tDescription=n[2]),typeof n[2]=="object"||typeof n[3]=="object"){const l=n[3]||n[2];Object.keys(l).forEach(c=>{o[c]=l[c]})}return o},interpolation:{escapeValue:!0,format:n=>n,prefix:"{{",suffix:"}}",formatSeparator:",",unescapePrefix:"-",nestingPrefix:"$t(",nestingSuffix:")",nestingOptionsSeparator:",",maxReplaces:1e3,skipOnVariables:!0},cacheInBuiltFormats:!0}),pS=n=>(Fe(n.ns)&&(n.ns=[n.ns]),Fe(n.fallbackLng)&&(n.fallbackLng=[n.fallbackLng]),Fe(n.fallbackNS)&&(n.fallbackNS=[n.fallbackNS]),n.supportedLngs?.indexOf?.("cimode")<0&&(n.supportedLngs=n.supportedLngs.concat(["cimode"])),typeof n.initImmediate=="boolean"&&(n.initAsync=n.initImmediate),n),Mf=()=>{},IR=n=>{Object.getOwnPropertyNames(Object.getPrototypeOf(n)).forEach(l=>{typeof n[l]=="function"&&(n[l]=n[l].bind(n))})},U4="__i18next_supportNoticeShown",YR=()=>typeof globalThis<"u"&&!!globalThis[U4],qR=()=>{typeof globalThis<"u"&&(globalThis[U4]=!0)},GR=n=>!!(n?.modules?.backend?.name?.indexOf("Locize")>0||n?.modules?.backend?.constructor?.name?.indexOf("Locize")>0||n?.options?.backend?.backends&&n.options.backend.backends.some(o=>o?.name?.indexOf("Locize")>0||o?.constructor?.name?.indexOf("Locize")>0)||n?.options?.backend?.projectId||n?.options?.backend?.backendOptions&&n.options.backend.backendOptions.some(o=>o?.projectId));class cu extends Jf{constructor(o={},l){if(super(),this.options=pS(o),this.services={},this.logger=Pn,this.modules={external:[]},IR(this),l&&!this.isInitialized&&!o.isClone){if(!this.options.initAsync)return this.init(o,l),this;setTimeout(()=>{this.init(o,l)},0)}}init(o={},l){this.isInitializing=!0,typeof o=="function"&&(l=o,o={}),o.defaultNS==null&&o.ns&&(Fe(o.ns)?o.defaultNS=o.ns:o.ns.indexOf("translation")<0&&(o.defaultNS=o.ns[0]));const c=Lb();this.options={...c,...this.options,...pS(o)},this.options.interpolation={...c.interpolation,...this.options.interpolation},o.keySeparator!==void 0&&(this.options.userDefinedKeySeparator=o.keySeparator),o.nsSeparator!==void 0&&(this.options.userDefinedNsSeparator=o.nsSeparator),typeof this.options.overloadTranslationOptionHandler!="function"&&(this.options.overloadTranslationOptionHandler=c.overloadTranslationOptionHandler),this.options.showSupportNotice!==!1&&!GR(this)&&!YR()&&(typeof console<"u"&&typeof console.info<"u"&&console.info("🌐 i18next is maintained with support from Locize — consider powering your project with managed localization (AI, CDN, integrations): https://locize.com 💙"),qR());const u=y=>y?typeof y=="function"?new y:y:null;if(!this.options.isClone){this.modules.logger?Pn.init(u(this.modules.logger),this.options):Pn.init(null,this.options);let y;this.modules.formatter?y=this.modules.formatter:y=HR;const E=new lS(this.options);this.store=new rS(this.options.resources,this.options);const x=this.services;x.logger=Pn,x.resourceStore=this.store,x.languageUtils=E,x.pluralResolver=new MR(E,{prepend:this.options.pluralSeparator,simplifyPluralSuffix:this.options.simplifyPluralSuffix}),this.options.interpolation.format&&this.options.interpolation.format!==c.interpolation.format&&this.logger.deprecate("init: you are still using the legacy format function, please use the new approach: https://www.i18next.com/translation-function/formatting"),y&&(!this.options.interpolation.format||this.options.interpolation.format===c.interpolation.format)&&(x.formatter=u(y),x.formatter.init&&x.formatter.init(x,this.options),this.options.interpolation.format=x.formatter.format.bind(x.formatter)),x.interpolator=new fS(this.options),x.utils={hasLoadedNamespace:this.hasLoadedNamespace.bind(this)},x.backendConnector=new BR(u(this.modules.backend),x.resourceStore,x,this.options),x.backendConnector.on("*",(_,...R)=>{this.emit(_,...R)}),this.modules.languageDetector&&(x.languageDetector=u(this.modules.languageDetector),x.languageDetector.init&&x.languageDetector.init(x,this.options.detection,this.options)),this.modules.i18nFormat&&(x.i18nFormat=u(this.modules.i18nFormat),x.i18nFormat.init&&x.i18nFormat.init(this)),this.translator=new Qf(this.services,this.options),this.translator.on("*",(_,...R)=>{this.emit(_,...R)}),this.modules.external.forEach(_=>{_.init&&_.init(this)})}if(this.format=this.options.interpolation.format,l||(l=Mf),this.options.fallbackLng&&!this.services.languageDetector&&!this.options.lng){const y=this.services.languageUtils.getFallbackCodes(this.options.fallbackLng);y.length>0&&y[0]!=="dev"&&(this.options.lng=y[0])}!this.services.languageDetector&&!this.options.lng&&this.logger.warn("init: no languageDetector is used and no lng is defined"),["getResource","hasResourceBundle","getResourceBundle","getDataByLanguage"].forEach(y=>{this[y]=(...E)=>this.store[y](...E)}),["addResource","addResources","addResourceBundle","removeResourceBundle"].forEach(y=>{this[y]=(...E)=>(this.store[y](...E),this)});const b=Wc(),g=()=>{const y=(E,x)=>{this.isInitializing=!1,this.isInitialized&&!this.initializedStoreOnce&&this.logger.warn("init: i18next is already initialized. You should call init just once!"),this.isInitialized=!0,this.options.isClone||this.logger.log("initialized",this.options),this.emit("initialized",this.options),b.resolve(x),l(E,x)};if(this.languages&&!this.isInitialized)return y(null,this.t.bind(this));this.changeLanguage(this.options.lng,y)};return this.options.resources||!this.options.initAsync?g():setTimeout(g,0),b}loadResources(o,l=Mf){let c=l;const u=Fe(o)?o:this.language;if(typeof o=="function"&&(c=o),!this.options.resources||this.options.partialBundledLanguages){if(u?.toLowerCase()==="cimode"&&(!this.options.preload||this.options.preload.length===0))return c();const d=[],p=b=>{if(!b||b==="cimode")return;this.services.languageUtils.toResolveHierarchy(b).forEach(y=>{y!=="cimode"&&d.indexOf(y)<0&&d.push(y)})};u?p(u):this.services.languageUtils.getFallbackCodes(this.options.fallbackLng).forEach(g=>p(g)),this.options.preload?.forEach?.(b=>p(b)),this.services.backendConnector.load(d,this.options.ns,b=>{!b&&!this.resolvedLanguage&&this.language&&this.setResolvedLanguage(this.language),c(b)})}else c(null)}reloadResources(o,l,c){const u=Wc();return typeof o=="function"&&(c=o,o=void 0),typeof l=="function"&&(c=l,l=void 0),o||(o=this.languages),l||(l=this.options.ns),c||(c=Mf),this.services.backendConnector.reload(o,l,d=>{u.resolve(),c(d)}),u}use(o){if(!o)throw new Error("You are passing an undefined module! Please check the object you are passing to i18next.use()");if(!o.type)throw new Error("You are passing a wrong module! Please check the object you are passing to i18next.use()");return o.type==="backend"&&(this.modules.backend=o),(o.type==="logger"||o.log&&o.warn&&o.error)&&(this.modules.logger=o),o.type==="languageDetector"&&(this.modules.languageDetector=o),o.type==="i18nFormat"&&(this.modules.i18nFormat=o),o.type==="postProcessor"&&R4.addPostProcessor(o),o.type==="formatter"&&(this.modules.formatter=o),o.type==="3rdParty"&&this.modules.external.push(o),this}setResolvedLanguage(o){if(!(!o||!this.languages)&&!(["cimode","dev"].indexOf(o)>-1)){for(let l=0;l<this.languages.length;l++){const c=this.languages[l];if(!(["cimode","dev"].indexOf(c)>-1)&&this.store.hasLanguageSomeTranslations(c)){this.resolvedLanguage=c;break}}!this.resolvedLanguage&&this.languages.indexOf(o)<0&&this.store.hasLanguageSomeTranslations(o)&&(this.resolvedLanguage=o,this.languages.unshift(o))}}changeLanguage(o,l){this.isLanguageChangingTo=o;const c=Wc();this.emit("languageChanging",o);const u=b=>{this.language=b,this.languages=this.services.languageUtils.toResolveHierarchy(b),this.resolvedLanguage=void 0,this.setResolvedLanguage(b)},d=(b,g)=>{g?this.isLanguageChangingTo===o&&(u(g),this.translator.changeLanguage(g),this.isLanguageChangingTo=void 0,this.emit("languageChanged",g),this.logger.log("languageChanged",g)):this.isLanguageChangingTo=void 0,c.resolve((...y)=>this.t(...y)),l&&l(b,(...y)=>this.t(...y))},p=b=>{!o&&!b&&this.services.languageDetector&&(b=[]);const g=Fe(b)?b:b&&b[0],y=this.store.hasLanguageSomeTranslations(g)?g:this.services.languageUtils.getBestMatchFromCodes(Fe(b)?[b]:b);y&&(this.language||u(y),this.translator.language||this.translator.changeLanguage(y),this.services.languageDetector?.cacheUserLanguage?.(y)),this.loadResources(y,E=>{d(E,y)})};return!o&&this.services.languageDetector&&!this.services.languageDetector.async?p(this.services.languageDetector.detect()):!o&&this.services.languageDetector&&this.services.languageDetector.async?this.services.languageDetector.detect.length===0?this.services.languageDetector.detect().then(p):this.services.languageDetector.detect(p):p(o),c}getFixedT(o,l,c){const u=(d,p,...b)=>{let g;typeof p!="object"?g=this.options.overloadTranslationOptionHandler([d,p].concat(b)):g={...p},g.lng=g.lng||u.lng,g.lngs=g.lngs||u.lngs,g.ns=g.ns||u.ns,g.keyPrefix!==""&&(g.keyPrefix=g.keyPrefix||c||u.keyPrefix);const y=this.options.keySeparator||".";let E;return g.keyPrefix&&Array.isArray(d)?E=d.map(x=>(typeof x=="function"&&(x=og(x,{...this.options,...p})),`${g.keyPrefix}${y}${x}`)):(typeof d=="function"&&(d=og(d,{...this.options,...p})),E=g.keyPrefix?`${g.keyPrefix}${y}${d}`:d),this.t(E,g)};return Fe(o)?u.lng=o:u.lngs=o,u.ns=l,u.keyPrefix=c,u}t(...o){return this.translator?.translate(...o)}exists(...o){return this.translator?.exists(...o)}setDefaultNamespace(o){this.options.defaultNS=o}hasLoadedNamespace(o,l={}){if(!this.isInitialized)return this.logger.warn("hasLoadedNamespace: i18next was not initialized",this.languages),!1;if(!this.languages||!this.languages.length)return this.logger.warn("hasLoadedNamespace: i18n.languages were undefined or empty",this.languages),!1;const c=l.lng||this.resolvedLanguage||this.languages[0],u=this.options?this.options.fallbackLng:!1,d=this.languages[this.languages.length-1];if(c.toLowerCase()==="cimode")return!0;const p=(b,g)=>{const y=this.services.backendConnector.state[`${b}|${g}`];return y===-1||y===0||y===2};if(l.precheck){const b=l.precheck(this,p);if(b!==void 0)return b}return!!(this.hasResourceBundle(c,o)||!this.services.backendConnector.backend||this.options.resources&&!this.options.partialBundledLanguages||p(c,o)&&(!u||p(d,o)))}loadNamespaces(o,l){const c=Wc();return this.options.ns?(Fe(o)&&(o=[o]),o.forEach(u=>{this.options.ns.indexOf(u)<0&&this.options.ns.push(u)}),this.loadResources(u=>{c.resolve(),l&&l(u)}),c):(l&&l(),Promise.resolve())}loadLanguages(o,l){const c=Wc();Fe(o)&&(o=[o]);const u=this.options.preload||[],d=o.filter(p=>u.indexOf(p)<0&&this.services.languageUtils.isSupportedCode(p));return d.length?(this.options.preload=u.concat(d),this.loadResources(p=>{c.resolve(),l&&l(p)}),c):(l&&l(),Promise.resolve())}dir(o){if(o||(o=this.resolvedLanguage||(this.languages?.length>0?this.languages[0]:this.language)),!o)return"rtl";try{const u=new Intl.Locale(o);if(u&&u.getTextInfo){const d=u.getTextInfo();if(d&&d.direction)return d.direction}}catch{}const l=["ar","shu","sqr","ssh","xaa","yhd","yud","aao","abh","abv","acm","acq","acw","acx","acy","adf","ads","aeb","aec","afb","ajp","apc","apd","arb","arq","ars","ary","arz","auz","avl","ayh","ayl","ayn","ayp","bbz","pga","he","iw","ps","pbt","pbu","pst","prp","prd","ug","ur","ydd","yds","yih","ji","yi","hbo","men","xmn","fa","jpr","peo","pes","prs","dv","sam","ckb"],c=this.services?.languageUtils||new lS(Lb());return o.toLowerCase().indexOf("-latn")>1?"ltr":l.indexOf(c.getLanguagePartFromCode(o))>-1||o.toLowerCase().indexOf("-arab")>1?"rtl":"ltr"}static createInstance(o={},l){const c=new cu(o,l);return c.createInstance=cu.createInstance,c}cloneInstance(o={},l=Mf){const c=o.forkResourceStore;c&&delete o.forkResourceStore;const u={...this.options,...o,isClone:!0},d=new cu(u);if((o.debug!==void 0||o.prefix!==void 0)&&(d.logger=d.logger.clone(o)),["store","services","language"].forEach(b=>{d[b]=this[b]}),d.services={...this.services},d.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},c){const b=Object.keys(this.store.data).reduce((g,y)=>(g[y]={...this.store.data[y]},g[y]=Object.keys(g[y]).reduce((E,x)=>(E[x]={...g[y][x]},E),g[y]),g),{});d.store=new rS(b,u),d.services.resourceStore=d.store}if(o.interpolation){const g={...Lb().interpolation,...this.options.interpolation,...o.interpolation},y={...u,interpolation:g};d.services.interpolator=new fS(y)}return d.translator=new Qf(d.services,u),d.translator.on("*",(b,...g)=>{d.emit(b,...g)}),d.init(u,l),d.translator.options=u,d.translator.backendConnector.services.utils={hasLoadedNamespace:d.hasLoadedNamespace.bind(d)},d}toJSON(){return{options:this.options,store:this.store,language:this.language,languages:this.languages,resolvedLanguage:this.resolvedLanguage}}}const as=cu.createInstance();as.createInstance;as.dir;as.init;as.loadResources;as.reloadResources;as.use;as.changeLanguage;as.getFixedT;as.t;as.exists;as.setDefaultNamespace;as.hasLoadedNamespace;as.loadNamespaces;as.loadLanguages;var N=bu();const gl=vR(N),PR=xR({__proto__:null,default:gl},[N]),FR=(n,o,l,c)=>{const u=[l,{code:o,...c||{}}];if(n?.services?.logger?.forward)return n.services.logger.forward(u,"warn","react-i18next::",!0);ci(u[0])&&(u[0]=`react-i18next:: ${u[0]}`),n?.services?.logger?.warn?n.services.logger.warn(...u):console?.warn&&console.warn(...u)},hS={},C4=(n,o,l,c)=>{ci(l)&&hS[l]||(ci(l)&&(hS[l]=new Date),FR(n,o,l,c))},j4=(n,o)=>()=>{if(n.isInitialized)o();else{const l=()=>{setTimeout(()=>{n.off("initialized",l)},0),o()};n.on("initialized",l)}},rg=(n,o,l)=>{n.loadNamespaces(o,j4(n,l))},bS=(n,o,l,c)=>{if(ci(l)&&(l=[l]),n.options.preload&&n.options.preload.indexOf(o)>-1)return rg(n,l,c);l.forEach(u=>{n.options.ns.indexOf(u)<0&&n.options.ns.push(u)}),n.loadLanguages(o,j4(n,c))},XR=(n,o,l={})=>!o.languages||!o.languages.length?(C4(o,"NO_LANGUAGES","i18n.languages were undefined or empty",{languages:o.languages}),!0):o.hasLoadedNamespace(n,{lng:l.lng,precheck:(c,u)=>{if(l.bindI18n&&l.bindI18n.indexOf("languageChanging")>-1&&c.services.backendConnector.backend&&c.isLanguageChangingTo&&!u(c.isLanguageChangingTo,n))return!1}}),ci=n=>typeof n=="string",QR=n=>typeof n=="object"&&n!==null,ZR=/&(?:amp|#38|lt|#60|gt|#62|apos|#39|quot|#34|nbsp|#160|copy|#169|reg|#174|hellip|#8230|#x2F|#47);/g,JR={"&amp;":"&","&#38;":"&","&lt;":"<","&#60;":"<","&gt;":">","&#62;":">","&apos;":"'","&#39;":"'","&quot;":'"',"&#34;":'"',"&nbsp;":" ","&#160;":" ","&copy;":"©","&#169;":"©","&reg;":"®","&#174;":"®","&hellip;":"…","&#8230;":"…","&#x2F;":"/","&#47;":"/"},KR=n=>JR[n],WR=n=>n.replace(ZR,KR);let ig={bindI18n:"languageChanged",bindI18nStore:"",transEmptyNodeValue:"",transSupportBasicHtmlNodes:!0,transWrapTextNodes:"",transKeepBasicHtmlNodesFor:["br","strong","i","p"],useSuspense:!0,unescape:WR,transDefaultProps:void 0};const ek=(n={})=>{ig={...ig,...n}},tk=()=>ig;let T4;const ak=n=>{T4=n},sk=()=>T4,nk={type:"3rdParty",init(n){ek(n.options.react),ak(n)}},ok=N.createContext();class rk{constructor(){this.usedNamespaces={}}addUsedNamespaces(o){o.forEach(l=>{this.usedNamespaces[l]||(this.usedNamespaces[l]=!0)})}getUsedNamespaces(){return Object.keys(this.usedNamespaces)}}var Hb={exports:{}},$b={},gS;function ik(){if(gS)return $b;gS=1;return(function(){function n(_,R){return _===R&&(_!==0||1/_===1/R)||_!==_&&R!==R}function o(_,R){E||u.startTransition===void 0||(E=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var z=R();if(!x){var H=R();d(z,H)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),x=!0)}H=p({inst:{value:z,getSnapshot:R}});var Y=H[0].inst,K=H[1];return g(function(){Y.value=z,Y.getSnapshot=R,l(Y)&&K({inst:Y})},[_,z,R]),b(function(){return l(Y)&&K({inst:Y}),_(function(){l(Y)&&K({inst:Y})})},[_]),y(z),z}function l(_){var R=_.getSnapshot;_=_.value;try{var z=R();return!d(_,z)}catch{return!0}}function c(_,R){return R()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var u=bu(),d=typeof Object.is=="function"?Object.is:n,p=u.useState,b=u.useEffect,g=u.useLayoutEffect,y=u.useDebugValue,E=!1,x=!1,S=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?c:o;$b.useSyncExternalStore=u.useSyncExternalStore!==void 0?u.useSyncExternalStore:S,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),$b}var yS;function lk(){return yS||(yS=1,Hb.exports=ik()),Hb.exports}var ck=lk();const uk=(n,o)=>ci(o)?o:QR(o)&&ci(o.defaultValue)?o.defaultValue:Array.isArray(n)?n[n.length-1]:n,dk={t:uk,ready:!1},fk=()=>()=>{},Ie=(n,o={})=>{const{i18n:l}=o,{i18n:c,defaultNS:u}=N.useContext(ok)||{},d=l||c||sk();d&&!d.reportNamespaces&&(d.reportNamespaces=new rk),d||C4(d,"NO_I18NEXT_INSTANCE","useTranslation: You will need to pass in an i18next instance by using initReactI18next");const p=N.useMemo(()=>({...tk(),...d?.options?.react,...o}),[d,o]),{useSuspense:b,keyPrefix:g}=p,y=u||d?.options?.defaultNS,E=ci(y)?[y]:y||["translation"],x=N.useMemo(()=>E,E);d?.reportNamespaces?.addUsedNamespaces?.(x);const S=N.useRef(0),_=N.useCallback(G=>{if(!d)return fk;const{bindI18n:I,bindI18nStore:be}=p,se=()=>{S.current+=1,G()};return I&&d.on(I,se),be&&d.store.on(be,se),()=>{I&&I.split(" ").forEach(ae=>d.off(ae,se)),be&&be.split(" ").forEach(ae=>d.store.off(ae,se))}},[d,p]),R=N.useRef(),z=N.useCallback(()=>{if(!d)return dk;const G=!!(d.isInitialized||d.initializedStoreOnce)&&x.every(De=>XR(De,d,p)),I=o.lng||d.language,be=S.current,se=R.current;if(se&&se.ready===G&&se.lng===I&&se.keyPrefix===g&&se.revision===be)return se;const pe={t:d.getFixedT(I,p.nsMode==="fallback"?x:x[0],g),ready:G,lng:I,keyPrefix:g,revision:be};return R.current=pe,pe},[d,x,g,p,o.lng]),[H,Y]=N.useState(0),{t:K,ready:Z}=ck.useSyncExternalStore(_,z,z);N.useEffect(()=>{if(d&&!Z&&!b){const G=()=>Y(I=>I+1);o.lng?bS(d,o.lng,x,G):rg(d,x,G)}},[d,o.lng,x,Z,b,H]);const J=d||{},ee=N.useRef(null),ce=N.useRef(),de=G=>{const I=Object.getOwnPropertyDescriptors(G);I.__original&&delete I.__original;const be=Object.create(Object.getPrototypeOf(G),I);if(!Object.prototype.hasOwnProperty.call(be,"__original"))try{Object.defineProperty(be,"__original",{value:G,writable:!1,enumerable:!1,configurable:!1})}catch{}return be},k=N.useMemo(()=>{const G=J,I=G?.language;let be=G;G&&(ee.current&&ee.current.__original===G?ce.current!==I?(be=de(G),ee.current=be,ce.current=I):be=ee.current:(be=de(G),ee.current=be,ce.current=I));const se=[K,be,Z];return se.t=K,se.i18n=be,se.ready=Z,se},[K,J,Z,J.resolvedLanguage,J.language,J.languages]);if(d&&b&&!Z)throw new Promise(G=>{const I=()=>G();o.lng?bS(d,o.lng,x,I):rg(d,x,I)});return k},{slice:mk,forEach:pk}=[];function hk(n){return pk.call(mk.call(arguments,1),o=>{if(o)for(const l in o)n[l]===void 0&&(n[l]=o[l])}),n}function bk(n){return typeof n!="string"?!1:[/<\s*script.*?>/i,/<\s*\/\s*script\s*>/i,/<\s*img.*?on\w+\s*=/i,/<\s*\w+\s*on\w+\s*=.*?>/i,/javascript\s*:/i,/vbscript\s*:/i,/expression\s*\(/i,/eval\s*\(/i,/alert\s*\(/i,/document\.cookie/i,/document\.write\s*\(/i,/window\.location/i,/innerHTML/i].some(l=>l.test(n))}const xS=/^[\u0009\u0020-\u007e\u0080-\u00ff]+$/,gk=function(n,o){const c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{path:"/"},u=encodeURIComponent(o);let d=`${n}=${u}`;if(c.maxAge>0){const p=c.maxAge-0;if(Number.isNaN(p))throw new Error("maxAge should be a Number");d+=`; Max-Age=${Math.floor(p)}`}if(c.domain){if(!xS.test(c.domain))throw new TypeError("option domain is invalid");d+=`; Domain=${c.domain}`}if(c.path){if(!xS.test(c.path))throw new TypeError("option path is invalid");d+=`; Path=${c.path}`}if(c.expires){if(typeof c.expires.toUTCString!="function")throw new TypeError("option expires is invalid");d+=`; Expires=${c.expires.toUTCString()}`}if(c.httpOnly&&(d+="; HttpOnly"),c.secure&&(d+="; Secure"),c.sameSite)switch(typeof c.sameSite=="string"?c.sameSite.toLowerCase():c.sameSite){case!0:d+="; SameSite=Strict";break;case"lax":d+="; SameSite=Lax";break;case"strict":d+="; SameSite=Strict";break;case"none":d+="; SameSite=None";break;default:throw new TypeError("option sameSite is invalid")}return c.partitioned&&(d+="; Partitioned"),d},vS={create(n,o,l,c){let u=arguments.length>4&&arguments[4]!==void 0?arguments[4]:{path:"/",sameSite:"strict"};l&&(u.expires=new Date,u.expires.setTime(u.expires.getTime()+l*60*1e3)),c&&(u.domain=c),document.cookie=gk(n,o,u)},read(n){const o=`${n}=`,l=document.cookie.split(";");for(let c=0;c<l.length;c++){let u=l[c];for(;u.charAt(0)===" ";)u=u.substring(1,u.length);if(u.indexOf(o)===0)return u.substring(o.length,u.length)}return null},remove(n,o){this.create(n,"",-1,o)}};var yk={name:"cookie",lookup(n){let{lookupCookie:o}=n;if(o&&typeof document<"u")return vS.read(o)||void 0},cacheUserLanguage(n,o){let{lookupCookie:l,cookieMinutes:c,cookieDomain:u,cookieOptions:d}=o;l&&typeof document<"u"&&vS.create(l,n,c,u,d)}},xk={name:"querystring",lookup(n){let{lookupQuerystring:o}=n,l;if(typeof window<"u"){let{search:c}=window.location;!window.location.search&&window.location.hash?.indexOf("?")>-1&&(c=window.location.hash.substring(window.location.hash.indexOf("?")));const d=c.substring(1).split("&");for(let p=0;p<d.length;p++){const b=d[p].indexOf("=");b>0&&d[p].substring(0,b)===o&&(l=d[p].substring(b+1))}}return l}},vk={name:"hash",lookup(n){let{lookupHash:o,lookupFromHashIndex:l}=n,c;if(typeof window<"u"){const{hash:u}=window.location;if(u&&u.length>2){const d=u.substring(1);if(o){const p=d.split("&");for(let b=0;b<p.length;b++){const g=p[b].indexOf("=");g>0&&p[b].substring(0,g)===o&&(c=p[b].substring(g+1))}}if(c)return c;if(!c&&l>-1){const p=u.match(/\/([a-zA-Z-]*)/g);return Array.isArray(p)?p[typeof l=="number"?l:0]?.replace("/",""):void 0}}}return c}};let ml=null;const NS=()=>{if(ml!==null)return ml;try{if(ml=typeof window<"u"&&window.localStorage!==null,!ml)return!1;const n="i18next.translate.boo";window.localStorage.setItem(n,"foo"),window.localStorage.removeItem(n)}catch{ml=!1}return ml};var Nk={name:"localStorage",lookup(n){let{lookupLocalStorage:o}=n;if(o&&NS())return window.localStorage.getItem(o)||void 0},cacheUserLanguage(n,o){let{lookupLocalStorage:l}=o;l&&NS()&&window.localStorage.setItem(l,n)}};let pl=null;const SS=()=>{if(pl!==null)return pl;try{if(pl=typeof window<"u"&&window.sessionStorage!==null,!pl)return!1;const n="i18next.translate.boo";window.sessionStorage.setItem(n,"foo"),window.sessionStorage.removeItem(n)}catch{pl=!1}return pl};var Sk={name:"sessionStorage",lookup(n){let{lookupSessionStorage:o}=n;if(o&&SS())return window.sessionStorage.getItem(o)||void 0},cacheUserLanguage(n,o){let{lookupSessionStorage:l}=o;l&&SS()&&window.sessionStorage.setItem(l,n)}},wk={name:"navigator",lookup(n){const o=[];if(typeof navigator<"u"){const{languages:l,userLanguage:c,language:u}=navigator;if(l)for(let d=0;d<l.length;d++)o.push(l[d]);c&&o.push(c),u&&o.push(u)}return o.length>0?o:void 0}},Ek={name:"htmlTag",lookup(n){let{htmlTag:o}=n,l;const c=o||(typeof document<"u"?document.documentElement:null);return c&&typeof c.getAttribute=="function"&&(l=c.getAttribute("lang")),l}},Dk={name:"path",lookup(n){let{lookupFromPathIndex:o}=n;if(typeof window>"u")return;const l=window.location.pathname.match(/\/([a-zA-Z-]*)/g);return Array.isArray(l)?l[typeof o=="number"?o:0]?.replace("/",""):void 0}},_k={name:"subdomain",lookup(n){let{lookupFromSubdomainIndex:o}=n;const l=typeof o=="number"?o+1:1,c=typeof window<"u"&&window.location?.hostname?.match(/^(\w{2,5})\.(([a-z0-9-]{1,63}\.[a-z]{2,6})|localhost)/i);if(c)return c[l]}};let O4=!1;try{document.cookie,O4=!0}catch{}const A4=["querystring","cookie","localStorage","sessionStorage","navigator","htmlTag"];O4||A4.splice(1,1);const Rk=()=>({order:A4,lookupQuerystring:"lng",lookupCookie:"i18next",lookupLocalStorage:"i18nextLng",lookupSessionStorage:"i18nextLng",caches:["localStorage"],excludeCacheFor:["cimode"],convertDetectedLanguage:n=>n});class V4{constructor(o){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};this.type="languageDetector",this.detectors={},this.init(o,l)}init(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{languageUtils:{}},l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},c=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};this.services=o,this.options=hk(l,this.options||{},Rk()),typeof this.options.convertDetectedLanguage=="string"&&this.options.convertDetectedLanguage.indexOf("15897")>-1&&(this.options.convertDetectedLanguage=u=>u.replace("-","_")),this.options.lookupFromUrlIndex&&(this.options.lookupFromPathIndex=this.options.lookupFromUrlIndex),this.i18nOptions=c,this.addDetector(yk),this.addDetector(xk),this.addDetector(Nk),this.addDetector(Sk),this.addDetector(wk),this.addDetector(Ek),this.addDetector(Dk),this.addDetector(_k),this.addDetector(vk)}addDetector(o){return this.detectors[o.name]=o,this}detect(){let o=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.options.order,l=[];return o.forEach(c=>{if(this.detectors[c]){let u=this.detectors[c].lookup(this.options);u&&typeof u=="string"&&(u=[u]),u&&(l=l.concat(u))}}),l=l.filter(c=>c!=null&&!bk(c)).map(c=>this.options.convertDetectedLanguage(c)),this.services&&this.services.languageUtils&&this.services.languageUtils.getBestMatchFromCodes?l:l.length>0?l[0]:null}cacheUserLanguage(o){let l=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.options.caches;l&&(this.options.excludeCacheFor&&this.options.excludeCacheFor.indexOf(o)>-1||l.forEach(c=>{this.detectors[c]&&this.detectors[c].cacheUserLanguage(o,this.options)}))}}V4.type="languageDetector";const kk={"nav.home":"Home","nav.studio":"Studio","nav.docs":"Docs","nav.login":"Login","nav.logout":"Logout","header.status.connected":"Connected","header.status.disconnected":"Disconnected","header.status.reconnecting":"Reconnecting","footer.copyright":"GitHub · @Context4AI {{year}}. All rights reserved.","footer.copyright_compact":"@Context4AI {{year}}. All rights reserved.","footer.tagline":"Knowledge Factory","footer.theme.dark":"Dark","footer.theme.light":"Light","footer.theme.system":"System","studio.sidebar.sources":"Sources","studio.sidebar.modeling":"Modeling","studio.sidebar.brain":"Brain","studio.sidebar.discovery":"Discovery","studio.sidebar.sharing":"Sharing","studio.sidebar.collaboration":"Collaboration","studio.sidebar.settings":"Settings","placeholder.coming":"Coming in {{version}}","page.login.title":"Login","page.login.description":"Authentication and user management.","page.docs.title":"Docs","page.docs.description":"Public documentation portal.","page.sources.title":"Sources","page.sources.description":"Add code repositories, documents, and other input materials for your brain to index.","page.modeling.title":"Modeling","page.modeling.description":"Model indexed content with AI — only what stands up to scrutiny gets written to the knowledge graph.","page.brain.title":"Brain","page.brain.description":"All modeled knowledge lives here — browse, search, analyze, and use it anytime.","page.discovery.title":"Discovery","page.discovery.description":"Explore knowledge curated by others and add what's useful to your own brain.","page.sharing.title":"Sharing","page.sharing.description":"Package and export knowledge from your brain for others and AI to use directly.","page.collaboration.title":"Collaboration","page.collaboration.description":"Stay in sync with other brains — get notified on updates, no manual transfer needed.","page.settings.title":"Settings","page.settings.description":"Manage workspace members and configuration.","page.code_setup.title":"Code Setup","page.code_setup.description":"Repository selection and configuration for code modeling.","page.code_compile.title":"Code Compile","page.code_compile.description":"Compilation progress tracking for code modeling.","page.code_review.title":"Code Review","page.code_review.description":"Review and approve modeling results.","page.code_result.title":"Code Result","page.code_result.description":"View final modeling results and generated knowledge graph.","home.hero.title":"Context For AI","home.hero.description":"Transform code repositories and business documents into structured knowledge graphs.","home.hero.cta.studio":"Enter Studio","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"The page you're looking for doesn't exist.","notfound.back":"Back to Home","error.description":"Something went wrong. Please try again.","error.reload":"Reload","sources.menu.add_client":"Add Client","sources.menu.online":"online","sources.menu.offline":"offline","sources.menu.status_online":"{{machine}} connected","sources.menu.status_offline":"{{machine}} not connected, click for setup guide","sources.library.default_cloud_name":"Personal Cloud","sources.library.rename":"Rename","sources.library.rename_placeholder":"Enter library name","sources.header.daemon_status":"{{online}}/{{total}} online","sources.header.all_offline":"All offline","sources.actions.new_folder":"New Folder","sources.folder.name_placeholder":"Enter folder name","sources.actions.import_repo":"Import Repository","sources.actions.rename":"Rename","sources.actions.move_to":"Move to...","sources.actions.delete":"Delete","sources.filter.all":"All","sources.filter.indexed":"Indexed","sources.filter.not_indexed":"Not Indexed","sources.status.none":"None","sources.status.indexed":"Indexed","sources.status.stale":"Index outdated","sources.status.go_index":"Index","sources.type.code":"Code","sources.type.doc":"Document","sources.empty.cloud.title":"Your personal knowledge input zone","sources.empty.cloud.description":"Create folders to organize your documents and materials. These are visible only to you and will serve as the foundation for building your digital brain.","sources.empty.daemon.title":"Connect your local code assets","sources.empty.daemon.description":"Import local code repositories. The system will automatically extract code structures and technical documents, transforming them into structured knowledge.","sources.empty.indexed.title":"Knowledge not yet indexed","sources.empty.indexed.description":"Select sources and complete indexing. They will be transformed into structured summaries, providing material for your future speculations.","sources.empty.folder.title":"This folder is empty","sources.empty.folder.daemon_description":"You can add or edit documents locally, and they will appear here after the next sync.","sources.safety.notice.repo":"In local mode, your code has absolute privacy. Source code never leaves your computer. The system only extracts structured summaries for knowledge modeling (function signatures, dependencies, etc.).","sources.safety.notice.dir":"The system extracts document content and summaries for knowledge modeling. Although unsafe text is filtered, please ensure sensitive data is not included in indexing or modeling.","sources.import.title":"Import Repository","sources.import.step.select":"Select Repository","sources.import.step.version":"Select Version","sources.import.step.confirm":"Import Complete","sources.import.daemon_offline":"Client {{name}} is not connected. Please start the local Daemon and connect to the server before importing.","sources.import.view_guide":"View Connection Guide","sources.import.select_root":"Select repository root directory","sources.import.current_path":"Current path","sources.import.not_git":"This directory is not a Git repository. Please select a directory containing .git.","sources.import.branch":"Branch","sources.import.commit":"Commit","sources.import.branch_warning":"Currently based on {{branch}} branch HEAD","sources.import.uncommitted_warning":"Uncommitted changes will not be collected","sources.import.recognized":"Recognized {{packages}} packages and {{docs}} documents","sources.import.no_packages":"No package structure detected. Will be imported as a single-package repository.","sources.import.confirm_heading":"About to import the following repository to {{name}}:","sources.import.packages":"Packages","sources.import.documents":"Documents","sources.import.loading_repo":"Loading repository info...","sources.import.loading_repo_slow":"Large repositories (>10 GB) may take 5–10 seconds...","sources.import.importing":"Importing...","sources.import.error_title":"Import Failed","sources.import.success":"Import complete","sources.import.stage.prepare":"Preparing environment","sources.import.stage.clone":"Cloning repository","sources.import.stage.scan":"Scanning project","sources.import.stage.save":"Saving sources","sources.import.stage.done_suffix":"done","sources.import.stage.complete":"Import complete","sources.import.step.loading":"Data Import","sources.import.done":"Done","sources.import.back":"Back","sources.import.retry":"Retry","sources.add_client.title":"Connect Local Knowledge Source","sources.add_client.description":"Start a client (Daemon) on your local computer to mount local code repositories as input material into your digital brain.","sources.add_client.step1":"Install Daemon","sources.add_client.step2":"Start Daemon","sources.add_client.step2_allow":"Restrict access to specific directories (does not affect existing imports)","sources.add_client.step3":"Wait for connection","sources.add_client.step3_desc":"This page will update automatically once connected.","sources.add_client.waiting":"Waiting for new client connection...","sources.add_client.detected":"New client detected","sources.add_client.machine_name":"Machine ID","sources.add_client.os":"Operating system","sources.add_client.daemon_version":"Daemon version","sources.add_client.client_name":"Client name","sources.add_client.confirm":"Confirm Add","sources.add_client.reconnected":"Client {{name}} has reconnected","sources.add_client.go_to":"Go to {{name}}","sources.detail.tab.original":"Original","sources.detail.tab.overview":"Overview","sources.detail.tab.digest":"Digest","sources.detail.tab.modeling":"Modeling Result","sources.detail.digest_placeholder":"Structured summary will be available here after indexing is complete.","sources.detail.modeling_placeholder":"Knowledge entities derived from this source will appear here after modeling in the speculation zone.","sources.detail.type":"Type","sources.detail.origin":"Origin","sources.detail.origin.upload":"Upload","sources.detail.origin.local":"Local file","sources.detail.path":"Path","sources.detail.status":"Status","sources.detail.repo":"Repository","sources.detail.branch":"Branch","sources.detail.commit":"Commit","sources.detail.tech_stack":"Tech stack","sources.detail.original_code_placeholder":"Package overview will be available after indexing.","sources.detail.original_doc_placeholder":"Document content will be available after upload.","sources.detail.dependencies":"Dependencies","sources.delete.confirm_title":"Confirm Delete","sources.delete.resource":"Are you sure you want to delete {{name}}?","sources.delete.resource_impact":"The following data will be permanently deleted: original content, structured digest (if any).","sources.delete.session_warning":"If your personal speculation zone is using this source, related candidate speculations will be affected.","sources.delete.entity_safe":"Formal knowledge already merged into the brain will not be affected.","sources.delete.folder":"Are you sure you want to delete folder {{name}}?","sources.delete.folder_impact":"All resources inside will be recursively deleted: {{folders}} sub-folders, {{sources}} sources.","sources.delete.folder_contents":"Contains {{folders}} sub-folders, {{sources}} sources.","sources.delete.folder_impact_generic":"All sub-folders and resources inside will be recursively deleted.","sources.delete.irreversible":"This action cannot be undone.","sources.delete.repo":"Are you sure you want to remove repository {{name}} from {{library}}?","sources.delete.repo_impact":"Will delete: {{packages}} package index records, {{docs}} document index records.","sources.delete.repo_contents":"Contains {{packages}} packages, {{docs}} documents.","sources.delete.indexed_hint":"{{indexed}}/{{total}} have been indexed; their index data will be deleted.","sources.delete.repo_impact_generic":"All package and document index records will be deleted.","sources.delete.local_safe":"Local files will not be affected.","sources.delete.client":"Are you sure you want to delete client {{name}}?","sources.delete.client_impact":"All imported repository records and related index data under this client will be deleted.","sources.delete.client_reregister":"This client will need to re-register on next connection.","sources.error.name_conflict":'An item named "{{name}}" already exists in this directory.',"sources.move.current":"Current","sources.move.target":"Move to","sources.breadcrumb.sources":"Sources","common.cancel":"Cancel","common.confirm":"Confirm","common.back":"Back","common.next":"Next","common.previous":"Previous","common.items":"{{count}} items","common.loading":"Loading...","sources.import.no_entries":"No entries found","sources.import.allowed_dirs":"Client authorized directories","sources.import.allowed_dirs_tooltip_restrict":"Restrict to specific directories:","sources.import.allowed_dirs_tooltip_all":"Or allow all directories (default):","sources.import.wildcard_home":"Home","sources.import.wildcard_path_placeholder":"Enter a directory path…","sources.import.wildcard_go":"Go","sources.import.wildcard_goto":"Go to","sources.import.wildcard_go_title":"Go to Directory","sources.import.wildcard_path_not_found":"Path does not exist on the remote machine","sources.import.already_imported":"Imported","sources.import.dir_title":"Import Directory","sources.import.dir_step.select":"Select Directory","sources.import.dir_step.scan":"Scan","sources.import.dir_step.confirm":"Confirm Import","sources.import.dir_confirm_heading":"About to import the following directory to {{name}}:","sources.import.dir_name":"Directory Name","sources.import.dir_name_hint":"Display name in the source tree after import. Leave empty to use the default repository name.","sources.import.dir_name_duplicate":"This name already exists. Please use a different name.","sources.import.dir_path":"Directory Path","sources.import.dir_files":"Files","sources.import.dir_subdirs":"Subdirectories","sources.import.dir_git_repos":"Repositories (skipped)","sources.import.dir_git_hint":"Git repositories inside the directory will not be expanded for indexing. Import them separately if needed.","sources.import.dir_scanning":"Scanning directory contents...","sources.import.dir_scan_complete":"Scan complete","sources.import.dir_scan_error":"Failed to scan directory","sources.import.dir_scan_retry":"Retry","sources.import.dir_code_packages":"Code Packages","sources.import.dir_code_packages_tip":"Supported: package.json, pyproject.toml, setup.py, go.mod, Cargo.toml, pom.xml, build.gradle","sources.import.dir_doc_files":"Documents","sources.import.dir_doc_files_tip":"Supported: Markdown (.md)","sources.import.dir_total_files":"Total Files","sources.import.dir_total_dirs":"Directories","sources.import.dir_git_skip_hint":"Git repos are skipped. Use 'Import Repository' instead.","sources.actions.upload":"Upload","sources.actions.upload_md":"Markdown Document","sources.actions.upload_doc":"Document","sources.actions.add":"Add","sources.actions.add_folder":"Folder","sources.actions.add_web":"Web Page","sources.actions.add_feishu":"Feishu Document","sources.actions.import_dir":"Import Directory","sources.actions.import_repo_url":"Import Repository","sources.upgrade.title":"Feature Upgrading","sources.upgrade.description":"This feature will be available in version 0.5.x. Stay tuned.","sources.upload.title":"Upload Documents","sources.upload.drop_hint":"Click to select or drag files here","sources.upload.supported_formats":"Supported: .md, .doc, .docx, .pdf, .ppt, .pptx, .txt (max 5MB each, up to 10 files)","sources.upload.file_too_large":'"{{name}}" exceeds 5MB limit',"sources.upload.too_many_files":"Maximum 10 files allowed, please re-select","sources.upload.unsupported_type":'"{{name}}" is not a supported file type',"sources.upload.uploading":"Uploading...","sources.upload.success":"Uploaded {{count}} documents","sources.upload.selected":"{{count}} files selected","sources.upload.remove":"Remove","sources.import_remote.title":"Import Remote Repository","sources.import_remote.step.loading":"Data Import","sources.import_remote.url_label":"Repository URL","sources.import_remote.url_placeholder":"https://github.com/org/repo.git","sources.import_remote.url_hint_format":"Only HTTPS URLs are accepted. SSH support is planned for a future release","sources.import_remote.url_hint_public":"Supports public Git repositories without authentication, and Git services with OAuth configured: ","sources.import_remote.url_hint_no_auth":"Supports public Git repositories and Git services with OAuth configured","sources.import_remote.url_invalid":"Only HTTPS Git URLs are supported","sources.import_remote.ref_label":"Branch / Tag","sources.import_remote.ref_branches":"Branches","sources.import_remote.ref_tags":"Tags","sources.import_remote.ref_search":"Search branches or tags…","sources.import_remote.commit_label":"Commit","sources.import_remote.commit_hint":"Auto-filled with the latest commit of selected branch. You can also type or search","sources.import_remote.commit_search":"Search commit…","sources.import_remote.loading_refs":"Querying repository branches...","sources.import_remote.summary_repo":"Repository","sources.import_remote.summary_branch":"Branch","sources.import_remote.summary_commit":"Commit","sources.import_remote.commit_latest":"(latest)","sources.import_remote.stage.prepare":"Preparing environment","sources.import_remote.stage.clone":"Cloning repository","sources.import_remote.stage.scan":"Scanning project","sources.import_remote.stage.save":"Saving sources","sources.import_remote.complete":"Import complete","sources.import_remote.back_to_library":"Done","sources.import_remote.retry":"Retry","sources.import_remote.back":"Back","sources.import_remote.error.auth_required":"This repository requires authentication. Please configure an access token for {{host}} in Server Settings → Git Tokens.","sources.import_remote.error.auth_failed":"Authentication failed. Please check your Git token configuration.","sources.import_remote.error.not_found":"Repository not found or no access. Please check the URL.","sources.import_remote.error.network":"Cannot connect to the remote repository. Please check your network or try again later.","sources.import_remote.error.capacity":"Import queue is full. Please try again later.","sources.import_remote.error.clone_failed":"Clone failed","sources.import_remote.error.scan_failed":"Scan failed","sources.import_remote.error.save_failed":"Save failed","sources.change_detection.has_updates":"Has updates","sources.change_detection.reimport":"Re-import","sources.safety.notice.remote":"The remote repository will be cloned to the server for analysis. Code will not be uploaded to any third-party services."},Uk={"nav.home":"首页","nav.studio":"工作台","nav.docs":"文档","nav.login":"登录","nav.logout":"退出登录","header.status.connected":"已连接","header.status.disconnected":"已断开","header.status.reconnecting":"重连中","footer.copyright":"GitHub · @Context4AI {{year}}. 版权所有","footer.copyright_compact":"@Context4AI {{year}}. 版权所有","footer.tagline":"知识工厂","footer.theme.dark":"暗色","footer.theme.light":"亮色","footer.theme.system":"跟随系统","studio.sidebar.sources":"知识索引","studio.sidebar.modeling":"知识建模","studio.sidebar.brain":"知识大脑","studio.sidebar.discovery":"发现知识","studio.sidebar.sharing":"分享知识","studio.sidebar.collaboration":"知识协同","studio.sidebar.settings":"设置","placeholder.coming":"计划在 {{version}} 版本实现","page.login.title":"登录","page.login.description":"身份验证与用户管理。","page.docs.title":"文档","page.docs.description":"公开文档门户。","page.sources.title":"知识索引","page.sources.description":"添加代码仓库、文档等输入材料,让大脑完成初步索引。","page.modeling.title":"知识建模","page.modeling.description":"和 AI 一起对索引内容建模,只有经得起推敲的才写入知识图谱。","page.brain.title":"知识大脑","page.brain.description":"建模完成的全部知识都在这里——浏览、搜索、分析,随时调用。","page.discovery.title":"发现知识","page.discovery.description":"看看别人整理好的知识,发现有用的一键补充到自己的大脑。","page.sharing.title":"分享知识","page.sharing.description":"把大脑中的知识打包输出,让别人和 AI 都能直接使用。","page.collaboration.title":"知识协同","page.collaboration.description":"和其他大脑保持同步,知识更新时自动通知,不用手动搬运。","page.settings.title":"设置","page.settings.description":"管理大脑的成员和配置。","page.code_setup.title":"代码设置","page.code_setup.description":"代码建模的仓库选择与配置。","page.code_compile.title":"代码编译","page.code_compile.description":"代码建模的编译进度追踪。","page.code_review.title":"代码审查","page.code_review.description":"审查并确认建模结果。","page.code_result.title":"代码结果","page.code_result.description":"查看最终建模结果与生成的知识图谱。","home.hero.title":"Context For AI","home.hero.description":"将代码仓库和业务文档转化为结构化知识图谱。","home.hero.cta.studio":"进入工作台","home.hero.cta.github":"GitHub","notfound.title":"404","notfound.description":"您访问的页面不存在。","notfound.back":"返回首页","error.description":"页面出现了问题,请重试。","error.reload":"重新加载","sources.menu.add_client":"添加客户端","sources.menu.online":"在线","sources.menu.offline":"离线","sources.menu.status_online":"{{machine}} 已连接","sources.menu.status_offline":"{{machine}} 未连接,点击前往教程","sources.library.default_cloud_name":"个人云","sources.library.rename":"重命名","sources.library.rename_placeholder":"输入名称","sources.header.daemon_status":"{{online}}/{{total}} 在线","sources.header.all_offline":"全部离线","sources.actions.new_folder":"新文件夹","sources.folder.name_placeholder":"输入文件夹名称","sources.actions.import_repo":"导入仓库","sources.actions.rename":"重命名","sources.actions.move_to":"移动到...","sources.actions.delete":"删除","sources.filter.all":"全部","sources.filter.indexed":"已索引","sources.filter.not_indexed":"未索引","sources.status.none":"未索引","sources.status.indexed":"已索引","sources.status.stale":"有新变更未更新索引","sources.status.go_index":"去索引","sources.type.code":"代码","sources.type.doc":"文档","sources.empty.cloud.title":"这里是你专属的知识输入区","sources.empty.cloud.description":"创建文件夹来整理你的文档和材料。这些内容仅你个人可见,将成为后续推演、构建数字大脑的基础。","sources.empty.daemon.title":"连接你的本地代码资产","sources.empty.daemon.description":"导入本地代码仓库,系统会自动提取代码结构与技术文档,将其转化为结构化知识。","sources.empty.indexed.title":"这些知识尚未被索引","sources.empty.indexed.description":"选择资源并完成索引后,它们将转化为结构化摘要,为你后续的推演提供素材。","sources.empty.folder.title":"当前文件夹还没有内容","sources.empty.folder.daemon_description":"你可以在本地进行文档新增、编辑后查看。","sources.safety.notice.repo":"在本地模式下,你的代码保有绝对隐私,源代码永远不会离开你的电脑,系统仅提取用于知识建模的结构化摘要(函数签名、依赖关系等)。","sources.safety.notice.dir":"系统会提取用于知识建模的文档内容及摘要,尽管会过滤不安全的文本内容,但请确保敏感数据不要参与索引及建模。","sources.import.title":"导入代码仓库","sources.import.step.select":"选择仓库","sources.import.step.version":"选择版本","sources.import.step.confirm":"导入完成","sources.import.daemon_offline":"客户端 {{name}} 未连接,请先启动本地 Daemon 并连接到服务器后再导入仓库。","sources.import.view_guide":"查看连接指引","sources.import.select_root":"选择仓库根目录","sources.import.current_path":"当前路径","sources.import.not_git":"该目录不是 Git 仓库,请选择包含 .git 的目录。","sources.import.branch":"分支","sources.import.commit":"提交","sources.import.branch_warning":"当前基于 {{branch}} 分支的 HEAD","sources.import.uncommitted_warning":"未提交的修改不会被采集","sources.import.recognized":"已识别 {{packages}} 个包和 {{docs}} 篇文档","sources.import.no_packages":"未识别到包结构,将作为单包仓库导入。","sources.import.confirm_heading":"即将导入以下仓库到 {{name}}:","sources.import.packages":"包数","sources.import.documents":"文档","sources.import.loading_repo":"正在加载仓库信息...","sources.import.loading_repo_slow":"大型仓库(>10 GB)可能需要 5~10 秒...","sources.import.importing":"导入中...","sources.import.error_title":"导入失败","sources.import.success":"导入完成","sources.import.stage.prepare":"准备执行环境","sources.import.stage.clone":"克隆仓库","sources.import.stage.scan":"扫描项目","sources.import.stage.save":"保存数据源","sources.import.stage.done_suffix":"✓","sources.import.stage.complete":"导入完成","sources.import.step.loading":"数据导入","sources.import.done":"完成","sources.import.back":"返回","sources.import.retry":"重试","sources.add_client.title":"接入本地知识源","sources.add_client.description":"在本地计算机上启动客户端 (Daemon),即可将本地代码仓库作为输入材料,挂载到你的数字大脑中。","sources.add_client.step1":"安装 Daemon","sources.add_client.step2":"启动 Daemon","sources.add_client.step2_allow":"限制访问目录(不影响已有导入)","sources.add_client.step3":"等待连接","sources.add_client.step3_desc":"连接成功后,本页面将自动更新。","sources.add_client.waiting":"等待新的客户端连接...","sources.add_client.detected":"检测到新的本地客户端","sources.add_client.machine_name":"机器标识","sources.add_client.os":"操作系统","sources.add_client.daemon_version":"Daemon 版本","sources.add_client.client_name":"客户端名称","sources.add_client.confirm":"确认添加","sources.add_client.reconnected":"客户端 {{name}} 已重新连接","sources.add_client.go_to":"前往 {{name}}","sources.detail.tab.original":"原文","sources.detail.tab.overview":"概览","sources.detail.tab.digest":"摘要","sources.detail.tab.modeling":"建模结果","sources.detail.digest_placeholder":"完成索引后,即可在此查看结构化摘要。","sources.detail.modeling_placeholder":"在推演区完成建模后,此处将展示由该源产生的知识实体。","sources.detail.type":"类型","sources.detail.origin":"来源","sources.detail.origin.upload":"直接上传","sources.detail.origin.local":"本地文件","sources.detail.path":"路径","sources.detail.status":"状态","sources.detail.repo":"仓库","sources.detail.branch":"分支","sources.detail.commit":"提交","sources.detail.tech_stack":"技术栈","sources.detail.original_code_placeholder":"完成索引后即可查看包概览。","sources.detail.original_doc_placeholder":"文档内容将在上传后展示。","sources.detail.dependencies":"依赖","sources.delete.confirm_title":"确认删除","sources.delete.resource":"确定要删除 {{name}}?","sources.delete.resource_impact":"以下数据将被永久删除:原文内容、结构化摘要(如有)。","sources.delete.session_warning":"如果你的个人推演区正在使用此知识源,相关的候选推演将受到影响。","sources.delete.entity_safe":"已汇入大脑的正式知识不受影响。","sources.delete.folder":"确定要删除文件夹 {{name}}?","sources.delete.folder_impact":"文件夹内的所有资源将被递归删除:{{folders}} 个子文件夹、{{sources}} 个知识源。","sources.delete.folder_contents":"包含 {{folders}} 个子文件夹、{{sources}} 个知识源。","sources.delete.folder_impact_generic":"文件夹内的所有子文件夹和知识源将被递归删除。","sources.delete.irreversible":"此操作不可撤销。","sources.delete.repo":"确定要从 {{library}} 中移除仓库 {{name}}?","sources.delete.repo_impact":"将删除:{{packages}} 个包的索引记录、{{docs}} 篇文档的索引记录。","sources.delete.repo_contents":"包含 {{packages}} 个包、{{docs}} 个文档。","sources.delete.indexed_hint":"其中 {{indexed}}/{{total}} 个已建立索引,索引数据将被删除。","sources.delete.repo_impact_generic":"所有包和文档的索引记录将被删除。","sources.delete.local_safe":"本地文件不受影响。","sources.delete.client":"确定要删除客户端 {{name}}?","sources.delete.client_impact":"该客户端下的所有已导入仓库记录和相关索引数据将被删除。","sources.delete.client_reregister":"该客户端下次连接时将触发重新注册。","sources.error.name_conflict":'该目录下已存在同名项"{{name}}"。',"sources.move.current":"当前位置","sources.move.target":"移动到","sources.breadcrumb.sources":"知识索引","common.cancel":"取消","common.confirm":"确认","common.back":"返回","common.next":"下一步","common.previous":"上一步","common.items":"{{count}} 项","common.loading":"加载中...","sources.import.no_entries":"未找到任何条目","sources.import.allowed_dirs":"客户端授权目录","sources.import.allowed_dirs_tooltip_restrict":"通过参数设定有权限的目录:","sources.import.allowed_dirs_tooltip_all":"或默认允许全部目录:","sources.import.wildcard_home":"主目录","sources.import.wildcard_path_placeholder":"输入目录路径…","sources.import.wildcard_go":"前往","sources.import.wildcard_goto":"前往","sources.import.wildcard_go_title":"前往目录","sources.import.wildcard_path_not_found":"该路径在远程机器上不存在","sources.import.already_imported":"已导入","sources.import.dir_title":"导入目录","sources.import.dir_step.select":"选择目录","sources.import.dir_step.scan":"扫描","sources.import.dir_step.confirm":"确认导入","sources.import.dir_confirm_heading":"即将导入以下目录到 {{name}}:","sources.import.dir_name":"目录名","sources.import.dir_name_hint":"导入后在目录树中的显示名称,留空使用默认仓库名。","sources.import.dir_name_duplicate":"该名称已存在,请使用其他名称。","sources.import.dir_path":"目录路径","sources.import.dir_files":"文件数","sources.import.dir_subdirs":"子目录数","sources.import.dir_git_repos":"仓库(已跳过)","sources.import.dir_git_hint":"目录内的 Git 仓库不会被展开索引,如需索引请单独导入仓库。","sources.import.dir_scanning":"正在扫描目录内容...","sources.import.dir_scan_complete":"扫描完成","sources.import.dir_scan_error":"目录扫描失败","sources.import.dir_scan_retry":"重试","sources.import.dir_code_packages":"代码包","sources.import.dir_code_packages_tip":"支持:package.json、pyproject.toml、setup.py、go.mod、Cargo.toml、pom.xml、build.gradle","sources.import.dir_doc_files":"文档","sources.import.dir_doc_files_tip":"支持:Markdown (.md)","sources.import.dir_total_files":"文件总数","sources.import.dir_total_dirs":"目录","sources.import.dir_git_skip_hint":"Git 仓库将被跳过,建议单独使用「导入仓库」。","sources.actions.upload":"上传","sources.actions.upload_md":"Markdown 文档","sources.actions.upload_doc":"文档","sources.actions.add":"新增","sources.actions.add_folder":"文件夹","sources.actions.add_web":"网页","sources.actions.add_feishu":"飞书文档","sources.actions.import_dir":"导入目录","sources.actions.import_repo_url":"导入仓库","sources.upgrade.title":"功能升级中","sources.upgrade.description":"此功能将在 0.5.x 版本中推出,敬请期待。","sources.upload.title":"上传文档","sources.upload.drop_hint":"点击选择文件或拖拽至此","sources.upload.supported_formats":"支持格式:.md, .doc, .docx, .pdf, .ppt, .pptx, .txt(每个最大 5MB,最多 10 个)","sources.upload.file_too_large":'"{{name}}" 超过 5MB 限制',"sources.upload.too_many_files":"最多上传 10 个文件,请重新选择","sources.upload.unsupported_type":'"{{name}}" 不是支持的文件类型',"sources.upload.uploading":"上传中...","sources.upload.success":"已上传 {{count}} 个文档","sources.upload.selected":"已选择 {{count}} 个文件","sources.upload.remove":"移除","sources.import_remote.title":"导入远程仓库","sources.import_remote.step.loading":"数据导入","sources.import_remote.url_label":"仓库地址","sources.import_remote.url_placeholder":"https://github.com/org/repo.git","sources.import_remote.url_hint_format":"仅接受 HTTPS 地址,SSH 地址未来版本支持","sources.import_remote.url_hint_public":"除了支持无需鉴权的公开 Git 仓库,也支持已配置 OAuth 的 Git 服务:","sources.import_remote.url_hint_no_auth":"除了支持无需鉴权的公开 Git 仓库,也支持已配置 OAuth 的 Git 服务","sources.import_remote.url_invalid":"仅支持 HTTPS 格式的 Git URL","sources.import_remote.ref_label":"分支 / Tag","sources.import_remote.ref_branches":"分支","sources.import_remote.ref_tags":"Tag","sources.import_remote.ref_search":"搜索分支或 Tag…","sources.import_remote.commit_label":"Commit","sources.import_remote.commit_hint":"已自动填入所选分支最新 commit,也可手动输入或搜索","sources.import_remote.commit_search":"搜索 commit…","sources.import_remote.loading_refs":"正在查询仓库分支...","sources.import_remote.summary_repo":"仓库","sources.import_remote.summary_branch":"分支","sources.import_remote.summary_commit":"Commit","sources.import_remote.commit_latest":"(latest)","sources.import_remote.stage.prepare":"准备执行环境","sources.import_remote.stage.clone":"克隆仓库","sources.import_remote.stage.scan":"识别项目结构","sources.import_remote.stage.save":"写入知识源","sources.import_remote.complete":"导入完成","sources.import_remote.back_to_library":"完成","sources.import_remote.retry":"重试","sources.import_remote.back":"返回","sources.import_remote.error.auth_required":"该仓库需要认证。请在 服务设置 → Git 令牌 中配置 {{host}} 的访问令牌。","sources.import_remote.error.auth_failed":"认证失败,请检查 Git 令牌配置。","sources.import_remote.error.not_found":"仓库不存在或无权访问。请检查 URL 是否正确。","sources.import_remote.error.network":"无法连接到远程仓库。请检查网络或稍后重试。","sources.import_remote.error.capacity":"当前导入任务已满,请稍后再试。","sources.import_remote.error.clone_failed":"克隆失败","sources.import_remote.error.scan_failed":"识别失败","sources.import_remote.error.save_failed":"写入失败","sources.change_detection.has_updates":"有更新","sources.change_detection.reimport":"重新导入","sources.safety.notice.remote":"远程仓库将被克隆到服务器本地进行分析,代码不会上传到任何第三方服务。"};as.use(V4).use(nk).init({resources:{en:{translation:kk},zh:{translation:Uk}},fallbackLng:"en",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"lang"}});var Bb={exports:{}},eu={},Ib={exports:{}},Yb={},wS;function Ck(){return wS||(wS=1,(function(n){(function(){function o(){if(ee=!1,G){var te=n.unstable_now();se=te;var ue=!0;try{e:{Z=!1,J&&(J=!1,de(I),I=-1),K=!0;var ne=Y;try{t:{for(p(te),H=c(_);H!==null&&!(H.expirationTime>te&&g());){var he=H.callback;if(typeof he=="function"){H.callback=null,Y=H.priorityLevel;var Te=he(H.expirationTime<=te);if(te=n.unstable_now(),typeof Te=="function"){H.callback=Te,p(te),ue=!0;break t}H===c(_)&&u(_),p(te)}else u(_);H=c(_)}if(H!==null)ue=!0;else{var P=c(R);P!==null&&y(b,P.startTime-te),ue=!1}}break e}finally{H=null,Y=ne,K=!1}ue=void 0}}finally{ue?ae():G=!1}}}function l(te,ue){var ne=te.length;te.push(ue);e:for(;0<ne;){var he=ne-1>>>1,Te=te[he];if(0<d(Te,ue))te[he]=ue,te[ne]=Te,ne=he;else break e}}function c(te){return te.length===0?null:te[0]}function u(te){if(te.length===0)return null;var ue=te[0],ne=te.pop();if(ne!==ue){te[0]=ne;e:for(var he=0,Te=te.length,P=Te>>>1;he<P;){var fe=2*(he+1)-1,Re=te[fe],we=fe+1,lt=te[we];if(0>d(Re,ne))we<Te&&0>d(lt,Re)?(te[he]=lt,te[we]=ne,he=we):(te[he]=Re,te[fe]=ne,he=fe);else if(we<Te&&0>d(lt,ne))te[he]=lt,te[we]=ne,he=we;else break e}}return ue}function d(te,ue){var ne=te.sortIndex-ue.sortIndex;return ne!==0?ne:te.id-ue.id}function p(te){for(var ue=c(R);ue!==null;){if(ue.callback===null)u(R);else if(ue.startTime<=te)u(R),ue.sortIndex=ue.expirationTime,l(_,ue);else break;ue=c(R)}}function b(te){if(J=!1,p(te),!Z)if(c(_)!==null)Z=!0,G||(G=!0,ae());else{var ue=c(R);ue!==null&&y(b,ue.startTime-te)}}function g(){return ee?!0:!(n.unstable_now()-se<be)}function y(te,ue){I=ce(function(){te(n.unstable_now())},ue)}if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error()),n.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var E=performance;n.unstable_now=function(){return E.now()}}else{var x=Date,S=x.now();n.unstable_now=function(){return x.now()-S}}var _=[],R=[],z=1,H=null,Y=3,K=!1,Z=!1,J=!1,ee=!1,ce=typeof setTimeout=="function"?setTimeout:null,de=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate<"u"?setImmediate:null,G=!1,I=-1,be=5,se=-1;if(typeof k=="function")var ae=function(){k(o)};else if(typeof MessageChannel<"u"){var pe=new MessageChannel,De=pe.port2;pe.port1.onmessage=o,ae=function(){De.postMessage(null)}}else ae=function(){ce(o,0)};n.unstable_IdlePriority=5,n.unstable_ImmediatePriority=1,n.unstable_LowPriority=4,n.unstable_NormalPriority=3,n.unstable_Profiling=null,n.unstable_UserBlockingPriority=2,n.unstable_cancelCallback=function(te){te.callback=null},n.unstable_forceFrameRate=function(te){0>te||125<te?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):be=0<te?Math.floor(1e3/te):5},n.unstable_getCurrentPriorityLevel=function(){return Y},n.unstable_next=function(te){switch(Y){case 1:case 2:case 3:var ue=3;break;default:ue=Y}var ne=Y;Y=ue;try{return te()}finally{Y=ne}},n.unstable_requestPaint=function(){ee=!0},n.unstable_runWithPriority=function(te,ue){switch(te){case 1:case 2:case 3:case 4:case 5:break;default:te=3}var ne=Y;Y=te;try{return ue()}finally{Y=ne}},n.unstable_scheduleCallback=function(te,ue,ne){var he=n.unstable_now();switch(typeof ne=="object"&&ne!==null?(ne=ne.delay,ne=typeof ne=="number"&&0<ne?he+ne:he):ne=he,te){case 1:var Te=-1;break;case 2:Te=250;break;case 5:Te=1073741823;break;case 4:Te=1e4;break;default:Te=5e3}return Te=ne+Te,te={id:z++,callback:ue,priorityLevel:te,startTime:ne,expirationTime:Te,sortIndex:-1},ne>he?(te.sortIndex=ne,l(R,te),c(_)===null&&te===c(R)&&(J?(de(I),I=-1):J=!0,y(b,ne-he))):(te.sortIndex=Te,l(_,te),Z||K||(Z=!0,G||(G=!0,ae()))),te},n.unstable_shouldYield=g,n.unstable_wrapCallback=function(te){var ue=Y;return function(){var ne=Y;Y=ue;try{return te.apply(this,arguments)}finally{Y=ne}}},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()})(Yb)),Yb}var ES;function jk(){return ES||(ES=1,Ib.exports=Ck()),Ib.exports}var qb={exports:{}},Ia={},DS;function Tk(){if(DS)return Ia;DS=1;return(function(){function n(){}function o(x){return""+x}function l(x,S,_){var R=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;try{o(R);var z=!1}catch{z=!0}return z&&(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&&R[Symbol.toStringTag]||R.constructor.name||"Object"),o(R)),{$$typeof:y,key:R==null?null:""+R,children:x,containerInfo:S,implementation:_}}function c(x,S){if(x==="font")return"";if(typeof S=="string")return S==="use-credentials"?S:""}function u(x){return x===null?"`null`":x===void 0?"`undefined`":x===""?"an empty string":'something with type "'+typeof x+'"'}function d(x){return x===null?"`null`":x===void 0?"`undefined`":x===""?"an empty string":typeof x=="string"?JSON.stringify(x):typeof x=="number"?"`"+x+"`":'something with type "'+typeof x+'"'}function p(){var x=E.H;return x===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:
19
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
20
+ 2. You might be breaking the Rules of Hooks
21
+ 3. You might have more than one copy of React in the same app
22
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),x}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var b=bu(),g={d:{f:n,r:function(){throw Error("Invalid form element. requestFormReset must be passed a form that was rendered by React.")},D:n,C:n,L:n,m:n,X:n,S:n,M:n},p:0,findDOMNode:null},y=Symbol.for("react.portal"),E=b.__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"),Ia.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=g,Ia.createPortal=function(x,S){var _=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!S||S.nodeType!==1&&S.nodeType!==9&&S.nodeType!==11)throw Error("Target container is not a DOM element.");return l(x,S,null,_)},Ia.flushSync=function(x){var S=E.T,_=g.p;try{if(E.T=null,g.p=2,x)return x()}finally{E.T=S,g.p=_,g.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.")}},Ia.preconnect=function(x,S){typeof x=="string"&&x?S!=null&&typeof S!="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.",d(S)):S!=null&&typeof S.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.",u(S.crossOrigin)):console.error("ReactDOM.preconnect(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",u(x)),typeof x=="string"&&(S?(S=S.crossOrigin,S=typeof S=="string"?S==="use-credentials"?S:"":void 0):S=null,g.d.C(x,S))},Ia.prefetchDNS=function(x){if(typeof x!="string"||!x)console.error("ReactDOM.prefetchDNS(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",u(x));else if(1<arguments.length){var S=arguments[1];typeof S=="object"&&S.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`.",d(S)):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`.",d(S))}typeof x=="string"&&g.d.D(x)},Ia.preinit=function(x,S){if(typeof x=="string"&&x?S==null||typeof S!="object"?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.",d(S)):S.as!=="style"&&S.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".',d(S.as)):console.error("ReactDOM.preinit(): Expected the `href` argument (first) to be a non-empty string but encountered %s instead.",u(x)),typeof x=="string"&&S&&typeof S.as=="string"){var _=S.as,R=c(_,S.crossOrigin),z=typeof S.integrity=="string"?S.integrity:void 0,H=typeof S.fetchPriority=="string"?S.fetchPriority:void 0;_==="style"?g.d.S(x,typeof S.precedence=="string"?S.precedence:void 0,{crossOrigin:R,integrity:z,fetchPriority:H}):_==="script"&&g.d.X(x,{crossOrigin:R,integrity:z,fetchPriority:H,nonce:typeof S.nonce=="string"?S.nonce:void 0})}},Ia.preinitModule=function(x,S){var _="";typeof x=="string"&&x||(_+=" The `href` argument encountered was "+u(x)+"."),S!==void 0&&typeof S!="object"?_+=" The `options` argument encountered was "+u(S)+".":S&&"as"in S&&S.as!=="script"&&(_+=" The `as` option encountered was "+d(S.as)+"."),_?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",_):(_=S&&typeof S.as=="string"?S.as:"script",_)==="script"||(_=d(_),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)',_,x)),typeof x=="string"&&(typeof S=="object"&&S!==null?(S.as==null||S.as==="script")&&(_=c(S.as,S.crossOrigin),g.d.M(x,{crossOrigin:_,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0})):S==null&&g.d.M(x))},Ia.preload=function(x,S){var _="";if(typeof x=="string"&&x||(_+=" The `href` argument encountered was "+u(x)+"."),S==null||typeof S!="object"?_+=" The `options` argument encountered was "+u(S)+".":typeof S.as=="string"&&S.as||(_+=" The `as` option encountered was "+u(S.as)+"."),_&&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',_),typeof x=="string"&&typeof S=="object"&&S!==null&&typeof S.as=="string"){_=S.as;var R=c(_,S.crossOrigin);g.d.L(x,_,{crossOrigin:R,integrity:typeof S.integrity=="string"?S.integrity:void 0,nonce:typeof S.nonce=="string"?S.nonce:void 0,type:typeof S.type=="string"?S.type:void 0,fetchPriority:typeof S.fetchPriority=="string"?S.fetchPriority:void 0,referrerPolicy:typeof S.referrerPolicy=="string"?S.referrerPolicy:void 0,imageSrcSet:typeof S.imageSrcSet=="string"?S.imageSrcSet:void 0,imageSizes:typeof S.imageSizes=="string"?S.imageSizes:void 0,media:typeof S.media=="string"?S.media:void 0})}},Ia.preloadModule=function(x,S){var _="";typeof x=="string"&&x||(_+=" The `href` argument encountered was "+u(x)+"."),S!==void 0&&typeof S!="object"?_+=" The `options` argument encountered was "+u(S)+".":S&&"as"in S&&typeof S.as!="string"&&(_+=" The `as` option encountered was "+u(S.as)+"."),_&&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',_),typeof x=="string"&&(S?(_=c(S.as,S.crossOrigin),g.d.m(x,{as:typeof S.as=="string"&&S.as!=="script"?S.as:void 0,crossOrigin:_,integrity:typeof S.integrity=="string"?S.integrity:void 0})):g.d.m(x))},Ia.requestFormReset=function(x){g.d.r(x)},Ia.unstable_batchedUpdates=function(x,S){return x(S)},Ia.useFormState=function(x,S,_){return p().useFormState(x,S,_)},Ia.useFormStatus=function(){return p().useHostTransitionStatus()},Ia.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),Ia}var _S;function Ok(){return _S||(_S=1,qb.exports=Tk()),qb.exports}var RS;function Ak(){if(RS)return eu;RS=1;return(function(){function n(e,t){for(e=e.memoizedState;e!==null&&0<t;)e=e.next,t--;return e}function o(e,t,a,s){if(a>=t.length)return s;var r=t[a],i=xa(e)?e.slice():nt({},e);return i[r]=o(e[r],t,a+1,s),i}function l(e,t,a){if(t.length!==a.length)console.warn("copyWithRename() expects paths of the same length");else{for(var s=0;s<a.length-1;s++)if(t[s]!==a[s]){console.warn("copyWithRename() expects paths to be the same except for the deepest key");return}return c(e,t,a,0)}}function c(e,t,a,s){var r=t[s],i=xa(e)?e.slice():nt({},e);return s+1===t.length?(i[a[s]]=i[r],xa(i)?i.splice(r,1):delete i[r]):i[r]=c(e[r],t,a,s+1),i}function u(e,t,a){var s=t[a],r=xa(e)?e.slice():nt({},e);return a+1===t.length?(xa(r)?r.splice(s,1):delete r[s],r):(r[s]=u(e[s],t,a+1),r)}function d(){return!1}function p(){return null}function b(){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 g(){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 y(){}function E(){}function x(e){var t=[];return e.forEach(function(a){t.push(a)}),t.sort().join(", ")}function S(e,t,a,s){return new rE(e,t,a,s)}function _(e,t){e.context===Qo&&(Wp(e.current,2,t,e,null,null),Ei())}function R(e,t){if(Ls!==null){var a=t.staleFamilies;t=t.updatedFamilies,Xl(),ny(e.current,t,a),Ei()}}function z(e){Ls=e}function H(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Y(e){var t=e,a=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(a=t.return),e=t.return;while(e)}return t.tag===3?a:null}function K(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 Z(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 J(e){if(Y(e)!==e)throw Error("Unable to find node on an unmounted component.")}function ee(e){var t=e.alternate;if(!t){if(t=Y(e),t===null)throw Error("Unable to find node on an unmounted component.");return t!==e?null:e}for(var a=e,s=t;;){var r=a.return;if(r===null)break;var i=r.alternate;if(i===null){if(s=r.return,s!==null){a=s;continue}break}if(r.child===i.child){for(i=r.child;i;){if(i===a)return J(r),e;if(i===s)return J(r),t;i=i.sibling}throw Error("Unable to find node on an unmounted component.")}if(a.return!==s.return)a=r,s=i;else{for(var m=!1,h=r.child;h;){if(h===a){m=!0,a=r,s=i;break}if(h===s){m=!0,s=r,a=i;break}h=h.sibling}if(!m){for(h=i.child;h;){if(h===a){m=!0,a=i,s=r;break}if(h===s){m=!0,s=i,a=r;break}h=h.sibling}if(!m)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(a.alternate!==s)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(a.tag!==3)throw Error("Unable to find node on an unmounted component.");return a.stateNode.current===a?e:t}function ce(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=ce(e),t!==null)return t;e=e.sibling}return null}function de(e){return e===null||typeof e!="object"?null:(e=dv&&e[dv]||e["@@iterator"],typeof e=="function"?e:null)}function k(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===kD?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case ji:return"Fragment";case rh:return"Profiler";case kd:return"StrictMode";case lh:return"Suspense";case ch:return"SuspenseList";case uh: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 Ci:return"Portal";case Mn:return e.displayName||"Context";case ih:return(e._context.displayName||"Context")+".Consumer";case nc:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ud:return t=e.displayName||null,t!==null?t:k(e.type)||"Memo";case Ns:t=e._payload,e=e._init;try{return k(e(t))}catch{}}return null}function G(e){return typeof e.tag=="number"?I(e):typeof e.name=="string"?e.name:null}function I(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("+e+")":"ForwardRef");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 k(t);case 8:return t===kd?"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 a=t.length-1;0<=a;a--)if(typeof t[a].name=="string")return t[a].name}if(e.return!==null)return I(e.return)}return null}function be(e){return{current:e}}function se(e,t){0>no?console.error("Unexpected pop."):(t!==fh[no]&&console.error("Unexpected Fiber popped."),e.current=dh[no],dh[no]=null,fh[no]=null,no--)}function ae(e,t,a){no++,dh[no]=e.current,fh[no]=a,e.current=t}function pe(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 De(e,t){ae(Yo,t,e),ae(oc,e,e),ae(Io,null,e);var a=t.nodeType;switch(a){case 9:case 11:a=a===9?"#document":"#fragment",t=(t=t.documentElement)&&(t=t.namespaceURI)?V0(t):vo;break;default:if(a=t.tagName,t=t.namespaceURI)t=V0(t),t=M0(t,a);else switch(a){case"svg":t=dl;break;case"math":t=kf;break;default:t=vo}}a=a.toLowerCase(),a=wu(null,a),a={context:t,ancestorInfo:a},se(Io,e),ae(Io,a,e)}function te(e){se(Io,e),se(oc,e),se(Yo,e)}function ue(){return pe(Io.current)}function ne(e){e.memoizedState!==null&&ae(Cd,e,e);var t=pe(Io.current),a=e.type,s=M0(t.context,a);a=wu(t.ancestorInfo,a),s={context:s,ancestorInfo:a},t!==s&&(ae(oc,e,e),ae(Io,s,e))}function he(e){oc.current===e&&(se(Io,e),se(oc,e)),Cd.current===e&&(se(Cd,e),Zc._currentValue=ni)}function Te(){}function P(){if(rc===0){fv=console.log,mv=console.info,pv=console.warn,hv=console.error,bv=console.group,gv=console.groupCollapsed,yv=console.groupEnd;var e={configurable:!0,enumerable:!0,value:Te,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}rc++}function fe(){if(rc--,rc===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:nt({},e,{value:fv}),info:nt({},e,{value:mv}),warn:nt({},e,{value:pv}),error:nt({},e,{value:hv}),group:nt({},e,{value:bv}),groupCollapsed:nt({},e,{value:gv}),groupEnd:nt({},e,{value:yv})})}0>rc&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function Re(e){var t=Error.prepareStackTrace;if(Error.prepareStackTrace=void 0,e=e.stack,Error.prepareStackTrace=t,e.startsWith(`Error: react-stack-top-frame
23
+ `)&&(e=e.slice(29)),t=e.indexOf(`
24
+ `),t!==-1&&(e=e.slice(t+1)),t=e.indexOf("react_stack_bottom_frame"),t!==-1&&(t=e.lastIndexOf(`
25
+ `,t)),t!==-1)e=e.slice(0,t);else return"";return e}function we(e){if(mh===void 0)try{throw Error()}catch(a){var t=a.stack.trim().match(/\n( *(at )?)/);mh=t&&t[1]||"",xv=-1<a.stack.indexOf(`
26
+ at`)?" (<anonymous>)":-1<a.stack.indexOf("@")?"@unknown:0:0":""}return`
27
+ `+mh+e+xv}function lt(e,t){if(!e||ph)return"";var a=hh.get(e);if(a!==void 0)return a;ph=!0,a=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var s=null;s=Q.H,Q.H=null,P();try{var r={DetermineComponentFrameRoot:function(){try{if(t){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(ge){var q=ge}Reflect.construct(e,[],j)}else{try{j.call()}catch(ge){q=ge}e.call(j.prototype)}}else{try{throw Error()}catch(ge){q=ge}(j=e())&&typeof j.catch=="function"&&j.catch(function(){})}}catch(ge){if(ge&&q&&typeof ge.stack=="string")return[ge.stack,q.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var m=r.DetermineComponentFrameRoot(),h=m[0],v=m[1];if(h&&v){var D=h.split(`
28
+ `),M=v.split(`
29
+ `);for(m=i=0;i<D.length&&!D[i].includes("DetermineComponentFrameRoot");)i++;for(;m<M.length&&!M[m].includes("DetermineComponentFrameRoot");)m++;if(i===D.length||m===M.length)for(i=D.length-1,m=M.length-1;1<=i&&0<=m&&D[i]!==M[m];)m--;for(;1<=i&&0<=m;i--,m--)if(D[i]!==M[m]){if(i!==1||m!==1)do if(i--,m--,0>m||D[i]!==M[m]){var L=`
30
+ `+D[i].replace(" at new "," at ");return e.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",e.displayName)),typeof e=="function"&&hh.set(e,L),L}while(1<=i&&0<=m);break}}}finally{ph=!1,Q.H=s,fe(),Error.prepareStackTrace=a}return D=(D=e?e.displayName||e.name:"")?we(D):"",typeof e=="function"&&hh.set(e,D),D}function Ut(e,t){switch(e.tag){case 26:case 27:case 5:return we(e.type);case 16:return we("Lazy");case 13:return e.child!==t&&t!==null?we("Suspense Fallback"):we("Suspense");case 19:return we("SuspenseList");case 0:case 15:return lt(e.type,!1);case 11:return lt(e.type.render,!1);case 1:return lt(e.type,!0);case 31:return we("Activity");default:return""}}function Je(e){try{var t="",a=null;do{t+=Ut(e,a);var s=e._debugInfo;if(s)for(var r=s.length-1;0<=r;r--){var i=s[r];if(typeof i.name=="string"){var m=t;e:{var h=i.name,v=i.env,D=i.debugLocation;if(D!=null){var M=Re(D),L=M.lastIndexOf(`
31
+ `),j=L===-1?M:M.slice(L+1);if(j.indexOf(h)!==-1){var q=`
32
+ `+j;break e}}q=we(h+(v?" ["+v+"]":""))}t=m+q}}a=e,e=e.return}while(e);return t}catch(ge){return`
33
+ Error generating stack: `+ge.message+`
34
+ `+ge.stack}}function yt(e){return(e=e?e.displayName||e.name:"")?we(e):""}function Ct(){if(Ss===null)return null;var e=Ss._debugOwner;return e!=null?G(e):null}function ra(){if(Ss===null)return"";var e=Ss;try{var t="";switch(e.tag===6&&(e=e.return),e.tag){case 26:case 27:case 5:t+=we(e.type);break;case 13:t+=we("Suspense");break;case 19:t+=we("SuspenseList");break;case 31:t+=we("Activity");break;case 30:case 0:case 15:case 1:e._debugOwner||t!==""||(t+=yt(e.type));break;case 11:e._debugOwner||t!==""||(t+=yt(e.type.render))}for(;e;)if(typeof e.tag=="number"){var a=e;e=a._debugOwner;var s=a._debugStack;if(e&&s){var r=Re(s);r!==""&&(t+=`
35
+ `+r)}}else if(e.debugStack!=null){var i=e.debugStack;(e=e.owner)&&i&&(t+=`
36
+ `+Re(i))}else break;var m=t}catch(h){m=`
37
+ Error generating stack: `+h.message+`
38
+ `+h.stack}return m}function ye(e,t,a,s,r,i,m){var h=Ss;ot(e);try{return e!==null&&e._debugTask?e._debugTask.run(t.bind(null,a,s,r,i,m)):t(a,s,r,i,m)}finally{ot(h)}throw Error("runWithFiberInDEV should never be called in production. This is a bug in React.")}function ot(e){Q.getCurrentStack=e===null?null:ra,zn=!1,Ss=e}function ct(e){return typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object"}function jt(e){try{return qt(e),!1}catch{return!0}}function qt(e){return""+e}function Xe(e,t){if(jt(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,ct(e)),qt(e)}function xt(e,t){if(jt(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,ct(e)),qt(e)}function ba(e){if(jt(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.",ct(e)),qt(e)}function ds(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{Oi=t.inject(e),$a=t}catch(a){console.error("React instrumentation encountered an error: %o.",a)}return!!t.checkDCE}function Ee(e){if(typeof VD=="function"&&MD(e),$a&&typeof $a.setStrictMode=="function")try{$a.setStrictMode(Oi,e)}catch(t){Ln||(Ln=!0,console.error("React instrumentation encountered an error: %o",t))}}function qa(e){return e>>>=0,e===0?32:31-(zD(e)/LD|0)|0}function Gt(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 Wt(e,t,a){var s=e.pendingLanes;if(s===0)return 0;var r=0,i=e.suspendedLanes,m=e.pingedLanes;e=e.warmLanes;var h=s&134217727;return h!==0?(s=h&~i,s!==0?r=Gt(s):(m&=h,m!==0?r=Gt(m):a||(a=h&~e,a!==0&&(r=Gt(a))))):(h=s&~i,h!==0?r=Gt(h):m!==0?r=Gt(m):a||(a=s&~e,a!==0&&(r=Gt(a)))),r===0?0:t!==0&&t!==r&&(t&i)===0&&(i=r&-r,a=t&-t,i>=a||i===32&&(a&4194048)!==0)?t:r}function ea(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function Sa(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 _e(){var e=Od;return Od<<=1,(Od&62914560)===0&&(Od=4194304),e}function Pe(e){for(var t=[],a=0;31>a;a++)t.push(e);return t}function tt(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function Ht(e,t,a,s,r,i){var m=e.pendingLanes;e.pendingLanes=a,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=a,e.entangledLanes&=a,e.errorRecoveryDisabledLanes&=a,e.shellSuspendCounter=0;var h=e.entanglements,v=e.expirationTimes,D=e.hiddenUpdates;for(a=m&~a;0<a;){var M=31-Fa(a),L=1<<M;h[M]=0,v[M]=-1;var j=D[M];if(j!==null)for(D[M]=null,M=0;M<j.length;M++){var q=j[M];q!==null&&(q.lane&=-536870913)}a&=~L}s!==0&&$t(e,s,0),i!==0&&r===0&&e.tag!==0&&(e.suspendedLanes|=i&~(m&~t))}function $t(e,t,a){e.pendingLanes|=t,e.suspendedLanes&=~t;var s=31-Fa(t);e.entangledLanes|=t,e.entanglements[s]=e.entanglements[s]|1073741824|a&261930}function ta(e,t){var a=e.entangledLanes|=t;for(e=e.entanglements;a;){var s=31-Fa(a),r=1<<s;r&t|e[s]&t&&(e[s]|=t),a&=~r}}function ga(e,t){var a=t&-t;return a=(a&42)!==0?1:wa(a),(a&(e.suspendedLanes|t))!==0?0:a}function wa(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 ja(e,t,a){if(Hn)for(e=e.pendingUpdatersLaneMap;0<a;){var s=31-Fa(a),r=1<<s;e[s].add(t),a&=~r}}function ia(e,t){if(Hn)for(var a=e.pendingUpdatersLaneMap,s=e.memoizedUpdaters;0<t;){var r=31-Fa(t);e=1<<r,r=a[r],0<r.size&&(r.forEach(function(i){var m=i.alternate;m!==null&&s.has(m)||s.add(i)}),r.clear()),t&=~e}}function fs(e){return e&=-e,Vs<e?$n<e?(e&134217727)!==0?oo:Ad:$n:Vs}function ke(){var e=St.p;return e!==0?e:(e=window.event,e===void 0?oo:nv(e.type))}function w(e,t){var a=St.p;try{return St.p=e,t()}finally{St.p=a}}function A(e){delete e[Va],delete e[Xa],delete e[vh],delete e[HD],delete e[$D]}function O(e){var t=e[Va];if(t)return t;for(var a=e.parentNode;a;){if(t=a[Go]||a[Va]){if(a=t.alternate,t.child!==null||a!==null&&a.child!==null)for(e=q0(e);e!==null;){if(a=e[Va])return a;e=q0(e)}return t}e=a,a=e.parentNode}return null}function B(e){if(e=e[Va]||e[Go]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function oe(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error("getNodeFromInstance: Invalid argument.")}function Ne(e){var t=e[vv];return t||(t=e[vv]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function le(e){e[ic]=!0}function $e(e,t){Me(e,t),Me(e+"Capture",t)}function Me(e,t){Vr[e]&&console.error("EventRegistry: More than one plugin attempted to publish the same registration name, `%s`.",e),Vr[e]=t;var a=e.toLowerCase();for(Nh[a]=e,e==="onDoubleClick"&&(Nh.ondblclick=e),e=0;e<t.length;e++)Nv.add(t[e])}function Dt(e,t){BD[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 ya(e){return on.call(wv,e)?!0:on.call(Sv,e)?!1:ID.test(e)?wv[e]=!0:(Sv[e]=!0,console.error("Invalid attribute name: `%s`",e),!1)}function js(e,t,a){if(ya(t)){if(!e.hasAttribute(t)){switch(typeof a){case"symbol":case"object":return a;case"function":return a;case"boolean":if(a===!1)return a}return a===void 0?void 0:null}return e=e.getAttribute(t),e===""&&a===!0?!0:(Xe(a,t),e===""+a?a:e)}}function Ts(e,t,a){if(ya(t))if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var s=t.toLowerCase().slice(0,5);if(s!=="data-"&&s!=="aria-"){e.removeAttribute(t);return}}Xe(a,t),e.setAttribute(t,""+a)}}function Ro(e,t,a){if(a===null)e.removeAttribute(t);else{switch(typeof a){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}Xe(a,t),e.setAttribute(t,""+a)}}function ms(e,t,a,s){if(s===null)e.removeAttribute(a);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(a);return}Xe(s,a),e.setAttributeNS(t,a,""+s)}}function C(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return ba(e),e;default:return""}}function $(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function X(e,t,a){var s=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var r=s.get,i=s.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return r.call(this)},set:function(m){ba(m),a=""+m,i.call(this,m)}}),Object.defineProperty(e,t,{enumerable:s.enumerable}),{getValue:function(){return a},setValue:function(m){ba(m),a=""+m},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ie(e){if(!e._valueTracker){var t=$(e)?"checked":"value";e._valueTracker=X(e,t,""+e[t])}}function me(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var a=t.getValue(),s="";return e&&(s=$(e)?e.checked?"true":"false":e.value),e=s,e!==a?(t.setValue(e),!0):!1}function je(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ve(e){return e.replace(YD,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function Ae(e,t){t.checked===void 0||t.defaultChecked===void 0||Dv||(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",Ct()||"A component",t.type),Dv=!0),t.value===void 0||t.defaultValue===void 0||Ev||(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",Ct()||"A component",t.type),Ev=!0)}function Ue(e,t,a,s,r,i,m,h){e.name="",m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"?(Xe(m,"type"),e.type=m):e.removeAttribute("type"),t!=null?m==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+C(t)):e.value!==""+C(t)&&(e.value=""+C(t)):m!=="submit"&&m!=="reset"||e.removeAttribute("value"),t!=null?Le(e,m,C(t)):a!=null?Le(e,m,C(a)):s!=null&&e.removeAttribute("value"),r==null&&i!=null&&(e.defaultChecked=!!i),r!=null&&(e.checked=r&&typeof r!="function"&&typeof r!="symbol"),h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"?(Xe(h,"name"),e.name=""+C(h)):e.removeAttribute("name")}function He(e,t,a,s,r,i,m,h){if(i!=null&&typeof i!="function"&&typeof i!="symbol"&&typeof i!="boolean"&&(Xe(i,"type"),e.type=i),t!=null||a!=null){if(!(i!=="submit"&&i!=="reset"||t!=null)){ie(e);return}a=a!=null?""+C(a):"",t=t!=null?""+C(t):a,h||t===e.value||(e.value=t),e.defaultValue=t}s=s??r,s=typeof s!="function"&&typeof s!="symbol"&&!!s,e.checked=h?e.checked:!!s,e.defaultChecked=!!s,m!=null&&typeof m!="function"&&typeof m!="symbol"&&typeof m!="boolean"&&(Xe(m,"name"),e.name=m),ie(e)}function Le(e,t,a){t==="number"&&je(e.ownerDocument)===e||e.defaultValue===""+a||(e.defaultValue=""+a)}function Oe(e,t){t.value==null&&(typeof t.children=="object"&&t.children!==null?oh.Children.forEach(t.children,function(a){a==null||typeof a=="string"||typeof a=="number"||typeof a=="bigint"||Rv||(Rv=!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||kv||(kv=!0,console.error("Pass a `value` prop if you set dangerouslyInnerHTML so React knows which value should be selected."))),t.selected==null||_v||(console.error("Use the `defaultValue` or `value` props on <select> instead of setting `selected` on <option>."),_v=!0)}function gt(){var e=Ct();return e?`
39
+
40
+ Check the render method of \``+e+"`.":""}function rt(e,t,a,s){if(e=e.options,t){t={};for(var r=0;r<a.length;r++)t["$"+a[r]]=!0;for(a=0;a<e.length;a++)r=t.hasOwnProperty("$"+e[a].value),e[a].selected!==r&&(e[a].selected=r),r&&s&&(e[a].defaultSelected=!0)}else{for(a=""+C(a),t=null,r=0;r<e.length;r++){if(e[r].value===a){e[r].selected=!0,s&&(e[r].defaultSelected=!0);return}t!==null||e[r].disabled||(t=e[r])}t!==null&&(t.selected=!0)}}function At(e,t){for(e=0;e<Cv.length;e++){var a=Cv[e];if(t[a]!=null){var s=xa(t[a]);t.multiple&&!s?console.error("The `%s` prop supplied to <select> must be an array if `multiple` is true.%s",a,gt()):!t.multiple&&s&&console.error("The `%s` prop supplied to <select> must be a scalar value if `multiple` is false.%s",a,gt())}}t.value===void 0||t.defaultValue===void 0||Uv||(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"),Uv=!0)}function aa(e,t){t.value===void 0||t.defaultValue===void 0||jv||(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",Ct()||"A component"),jv=!0),t.children!=null&&t.value==null&&console.error("Use the `defaultValue` or `value` props instead of setting children on <textarea>.")}function Ea(e,t,a){if(t!=null&&(t=""+C(t),t!==e.value&&(e.value=t),a==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=a!=null?""+C(a):""}function vt(e,t,a,s){if(t==null){if(s!=null){if(a!=null)throw Error("If you supply `defaultValue` on a <textarea>, do not pass children.");if(xa(s)){if(1<s.length)throw Error("<textarea> can only have at most one child.");s=s[0]}a=s}a==null&&(a=""),t=a}a=C(t),e.defaultValue=a,s=e.textContent,s===a&&s!==""&&s!==null&&(e.value=s),ie(e)}function Ga(e,t){return e.serverProps===void 0&&e.serverTail.length===0&&e.children.length===1&&3<e.distanceFromLeaf&&e.distanceFromLeaf>15-t?Ga(e.children[0],t):e}function sa(e){return" "+" ".repeat(e)}function Os(e){return"+ "+" ".repeat(e)}function La(e){return"- "+" ".repeat(e)}function ps(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 Qn(e,t){return Tv.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 bn(e,t,a){var s=120-2*a;if(t===null)return Os(a)+Qn(e,s)+`
41
+ `;if(typeof t=="string"){for(var r=0;r<t.length&&r<e.length&&t.charCodeAt(r)===e.charCodeAt(r);r++);return r>s-8&&10<r&&(e="..."+e.slice(r-8),t="..."+t.slice(r-8)),Os(a)+Qn(e,s)+`
42
+ `+La(a)+Qn(t,s)+`
43
+ `}return sa(a)+Qn(e,s)+`
44
+ `}function Ws(e){return Object.prototype.toString.call(e).replace(/^\[object (.*)\]$/,function(t,a){return a})}function gn(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(xa(e))return"[...]";if(e.$$typeof===Vn)return(t=k(e.type))?"<"+t+">":"<...>";var a=Ws(e);if(a==="Object"){a="",t-=2;for(var s in e)if(e.hasOwnProperty(s)){var r=JSON.stringify(s);if(r!=='"'+s+'"'&&(s=r),t-=s.length-2,r=gn(e[s],15>t?t:15),t-=r.length,0>t){a+=a===""?"...":", ...";break}a+=(a===""?"":",")+s+":"+r}return"{"+a+"}"}return a;case"function":return(t=e.displayName||e.name)?"function "+t:"function";default:return String(e)}}function en(e,t){return typeof e!="string"||Tv.test(e)?"{"+gn(e,t-2)+"}":e.length>t-2?5>t?'"..."':'"'+e.slice(0,t-5)+'..."':'"'+e+'"'}function dt(e,t,a){var s=120-a.length-e.length,r=[],i;for(i in t)if(t.hasOwnProperty(i)&&i!=="children"){var m=en(t[i],120-a.length-i.length-1);s-=i.length+m.length+2,r.push(i+"="+m)}return r.length===0?a+"<"+e+`>
45
+ `:0<s?a+"<"+e+" "+r.join(" ")+`>
46
+ `:a+"<"+e+`
47
+ `+a+" "+r.join(`
48
+ `+a+" ")+`
49
+ `+a+`>
50
+ `}function Da(e,t,a){var s="",r=nt({},t),i;for(i in e)if(e.hasOwnProperty(i)){delete r[i];var m=120-2*a-i.length-2,h=gn(e[i],m);t.hasOwnProperty(i)?(m=gn(t[i],m),s+=Os(a)+i+": "+h+`
51
+ `,s+=La(a)+i+": "+m+`
52
+ `):s+=Os(a)+i+": "+h+`
53
+ `}for(var v in r)r.hasOwnProperty(v)&&(e=gn(r[v],120-2*a-v.length-2),s+=La(a)+v+": "+e+`
54
+ `);return s}function ko(e,t,a,s){var r="",i=new Map;for(D in a)a.hasOwnProperty(D)&&i.set(D.toLowerCase(),D);if(i.size===1&&i.has("children"))r+=dt(e,t,sa(s));else{for(var m in t)if(t.hasOwnProperty(m)&&m!=="children"){var h=120-2*(s+1)-m.length-1,v=i.get(m.toLowerCase());if(v!==void 0){i.delete(m.toLowerCase());var D=t[m];v=a[v];var M=en(D,h);h=en(v,h),typeof D=="object"&&D!==null&&typeof v=="object"&&v!==null&&Ws(D)==="Object"&&Ws(v)==="Object"&&(2<Object.keys(D).length||2<Object.keys(v).length||-1<M.indexOf("...")||-1<h.indexOf("..."))?r+=sa(s+1)+m+`={{
55
+ `+Da(D,v,s+2)+sa(s+1)+`}}
56
+ `:(r+=Os(s+1)+m+"="+M+`
57
+ `,r+=La(s+1)+m+"="+h+`
58
+ `)}else r+=sa(s+1)+m+"="+en(t[m],h)+`
59
+ `}i.forEach(function(L){if(L!=="children"){var j=120-2*(s+1)-L.length-1;r+=La(s+1)+L+"="+en(a[L],j)+`
60
+ `}}),r=r===""?sa(s)+"<"+e+`>
61
+ `:sa(s)+"<"+e+`
62
+ `+r+sa(s)+`>
63
+ `}return e=a.children,t=t.children,typeof e=="string"||typeof e=="number"||typeof e=="bigint"?(i="",(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(i=""+t),r+=bn(i,""+e,s+1)):(typeof t=="string"||typeof t=="number"||typeof t=="bigint")&&(r=e==null?r+bn(""+t,null,s+1):r+bn(""+t,void 0,s+1)),r}function yn(e,t){var a=ps(e);if(a===null){for(a="",e=e.child;e;)a+=yn(e,t),e=e.sibling;return a}return sa(t)+"<"+a+`>
64
+ `}function Vt(e,t){var a=Ga(e,t);if(a!==e&&(e.children.length!==1||e.children[0]!==a))return sa(t)+`...
65
+ `+Vt(a,t+1);a="";var s=e.fiber._debugInfo;if(s)for(var r=0;r<s.length;r++){var i=s[r].name;typeof i=="string"&&(a+=sa(t)+"<"+i+`>
66
+ `,t++)}if(s="",r=e.fiber.pendingProps,e.fiber.tag===6)s=bn(r,e.serverProps,t),t++;else if(i=ps(e.fiber),i!==null)if(e.serverProps===void 0){s=t;var m=120-2*s-i.length-2,h="";for(D in r)if(r.hasOwnProperty(D)&&D!=="children"){var v=en(r[D],15);if(m-=D.length+v.length+2,0>m){h+=" ...";break}h+=" "+D+"="+v}s=sa(s)+"<"+i+h+`>
67
+ `,t++}else e.serverProps===null?(s=dt(i,r,Os(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."):(s=ko(i,r,e.serverProps,t),t++);var D="";for(r=e.fiber.child,i=0;r&&i<e.children.length;)m=e.children[i],m.fiber===r?(D+=Vt(m,t),i++):D+=yn(r,t),r=r.sibling;for(r&&0<e.children.length&&(D+=sa(t)+`...
68
+ `),r=e.serverTail,e.serverProps===null&&t--,e=0;e<r.length;e++)i=r[e],D=typeof i=="string"?D+(La(t)+Qn(i,120-2*t)+`
69
+ `):D+dt(i.type,i.props,La(t));return a+s+D}function Uo(e){try{return`
70
+
71
+ `+Vt(e,0)}catch{return""}}function Dl(e,t,a){for(var s=t,r=null,i=0;s;)s===e&&(i=0),r={fiber:s,children:r!==null?[r]:[],serverProps:s===t?a:s===e?null:void 0,serverTail:[],distanceFromLeaf:i},i++,s=s.return;return r!==null?Uo(r).replaceAll(/^[+-]/gm,">"):""}function wu(e,t){var a=nt({},e||Av),s={tag:t};return Ov.indexOf(t)!==-1&&(a.aTagInScope=null,a.buttonTagInScope=null,a.nobrTagInScope=null),GD.indexOf(t)!==-1&&(a.pTagInButtonScope=null),qD.indexOf(t)!==-1&&t!=="address"&&t!=="div"&&t!=="p"&&(a.listItemTagAutoclosing=null,a.dlItemTagAutoclosing=null),a.current=s,t==="form"&&(a.formTag=s),t==="a"&&(a.aTagInScope=s),t==="button"&&(a.buttonTagInScope=s),t==="nobr"&&(a.nobrTagInScope=s),t==="p"&&(a.pTagInButtonScope=s),t==="li"&&(a.listItemTagAutoclosing=s),(t==="dd"||t==="dt")&&(a.dlItemTagAutoclosing=s),t==="#document"||t==="html"?a.containerTagInScope=null:a.containerTagInScope||(a.containerTagInScope=s),e!==null||t!=="#document"&&t!=="html"&&t!=="body"?a.implicitRootScope===!0&&(a.implicitRootScope=!1):a.implicitRootScope=!0,a}function Cg(e,t,a){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(a)break;return e==="head"||e==="body"||e==="frameset";case"frameset":return e==="frame";case"#document":if(!a)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 PD.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 a||t===null;case"html":return a&&t==="#document"||t===null;case"body":return a&&(t==="#document"||t==="html")||t===null}return!0}function $w(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 jg(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 rm(e,t){t=t||Av;var a=t.current;if(t=(a=Cg(e,a&&a.tag,t.implicitRootScope)?null:a)?null:$w(e,t),t=a||t,!t)return!0;var s=t.tag;if(t=String(!!a)+"|"+e+"|"+s,Vd[t])return!1;Vd[t]=!0;var r=(t=Ss)?jg(t.return,s):null,i=t!==null&&r!==null?Dl(r,t,null):"",m="<"+e+">";return a?(a="",s==="table"&&e==="tr"&&(a+=" 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
72
+ This will cause a hydration error.%s`,m,s,a,i)):console.error(`In HTML, %s cannot be a descendant of <%s>.
73
+ This will cause a hydration error.%s`,m,s,i),t&&(e=t.return,r===null||e===null||r===e&&e._debugOwner===t._debugOwner||ye(r,function(){console.error(`<%s> cannot contain a nested %s.
74
+ See this log for the ancestor stack trace.`,s,m)})),!1}function Eu(e,t,a){if(a||Cg("#text",t,!1))return!0;if(a="#text|"+t,Vd[a])return!1;Vd[a]=!0;var s=(a=Ss)?jg(a,t):null;return a=a!==null&&s!==null?Dl(s,a,a.tag!==6?{children:null}:null):"",/\S/.test(e)?console.error(`In HTML, text nodes cannot be a child of <%s>.
75
+ This will cause a hydration error.%s`,t,a):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.
76
+ This will cause a hydration error.%s`,t,a),!1}function _l(e,t){if(t){var a=e.firstChild;if(a&&a===e.lastChild&&a.nodeType===3){a.nodeValue=t;return}}e.textContent=t}function Bw(e){return e.replace(QD,function(t,a){return a.toUpperCase()})}function Tg(e,t,a){var s=t.indexOf("--")===0;s||(-1<t.indexOf("-")?Ai.hasOwnProperty(t)&&Ai[t]||(Ai[t]=!0,console.error("Unsupported style property %s. Did you mean %s?",t,Bw(t.replace(XD,"ms-")))):FD.test(t)?Ai.hasOwnProperty(t)&&Ai[t]||(Ai[t]=!0,console.error("Unsupported vendor-prefixed style property %s. Did you mean %s?",t,t.charAt(0).toUpperCase()+t.slice(1))):!zv.test(a)||wh.hasOwnProperty(a)&&wh[a]||(wh[a]=!0,console.error(`Style property values shouldn't contain a semicolon. Try "%s: %s" instead.`,t,a.replace(zv,""))),typeof a=="number"&&(isNaN(a)?Lv||(Lv=!0,console.error("`NaN` is an invalid value for the `%s` css style property.",t)):isFinite(a)||Hv||(Hv=!0,console.error("`Infinity` is an invalid value for the `%s` css style property.",t)))),a==null||typeof a=="boolean"||a===""?s?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":s?e.setProperty(t,a):typeof a!="number"||a===0||$v.has(t)?t==="float"?e.cssFloat=a:(xt(a,t),e[t]=(""+a).trim()):e[t]=a+"px"}function Og(e,t,a){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,a!=null){if(t){var s={};if(a){for(var r in a)if(a.hasOwnProperty(r)&&!t.hasOwnProperty(r))for(var i=Sh[r]||[r],m=0;m<i.length;m++)s[i[m]]=r}for(var h in t)if(t.hasOwnProperty(h)&&(!a||a[h]!==t[h]))for(r=Sh[h]||[h],i=0;i<r.length;i++)s[r[i]]=h;h={};for(var v in t)for(r=Sh[v]||[v],i=0;i<r.length;i++)h[r[i]]=v;v={};for(var D in s)if(r=s[D],(i=h[D])&&r!==i&&(m=r+","+i,!v[m])){v[m]=!0,m=console;var M=t[r];m.error.call(m,"%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.",M==null||typeof M=="boolean"||M===""?"Removing":"Updating",r,i)}}for(var L in a)!a.hasOwnProperty(L)||t!=null&&t.hasOwnProperty(L)||(L.indexOf("--")===0?e.setProperty(L,""):L==="float"?e.cssFloat="":e[L]="");for(var j in t)D=t[j],t.hasOwnProperty(j)&&a[j]!==D&&Tg(e,j,D)}else for(s in t)t.hasOwnProperty(s)&&Tg(e,s,t[s])}function Rl(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 Ag(e){return ZD.get(e)||e}function Iw(e,t){if(on.call(Mi,t)&&Mi[t])return!0;if(KD.test(t)){if(e="aria-"+t.slice(4).toLowerCase(),e=Bv.hasOwnProperty(e)?e:null,e==null)return console.error("Invalid ARIA attribute `%s`. ARIA attributes follow the pattern aria-* and must be lowercase.",t),Mi[t]=!0;if(t!==e)return console.error("Invalid ARIA attribute `%s`. Did you mean `%s`?",t,e),Mi[t]=!0}if(JD.test(t)){if(e=t.toLowerCase(),e=Bv.hasOwnProperty(e)?e:null,e==null)return Mi[t]=!0,!1;t!==e&&(console.error("Unknown ARIA attribute `%s`. Did you mean `%s`?",t,e),Mi[t]=!0)}return!0}function Yw(e,t){var a=[],s;for(s in t)Iw(e,s)||a.push(s);t=a.map(function(r){return"`"+r+"`"}).join(", "),a.length===1?console.error("Invalid aria prop %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e):1<a.length&&console.error("Invalid aria props %s on <%s> tag. For details, see https://react.dev/link/invalid-aria-props",t,e)}function qw(e,t,a,s){if(on.call(Qa,t)&&Qa[t])return!0;var r=t.toLowerCase();if(r==="onfocusin"||r==="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."),Qa[t]=!0;if(typeof a=="function"&&(e==="form"&&t==="action"||e==="input"&&t==="formAction"||e==="button"&&t==="formAction"))return!0;if(s!=null){if(e=s.possibleRegistrationNames,s.registrationNameDependencies.hasOwnProperty(t))return!0;if(s=e.hasOwnProperty(r)?e[r]:null,s!=null)return console.error("Invalid event handler property `%s`. Did you mean `%s`?",t,s),Qa[t]=!0;if(Yv.test(t))return console.error("Unknown event handler property `%s`. It will be ignored.",t),Qa[t]=!0}else if(Yv.test(t))return WD.test(t)&&console.error("Invalid event handler property `%s`. React events use the camelCase naming convention, for example `onClick`.",t),Qa[t]=!0;if(e_.test(t)||t_.test(t))return!0;if(r==="innerhtml")return console.error("Directly setting property `innerHTML` is not permitted. For more information, lookup documentation on `dangerouslySetInnerHTML`."),Qa[t]=!0;if(r==="aria")return console.error("The `aria` attribute is reserved for future use in React. Pass individual `aria-` attributes instead."),Qa[t]=!0;if(r==="is"&&a!==null&&a!==void 0&&typeof a!="string")return console.error("Received a `%s` for a string attribute `is`. If this is expected, cast the value to a string.",typeof a),Qa[t]=!0;if(typeof a=="number"&&isNaN(a))return console.error("Received NaN for the `%s` attribute. If this is expected, cast the value to a string.",t),Qa[t]=!0;if(zd.hasOwnProperty(r)){if(r=zd[r],r!==t)return console.error("Invalid DOM property `%s`. Did you mean `%s`?",t,r),Qa[t]=!0}else if(t!==r)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,r),Qa[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 a){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 r=t.toLowerCase().slice(0,5),r==="data-"||r==="aria-"?!0:(a?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()}.',a,t,t,a,t):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\nIf you used to conditionally omit it with %s={condition && value}, pass %s={condition ? value : undefined} instead.',a,t,t,a,t,t,t),Qa[t]=!0)}case"function":case"symbol":return Qa[t]=!0,!1;case"string":if(a==="false"||a==="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}?",a,t,a==="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,a),Qa[t]=!0}}return!0}function Gw(e,t,a){var s=[],r;for(r in t)qw(e,r,t[r],a)||s.push(r);t=s.map(function(i){return"`"+i+"`"}).join(", "),s.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<s.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 kl(e){return a_.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Zn(){}function im(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}function Vg(e){var t=B(e);if(t&&(e=t.stateNode)){var a=e[Xa]||null;e:switch(e=t.stateNode,t.type){case"input":if(Ue(e,a.value,a.defaultValue,a.defaultValue,a.checked,a.defaultChecked,a.type,a.name),t=a.name,a.type==="radio"&&t!=null){for(a=e;a.parentNode;)a=a.parentNode;for(Xe(t,"name"),a=a.querySelectorAll('input[name="'+ve(""+t)+'"][type="radio"]'),t=0;t<a.length;t++){var s=a[t];if(s!==e&&s.form===e.form){var r=s[Xa]||null;if(!r)throw Error("ReactDOMInput: Mixing React and non-React radio inputs with the same `name` is not supported.");Ue(s,r.value,r.defaultValue,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name)}}for(t=0;t<a.length;t++)s=a[t],s.form===e.form&&me(s)}break e;case"textarea":Ea(e,a.value,a.defaultValue);break e;case"select":t=a.value,t!=null&&rt(e,!!a.multiple,t,!1)}}}function Mg(e,t,a){if(Eh)return e(t,a);Eh=!0;try{var s=e(t);return s}finally{if(Eh=!1,(zi!==null||Li!==null)&&(Ei(),zi&&(t=zi,e=Li,Li=zi=null,Vg(t),e)))for(t=0;t<e.length;t++)Vg(e[t])}}function Ul(e,t){var a=e.stateNode;if(a===null)return null;var s=a[Xa]||null;if(s===null)return null;a=s[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(s=!s.disabled)||(e=e.type,s=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!s;break e;default:e=!1}if(e)return null;if(a&&typeof a!="function")throw Error("Expected `"+t+"` listener to be a function, instead got a value of `"+typeof a+"` type.");return a}function zg(){if(Ld)return Ld;var e,t=_h,a=t.length,s,r="value"in Po?Po.value:Po.textContent,i=r.length;for(e=0;e<a&&t[e]===r[e];e++);var m=a-e;for(s=1;s<=m&&t[a-s]===r[i-s];s++);return Ld=r.slice(e,1<s?1-s:void 0)}function Du(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 _u(){return!0}function Lg(){return!1}function ss(e){function t(a,s,r,i,m){this._reactName=a,this._targetInst=r,this.type=s,this.nativeEvent=i,this.target=m,this.currentTarget=null;for(var h in e)e.hasOwnProperty(h)&&(a=e[h],this[h]=a?a(i):i[h]);return this.isDefaultPrevented=(i.defaultPrevented!=null?i.defaultPrevented:i.returnValue===!1)?_u:Lg,this.isPropagationStopped=Lg,this}return nt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var a=this.nativeEvent;a&&(a.preventDefault?a.preventDefault():typeof a.returnValue!="unknown"&&(a.returnValue=!1),this.isDefaultPrevented=_u)},stopPropagation:function(){var a=this.nativeEvent;a&&(a.stopPropagation?a.stopPropagation():typeof a.cancelBubble!="unknown"&&(a.cancelBubble=!0),this.isPropagationStopped=_u)},persist:function(){},isPersistent:_u}),t}function Pw(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=h_[e])?!!t[e]:!1}function lm(){return Pw}function Hg(e,t){switch(e){case"keyup":return R_.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==Fv;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function $g(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}function Fw(e,t){switch(e){case"compositionend":return $g(t);case"keypress":return t.which!==Qv?null:(Jv=!0,Zv);case"textInput":return e=t.data,e===Zv&&Jv?null:e;default:return null}}function Xw(e,t){if(Hi)return e==="compositionend"||!Ch&&Hg(e,t)?(e=zg(),Ld=_h=Po=null,Hi=!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 Xv&&t.locale!=="ko"?null:t.data;default:return null}}function Bg(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!U_[e.type]:t==="textarea"}function Qw(e){if(!Bn)return!1;e="on"+e;var t=e in document;return t||(t=document.createElement("div"),t.setAttribute(e,"return;"),t=typeof t[e]=="function"),t}function Ig(e,t,a,s){zi?Li?Li.push(s):Li=[s]:zi=s,t=yd(t,"onChange"),0<t.length&&(a=new Hd("onChange","change",null,a,s),e.push({event:a,listeners:t}))}function Zw(e){E0(e,0)}function Ru(e){var t=oe(e);if(me(t))return e}function Yg(e,t){if(e==="change")return t}function qg(){mc&&(mc.detachEvent("onpropertychange",Gg),pc=mc=null)}function Gg(e){if(e.propertyName==="value"&&Ru(pc)){var t=[];Ig(t,pc,e,im(e)),Mg(Zw,t)}}function Jw(e,t,a){e==="focusin"?(qg(),mc=t,pc=a,mc.attachEvent("onpropertychange",Gg)):e==="focusout"&&qg()}function Kw(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Ru(pc)}function Ww(e,t){if(e==="click")return Ru(t)}function eE(e,t){if(e==="input"||e==="change")return Ru(t)}function tE(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}function Cl(e,t){if(Za(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var a=Object.keys(e),s=Object.keys(t);if(a.length!==s.length)return!1;for(s=0;s<a.length;s++){var r=a[s];if(!on.call(t,r)||!Za(e[r],t[r]))return!1}return!0}function Pg(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Fg(e,t){var a=Pg(e);e=0;for(var s;a;){if(a.nodeType===3){if(s=e+a.textContent.length,e<=t&&s>=t)return{node:a,offset:t-e};e=s}e:{for(;a;){if(a.nextSibling){a=a.nextSibling;break e}a=a.parentNode}a=void 0}a=Pg(a)}}function Xg(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Xg(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Qg(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=je(e.document);t instanceof e.HTMLIFrameElement;){try{var a=typeof t.contentWindow.location.href=="string"}catch{a=!1}if(a)e=t.contentWindow;else break;t=je(e.document)}return t}function cm(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 Zg(e,t,a){var s=a.window===a?a.document:a.nodeType===9?a:a.ownerDocument;Th||$i==null||$i!==je(s)||(s=$i,"selectionStart"in s&&cm(s)?s={start:s.selectionStart,end:s.selectionEnd}:(s=(s.ownerDocument&&s.ownerDocument.defaultView||window).getSelection(),s={anchorNode:s.anchorNode,anchorOffset:s.anchorOffset,focusNode:s.focusNode,focusOffset:s.focusOffset}),hc&&Cl(hc,s)||(hc=s,s=yd(jh,"onSelect"),0<s.length&&(t=new Hd("onSelect","select",null,t,a),e.push({event:t,listeners:s}),t.target=$i)))}function Nr(e,t){var a={};return a[e.toLowerCase()]=t.toLowerCase(),a["Webkit"+e]="webkit"+t,a["Moz"+e]="moz"+t,a}function Sr(e){if(Oh[e])return Oh[e];if(!Bi[e])return e;var t=Bi[e],a;for(a in t)if(t.hasOwnProperty(a)&&a in Wv)return Oh[e]=t[a];return e}function tn(e,t){nN.set(e,t),$e(t,[e])}function aE(e){for(var t=Bd,a=0;a<e.length;a++){var s=e[a];if(typeof s=="object"&&s!==null)if(xa(s)&&s.length===2&&typeof s[0]=="string"){if(t!==Bd&&t!==Lh)return Mh;t=Lh}else return Mh;else{if(typeof s=="function"||typeof s=="string"&&50<s.length||t!==Bd&&t!==zh)return Mh;t=zh}}return t}function um(e,t,a,s){for(var r in e)on.call(e,r)&&r[0]!=="_"&&xn(r,e[r],t,a,s)}function xn(e,t,a,s,r){switch(typeof t){case"object":if(t===null){t="null";break}else{if(t.$$typeof===Vn){var i=k(t.type)||"…",m=t.key;t=t.props;var h=Object.keys(t),v=h.length;if(m==null&&v===0){t="<"+i+" />";break}if(3>s||v===1&&h[0]==="children"&&m==null){t="<"+i+" … />";break}a.push([r+"  ".repeat(s)+e,"<"+i]),m!==null&&xn("key",m,a,s+1,r),e=!1;for(var D in t)D==="children"?t.children!=null&&(!xa(t.children)||0<t.children.length)&&(e=!0):on.call(t,D)&&D[0]!=="_"&&xn(D,t[D],a,s+1,r);a.push(["",e?">…</"+i+">":"/>"]);return}if(i=Object.prototype.toString.call(t),i=i.slice(8,i.length-1),i==="Array"){if(D=aE(t),D===zh||D===Bd){t=JSON.stringify(t);break}else if(D===Lh){for(a.push([r+"  ".repeat(s)+e,""]),e=0;e<t.length;e++)i=t[e],xn(i[0],i[1],a,s+1,r);return}}if(i==="Promise"){if(t.status==="fulfilled"){if(i=a.length,xn(e,t.value,a,s,r),a.length>i){a=a[i],a[1]="Promise<"+(a[1]||"Object")+">";return}}else if(t.status==="rejected"&&(i=a.length,xn(e,t.reason,a,s,r),a.length>i)){a=a[i],a[1]="Rejected Promise<"+a[1]+">";return}a.push(["  ".repeat(s)+e,"Promise"]);return}i==="Object"&&(D=Object.getPrototypeOf(t))&&typeof D.constructor=="function"&&(i=D.constructor.name),a.push([r+"  ".repeat(s)+e,i==="Object"?3>s?"":"…":i]),3>s&&um(t,a,s+1,r);return}case"function":t=t.name===""?"() => {}":t.name+"() {}";break;case"string":t=t===M_?"…":JSON.stringify(t);break;case"undefined":t="undefined";break;case"boolean":t=t?"true":"false";break;default:t=String(t)}a.push([r+"  ".repeat(s)+e,t])}function Jg(e,t,a,s){var r=!0;for(m in e)m in t||(a.push([Id+"  ".repeat(s)+m,"…"]),r=!1);for(var i in t)if(i in e){var m=e[i],h=t[i];if(m!==h){if(s===0&&i==="children")r="  ".repeat(s)+i,a.push([Id+r,"…"],[Yd+r,"…"]);else{if(!(3<=s)){if(typeof m=="object"&&typeof h=="object"&&m!==null&&h!==null&&m.$$typeof===h.$$typeof)if(h.$$typeof===Vn){if(m.type===h.type&&m.key===h.key){m=k(h.type)||"…",r="  ".repeat(s)+i,m="<"+m+" … />",a.push([Id+r,m],[Yd+r,m]),r=!1;continue}}else{var v=Object.prototype.toString.call(m),D=Object.prototype.toString.call(h);if(v===D&&(D==="[object Object]"||D==="[object Array]")){v=[iN+"  ".repeat(s)+i,D==="[object Array]"?"Array":""],a.push(v),D=a.length,Jg(m,h,a,s+1)?D===a.length&&(v[1]="Referentially unequal but deeply equal objects. Consider memoization."):r=!1;continue}}else if(typeof m=="function"&&typeof h=="function"&&m.name===h.name&&m.length===h.length&&(v=Function.prototype.toString.call(m),D=Function.prototype.toString.call(h),v===D)){m=h.name===""?"() => {}":h.name+"() {}",a.push([iN+"  ".repeat(s)+i,m+" Referentially unequal function closure. Consider memoization."]);continue}}xn(i,m,a,s,Id),xn(i,h,a,s,Yd)}r=!1}}else a.push([Yd+"  ".repeat(s)+i,"…"]),r=!1;return r}function an(e){ht=e&63?"Blocking":e&64?"Gesture":e&4194176?"Transition":e&62914560?"Suspense":e&2080374784?"Idle":"Other"}function vn(e,t,a,s){Mt&&(Xo.start=t,Xo.end=a,ro.color="warning",ro.tooltipText=s,ro.properties=null,(e=e._debugTask)?e.run(performance.measure.bind(performance,s,Xo)):performance.measure(s,Xo))}function ku(e,t,a){vn(e,t,a,"Reconnect")}function Uu(e,t,a,s,r){var i=I(e);if(i!==null&&Mt){var m=e.alternate,h=e.actualDuration;if(m===null||m.child!==e.child)for(var v=e.child;v!==null;v=v.sibling)h-=v.actualDuration;s=.5>h?s?"tertiary-light":"primary-light":10>h?s?"tertiary":"primary":100>h?s?"tertiary-dark":"primary-dark":"error";var D=e.memoizedProps;h=e._debugTask,D!==null&&m!==null&&m.memoizedProps!==D?(v=[z_],D=Jg(m.memoizedProps,D,v,0),1<v.length&&(D&&!Fo&&(m.lanes&r)===0&&100<e.actualDuration?(Fo=!0,v[0]=L_,ro.color="warning",ro.tooltipText=lN):(ro.color=s,ro.tooltipText=i),ro.properties=v,Xo.start=t,Xo.end=a,h!=null?h.run(performance.measure.bind(performance,"​"+i,Xo)):performance.measure("​"+i,Xo))):h!=null?h.run(console.timeStamp.bind(console,i,t,a,Ms,void 0,s)):console.timeStamp(i,t,a,Ms,void 0,s)}}function dm(e,t,a,s){if(Mt){var r=I(e);if(r!==null){for(var i=null,m=[],h=0;h<s.length;h++){var v=s[h];i==null&&v.source!==null&&(i=v.source._debugTask),v=v.value,m.push(["Error",typeof v=="object"&&v!==null&&typeof v.message=="string"?String(v.message):String(v)])}e.key!==null&&xn("key",e.key,m,0,""),e.memoizedProps!==null&&um(e.memoizedProps,m,0,""),i==null&&(i=e._debugTask),e={start:t,end:a,detail:{devtools:{color:"error",track:Ms,tooltipText:e.tag===13?"Hydration failed":"Error boundary caught an error",properties:m}}},i?i.run(performance.measure.bind(performance,"​"+r,e)):performance.measure("​"+r,e)}}}function Nn(e,t,a,s,r){if(r!==null){if(Mt){var i=I(e);if(i!==null){s=[];for(var m=0;m<r.length;m++){var h=r[m].value;s.push(["Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e.key!==null&&xn("key",e.key,s,0,""),e.memoizedProps!==null&&um(e.memoizedProps,s,0,""),t={start:t,end:a,detail:{devtools:{color:"error",track:Ms,tooltipText:"A lifecycle or effect errored",properties:s}}},(e=e._debugTask)?e.run(performance.measure.bind(performance,"​"+i,t)):performance.measure("​"+i,t)}}}else i=I(e),i!==null&&Mt&&(r=1>s?"secondary-light":100>s?"secondary":500>s?"secondary-dark":"error",(e=e._debugTask)?e.run(console.timeStamp.bind(console,i,t,a,Ms,void 0,r)):console.timeStamp(i,t,a,Ms,void 0,r))}function sE(e,t,a,s){if(Mt&&!(t<=e)){var r=(a&738197653)===a?"tertiary-dark":"primary-dark";a=(a&536870912)===a?"Prepared":(a&201326741)===a?"Hydrated":"Render",s?s.run(console.timeStamp.bind(console,a,e,t,ht,mt,r)):console.timeStamp(a,e,t,ht,mt,r)}}function Kg(e,t,a,s){!Mt||t<=e||(a=(a&738197653)===a?"tertiary-dark":"primary-dark",s?s.run(console.timeStamp.bind(console,"Prewarm",e,t,ht,mt,a)):console.timeStamp("Prewarm",e,t,ht,mt,a))}function Wg(e,t,a,s){!Mt||t<=e||(a=(a&738197653)===a?"tertiary-dark":"primary-dark",s?s.run(console.timeStamp.bind(console,"Suspended",e,t,ht,mt,a)):console.timeStamp("Suspended",e,t,ht,mt,a))}function nE(e,t,a,s,r,i){if(Mt&&!(t<=e)){a=[];for(var m=0;m<s.length;m++){var h=s[m].value;a.push(["Recoverable Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e={start:e,end:t,detail:{devtools:{color:"primary-dark",track:ht,trackGroup:mt,tooltipText:r?"Hydration Failed":"Recovered after Error",properties:a}}},i?i.run(performance.measure.bind(performance,"Recovered",e)):performance.measure("Recovered",e)}}function fm(e,t,a,s){!Mt||t<=e||(s?s.run(console.timeStamp.bind(console,"Errored",e,t,ht,mt,"error")):console.timeStamp("Errored",e,t,ht,mt,"error"))}function oE(e,t,a,s){!Mt||t<=e||(s?s.run(console.timeStamp.bind(console,a,e,t,ht,mt,"secondary-light")):console.timeStamp(a,e,t,ht,mt,"secondary-light"))}function ey(e,t,a,s,r){if(Mt&&!(t<=e)){for(var i=[],m=0;m<a.length;m++){var h=a[m].value;i.push(["Error",typeof h=="object"&&h!==null&&typeof h.message=="string"?String(h.message):String(h)])}e={start:e,end:t,detail:{devtools:{color:"error",track:ht,trackGroup:mt,tooltipText:s?"Remaining Effects Errored":"Commit Errored",properties:i}}},r?r.run(performance.measure.bind(performance,"Errored",e)):performance.measure("Errored",e)}}function mm(e,t,a){!Mt||t<=e||console.timeStamp("Animating",e,t,ht,mt,"secondary-dark")}function Cu(){for(var e=Ii,t=Hh=Ii=0;t<e;){var a=zs[t];zs[t++]=null;var s=zs[t];zs[t++]=null;var r=zs[t];zs[t++]=null;var i=zs[t];if(zs[t++]=null,s!==null&&r!==null){var m=s.pending;m===null?r.next=r:(r.next=m.next,m.next=r),s.pending=r}i!==0&&ty(a,r,i)}}function ju(e,t,a,s){zs[Ii++]=e,zs[Ii++]=t,zs[Ii++]=a,zs[Ii++]=s,Hh|=s,e.lanes|=s,e=e.alternate,e!==null&&(e.lanes|=s)}function pm(e,t,a,s){return ju(e,t,a,s),Tu(e)}function Ha(e,t){return ju(e,null,null,t),Tu(e)}function ty(e,t,a){e.lanes|=a;var s=e.alternate;s!==null&&(s.lanes|=a);for(var r=!1,i=e.return;i!==null;)i.childLanes|=a,s=i.alternate,s!==null&&(s.childLanes|=a),i.tag===22&&(e=i.stateNode,e===null||e._visibility&bc||(r=!0)),e=i,i=i.return;return e.tag===3?(i=e.stateNode,r&&t!==null&&(r=31-Fa(a),e=i.hiddenUpdates,s=e[r],s===null?e[r]=[t]:s.push(t),t.lane=a|536870912),i):null}function Tu(e){if(Yc>eR)throw Kr=Yc=0,qc=yb=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.");Kr>tR&&(Kr=0,qc=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)!==0&&g0(e);for(var t=e,a=t.return;a!==null;)t.alternate===null&&(t.flags&4098)!==0&&g0(e),t=a,a=t.return;return t.tag===3?t.stateNode:null}function wr(e){if(Ls===null)return e;var t=Ls(e);return t===void 0?e:t.current}function hm(e){if(Ls===null)return e;var t=Ls(e);return t===void 0?e!=null&&typeof e.render=="function"&&(t=wr(e.render),e.render!==t)?(t={$$typeof:nc,render:t},e.displayName!==void 0&&(t.displayName=e.displayName),t):e:t.current}function ay(e,t){if(Ls===null)return!1;var a=e.elementType;t=t.type;var s=!1,r=typeof t=="object"&&t!==null?t.$$typeof:null;switch(e.tag){case 1:typeof t=="function"&&(s=!0);break;case 0:(typeof t=="function"||r===Ns)&&(s=!0);break;case 11:(r===nc||r===Ns)&&(s=!0);break;case 14:case 15:(r===Ud||r===Ns)&&(s=!0);break;default:return!1}return!!(s&&(e=Ls(a),e!==void 0&&e===Ls(t)))}function sy(e){Ls!==null&&typeof WeakSet=="function"&&(Yi===null&&(Yi=new WeakSet),Yi.add(e))}function ny(e,t,a){do{var s=e,r=s.alternate,i=s.child,m=s.sibling,h=s.tag;s=s.type;var v=null;switch(h){case 0:case 15:case 1:v=s;break;case 11:v=s.render}if(Ls===null)throw Error("Expected resolveFamily to be set during hot reload.");var D=!1;if(s=!1,v!==null&&(v=Ls(v),v!==void 0&&(a.has(v)?s=!0:t.has(v)&&(h===1?s=!0:D=!0))),Yi!==null&&(Yi.has(e)||r!==null&&Yi.has(r))&&(s=!0),s&&(e._debugNeedsRemount=!0),(s||D)&&(r=Ha(e,2),r!==null&&Xt(r,e,2)),i===null||s||ny(i,t,a),m===null)break;e=m}while(!0)}function rE(e,t,a,s){this.tag=e,this.key=a,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=s,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,cN||typeof Object.preventExtensions!="function"||Object.preventExtensions(this)}function bm(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Jn(e,t){var a=e.alternate;switch(a===null?(a=S(e.tag,t,e.key,e.mode),a.elementType=e.elementType,a.type=e.type,a.stateNode=e.stateNode,a._debugOwner=e._debugOwner,a._debugStack=e._debugStack,a._debugTask=e._debugTask,a._debugHookTypes=e._debugHookTypes,a.alternate=e,e.alternate=a):(a.pendingProps=t,a.type=e.type,a.flags=0,a.subtreeFlags=0,a.deletions=null,a.actualDuration=-0,a.actualStartTime=-1.1),a.flags=e.flags&65011712,a.childLanes=e.childLanes,a.lanes=e.lanes,a.child=e.child,a.memoizedProps=e.memoizedProps,a.memoizedState=e.memoizedState,a.updateQueue=e.updateQueue,t=e.dependencies,a.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},a.sibling=e.sibling,a.index=e.index,a.ref=e.ref,a.refCleanup=e.refCleanup,a.selfBaseDuration=e.selfBaseDuration,a.treeBaseDuration=e.treeBaseDuration,a._debugInfo=e._debugInfo,a._debugNeedsRemount=e._debugNeedsRemount,a.tag){case 0:case 15:a.type=wr(e.type);break;case 1:a.type=wr(e.type);break;case 11:a.type=hm(e.type)}return a}function oy(e,t){e.flags&=65011714;var a=e.alternate;return a===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=a.childLanes,e.lanes=a.lanes,e.child=a.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=a.memoizedProps,e.memoizedState=a.memoizedState,e.updateQueue=a.updateQueue,e.type=a.type,t=a.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext,_debugThenableState:t._debugThenableState},e.selfBaseDuration=a.selfBaseDuration,e.treeBaseDuration=a.treeBaseDuration),e}function gm(e,t,a,s,r,i){var m=0,h=e;if(typeof e=="function")bm(e)&&(m=1),h=wr(h);else if(typeof e=="string")m=ue(),m=hD(e,a,m)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case uh:return t=S(31,a,t,r),t.elementType=uh,t.lanes=i,t;case ji:return Er(a.children,r,i,t);case kd:m=8,r|=Ba,r|=rn;break;case rh:return e=a,s=r,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=S(12,e,t,s|Ke),t.elementType=rh,t.lanes=i,t.stateNode={effectDuration:0,passiveEffectDuration:0},t;case lh:return t=S(13,a,t,r),t.elementType=lh,t.lanes=i,t;case ch:return t=S(19,a,t,r),t.elementType=ch,t.lanes=i,t;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Mn:m=10;break e;case ih:m=9;break e;case nc:m=11,h=hm(h);break e;case Ud:m=14;break e;case Ns:m=16,h=null;break e}h="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(h+=" 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?a="null":xa(e)?a="array":e!==void 0&&e.$$typeof===Vn?(a="<"+(k(e.type)||"Unknown")+" />",h=" Did you accidentally export a JSX literal instead of a component?"):a=typeof e,(m=s?G(s):null)&&(h+=`
77
+
78
+ Check the render method of \``+m+"`."),m=29,a=Error("Element type is invalid: expected a string (for built-in components) or a class/function (for composite components) but got: "+(a+"."+h)),h=null}return t=S(m,a,t,r),t.elementType=e,t.type=h,t.lanes=i,t._debugOwner=s,t}function Ou(e,t,a){return t=gm(e.type,e.key,e.props,e._owner,t,a),t._debugOwner=e._owner,t._debugStack=e._debugStack,t._debugTask=e._debugTask,t}function Er(e,t,a,s){return e=S(7,e,s,t),e.lanes=a,e}function ym(e,t,a){return e=S(6,e,null,t),e.lanes=a,e}function ry(e){var t=S(18,null,null,Ye);return t.stateNode=e,t}function xm(e,t,a){return t=S(4,e.children!==null?e.children:[],e.key,t),t.lanes=a,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function hs(e,t){if(typeof e=="object"&&e!==null){var a=$h.get(e);return a!==void 0?a:(t={value:e,source:t,stack:Je(t)},$h.set(e,t),t)}return{value:e,source:t,stack:Je(t)}}function Kn(e,t){Co(),qi[Gi++]=gc,qi[Gi++]=qd,qd=e,gc=t}function iy(e,t,a){Co(),Hs[$s++]=lo,Hs[$s++]=co,Hs[$s++]=zr,zr=e;var s=lo;e=co;var r=32-Fa(s)-1;s&=~(1<<r),a+=1;var i=32-Fa(t)+r;if(30<i){var m=r-r%5;i=(s&(1<<m)-1).toString(32),s>>=m,r-=m,lo=1<<32-Fa(t)+r|a<<r|s,co=i+e}else lo=1<<i|a<<r|s,co=e}function vm(e){Co(),e.return!==null&&(Kn(e,1),iy(e,1,0))}function Nm(e){for(;e===qd;)qd=qi[--Gi],qi[Gi]=null,gc=qi[--Gi],qi[Gi]=null;for(;e===zr;)zr=Hs[--$s],Hs[$s]=null,co=Hs[--$s],Hs[$s]=null,lo=Hs[--$s],Hs[$s]=null}function ly(){return Co(),zr!==null?{id:lo,overflow:co}:null}function cy(e,t){Co(),Hs[$s++]=lo,Hs[$s++]=co,Hs[$s++]=zr,lo=t.id,co=t.overflow,zr=e}function Co(){ut||console.error("Expected to be hydrating. This is a bug in React. Please file an issue.")}function Dr(e,t){if(e.return===null){if(ws===null)ws={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t};else{if(ws.fiber!==e)throw Error("Saw multiple hydration diff roots in a pass. This is a bug in React.");ws.distanceFromLeaf>t&&(ws.distanceFromLeaf=t)}return ws}var a=Dr(e.return,t+1).children;return 0<a.length&&a[a.length-1].fiber===e?(a=a[a.length-1],a.distanceFromLeaf>t&&(a.distanceFromLeaf=t),a):(t={fiber:e,children:[],serverProps:void 0,serverTail:[],distanceFromLeaf:t},a.push(t),t)}function uy(){ut&&console.error("We should not be hydrating here. This is a bug in React. Please file a bug.")}function Au(e,t){In||(e=Dr(e,0),e.serverProps=null,t!==null&&(t=I0(t),e.serverTail.push(t)))}function jo(e){var t=1<arguments.length&&arguments[1]!==void 0?arguments[1]:!1,a="",s=ws;throw s!==null&&(ws=null,a=Uo(s)),jl(hs(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:
79
+
80
+ - A server/client branch \`if (typeof window !== 'undefined')\`.
81
+ - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
82
+ - Date formatting in a user's locale which doesn't match the server.
83
+ - External changing data without sending a snapshot of it along with the HTML.
84
+ - Invalid HTML tag nesting.
85
+
86
+ It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
87
+
88
+ https://react.dev/link/hydration-mismatch`+a),e)),Bh}function dy(e){var t=e.stateNode,a=e.type,s=e.memoizedProps;switch(t[Va]=e,t[Xa]=s,Bp(a,s),a){case"dialog":ft("cancel",t),ft("close",t);break;case"iframe":case"object":case"embed":ft("load",t);break;case"video":case"audio":for(a=0;a<Gc.length;a++)ft(Gc[a],t);break;case"source":ft("error",t);break;case"img":case"image":case"link":ft("error",t),ft("load",t);break;case"details":ft("toggle",t);break;case"input":Dt("input",s),ft("invalid",t),Ae(t,s),He(t,s.value,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name,!0);break;case"option":Oe(t,s);break;case"select":Dt("select",s),ft("invalid",t),At(t,s);break;case"textarea":Dt("textarea",s),ft("invalid",t),aa(t,s),vt(t,s.value,s.defaultValue,s.children)}a=s.children,typeof a!="string"&&typeof a!="number"&&typeof a!="bigint"||t.textContent===""+a||s.suppressHydrationWarning===!0||k0(t.textContent,a)?(s.popover!=null&&(ft("beforetoggle",t),ft("toggle",t)),s.onScroll!=null&&ft("scroll",t),s.onScrollEnd!=null&&ft("scrollend",t),s.onClick!=null&&(t.onclick=Zn),t=!0):t=!1,t||jo(e,!0)}function fy(e){for(Ma=e.return;Ma;)switch(Ma.tag){case 5:case 31:case 13:Bs=!1;return;case 27:case 3:Bs=!0;return;default:Ma=Ma.return}}function hi(e){if(e!==Ma)return!1;if(!ut)return fy(e),ut=!0,!1;var t=e.tag,a;if((a=t!==3&&t!==27)&&((a=t===5)&&(a=e.type,a=!(a!=="form"&&a!=="button")||Pp(e.type,e.memoizedProps)),a=!a),a&&zt){for(a=zt;a;){var s=Dr(e,0),r=I0(a);s.serverTail.push(r),a=r.type==="Suspense"?Zp(a):vs(a.nextSibling)}jo(e)}if(fy(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");zt=Zp(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");zt=Zp(e)}else t===27?(t=zt,Bo(e.type)?(e=Cb,Cb=null,zt=e):zt=t):zt=Ma?vs(e.stateNode.nextSibling):null;return!0}function _r(){zt=Ma=null,In=ut=!1}function Sm(){var e=Zo;return e!==null&&(es===null?es=e:es.push.apply(es,e),Zo=null),e}function jl(e){Zo===null?Zo=[e]:Zo.push(e)}function wm(){var e=ws;if(e!==null){ws=null;for(var t=Uo(e);0<e.children.length;)e=e.children[0];ye(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:
89
+
90
+ - A server/client branch \`if (typeof window !== 'undefined')\`.
91
+ - Variable input such as \`Date.now()\` or \`Math.random()\` which changes each time it's called.
92
+ - Date formatting in a user's locale which doesn't match the server.
93
+ - External changing data without sending a snapshot of it along with the HTML.
94
+ - Invalid HTML tag nesting.
95
+
96
+ It can also happen if the client has a browser extension installed which messes with the HTML before React loaded.
97
+
98
+ %s%s`,"https://react.dev/link/hydration-mismatch",t)})}}function Vu(){Pi=Gd=null,Fi=!1}function To(e,t,a){ae(Ih,t._currentValue,e),t._currentValue=a,ae(Yh,t._currentRenderer,e),t._currentRenderer!==void 0&&t._currentRenderer!==null&&t._currentRenderer!==dN&&console.error("Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported."),t._currentRenderer=dN}function Wn(e,t){e._currentValue=Ih.current;var a=Yh.current;se(Yh,t),e._currentRenderer=a,se(Ih,t)}function Em(e,t,a){for(;e!==null;){var s=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,s!==null&&(s.childLanes|=t)):s!==null&&(s.childLanes&t)!==t&&(s.childLanes|=t),e===a)break;e=e.return}e!==a&&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 Dm(e,t,a,s){var r=e.child;for(r!==null&&(r.return=e);r!==null;){var i=r.dependencies;if(i!==null){var m=r.child;i=i.firstContext;e:for(;i!==null;){var h=i;i=r;for(var v=0;v<t.length;v++)if(h.context===t[v]){i.lanes|=a,h=i.alternate,h!==null&&(h.lanes|=a),Em(i.return,a,e),s||(m=null);break e}i=h.next}}else if(r.tag===18){if(m=r.return,m===null)throw Error("We just came from a parent so we must have had a parent. This is a bug in React.");m.lanes|=a,i=m.alternate,i!==null&&(i.lanes|=a),Em(m,a,e),m=null}else m=r.child;if(m!==null)m.return=r;else for(m=r;m!==null;){if(m===e){m=null;break}if(r=m.sibling,r!==null){r.return=m.return,m=r;break}m=m.return}r=m}}function bi(e,t,a,s){e=null;for(var r=t,i=!1;r!==null;){if(!i){if((r.flags&524288)!==0)i=!0;else if((r.flags&262144)!==0)break}if(r.tag===10){var m=r.alternate;if(m===null)throw Error("Should have a current fiber. This is a bug in React.");if(m=m.memoizedProps,m!==null){var h=r.type;Za(r.pendingProps.value,m.value)||(e!==null?e.push(h):e=[h])}}else if(r===Cd.current){if(m=r.alternate,m===null)throw Error("Should have a current fiber. This is a bug in React.");m.memoizedState.memoizedState!==r.memoizedState.memoizedState&&(e!==null?e.push(Zc):e=[Zc])}r=r.return}e!==null&&Dm(t,e,a,s),t.flags|=262144}function Mu(e){for(e=e.firstContext;e!==null;){if(!Za(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Rr(e){Gd=e,Pi=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function Bt(e){return Fi&&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()."),my(Gd,e)}function zu(e,t){return Gd===null&&Rr(e),my(e,t)}function my(e,t){var a=t._currentValue;if(t={context:t,memoizedValue:a,next:null},Pi===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().");Pi=t,e.dependencies={lanes:0,firstContext:t,_debugThenableState:null},e.flags|=524288}else Pi=Pi.next=t;return a}function _m(){return{controller:new B_,data:new Map,refCount:0}}function kr(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 Tl(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&&I_(Y_,function(){e.controller.abort()})}function Sn(e,t,a){(e&127)!==0?0>Yn&&(Yn=ua(),xc=Pd(t),qh=t,a!=null&&(Gh=I(a)),(bt&(Na|_s))!==Ca&&(Qt=!0,Ko=yc),e=Wl(),t=Kl(),e!==Xi||t!==vc?Xi=-1.1:t!==null&&(Ko=yc),$r=e,vc=t):(e&4194048)!==0&&0>Is&&(Is=ua(),Nc=Pd(t),fN=t,a!=null&&(mN=I(a)),0>po)&&(e=Wl(),t=Kl(),(e!==er||t!==Br)&&(er=-1.1),Wo=e,Br=t)}function iE(e){if(0>Yn){Yn=ua(),xc=e._debugTask!=null?e._debugTask:null,(bt&(Na|_s))!==Ca&&(Ko=yc);var t=Wl(),a=Kl();t!==Xi||a!==vc?Xi=-1.1:a!==null&&(Ko=yc),$r=t,vc=a}0>Is&&(Is=ua(),Nc=e._debugTask!=null?e._debugTask:null,0>po)&&(e=Wl(),t=Kl(),(e!==er||t!==Br)&&(er=-1.1),Wo=e,Br=t)}function eo(){var e=Lr;return Lr=0,e}function Lu(e){var t=Lr;return Lr=e,t}function Ol(e){var t=Lr;return Lr+=e,t}function Hu(){Be=ze=-1.1}function bs(){var e=ze;return ze=-1.1,e}function gs(e){0<=e&&(ze=e)}function wn(){var e=Pt;return Pt=-0,e}function En(e){0<=e&&(Pt=e)}function Dn(){var e=It;return It=null,e}function _n(){var e=Qt;return Qt=!1,e}function Rm(e){Ja=ua(),0>e.actualStartTime&&(e.actualStartTime=Ja)}function km(e){if(0<=Ja){var t=ua()-Ja;e.actualDuration+=t,e.selfBaseDuration=t,Ja=-1}}function py(e){if(0<=Ja){var t=ua()-Ja;e.actualDuration+=t,Ja=-1}}function Rn(){if(0<=Ja){var e=ua(),t=e-Ja;Ja=-1,Lr+=t,Pt+=t,Be=e}}function hy(e){It===null&&(It=[]),It.push(e),fo===null&&(fo=[]),fo.push(e)}function kn(){Ja=ua(),0>ze&&(ze=Ja)}function Al(e){for(var t=e.child;t;)e.actualDuration+=t.actualDuration,t=t.sibling}function lE(e,t){if(wc===null){var a=wc=[];Fh=0,Ir=zp(),Qi={status:"pending",value:void 0,then:function(s){a.push(s)}}}return Fh++,t.then(by,by),t}function by(){if(--Fh===0&&(-1<Is||(po=-1.1),wc!==null)){Qi!==null&&(Qi.status="fulfilled");var e=wc;wc=null,Ir=0,Qi=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function cE(e,t){var a=[],s={status:"pending",value:null,reason:null,then:function(r){a.push(r)}};return e.then(function(){s.status="fulfilled",s.value=t;for(var r=0;r<a.length;r++)(0,a[r])(t)},function(r){for(s.status="rejected",s.reason=r,r=0;r<a.length;r++)(0,a[r])(void 0)}),s}function Um(){var e=Yr.current;return e!==null?e:kt.pooledCache}function $u(e,t){t===null?ae(Yr,Yr.current,e):ae(Yr,t.pool,e)}function gy(){var e=Um();return e===null?null:{parent:ca._currentValue,pool:e}}function yy(){return{didWarnAboutUncachedPromise:!1,thenables:[]}}function xy(e){return e=e.status,e==="fulfilled"||e==="rejected"}function vy(e,t,a){Q.actQueue!==null&&(Q.didUsePromise=!0);var s=e.thenables;if(a=s[a],a===void 0?s.push(t):a!==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(Zn,Zn),t=a),t._debugInfo===void 0){e=performance.now(),s=t.displayName;var r={name:typeof s=="string"?s:"Promise",start:e,end:e,value:t};t._debugInfo=[{awaited:r}],t.status!=="fulfilled"&&t.status!=="rejected"&&(e=function(){r.end=performance.now()},t.then(e,e))}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sy(e),e;default:if(typeof t.status=="string")t.then(Zn,Zn);else{if(e=kt,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(i){if(t.status==="pending"){var m=t;m.status="fulfilled",m.value=i}},function(i){if(t.status==="pending"){var m=t;m.status="rejected",m.reason=i}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,Sy(e),e}throw Gr=t,Cc=!0,Zi}}function Oo(e){try{return X_(e)}catch(t){throw t!==null&&typeof t=="object"&&typeof t.then=="function"?(Gr=t,Cc=!0,Zi):t}}function Ny(){if(Gr===null)throw Error("Expected a suspended thenable. This is a bug in React. Please file an issue.");var e=Gr;return Gr=null,Cc=!1,e}function Sy(e){if(e===Zi||e===ef)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 Ta(e){var t=We;return e!=null&&(We=t===null?e:t.concat(e)),t}function Cm(){var e=We;if(e!=null){for(var t=e.length-1;0<=t;t--)if(e[t].name!=null){var a=e[t].debugTask;if(a!=null)return a}}return null}function Bu(e,t,a){for(var s=Object.keys(e.props),r=0;r<s.length;r++){var i=s[r];if(i!=="children"&&i!=="key"){t===null&&(t=Ou(e,a.mode,0),t._debugInfo=We,t.return=a),ye(t,function(m){console.error("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",m)},i);break}}}function Iu(e){var t=jc;return jc+=1,Ji===null&&(Ji=yy()),vy(Ji,e,t)}function Vl(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function wy(e,t){throw t.$$typeof===_D?Error(`A React Element from an older version of React was rendered. This is not supported. It can happen if:
99
+ - Multiple copies of the "react" package is used.
100
+ - A library pre-bundled an old copy of "react" or "react/jsx-runtime".
101
+ - 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 Yu(e,t){var a=Cm();a!==null?a.run(wy.bind(null,e,t)):wy(e,t)}function Ey(e,t){var a=I(e)||"Component";ON[a]||(ON[a]=!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.
102
+ 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.
103
+ <%s>{%s}</%s>`,t,t,a,t,a))}function qu(e,t){var a=Cm();a!==null?a.run(Ey.bind(null,e,t)):Ey(e,t)}function Dy(e,t){var a=I(e)||"Component";AN[a]||(AN[a]=!0,t=String(t),e.tag===3?console.error(`Symbols are not valid as a React child.
104
+ root.render(%s)`,t):console.error(`Symbols are not valid as a React child.
105
+ <%s>%s</%s>`,a,t,a))}function Gu(e,t){var a=Cm();a!==null?a.run(Dy.bind(null,e,t)):Dy(e,t)}function _y(e){function t(U,T){if(e){var V=U.deletions;V===null?(U.deletions=[T],U.flags|=16):V.push(T)}}function a(U,T){if(!e)return null;for(;T!==null;)t(U,T),T=T.sibling;return null}function s(U){for(var T=new Map;U!==null;)U.key!==null?T.set(U.key,U):T.set(U.index,U),U=U.sibling;return T}function r(U,T){return U=Jn(U,T),U.index=0,U.sibling=null,U}function i(U,T,V){return U.index=V,e?(V=U.alternate,V!==null?(V=V.index,V<T?(U.flags|=67108866,T):V):(U.flags|=67108866,T)):(U.flags|=1048576,T)}function m(U){return e&&U.alternate===null&&(U.flags|=67108866),U}function h(U,T,V,W){return T===null||T.tag!==6?(T=ym(V,U.mode,W),T.return=U,T._debugOwner=U,T._debugTask=U._debugTask,T._debugInfo=We,T):(T=r(T,V),T.return=U,T._debugInfo=We,T)}function v(U,T,V,W){var xe=V.type;return xe===ji?(T=M(U,T,V.props.children,W,V.key),Bu(V,T,U),T):T!==null&&(T.elementType===xe||ay(T,V)||typeof xe=="object"&&xe!==null&&xe.$$typeof===Ns&&Oo(xe)===T.type)?(T=r(T,V.props),Vl(T,V),T.return=U,T._debugOwner=V._owner,T._debugInfo=We,T):(T=Ou(V,U.mode,W),Vl(T,V),T.return=U,T._debugInfo=We,T)}function D(U,T,V,W){return T===null||T.tag!==4||T.stateNode.containerInfo!==V.containerInfo||T.stateNode.implementation!==V.implementation?(T=xm(V,U.mode,W),T.return=U,T._debugInfo=We,T):(T=r(T,V.children||[]),T.return=U,T._debugInfo=We,T)}function M(U,T,V,W,xe){return T===null||T.tag!==7?(T=Er(V,U.mode,W,xe),T.return=U,T._debugOwner=U,T._debugTask=U._debugTask,T._debugInfo=We,T):(T=r(T,V),T.return=U,T._debugInfo=We,T)}function L(U,T,V){if(typeof T=="string"&&T!==""||typeof T=="number"||typeof T=="bigint")return T=ym(""+T,U.mode,V),T.return=U,T._debugOwner=U,T._debugTask=U._debugTask,T._debugInfo=We,T;if(typeof T=="object"&&T!==null){switch(T.$$typeof){case Vn:return V=Ou(T,U.mode,V),Vl(V,T),V.return=U,U=Ta(T._debugInfo),V._debugInfo=We,We=U,V;case Ci:return T=xm(T,U.mode,V),T.return=U,T._debugInfo=We,T;case Ns:var W=Ta(T._debugInfo);return T=Oo(T),U=L(U,T,V),We=W,U}if(xa(T)||de(T))return V=Er(T,U.mode,V,null),V.return=U,V._debugOwner=U,V._debugTask=U._debugTask,U=Ta(T._debugInfo),V._debugInfo=We,We=U,V;if(typeof T.then=="function")return W=Ta(T._debugInfo),U=L(U,Iu(T),V),We=W,U;if(T.$$typeof===Mn)return L(U,zu(U,T),V);Yu(U,T)}return typeof T=="function"&&qu(U,T),typeof T=="symbol"&&Gu(U,T),null}function j(U,T,V,W){var xe=T!==null?T.key:null;if(typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint")return xe!==null?null:h(U,T,""+V,W);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case Vn:return V.key===xe?(xe=Ta(V._debugInfo),U=v(U,T,V,W),We=xe,U):null;case Ci:return V.key===xe?D(U,T,V,W):null;case Ns:return xe=Ta(V._debugInfo),V=Oo(V),U=j(U,T,V,W),We=xe,U}if(xa(V)||de(V))return xe!==null?null:(xe=Ta(V._debugInfo),U=M(U,T,V,W,null),We=xe,U);if(typeof V.then=="function")return xe=Ta(V._debugInfo),U=j(U,T,Iu(V),W),We=xe,U;if(V.$$typeof===Mn)return j(U,T,zu(U,V),W);Yu(U,V)}return typeof V=="function"&&qu(U,V),typeof V=="symbol"&&Gu(U,V),null}function q(U,T,V,W,xe){if(typeof W=="string"&&W!==""||typeof W=="number"||typeof W=="bigint")return U=U.get(V)||null,h(T,U,""+W,xe);if(typeof W=="object"&&W!==null){switch(W.$$typeof){case Vn:return V=U.get(W.key===null?V:W.key)||null,U=Ta(W._debugInfo),T=v(T,V,W,xe),We=U,T;case Ci:return U=U.get(W.key===null?V:W.key)||null,D(T,U,W,xe);case Ns:var Ge=Ta(W._debugInfo);return W=Oo(W),T=q(U,T,V,W,xe),We=Ge,T}if(xa(W)||de(W))return V=U.get(V)||null,U=Ta(W._debugInfo),T=M(T,V,W,xe,null),We=U,T;if(typeof W.then=="function")return Ge=Ta(W._debugInfo),T=q(U,T,V,Iu(W),xe),We=Ge,T;if(W.$$typeof===Mn)return q(U,T,V,zu(T,W),xe);Yu(T,W)}return typeof W=="function"&&qu(T,W),typeof W=="symbol"&&Gu(T,W),null}function ge(U,T,V,W){if(typeof V!="object"||V===null)return W;switch(V.$$typeof){case Vn:case Ci:E(U,T,V);var xe=V.key;if(typeof xe!="string")break;if(W===null){W=new Set,W.add(xe);break}if(!W.has(xe)){W.add(xe);break}ye(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.",xe)});break;case Ns:V=Oo(V),ge(U,T,V,W)}return W}function Se(U,T,V,W){for(var xe=null,Ge=null,Ve=null,Ce=T,Ze=T=0,Lt=null;Ce!==null&&Ze<V.length;Ze++){Ce.index>Ze?(Lt=Ce,Ce=null):Lt=Ce.sibling;var oa=j(U,Ce,V[Ze],W);if(oa===null){Ce===null&&(Ce=Lt);break}xe=ge(U,oa,V[Ze],xe),e&&Ce&&oa.alternate===null&&t(U,Ce),T=i(oa,T,Ze),Ve===null?Ge=oa:Ve.sibling=oa,Ve=oa,Ce=Lt}if(Ze===V.length)return a(U,Ce),ut&&Kn(U,Ze),Ge;if(Ce===null){for(;Ze<V.length;Ze++)Ce=L(U,V[Ze],W),Ce!==null&&(xe=ge(U,Ce,V[Ze],xe),T=i(Ce,T,Ze),Ve===null?Ge=Ce:Ve.sibling=Ce,Ve=Ce);return ut&&Kn(U,Ze),Ge}for(Ce=s(Ce);Ze<V.length;Ze++)Lt=q(Ce,U,Ze,V[Ze],W),Lt!==null&&(xe=ge(U,Lt,V[Ze],xe),e&&Lt.alternate!==null&&Ce.delete(Lt.key===null?Ze:Lt.key),T=i(Lt,T,Ze),Ve===null?Ge=Lt:Ve.sibling=Lt,Ve=Lt);return e&&Ce.forEach(function(So){return t(U,So)}),ut&&Kn(U,Ze),Ge}function Ot(U,T,V,W){if(V==null)throw Error("An iterable object provided no iterator.");for(var xe=null,Ge=null,Ve=T,Ce=T=0,Ze=null,Lt=null,oa=V.next();Ve!==null&&!oa.done;Ce++,oa=V.next()){Ve.index>Ce?(Ze=Ve,Ve=null):Ze=Ve.sibling;var So=j(U,Ve,oa.value,W);if(So===null){Ve===null&&(Ve=Ze);break}Lt=ge(U,So,oa.value,Lt),e&&Ve&&So.alternate===null&&t(U,Ve),T=i(So,T,Ce),Ge===null?xe=So:Ge.sibling=So,Ge=So,Ve=Ze}if(oa.done)return a(U,Ve),ut&&Kn(U,Ce),xe;if(Ve===null){for(;!oa.done;Ce++,oa=V.next())Ve=L(U,oa.value,W),Ve!==null&&(Lt=ge(U,Ve,oa.value,Lt),T=i(Ve,T,Ce),Ge===null?xe=Ve:Ge.sibling=Ve,Ge=Ve);return ut&&Kn(U,Ce),xe}for(Ve=s(Ve);!oa.done;Ce++,oa=V.next())Ze=q(Ve,U,Ce,oa.value,W),Ze!==null&&(Lt=ge(U,Ze,oa.value,Lt),e&&Ze.alternate!==null&&Ve.delete(Ze.key===null?Ce:Ze.key),T=i(Ze,T,Ce),Ge===null?xe=Ze:Ge.sibling=Ze,Ge=Ze);return e&&Ve.forEach(function(yR){return t(U,yR)}),ut&&Kn(U,Ce),xe}function pt(U,T,V,W){if(typeof V=="object"&&V!==null&&V.type===ji&&V.key===null&&(Bu(V,null,U),V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case Vn:var xe=Ta(V._debugInfo);e:{for(var Ge=V.key;T!==null;){if(T.key===Ge){if(Ge=V.type,Ge===ji){if(T.tag===7){a(U,T.sibling),W=r(T,V.props.children),W.return=U,W._debugOwner=V._owner,W._debugInfo=We,Bu(V,W,U),U=W;break e}}else if(T.elementType===Ge||ay(T,V)||typeof Ge=="object"&&Ge!==null&&Ge.$$typeof===Ns&&Oo(Ge)===T.type){a(U,T.sibling),W=r(T,V.props),Vl(W,V),W.return=U,W._debugOwner=V._owner,W._debugInfo=We,U=W;break e}a(U,T);break}else t(U,T);T=T.sibling}V.type===ji?(W=Er(V.props.children,U.mode,W,V.key),W.return=U,W._debugOwner=U,W._debugTask=U._debugTask,W._debugInfo=We,Bu(V,W,U),U=W):(W=Ou(V,U.mode,W),Vl(W,V),W.return=U,W._debugInfo=We,U=W)}return U=m(U),We=xe,U;case Ci:e:{for(xe=V,V=xe.key;T!==null;){if(T.key===V)if(T.tag===4&&T.stateNode.containerInfo===xe.containerInfo&&T.stateNode.implementation===xe.implementation){a(U,T.sibling),W=r(T,xe.children||[]),W.return=U,U=W;break e}else{a(U,T);break}else t(U,T);T=T.sibling}W=xm(xe,U.mode,W),W.return=U,U=W}return m(U);case Ns:return xe=Ta(V._debugInfo),V=Oo(V),U=pt(U,T,V,W),We=xe,U}if(xa(V))return xe=Ta(V._debugInfo),U=Se(U,T,V,W),We=xe,U;if(de(V)){if(xe=Ta(V._debugInfo),Ge=de(V),typeof Ge!="function")throw Error("An object is not an iterable. This error is likely caused by a bug in React. Please file an issue.");var Ve=Ge.call(V);return Ve===V?(U.tag!==0||Object.prototype.toString.call(U.type)!=="[object GeneratorFunction]"||Object.prototype.toString.call(Ve)!=="[object Generator]")&&(jN||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."),jN=!0):V.entries!==Ge||Jh||(console.error("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),Jh=!0),U=Ot(U,T,Ve,W),We=xe,U}if(typeof V.then=="function")return xe=Ta(V._debugInfo),U=pt(U,T,Iu(V),W),We=xe,U;if(V.$$typeof===Mn)return pt(U,T,zu(U,V),W);Yu(U,V)}return typeof V=="string"&&V!==""||typeof V=="number"||typeof V=="bigint"?(xe=""+V,T!==null&&T.tag===6?(a(U,T.sibling),W=r(T,xe),W.return=U,U=W):(a(U,T),W=ym(xe,U.mode,W),W.return=U,W._debugOwner=U,W._debugTask=U._debugTask,W._debugInfo=We,U=W),m(U)):(typeof V=="function"&&qu(U,V),typeof V=="symbol"&&Gu(U,V),a(U,T))}return function(U,T,V,W){var xe=We;We=null;try{jc=0;var Ge=pt(U,T,V,W);return Ji=null,Ge}catch(Lt){if(Lt===Zi||Lt===ef)throw Lt;var Ve=S(29,Lt,null,U.mode);Ve.lanes=W,Ve.return=U;var Ce=Ve._debugInfo=We;if(Ve._debugOwner=U._debugOwner,Ve._debugTask=U._debugTask,Ce!=null){for(var Ze=Ce.length-1;0<=Ze;Ze--)if(typeof Ce[Ze].stack=="string"){Ve._debugOwner=Ce[Ze],Ve._debugTask=Ce[Ze].debugTask;break}}return Ve}finally{We=xe}}}function Ry(e,t){var a=xa(e);return e=!a&&typeof de(e)=="function",a||e?(a=a?"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>",a,t,a),!1):!0}function jm(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Tm(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 Ao(e){return{lane:e,tag:MN,payload:null,callback:null,next:null}}function Vo(e,t,a){var s=e.updateQueue;if(s===null)return null;if(s=s.shared,Wh===s&&!HN){var r=I(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.
106
+
107
+ Please update the following component: %s`,r),HN=!0}return(bt&Na)!==Ca?(r=s.pending,r===null?t.next=t:(t.next=r.next,r.next=t),s.pending=t,t=Tu(e),ty(e,null,a),t):(ju(e,s,t,a),Tu(e))}function Ml(e,t,a){if(t=t.updateQueue,t!==null&&(t=t.shared,(a&4194048)!==0)){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,ta(e,a)}}function Pu(e,t){var a=e.updateQueue,s=e.alternate;if(s!==null&&(s=s.updateQueue,a===s)){var r=null,i=null;if(a=a.firstBaseUpdate,a!==null){do{var m={lane:a.lane,tag:a.tag,payload:a.payload,callback:null,next:null};i===null?r=i=m:i=i.next=m,a=a.next}while(a!==null);i===null?r=i=t:i=i.next=t}else r=i=t;a={baseState:s.baseState,firstBaseUpdate:r,lastBaseUpdate:i,shared:s.shared,callbacks:s.callbacks},e.updateQueue=a;return}e=a.lastBaseUpdate,e===null?a.firstBaseUpdate=t:e.next=t,a.lastBaseUpdate=t}function zl(){if(eb){var e=Qi;if(e!==null)throw e}}function Ll(e,t,a,s){eb=!1;var r=e.updateQueue;tr=!1,Wh=r.shared;var i=r.firstBaseUpdate,m=r.lastBaseUpdate,h=r.shared.pending;if(h!==null){r.shared.pending=null;var v=h,D=v.next;v.next=null,m===null?i=D:m.next=D,m=v;var M=e.alternate;M!==null&&(M=M.updateQueue,h=M.lastBaseUpdate,h!==m&&(h===null?M.firstBaseUpdate=D:h.next=D,M.lastBaseUpdate=v))}if(i!==null){var L=r.baseState;m=0,M=D=v=null,h=i;do{var j=h.lane&-536870913,q=j!==h.lane;if(q?(et&j)===j:(s&j)===j){j!==0&&j===Ir&&(eb=!0),M!==null&&(M=M.next={lane:0,tag:h.tag,payload:h.payload,callback:null,next:null});e:{j=e;var ge=h,Se=t,Ot=a;switch(ge.tag){case zN:if(ge=ge.payload,typeof ge=="function"){Fi=!0;var pt=ge.call(Ot,L,Se);if(j.mode&Ba){Ee(!0);try{ge.call(Ot,L,Se)}finally{Ee(!1)}}Fi=!1,L=pt;break e}L=ge;break e;case Kh:j.flags=j.flags&-65537|128;case MN:if(pt=ge.payload,typeof pt=="function"){if(Fi=!0,ge=pt.call(Ot,L,Se),j.mode&Ba){Ee(!0);try{pt.call(Ot,L,Se)}finally{Ee(!1)}}Fi=!1}else ge=pt;if(ge==null)break e;L=nt({},L,ge);break e;case LN:tr=!0}}j=h.callback,j!==null&&(e.flags|=64,q&&(e.flags|=8192),q=r.callbacks,q===null?r.callbacks=[j]:q.push(j))}else q={lane:j,tag:h.tag,payload:h.payload,callback:h.callback,next:null},M===null?(D=M=q,v=L):M=M.next=q,m|=j;if(h=h.next,h===null){if(h=r.shared.pending,h===null)break;q=h,h=q.next,q.next=null,r.lastBaseUpdate=q,r.shared.pending=null}}while(!0);M===null&&(v=L),r.baseState=v,r.firstBaseUpdate=D,r.lastBaseUpdate=M,i===null&&(r.shared.lanes=0),nr|=m,e.lanes=m,e.memoizedState=L}Wh=null}function ky(e,t){if(typeof e!="function")throw Error("Invalid argument passed as callback. Expected a function. Instead received: "+e);e.call(t)}function uE(e,t){var a=e.shared.hiddenCallbacks;if(a!==null)for(e.shared.hiddenCallbacks=null,e=0;e<a.length;e++)ky(a[e],t)}function Uy(e,t){var a=e.callbacks;if(a!==null)for(e.callbacks=null,e=0;e<a.length;e++)ky(a[e],t)}function Cy(e,t){var a=Gn;ae(af,a,e),ae(Ki,t,e),Gn=a|t.baseLanes}function Om(e){ae(af,Gn,e),ae(Ki,Ki.current,e)}function Am(e){Gn=af.current,se(Ki,e),se(af,e)}function Mo(e){var t=e.alternate;ae(na,na.current&Wi,e),ae(Es,e,e),Ys===null&&(t===null||Ki.current!==null||t.memoizedState!==null)&&(Ys=e)}function Vm(e){ae(na,na.current,e),ae(Es,e,e),Ys===null&&(Ys=e)}function jy(e){e.tag===22?(ae(na,na.current,e),ae(Es,e,e),Ys===null&&(Ys=e)):zo(e)}function zo(e){ae(na,na.current,e),ae(Es,Es.current,e)}function ys(e){se(Es,e),Ys===e&&(Ys=null),se(na,e)}function Fu(e){for(var t=e;t!==null;){if(t.tag===13){var a=t.memoizedState;if(a!==null&&(a=a.dehydrated,a===null||Xp(a)||Qp(a)))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)!==0)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 st(){var e=F;Gs===null?Gs=[e]:Gs.push(e)}function re(){var e=F;if(Gs!==null&&(go++,Gs[go]!==e)){var t=I(qe);if(!$N.has(t)&&($N.add(t),Gs!==null)){for(var a="",s=0;s<=go;s++){var r=Gs[s],i=s===go?e:r;for(r=s+1+". "+r;30>r.length;)r+=" ";r+=i+`
108
+ `,a+=r}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
109
+
110
+ Previous render Next render
111
+ ------------------------------------------------------
112
+ %s ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
113
+ `,t,a)}}}function gi(e){e==null||xa(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.",F,typeof e)}function Xu(){var e=I(qe);IN.has(e)||(IN.add(e),console.error("ReactDOM.useFormState has been renamed to React.useActionState. Please update %s to use React.useActionState.",e))}function Zt(){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:
114
+ 1. You might have mismatching versions of React and the renderer (such as React DOM)
115
+ 2. You might be breaking the Rules of Hooks
116
+ 3. You might have more than one copy of React in the same app
117
+ See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`)}function Mm(e,t){if(Ac)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.",F),!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.
118
+
119
+ Previous: %s
120
+ Incoming: %s`,F,"["+t.join(", ")+"]","["+e.join(", ")+"]");for(var a=0;a<t.length&&a<e.length;a++)if(!Za(e[a],t[a]))return!1;return!0}function zm(e,t,a,s,r,i){ho=i,qe=t,Gs=e!==null?e._debugHookTypes:null,go=-1,Ac=e!==null&&e.type!==t.type,(Object.prototype.toString.call(a)==="[object AsyncFunction]"||Object.prototype.toString.call(a)==="[object AsyncGeneratorFunction]")&&(i=I(qe),tb.has(i)||(tb.add(i),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.",i===null?"An unknown Component":"<"+i+">"))),t.memoizedState=null,t.updateQueue=null,t.lanes=0,Q.H=e!==null&&e.memoizedState!==null?sb:Gs!==null?YN:ab,Fr=i=(t.mode&Ba)!==Ye;var m=Xh(a,s,r);if(Fr=!1,tl&&(m=Lm(t,a,s,r)),i){Ee(!0);try{m=Lm(t,a,s,r)}finally{Ee(!1)}}return Ty(e,t),m}function Ty(e,t){t._debugHookTypes=Gs,t.dependencies===null?bo!==null&&(t.dependencies={lanes:0,firstContext:null,_debugThenableState:bo}):t.dependencies._debugThenableState=bo,Q.H=Vc;var a=Rt!==null&&Rt.next!==null;if(ho=0,Gs=F=da=Rt=qe=null,go=-1,e!==null&&(e.flags&65011712)!==(t.flags&65011712)&&console.error("Internal React error: Expected static flag was missing. Please notify the React team."),nf=!1,Oc=0,bo=null,a)throw Error("Rendered fewer hooks than expected. This may be caused by an accidental early return statement.");e===null||fa||(e=e.dependencies,e!==null&&Mu(e)&&(fa=!0)),Cc?(Cc=!1,e=!0):e=!1,e&&(t=I(t)||"Unknown",BN.has(t)||tb.has(t)||(BN.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 Lm(e,t,a,s){qe=e;var r=0;do{if(tl&&(bo=null),Oc=0,tl=!1,r>=Z_)throw Error("Too many re-renders. React limits the number of renders to prevent an infinite loop.");if(r+=1,Ac=!1,da=Rt=null,e.updateQueue!=null){var i=e.updateQueue;i.lastEffect=null,i.events=null,i.stores=null,i.memoCache!=null&&(i.memoCache.index=0)}go=-1,Q.H=qN,i=Xh(t,a,s)}while(tl);return i}function dE(){var e=Q.H,t=e.useState()[0];return t=typeof t.then=="function"?Hl(t):t,e=e.useState()[0],(Rt!==null?Rt.memoizedState:null)!==e&&(qe.flags|=1024),t}function Hm(){var e=of!==0;return of=0,e}function $m(e,t,a){t.updateQueue=e.updateQueue,t.flags=(t.mode&rn)!==Ye?t.flags&-402655237:t.flags&-2053,e.lanes&=~a}function Bm(e){if(nf){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}nf=!1}ho=0,Gs=da=Rt=qe=null,go=-1,F=null,tl=!1,Oc=of=0,bo=null}function Pa(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return da===null?qe.memoizedState=da=e:da=da.next=e,da}function wt(){if(Rt===null){var e=qe.alternate;e=e!==null?e.memoizedState:null}else e=Rt.next;var t=da===null?qe.memoizedState:da.next;if(t!==null)da=t,Rt=e;else{if(e===null)throw qe.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.");Rt=e,e={memoizedState:Rt.memoizedState,baseState:Rt.baseState,baseQueue:Rt.baseQueue,queue:Rt.queue,next:null},da===null?qe.memoizedState=da=e:da=da.next=e}return da}function Qu(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Hl(e){var t=Oc;return Oc+=1,bo===null&&(bo=yy()),e=vy(bo,e,t),t=qe,(da===null?t.memoizedState:da.next)===null&&(t=t.alternate,Q.H=t!==null&&t.memoizedState!==null?sb:ab),e}function Lo(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Hl(e);if(e.$$typeof===Mn)return Bt(e)}throw Error("An unsupported type was passed to use(): "+String(e))}function Ur(e){var t=null,a=qe.updateQueue;if(a!==null&&(t=a.memoCache),t==null){var s=qe.alternate;s!==null&&(s=s.updateQueue,s!==null&&(s=s.memoCache,s!=null&&(t={data:s.data.map(function(r){return r.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),a===null&&(a=Qu(),qe.updateQueue=a),a.memoCache=t,a=t.data[t.index],a===void 0||Ac)for(a=t.data[t.index]=Array(e),s=0;s<e;s++)a[s]=RD;else a.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.",a.length,e);return t.index++,a}function sn(e,t){return typeof t=="function"?t(e):t}function Im(e,t,a){var s=Pa();if(a!==void 0){var r=a(t);if(Fr){Ee(!0);try{a(t)}finally{Ee(!1)}}}else r=t;return s.memoizedState=s.baseState=r,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:r},s.queue=e,e=e.dispatch=bE.bind(null,qe,e),[s.memoizedState,e]}function yi(e){var t=wt();return Ym(t,Rt,e)}function Ym(e,t,a){var s=e.queue;if(s===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");s.lastRenderedReducer=a;var r=e.baseQueue,i=s.pending;if(i!==null){if(r!==null){var m=r.next;r.next=i.next,i.next=m}t.baseQueue!==r&&console.error("Internal error: Expected work-in-progress queue to be a clone. This is a bug in React."),t.baseQueue=r=i,s.pending=null}if(i=e.baseState,r===null)e.memoizedState=i;else{t=r.next;var h=m=null,v=null,D=t,M=!1;do{var L=D.lane&-536870913;if(L!==D.lane?(et&L)===L:(ho&L)===L){var j=D.revertLane;if(j===0)v!==null&&(v=v.next={lane:0,revertLane:0,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null}),L===Ir&&(M=!0);else if((ho&j)===j){D=D.next,j===Ir&&(M=!0);continue}else L={lane:0,revertLane:D.revertLane,gesture:null,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},v===null?(h=v=L,m=i):v=v.next=L,qe.lanes|=j,nr|=j;L=D.action,Fr&&a(i,L),i=D.hasEagerState?D.eagerState:a(i,L)}else j={lane:L,revertLane:D.revertLane,gesture:D.gesture,action:D.action,hasEagerState:D.hasEagerState,eagerState:D.eagerState,next:null},v===null?(h=v=j,m=i):v=v.next=j,qe.lanes|=L,nr|=L;D=D.next}while(D!==null&&D!==t);if(v===null?m=i:v.next=h,!Za(i,e.memoizedState)&&(fa=!0,M&&(a=Qi,a!==null)))throw a;e.memoizedState=i,e.baseState=m,e.baseQueue=v,s.lastRenderedState=i}return r===null&&(s.lanes=0),[e.memoizedState,s.dispatch]}function $l(e){var t=wt(),a=t.queue;if(a===null)throw Error("Should have a queue. You are likely calling Hooks conditionally, which is not allowed. (https://react.dev/link/invalid-hook-call)");a.lastRenderedReducer=e;var s=a.dispatch,r=a.pending,i=t.memoizedState;if(r!==null){a.pending=null;var m=r=r.next;do i=e(i,m.action),m=m.next;while(m!==r);Za(i,t.memoizedState)||(fa=!0),t.memoizedState=i,t.baseQueue===null&&(t.baseState=i),a.lastRenderedState=i}return[i,s]}function qm(e,t,a){var s=qe,r=Pa();if(ut){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");var i=a();el||i===a()||(console.error("The result of getServerSnapshot should be cached to avoid an infinite loop"),el=!0)}else{if(i=t(),el||(a=t(),Za(i,a)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),el=!0)),kt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");(et&127)!==0||Oy(s,t,i)}return r.memoizedState=i,a={value:i,getSnapshot:t},r.queue=a,Wu(Vy.bind(null,s,a,e),[e]),s.flags|=2048,vi(qs|Wa,{destroy:void 0},Ay.bind(null,s,a,i,t),null),i}function Zu(e,t,a){var s=qe,r=wt(),i=ut;if(i){if(a===void 0)throw Error("Missing getServerSnapshot, which is required for server-rendered content. Will revert to client rendering.");a=a()}else if(a=t(),!el){var m=t();Za(a,m)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),el=!0)}(m=!Za((Rt||r).memoizedState,a))&&(r.memoizedState=a,fa=!0),r=r.queue;var h=Vy.bind(null,s,r,e);if(ns(2048,Wa,h,[e]),r.getSnapshot!==t||m||da!==null&&da.memoizedState.tag&qs){if(s.flags|=2048,vi(qs|Wa,{destroy:void 0},Ay.bind(null,s,r,a,t),null),kt===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");i||(ho&127)!==0||Oy(s,t,a)}return a}function Oy(e,t,a){e.flags|=16384,e={getSnapshot:t,value:a},t=qe.updateQueue,t===null?(t=Qu(),qe.updateQueue=t,t.stores=[e]):(a=t.stores,a===null?t.stores=[e]:a.push(e))}function Ay(e,t,a,s){t.value=a,t.getSnapshot=s,My(t)&&zy(e)}function Vy(e,t,a){return a(function(){My(t)&&(Sn(2,"updateSyncExternalStore()",e),zy(e))})}function My(e){var t=e.getSnapshot;e=e.value;try{var a=t();return!Za(e,a)}catch{return!0}}function zy(e){var t=Ha(e,2);t!==null&&Xt(t,e,2)}function Gm(e){var t=Pa();if(typeof e=="function"){var a=e;if(e=a(),Fr){Ee(!0);try{a()}finally{Ee(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:e},t}function Pm(e){e=Gm(e);var t=e.queue,a=ax.bind(null,qe,t);return t.dispatch=a,[e.memoizedState,a]}function Fm(e){var t=Pa();t.memoizedState=t.baseState=e;var a={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=a,t=ip.bind(null,qe,!0,a),a.dispatch=t,[e,t]}function Ly(e,t){var a=wt();return Hy(a,Rt,e,t)}function Hy(e,t,a,s){return e.baseState=a,Ym(e,Rt,typeof s=="function"?s:sn)}function $y(e,t){var a=wt();return Rt!==null?Hy(a,Rt,e,t):(a.baseState=e,[e,a.queue.dispatch])}function fE(e,t,a,s,r){if(od(e))throw Error("Cannot update form state while rendering.");if(e=t.action,e!==null){var i={payload:r,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(m){i.listeners.push(m)}};Q.T!==null?a(!0):i.isTransition=!1,s(i),a=t.pending,a===null?(i.next=t.pending=i,By(t,i)):(i.next=a.next,t.pending=a.next=i)}}function By(e,t){var a=t.action,s=t.payload,r=e.state;if(t.isTransition){var i=Q.T,m={};m._updatedFibers=new Set,Q.T=m;try{var h=a(r,s),v=Q.S;v!==null&&v(m,h),Iy(e,t,h)}catch(D){Xm(e,t,D)}finally{i!==null&&m.types!==null&&(i.types!==null&&i.types!==m.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."),i.types=m.types),Q.T=i,i===null&&m._updatedFibers&&(e=m._updatedFibers.size,m._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{m=a(r,s),Iy(e,t,m)}catch(D){Xm(e,t,D)}}function Iy(e,t,a){a!==null&&typeof a=="object"&&typeof a.then=="function"?(Q.asyncTransitions++,a.then(nd,nd),a.then(function(s){Yy(e,t,s)},function(s){return Xm(e,t,s)}),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.")):Yy(e,t,a)}function Yy(e,t,a){t.status="fulfilled",t.value=a,qy(t),e.state=a,t=e.pending,t!==null&&(a=t.next,a===t?e.pending=null:(a=a.next,t.next=a,By(e,a)))}function Xm(e,t,a){var s=e.pending;if(e.pending=null,s!==null){s=s.next;do t.status="rejected",t.reason=a,qy(t),t=t.next;while(t!==s)}e.action=null}function qy(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function Gy(e,t){return t}function xi(e,t){if(ut){var a=kt.formState;if(a!==null){e:{var s=qe;if(ut){if(zt){t:{for(var r=zt,i=Bs;r.nodeType!==8;){if(!i){r=null;break t}if(r=vs(r.nextSibling),r===null){r=null;break t}}i=r.data,r=i===_b||i===U1?r:null}if(r){zt=vs(r.nextSibling),s=r.data===_b;break e}}jo(s)}s=!1}s&&(t=a[0])}}return a=Pa(),a.memoizedState=a.baseState=t,s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Gy,lastRenderedState:t},a.queue=s,a=ax.bind(null,qe,s),s.dispatch=a,s=Gm(!1),i=ip.bind(null,qe,!1,s.queue),s=Pa(),r={state:t,dispatch:null,action:e,pending:null},s.queue=r,a=fE.bind(null,qe,r,i,a),r.dispatch=a,s.memoizedState=e,[t,a,!1]}function Ju(e){var t=wt();return Py(t,Rt,e)}function Py(e,t,a){if(t=Ym(e,t,Gy)[0],e=yi(sn)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var s=Hl(t)}catch(m){throw m===Zi?ef:m}else s=t;t=wt();var r=t.queue,i=r.dispatch;return a!==t.memoizedState&&(qe.flags|=2048,vi(qs|Wa,{destroy:void 0},mE.bind(null,r,a),null)),[s,i,e]}function mE(e,t){e.action=t}function Ku(e){var t=wt(),a=Rt;if(a!==null)return Py(t,a,e);wt(),t=t.memoizedState,a=wt();var s=a.queue.dispatch;return a.memoizedState=e,[t,s,!1]}function vi(e,t,a,s){return e={tag:e,create:a,deps:s,inst:t,next:null},t=qe.updateQueue,t===null&&(t=Qu(),qe.updateQueue=t),a=t.lastEffect,a===null?t.lastEffect=e.next=e:(s=a.next,a.next=e,e.next=s,t.lastEffect=e),e}function Qm(e){var t=Pa();return e={current:e},t.memoizedState=e}function Cr(e,t,a,s){var r=Pa();qe.flags|=e,r.memoizedState=vi(qs|t,{destroy:void 0},a,s===void 0?null:s)}function ns(e,t,a,s){var r=wt();s=s===void 0?null:s;var i=r.memoizedState.inst;Rt!==null&&s!==null&&Mm(s,Rt.memoizedState.deps)?r.memoizedState=vi(t,i,a,s):(qe.flags|=e,r.memoizedState=vi(qs|t,i,a,s))}function Wu(e,t){(qe.mode&rn)!==Ye?Cr(276826112,Wa,e,t):Cr(8390656,Wa,e,t)}function pE(e){qe.flags|=4;var t=qe.updateQueue;if(t===null)t=Qu(),qe.updateQueue=t,t.events=[e];else{var a=t.events;a===null?t.events=[e]:a.push(e)}}function Zm(e){var t=Pa(),a={impl:e};return t.memoizedState=a,function(){if((bt&Na)!==Ca)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return a.impl.apply(void 0,arguments)}}function ed(e){var t=wt().memoizedState;return pE({ref:t,nextImpl:e}),function(){if((bt&Na)!==Ca)throw Error("A function wrapped in useEffectEvent can't be called during rendering.");return t.impl.apply(void 0,arguments)}}function Jm(e,t){var a=4194308;return(qe.mode&rn)!==Ye&&(a|=134217728),Cr(a,Ds,e,t)}function Fy(e,t){if(typeof t=="function"){e=e();var a=t(e);return function(){typeof a=="function"?a():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 Km(e,t,a){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),a=a!=null?a.concat([e]):null;var s=4194308;(qe.mode&rn)!==Ye&&(s|=134217728),Cr(s,Ds,Fy.bind(null,t,e),a)}function td(e,t,a){typeof t!="function"&&console.error("Expected useImperativeHandle() second argument to be a function that creates a handle. Instead received: %s.",t!==null?typeof t:"null"),a=a!=null?a.concat([e]):null,ns(4,Ds,Fy.bind(null,t,e),a)}function Wm(e,t){return Pa().memoizedState=[e,t===void 0?null:t],e}function ad(e,t){var a=wt();t=t===void 0?null:t;var s=a.memoizedState;return t!==null&&Mm(t,s[1])?s[0]:(a.memoizedState=[e,t],e)}function ep(e,t){var a=Pa();t=t===void 0?null:t;var s=e();if(Fr){Ee(!0);try{e()}finally{Ee(!1)}}return a.memoizedState=[s,t],s}function sd(e,t){var a=wt();t=t===void 0?null:t;var s=a.memoizedState;if(t!==null&&Mm(t,s[1]))return s[0];if(s=e(),Fr){Ee(!0);try{e()}finally{Ee(!1)}}return a.memoizedState=[s,t],s}function tp(e,t){var a=Pa();return ap(a,e,t)}function Xy(e,t){var a=wt();return Zy(a,Rt.memoizedState,e,t)}function Qy(e,t){var a=wt();return Rt===null?ap(a,e,t):Zy(a,Rt.memoizedState,e,t)}function ap(e,t,a){return a===void 0||(ho&1073741824)!==0&&(et&261930)===0?e.memoizedState=t:(e.memoizedState=a,e=Jx(),qe.lanes|=e,nr|=e,a)}function Zy(e,t,a,s){return Za(a,t)?a:Ki.current!==null?(e=ap(e,a,s),Za(e,t)||(fa=!0),e):(ho&42)===0||(ho&1073741824)!==0&&(et&261930)===0?(fa=!0,e.memoizedState=a):(e=Jx(),qe.lanes|=e,nr|=e,t)}function nd(){Q.asyncTransitions--}function Jy(e,t,a,s,r){var i=St.p;St.p=i!==0&&i<$n?i:$n;var m=Q.T,h={};h._updatedFibers=new Set,Q.T=h,ip(e,!1,t,a);try{var v=r(),D=Q.S;if(D!==null&&D(h,v),v!==null&&typeof v=="object"&&typeof v.then=="function"){Q.asyncTransitions++,v.then(nd,nd);var M=cE(v,s);Bl(e,t,M,xs(e))}else Bl(e,t,s,xs(e))}catch(L){Bl(e,t,{then:function(){},status:"rejected",reason:L},xs(e))}finally{St.p=i,m!==null&&h.types!==null&&(m.types!==null&&m.types!==h.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."),m.types=h.types),Q.T=m,m===null&&h._updatedFibers&&(e=h._updatedFibers.size,h._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 sp(e,t,a,s){if(e.tag!==5)throw Error("Expected the form instance to be a HostComponent. This is a bug in React.");var r=Ky(e).queue;iE(e),Jy(e,r,t,ni,a===null?y:function(){return Wy(e),a(s)})}function Ky(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:ni,baseState:ni,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:ni},next:null};var a={};return t.next={memoizedState:a,baseState:a,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:sn,lastRenderedState:a},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function Wy(e){Q.T===null&&console.error("requestFormReset was called outside a transition or action. To fix, move to an action, or wrap with startTransition.");var t=Ky(e);t.next===null&&(t=e.alternate.memoizedState),Bl(e,t.next.queue,{},xs(e))}function np(){var e=Gm(!1);return e=Jy.bind(null,qe,e.queue,!0,!1),Pa().memoizedState=e,[!1,e]}function ex(){var e=yi(sn)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:Hl(e),t]}function tx(){var e=$l(sn)[0],t=wt().memoizedState;return[typeof e=="boolean"?e:Hl(e),t]}function jr(){return Bt(Zc)}function op(){var e=Pa(),t=kt.identifierPrefix;if(ut){var a=co,s=lo;a=(s&~(1<<32-Fa(s)-1)).toString(32)+a,t="_"+t+"R_"+a,a=of++,0<a&&(t+="H"+a.toString(32)),t+="_"}else a=Q_++,t="_"+t+"r_"+a.toString(32)+"_";return e.memoizedState=t}function rp(){return Pa().memoizedState=hE.bind(null,qe)}function hE(e,t){for(var a=e.return;a!==null;){switch(a.tag){case 24:case 3:var s=xs(a),r=Ao(s),i=Vo(a,r,s);i!==null&&(Sn(s,"refresh()",e),Xt(i,a,s),Ml(i,a,s)),e=_m(),t!=null&&i!==null&&console.error("The seed argument is not enabled outside experimental channels."),r.payload={cache:e};return}a=a.return}}function bE(e,t,a){var s=arguments;typeof s[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()."),s=xs(e);var r={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};od(e)?sx(t,r):(r=pm(e,t,r,s),r!==null&&(Sn(s,"dispatch()",e),Xt(r,e,s),nx(r,t,s)))}function ax(e,t,a){var s=arguments;typeof s[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()."),s=xs(e),Bl(e,t,a,s)&&Sn(s,"setState()",e)}function Bl(e,t,a,s){var r={lane:s,revertLane:0,gesture:null,action:a,hasEagerState:!1,eagerState:null,next:null};if(od(e))sx(t,r);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null)){var m=Q.H;Q.H=cn;try{var h=t.lastRenderedState,v=i(h,a);if(r.hasEagerState=!0,r.eagerState=v,Za(v,h))return ju(e,t,r,0),kt===null&&Cu(),!1}catch{}finally{Q.H=m}}if(a=pm(e,t,r,s),a!==null)return Xt(a,e,s),nx(a,t,s),!0}return!1}function ip(e,t,a,s){if(Q.T===null&&Ir===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."),s={lane:2,revertLane:zp(),gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},od(e)){if(t)throw Error("Cannot update optimistic state while rendering.");console.error("Cannot call startTransition while rendering.")}else t=pm(e,a,s,2),t!==null&&(Sn(2,"setOptimistic()",e),Xt(t,e,2))}function od(e){var t=e.alternate;return e===qe||t!==null&&t===qe}function sx(e,t){tl=nf=!0;var a=e.pending;a===null?t.next=t:(t.next=a.next,a.next=t),e.pending=t}function nx(e,t,a){if((a&4194048)!==0){var s=t.lanes;s&=e.pendingLanes,a|=s,t.lanes=a,ta(e,a)}}function lp(e){if(e!==null&&typeof e!="function"){var t=String(e);t1.has(t)||(t1.add(t),console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",e))}}function cp(e,t,a,s){var r=e.memoizedState,i=a(s,r);if(e.mode&Ba){Ee(!0);try{i=a(s,r)}finally{Ee(!1)}}i===void 0&&(t=k(t)||"Component",JN.has(t)||(JN.add(t),console.error("%s.getDerivedStateFromProps(): A valid state object (or null) must be returned. You have returned undefined.",t))),r=i==null?r:nt({},r,i),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}function ox(e,t,a,s,r,i,m){var h=e.stateNode;if(typeof h.shouldComponentUpdate=="function"){if(a=h.shouldComponentUpdate(s,i,m),e.mode&Ba){Ee(!0);try{a=h.shouldComponentUpdate(s,i,m)}finally{Ee(!1)}}return a===void 0&&console.error("%s.shouldComponentUpdate(): Returned undefined instead of a boolean value. Make sure to return true or false.",k(t)||"Component"),a}return t.prototype&&t.prototype.isPureReactComponent?!Cl(a,s)||!Cl(r,i):!0}function rx(e,t,a,s){var r=t.state;typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(a,s),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(a,s),t.state!==r&&(e=I(e)||"Component",PN.has(e)||(PN.add(e),console.error("%s.componentWillReceiveProps(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",e)),nb.enqueueReplaceState(t,t.state,null))}function Tr(e,t){var a=t;if("ref"in t){a={};for(var s in t)s!=="ref"&&(a[s]=t[s])}if(e=e.defaultProps){a===t&&(a=nt({},a));for(var r in e)a[r]===void 0&&(a[r]=e[r])}return a}function ix(e){Vh(e),console.warn(`%s
121
+
122
+ %s
123
+ `,al?"An error occurred in the <"+al+"> component.":"An error occurred in one of your React components.",`Consider adding an error boundary to your tree to customize error handling behavior.
124
+ Visit https://react.dev/link/error-boundaries to learn more about error boundaries.`)}function lx(e){var t=al?"The above error occurred in the <"+al+"> component.":"The above error occurred in one of your React components.",a="React will try to recreate this component tree from scratch using the error boundary you provided, "+((ob||"Anonymous")+".");if(typeof e=="object"&&e!==null&&typeof e.environmentName=="string"){var s=e.environmentName;e=[`%o
125
+
126
+ %s
127
+
128
+ %s
129
+ `,e,t,a].slice(0),typeof e[0]=="string"?e.splice(0,1,z1+" "+e[0],L1,jf+s+jf,H1):e.splice(0,0,z1,L1,jf+s+jf,H1),e.unshift(console),s=bR.apply(console.error,e),s()}else console.error(`%o
130
+
131
+ %s
132
+
133
+ %s
134
+ `,e,t,a)}function cx(e){Vh(e)}function rd(e,t){try{al=t.source?I(t.source):null,ob=null;var a=t.value;if(Q.actQueue!==null)Q.thrownErrors.push(a);else{var s=e.onUncaughtError;s(a,{componentStack:t.stack})}}catch(r){setTimeout(function(){throw r})}}function ux(e,t,a){try{al=a.source?I(a.source):null,ob=I(t);var s=e.onCaughtError;s(a.value,{componentStack:a.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(r){setTimeout(function(){throw r})}}function up(e,t,a){return a=Ao(a),a.tag=Kh,a.payload={element:null},a.callback=function(){ye(t.source,rd,e,t)},a}function dp(e){return e=Ao(e),e.tag=Kh,e}function fp(e,t,a,s){var r=a.type.getDerivedStateFromError;if(typeof r=="function"){var i=s.value;e.payload=function(){return r(i)},e.callback=function(){sy(a),ye(s.source,ux,t,a,s)}}var m=a.stateNode;m!==null&&typeof m.componentDidCatch=="function"&&(e.callback=function(){sy(a),ye(s.source,ux,t,a,s),typeof r!="function"&&(rr===null?rr=new Set([this]):rr.add(this)),G_(this,s),typeof r=="function"||(a.lanes&2)===0&&console.error("%s: Error boundaries should implement getDerivedStateFromError(). In that method, return a state update to display an error message or fallback UI.",I(a)||"Unknown")})}function gE(e,t,a,s,r){if(a.flags|=32768,Hn&&Ql(e,r),s!==null&&typeof s=="object"&&typeof s.then=="function"){if(t=a.alternate,t!==null&&bi(t,a,r,!0),ut&&(In=!0),a=Es.current,a!==null){switch(a.tag){case 31:case 13:return Ys===null?hd():a.alternate===null&&Ft===xo&&(Ft=cf),a.flags&=-257,a.flags|=65536,a.lanes=r,s===tf?a.flags|=16384:(t=a.updateQueue,t===null?a.updateQueue=new Set([s]):t.add(s),Op(e,s,r)),!1;case 22:return a.flags|=65536,s===tf?a.flags|=16384:(t=a.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([s])},a.updateQueue=t):(a=t.retryQueue,a===null?t.retryQueue=new Set([s]):a.add(s)),Op(e,s,r)),!1}throw Error("Unexpected Suspense handler tag ("+a.tag+"). This is a bug in React.")}return Op(e,s,r),hd(),!1}if(ut)return In=!0,t=Es.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=r,s!==Bh&&jl(hs(Error("There was an error while hydrating but React was able to recover by instead client rendering from the nearest Suspense boundary.",{cause:s}),a))):(s!==Bh&&jl(hs(Error("There was an error while hydrating but React was able to recover by instead client rendering the entire root.",{cause:s}),a)),e=e.current.alternate,e.flags|=65536,r&=-r,e.lanes|=r,s=hs(s,a),r=up(e.stateNode,s,r),Pu(e,r),Ft!==ar&&(Ft=Xr)),!1;var i=hs(Error("There was an error during concurrent rendering but React was able to recover by instead synchronously rendering the entire root.",{cause:s}),a);if(Bc===null?Bc=[i]:Bc.push(i),Ft!==ar&&(Ft=Xr),t===null)return!0;s=hs(s,a),a=t;do{switch(a.tag){case 3:return a.flags|=65536,e=r&-r,a.lanes|=e,e=up(a.stateNode,s,e),Pu(a,e),!1;case 1:if(t=a.type,i=a.stateNode,(a.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||i!==null&&typeof i.componentDidCatch=="function"&&(rr===null||!rr.has(i))))return a.flags|=65536,r&=-r,a.lanes|=r,r=dp(r),fp(r,e,a,s),Pu(a,r),!1}a=a.return}while(a!==null);return!1}function Oa(e,t,a,s){t.child=e===null?VN(t,null,a,s):Pr(t,e.child,a,s)}function dx(e,t,a,s,r){a=a.render;var i=t.ref;if("ref"in s){var m={};for(var h in s)h!=="ref"&&(m[h]=s[h])}else m=s;return Rr(t),s=zm(e,t,a,m,i,r),h=Hm(),e!==null&&!fa?($m(e,t,r),to(e,t,r)):(ut&&h&&vm(t),t.flags|=1,Oa(e,t,s,r),t.child)}function fx(e,t,a,s,r){if(e===null){var i=a.type;return typeof i=="function"&&!bm(i)&&i.defaultProps===void 0&&a.compare===null?(a=wr(i),t.tag=15,t.type=a,pp(t,i),mx(e,t,a,s,r)):(e=gm(a.type,null,s,t,t.mode,r),e.ref=t.ref,e.return=t,t.child=e)}if(i=e.child,!vp(e,r)){var m=i.memoizedProps;if(a=a.compare,a=a!==null?a:Cl,a(m,s)&&e.ref===t.ref)return to(e,t,r)}return t.flags|=1,e=Jn(i,s),e.ref=t.ref,e.return=t,t.child=e}function mx(e,t,a,s,r){if(e!==null){var i=e.memoizedProps;if(Cl(i,s)&&e.ref===t.ref&&t.type===e.type)if(fa=!1,t.pendingProps=s=i,vp(e,r))(e.flags&131072)!==0&&(fa=!0);else return t.lanes=e.lanes,to(e,t,r)}return mp(e,t,a,s,r)}function px(e,t,a,s){var r=s.children,i=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:bc,_pendingMarkers:null,_retryCache:null,_transitions:null}),s.mode==="hidden"){if((t.flags&128)!==0){if(i=i!==null?i.baseLanes|a:a,e!==null){for(s=t.child=e.child,r=0;s!==null;)r=r|s.lanes|s.childLanes,s=s.sibling;s=r&~i}else s=0,t.child=null;return hx(e,t,i,a,s)}if((a&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&$u(t,i!==null?i.cachePool:null),i!==null?Cy(t,i):Om(t),jy(t);else return s=t.lanes=536870912,hx(e,t,i!==null?i.baseLanes|a:a,a,s)}else i!==null?($u(t,i.cachePool),Cy(t,i),zo(t),t.memoizedState=null):(e!==null&&$u(t,null),Om(t),zo(t));return Oa(e,t,r,a),t.child}function Il(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:bc,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function hx(e,t,a,s,r){var i=Um();return i=i===null?null:{parent:ca._currentValue,pool:i},t.memoizedState={baseLanes:a,cachePool:i},e!==null&&$u(t,null),Om(t),jy(t),e!==null&&bi(e,t,s,!0),t.childLanes=r,null}function id(e,t){var a=t.hidden;return a!==void 0&&console.error(`<Activity> doesn't accept a hidden prop. Use mode="hidden" instead.
135
+ - <Activity %s>
136
+ + <Activity %s>`,a===!0?"hidden":a===!1?"hidden={false}":"hidden={...}",a?'mode="hidden"':'mode="visible"'),t=cd({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function bx(e,t,a){return Pr(t,e.child,null,a),e=id(t,t.pendingProps),e.flags|=2,ys(t),t.memoizedState=null,e}function yE(e,t,a){var s=t.pendingProps,r=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(ut){if(s.mode==="hidden")return e=id(t,s),t.lanes=536870912,Il(null,e);if(Vm(t),(e=zt)?(a=B0(e,Bs),a=a!==null&&a.data===ei?a:null,a!==null&&(s={dehydrated:a,treeContext:ly(),retryLane:536870912,hydrationErrors:null},t.memoizedState=s,s=ry(a),s.return=t,t.child=s,Ma=t,zt=null)):a=null,a===null)throw Au(t,e),jo(t);return t.lanes=536870912,null}return id(t,s)}var i=e.memoizedState;if(i!==null){var m=i.dehydrated;if(Vm(t),r)if(t.flags&256)t.flags&=-257,t=bx(e,t,a);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(uy(),(a&536870912)!==0&&pd(t),fa||bi(e,t,a,!1),r=(a&e.childLanes)!==0,fa||r){if(s=kt,s!==null&&(m=ga(s,a),m!==0&&m!==i.retryLane))throw i.retryLane=m,Ha(e,m),Xt(s,e,m),rb;hd(),t=bx(e,t,a)}else e=i.treeContext,zt=vs(m.nextSibling),Ma=t,ut=!0,Zo=null,In=!1,ws=null,Bs=!1,e!==null&&cy(t,e),t=id(t,s),t.flags|=4096;return t}return i=e.child,s={mode:s.mode,children:s.children},(a&536870912)!==0&&(a&e.lanes)!==0&&pd(t),e=Jn(i,s),e.ref=t.ref,t.child=e,e.return=t,e}function ld(e,t){var a=t.ref;if(a===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof a!="function"&&typeof a!="object")throw Error("Expected ref to be a function, an object returned by React.createRef(), or undefined/null.");(e===null||e.ref!==a)&&(t.flags|=4194816)}}function mp(e,t,a,s,r){if(a.prototype&&typeof a.prototype.render=="function"){var i=k(a)||"Unknown";a1[i]||(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.",i,i),a1[i]=!0)}return t.mode&Ba&&ln.recordLegacyContextWarning(t,null),e===null&&(pp(t,t.type),a.contextTypes&&(i=k(a)||"Unknown",n1[i]||(n1[i]=!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)",i)))),Rr(t),a=zm(e,t,a,s,void 0,r),s=Hm(),e!==null&&!fa?($m(e,t,r),to(e,t,r)):(ut&&s&&vm(t),t.flags|=1,Oa(e,t,a,r),t.child)}function gx(e,t,a,s,r,i){return Rr(t),go=-1,Ac=e!==null&&e.type!==t.type,t.updateQueue=null,a=Lm(t,s,a,r),Ty(e,t),s=Hm(),e!==null&&!fa?($m(e,t,i),to(e,t,i)):(ut&&s&&vm(t),t.flags|=1,Oa(e,t,a,i),t.child)}function yx(e,t,a,s,r){switch(p(t)){case!1:var i=t.stateNode,m=new t.type(t.memoizedProps,i.context).state;i.updater.enqueueSetState(i,m,null);break;case!0:t.flags|=128,t.flags|=65536,i=Error("Simulated error coming from DevTools");var h=r&-r;if(t.lanes|=h,m=kt,m===null)throw Error("Expected a work-in-progress root. This is a bug in React. Please file an issue.");h=dp(h),fp(h,m,t,hs(i,t)),Pu(t,h)}if(Rr(t),t.stateNode===null){if(m=Qo,i=a.contextType,"contextType"in a&&i!==null&&(i===void 0||i.$$typeof!==Mn)&&!e1.has(a)&&(e1.add(a),h=i===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 i!="object"?" However, it is set to a "+typeof i+".":i.$$typeof===ih?" Did you accidentally pass the Context.Consumer instead?":" However, it is set to an object with keys {"+Object.keys(i).join(", ")+"}.",console.error("%s defines an invalid contextType. contextType should point to the Context object returned by React.createContext().%s",k(a)||"Component",h)),typeof i=="object"&&i!==null&&(m=Bt(i)),i=new a(s,m),t.mode&Ba){Ee(!0);try{i=new a(s,m)}finally{Ee(!1)}}if(m=t.memoizedState=i.state!==null&&i.state!==void 0?i.state:null,i.updater=nb,t.stateNode=i,i._reactInternals=t,i._reactInternalInstance=GN,typeof a.getDerivedStateFromProps=="function"&&m===null&&(m=k(a)||"Component",FN.has(m)||(FN.add(m),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.",m,i.state===null?"null":"undefined",m))),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"){var v=h=m=null;if(typeof i.componentWillMount=="function"&&i.componentWillMount.__suppressDeprecationWarning!==!0?m="componentWillMount":typeof i.UNSAFE_componentWillMount=="function"&&(m="UNSAFE_componentWillMount"),typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps.__suppressDeprecationWarning!==!0?h="componentWillReceiveProps":typeof i.UNSAFE_componentWillReceiveProps=="function"&&(h="UNSAFE_componentWillReceiveProps"),typeof i.componentWillUpdate=="function"&&i.componentWillUpdate.__suppressDeprecationWarning!==!0?v="componentWillUpdate":typeof i.UNSAFE_componentWillUpdate=="function"&&(v="UNSAFE_componentWillUpdate"),m!==null||h!==null||v!==null){i=k(a)||"Component";var D=typeof a.getDerivedStateFromProps=="function"?"getDerivedStateFromProps()":"getSnapshotBeforeUpdate()";QN.has(i)||(QN.add(i),console.error(`Unsafe legacy lifecycles will not be called for components using new component APIs.
137
+
138
+ %s uses %s but also contains the following legacy lifecycles:%s%s%s
139
+
140
+ The above lifecycles should be removed. Learn more about this warning here:
141
+ https://react.dev/link/unsafe-component-lifecycles`,i,D,m!==null?`
142
+ `+m:"",h!==null?`
143
+ `+h:"",v!==null?`
144
+ `+v:""))}}i=t.stateNode,m=k(a)||"Component",i.render||(a.prototype&&typeof a.prototype.render=="function"?console.error("No `render` method found on the %s instance: did you accidentally return an object from the constructor?",m):console.error("No `render` method found on the %s instance: you may have forgotten to define `render`.",m)),!i.getInitialState||i.getInitialState.isReactClassApproved||i.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?",m),i.getDefaultProps&&!i.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.",m),i.contextType&&console.error("contextType was defined as an instance property on %s. Use a static property to define contextType instead.",m),a.childContextTypes&&!WN.has(a)&&(WN.add(a),console.error("%s uses the legacy childContextTypes API which was removed in React 19. Use React.createContext() instead. (https://react.dev/link/legacy-context)",m)),a.contextTypes&&!KN.has(a)&&(KN.add(a),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)",m)),typeof i.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.",m),a.prototype&&a.prototype.isPureReactComponent&&typeof i.shouldComponentUpdate<"u"&&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.",k(a)||"A pure component"),typeof i.componentDidUnmount=="function"&&console.error("%s has a method called componentDidUnmount(). But there is no such lifecycle method. Did you mean componentWillUnmount()?",m),typeof i.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().",m),typeof i.componentWillRecieveProps=="function"&&console.error("%s has a method called componentWillRecieveProps(). Did you mean componentWillReceiveProps()?",m),typeof i.UNSAFE_componentWillRecieveProps=="function"&&console.error("%s has a method called UNSAFE_componentWillRecieveProps(). Did you mean UNSAFE_componentWillReceiveProps()?",m),h=i.props!==s,i.props!==void 0&&h&&console.error("When calling super() in `%s`, make sure to pass up the same props that your component's constructor was passed.",m),i.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.",m,m),typeof i.getSnapshotBeforeUpdate!="function"||typeof i.componentDidUpdate=="function"||XN.has(a)||(XN.add(a),console.error("%s: getSnapshotBeforeUpdate() should be used with componentDidUpdate(). This component defines getSnapshotBeforeUpdate() only.",k(a))),typeof i.getDerivedStateFromProps=="function"&&console.error("%s: getDerivedStateFromProps() is defined as an instance method and will be ignored. Instead, declare it as a static method.",m),typeof i.getDerivedStateFromError=="function"&&console.error("%s: getDerivedStateFromError() is defined as an instance method and will be ignored. Instead, declare it as a static method.",m),typeof a.getSnapshotBeforeUpdate=="function"&&console.error("%s: getSnapshotBeforeUpdate() is defined as a static method and will be ignored. Instead, declare it as an instance method.",m),(h=i.state)&&(typeof h!="object"||xa(h))&&console.error("%s.state: must be set to an object or null",m),typeof i.getChildContext=="function"&&typeof a.childContextTypes!="object"&&console.error("%s.getChildContext(): childContextTypes must be defined in order to use getChildContext().",m),i=t.stateNode,i.props=s,i.state=t.memoizedState,i.refs={},jm(t),m=a.contextType,i.context=typeof m=="object"&&m!==null?Bt(m):Qo,i.state===s&&(m=k(a)||"Component",ZN.has(m)||(ZN.add(m),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.",m))),t.mode&Ba&&ln.recordLegacyContextWarning(t,i),ln.recordUnsafeLifecycleWarnings(t,i),i.state=t.memoizedState,m=a.getDerivedStateFromProps,typeof m=="function"&&(cp(t,a,m,s),i.state=t.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof i.getSnapshotBeforeUpdate=="function"||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(m=i.state,typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount(),m!==i.state&&(console.error("%s.componentWillMount(): Assigning directly to this.state is deprecated (except inside a component's constructor). Use setState instead.",I(t)||"Component"),nb.enqueueReplaceState(i,i.state,null)),Ll(t,s,i,r),zl(),i.state=t.memoizedState),typeof i.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&rn)!==Ye&&(t.flags|=134217728),i=!0}else if(e===null){i=t.stateNode;var M=t.memoizedProps;h=Tr(a,M),i.props=h;var L=i.context;v=a.contextType,m=Qo,typeof v=="object"&&v!==null&&(m=Bt(v)),D=a.getDerivedStateFromProps,v=typeof D=="function"||typeof i.getSnapshotBeforeUpdate=="function",M=t.pendingProps!==M,v||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(M||L!==m)&&rx(t,i,s,m),tr=!1;var j=t.memoizedState;i.state=j,Ll(t,s,i,r),zl(),L=t.memoizedState,M||j!==L||tr?(typeof D=="function"&&(cp(t,a,D,s),L=t.memoizedState),(h=tr||ox(t,a,h,s,j,L,m))?(v||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&rn)!==Ye&&(t.flags|=134217728)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&rn)!==Ye&&(t.flags|=134217728),t.memoizedProps=s,t.memoizedState=L),i.props=s,i.state=L,i.context=m,i=h):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),(t.mode&rn)!==Ye&&(t.flags|=134217728),i=!1)}else{i=t.stateNode,Tm(e,t),m=t.memoizedProps,v=Tr(a,m),i.props=v,D=t.pendingProps,j=i.context,L=a.contextType,h=Qo,typeof L=="object"&&L!==null&&(h=Bt(L)),M=a.getDerivedStateFromProps,(L=typeof M=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(m!==D||j!==h)&&rx(t,i,s,h),tr=!1,j=t.memoizedState,i.state=j,Ll(t,s,i,r),zl();var q=t.memoizedState;m!==D||j!==q||tr||e!==null&&e.dependencies!==null&&Mu(e.dependencies)?(typeof M=="function"&&(cp(t,a,M,s),q=t.memoizedState),(v=tr||ox(t,a,v,s,j,q,h)||e!==null&&e.dependencies!==null&&Mu(e.dependencies))?(L||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(s,q,h),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(s,q,h)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||m===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),t.memoizedProps=s,t.memoizedState=q),i.props=s,i.state=q,i.context=h,i=v):(typeof i.componentDidUpdate!="function"||m===e.memoizedProps&&j===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||m===e.memoizedProps&&j===e.memoizedState||(t.flags|=1024),i=!1)}if(h=i,ld(e,t),m=(t.flags&128)!==0,h||m){if(h=t.stateNode,ot(t),m&&typeof a.getDerivedStateFromError!="function")a=null,Ja=-1;else if(a=NN(h),t.mode&Ba){Ee(!0);try{NN(h)}finally{Ee(!1)}}t.flags|=1,e!==null&&m?(t.child=Pr(t,e.child,null,r),t.child=Pr(t,null,a,r)):Oa(e,t,a,r),t.memoizedState=h.state,e=t.child}else e=to(e,t,r);return r=t.stateNode,i&&r.props!==s&&(sl||console.error("It looks like %s is reassigning its own `this.props` while rendering. This is not supported and can lead to confusing bugs.",I(t)||"a component"),sl=!0),e}function xx(e,t,a,s){return _r(),t.flags|=256,Oa(e,t,a,s),t.child}function pp(e,t){t&&t.childContextTypes&&console.error(`childContextTypes cannot be defined on a function component.
145
+ %s.childContextTypes = ...`,t.displayName||t.name||"Component"),typeof t.getDerivedStateFromProps=="function"&&(e=k(t)||"Unknown",o1[e]||(console.error("%s: Function components do not support getDerivedStateFromProps.",e),o1[e]=!0)),typeof t.contextType=="object"&&t.contextType!==null&&(t=k(t)||"Unknown",s1[t]||(console.error("%s: Function components do not support contextType.",t),s1[t]=!0))}function hp(e){return{baseLanes:e,cachePool:gy()}}function bp(e,t,a){return e=e!==null?e.childLanes&~a:0,t&&(e|=cs),e}function vx(e,t,a){var s,r=t.pendingProps;d(t)&&(t.flags|=128);var i=!1,m=(t.flags&128)!==0;if((s=m)||(s=e!==null&&e.memoizedState===null?!1:(na.current&Tc)!==0),s&&(i=!0,t.flags&=-129),s=(t.flags&32)!==0,t.flags&=-33,e===null){if(ut){if(i?Mo(t):zo(t),(e=zt)?(a=B0(e,Bs),a=a!==null&&a.data!==ei?a:null,a!==null&&(s={dehydrated:a,treeContext:ly(),retryLane:536870912,hydrationErrors:null},t.memoizedState=s,s=ry(a),s.return=t,t.child=s,Ma=t,zt=null)):a=null,a===null)throw Au(t,e),jo(t);return Qp(a)?t.lanes=32:t.lanes=536870912,null}var h=r.children;if(r=r.fallback,i){zo(t);var v=t.mode;return h=cd({mode:"hidden",children:h},v),r=Er(r,v,a,null),h.return=t,r.return=t,h.sibling=r,t.child=h,r=t.child,r.memoizedState=hp(a),r.childLanes=bp(e,s,a),t.memoizedState=ib,Il(null,r)}return Mo(t),gp(t,h)}var D=e.memoizedState;if(D!==null){var M=D.dehydrated;if(M!==null){if(m)t.flags&256?(Mo(t),t.flags&=-257,t=yp(e,t,a)):t.memoizedState!==null?(zo(t),t.child=e.child,t.flags|=128,t=null):(zo(t),h=r.fallback,v=t.mode,r=cd({mode:"visible",children:r.children},v),h=Er(h,v,a,null),h.flags|=2,r.return=t,h.return=t,r.sibling=h,t.child=r,Pr(t,e.child,null,a),r=t.child,r.memoizedState=hp(a),r.childLanes=bp(e,s,a),t.memoizedState=ib,t=Il(null,r));else if(Mo(t),uy(),(a&536870912)!==0&&pd(t),Qp(M)){if(s=M.nextSibling&&M.nextSibling.dataset,s){h=s.dgst;var L=s.msg;v=s.stck;var j=s.cstck}i=L,s=h,r=v,M=j,h=i,v=M,h=Error(h||"The server could not finish this Suspense boundary, likely due to an error during server rendering. Switched to client rendering."),h.stack=r||"",h.digest=s,s=v===void 0?null:v,r={value:h,source:null,stack:s},typeof s=="string"&&$h.set(h,r),jl(r),t=yp(e,t,a)}else if(fa||bi(e,t,a,!1),s=(a&e.childLanes)!==0,fa||s){if(s=kt,s!==null&&(r=ga(s,a),r!==0&&r!==D.retryLane))throw D.retryLane=r,Ha(e,r),Xt(s,e,r),rb;Xp(M)||hd(),t=yp(e,t,a)}else Xp(M)?(t.flags|=192,t.child=e.child,t=null):(e=D.treeContext,zt=vs(M.nextSibling),Ma=t,ut=!0,Zo=null,In=!1,ws=null,Bs=!1,e!==null&&cy(t,e),t=gp(t,r.children),t.flags|=4096);return t}}return i?(zo(t),h=r.fallback,v=t.mode,j=e.child,M=j.sibling,r=Jn(j,{mode:"hidden",children:r.children}),r.subtreeFlags=j.subtreeFlags&65011712,M!==null?h=Jn(M,h):(h=Er(h,v,a,null),h.flags|=2),h.return=t,r.return=t,r.sibling=h,t.child=r,Il(null,r),r=t.child,h=e.child.memoizedState,h===null?h=hp(a):(v=h.cachePool,v!==null?(j=ca._currentValue,v=v.parent!==j?{parent:j,pool:j}:v):v=gy(),h={baseLanes:h.baseLanes|a,cachePool:v}),r.memoizedState=h,r.childLanes=bp(e,s,a),t.memoizedState=ib,Il(e.child,r)):(D!==null&&(a&62914560)===a&&(a&e.lanes)!==0&&pd(t),Mo(t),a=e.child,e=a.sibling,a=Jn(a,{mode:"visible",children:r.children}),a.return=t,a.sibling=null,e!==null&&(s=t.deletions,s===null?(t.deletions=[e],t.flags|=16):s.push(e)),t.child=a,t.memoizedState=null,a)}function gp(e,t){return t=cd({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function cd(e,t){return e=S(22,e,null,t),e.lanes=0,e}function yp(e,t,a){return Pr(t,e.child,null,a),e=gp(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function Nx(e,t,a){e.lanes|=t;var s=e.alternate;s!==null&&(s.lanes|=t),Em(e.return,t,a)}function xp(e,t,a,s,r,i){var m=e.memoizedState;m===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:s,tail:a,tailMode:r,treeForkCount:i}:(m.isBackwards=t,m.rendering=null,m.renderingStartTime=0,m.last=s,m.tail=a,m.tailMode=r,m.treeForkCount=i)}function Sx(e,t,a){var s=t.pendingProps,r=s.revealOrder,i=s.tail,m=s.children,h=na.current;if((s=(h&Tc)!==0)?(h=h&Wi|Tc,t.flags|=128):h&=Wi,ae(na,h,t),h=r??"null",r!=="forwards"&&r!=="unstable_legacy-backwards"&&r!=="together"&&r!=="independent"&&!r1[h])if(r1[h]=!0,r==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(r==="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 r=="string")switch(r.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.',r,r.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.',r,r.toLowerCase());break;default:console.error('"%s" is not a supported revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',r)}else console.error('%s is not a supported value for revealOrder on <SuspenseList />. Did you mean "independent", "together", "forwards" or "backwards"?',r);h=i??"null",lf[h]||(i==null?(r==="forwards"||r==="backwards"||r==="unstable_legacy-backwards")&&(lf[h]=!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".')):i!=="visible"&&i!=="collapsed"&&i!=="hidden"?(lf[h]=!0,console.error('"%s" is not a supported value for tail on <SuspenseList />. Did you mean "visible", "collapsed" or "hidden"?',i)):r!=="forwards"&&r!=="backwards"&&r!=="unstable_legacy-backwards"&&(lf[h]=!0,console.error('<SuspenseList tail="%s" /> is only valid if revealOrder is "forwards" or "backwards". Did you mean to specify revealOrder="forwards"?',i)));e:if((r==="forwards"||r==="backwards"||r==="unstable_legacy-backwards")&&m!==void 0&&m!==null&&m!==!1)if(xa(m)){for(h=0;h<m.length;h++)if(!Ry(m[h],h))break e}else if(h=de(m),typeof h=="function"){if(h=h.call(m))for(var v=h.next(),D=0;!v.done;v=h.next()){if(!Ry(v.value,D))break e;D++}}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?',r);if(Oa(e,t,m,a),ut?(Co(),m=gc):m=0,!s&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Nx(e,a,t);else if(e.tag===19)Nx(e,a,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(r){case"forwards":for(a=t.child,r=null;a!==null;)e=a.alternate,e!==null&&Fu(e)===null&&(r=a),a=a.sibling;a=r,a===null?(r=t.child,t.child=null):(r=a.sibling,a.sibling=null),xp(t,!1,r,a,i,m);break;case"backwards":case"unstable_legacy-backwards":for(a=null,r=t.child,t.child=null;r!==null;){if(e=r.alternate,e!==null&&Fu(e)===null){t.child=r;break}e=r.sibling,r.sibling=a,a=r,r=e}xp(t,!0,a,null,i,m);break;case"together":xp(t,!1,null,null,void 0,m);break;default:t.memoizedState=null}return t.child}function to(e,t,a){if(e!==null&&(t.dependencies=e.dependencies),Ja=-1,nr|=t.lanes,(a&t.childLanes)===0)if(e!==null){if(bi(e,t,a,!1),(a&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,a=Jn(e,e.pendingProps),t.child=a,a.return=t;e.sibling!==null;)e=e.sibling,a=a.sibling=Jn(e,e.pendingProps),a.return=t;a.sibling=null}return t.child}function vp(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&Mu(e)))}function xE(e,t,a){switch(t.tag){case 3:De(t,t.stateNode.containerInfo),To(t,ca,e.memoizedState.cache),_r();break;case 27:case 5:ne(t);break;case 4:De(t,t.stateNode.containerInfo);break;case 10:To(t,t.type,t.memoizedProps.value);break;case 12:(a&t.childLanes)!==0&&(t.flags|=4),t.flags|=2048;var s=t.stateNode;s.effectDuration=-0,s.passiveEffectDuration=-0;break;case 31:if(t.memoizedState!==null)return t.flags|=128,Vm(t),null;break;case 13:if(s=t.memoizedState,s!==null)return s.dehydrated!==null?(Mo(t),t.flags|=128,null):(a&t.child.childLanes)!==0?vx(e,t,a):(Mo(t),e=to(e,t,a),e!==null?e.sibling:null);Mo(t);break;case 19:var r=(e.flags&128)!==0;if(s=(a&t.childLanes)!==0,s||(bi(e,t,a,!1),s=(a&t.childLanes)!==0),r){if(s)return Sx(e,t,a);t.flags|=128}if(r=t.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),ae(na,na.current,t),s)break;return null;case 22:return t.lanes=0,px(e,t,a,t.pendingProps);case 24:To(t,ca,e.memoizedState.cache)}return to(e,t,a)}function Np(e,t,a){if(t._debugNeedsRemount&&e!==null){a=gm(t.type,t.key,t.pendingProps,t._debugOwner||null,t.mode,t.lanes),a._debugStack=t._debugStack,a._debugTask=t._debugTask;var s=t.return;if(s===null)throw Error("Cannot swap the root fiber.");if(e.alternate=null,t.alternate=null,a.index=t.index,a.sibling=t.sibling,a.return=t.return,a.ref=t.ref,a._debugInfo=t._debugInfo,t===s.child)s.child=a;else{var r=s.child;if(r===null)throw Error("Expected parent to have a child.");for(;r.sibling!==t;)if(r=r.sibling,r===null)throw Error("Expected to find the previous sibling.");r.sibling=a}return t=s.deletions,t===null?(s.deletions=[e],s.flags|=16):t.push(e),a.flags|=2,a}if(e!==null)if(e.memoizedProps!==t.pendingProps||t.type!==e.type)fa=!0;else{if(!vp(e,a)&&(t.flags&128)===0)return fa=!1,xE(e,t,a);fa=(e.flags&131072)!==0}else fa=!1,(s=ut)&&(Co(),s=(t.flags&1048576)!==0),s&&(s=t.index,Co(),iy(t,gc,s));switch(t.lanes=0,t.tag){case 16:e:if(s=t.pendingProps,e=Oo(t.elementType),t.type=e,typeof e=="function")bm(e)?(s=Tr(e,s),t.tag=1,t.type=e=wr(e),t=yx(null,t,e,s,a)):(t.tag=0,pp(t,e),t.type=e=wr(e),t=mp(null,t,e,s,a));else{if(e!=null){if(r=e.$$typeof,r===nc){t.tag=11,t.type=e=hm(e),t=dx(null,t,e,s,a);break e}else if(r===Ud){t.tag=14,t=fx(null,t,e,s,a);break e}}throw t="",e!==null&&typeof e=="object"&&e.$$typeof===Ns&&(t=" Did you wrap a component in React.lazy() more than once?"),a=k(e)||e,Error("Element type is invalid. Received a promise that resolves to: "+a+". Lazy element type must resolve to a class or function."+t)}return t;case 0:return mp(e,t,t.type,t.pendingProps,a);case 1:return s=t.type,r=Tr(s,t.pendingProps),yx(e,t,s,r,a);case 3:e:{if(De(t,t.stateNode.containerInfo),e===null)throw Error("Should have a current fiber. This is a bug in React.");s=t.pendingProps;var i=t.memoizedState;r=i.element,Tm(e,t),Ll(t,s,null,a);var m=t.memoizedState;if(s=m.cache,To(t,ca,s),s!==i.cache&&Dm(t,[ca],a,!0),zl(),s=m.element,i.isDehydrated)if(i={element:s,isDehydrated:!1,cache:m.cache},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){t=xx(e,t,s,a);break e}else if(s!==r){r=hs(Error("This root received an early update, before anything was able hydrate. Switched the entire root to client rendering."),t),jl(r),t=xx(e,t,s,a);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,zt=vs(e.firstChild),Ma=t,ut=!0,Zo=null,In=!1,ws=null,Bs=!0,a=VN(t,null,s,a),t.child=a;a;)a.flags=a.flags&-3|4096,a=a.sibling;else{if(_r(),s===r){t=to(e,t,a);break e}Oa(e,t,s,a)}t=t.child}return t;case 26:return ld(e,t),e===null?(a=F0(t.type,null,t.pendingProps,null))?t.memoizedState=a:ut||(a=t.type,e=t.pendingProps,s=pe(Yo.current),s=xd(s).createElement(a),s[Va]=t,s[Xa]=e,Aa(s,a,e),le(s),t.stateNode=s):t.memoizedState=F0(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return ne(t),e===null&&ut&&(s=pe(Yo.current),r=ue(),s=t.stateNode=G0(t.type,t.pendingProps,s,r,!1),In||(r=O0(s,t.type,t.pendingProps,r),r!==null&&(Dr(t,0).serverProps=r)),Ma=t,Bs=!0,r=zt,Bo(t.type)?(Cb=r,zt=vs(s.firstChild)):zt=r),Oa(e,t,t.pendingProps.children,a),ld(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&ut&&(i=ue(),s=rm(t.type,i.ancestorInfo),r=zt,(m=!r)||(m=iD(r,t.type,t.pendingProps,Bs),m!==null?(t.stateNode=m,In||(i=O0(m,t.type,t.pendingProps,i),i!==null&&(Dr(t,0).serverProps=i)),Ma=t,zt=vs(m.firstChild),Bs=!1,i=!0):i=!1,m=!i),m&&(s&&Au(t,r),jo(t))),ne(t),r=t.type,i=t.pendingProps,m=e!==null?e.memoizedProps:null,s=i.children,Pp(r,i)?s=null:m!==null&&Pp(r,m)&&(t.flags|=32),t.memoizedState!==null&&(r=zm(e,t,dE,null,null,a),Zc._currentValue=r),ld(e,t),Oa(e,t,s,a),t.child;case 6:return e===null&&ut&&(a=t.pendingProps,e=ue(),s=e.ancestorInfo.current,a=s!=null?Eu(a,s.tag,e.ancestorInfo.implicitRootScope):!0,e=zt,(s=!e)||(s=lD(e,t.pendingProps,Bs),s!==null?(t.stateNode=s,Ma=t,zt=null,s=!0):s=!1,s=!s),s&&(a&&Au(t,e),jo(t))),null;case 13:return vx(e,t,a);case 4:return De(t,t.stateNode.containerInfo),s=t.pendingProps,e===null?t.child=Pr(t,null,s,a):Oa(e,t,s,a),t.child;case 11:return dx(e,t,t.type,t.pendingProps,a);case 7:return Oa(e,t,t.pendingProps,a),t.child;case 8:return Oa(e,t,t.pendingProps.children,a),t.child;case 12:return t.flags|=4,t.flags|=2048,s=t.stateNode,s.effectDuration=-0,s.passiveEffectDuration=-0,Oa(e,t,t.pendingProps.children,a),t.child;case 10:return s=t.type,r=t.pendingProps,i=r.value,"value"in r||i1||(i1=!0,console.error("The `value` prop is required for the `<Context.Provider>`. Did you misspell it or forget to pass it?")),To(t,s,i),Oa(e,t,r.children,a),t.child;case 9:return r=t.type._context,s=t.pendingProps.children,typeof s!="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."),Rr(t),r=Bt(r),s=Xh(s,r,void 0),t.flags|=1,Oa(e,t,s,a),t.child;case 14:return fx(e,t,t.type,t.pendingProps,a);case 15:return mx(e,t,t.type,t.pendingProps,a);case 19:return Sx(e,t,a);case 31:return yE(e,t,a);case 22:return px(e,t,a,t.pendingProps);case 24:return Rr(t),s=Bt(ca),e===null?(r=Um(),r===null&&(r=kt,i=_m(),r.pooledCache=i,kr(i),i!==null&&(r.pooledCacheLanes|=a),r=i),t.memoizedState={parent:s,cache:r},jm(t),To(t,ca,r)):((e.lanes&a)!==0&&(Tm(e,t),Ll(t,null,null,a),zl()),r=e.memoizedState,i=t.memoizedState,r.parent!==s?(r={parent:s,cache:s},t.memoizedState=r,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=r),To(t,ca,s)):(s=i.cache,To(t,ca,s),s!==r.cache&&Dm(t,[ca],a,!0))),Oa(e,t,t.pendingProps.children,a),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 ao(e){e.flags|=4}function Sp(e,t,a,s,r){if((t=(e.mode&$_)!==Ye)&&(t=!1),t){if(e.flags|=16777216,(r&335544128)===r)if(e.stateNode.complete)e.flags|=8192;else if(t0())e.flags|=8192;else throw Gr=tf,Zh}else e.flags&=-16777217}function wx(e,t){if(t.type!=="stylesheet"||(t.state.loading&Ps)!==si)e.flags&=-16777217;else if(e.flags|=16777216,!K0(t))if(t0())e.flags|=8192;else throw Gr=tf,Zh}function ud(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?_e():536870912,e.lanes|=t,Jr|=t)}function Yl(e,t){if(!ut)switch(e.tailMode){case"hidden":t=e.tail;for(var a=null;t!==null;)t.alternate!==null&&(a=t),t=t.sibling;a===null?e.tail=null:a.sibling=null;break;case"collapsed":a=e.tail;for(var s=null;a!==null;)a.alternate!==null&&(s=a),a=a.sibling;s===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:s.sibling=null}}function Tt(e){var t=e.alternate!==null&&e.alternate.child===e.child,a=0,s=0;if(t)if((e.mode&Ke)!==Ye){for(var r=e.selfBaseDuration,i=e.child;i!==null;)a|=i.lanes|i.childLanes,s|=i.subtreeFlags&65011712,s|=i.flags&65011712,r+=i.treeBaseDuration,i=i.sibling;e.treeBaseDuration=r}else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,s|=r.subtreeFlags&65011712,s|=r.flags&65011712,r.return=e,r=r.sibling;else if((e.mode&Ke)!==Ye){r=e.actualDuration,i=e.selfBaseDuration;for(var m=e.child;m!==null;)a|=m.lanes|m.childLanes,s|=m.subtreeFlags,s|=m.flags,r+=m.actualDuration,i+=m.treeBaseDuration,m=m.sibling;e.actualDuration=r,e.treeBaseDuration=i}else for(r=e.child;r!==null;)a|=r.lanes|r.childLanes,s|=r.subtreeFlags,s|=r.flags,r.return=e,r=r.sibling;return e.subtreeFlags|=s,e.childLanes=a,t}function vE(e,t,a){var s=t.pendingProps;switch(Nm(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Tt(t),null;case 1:return Tt(t),null;case 3:return a=t.stateNode,s=null,e!==null&&(s=e.memoizedState.cache),t.memoizedState.cache!==s&&(t.flags|=2048),Wn(ca,t),te(t),a.pendingContext&&(a.context=a.pendingContext,a.pendingContext=null),(e===null||e.child===null)&&(hi(t)?(wm(),ao(t)):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,Sm())),Tt(t),null;case 26:var r=t.type,i=t.memoizedState;return e===null?(ao(t),i!==null?(Tt(t),wx(t,i)):(Tt(t),Sp(t,r,null,s,a))):i?i!==e.memoizedState?(ao(t),Tt(t),wx(t,i)):(Tt(t),t.flags&=-16777217):(e=e.memoizedProps,e!==s&&ao(t),Tt(t),Sp(t,r,e,s,a)),null;case 27:if(he(t),a=pe(Yo.current),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ao(t);else{if(!s){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 Tt(t),null}e=ue(),hi(t)?dy(t):(e=G0(r,s,a,e,!0),t.stateNode=e,ao(t))}return Tt(t),null;case 5:if(he(t),r=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==s&&ao(t);else{if(!s){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 Tt(t),null}var m=ue();if(hi(t))dy(t);else{switch(i=pe(Yo.current),rm(r,m.ancestorInfo),m=m.context,i=xd(i),m){case dl:i=i.createElementNS(Vi,r);break;case kf:i=i.createElementNS(Md,r);break;default:switch(r){case"svg":i=i.createElementNS(Vi,r);break;case"math":i=i.createElementNS(Md,r);break;case"script":i=i.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild);break;case"select":i=typeof s.is=="string"?i.createElement("select",{is:s.is}):i.createElement("select"),s.multiple?i.multiple=!0:s.size&&(i.size=s.size);break;default:i=typeof s.is=="string"?i.createElement(r,{is:s.is}):i.createElement(r),r.indexOf("-")===-1&&(r!==r.toLowerCase()&&console.error("<%s /> is using incorrect casing. Use PascalCase for React components, or lowercase for HTML elements.",r),Object.prototype.toString.call(i)!=="[object HTMLUnknownElement]"||on.call(j1,r)||(j1[r]=!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.",r)))}}i[Va]=t,i[Xa]=s;e:for(m=t.child;m!==null;){if(m.tag===5||m.tag===6)i.appendChild(m.stateNode);else if(m.tag!==4&&m.tag!==27&&m.child!==null){m.child.return=m,m=m.child;continue}if(m===t)break e;for(;m.sibling===null;){if(m.return===null||m.return===t)break e;m=m.return}m.sibling.return=m.return,m=m.sibling}t.stateNode=i;e:switch(Aa(i,r,s),r){case"button":case"input":case"select":case"textarea":s=!!s.autoFocus;break e;case"img":s=!0;break e;default:s=!1}s&&ao(t)}}return Tt(t),Sp(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,a),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==s&&ao(t);else{if(typeof s!="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=pe(Yo.current),a=ue(),hi(t)){if(e=t.stateNode,a=t.memoizedProps,r=!In,s=null,i=Ma,i!==null)switch(i.tag){case 3:r&&(r=Y0(e,a,s),r!==null&&(Dr(t,0).serverProps=r));break;case 27:case 5:s=i.memoizedProps,r&&(r=Y0(e,a,s),r!==null&&(Dr(t,0).serverProps=r))}e[Va]=t,e=!!(e.nodeValue===a||s!==null&&s.suppressHydrationWarning===!0||k0(e.nodeValue,a)),e||jo(t,!0)}else r=a.ancestorInfo.current,r!=null&&Eu(s,r.tag,a.ancestorInfo.implicitRootScope),e=xd(e).createTextNode(s),e[Va]=t,t.stateNode=e}return Tt(t),null;case 31:if(a=t.memoizedState,e===null||e.memoizedState!==null){if(s=hi(t),a!==null){if(e===null){if(!s)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?e.dehydrated:null,!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[Va]=t,Tt(t),(t.mode&Ke)!==Ye&&a!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration))}else wm(),_r(),(t.flags&128)===0&&(a=t.memoizedState=null),t.flags|=4,Tt(t),(t.mode&Ke)!==Ye&&a!==null&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration));e=!1}else a=Sm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=a),e=!0;if(!e)return t.flags&256?(ys(t),t):(ys(t),null);if((t.flags&128)!==0)throw Error("Client rendering an Activity suspended it again. This is a bug in React.")}return Tt(t),null;case 13:if(s=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(r=s,i=hi(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error("A dehydrated suspense component was completed without a hydrated node. This is probably a bug in React.");if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error("Expected to have a hydrated suspense instance. This error is likely caused by a bug in React. Please file an issue.");i[Va]=t,Tt(t),(t.mode&Ke)!==Ye&&r!==null&&(r=t.child,r!==null&&(t.treeBaseDuration-=r.treeBaseDuration))}else wm(),_r(),(t.flags&128)===0&&(r=t.memoizedState=null),t.flags|=4,Tt(t),(t.mode&Ke)!==Ye&&r!==null&&(r=t.child,r!==null&&(t.treeBaseDuration-=r.treeBaseDuration));r=!1}else r=Sm(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=r),r=!0;if(!r)return t.flags&256?(ys(t),t):(ys(t),null)}return ys(t),(t.flags&128)!==0?(t.lanes=a,(t.mode&Ke)!==Ye&&Al(t),t):(a=s!==null,e=e!==null&&e.memoizedState!==null,a&&(s=t.child,r=null,s.alternate!==null&&s.alternate.memoizedState!==null&&s.alternate.memoizedState.cachePool!==null&&(r=s.alternate.memoizedState.cachePool.pool),i=null,s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(i=s.memoizedState.cachePool.pool),i!==r&&(s.flags|=2048)),a!==e&&a&&(t.child.flags|=8192),ud(t,t.updateQueue),Tt(t),(t.mode&Ke)!==Ye&&a&&(e=t.child,e!==null&&(t.treeBaseDuration-=e.treeBaseDuration)),null);case 4:return te(t),e===null&&Hp(t.stateNode.containerInfo),Tt(t),null;case 10:return Wn(t.type,t),Tt(t),null;case 19:if(se(na,t),s=t.memoizedState,s===null)return Tt(t),null;if(r=(t.flags&128)!==0,i=s.rendering,i===null)if(r)Yl(s,!1);else{if(Ft!==xo||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=Fu(e),i!==null){for(t.flags|=128,Yl(s,!1),e=i.updateQueue,t.updateQueue=e,ud(t,e),t.subtreeFlags=0,e=a,a=t.child;a!==null;)oy(a,e),a=a.sibling;return ae(na,na.current&Wi|Tc,t),ut&&Kn(t,s.treeForkCount),t.child}e=e.sibling}s.tail!==null&&Ra()>hf&&(t.flags|=128,r=!0,Yl(s,!1),t.lanes=4194304)}else{if(!r)if(e=Fu(i),e!==null){if(t.flags|=128,r=!0,e=e.updateQueue,t.updateQueue=e,ud(t,e),Yl(s,!0),s.tail===null&&s.tailMode==="hidden"&&!i.alternate&&!ut)return Tt(t),null}else 2*Ra()-s.renderingStartTime>hf&&a!==536870912&&(t.flags|=128,r=!0,Yl(s,!1),t.lanes=4194304);s.isBackwards?(i.sibling=t.child,t.child=i):(e=s.last,e!==null?e.sibling=i:t.child=i,s.last=i)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=Ra(),e.sibling=null,a=na.current,a=r?a&Wi|Tc:a&Wi,ae(na,a,t),ut&&Kn(t,s.treeForkCount),e):(Tt(t),null);case 22:case 23:return ys(t),Am(t),s=t.memoizedState!==null,e!==null?e.memoizedState!==null!==s&&(t.flags|=8192):s&&(t.flags|=8192),s?(a&536870912)!==0&&(t.flags&128)===0&&(Tt(t),t.subtreeFlags&6&&(t.flags|=8192)):Tt(t),a=t.updateQueue,a!==null&&ud(t,a.retryQueue),a=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),s=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(s=t.memoizedState.cachePool.pool),s!==a&&(t.flags|=2048),e!==null&&se(Yr,t),null;case 24:return a=null,e!==null&&(a=e.memoizedState.cache),t.memoizedState.cache!==a&&(t.flags|=2048),Wn(ca,t),Tt(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 NE(e,t){switch(Nm(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ke)!==Ye&&Al(t),t):null;case 3:return Wn(ca,t),te(t),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return he(t),null;case 31:if(t.memoizedState!==null){if(ys(t),t.alternate===null)throw Error("Threw in newly mounted dehydrated component. This is likely a bug in React. Please file an issue.");_r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ke)!==Ye&&Al(t),t):null;case 13:if(ys(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.");_r()}return e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ke)!==Ye&&Al(t),t):null;case 19:return se(na,t),null;case 4:return te(t),null;case 10:return Wn(t.type,t),null;case 22:case 23:return ys(t),Am(t),e!==null&&se(Yr,t),e=t.flags,e&65536?(t.flags=e&-65537|128,(t.mode&Ke)!==Ye&&Al(t),t):null;case 24:return Wn(ca,t),null;case 25:return null;default:return null}}function Ex(e,t){switch(Nm(t),t.tag){case 3:Wn(ca,t),te(t);break;case 26:case 27:case 5:he(t);break;case 4:te(t);break;case 31:t.memoizedState!==null&&ys(t);break;case 13:ys(t);break;case 19:se(na,t);break;case 10:Wn(t.type,t);break;case 22:case 23:ys(t),Am(t),e!==null&&se(Yr,t);break;case 24:Wn(ca,t)}}function Un(e){return(e.mode&Ke)!==Ye}function Dx(e,t){Un(e)?(kn(),ql(t,e),Rn()):ql(t,e)}function wp(e,t,a){Un(e)?(kn(),Ni(a,e,t),Rn()):Ni(a,e,t)}function ql(e,t){try{var a=t.updateQueue,s=a!==null?a.lastEffect:null;if(s!==null){var r=s.next;a=r;do{if((a.tag&e)===e&&(s=void 0,(e&Ka)!==sf&&(ll=!0),s=ye(t,P_,a),(e&Ka)!==sf&&(ll=!1),s!==void 0&&typeof s!="function")){var i=void 0;i=(a.tag&Ds)!==0?"useLayoutEffect":(a.tag&Ka)!==0?"useInsertionEffect":"useEffect";var m=void 0;m=s===null?" You returned null. If your effect does not require clean up, return undefined (or nothing).":typeof s.then=="function"?`
146
+
147
+ It looks like you wrote `+i+`(async () => ...) or returned a Promise. Instead, write the async function inside your effect and call it immediately:
148
+
149
+ `+i+`(() => {
150
+ async function fetchData() {
151
+ // You can await here
152
+ const response = await MyAPI.getData(someId);
153
+ // ...
154
+ }
155
+ fetchData();
156
+ }, [someId]); // Or [] if effect doesn't need props or state
157
+
158
+ Learn more about data fetching with Hooks: https://react.dev/link/hooks-data-fetching`:" You returned: "+s,ye(t,function(h,v){console.error("%s must not return anything besides a function, which is used for clean-up.%s",h,v)},i,m)}a=a.next}while(a!==r)}}catch(h){Nt(t,t.return,h)}}function Ni(e,t,a){try{var s=t.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var i=r.next;s=i;do{if((s.tag&e)===e){var m=s.inst,h=m.destroy;h!==void 0&&(m.destroy=void 0,(e&Ka)!==sf&&(ll=!0),r=t,ye(r,F_,r,a,h),(e&Ka)!==sf&&(ll=!1))}s=s.next}while(s!==i)}}catch(v){Nt(t,t.return,v)}}function _x(e,t){Un(e)?(kn(),ql(t,e),Rn()):ql(t,e)}function Ep(e,t,a){Un(e)?(kn(),Ni(a,e,t),Rn()):Ni(a,e,t)}function Rx(e){var t=e.updateQueue;if(t!==null){var a=e.stateNode;e.type.defaultProps||"ref"in e.memoizedProps||sl||(a.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.",I(e)||"instance"),a.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.",I(e)||"instance"));try{ye(e,Uy,t,a)}catch(s){Nt(e,e.return,s)}}}function SE(e,t,a){return e.getSnapshotBeforeUpdate(t,a)}function wE(e,t){var a=t.memoizedProps,s=t.memoizedState;t=e.stateNode,e.type.defaultProps||"ref"in e.memoizedProps||sl||(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.",I(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.",I(e)||"instance"));try{var r=Tr(e.type,a),i=ye(e,SE,t,r,s);a=l1,i!==void 0||a.has(e.type)||(a.add(e.type),ye(e,function(){console.error("%s.getSnapshotBeforeUpdate(): A snapshot value (or null) must be returned. You have returned undefined.",I(e))})),t.__reactInternalSnapshotBeforeUpdate=i}catch(m){Nt(e,e.return,m)}}function kx(e,t,a){a.props=Tr(e.type,e.memoizedProps),a.state=e.memoizedState,Un(e)?(kn(),ye(e,RN,e,t,a),Rn()):ye(e,RN,e,t,a)}function EE(e){var t=e.ref;if(t!==null){switch(e.tag){case 26:case 27:case 5:var a=e.stateNode;break;case 30:a=e.stateNode;break;default:a=e.stateNode}if(typeof t=="function")if(Un(e))try{kn(),e.refCleanup=t(a)}finally{Rn()}else e.refCleanup=t(a);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().",I(e)),t.current=a}}function Gl(e,t){try{ye(e,EE,e)}catch(a){Nt(e,t,a)}}function Cn(e,t){var a=e.ref,s=e.refCleanup;if(a!==null)if(typeof s=="function")try{if(Un(e))try{kn(),ye(e,s)}finally{Rn(e)}else ye(e,s)}catch(r){Nt(e,t,r)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof a=="function")try{if(Un(e))try{kn(),ye(e,a,null)}finally{Rn(e)}else ye(e,a,null)}catch(r){Nt(e,t,r)}else a.current=null}function Ux(e,t,a,s){var r=e.memoizedProps,i=r.id,m=r.onCommit;r=r.onRender,t=t===null?"mount":"update",Jd&&(t="nested-update"),typeof r=="function"&&r(i,t,e.actualDuration,e.treeBaseDuration,e.actualStartTime,a),typeof m=="function"&&m(i,t,s,a)}function DE(e,t,a,s){var r=e.memoizedProps;e=r.id,r=r.onPostCommit,t=t===null?"mount":"update",Jd&&(t="nested-update"),typeof r=="function"&&r(e,t,s,a)}function Cx(e){var t=e.type,a=e.memoizedProps,s=e.stateNode;try{ye(e,QE,s,t,a,e)}catch(r){Nt(e,e.return,r)}}function Dp(e,t,a){try{ye(e,JE,e.stateNode,e.type,a,t,e)}catch(s){Nt(e,e.return,s)}}function jx(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Bo(e.type)||e.tag===4}function _p(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||jx(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&&Bo(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Rp(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?(L0(a),(a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a).insertBefore(e,t)):(L0(a),t=a.nodeType===9?a.body:a.nodeName==="HTML"?a.ownerDocument.body:a,t.appendChild(e),a=a._reactRootContainer,a!=null||t.onclick!==null||(t.onclick=Zn));else if(s!==4&&(s===27&&Bo(e.type)&&(a=e.stateNode,t=null),e=e.child,e!==null))for(Rp(e,t,a),e=e.sibling;e!==null;)Rp(e,t,a),e=e.sibling}function dd(e,t,a){var s=e.tag;if(s===5||s===6)e=e.stateNode,t?a.insertBefore(e,t):a.appendChild(e);else if(s!==4&&(s===27&&Bo(e.type)&&(a=e.stateNode),e=e.child,e!==null))for(dd(e,t,a),e=e.sibling;e!==null;)dd(e,t,a),e=e.sibling}function _E(e){for(var t,a=e.return;a!==null;){if(jx(a)){t=a;break}a=a.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,a=_p(e),dd(e,a,t);break;case 5:a=t.stateNode,t.flags&32&&(z0(a),t.flags&=-33),t=_p(e),dd(e,t,a);break;case 3:case 4:t=t.stateNode.containerInfo,a=_p(e),Rp(e,a,t);break;default:throw Error("Invalid host parent fiber. This error is likely caused by a bug in React. Please file an issue.")}}function Tx(e){var t=e.stateNode,a=e.memoizedProps;try{ye(e,mD,e.type,a,t,e)}catch(s){Nt(e,e.return,s)}}function Ox(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)===0:!1}function RE(e,t){if(e=e.containerInfo,Rb=Tf,e=Qg(e),cm(e)){if("selectionStart"in e)var a={start:e.selectionStart,end:e.selectionEnd};else e:{a=(a=e.ownerDocument)&&a.defaultView||window;var s=a.getSelection&&a.getSelection();if(s&&s.rangeCount!==0){a=s.anchorNode;var r=s.anchorOffset,i=s.focusNode;s=s.focusOffset;try{a.nodeType,i.nodeType}catch{a=null;break e}var m=0,h=-1,v=-1,D=0,M=0,L=e,j=null;t:for(;;){for(var q;L!==a||r!==0&&L.nodeType!==3||(h=m+r),L!==i||s!==0&&L.nodeType!==3||(v=m+s),L.nodeType===3&&(m+=L.nodeValue.length),(q=L.firstChild)!==null;)j=L,L=q;for(;;){if(L===e)break t;if(j===a&&++D===r&&(h=m),j===i&&++M===s&&(v=m),(q=L.nextSibling)!==null)break;L=j,j=L.parentNode}L=q}a=h===-1||v===-1?null:{start:h,end:v}}else a=null}a=a||{start:0,end:0}}else a=null;for(kb={focusedElem:e,selectionRange:a},Tf=!1,Ua=t;Ua!==null;)if(t=Ua,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ua=e;else for(;Ua!==null;){switch(e=t=Ua,a=e.alternate,r=e.flags,e.tag){case 0:if((r&4)!==0&&(e=e.updateQueue,e=e!==null?e.events:null,e!==null))for(a=0;a<e.length;a++)r=e[a],r.ref.impl=r.nextImpl;break;case 11:case 15:break;case 1:(r&1024)!==0&&a!==null&&wE(e,a);break;case 3:if((r&1024)!==0){if(e=e.stateNode.containerInfo,a=e.nodeType,a===9)Fp(e);else if(a===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":Fp(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((r&1024)!==0)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,Ua=e;break}Ua=t.return}}function Ax(e,t,a){var s=bs(),r=wn(),i=Dn(),m=_n(),h=a.flags;switch(a.tag){case 0:case 11:case 15:jn(e,a),h&4&&Dx(a,Ds|qs);break;case 1:if(jn(e,a),h&4)if(e=a.stateNode,t===null)a.type.defaultProps||"ref"in a.memoizedProps||sl||(e.props!==a.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.",I(a)||"instance"),e.state!==a.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.",I(a)||"instance")),Un(a)?(kn(),ye(a,Qh,a,e),Rn()):ye(a,Qh,a,e);else{var v=Tr(a.type,t.memoizedProps);t=t.memoizedState,a.type.defaultProps||"ref"in a.memoizedProps||sl||(e.props!==a.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.",I(a)||"instance"),e.state!==a.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.",I(a)||"instance")),Un(a)?(kn(),ye(a,EN,a,e,v,t,e.__reactInternalSnapshotBeforeUpdate),Rn()):ye(a,EN,a,e,v,t,e.__reactInternalSnapshotBeforeUpdate)}h&64&&Rx(a),h&512&&Gl(a,a.return);break;case 3:if(t=eo(),jn(e,a),h&64&&(h=a.updateQueue,h!==null)){if(v=null,a.child!==null)switch(a.child.tag){case 27:case 5:v=a.child.stateNode;break;case 1:v=a.child.stateNode}try{ye(a,Uy,h,v)}catch(M){Nt(a,a.return,M)}}e.effectDuration+=Lu(t);break;case 27:t===null&&h&4&&Tx(a);case 26:case 5:if(jn(e,a),t===null){if(h&4)Cx(a);else if(h&64){e=a.type,t=a.memoizedProps,v=a.stateNode;try{ye(a,ZE,v,e,t,a)}catch(M){Nt(a,a.return,M)}}}h&512&&Gl(a,a.return);break;case 12:if(h&4){h=eo(),jn(e,a),e=a.stateNode,e.effectDuration+=Ol(h);try{ye(a,Ux,a,t,Jo,e.effectDuration)}catch(M){Nt(a,a.return,M)}}else jn(e,a);break;case 31:jn(e,a),h&4&&zx(e,a);break;case 13:jn(e,a),h&4&&Lx(e,a),h&64&&(e=a.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(h=ME.bind(null,a),cD(e,h))));break;case 22:if(h=a.memoizedState!==null||yo,!h){t=t!==null&&t.memoizedState!==null||ma,v=yo;var D=ma;yo=h,(ma=t)&&!D?(Tn(e,a,(a.subtreeFlags&8772)!==0),(a.mode&Ke)!==Ye&&0<=ze&&0<=Be&&.05<Be-ze&&ku(a,ze,Be)):jn(e,a),yo=v,ma=D}break;case 30:break;default:jn(e,a)}(a.mode&Ke)!==Ye&&0<=ze&&0<=Be&&((Qt||.05<Pt)&&Nn(a,ze,Be,Pt,It),a.alternate===null&&a.return!==null&&a.return.alternate!==null&&.05<Be-ze&&(Ox(a.return.alternate,a.return)||vn(a,ze,Be,"Mount"))),gs(s),En(r),It=i,Qt=m}function Vx(e){var t=e.alternate;t!==null&&(e.alternate=null,Vx(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&A(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 so(e,t,a){for(a=a.child;a!==null;)Mx(e,t,a),a=a.sibling}function Mx(e,t,a){if($a&&typeof $a.onCommitFiberUnmount=="function")try{$a.onCommitFiberUnmount(Oi,a)}catch(D){Ln||(Ln=!0,console.error("React instrumentation encountered an error: %o",D))}var s=bs(),r=wn(),i=Dn(),m=_n();switch(a.tag){case 26:ma||Cn(a,t),so(e,t,a),a.memoizedState?a.memoizedState.count--:a.stateNode&&(e=a.stateNode,e.parentNode.removeChild(e));break;case 27:ma||Cn(a,t);var h=pa,v=is;Bo(a.type)&&(pa=a.stateNode,is=!1),so(e,t,a),ye(a,ec,a.stateNode),pa=h,is=v;break;case 5:ma||Cn(a,t);case 6:if(h=pa,v=is,pa=null,so(e,t,a),pa=h,is=v,pa!==null)if(is)try{ye(a,eD,pa,a.stateNode)}catch(D){Nt(a,t,D)}else try{ye(a,WE,pa,a.stateNode)}catch(D){Nt(a,t,D)}break;case 18:pa!==null&&(is?(e=pa,H0(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,a.stateNode),Ui(e)):H0(pa,a.stateNode));break;case 4:h=pa,v=is,pa=a.stateNode.containerInfo,is=!0,so(e,t,a),pa=h,is=v;break;case 0:case 11:case 14:case 15:Ni(Ka,a,t),ma||wp(a,t,Ds),so(e,t,a);break;case 1:ma||(Cn(a,t),h=a.stateNode,typeof h.componentWillUnmount=="function"&&kx(a,t,h)),so(e,t,a);break;case 21:so(e,t,a);break;case 22:ma=(h=ma)||a.memoizedState!==null,so(e,t,a),ma=h;break;default:so(e,t,a)}(a.mode&Ke)!==Ye&&0<=ze&&0<=Be&&(Qt||.05<Pt)&&Nn(a,ze,Be,Pt,It),gs(s),En(r),It=i,Qt=m}function zx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{ye(t,dD,e)}catch(a){Nt(t,t.return,a)}}}function Lx(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{ye(t,fD,e)}catch(a){Nt(t,t.return,a)}}function kE(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new c1),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new c1),t;default:throw Error("Unexpected Suspense handler tag ("+e.tag+"). This is a bug in React.")}}function fd(e,t){var a=kE(e);t.forEach(function(s){if(!a.has(s)){if(a.add(s),Hn)if(nl!==null&&ol!==null)Ql(ol,nl);else throw Error("Expected finished root and lanes to be set. This is a bug in React.");var r=zE.bind(null,e,s);s.then(r,r)}})}function os(e,t){var a=t.deletions;if(a!==null)for(var s=0;s<a.length;s++){var r=e,i=t,m=a[s],h=bs(),v=i;e:for(;v!==null;){switch(v.tag){case 27:if(Bo(v.type)){pa=v.stateNode,is=!1;break e}break;case 5:pa=v.stateNode,is=!1;break e;case 3:case 4:pa=v.stateNode.containerInfo,is=!0;break e}v=v.return}if(pa===null)throw Error("Expected to find a host parent. This error is likely caused by a bug in React. Please file an issue.");Mx(r,i,m),pa=null,is=!1,(m.mode&Ke)!==Ye&&0<=ze&&0<=Be&&.05<Be-ze&&vn(m,ze,Be,"Unmount"),gs(h),r=m,i=r.alternate,i!==null&&(i.return=null),r.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)Hx(t,e),t=t.sibling}function Hx(e,t){var a=bs(),s=wn(),r=Dn(),i=_n(),m=e.alternate,h=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:os(t,e),rs(e),h&4&&(Ni(Ka|qs,e,e.return),ql(Ka|qs,e),wp(e,e.return,Ds|qs));break;case 1:if(os(t,e),rs(e),h&512&&(ma||m===null||Cn(m,m.return)),h&64&&yo&&(h=e.updateQueue,h!==null&&(m=h.callbacks,m!==null))){var v=h.shared.hiddenCallbacks;h.shared.hiddenCallbacks=v===null?m:v.concat(m)}break;case 26:if(v=un,os(t,e),rs(e),h&512&&(ma||m===null||Cn(m,m.return)),h&4){var D=m!==null?m.memoizedState:null;if(h=e.memoizedState,m===null)if(h===null)if(e.stateNode===null){e:{h=e.type,m=e.memoizedProps,v=v.ownerDocument||v;t:switch(h){case"title":D=v.getElementsByTagName("title")[0],(!D||D[ic]||D[Va]||D.namespaceURI===Vi||D.hasAttribute("itemprop"))&&(D=v.createElement(h),v.head.insertBefore(D,v.querySelector("head > title"))),Aa(D,h,m),D[Va]=e,le(D),h=D;break e;case"link":var M=Z0("link","href",v).get(h+(m.href||""));if(M){for(var L=0;L<M.length;L++)if(D=M[L],D.getAttribute("href")===(m.href==null||m.href===""?null:m.href)&&D.getAttribute("rel")===(m.rel==null?null:m.rel)&&D.getAttribute("title")===(m.title==null?null:m.title)&&D.getAttribute("crossorigin")===(m.crossOrigin==null?null:m.crossOrigin)){M.splice(L,1);break t}}D=v.createElement(h),Aa(D,h,m),v.head.appendChild(D);break;case"meta":if(M=Z0("meta","content",v).get(h+(m.content||""))){for(L=0;L<M.length;L++)if(D=M[L],Xe(m.content,"content"),D.getAttribute("content")===(m.content==null?null:""+m.content)&&D.getAttribute("name")===(m.name==null?null:m.name)&&D.getAttribute("property")===(m.property==null?null:m.property)&&D.getAttribute("http-equiv")===(m.httpEquiv==null?null:m.httpEquiv)&&D.getAttribute("charset")===(m.charSet==null?null:m.charSet)){M.splice(L,1);break t}}D=v.createElement(h),Aa(D,h,m),v.head.appendChild(D);break;default:throw Error('getNodesForType encountered a type it did not expect: "'+h+'". This is a bug in React.')}D[Va]=e,le(D),h=D}e.stateNode=h}else J0(v,e.type,e.stateNode);else e.stateNode=Q0(v,h,e.memoizedProps);else D!==h?(D===null?m.stateNode!==null&&(m=m.stateNode,m.parentNode.removeChild(m)):D.count--,h===null?J0(v,e.type,e.stateNode):Q0(v,h,e.memoizedProps)):h===null&&e.stateNode!==null&&Dp(e,e.memoizedProps,m.memoizedProps)}break;case 27:os(t,e),rs(e),h&512&&(ma||m===null||Cn(m,m.return)),m!==null&&h&4&&Dp(e,e.memoizedProps,m.memoizedProps);break;case 5:if(os(t,e),rs(e),h&512&&(ma||m===null||Cn(m,m.return)),e.flags&32){v=e.stateNode;try{ye(e,z0,v)}catch(Se){Nt(e,e.return,Se)}}h&4&&e.stateNode!=null&&(v=e.memoizedProps,Dp(e,v,m!==null?m.memoizedProps:v)),h&1024&&(lb=!0,e.type!=="form"&&console.error("Unexpected host component type. Expected a form. This is a bug in React."));break;case 6:if(os(t,e),rs(e),h&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.");h=e.memoizedProps,m=m!==null?m.memoizedProps:h,v=e.stateNode;try{ye(e,KE,v,m,h)}catch(Se){Nt(e,e.return,Se)}}break;case 3:if(v=eo(),Uf=null,D=un,un=vd(t.containerInfo),os(t,e),un=D,rs(e),h&4&&m!==null&&m.memoizedState.isDehydrated)try{ye(e,uD,t.containerInfo)}catch(Se){Nt(e,e.return,Se)}lb&&(lb=!1,$x(e)),t.effectDuration+=Lu(v);break;case 4:h=un,un=vd(e.stateNode.containerInfo),os(t,e),rs(e),un=h;break;case 12:h=eo(),os(t,e),rs(e),e.stateNode.effectDuration+=Ol(h);break;case 31:os(t,e),rs(e),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,fd(e,h)));break;case 13:os(t,e),rs(e),e.child.flags&8192&&e.memoizedState!==null!=(m!==null&&m.memoizedState!==null)&&(pf=Ra()),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,fd(e,h)));break;case 22:v=e.memoizedState!==null;var j=m!==null&&m.memoizedState!==null,q=yo,ge=ma;if(yo=q||v,ma=ge||j,os(t,e),ma=ge,yo=q,j&&!v&&!q&&!ge&&(e.mode&Ke)!==Ye&&0<=ze&&0<=Be&&.05<Be-ze&&ku(e,ze,Be),rs(e),h&8192)e:for(t=e.stateNode,t._visibility=v?t._visibility&~bc:t._visibility|bc,!v||m===null||j||yo||ma||(Or(e),(e.mode&Ke)!==Ye&&0<=ze&&0<=Be&&.05<Be-ze&&vn(e,ze,Be,"Disconnect")),m=null,t=e;;){if(t.tag===5||t.tag===26){if(m===null){j=m=t;try{D=j.stateNode,v?ye(j,aD,D):ye(j,oD,j.stateNode,j.memoizedProps)}catch(Se){Nt(j,j.return,Se)}}}else if(t.tag===6){if(m===null){j=t;try{M=j.stateNode,v?ye(j,sD,M):ye(j,rD,M,j.memoizedProps)}catch(Se){Nt(j,j.return,Se)}}}else if(t.tag===18){if(m===null){j=t;try{L=j.stateNode,v?ye(j,tD,L):ye(j,nD,j.stateNode)}catch(Se){Nt(j,j.return,Se)}}}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 e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;m===t&&(m=null),t=t.return}m===t&&(m=null),t.sibling.return=t.return,t=t.sibling}h&4&&(h=e.updateQueue,h!==null&&(m=h.retryQueue,m!==null&&(h.retryQueue=null,fd(e,m))));break;case 19:os(t,e),rs(e),h&4&&(h=e.updateQueue,h!==null&&(e.updateQueue=null,fd(e,h)));break;case 30:break;case 21:break;default:os(t,e),rs(e)}(e.mode&Ke)!==Ye&&0<=ze&&0<=Be&&((Qt||.05<Pt)&&Nn(e,ze,Be,Pt,It),e.alternate===null&&e.return!==null&&e.return.alternate!==null&&.05<Be-ze&&(Ox(e.return.alternate,e.return)||vn(e,ze,Be,"Mount"))),gs(a),En(s),It=r,Qt=i}function rs(e){var t=e.flags;if(t&2){try{ye(e,_E,e)}catch(a){Nt(e,e.return,a)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function $x(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;$x(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function jn(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)Ax(e,t.alternate,t),t=t.sibling}function Bx(e){var t=bs(),a=wn(),s=Dn(),r=_n();switch(e.tag){case 0:case 11:case 14:case 15:wp(e,e.return,Ds),Or(e);break;case 1:Cn(e,e.return);var i=e.stateNode;typeof i.componentWillUnmount=="function"&&kx(e,e.return,i),Or(e);break;case 27:ye(e,ec,e.stateNode);case 26:case 5:Cn(e,e.return),Or(e);break;case 22:e.memoizedState===null&&Or(e);break;case 30:Or(e);break;default:Or(e)}(e.mode&Ke)!==Ye&&0<=ze&&0<=Be&&(Qt||.05<Pt)&&Nn(e,ze,Be,Pt,It),gs(t),En(a),It=s,Qt=r}function Or(e){for(e=e.child;e!==null;)Bx(e),e=e.sibling}function Ix(e,t,a,s){var r=bs(),i=wn(),m=Dn(),h=_n(),v=a.flags;switch(a.tag){case 0:case 11:case 15:Tn(e,a,s),Dx(a,Ds);break;case 1:if(Tn(e,a,s),t=a.stateNode,typeof t.componentDidMount=="function"&&ye(a,Qh,a,t),t=a.updateQueue,t!==null){e=a.stateNode;try{ye(a,uE,t,e)}catch(D){Nt(a,a.return,D)}}s&&v&64&&Rx(a),Gl(a,a.return);break;case 27:Tx(a);case 26:case 5:Tn(e,a,s),s&&t===null&&v&4&&Cx(a),Gl(a,a.return);break;case 12:if(s&&v&4){v=eo(),Tn(e,a,s),s=a.stateNode,s.effectDuration+=Ol(v);try{ye(a,Ux,a,t,Jo,s.effectDuration)}catch(D){Nt(a,a.return,D)}}else Tn(e,a,s);break;case 31:Tn(e,a,s),s&&v&4&&zx(e,a);break;case 13:Tn(e,a,s),s&&v&4&&Lx(e,a);break;case 22:a.memoizedState===null&&Tn(e,a,s),Gl(a,a.return);break;case 30:break;default:Tn(e,a,s)}(a.mode&Ke)!==Ye&&0<=ze&&0<=Be&&(Qt||.05<Pt)&&Nn(a,ze,Be,Pt,It),gs(r),En(i),It=m,Qt=h}function Tn(e,t,a){for(a=a&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;)Ix(e,t.alternate,t,a),t=t.sibling}function kp(e,t){var a=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(a=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==a&&(e!=null&&kr(e),a!=null&&Tl(a))}function Up(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(kr(t),e!=null&&Tl(e))}function nn(e,t,a,s,r){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(t=t.child;t!==null;){var i=t.sibling;Yx(e,t,a,s,i!==null?i.actualStartTime:r),t=i}}function Yx(e,t,a,s,r){var i=bs(),m=wn(),h=Dn(),v=_n(),D=Fo,M=t.flags;switch(t.tag){case 0:case 11:case 15:(t.mode&Ke)!==Ye&&0<t.actualStartTime&&(t.flags&1)!==0&&Uu(t,t.actualStartTime,r,va,a),nn(e,t,a,s,r),M&2048&&_x(t,Wa|qs);break;case 1:(t.mode&Ke)!==Ye&&0<t.actualStartTime&&((t.flags&128)!==0?dm(t,t.actualStartTime,r,[]):(t.flags&1)!==0&&Uu(t,t.actualStartTime,r,va,a)),nn(e,t,a,s,r);break;case 3:var L=eo(),j=va;va=t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)===0,nn(e,t,a,s,r),va=j,M&2048&&(a=null,t.alternate!==null&&(a=t.alternate.memoizedState.cache),s=t.memoizedState.cache,s!==a&&(kr(s),a!=null&&Tl(a))),e.passiveEffectDuration+=Lu(L);break;case 12:if(M&2048){M=eo(),nn(e,t,a,s,r),e=t.stateNode,e.passiveEffectDuration+=Ol(M);try{ye(t,DE,t,t.alternate,Jo,e.passiveEffectDuration)}catch(q){Nt(t,t.return,q)}}else nn(e,t,a,s,r);break;case 31:M=va,L=t.alternate!==null?t.alternate.memoizedState:null,j=t.memoizedState,L!==null&&j===null?(j=t.deletions,j!==null&&0<j.length&&j[0].tag===18?(va=!1,L=L.hydrationErrors,L!==null&&dm(t,t.actualStartTime,r,L)):va=!0):va=!1,nn(e,t,a,s,r),va=M;break;case 13:M=va,L=t.alternate!==null?t.alternate.memoizedState:null,j=t.memoizedState,L===null||L.dehydrated===null||j!==null&&j.dehydrated!==null?va=!1:(j=t.deletions,j!==null&&0<j.length&&j[0].tag===18?(va=!1,L=L.hydrationErrors,L!==null&&dm(t,t.actualStartTime,r,L)):va=!0),nn(e,t,a,s,r),va=M;break;case 23:break;case 22:j=t.stateNode,L=t.alternate,t.memoizedState!==null?j._visibility&io?nn(e,t,a,s,r):Pl(e,t,a,s,r):j._visibility&io?nn(e,t,a,s,r):(j._visibility|=io,Si(e,t,a,s,(t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child),r),(t.mode&Ke)===Ye||va||(e=t.actualStartTime,0<=e&&.05<r-e&&ku(t,e,r),0<=ze&&0<=Be&&.05<Be-ze&&ku(t,ze,Be))),M&2048&&kp(L,t);break;case 24:nn(e,t,a,s,r),M&2048&&Up(t.alternate,t);break;default:nn(e,t,a,s,r)}(t.mode&Ke)!==Ye&&((e=!va&&t.alternate===null&&t.return!==null&&t.return.alternate!==null)&&(a=t.actualStartTime,0<=a&&.05<r-a&&vn(t,a,r,"Mount")),0<=ze&&0<=Be&&((Qt||.05<Pt)&&Nn(t,ze,Be,Pt,It),e&&.05<Be-ze&&vn(t,ze,Be,"Mount"))),gs(i),En(m),It=h,Qt=v,Fo=D}function Si(e,t,a,s,r,i){for(r=r&&((t.subtreeFlags&10256)!==0||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child)),t=t.child;t!==null;){var m=t.sibling;qx(e,t,a,s,r,m!==null?m.actualStartTime:i),t=m}}function qx(e,t,a,s,r,i){var m=bs(),h=wn(),v=Dn(),D=_n(),M=Fo;r&&(t.mode&Ke)!==Ye&&0<t.actualStartTime&&(t.flags&1)!==0&&Uu(t,t.actualStartTime,i,va,a);var L=t.flags;switch(t.tag){case 0:case 11:case 15:Si(e,t,a,s,r,i),_x(t,Wa);break;case 23:break;case 22:var j=t.stateNode;t.memoizedState!==null?j._visibility&io?Si(e,t,a,s,r,i):Pl(e,t,a,s,i):(j._visibility|=io,Si(e,t,a,s,r,i)),r&&L&2048&&kp(t.alternate,t);break;case 24:Si(e,t,a,s,r,i),r&&L&2048&&Up(t.alternate,t);break;default:Si(e,t,a,s,r,i)}(t.mode&Ke)!==Ye&&0<=ze&&0<=Be&&(Qt||.05<Pt)&&Nn(t,ze,Be,Pt,It),gs(m),En(h),It=v,Qt=D,Fo=M}function Pl(e,t,a,s,r){if(t.subtreeFlags&10256||t.actualDuration!==0&&(t.alternate===null||t.alternate.child!==t.child))for(var i=t.child;i!==null;){t=i.sibling;var m=e,h=a,v=s,D=t!==null?t.actualStartTime:r,M=Fo;(i.mode&Ke)!==Ye&&0<i.actualStartTime&&(i.flags&1)!==0&&Uu(i,i.actualStartTime,D,va,h);var L=i.flags;switch(i.tag){case 22:Pl(m,i,h,v,D),L&2048&&kp(i.alternate,i);break;case 24:Pl(m,i,h,v,D),L&2048&&Up(i.alternate,i);break;default:Pl(m,i,h,v,D)}Fo=M,i=t}}function wi(e,t,a){if(e.subtreeFlags&Mc)for(e=e.child;e!==null;)Gx(e,t,a),e=e.sibling}function Gx(e,t,a){switch(e.tag){case 26:wi(e,t,a),e.flags&Mc&&e.memoizedState!==null&&bD(a,un,e.memoizedState,e.memoizedProps);break;case 5:wi(e,t,a);break;case 3:case 4:var s=un;un=vd(e.stateNode.containerInfo),wi(e,t,a),un=s;break;case 22:e.memoizedState===null&&(s=e.alternate,s!==null&&s.memoizedState!==null?(s=Mc,Mc=16777216,wi(e,t,a),Mc=s):wi(e,t,a));break;default:wi(e,t,a)}}function Px(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 Fl(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a],r=bs();Ua=s,Qx(s,e),(s.mode&Ke)!==Ye&&0<=ze&&0<=Be&&.05<Be-ze&&vn(s,ze,Be,"Unmount"),gs(r)}Px(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Fx(e),e=e.sibling}function Fx(e){var t=bs(),a=wn(),s=Dn(),r=_n();switch(e.tag){case 0:case 11:case 15:Fl(e),e.flags&2048&&Ep(e,e.return,Wa|qs);break;case 3:var i=eo();Fl(e),e.stateNode.passiveEffectDuration+=Lu(i);break;case 12:i=eo(),Fl(e),e.stateNode.passiveEffectDuration+=Ol(i);break;case 22:i=e.stateNode,e.memoizedState!==null&&i._visibility&io&&(e.return===null||e.return.tag!==13)?(i._visibility&=~io,md(e),(e.mode&Ke)!==Ye&&0<=ze&&0<=Be&&.05<Be-ze&&vn(e,ze,Be,"Disconnect")):Fl(e);break;default:Fl(e)}(e.mode&Ke)!==Ye&&0<=ze&&0<=Be&&(Qt||.05<Pt)&&Nn(e,ze,Be,Pt,It),gs(t),En(a),Qt=r,It=s}function md(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var a=0;a<t.length;a++){var s=t[a],r=bs();Ua=s,Qx(s,e),(s.mode&Ke)!==Ye&&0<=ze&&0<=Be&&.05<Be-ze&&vn(s,ze,Be,"Unmount"),gs(r)}Px(e)}for(e=e.child;e!==null;)Xx(e),e=e.sibling}function Xx(e){var t=bs(),a=wn(),s=Dn(),r=_n();switch(e.tag){case 0:case 11:case 15:Ep(e,e.return,Wa),md(e);break;case 22:var i=e.stateNode;i._visibility&io&&(i._visibility&=~io,md(e));break;default:md(e)}(e.mode&Ke)!==Ye&&0<=ze&&0<=Be&&(Qt||.05<Pt)&&Nn(e,ze,Be,Pt,It),gs(t),En(a),Qt=r,It=s}function Qx(e,t){for(;Ua!==null;){var a=Ua,s=a,r=t,i=bs(),m=wn(),h=Dn(),v=_n();switch(s.tag){case 0:case 11:case 15:Ep(s,r,Wa);break;case 23:case 22:s.memoizedState!==null&&s.memoizedState.cachePool!==null&&(r=s.memoizedState.cachePool.pool,r!=null&&kr(r));break;case 24:Tl(s.memoizedState.cache)}if((s.mode&Ke)!==Ye&&0<=ze&&0<=Be&&(Qt||.05<Pt)&&Nn(s,ze,Be,Pt,It),gs(i),En(m),Qt=v,It=h,s=a.child,s!==null)s.return=a,Ua=s;else e:for(a=e;Ua!==null;){if(s=Ua,i=s.sibling,m=s.return,Vx(s),s===a){Ua=null;break e}if(i!==null){i.return=m,Ua=i;break e}Ua=m}}}function UE(){K_.forEach(function(e){return e()})}function Zx(){var e=typeof IS_REACT_ACT_ENVIRONMENT<"u"?IS_REACT_ACT_ENVIRONMENT:void 0;return e||Q.actQueue===null||console.error("The current testing environment is not configured to support act(...)"),e}function xs(e){if((bt&Na)!==Ca&&et!==0)return et&-et;var t=Q.T;return t!==null?(t._updatedFibers||(t._updatedFibers=new Set),t._updatedFibers.add(e),zp()):ke()}function Jx(){if(cs===0)if((et&536870912)===0||ut){var e=Td;Td<<=1,(Td&3932160)===0&&(Td=262144),cs=e}else cs=536870912;return e=Es.current,e!==null&&(e.flags|=32),cs}function Xt(e,t,a){if(ll&&console.error("useInsertionEffect must not schedule updates."),xb&&(yf=!0),(e===kt&&(Et===Qr||Et===Zr)||e.cancelPendingCommit!==null)&&(Di(e,0),Ho(e,et,cs,!1)),tt(e,a),(bt&Na)!==Ca&&e===kt){if(zn)switch(t.tag){case 0:case 11:case 15:e=at&&I(at)||"Unknown",E1.has(e)||(E1.add(e),t=I(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:w1||(console.error("Cannot update during an existing state transition (such as within `render`). Render methods should be a pure function of props and state."),w1=!0)}}else Hn&&ja(e,t,a),HE(t),e===kt&&((bt&Na)===Ca&&(or|=a),Ft===ar&&Ho(e,et,cs,!1)),On(e)}function Kx(e,t,a){if((bt&(Na|_s))!==Ca)throw Error("Should not already be working.");if(et!==0&&at!==null){var s=at,r=Ra();switch(bN){case Hc:case Qr:var i=Sc;Mt&&((s=s._debugTask)?s.run(console.timeStamp.bind(console,"Suspended",i,r,Ms,void 0,"primary-light")):console.timeStamp("Suspended",i,r,Ms,void 0,"primary-light"));break;case Zr:i=Sc,Mt&&((s=s._debugTask)?s.run(console.timeStamp.bind(console,"Action",i,r,Ms,void 0,"primary-light")):console.timeStamp("Action",i,r,Ms,void 0,"primary-light"));break;default:Mt&&(s=r-Sc,3>s||console.timeStamp("Blocked",Sc,r,Ms,void 0,5>s?"primary-light":10>s?"primary":100>s?"primary-dark":"error"))}}i=(a=!a&&(t&127)===0&&(t&e.expiredLanes)===0||ea(e,t))?jE(e,t):jp(e,t,!0);var m=a;do{if(i===xo){rl&&!a&&Ho(e,t,0,!1),t=Et,Sc=ua(),bN=t;break}else{if(s=Ra(),r=e.current.alternate,m&&!CE(r)){an(t),r=ka,i=s,!Mt||i<=r||(Jt?Jt.run(console.timeStamp.bind(console,"Teared Render",r,i,ht,mt,"error")):console.timeStamp("Teared Render",r,i,ht,mt,"error")),Ar(t,s),i=jp(e,t,!1),m=!1;continue}if(i===Xr){if(m=t,e.errorRecoveryDisabledLanes&m)var h=0;else h=e.pendingLanes&-536870913,h=h!==0?h:h&536870912?536870912:0;if(h!==0){an(t),fm(ka,s,t,Jt),Ar(t,s),t=h;e:{s=e,i=m,m=Bc;var v=s.current.memoizedState.isDehydrated;if(v&&(Di(s,h).flags|=256),h=jp(s,h,!1),h!==Xr){if(db&&!v){s.errorRecoveryDisabledLanes|=i,or|=i,i=ar;break e}s=es,es=m,s!==null&&(es===null?es=s:es.push.apply(es,s))}i=h}if(m=!1,i!==Xr)continue;s=Ra()}}if(i===Lc){an(t),fm(ka,s,t,Jt),Ar(t,s),Di(e,0),Ho(e,t,0,!0);break}e:{switch(a=e,i){case xo:case Lc:throw Error("Root did not complete. This is a bug in React.");case ar:if((t&4194048)!==t)break;case uf:an(t),Kg(ka,s,t,Jt),Ar(t,s),r=t,(r&127)!==0?Xd=s:(r&4194048)!==0&&(Qd=s),Ho(a,t,cs,!sr);break e;case Xr:es=null;break;case cf:case u1:break;default:throw Error("Unknown root exit status.")}if(Q.actQueue!==null)Tp(a,r,t,es,Ic,mf,cs,or,Jr,i,null,null,ka,s);else{if((t&62914560)===t&&(m=pf+m1-Ra(),10<m)){if(Ho(a,t,cs,!sr),Wt(a,0,!0)!==0)break e;dn=t,a.timeoutHandle=T1(Wx.bind(null,a,r,es,Ic,mf,t,cs,or,Jr,sr,i,"Throttled",ka,s),m);break e}Wx(a,r,es,Ic,mf,t,cs,or,Jr,sr,i,null,ka,s)}}}break}while(!0);On(e)}function Wx(e,t,a,s,r,i,m,h,v,D,M,L,j,q){e.timeoutHandle=ai;var ge=t.subtreeFlags,Se=null;if((ge&8192||(ge&16785408)===16785408)&&(Se={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Zn},Gx(t,i,Se),ge=(i&62914560)===i?pf-Ra():(i&4194048)===i?f1-Ra():0,ge=gD(Se,ge),ge!==null)){dn=i,e.cancelPendingCommit=ge(Tp.bind(null,e,t,i,a,s,r,m,h,v,M,Se,Se.waitingForViewTransition?"Waiting for the previous Animation":0<Se.count?0<Se.imgCount?"Suspended on CSS and Images":"Suspended on CSS":Se.imgCount===1?"Suspended on an Image":0<Se.imgCount?"Suspended on Images":null,j,q)),Ho(e,i,m,!D);return}Tp(e,t,i,a,s,r,m,h,v,M,Se,L,j,q)}function CE(e){for(var t=e;;){var a=t.tag;if((a===0||a===11||a===15)&&t.flags&16384&&(a=t.updateQueue,a!==null&&(a=a.stores,a!==null)))for(var s=0;s<a.length;s++){var r=a[s],i=r.getSnapshot;r=r.value;try{if(!Za(i(),r))return!1}catch{return!1}}if(a=t.child,t.subtreeFlags&16384&&a!==null)a.return=t,t=a;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 Ho(e,t,a,s){t&=~fb,t&=~or,e.suspendedLanes|=t,e.pingedLanes&=~t,s&&(e.warmLanes|=t),s=e.expirationTimes;for(var r=t;0<r;){var i=31-Fa(r),m=1<<i;s[i]=-1,r&=~m}a!==0&&$t(e,a,t)}function Ei(){return(bt&(Na|_s))===Ca?(Zl(0),!1):!0}function Cp(){if(at!==null){if(Et===ls)var e=at.return;else e=at,Vu(),Bm(e),Ji=null,jc=0,e=at;for(;e!==null;)Ex(e.alternate,e),e=e.return;at=null}}function Ar(e,t){(e&127)!==0&&(Hr=t),(e&4194048)!==0&&(mo=t),(e&62914560)!==0&&(pN=t),(e&2080374784)!==0&&(hN=t)}function Di(e,t){Mt&&(console.timeStamp("Blocking Track",.003,.003,"Blocking",mt,"primary-light"),console.timeStamp("Transition Track",.003,.003,"Transition",mt,"primary-light"),console.timeStamp("Suspense Track",.003,.003,"Suspense",mt,"primary-light"),console.timeStamp("Idle Track",.003,.003,"Idle",mt,"primary-light"));var a=ka;if(ka=ua(),et!==0&&0<a){if(an(et),Ft===cf||Ft===ar)Kg(a,ka,t,Jt);else{var s=ka,r=Jt;if(Mt&&!(s<=a)){var i=(t&738197653)===t?"tertiary-dark":"primary-dark",m=(t&536870912)===t?"Prewarm":(t&201326741)===t?"Interrupted Hydration":"Interrupted Render";r?r.run(console.timeStamp.bind(console,m,a,s,ht,mt,i)):console.timeStamp(m,a,s,ht,mt,i)}}Ar(et,ka)}if(a=Jt,Jt=null,(t&127)!==0){Jt=xc,r=0<=Yn&&Yn<Hr?Hr:Yn,s=0<=$r&&$r<Hr?Hr:$r,i=0<=s?s:0<=r?r:ka,0<=Xd?(an(2),Wg(Xd,i,t,a)):Zd&127,a=r;var h=s,v=vc,D=0<Xi,M=Ko===yc,L=Ko===Fd;if(r=ka,s=xc,i=qh,m=Gh,Mt){if(ht="Blocking",0<a?a>r&&(a=r):a=r,0<h?h>a&&(h=a):h=a,v!==null&&a>h){var j=D?"secondary-light":"warning";s?s.run(console.timeStamp.bind(console,D?"Consecutive":"Event: "+v,h,a,ht,mt,j)):console.timeStamp(D?"Consecutive":"Event: "+v,h,a,ht,mt,j)}r>a&&(h=M?"error":(t&738197653)===t?"tertiary-light":"primary-light",M=L?"Promise Resolved":M?"Cascading Update":5<r-a?"Update Blocked":"Update",L=[],m!=null&&L.push(["Component name",m]),i!=null&&L.push(["Method name",i]),a={start:a,end:r,detail:{devtools:{properties:L,track:ht,trackGroup:mt,color:h}}},s?s.run(performance.measure.bind(performance,M,a)):performance.measure(M,a))}Yn=-1.1,Ko=0,Gh=qh=null,Xd=-1.1,Xi=$r,$r=-1.1,Hr=ua()}if((t&4194048)!==0&&(Jt=Nc,r=0<=po&&po<mo?mo:po,a=0<=Is&&Is<mo?mo:Is,s=0<=Wo&&Wo<mo?mo:Wo,i=0<=s?s:0<=a?a:ka,0<=Qd?(an(256),Wg(Qd,i,t,Jt)):Zd&4194048,L=s,h=Br,v=0<er,D=Ph===Fd,i=ka,s=Nc,m=fN,M=mN,Mt&&(ht="Transition",0<a?a>i&&(a=i):a=i,0<r?r>a&&(r=a):r=a,0<L?L>r&&(L=r):L=r,r>L&&h!==null&&(j=v?"secondary-light":"warning",s?s.run(console.timeStamp.bind(console,v?"Consecutive":"Event: "+h,L,r,ht,mt,j)):console.timeStamp(v?"Consecutive":"Event: "+h,L,r,ht,mt,j)),a>r&&(s?s.run(console.timeStamp.bind(console,"Action",r,a,ht,mt,"primary-dark")):console.timeStamp("Action",r,a,ht,mt,"primary-dark")),i>a&&(r=D?"Promise Resolved":5<i-a?"Update Blocked":"Update",L=[],M!=null&&L.push(["Component name",M]),m!=null&&L.push(["Method name",m]),a={start:a,end:i,detail:{devtools:{properties:L,track:ht,trackGroup:mt,color:"primary-light"}}},s?s.run(performance.measure.bind(performance,r,a)):performance.measure(r,a))),Is=po=-1.1,Ph=0,Qd=-1.1,er=Wo,Wo=-1.1,mo=ua()),(t&62914560)!==0&&(Zd&62914560)!==0&&(an(4194304),mm(pN,ka)),(t&2080374784)!==0&&(Zd&2080374784)!==0&&(an(268435456),mm(hN,ka)),a=e.timeoutHandle,a!==ai&&(e.timeoutHandle=ai,dR(a)),a=e.cancelPendingCommit,a!==null&&(e.cancelPendingCommit=null,a()),dn=0,Cp(),kt=e,at=a=Jn(e.current,null),et=t,Et=ls,Rs=null,sr=!1,rl=ea(e,t),db=!1,Ft=xo,Jr=cs=fb=or=nr=0,es=Bc=null,mf=!1,(t&8)!==0&&(t|=t&32),s=e.entangledLanes,s!==0)for(e=e.entanglements,s&=t;0<s;)r=31-Fa(s),i=1<<r,t|=e[r],s&=~i;return Gn=t,Cu(),e=rN(),1e3<e-oN&&(Q.recentlyCreatedOwnerStacks=0,oN=e),ln.discardPendingWarnings(),a}function e0(e,t){qe=null,Q.H=Vc,Q.getCurrentStack=null,zn=!1,Ss=null,t===Zi||t===ef?(t=Ny(),Et=Hc):t===Zh?(t=Ny(),Et=d1):Et=t===rb?ub:t!==null&&typeof t=="object"&&typeof t.then=="function"?$c:df,Rs=t;var a=at;a===null?(Ft=Lc,rd(e,hs(t,e.current))):a.mode&Ke&&km(a)}function t0(){var e=Es.current;return e===null?!0:(et&4194048)===et?Ys===null:(et&62914560)===et||(et&536870912)!==0?e===Ys:!1}function a0(){var e=Q.H;return Q.H=Vc,e===null?Vc:e}function s0(){var e=Q.A;return Q.A=J_,e}function pd(e){Jt===null&&(Jt=e._debugTask==null?null:e._debugTask)}function hd(){Ft=ar,sr||(et&4194048)!==et&&Es.current!==null||(rl=!0),(nr&134217727)===0&&(or&134217727)===0||kt===null||Ho(kt,et,cs,!1)}function jp(e,t,a){var s=bt;bt|=Na;var r=a0(),i=s0();if(kt!==e||et!==t){if(Hn){var m=e.memoizedUpdaters;0<m.size&&(Ql(e,et),m.clear()),ia(e,t)}Ic=null,Di(e,t)}t=!1,m=Ft;e:do try{if(Et!==ls&&at!==null){var h=at,v=Rs;switch(Et){case ub:Cp(),m=uf;break e;case Hc:case Qr:case Zr:case $c:Es.current===null&&(t=!0);var D=Et;if(Et=ls,Rs=null,_i(e,h,v,D),a&&rl){m=xo;break e}break;default:D=Et,Et=ls,Rs=null,_i(e,h,v,D)}}n0(),m=Ft;break}catch(M){e0(e,M)}while(!0);return t&&e.shellSuspendCounter++,Vu(),bt=s,Q.H=r,Q.A=i,at===null&&(kt=null,et=0,Cu()),m}function n0(){for(;at!==null;)o0(at)}function jE(e,t){var a=bt;bt|=Na;var s=a0(),r=s0();if(kt!==e||et!==t){if(Hn){var i=e.memoizedUpdaters;0<i.size&&(Ql(e,et),i.clear()),ia(e,t)}Ic=null,hf=Ra()+p1,Di(e,t)}else rl=ea(e,t);e:do try{if(Et!==ls&&at!==null)t:switch(t=at,i=Rs,Et){case df:Et=ls,Rs=null,_i(e,t,i,df);break;case Qr:case Zr:if(xy(i)){Et=ls,Rs=null,r0(t);break}t=function(){Et!==Qr&&Et!==Zr||kt!==e||(Et=ff),On(e)},i.then(t,t);break e;case Hc:Et=ff;break e;case d1:Et=cb;break e;case ff:xy(i)?(Et=ls,Rs=null,r0(t)):(Et=ls,Rs=null,_i(e,t,i,ff));break;case cb:var m=null;switch(at.tag){case 26:m=at.memoizedState;case 5:case 27:var h=at;if(m?K0(m):h.stateNode.complete){Et=ls,Rs=null;var v=h.sibling;if(v!==null)at=v;else{var D=h.return;D!==null?(at=D,bd(D)):at=null}break t}break;default:console.error("Unexpected type of fiber triggered a suspensey commit. This is a bug in React.")}Et=ls,Rs=null,_i(e,t,i,cb);break;case $c:Et=ls,Rs=null,_i(e,t,i,$c);break;case ub:Cp(),Ft=uf;break e;default:throw Error("Unexpected SuspendedReason. This is a bug in React.")}Q.actQueue!==null?n0():TE();break}catch(M){e0(e,M)}while(!0);return Vu(),Q.H=s,Q.A=r,bt=a,at!==null?xo:(kt=null,et=0,Cu(),Ft)}function TE(){for(;at!==null&&!jD();)o0(at)}function o0(e){var t=e.alternate;(e.mode&Ke)!==Ye?(Rm(e),t=ye(e,Np,t,e,Gn),km(e)):t=ye(e,Np,t,e,Gn),e.memoizedProps=e.pendingProps,t===null?bd(e):at=t}function r0(e){var t=ye(e,OE,e);e.memoizedProps=e.pendingProps,t===null?bd(e):at=t}function OE(e){var t=e.alternate,a=(e.mode&Ke)!==Ye;switch(a&&Rm(e),e.tag){case 15:case 0:t=gx(t,e,e.pendingProps,e.type,void 0,et);break;case 11:t=gx(t,e,e.pendingProps,e.type.render,e.ref,et);break;case 5:Bm(e);default:Ex(t,e),e=at=oy(e,Gn),t=Np(t,e,Gn)}return a&&km(e),t}function _i(e,t,a,s){Vu(),Bm(t),Ji=null,jc=0;var r=t.return;try{if(gE(e,r,t,a,et)){Ft=Lc,rd(e,hs(a,e.current)),at=null;return}}catch(i){if(r!==null)throw at=r,i;Ft=Lc,rd(e,hs(a,e.current)),at=null;return}t.flags&32768?(ut||s===df?e=!0:rl||(et&536870912)!==0?e=!1:(sr=e=!0,(s===Qr||s===Zr||s===Hc||s===$c)&&(s=Es.current,s!==null&&s.tag===13&&(s.flags|=16384))),i0(t,e)):bd(t)}function bd(e){var t=e;do{if((t.flags&32768)!==0){i0(t,sr);return}var a=t.alternate;if(e=t.return,Rm(t),a=ye(t,vE,a,t,Gn),(t.mode&Ke)!==Ye&&py(t),a!==null){at=a;return}if(t=t.sibling,t!==null){at=t;return}at=t=e}while(t!==null);Ft===xo&&(Ft=u1)}function i0(e,t){do{var a=NE(e.alternate,e);if(a!==null){a.flags&=32767,at=a;return}if((e.mode&Ke)!==Ye){py(e),a=e.actualDuration;for(var s=e.child;s!==null;)a+=s.actualDuration,s=s.sibling;e.actualDuration=a}if(a=e.return,a!==null&&(a.flags|=32768,a.subtreeFlags=0,a.deletions=null),!t&&(e=e.sibling,e!==null)){at=e;return}at=e=a}while(e!==null);Ft=uf,at=null}function Tp(e,t,a,s,r,i,m,h,v,D,M,L,j,q){e.cancelPendingCommit=null;do Xl();while(ha!==ir);if(ln.flushLegacyContextWarning(),ln.flushPendingUnsafeLifecycleWarnings(),(bt&(Na|_s))!==Ca)throw Error("Should not already be working.");if(an(a),D===Xr?fm(j,q,a,Jt):s!==null?nE(j,q,a,s,t!==null&&t.alternate!==null&&t.alternate.memoizedState.isDehydrated&&(t.flags&256)!==0,Jt):sE(j,q,a,Jt),t!==null){if(a===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(i=t.lanes|t.childLanes,i|=Hh,Ht(e,a,i,m,h,v),e===kt&&(at=kt=null,et=0),il=t,lr=e,dn=a,hb=i,gb=r,v1=s,bb=q,N1=L,fn=bf,S1=null,t.actualDuration!==0||(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,LE(Ti,function(){return Xc=window.event,fn===bf&&(fn=pb),f0(),null})):(e.callbackNode=null,e.callbackPriority=0),fo=null,Jo=ua(),L!==null&&oE(q,Jo,L,Jt),s=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||s){s=Q.T,Q.T=null,r=St.p,St.p=Vs,m=bt,bt|=_s;try{RE(e,t,a)}finally{bt=m,St.p=r,Q.T=s}}ha=b1,l0(),c0(),u0()}}function l0(){if(ha===b1){ha=ir;var e=lr,t=il,a=dn,s=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||s){s=Q.T,Q.T=null;var r=St.p;St.p=Vs;var i=bt;bt|=_s;try{nl=a,ol=e,Hu(),Hx(t,e),ol=nl=null,a=kb;var m=Qg(e.containerInfo),h=a.focusedElem,v=a.selectionRange;if(m!==h&&h&&h.ownerDocument&&Xg(h.ownerDocument.documentElement,h)){if(v!==null&&cm(h)){var D=v.start,M=v.end;if(M===void 0&&(M=D),"selectionStart"in h)h.selectionStart=D,h.selectionEnd=Math.min(M,h.value.length);else{var L=h.ownerDocument||document,j=L&&L.defaultView||window;if(j.getSelection){var q=j.getSelection(),ge=h.textContent.length,Se=Math.min(v.start,ge),Ot=v.end===void 0?Se:Math.min(v.end,ge);!q.extend&&Se>Ot&&(m=Ot,Ot=Se,Se=m);var pt=Fg(h,Se),U=Fg(h,Ot);if(pt&&U&&(q.rangeCount!==1||q.anchorNode!==pt.node||q.anchorOffset!==pt.offset||q.focusNode!==U.node||q.focusOffset!==U.offset)){var T=L.createRange();T.setStart(pt.node,pt.offset),q.removeAllRanges(),Se>Ot?(q.addRange(T),q.extend(U.node,U.offset)):(T.setEnd(U.node,U.offset),q.addRange(T))}}}}for(L=[],q=h;q=q.parentNode;)q.nodeType===1&&L.push({element:q,left:q.scrollLeft,top:q.scrollTop});for(typeof h.focus=="function"&&h.focus(),h=0;h<L.length;h++){var V=L[h];V.element.scrollLeft=V.left,V.element.scrollTop=V.top}}Tf=!!Rb,kb=Rb=null}finally{bt=i,St.p=r,Q.T=s}}e.current=t,ha=g1}}function c0(){if(ha===g1){ha=ir;var e=S1;if(e!==null){Jo=ua();var t=uo,a=Jo;!Mt||a<=t||console.timeStamp(e,t,a,ht,mt,"secondary-light")}e=lr,t=il,a=dn;var s=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||s){s=Q.T,Q.T=null;var r=St.p;St.p=Vs;var i=bt;bt|=_s;try{nl=a,ol=e,Hu(),Ax(e,t.alternate,t),ol=nl=null}finally{bt=i,St.p=r,Q.T=s}}e=bb,t=N1,uo=ua(),e=t===null?e:Jo,t=uo,a=fn===mb,s=Jt,fo!==null?ey(e,t,fo,!1,s):!Mt||t<=e||(s?s.run(console.timeStamp.bind(console,a?"Commit Interrupted View Transition":"Commit",e,t,ht,mt,a?"error":"secondary-dark")):console.timeStamp(a?"Commit Interrupted View Transition":"Commit",e,t,ht,mt,a?"error":"secondary-dark")),ha=y1}}function u0(){if(ha===x1||ha===y1){if(ha===x1){var e=uo;uo=ua();var t=uo,a=fn===mb;!Mt||t<=e||console.timeStamp(a?"Interrupted View Transition":"Starting Animation",e,t,ht,mt,a?" error":"secondary-light"),fn!==mb&&(fn=h1)}ha=ir,TD(),e=lr;var s=il;t=dn,a=v1;var r=s.actualDuration!==0||(s.subtreeFlags&10256)!==0||(s.flags&10256)!==0;r?ha=gf:(ha=ir,il=lr=null,d0(e,e.pendingLanes),Kr=0,qc=null);var i=e.pendingLanes;if(i===0&&(rr=null),r||b0(e),i=fs(t),s=s.stateNode,$a&&typeof $a.onCommitFiberRoot=="function")try{var m=(s.current.flags&128)===128;switch(i){case Vs:var h=gh;break;case $n:h=yh;break;case oo:h=Ti;break;case Ad:h=xh;break;default:h=Ti}$a.onCommitFiberRoot(Oi,s,h,m)}catch(L){Ln||(Ln=!0,console.error("React instrumentation encountered an error: %o",L))}if(Hn&&e.memoizedUpdaters.clear(),UE(),a!==null){m=Q.T,h=St.p,St.p=Vs,Q.T=null;try{var v=e.onRecoverableError;for(s=0;s<a.length;s++){var D=a[s],M=AE(D.stack);ye(D.source,v,D.value,M)}}finally{Q.T=m,St.p=h}}(dn&3)!==0&&Xl(),On(e),i=e.pendingLanes,(t&261930)!==0&&(i&42)!==0?(Kd=!0,e===yb?Yc++:(Yc=0,yb=e)):Yc=0,r||Ar(t,uo),Zl(0)}}function AE(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 d0(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Tl(t)))}function Xl(){return l0(),c0(),u0(),f0()}function f0(){if(ha!==gf)return!1;var e=lr,t=hb;hb=0;var a=fs(dn),s=oo>a?oo:a;a=Q.T;var r=St.p;try{St.p=s,Q.T=null;var i=gb;gb=null,s=lr;var m=dn;if(ha=ir,il=lr=null,dn=0,(bt&(Na|_s))!==Ca)throw Error("Cannot flush passive effects while already rendering.");an(m),xb=!0,yf=!1;var h=0;if(fo=null,h=Ra(),fn===h1)mm(uo,h,q_);else{var v=uo,D=h,M=fn===pb;!Mt||D<=v||(Jt?Jt.run(console.timeStamp.bind(console,M?"Waiting for Paint":"Waiting",v,D,ht,mt,"secondary-light")):console.timeStamp(M?"Waiting for Paint":"Waiting",v,D,ht,mt,"secondary-light"))}v=bt,bt|=_s;var L=s.current;Hu(),Fx(L);var j=s.current;L=bb,Hu(),Yx(s,j,m,i,L),b0(s),bt=v;var q=Ra();if(j=h,L=Jt,fo!==null?ey(j,q,fo,!0,L):!Mt||q<=j||(L?L.run(console.timeStamp.bind(console,"Remaining Effects",j,q,ht,mt,"secondary-dark")):console.timeStamp("Remaining Effects",j,q,ht,mt,"secondary-dark")),Ar(m,q),Zl(0,!1),yf?s===qc?Kr++:(Kr=0,qc=s):Kr=0,yf=xb=!1,$a&&typeof $a.onPostCommitFiberRoot=="function")try{$a.onPostCommitFiberRoot(Oi,s)}catch(Se){Ln||(Ln=!0,console.error("React instrumentation encountered an error: %o",Se))}var ge=s.current.stateNode;return ge.effectDuration=0,ge.passiveEffectDuration=0,!0}finally{St.p=r,Q.T=a,d0(e,t)}}function m0(e,t,a){t=hs(a,t),hy(t),t=up(e.stateNode,t,2),e=Vo(e,t,2),e!==null&&(tt(e,2),On(e))}function Nt(e,t,a){if(ll=!1,e.tag===3)m0(e,e,a);else{for(;t!==null;){if(t.tag===3){m0(t,e,a);return}if(t.tag===1){var s=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof s.componentDidCatch=="function"&&(rr===null||!rr.has(s))){e=hs(a,e),hy(e),a=dp(2),s=Vo(t,a,2),s!==null&&(fp(a,s,t,e),tt(s,2),On(s));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.
159
+
160
+ Error message:
161
+
162
+ %s`,a)}}function Op(e,t,a){var s=e.pingCache;if(s===null){s=e.pingCache=new W_;var r=new Set;s.set(t,r)}else r=s.get(t),r===void 0&&(r=new Set,s.set(t,r));r.has(a)||(db=!0,r.add(a),s=VE.bind(null,e,t,a),Hn&&Ql(e,a),t.then(s,s))}function VE(e,t,a){var s=e.pingCache;s!==null&&s.delete(t),e.pingedLanes|=e.suspendedLanes&a,e.warmLanes&=~a,(a&127)!==0?0>Yn&&(Hr=Yn=ua(),xc=Pd("Promise Resolved"),Ko=Fd):(a&4194048)!==0&&0>Is&&(mo=Is=ua(),Nc=Pd("Promise Resolved"),Ph=Fd),Zx()&&Q.actQueue===null&&console.error(`A suspended resource finished loading inside a test, but the event was not wrapped in act(...).
163
+
164
+ When testing, code that resolves suspended data should be wrapped into act(...):
165
+
166
+ act(() => {
167
+ /* finish loading suspended data */
168
+ });
169
+ /* assert on the output */
170
+
171
+ 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`),kt===e&&(et&a)===a&&(Ft===ar||Ft===cf&&(et&62914560)===et&&Ra()-pf<m1?(bt&Na)===Ca&&Di(e,0):fb|=a,Jr===et&&(Jr=0)),On(e)}function p0(e,t){t===0&&(t=_e()),e=Ha(e,t),e!==null&&(tt(e,t),On(e))}function ME(e){var t=e.memoizedState,a=0;t!==null&&(a=t.retryLane),p0(e,a)}function zE(e,t){var a=0;switch(e.tag){case 31:case 13:var s=e.stateNode,r=e.memoizedState;r!==null&&(a=r.retryLane);break;case 19:s=e.stateNode;break;case 22:s=e.stateNode._retryCache;break;default:throw Error("Pinged unknown suspense boundary type. This is probably a bug in React.")}s!==null&&s.delete(t),p0(e,a)}function Ap(e,t,a){if((t.subtreeFlags&67117056)!==0)for(t=t.child;t!==null;){var s=e,r=t,i=r.type===kd;i=a||i,r.tag!==22?r.flags&67108864?i&&ye(r,h0,s,r):Ap(s,r,i):r.memoizedState===null&&(i&&r.flags&8192?ye(r,h0,s,r):r.subtreeFlags&67108864&&ye(r,Ap,s,r,i)),t=t.sibling}}function h0(e,t){Ee(!0);try{Bx(t),Xx(t),Ix(e,t.alternate,t,!1),qx(e,t,0,null,!1,0)}finally{Ee(!1)}}function b0(e){var t=!0;e.current.mode&(Ba|rn)||(t=!1),Ap(e,e.current,t)}function g0(e){if((bt&Na)===Ca){var t=e.tag;if(t===3||t===1||t===0||t===11||t===14||t===15){if(t=I(e)||"ReactComponent",xf!==null){if(xf.has(t))return;xf.add(t)}else xf=new Set([t]);ye(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 Ql(e,t){Hn&&e.memoizedUpdaters.forEach(function(a){ja(e,a,t)})}function LE(e,t){var a=Q.actQueue;return a!==null?(a.push(t),aR):bh(e,t)}function HE(e){Zx()&&Q.actQueue===null&&ye(e,function(){console.error(`An update to %s inside a test was not wrapped in act(...).
172
+
173
+ When testing, code that causes React state updates should be wrapped into act(...):
174
+
175
+ act(() => {
176
+ /* fire events that update state */
177
+ });
178
+ /* assert on the output */
179
+
180
+ 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`,I(e))})}function On(e){e!==cl&&e.next===null&&(cl===null?vf=cl=e:cl=cl.next=e),Nf=!0,Q.actQueue!==null?Nb||(Nb=!0,N0()):vb||(vb=!0,N0())}function Zl(e,t){if(!Sb&&Nf){Sb=!0;do for(var a=!1,s=vf;s!==null;){if(e!==0){var r=s.pendingLanes;if(r===0)var i=0;else{var m=s.suspendedLanes,h=s.pingedLanes;i=(1<<31-Fa(42|e)+1)-1,i&=r&~(m&~h),i=i&201326741?i&201326741|1:i?i|2:0}i!==0&&(a=!0,v0(s,i))}else i=et,i=Wt(s,s===kt?i:0,s.cancelPendingCommit!==null||s.timeoutHandle!==ai),(i&3)===0||ea(s,i)||(a=!0,v0(s,i));s=s.next}while(a);Sb=!1}}function $E(){Xc=window.event,Vp()}function Vp(){Nf=Nb=vb=!1;var e=0;cr!==0&&FE()&&(e=cr);for(var t=Ra(),a=null,s=vf;s!==null;){var r=s.next,i=y0(s,t);i===0?(s.next=null,a===null?vf=r:a.next=r,r===null&&(cl=a)):(a=s,(e!==0||(i&3)!==0)&&(Nf=!0)),s=r}ha!==ir&&ha!==gf||Zl(e),cr!==0&&(cr=0)}function y0(e,t){for(var a=e.suspendedLanes,s=e.pingedLanes,r=e.expirationTimes,i=e.pendingLanes&-62914561;0<i;){var m=31-Fa(i),h=1<<m,v=r[m];v===-1?((h&a)===0||(h&s)!==0)&&(r[m]=Sa(h,t)):v<=t&&(e.expiredLanes|=h),i&=~h}if(t=kt,a=et,a=Wt(e,e===t?a:0,e.cancelPendingCommit!==null||e.timeoutHandle!==ai),s=e.callbackNode,a===0||e===t&&(Et===Qr||Et===Zr)||e.cancelPendingCommit!==null)return s!==null&&Mp(s),e.callbackNode=null,e.callbackPriority=0;if((a&3)===0||ea(e,a)){if(t=a&-a,t!==e.callbackPriority||Q.actQueue!==null&&s!==wb)Mp(s);else return t;switch(fs(a)){case Vs:case $n:a=yh;break;case oo:a=Ti;break;case Ad:a=xh;break;default:a=Ti}return s=x0.bind(null,e),Q.actQueue!==null?(Q.actQueue.push(s),a=wb):a=bh(a,s),e.callbackPriority=t,e.callbackNode=a,t}return s!==null&&Mp(s),e.callbackPriority=2,e.callbackNode=null,2}function x0(e,t){if(Kd=Jd=!1,Xc=window.event,ha!==ir&&ha!==gf)return e.callbackNode=null,e.callbackPriority=0,null;var a=e.callbackNode;if(fn===bf&&(fn=pb),Xl()&&e.callbackNode!==a)return null;var s=et;return s=Wt(e,e===kt?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==ai),s===0?null:(Kx(e,s,t),y0(e,Ra()),e.callbackNode!=null&&e.callbackNode===a?x0.bind(null,e):null)}function v0(e,t){if(Xl())return null;Jd=Kd,Kd=!1,Kx(e,t,!0)}function Mp(e){e!==wb&&e!==null&&CD(e)}function N0(){Q.actQueue!==null&&Q.actQueue.push(function(){return Vp(),null}),fR(function(){(bt&(Na|_s))!==Ca?bh(gh,$E):Vp()})}function zp(){if(cr===0){var e=Ir;e===0&&(e=jd,jd<<=1,(jd&261888)===0&&(jd=256)),cr=e}return cr}function S0(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:(Xe(e,"action"),kl(""+e))}function w0(e,t){var a=t.ownerDocument.createElement("input");return a.name=t.name,a.value=t.value,e.id&&a.setAttribute("form",e.id),t.parentNode.insertBefore(a,t),e=new FormData(e),a.parentNode.removeChild(a),e}function BE(e,t,a,s,r){if(t==="submit"&&a&&a.stateNode===r){var i=S0((r[Xa]||null).action),m=s.submitter;m&&(t=(t=m[Xa]||null)?S0(t.formAction):m.getAttribute("formAction"),t!==null&&(i=t,m=null));var h=new Hd("action","action",null,s,r);e.push({event:h,listeners:[{instance:null,listener:function(){if(s.defaultPrevented){if(cr!==0){var v=m?w0(r,m):new FormData(r),D={pending:!0,data:v,method:r.method,action:i};Object.freeze(D),sp(a,D,null,v)}}else typeof i=="function"&&(h.preventDefault(),v=m?w0(r,m):new FormData(r),D={pending:!0,data:v,method:r.method,action:i},Object.freeze(D),sp(a,D,i,v))},currentTarget:r}]})}}function gd(e,t,a){e.currentTarget=a;try{t(e)}catch(s){Vh(s)}e.currentTarget=null}function E0(e,t){t=(t&4)!==0;for(var a=0;a<e.length;a++){var s=e[a];e:{var r=void 0,i=s.event;if(s=s.listeners,t)for(var m=s.length-1;0<=m;m--){var h=s[m],v=h.instance,D=h.currentTarget;if(h=h.listener,v!==r&&i.isPropagationStopped())break e;v!==null?ye(v,gd,i,h,D):gd(i,h,D),r=v}else for(m=0;m<s.length;m++){if(h=s[m],v=h.instance,D=h.currentTarget,h=h.listener,v!==r&&i.isPropagationStopped())break e;v!==null?ye(v,gd,i,h,D):gd(i,h,D),r=v}}}}function ft(e,t){Eb.has(e)||console.error('Did not expect a listenToNonDelegatedEvent() call for "%s". This is a bug in React. Please file an issue.',e);var a=t[vh];a===void 0&&(a=t[vh]=new Set);var s=e+"__bubble";a.has(s)||(D0(t,e,2,!1),a.add(s))}function Lp(e,t,a){Eb.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 s=0;t&&(s|=4),D0(a,e,s,t)}function Hp(e){if(!e[Sf]){e[Sf]=!0,Nv.forEach(function(a){a!=="selectionchange"&&(Eb.has(a)||Lp(a,!1,e),Lp(a,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Sf]||(t[Sf]=!0,Lp("selectionchange",!1,t))}}function D0(e,t,a,s){switch(nv(t)){case Vs:var r=ND;break;case $n:r=SD;break;default:r=th}a=r.bind(null,t,a,e),r=void 0,!Dh||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(r=!0),s?r!==void 0?e.addEventListener(t,a,{capture:!0,passive:r}):e.addEventListener(t,a,!0):r!==void 0?e.addEventListener(t,a,{passive:r}):e.addEventListener(t,a,!1)}function $p(e,t,a,s,r){var i=s;if((t&1)===0&&(t&2)===0&&s!==null)e:for(;;){if(s===null)return;var m=s.tag;if(m===3||m===4){var h=s.stateNode.containerInfo;if(h===r)break;if(m===4)for(m=s.return;m!==null;){var v=m.tag;if((v===3||v===4)&&m.stateNode.containerInfo===r)return;m=m.return}for(;h!==null;){if(m=O(h),m===null)return;if(v=m.tag,v===5||v===6||v===26||v===27){s=i=m;continue e}h=h.parentNode}}s=s.return}Mg(function(){var D=i,M=im(a),L=[];e:{var j=nN.get(e);if(j!==void 0){var q=Hd,ge=e;switch(e){case"keypress":if(Du(a)===0)break e;case"keydown":case"keyup":q=g_;break;case"focusin":ge="focus",q=Uh;break;case"focusout":ge="blur",q=Uh;break;case"beforeblur":case"afterblur":q=Uh;break;case"click":if(a.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":q=qv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":q=o_;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":q=v_;break;case eN:case tN:case aN:q=l_;break;case sN:q=S_;break;case"scroll":case"scrollend":q=s_;break;case"wheel":q=E_;break;case"copy":case"cut":case"paste":q=u_;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":q=Pv;break;case"toggle":case"beforetoggle":q=__}var Se=(t&4)!==0,Ot=!Se&&(e==="scroll"||e==="scrollend"),pt=Se?j!==null?j+"Capture":null:j;Se=[];for(var U=D,T;U!==null;){var V=U;if(T=V.stateNode,V=V.tag,V!==5&&V!==26&&V!==27||T===null||pt===null||(V=Ul(U,pt),V!=null&&Se.push(Jl(U,V,T))),Ot)break;U=U.return}0<Se.length&&(j=new q(j,ge,null,a,M),L.push({event:j,listeners:Se}))}}if((t&7)===0){e:{if(j=e==="mouseover"||e==="pointerover",q=e==="mouseout"||e==="pointerout",j&&a!==lc&&(ge=a.relatedTarget||a.fromElement)&&(O(ge)||ge[Go]))break e;if((q||j)&&(j=M.window===M?M:(j=M.ownerDocument)?j.defaultView||j.parentWindow:window,q?(ge=a.relatedTarget||a.toElement,q=D,ge=ge?O(ge):null,ge!==null&&(Ot=Y(ge),Se=ge.tag,ge!==Ot||Se!==5&&Se!==27&&Se!==6)&&(ge=null)):(q=null,ge=D),q!==ge)){if(Se=qv,V="onMouseLeave",pt="onMouseEnter",U="mouse",(e==="pointerout"||e==="pointerover")&&(Se=Pv,V="onPointerLeave",pt="onPointerEnter",U="pointer"),Ot=q==null?j:oe(q),T=ge==null?j:oe(ge),j=new Se(V,U+"leave",q,a,M),j.target=Ot,j.relatedTarget=T,V=null,O(M)===D&&(Se=new Se(pt,U+"enter",ge,a,M),Se.target=T,Se.relatedTarget=Ot,V=Se),Ot=V,q&&ge)t:{for(Se=IE,pt=q,U=ge,T=0,V=pt;V;V=Se(V))T++;V=0;for(var W=U;W;W=Se(W))V++;for(;0<T-V;)pt=Se(pt),T--;for(;0<V-T;)U=Se(U),V--;for(;T--;){if(pt===U||U!==null&&pt===U.alternate){Se=pt;break t}pt=Se(pt),U=Se(U)}Se=null}else Se=null;q!==null&&_0(L,j,q,Se,!1),ge!==null&&Ot!==null&&_0(L,Ot,ge,Se,!0)}}e:{if(j=D?oe(D):window,q=j.nodeName&&j.nodeName.toLowerCase(),q==="select"||q==="input"&&j.type==="file")var xe=Yg;else if(Bg(j))if(Kv)xe=eE;else{xe=Kw;var Ge=Jw}else q=j.nodeName,!q||q.toLowerCase()!=="input"||j.type!=="checkbox"&&j.type!=="radio"?D&&Rl(D.elementType)&&(xe=Yg):xe=Ww;if(xe&&(xe=xe(e,D))){Ig(L,xe,a,M);break e}Ge&&Ge(e,j,D),e==="focusout"&&D&&j.type==="number"&&D.memoizedProps.value!=null&&Le(j,"number",j.value)}switch(Ge=D?oe(D):window,e){case"focusin":(Bg(Ge)||Ge.contentEditable==="true")&&($i=Ge,jh=D,hc=null);break;case"focusout":hc=jh=$i=null;break;case"mousedown":Th=!0;break;case"contextmenu":case"mouseup":case"dragend":Th=!1,Zg(L,a,M);break;case"selectionchange":if(C_)break;case"keydown":case"keyup":Zg(L,a,M)}var Ve;if(Ch)e:{switch(e){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else Hi?Hg(e,a)&&(Ce="onCompositionEnd"):e==="keydown"&&a.keyCode===Fv&&(Ce="onCompositionStart");Ce&&(Xv&&a.locale!=="ko"&&(Hi||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&Hi&&(Ve=zg()):(Po=M,_h="value"in Po?Po.value:Po.textContent,Hi=!0)),Ge=yd(D,Ce),0<Ge.length&&(Ce=new Gv(Ce,e,null,a,M),L.push({event:Ce,listeners:Ge}),Ve?Ce.data=Ve:(Ve=$g(a),Ve!==null&&(Ce.data=Ve)))),(Ve=k_?Fw(e,a):Xw(e,a))&&(Ce=yd(D,"onBeforeInput"),0<Ce.length&&(Ge=new f_("onBeforeInput","beforeinput",null,a,M),L.push({event:Ge,listeners:Ce}),Ge.data=Ve)),BE(L,e,D,a,M)}E0(L,t)})}function Jl(e,t,a){return{instance:e,listener:t,currentTarget:a}}function yd(e,t){for(var a=t+"Capture",s=[];e!==null;){var r=e,i=r.stateNode;if(r=r.tag,r!==5&&r!==26&&r!==27||i===null||(r=Ul(e,a),r!=null&&s.unshift(Jl(e,r,i)),r=Ul(e,t),r!=null&&s.push(Jl(e,r,i))),e.tag===3)return s;e=e.return}return[]}function IE(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function _0(e,t,a,s,r){for(var i=t._reactName,m=[];a!==null&&a!==s;){var h=a,v=h.alternate,D=h.stateNode;if(h=h.tag,v!==null&&v===s)break;h!==5&&h!==26&&h!==27||D===null||(v=D,r?(D=Ul(a,i),D!=null&&m.unshift(Jl(a,D,v))):r||(D=Ul(a,i),D!=null&&m.push(Jl(a,D,v)))),a=a.return}m.length!==0&&e.push({event:t,listeners:m})}function Bp(e,t){Yw(e,t),e!=="input"&&e!=="textarea"&&e!=="select"||t==null||t.value!==null||Iv||(Iv=!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 a={registrationNameDependencies:Vr,possibleRegistrationNames:Nh};Rl(e)||typeof t.is=="string"||Gw(e,t,a),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 _a(e,t,a,s){t!==a&&(a=$o(a),$o(t)!==a&&(s[e]=t))}function YE(e,t,a){t.forEach(function(s){a[U0(s)]=s==="style"?Yp(e):e.getAttribute(s)})}function An(e,t){t===!1?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 R0(e,t){return e=e.namespaceURI===Md||e.namespaceURI===Vi?e.ownerDocument.createElementNS(e.namespaceURI,e.tagName):e.ownerDocument.createElement(e.tagName),e.innerHTML=t,e.innerHTML}function $o(e){return jt(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.",ct(e)),qt(e)),(typeof e=="string"?e:""+e).replace(sR,`
181
+ `).replace(nR,"")}function k0(e,t){return t=$o(t),$o(e)===t}function _t(e,t,a,s,r,i){switch(a){case"children":typeof s=="string"?(Eu(s,t,!1),t==="body"||t==="textarea"&&s===""||_l(e,s)):(typeof s=="number"||typeof s=="bigint")&&(Eu(""+s,t,!1),t!=="body"&&_l(e,""+s));break;case"className":Ro(e,"class",s);break;case"tabIndex":Ro(e,"tabindex",s);break;case"dir":case"role":case"viewBox":case"width":case"height":Ro(e,a,s);break;case"style":Og(e,s,i);break;case"data":if(t!=="object"){Ro(e,"data",s);break}case"src":case"href":if(s===""&&(t!=="a"||a!=="href")){console.error(a==="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.',a,a),e.removeAttribute(a);break}if(s==null||typeof s=="function"||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}Xe(s,a),s=kl(""+s),e.setAttribute(a,s);break;case"action":case"formAction":if(s!=null&&(t==="form"?a==="formAction"?console.error("You can only pass the formAction prop to <input> or <button>. Use the action prop on <form>."):typeof s=="function"&&(r.encType==null&&r.method==null||Df||(Df=!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.")),r.target==null||Ef||(Ef=!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"?a==="action"?console.error("You can only pass the action prop to <form>. Use the formAction prop on <input> or <button>."):t!=="input"||r.type==="submit"||r.type==="image"||wf?t!=="button"||r.type==null||r.type==="submit"||wf?typeof s=="function"&&(r.name==null||R1||(R1=!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.')),r.formEncType==null&&r.formMethod==null||Df||(Df=!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.")),r.formTarget==null||Ef||(Ef=!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."))):(wf=!0,console.error('A button can only specify a formAction along with type="submit" or no type.')):(wf=!0,console.error('An input can only specify a formAction along with type="submit" or type="image".')):console.error(a==="action"?"You can only pass the action prop to <form>.":"You can only pass the formAction prop to <input> or <button>.")),typeof s=="function"){e.setAttribute(a,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof i=="function"&&(a==="formAction"?(t!=="input"&&_t(e,t,"name",r.name,r,null),_t(e,t,"formEncType",r.formEncType,r,null),_t(e,t,"formMethod",r.formMethod,r,null),_t(e,t,"formTarget",r.formTarget,r,null)):(_t(e,t,"encType",r.encType,r,null),_t(e,t,"method",r.method,r,null),_t(e,t,"target",r.target,r,null)));if(s==null||typeof s=="symbol"||typeof s=="boolean"){e.removeAttribute(a);break}Xe(s,a),s=kl(""+s),e.setAttribute(a,s);break;case"onClick":s!=null&&(typeof s!="function"&&An(a,s),e.onclick=Zn);break;case"onScroll":s!=null&&(typeof s!="function"&&An(a,s),ft("scroll",e));break;case"onScrollEnd":s!=null&&(typeof s!="function"&&An(a,s),ft("scrollend",e));break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=s.__html,a!=null){if(r.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=a}}break;case"multiple":e.multiple=s&&typeof s!="function"&&typeof s!="symbol";break;case"muted":e.muted=s&&typeof s!="function"&&typeof s!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(s==null||typeof s=="function"||typeof s=="boolean"||typeof s=="symbol"){e.removeAttribute("xlink:href");break}Xe(s,a),a=kl(""+s),e.setAttributeNS(Wr,"xlink:href",a);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":s!=null&&typeof s!="function"&&typeof s!="symbol"?(Xe(s,a),e.setAttribute(a,""+s)):e.removeAttribute(a);break;case"inert":s!==""||_f[a]||(_f[a]=!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.",a));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":s&&typeof s!="function"&&typeof s!="symbol"?e.setAttribute(a,""):e.removeAttribute(a);break;case"capture":case"download":s===!0?e.setAttribute(a,""):s!==!1&&s!=null&&typeof s!="function"&&typeof s!="symbol"?(Xe(s,a),e.setAttribute(a,s)):e.removeAttribute(a);break;case"cols":case"rows":case"size":case"span":s!=null&&typeof s!="function"&&typeof s!="symbol"&&!isNaN(s)&&1<=s?(Xe(s,a),e.setAttribute(a,s)):e.removeAttribute(a);break;case"rowSpan":case"start":s==null||typeof s=="function"||typeof s=="symbol"||isNaN(s)?e.removeAttribute(a):(Xe(s,a),e.setAttribute(a,s));break;case"popover":ft("beforetoggle",e),ft("toggle",e),Ts(e,"popover",s);break;case"xlinkActuate":ms(e,Wr,"xlink:actuate",s);break;case"xlinkArcrole":ms(e,Wr,"xlink:arcrole",s);break;case"xlinkRole":ms(e,Wr,"xlink:role",s);break;case"xlinkShow":ms(e,Wr,"xlink:show",s);break;case"xlinkTitle":ms(e,Wr,"xlink:title",s);break;case"xlinkType":ms(e,Wr,"xlink:type",s);break;case"xmlBase":ms(e,Db,"xml:base",s);break;case"xmlLang":ms(e,Db,"xml:lang",s);break;case"xmlSpace":ms(e,Db,"xml:space",s);break;case"is":i!=null&&console.error('Cannot update the "is" prop after it has been initialized.'),Ts(e,"is",s);break;case"innerText":case"textContent":break;case"popoverTarget":k1||s==null||typeof s!="object"||(k1=!0,console.error("The `popoverTarget` prop expects the ID of an Element as a string. Received %s instead.",s));default:!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N"?(a=Ag(a),Ts(e,a,s)):Vr.hasOwnProperty(a)&&s!=null&&typeof s!="function"&&An(a,s)}}function Ip(e,t,a,s,r,i){switch(a){case"style":Og(e,s,i);break;case"dangerouslySetInnerHTML":if(s!=null){if(typeof s!="object"||!("__html"in s))throw Error("`props.dangerouslySetInnerHTML` must be in the form `{__html: ...}`. Please visit https://react.dev/link/dangerously-set-inner-html for more information.");if(a=s.__html,a!=null){if(r.children!=null)throw Error("Can only set one of `children` or `props.dangerouslySetInnerHTML`.");e.innerHTML=a}}break;case"children":typeof s=="string"?_l(e,s):(typeof s=="number"||typeof s=="bigint")&&_l(e,""+s);break;case"onScroll":s!=null&&(typeof s!="function"&&An(a,s),ft("scroll",e));break;case"onScrollEnd":s!=null&&(typeof s!="function"&&An(a,s),ft("scrollend",e));break;case"onClick":s!=null&&(typeof s!="function"&&An(a,s),e.onclick=Zn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(Vr.hasOwnProperty(a))s!=null&&typeof s!="function"&&An(a,s);else e:{if(a[0]==="o"&&a[1]==="n"&&(r=a.endsWith("Capture"),t=a.slice(2,r?a.length-7:void 0),i=e[Xa]||null,i=i!=null?i[a]:null,typeof i=="function"&&e.removeEventListener(t,i,r),typeof s=="function")){typeof i!="function"&&i!==null&&(a in e?e[a]=null:e.hasAttribute(a)&&e.removeAttribute(a)),e.addEventListener(t,s,r);break e}a in e?e[a]=s:s===!0?e.setAttribute(a,""):Ts(e,a,s)}}}function Aa(e,t,a){switch(Bp(t,a),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ft("error",e),ft("load",e);var s=!1,r=!1,i;for(i in a)if(a.hasOwnProperty(i)){var m=a[i];if(m!=null)switch(i){case"src":s=!0;break;case"srcSet":r=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:_t(e,t,i,m,a,null)}}r&&_t(e,t,"srcSet",a.srcSet,a,null),s&&_t(e,t,"src",a.src,a,null);return;case"input":Dt("input",a),ft("invalid",e);var h=i=m=r=null,v=null,D=null;for(s in a)if(a.hasOwnProperty(s)){var M=a[s];if(M!=null)switch(s){case"name":r=M;break;case"type":m=M;break;case"checked":v=M;break;case"defaultChecked":D=M;break;case"value":i=M;break;case"defaultValue":h=M;break;case"children":case"dangerouslySetInnerHTML":if(M!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:_t(e,t,s,M,a,null)}}Ae(e,a),He(e,i,h,v,D,m,r,!1);return;case"select":Dt("select",a),ft("invalid",e),s=m=i=null;for(r in a)if(a.hasOwnProperty(r)&&(h=a[r],h!=null))switch(r){case"value":i=h;break;case"defaultValue":m=h;break;case"multiple":s=h;default:_t(e,t,r,h,a,null)}At(e,a),t=i,a=m,e.multiple=!!s,t!=null?rt(e,!!s,t,!1):a!=null&&rt(e,!!s,a,!0);return;case"textarea":Dt("textarea",a),ft("invalid",e),i=r=s=null;for(m in a)if(a.hasOwnProperty(m)&&(h=a[m],h!=null))switch(m){case"value":s=h;break;case"defaultValue":r=h;break;case"children":i=h;break;case"dangerouslySetInnerHTML":if(h!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:_t(e,t,m,h,a,null)}aa(e,a),vt(e,s,r,i);return;case"option":Oe(e,a);for(v in a)a.hasOwnProperty(v)&&(s=a[v],s!=null)&&(v==="selected"?e.selected=s&&typeof s!="function"&&typeof s!="symbol":_t(e,t,v,s,a,null));return;case"dialog":ft("beforetoggle",e),ft("toggle",e),ft("cancel",e),ft("close",e);break;case"iframe":case"object":ft("load",e);break;case"video":case"audio":for(s=0;s<Gc.length;s++)ft(Gc[s],e);break;case"image":ft("error",e),ft("load",e);break;case"details":ft("toggle",e);break;case"embed":case"source":case"link":ft("error",e),ft("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(D in a)if(a.hasOwnProperty(D)&&(s=a[D],s!=null))switch(D){case"children":case"dangerouslySetInnerHTML":throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");default:_t(e,t,D,s,a,null)}return;default:if(Rl(t)){for(M in a)a.hasOwnProperty(M)&&(s=a[M],s!==void 0&&Ip(e,t,M,s,a,void 0));return}}for(h in a)a.hasOwnProperty(h)&&(s=a[h],s!=null&&_t(e,t,h,s,a,null))}function qE(e,t,a,s){switch(Bp(t,s),t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var r=null,i=null,m=null,h=null,v=null,D=null,M=null;for(q in a){var L=a[q];if(a.hasOwnProperty(q)&&L!=null)switch(q){case"checked":break;case"value":break;case"defaultValue":v=L;default:s.hasOwnProperty(q)||_t(e,t,q,null,s,L)}}for(var j in s){var q=s[j];if(L=a[j],s.hasOwnProperty(j)&&(q!=null||L!=null))switch(j){case"type":i=q;break;case"name":r=q;break;case"checked":D=q;break;case"defaultChecked":M=q;break;case"value":m=q;break;case"defaultValue":h=q;break;case"children":case"dangerouslySetInnerHTML":if(q!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:q!==L&&_t(e,t,j,q,s,L)}}t=a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null,s=s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null,t||!s||_1||(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"),_1=!0),!t||s||D1||(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"),D1=!0),Ue(e,m,h,v,D,M,i,r);return;case"select":q=m=h=j=null;for(i in a)if(v=a[i],a.hasOwnProperty(i)&&v!=null)switch(i){case"value":break;case"multiple":q=v;default:s.hasOwnProperty(i)||_t(e,t,i,null,s,v)}for(r in s)if(i=s[r],v=a[r],s.hasOwnProperty(r)&&(i!=null||v!=null))switch(r){case"value":j=i;break;case"defaultValue":h=i;break;case"multiple":m=i;default:i!==v&&_t(e,t,r,i,s,v)}s=h,t=m,a=q,j!=null?rt(e,!!t,j,!1):!!a!=!!t&&(s!=null?rt(e,!!t,s,!0):rt(e,!!t,t?[]:"",!1));return;case"textarea":q=j=null;for(h in a)if(r=a[h],a.hasOwnProperty(h)&&r!=null&&!s.hasOwnProperty(h))switch(h){case"value":break;case"children":break;default:_t(e,t,h,null,s,r)}for(m in s)if(r=s[m],i=a[m],s.hasOwnProperty(m)&&(r!=null||i!=null))switch(m){case"value":j=r;break;case"defaultValue":q=r;break;case"children":break;case"dangerouslySetInnerHTML":if(r!=null)throw Error("`dangerouslySetInnerHTML` does not make sense on <textarea>.");break;default:r!==i&&_t(e,t,m,r,s,i)}Ea(e,j,q);return;case"option":for(var ge in a)j=a[ge],a.hasOwnProperty(ge)&&j!=null&&!s.hasOwnProperty(ge)&&(ge==="selected"?e.selected=!1:_t(e,t,ge,null,s,j));for(v in s)j=s[v],q=a[v],s.hasOwnProperty(v)&&j!==q&&(j!=null||q!=null)&&(v==="selected"?e.selected=j&&typeof j!="function"&&typeof j!="symbol":_t(e,t,v,j,s,q));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 Se in a)j=a[Se],a.hasOwnProperty(Se)&&j!=null&&!s.hasOwnProperty(Se)&&_t(e,t,Se,null,s,j);for(D in s)if(j=s[D],q=a[D],s.hasOwnProperty(D)&&j!==q&&(j!=null||q!=null))switch(D){case"children":case"dangerouslySetInnerHTML":if(j!=null)throw Error(t+" is a void element tag and must neither have `children` nor use `dangerouslySetInnerHTML`.");break;default:_t(e,t,D,j,s,q)}return;default:if(Rl(t)){for(var Ot in a)j=a[Ot],a.hasOwnProperty(Ot)&&j!==void 0&&!s.hasOwnProperty(Ot)&&Ip(e,t,Ot,void 0,s,j);for(M in s)j=s[M],q=a[M],!s.hasOwnProperty(M)||j===q||j===void 0&&q===void 0||Ip(e,t,M,j,s,q);return}}for(var pt in a)j=a[pt],a.hasOwnProperty(pt)&&j!=null&&!s.hasOwnProperty(pt)&&_t(e,t,pt,null,s,j);for(L in s)j=s[L],q=a[L],!s.hasOwnProperty(L)||j===q||j==null&&q==null||_t(e,t,L,j,s,q)}function U0(e){switch(e){case"class":return"className";case"for":return"htmlFor";default:return e}}function Yp(e){var t={};e=e.style;for(var a=0;a<e.length;a++){var s=e[a];t[s]=e.getPropertyValue(s)}return t}function C0(e,t,a){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 s,r=s="",i;for(i in t)if(t.hasOwnProperty(i)){var m=t[i];m!=null&&typeof m!="boolean"&&m!==""&&(i.indexOf("--")===0?(xt(m,i),s+=r+i+":"+(""+m).trim()):typeof m!="number"||m===0||$v.has(i)?(xt(m,i),s+=r+i.replace(Vv,"-$1").toLowerCase().replace(Mv,"-ms-")+":"+(""+m).trim()):s+=r+i.replace(Vv,"-$1").toLowerCase().replace(Mv,"-ms-")+":"+m+"px",r=";")}s=s||null,t=e.getAttribute("style"),t!==s&&(s=$o(s),$o(t)!==s&&(a.style=Yp(e)))}}function As(e,t,a,s,r,i){if(r.delete(a),e=e.getAttribute(a),e===null)switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":return}else if(s!=null)switch(typeof s){case"function":case"symbol":case"boolean":break;default:if(Xe(s,t),e===""+s)return}_a(t,e,s,i)}function j0(e,t,a,s,r,i){if(r.delete(a),e=e.getAttribute(a),e===null){switch(typeof s){case"function":case"symbol":return}if(!s)return}else switch(typeof s){case"function":case"symbol":break;default:if(s)return}_a(t,e,s,i)}function qp(e,t,a,s,r,i){if(r.delete(a),e=e.getAttribute(a),e===null)switch(typeof s){case"undefined":case"function":case"symbol":return}else if(s!=null)switch(typeof s){case"function":case"symbol":break;default:if(Xe(s,a),e===""+s)return}_a(t,e,s,i)}function T0(e,t,a,s,r,i){if(r.delete(a),e=e.getAttribute(a),e===null)switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":return;default:if(isNaN(s))return}else if(s!=null)switch(typeof s){case"function":case"symbol":case"boolean":break;default:if(!isNaN(s)&&(Xe(s,t),e===""+s))return}_a(t,e,s,i)}function Gp(e,t,a,s,r,i){if(r.delete(a),e=e.getAttribute(a),e===null)switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":return}else if(s!=null)switch(typeof s){case"function":case"symbol":case"boolean":break;default:if(Xe(s,t),a=kl(""+s),e===a)return}_a(t,e,s,i)}function O0(e,t,a,s){for(var r={},i=new Set,m=e.attributes,h=0;h<m.length;h++)switch(m[h].name.toLowerCase()){case"value":break;case"checked":break;case"selected":break;default:i.add(m[h].name)}if(Rl(t)){for(var v in a)if(a.hasOwnProperty(v)){var D=a[v];if(D!=null){if(Vr.hasOwnProperty(v))typeof D!="function"&&An(v,D);else if(a.suppressHydrationWarning!==!0)switch(v){case"children":typeof D!="string"&&typeof D!="number"||_a("children",e.textContent,D,r);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":m=e.innerHTML,D=D?D.__html:void 0,D!=null&&(D=R0(e,D),_a(v,m,D,r));continue;case"style":i.delete(v),C0(e,D,r);continue;case"offsetParent":case"offsetTop":case"offsetLeft":case"offsetWidth":case"offsetHeight":case"isContentEditable":case"outerText":case"outerHTML":i.delete(v.toLowerCase()),console.error("Assignment to read-only property will result in a no-op: `%s`",v);continue;case"className":i.delete("class"),m=js(e,"class",D),_a("className",m,D,r);continue;default:s.context===vo&&t!=="svg"&&t!=="math"?i.delete(v.toLowerCase()):i.delete(v),m=js(e,v,D),_a(v,m,D,r)}}}}else for(D in a)if(a.hasOwnProperty(D)&&(v=a[D],v!=null)){if(Vr.hasOwnProperty(D))typeof v!="function"&&An(D,v);else if(a.suppressHydrationWarning!==!0)switch(D){case"children":typeof v!="string"&&typeof v!="number"||_a("children",e.textContent,v,r);continue;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"value":case"checked":case"selected":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":continue;case"dangerouslySetInnerHTML":m=e.innerHTML,v=v?v.__html:void 0,v!=null&&(v=R0(e,v),m!==v&&(r[D]={__html:m}));continue;case"className":As(e,D,"class",v,i,r);continue;case"tabIndex":As(e,D,"tabindex",v,i,r);continue;case"style":i.delete(D),C0(e,v,r);continue;case"multiple":i.delete(D),_a(D,e.multiple,v,r);continue;case"muted":i.delete(D),_a(D,e.muted,v,r);continue;case"autoFocus":i.delete("autofocus"),_a(D,e.autofocus,v,r);continue;case"data":if(t!=="object"){i.delete(D),m=e.getAttribute("data"),_a(D,m,v,r);continue}case"src":case"href":if(!(v!==""||t==="a"&&D==="href"||t==="object"&&D==="data")){console.error(D==="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.',D,D);continue}Gp(e,D,D,v,i,r);continue;case"action":case"formAction":if(m=e.getAttribute(D),typeof v=="function"){i.delete(D.toLowerCase()),D==="formAction"?(i.delete("name"),i.delete("formenctype"),i.delete("formmethod"),i.delete("formtarget")):(i.delete("enctype"),i.delete("method"),i.delete("target"));continue}else if(m===oR){i.delete(D.toLowerCase()),_a(D,"function",v,r);continue}Gp(e,D,D.toLowerCase(),v,i,r);continue;case"xlinkHref":Gp(e,D,"xlink:href",v,i,r);continue;case"contentEditable":qp(e,D,"contenteditable",v,i,r);continue;case"spellCheck":qp(e,D,"spellcheck",v,i,r);continue;case"draggable":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":qp(e,D,D,v,i,r);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":j0(e,D,D.toLowerCase(),v,i,r);continue;case"capture":case"download":e:{h=e;var M=m=D,L=r;if(i.delete(M),h=h.getAttribute(M),h===null)switch(typeof v){case"undefined":case"function":case"symbol":break e;default:if(v===!1)break e}else if(v!=null)switch(typeof v){case"function":case"symbol":break;case"boolean":if(v===!0&&h==="")break e;break;default:if(Xe(v,m),h===""+v)break e}_a(m,h,v,L)}continue;case"cols":case"rows":case"size":case"span":e:{if(h=e,M=m=D,L=r,i.delete(M),h=h.getAttribute(M),h===null)switch(typeof v){case"undefined":case"function":case"symbol":case"boolean":break e;default:if(isNaN(v)||1>v)break e}else if(v!=null)switch(typeof v){case"function":case"symbol":case"boolean":break;default:if(!(isNaN(v)||1>v)&&(Xe(v,m),h===""+v))break e}_a(m,h,v,L)}continue;case"rowSpan":T0(e,D,"rowspan",v,i,r);continue;case"start":T0(e,D,D,v,i,r);continue;case"xHeight":As(e,D,"x-height",v,i,r);continue;case"xlinkActuate":As(e,D,"xlink:actuate",v,i,r);continue;case"xlinkArcrole":As(e,D,"xlink:arcrole",v,i,r);continue;case"xlinkRole":As(e,D,"xlink:role",v,i,r);continue;case"xlinkShow":As(e,D,"xlink:show",v,i,r);continue;case"xlinkTitle":As(e,D,"xlink:title",v,i,r);continue;case"xlinkType":As(e,D,"xlink:type",v,i,r);continue;case"xmlBase":As(e,D,"xml:base",v,i,r);continue;case"xmlLang":As(e,D,"xml:lang",v,i,r);continue;case"xmlSpace":As(e,D,"xml:space",v,i,r);continue;case"inert":v!==""||_f[D]||(_f[D]=!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.",D)),j0(e,D,D,v,i,r);continue;default:if(!(2<D.length)||D[0]!=="o"&&D[0]!=="O"||D[1]!=="n"&&D[1]!=="N"){h=Ag(D),m=!1,s.context===vo&&t!=="svg"&&t!=="math"?i.delete(h.toLowerCase()):(M=D.toLowerCase(),M=zd.hasOwnProperty(M)&&zd[M]||null,M!==null&&M!==D&&(m=!0,i.delete(M)),i.delete(h));e:if(M=e,L=h,h=v,ya(L))if(M.hasAttribute(L))M=M.getAttribute(L),Xe(h,L),h=M===""+h?h:M;else{switch(typeof h){case"function":case"symbol":break e;case"boolean":if(M=L.toLowerCase().slice(0,5),M!=="data-"&&M!=="aria-")break e}h=h===void 0?void 0:null}else h=void 0;m||_a(D,h,v,r)}}}return 0<i.size&&a.suppressHydrationWarning!==!0&&YE(e,i,r),Object.keys(r).length===0?null:r}function GE(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 A0(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function PE(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,a=performance.getEntriesByType("resource"),s=0;s<a.length;s++){var r=a[s],i=r.transferSize,m=r.initiatorType,h=r.duration;if(i&&h&&A0(m)){for(m=0,h=r.responseEnd,s+=1;s<a.length;s++){var v=a[s],D=v.startTime;if(D>h)break;var M=v.transferSize,L=v.initiatorType;M&&A0(L)&&(v=v.responseEnd,m+=M*(v<h?1:(h-D)/(v-D)))}if(--s,t+=8*(i+m)/(r.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 xd(e){return e.nodeType===9?e:e.ownerDocument}function V0(e){switch(e){case Vi:return dl;case Md:return kf;default:return vo}}function M0(e,t){if(e===vo)switch(t){case"svg":return dl;case"math":return kf;default:return vo}return e===dl&&t==="foreignObject"?vo:e}function Pp(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 FE(){var e=window.event;return e&&e.type==="popstate"?e===Ub?!1:(Ub=e,!0):(Ub=null,!1)}function Kl(){var e=window.event;return e&&e!==Xc?e.type:null}function Wl(){var e=window.event;return e&&e!==Xc?e.timeStamp:-1.1}function XE(e){setTimeout(function(){throw e})}function QE(e,t,a){switch(t){case"button":case"input":case"select":case"textarea":a.autoFocus&&e.focus();break;case"img":a.src?e.src=a.src:a.srcSet&&(e.srcset=a.srcSet)}}function ZE(){}function JE(e,t,a,s){qE(e,t,a,s),e[Xa]=s}function z0(e){_l(e,"")}function KE(e,t,a){e.nodeValue=a}function L0(e){if(!e.__reactWarnedAboutChildrenConflict){var t=e[Xa]||null;if(t!==null){var a=B(e);a!==null&&(typeof t.children=="string"||typeof t.children=="number"?(e.__reactWarnedAboutChildrenConflict=!0,ye(a,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,ye(a,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 Bo(e){return e==="head"}function WE(e,t){e.removeChild(t)}function eD(e,t){(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e).removeChild(t)}function H0(e,t){var a=t,s=0;do{var r=a.nextSibling;if(e.removeChild(a),r&&r.nodeType===8)if(a=r.data,a===Fc||a===Rf){if(s===0){e.removeChild(r),Ui(t);return}s--}else if(a===Pc||a===ur||a===ti||a===ul||a===ei)s++;else if(a===iR)ec(e.ownerDocument.documentElement);else if(a===cR){a=e.ownerDocument.head,ec(a);for(var i=a.firstChild;i;){var m=i.nextSibling,h=i.nodeName;i[ic]||h==="SCRIPT"||h==="STYLE"||h==="LINK"&&i.rel.toLowerCase()==="stylesheet"||a.removeChild(i),i=m}}else a===lR&&ec(e.ownerDocument.body);a=r}while(a);Ui(t)}function $0(e,t){var a=e;e=0;do{var s=a.nextSibling;if(a.nodeType===1?t?(a._stashedDisplay=a.style.display,a.style.display="none"):(a.style.display=a._stashedDisplay||"",a.getAttribute("style")===""&&a.removeAttribute("style")):a.nodeType===3&&(t?(a._stashedText=a.nodeValue,a.nodeValue=""):a.nodeValue=a._stashedText||""),s&&s.nodeType===8)if(a=s.data,a===Fc){if(e===0)break;e--}else a!==Pc&&a!==ur&&a!==ti&&a!==ul||e++;a=s}while(a)}function tD(e){$0(e,!0)}function aD(e){e=e.style,typeof e.setProperty=="function"?e.setProperty("display","none","important"):e.display="none"}function sD(e){e.nodeValue=""}function nD(e){$0(e,!1)}function oD(e,t){t=t[uR],t=t!=null&&t.hasOwnProperty("display")?t.display:null,e.style.display=t==null||typeof t=="boolean"?"":(""+t).trim()}function rD(e,t){e.nodeValue=t}function Fp(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var a=t;switch(t=t.nextSibling,a.nodeName){case"HTML":case"HEAD":case"BODY":Fp(a),A(a);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(a.rel.toLowerCase()==="stylesheet")continue}e.removeChild(a)}}function iD(e,t,a,s){for(;e.nodeType===1;){var r=a;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!s&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(s){if(!e[ic])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(i=e.getAttribute("rel"),i==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(i!==r.rel||e.getAttribute("href")!==(r.href==null||r.href===""?null:r.href)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin)||e.getAttribute("title")!==(r.title==null?null:r.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(i=e.getAttribute("src"),(i!==(r.src==null?null:r.src)||e.getAttribute("type")!==(r.type==null?null:r.type)||e.getAttribute("crossorigin")!==(r.crossOrigin==null?null:r.crossOrigin))&&i&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){Xe(r.name,"name");var i=r.name==null?null:""+r.name;if(r.type==="hidden"&&e.getAttribute("name")===i)return e}else return e;if(e=vs(e.nextSibling),e===null)break}return null}function lD(e,t,a){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!a||(e=vs(e.nextSibling),e===null))return null;return e}function B0(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=vs(e.nextSibling),e===null))return null;return e}function Xp(e){return e.data===ur||e.data===ti}function Qp(e){return e.data===ul||e.data===ur&&e.ownerDocument.readyState!==C1}function cD(e,t){var a=e.ownerDocument;if(e.data===ti)e._reactRetry=t;else if(e.data!==ur||a.readyState!==C1)t();else{var s=function(){t(),a.removeEventListener("DOMContentLoaded",s)};a.addEventListener("DOMContentLoaded",s),e._reactRetry=s}}function vs(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===Pc||t===ul||t===ur||t===ti||t===ei||t===_b||t===U1)break;if(t===Fc||t===Rf)return null}}return e}function I0(e){if(e.nodeType===1){for(var t=e.nodeName.toLowerCase(),a={},s=e.attributes,r=0;r<s.length;r++){var i=s[r];a[U0(i.name)]=i.name.toLowerCase()==="style"?Yp(e):i.value}return{type:t,props:a}}return e.nodeType===8?e.data===ei?{type:"Activity",props:{}}:{type:"Suspense",props:{}}:e.nodeValue}function Y0(e,t,a){return a===null||a[rR]!==!0?(e.nodeValue===t?e=null:(t=$o(t),e=$o(e.nodeValue)===t?null:e.nodeValue),e):null}function Zp(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a===Fc||a===Rf){if(t===0)return vs(e.nextSibling);t--}else a!==Pc&&a!==ul&&a!==ur&&a!==ti&&a!==ei||t++}e=e.nextSibling}return null}function q0(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var a=e.data;if(a===Pc||a===ul||a===ur||a===ti||a===ei){if(t===0)return e;t--}else a!==Fc&&a!==Rf||t++}e=e.previousSibling}return null}function uD(e){Ui(e)}function dD(e){Ui(e)}function fD(e){Ui(e)}function G0(e,t,a,s,r){switch(r&&rm(e,s.ancestorInfo),t=xd(a),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 mD(e,t,a,s){if(!a[Go]&&B(a)){var r=a.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.",r,r,r)}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(r=a.attributes;r.length;)a.removeAttributeNode(r[0]);Aa(a,e,t),a[Va]=s,a[Xa]=t}function ec(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);A(e)}function vd(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}function P0(e,t,a){var s=fl;if(s&&typeof t=="string"&&t){var r=ve(t);r='link[rel="'+e+'"][href="'+r+'"]',typeof a=="string"&&(r+='[crossorigin="'+a+'"]'),M1.has(r)||(M1.add(r),e={rel:e,crossOrigin:a,href:t},s.querySelector(r)===null&&(t=s.createElement("link"),Aa(t,"link",e),le(t),s.head.appendChild(t)))}}function F0(e,t,a,s){var r=(r=Yo.current)?vd(r):null;if(!r)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 a.precedence=="string"&&typeof a.href=="string"?(a=Ri(a.href),t=Ne(r).hoistableStyles,s=t.get(a),s||(s={type:"style",instance:null,count:0,state:null},t.set(a,s)),s):{type:"void",instance:null,count:0,state:null};case"link":if(a.rel==="stylesheet"&&typeof a.href=="string"&&typeof a.precedence=="string"){e=Ri(a.href);var i=Ne(r).hoistableStyles,m=i.get(e);if(!m&&(r=r.ownerDocument||r,m={type:"stylesheet",instance:null,count:0,state:{loading:si,preload:null}},i.set(e,m),(i=r.querySelector(tc(e)))&&!i._p&&(m.instance=i,m.state.loading=Qc|Ps),!Fs.has(e))){var h={rel:"preload",as:"style",href:a.href,crossOrigin:a.crossOrigin,integrity:a.integrity,media:a.media,hrefLang:a.hrefLang,referrerPolicy:a.referrerPolicy};Fs.set(e,h),i||pD(r,e,h,m.state)}if(t&&s===null)throw a=`
182
+
183
+ - `+Nd(t)+`
184
+ + `+Nd(a),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."+a);return m}if(t&&s!==null)throw a=`
185
+
186
+ - `+Nd(t)+`
187
+ + `+Nd(a),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."+a);return null;case"script":return t=a.async,a=a.src,typeof a=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(a=ki(a),t=Ne(r).hoistableScripts,s=t.get(a),s||(s={type:"script",instance:null,count:0,state:null},t.set(a,s)),s):{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 Nd(e){var t=0,a="<link";return typeof e.rel=="string"?(t++,a+=' rel="'+e.rel+'"'):on.call(e,"rel")&&(t++,a+=' rel="'+(e.rel===null?"null":"invalid type "+typeof e.rel)+'"'),typeof e.href=="string"?(t++,a+=' href="'+e.href+'"'):on.call(e,"href")&&(t++,a+=' href="'+(e.href===null?"null":"invalid type "+typeof e.href)+'"'),typeof e.precedence=="string"?(t++,a+=' precedence="'+e.precedence+'"'):on.call(e,"precedence")&&(t++,a+=" precedence={"+(e.precedence===null?"null":"invalid type "+typeof e.precedence)+"}"),Object.getOwnPropertyNames(e).length>t&&(a+=" ..."),a+" />"}function Ri(e){return'href="'+ve(e)+'"'}function tc(e){return'link[rel="stylesheet"]['+e+"]"}function X0(e){return nt({},e,{"data-precedence":e.precedence,precedence:null})}function pD(e,t,a,s){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?s.loading=Qc:(t=e.createElement("link"),s.preload=t,t.addEventListener("load",function(){return s.loading|=Qc}),t.addEventListener("error",function(){return s.loading|=A1}),Aa(t,"link",a),le(t),e.head.appendChild(t))}function ki(e){return'[src="'+ve(e)+'"]'}function ac(e){return"script[async]"+e}function Q0(e,t,a){if(t.count++,t.instance===null)switch(t.type){case"style":var s=e.querySelector('style[data-href~="'+ve(a.href)+'"]');if(s)return t.instance=s,le(s),s;var r=nt({},a,{"data-href":a.href,"data-precedence":a.precedence,href:null,precedence:null});return s=(e.ownerDocument||e).createElement("style"),le(s),Aa(s,"style",r),Sd(s,a.precedence,e),t.instance=s;case"stylesheet":r=Ri(a.href);var i=e.querySelector(tc(r));if(i)return t.state.loading|=Ps,t.instance=i,le(i),i;s=X0(a),(r=Fs.get(r))&&Jp(s,r),i=(e.ownerDocument||e).createElement("link"),le(i);var m=i;return m._p=new Promise(function(h,v){m.onload=h,m.onerror=v}),Aa(i,"link",s),t.state.loading|=Ps,Sd(i,a.precedence,e),t.instance=i;case"script":return i=ki(a.src),(r=e.querySelector(ac(i)))?(t.instance=r,le(r),r):(s=a,(r=Fs.get(i))&&(s=nt({},a),Kp(s,r)),e=e.ownerDocument||e,r=e.createElement("script"),le(r),Aa(r,"link",s),e.head.appendChild(r),t.instance=r);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&Ps)===si&&(s=t.instance,t.state.loading|=Ps,Sd(s,a.precedence,e));return t.instance}function Sd(e,t,a){for(var s=a.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),r=s.length?s[s.length-1]:null,i=r,m=0;m<s.length;m++){var h=s[m];if(h.dataset.precedence===t)i=h;else if(i!==r)break}i?i.parentNode.insertBefore(e,i.nextSibling):(t=a.nodeType===9?a.head:a,t.insertBefore(e,t.firstChild))}function Jp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function Kp(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}function Z0(e,t,a){if(Uf===null){var s=new Map,r=Uf=new Map;r.set(a,s)}else r=Uf,s=r.get(a),s||(s=new Map,r.set(a,s));if(s.has(e))return s;for(s.set(e,null),a=a.getElementsByTagName(e),r=0;r<a.length;r++){var i=a[r];if(!(i[ic]||i[Va]||e==="link"&&i.getAttribute("rel")==="stylesheet")&&i.namespaceURI!==Vi){var m=i.getAttribute(t)||"";m=e+m;var h=s.get(m);h?h.push(i):s.set(m,[i])}}return s}function J0(e,t,a){e=e.ownerDocument||e,e.head.insertBefore(a,t==="title"?e.querySelector("head > title"):null)}function hD(e,t,a){var s=!a.ancestorInfo.containerTagInScope;if(a.context===dl||t.itemProp!=null)return!s||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===""){s&&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 r=t.onError,i=t.disabled;a=[],t.onLoad&&a.push("`onLoad`"),r&&a.push("`onError`"),i!=null&&a.push("`disabled`"),r=GE(a,"and"),r+=a.length===1?" prop":" props",i=a.length===1?"an "+r:"the "+r,a.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,i,r)}s&&(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}return t.rel==="stylesheet"?(e=t.precedence,t=t.disabled,typeof e!="string"&&s&&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):!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"){s&&(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":s&&console.error("Cannot render <%s> outside the main document. Try moving it into the root <head> tag.",e)}return!1}function K0(e){return!(e.type==="stylesheet"&&(e.state.loading&V1)===si)}function bD(e,t,a,s){if(a.type==="stylesheet"&&(typeof s.media!="string"||matchMedia(s.media).matches!==!1)&&(a.state.loading&Ps)===si){if(a.instance===null){var r=Ri(s.href),i=t.querySelector(tc(r));if(i){t=i._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=wd.bind(e),t.then(e,e)),a.state.loading|=Ps,a.instance=i,le(i);return}i=t.ownerDocument||t,s=X0(s),(r=Fs.get(r))&&Jp(s,r),i=i.createElement("link"),le(i);var m=i;m._p=new Promise(function(h,v){m.onload=h,m.onerror=v}),Aa(i,"link",s),a.instance=i}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(a,t),(t=a.state.preload)&&(a.state.loading&V1)===si&&(e.count++,a=wd.bind(e),t.addEventListener("load",a),t.addEventListener("error",a))}}function gD(e,t){return e.stylesheets&&e.count===0&&Ed(e,e.stylesheets),0<e.count||0<e.imgCount?function(a){var s=setTimeout(function(){if(e.stylesheets&&Ed(e,e.stylesheets),e.unsuspend){var i=e.unsuspend;e.unsuspend=null,i()}},mR+t);0<e.imgBytes&&jb===0&&(jb=125*PE()*hR);var r=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Ed(e,e.stylesheets),e.unsuspend)){var i=e.unsuspend;e.unsuspend=null,i()}},(e.imgBytes>jb?50:pR)+t);return e.unsuspend=a,function(){e.unsuspend=null,clearTimeout(s),clearTimeout(r)}}:null}function wd(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Ed(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}function Ed(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Cf=new Map,t.forEach(yD,e),Cf=null,wd.call(e))}function yD(e,t){if(!(t.state.loading&Ps)){var a=Cf.get(e);if(a)var s=a.get(Tb);else{a=new Map,Cf.set(e,a);for(var r=e.querySelectorAll("link[data-precedence],style[data-precedence]"),i=0;i<r.length;i++){var m=r[i];(m.nodeName==="LINK"||m.getAttribute("media")!=="not all")&&(a.set(m.dataset.precedence,m),s=m)}s&&a.set(Tb,s)}r=t.instance,m=r.getAttribute("data-precedence"),i=a.get(m)||s,i===s&&a.set(Tb,r),a.set(m,r),this.count++,s=wd.bind(this),r.addEventListener("load",s),r.addEventListener("error",s),i?i.parentNode.insertBefore(r,i.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(r,e.firstChild)),t.state.loading|=Ps}}function xD(e,t,a,s,r,i,m,h,v){for(this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=ai,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=Pe(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Pe(0),this.hiddenUpdates=Pe(null),this.identifierPrefix=s,this.onUncaughtError=r,this.onCaughtError=i,this.onRecoverableError=m,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=v,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=a?"hydrateRoot()":"createRoot()"}function W0(e,t,a,s,r,i,m,h,v,D,M,L){return e=new xD(e,t,a,m,v,D,M,L,h),t=H_,i===!0&&(t|=Ba|rn),t|=Ke,i=S(3,null,null,t),e.current=i,i.stateNode=e,t=_m(),kr(t),e.pooledCache=t,kr(t),i.memoizedState={element:s,isDehydrated:a,cache:t},jm(i),e}function ev(e){return e?(e=Qo,e):Qo}function Wp(e,t,a,s,r,i){if($a&&typeof $a.onScheduleFiberRoot=="function")try{$a.onScheduleFiberRoot(Oi,s,a)}catch(m){Ln||(Ln=!0,console.error("React instrumentation encountered an error: %o",m))}r=ev(r),s.context===null?s.context=r:s.pendingContext=r,zn&&Ss!==null&&!$1&&($1=!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.
188
+
189
+ Check the render method of %s.`,I(Ss)||"Unknown")),s=Ao(t),s.payload={element:a},i=i===void 0?null:i,i!==null&&(typeof i!="function"&&console.error("Expected the last optional `callback` argument to be a function. Instead received: %s.",i),s.callback=i),a=Vo(e,s,t),a!==null&&(Sn(t,"root.render()",null),Xt(a,e,t),Ml(a,e,t))}function tv(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var a=e.retryLane;e.retryLane=a!==0&&a<t?a:t}}function eh(e,t){tv(e,t),(e=e.alternate)&&tv(e,t)}function av(e){if(e.tag===13||e.tag===31){var t=Ha(e,67108864);t!==null&&Xt(t,e,67108864),eh(e,67108864)}}function sv(e){if(e.tag===13||e.tag===31){var t=xs(e);t=wa(t);var a=Ha(e,t);a!==null&&Xt(a,e,t),eh(e,t)}}function vD(){return Ss}function ND(e,t,a,s){var r=Q.T;Q.T=null;var i=St.p;try{St.p=Vs,th(e,t,a,s)}finally{St.p=i,Q.T=r}}function SD(e,t,a,s){var r=Q.T;Q.T=null;var i=St.p;try{St.p=$n,th(e,t,a,s)}finally{St.p=i,Q.T=r}}function th(e,t,a,s){if(Tf){var r=ah(s);if(r===null)$p(e,t,s,Of,a),ov(e,s);else if(wD(r,e,t,a,s))s.stopPropagation();else if(ov(e,s),t&4&&-1<gR.indexOf(e)){for(;r!==null;){var i=B(r);if(i!==null)switch(i.tag){case 3:if(i=i.stateNode,i.current.memoizedState.isDehydrated){var m=Gt(i.pendingLanes);if(m!==0){var h=i;for(h.pendingLanes|=2,h.entangledLanes|=2;m;){var v=1<<31-Fa(m);h.entanglements[1]|=v,m&=~v}On(i),(bt&(Na|_s))===Ca&&(hf=Ra()+p1,Zl(0))}}break;case 31:case 13:h=Ha(i,2),h!==null&&Xt(h,i,2),Ei(),eh(i,2)}if(i=ah(s),i===null&&$p(e,t,s,Of,a),i===r)break;r=i}r!==null&&s.stopPropagation()}else $p(e,t,s,null,a)}}function ah(e){return e=im(e),sh(e)}function sh(e){if(Of=null,e=O(e),e!==null){var t=Y(e);if(t===null)e=null;else{var a=t.tag;if(a===13){if(e=K(t),e!==null)return e;e=null}else if(a===31){if(e=Z(t),e!==null)return e;e=null}else if(a===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Of=e,null}function nv(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 Vs;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 $n;case"message":switch(OD()){case gh:return Vs;case yh:return $n;case Ti:case AD:return oo;case xh:return Ad;default:return oo}default:return oo}}function ov(e,t){switch(e){case"focusin":case"focusout":dr=null;break;case"dragenter":case"dragleave":fr=null;break;case"mouseover":case"mouseout":mr=null;break;case"pointerover":case"pointerout":Jc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Kc.delete(t.pointerId)}}function sc(e,t,a,s,r,i){return e===null||e.nativeEvent!==i?(e={blockedOn:t,domEventName:a,eventSystemFlags:s,nativeEvent:i,targetContainers:[r]},t!==null&&(t=B(t),t!==null&&av(t)),e):(e.eventSystemFlags|=s,t=e.targetContainers,r!==null&&t.indexOf(r)===-1&&t.push(r),e)}function wD(e,t,a,s,r){switch(t){case"focusin":return dr=sc(dr,e,t,a,s,r),!0;case"dragenter":return fr=sc(fr,e,t,a,s,r),!0;case"mouseover":return mr=sc(mr,e,t,a,s,r),!0;case"pointerover":var i=r.pointerId;return Jc.set(i,sc(Jc.get(i)||null,e,t,a,s,r)),!0;case"gotpointercapture":return i=r.pointerId,Kc.set(i,sc(Kc.get(i)||null,e,t,a,s,r)),!0}return!1}function rv(e){var t=O(e.target);if(t!==null){var a=Y(t);if(a!==null){if(t=a.tag,t===13){if(t=K(a),t!==null){e.blockedOn=t,w(e.priority,function(){sv(a)});return}}else if(t===31){if(t=Z(a),t!==null){e.blockedOn=t,w(e.priority,function(){sv(a)});return}}else if(t===3&&a.stateNode.current.memoizedState.isDehydrated){e.blockedOn=a.tag===3?a.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Dd(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var a=ah(e.nativeEvent);if(a===null){a=e.nativeEvent;var s=new a.constructor(a.type,a),r=s;lc!==null&&console.error("Expected currently replaying event to be null. This error is likely caused by a bug in React. Please file an issue."),lc=r,a.target.dispatchEvent(s),lc===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."),lc=null}else return t=B(a),t!==null&&av(t),e.blockedOn=a,!1;t.shift()}return!0}function iv(e,t,a){Dd(e)&&a.delete(t)}function ED(){Ob=!1,dr!==null&&Dd(dr)&&(dr=null),fr!==null&&Dd(fr)&&(fr=null),mr!==null&&Dd(mr)&&(mr=null),Jc.forEach(iv),Kc.forEach(iv)}function _d(e,t){e.blockedOn===t&&(e.blockedOn=null,Ob||(Ob=!0,la.unstable_scheduleCallback(la.unstable_NormalPriority,ED)))}function lv(e){Af!==e&&(Af=e,la.unstable_scheduleCallback(la.unstable_NormalPriority,function(){Af===e&&(Af=null);for(var t=0;t<e.length;t+=3){var a=e[t],s=e[t+1],r=e[t+2];if(typeof s!="function"){if(sh(s||a)===null)continue;break}var i=B(a);i!==null&&(e.splice(t,3),t-=3,a={pending:!0,data:r,method:a.method,action:s},Object.freeze(a),sp(i,a,s,r))}}))}function Ui(e){function t(v){return _d(v,e)}dr!==null&&_d(dr,e),fr!==null&&_d(fr,e),mr!==null&&_d(mr,e),Jc.forEach(t),Kc.forEach(t);for(var a=0;a<pr.length;a++){var s=pr[a];s.blockedOn===e&&(s.blockedOn=null)}for(;0<pr.length&&(a=pr[0],a.blockedOn===null);)rv(a),a.blockedOn===null&&pr.shift();if(a=(e.ownerDocument||e).$$reactFormReplay,a!=null)for(s=0;s<a.length;s+=3){var r=a[s],i=a[s+1],m=r[Xa]||null;if(typeof i=="function")m||lv(a);else if(m){var h=null;if(i&&i.hasAttribute("formAction")){if(r=i,m=i[Xa]||null)h=m.formAction;else if(sh(r)!==null)continue}else h=m.action;typeof h=="function"?a[s+1]=h:(a.splice(s,3),s-=3),lv(a)}}}function cv(){function e(i){i.canIntercept&&i.info==="react-transition"&&i.intercept({handler:function(){return new Promise(function(m){return r=m})},focusReset:"manual",scroll:"manual"})}function t(){r!==null&&(r(),r=null),s||setTimeout(a,20)}function a(){if(!s&&!navigation.transition){var i=navigation.currentEntry;i&&i.url!=null&&navigation.navigate(i.url,{state:i.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var s=!1,r=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(a,100),function(){s=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),r!==null&&(r(),r=null)}}}function nh(e){this._internalRoot=e}function Rd(e){this._internalRoot=e}function uv(e){e[Go]&&(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 la=jk(),oh=bu(),DD=Ok(),nt=Object.assign,_D=Symbol.for("react.element"),Vn=Symbol.for("react.transitional.element"),Ci=Symbol.for("react.portal"),ji=Symbol.for("react.fragment"),kd=Symbol.for("react.strict_mode"),rh=Symbol.for("react.profiler"),ih=Symbol.for("react.consumer"),Mn=Symbol.for("react.context"),nc=Symbol.for("react.forward_ref"),lh=Symbol.for("react.suspense"),ch=Symbol.for("react.suspense_list"),Ud=Symbol.for("react.memo"),Ns=Symbol.for("react.lazy"),uh=Symbol.for("react.activity"),RD=Symbol.for("react.memo_cache_sentinel"),dv=Symbol.iterator,kD=Symbol.for("react.client.reference"),xa=Array.isArray,Q=oh.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,St=DD.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,UD=Object.freeze({pending:!1,data:null,method:null,action:null}),dh=[],fh=[],no=-1,Io=be(null),oc=be(null),Yo=be(null),Cd=be(null),rc=0,fv,mv,pv,hv,bv,gv,yv;Te.__reactDisabledLog=!0;var mh,xv,ph=!1,hh=new(typeof WeakMap=="function"?WeakMap:Map),Ss=null,zn=!1,on=Object.prototype.hasOwnProperty,bh=la.unstable_scheduleCallback,CD=la.unstable_cancelCallback,jD=la.unstable_shouldYield,TD=la.unstable_requestPaint,Ra=la.unstable_now,OD=la.unstable_getCurrentPriorityLevel,gh=la.unstable_ImmediatePriority,yh=la.unstable_UserBlockingPriority,Ti=la.unstable_NormalPriority,AD=la.unstable_LowPriority,xh=la.unstable_IdlePriority,VD=la.log,MD=la.unstable_setDisableYieldValue,Oi=null,$a=null,Ln=!1,Hn=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u",Fa=Math.clz32?Math.clz32:qa,zD=Math.log,LD=Math.LN2,jd=256,Td=262144,Od=4194304,Vs=2,$n=8,oo=32,Ad=268435456,qo=Math.random().toString(36).slice(2),Va="__reactFiber$"+qo,Xa="__reactProps$"+qo,Go="__reactContainer$"+qo,vh="__reactEvents$"+qo,HD="__reactListeners$"+qo,$D="__reactHandles$"+qo,vv="__reactResources$"+qo,ic="__reactMarker$"+qo,Nv=new Set,Vr={},Nh={},BD={button:!0,checkbox:!0,image:!0,hidden:!0,radio:!0,reset:!0,submit:!0},ID=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]*$"),Sv={},wv={},YD=/[\n"\\]/g,Ev=!1,Dv=!1,_v=!1,Rv=!1,kv=!1,Uv=!1,Cv=["value","defaultValue"],jv=!1,Tv=/["'&<>\n\t]|^\s|\s$/,qD="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(" "),Ov="applet caption html table td th marquee object template foreignObject desc title".split(" "),GD=Ov.concat(["button"]),PD="dd dt li option optgroup p rp rt".split(" "),Av={current:null,formTag:null,aTagInScope:null,buttonTagInScope:null,nobrTagInScope:null,pTagInButtonScope:null,listItemTagAutoclosing:null,dlItemTagAutoclosing:null,containerTagInScope:null,implicitRootScope:!1},Vd={},Sh={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"]},Vv=/([A-Z])/g,Mv=/^ms-/,FD=/^(?:webkit|moz|o)[A-Z]/,XD=/^-ms-/,QD=/-(.)/g,zv=/;\s*$/,Ai={},wh={},Lv=!1,Hv=!1,$v=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(" ")),Md="http://www.w3.org/1998/Math/MathML",Vi="http://www.w3.org/2000/svg",ZD=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"]]),zd={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"},Bv={"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},Mi={},JD=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]*$"),KD=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]*$"),Iv=!1,Qa={},Yv=/^on./,WD=/^on[^A-Z]/,e_=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]*$"),t_=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]*$"),a_=/^[\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,lc=null,zi=null,Li=null,Eh=!1,Bn=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Dh=!1;if(Bn)try{var cc={};Object.defineProperty(cc,"passive",{get:function(){Dh=!0}}),window.addEventListener("test",cc,cc),window.removeEventListener("test",cc,cc)}catch{Dh=!1}var Po=null,_h=null,Ld=null,Mr={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Hd=ss(Mr),uc=nt({},Mr,{view:0,detail:0}),s_=ss(uc),Rh,kh,dc,$d=nt({},uc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:lm,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!==dc&&(dc&&e.type==="mousemove"?(Rh=e.screenX-dc.screenX,kh=e.screenY-dc.screenY):kh=Rh=0,dc=e),Rh)},movementY:function(e){return"movementY"in e?e.movementY:kh}}),qv=ss($d),n_=nt({},$d,{dataTransfer:0}),o_=ss(n_),r_=nt({},uc,{relatedTarget:0}),Uh=ss(r_),i_=nt({},Mr,{animationName:0,elapsedTime:0,pseudoElement:0}),l_=ss(i_),c_=nt({},Mr,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),u_=ss(c_),d_=nt({},Mr,{data:0}),Gv=ss(d_),f_=Gv,m_={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},p_={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"},h_={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"},b_=nt({},uc,{key:function(e){if(e.key){var t=m_[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Du(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?p_[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:lm,charCode:function(e){return e.type==="keypress"?Du(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Du(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),g_=ss(b_),y_=nt({},$d,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Pv=ss(y_),x_=nt({},uc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:lm}),v_=ss(x_),N_=nt({},Mr,{propertyName:0,elapsedTime:0,pseudoElement:0}),S_=ss(N_),w_=nt({},$d,{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}),E_=ss(w_),D_=nt({},Mr,{newState:0,oldState:0}),__=ss(D_),R_=[9,13,27,32],Fv=229,Ch=Bn&&"CompositionEvent"in window,fc=null;Bn&&"documentMode"in document&&(fc=document.documentMode);var k_=Bn&&"TextEvent"in window&&!fc,Xv=Bn&&(!Ch||fc&&8<fc&&11>=fc),Qv=32,Zv=String.fromCharCode(Qv),Jv=!1,Hi=!1,U_={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},mc=null,pc=null,Kv=!1;Bn&&(Kv=Qw("input")&&(!document.documentMode||9<document.documentMode));var Za=typeof Object.is=="function"?Object.is:tE,C_=Bn&&"documentMode"in document&&11>=document.documentMode,$i=null,jh=null,hc=null,Th=!1,Bi={animationend:Nr("Animation","AnimationEnd"),animationiteration:Nr("Animation","AnimationIteration"),animationstart:Nr("Animation","AnimationStart"),transitionrun:Nr("Transition","TransitionRun"),transitionstart:Nr("Transition","TransitionStart"),transitioncancel:Nr("Transition","TransitionCancel"),transitionend:Nr("Transition","TransitionEnd")},Oh={},Wv={};Bn&&(Wv=document.createElement("div").style,"AnimationEvent"in window||(delete Bi.animationend.animation,delete Bi.animationiteration.animation,delete Bi.animationstart.animation),"TransitionEvent"in window||delete Bi.transitionend.transition);var eN=Sr("animationend"),tN=Sr("animationiteration"),aN=Sr("animationstart"),j_=Sr("transitionrun"),T_=Sr("transitionstart"),O_=Sr("transitioncancel"),sN=Sr("transitionend"),nN=new Map,Ah="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(" ");Ah.push("scrollEnd");var oN=0;if(typeof performance=="object"&&typeof performance.now=="function")var A_=performance,rN=function(){return A_.now()};else{var V_=Date;rN=function(){return V_.now()}}var Vh=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!==null&&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)},M_="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.",Bd=0,Mh=1,zh=2,Lh=3,Id="– ",Yd="+ ",iN="  ",Mt=typeof console<"u"&&typeof console.timeStamp=="function"&&typeof performance<"u"&&typeof performance.measure=="function",Ms="Components ⚛",mt="Scheduler ⚛",ht="Blocking",Fo=!1,ro={color:"primary",properties:null,tooltipText:"",track:Ms},Xo={start:-0,end:-0,detail:{devtools:ro}},z_=["Changed Props",""],lN="This component received deeply equal props. It might benefit from useMemo or the React Compiler in its owner.",L_=["Changed Props",lN],bc=1,io=2,zs=[],Ii=0,Hh=0,Qo={};Object.freeze(Qo);var Ls=null,Yi=null,Ye=0,H_=1,Ke=2,Ba=8,rn=16,$_=32,cN=!1;try{var uN=Object.preventExtensions({})}catch{cN=!0}var $h=new WeakMap,qi=[],Gi=0,qd=null,gc=0,Hs=[],$s=0,zr=null,lo=1,co="",Ma=null,zt=null,ut=!1,In=!1,ws=null,Zo=null,Bs=!1,Bh=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."),Ih=be(null),Yh=be(null),dN={},Gd=null,Pi=null,Fi=!1,B_=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(a,s){e.push(s)}};this.abort=function(){t.aborted=!0,e.forEach(function(a){return a()})}},I_=la.unstable_scheduleCallback,Y_=la.unstable_NormalPriority,ca={$$typeof:Mn,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0,_currentRenderer:null,_currentRenderer2:null},ua=la.unstable_now,Pd=console.createTask?console.createTask:function(){return null},yc=1,Fd=2,ka=-0,Jo=-0,uo=-0,fo=null,Ja=-1.1,Lr=-0,Pt=-0,ze=-1.1,Be=-1.1,It=null,Qt=!1,Hr=-0,Yn=-1.1,xc=null,Ko=0,qh=null,Gh=null,$r=-1.1,vc=null,Xi=-1.1,Xd=-1.1,mo=-0,po=-1.1,Is=-1.1,Ph=0,Nc=null,fN=null,mN=null,Wo=-1.1,Br=null,er=-1.1,Qd=-1.1,pN=-0,hN=-0,Zd=0,q_=null,bN=0,Sc=-1.1,Jd=!1,Kd=!1,wc=null,Fh=0,Ir=0,Qi=null,gN=Q.S;Q.S=function(e,t){if(f1=Ra(),typeof t=="object"&&t!==null&&typeof t.then=="function"){if(0>po&&0>Is){po=ua();var a=Wl(),s=Kl();(a!==er||s!==Br)&&(er=-1.1),Wo=a,Br=s}lE(e,t)}gN!==null&&gN(e,t)};var Yr=be(null),ln={recordUnsafeLifecycleWarnings:function(){},flushPendingUnsafeLifecycleWarnings:function(){},recordLegacyContextWarning:function(){},flushLegacyContextWarning:function(){},discardPendingWarnings:function(){}},Ec=[],Dc=[],_c=[],Rc=[],kc=[],Uc=[],qr=new Set;ln.recordUnsafeLifecycleWarnings=function(e,t){qr.has(e.type)||(typeof t.componentWillMount=="function"&&t.componentWillMount.__suppressDeprecationWarning!==!0&&Ec.push(e),e.mode&Ba&&typeof t.UNSAFE_componentWillMount=="function"&&Dc.push(e),typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps.__suppressDeprecationWarning!==!0&&_c.push(e),e.mode&Ba&&typeof t.UNSAFE_componentWillReceiveProps=="function"&&Rc.push(e),typeof t.componentWillUpdate=="function"&&t.componentWillUpdate.__suppressDeprecationWarning!==!0&&kc.push(e),e.mode&Ba&&typeof t.UNSAFE_componentWillUpdate=="function"&&Uc.push(e))},ln.flushPendingUnsafeLifecycleWarnings=function(){var e=new Set;0<Ec.length&&(Ec.forEach(function(h){e.add(I(h)||"Component"),qr.add(h.type)}),Ec=[]);var t=new Set;0<Dc.length&&(Dc.forEach(function(h){t.add(I(h)||"Component"),qr.add(h.type)}),Dc=[]);var a=new Set;0<_c.length&&(_c.forEach(function(h){a.add(I(h)||"Component"),qr.add(h.type)}),_c=[]);var s=new Set;0<Rc.length&&(Rc.forEach(function(h){s.add(I(h)||"Component"),qr.add(h.type)}),Rc=[]);var r=new Set;0<kc.length&&(kc.forEach(function(h){r.add(I(h)||"Component"),qr.add(h.type)}),kc=[]);var i=new Set;if(0<Uc.length&&(Uc.forEach(function(h){i.add(I(h)||"Component"),qr.add(h.type)}),Uc=[]),0<t.size){var m=x(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.
190
+
191
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
192
+
193
+ Please update the following components: %s`,m)}0<s.size&&(m=x(s),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.
194
+
195
+ * Move data fetching code or side effects to componentDidUpdate.
196
+ * 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
197
+
198
+ Please update the following components: %s`,m)),0<i.size&&(m=x(i),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.
199
+
200
+ * Move data fetching code or side effects to componentDidUpdate.
201
+
202
+ Please update the following components: %s`,m)),0<e.size&&(m=x(e),console.warn(`componentWillMount has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
203
+
204
+ * Move code with side effects to componentDidMount, and set initial state in the constructor.
205
+ * 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.
206
+
207
+ Please update the following components: %s`,m)),0<a.size&&(m=x(a),console.warn(`componentWillReceiveProps has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
208
+
209
+ * Move data fetching code or side effects to componentDidUpdate.
210
+ * 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
211
+ * 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.
212
+
213
+ Please update the following components: %s`,m)),0<r.size&&(m=x(r),console.warn(`componentWillUpdate has been renamed, and is not recommended for use. See https://react.dev/link/unsafe-component-lifecycles for details.
214
+
215
+ * Move data fetching code or side effects to componentDidUpdate.
216
+ * 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.
217
+
218
+ Please update the following components: %s`,m))};var Wd=new Map,yN=new Set;ln.recordLegacyContextWarning=function(e,t){for(var a=null,s=e;s!==null;)s.mode&Ba&&(a=s),s=s.return;a===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."):!yN.has(e.type)&&(s=Wd.get(a),e.type.contextTypes!=null||e.type.childContextTypes!=null||t!==null&&typeof t.getChildContext=="function")&&(s===void 0&&(s=[],Wd.set(a,s)),s.push(e))},ln.flushLegacyContextWarning=function(){Wd.forEach(function(e){if(e.length!==0){var t=e[0],a=new Set;e.forEach(function(r){a.add(I(r)||"Component"),yN.add(r.type)});var s=x(a);ye(t,function(){console.error(`Legacy context API has been detected within a strict-mode tree.
219
+
220
+ The old API will be supported in all 16.x releases, but applications using it should migrate to the new version.
221
+
222
+ Please update the following components: %s
223
+
224
+ Learn more about this warning here: https://react.dev/link/legacy-context`,s)})}})},ln.discardPendingWarnings=function(){Ec=[],Dc=[],_c=[],Rc=[],kc=[],Uc=[],Wd=new Map};var xN={react_stack_bottom_frame:function(e,t,a){var s=zn;zn=!0;try{return e(t,a)}finally{zn=s}}},Xh=xN.react_stack_bottom_frame.bind(xN),vN={react_stack_bottom_frame:function(e){var t=zn;zn=!0;try{return e.render()}finally{zn=t}}},NN=vN.react_stack_bottom_frame.bind(vN),SN={react_stack_bottom_frame:function(e,t){try{t.componentDidMount()}catch(a){Nt(e,e.return,a)}}},Qh=SN.react_stack_bottom_frame.bind(SN),wN={react_stack_bottom_frame:function(e,t,a,s,r){try{t.componentDidUpdate(a,s,r)}catch(i){Nt(e,e.return,i)}}},EN=wN.react_stack_bottom_frame.bind(wN),DN={react_stack_bottom_frame:function(e,t){var a=t.stack;e.componentDidCatch(t.value,{componentStack:a!==null?a:""})}},G_=DN.react_stack_bottom_frame.bind(DN),_N={react_stack_bottom_frame:function(e,t,a){try{a.componentWillUnmount()}catch(s){Nt(e,t,s)}}},RN=_N.react_stack_bottom_frame.bind(_N),kN={react_stack_bottom_frame:function(e){var t=e.create;return e=e.inst,t=t(),e.destroy=t}},P_=kN.react_stack_bottom_frame.bind(kN),UN={react_stack_bottom_frame:function(e,t,a){try{a()}catch(s){Nt(e,t,s)}}},F_=UN.react_stack_bottom_frame.bind(UN),CN={react_stack_bottom_frame:function(e){var t=e._init;return t(e._payload)}},X_=CN.react_stack_bottom_frame.bind(CN),Zi=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`."),Zh=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."),ef=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."),tf={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.')}},Gr=null,Cc=!1,Ji=null,jc=0,We=null,Jh,jN=Jh=!1,TN={},ON={},AN={};E=function(e,t,a){if(a!==null&&typeof a=="object"&&a._store&&(!a._store.validated&&a.key==null||a._store.validated===2)){if(typeof a._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.");a._store.validated=1;var s=I(e),r=s||"null";if(!TN[r]){TN[r]=!0,a=a._owner,e=e._debugOwner;var i="";e&&typeof e.tag=="number"&&(r=I(e))&&(i=`
225
+
226
+ Check the render method of \``+r+"`."),i||s&&(i=`
227
+
228
+ Check the top-level render call using <`+s+">.");var m="";a!=null&&e!==a&&(s=null,typeof a.tag=="number"?s=I(a):typeof a.name=="string"&&(s=a.name),s&&(m=" It was passed a child from "+s+".")),ye(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.',i,m)})}}};var Pr=_y(!0),VN=_y(!1),MN=0,zN=1,LN=2,Kh=3,tr=!1,HN=!1,Wh=null,eb=!1,Ki=be(null),af=be(0),Es=be(null),Ys=null,Wi=1,Tc=2,na=be(0),sf=0,qs=1,Ka=2,Ds=4,Wa=8,el,$N=new Set,BN=new Set,tb=new Set,IN=new Set,ho=0,qe=null,Rt=null,da=null,nf=!1,tl=!1,Fr=!1,of=0,Oc=0,bo=null,Q_=0,Z_=25,F=null,Gs=null,go=-1,Ac=!1,Vc={readContext:Bt,use:Lo,useCallback:Zt,useContext:Zt,useEffect:Zt,useImperativeHandle:Zt,useLayoutEffect:Zt,useInsertionEffect:Zt,useMemo:Zt,useReducer:Zt,useRef:Zt,useState:Zt,useDebugValue:Zt,useDeferredValue:Zt,useTransition:Zt,useSyncExternalStore:Zt,useId:Zt,useHostTransitionStatus:Zt,useFormState:Zt,useActionState:Zt,useOptimistic:Zt,useMemoCache:Zt,useCacheRefresh:Zt};Vc.useEffectEvent=Zt;var ab=null,YN=null,sb=null,qN=null,qn=null,cn=null,rf=null;ab={readContext:function(e){return Bt(e)},use:Lo,useCallback:function(e,t){return F="useCallback",st(),gi(t),Wm(e,t)},useContext:function(e){return F="useContext",st(),Bt(e)},useEffect:function(e,t){return F="useEffect",st(),gi(t),Wu(e,t)},useImperativeHandle:function(e,t,a){return F="useImperativeHandle",st(),gi(a),Km(e,t,a)},useInsertionEffect:function(e,t){F="useInsertionEffect",st(),gi(t),Cr(4,Ka,e,t)},useLayoutEffect:function(e,t){return F="useLayoutEffect",st(),gi(t),Jm(e,t)},useMemo:function(e,t){F="useMemo",st(),gi(t);var a=Q.H;Q.H=qn;try{return ep(e,t)}finally{Q.H=a}},useReducer:function(e,t,a){F="useReducer",st();var s=Q.H;Q.H=qn;try{return Im(e,t,a)}finally{Q.H=s}},useRef:function(e){return F="useRef",st(),Qm(e)},useState:function(e){F="useState",st();var t=Q.H;Q.H=qn;try{return Pm(e)}finally{Q.H=t}},useDebugValue:function(){F="useDebugValue",st()},useDeferredValue:function(e,t){return F="useDeferredValue",st(),tp(e,t)},useTransition:function(){return F="useTransition",st(),np()},useSyncExternalStore:function(e,t,a){return F="useSyncExternalStore",st(),qm(e,t,a)},useId:function(){return F="useId",st(),op()},useFormState:function(e,t){return F="useFormState",st(),Xu(),xi(e,t)},useActionState:function(e,t){return F="useActionState",st(),xi(e,t)},useOptimistic:function(e){return F="useOptimistic",st(),Fm(e)},useHostTransitionStatus:jr,useMemoCache:Ur,useCacheRefresh:function(){return F="useCacheRefresh",st(),rp()},useEffectEvent:function(e){return F="useEffectEvent",st(),Zm(e)}},YN={readContext:function(e){return Bt(e)},use:Lo,useCallback:function(e,t){return F="useCallback",re(),Wm(e,t)},useContext:function(e){return F="useContext",re(),Bt(e)},useEffect:function(e,t){return F="useEffect",re(),Wu(e,t)},useImperativeHandle:function(e,t,a){return F="useImperativeHandle",re(),Km(e,t,a)},useInsertionEffect:function(e,t){F="useInsertionEffect",re(),Cr(4,Ka,e,t)},useLayoutEffect:function(e,t){return F="useLayoutEffect",re(),Jm(e,t)},useMemo:function(e,t){F="useMemo",re();var a=Q.H;Q.H=qn;try{return ep(e,t)}finally{Q.H=a}},useReducer:function(e,t,a){F="useReducer",re();var s=Q.H;Q.H=qn;try{return Im(e,t,a)}finally{Q.H=s}},useRef:function(e){return F="useRef",re(),Qm(e)},useState:function(e){F="useState",re();var t=Q.H;Q.H=qn;try{return Pm(e)}finally{Q.H=t}},useDebugValue:function(){F="useDebugValue",re()},useDeferredValue:function(e,t){return F="useDeferredValue",re(),tp(e,t)},useTransition:function(){return F="useTransition",re(),np()},useSyncExternalStore:function(e,t,a){return F="useSyncExternalStore",re(),qm(e,t,a)},useId:function(){return F="useId",re(),op()},useActionState:function(e,t){return F="useActionState",re(),xi(e,t)},useFormState:function(e,t){return F="useFormState",re(),Xu(),xi(e,t)},useOptimistic:function(e){return F="useOptimistic",re(),Fm(e)},useHostTransitionStatus:jr,useMemoCache:Ur,useCacheRefresh:function(){return F="useCacheRefresh",re(),rp()},useEffectEvent:function(e){return F="useEffectEvent",re(),Zm(e)}},sb={readContext:function(e){return Bt(e)},use:Lo,useCallback:function(e,t){return F="useCallback",re(),ad(e,t)},useContext:function(e){return F="useContext",re(),Bt(e)},useEffect:function(e,t){F="useEffect",re(),ns(2048,Wa,e,t)},useImperativeHandle:function(e,t,a){return F="useImperativeHandle",re(),td(e,t,a)},useInsertionEffect:function(e,t){return F="useInsertionEffect",re(),ns(4,Ka,e,t)},useLayoutEffect:function(e,t){return F="useLayoutEffect",re(),ns(4,Ds,e,t)},useMemo:function(e,t){F="useMemo",re();var a=Q.H;Q.H=cn;try{return sd(e,t)}finally{Q.H=a}},useReducer:function(e,t,a){F="useReducer",re();var s=Q.H;Q.H=cn;try{return yi(e,t,a)}finally{Q.H=s}},useRef:function(){return F="useRef",re(),wt().memoizedState},useState:function(){F="useState",re();var e=Q.H;Q.H=cn;try{return yi(sn)}finally{Q.H=e}},useDebugValue:function(){F="useDebugValue",re()},useDeferredValue:function(e,t){return F="useDeferredValue",re(),Xy(e,t)},useTransition:function(){return F="useTransition",re(),ex()},useSyncExternalStore:function(e,t,a){return F="useSyncExternalStore",re(),Zu(e,t,a)},useId:function(){return F="useId",re(),wt().memoizedState},useFormState:function(e){return F="useFormState",re(),Xu(),Ju(e)},useActionState:function(e){return F="useActionState",re(),Ju(e)},useOptimistic:function(e,t){return F="useOptimistic",re(),Ly(e,t)},useHostTransitionStatus:jr,useMemoCache:Ur,useCacheRefresh:function(){return F="useCacheRefresh",re(),wt().memoizedState},useEffectEvent:function(e){return F="useEffectEvent",re(),ed(e)}},qN={readContext:function(e){return Bt(e)},use:Lo,useCallback:function(e,t){return F="useCallback",re(),ad(e,t)},useContext:function(e){return F="useContext",re(),Bt(e)},useEffect:function(e,t){F="useEffect",re(),ns(2048,Wa,e,t)},useImperativeHandle:function(e,t,a){return F="useImperativeHandle",re(),td(e,t,a)},useInsertionEffect:function(e,t){return F="useInsertionEffect",re(),ns(4,Ka,e,t)},useLayoutEffect:function(e,t){return F="useLayoutEffect",re(),ns(4,Ds,e,t)},useMemo:function(e,t){F="useMemo",re();var a=Q.H;Q.H=rf;try{return sd(e,t)}finally{Q.H=a}},useReducer:function(e,t,a){F="useReducer",re();var s=Q.H;Q.H=rf;try{return $l(e,t,a)}finally{Q.H=s}},useRef:function(){return F="useRef",re(),wt().memoizedState},useState:function(){F="useState",re();var e=Q.H;Q.H=rf;try{return $l(sn)}finally{Q.H=e}},useDebugValue:function(){F="useDebugValue",re()},useDeferredValue:function(e,t){return F="useDeferredValue",re(),Qy(e,t)},useTransition:function(){return F="useTransition",re(),tx()},useSyncExternalStore:function(e,t,a){return F="useSyncExternalStore",re(),Zu(e,t,a)},useId:function(){return F="useId",re(),wt().memoizedState},useFormState:function(e){return F="useFormState",re(),Xu(),Ku(e)},useActionState:function(e){return F="useActionState",re(),Ku(e)},useOptimistic:function(e,t){return F="useOptimistic",re(),$y(e,t)},useHostTransitionStatus:jr,useMemoCache:Ur,useCacheRefresh:function(){return F="useCacheRefresh",re(),wt().memoizedState},useEffectEvent:function(e){return F="useEffectEvent",re(),ed(e)}},qn={readContext:function(e){return g(),Bt(e)},use:function(e){return b(),Lo(e)},useCallback:function(e,t){return F="useCallback",b(),st(),Wm(e,t)},useContext:function(e){return F="useContext",b(),st(),Bt(e)},useEffect:function(e,t){return F="useEffect",b(),st(),Wu(e,t)},useImperativeHandle:function(e,t,a){return F="useImperativeHandle",b(),st(),Km(e,t,a)},useInsertionEffect:function(e,t){F="useInsertionEffect",b(),st(),Cr(4,Ka,e,t)},useLayoutEffect:function(e,t){return F="useLayoutEffect",b(),st(),Jm(e,t)},useMemo:function(e,t){F="useMemo",b(),st();var a=Q.H;Q.H=qn;try{return ep(e,t)}finally{Q.H=a}},useReducer:function(e,t,a){F="useReducer",b(),st();var s=Q.H;Q.H=qn;try{return Im(e,t,a)}finally{Q.H=s}},useRef:function(e){return F="useRef",b(),st(),Qm(e)},useState:function(e){F="useState",b(),st();var t=Q.H;Q.H=qn;try{return Pm(e)}finally{Q.H=t}},useDebugValue:function(){F="useDebugValue",b(),st()},useDeferredValue:function(e,t){return F="useDeferredValue",b(),st(),tp(e,t)},useTransition:function(){return F="useTransition",b(),st(),np()},useSyncExternalStore:function(e,t,a){return F="useSyncExternalStore",b(),st(),qm(e,t,a)},useId:function(){return F="useId",b(),st(),op()},useFormState:function(e,t){return F="useFormState",b(),st(),xi(e,t)},useActionState:function(e,t){return F="useActionState",b(),st(),xi(e,t)},useOptimistic:function(e){return F="useOptimistic",b(),st(),Fm(e)},useMemoCache:function(e){return b(),Ur(e)},useHostTransitionStatus:jr,useCacheRefresh:function(){return F="useCacheRefresh",st(),rp()},useEffectEvent:function(e){return F="useEffectEvent",b(),st(),Zm(e)}},cn={readContext:function(e){return g(),Bt(e)},use:function(e){return b(),Lo(e)},useCallback:function(e,t){return F="useCallback",b(),re(),ad(e,t)},useContext:function(e){return F="useContext",b(),re(),Bt(e)},useEffect:function(e,t){F="useEffect",b(),re(),ns(2048,Wa,e,t)},useImperativeHandle:function(e,t,a){return F="useImperativeHandle",b(),re(),td(e,t,a)},useInsertionEffect:function(e,t){return F="useInsertionEffect",b(),re(),ns(4,Ka,e,t)},useLayoutEffect:function(e,t){return F="useLayoutEffect",b(),re(),ns(4,Ds,e,t)},useMemo:function(e,t){F="useMemo",b(),re();var a=Q.H;Q.H=cn;try{return sd(e,t)}finally{Q.H=a}},useReducer:function(e,t,a){F="useReducer",b(),re();var s=Q.H;Q.H=cn;try{return yi(e,t,a)}finally{Q.H=s}},useRef:function(){return F="useRef",b(),re(),wt().memoizedState},useState:function(){F="useState",b(),re();var e=Q.H;Q.H=cn;try{return yi(sn)}finally{Q.H=e}},useDebugValue:function(){F="useDebugValue",b(),re()},useDeferredValue:function(e,t){return F="useDeferredValue",b(),re(),Xy(e,t)},useTransition:function(){return F="useTransition",b(),re(),ex()},useSyncExternalStore:function(e,t,a){return F="useSyncExternalStore",b(),re(),Zu(e,t,a)},useId:function(){return F="useId",b(),re(),wt().memoizedState},useFormState:function(e){return F="useFormState",b(),re(),Ju(e)},useActionState:function(e){return F="useActionState",b(),re(),Ju(e)},useOptimistic:function(e,t){return F="useOptimistic",b(),re(),Ly(e,t)},useMemoCache:function(e){return b(),Ur(e)},useHostTransitionStatus:jr,useCacheRefresh:function(){return F="useCacheRefresh",re(),wt().memoizedState},useEffectEvent:function(e){return F="useEffectEvent",b(),re(),ed(e)}},rf={readContext:function(e){return g(),Bt(e)},use:function(e){return b(),Lo(e)},useCallback:function(e,t){return F="useCallback",b(),re(),ad(e,t)},useContext:function(e){return F="useContext",b(),re(),Bt(e)},useEffect:function(e,t){F="useEffect",b(),re(),ns(2048,Wa,e,t)},useImperativeHandle:function(e,t,a){return F="useImperativeHandle",b(),re(),td(e,t,a)},useInsertionEffect:function(e,t){return F="useInsertionEffect",b(),re(),ns(4,Ka,e,t)},useLayoutEffect:function(e,t){return F="useLayoutEffect",b(),re(),ns(4,Ds,e,t)},useMemo:function(e,t){F="useMemo",b(),re();var a=Q.H;Q.H=cn;try{return sd(e,t)}finally{Q.H=a}},useReducer:function(e,t,a){F="useReducer",b(),re();var s=Q.H;Q.H=cn;try{return $l(e,t,a)}finally{Q.H=s}},useRef:function(){return F="useRef",b(),re(),wt().memoizedState},useState:function(){F="useState",b(),re();var e=Q.H;Q.H=cn;try{return $l(sn)}finally{Q.H=e}},useDebugValue:function(){F="useDebugValue",b(),re()},useDeferredValue:function(e,t){return F="useDeferredValue",b(),re(),Qy(e,t)},useTransition:function(){return F="useTransition",b(),re(),tx()},useSyncExternalStore:function(e,t,a){return F="useSyncExternalStore",b(),re(),Zu(e,t,a)},useId:function(){return F="useId",b(),re(),wt().memoizedState},useFormState:function(e){return F="useFormState",b(),re(),Ku(e)},useActionState:function(e){return F="useActionState",b(),re(),Ku(e)},useOptimistic:function(e,t){return F="useOptimistic",b(),re(),$y(e,t)},useMemoCache:function(e){return b(),Ur(e)},useHostTransitionStatus:jr,useCacheRefresh:function(){return F="useCacheRefresh",re(),wt().memoizedState},useEffectEvent:function(e){return F="useEffectEvent",b(),re(),ed(e)}};var GN={},PN=new Set,FN=new Set,XN=new Set,QN=new Set,ZN=new Set,JN=new Set,KN=new Set,WN=new Set,e1=new Set,t1=new Set;Object.freeze(GN);var nb={enqueueSetState:function(e,t,a){e=e._reactInternals;var s=xs(e),r=Ao(s);r.payload=t,a!=null&&(lp(a),r.callback=a),t=Vo(e,r,s),t!==null&&(Sn(s,"this.setState()",e),Xt(t,e,s),Ml(t,e,s))},enqueueReplaceState:function(e,t,a){e=e._reactInternals;var s=xs(e),r=Ao(s);r.tag=zN,r.payload=t,a!=null&&(lp(a),r.callback=a),t=Vo(e,r,s),t!==null&&(Sn(s,"this.replaceState()",e),Xt(t,e,s),Ml(t,e,s))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var a=xs(e),s=Ao(a);s.tag=LN,t!=null&&(lp(t),s.callback=t),t=Vo(e,s,a),t!==null&&(Sn(a,"this.forceUpdate()",e),Xt(t,e,a),Ml(t,e,a))}},al=null,ob=null,rb=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."),fa=!1,a1={},s1={},n1={},o1={},sl=!1,r1={},lf={},ib={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null},i1=!1,l1=null;l1=new Set;var yo=!1,ma=!1,lb=!1,c1=typeof WeakSet=="function"?WeakSet:Set,Ua=null,nl=null,ol=null,pa=null,is=!1,un=null,va=!1,Mc=8192,J_={getCacheForType:function(e){var t=Bt(ca),a=t.data.get(e);return a===void 0&&(a=e(),t.data.set(e,a)),a},cacheSignal:function(){return Bt(ca).controller.signal},getOwner:function(){return Ss}};if(typeof Symbol=="function"&&Symbol.for){var zc=Symbol.for;zc("selector.component"),zc("selector.has_pseudo_class"),zc("selector.role"),zc("selector.test_id"),zc("selector.text")}var K_=[],W_=typeof WeakMap=="function"?WeakMap:Map,Ca=0,Na=2,_s=4,xo=0,Lc=1,Xr=2,cf=3,ar=4,uf=6,u1=5,bt=Ca,kt=null,at=null,et=0,ls=0,df=1,Qr=2,Hc=3,d1=4,cb=5,$c=6,ff=7,ub=8,Zr=9,Et=ls,Rs=null,sr=!1,rl=!1,db=!1,Gn=0,Ft=xo,nr=0,or=0,fb=0,cs=0,Jr=0,Bc=null,es=null,mf=!1,pf=0,f1=0,m1=300,hf=1/0,p1=500,Ic=null,Jt=null,rr=null,bf=0,mb=1,pb=2,h1=3,ir=0,b1=1,g1=2,y1=3,x1=4,gf=5,ha=0,lr=null,il=null,dn=0,hb=0,bb=-0,gb=null,v1=null,N1=null,fn=bf,S1=null,eR=50,Yc=0,yb=null,xb=!1,yf=!1,tR=50,Kr=0,qc=null,ll=!1,xf=null,w1=!1,E1=new Set,aR={},vf=null,cl=null,vb=!1,Nb=!1,Nf=!1,Sb=!1,cr=0,wb={};(function(){for(var e=0;e<Ah.length;e++){var t=Ah[e],a=t.toLowerCase();t=t[0].toUpperCase()+t.slice(1),tn(a,"on"+t)}tn(eN,"onAnimationEnd"),tn(tN,"onAnimationIteration"),tn(aN,"onAnimationStart"),tn("dblclick","onDoubleClick"),tn("focusin","onFocus"),tn("focusout","onBlur"),tn(j_,"onTransitionRun"),tn(T_,"onTransitionStart"),tn(O_,"onTransitionCancel"),tn(sN,"onTransitionEnd")})(),Me("onMouseEnter",["mouseout","mouseover"]),Me("onMouseLeave",["mouseout","mouseover"]),Me("onPointerEnter",["pointerout","pointerover"]),Me("onPointerLeave",["pointerout","pointerover"]),$e("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),$e("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),$e("onBeforeInput",["compositionend","keypress","textInput","paste"]),$e("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),$e("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Gc="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(" "),Eb=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Gc)),Sf="_reactListening"+Math.random().toString(36).slice(2),D1=!1,_1=!1,wf=!1,R1=!1,Ef=!1,Df=!1,k1=!1,_f={},sR=/\r\n?/g,nR=/\u0000|\uFFFD/g,Wr="http://www.w3.org/1999/xlink",Db="http://www.w3.org/XML/1998/namespace",oR="javascript:throw new Error('React form unexpectedly submitted.')",rR="suppressHydrationWarning",ei="&",Rf="/&",Pc="$",Fc="/$",ur="$?",ti="$~",ul="$!",iR="html",lR="body",cR="head",_b="F!",U1="F",C1="loading",uR="style",vo=0,dl=1,kf=2,Rb=null,kb=null,j1={dialog:!0,webview:!0},Ub=null,Xc=void 0,T1=typeof setTimeout=="function"?setTimeout:void 0,dR=typeof clearTimeout=="function"?clearTimeout:void 0,ai=-1,O1=typeof Promise=="function"?Promise:void 0,fR=typeof queueMicrotask=="function"?queueMicrotask:typeof O1<"u"?function(e){return O1.resolve(null).then(e).catch(XE)}:T1,Cb=null,si=0,Qc=1,A1=2,V1=3,Ps=4,Fs=new Map,M1=new Set,No=St.d;St.d={f:function(){var e=No.f(),t=Ei();return e||t},r:function(e){var t=B(e);t!==null&&t.tag===5&&t.type==="form"?Wy(t):No.r(e)},D:function(e){No.D(e),P0("dns-prefetch",e,null)},C:function(e,t){No.C(e,t),P0("preconnect",e,t)},L:function(e,t,a){No.L(e,t,a);var s=fl;if(s&&e&&t){var r='link[rel="preload"][as="'+ve(t)+'"]';t==="image"&&a&&a.imageSrcSet?(r+='[imagesrcset="'+ve(a.imageSrcSet)+'"]',typeof a.imageSizes=="string"&&(r+='[imagesizes="'+ve(a.imageSizes)+'"]')):r+='[href="'+ve(e)+'"]';var i=r;switch(t){case"style":i=Ri(e);break;case"script":i=ki(e)}Fs.has(i)||(e=nt({rel:"preload",href:t==="image"&&a&&a.imageSrcSet?void 0:e,as:t},a),Fs.set(i,e),s.querySelector(r)!==null||t==="style"&&s.querySelector(tc(i))||t==="script"&&s.querySelector(ac(i))||(t=s.createElement("link"),Aa(t,"link",e),le(t),s.head.appendChild(t)))}},m:function(e,t){No.m(e,t);var a=fl;if(a&&e){var s=t&&typeof t.as=="string"?t.as:"script",r='link[rel="modulepreload"][as="'+ve(s)+'"][href="'+ve(e)+'"]',i=r;switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":i=ki(e)}if(!Fs.has(i)&&(e=nt({rel:"modulepreload",href:e},t),Fs.set(i,e),a.querySelector(r)===null)){switch(s){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(a.querySelector(ac(i)))return}s=a.createElement("link"),Aa(s,"link",e),le(s),a.head.appendChild(s)}}},X:function(e,t){No.X(e,t);var a=fl;if(a&&e){var s=Ne(a).hoistableScripts,r=ki(e),i=s.get(r);i||(i=a.querySelector(ac(r)),i||(e=nt({src:e,async:!0},t),(t=Fs.get(r))&&Kp(e,t),i=a.createElement("script"),le(i),Aa(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}},S:function(e,t,a){No.S(e,t,a);var s=fl;if(s&&e){var r=Ne(s).hoistableStyles,i=Ri(e);t=t||"default";var m=r.get(i);if(!m){var h={loading:si,preload:null};if(m=s.querySelector(tc(i)))h.loading=Qc|Ps;else{e=nt({rel:"stylesheet",href:e,"data-precedence":t},a),(a=Fs.get(i))&&Jp(e,a);var v=m=s.createElement("link");le(v),Aa(v,"link",e),v._p=new Promise(function(D,M){v.onload=D,v.onerror=M}),v.addEventListener("load",function(){h.loading|=Qc}),v.addEventListener("error",function(){h.loading|=A1}),h.loading|=Ps,Sd(m,t,s)}m={type:"stylesheet",instance:m,count:1,state:h},r.set(i,m)}}},M:function(e,t){No.M(e,t);var a=fl;if(a&&e){var s=Ne(a).hoistableScripts,r=ki(e),i=s.get(r);i||(i=a.querySelector(ac(r)),i||(e=nt({src:e,async:!0,type:"module"},t),(t=Fs.get(r))&&Kp(e,t),i=a.createElement("script"),le(i),Aa(i,"link",e),a.head.appendChild(i)),i={type:"script",instance:i,count:1,state:null},s.set(r,i))}}};var fl=typeof document>"u"?null:document,Uf=null,mR=6e4,pR=800,hR=500,jb=0,Tb=null,Cf=null,ni=UD,Zc={$$typeof:Mn,Provider:null,Consumer:null,_currentValue:ni,_currentValue2:ni,_threadCount:0},z1="%c%s%c",L1="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",H1="",jf=" ",bR=Function.prototype.bind,$1=!1,B1=null,I1=null,Y1=null,q1=null,G1=null,P1=null,F1=null,X1=null,Q1=null,Z1=null;B1=function(e,t,a,s){t=n(e,t),t!==null&&(a=o(t.memoizedState,a,0,s),t.memoizedState=a,t.baseState=a,e.memoizedProps=nt({},e.memoizedProps),a=Ha(e,2),a!==null&&Xt(a,e,2))},I1=function(e,t,a){t=n(e,t),t!==null&&(a=u(t.memoizedState,a,0),t.memoizedState=a,t.baseState=a,e.memoizedProps=nt({},e.memoizedProps),a=Ha(e,2),a!==null&&Xt(a,e,2))},Y1=function(e,t,a,s){t=n(e,t),t!==null&&(a=l(t.memoizedState,a,s),t.memoizedState=a,t.baseState=a,e.memoizedProps=nt({},e.memoizedProps),a=Ha(e,2),a!==null&&Xt(a,e,2))},q1=function(e,t,a){e.pendingProps=o(e.memoizedProps,t,0,a),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=Ha(e,2),t!==null&&Xt(t,e,2)},G1=function(e,t){e.pendingProps=u(e.memoizedProps,t,0),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=Ha(e,2),t!==null&&Xt(t,e,2)},P1=function(e,t,a){e.pendingProps=l(e.memoizedProps,t,a),e.alternate&&(e.alternate.pendingProps=e.pendingProps),t=Ha(e,2),t!==null&&Xt(t,e,2)},F1=function(e){var t=Ha(e,2);t!==null&&Xt(t,e,2)},X1=function(e){var t=_e(),a=Ha(e,t);a!==null&&Xt(a,e,t)},Q1=function(e){p=e},Z1=function(e){d=e};var Tf=!0,Of=null,Ob=!1,dr=null,fr=null,mr=null,Jc=new Map,Kc=new Map,pr=[],gR="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(" "),Af=null;if(Rd.prototype.render=nh.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error("Cannot update an unmounted root.");var a=arguments;typeof a[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()."):H(a[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."):typeof a[1]<"u"&&console.error("You passed a second argument to root.render(...) but it only accepts one argument."),a=e;var s=t.current,r=xs(s);Wp(s,r,a,t,null,null)},Rd.prototype.unmount=nh.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;(bt&(Na|_s))!==Ca&&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."),Wp(e.current,2,null,e,null,null),Ei(),t[Go]=null}},Rd.prototype.unstable_scheduleHydration=function(e){if(e){var t=ke();e={blockedOn:null,target:e,priority:t};for(var a=0;a<pr.length&&t!==0&&t<pr[a].priority;a++);pr.splice(a,0,e),a===0&&rv(e)}},(function(){var e=oh.version;if(e!=="19.2.4")throw Error(`Incompatible React versions: The "react" and "react-dom" packages must have the exact same version. Instead got:
229
+ - react: `+(e+`
230
+ - react-dom: 19.2.4
231
+ 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"),St.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=ee(t),e=e!==null?ce(e):null,e=e===null?null:e.stateNode,e},!(function(){var e={bundleType:1,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:Q,reconcilerVersion:"19.2.4"};return e.overrideHookState=B1,e.overrideHookStateDeletePath=I1,e.overrideHookStateRenamePath=Y1,e.overrideProps=q1,e.overridePropsDeletePath=G1,e.overridePropsRenamePath=P1,e.scheduleUpdate=F1,e.scheduleRetry=X1,e.setErrorHandler=Q1,e.setSuspenseHandler=Z1,e.scheduleRefresh=R,e.scheduleRoot=_,e.setRefreshHandler=z,e.getCurrentFiber=vD,ds(e)})()&&Bn&&window.top===window.self&&(-1<navigator.userAgent.indexOf("Chrome")&&navigator.userAgent.indexOf("Edge")===-1||-1<navigator.userAgent.indexOf("Firefox"))){var J1=window.location.protocol;/^(https?|file):$/.test(J1)&&console.info("%cDownload the React DevTools for a better development experience: https://react.dev/link/react-devtools"+(J1==="file:"?`
232
+ You might need to use a local HTTP server (instead of file://): https://react.dev/link/react-devtools-faq`:""),"font-weight:bold")}eu.createRoot=function(e,t){if(!H(e))throw Error("Target container is not a DOM element.");uv(e);var a=!1,s="",r=ix,i=lx,m=cx;return t!=null&&(t.hydrate?console.warn("hydrate through createRoot is deprecated. Use ReactDOMClient.hydrateRoot(container, <App />) instead."):typeof t=="object"&&t!==null&&t.$$typeof===Vn&&console.error(`You passed a JSX element to createRoot. You probably meant to call root.render instead. Example usage:
233
+
234
+ let root = createRoot(domContainer);
235
+ root.render(<App />);`),t.unstable_strictMode===!0&&(a=!0),t.identifierPrefix!==void 0&&(s=t.identifierPrefix),t.onUncaughtError!==void 0&&(r=t.onUncaughtError),t.onCaughtError!==void 0&&(i=t.onCaughtError),t.onRecoverableError!==void 0&&(m=t.onRecoverableError)),t=W0(e,1,!1,null,null,a,s,null,r,i,m,cv),e[Go]=t.current,Hp(e),new nh(t)},eu.hydrateRoot=function(e,t,a){if(!H(e))throw Error("Target container is not a DOM element.");uv(e),t===void 0&&console.error("Must provide initial children as second argument to hydrateRoot. Example usage: hydrateRoot(domContainer, <App />)");var s=!1,r="",i=ix,m=lx,h=cx,v=null;return a!=null&&(a.unstable_strictMode===!0&&(s=!0),a.identifierPrefix!==void 0&&(r=a.identifierPrefix),a.onUncaughtError!==void 0&&(i=a.onUncaughtError),a.onCaughtError!==void 0&&(m=a.onCaughtError),a.onRecoverableError!==void 0&&(h=a.onRecoverableError),a.formState!==void 0&&(v=a.formState)),t=W0(e,1,!0,t,a??null,s,r,v,i,m,h,cv),t.context=ev(null),a=t.current,s=xs(a),s=wa(s),r=Ao(s),r.callback=null,Vo(a,r,s),Sn(s,"hydrateRoot()",null),a=s,t.current.lanes=a,tt(t,a),On(t),e[Go]=t.current,Hp(e),new Rd(t)},eu.version="19.2.4",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})(),eu}var kS;function Vk(){return kS||(kS=1,Bb.exports=Ak()),Bb.exports}var Mk=Vk();var M4=n=>{throw TypeError(n)},zk=(n,o,l)=>o.has(n)||M4("Cannot "+l),Gb=(n,o,l)=>(zk(n,o,"read from private field"),l?l.call(n):o.get(n)),Lk=(n,o,l)=>o.has(n)?M4("Cannot add the same private member more than once"):o instanceof WeakSet?o.add(n):o.set(n,l),US="popstate";function CS(n){return typeof n=="object"&&n!=null&&"pathname"in n&&"search"in n&&"hash"in n&&"state"in n&&"key"in n}function Hk(n={}){function o(c,u){let d=u.state?.masked,{pathname:p,search:b,hash:g}=d||c.location;return fu("",{pathname:p,search:b,hash:g},u.state&&u.state.usr||null,u.state&&u.state.key||"default",d?{pathname:c.location.pathname,search:c.location.search,hash:c.location.hash}:void 0)}function l(c,u){return typeof u=="string"?u:Xn(u)}return Bk(o,l,null,n)}function it(n,o){if(n===!1||n===null||typeof n>"u")throw new Error(o)}function Kt(n,o){if(!n){typeof console<"u"&&console.warn(o);try{throw new Error(o)}catch{}}}function $k(){return Math.random().toString(36).substring(2,10)}function jS(n,o){return{usr:n.state,key:n.key,idx:o,masked:n.unstable_mask?{pathname:n.pathname,search:n.search,hash:n.hash}:void 0}}function fu(n,o,l=null,c,u){return{pathname:typeof n=="string"?n:n.pathname,search:"",hash:"",...typeof o=="string"?Do(o):o,state:l,key:o&&o.key||c||$k(),unstable_mask:u}}function Xn({pathname:n="/",search:o="",hash:l=""}){return o&&o!=="?"&&(n+=o.charAt(0)==="?"?o:"?"+o),l&&l!=="#"&&(n+=l.charAt(0)==="#"?l:"#"+l),n}function Do(n){let o={};if(n){let l=n.indexOf("#");l>=0&&(o.hash=n.substring(l),n=n.substring(0,l));let c=n.indexOf("?");c>=0&&(o.search=n.substring(c),n=n.substring(0,c)),n&&(o.pathname=n)}return o}function Bk(n,o,l,c={}){let{window:u=document.defaultView,v5Compat:d=!1}=c,p=u.history,b="POP",g=null,y=E();y==null&&(y=0,p.replaceState({...p.state,idx:y},""));function E(){return(p.state||{idx:null}).idx}function x(){b="POP";let H=E(),Y=H==null?null:H-y;y=H,g&&g({action:b,location:z.location,delta:Y})}function S(H,Y){b="PUSH";let K=CS(H)?H:fu(z.location,H,Y);y=E()+1;let Z=jS(K,y),J=z.createHref(K.unstable_mask||K);try{p.pushState(Z,"",J)}catch(ee){if(ee instanceof DOMException&&ee.name==="DataCloneError")throw ee;u.location.assign(J)}d&&g&&g({action:b,location:z.location,delta:1})}function _(H,Y){b="REPLACE";let K=CS(H)?H:fu(z.location,H,Y);y=E();let Z=jS(K,y),J=z.createHref(K.unstable_mask||K);p.replaceState(Z,"",J),d&&g&&g({action:b,location:z.location,delta:0})}function R(H){return z4(H)}let z={get action(){return b},get location(){return n(u,p)},listen(H){if(g)throw new Error("A history only accepts one active listener");return u.addEventListener(US,x),g=H,()=>{u.removeEventListener(US,x),g=null}},createHref(H){return o(u,H)},createURL:R,encodeLocation(H){let Y=R(H);return{pathname:Y.pathname,search:Y.search,hash:Y.hash}},push:S,replace:_,go(H){return p.go(H)}};return z}function z4(n,o=!1){let l="http://localhost";typeof window<"u"&&(l=window.location.origin!=="null"?window.location.origin:window.location.href),it(l,"No window.location.(origin|href) available to create URL");let c=typeof n=="string"?n:Xn(n);return c=c.replace(/ $/,"%20"),!o&&c.startsWith("//")&&(c=l+c),new URL(c,l)}var ou,TS=class{constructor(n){if(Lk(this,ou,new Map),n)for(let[o,l]of n)this.set(o,l)}get(n){if(Gb(this,ou).has(n))return Gb(this,ou).get(n);if(n.defaultValue!==void 0)return n.defaultValue;throw new Error("No value found for context")}set(n,o){Gb(this,ou).set(n,o)}};ou=new WeakMap;var Ik=new Set(["lazy","caseSensitive","path","id","index","children"]);function Yk(n){return Ik.has(n)}var qk=new Set(["lazy","caseSensitive","path","id","index","middleware","children"]);function Gk(n){return qk.has(n)}function Pk(n){return n.index===!0}function mu(n,o,l=[],c={},u=!1){return n.map((d,p)=>{let b=[...l,String(p)],g=typeof d.id=="string"?d.id:b.join("-");if(it(d.index!==!0||!d.children,"Cannot specify children on an index route"),it(u||!c[g],`Found a route id collision on id "${g}". Route id's must be globally unique within Data Router usages`),Pk(d)){let y={...d,id:g};return c[g]=OS(y,o(y)),y}else{let y={...d,id:g,children:void 0};return c[g]=OS(y,o(y)),d.children&&(y.children=mu(d.children,o,b,c,u)),y}})}function OS(n,o){return Object.assign(n,{...o,...typeof o.lazy=="object"&&o.lazy!=null?{lazy:{...n.lazy,...o.lazy}}:{}})}function hr(n,o,l="/"){return ru(n,o,l,!1)}function ru(n,o,l,c){let u=typeof o=="string"?Do(o):o,d=Zs(u.pathname||"/",l);if(d==null)return null;let p=L4(n);Xk(p);let b=null;for(let g=0;b==null&&g<p.length;++g){let y=oU(d);b=sU(p[g],y,c)}return b}function Fk(n,o){let{route:l,pathname:c,params:u}=n;return{id:l.id,pathname:c,params:u,data:o[l.id],loaderData:o[l.id],handle:l.handle}}function L4(n,o=[],l=[],c="",u=!1){let d=(p,b,g=u,y)=>{let E={relativePath:y===void 0?p.path||"":y,caseSensitive:p.caseSensitive===!0,childrenIndex:b,route:p};if(E.relativePath.startsWith("/")){if(!E.relativePath.startsWith(c)&&g)return;it(E.relativePath.startsWith(c),`Absolute route path "${E.relativePath}" nested under path "${c}" is not valid. An absolute child route path must start with the combined path of all its parent routes.`),E.relativePath=E.relativePath.slice(c.length)}let x=mn([c,E.relativePath]),S=l.concat(E);p.children&&p.children.length>0&&(it(p.index!==!0,`Index routes must not have child routes. Please remove all child routes from route path "${x}".`),L4(p.children,o,S,x,g)),!(p.path==null&&!p.index)&&o.push({path:x,score:tU(x,p.index),routesMeta:S})};return n.forEach((p,b)=>{if(p.path===""||!p.path?.includes("?"))d(p,b);else for(let g of H4(p.path))d(p,b,!0,g)}),o}function H4(n){let o=n.split("/");if(o.length===0)return[];let[l,...c]=o,u=l.endsWith("?"),d=l.replace(/\?$/,"");if(c.length===0)return u?[d,""]:[d];let p=H4(c.join("/")),b=[];return b.push(...p.map(g=>g===""?d:[d,g].join("/"))),u&&b.push(...p),b.map(g=>n.startsWith("/")&&g===""?"/":g)}function Xk(n){n.sort((o,l)=>o.score!==l.score?l.score-o.score:aU(o.routesMeta.map(c=>c.childrenIndex),l.routesMeta.map(c=>c.childrenIndex)))}var Qk=/^:[\w-]+$/,Zk=3,Jk=2,Kk=1,Wk=10,eU=-2,AS=n=>n==="*";function tU(n,o){let l=n.split("/"),c=l.length;return l.some(AS)&&(c+=eU),o&&(c+=Jk),l.filter(u=>!AS(u)).reduce((u,d)=>u+(Qk.test(d)?Zk:d===""?Kk:Wk),c)}function aU(n,o){return n.length===o.length&&n.slice(0,-1).every((c,u)=>c===o[u])?n[n.length-1]-o[o.length-1]:0}function sU(n,o,l=!1){let{routesMeta:c}=n,u={},d="/",p=[];for(let b=0;b<c.length;++b){let g=c[b],y=b===c.length-1,E=d==="/"?o:o.slice(d.length)||"/",x=Zf({path:g.relativePath,caseSensitive:g.caseSensitive,end:y},E),S=g.route;if(!x&&y&&l&&!c[c.length-1].route.index&&(x=Zf({path:g.relativePath,caseSensitive:g.caseSensitive,end:!1},E)),!x)return null;Object.assign(u,x.params),p.push({params:u,pathname:mn([d,x.pathname]),pathnameBase:lU(mn([d,x.pathnameBase])),route:S}),x.pathnameBase!=="/"&&(d=mn([d,x.pathnameBase]))}return p}function Zf(n,o){typeof n=="string"&&(n={path:n,caseSensitive:!1,end:!0});let[l,c]=nU(n.path,n.caseSensitive,n.end),u=o.match(l);if(!u)return null;let d=u[0],p=d.replace(/(.)\/+$/,"$1"),b=u.slice(1);return{params:c.reduce((y,{paramName:E,isOptional:x},S)=>{if(E==="*"){let R=b[S]||"";p=d.slice(0,d.length-R.length).replace(/(.)\/+$/,"$1")}const _=b[S];return x&&!_?y[E]=void 0:y[E]=(_||"").replace(/%2F/g,"/"),y},{}),pathname:d,pathnameBase:p,pattern:n}}function nU(n,o=!1,l=!0){Kt(n==="*"||!n.endsWith("*")||n.endsWith("/*"),`Route path "${n}" will be treated as if it were "${n.replace(/\*$/,"/*")}" because the \`*\` character must always follow a \`/\` in the pattern. To get rid of this warning, please change the route path to "${n.replace(/\*$/,"/*")}".`);let c=[],u="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(p,b,g,y,E)=>{if(c.push({paramName:b,isOptional:g!=null}),g){let x=E.charAt(y+p.length);return x&&x!=="/"?"/([^\\/]*)":"(?:/([^\\/]*))?"}return"/([^\\/]+)"}).replace(/\/([\w-]+)\?(\/|$)/g,"(/$1)?$2");return n.endsWith("*")?(c.push({paramName:"*"}),u+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):l?u+="\\/*$":n!==""&&n!=="/"&&(u+="(?:(?=\\/|$))"),[new RegExp(u,o?void 0:"i"),c]}function oU(n){try{return n.split("/").map(o=>decodeURIComponent(o).replace(/\//g,"%2F")).join("/")}catch(o){return Kt(!1,`The URL path "${n}" could not be decoded because it is a malformed URL segment. This is probably due to a bad percent encoding (${o}).`),n}}function Zs(n,o){if(o==="/")return n;if(!n.toLowerCase().startsWith(o.toLowerCase()))return null;let l=o.endsWith("/")?o.length-1:o.length,c=n.charAt(l);return c&&c!=="/"?null:n.slice(l)||"/"}function rU({basename:n,pathname:o}){return o==="/"?n:mn([n,o])}var $4=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,xg=n=>$4.test(n);function iU(n,o="/"){let{pathname:l,search:c="",hash:u=""}=typeof n=="string"?Do(n):n,d;return l?(l=l.replace(/\/\/+/g,"/"),l.startsWith("/")?d=VS(l.substring(1),"/"):d=VS(l,o)):d=o,{pathname:d,search:cU(c),hash:uU(u)}}function VS(n,o){let l=o.replace(/\/+$/,"").split("/");return n.split("/").forEach(u=>{u===".."?l.length>1&&l.pop():u!=="."&&l.push(u)}),l.length>1?l.join("/"):"/"}function Pb(n,o,l,c){return`Cannot include a '${n}' character in a manually specified \`to.${o}\` field [${JSON.stringify(c)}]. Please separate it out to the \`to.${l}\` field. Alternatively you may provide the full path as a string in <Link to="..."> and the router will parse it for you.`}function B4(n){return n.filter((o,l)=>l===0||o.route.path&&o.route.path.length>0)}function Kf(n){let o=B4(n);return o.map((l,c)=>c===o.length-1?l.pathname:l.pathnameBase)}function gu(n,o,l,c=!1){let u;typeof n=="string"?u=Do(n):(u={...n},it(!u.pathname||!u.pathname.includes("?"),Pb("?","pathname","search",u)),it(!u.pathname||!u.pathname.includes("#"),Pb("#","pathname","hash",u)),it(!u.search||!u.search.includes("#"),Pb("#","search","hash",u)));let d=n===""||u.pathname==="",p=d?"/":u.pathname,b;if(p==null)b=l;else{let x=o.length-1;if(!c&&p.startsWith("..")){let S=p.split("/");for(;S[0]==="..";)S.shift(),x-=1;u.pathname=S.join("/")}b=x>=0?o[x]:"/"}let g=iU(u,b),y=p&&p!=="/"&&p.endsWith("/"),E=(d||p===".")&&l.endsWith("/");return!g.pathname.endsWith("/")&&(y||E)&&(g.pathname+="/"),g}var mn=n=>n.join("/").replace(/\/\/+/g,"/"),lU=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),cU=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,uU=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n,yu=class{constructor(n,o,l,c=!1){this.status=n,this.statusText=o||"",this.internal=c,l instanceof Error?(this.data=l.toString(),this.error=l):this.data=l}};function Nl(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}function xu(n){return n.map(o=>o.route.path).filter(Boolean).join("/").replace(/\/\/*/g,"/")||"/"}var I4=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function Y4(n,o){let l=n;if(typeof l!="string"||!$4.test(l))return{absoluteURL:void 0,isExternal:!1,to:l};let c=l,u=!1;if(I4)try{let d=new URL(window.location.href),p=l.startsWith("//")?new URL(d.protocol+l):new URL(l),b=Zs(p.pathname,o);p.origin===d.origin&&b!=null?l=b+p.search+p.hash:u=!0}catch{Kt(!1,`<Link to="${l}"> contains an invalid URL which will probably break when clicked - please update to a valid URL path.`)}return{absoluteURL:c,isExternal:u,to:l}}var yr=Symbol("Uninstrumented");function dU(n,o){let l={lazy:[],"lazy.loader":[],"lazy.action":[],"lazy.middleware":[],middleware:[],loader:[],action:[]};n.forEach(u=>u({id:o.id,index:o.index,path:o.path,instrument(d){let p=Object.keys(l);for(let b of p)d[b]&&l[b].push(d[b])}}));let c={};if(typeof o.lazy=="function"&&l.lazy.length>0){let u=yl(l.lazy,o.lazy,()=>{});u&&(c.lazy=u)}if(typeof o.lazy=="object"){let u=o.lazy;["middleware","loader","action"].forEach(d=>{let p=u[d],b=l[`lazy.${d}`];if(typeof p=="function"&&b.length>0){let g=yl(b,p,()=>{});g&&(c.lazy=Object.assign(c.lazy||{},{[d]:g}))}})}return["loader","action"].forEach(u=>{let d=o[u];if(typeof d=="function"&&l[u].length>0){let p=d[yr]??d,b=yl(l[u],p,(...g)=>MS(g[0]));b&&(u==="loader"&&p.hydrate===!0&&(b.hydrate=!0),b[yr]=p,c[u]=b)}}),o.middleware&&o.middleware.length>0&&l.middleware.length>0&&(c.middleware=o.middleware.map(u=>{let d=u[yr]??u,p=yl(l.middleware,d,(...b)=>MS(b[0]));return p?(p[yr]=d,p):u})),c}function fU(n,o){let l={navigate:[],fetch:[]};if(o.forEach(c=>c({instrument(u){let d=Object.keys(u);for(let p of d)u[p]&&l[p].push(u[p])}})),l.navigate.length>0){let c=n.navigate[yr]??n.navigate,u=yl(l.navigate,c,(...d)=>{let[p,b]=d;return{to:typeof p=="number"||typeof p=="string"?p:p?Xn(p):".",...zS(n,b??{})}});u&&(u[yr]=c,n.navigate=u)}if(l.fetch.length>0){let c=n.fetch[yr]??n.fetch,u=yl(l.fetch,c,(...d)=>{let[p,,b,g]=d;return{href:b??".",fetcherKey:p,...zS(n,g??{})}});u&&(u[yr]=c,n.fetch=u)}return n}function yl(n,o,l){return n.length===0?null:async(...c)=>{let u=await q4(n,l(...c),()=>o(...c),n.length-1);if(u.type==="error")throw u.value;return u.value}}async function q4(n,o,l,c){let u=n[c],d;if(u){let p,b=async()=>(p?console.error("You cannot call instrumented handlers more than once"):p=q4(n,o,l,c-1),d=await p,it(d,"Expected a result"),d.type==="error"&&d.value instanceof Error?{status:"error",error:d.value}:{status:"success",error:void 0});try{await u(b,o)}catch(g){console.error("An instrumentation function threw an error:",g)}p||await b(),await p}else try{d={type:"success",value:await l()}}catch(p){d={type:"error",value:p}}return d||{type:"error",value:new Error("No result assigned in instrumentation chain.")}}function MS(n){let{request:o,context:l,params:c,unstable_pattern:u}=n;return{request:mU(o),params:{...c},unstable_pattern:u,context:pU(l)}}function zS(n,o){return{currentUrl:Xn(n.state.location),..."formMethod"in o?{formMethod:o.formMethod}:{},..."formEncType"in o?{formEncType:o.formEncType}:{},..."formData"in o?{formData:o.formData}:{},..."body"in o?{body:o.body}:{}}}function mU(n){return{method:n.method,url:n.url,headers:{get:(...o)=>n.headers.get(...o)}}}function pU(n){if(bU(n)){let o={...n};return Object.freeze(o),o}else return{get:o=>n.get(o)}}var hU=Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function bU(n){if(n===null||typeof n!="object")return!1;const o=Object.getPrototypeOf(n);return o===Object.prototype||o===null||Object.getOwnPropertyNames(o).sort().join("\0")===hU}var G4=["POST","PUT","PATCH","DELETE"],gU=new Set(G4),yU=["GET",...G4],xU=new Set(yU),P4=new Set([301,302,303,307,308]),vU=new Set([307,308]),Fb={state:"idle",location:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},NU={state:"idle",data:void 0,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0},tu={state:"unblocked",proceed:void 0,reset:void 0,location:void 0},SU=n=>({hasErrorBoundary:!!n.hasErrorBoundary}),F4="remix-router-transitions",X4=Symbol("ResetLoaderData");function wU(n){const o=n.window?n.window:typeof window<"u"?window:void 0,l=typeof o<"u"&&typeof o.document<"u"&&typeof o.document.createElement<"u";it(n.routes.length>0,"You must provide a non-empty routes array to createRouter");let c=n.hydrationRouteProperties||[],u=n.mapRouteProperties||SU,d=u;if(n.unstable_instrumentations){let C=n.unstable_instrumentations;d=$=>({...u($),...dU(C.map(X=>X.route).filter(Boolean),$)})}let p={},b=mu(n.routes,d,void 0,p),g,y=n.basename||"/";y.startsWith("/")||(y=`/${y}`);let E=n.dataStrategy||kU,x={...n.future},S=null,_=new Set,R=null,z=null,H=null,Y=n.hydrationData!=null,K=hr(b,n.history.location,y),Z=!1,J=null,ee,ce;if(K==null&&!n.patchRoutesOnNavigation){let C=Xs(404,{pathname:n.history.location.pathname}),{matches:$,route:X}=zf(b);ee=!0,ce=!ee,K=$,J={[X.id]:C}}else if(K&&!n.hydrationData&&ya(K,b,n.history.location.pathname).active&&(K=null),K)if(K.some(C=>C.route.lazy))ee=!1,ce=!ee;else if(!K.some(C=>vg(C.route)))ee=!0,ce=!ee;else{let C=n.hydrationData?n.hydrationData.loaderData:null,$=n.hydrationData?n.hydrationData.errors:null,X=K;if($){let ie=K.findIndex(me=>$[me.route.id]!==void 0);X=X.slice(0,ie+1)}ce=!1,ee=X.every(ie=>{let me=Q4(ie.route,C,$);return ce=ce||me.renderFallback,!me.shouldLoad})}else{ee=!1,ce=!ee,K=[];let C=ya(null,b,n.history.location.pathname);C.active&&C.matches&&(Z=!0,K=C.matches)}let de,k={historyAction:n.history.action,location:n.history.location,matches:K,initialized:ee,renderFallback:ce,navigation:Fb,restoreScrollPosition:n.hydrationData!=null?!1:null,preventScrollReset:!1,revalidation:"idle",loaderData:n.hydrationData&&n.hydrationData.loaderData||{},actionData:n.hydrationData&&n.hydrationData.actionData||null,errors:n.hydrationData&&n.hydrationData.errors||J,fetchers:new Map,blockers:new Map},G="POP",I=null,be=!1,se,ae=!1,pe=new Map,De=null,te=!1,ue=!1,ne=new Set,he=new Map,Te=0,P=-1,fe=new Map,Re=new Set,we=new Map,lt=new Map,Ut=new Set,Je=new Map,yt,Ct=null;function ra(){if(S=n.history.listen(({action:C,location:$,delta:X})=>{if(yt){yt(),yt=void 0;return}Kt(Je.size===0||X!=null,"You are trying to use a blocker on a POP navigation to a location that was not created by @remix-run/router. This will fail silently in production. This can happen if you are navigating outside the router via `window.history.pushState`/`window.location.hash` instead of using router navigation APIs. This can also happen if you are using createHashRouter and the user manually changes the URL.");let ie=oe({currentLocation:k.location,nextLocation:$,historyAction:C});if(ie&&X!=null){let me=new Promise(je=>{yt=je});n.history.go(X*-1),B(ie,{state:"blocked",location:$,proceed(){B(ie,{state:"proceeding",proceed:void 0,reset:void 0,location:$}),me.then(()=>n.history.go(X))},reset(){let je=new Map(k.blockers);je.set(ie,tu),ct({blockers:je})}}),I?.resolve(),I=null;return}return xt(C,$)}),l){PU(o,pe);let C=()=>FU(o,pe);o.addEventListener("pagehide",C),De=()=>o.removeEventListener("pagehide",C)}return k.initialized||xt("POP",k.location,{initialHydration:!0}),de}function ye(){S&&S(),De&&De(),_.clear(),se&&se.abort(),k.fetchers.forEach((C,$)=>wa($)),k.blockers.forEach((C,$)=>O($))}function ot(C){return _.add(C),()=>_.delete(C)}function ct(C,$={}){C.matches&&(C.matches=C.matches.map(me=>{let je=p[me.route.id],ve=me.route;return ve.element!==je.element||ve.errorElement!==je.errorElement||ve.hydrateFallbackElement!==je.hydrateFallbackElement?{...me,route:je}:me})),k={...k,...C};let X=[],ie=[];k.fetchers.forEach((me,je)=>{me.state==="idle"&&(Ut.has(je)?X.push(je):ie.push(je))}),Ut.forEach(me=>{!k.fetchers.has(me)&&!he.has(me)&&X.push(me)}),[..._].forEach(me=>me(k,{deletedFetchers:X,newErrors:C.errors??null,viewTransitionOpts:$.viewTransitionOpts,flushSync:$.flushSync===!0})),X.forEach(me=>wa(me)),ie.forEach(me=>k.fetchers.delete(me))}function jt(C,$,{flushSync:X}={}){let ie=k.actionData!=null&&k.navigation.formMethod!=null&&Ya(k.navigation.formMethod)&&k.navigation.state==="loading"&&C.state?._isRedirect!==!0,me;$.actionData?Object.keys($.actionData).length>0?me=$.actionData:me=null:ie?me=k.actionData:me=null;let je=$.loaderData?FS(k.loaderData,$.loaderData,$.matches||[],$.errors):k.loaderData,ve=k.blockers;ve.size>0&&(ve=new Map(ve),ve.forEach((Le,Oe)=>ve.set(Oe,tu)));let Ae=te?!1:Dt(C,$.matches||k.matches),Ue=be===!0||k.navigation.formMethod!=null&&Ya(k.navigation.formMethod)&&C.state?._isRedirect!==!0;g&&(b=g,g=void 0),te||G==="POP"||(G==="PUSH"?n.history.push(C,C.state):G==="REPLACE"&&n.history.replace(C,C.state));let He;if(G==="POP"){let Le=pe.get(k.location.pathname);Le&&Le.has(C.pathname)?He={currentLocation:k.location,nextLocation:C}:pe.has(C.pathname)&&(He={currentLocation:C,nextLocation:k.location})}else if(ae){let Le=pe.get(k.location.pathname);Le?Le.add(C.pathname):(Le=new Set([C.pathname]),pe.set(k.location.pathname,Le)),He={currentLocation:k.location,nextLocation:C}}ct({...$,actionData:me,loaderData:je,historyAction:G,location:C,initialized:!0,renderFallback:!1,navigation:Fb,revalidation:"idle",restoreScrollPosition:Ae,preventScrollReset:Ue,blockers:ve},{viewTransitionOpts:He,flushSync:X===!0}),G="POP",be=!1,ae=!1,te=!1,ue=!1,I?.resolve(),I=null,Ct?.resolve(),Ct=null}async function qt(C,$){if(I?.resolve(),I=null,typeof C=="number"){I||(I=JS());let At=I.promise;return n.history.go(C),At}let X=lg(k.location,k.matches,y,C,$?.fromRouteId,$?.relative),{path:ie,submission:me,error:je}=LS(!1,X,$),ve;$?.unstable_mask&&(ve={pathname:"",search:"",hash:"",...typeof $.unstable_mask=="string"?Do($.unstable_mask):{...k.location.unstable_mask,...$.unstable_mask}});let Ae=k.location,Ue=fu(Ae,ie,$&&$.state,void 0,ve);Ue={...Ue,...n.history.encodeLocation(Ue)};let He=$&&$.replace!=null?$.replace:void 0,Le="PUSH";He===!0?Le="REPLACE":He===!1||me!=null&&Ya(me.formMethod)&&me.formAction===k.location.pathname+k.location.search&&(Le="REPLACE");let Oe=$&&"preventScrollReset"in $?$.preventScrollReset===!0:void 0,gt=($&&$.flushSync)===!0,rt=oe({currentLocation:Ae,nextLocation:Ue,historyAction:Le});if(rt){B(rt,{state:"blocked",location:Ue,proceed(){B(rt,{state:"proceeding",proceed:void 0,reset:void 0,location:Ue}),qt(C,$)},reset(){let At=new Map(k.blockers);At.set(rt,tu),ct({blockers:At})}});return}await xt(Le,Ue,{submission:me,pendingError:je,preventScrollReset:Oe,replace:$&&$.replace,enableViewTransition:$&&$.viewTransition,flushSync:gt,callSiteDefaultShouldRevalidate:$&&$.unstable_defaultShouldRevalidate})}function Xe(){Ct||(Ct=JS()),tt(),ct({revalidation:"loading"});let C=Ct.promise;return k.navigation.state==="submitting"?C:k.navigation.state==="idle"?(xt(k.historyAction,k.location,{startUninterruptedRevalidation:!0}),C):(xt(G||k.historyAction,k.navigation.location,{overrideNavigation:k.navigation,enableViewTransition:ae===!0}),C)}async function xt(C,$,X){se&&se.abort(),se=null,G=C,te=(X&&X.startUninterruptedRevalidation)===!0,Me(k.location,k.matches),be=(X&&X.preventScrollReset)===!0,ae=(X&&X.enableViewTransition)===!0;let ie=g||b,me=X&&X.overrideNavigation,je=X?.initialHydration&&k.matches&&k.matches.length>0&&!Z?k.matches:hr(ie,$,y),ve=(X&&X.flushSync)===!0;if(je&&k.initialized&&!ue&&MU(k.location,$)&&!(X&&X.submission&&Ya(X.submission.formMethod))){jt($,{matches:je},{flushSync:ve});return}let Ae=ya(je,ie,$.pathname);if(Ae.active&&Ae.matches&&(je=Ae.matches),!je){let{error:aa,notFoundMatches:Ea,route:vt}=Ne($.pathname);jt($,{matches:Ea,loaderData:{},errors:{[vt.id]:aa}},{flushSync:ve});return}se=new AbortController;let Ue=bl(n.history,$,se.signal,X&&X.submission),He=n.getContext?await n.getContext():new TS,Le;if(X&&X.pendingError)Le=[br(je).route.id,{type:"error",error:X.pendingError}];else if(X&&X.submission&&Ya(X.submission.formMethod)){let aa=await ba(Ue,$,X.submission,je,He,Ae.active,X&&X.initialHydration===!0,{replace:X.replace,flushSync:ve});if(aa.shortCircuited)return;if(aa.pendingActionResult){let[Ea,vt]=aa.pendingActionResult;if(ks(vt)&&Nl(vt.error)&&vt.error.status===404){se=null,jt($,{matches:aa.matches,loaderData:{},errors:{[Ea]:vt.error}});return}}je=aa.matches||je,Le=aa.pendingActionResult,me=Xb($,X.submission),ve=!1,Ae.active=!1,Ue=bl(n.history,Ue.url,Ue.signal)}let{shortCircuited:Oe,matches:gt,loaderData:rt,errors:At}=await ds(Ue,$,je,He,Ae.active,me,X&&X.submission,X&&X.fetcherSubmission,X&&X.replace,X&&X.initialHydration===!0,ve,Le,X&&X.callSiteDefaultShouldRevalidate);Oe||(se=null,jt($,{matches:gt||je,...XS(Le),loaderData:rt,errors:At}))}async function ba(C,$,X,ie,me,je,ve,Ae={}){tt();let Ue=qU($,X);if(ct({navigation:Ue},{flushSync:Ae.flushSync===!0}),je){let Oe=await js(ie,$.pathname,C.signal);if(Oe.type==="aborted")return{shortCircuited:!0};if(Oe.type==="error"){if(Oe.partialMatches.length===0){let{matches:rt,route:At}=zf(b);return{matches:rt,pendingActionResult:[At.id,{type:"error",error:Oe.error}]}}let gt=br(Oe.partialMatches).route.id;return{matches:Oe.partialMatches,pendingActionResult:[gt,{type:"error",error:Oe.error}]}}else if(Oe.matches)ie=Oe.matches;else{let{notFoundMatches:gt,error:rt,route:At}=Ne($.pathname);return{matches:gt,pendingActionResult:[At.id,{type:"error",error:rt}]}}}let He,Le=qf(ie,$);if(!Le.route.action&&!Le.route.lazy)He={type:"error",error:Xs(405,{method:C.method,pathname:$.pathname,routeId:Le.route.id})};else{let Oe=xl(d,p,C,ie,Le,ve?[]:c,me),gt=await _e(C,Oe,me,null);if(He=gt[Le.route.id],!He){for(let rt of ie)if(gt[rt.route.id]){He=gt[rt.route.id];break}}if(C.signal.aborted)return{shortCircuited:!0}}if(ri(He)){let Oe;return Ae&&Ae.replace!=null?Oe=Ae.replace:Oe=qS(He.response.headers.get("Location"),new URL(C.url),y,n.history)===k.location.pathname+k.location.search,await Sa(C,He,!0,{submission:X,replace:Oe}),{shortCircuited:!0}}if(ks(He)){let Oe=br(ie,Le.route.id);return(Ae&&Ae.replace)!==!0&&(G="PUSH"),{matches:ie,pendingActionResult:[Oe.route.id,He,Le.route.id]}}return{matches:ie,pendingActionResult:[Le.route.id,He]}}async function ds(C,$,X,ie,me,je,ve,Ae,Ue,He,Le,Oe,gt){let rt=je||Xb($,ve),At=ve||Ae||ZS(rt),aa=!te&&!He;if(me){if(aa){let Da=Ee(Oe);ct({navigation:rt,...Da!==void 0?{actionData:Da}:{}},{flushSync:Le})}let dt=await js(X,$.pathname,C.signal);if(dt.type==="aborted")return{shortCircuited:!0};if(dt.type==="error"){if(dt.partialMatches.length===0){let{matches:ko,route:yn}=zf(b);return{matches:ko,loaderData:{},errors:{[yn.id]:dt.error}}}let Da=br(dt.partialMatches).route.id;return{matches:dt.partialMatches,loaderData:{},errors:{[Da]:dt.error}}}else if(dt.matches)X=dt.matches;else{let{error:Da,notFoundMatches:ko,route:yn}=Ne($.pathname);return{matches:ko,loaderData:{},errors:{[yn.id]:Da}}}}let Ea=g||b,{dsMatches:vt,revalidatingFetchers:Ga}=HS(C,ie,d,p,n.history,k,X,At,$,He?[]:c,He===!0,ue,ne,Ut,we,Re,Ea,y,n.patchRoutesOnNavigation!=null,Oe,gt);if(P=++Te,!n.dataStrategy&&!vt.some(dt=>dt.shouldLoad)&&!vt.some(dt=>dt.route.middleware&&dt.route.middleware.length>0)&&Ga.length===0){let dt=ke();return jt($,{matches:X,loaderData:{},errors:Oe&&ks(Oe[1])?{[Oe[0]]:Oe[1].error}:null,...XS(Oe),...dt?{fetchers:new Map(k.fetchers)}:{}},{flushSync:Le}),{shortCircuited:!0}}if(aa){let dt={};if(!me){dt.navigation=rt;let Da=Ee(Oe);Da!==void 0&&(dt.actionData=Da)}Ga.length>0&&(dt.fetchers=qa(Ga)),ct(dt,{flushSync:Le})}Ga.forEach(dt=>{ia(dt.key),dt.controller&&he.set(dt.key,dt.controller)});let sa=()=>Ga.forEach(dt=>ia(dt.key));se&&se.signal.addEventListener("abort",sa);let{loaderResults:Os,fetcherResults:La}=await Pe(vt,Ga,C,ie);if(C.signal.aborted)return{shortCircuited:!0};se&&se.signal.removeEventListener("abort",sa),Ga.forEach(dt=>he.delete(dt.key));let ps=Lf(Os);if(ps)return await Sa(C,ps.result,!0,{replace:Ue}),{shortCircuited:!0};if(ps=Lf(La),ps)return Re.add(ps.key),await Sa(C,ps.result,!0,{replace:Ue}),{shortCircuited:!0};let{loaderData:Qn,errors:bn}=PS(k,X,Os,Oe,Ga,La);He&&k.errors&&(bn={...k.errors,...bn});let Ws=ke(),gn=w(P),en=Ws||gn||Ga.length>0;return{matches:X,loaderData:Qn,errors:bn,...en?{fetchers:new Map(k.fetchers)}:{}}}function Ee(C){if(C&&!ks(C[1]))return{[C[0]]:C[1].data};if(k.actionData)return Object.keys(k.actionData).length===0?null:k.actionData}function qa(C){return C.forEach($=>{let X=k.fetchers.get($.key),ie=au(void 0,X?X.data:void 0);k.fetchers.set($.key,ie)}),new Map(k.fetchers)}async function Gt(C,$,X,ie){ia(C);let me=(ie&&ie.flushSync)===!0,je=g||b,ve=lg(k.location,k.matches,y,X,$,ie?.relative),Ae=hr(je,ve,y),Ue=ya(Ae,je,ve);if(Ue.active&&Ue.matches&&(Ae=Ue.matches),!Ae){$t(C,$,Xs(404,{pathname:ve}),{flushSync:me});return}let{path:He,submission:Le,error:Oe}=LS(!0,ve,ie);if(Oe){$t(C,$,Oe,{flushSync:me});return}let gt=n.getContext?await n.getContext():new TS,rt=(ie&&ie.preventScrollReset)===!0;if(Le&&Ya(Le.formMethod)){await Wt(C,$,He,Ae,gt,Ue.active,me,rt,Le,ie&&ie.unstable_defaultShouldRevalidate);return}we.set(C,{routeId:$,path:He}),await ea(C,$,He,Ae,gt,Ue.active,me,rt,Le)}async function Wt(C,$,X,ie,me,je,ve,Ae,Ue,He){tt(),we.delete(C);let Le=k.fetchers.get(C);Ht(C,GU(Ue,Le),{flushSync:ve});let Oe=new AbortController,gt=bl(n.history,X,Oe.signal,Ue);if(je){let Vt=await js(ie,new URL(gt.url).pathname,gt.signal,C);if(Vt.type==="aborted")return;if(Vt.type==="error"){$t(C,$,Vt.error,{flushSync:ve});return}else if(Vt.matches)ie=Vt.matches;else{$t(C,$,Xs(404,{pathname:X}),{flushSync:ve});return}}let rt=qf(ie,X);if(!rt.route.action&&!rt.route.lazy){let Vt=Xs(405,{method:Ue.formMethod,pathname:X,routeId:$});$t(C,$,Vt,{flushSync:ve});return}he.set(C,Oe);let At=Te,aa=xl(d,p,gt,ie,rt,c,me),Ea=await _e(gt,aa,me,C),vt=Ea[rt.route.id];if(!vt){for(let Vt of aa)if(Ea[Vt.route.id]){vt=Ea[Vt.route.id];break}}if(gt.signal.aborted){he.get(C)===Oe&&he.delete(C);return}if(Ut.has(C)){if(ri(vt)||ks(vt)){Ht(C,wo(void 0));return}}else{if(ri(vt))if(he.delete(C),P>At){Ht(C,wo(void 0));return}else return Re.add(C),Ht(C,au(Ue)),Sa(gt,vt,!1,{fetcherSubmission:Ue,preventScrollReset:Ae});if(ks(vt)){$t(C,$,vt.error);return}}let Ga=k.navigation.location||k.location,sa=bl(n.history,Ga,Oe.signal),Os=g||b,La=k.navigation.state!=="idle"?hr(Os,k.navigation.location,y):k.matches;it(La,"Didn't find any matches after fetcher action");let ps=++Te;fe.set(C,ps);let Qn=au(Ue,vt.data);k.fetchers.set(C,Qn);let{dsMatches:bn,revalidatingFetchers:Ws}=HS(sa,me,d,p,n.history,k,La,Ue,Ga,c,!1,ue,ne,Ut,we,Re,Os,y,n.patchRoutesOnNavigation!=null,[rt.route.id,vt],He);Ws.filter(Vt=>Vt.key!==C).forEach(Vt=>{let Uo=Vt.key,Dl=k.fetchers.get(Uo),wu=au(void 0,Dl?Dl.data:void 0);k.fetchers.set(Uo,wu),ia(Uo),Vt.controller&&he.set(Uo,Vt.controller)}),ct({fetchers:new Map(k.fetchers)});let gn=()=>Ws.forEach(Vt=>ia(Vt.key));Oe.signal.addEventListener("abort",gn);let{loaderResults:en,fetcherResults:dt}=await Pe(bn,Ws,sa,me);if(Oe.signal.aborted)return;if(Oe.signal.removeEventListener("abort",gn),fe.delete(C),he.delete(C),Ws.forEach(Vt=>he.delete(Vt.key)),k.fetchers.has(C)){let Vt=wo(vt.data);k.fetchers.set(C,Vt)}let Da=Lf(en);if(Da)return Sa(sa,Da.result,!1,{preventScrollReset:Ae});if(Da=Lf(dt),Da)return Re.add(Da.key),Sa(sa,Da.result,!1,{preventScrollReset:Ae});let{loaderData:ko,errors:yn}=PS(k,La,en,void 0,Ws,dt);w(ps),k.navigation.state==="loading"&&ps>P?(it(G,"Expected pending action"),se&&se.abort(),jt(k.navigation.location,{matches:La,loaderData:ko,errors:yn,fetchers:new Map(k.fetchers)})):(ct({errors:yn,loaderData:FS(k.loaderData,ko,La,yn),fetchers:new Map(k.fetchers)}),ue=!1)}async function ea(C,$,X,ie,me,je,ve,Ae,Ue){let He=k.fetchers.get(C);Ht(C,au(Ue,He?He.data:void 0),{flushSync:ve});let Le=new AbortController,Oe=bl(n.history,X,Le.signal);if(je){let vt=await js(ie,new URL(Oe.url).pathname,Oe.signal,C);if(vt.type==="aborted")return;if(vt.type==="error"){$t(C,$,vt.error,{flushSync:ve});return}else if(vt.matches)ie=vt.matches;else{$t(C,$,Xs(404,{pathname:X}),{flushSync:ve});return}}let gt=qf(ie,X);he.set(C,Le);let rt=Te,At=xl(d,p,Oe,ie,gt,c,me),Ea=(await _e(Oe,At,me,C))[gt.route.id];if(he.get(C)===Le&&he.delete(C),!Oe.signal.aborted){if(Ut.has(C)){Ht(C,wo(void 0));return}if(ri(Ea))if(P>rt){Ht(C,wo(void 0));return}else{Re.add(C),await Sa(Oe,Ea,!1,{preventScrollReset:Ae});return}if(ks(Ea)){$t(C,$,Ea.error);return}Ht(C,wo(Ea.data))}}async function Sa(C,$,X,{submission:ie,fetcherSubmission:me,preventScrollReset:je,replace:ve}={}){X||(I?.resolve(),I=null),$.response.headers.has("X-Remix-Revalidate")&&(ue=!0);let Ae=$.response.headers.get("Location");it(Ae,"Expected a Location header on the redirect Response"),Ae=qS(Ae,new URL(C.url),y,n.history);let Ue=fu(k.location,Ae,{_isRedirect:!0});if(l){let At=!1;if($.response.headers.has("X-Remix-Reload-Document"))At=!0;else if(xg(Ae)){const aa=z4(Ae,!0);At=aa.origin!==o.location.origin||Zs(aa.pathname,y)==null}if(At){ve?o.location.replace(Ae):o.location.assign(Ae);return}}se=null;let He=ve===!0||$.response.headers.has("X-Remix-Replace")?"REPLACE":"PUSH",{formMethod:Le,formAction:Oe,formEncType:gt}=k.navigation;!ie&&!me&&Le&&Oe&&gt&&(ie=ZS(k.navigation));let rt=ie||me;if(vU.has($.response.status)&&rt&&Ya(rt.formMethod))await xt(He,Ue,{submission:{...rt,formAction:Ae},preventScrollReset:je||be,enableViewTransition:X?ae:void 0});else{let At=Xb(Ue,ie);await xt(He,Ue,{overrideNavigation:At,fetcherSubmission:me,preventScrollReset:je||be,enableViewTransition:X?ae:void 0})}}async function _e(C,$,X,ie){let me,je={};try{me=await CU(E,C,$,ie,X,!1)}catch(ve){return $.filter(Ae=>Ae.shouldLoad).forEach(Ae=>{je[Ae.route.id]={type:"error",error:ve}}),je}if(C.signal.aborted)return je;if(!Ya(C.method))for(let ve of $){if(me[ve.route.id]?.type==="error")break;!me.hasOwnProperty(ve.route.id)&&!k.loaderData.hasOwnProperty(ve.route.id)&&(!k.errors||!k.errors.hasOwnProperty(ve.route.id))&&ve.shouldCallHandler()&&(me[ve.route.id]={type:"error",result:new Error(`No result returned from dataStrategy for route ${ve.route.id}`)})}for(let[ve,Ae]of Object.entries(me))if($U(Ae)){let Ue=Ae.result;je[ve]={type:"redirect",response:AU(Ue,C,ve,$,y)}}else je[ve]=await OU(Ae);return je}async function Pe(C,$,X,ie){let me=_e(X,C,ie,null),je=Promise.all($.map(async Ue=>{if(Ue.matches&&Ue.match&&Ue.request&&Ue.controller){let Le=(await _e(Ue.request,Ue.matches,ie,Ue.key))[Ue.match.route.id];return{[Ue.key]:Le}}else return Promise.resolve({[Ue.key]:{type:"error",error:Xs(404,{pathname:Ue.path})}})})),ve=await me,Ae=(await je).reduce((Ue,He)=>Object.assign(Ue,He),{});return{loaderResults:ve,fetcherResults:Ae}}function tt(){ue=!0,we.forEach((C,$)=>{he.has($)&&ne.add($),ia($)})}function Ht(C,$,X={}){k.fetchers.set(C,$),ct({fetchers:new Map(k.fetchers)},{flushSync:(X&&X.flushSync)===!0})}function $t(C,$,X,ie={}){let me=br(k.matches,$);wa(C),ct({errors:{[me.route.id]:X},fetchers:new Map(k.fetchers)},{flushSync:(ie&&ie.flushSync)===!0})}function ta(C){return lt.set(C,(lt.get(C)||0)+1),Ut.has(C)&&Ut.delete(C),k.fetchers.get(C)||NU}function ga(C,$){ia(C,$?.reason),Ht(C,wo(null))}function wa(C){let $=k.fetchers.get(C);he.has(C)&&!($&&$.state==="loading"&&fe.has(C))&&ia(C),we.delete(C),fe.delete(C),Re.delete(C),Ut.delete(C),ne.delete(C),k.fetchers.delete(C)}function ja(C){let $=(lt.get(C)||0)-1;$<=0?(lt.delete(C),Ut.add(C)):lt.set(C,$),ct({fetchers:new Map(k.fetchers)})}function ia(C,$){let X=he.get(C);X&&(X.abort($),he.delete(C))}function fs(C){for(let $ of C){let X=ta($),ie=wo(X.data);k.fetchers.set($,ie)}}function ke(){let C=[],$=!1;for(let X of Re){let ie=k.fetchers.get(X);it(ie,`Expected fetcher: ${X}`),ie.state==="loading"&&(Re.delete(X),C.push(X),$=!0)}return fs(C),$}function w(C){let $=[];for(let[X,ie]of fe)if(ie<C){let me=k.fetchers.get(X);it(me,`Expected fetcher: ${X}`),me.state==="loading"&&(ia(X),fe.delete(X),$.push(X))}return fs($),$.length>0}function A(C,$){let X=k.blockers.get(C)||tu;return Je.get(C)!==$&&Je.set(C,$),X}function O(C){k.blockers.delete(C),Je.delete(C)}function B(C,$){let X=k.blockers.get(C)||tu;it(X.state==="unblocked"&&$.state==="blocked"||X.state==="blocked"&&$.state==="blocked"||X.state==="blocked"&&$.state==="proceeding"||X.state==="blocked"&&$.state==="unblocked"||X.state==="proceeding"&&$.state==="unblocked",`Invalid blocker state transition: ${X.state} -> ${$.state}`);let ie=new Map(k.blockers);ie.set(C,$),ct({blockers:ie})}function oe({currentLocation:C,nextLocation:$,historyAction:X}){if(Je.size===0)return;Je.size>1&&Kt(!1,"A router only supports one blocker at a time");let ie=Array.from(Je.entries()),[me,je]=ie[ie.length-1],ve=k.blockers.get(me);if(!(ve&&ve.state==="proceeding")&&je({currentLocation:C,nextLocation:$,historyAction:X}))return me}function Ne(C){let $=Xs(404,{pathname:C}),X=g||b,{matches:ie,route:me}=zf(X);return{notFoundMatches:ie,route:me,error:$}}function le(C,$,X){if(R=C,H=$,z=X||null,!Y&&k.navigation===Fb){Y=!0;let ie=Dt(k.location,k.matches);ie!=null&&ct({restoreScrollPosition:ie})}return()=>{R=null,H=null,z=null}}function $e(C,$){return z&&z(C,$.map(ie=>Fk(ie,k.loaderData)))||C.key}function Me(C,$){if(R&&H){let X=$e(C,$);R[X]=H()}}function Dt(C,$){if(R){let X=$e(C,$),ie=R[X];if(typeof ie=="number")return ie}return null}function ya(C,$,X){if(n.patchRoutesOnNavigation)if(C){if(Object.keys(C[0].params).length>0)return{active:!0,matches:ru($,X,y,!0)}}else return{active:!0,matches:ru($,X,y,!0)||[]};return{active:!1,matches:null}}async function js(C,$,X,ie){if(!n.patchRoutesOnNavigation)return{type:"success",matches:C};let me=C;for(;;){let je=g==null,ve=g||b,Ae=p;try{await n.patchRoutesOnNavigation({signal:X,path:$,matches:me,fetcherKey:ie,patch:(Le,Oe)=>{X.aborted||$S(Le,Oe,ve,Ae,d,!1)}})}catch(Le){return{type:"error",error:Le,partialMatches:me}}finally{je&&!X.aborted&&(b=[...b])}if(X.aborted)return{type:"aborted"};let Ue=hr(ve,$,y),He=null;if(Ue){if(Object.keys(Ue[0].params).length===0)return{type:"success",matches:Ue};if(He=ru(ve,$,y,!0),!(He&&me.length<He.length&&Ts(me,He.slice(0,me.length))))return{type:"success",matches:Ue}}if(He||(He=ru(ve,$,y,!0)),!He||Ts(me,He))return{type:"success",matches:null};me=He}}function Ts(C,$){return C.length===$.length&&C.every((X,ie)=>X.route.id===$[ie].route.id)}function Ro(C){p={},g=mu(C,d,void 0,p)}function ms(C,$,X=!1){let ie=g==null;$S(C,$,g||b,p,d,X),ie&&(b=[...b],ct({}))}return de={get basename(){return y},get future(){return x},get state(){return k},get routes(){return b},get window(){return o},initialize:ra,subscribe:ot,enableScrollRestoration:le,navigate:qt,fetch:Gt,revalidate:Xe,createHref:C=>n.history.createHref(C),encodeLocation:C=>n.history.encodeLocation(C),getFetcher:ta,resetFetcher:ga,deleteFetcher:ja,dispose:ye,getBlocker:A,deleteBlocker:O,patchRoutes:ms,_internalFetchControllers:he,_internalSetRoutes:Ro,_internalSetStateDoNotUseOrYouWillBreakYourApp(C){ct(C)}},n.unstable_instrumentations&&(de=fU(de,n.unstable_instrumentations.map(C=>C.router).filter(Boolean))),de}function EU(n){return n!=null&&("formData"in n&&n.formData!=null||"body"in n&&n.body!==void 0)}function lg(n,o,l,c,u,d){let p,b;if(u){p=[];for(let y of o)if(p.push(y),y.route.id===u){b=y;break}}else p=o,b=o[o.length-1];let g=gu(c||".",Kf(p),Zs(n.pathname,l)||n.pathname,d==="path");if(c==null&&(g.search=n.search,g.hash=n.hash),(c==null||c===""||c===".")&&b){let y=Sg(g.search);if(b.route.index&&!y)g.search=g.search?g.search.replace(/^\?/,"?index&"):"?index";else if(!b.route.index&&y){let E=new URLSearchParams(g.search),x=E.getAll("index");E.delete("index"),x.filter(_=>_).forEach(_=>E.append("index",_));let S=E.toString();g.search=S?`?${S}`:""}}return l!=="/"&&(g.pathname=rU({basename:l,pathname:g.pathname})),Xn(g)}function LS(n,o,l){if(!l||!EU(l))return{path:o};if(l.formMethod&&!YU(l.formMethod))return{path:o,error:Xs(405,{method:l.formMethod})};let c=()=>({path:o,error:Xs(400,{type:"invalid-body"})}),d=(l.formMethod||"get").toUpperCase(),p=tw(o);if(l.body!==void 0){if(l.formEncType==="text/plain"){if(!Ya(d))return c();let x=typeof l.body=="string"?l.body:l.body instanceof FormData||l.body instanceof URLSearchParams?Array.from(l.body.entries()).reduce((S,[_,R])=>`${S}${_}=${R}
236
+ `,""):String(l.body);return{path:o,submission:{formMethod:d,formAction:p,formEncType:l.formEncType,formData:void 0,json:void 0,text:x}}}else if(l.formEncType==="application/json"){if(!Ya(d))return c();try{let x=typeof l.body=="string"?JSON.parse(l.body):l.body;return{path:o,submission:{formMethod:d,formAction:p,formEncType:l.formEncType,formData:void 0,json:x,text:void 0}}}catch{return c()}}}it(typeof FormData=="function","FormData is not available in this environment");let b,g;if(l.formData)b=ug(l.formData),g=l.formData;else if(l.body instanceof FormData)b=ug(l.body),g=l.body;else if(l.body instanceof URLSearchParams)b=l.body,g=GS(b);else if(l.body==null)b=new URLSearchParams,g=new FormData;else try{b=new URLSearchParams(l.body),g=GS(b)}catch{return c()}let y={formMethod:d,formAction:p,formEncType:l&&l.formEncType||"application/x-www-form-urlencoded",formData:g,json:void 0,text:void 0};if(Ya(y.formMethod))return{path:o,submission:y};let E=Do(o);return n&&E.search&&Sg(E.search)&&b.append("index",""),E.search=`?${b}`,{path:Xn(E),submission:y}}function HS(n,o,l,c,u,d,p,b,g,y,E,x,S,_,R,z,H,Y,K,Z,J){let ee=Z?ks(Z[1])?Z[1].error:Z[1].data:void 0,ce=u.createURL(d.location),de=u.createURL(g),k;if(E&&d.errors){let De=Object.keys(d.errors)[0];k=p.findIndex(te=>te.route.id===De)}else if(Z&&ks(Z[1])){let De=Z[0];k=p.findIndex(te=>te.route.id===De)-1}let G=Z?Z[1].statusCode:void 0,I=G&&G>=400,be={currentUrl:ce,currentParams:d.matches[0]?.params||{},nextUrl:de,nextParams:p[0].params,...b,actionResult:ee,actionStatus:G},se=xu(p),ae=p.map((De,te)=>{let{route:ue}=De,ne=null;if(k!=null&&te>k)ne=!1;else if(ue.lazy)ne=!0;else if(!vg(ue))ne=!1;else if(E){let{shouldLoad:fe}=Q4(ue,d.loaderData,d.errors);ne=fe}else DU(d.loaderData,d.matches[te],De)&&(ne=!0);if(ne!==null)return cg(l,c,n,se,De,y,o,ne);let he=!1;typeof J=="boolean"?he=J:I?he=!1:(x||ce.pathname+ce.search===de.pathname+de.search||ce.search!==de.search||_U(d.matches[te],De))&&(he=!0);let Te={...be,defaultShouldRevalidate:he},P=uu(De,Te);return cg(l,c,n,se,De,y,o,P,Te,J)}),pe=[];return R.forEach((De,te)=>{if(E||!p.some(we=>we.route.id===De.routeId)||_.has(te))return;let ue=d.fetchers.get(te),ne=ue&&ue.state!=="idle"&&ue.data===void 0,he=hr(H,De.path,Y);if(!he){if(K&&ne)return;pe.push({key:te,routeId:De.routeId,path:De.path,matches:null,match:null,request:null,controller:null});return}if(z.has(te))return;let Te=qf(he,De.path),P=new AbortController,fe=bl(u,De.path,P.signal),Re=null;if(S.has(te))S.delete(te),Re=xl(l,c,fe,he,Te,y,o);else if(ne)x&&(Re=xl(l,c,fe,he,Te,y,o));else{let we;typeof J=="boolean"?we=J:I?we=!1:we=x;let lt={...be,defaultShouldRevalidate:we};uu(Te,lt)&&(Re=xl(l,c,fe,he,Te,y,o,lt))}Re&&pe.push({key:te,routeId:De.routeId,path:De.path,matches:Re,match:Te,request:fe,controller:P})}),{dsMatches:ae,revalidatingFetchers:pe}}function vg(n){return n.loader!=null||n.middleware!=null&&n.middleware.length>0}function Q4(n,o,l){if(n.lazy)return{shouldLoad:!0,renderFallback:!0};if(!vg(n))return{shouldLoad:!1,renderFallback:!1};let c=o!=null&&n.id in o,u=l!=null&&l[n.id]!==void 0;if(!c&&u)return{shouldLoad:!1,renderFallback:!1};if(typeof n.loader=="function"&&n.loader.hydrate===!0)return{shouldLoad:!0,renderFallback:!c};let d=!c&&!u;return{shouldLoad:d,renderFallback:d}}function DU(n,o,l){let c=!o||l.route.id!==o.route.id,u=!n.hasOwnProperty(l.route.id);return c||u}function _U(n,o){let l=n.route.path;return n.pathname!==o.pathname||l!=null&&l.endsWith("*")&&n.params["*"]!==o.params["*"]}function uu(n,o){if(n.route.shouldRevalidate){let l=n.route.shouldRevalidate(o);if(typeof l=="boolean")return l}return o.defaultShouldRevalidate}function $S(n,o,l,c,u,d){let p;if(n){let y=c[n];it(y,`No route found to patch children into: routeId = ${n}`),y.children||(y.children=[]),p=y.children}else p=l;let b=[],g=[];if(o.forEach(y=>{let E=p.find(x=>Z4(y,x));E?g.push({existingRoute:E,newRoute:y}):b.push(y)}),b.length>0){let y=mu(b,u,[n||"_","patch",String(p?.length||"0")],c);p.push(...y)}if(d&&g.length>0)for(let y=0;y<g.length;y++){let{existingRoute:E,newRoute:x}=g[y],S=E,[_]=mu([x],u,[],{},!0);Object.assign(S,{element:_.element?_.element:S.element,errorElement:_.errorElement?_.errorElement:S.errorElement,hydrateFallbackElement:_.hydrateFallbackElement?_.hydrateFallbackElement:S.hydrateFallbackElement})}}function Z4(n,o){return"id"in n&&"id"in o&&n.id===o.id?!0:n.index===o.index&&n.path===o.path&&n.caseSensitive===o.caseSensitive?(!n.children||n.children.length===0)&&(!o.children||o.children.length===0)?!0:n.children?.every((l,c)=>o.children?.some(u=>Z4(l,u)))??!1:!1}var BS=new WeakMap,J4=({key:n,route:o,manifest:l,mapRouteProperties:c})=>{let u=l[o.id];if(it(u,"No route found in manifest"),!u.lazy||typeof u.lazy!="object")return;let d=u.lazy[n];if(!d)return;let p=BS.get(u);p||(p={},BS.set(u,p));let b=p[n];if(b)return b;let g=(async()=>{let y=Yk(n),x=u[n]!==void 0&&n!=="hasErrorBoundary";if(y)Kt(!y,"Route property "+n+" is not a supported lazy route property. This property will be ignored."),p[n]=Promise.resolve();else if(x)Kt(!1,`Route "${u.id}" has a static property "${n}" defined. The lazy property will be ignored.`);else{let S=await d();S!=null&&(Object.assign(u,{[n]:S}),Object.assign(u,c(u)))}typeof u.lazy=="object"&&(u.lazy[n]=void 0,Object.values(u.lazy).every(S=>S===void 0)&&(u.lazy=void 0))})();return p[n]=g,g},IS=new WeakMap;function RU(n,o,l,c,u){let d=l[n.id];if(it(d,"No route found in manifest"),!n.lazy)return{lazyRoutePromise:void 0,lazyHandlerPromise:void 0};if(typeof n.lazy=="function"){let E=IS.get(d);if(E)return{lazyRoutePromise:E,lazyHandlerPromise:E};let x=(async()=>{it(typeof n.lazy=="function","No lazy route function found");let S=await n.lazy(),_={};for(let R in S){let z=S[R];if(z===void 0)continue;let H=Gk(R),K=d[R]!==void 0&&R!=="hasErrorBoundary";H?Kt(!H,"Route property "+R+" is not a supported property to be returned from a lazy route function. This property will be ignored."):K?Kt(!K,`Route "${d.id}" has a static property "${R}" defined but its lazy function is also returning a value for this property. The lazy route property "${R}" will be ignored.`):_[R]=z}Object.assign(d,_),Object.assign(d,{...c(d),lazy:void 0})})();return IS.set(d,x),x.catch(()=>{}),{lazyRoutePromise:x,lazyHandlerPromise:x}}let p=Object.keys(n.lazy),b=[],g;for(let E of p){if(u&&u.includes(E))continue;let x=J4({key:E,route:n,manifest:l,mapRouteProperties:c});x&&(b.push(x),E===o&&(g=x))}let y=b.length>0?Promise.all(b).then(()=>{}):void 0;return y?.catch(()=>{}),g?.catch(()=>{}),{lazyRoutePromise:y,lazyHandlerPromise:g}}async function YS(n){let o=n.matches.filter(u=>u.shouldLoad),l={};return(await Promise.all(o.map(u=>u.resolve()))).forEach((u,d)=>{l[o[d].route.id]=u}),l}async function kU(n){return n.matches.some(o=>o.route.middleware)?K4(n,()=>YS(n)):YS(n)}function K4(n,o){return UU(n,o,c=>{if(IU(c))throw c;return c},LU,l);function l(c,u,d){if(d)return Promise.resolve(Object.assign(d.value,{[u]:{type:"error",result:c}}));{let{matches:p}=n,b=Math.min(Math.max(p.findIndex(y=>y.route.id===u),0),Math.max(p.findIndex(y=>y.shouldCallHandler()),0)),g=br(p,p[b].route.id).route.id;return Promise.resolve({[g]:{type:"error",result:c}})}}}async function UU(n,o,l,c,u){let{matches:d,request:p,params:b,context:g,unstable_pattern:y}=n,E=d.flatMap(S=>S.route.middleware?S.route.middleware.map(_=>[S.route.id,_]):[]);return await W4({request:p,params:b,context:g,unstable_pattern:y},E,o,l,c,u)}async function W4(n,o,l,c,u,d,p=0){let{request:b}=n;if(b.signal.aborted)throw b.signal.reason??new Error(`Request aborted: ${b.method} ${b.url}`);let g=o[p];if(!g)return await l();let[y,E]=g,x,S=async()=>{if(x)throw new Error("You may only call `next()` once per middleware");try{return x={value:await W4(n,o,l,c,u,d,p+1)},x.value}catch(_){return x={value:await d(_,y,x)},x.value}};try{let _=await E(n,S),R=_!=null?c(_):void 0;return u(R)?R:x?R??x.value:(x={value:await S()},x.value)}catch(_){return await d(_,y,x)}}function ew(n,o,l,c,u){let d=J4({key:"middleware",route:c.route,manifest:o,mapRouteProperties:n}),p=RU(c.route,Ya(l.method)?"action":"loader",o,n,u);return{middleware:d,route:p.lazyRoutePromise,handler:p.lazyHandlerPromise}}function cg(n,o,l,c,u,d,p,b,g=null,y){let E=!1,x=ew(n,o,l,u,d);return{...u,_lazyPromises:x,shouldLoad:b,shouldRevalidateArgs:g,shouldCallHandler(S){return E=!0,g?typeof y=="boolean"?uu(u,{...g,defaultShouldRevalidate:y}):typeof S=="boolean"?uu(u,{...g,defaultShouldRevalidate:S}):uu(u,g):b},resolve(S){let{lazy:_,loader:R,middleware:z}=u.route,H=E||b||S&&!Ya(l.method)&&(_||R),Y=z&&z.length>0&&!R&&!_;return H&&(Ya(l.method)||!Y)?jU({request:l,unstable_pattern:c,match:u,lazyHandlerPromise:x?.handler,lazyRoutePromise:x?.route,handlerOverride:S,scopedContext:p}):Promise.resolve({type:"data",result:void 0})}}}function xl(n,o,l,c,u,d,p,b=null){return c.map(g=>g.route.id!==u.route.id?{...g,shouldLoad:!1,shouldRevalidateArgs:b,shouldCallHandler:()=>!1,_lazyPromises:ew(n,o,l,g,d),resolve:()=>Promise.resolve({type:"data",result:void 0})}:cg(n,o,l,xu(c),g,d,p,!0,b))}async function CU(n,o,l,c,u,d){l.some(y=>y._lazyPromises?.middleware)&&await Promise.all(l.map(y=>y._lazyPromises?.middleware));let p={request:o,unstable_pattern:xu(l),params:l[0].params,context:u,matches:l},g=await n({...p,fetcherKey:c,runClientMiddleware:y=>{let E=p;return K4(E,()=>y({...E,fetcherKey:c,runClientMiddleware:()=>{throw new Error("Cannot call `runClientMiddleware()` from within an `runClientMiddleware` handler")}}))}});try{await Promise.all(l.flatMap(y=>[y._lazyPromises?.handler,y._lazyPromises?.route]))}catch{}return g}async function jU({request:n,unstable_pattern:o,match:l,lazyHandlerPromise:c,lazyRoutePromise:u,handlerOverride:d,scopedContext:p}){let b,g,y=Ya(n.method),E=y?"action":"loader",x=S=>{let _,R=new Promise((Y,K)=>_=K);g=()=>_(),n.signal.addEventListener("abort",g);let z=Y=>typeof S!="function"?Promise.reject(new Error(`You cannot call the handler for a route which defines a boolean "${E}" [routeId: ${l.route.id}]`)):S({request:n,unstable_pattern:o,params:l.params,context:p},...Y!==void 0?[Y]:[]),H=(async()=>{try{return{type:"data",result:await(d?d(K=>z(K)):z())}}catch(Y){return{type:"error",result:Y}}})();return Promise.race([H,R])};try{let S=y?l.route.action:l.route.loader;if(c||u)if(S){let _,[R]=await Promise.all([x(S).catch(z=>{_=z}),c,u]);if(_!==void 0)throw _;b=R}else{await c;let _=y?l.route.action:l.route.loader;if(_)[b]=await Promise.all([x(_),u]);else if(E==="action"){let R=new URL(n.url),z=R.pathname+R.search;throw Xs(405,{method:n.method,pathname:z,routeId:l.route.id})}else return{type:"data",result:void 0}}else if(S)b=await x(S);else{let _=new URL(n.url),R=_.pathname+_.search;throw Xs(404,{pathname:R})}}catch(S){return{type:"error",result:S}}finally{g&&n.signal.removeEventListener("abort",g)}return b}async function TU(n){let o=n.headers.get("Content-Type");return o&&/\bapplication\/json\b/.test(o)?n.body==null?null:n.json():n.text()}async function OU(n){let{result:o,type:l}=n;if(Ng(o)){let c;try{c=await TU(o)}catch(u){return{type:"error",error:u}}return l==="error"?{type:"error",error:new yu(o.status,o.statusText,c),statusCode:o.status,headers:o.headers}:{type:"data",data:c,statusCode:o.status,headers:o.headers}}return l==="error"?QS(o)?o.data instanceof Error?{type:"error",error:o.data,statusCode:o.init?.status,headers:o.init?.headers?new Headers(o.init.headers):void 0}:{type:"error",error:zU(o),statusCode:Nl(o)?o.status:void 0,headers:o.init?.headers?new Headers(o.init.headers):void 0}:{type:"error",error:o,statusCode:Nl(o)?o.status:void 0}:QS(o)?{type:"data",data:o.data,statusCode:o.init?.status,headers:o.init?.headers?new Headers(o.init.headers):void 0}:{type:"data",data:o}}function AU(n,o,l,c,u){let d=n.headers.get("Location");if(it(d,"Redirects returned/thrown from loaders/actions must have a Location header"),!xg(d)){let p=c.slice(0,c.findIndex(b=>b.route.id===l)+1);d=lg(new URL(o.url),p,u,d),n.headers.set("Location",d)}return n}function qS(n,o,l,c){let u=["about:","blob:","chrome:","chrome-untrusted:","content:","data:","devtools:","file:","filesystem:","javascript:"];if(xg(n)){let d=n,p=d.startsWith("//")?new URL(o.protocol+d):new URL(d);if(u.includes(p.protocol))throw new Error("Invalid redirect location");let b=Zs(p.pathname,l)!=null;if(p.origin===o.origin&&b)return p.pathname+p.search+p.hash}try{let d=c.createURL(n);if(u.includes(d.protocol))throw new Error("Invalid redirect location")}catch{}return n}function bl(n,o,l,c){let u=n.createURL(tw(o)).toString(),d={signal:l};if(c&&Ya(c.formMethod)){let{formMethod:p,formEncType:b}=c;d.method=p.toUpperCase(),b==="application/json"?(d.headers=new Headers({"Content-Type":b}),d.body=JSON.stringify(c.json)):b==="text/plain"?d.body=c.text:b==="application/x-www-form-urlencoded"&&c.formData?d.body=ug(c.formData):d.body=c.formData}return new Request(u,d)}function ug(n){let o=new URLSearchParams;for(let[l,c]of n.entries())o.append(l,typeof c=="string"?c:c.name);return o}function GS(n){let o=new FormData;for(let[l,c]of n.entries())o.append(l,c);return o}function VU(n,o,l,c=!1,u=!1){let d={},p=null,b,g=!1,y={},E=l&&ks(l[1])?l[1].error:void 0;return n.forEach(x=>{if(!(x.route.id in o))return;let S=x.route.id,_=o[S];if(it(!ri(_),"Cannot handle redirect results in processLoaderData"),ks(_)){let R=_.error;if(E!==void 0&&(R=E,E=void 0),p=p||{},u)p[S]=R;else{let z=br(n,S);p[z.route.id]==null&&(p[z.route.id]=R)}c||(d[S]=X4),g||(g=!0,b=Nl(_.error)?_.error.status:500),_.headers&&(y[S]=_.headers)}else d[S]=_.data,_.statusCode&&_.statusCode!==200&&!g&&(b=_.statusCode),_.headers&&(y[S]=_.headers)}),E!==void 0&&l&&(p={[l[0]]:E},l[2]&&(d[l[2]]=void 0)),{loaderData:d,errors:p,statusCode:b||200,loaderHeaders:y}}function PS(n,o,l,c,u,d){let{loaderData:p,errors:b}=VU(o,l,c);return u.filter(g=>!g.matches||g.matches.some(y=>y.shouldLoad)).forEach(g=>{let{key:y,match:E,controller:x}=g;if(x&&x.signal.aborted)return;let S=d[y];if(it(S,"Did not find corresponding fetcher result"),ks(S)){let _=br(n.matches,E?.route.id);b&&b[_.route.id]||(b={...b,[_.route.id]:S.error}),n.fetchers.delete(y)}else if(ri(S))it(!1,"Unhandled fetcher revalidation redirect");else{let _=wo(S.data);n.fetchers.set(y,_)}}),{loaderData:p,errors:b}}function FS(n,o,l,c){let u=Object.entries(o).filter(([,d])=>d!==X4).reduce((d,[p,b])=>(d[p]=b,d),{});for(let d of l){let p=d.route.id;if(!o.hasOwnProperty(p)&&n.hasOwnProperty(p)&&d.route.loader&&(u[p]=n[p]),c&&c.hasOwnProperty(p))break}return u}function XS(n){return n?ks(n[1])?{actionData:{}}:{actionData:{[n[0]]:n[1].data}}:{}}function br(n,o){return(o?n.slice(0,n.findIndex(c=>c.route.id===o)+1):[...n]).reverse().find(c=>c.route.hasErrorBoundary===!0)||n[0]}function zf(n){let o=n.length===1?n[0]:n.find(l=>l.index||!l.path||l.path==="/")||{id:"__shim-error-route__"};return{matches:[{params:{},pathname:"",pathnameBase:"",route:o}],route:o}}function Xs(n,{pathname:o,routeId:l,method:c,type:u,message:d}={}){let p="Unknown Server Error",b="Unknown @remix-run/router error";return n===400?(p="Bad Request",c&&o&&l?b=`You made a ${c} request to "${o}" but did not provide a \`loader\` for route "${l}", so there is no way to handle the request.`:u==="invalid-body"&&(b="Unable to encode submission body")):n===403?(p="Forbidden",b=`Route "${l}" does not match URL "${o}"`):n===404?(p="Not Found",b=`No route matches URL "${o}"`):n===405&&(p="Method Not Allowed",c&&o&&l?b=`You made a ${c.toUpperCase()} request to "${o}" but did not provide an \`action\` for route "${l}", so there is no way to handle the request.`:c&&(b=`Invalid request method "${c.toUpperCase()}"`)),new yu(n||500,p,new Error(b),!0)}function Lf(n){let o=Object.entries(n);for(let l=o.length-1;l>=0;l--){let[c,u]=o[l];if(ri(u))return{key:c,result:u}}}function tw(n){let o=typeof n=="string"?Do(n):n;return Xn({...o,hash:""})}function MU(n,o){return n.pathname!==o.pathname||n.search!==o.search?!1:n.hash===""?o.hash!=="":n.hash===o.hash?!0:o.hash!==""}function zU(n){return new yu(n.init?.status??500,n.init?.statusText??"Internal Server Error",n.data)}function LU(n){return n!=null&&typeof n=="object"&&Object.entries(n).every(([o,l])=>typeof o=="string"&&HU(l))}function HU(n){return n!=null&&typeof n=="object"&&"type"in n&&"result"in n&&(n.type==="data"||n.type==="error")}function $U(n){return Ng(n.result)&&P4.has(n.result.status)}function ks(n){return n.type==="error"}function ri(n){return(n&&n.type)==="redirect"}function QS(n){return typeof n=="object"&&n!=null&&"type"in n&&"data"in n&&"init"in n&&n.type==="DataWithResponseInit"}function Ng(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.headers=="object"&&typeof n.body<"u"}function BU(n){return P4.has(n)}function IU(n){return Ng(n)&&BU(n.status)&&n.headers.has("Location")}function YU(n){return xU.has(n.toUpperCase())}function Ya(n){return gU.has(n.toUpperCase())}function Sg(n){return new URLSearchParams(n).getAll("index").some(o=>o==="")}function qf(n,o){let l=typeof o=="string"?Do(o).search:o.search;if(n[n.length-1].route.index&&Sg(l||""))return n[n.length-1];let c=B4(n);return c[c.length-1]}function ZS(n){let{formMethod:o,formAction:l,formEncType:c,text:u,formData:d,json:p}=n;if(!(!o||!l||!c)){if(u!=null)return{formMethod:o,formAction:l,formEncType:c,formData:void 0,json:void 0,text:u};if(d!=null)return{formMethod:o,formAction:l,formEncType:c,formData:d,json:void 0,text:void 0};if(p!==void 0)return{formMethod:o,formAction:l,formEncType:c,formData:void 0,json:p,text:void 0}}}function Xb(n,o){return o?{state:"loading",location:n,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}:{state:"loading",location:n,formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0}}function qU(n,o){return{state:"submitting",location:n,formMethod:o.formMethod,formAction:o.formAction,formEncType:o.formEncType,formData:o.formData,json:o.json,text:o.text}}function au(n,o){return n?{state:"loading",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:o}:{state:"loading",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:o}}function GU(n,o){return{state:"submitting",formMethod:n.formMethod,formAction:n.formAction,formEncType:n.formEncType,formData:n.formData,json:n.json,text:n.text,data:o?o.data:void 0}}function wo(n){return{state:"idle",formMethod:void 0,formAction:void 0,formEncType:void 0,formData:void 0,json:void 0,text:void 0,data:n}}function PU(n,o){try{let l=n.sessionStorage.getItem(F4);if(l){let c=JSON.parse(l);for(let[u,d]of Object.entries(c||{}))d&&Array.isArray(d)&&o.set(u,new Set(d||[]))}}catch{}}function FU(n,o){if(o.size>0){let l={};for(let[c,u]of o)l[c]=[...u];try{n.sessionStorage.setItem(F4,JSON.stringify(l))}catch(c){Kt(!1,`Failed to save applied view transitions in sessionStorage (${c}).`)}}}function JS(){let n,o,l=new Promise((c,u)=>{n=async d=>{c(d);try{await l}catch{}},o=async d=>{u(d);try{await l}catch{}}});return{promise:l,resolve:n,reject:o}}var di=N.createContext(null);di.displayName="DataRouter";var vu=N.createContext(null);vu.displayName="DataRouterState";var aw=N.createContext(!1);function XU(){return N.useContext(aw)}var wg=N.createContext({isTransitioning:!1});wg.displayName="ViewTransition";var sw=N.createContext(new Map);sw.displayName="Fetchers";var QU=N.createContext(null);QU.displayName="Await";var Cs=N.createContext(null);Cs.displayName="Navigation";var Wf=N.createContext(null);Wf.displayName="Location";var Js=N.createContext({outlet:null,matches:[],isDataRoute:!1});Js.displayName="Route";var Eg=N.createContext(null);Eg.displayName="RouteError";var nw="REACT_ROUTER_ERROR",ZU="REDIRECT",JU="ROUTE_ERROR_RESPONSE";function KU(n){if(n.startsWith(`${nw}:${ZU}:{`))try{let o=JSON.parse(n.slice(28));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string"&&typeof o.location=="string"&&typeof o.reloadDocument=="boolean"&&typeof o.replace=="boolean")return o}catch{}}function WU(n){if(n.startsWith(`${nw}:${JU}:{`))try{let o=JSON.parse(n.slice(40));if(typeof o=="object"&&o&&typeof o.status=="number"&&typeof o.statusText=="string")return new yu(o.status,o.statusText,o.data)}catch{}}function eC(n,{relative:o}={}){it(Sl(),"useHref() may be used only in the context of a <Router> component.");let{basename:l,navigator:c}=N.useContext(Cs),{hash:u,pathname:d,search:p}=Su(n,{relative:o}),b=d;return l!=="/"&&(b=d==="/"?l:mn([l,d])),c.createHref({pathname:b,search:p,hash:u})}function Sl(){return N.useContext(Wf)!=null}function hn(){return it(Sl(),"useLocation() may be used only in the context of a <Router> component."),N.useContext(Wf).location}var ow="You should call navigate() in a React.useEffect(), not when your component is first rendered.";function rw(n){N.useContext(Cs).static||N.useLayoutEffect(n)}function _o(){let{isDataRoute:n}=N.useContext(Js);return n?pC():tC()}function tC(){it(Sl(),"useNavigate() may be used only in the context of a <Router> component.");let n=N.useContext(di),{basename:o,navigator:l}=N.useContext(Cs),{matches:c}=N.useContext(Js),{pathname:u}=hn(),d=JSON.stringify(Kf(c)),p=N.useRef(!1);return rw(()=>{p.current=!0}),N.useCallback((g,y={})=>{if(Kt(p.current,ow),!p.current)return;if(typeof g=="number"){l.go(g);return}let E=gu(g,JSON.parse(d),u,y.relative==="path");n==null&&o!=="/"&&(E.pathname=E.pathname==="/"?o:mn([o,E.pathname])),(y.replace?l.replace:l.push)(E,y.state,y)},[o,l,d,u,n])}var aC=N.createContext(null);function sC(n){let o=N.useContext(Js).outlet;return N.useMemo(()=>o&&N.createElement(aC.Provider,{value:n},o),[o,n])}function Nu(){let{matches:n}=N.useContext(Js),o=n[n.length-1];return o?o.params:{}}function Su(n,{relative:o}={}){let{matches:l}=N.useContext(Js),{pathname:c}=hn(),u=JSON.stringify(Kf(l));return N.useMemo(()=>gu(n,JSON.parse(u),c,o==="path"),[n,u,c,o])}function nC(n,o,l){it(Sl(),"useRoutes() may be used only in the context of a <Router> component.");let{navigator:c}=N.useContext(Cs),{matches:u}=N.useContext(Js),d=u[u.length-1],p=d?d.params:{},b=d?d.pathname:"/",g=d?d.pathnameBase:"/",y=d&&d.route;{let H=y&&y.path||"";cw(b,!y||H.endsWith("*")||H.endsWith("*?"),`You rendered descendant <Routes> (or called \`useRoutes()\`) at "${b}" (under <Route path="${H}">) but the parent route path has no trailing "*". This means if you navigate deeper, the parent won't match anymore and therefore the child routes will never render.
237
+
238
+ Please change the parent <Route path="${H}"> to <Route path="${H==="/"?"*":`${H}/*`}">.`)}let E=hn(),x;x=E;let S=x.pathname||"/",_=S;if(g!=="/"){let H=g.replace(/^\//,"").split("/");_="/"+S.replace(/^\//,"").split("/").slice(H.length).join("/")}let R=hr(n,{pathname:_});return Kt(y||R!=null,`No routes matched location "${x.pathname}${x.search}${x.hash}" `),Kt(R==null||R[R.length-1].route.element!==void 0||R[R.length-1].route.Component!==void 0||R[R.length-1].route.lazy!==void 0,`Matched leaf route at location "${x.pathname}${x.search}${x.hash}" does not have an element or Component. This means it will render an <Outlet /> with a null value by default resulting in an "empty" page.`),cC(R&&R.map(H=>Object.assign({},H,{params:Object.assign({},p,H.params),pathname:mn([g,c.encodeLocation?c.encodeLocation(H.pathname.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathname]),pathnameBase:H.pathnameBase==="/"?g:mn([g,c.encodeLocation?c.encodeLocation(H.pathnameBase.replace(/\?/g,"%3F").replace(/#/g,"%23")).pathname:H.pathnameBase])})),u,l)}function oC(){let n=lw(),o=Nl(n)?`${n.status} ${n.statusText}`:n instanceof Error?n.message:JSON.stringify(n),l=n instanceof Error?n.stack:null,c="rgba(200,200,200, 0.5)",u={padding:"0.5rem",backgroundColor:c},d={padding:"2px 4px",backgroundColor:c},p=null;return console.error("Error handled by React Router default ErrorBoundary:",n),p=N.createElement(N.Fragment,null,N.createElement("p",null,"💿 Hey developer 👋"),N.createElement("p",null,"You can provide a way better UX than this when your app throws errors by providing your own ",N.createElement("code",{style:d},"ErrorBoundary")," or"," ",N.createElement("code",{style:d},"errorElement")," prop on your route.")),N.createElement(N.Fragment,null,N.createElement("h2",null,"Unexpected Application Error!"),N.createElement("h3",{style:{fontStyle:"italic"}},o),l?N.createElement("pre",{style:u},l):null,p)}var rC=N.createElement(oC,null),iw=class extends N.Component{constructor(n){super(n),this.state={location:n.location,revalidation:n.revalidation,error:n.error}}static getDerivedStateFromError(n){return{error:n}}static getDerivedStateFromProps(n,o){return o.location!==n.location||o.revalidation!=="idle"&&n.revalidation==="idle"?{error:n.error,location:n.location,revalidation:n.revalidation}:{error:n.error!==void 0?n.error:o.error,location:o.location,revalidation:n.revalidation||o.revalidation}}componentDidCatch(n,o){this.props.onError?this.props.onError(n,o):console.error("React Router caught the following error during render",n)}render(){let n=this.state.error;if(this.context&&typeof n=="object"&&n&&"digest"in n&&typeof n.digest=="string"){const l=WU(n.digest);l&&(n=l)}let o=n!==void 0?N.createElement(Js.Provider,{value:this.props.routeContext},N.createElement(Eg.Provider,{value:n,children:this.props.component})):this.props.children;return this.context?N.createElement(iC,{error:n},o):o}};iw.contextType=aw;var Qb=new WeakMap;function iC({children:n,error:o}){let{basename:l}=N.useContext(Cs);if(typeof o=="object"&&o&&"digest"in o&&typeof o.digest=="string"){let c=KU(o.digest);if(c){let u=Qb.get(o);if(u)throw u;let d=Y4(c.location,l);if(I4&&!Qb.get(o))if(d.isExternal||c.reloadDocument)window.location.href=d.absoluteURL||d.to;else{const p=Promise.resolve().then(()=>window.__reactRouterDataRouter.navigate(d.to,{replace:c.replace}));throw Qb.set(o,p),p}return N.createElement("meta",{httpEquiv:"refresh",content:`0;url=${d.absoluteURL||d.to}`})}}return n}function lC({routeContext:n,match:o,children:l}){let c=N.useContext(di);return c&&c.static&&c.staticContext&&(o.route.errorElement||o.route.ErrorBoundary)&&(c.staticContext._deepestRenderedBoundaryId=o.route.id),N.createElement(Js.Provider,{value:n},l)}function cC(n,o=[],l){let c=l?.state;if(n==null){if(!c)return null;if(c.errors)n=c.matches;else if(o.length===0&&!c.initialized&&c.matches.length>0)n=c.matches;else return null}let u=n,d=c?.errors;if(d!=null){let E=u.findIndex(x=>x.route.id&&d?.[x.route.id]!==void 0);it(E>=0,`Could not find a matching route for errors on route IDs: ${Object.keys(d).join(",")}`),u=u.slice(0,Math.min(u.length,E+1))}let p=!1,b=-1;if(l&&c){p=c.renderFallback;for(let E=0;E<u.length;E++){let x=u[E];if((x.route.HydrateFallback||x.route.hydrateFallbackElement)&&(b=E),x.route.id){let{loaderData:S,errors:_}=c,R=x.route.loader&&!S.hasOwnProperty(x.route.id)&&(!_||_[x.route.id]===void 0);if(x.route.lazy||R){l.isStatic&&(p=!0),b>=0?u=u.slice(0,b+1):u=[u[0]];break}}}}let g=l?.onError,y=c&&g?(E,x)=>{g(E,{location:c.location,params:c.matches?.[0]?.params??{},unstable_pattern:xu(c.matches),errorInfo:x})}:void 0;return u.reduceRight((E,x,S)=>{let _,R=!1,z=null,H=null;c&&(_=d&&x.route.id?d[x.route.id]:void 0,z=x.route.errorElement||rC,p&&(b<0&&S===0?(cw("route-fallback",!1,"No `HydrateFallback` element provided to render during initial hydration"),R=!0,H=null):b===S&&(R=!0,H=x.route.hydrateFallbackElement||null)));let Y=o.concat(u.slice(0,S+1)),K=()=>{let Z;return _?Z=z:R?Z=H:x.route.Component?Z=N.createElement(x.route.Component,null):x.route.element?Z=x.route.element:Z=E,N.createElement(lC,{match:x,routeContext:{outlet:E,matches:Y,isDataRoute:c!=null},children:Z})};return c&&(x.route.ErrorBoundary||x.route.errorElement||S===0)?N.createElement(iw,{location:c.location,revalidation:c.revalidation,component:z,error:_,children:K(),routeContext:{outlet:null,matches:Y,isDataRoute:!0},onError:y}):K()},null)}function Dg(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function uC(n){let o=N.useContext(di);return it(o,Dg(n)),o}function dC(n){let o=N.useContext(vu);return it(o,Dg(n)),o}function fC(n){let o=N.useContext(Js);return it(o,Dg(n)),o}function _g(n){let o=fC(n),l=o.matches[o.matches.length-1];return it(l.route.id,`${n} can only be used on routes that contain a unique "id"`),l.route.id}function mC(){return _g("useRouteId")}function lw(){let n=N.useContext(Eg),o=dC("useRouteError"),l=_g("useRouteError");return n!==void 0?n:o.errors?.[l]}function pC(){let{router:n}=uC("useNavigate"),o=_g("useNavigate"),l=N.useRef(!1);return rw(()=>{l.current=!0}),N.useCallback(async(u,d={})=>{Kt(l.current,ow),l.current&&(typeof u=="number"?await n.navigate(u):await n.navigate(u,{fromRouteId:o,...d}))},[n,o])}var KS={};function cw(n,o,l){!o&&!KS[n]&&(KS[n]=!0,Kt(!1,l))}var WS={};function e4(n,o){!n&&!WS[o]&&(WS[o]=!0,console.warn(o))}var hC="useOptimistic",t4=PR[hC],bC=()=>{};function gC(n){return t4?t4(n):[n,bC]}function yC(n){let o={hasErrorBoundary:n.hasErrorBoundary||n.ErrorBoundary!=null||n.errorElement!=null};return n.Component&&(n.element&&Kt(!1,"You should not include both `Component` and `element` on your route - `Component` will be used."),Object.assign(o,{element:N.createElement(n.Component),Component:void 0})),n.HydrateFallback&&(n.hydrateFallbackElement&&Kt(!1,"You should not include both `HydrateFallback` and `hydrateFallbackElement` on your route - `HydrateFallback` will be used."),Object.assign(o,{hydrateFallbackElement:N.createElement(n.HydrateFallback),HydrateFallback:void 0})),n.ErrorBoundary&&(n.errorElement&&Kt(!1,"You should not include both `ErrorBoundary` and `errorElement` on your route - `ErrorBoundary` will be used."),Object.assign(o,{errorElement:N.createElement(n.ErrorBoundary),ErrorBoundary:void 0})),o}var xC=["HydrateFallback","hydrateFallbackElement"],vC=class{constructor(){this.status="pending",this.promise=new Promise((n,o)=>{this.resolve=l=>{this.status==="pending"&&(this.status="resolved",n(l))},this.reject=l=>{this.status==="pending"&&(this.status="rejected",o(l))}})}};function NC({router:n,flushSync:o,onError:l,unstable_useTransitions:c}){c=XU()||c;let[d,p]=N.useState(n.state),[b,g]=gC(d),[y,E]=N.useState(),[x,S]=N.useState({isTransitioning:!1}),[_,R]=N.useState(),[z,H]=N.useState(),[Y,K]=N.useState(),Z=N.useRef(new Map),J=N.useCallback((k,{deletedFetchers:G,newErrors:I,flushSync:be,viewTransitionOpts:se})=>{I&&l&&Object.values(I).forEach(pe=>l(pe,{location:k.location,params:k.matches[0]?.params??{},unstable_pattern:xu(k.matches)})),k.fetchers.forEach((pe,De)=>{pe.data!==void 0&&Z.current.set(De,pe.data)}),G.forEach(pe=>Z.current.delete(pe)),e4(be===!1||o!=null,'You provided the `flushSync` option to a router update, but you are not using the `<RouterProvider>` from `react-router/dom` so `ReactDOM.flushSync()` is unavailable. Please update your app to `import { RouterProvider } from "react-router/dom"` and ensure you have `react-dom` installed as a dependency to use the `flushSync` option.');let ae=n.window!=null&&n.window.document!=null&&typeof n.window.document.startViewTransition=="function";if(e4(se==null||ae,"You provided the `viewTransition` option to a router update, but you do not appear to be running in a DOM environment as `window.startViewTransition` is not available."),!se||!ae){o&&be?o(()=>p(k)):c===!1?p(k):N.startTransition(()=>{c===!0&&g(pe=>a4(pe,k)),p(k)});return}if(o&&be){o(()=>{z&&(_?.resolve(),z.skipTransition()),S({isTransitioning:!0,flushSync:!0,currentLocation:se.currentLocation,nextLocation:se.nextLocation})});let pe=n.window.document.startViewTransition(()=>{o(()=>p(k))});pe.finished.finally(()=>{o(()=>{R(void 0),H(void 0),E(void 0),S({isTransitioning:!1})})}),o(()=>H(pe));return}z?(_?.resolve(),z.skipTransition(),K({state:k,currentLocation:se.currentLocation,nextLocation:se.nextLocation})):(E(k),S({isTransitioning:!0,flushSync:!1,currentLocation:se.currentLocation,nextLocation:se.nextLocation}))},[n.window,o,z,_,c,g,l]);N.useLayoutEffect(()=>n.subscribe(J),[n,J]),N.useEffect(()=>{x.isTransitioning&&!x.flushSync&&R(new vC)},[x]),N.useEffect(()=>{if(_&&y&&n.window){let k=y,G=_.promise,I=n.window.document.startViewTransition(async()=>{c===!1?p(k):N.startTransition(()=>{c===!0&&g(be=>a4(be,k)),p(k)}),await G});I.finished.finally(()=>{R(void 0),H(void 0),E(void 0),S({isTransitioning:!1})}),H(I)}},[y,_,n.window,c,g]),N.useEffect(()=>{_&&y&&b.location.key===y.location.key&&_.resolve()},[_,z,b.location,y]),N.useEffect(()=>{!x.isTransitioning&&Y&&(E(Y.state),S({isTransitioning:!0,flushSync:!1,currentLocation:Y.currentLocation,nextLocation:Y.nextLocation}),K(void 0))},[x.isTransitioning,Y]);let ee=N.useMemo(()=>({createHref:n.createHref,encodeLocation:n.encodeLocation,go:k=>n.navigate(k),push:(k,G,I)=>n.navigate(k,{state:G,preventScrollReset:I?.preventScrollReset}),replace:(k,G,I)=>n.navigate(k,{replace:!0,state:G,preventScrollReset:I?.preventScrollReset})}),[n]),ce=n.basename||"/",de=N.useMemo(()=>({router:n,navigator:ee,static:!1,basename:ce,onError:l}),[n,ee,ce,l]);return N.createElement(N.Fragment,null,N.createElement(di.Provider,{value:de},N.createElement(vu.Provider,{value:b},N.createElement(sw.Provider,{value:Z.current},N.createElement(wg.Provider,{value:x},N.createElement(EC,{basename:ce,location:b.location,navigationType:b.historyAction,navigator:ee,unstable_useTransitions:c},N.createElement(SC,{routes:n.routes,future:n.future,state:b,isStatic:!1,onError:l})))))),null)}function a4(n,o){return{...n,navigation:o.navigation.state!=="idle"?o.navigation:n.navigation,revalidation:o.revalidation!=="idle"?o.revalidation:n.revalidation,actionData:o.navigation.state!=="submitting"?o.actionData:n.actionData,fetchers:o.fetchers}}var SC=N.memo(wC);function wC({routes:n,future:o,state:l,isStatic:c,onError:u}){return nC(n,void 0,{state:l,isStatic:c,onError:u})}function s4({to:n,replace:o,state:l,relative:c}){it(Sl(),"<Navigate> may be used only in the context of a <Router> component.");let{static:u}=N.useContext(Cs);Kt(!u,"<Navigate> must not be used on the initial render in a <StaticRouter>. This is a no-op, but you should modify your code so the <Navigate> is only ever rendered in response to some user interaction or state change.");let{matches:d}=N.useContext(Js),{pathname:p}=hn(),b=_o(),g=gu(n,Kf(d),p,c==="path"),y=JSON.stringify(g);return N.useEffect(()=>{b(JSON.parse(y),{replace:o,state:l,relative:c})},[b,y,c,o,l]),null}function uw(n){return sC(n.context)}function EC({basename:n="/",children:o=null,location:l,navigationType:c="POP",navigator:u,static:d=!1,unstable_useTransitions:p}){it(!Sl(),"You cannot render a <Router> inside another <Router>. You should never have more than one in your app.");let b=n.replace(/^\/*/,"/"),g=N.useMemo(()=>({basename:b,navigator:u,static:d,unstable_useTransitions:p,future:{}}),[b,u,d,p]);typeof l=="string"&&(l=Do(l));let{pathname:y="/",search:E="",hash:x="",state:S=null,key:_="default",unstable_mask:R}=l,z=N.useMemo(()=>{let H=Zs(y,b);return H==null?null:{location:{pathname:H,search:E,hash:x,state:S,key:_,unstable_mask:R},navigationType:c}},[b,y,E,x,S,_,c,R]);return Kt(z!=null,`<Router basename="${b}"> is not able to match the URL "${y}${E}${x}" because it does not start with the basename, so the <Router> won't render anything.`),z==null?null:N.createElement(Cs.Provider,{value:g},N.createElement(Wf.Provider,{children:o,value:z}))}var Gf="get",Pf="application/x-www-form-urlencoded";function em(n){return typeof HTMLElement<"u"&&n instanceof HTMLElement}function DC(n){return em(n)&&n.tagName.toLowerCase()==="button"}function _C(n){return em(n)&&n.tagName.toLowerCase()==="form"}function RC(n){return em(n)&&n.tagName.toLowerCase()==="input"}function kC(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function UC(n,o){return n.button===0&&(!o||o==="_self")&&!kC(n)}function dg(n=""){return new URLSearchParams(typeof n=="string"||Array.isArray(n)||n instanceof URLSearchParams?n:Object.keys(n).reduce((o,l)=>{let c=n[l];return o.concat(Array.isArray(c)?c.map(u=>[l,u]):[[l,c]])},[]))}function CC(n,o){let l=dg(n);return o&&o.forEach((c,u)=>{l.has(u)||o.getAll(u).forEach(d=>{l.append(u,d)})}),l}var Hf=null;function jC(){if(Hf===null)try{new FormData(document.createElement("form"),0),Hf=!1}catch{Hf=!0}return Hf}var TC=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function Zb(n){return n!=null&&!TC.has(n)?(Kt(!1,`"${n}" is not a valid \`encType\` for \`<Form>\`/\`<fetcher.Form>\` and will default to "${Pf}"`),null):n}function OC(n,o){let l,c,u,d,p;if(_C(n)){let b=n.getAttribute("action");c=b?Zs(b,o):null,l=n.getAttribute("method")||Gf,u=Zb(n.getAttribute("enctype"))||Pf,d=new FormData(n)}else if(DC(n)||RC(n)&&(n.type==="submit"||n.type==="image")){let b=n.form;if(b==null)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let g=n.getAttribute("formaction")||b.getAttribute("action");if(c=g?Zs(g,o):null,l=n.getAttribute("formmethod")||b.getAttribute("method")||Gf,u=Zb(n.getAttribute("formenctype"))||Zb(b.getAttribute("enctype"))||Pf,d=new FormData(b,n),!jC()){let{name:y,type:E,value:x}=n;if(E==="image"){let S=y?`${y}.`:"";d.append(`${S}x`,"0"),d.append(`${S}y`,"0")}else y&&d.append(y,x)}}else{if(em(n))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');l=Gf,c=null,u=Pf,p=n}return d&&u==="text/plain"&&(p=d,d=void 0),{action:c,method:l.toLowerCase(),encType:u,formData:d,body:p}}Object.getOwnPropertyNames(Object.prototype).sort().join("\0");function Rg(n,o){if(n===!1||n===null||typeof n>"u")throw new Error(o)}function AC(n,o,l,c){let u=typeof n=="string"?new URL(n,typeof window>"u"?"server://singlefetch/":window.location.origin):n;return l?u.pathname.endsWith("/")?u.pathname=`${u.pathname}_.${c}`:u.pathname=`${u.pathname}.${c}`:u.pathname==="/"?u.pathname=`_root.${c}`:o&&Zs(u.pathname,o)==="/"?u.pathname=`${o.replace(/\/$/,"")}/_root.${c}`:u.pathname=`${u.pathname.replace(/\/$/,"")}.${c}`,u}async function VC(n,o){if(n.id in o)return o[n.id];try{let l=await import(n.module);return o[n.id]=l,l}catch(l){return console.error(`Error loading route module \`${n.module}\`, reloading page...`),console.error(l),window.__reactRouterContext&&window.__reactRouterContext.isSpaMode,window.location.reload(),new Promise(()=>{})}}function MC(n){return n==null?!1:n.href==null?n.rel==="preload"&&typeof n.imageSrcSet=="string"&&typeof n.imageSizes=="string":typeof n.rel=="string"&&typeof n.href=="string"}async function zC(n,o,l){let c=await Promise.all(n.map(async u=>{let d=o.routes[u.route.id];if(d){let p=await VC(d,l);return p.links?p.links():[]}return[]}));return BC(c.flat(1).filter(MC).filter(u=>u.rel==="stylesheet"||u.rel==="preload").map(u=>u.rel==="stylesheet"?{...u,rel:"prefetch",as:"style"}:{...u,rel:"prefetch"}))}function n4(n,o,l,c,u,d){let p=(g,y)=>l[y]?g.route.id!==l[y].route.id:!0,b=(g,y)=>l[y].pathname!==g.pathname||l[y].route.path?.endsWith("*")&&l[y].params["*"]!==g.params["*"];return d==="assets"?o.filter((g,y)=>p(g,y)||b(g,y)):d==="data"?o.filter((g,y)=>{let E=c.routes[g.route.id];if(!E||!E.hasLoader)return!1;if(p(g,y)||b(g,y))return!0;if(g.route.shouldRevalidate){let x=g.route.shouldRevalidate({currentUrl:new URL(u.pathname+u.search+u.hash,window.origin),currentParams:l[0]?.params||{},nextUrl:new URL(n,window.origin),nextParams:g.params,defaultShouldRevalidate:!0});if(typeof x=="boolean")return x}return!0}):[]}function LC(n,o,{includeHydrateFallback:l}={}){return HC(n.map(c=>{let u=o.routes[c.route.id];if(!u)return[];let d=[u.module];return u.clientActionModule&&(d=d.concat(u.clientActionModule)),u.clientLoaderModule&&(d=d.concat(u.clientLoaderModule)),l&&u.hydrateFallbackModule&&(d=d.concat(u.hydrateFallbackModule)),u.imports&&(d=d.concat(u.imports)),d}).flat(1))}function HC(n){return[...new Set(n)]}function $C(n){let o={},l=Object.keys(n).sort();for(let c of l)o[c]=n[c];return o}function BC(n,o){let l=new Set;return new Set(o),n.reduce((c,u)=>{let d=JSON.stringify($C(u));return l.has(d)||(l.add(d),c.push({key:d,link:u})),c},[])}function dw(){let n=N.useContext(di);return Rg(n,"You must render this element inside a <DataRouterContext.Provider> element"),n}function IC(){let n=N.useContext(vu);return Rg(n,"You must render this element inside a <DataRouterStateContext.Provider> element"),n}var kg=N.createContext(void 0);kg.displayName="FrameworkContext";function fw(){let n=N.useContext(kg);return Rg(n,"You must render this element inside a <HydratedRouter> element"),n}function YC(n,o){let l=N.useContext(kg),[c,u]=N.useState(!1),[d,p]=N.useState(!1),{onFocus:b,onBlur:g,onMouseEnter:y,onMouseLeave:E,onTouchStart:x}=o,S=N.useRef(null);N.useEffect(()=>{if(n==="render"&&p(!0),n==="viewport"){let z=Y=>{Y.forEach(K=>{p(K.isIntersecting)})},H=new IntersectionObserver(z,{threshold:.5});return S.current&&H.observe(S.current),()=>{H.disconnect()}}},[n]),N.useEffect(()=>{if(c){let z=setTimeout(()=>{p(!0)},100);return()=>{clearTimeout(z)}}},[c]);let _=()=>{u(!0)},R=()=>{u(!1),p(!1)};return l?n!=="intent"?[d,S,{}]:[d,S,{onFocus:su(b,_),onBlur:su(g,R),onMouseEnter:su(y,_),onMouseLeave:su(E,R),onTouchStart:su(x,_)}]:[!1,S,{}]}function su(n,o){return l=>{n&&n(l),l.defaultPrevented||o(l)}}function qC({page:n,...o}){let{router:l}=dw(),c=N.useMemo(()=>hr(l.routes,n,l.basename),[l.routes,n,l.basename]);return c?N.createElement(PC,{page:n,matches:c,...o}):null}function GC(n){let{manifest:o,routeModules:l}=fw(),[c,u]=N.useState([]);return N.useEffect(()=>{let d=!1;return zC(n,o,l).then(p=>{d||u(p)}),()=>{d=!0}},[n,o,l]),c}function PC({page:n,matches:o,...l}){let c=hn(),{future:u,manifest:d,routeModules:p}=fw(),{basename:b}=dw(),{loaderData:g,matches:y}=IC(),E=N.useMemo(()=>n4(n,o,y,d,c,"data"),[n,o,y,d,c]),x=N.useMemo(()=>n4(n,o,y,d,c,"assets"),[n,o,y,d,c]),S=N.useMemo(()=>{if(n===c.pathname+c.search+c.hash)return[];let z=new Set,H=!1;if(o.forEach(K=>{let Z=d.routes[K.route.id];!Z||!Z.hasLoader||(!E.some(J=>J.route.id===K.route.id)&&K.route.id in g&&p[K.route.id]?.shouldRevalidate||Z.hasClientLoader?H=!0:z.add(K.route.id))}),z.size===0)return[];let Y=AC(n,b,u.unstable_trailingSlashAwareDataRequests,"data");return H&&z.size>0&&Y.searchParams.set("_routes",o.filter(K=>z.has(K.route.id)).map(K=>K.route.id).join(",")),[Y.pathname+Y.search]},[b,u.unstable_trailingSlashAwareDataRequests,g,c,d,E,o,n,p]),_=N.useMemo(()=>LC(x,d),[x,d]),R=GC(x);return N.createElement(N.Fragment,null,S.map(z=>N.createElement("link",{key:z,rel:"prefetch",as:"fetch",href:z,...l})),_.map(z=>N.createElement("link",{key:z,rel:"modulepreload",href:z,...l})),R.map(({key:z,link:H})=>N.createElement("link",{key:z,nonce:l.nonce,...H,crossOrigin:H.crossOrigin??l.crossOrigin})))}function FC(...n){return o=>{n.forEach(l=>{typeof l=="function"?l(o):l!=null&&(l.current=o)})}}var XC=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";try{XC&&(window.__reactRouterVersion="7.13.1")}catch{}function QC(n,o){return wU({basename:o?.basename,getContext:o?.getContext,future:o?.future,history:Hk({window:o?.window}),hydrationData:ZC(),routes:n,mapRouteProperties:yC,hydrationRouteProperties:xC,dataStrategy:o?.dataStrategy,patchRoutesOnNavigation:o?.patchRoutesOnNavigation,window:o?.window,unstable_instrumentations:o?.unstable_instrumentations}).initialize()}function ZC(){let n=window?.__staticRouterHydrationData;return n&&n.errors&&(n={...n,errors:JC(n.errors)}),n}function JC(n){if(!n)return null;let o=Object.entries(n),l={};for(let[c,u]of o)if(u&&u.__type==="RouteErrorResponse")l[c]=new yu(u.status,u.statusText,u.data,u.internal===!0);else if(u&&u.__type==="Error"){if(u.__subType){let d=window[u.__subType];if(typeof d=="function")try{let p=new d(u.message);p.stack="",l[c]=p}catch{}}if(l[c]==null){let d=new Error(u.message);d.stack="",l[c]=d}}else l[c]=u;return l}var mw=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,us=N.forwardRef(function({onClick:o,discover:l="render",prefetch:c="none",relative:u,reloadDocument:d,replace:p,unstable_mask:b,state:g,target:y,to:E,preventScrollReset:x,viewTransition:S,unstable_defaultShouldRevalidate:_,...R},z){let{basename:H,navigator:Y,unstable_useTransitions:K}=N.useContext(Cs),Z=typeof E=="string"&&mw.test(E),J=Y4(E,H);E=J.to;let ee=eC(E,{relative:u}),ce=hn(),de=null;if(b){let De=gu(b,[],ce.unstable_mask?ce.unstable_mask.pathname:"/",!0);H!=="/"&&(De.pathname=De.pathname==="/"?H:mn([H,De.pathname])),de=Y.createHref(De)}let[k,G,I]=YC(c,R),be=ej(E,{replace:p,unstable_mask:b,state:g,target:y,preventScrollReset:x,relative:u,viewTransition:S,unstable_defaultShouldRevalidate:_,unstable_useTransitions:K});function se(De){o&&o(De),De.defaultPrevented||be(De)}let ae=!(J.isExternal||d),pe=N.createElement("a",{...R,...I,href:(ae?de:void 0)||J.absoluteURL||ee,onClick:ae?se:o,ref:FC(z,G),target:y,"data-discover":!Z&&l==="render"?"true":void 0});return k&&!Z?N.createElement(N.Fragment,null,pe,N.createElement(qC,{page:ee})):pe});us.displayName="Link";var pu=N.forwardRef(function({"aria-current":o="page",caseSensitive:l=!1,className:c="",end:u=!1,style:d,to:p,viewTransition:b,children:g,...y},E){let x=Su(p,{relative:y.relative}),S=hn(),_=N.useContext(vu),{navigator:R,basename:z}=N.useContext(Cs),H=_!=null&&oj(x)&&b===!0,Y=R.encodeLocation?R.encodeLocation(x).pathname:x.pathname,K=S.pathname,Z=_&&_.navigation&&_.navigation.location?_.navigation.location.pathname:null;l||(K=K.toLowerCase(),Z=Z?Z.toLowerCase():null,Y=Y.toLowerCase()),Z&&z&&(Z=Zs(Z,z)||Z);const J=Y!=="/"&&Y.endsWith("/")?Y.length-1:Y.length;let ee=K===Y||!u&&K.startsWith(Y)&&K.charAt(J)==="/",ce=Z!=null&&(Z===Y||!u&&Z.startsWith(Y)&&Z.charAt(Y.length)==="/"),de={isActive:ee,isPending:ce,isTransitioning:H},k=ee?o:void 0,G;typeof c=="function"?G=c(de):G=[c,ee?"active":null,ce?"pending":null,H?"transitioning":null].filter(Boolean).join(" ");let I=typeof d=="function"?d(de):d;return N.createElement(us,{...y,"aria-current":k,className:G,ref:E,style:I,to:p,viewTransition:b},typeof g=="function"?g(de):g)});pu.displayName="NavLink";var KC=N.forwardRef(({discover:n="render",fetcherKey:o,navigate:l,reloadDocument:c,replace:u,state:d,method:p=Gf,action:b,onSubmit:g,relative:y,preventScrollReset:E,viewTransition:x,unstable_defaultShouldRevalidate:S,..._},R)=>{let{unstable_useTransitions:z}=N.useContext(Cs),H=sj(),Y=nj(b,{relative:y}),K=p.toLowerCase()==="get"?"get":"post",Z=typeof b=="string"&&mw.test(b),J=ee=>{if(g&&g(ee),ee.defaultPrevented)return;ee.preventDefault();let ce=ee.nativeEvent.submitter,de=ce?.getAttribute("formmethod")||p,k=()=>H(ce||ee.currentTarget,{fetcherKey:o,method:de,navigate:l,replace:u,state:d,relative:y,preventScrollReset:E,viewTransition:x,unstable_defaultShouldRevalidate:S});z&&l!==!1?N.startTransition(()=>k()):k()};return N.createElement("form",{ref:R,method:K,action:Y,onSubmit:c?g:J,..._,"data-discover":!Z&&n==="render"?"true":void 0})});KC.displayName="Form";function WC(n){return`${n} must be used within a data router. See https://reactrouter.com/en/main/routers/picking-a-router.`}function pw(n){let o=N.useContext(di);return it(o,WC(n)),o}function ej(n,{target:o,replace:l,unstable_mask:c,state:u,preventScrollReset:d,relative:p,viewTransition:b,unstable_defaultShouldRevalidate:g,unstable_useTransitions:y}={}){let E=_o(),x=hn(),S=Su(n,{relative:p});return N.useCallback(_=>{if(UC(_,o)){_.preventDefault();let R=l!==void 0?l:Xn(x)===Xn(S),z=()=>E(n,{replace:R,unstable_mask:c,state:u,preventScrollReset:d,relative:p,viewTransition:b,unstable_defaultShouldRevalidate:g});y?N.startTransition(()=>z()):z()}},[x,E,S,l,c,u,o,n,d,p,b,g,y])}function tm(n){Kt(typeof URLSearchParams<"u","You cannot use the `useSearchParams` hook in a browser that does not support the URLSearchParams API. If you need to support Internet Explorer 11, we recommend you load a polyfill such as https://github.com/ungap/url-search-params.");let o=N.useRef(dg(n)),l=N.useRef(!1),c=hn(),u=N.useMemo(()=>CC(c.search,l.current?null:o.current),[c.search]),d=_o(),p=N.useCallback((b,g)=>{const y=dg(typeof b=="function"?b(new URLSearchParams(u)):b);l.current=!0,d("?"+y,g)},[d,u]);return[u,p]}var tj=0,aj=()=>`__${String(++tj)}__`;function sj(){let{router:n}=pw("useSubmit"),{basename:o}=N.useContext(Cs),l=mC(),c=n.fetch,u=n.navigate;return N.useCallback(async(d,p={})=>{let{action:b,method:g,encType:y,formData:E,body:x}=OC(d,o);if(p.navigate===!1){let S=p.fetcherKey||aj();await c(S,l,p.action||b,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:E,body:x,formMethod:p.method||g,formEncType:p.encType||y,flushSync:p.flushSync})}else await u(p.action||b,{unstable_defaultShouldRevalidate:p.unstable_defaultShouldRevalidate,preventScrollReset:p.preventScrollReset,formData:E,body:x,formMethod:p.method||g,formEncType:p.encType||y,replace:p.replace,state:p.state,fromRouteId:l,flushSync:p.flushSync,viewTransition:p.viewTransition})},[c,u,o,l])}function nj(n,{relative:o}={}){let{basename:l}=N.useContext(Cs),c=N.useContext(Js);it(c,"useFormAction must be used inside a RouteContext");let[u]=c.matches.slice(-1),d={...Su(n||".",{relative:o})},p=hn();if(n==null){d.search=p.search;let b=new URLSearchParams(d.search),g=b.getAll("index");if(g.some(E=>E==="")){b.delete("index"),g.filter(x=>x).forEach(x=>b.append("index",x));let E=b.toString();d.search=E?`?${E}`:""}}return(!n||n===".")&&u.route.index&&(d.search=d.search?d.search.replace(/^\?/,"?index&"):"?index"),l!=="/"&&(d.pathname=d.pathname==="/"?l:mn([l,d.pathname])),Xn(d)}function oj(n,{relative:o}={}){let l=N.useContext(wg);it(l!=null,"`useViewTransitionState` must be used within `react-router-dom`'s `RouterProvider`. Did you accidentally import `RouterProvider` from `react-router`?");let{basename:c}=pw("useViewTransitionState"),u=Su(n,{relative:o});if(!l.isTransitioning)return!1;let d=Zs(l.currentLocation.pathname,c)||l.currentLocation.pathname,p=Zs(l.nextLocation.pathname,c)||l.nextLocation.pathname;return Zf(u.pathname,p)!=null||Zf(u.pathname,d)!=null}const o4=n=>{let o;const l=new Set,c=(y,E)=>{const x=typeof y=="function"?y(o):y;if(!Object.is(x,o)){const S=o;o=E??(typeof x!="object"||x===null)?x:Object.assign({},o,x),l.forEach(_=>_(o,S))}},u=()=>o,b={setState:c,getState:u,getInitialState:()=>g,subscribe:y=>(l.add(y),()=>l.delete(y))},g=o=n(c,u,b);return b},rj=(n=>n?o4(n):o4),ij=n=>n;function lj(n,o=ij){const l=gl.useSyncExternalStore(n.subscribe,gl.useCallback(()=>o(n.getState()),[n,o]),gl.useCallback(()=>o(n.getInitialState()),[n,o]));return gl.useDebugValue(l),l}const r4=n=>{const o=rj(n),l=c=>lj(o,c);return Object.assign(l,o),l},am=(n=>n?r4(n):r4),hw="/api/v1";class ii extends Error{constructor(o,l,c){super(c),this.status=o,this.code=l,this.name="ApiError"}}async function $f(n,o,l,c,u){let d=`${hw}${o}`;if(c){const g=new URLSearchParams(c).toString();g&&(d+=`?${g}`)}const p={method:n,headers:{"Content-Type":"application/json"}};l!==void 0&&(p.body=JSON.stringify(l)),u?.signal&&(p.signal=u.signal);const b=await fetch(d,p);if(!b.ok){let g="UNKNOWN",y=b.statusText;try{const E=await b.json();E.code&&(g=E.code),E.message&&(y=E.message)}catch{}throw new ii(b.status,g,y)}return b.json()}const Jb=new Map;function cj(n,o){let l=`${hw}${n}`;if(o){const c=new URLSearchParams(o).toString();c&&(l+=`?${c}`)}return l}const Yt={get(n,o,l){const c=cj(n,o),u=Jb.get(c);if(u)return u;const d=$f("GET",n,void 0,o,l).finally(()=>{Jb.delete(c)});return Jb.set(c,d),d},post(n,o,l){return $f("POST",n,o,void 0,l)},put(n,o){return $f("PUT",n,o)},delete(n){return $f("DELETE",n)}},uj=3e4,dj=1e3,fj=3e4;class mj{ws=null;url="";handlers=new Map;statusHandlers=new Set;heartbeatTimer=null;reconnectTimer=null;reconnectAttempt=0;intentionalClose=!1;_status="disconnected";get status(){return this._status}setStatus(o){this._status=o;for(const l of this.statusHandlers)l(o)}onStatusChange(o){return this.statusHandlers.add(o),()=>{this.statusHandlers.delete(o)}}connect(o){this.url=o,this.intentionalClose=!1,this.reconnectAttempt=0,this.open()}disconnect(){this.intentionalClose=!0,this.clearTimers(),this.ws&&(this.ws.close(),this.ws=null),this.setStatus("disconnected")}on(o,l){let c=this.handlers.get(o);return c||(c=new Set,this.handlers.set(o,c)),c.add(l),()=>{c.delete(l),c.size===0&&this.handlers.delete(o)}}send(o,l){if(this.ws?.readyState!==WebSocket.OPEN)return;const c={event:o,payload:l,timestamp:Date.now()};this.ws.send(JSON.stringify(c))}open(){this.setStatus("connecting");const o=new WebSocket(this.url);o.onopen=()=>{this.reconnectAttempt=0,this.setStatus("connected"),this.startHeartbeat()},o.onmessage=l=>{try{const c=JSON.parse(String(l.data));if(c.event==="pong")return;const u=this.handlers.get(c.event);if(u)for(const d of u)d(c.payload)}catch{}},o.onclose=()=>{this.stopHeartbeat(),this.intentionalClose||(this.setStatus("reconnecting"),this.scheduleReconnect())},o.onerror=()=>{},this.ws=o}startHeartbeat(){this.stopHeartbeat(),this.heartbeatTimer=setInterval(()=>{this.ws?.readyState===WebSocket.OPEN&&this.ws.send(JSON.stringify({event:"ping",payload:null,timestamp:Date.now()}))},uj)}stopHeartbeat(){this.heartbeatTimer&&(clearInterval(this.heartbeatTimer),this.heartbeatTimer=null)}scheduleReconnect(){if(this.reconnectTimer)return;const o=Math.min(dj*2**this.reconnectAttempt,fj);this.reconnectAttempt++,this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.open()},o)}clearTimers(){this.stopHeartbeat(),this.reconnectTimer&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null)}}const pn=new mj,vr="lib_cloud_default",za=am((n,o)=>({libraries:[],loading:!1,error:null,fetchLibraries:async()=>{n({loading:!0,error:null});try{const l=await Yt.get("/libraries");n({libraries:l,loading:!1})}catch(l){n({error:l instanceof Error?l.message:"Failed to load libraries",loading:!1})}},createLibrary:async l=>{const c=await Yt.post("/libraries",l);return n(u=>({libraries:[...u.libraries,c]})),c},deleteLibrary:async l=>{await Yt.delete(`/libraries/${l}`),n(c=>({libraries:c.libraries.filter(u=>u.id!==l)}))},updateLibraryName:async(l,c)=>{const u=await Yt.put(`/libraries/${l}`,{name:c});n(d=>({libraries:d.libraries.map(p=>p.id===l?u:p)}))},_updateLibraryOnline:(l,c)=>{n(u=>({libraries:u.libraries.map(d=>d.id===l?{...d,is_online:c}:d)}))},_refreshLibrary:async l=>{try{const c=await Yt.get(`/libraries/${l}`);n(u=>({libraries:u.libraries.map(d=>d.id===l?c:d)}))}catch{o().fetchLibraries()}}})),wl=n=>{const o=n.libraries.filter(c=>c.type==="cloud").sort((c,u)=>c.created_at.localeCompare(u.created_at)),l=n.libraries.filter(c=>c.type==="daemon").sort((c,u)=>c.name.localeCompare(u.name));return[...o,...l]},pj=n=>n.libraries.filter(o=>o.type==="daemon");pn.on("ws:daemon:status",n=>{const o=n;o.lib_id&&za.getState()._updateLibraryOnline(o.lib_id,o.is_online),za.getState().fetchLibraries()});pn.on("ws:daemon:connected",n=>{const o=n;o.lib_id&&za.getState()._updateLibraryOnline(o.lib_id,!0),za.getState().fetchLibraries()});pn.on("ws:library:updated",n=>{const o=n;za.getState()._refreshLibrary(o.library_id)});const bw=(...n)=>n.filter((o,l,c)=>!!o&&o.trim()!==""&&c.indexOf(o)===l).join(" ").trim();const hj=n=>n.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();const bj=n=>n.replace(/^([A-Z])|[\s-_]+(\w)/g,(o,l,c)=>c?c.toUpperCase():l.toLowerCase());const i4=n=>{const o=bj(n);return o.charAt(0).toUpperCase()+o.slice(1)};var gj={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const yj=n=>{for(const o in n)if(o.startsWith("aria-")||o==="role"||o==="title")return!0;return!1};const xj=N.forwardRef(({color:n="currentColor",size:o=24,strokeWidth:l=2,absoluteStrokeWidth:c,className:u="",children:d,iconNode:p,...b},g)=>N.createElement("svg",{ref:g,...gj,width:o,height:o,stroke:n,strokeWidth:c?Number(l)*24/Number(o):l,className:bw("lucide",u),...!d&&!yj(b)&&{"aria-hidden":"true"},...b},[...p.map(([y,E])=>N.createElement(y,E)),...Array.isArray(d)?d:[d]]));const Qe=(n,o)=>{const l=N.forwardRef(({className:c,...u},d)=>N.createElement(xj,{ref:d,iconNode:o,className:bw(`lucide-${hj(i4(n))}`,`lucide-${n}`,c),...u}));return l.displayName=i4(n),l};const vj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],gw=Qe("arrow-right",vj);const Nj=[["path",{d:"M7 7h10v10",key:"1tivn9"}],["path",{d:"M7 17 17 7",key:"1vkiza"}]],l4=Qe("arrow-up-right",Nj);const Sj=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],wj=Qe("boxes",Sj);const Ej=[["path",{d:"M12 18V5",key:"adv99a"}],["path",{d:"M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4",key:"1e3is1"}],["path",{d:"M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5",key:"1gqd8o"}],["path",{d:"M17.997 5.125a4 4 0 0 1 2.526 5.77",key:"iwvgf7"}],["path",{d:"M18 18a4 4 0 0 0 2-7.464",key:"efp6ie"}],["path",{d:"M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517",key:"1gq6am"}],["path",{d:"M6 18a4 4 0 0 1-2-7.464",key:"k1g0md"}],["path",{d:"M6.003 5.125a4 4 0 0 0-2.526 5.77",key:"q97ue3"}]],Dj=Qe("brain",Ej);const _j=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],ui=Qe("check",_j);const Rj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],ts=Qe("chevron-right",Rj);const kj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],yw=Qe("circle-alert",kj);const Uj=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],Cj=Qe("cloud",Uj);const jj=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],fg=Qe("copy",jj);const Tj=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],Oj=Qe("database",Tj);const Aj=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M8 13h2",key:"yr2amv"}],["path",{d:"M14 13h2",key:"un5t4a"}],["path",{d:"M8 17h2",key:"2yhykz"}],["path",{d:"M14 17h2",key:"10kma7"}]],Vj=Qe("file-spreadsheet",Aj);const Mj=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}],["path",{d:"M10 9H8",key:"b1mrlr"}],["path",{d:"M16 13H8",key:"t4e002"}],["path",{d:"M16 17H8",key:"z1uh3a"}]],xr=Qe("file-text",Mj);const zj=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],xw=Qe("file",zj);const Lj=[["path",{d:"M15 2h-4a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 2-2V8",key:"14sh0y"}],["path",{d:"M16.706 2.706A2.4 2.4 0 0 0 15 2v5a1 1 0 0 0 1 1h5a2.4 2.4 0 0 0-.706-1.706z",key:"1970lx"}],["path",{d:"M5 7a2 2 0 0 0-2 2v11a2 2 0 0 0 2 2h8a2 2 0 0 0 1.732-1",key:"l4dndm"}]],Hj=Qe("files",Lj);const $j=[["path",{d:"M18 19a5 5 0 0 1-5-5v8",key:"sz5oeg"}],["path",{d:"M9 20H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v5",key:"1w6njk"}],["circle",{cx:"13",cy:"12",r:"2",key:"1j92g6"}],["circle",{cx:"20",cy:"19",r:"2",key:"1obnsp"}]],sm=Qe("folder-git-2",$j);const Bj=[["path",{d:"M2 9V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H20a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2v-1",key:"fm4g5t"}],["path",{d:"M2 13h10",key:"pgb2dq"}],["path",{d:"m9 16 3-3-3-3",key:"6m91ic"}]],Ij=Qe("folder-input",Bj);const Yj=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],qj=Qe("folder-open",Yj);const Gj=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],vw=Qe("folder-plus",Gj);const Pj=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],Qs=Qe("folder",Pj);const Fj=[["path",{d:"M15 6a9 9 0 0 0-9 9V3",key:"1cii5b"}],["circle",{cx:"18",cy:"6",r:"3",key:"1h7g24"}],["circle",{cx:"6",cy:"18",r:"3",key:"fqmcym"}]],mg=Qe("git-branch",Fj);const Xj=[["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}],["line",{x1:"3",x2:"9",y1:"12",y2:"12",key:"1dyftd"}],["line",{x1:"15",x2:"21",y1:"12",y2:"12",key:"oup4p8"}]],Qj=Qe("git-commit-horizontal",Xj);const Zj=[["path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4",key:"tonef"}],["path",{d:"M9 18c-4.51 2-5-2-7-2",key:"9comsn"}]],c4=Qe("github",Zj);const Jj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],Kj=Qe("globe",Jj);const Wj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],eT=Qe("info",Wj);const tT=[["path",{d:"M18 5a2 2 0 0 1 2 2v8.526a2 2 0 0 0 .212.897l1.068 2.127a1 1 0 0 1-.9 1.45H3.62a1 1 0 0 1-.9-1.45l1.068-2.127A2 2 0 0 0 4 15.526V7a2 2 0 0 1 2-2z",key:"1pdavp"}],["path",{d:"M20.054 15.987H3.946",key:"14rxg9"}]],aT=Qe("laptop",tT);const sT=[["path",{d:"M2 5h20",key:"1fs1ex"}],["path",{d:"M6 12h12",key:"8npq4p"}],["path",{d:"M9 19h6",key:"456am0"}]],nT=Qe("list-filter",sT);const oT=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],Us=Qe("loader-circle",oT);const rT=[["path",{d:"M4 5h16",key:"1tepv9"}],["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 19h16",key:"1djgab"}]],iT=Qe("menu",rT);const lT=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],cT=Qe("monitor",lT);const uT=[["path",{d:"M20.985 12.486a9 9 0 1 1-9.473-9.472c.405-.022.617.46.402.803a6 6 0 0 0 8.268 8.268c.344-.215.825-.004.803.401",key:"kfwtm"}]],dT=Qe("moon",uT);const fT=[["path",{d:"M11 21.73a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73z",key:"1a0edw"}],["path",{d:"M12 22V12",key:"d0xqtd"}],["polyline",{points:"3.29 7 12 12 20.71 7",key:"ousv84"}],["path",{d:"m7.5 4.27 9 5.15",key:"1c824w"}]],vl=Qe("package",fT);const mT=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}]],pT=Qe("panel-left",mT);const hT=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],pg=Qe("pencil",hT);const bT=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],Nw=Qe("plus",bT);const gT=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],yT=Qe("refresh-cw",gT);const xT=[["path",{d:"M21 12a9 9 0 1 1-9-9c2.52 0 4.93 1 6.74 2.74L21 8",key:"1p45f6"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}]],vT=Qe("rotate-cw",xT);const NT=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],hg=Qe("search",NT);const ST=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],wT=Qe("settings",ST);const ET=[["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}],["circle",{cx:"6",cy:"12",r:"3",key:"w7nqdw"}],["circle",{cx:"18",cy:"19",r:"3",key:"1xt0gg"}],["line",{x1:"8.59",x2:"15.42",y1:"13.51",y2:"17.49",key:"47mynk"}],["line",{x1:"15.41",x2:"8.59",y1:"6.51",y2:"10.49",key:"1n3mei"}]],DT=Qe("share-2",ET);const _T=[["path",{d:"M11.017 2.814a1 1 0 0 1 1.966 0l1.051 5.558a2 2 0 0 0 1.594 1.594l5.558 1.051a1 1 0 0 1 0 1.966l-5.558 1.051a2 2 0 0 0-1.594 1.594l-1.051 5.558a1 1 0 0 1-1.966 0l-1.051-5.558a2 2 0 0 0-1.594-1.594l-5.558-1.051a1 1 0 0 1 0-1.966l5.558-1.051a2 2 0 0 0 1.594-1.594z",key:"1s2grr"}],["path",{d:"M20 2v4",key:"1rf3ol"}],["path",{d:"M22 4h-4",key:"gwowj6"}],["circle",{cx:"4",cy:"20",r:"2",key:"6kqj1y"}]],RT=Qe("sparkles",_T);const kT=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"m4.93 4.93 1.41 1.41",key:"149t6j"}],["path",{d:"m17.66 17.66 1.41 1.41",key:"ptbguv"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"m6.34 17.66-1.41 1.41",key:"1m8zz5"}],["path",{d:"m19.07 4.93-1.41 1.41",key:"1shlcs"}]],UT=Qe("sun",kT);const CT=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Sw=Qe("trash-2",CT);const jT=[["path",{d:"M12 3v12",key:"1x0j5s"}],["path",{d:"m17 8-5-5-5 5",key:"7q97r8"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}]],bg=Qe("upload",jT);const TT=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["path",{d:"M16 3.128a4 4 0 0 1 0 7.744",key:"16gr8j"}],["path",{d:"M22 21v-2a4 4 0 0 0-3-3.87",key:"kshegd"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}]],OT=Qe("users",TT);const AT=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],fi=Qe("x",AT),u4=n=>Symbol.iterator in n,d4=n=>"entries"in n,f4=(n,o)=>{const l=n instanceof Map?n:new Map(n.entries()),c=o instanceof Map?o:new Map(o.entries());if(l.size!==c.size)return!1;for(const[u,d]of l)if(!c.has(u)||!Object.is(d,c.get(u)))return!1;return!0},VT=(n,o)=>{const l=n[Symbol.iterator](),c=o[Symbol.iterator]();let u=l.next(),d=c.next();for(;!u.done&&!d.done;){if(!Object.is(u.value,d.value))return!1;u=l.next(),d=c.next()}return!!u.done&&!!d.done};function MT(n,o){return Object.is(n,o)?!0:typeof n!="object"||n===null||typeof o!="object"||o===null||Object.getPrototypeOf(n)!==Object.getPrototypeOf(o)?!1:u4(n)&&u4(o)?d4(n)&&d4(o)?f4(n,o):VT(n,o):f4({entries:()=>Object.entries(n)},{entries:()=>Object.entries(o)})}function mi(n){const o=gl.useRef(void 0);return l=>{const c=n(l);return MT(o.current,c)?o.current:o.current=c}}function gg(){const{t:n}=Ie(),o=za(mi(pj));if(o.length===0)return null;const l=o.filter(p=>p.is_online).length,c=o.length,u=l>0,d=u?n("sources.header.daemon_status",{online:l,total:c}):n("sources.header.all_offline");return f.jsxDEV("div",{className:"group relative flex items-center",title:d,children:[f.jsxDEV("span",{className:`inline-block h-[7px] w-[7px] rounded-full ${u?"bg-c4a-success":"bg-c4a-error"}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/DaemonStatus.tsx",lineNumber:21,columnNumber:7},this),f.jsxDEV("span",{className:"pointer-events-none absolute right-full mr-2 hidden whitespace-nowrap rounded bg-c4a-bg-elevated px-2 py-1 font-mono text-xs text-c4a-text-secondary shadow-c4a-md group-hover:block",children:d},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/DaemonStatus.tsx",lineNumber:24,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/DaemonStatus.tsx",lineNumber:20,columnNumber:5},this)}const m4=[{to:"/",labelKey:"nav.home"},{to:"/studio",labelKey:"nav.studio"},{to:"/docs",labelKey:"nav.docs"}];function zT(){const{t:n}=Ie(),[o,l]=N.useState(!1);return f.jsxDEV("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-base/95 backdrop-blur-sm",children:[f.jsxDEV("div",{className:"flex h-14 items-center justify-between px-4",children:[f.jsxDEV(us,{to:"/",className:"flex items-center gap-2 text-c4a-text-primary",children:[f.jsxDEV("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:22,columnNumber:11},this),f.jsxDEV("span",{className:"hidden font-mono text-sm font-semibold uppercase tracking-tight md:inline",children:"Context4AI"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:25,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:21,columnNumber:9},this),f.jsxDEV("div",{className:"hidden items-center gap-6 md:flex",children:[f.jsxDEV("nav",{className:"flex items-center gap-4",children:m4.map(({to:c,labelKey:u})=>f.jsxDEV(pu,{to:c,end:c==="/",className:({isActive:d})=>`font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(u)},c,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:34,columnNumber:15},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:32,columnNumber:11},this),f.jsxDEV("div",{className:"flex items-center gap-3",children:[f.jsxDEV(gg,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:51,columnNumber:13},this),f.jsxDEV(us,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:n("nav.login")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:52,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:31,columnNumber:9},this),f.jsxDEV("button",{onClick:()=>l(!o),className:"text-c4a-text-secondary md:hidden",children:o?f.jsxDEV(fi,{size:20},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:66,columnNumber:23},this):f.jsxDEV(iT,{size:20},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:66,columnNumber:41},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:62,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:19,columnNumber:7},this),o&&f.jsxDEV("div",{className:"border-t border-c4a-border-subtle bg-c4a-bg-surface px-4 pb-4 pt-2 md:hidden",children:[f.jsxDEV("nav",{className:"flex flex-col gap-2",children:m4.map(({to:c,labelKey:u})=>f.jsxDEV(pu,{to:c,end:c==="/",onClick:()=>l(!1),className:({isActive:d})=>`block py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:n(u)},c,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:75,columnNumber:15},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:73,columnNumber:11},this),f.jsxDEV("div",{className:"mt-2 border-t border-c4a-border-subtle pt-2",children:f.jsxDEV("div",{className:"flex items-center gap-3",children:[f.jsxDEV(gg,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:94,columnNumber:15},this),f.jsxDEV(us,{to:"/login",onClick:()=>l(!1),className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:n("nav.login")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:95,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:93,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:92,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:72,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Header.tsx",lineNumber:18,columnNumber:5},this)}function LT(n){return n==="system"&&typeof window<"u"?window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light":n==="system"?"dark":n}function ww(n){if(typeof window>"u")return;const o=LT(n);document.documentElement.setAttribute("data-theme",o),localStorage.setItem("theme",n)}function HT(){try{return localStorage.getItem("theme")||"system"}catch{return"system"}}const Ew=am(n=>({theme:HT(),setTheme:o=>{ww(o),n({theme:o})}}));let p4=!1;function $T(){if(p4||typeof window>"u")return;p4=!0;const n=window.matchMedia("(prefers-color-scheme: dark)"),o=()=>{const{theme:l}=Ew.getState();l==="system"&&ww("system")};n.addEventListener("change",o)}$T();const BT=[{mode:"light",icon:UT,labelKey:"footer.theme.light"},{mode:"dark",icon:dT,labelKey:"footer.theme.dark"},{mode:"system",icon:cT,labelKey:"footer.theme.system"}];function Dw(){const{t:n}=Ie(),{theme:o,setTheme:l}=Ew();return f.jsxDEV("div",{className:"flex items-center gap-1",children:BT.map(({mode:c,icon:u,labelKey:d})=>f.jsxDEV("button",{onClick:()=>l(c),title:n(d),className:`cursor-pointer rounded p-1.5 transition-colors duration-150 ${o===c?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:f.jsxDEV(u,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/ThemeSwitcher.tsx",lineNumber:30,columnNumber:11},this)},c,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/ThemeSwitcher.tsx",lineNumber:20,columnNumber:9},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/ThemeSwitcher.tsx",lineNumber:18,columnNumber:5},this)}function _w(){const{i18n:n}=Ie(),o=()=>{const l=n.language==="en"?"zh":"en";n.changeLanguage(l)};return f.jsxDEV("button",{onClick:o,className:"cursor-pointer rounded px-2 py-1 font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-secondary hover:bg-c4a-bg-hover",children:n.language==="en"?"CN":"EN"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/LanguageSwitcher.tsx",lineNumber:12,columnNumber:5},this)}function Rw({compact:n}){const{t:o}=Ie(),l=new Date().getFullYear(),c=n?"footer.copyright_compact":"footer.copyright";return f.jsxDEV("p",{className:"font-mono text-[11px] text-c4a-text-muted",children:o(c,{year:l})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/CopyrightLine.tsx",lineNumber:13,columnNumber:5},this)}const IT="_brandIcon_1c7st_1",YT="_iconPulse_1c7st_35",h4={brandIcon:IT,iconPulse:YT};function qT({variant:n}){const{t:o}=Ie(),l=n==="studio"?"bg-c4a-bg-surface":"bg-c4a-bg-base";return f.jsxDEV("footer",{className:`border-t border-c4a-border-subtle ${l} px-4 py-4`,children:f.jsxDEV("div",{className:"flex items-end justify-between gap-4",children:[f.jsxDEV("div",{className:"hidden items-center gap-3 md:flex",children:[f.jsxDEV("div",{className:h4.brandIcon,children:f.jsxDEV("span",{className:h4.iconPulse,children:"C4A"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:21,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:20,columnNumber:11},this),f.jsxDEV("div",{className:"flex flex-col",children:[f.jsxDEV("span",{className:"font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-primary",children:"Context4AI"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:24,columnNumber:13},this),f.jsxDEV("span",{className:"font-mono text-[10px] uppercase tracking-wider text-c4a-text-muted",children:o("footer.tagline")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:27,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:23,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:19,columnNumber:9},this),f.jsxDEV("div",{className:"ml-auto flex flex-col items-end gap-2",children:[f.jsxDEV("div",{className:"flex items-center gap-2",children:[f.jsxDEV(Dw,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:36,columnNumber:13},this),f.jsxDEV(_w,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:37,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:35,columnNumber:11},this),f.jsxDEV(Rw,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:39,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:34,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:17,columnNumber:7},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Footer.tsx",lineNumber:16,columnNumber:5},this)}function GT(){return f.jsxDEV("div",{className:"flex min-h-screen flex-col",children:[f.jsxDEV(zT,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/RootLayout.tsx",lineNumber:8,columnNumber:7},this),f.jsxDEV("main",{className:"mx-auto flex w-full max-w-[1200px] flex-1 flex-col px-4",children:f.jsxDEV(uw,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/RootLayout.tsx",lineNumber:10,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/RootLayout.tsx",lineNumber:9,columnNumber:7},this),f.jsxDEV(qT,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/RootLayout.tsx",lineNumber:12,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/RootLayout.tsx",lineNumber:7,columnNumber:5},this)}function PT({onToggleSidebar:n}){const{t:o}=Ie();return f.jsxDEV("header",{className:"sticky top-0 z-40 border-b border-c4a-border-subtle bg-c4a-bg-surface/95 backdrop-blur-sm",children:f.jsxDEV("div",{className:"relative flex h-14 items-center justify-between px-4",children:[f.jsxDEV("div",{className:"flex items-center gap-2",children:[n&&f.jsxDEV("button",{onClick:n,className:"text-c4a-text-secondary transition-colors duration-150 hover:text-c4a-text-primary md:hidden",children:f.jsxDEV(pT,{size:20},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:23,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:19,columnNumber:13},this),f.jsxDEV(us,{to:"/",className:"hidden items-center gap-2 text-c4a-text-primary md:flex",children:[f.jsxDEV("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:31,columnNumber:13},this),f.jsxDEV("span",{className:"font-mono text-sm font-semibold uppercase tracking-tight",children:"Context4AI"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:34,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:27,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:17,columnNumber:9},this),f.jsxDEV(us,{to:"/",className:"absolute left-1/2 flex -translate-x-1/2 items-center gap-2 text-c4a-text-primary md:hidden",children:f.jsxDEV("span",{className:"font-mono text-lg font-bold text-c4a-accent",children:"C4A"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:45,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:41,columnNumber:9},this),f.jsxDEV("div",{className:"flex items-center gap-3",children:[f.jsxDEV(gg,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:52,columnNumber:11},this),f.jsxDEV(us,{to:"/login",className:"font-mono text-xs uppercase tracking-tight text-c4a-text-muted transition-colors duration-150 hover:text-c4a-text-primary",children:o("nav.login")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:53,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:51,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:15,columnNumber:7},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/StudioHeader.tsx",lineNumber:14,columnNumber:5},this)}const FT=n=>`flex items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${n?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,XT=[{to:"/studio/modeling",icon:wj,i18nKey:"studio.sidebar.modeling"},{to:"/studio/brain",icon:Dj,i18nKey:"studio.sidebar.brain"},{to:"/studio/discovery",icon:hg,i18nKey:"studio.sidebar.discovery"},{to:"/studio/sharing",icon:DT,i18nKey:"studio.sidebar.sharing"},{to:"/studio/collaboration",icon:OT,i18nKey:"studio.sidebar.collaboration"},{to:"/studio/settings",icon:wT,i18nKey:"studio.sidebar.settings"}];function b4({onNavigate:n}){const{t:o}=Ie(),l=hn(),c=_o(),u=za(mi(wl)),d=l.pathname.startsWith("/studio/sources")||l.pathname.startsWith("/studio/source/"),[p,b]=N.useState(d);N.useEffect(()=>{d&&b(!0)},[d]);const g=y=>y.id===vr?o("sources.library.default_cloud_name"):y.name;return f.jsxDEV("aside",{className:"flex h-full w-[220px] shrink-0 flex-col border-r border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV("nav",{className:"flex flex-col gap-1",children:[f.jsxDEV("div",{className:"group/sources",children:[f.jsxDEV("button",{onClick:()=>b(y=>!y),className:`flex w-full cursor-pointer items-center gap-2 rounded px-3 py-2 font-mono text-xs uppercase tracking-tight transition-colors duration-150 ${d?"text-c4a-accent":"text-c4a-text-secondary hover:text-c4a-text-primary"}`,children:[f.jsxDEV(Oj,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:95,columnNumber:13},this),o("studio.sidebar.sources"),f.jsxDEV("span",{role:"button",tabIndex:0,onClick:y=>{y.stopPropagation(),c("/studio/sources/add-client"),n?.()},onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&(y.stopPropagation(),c("/studio/sources/add-client"),n?.())},className:"rounded p-0.5 text-c4a-text-muted opacity-0 transition-all hover:bg-c4a-bg-hover max-md:opacity-100 group-hover/sources:opacity-100 group-hover/sources:text-c4a-accent",title:o("sources.menu.add_client"),children:f.jsxDEV(Nw,{size:12},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:115,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:97,columnNumber:13},this),f.jsxDEV(ts,{size:12,className:`ml-auto shrink-0 transition-transform duration-200 ${p?"rotate-90":""}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:117,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:87,columnNumber:11},this),p&&f.jsxDEV("div",{className:"mt-0.5 flex flex-col gap-0.5",children:u.map(y=>{const E=g(y);return f.jsxDEV(pu,{to:`/studio/sources/${y.id}`,onClick:n,className:({isActive:x})=>`flex items-center gap-2 rounded py-1.5 pl-8 pr-3 font-mono text-xs tracking-tight transition-colors duration-150 ${x?"bg-c4a-bg-active text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover hover:text-c4a-text-primary"}`,children:[y.type==="cloud"?f.jsxDEV(Cj,{size:13,className:"shrink-0 opacity-60"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:141,columnNumber:23},this):f.jsxDEV(aT,{size:13,className:"shrink-0 opacity-60"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:143,columnNumber:23},this),f.jsxDEV("span",{className:"truncate",children:E},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:145,columnNumber:21},this),y.type==="daemon"&&(()=>{const x=y.config?.machine_id;return f.jsxDEV("span",{role:"button",tabIndex:0,onClick:S=>{S.preventDefault(),S.stopPropagation(),c("/studio/sources/add-client"),n?.()},onKeyDown:S=>{(S.key==="Enter"||S.key===" ")&&(S.preventDefault(),S.stopPropagation(),c("/studio/sources/add-client"),n?.())},className:"group/dot relative ml-auto shrink-0 cursor-pointer rounded-full p-1",children:[f.jsxDEV("span",{className:`block h-[7px] w-[7px] rounded-full ${y.is_online?"bg-c4a-success":"bg-c4a-error"}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:168,columnNumber:27},this),f.jsxDEV("span",{className:"pointer-events-none absolute left-full top-1/2 z-50 ml-2 hidden -translate-y-1/2 whitespace-nowrap rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-1.5 text-[11px] leading-relaxed text-c4a-text-secondary shadow-c4a-lg group-hover/dot:block",children:y.is_online?o("sources.menu.status_online",{machine:x??""}):o("sources.menu.status_offline",{machine:x??""})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:173,columnNumber:27},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:149,columnNumber:25},this)})()]},y.id,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:128,columnNumber:19},this)})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:124,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:86,columnNumber:9},this),XT.map(({to:y,icon:E,i18nKey:x})=>f.jsxDEV(pu,{to:y,onClick:n,className:({isActive:S})=>FT(S),children:[f.jsxDEV(E,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:196,columnNumber:13},this),o(x)]},y,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:190,columnNumber:11},this))]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:85,columnNumber:7},this),f.jsxDEV("div",{className:"mt-auto flex flex-col gap-2 pt-3",children:[f.jsxDEV("div",{className:"flex items-center gap-1.5",children:[f.jsxDEV(Dw,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:204,columnNumber:11},this),f.jsxDEV(_w,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:205,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:203,columnNumber:9},this),f.jsxDEV(Rw,{compact:!0},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:207,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:202,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Sidebar.tsx",lineNumber:84,columnNumber:5},this)}const hu=am(n=>({status:"disconnected",onlineCount:0,connections:[],setStatus:o=>n({status:o}),fetchDaemonStatus:async()=>{try{const o=await Yt.get("/daemons/status");n({onlineCount:o.online_count,connections:o.connections})}catch{}}})),QT=n=>n==="connecting"?"disconnected":n;pn.onStatusChange(n=>{hu.getState().setStatus(QT(n))});pn.on("ws:daemon:connected",n=>{const o=n;hu.setState(l=>{if(l.connections.some(p=>p.machine_id===o.machine_id))return l;const u={machine_id:o.machine_id};o.lib_id&&(u.lib_id=o.lib_id);const d=[...l.connections,u];return{connections:d,onlineCount:d.length}})});pn.on("ws:daemon:status",n=>{const o=n;hu.setState(l=>{if(o.is_online){if(l.connections.some(b=>b.machine_id===o.machine_id))return l;const d={machine_id:o.machine_id};o.lib_id&&(d.lib_id=o.lib_id);const p=[...l.connections,d];return{connections:p,onlineCount:p.length}}const c=l.connections.filter(u=>u.machine_id!==o.machine_id);return{connections:c,onlineCount:c.length}})});function ZT(){const[n,o]=N.useState(!1);return N.useEffect(()=>{za.getState().fetchLibraries(),hu.getState().fetchDaemonStatus()},[]),N.useEffect(()=>pn.onStatusChange(l=>{l==="connected"&&(za.getState().fetchLibraries(),hu.getState().fetchDaemonStatus())}),[]),f.jsxDEV("div",{className:"flex h-screen flex-col overflow-hidden",children:[f.jsxDEV(PT,{onToggleSidebar:()=>o(!n)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:29,columnNumber:7},this),f.jsxDEV("div",{className:"flex min-h-0 flex-1",children:[f.jsxDEV("div",{className:"hidden md:block",children:f.jsxDEV(b4,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:34,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:33,columnNumber:9},this),n&&f.jsxDEV(f.Fragment,{children:[f.jsxDEV("div",{className:"fixed inset-0 top-14 z-30 bg-black/40 md:hidden",onClick:()=>o(!1)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:40,columnNumber:13},this),f.jsxDEV("div",{className:"fixed bottom-0 left-0 top-14 z-30 md:hidden",children:f.jsxDEV(b4,{onNavigate:()=>o(!1)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:45,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:44,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:39,columnNumber:11},this),f.jsxDEV("main",{className:"flex min-h-0 flex-1 flex-col overflow-x-hidden",children:f.jsxDEV(uw,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:51,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:50,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:31,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/layouts/StudioLayout.tsx",lineNumber:28,columnNumber:5},this)}function JT(){const{t:n}=Ie();return f.jsxDEV("div",{className:"flex flex-1 flex-col items-center justify-center py-20 text-center",children:[f.jsxDEV("h1",{className:"font-mono text-4xl font-bold uppercase tracking-wide text-c4a-text-primary md:text-5xl",children:n("home.hero.title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Home.tsx",lineNumber:10,columnNumber:7},this),f.jsxDEV("p",{className:"mt-6 max-w-lg text-base text-c4a-text-secondary",children:n("home.hero.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Home.tsx",lineNumber:13,columnNumber:7},this),f.jsxDEV("div",{className:"mt-10 flex items-center gap-4",children:[f.jsxDEV(us,{to:"/studio",className:"flex items-center gap-2 rounded bg-c4a-accent px-5 py-2.5 font-mono text-xs font-semibold uppercase tracking-tight text-white transition-colors duration-150 hover:bg-c4a-accent-hover",children:[n("home.hero.cta.studio"),f.jsxDEV(gw,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Home.tsx",lineNumber:22,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Home.tsx",lineNumber:17,columnNumber:9},this),f.jsxDEV("a",{href:"https://github.com/context4ai/c4a",target:"_blank",rel:"noopener noreferrer",className:"rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs font-semibold uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("home.hero.cta.github")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Home.tsx",lineNumber:24,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Home.tsx",lineNumber:16,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Home.tsx",lineNumber:9,columnNumber:5},this)}function Ks({title:n,version:o,description:l}){const{t:c}=Ie();return f.jsxDEV("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxDEV("div",{className:"max-w-md text-center",children:[f.jsxDEV("h2",{className:"font-mono text-2xl font-bold uppercase text-c4a-text-primary",children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Placeholder.tsx",lineNumber:15,columnNumber:9},this),o&&f.jsxDEV("span",{className:"mt-3 inline-block rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-1 font-mono text-xs uppercase text-c4a-accent",children:c("placeholder.coming",{version:o})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Placeholder.tsx",lineNumber:19,columnNumber:11},this),f.jsxDEV("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:l},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Placeholder.tsx",lineNumber:23,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Placeholder.tsx",lineNumber:14,columnNumber:7},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/Placeholder.tsx",lineNumber:13,columnNumber:5},this)}function KT(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.login.title"),version:"0.5.0",description:n("page.login.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Login.tsx",lineNumber:8,columnNumber:5},this)}function WT(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.docs.title"),version:"0.4.13",description:n("page.docs.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/Docs.tsx",lineNumber:8,columnNumber:5},this)}function e3(){const{t:n}=Ie();return f.jsxDEV("div",{className:"flex min-h-screen flex-col items-center justify-center bg-c4a-bg-base p-8 text-center",children:[f.jsxDEV("h1",{className:"font-mono text-6xl font-bold text-c4a-accent",children:n("notfound.title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/NotFound.tsx",lineNumber:9,columnNumber:7},this),f.jsxDEV("p",{className:"mt-4 text-base text-c4a-text-secondary",children:n("notfound.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/NotFound.tsx",lineNumber:12,columnNumber:7},this),f.jsxDEV(us,{to:"/",className:"mt-8 rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("notfound.back")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/NotFound.tsx",lineNumber:15,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/NotFound.tsx",lineNumber:8,columnNumber:5},this)}function g4(){const{t:n}=Ie(),o=lw();let l="500",c=n("error.description");return Nl(o)?(l=String(o.status),o.status===404?c=n("notfound.description"):o.statusText&&(c=o.statusText)):o instanceof Error&&(c=o.message),console.error(`[ErrorPage] ${l}:`,o),f.jsxDEV("div",{className:"flex min-h-screen flex-col items-center justify-center bg-c4a-bg-base p-8 text-center",children:[f.jsxDEV("h1",{className:"font-mono text-6xl font-bold text-c4a-accent",children:l},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/ErrorPage.tsx",lineNumber:27,columnNumber:7},this),f.jsxDEV("p",{className:"mt-4 max-w-md text-base text-c4a-text-secondary",children:c},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/ErrorPage.tsx",lineNumber:28,columnNumber:7},this),f.jsxDEV("div",{className:"mt-8 flex items-center gap-3",children:[f.jsxDEV("button",{onClick:()=>window.location.reload(),className:"flex items-center gap-2 rounded bg-c4a-accent px-5 py-2.5 font-mono text-xs uppercase tracking-tight text-white transition-colors duration-150 hover:bg-c4a-accent-hover",children:[f.jsxDEV(vT,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/ErrorPage.tsx",lineNumber:34,columnNumber:11},this),n("error.reload")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/ErrorPage.tsx",lineNumber:30,columnNumber:9},this),f.jsxDEV(us,{to:"/",className:"rounded border border-c4a-border-default px-5 py-2.5 font-mono text-xs uppercase tracking-tight text-c4a-text-secondary transition-colors duration-150 hover:border-c4a-border-strong hover:text-c4a-text-primary",children:n("notfound.back")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/ErrorPage.tsx",lineNumber:37,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/ErrorPage.tsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/ErrorPage.tsx",lineNumber:26,columnNumber:5},this)}function t3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.modeling.title"),version:"0.4.16",description:n("page.modeling.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/Modeling.tsx",lineNumber:8,columnNumber:5},this)}function a3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.brain.title"),version:"0.4.18",description:n("page.brain.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/Brain.tsx",lineNumber:8,columnNumber:5},this)}function s3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.discovery.title"),version:"0.6.x",description:n("page.discovery.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/Discovery.tsx",lineNumber:8,columnNumber:5},this)}function n3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.sharing.title"),version:"0.4.39",description:n("page.sharing.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/Sharing.tsx",lineNumber:8,columnNumber:5},this)}function o3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.collaboration.title"),version:"0.5.x",description:n("page.collaboration.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/Collaboration.tsx",lineNumber:8,columnNumber:5},this)}function r3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.settings.title"),version:"0.5.x",description:n("page.settings.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/Settings.tsx",lineNumber:8,columnNumber:5},this)}function i3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.code_setup.title"),version:"0.4.13",description:n("page.code_setup.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/modeling/CodeSetup.tsx",lineNumber:8,columnNumber:5},this)}function l3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.code_compile.title"),version:"0.4.13",description:n("page.code_compile.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/modeling/CodeCompile.tsx",lineNumber:8,columnNumber:5},this)}function c3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.code_review.title"),version:"0.4.14",description:n("page.code_review.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/modeling/CodeReview.tsx",lineNumber:8,columnNumber:5},this)}function u3(){const{t:n}=Ie();return f.jsxDEV(Ks,{title:n("page.code_result.title"),version:"0.4.14",description:n("page.code_result.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/modeling/CodeResult.tsx",lineNumber:8,columnNumber:5},this)}const nm=(n,o)=>{for(const l of n){if(l.path===o)return l;if(l.children){const c=nm(l.children,o);if(c)return c}}return null},d3=(n,o)=>o===""?n:nm(n,o)?.children??[],iu=(n,o)=>{if(!o)return[];const l=o.split("/"),c=[];let u="";for(const d of l){u=u?`${u}/${d}`:d;const p=nm(n,u);p&&c.push(p)}return c},om=am(n=>({rootSources:[],currentRoot:null,loading:!1,error:null,total:0,limit:100,offset:0,filter:"all",fetchRootSources:async({library_id:o,limit:l,offset:c})=>{n({loading:!0,error:null});try{const u={library_id:o};l!==void 0&&(u.limit=String(l)),c!==void 0&&(u.offset=String(c));const d=await Yt.get("/sources",u);n({rootSources:d.items,total:d.total,limit:d.limit,offset:d.offset,loading:!1})}catch(u){n({error:u instanceof Error?u.message:"Failed to load sources",loading:!1})}},fetchRootSource:async o=>{const l=await Yt.get(`/sources/${o}`);return n({currentRoot:l}),l},createSource:async o=>await Yt.post("/sources",o),addTreeNode:async(o,l)=>{const c=await Yt.post(`/sources/${o}/tree`,l);return n(u=>({rootSources:u.rootSources.map(d=>d.id===o?c:d),currentRoot:u.currentRoot?.id===o?c:u.currentRoot})),c},updateSource:async(o,l)=>{const c=await Yt.put(`/sources/${o}`,l);n(u=>({rootSources:u.rootSources.map(d=>d.id===o?c:d),currentRoot:u.currentRoot?.id===o?c:u.currentRoot}))},deleteSource:async o=>{await Yt.delete(`/sources/${o}`),n(l=>({rootSources:l.rootSources.filter(c=>c.id!==o),currentRoot:l.currentRoot?.id===o?null:l.currentRoot}))},deleteTreeNode:async(o,l)=>{const c=await Yt.delete(`/sources/${o}/tree?path=${encodeURIComponent(l)}`);return n(u=>({rootSources:u.rootSources.map(d=>d.id===o?c:d),currentRoot:u.currentRoot?.id===o?c:u.currentRoot})),c},uploadDoc:async o=>await Yt.post("/sources/upload",o),setFilter:o=>n({filter:o}),clearSources:()=>n({rootSources:[],currentRoot:null,total:0,offset:0})}));function El({segments:n}){const{t:o}=Ie(),l=N.useRef(null),c=N.useRef(null),[u,d]=N.useState(0),p=[{label:o("sources.breadcrumb.sources")},...n],b=Math.max(0,p.length-3);N.useEffect(()=>{const y=l.current,E=c.current;if(!y||!E)return;const x=()=>{const _=y.clientWidth,R=Array.from(E.children);if(R.length===0)return;const z=R.map(de=>de.offsetWidth),H=4;if(z.reduce((de,k)=>de+k,0)+H*(z.length-1)<=_){d(0);return}const K=20,Z=(z[0]??0)+(z[1]??0)+H,J=z[z.length-1]??0,ee=Z+H+K+H+J;let ce=b;for(let de=1;de<=b;de++){let k=0;for(let G=2+de;G<z.length-1;G++)k+=z[G]+H;if(ee+k<=_){ce=de;break}}d(ce)};x();const S=new ResizeObserver(x);return S.observe(y),()=>S.disconnect()},[b,n,o]);const g=(()=>{if(u===0||p.length<=3)return p;const y=p.slice(0,2),E=p[p.length-1],x=p.slice(2+u,p.length-1);return[...y,{label:"…"},...x,E]})();return f.jsxDEV("div",{ref:l,className:"relative min-w-0 overflow-hidden",children:[f.jsxDEV("nav",{className:"flex min-h-8 items-center gap-1 font-mono text-xs tracking-tight text-c4a-text-muted",children:g.map((y,E)=>{const x=E===g.length-1;return f.jsxDEV("span",{className:`flex shrink-0 items-center gap-1 ${E===0?"uppercase":""}`,children:[E>0&&f.jsxDEV(ts,{size:12,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:106,columnNumber:17},this),y.to&&!x?f.jsxDEV(us,{to:y.to,className:"cursor-pointer whitespace-nowrap transition-colors hover:text-c4a-text-primary",children:y.label},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:109,columnNumber:17},this):f.jsxDEV("span",{className:`whitespace-nowrap ${x?"text-c4a-text-primary":""}`,children:y.label},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:116,columnNumber:17},this)]},E,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:104,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:100,columnNumber:7},this),f.jsxDEV("div",{ref:c,"aria-hidden":!0,className:"pointer-events-none invisible absolute left-0 top-0 flex h-0 items-center gap-1 overflow-visible whitespace-nowrap font-mono text-xs tracking-tight",children:p.map((y,E)=>f.jsxDEV("span",{className:"flex shrink-0 items-center gap-1",children:[E>0&&f.jsxDEV(ts,{size:12},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:133,columnNumber:25},this),f.jsxDEV("span",{className:"whitespace-nowrap",children:y.label},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:134,columnNumber:13},this)]},E,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:132,columnNumber:11},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:126,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceBreadcrumb.tsx",lineNumber:98,columnNumber:5},this)}const f3=["all","indexed","not_indexed"];function m3({value:n,onChange:o}){const{t:l}=Ie(),[c,u]=N.useState(!1),d=N.useRef(null),p=N.useRef(null),b={all:l("sources.filter.all"),indexed:l("sources.filter.indexed"),not_indexed:l("sources.filter.not_indexed")},g=N.useCallback(x=>{d.current&&!d.current.contains(x.target)&&u(!1)},[]);N.useEffect(()=>{if(c)return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[c,g]);const y=N.useCallback(()=>{p.current&&(clearTimeout(p.current),p.current=null),u(!0)},[]),E=N.useCallback(()=>{p.current=setTimeout(()=>u(!1),150)},[]);return f.jsxDEV("div",{ref:d,className:"relative",onMouseEnter:y,onMouseLeave:E,children:[f.jsxDEV("button",{className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[f.jsxDEV(nT,{size:12},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceFilter.tsx",lineNumber:55,columnNumber:9},this),f.jsxDEV("span",{className:"hidden sm:inline",children:b[n]},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceFilter.tsx",lineNumber:56,columnNumber:9},this),f.jsxDEV(ts,{size:12,className:`hidden transition-transform duration-200 sm:block ${c?"rotate-90":""}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceFilter.tsx",lineNumber:57,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceFilter.tsx",lineNumber:52,columnNumber:7},this),c&&f.jsxDEV("div",{className:"absolute right-0 top-full z-20 mt-1 min-w-[120px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg",children:f3.map(x=>f.jsxDEV("button",{onClick:()=>{o(x),u(!1)},className:`flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary ${x===n?"text-c4a-accent":"text-c4a-text-secondary"}`,children:[f.jsxDEV(ui,{size:12,className:x===n?"opacity-100":"opacity-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceFilter.tsx",lineNumber:72,columnNumber:15},this),b[x]]},x,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceFilter.tsx",lineNumber:62,columnNumber:13},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceFilter.tsx",lineNumber:60,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceFilter.tsx",lineNumber:51,columnNumber:5},this)}function kw({currentName:n,onConfirm:o,onCancel:l,error:c}){const[u,d]=N.useState(n),p=N.useRef(null);N.useEffect(()=>{p.current?.select()},[]);const b=N.useCallback(()=>{const y=u.trim();y&&y!==n?o(y):l()},[u,n,o,l]),g=N.useCallback(y=>{y.key==="Enter"?(y.preventDefault(),b()):y.key==="Escape"&&l()},[b,l]);return f.jsxDEV("div",{className:"flex items-center gap-1",children:[f.jsxDEV("input",{ref:p,value:u,onChange:y=>d(y.target.value),onKeyDown:g,onBlur:b,className:"min-w-0 flex-1 rounded border border-c4a-accent bg-c4a-bg-surface px-2 py-1 text-sm text-c4a-text-primary outline-none",autoFocus:!0},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RenameInline.tsx",lineNumber:47,columnNumber:7},this),f.jsxDEV("button",{onClick:y=>{y.stopPropagation(),b()},className:"rounded p-0.5 text-c4a-success hover:bg-c4a-bg-hover",children:f.jsxDEV(ui,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RenameInline.tsx",lineNumber:63,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RenameInline.tsx",lineNumber:56,columnNumber:7},this),f.jsxDEV("button",{onClick:y=>{y.stopPropagation(),l()},className:"rounded p-0.5 text-c4a-error hover:bg-c4a-bg-hover",children:f.jsxDEV(fi,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RenameInline.tsx",lineNumber:72,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RenameInline.tsx",lineNumber:65,columnNumber:7},this),c&&f.jsxDEV("span",{className:"ml-1 text-xs text-c4a-error",children:c},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RenameInline.tsx",lineNumber:75,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RenameInline.tsx",lineNumber:46,columnNumber:5},this)}const p3=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),h3=new Set([".ts",".tsx",".md"]),b3=new Set([".md",".doc",".docx",".pdf",".ppt",".pptx",".txt"]),g3=new Set([".md",".txt"]),y3=5*1024*1024,x3=10;function yg(n){const o=n.lastIndexOf(".");return o>=0?n.slice(o).toLowerCase():""}function v3(n){const o=n.includes("/")?n.split("/").pop():n;if(p3.has(o.toLowerCase()))return!0;const l=yg(o);return h3.has(l)}const N3=n=>{const o=new Date(n);if(Number.isNaN(o.getTime()))return"";const l=u=>String(u).padStart(2,"0"),c=`${l(o.getMonth()+1)}-${l(o.getDate())} ${l(o.getHours())}:${l(o.getMinutes())}`;return o.getFullYear()===new Date().getFullYear()?c:`${o.getFullYear()}-${c}`},y4={none:"bg-c4a-text-muted/40",indexed:"bg-c4a-success",stale:"bg-c4a-warning"};function S3({source:n,isDaemonLibrary:o,isRepoRoot:l}){const{t:c}=Ie(),u=n.kind==="source",d=u&&(n.source_type==="code"||v3(n.name)),p=d?"text-c4a-accent":"text-c4a-text-secondary group-hover:text-c4a-accent",b=n.metadata?.origin==="remote";let g;if(n.kind==="folder"?g=l||b?f.jsxDEV(sm,{size:16,className:`shrink-0 ${p}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:65,columnNumber:7},this):o?f.jsxDEV(qj,{size:16,className:`shrink-0 ${p}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:67,columnNumber:7},this):f.jsxDEV(Qs,{size:16,className:`shrink-0 ${p}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:69,columnNumber:7},this):n.source_type==="code"?g=f.jsxDEV(vl,{size:16,className:`shrink-0 ${p}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:72,columnNumber:12},this):g=f.jsxDEV(xr,{size:16,className:`shrink-0 ${p}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:74,columnNumber:12},this),!u||!d)return f.jsxDEV(f.Fragment,{children:g},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:77,columnNumber:39},this);const y=y4[n.index_status]??y4.none,E=c(`sources.status.${n.index_status}`);return f.jsxDEV("span",{className:"group/dot relative shrink-0",children:[g,f.jsxDEV("span",{className:`absolute -right-[2px] -top-[2px] block h-[5px] w-[5px] rounded-full ${y}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:85,columnNumber:7},this),f.jsxDEV("span",{className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-1.5 -translate-x-1/2 whitespace-nowrap rounded bg-c4a-bg-elevated px-2 py-1 font-mono text-[10px] text-c4a-text-secondary opacity-0 shadow-lg transition-opacity group-hover/dot:opacity-100",children:E},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:88,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:83,columnNumber:5},this)}function x4({source:n,displayName:o,childCount:l,isDaemonLibrary:c,isRepoRoot:u,hasUpdate:d,onClick:p,onRename:b,onDelete:g}){const{t:y}=Ie(),[E,x]=N.useState(!1),[S,_]=N.useState(null),R=N.useCallback(async Z=>{if(!b)return;const J=await b(Z);J?_(J):(x(!1),_(null))},[b]),z=N.useCallback(()=>{x(!1),_(null)},[]),H=!u&&b,Y=g,K=n.updated_at||n.created_at;return f.jsxDEV("div",{className:"group flex cursor-pointer items-center gap-3 rounded py-2 pl-3 pr-5 transition-colors hover:bg-c4a-accent/10 hover:text-c4a-accent",onClick:E?void 0:p,children:[f.jsxDEV(S3,{source:n,isDaemonLibrary:c??!1,isRepoRoot:u??!1},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:138,columnNumber:7},this),E?f.jsxDEV("div",{className:"min-w-0 flex-1",onClick:Z=>Z.stopPropagation(),children:f.jsxDEV(kw,{currentName:n.name,onConfirm:R,onCancel:z,error:S},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:142,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:141,columnNumber:9},this):f.jsxDEV("span",{className:"min-w-0 flex-1 truncate text-sm text-c4a-text-secondary group-hover:text-c4a-accent",children:o??n.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:150,columnNumber:9},this),f.jsxDEV("div",{className:"flex shrink-0 items-center gap-2",children:[d&&f.jsxDEV("span",{className:"inline-flex items-center gap-1 rounded-sm bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] uppercase tracking-tight text-c4a-accent/60",children:[f.jsxDEV("span",{className:"inline-block h-1.5 w-1.5 rounded-full bg-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:159,columnNumber:13},this),y("sources.change_detection.has_updates")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:158,columnNumber:11},this),n.kind==="folder"&&l!==void 0&&f.jsxDEV("span",{className:"font-mono text-xs text-c4a-text-muted",children:y("common.items",{count:l})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:165,columnNumber:11},this),K&&f.jsxDEV("span",{className:"hidden font-mono text-[11px] text-c4a-text-muted lg:inline",children:N3(K)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:171,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:156,columnNumber:7},this),(H||Y)&&f.jsxDEV("div",{className:"flex items-center gap-1 md:opacity-0 md:transition-opacity md:group-hover:opacity-100",children:[H?f.jsxDEV("button",{title:y("sources.actions.rename"),onClick:Z=>{Z.stopPropagation(),x(!0)},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsxDEV(pg,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:188,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:180,columnNumber:13},this):Y?f.jsxDEV("span",{className:"p-1",children:f.jsxDEV("span",{className:"inline-block h-[14px] w-[14px]"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:191,columnNumber:35},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:191,columnNumber:13},this):null,Y&&f.jsxDEV("button",{title:y("sources.actions.delete"),onClick:Z=>{Z.stopPropagation(),g()},className:"rounded p-1 text-c4a-text-muted transition-colors hover:text-c4a-accent",children:f.jsxDEV(Sw,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:202,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:194,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:178,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/SourceListItem.tsx",lineNumber:134,columnNumber:5},this)}function pi({children:n,onClose:o,className:l="",overlayClass:c="bg-black/50",closeOnOverlay:u=!0,closeOnEsc:d=!0,disableClose:p=!1}){const b=N.useRef(null);N.useEffect(()=>{if(!d)return;const y=E=>{E.key==="Escape"&&!p&&o()};return document.addEventListener("keydown",y),()=>document.removeEventListener("keydown",y)},[o,d,p]);const g=N.useCallback(y=>{u&&!p&&b.current&&!b.current.contains(y.target)&&o()},[o,u,p]);return f.jsxDEV("div",{className:`fixed inset-0 z-50 flex items-center justify-center ${c}`,onClick:g,children:f.jsxDEV("div",{ref:b,className:l,children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/common/DialogShell.tsx",lineNumber:57,columnNumber:7},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/common/DialogShell.tsx",lineNumber:53,columnNumber:5},this)}function v4({target:n,onConfirm:o,onCancel:l}){const{t:c}=Ie();return f.jsxDEV(pi,{onClose:l,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxDEV("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:c("sources.delete.confirm_title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:41,columnNumber:7},this),f.jsxDEV("div",{className:"mt-4 space-y-3 text-sm text-c4a-text-secondary",children:[n.type==="resource"&&f.jsxDEV(f.Fragment,{children:[f.jsxDEV("p",{children:c("sources.delete.resource",{name:n.name})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:48,columnNumber:13},this),f.jsxDEV("p",{children:c("sources.delete.resource_impact")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:49,columnNumber:13},this),f.jsxDEV("p",{className:"text-c4a-warning",children:c("sources.delete.session_warning")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:50,columnNumber:13},this),f.jsxDEV("p",{children:c("sources.delete.entity_safe")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:53,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:47,columnNumber:11},this),n.type==="folder"&&f.jsxDEV(f.Fragment,{children:[f.jsxDEV("p",{children:c("sources.delete.folder",{name:n.name})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:59,columnNumber:13},this),n.folderCount!==void 0&&n.sourceCount!==void 0?f.jsxDEV(f.Fragment,{children:[f.jsxDEV("p",{children:c("sources.delete.folder_contents",{folders:n.folderCount,sources:n.sourceCount})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:62,columnNumber:17},this),n.indexedCount!==void 0&&n.indexedCount>0&&f.jsxDEV("p",{children:c("sources.delete.indexed_hint",{indexed:n.indexedCount,total:n.sourceCount})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:69,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:61,columnNumber:15},this):f.jsxDEV("p",{children:c("sources.delete.folder_impact_generic")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:78,columnNumber:15},this),f.jsxDEV("p",{className:"text-c4a-warning",children:c("sources.delete.irreversible")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:80,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:58,columnNumber:11},this),n.type==="repo"&&f.jsxDEV(f.Fragment,{children:[f.jsxDEV("p",{children:c("sources.delete.repo",{name:n.name,library:n.libraryName})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:88,columnNumber:13},this),n.packageCount!==void 0&&n.docCount!==void 0?f.jsxDEV(f.Fragment,{children:[f.jsxDEV("p",{children:c("sources.delete.repo_contents",{packages:n.packageCount,docs:n.docCount})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:96,columnNumber:17},this),n.indexedCount!==void 0&&n.indexedCount>0&&f.jsxDEV("p",{children:c("sources.delete.indexed_hint",{indexed:n.indexedCount,total:n.packageCount+n.docCount})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:103,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:95,columnNumber:15},this):f.jsxDEV("p",{children:c("sources.delete.repo_impact_generic")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:112,columnNumber:15},this),f.jsxDEV("p",{children:c("sources.delete.local_safe")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:114,columnNumber:13},this),f.jsxDEV("p",{children:c("sources.delete.entity_safe")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:115,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:87,columnNumber:11},this),n.type==="client"&&f.jsxDEV(f.Fragment,{children:[f.jsxDEV("p",{children:c("sources.delete.client",{name:n.name})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:121,columnNumber:13},this),f.jsxDEV("p",{children:c("sources.delete.client_impact")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:122,columnNumber:13},this),f.jsxDEV("p",{children:c("sources.delete.local_safe")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:123,columnNumber:13},this),f.jsxDEV("p",{children:c("sources.delete.entity_safe")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:124,columnNumber:13},this),f.jsxDEV("p",{className:"text-c4a-warning",children:c("sources.delete.irreversible")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:125,columnNumber:13},this),f.jsxDEV("p",{className:"text-c4a-text-muted",children:c("sources.delete.client_reregister")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:128,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:120,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:45,columnNumber:7},this),f.jsxDEV("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsxDEV("button",{onClick:l,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:c("common.cancel")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:136,columnNumber:9},this),f.jsxDEV("button",{onClick:o,className:"rounded bg-c4a-error px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-error/80",children:c("common.confirm")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:142,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:135,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DeleteConfirmDialog.tsx",lineNumber:37,columnNumber:5},this)}function w3({onConfirm:n,onCancel:o,error:l}){const{t:c}=Ie(),[u,d]=N.useState(""),p=N.useRef(null);N.useEffect(()=>{p.current?.focus()},[]);const b=N.useCallback(()=>{const y=u.trim();y&&n(y)},[u,n]),g=N.useCallback(y=>{y.key==="Enter"&&(y.preventDefault(),b())},[b]);return f.jsxDEV(pi,{onClose:o,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxDEV("div",{className:"flex items-center gap-2",children:[f.jsxDEV(vw,{size:16,className:"shrink-0 text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:48,columnNumber:9},this),f.jsxDEV("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:c("sources.actions.new_folder")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:49,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:47,columnNumber:7},this),f.jsxDEV("div",{className:"mt-4",children:[f.jsxDEV("input",{ref:p,value:u,onChange:y=>d(y.target.value),onKeyDown:g,placeholder:c("sources.folder.name_placeholder"),className:"w-full rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-2 text-sm text-c4a-text-primary outline-none transition-colors focus:border-c4a-accent",autoFocus:!0},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:55,columnNumber:9},this),l&&f.jsxDEV("p",{className:"mt-2 text-xs text-c4a-error",children:l},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:65,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:54,columnNumber:7},this),f.jsxDEV("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsxDEV("button",{onClick:o,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:c("common.cancel")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:70,columnNumber:9},this),f.jsxDEV("button",{onClick:b,disabled:!u.trim(),className:"rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:c("common.confirm")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:76,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:69,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/NewFolderDialog.tsx",lineNumber:43,columnNumber:5},this)}function Kb({label:n,icon:o,items:l,alignRight:c}){const[u,d]=N.useState(!1),p=N.useRef(null),b=N.useRef(null),g=N.useCallback(x=>{p.current&&!p.current.contains(x.target)&&d(!1)},[]);N.useEffect(()=>{if(u)return document.addEventListener("mousedown",g),()=>document.removeEventListener("mousedown",g)},[u,g]);const y=N.useCallback(()=>{b.current&&(clearTimeout(b.current),b.current=null),d(!0)},[]),E=N.useCallback(()=>{b.current=setTimeout(()=>d(!1),150)},[]);return f.jsxDEV("div",{ref:p,className:"relative",onMouseEnter:y,onMouseLeave:E,children:[f.jsxDEV("button",{className:`flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary ${n?"p-1 sm:px-2 sm:py-1":"p-1"}`,children:[o,n&&f.jsxDEV("span",{className:"hidden sm:inline",children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DropdownButton.tsx",lineNumber:54,columnNumber:19},this),n&&f.jsxDEV(ts,{size:12,className:`hidden transition-transform duration-200 sm:block ${u?"rotate-90":""}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DropdownButton.tsx",lineNumber:55,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DropdownButton.tsx",lineNumber:50,columnNumber:7},this),u&&f.jsxDEV("div",{className:`absolute top-full z-20 mt-1 min-w-[160px] rounded border border-c4a-border-default bg-c4a-bg-elevated py-1 shadow-c4a-lg ${c?"right-0":"left-0"}`,children:l.map(x=>f.jsxDEV("button",{onClick:()=>{x.onClick(),d(!1)},className:"flex w-full items-center gap-2 px-3 py-1.5 text-left font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:[x.icon,x.label]},x.label,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DropdownButton.tsx",lineNumber:60,columnNumber:13},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DropdownButton.tsx",lineNumber:58,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DropdownButton.tsx",lineNumber:49,columnNumber:5},this)}function E3({onClose:n}){const{t:o}=Ie();return f.jsxDEV(pi,{onClose:n,closeOnEsc:!1,className:"w-full max-w-sm rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxDEV("div",{className:"flex items-center gap-2",children:[f.jsxDEV(RT,{size:18,className:"text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UpgradeHintDialog.tsx",lineNumber:19,columnNumber:9},this),f.jsxDEV("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:o("sources.upgrade.title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UpgradeHintDialog.tsx",lineNumber:20,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UpgradeHintDialog.tsx",lineNumber:18,columnNumber:7},this),f.jsxDEV("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:o("sources.upgrade.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UpgradeHintDialog.tsx",lineNumber:24,columnNumber:7},this),f.jsxDEV("div",{className:"mt-6 flex justify-end",children:f.jsxDEV("button",{onClick:n,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:o("common.confirm")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UpgradeHintDialog.tsx",lineNumber:28,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UpgradeHintDialog.tsx",lineNumber:27,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UpgradeHintDialog.tsx",lineNumber:13,columnNumber:5},this)}function D3(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}function _3({onConfirm:n,onCancel:o,error:l,uploading:c}){const{t:u}=Ie(),[d,p]=N.useState([]),[b,g]=N.useState(null),[y,E]=N.useState(!1),x=N.useRef(null),S=N.useCallback(J=>{g(null);for(const ee of J){const ce=yg(ee.name);if(!b3.has(ce)){g(u("sources.upload.unsupported_type",{name:ee.name}));return}if(ee.size>y3){g(u("sources.upload.file_too_large",{name:ee.name}));return}}p(ee=>{const ce=new Map(ee.map(k=>[k.name,k]));for(const k of J)ce.set(k.name,{name:k.name,size:k.size,file:k});const de=Array.from(ce.values());return de.length>x3?(g(u("sources.upload.too_many_files")),ee):de})},[u]),_=N.useCallback(J=>{const ee=J.target.files;!ee||ee.length===0||(S(Array.from(ee)),J.target.value="")},[S]),R=N.useCallback(J=>{p(ee=>ee.filter((ce,de)=>de!==J)),g(null)},[]),z=N.useCallback(J=>{J.preventDefault(),E(!1);const ee=J.dataTransfer?.files;!ee||ee.length===0||S(Array.from(ee))},[S]),H=N.useCallback(J=>{J.preventDefault(),E(!0)},[]),Y=N.useCallback(J=>{J.preventDefault(),E(!1)},[]),K=N.useCallback(async()=>{if(d.length===0)return;const J=await Promise.all(d.map(ee=>new Promise((ce,de)=>{const k=yg(ee.name),G=g3.has(k),I=new FileReader;I.onerror=()=>de(I.error),G?(I.onload=()=>ce({name:ee.name,content:I.result,encoding:"utf-8"}),I.readAsText(ee.file)):(I.onload=()=>{const be=I.result,se=be.slice(be.indexOf(",")+1);ce({name:ee.name,content:se,encoding:"base64"})},I.readAsDataURL(ee.file))})));n(J)},[d,n]),Z=l||b;return f.jsxDEV(pi,{onClose:o,disableClose:c??!1,className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxDEV("div",{className:"flex items-center gap-2",children:[f.jsxDEV(bg,{size:16,className:"shrink-0 text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:161,columnNumber:9},this),f.jsxDEV("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-text-primary",children:u("sources.upload.title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:162,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:160,columnNumber:7},this),f.jsxDEV("div",{className:"mt-4",children:[f.jsxDEV("input",{ref:x,type:"file",accept:".md,.doc,.docx,.pdf,.ppt,.pptx,.txt",multiple:!0,onChange:_,className:"hidden"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:169,columnNumber:9},this),f.jsxDEV("button",{type:"button",onClick:()=>x.current?.click(),onDrop:z,onDragOver:H,onDragLeave:Y,disabled:c,className:`flex w-full flex-col items-center justify-center rounded border-2 border-dashed px-4 py-8 transition-colors ${y?"border-c4a-accent bg-c4a-accent/5":"border-c4a-border-default hover:border-c4a-accent/50"} ${c?"cursor-not-allowed opacity-40":"cursor-pointer"}`,children:[f.jsxDEV(bg,{size:24,className:"text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:190,columnNumber:11},this),f.jsxDEV("p",{className:"mt-2 text-sm text-c4a-text-secondary",children:u("sources.upload.drop_hint")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:191,columnNumber:11},this),f.jsxDEV("p",{className:"mt-1 text-[10px] text-c4a-text-muted",children:u("sources.upload.supported_formats")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:194,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:177,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:168,columnNumber:7},this),d.length>0&&f.jsxDEV("div",{className:"mt-3",children:[f.jsxDEV("p",{className:"text-xs text-c4a-text-muted",children:u("sources.upload.selected",{count:d.length})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:203,columnNumber:11},this),f.jsxDEV("div",{className:"mt-1 max-h-40 space-y-1 overflow-y-auto c4a-scrollbar",children:d.map((J,ee)=>f.jsxDEV("div",{className:"flex items-center gap-2 rounded bg-c4a-bg-surface px-2 py-1",children:[f.jsxDEV(xr,{size:12,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:212,columnNumber:17},this),f.jsxDEV("span",{className:"min-w-0 flex-1 truncate text-xs text-c4a-text-primary",children:J.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:213,columnNumber:17},this),f.jsxDEV("span",{className:"shrink-0 text-[10px] text-c4a-text-muted",children:D3(J.size)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:216,columnNumber:17},this),!c&&f.jsxDEV("button",{type:"button",onClick:()=>R(ee),className:"shrink-0 text-c4a-text-muted transition-colors hover:text-c4a-text-primary",title:u("sources.upload.remove"),children:f.jsxDEV(fi,{size:12},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:226,columnNumber:21},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:220,columnNumber:19},this)]},`${J.name}-${ee}`,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:208,columnNumber:15},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:206,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:202,columnNumber:9},this),Z&&f.jsxDEV("p",{className:"mt-2 text-xs text-c4a-error",children:Z},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:237,columnNumber:9},this),f.jsxDEV("div",{className:"mt-6 flex justify-end gap-2",children:[f.jsxDEV("button",{onClick:o,disabled:c,className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:opacity-40",children:u("common.cancel")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:242,columnNumber:9},this),f.jsxDEV("button",{onClick:K,disabled:d.length===0||c,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[c&&f.jsxDEV(Us,{size:12,className:"animate-spin"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:254,columnNumber:25},this),u(c?"sources.upload.uploading":"common.confirm")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:249,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:241,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/UploadDocDialog.tsx",lineNumber:154,columnNumber:5},this)}function R3({pathLabel:n,loading:o,badge:l,onNavigateUp:c,children:u}){return f.jsxDEV("div",{className:"mt-4 flex min-h-0 flex-1 flex-col rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[f.jsxDEV("p",{className:"min-w-0 shrink truncate font-mono text-xs text-c4a-text-muted",children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:23,columnNumber:9},this),l]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:22,columnNumber:7},this),f.jsxDEV("hr",{className:"my-3 border-c4a-border-subtle"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:28,columnNumber:7},this),f.jsxDEV("div",{className:"c4a-scrollbar flex min-h-0 flex-1 flex-col overflow-y-auto",children:o?f.jsxDEV("div",{className:"flex flex-1 items-center justify-center py-8",children:f.jsxDEV(Us,{size:14,className:"animate-spin text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:32,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:31,columnNumber:11},this):f.jsxDEV(f.Fragment,{children:[c&&f.jsxDEV("button",{onClick:c,className:"flex w-full cursor-pointer items-center gap-3 rounded pl-3 pr-5 py-2 text-left text-sm text-c4a-text-primary transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV(Qs,{size:16,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:41,columnNumber:17},this),f.jsxDEV("span",{children:".."},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:42,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:37,columnNumber:15},this),u]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:35,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:29,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ExplorerCard.tsx",lineNumber:21,columnNumber:5},this)}function k3(n){const o=n.match(/^[\w.-]+@([\w.-]+):([\w./-]+?)(?:\.git)?$/);if(o){const l=o[1],c=o[2];return{slug:c,repoUrl:`https://${l}/${c}`,host:l}}try{const l=new URL(n),c=l.hostname,u=l.pathname.replace(/^\//,"").replace(/\.git$/,"");return u?{slug:u,repoUrl:`https://${c}/${u}`,host:c}:null}catch{return null}}function U3(n,o){return`${n}/tree/${encodeURIComponent(o)}`}function C3(n,o){return`${n}/commit/${o}`}function Uw({remoteUrl:n,fallbackName:o,branch:l,commit:c}){const u=n?k3(n):null,d=c.slice(0,7);return f.jsxDEV("div",{className:"flex min-w-0 shrink flex-wrap items-center gap-1.5 font-mono text-xs leading-none text-c4a-accent",children:[u?f.jsxDEV("a",{href:u.repoUrl,target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 truncate hover:underline",title:u.repoUrl,children:[f.jsxDEV(c4,{size:12,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:32,columnNumber:11},this),f.jsxDEV("span",{className:"truncate",children:u.slug},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:33,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:25,columnNumber:9},this):f.jsxDEV("span",{className:"flex items-center gap-1 truncate",children:[f.jsxDEV(c4,{size:12,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:37,columnNumber:11},this),f.jsxDEV("span",{className:"truncate",children:o||"repo"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:38,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:36,columnNumber:9},this),f.jsxDEV("span",{className:"text-c4a-text-muted",children:"/"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:41,columnNumber:7},this),u?f.jsxDEV("a",{href:U3(u.repoUrl,l),target:"_blank",rel:"noopener noreferrer",className:"flex items-center gap-1 hover:underline",children:[f.jsxDEV(mg,{size:10,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:49,columnNumber:11},this),f.jsxDEV("span",{children:l},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:50,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:43,columnNumber:9},this):f.jsxDEV("span",{className:"flex items-center gap-1",children:[f.jsxDEV(mg,{size:10,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:54,columnNumber:11},this),f.jsxDEV("span",{children:l},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:55,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:53,columnNumber:9},this),f.jsxDEV("span",{className:"text-c4a-text-muted",children:"/"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:58,columnNumber:7},this),u?f.jsxDEV("a",{href:C3(u.repoUrl,c),target:"_blank",rel:"noopener noreferrer",className:"hover:underline",children:d},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:60,columnNumber:9},this):f.jsxDEV("span",{children:d},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:69,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/RepoIdentityBadge.tsx",lineNumber:23,columnNumber:5},this)}function j3(n,o,l){const[c,u]=N.useState({}),d=N.useRef(new Set);return N.useEffect(()=>{if(!n||!o||l.length===0)return;const p=l.filter(b=>{const g=b.metadata;return g?.origin==="remote"&&g?.remote_url&&g?.remote_commit&&!d.current.has(b.id)});if(p.length!==0){p.forEach(b=>d.current.add(b.id));for(const b of p){const g=b.metadata;Yt.post("/import/remote/refs",{library_id:n,url:g.remote_url}).then(y=>{const E=g.remote_ref||"",x=y.branches?.find(S=>S.name===E)??y.tags?.find(S=>S.name===E);x&&x.commit!==g.remote_commit&&u(S=>({...S,[b.id]:!0}))}).catch(()=>{})}}},[n,o,l]),c}function T3({library:n,onNewFolder:o,onImportRepo:l,onImportDir:c,onUpgrade:u}){const{t:d}=Ie(),p=n.type==="daemon";return f.jsxDEV("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxDEV("div",{className:"max-w-2xl text-center",children:[f.jsxDEV("h3",{className:"font-mono text-lg font-bold uppercase text-c4a-text-primary",children:d(p?"sources.empty.daemon.title":"sources.empty.cloud.title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:70,columnNumber:9},this),f.jsxDEV("p",{className:"mt-3 text-sm text-c4a-text-secondary",children:d(p?"sources.empty.daemon.description":"sources.empty.cloud.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:75,columnNumber:9},this),f.jsxDEV("div",{className:"mt-6 flex justify-center gap-3",children:p?f.jsxDEV(f.Fragment,{children:[c&&f.jsxDEV("button",{onClick:c,disabled:!n.is_online,className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-4 py-2 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:opacity-40",children:d("sources.actions.import_dir")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:84,columnNumber:17},this),l&&f.jsxDEV("button",{onClick:l,disabled:!n.is_online,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:d("sources.actions.import_repo")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:93,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:82,columnNumber:13},this):f.jsxDEV(f.Fragment,{children:[f.jsxDEV("button",{onClick:o,className:"rounded border border-c4a-border-default bg-c4a-bg-surface px-4 py-2 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary",children:d("sources.actions.new_folder")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:104,columnNumber:15},this),u&&f.jsxDEV("button",{onClick:u,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs uppercase text-white transition-colors hover:bg-c4a-accent-hover",children:d("sources.actions.import_repo_url")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:111,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:103,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:80,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:69,columnNumber:7},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:68,columnNumber:5},this)}function O3(){const{t:n}=Ie();return f.jsxDEV("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-6 text-center",children:[f.jsxDEV("h4",{className:"font-mono text-sm font-bold text-c4a-text-primary",children:n("sources.empty.indexed.title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:132,columnNumber:7},this),f.jsxDEV("p",{className:"mt-2 text-xs text-c4a-text-secondary",children:n("sources.empty.indexed.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:135,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:131,columnNumber:5},this)}const Wb=n=>{let o=0,l=0,c=0,u=0,d=0;const p=b=>{for(const g of b.children??[])g.kind==="folder"?(o++,p(g)):g.kind==="source"&&(l++,g.source_type==="code"?c++:u++,(g.index_status==="indexed"||g.index_status==="stale")&&d++)};return p(n),{folders:o,sources:l,codeSources:c,docSources:u,indexedSources:d}};function A3(){const{t:n}=Ie(),o=_o(),{libId:l}=Nu(),[c,u]=tm(),d=c.get("rootId")||null,p=c.get("path")||"",g=za(mi(wl)).find(O=>O.id===l),y=za(O=>O.updateLibraryName),E=za(O=>O.deleteLibrary),{rootSources:x,currentRoot:S,loading:_,filter:R,fetchRootSources:z,fetchRootSource:H,createSource:Y,addTreeNode:K,updateSource:Z,deleteSource:J,deleteTreeNode:ee,uploadDoc:ce,setFilter:de}=om(),[k,G]=N.useState(!1),[I,be]=N.useState(null),[se,ae]=N.useState(null),[pe,De]=N.useState(null),[te,ue]=N.useState(null),[ne,he]=N.useState(!1),[Te,P]=N.useState(!1),[fe,Re]=N.useState(null),[we,lt]=N.useState(!1),[Ut,Je]=N.useState(!1),[yt,Ct]=N.useState(null),[ra,ye]=N.useState(!1);N.useEffect(()=>{l&&z({library_id:l})},[l,z]),N.useEffect(()=>{d&&H(d)},[d,H]);const ot=d!==null,ct=N.useMemo(()=>ot?S?[...d3(S.tree,p)].sort((oe,Ne)=>oe.kind!==Ne.kind?oe.kind==="folder"?-1:1:oe.name.localeCompare(Ne.name)).map(oe=>({type:"node",root:S,node:oe})):[]:[...x].sort((Ne,le)=>Ne.kind!==le.kind?Ne.kind==="folder"?-1:1:new Date(le.created_at).getTime()-new Date(Ne.created_at).getTime()).map(Ne=>({type:"root",root:Ne,node:null})),[ot,x,S,p]),jt=N.useMemo(()=>R==="all"?ct:ct.filter(O=>O.type==="root"||!O.node||O.node.kind==="folder"?!0:R==="indexed"?O.node.index_status==="indexed":O.node.index_status==="none"||!O.node.index_status),[ct,R]),qt=g?.type==="daemon",Xe=g?.type==="cloud",xt=qt&&!ot,ba=j3(l,Xe,x),ds=N.useMemo(()=>{if(!g)return[];const O=[{label:g.id===vr?n("sources.library.default_cloud_name"):g.name,to:`/studio/sources/${g.id}`}];return ot&&S&&(O.push({label:S.name,to:`/studio/sources/${g.id}?rootId=${S.id}`}),p&&iu(S.tree,p).forEach(oe=>{O.push({label:oe.name,to:`/studio/sources/${g.id}?rootId=${S.id}&path=${encodeURIComponent(oe.path)}`})})),O},[g,ot,S,p,n]),Ee=N.useCallback(async O=>{if(l)try{ot&&d?await K(d,{parent_path:p,kind:"folder",name:O}):(await Y({library_id:l,kind:"folder",name:O}),z({library_id:l})),G(!1),be(null)}catch(B){B instanceof ii&&B.status===409&&be(n("sources.error.name_conflict",{name:O}))}},[l,ot,d,p,Y,K,z,n]),qa=N.useCallback(O=>{l&&(O.type==="root"?O.root.kind==="source"?o(`/studio/source/${O.root.id}`):u({rootId:O.root.id}):O.node&&(O.node.kind==="folder"?u({rootId:O.root.id,path:O.node.path}):o(`/studio/source/${O.root.id}?path=${encodeURIComponent(O.node.path)}`)))},[l,o,u]),Gt=N.useCallback(()=>{if(!(!d||!l))if(p){const O=p.split("/");O.pop();const B=O.join("/");u(B?{rootId:d,path:B}:{rootId:d})}else u({})},[d,l,p,u]),Wt=N.useCallback(async(O,B)=>{try{return await Z(O,{name:B}),z({library_id:l}),null}catch(oe){return oe instanceof ii&&oe.status===409?n("sources.error.name_conflict",{name:B}):null}},[l,Z,z,n]),ea=N.useCallback(O=>{if(O.type==="root"){De(O.root.id),ue(null);const B=O.root.tree.length>0?Wb({children:O.root.tree}):void 0;ae(qt?{type:"repo",name:O.root.name,libraryName:g.name,...B?{packageCount:B.codeSources,docCount:B.docSources,indexedCount:B.indexedSources}:{}}:{type:O.root.kind==="folder"?"folder":"resource",name:O.root.name,...O.root.kind==="folder"&&B?{folderCount:B.folders,sourceCount:B.sources,indexedCount:B.indexedSources}:{}})}else if(O.node)if(De(O.root.id),ue(O.node.path),O.node.kind==="folder"){const B=Wb(O.node);ae({type:"folder",name:O.node.name,folderCount:B.folders,sourceCount:B.sources,indexedCount:B.indexedSources})}else ae({type:"resource",name:O.node.name})},[qt,g]),Sa=N.useCallback(async()=>{if(!(!pe||!l)){try{te?await ee(pe,te):(await J(pe),z({library_id:l}))}catch{}ae(null),De(null),ue(null)}},[pe,te,l,J,ee,z]),_e=N.useCallback(()=>{if(!l)return;const O=new URLSearchParams;d&&(O.set("parentId",d),S&&O.set("parentName",S.name)),p&&O.set("parentPath",p);const B=O.toString();o(`/studio/sources/import/${l}${B?`?${B}`:""}`)},[l,o,d,p,S]),Pe=N.useCallback(()=>{l&&o(`/studio/sources/import-dir/${l}`)},[l,o]),tt=N.useCallback(async O=>{if(l){lt(!0),Re(null);try{const B={library_id:l,files:O.map(oe=>{const Ne={file_name:oe.name,content:oe.content};return oe.encoding&&(Ne.encoding=oe.encoding),Ne})};ot&&d&&(B.root_source_id=d,B.parent_path=p),await ce(B),ot&&d?H(d):z({library_id:l}),P(!1)}catch(B){B instanceof ii&&B.status===409?Re(n("sources.error.name_conflict",{name:O[0]?.name??""})):B instanceof ii&&Re(B.message)}finally{lt(!1)}}},[l,ot,d,p,ce,z,H,n]),Ht=g?.id===vr,$t=N.useCallback(async O=>{if(l)try{await y(l,O),Je(!1),Ct(null)}catch(B){const oe=B instanceof Error?B.message:String(B);Ct(oe)}},[l,y]),ta=N.useCallback(()=>{Je(!1),Ct(null)},[]),ga=N.useCallback(async()=>{if(l){try{await E(l),o("/studio/sources/add-client")}catch{}ye(!1)}},[l,E,o]),wa=N.useCallback(()=>{ye(!1)},[]);if(!g)return f.jsxDEV("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxDEV("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:569,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:568,columnNumber:7},this);const ja=x.length===0&&R==="all"&&!_&&!ot,ia=jt.filter(O=>O.type==="node"&&O.node?.kind==="source").length===0&&R==="indexed"&&!_,fs=!ot||!S?!1:S.metadata?.origin==="remote"?!0:p?iu(S.tree,p).some(B=>B.metadata?.origin==="remote"):!1,ke=!xt,w=Xe&&!fs,A=xt;return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsxDEV("div",{className:"flex flex-wrap items-center gap-2",children:[f.jsxDEV("div",{className:"min-w-0 flex-1",children:Ut?f.jsxDEV(kw,{currentName:g.name,onConfirm:$t,onCancel:ta,error:yt},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:599,columnNumber:13},this):f.jsxDEV(El,{segments:ds},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:606,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:597,columnNumber:9},this),f.jsxDEV("div",{className:"flex shrink-0 items-center gap-2",children:[w&&f.jsxDEV(f.Fragment,{children:[f.jsxDEV(Kb,{label:n("sources.actions.upload"),icon:f.jsxDEV(bg,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:615,columnNumber:23},this),items:[{label:n("sources.actions.upload_doc"),icon:f.jsxDEV(xr,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:619,columnNumber:27},this),onClick:()=>P(!0)}]},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:613,columnNumber:15},this),f.jsxDEV(Kb,{label:n("sources.actions.add"),icon:f.jsxDEV(Nw,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:626,columnNumber:23},this),items:[{label:n("sources.actions.add_folder"),icon:f.jsxDEV(vw,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:630,columnNumber:27},this),onClick:()=>G(!0)},{label:n("sources.actions.add_web"),icon:f.jsxDEV(Kj,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:635,columnNumber:27},this),onClick:()=>he(!0)},{label:n("sources.actions.add_feishu"),icon:f.jsxDEV(Vj,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:640,columnNumber:27},this),onClick:()=>he(!0)}]},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:624,columnNumber:15},this),f.jsxDEV("button",{onClick:()=>{const O=new URLSearchParams;d&&(O.set("parentId",d),S&&O.set("parentName",S.name)),p&&O.set("parentPath",p);const B=O.toString();o(`/studio/sources/import-remote/${l}${B?`?${B}`:""}`)},className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary sm:px-2 sm:py-1",children:[f.jsxDEV(l4,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:658,columnNumber:17},this),f.jsxDEV("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo_url")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:659,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:645,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:612,columnNumber:13},this),A&&f.jsxDEV(f.Fragment,{children:[f.jsxDEV("button",{onClick:Pe,disabled:!g.is_online,title:g.is_online?void 0:n("sources.import.daemon_offline",{name:g.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40 sm:px-2 sm:py-1",children:[f.jsxDEV(Ij,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:677,columnNumber:17},this),f.jsxDEV("span",{className:"hidden sm:inline",children:n("sources.actions.import_dir")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:678,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:667,columnNumber:15},this),f.jsxDEV("button",{onClick:_e,disabled:!g.is_online,title:g.is_online?void 0:n("sources.import.daemon_offline",{name:g.name}),className:"flex items-center gap-1.5 rounded border border-c4a-border-default bg-c4a-bg-surface p-1 font-mono text-xs uppercase text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-primary disabled:cursor-not-allowed disabled:opacity-40 sm:px-2 sm:py-1",children:[f.jsxDEV(l4,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:690,columnNumber:17},this),f.jsxDEV("span",{className:"hidden sm:inline",children:n("sources.actions.import_repo")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:691,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:680,columnNumber:15},this),f.jsxDEV(Kb,{label:"",icon:f.jsxDEV(pg,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:695,columnNumber:23},this),alignRight:!0,items:[{label:n("sources.library.rename"),icon:f.jsxDEV(pg,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:700,columnNumber:27},this),onClick:()=>Je(!0)},...Ht?[]:[{label:n("sources.actions.delete"),icon:f.jsxDEV(Sw,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:707,columnNumber:33},this),onClick:()=>ye(!0)}]]},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:693,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:666,columnNumber:13},this),ke&&f.jsxDEV(m3,{value:R,onChange:de},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:718,columnNumber:26},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:609,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:596,columnNumber:7},this),ja?f.jsxDEV(T3,{library:g,onNewFolder:()=>G(!0),...qt?{onImportRepo:_e,onImportDir:Pe}:{},...Xe?{onUpgrade:()=>{const O=new URLSearchParams;d&&(O.set("parentId",d),S&&O.set("parentName",S.name)),p&&O.set("parentPath",p);const B=O.toString();o(`/studio/sources/import-remote/${l}${B?`?${B}`:""}`)}}:{}},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:724,columnNumber:9},this):f.jsxDEV(R3,{pathLabel:(()=>{if(!ot||!S)return"/";const O=S.metadata,B=qt?typeof O?.local_path=="string"?O.local_path:S.name:"/"+S.name;if(!p)return B;const oe=iu(S.tree,p);return B+"/"+oe.map(Ne=>Ne.name).join("/")})(),loading:_,badge:(()=>{if(!ot||!S)return;let O=S.metadata,B=S.name;if(!O?.origin&&p){const le=iu(S.tree,p);for(const $e of le){const Me=$e.metadata;if(Me?.origin==="remote"){O=Me,B=$e.name;break}}}const oe=O?.pinned_branch??O?.remote_ref,Ne=O?.pinned_hash??O?.remote_commit;if(!(!oe||!Ne))return f.jsxDEV(Uw,{remoteUrl:O?.remote_url,fallbackName:B,branch:oe,commit:Ne},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:771,columnNumber:15},this)})(),onNavigateUp:ot?Gt:void 0,children:jt.length===0?ia?f.jsxDEV(O3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:783,columnNumber:15},this):ot?null:f.jsxDEV("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:n("common.items",{count:0})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:785,columnNumber:15},this):f.jsxDEV("div",{className:"flex flex-col gap-0.5",children:jt.map(O=>{if(O.type==="root"){const le=O.root,$e=qt,Me=$e?le.metadata?.local_path:void 0,Dt=le.tree.length>0?Wb({children:le.tree}):void 0,ya=Dt?Dt.folders+Dt.sources:0,js=le.metadata,Ts=js?.origin==="remote",Ro=js?.import_type==="directory",ms=Ts||$e&&!Ro;return f.jsxDEV(x4,{source:{id:le.id,library_id:le.library_id,owner_id:le.owner_id,path:"",kind:le.kind,source_type:le.source_type,name:le.name,content_hash:le.content_hash,metadata:le.metadata,index_status:le.index_status,created_at:le.created_at,updated_at:le.updated_at},...typeof Me=="string"?{displayName:Me}:{},...le.kind==="folder"?{childCount:ya}:{},isDaemonLibrary:qt??!1,isRepoRoot:ms,...ba[le.id]?{hasUpdate:!0}:{},onClick:()=>qa(O),...Ts?{}:{onRename:C=>Wt(le.id,C)},onDelete:()=>ea(O)},le.id,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:809,columnNumber:21},this)}const B=O.node,oe=`${O.root.id}:${B.path}`,Ne=B.kind==="folder"?B.children?.length??0:void 0;return f.jsxDEV(x4,{source:{id:O.root.id,library_id:O.root.library_id,owner_id:O.root.owner_id,path:B.path,kind:B.kind,source_type:B.source_type??null,name:B.name,content_hash:null,metadata:B.metadata??null,index_status:B.index_status??"none",created_at:O.root.created_at,updated_at:O.root.updated_at},...Ne!==void 0?{childCount:Ne}:{},isDaemonLibrary:qt??!1,onClick:()=>qa(O),...Xe&&O.root.metadata?.origin!=="remote"?{onDelete:()=>ea(O)}:{}},oe,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:844,columnNumber:19},this)})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:790,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:740,columnNumber:9},this),k&&f.jsxDEV(w3,{onConfirm:Ee,onCancel:()=>{G(!1),be(null)},error:I},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:876,columnNumber:9},this),Te&&f.jsxDEV(_3,{onConfirm:tt,onCancel:()=>{P(!1),Re(null)},error:fe,uploading:we},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:888,columnNumber:9},this),ne&&f.jsxDEV(E3,{onClose:()=>he(!1)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:901,columnNumber:9},this),se&&f.jsxDEV(v4,{target:se,onConfirm:Sa,onCancel:()=>{ae(null),De(null),ue(null)}},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:906,columnNumber:9},this),ra&&g&&f.jsxDEV(v4,{target:{type:"client",name:g.name},onConfirm:ga,onCancel:wa},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:919,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/LibraryRoot.tsx",lineNumber:594,columnNumber:5},this)}function Fn({active:n,current:o}){return f.jsxDEV("span",{className:`inline-block h-2.5 w-2.5 rounded-full border-2 ${o?"border-c4a-accent bg-c4a-accent":n?"border-c4a-accent bg-transparent":"border-c4a-border-default bg-transparent"}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/StepIndicator.tsx",lineNumber:9,columnNumber:5},this)}function li(){return f.jsxDEV("span",{className:"h-px flex-1 bg-c4a-border-default"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/StepIndicator.tsx",lineNumber:22,columnNumber:10},this)}function Cw({libraryName:n}){const{t:o}=Ie();return f.jsxDEV("div",{className:"rounded border border-c4a-warning/30 bg-c4a-bg-surface p-6 text-center",children:[f.jsxDEV("p",{className:"text-sm text-c4a-warning",children:o("sources.import.daemon_offline",{name:n})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DaemonOfflineBlock.tsx",lineNumber:12,columnNumber:7},this),f.jsxDEV(us,{to:"/studio/sources/add-client",className:"mt-4 inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:o("sources.import.view_guide")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DaemonOfflineBlock.tsx",lineNumber:15,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/DaemonOfflineBlock.tsx",lineNumber:11,columnNumber:5},this)}function Ug({step:n,totalSteps:o,importing:l,stepBusy:c,canProceed:u,safetyNoticeKey:d,confirmLabelKey:p,onPrev:b,onNext:g,onImport:y}){const{t:E}=Ie();return f.jsxDEV("div",{className:"mt-3 flex shrink-0 items-center gap-4 sm:mt-6",children:[f.jsxDEV("p",{className:"min-w-0 flex-1 text-xs leading-relaxed text-c4a-text-muted line-clamp-1 sm:line-clamp-none",title:E(d),onClick:x=>x.currentTarget.classList.toggle("line-clamp-1"),children:E(d)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportFooter.tsx",lineNumber:33,columnNumber:7},this),f.jsxDEV("div",{className:"flex shrink-0 gap-2",children:[n>1&&f.jsxDEV("button",{onClick:b,disabled:l||c,className:"rounded border border-c4a-border-default px-4 py-2 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover disabled:opacity-40",children:E("common.previous")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportFooter.tsx",lineNumber:42,columnNumber:11},this),n<o?f.jsxDEV("button",{onClick:g,disabled:!u||c,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:E("common.next")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportFooter.tsx",lineNumber:51,columnNumber:11},this):f.jsxDEV("button",{onClick:y,disabled:l||c||!u,className:"flex items-center gap-1.5 rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[l&&f.jsxDEV(Us,{size:12,className:"animate-spin"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportFooter.tsx",lineNumber:64,columnNumber:27},this),E(l?"sources.import.importing":p)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportFooter.tsx",lineNumber:59,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportFooter.tsx",lineNumber:40,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportFooter.tsx",lineNumber:32,columnNumber:5},this)}function jw(n,o){const l=N.useCallback(async(p,b)=>{if(!n)throw new Error("No library");const g=await Yt.post(`/libraries/${n}/rpc`,{method:p,params:b});if(g.error){const y=g.error;throw new Error(y.message??JSON.stringify(g.error))}return g.result??g},[n]),[c,u]=N.useState([]);N.useEffect(()=>{if(!n)return;let p=!1;return(async()=>{try{const b=await Yt.get("/sources",{library_id:n,limit:"500"});if(p)return;const g=b.items.map(y=>{const E=y.metadata;return typeof E?.local_path=="string"?E.local_path:null}).filter(y=>y!==null);u(g)}catch{}})(),()=>{p=!0}},[n]);const d=N.useMemo(()=>{const p=o?.config;return!p||!Array.isArray(p.allowed_paths)?[]:p.allowed_paths},[o]);return{rpc:l,importedPaths:c,allowedPaths:d}}function V3(n,o){const l=n.toLowerCase();try{if(l.endsWith("package.json")){const c=JSON.parse(o);if(typeof c.name=="string"&&c.name.trim())return c.name.trim()}if(l.endsWith("pyproject.toml"))return o.match(/^\s*name\s*=\s*["']([^"']+)["']/m)?.[1]??null;if(l.endsWith("go.mod"))return o.match(/^\s*module\s+([^\s]+)\s*$/m)?.[1]??null;if(l.endsWith("cargo.toml"))return o.match(/^\s*name\s*=\s*["']([^"']+)["']/m)?.[1]??null;if(l.endsWith("pom.xml"))return o.match(/<artifactId>([^<]+)<\/artifactId>/)?.[1]?.trim()??null;if(l.endsWith("build.gradle"))return o.match(/rootProject\.name\s*=\s*["']([^"']+)["']/)?.[1]??null}catch{return null}return null}function Tw(n,o,l="repo"){const c=[];for(const d of n){const p=d.path.split("/"),b=p.slice(0,-1).join("/")||".",g=p.length===1||d.path==="package.json",y=b==="."?l:p[p.length-2]||b,E=V3(d.path,d.content);c.push({name:E||y,path:b,isRoot:g})}const u=o.filter(d=>/\.md$/i.test(d.path)).map(d=>d.path);return{packages:c,mdFiles:u}}const N4=new Set(["tree","blob","commit","commits","raw","src"]),M3=new Set(["commit","commits"]);function z3(n){let o;try{o=new URL(n.trim())}catch{return{repoUrl:n.trim()}}const l=o.pathname.split("/").filter(Boolean);let c=-1;for(let y=2;y<l.length;y++){const E=l[y];if(E==="-"&&y+1<l.length&&N4.has(l[y+1])){c=y;break}if(N4.has(E)){c=y;break}}if(c===-1)return{repoUrl:`${o.protocol}//${o.host}${o.pathname}`.replace(/\/+$/,"")};const u=l.slice(0,c).join("/"),d=`${o.protocol}//${o.host}/${u}`;let p,b;if(l[c]==="-"?(p=l[c+1],b=c+2):(p=l[c],b=c+1),b>=l.length)return{repoUrl:d};const g=l[b];return M3.has(p)?{repoUrl:d,commit:g}:{repoUrl:d,ref:g}}function gr(n){try{return(new URL(n).pathname.split("/").pop()??"repo").replace(/\.git$/i,"")||"repo"}catch{return n.split("/").pop()||n}}function Ow(){const n=new Date;return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}:${String(n.getSeconds()).padStart(2,"0")}`}function Aw(){const{t:n}=Ie(),[o,l]=N.useState(!1),[c,u]=N.useState(null),d=N.useRef(),p=N.useRef(),b=window.location.host,g=`c4a-daemon --server ${b} --allow <dir1> <dir2>`,y=`c4a-daemon --server ${b}`,E=N.useCallback((_,R)=>{navigator.clipboard.writeText(_),u(R),clearTimeout(d.current),d.current=setTimeout(()=>u(null),1500)},[]),x=N.useCallback(()=>{clearTimeout(p.current),l(!0)},[]),S=N.useCallback(()=>{p.current=setTimeout(()=>l(!1),150)},[]);return f.jsxDEV("span",{className:"relative",onMouseEnter:x,onMouseLeave:S,children:[f.jsxDEV(yw,{size:12,className:"text-c4a-warning"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:41,columnNumber:7},this),o&&f.jsxDEV("span",{className:"absolute left-full top-1/2 z-10 ml-2 -translate-y-1/2 rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-2 shadow-lg",onMouseEnter:x,onMouseLeave:S,children:[f.jsxDEV("span",{className:"block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_restrict")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:49,columnNumber:11},this),f.jsxDEV("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[f.jsxDEV("span",{className:"font-mono text-xs text-c4a-accent",children:g},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:53,columnNumber:13},this),f.jsxDEV("button",{onClick:()=>E(g,0),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:c===0?f.jsxDEV(ui,{size:10},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:61,columnNumber:34},this):f.jsxDEV(fg,{size:10},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:61,columnNumber:56},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:56,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:52,columnNumber:11},this),f.jsxDEV("span",{className:"mt-2 block whitespace-nowrap font-mono text-xs text-c4a-text-secondary",children:n("sources.import.allowed_dirs_tooltip_all")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:66,columnNumber:11},this),f.jsxDEV("span",{className:"mt-1 flex items-center gap-1.5 whitespace-nowrap",children:[f.jsxDEV("span",{className:"font-mono text-xs text-c4a-accent",children:y},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:70,columnNumber:13},this),f.jsxDEV("button",{onClick:()=>E(y,1),className:"shrink-0 rounded p-0.5 text-c4a-accent transition-colors hover:bg-c4a-bg-hover",title:"Copy",children:c===1?f.jsxDEV(ui,{size:10},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:78,columnNumber:34},this):f.jsxDEV(fg,{size:10},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:78,columnNumber:56},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:73,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:69,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:43,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/AllowedDirsHint.tsx",lineNumber:36,columnNumber:5},this)}function Vw({open:n,onClose:o,rpc:l,onNavigate:c,defaultPath:u}){const{t:d}=Ie(),[p,b]=N.useState(u??""),[g,y]=N.useState(null),[E,x]=N.useState(!1),S=N.useRef(null);N.useEffect(()=>{u&&!p&&b(u)},[u]);const _=N.useCallback(async()=>{const z=p.trim();if(z){x(!0),y(null);try{(await l("fs/exists",{path:z})).exists?(c(z),b(u??""),y(null),o()):y(d("sources.import.wildcard_path_not_found"))}catch(H){y(H instanceof Error?H.message:String(H))}finally{x(!1)}}},[p,l,d,c,o]),R=N.useCallback(()=>{b(u??""),y(null),o()},[o,u]);return n?f.jsxDEV(pi,{onClose:R,closeOnOverlay:!1,closeOnEsc:!1,overlayClass:"bg-black/40",className:"w-full max-w-md rounded-lg border border-c4a-border-default bg-c4a-bg-surface p-5 shadow-xl",children:[f.jsxDEV("div",{className:"flex items-center justify-between",children:[f.jsxDEV("h3",{className:"font-mono text-sm font-medium text-c4a-text-primary",children:d("sources.import.wildcard_go_title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:67,columnNumber:9},this),f.jsxDEV("button",{onClick:R,className:"rounded p-1 text-c4a-text-muted transition-colors hover:bg-c4a-bg-hover hover:text-c4a-text-secondary",children:f.jsxDEV(fi,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:74,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:70,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:66,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 flex items-center gap-2",children:[f.jsxDEV("input",{ref:S,type:"text",value:p,onChange:z=>{b(z.target.value),y(null)},onKeyDown:z=>{z.key==="Enter"&&_()},placeholder:d("sources.import.wildcard_path_placeholder"),autoFocus:!0,className:"flex-1 rounded border border-c4a-border-default bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-text-primary outline-none transition-colors focus:border-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:78,columnNumber:9},this),f.jsxDEV("button",{onClick:_,disabled:E||!p.trim(),className:"flex shrink-0 items-center gap-1.5 rounded bg-c4a-accent px-3 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-40",children:[E?f.jsxDEV(Us,{size:12,className:"animate-spin"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:94,columnNumber:13},this):f.jsxDEV(gw,{size:12},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:96,columnNumber:13},this),d("sources.import.wildcard_go")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:88,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:77,columnNumber:7},this),g&&f.jsxDEV("p",{className:"mt-2 text-xs text-c4a-error",children:g},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:102,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/GoToPathDialog.tsx",lineNumber:59,columnNumber:5},this):null}function Mw({rpc:n,allowedPaths:o,importedPaths:l,onNavigateUpExtra:c}){const u=!!o&&o.length>0,d=u&&o.length===1&&o[0]==="*",[p,b]=N.useState(u),[g,y]=N.useState(u&&!d?"":"/"),[E,x]=N.useState([]),[S,_]=N.useState(!1),[R,z]=N.useState(null),[H,Y]=N.useState(null);N.useEffect(()=>{if(u&&!d)return;let G=!1;return(async()=>{try{const I=await n("fs/homeDir",{});G||Y(I.home_dir)}catch{G||Y("/")}})(),()=>{G=!0}},[u,d,n]);const[K,Z]=N.useState(!1),J=N.useCallback(async G=>{_(!0),z(null);try{const I=await n("fs/listTree",{path:G,depth:1});x(I.entries||[]),y(G),b(!1)}catch(I){const be=I instanceof Error?I.message:String(I);z(be)}finally{_(!1)}},[n]);N.useEffect(()=>{u&&!d||H!==null&&J(H)},[H,u,d,J]);const ee=N.useMemo(()=>new Set(l??[]),[l]),ce=N.useCallback(()=>{if(u&&!d&&o.some(be=>be===g)){b(!0),y(""),x([]),z(null),c?.();return}const G=g.split("/").slice(0,-1).join("/")||"/";c?.(),J(G)},[u,d,o,g,J,c]),de=N.useMemo(()=>E.filter(G=>G.type==="directory"),[E]),k=N.useMemo(()=>E.filter(G=>G.type==="file"),[E]);return{atRoot:p,currentPath:g,entries:E,loading:S,error:R,homeDir:H,goToOpen:K,hasAllowedPaths:u,isWildcard:d,importedSet:ee,dirs:de,files:k,loadTree:J,handleNavigateUp:ce,setGoToOpen:Z}}function L3({rpc:n,selectedPath:o,onSelect:l,allowedPaths:c,importedPaths:u}){const{t:d}=Ie(),[p,b]=N.useState(null),{atRoot:g,currentPath:y,entries:E,loading:x,error:S,homeDir:_,goToOpen:R,isWildcard:z,importedSet:H,dirs:Y,files:K,loadTree:Z,handleNavigateUp:J,setGoToOpen:ee}=Mw({rpc:n,allowedPaths:c??[],importedPaths:u??[],onNavigateUpExtra:()=>b(null)}),[ce,de]=N.useState(null),[k,G]=N.useState(!1);N.useEffect(()=>{if(!o){de(null),G(!1);return}de(null),G(!0);let ae=!1;return(async()=>{try{const pe=await n("fs/repoStatus",{path:o});ae||(de({branch:pe.branch,hash:pe.head_hash,remoteUrl:pe.remote_url}),G(!1))}catch{ae||(de(null),G(!1))}})(),()=>{ae=!0}},[o,n]);const I=N.useCallback(ae=>{if(ae.type==="directory")if(ae.is_git_repo){if(H.has(ae.path))return;b(null),l(ae.path,ae.name)}else b(ae.path),Z(ae.path)},[l,Z,H]),be=N.useMemo(()=>Y.sort((ae,pe)=>ae.is_git_repo&&!pe.is_git_repo?-1:!ae.is_git_repo&&pe.is_git_repo?1:ae.name.localeCompare(pe.name)),[Y]),se=N.useMemo(()=>K.sort((ae,pe)=>ae.name.localeCompare(pe.name)),[K]);return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV("div",{className:"flex flex-wrap items-center justify-between gap-x-4 gap-y-1",children:[g?f.jsxDEV("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsxDEV("span",{children:d("sources.import.allowed_dirs")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:137,columnNumber:13},this),f.jsxDEV(Aw,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:138,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:136,columnNumber:11},this):f.jsxDEV("p",{className:"min-w-0 shrink truncate font-mono text-xs text-c4a-text-muted",children:y},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:141,columnNumber:11},this),o&&k?f.jsxDEV("div",{className:"flex shrink-0 items-center gap-1.5 font-mono text-xs text-c4a-accent",children:[f.jsxDEV(Us,{size:12,className:"animate-spin"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:147,columnNumber:13},this),f.jsxDEV("span",{children:d("common.loading")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:148,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:146,columnNumber:11},this):o&&ce?f.jsxDEV(Uw,{remoteUrl:ce.remoteUrl,fallbackName:o.split("/").pop()||o,branch:ce.branch,commit:ce.hash},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:151,columnNumber:11},this):!o&&z&&g?f.jsxDEV("button",{onClick:()=>ee(!0),className:"flex shrink-0 items-center gap-1.5 rounded border border-c4a-accent/40 bg-c4a-accent/10 px-2.5 py-1 text-xs text-c4a-accent transition-colors hover:bg-c4a-accent/20",children:d("sources.import.wildcard_goto")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:158,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:134,columnNumber:7},this),f.jsxDEV("hr",{className:"my-3 border-c4a-border-subtle"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:167,columnNumber:7},this),g?z?f.jsxDEV("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:_&&f.jsxDEV("button",{onClick:()=>Z(_),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV(Qs,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:178,columnNumber:17},this),f.jsxDEV("span",{className:"truncate",children:[_,f.jsxDEV("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",d("sources.import.wildcard_home"),")"]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:181,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:179,columnNumber:17},this),f.jsxDEV(ts,{size:12,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:185,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:174,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:172,columnNumber:11},this):f.jsxDEV("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:c.map(ae=>f.jsxDEV("button",{onClick:()=>Z(ae),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV(Qs,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:198,columnNumber:17},this),f.jsxDEV("span",{className:"truncate",children:ae},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:199,columnNumber:17},this),f.jsxDEV(ts,{size:12,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:200,columnNumber:17},this)]},ae,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:193,columnNumber:15},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:191,columnNumber:11},this):S&&!x?f.jsxDEV("p",{className:"py-4 text-xs text-c4a-error",children:S},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:209,columnNumber:9},this):f.jsxDEV("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[x&&f.jsxDEV("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsxDEV(Us,{size:14,className:"animate-spin text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:214,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:213,columnNumber:13},this),y!=="/"&&f.jsxDEV("button",{onClick:J,disabled:x,className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsxDEV(Qs,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:224,columnNumber:15},this),f.jsxDEV("span",{children:".."},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:225,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:219,columnNumber:13},this),be.map(ae=>{const pe=ae.is_git_repo&&H.has(ae.path),De=ae.is_git_repo?sm:Qs;return f.jsxDEV("div",{className:`flex w-full items-center rounded pl-2 pr-4 text-left text-sm transition-colors ${pe?"cursor-not-allowed text-c4a-accent/60":o===ae.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-accent/10 hover:text-c4a-accent"}`,children:[f.jsxDEV("button",{onClick:()=>I(ae),disabled:pe||x,className:"flex flex-1 items-center gap-2 px-2 py-1.5",children:[f.jsxDEV(De,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:249,columnNumber:17},this),f.jsxDEV("span",{className:"flex-1 truncate text-left",children:ae.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:250,columnNumber:17},this),pe&&f.jsxDEV("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:d("sources.import.already_imported")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:252,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:244,columnNumber:15},this),!pe&&f.jsxDEV("button",{onClick:te=>{te.stopPropagation(),Z(ae.path)},disabled:x,className:"shrink-0 rounded p-1.5 text-c4a-text-muted transition-colors hover:bg-c4a-accent/10 hover:text-c4a-accent disabled:pointer-events-none",title:ae.path,children:f.jsxDEV(ts,{size:12},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:264,columnNumber:19},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:258,columnNumber:17},this)]},ae.path,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:234,columnNumber:13},this)}),se.map(ae=>f.jsxDEV("div",{className:"flex w-full items-center gap-2 pl-2 pr-4 py-1.5 text-sm text-c4a-text-muted",children:[f.jsxDEV(xw,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:277,columnNumber:15},this),f.jsxDEV("span",{className:"truncate",children:ae.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:278,columnNumber:15},this)]},ae.path,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:273,columnNumber:13},this)),E.length===0&&!x&&f.jsxDEV("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:d("sources.import.no_entries")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:283,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:211,columnNumber:9},this),p&&!o&&f.jsxDEV("p",{className:"mt-3 text-xs text-c4a-warning",children:d("sources.import.not_git")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:292,columnNumber:9},this),f.jsxDEV(Vw,{open:R,onClose:()=>ee(!1),rpc:n,onNavigate:Z,defaultPath:_??void 0},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:298,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectRepo.tsx",lineNumber:133,columnNumber:5},this)}const hl=50,eg=["main","master"];function H3(n){const o=[],l=[];for(const c of n)eg.includes(c.name)?o.push(c):l.push(c);return o.sort((c,u)=>eg.indexOf(c.name)-eg.indexOf(u.name)),[...o,...l]}function S4(n,o,l){N.useEffect(()=>{if(!l)return;const c=u=>{n.current&&!n.current.contains(u.target)&&o()};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[n,o,l])}function zw({refs:n,loading:o,error:l,selectedRef:c,commit:u,onRefChange:d,onCommitChange:p,onValidChange:b,onBranchSwitch:g}){const{t:y}=Ie(),[E,x]=N.useState(!1),[S,_]=N.useState(""),[R,z]=N.useState(!0),[H,Y]=N.useState(!0),K=N.useRef(null),Z=N.useRef(null),[J,ee]=N.useState(!1),[ce,de]=N.useState(""),k=N.useRef(null),G=N.useRef(null);S4(K,()=>{x(!1),_("")},E),S4(k,()=>{ee(!1),de("")},J),N.useEffect(()=>{E&&setTimeout(()=>Z.current?.focus(),0)},[E]),N.useEffect(()=>{J&&setTimeout(()=>G.current?.focus(),0)},[J]),N.useEffect(()=>{b(!!c)},[c,b]);const I=N.useCallback(ne=>{d(ne.name),p(ne.commit),x(!1),_(""),g?.(ne.name)},[d,p,g]),be=N.useCallback((ne,he)=>{p(ne),d(he),ee(!1),de("")},[p,d]),se=N.useMemo(()=>n?H3(n.branches):[],[n]),ae=N.useMemo(()=>{const ne=S.toLowerCase();return(ne?se.filter(Te=>Te.name.toLowerCase().includes(ne)):se).slice(0,hl)},[se,S]),pe=N.useMemo(()=>{if(!n)return[];const ne=S.toLowerCase();return(ne?n.tags.filter(Te=>Te.name.toLowerCase().includes(ne)):n.tags).slice(0,hl)},[n,S]),De=N.useMemo(()=>{if(!n)return[];if(n.commits&&n.commits.length>0){const fe=ce.toLowerCase(),Re=n.commits.map(we=>({hash:we.hash,refName:c||"",label:`${we.hash.slice(0,8)} ${we.message?`— ${we.message.slice(0,50)}`:""}`.trim()}));return fe?Re.filter(we=>we.hash.toLowerCase().includes(fe)||we.label.toLowerCase().includes(fe)).slice(0,hl):Re.slice(0,hl)}const ne=new Set,he=[],Te=[...n.branches??[],...n.tags??[]];for(const fe of Te){const Re=fe.commit.slice(0,8);ne.has(fe.commit)||(ne.add(fe.commit),he.push({hash:fe.commit,refName:fe.name,label:`${Re} (${fe.name})`}))}if(!ce)return he.slice(0,hl);const P=ce.toLowerCase();return he.filter(fe=>fe.hash.toLowerCase().includes(P)||fe.label.toLowerCase().includes(P)).slice(0,hl)},[n,ce,c]);if(o)return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV(Us,{size:20,className:"animate-spin text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:156,columnNumber:9},this),f.jsxDEV("span",{className:"mt-2 text-sm text-c4a-accent",children:y("sources.import_remote.loading_refs")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:157,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:155,columnNumber:7},this);if(l)return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV("p",{className:"flex items-center gap-1.5 font-mono text-sm font-medium text-red-400",children:[f.jsxDEV(fi,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:168,columnNumber:11},this),y("sources.import.error_title")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:167,columnNumber:9},this),f.jsxDEV("p",{className:"mt-2 max-h-40 overflow-y-auto break-all font-mono text-xs leading-relaxed text-red-400/70",children:l},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:171,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:166,columnNumber:7},this);if(!n)return null;const te=n.branches.find(ne=>ne.name===c)?.name??n.tags.find(ne=>ne.name===c)?.name??c,ue=u?u.slice(0,8):"";return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col space-y-4 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV("div",{children:[f.jsxDEV("label",{className:"block font-mono text-xs uppercase tracking-tight text-c4a-text-secondary",children:y("sources.import_remote.ref_label")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:191,columnNumber:9},this),f.jsxDEV("div",{ref:K,className:"relative mt-2",children:[f.jsxDEV("button",{onClick:()=>x(!E),className:"flex w-full items-center justify-between rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-2 font-mono text-sm font-semibold text-c4a-accent transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV("span",{children:te||"—"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:199,columnNumber:13},this),f.jsxDEV(ts,{size:14,className:`text-c4a-text-muted transition-transform duration-200 ${E?"rotate-90":""}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:200,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:195,columnNumber:11},this),E&&f.jsxDEV("div",{className:"absolute z-20 mt-1 w-full rounded border border-c4a-border-default bg-c4a-bg-elevated shadow-lg",children:[f.jsxDEV("div",{className:"border-b border-c4a-border-default px-3 py-2.5",children:f.jsxDEV("div",{className:"flex items-center gap-2 rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-1.5",children:[f.jsxDEV(hg,{size:14,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:210,columnNumber:19},this),f.jsxDEV("input",{ref:Z,type:"text",value:S,onChange:ne=>_(ne.target.value),placeholder:y("sources.import_remote.ref_search"),className:"w-full bg-transparent font-mono text-sm text-c4a-text-primary placeholder:text-c4a-text-muted focus:outline-none"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:211,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:209,columnNumber:17},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:208,columnNumber:15},this),f.jsxDEV("div",{className:"flex max-h-80 flex-col md:flex-row",children:[ae.length>0&&f.jsxDEV("div",{className:"c4a-scrollbar min-w-0 flex-1 overflow-y-auto md:border-r md:border-c4a-border-default",children:[f.jsxDEV("button",{onClick:()=>z(!R),className:"flex w-full items-center gap-1.5 px-3 py-2 font-mono text-xs uppercase tracking-tight text-c4a-text-muted",children:[f.jsxDEV(ts,{size:12,className:`transition-transform duration-200 ${R?"rotate-90":""}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:230,columnNumber:23},this),y("sources.import_remote.ref_branches")," (",n.branches.length,")"]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:226,columnNumber:21},this),R&&ae.map(ne=>f.jsxDEV("button",{onClick:()=>I(ne),className:`flex w-full items-center justify-between px-3 py-1.5 font-mono text-sm transition-colors hover:bg-c4a-bg-hover ${ne.name===c?"font-semibold text-c4a-accent":"text-c4a-text-secondary"}`,children:[f.jsxDEV("span",{className:"truncate",children:ne.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:243,columnNumber:27},this),ne.name===c&&f.jsxDEV("span",{children:"✓"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:245,columnNumber:29},this)]},`b-${ne.name}`,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:238,columnNumber:25},this))]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:225,columnNumber:19},this),pe.length>0&&f.jsxDEV("div",{className:"c4a-scrollbar min-w-0 flex-1 overflow-y-auto border-t border-c4a-border-default md:border-t-0",children:[f.jsxDEV("button",{onClick:()=>Y(!H),className:"flex w-full items-center gap-1.5 px-3 py-2 font-mono text-xs uppercase tracking-tight text-c4a-text-muted",children:[f.jsxDEV(ts,{size:12,className:`transition-transform duration-200 ${H?"rotate-90":""}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:259,columnNumber:23},this),y("sources.import_remote.ref_tags")," (",n.tags.length,")"]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:255,columnNumber:21},this),H&&pe.map(ne=>f.jsxDEV("button",{onClick:()=>I(ne),className:`flex w-full items-center justify-between px-3 py-1.5 font-mono text-sm transition-colors hover:bg-c4a-bg-hover ${ne.name===c?"font-semibold text-c4a-accent":"text-c4a-text-secondary"}`,children:[f.jsxDEV("span",{className:"truncate",children:ne.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:272,columnNumber:27},this),ne.name===c&&f.jsxDEV("span",{children:"✓"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:274,columnNumber:29},this)]},`t-${ne.name}`,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:267,columnNumber:25},this))]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:254,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:222,columnNumber:15},this),ae.length===0&&pe.length===0&&f.jsxDEV("div",{className:"px-3 py-4 text-center font-mono text-sm text-c4a-text-muted",children:"No matches"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:283,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:207,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:194,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:190,columnNumber:7},this),f.jsxDEV("div",{children:[f.jsxDEV("label",{className:"block font-mono text-xs uppercase tracking-tight text-c4a-text-secondary",children:y("sources.import_remote.commit_label")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:294,columnNumber:9},this),f.jsxDEV("div",{ref:k,className:"relative mt-2",children:[f.jsxDEV("button",{onClick:()=>ee(!J),className:"flex w-full items-center justify-between rounded border border-c4a-border-default bg-c4a-bg-surface px-3 py-2 font-mono text-sm font-semibold text-c4a-accent transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV("span",{className:u?"":"font-normal text-c4a-text-muted",children:ue||"—"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:302,columnNumber:13},this),f.jsxDEV(ts,{size:14,className:`text-c4a-text-muted transition-transform duration-200 ${J?"rotate-90":""}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:303,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:298,columnNumber:11},this),J&&f.jsxDEV("div",{className:"c4a-scrollbar absolute z-20 mt-1 max-h-64 w-full overflow-y-auto rounded border border-c4a-border-default bg-c4a-bg-elevated shadow-lg",children:[f.jsxDEV("div",{className:"sticky top-0 z-10 border-b border-c4a-border-default bg-c4a-bg-elevated px-3 py-2",children:f.jsxDEV("div",{className:"flex items-center gap-2 rounded border border-c4a-border-default bg-c4a-bg-surface px-2 py-1",children:[f.jsxDEV(hg,{size:12,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:313,columnNumber:19},this),f.jsxDEV("input",{ref:G,type:"text",value:ce,onChange:ne=>de(ne.target.value),placeholder:y("sources.import_remote.commit_search"),className:"w-full bg-transparent font-mono text-xs text-c4a-text-primary placeholder:text-c4a-text-muted focus:outline-none"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:314,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:312,columnNumber:17},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:311,columnNumber:15},this),De.map(ne=>f.jsxDEV("button",{onClick:()=>be(ne.hash,ne.refName),className:"flex w-full items-center justify-between px-3 py-1.5 font-mono text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV("span",{className:"truncate",children:ne.label},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:331,columnNumber:19},this),ne.hash===u&&f.jsxDEV("span",{className:"text-c4a-accent",children:"✓"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:333,columnNumber:21},this)]},ne.hash,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:326,columnNumber:17},this)),De.length===0&&f.jsxDEV("div",{className:"px-3 py-4 text-center font-mono text-xs text-c4a-text-muted",children:"No matches"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:339,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:310,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:297,columnNumber:9},this),f.jsxDEV("p",{className:"mt-3 flex items-center gap-1.5 text-xs text-c4a-text-muted",children:[f.jsxDEV(eT,{size:12,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:347,columnNumber:11},this),y("sources.import_remote.commit_hint")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:346,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:293,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepRefSelect.tsx",lineNumber:188,columnNumber:5},this)}const $3="_pulseBar_17bq5_1",B3={pulseBar:$3};function I3({stages:n,currentStage:o,completedStages:l,failedStage:c,progress:u}){const{t:d}=Ie();return f.jsxDEV("div",{className:"space-y-3",children:[f.jsxDEV("div",{className:"space-y-2",children:n.map(p=>{const b=l.includes(p.key),g=c===p.key,y=o===p.key;return f.jsxDEV("div",{className:"flex items-center gap-3",children:[g?f.jsxDEV(fi,{size:14,className:"shrink-0 text-red-400"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:45,columnNumber:17},this):b||y?f.jsxDEV("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:f.jsxDEV("span",{className:`block h-2 w-2 rounded-full bg-c4a-accent ${y?"animate-pulse":""}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:48,columnNumber:19},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:47,columnNumber:17},this):f.jsxDEV("span",{className:"flex h-3.5 w-3.5 shrink-0 items-center justify-center",children:f.jsxDEV("span",{className:"block h-2 w-2 rounded-full border border-c4a-text-muted/40"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:52,columnNumber:19},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:51,columnNumber:17},this),f.jsxDEV("span",{className:`flex-1 text-sm ${g?"text-red-400":y?"font-medium text-c4a-text-primary":b?"text-c4a-text-secondary":"text-c4a-text-muted"}`,children:p.label},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:57,columnNumber:15},this),b&&f.jsxDEV(ui,{size:14,className:"shrink-0 text-c4a-accent/60"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:73,columnNumber:17},this),g&&f.jsxDEV("span",{className:"font-mono text-xs text-red-400",children:d("sources.import.error_title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:76,columnNumber:17},this),y&&u&&u.label&&f.jsxDEV("span",{className:"max-w-[200px] truncate font-mono text-xs text-c4a-text-muted",children:u.label},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:81,columnNumber:17},this)]},p.key,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:42,columnNumber:13},this)})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:35,columnNumber:7},this),o&&!c&&f.jsxDEV("div",{className:"space-y-1",children:u&&u.percent>=0?f.jsxDEV("div",{className:"h-1.5 overflow-hidden rounded-full bg-c4a-bg-elevated",children:f.jsxDEV("div",{className:"h-full rounded-full bg-c4a-accent transition-all duration-300",style:{width:`${Math.min(100,Math.max(0,u.percent))}%`}},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:95,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:94,columnNumber:13},this):f.jsxDEV("div",{className:`h-1.5 rounded-full bg-c4a-bg-elevated ${B3.pulseBar}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:101,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:92,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/ImportProgress.tsx",lineNumber:33,columnNumber:5},this)}function Lw({stages:n,currentStage:o,completedStages:l,failedStage:c,progress:u,failedError:d,logs:p}){const b=N.useRef(null);return N.useEffect(()=>{b.current?.scrollIntoView({behavior:"smooth"})},[p.length]),f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV(I3,{stages:n,currentStage:o,completedStages:l,failedStage:c,progress:u},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepLoading.tsx",lineNumber:35,columnNumber:7},this),f.jsxDEV("div",{className:"mt-4 min-h-0 flex-1 rounded bg-c4a-bg-base p-3 c4a-scrollbar overflow-y-auto",children:[p.map((g,y)=>f.jsxDEV("p",{className:"font-mono text-xs text-c4a-text-muted leading-relaxed",children:g},y,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepLoading.tsx",lineNumber:46,columnNumber:11},this)),f.jsxDEV("div",{ref:b},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepLoading.tsx",lineNumber:50,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepLoading.tsx",lineNumber:44,columnNumber:7},this),c&&d&&f.jsxDEV("div",{className:"mt-3 max-h-32 overflow-y-auto rounded-sm bg-red-500/5 px-4 py-3",children:f.jsxDEV("p",{className:"break-all font-mono text-xs leading-relaxed text-red-400/80",children:d},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepLoading.tsx",lineNumber:55,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepLoading.tsx",lineNumber:54,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepLoading.tsx",lineNumber:34,columnNumber:5},this)}function Eo({icon:n,label:o,value:l,tooltip:c,size:u="sm"}){const d=u==="sm";return f.jsxDEV("div",{className:"group/stat relative rounded border border-c4a-border-subtle bg-c4a-bg-base p-3",children:[f.jsxDEV("div",{className:"flex items-center gap-1.5 text-c4a-text-muted [&>svg]:size-4",children:[n,f.jsxDEV("span",{className:"font-mono text-xs uppercase",children:o},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/StatCard.tsx",lineNumber:22,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/StatCard.tsx",lineNumber:20,columnNumber:7},this),f.jsxDEV("p",{className:`mt-1 font-mono font-bold text-c4a-text-secondary ${d?"text-sm truncate":"text-lg"}`,title:d?String(l):void 0,children:l},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/StatCard.tsx",lineNumber:24,columnNumber:7},this),c&&f.jsxDEV("div",{className:"pointer-events-none absolute bottom-full left-0 z-30 mb-1.5 hidden w-max max-w-[260px] rounded border border-c4a-border-default bg-c4a-bg-elevated px-2.5 py-1.5 text-[11px] leading-relaxed text-c4a-text-secondary shadow-c4a-lg group-hover/stat:block",children:c},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/StatCard.tsx",lineNumber:33,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/components/sources/StatCard.tsx",lineNumber:19,columnNumber:5},this)}const tg=100;function Hw({repoName:n,repoIdentifier:o,branch:l,commit:c,packages:u,mdFiles:d,importing:p,completed:b}){const{t:g}=Ie(),y=c?c.slice(0,7):"",[E,x]=N.useState("packages"),[S,_]=N.useState(tg),R=N.useRef(null),z=N.useRef(null);N.useEffect(()=>{_(tg),z.current?.scrollTo(0,0)},[E]),N.useEffect(()=>{const J=R.current;if(!J)return;const ee=E==="packages"?u.length:d.length;if(S>=ee)return;const ce=new IntersectionObserver(de=>{de[0]?.isIntersecting&&_(k=>Math.min(k+tg,ee))},{root:z.current,threshold:.1});return ce.observe(J),()=>ce.disconnect()},[E,S,u.length,d.length]);const H=E==="packages"?u:d,Y=H.slice(0,S),K=S<H.length,Z=N.useMemo(()=>b?g("sources.import_remote.complete"):p?g("sources.import.importing"):g("sources.import.confirm_heading",{name:n}),[b,p,n,g]);return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-subtle bg-c4a-bg-surface p-6",children:[f.jsxDEV("p",{className:"text-sm text-c4a-text-secondary",children:Z},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:76,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 flex flex-wrap items-center gap-x-3 gap-y-1",children:[f.jsxDEV("span",{className:"font-mono text-sm font-bold text-c4a-accent",children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:80,columnNumber:9},this),f.jsxDEV("span",{className:"font-mono text-xs text-c4a-text-muted",children:o},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:81,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:79,columnNumber:7},this),f.jsxDEV("div",{className:"mt-4 grid grid-cols-1 gap-3 sm:grid-cols-4",children:[f.jsxDEV(Eo,{icon:f.jsxDEV(mg,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:87,columnNumber:17},this),label:g("sources.import.branch"),value:l},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:86,columnNumber:9},this),f.jsxDEV(Eo,{icon:f.jsxDEV(Qj,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:92,columnNumber:17},this),label:g("sources.import.commit"),value:y},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:91,columnNumber:9},this),f.jsxDEV(Eo,{icon:f.jsxDEV(vl,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:97,columnNumber:17},this),label:g("sources.import.packages"),value:String(u.length),tooltip:g("sources.import.dir_code_packages_tip")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:96,columnNumber:9},this),f.jsxDEV(Eo,{icon:f.jsxDEV(xr,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:103,columnNumber:17},this),label:g("sources.import.documents"),value:String(d.length),tooltip:g("sources.import.dir_doc_files_tip")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:102,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:85,columnNumber:7},this),p&&f.jsxDEV("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[f.jsxDEV(Us,{size:14,className:"animate-spin text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:113,columnNumber:11},this),f.jsxDEV("p",{className:"font-mono text-xs text-c4a-accent",children:g("sources.import.importing")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:114,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:112,columnNumber:9},this),(u.length>0||d.length>0)&&f.jsxDEV("div",{className:"mt-4 flex min-h-0 flex-1 flex-col rounded border border-c4a-border-subtle bg-c4a-bg-base",children:[f.jsxDEV("div",{className:"flex shrink-0 items-center justify-between px-4 py-3",children:[f.jsxDEV("p",{className:"hidden font-mono text-xs text-c4a-text-secondary sm:block",children:g("sources.import.recognized",{packages:u.length,docs:d.length})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:125,columnNumber:13},this),f.jsxDEV("div",{className:"flex rounded border border-c4a-border-subtle",children:[f.jsxDEV("button",{onClick:()=>x("packages"),className:`flex items-center gap-1 px-2.5 py-1 text-xs transition-colors ${E==="packages"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsxDEV(vl,{size:13},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:137,columnNumber:17},this),f.jsxDEV("span",{className:"font-mono",children:u.length},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:138,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:129,columnNumber:15},this),f.jsxDEV("button",{onClick:()=>x("docs"),className:`flex items-center gap-1 border-l border-c4a-border-subtle px-2.5 py-1 text-xs transition-colors ${E==="docs"?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:[f.jsxDEV(xr,{size:13},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:148,columnNumber:17},this),f.jsxDEV("span",{className:"font-mono",children:d.length},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:149,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:140,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:128,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:124,columnNumber:11},this),f.jsxDEV("hr",{className:"border-c4a-border-subtle"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:154,columnNumber:11},this),f.jsxDEV("div",{ref:z,className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto px-2 py-1",children:H.length===0?f.jsxDEV("p",{className:"py-8 text-center text-xs text-c4a-text-muted",children:E==="packages"?g("sources.import.no_packages"):"—"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:159,columnNumber:15},this):f.jsxDEV(f.Fragment,{children:[E==="packages"?Y.map(J=>f.jsxDEV("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsxDEV(vl,{size:14,className:"shrink-0 text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:167,columnNumber:25},this),f.jsxDEV("span",{className:"text-c4a-text-secondary",children:J.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:168,columnNumber:25},this),f.jsxDEV("span",{className:"hidden truncate text-c4a-text-muted sm:inline",children:J.path},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:169,columnNumber:25},this),J.isRoot&&f.jsxDEV("span",{className:"rounded bg-c4a-bg-active px-1 py-0.5 font-mono text-[10px] text-c4a-text-muted",children:"root"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:171,columnNumber:27},this)]},J.path,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:166,columnNumber:23},this)):Y.map(J=>f.jsxDEV("div",{className:"flex items-center gap-2 rounded pl-2 pr-4 py-1 text-xs",children:[f.jsxDEV(xr,{size:14,className:"shrink-0 text-c4a-text-secondary"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:177,columnNumber:25},this),f.jsxDEV("span",{className:"truncate text-c4a-text-secondary",children:J},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:178,columnNumber:25},this)]},J,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:176,columnNumber:23},this)),K&&f.jsxDEV("div",{ref:R,className:"h-4"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:181,columnNumber:29},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:163,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:157,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:122,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepConfirm.tsx",lineNumber:75,columnNumber:5},this)}const Y3=["scan","save"],Bf={scan:"sources.import.stage.scan",save:"sources.import.stage.save"};function q3(){const{t:n}=Ie(),o=_o(),{libId:l}=Nu(),[c]=tm(),d=za(mi(wl)).find(_e=>_e.id===l),p=om(_e=>_e.createSource),b=c.get("parentId")||"",g=c.get("parentName")||"",y=c.get("parentPath")||"",[E,x]=N.useState(1),[S,_]=N.useState(null),[R,z]=N.useState({repoPath:"",repoName:"",branch:"",branches:[],commit:"",commits:[],isDirty:!1,repoFiles:[],packages:[],mdFiles:[],repoFileContents:[]}),[H,Y]=N.useState(null),[K,Z]=N.useState(!1),[J,ee]=N.useState(null),[ce,de]=N.useState(""),[k,G]=N.useState(""),[I,be]=N.useState(!1),[se,ae]=N.useState(!1),[pe,De]=N.useState(!1),[te,ue]=N.useState(null),[ne,he]=N.useState([]),[Te,P]=N.useState(null),[fe,Re]=N.useState(null),[we,lt]=N.useState([]),Ut=N.useRef(null),Je=d?.is_online??!1,{rpc:yt,importedPaths:Ct,allowedPaths:ra}=jw(l,d),ye=N.useMemo(()=>Y3.map(_e=>({key:_e,label:Bf[_e]?n(Bf[_e]):_e})),[n]),ot=N.useCallback(_e=>{lt(Pe=>[...Pe,`[${Ow()}] ${_e}`])},[]),ct=N.useRef(null),jt=N.useCallback(_e=>{const Pe=ct.current;Pe&&Pe!==_e&&(he(tt=>tt.includes(Pe)?tt:[...tt,Pe]),ot(`${n(Bf[Pe]??Pe)} ${n("sources.import.stage.done_suffix")}`)),ot(`${n(Bf[_e]??_e)}...`),ct.current=_e,ue(_e),Re(null)},[ot,n]),qt=N.useCallback((_e,Pe)=>{z(tt=>({...tt,repoPath:_e,repoName:Pe}))},[]),Xe=N.useCallback(async()=>{Z(!0),ee(null);try{const _e=await yt("fs/repoStatus",{path:R.repoPath}),Pe={branches:_e.branches??[{name:_e.branch,commit:_e.head_hash}],tags:_e.tags??[],default:_e.branch,commits:_e.commits??[{hash:_e.head_hash,message:"HEAD"}]};Y(Pe),z(tt=>({...tt,isDirty:_e.is_dirty})),de(tt=>{if(tt)return tt;const Ht=Pe.branches.find(ga=>ga.name===Pe.default),$t=Pe.branches[0],ta=Ht??$t;return ta?(G(ta.commit),ta.name):tt})}catch(_e){const Pe=_e instanceof Error?_e.message:"Failed to load repository info";ee(Pe)}finally{Z(!1)}},[yt,R.repoPath]);N.useEffect(()=>{E===2&&R.repoPath&&!H&&Xe()},[E,R.repoPath,H,Xe]);const xt=N.useCallback(async _e=>{try{const Pe=await yt("fs/repoStatus",{path:R.repoPath,branch:_e});Y(tt=>tt&&{...tt,commits:Pe.commits??[]})}catch{}},[yt,R.repoPath]),ba=N.useCallback(async()=>{if(l){ae(!0),De(!1),_(null),P(null),he([]),ct.current=null,ue(null),Re(null),lt([]),x(3);try{jt("scan");const _e=await yt("fs/repoScan",{path:R.repoPath,hash:k}),Pe=_e.files||[],tt=_e.manifests||[],Ht=gr(R.repoPath),{packages:$t,mdFiles:ta}=Tw(tt,Pe,Ht);z(ja=>({...ja,branch:ce,commit:k,repoFiles:Pe,packages:$t,mdFiles:ta,repoFileContents:tt})),jt("save");const ga=await p({library_id:l,repo_name:R.repoName||Ht,repo_root_path:R.repoPath,repo_branch:ce,repo_commit:k,repo_files:Pe.map(ja=>ja.path),repo_file_contents:tt,...b?{parent_source_id:b,parent_path:y}:{}});he(["scan","save"]),ct.current=null,ue(null),ot(`${n("sources.import.stage.save")} ${n("sources.import.stage.done_suffix")}`),ot(n("sources.import.stage.complete"));const wa=Array.isArray(ga)?ga[0]:ga;Ut.current=wa?.id??null,De(!0),ae(!1),x(4)}catch(_e){const Pe=ct.current??"scan";P(Pe),ct.current=null,ue(null);const tt=_e instanceof Error?_e.message:String(_e);ot(`ERROR: ${tt}`),_(tt),ae(!1)}}},[l,R,ce,k,b,y,yt,p,jt,ot]),ds=N.useCallback(()=>{P(null),_(null),ba()},[ba]),Ee=N.useCallback(()=>{if(l)if(b){const _e=R.repoName||gr(R.repoPath),Pe=y?`${y}/${_e}`:_e;o(`/studio/sources/${l}?rootId=${b}&path=${encodeURIComponent(Pe)}`)}else Ut.current?o(`/studio/sources/${l}?rootId=${Ut.current}`):o(`/studio/sources/${l}`)},[l,o,b,y,R.repoPath,R.repoName]),qa=N.useMemo(()=>E===1?!!R.repoPath:E===2?I:E===3?pe:!1,[E,R.repoPath,I,pe]),Gt=N.useMemo(()=>{if(!d)return[];const _e=[{label:d.id===vr?n("sources.library.default_cloud_name"):d.name,to:`/studio/sources/${d.id}`}];if(b&&(_e.push({label:g||b,to:`/studio/sources/${d.id}?rootId=${b}`}),y)){const Pe=y.split("/").filter(Boolean);for(const[tt,Ht]of Pe.entries()){const $t=Pe.slice(0,tt+1).join("/");_e.push({label:Ht,to:`/studio/sources/${d.id}?rootId=${b}&path=${encodeURIComponent($t)}`})}}return _e.push({label:n("sources.import.title")}),_e},[d,b,g,y,n]);if(!d)return f.jsxDEV("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxDEV("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:338,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:337,columnNumber:7},this);const Wt=E===4,ea=E===3&&!!Te&&!se,Sa=E<=2;return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsxDEV("div",{className:"shrink-0",children:f.jsxDEV(El,{segments:Gt},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:350,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:349,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsxDEV(Fn,{active:E>=1,current:E===1},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:355,columnNumber:9},this),f.jsxDEV("span",{className:E===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.select")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:356,columnNumber:9},this),f.jsxDEV(li,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:359,columnNumber:9},this),f.jsxDEV(Fn,{active:E>=2,current:E===2},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:360,columnNumber:9},this),f.jsxDEV("span",{className:E===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.version")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:361,columnNumber:9},this),f.jsxDEV(li,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:364,columnNumber:9},this),f.jsxDEV(Fn,{active:E>=3,current:E===3},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:365,columnNumber:9},this),f.jsxDEV("span",{className:E===3?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.loading")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:366,columnNumber:9},this),f.jsxDEV(li,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:369,columnNumber:9},this),f.jsxDEV(Fn,{active:E>=4,current:E===4},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:370,columnNumber:9},this),f.jsxDEV("span",{className:E===4?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.confirm")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:371,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:354,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:Je?f.jsxDEV(f.Fragment,{children:[E===1&&f.jsxDEV(L3,{rpc:yt,selectedPath:R.repoPath,onSelect:qt,allowedPaths:ra,importedPaths:Ct},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:383,columnNumber:15},this),E===2&&f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:f.jsxDEV(zw,{refs:H,loading:K,error:J,selectedRef:ce,commit:k,onRefChange:de,onCommitChange:G,onValidChange:be,onRetry:Xe,onBranchSwitch:xt},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:393,columnNumber:17},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:392,columnNumber:15},this),E===3&&f.jsxDEV(Lw,{stages:ye,currentStage:te,completedStages:ne,failedStage:Te,progress:fe,failedError:S,logs:we},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:408,columnNumber:15},this),E===4&&f.jsxDEV(Hw,{repoName:R.repoName||gr(R.repoPath),repoIdentifier:R.repoPath,branch:ce,commit:k,packages:R.packages,mdFiles:R.mdFiles,importing:!1,completed:pe},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:419,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:381,columnNumber:11},this):f.jsxDEV(Cw,{libraryName:d.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:379,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:377,columnNumber:7},this),Je&&f.jsxDEV(f.Fragment,{children:Wt?f.jsxDEV("div",{className:"mt-3 flex shrink-0 justify-end sm:mt-6",children:f.jsxDEV("button",{onClick:Ee,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("sources.import.done")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:439,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:438,columnNumber:13},this):ea?f.jsxDEV("div",{className:"mt-3 flex shrink-0 justify-end gap-2 sm:mt-6",children:[f.jsxDEV("button",{onClick:()=>{x(2),P(null),_(null),he([]),ct.current=null,ue(null),lt([])},className:"rounded border border-c4a-border-default px-4 py-2 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:n("sources.import.back")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:448,columnNumber:15},this),f.jsxDEV("button",{onClick:ds,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("sources.import.retry")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:462,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:447,columnNumber:13},this):Sa?f.jsxDEV(Ug,{step:E,totalSteps:4,importing:se,stepBusy:K||E===3&&se,canProceed:qa,safetyNoticeKey:"sources.safety.notice.repo",confirmLabelKey:"sources.import.step.confirm",onPrev:()=>x(_e=>_e-1),onNext:()=>{E===2?ba():x(_e=>_e+1)},onImport:ba},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:470,columnNumber:13},this):null},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:436,columnNumber:9},this),S&&E!==3&&f.jsxDEV(pi,{onClose:()=>_(null),className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxDEV("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-error",children:n("sources.import.error_title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:497,columnNumber:11},this),f.jsxDEV("p",{className:"mt-3 whitespace-pre-wrap break-all text-sm text-c4a-text-secondary",children:S},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:500,columnNumber:11},this),f.jsxDEV("div",{className:"mt-6 flex justify-end",children:f.jsxDEV("button",{onClick:()=>_(null),className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("common.confirm")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:504,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:503,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:493,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRepo.tsx",lineNumber:348,columnNumber:5},this)}const w4=(n,o)=>{let l=0,c=0,u=0;const d=[],p=b=>{for(const g of b)if(g.type==="directory")c++,g.is_git_repo&&u++,g.children&&p(g.children);else if(l++,/\.md$/i.test(g.name)){const y=g.path.startsWith(o)?g.path.slice(o.length).replace(/^\//,""):g.name;d.push(y)}};return p(n),{files:l,dirs:c,gitRepos:u,mdFiles:d}};function G3({rpc:n,selectedPath:o,onSelect:l,allowedPaths:c,importedPaths:u}){const{t:d}=Ie(),{atRoot:p,currentPath:b,entries:g,loading:y,error:E,homeDir:x,goToOpen:S,isWildcard:_,importedSet:R,dirs:z,files:H,loadTree:Y,handleNavigateUp:K,setGoToOpen:Z}=Mw({rpc:n,allowedPaths:c??[],importedPaths:u??[]}),J=N.useCallback(k=>{if(k.type!=="directory"||R.has(k.path))return;const G=w4(k.children||[],k.path);l(k.path,k.name,G),Y(k.path)},[l,Y,R]);N.useEffect(()=>{if(b&&!p&&g.length>=0&&!y){const k=b.split("/").pop()||b,G=w4(g,b);l(b,k,G)}},[b,p,g,y,l]);const ee=N.useMemo(()=>o?o.split("/").pop()||o:"",[o]),ce=N.useMemo(()=>z.sort((k,G)=>k.is_git_repo&&!G.is_git_repo?-1:!k.is_git_repo&&G.is_git_repo?1:k.name.localeCompare(G.name)),[z]),de=N.useMemo(()=>H.sort((k,G)=>k.name.localeCompare(G.name)),[H]);return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV("div",{className:"flex items-center justify-between gap-4",children:[p?f.jsxDEV("p",{className:"flex items-center gap-1.5 font-mono text-xs text-c4a-text-muted",children:[f.jsxDEV("span",{children:d("sources.import.allowed_dirs")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:134,columnNumber:13},this),f.jsxDEV(Aw,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:135,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:133,columnNumber:11},this):f.jsxDEV("p",{className:"min-w-0 truncate font-mono text-xs text-c4a-text-muted",children:b},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:138,columnNumber:11},this),o?f.jsxDEV("p",{className:"flex shrink-0 items-center gap-2 font-mono text-xs text-c4a-accent",children:[f.jsxDEV(Qs,{size:12},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:144,columnNumber:13},this),f.jsxDEV("span",{children:ee},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:145,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:143,columnNumber:11},this):_&&p?f.jsxDEV("button",{onClick:()=>Z(!0),className:"flex shrink-0 items-center gap-1.5 rounded border border-c4a-accent/40 bg-c4a-accent/10 px-2.5 py-1 text-xs text-c4a-accent transition-colors hover:bg-c4a-accent/20",children:d("sources.import.wildcard_goto")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:148,columnNumber:11},this):null]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:131,columnNumber:7},this),f.jsxDEV("hr",{className:"my-3 border-c4a-border-subtle"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:157,columnNumber:7},this),p?_?f.jsxDEV("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:x&&f.jsxDEV("button",{onClick:()=>Y(x),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV(Qs,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:168,columnNumber:17},this),f.jsxDEV("span",{className:"truncate",children:[x,f.jsxDEV("span",{className:"ml-1.5 text-c4a-text-muted",children:["(",d("sources.import.wildcard_home"),")"]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:171,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:169,columnNumber:17},this),f.jsxDEV(ts,{size:12,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:175,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:164,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:162,columnNumber:11},this):f.jsxDEV("div",{className:"min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:c.map(k=>f.jsxDEV("button",{onClick:()=>Y(k),className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV(Qs,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:188,columnNumber:17},this),f.jsxDEV("span",{className:"truncate",children:k},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:189,columnNumber:17},this),f.jsxDEV(ts,{size:12,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:190,columnNumber:17},this)]},k,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:183,columnNumber:15},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:181,columnNumber:11},this):E&&!y?f.jsxDEV("p",{className:"py-4 text-xs text-c4a-error",children:E},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:199,columnNumber:9},this):f.jsxDEV("div",{className:"relative min-h-[5rem] min-h-0 flex-1 c4a-scrollbar overflow-y-auto",children:[y&&f.jsxDEV("div",{className:"absolute inset-0 z-10 flex items-center justify-center bg-c4a-bg-surface/60",children:f.jsxDEV(Us,{size:14,className:"animate-spin text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:204,columnNumber:15},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:203,columnNumber:13},this),b!=="/"&&f.jsxDEV("button",{onClick:K,disabled:y,className:"flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm text-c4a-text-secondary hover:bg-c4a-bg-hover disabled:pointer-events-none",children:[f.jsxDEV(Qs,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:213,columnNumber:15},this),f.jsxDEV("span",{children:".."},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:214,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:208,columnNumber:13},this),ce.map(k=>{const G=R.has(k.path),I=k.is_git_repo?sm:Qs;return f.jsxDEV("button",{onClick:()=>J(k),disabled:G||y,className:`flex w-full items-center gap-2 rounded pl-2 pr-4 py-1.5 text-left text-sm transition-colors ${G?"cursor-not-allowed text-c4a-accent/60":o===k.path?"bg-c4a-accent/10 text-c4a-accent":"text-c4a-text-secondary hover:bg-c4a-bg-hover"}`,children:[f.jsxDEV(I,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:234,columnNumber:15},this),f.jsxDEV("span",{className:"flex-1 truncate",children:k.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:235,columnNumber:15},this),G&&f.jsxDEV("span",{className:"rounded bg-c4a-accent/10 px-1.5 py-0.5 font-mono text-[10px] text-c4a-accent/60",children:d("sources.import.already_imported")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:237,columnNumber:17},this),f.jsxDEV(ts,{size:12,className:"shrink-0 text-c4a-text-muted"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:241,columnNumber:15},this)]},k.path,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:222,columnNumber:13},this)}),de.map(k=>f.jsxDEV("div",{className:"flex w-full items-center gap-2 pl-2 pr-4 py-1.5 text-sm text-c4a-text-muted",children:[f.jsxDEV(xw,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:254,columnNumber:15},this),f.jsxDEV("span",{className:"truncate",children:k.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:255,columnNumber:15},this)]},k.path,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:250,columnNumber:13},this)),g.length===0&&!y&&f.jsxDEV("p",{className:"py-4 text-center text-xs text-c4a-text-muted",children:d("sources.import.no_entries")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:260,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:201,columnNumber:9},this),f.jsxDEV(Vw,{open:S,onClose:()=>Z(!1),rpc:n,onNavigate:Y,defaultPath:x??void 0},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:268,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepSelectDir.tsx",lineNumber:130,columnNumber:5},this)}const P3=new Set(["package.json","pyproject.toml","setup.py","go.mod","cargo.toml","pom.xml","build.gradle"]),F3=n=>{let o=0,l=0,c=0,u=0,d=0;const p=new Set;for(const b of n)if(b.type==="directory")l++,b.is_git_repo&&d++;else{o++,b.path.toLowerCase().endsWith(".md")&&u++;const y=b.path.split("/").pop();if(y&&P3.has(y.toLowerCase())){const E=b.path.split("/").slice(0,-1).join("/");n.some(S=>S.type==="directory"&&S.is_git_repo&&(E===S.path||E.startsWith(`${S.path}/`)))||p.add(E)}}return c=p.size,{totalFiles:o,totalDirs:l,codePackages:c,docFiles:u,gitRepos:d}};function X3({dirPath:n,rpc:o,importing:l,onScanComplete:c,onBusyChange:u}){const{t:d}=Ie(),[p,b]=N.useState(!1),[g,y]=N.useState(null),[E,x]=N.useState(null),S=N.useCallback(async()=>{b(!0),u?.(!0),y(null),x(null);try{const _=await o("fs/dirScan",{path:n}),R=_.entries||[],z=_.manifests||[],H=F3(R);x(H),c(R,H,z)}catch(_){const R=_ instanceof Error?_.message:String(_);y(R)}finally{b(!1),u?.(!1)}},[n,o,c,u]);return N.useEffect(()=>{S()},[S]),f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col rounded border border-c4a-border-subtle bg-c4a-bg-surface p-6",children:[f.jsxDEV("p",{className:"shrink-0 font-mono text-xs text-c4a-text-muted",children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:125,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 shrink-0 border-t border-c4a-border-subtle"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:126,columnNumber:7},this),f.jsxDEV("div",{className:"c4a-scrollbar min-h-0 flex-1 overflow-y-auto",children:[p&&f.jsxDEV("div",{className:"mt-6 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-4",children:[f.jsxDEV(Us,{size:14,className:"animate-spin text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:131,columnNumber:11},this),f.jsxDEV("p",{className:"font-mono text-xs text-c4a-accent",children:d("sources.import.dir_scanning")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:132,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:130,columnNumber:9},this),g&&f.jsxDEV("div",{className:"mt-6",children:[f.jsxDEV("p",{className:"flex items-start gap-2 text-xs text-c4a-error",children:[f.jsxDEV(yw,{size:14,className:"mt-0.5 shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:141,columnNumber:13},this),d("sources.import.dir_scan_error")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:140,columnNumber:11},this),f.jsxDEV("p",{className:"mt-1 text-xs text-c4a-text-muted",children:g},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:144,columnNumber:11},this),f.jsxDEV("button",{onClick:S,className:"mt-3 flex items-center gap-1.5 rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:[f.jsxDEV(yT,{size:12},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:149,columnNumber:13},this),d("sources.import.dir_scan_retry")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:145,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:139,columnNumber:9},this),E&&!p&&!g&&f.jsxDEV("div",{className:"mt-6 space-y-3",children:[f.jsxDEV("p",{className:"font-mono text-sm uppercase text-c4a-accent",children:[d("sources.import.dir_scan_complete"),"!"]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:157,columnNumber:11},this),f.jsxDEV("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-3 lg:grid-cols-5",children:[f.jsxDEV(Eo,{icon:f.jsxDEV(xr,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:163,columnNumber:21},this),label:d("sources.import.dir_doc_files"),value:E.docFiles,tooltip:d("sources.import.dir_doc_files_tip"),size:"lg"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:162,columnNumber:13},this),f.jsxDEV(Eo,{icon:f.jsxDEV(vl,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:170,columnNumber:21},this),label:d("sources.import.dir_code_packages"),value:E.codePackages,tooltip:d("sources.import.dir_code_packages_tip"),size:"lg"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:169,columnNumber:13},this),E.gitRepos>0&&f.jsxDEV(Eo,{icon:f.jsxDEV(sm,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:178,columnNumber:23},this),label:d("sources.import.dir_git_repos"),value:E.gitRepos,size:"lg"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:177,columnNumber:15},this),f.jsxDEV(Eo,{icon:f.jsxDEV(Qs,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:185,columnNumber:21},this),label:d("sources.import.dir_total_dirs"),value:E.totalDirs,size:"lg"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:184,columnNumber:13},this),f.jsxDEV(Eo,{icon:f.jsxDEV(Hj,{size:14},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:191,columnNumber:21},this),label:d("sources.import.dir_total_files"),value:E.totalFiles,size:"lg"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:190,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:161,columnNumber:11},this),E.gitRepos>0&&f.jsxDEV("p",{className:"text-xs text-c4a-warning",children:d("sources.import.dir_git_skip_hint",{count:E.gitRepos})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:199,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:156,columnNumber:9},this),l&&f.jsxDEV("div",{className:"mt-4 flex items-center justify-center gap-2 rounded bg-c4a-bg-base p-3",children:[f.jsxDEV(Us,{size:14,className:"animate-spin text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:209,columnNumber:11},this),f.jsxDEV("p",{className:"font-mono text-xs text-c4a-accent",children:d("sources.import.importing")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:210,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:208,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:128,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepScanDir.tsx",lineNumber:124,columnNumber:5},this)}function Q3(){const{t:n}=Ie(),o=_o(),{libId:l}=Nu(),u=za(mi(wl)).find(G=>G.id===l),d=om(G=>G.createSource),[p,b]=N.useState(1),[g,y]=N.useState(!1),[E,x]=N.useState(null),[S,_]=N.useState(!1),[R,z]=N.useState({dirPath:"",dirName:"",fileCount:0,subDirCount:0,gitRepoCount:0,mdFiles:[],scanEntries:[],scanStats:null,manifests:[]}),H=u?.is_online??!1,{rpc:Y,importedPaths:K,allowedPaths:Z}=jw(l,u),J=N.useCallback((G,I,be)=>{z(se=>({...se,dirPath:G,dirName:I,fileCount:be.files,subDirCount:be.dirs,gitRepoCount:be.gitRepos,mdFiles:be.mdFiles}))},[]),ee=N.useCallback((G,I,be)=>{z(se=>({...se,scanEntries:G,scanStats:I,manifests:be}))},[]),ce=N.useCallback(async()=>{if(l){y(!0);try{const G=await d({library_id:l,dir_files:R.scanEntries,dir_name:R.dirName,dir_path:R.dirPath,dir_file_contents:R.manifests}),I=Array.isArray(G)?G[0]:G;I?.id?o(`/studio/sources/${l}?rootId=${I.id}`):o(`/studio/sources/${l}`)}catch(G){const I=G instanceof Error?G.message:String(G);x(I),y(!1)}}},[l,R,d,o]),de=N.useMemo(()=>p===1?!!R.dirPath:p===2?R.scanEntries.length>0:!0,[p,R]),k=N.useMemo(()=>u?[{label:u.id===vr?n("sources.library.default_cloud_name"):u.name,to:`/studio/sources/${u.id}`},{label:n("sources.import.dir_title")}]:[],[u,n]);return u?f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsxDEV("div",{className:"shrink-0",children:f.jsxDEV(El,{segments:k},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:146,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:145,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsxDEV(Fn,{active:p>=1,current:p===1},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:151,columnNumber:9},this),f.jsxDEV("span",{className:p===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.select")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:152,columnNumber:9},this),f.jsxDEV(li,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:155,columnNumber:9},this),f.jsxDEV(Fn,{active:p>=2,current:p===2},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:156,columnNumber:9},this),f.jsxDEV("span",{className:p===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.dir_step.confirm")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:157,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:150,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:H?f.jsxDEV(f.Fragment,{children:[p===1&&f.jsxDEV(G3,{rpc:Y,selectedPath:R.dirPath,onSelect:J,allowedPaths:Z,importedPaths:K},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:169,columnNumber:15},this),p===2&&f.jsxDEV(X3,{dirPath:R.dirPath,rpc:Y,importing:g,onScanComplete:ee,onBusyChange:_},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:178,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:167,columnNumber:11},this):f.jsxDEV(Cw,{libraryName:u.name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:165,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:163,columnNumber:7},this),H&&f.jsxDEV(Ug,{step:p,totalSteps:2,importing:g,stepBusy:S,canProceed:de,safetyNoticeKey:"sources.safety.notice.dir",confirmLabelKey:"sources.import.dir_step.confirm",onPrev:()=>b(G=>G-1),onNext:()=>b(G=>G+1),onImport:ce},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:192,columnNumber:9},this),E&&f.jsxDEV(pi,{onClose:()=>x(null),className:"mx-4 w-full max-w-md rounded border border-c4a-border-default bg-c4a-bg-elevated p-6 shadow-c4a-lg",children:[f.jsxDEV("h3",{className:"font-mono text-sm font-bold uppercase text-c4a-error",children:n("sources.import.error_title")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:211,columnNumber:11},this),f.jsxDEV("p",{className:"mt-3 whitespace-pre-wrap break-all text-sm text-c4a-text-secondary",children:E},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:214,columnNumber:11},this),f.jsxDEV("div",{className:"mt-6 flex justify-end",children:f.jsxDEV("button",{onClick:()=>x(null),className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("common.confirm")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:218,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:217,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:207,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:144,columnNumber:5},this):f.jsxDEV("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxDEV("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:138,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportDir.tsx",lineNumber:137,columnNumber:7},this)}const Z3=/^https:\/\/[^/]+\/.+/;function J3({url:n,onUrlChange:o,onValidChange:l,onRefHint:c}){const{t:u}=Ie(),[d,p]=N.useState(null),[b,g]=N.useState([]),y=N.useRef(null);N.useEffect(()=>{Yt.get("/import/remote/git-hosts").then(_=>g(_.hosts),()=>{})},[]);const E=N.useCallback(_=>{if(!_){p(null),l(!1);return}const R=z3(_),z=R.repoUrl!==_.trim(),H=z?R.repoUrl:_;z&&(o(H),c?.(R.ref,R.commit)),Z3.test(H)?(p(null),l(!0)):(p(u("sources.import_remote.url_invalid")),l(!1))},[o,l,c,u]),x=N.useCallback(_=>{const R=_.target.value;o(R),y.current&&clearTimeout(y.current),y.current=setTimeout(()=>E(R),500)},[o,E]),S=N.useCallback(_=>{_.preventDefault();const R=_.clipboardData.getData("text").trim();o(R),y.current&&clearTimeout(y.current),E(R)},[o,E]);return N.useEffect(()=>()=>{y.current&&clearTimeout(y.current)},[]),N.useEffect(()=>{n&&E(n)},[]),f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col items-center justify-center rounded border border-c4a-border-subtle bg-c4a-bg-surface px-6 py-10",children:f.jsxDEV("div",{className:"w-full max-w-xl space-y-5",children:[f.jsxDEV("input",{type:"text",value:n,onChange:x,onPaste:S,placeholder:u("sources.import_remote.url_placeholder"),className:"w-full rounded-md border border-c4a-border-default bg-c4a-bg-surface px-4 py-3 text-center font-mono text-base font-semibold text-c4a-accent placeholder:font-normal placeholder:text-c4a-text-muted focus:border-c4a-accent focus:outline-none",autoFocus:!0},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:88,columnNumber:9},this),f.jsxDEV("div",{className:"h-14 text-center text-sm leading-relaxed text-c4a-text-muted",children:d?f.jsxDEV("p",{className:"flex items-center justify-center gap-1.5 text-red-400",children:[f.jsxDEV(fi,{size:14,className:"shrink-0"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:101,columnNumber:15},this),d]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:100,columnNumber:13},this):f.jsxDEV(f.Fragment,{children:[f.jsxDEV("p",{children:b.length>0?f.jsxDEV(f.Fragment,{children:[u("sources.import_remote.url_hint_public"),b.map((_,R)=>f.jsxDEV("span",{children:[R>0&&"、",f.jsxDEV("span",{className:"font-mono font-medium text-c4a-accent",children:_},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:113,columnNumber:25},this)]},_,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:111,columnNumber:23},this))]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:108,columnNumber:19},this):u("sources.import_remote.url_hint_no_auth")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:106,columnNumber:15},this),f.jsxDEV("p",{className:"mt-1 text-c4a-text-muted/60",children:u("sources.import_remote.url_hint_format")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:121,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:105,columnNumber:13},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:98,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:87,columnNumber:7},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/importSteps/StepUrlInput.tsx",lineNumber:86,columnNumber:5},this)}const E4=["prepare","clone","scan","save"],If={prepare:"sources.import.stage.prepare",clone:"sources.import.stage.clone",scan:"sources.import.stage.scan",save:"sources.import.stage.save"};function K3(n,o,l){if(n instanceof ii){const c=n.message.toLowerCase();if(n.status===503)return l("sources.import_remote.error.capacity");if(c.includes("connect")||c.includes("connectionrefused")||c.includes("unavailable")||c.includes("econnrefused"))return l("sources.import_remote.error.network");if(c.includes("authentication")||c.includes("token")||c.includes("credential")||c.includes("401")||c.includes("403"))try{const u=new URL(o).hostname;return l("sources.import_remote.error.auth_required",{host:u})}catch{return l("sources.import_remote.error.auth_required",{host:o})}return c.includes("not found")||c.includes("404")||c.includes("does not exist")?l("sources.import_remote.error.not_found"):n.message||l("sources.import_remote.error.network")}return n instanceof TypeError&&n.message.includes("fetch")?l("sources.import_remote.error.network"):n instanceof Error?n.message:l("sources.import_remote.error.network")}function W3(n){return n==="cloning"?"clone":n==="detecting"||n==="extracting"?"scan":n==="saving"?"save":n}function eO(){const{t:n}=Ie(),o=_o(),{libId:l}=Nu(),[c]=tm(),u=c.get("url")||"",d=c.get("ref")||"",p=c.get("sourceUuid")||"",b=c.get("parentId")||"",g=c.get("parentName")||"",y=c.get("parentPath")||"",x=za(mi(wl)).find(ke=>ke.id===l),[S,_]=N.useState(new Set),R=N.useCallback(async()=>{if(l)try{const ke=new Set;if(b){const A=(await Yt.get(`/sources/${b}`)).tree??[];let O=y===""?A:[];if(y){const B=(oe,Ne)=>{for(const le of oe){if(le.path===Ne)return le.children??[];if(le.children){const $e=B(le.children,Ne);if($e.length>0)return $e}}return[]};O=B(A,y)}for(const B of O)ke.add(B.name.toLowerCase())}else{const w=await Yt.get("/sources",{library_id:l});for(const A of w.items)ke.add(A.name.toLowerCase())}_(ke)}catch{}},[l,b,y]);N.useEffect(()=>{R()},[R]);const[z,H]=N.useState(u?2:1),[Y,K]=N.useState(u),[Z,J]=N.useState(!!u),[ee,ce]=N.useState(d),[de,k]=N.useState(""),[G,I]=N.useState(!!d),[be,se]=N.useState(""),ae=N.useRef(void 0),pe=N.useRef(void 0),[De,te]=N.useState(null),[ue,ne]=N.useState(!1),[he,Te]=N.useState(null),[P,fe]=N.useState(!1),[Re,we]=N.useState(!1),[lt,Ut]=N.useState(null),[Je,yt]=N.useState(null),[Ct,ra]=N.useState(null),[ye,ot]=N.useState(null),[ct,jt]=N.useState([]),[qt,Xe]=N.useState(null),[xt,ba]=N.useState([]),ds=N.useRef(null),Ee=N.useRef(""),qa=N.useMemo(()=>E4.map(ke=>({key:ke,label:If[ke]?n(If[ke]):ke})),[n]),Gt=N.useCallback(ke=>{ba(w=>[...w,`[${Ow()}] ${ke}`])},[]),Wt=N.useRef(null),ea=N.useCallback(ke=>{const w=Wt.current;w&&w!==ke&&(jt(A=>A.includes(w)?A:[...A,w]),Gt(`${n(If[w]??w)} ${n("sources.import.stage.done_suffix")}`)),Gt(`${n(If[ke]??ke)}...`),Wt.current=ke,ot(ke),Xe(null)},[Gt,n]),Sa=N.useCallback((ke,w)=>{ae.current=ke,pe.current=w},[]),_e=N.useCallback(async ke=>{if(l){ne(!0),Te(null);try{const w=await Yt.post("/import/remote/refs",{library_id:l,url:Y},ke?{signal:ke}:void 0);te(w);const A=w.branches??[],O=w.tags??[],B=[...A,...O];B.length>0&&ce(oe=>{if(oe)return oe;const Ne=ae.current,le=pe.current;if(Ne){const Dt=B.find(ya=>ya.name===Ne);if(Dt)return k(Dt.commit),Dt.name}le&&k(le);const Me=A.find(Dt=>Dt.name===w.default)??A[0];return Me?(le||k(Me.commit),Me.name):oe})}catch(w){if(ke?.aborted)return;Te(K3(w,Y,n))}finally{ke?.aborted||ne(!1)}}},[l,Y,n]);N.useEffect(()=>{if(z!==2||!l)return;const ke=new AbortController;return _e(ke.signal),()=>ke.abort()},[z,l,_e]),N.useEffect(()=>P?pn.on("task/progress",w=>{const A=w,O=W3(A.stage??"");O&&E4.includes(O)&&Xe({percent:A.percent??-1,label:A.label??""})}):void 0,[P]);const Pe=N.useCallback(async()=>{if(l){fe(!0),we(!1),yt(null),ra(null),jt([]),Wt.current=null,ot(null),Xe(null),ba([]),H(3);try{ea("prepare"),await new Promise($e=>setTimeout($e,300)),ea("clone");const ke=gr(Y),w=be||ke,A=y?`${y}/${w}`:w,O=await Yt.post("/import/remote/clone",{library_id:l,url:Y,ref:ee,...de?{commit:de}:{},repo_name:A});Ee.current=O.commit_hash,ea("scan");const B=await Yt.post("/import/remote/scan",{library_id:l,path:O.path,hash:O.commit_hash});ea("save");const oe=await Yt.post("/import/remote/import",{library_id:l,url:Y,ref:ee,commit:O.commit_hash,repo_name:A,dir_name:w,repo_files:B.files.map($e=>$e.path),repo_file_contents:B.manifests,...p?{source_uuid:p}:{},...b?{parent_source_id:b,parent_path:y}:{}});jt(["prepare","clone","scan","save"]),Wt.current=null,ot(null),Gt(`${n("sources.import.stage.save")} ${n("sources.import.stage.done_suffix")}`),Gt(n("sources.import.stage.complete"));const{packages:Ne,mdFiles:le}=Tw(B.manifests,B.files,ke);Ut({packages:Ne,mdFiles:le}),we(!0),fe(!1),ds.current=oe.id,H(4)}catch(ke){const w=Wt.current??"prepare";ra(w),Wt.current=null,ot(null);let A;ke instanceof ii||ke instanceof Error?A=ke.message:A=String(ke),Gt(`ERROR: ${A}`),yt(A),fe(!1)}}},[l,Y,ee,de,be,p,b,y,ea,Gt]),tt=N.useCallback(()=>{ra(null),yt(null),Pe()},[Pe]),Ht=N.useCallback(()=>{if(l)if(b){const ke=gr(Y),w=be||ke,A=y?`${y}/${w}`:w;o(`/studio/sources/${l}?rootId=${b}&path=${encodeURIComponent(A)}`)}else ds.current?o(`/studio/sources/${l}?rootId=${ds.current}`):o(`/studio/sources/${l}`)},[l,o,b,y,be,Y]),$t=(be||gr(Y)).toLowerCase(),ta=S.has($t),ga=N.useMemo(()=>z===1?Z:z===2?G&&!ta:!1,[z,Z,G,ta]),wa=N.useMemo(()=>{if(!x)return[];const ke=[{label:x.id===vr?n("sources.library.default_cloud_name"):x.name,to:`/studio/sources/${x.id}`}];if(b&&(ke.push({label:g||b,to:`/studio/sources/${x.id}?rootId=${b}`}),y)){const w=y.split("/").filter(Boolean);for(const[A,O]of w.entries()){const B=w.slice(0,A+1).join("/");ke.push({label:O,to:`/studio/sources/${x.id}?rootId=${b}&path=${encodeURIComponent(B)}`})}}return ke.push({label:n("sources.import_remote.title")}),ke},[x,b,g,y,n]);if(!x)return f.jsxDEV("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxDEV("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:428,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:427,columnNumber:7},this);const ja=z===4&&Re,ia=z===3&&!!Ct&&!P,fs=z<=2;return f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col p-4 md:p-6",children:[f.jsxDEV("div",{className:"shrink-0",children:f.jsxDEV(El,{segments:wa},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:440,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:439,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 flex shrink-0 items-center gap-2 font-mono text-sm sm:mt-6 md:gap-3",children:[f.jsxDEV(Fn,{active:z>=1,current:z===1},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:445,columnNumber:9},this),f.jsxDEV("span",{className:z===1?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.select")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:446,columnNumber:9},this),f.jsxDEV(li,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:449,columnNumber:9},this),f.jsxDEV(Fn,{active:z>=2,current:z===2},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:450,columnNumber:9},this),f.jsxDEV("span",{className:z===2?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.version")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:451,columnNumber:9},this),f.jsxDEV(li,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:454,columnNumber:9},this),f.jsxDEV(Fn,{active:z>=3,current:z===3},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:455,columnNumber:9},this),f.jsxDEV("span",{className:z===3?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.loading")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:456,columnNumber:9},this),f.jsxDEV(li,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:459,columnNumber:9},this),f.jsxDEV(Fn,{active:z>=4,current:z===4},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:460,columnNumber:9},this),f.jsxDEV("span",{className:z===4?"text-c4a-accent":"text-c4a-text-muted",children:n("sources.import.step.confirm")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:461,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:444,columnNumber:7},this),f.jsxDEV("div",{className:"mt-3 flex min-h-0 flex-1 flex-col sm:mt-6",children:[z===1&&f.jsxDEV(J3,{url:Y,onUrlChange:K,onValidChange:J,onRefHint:Sa},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:469,columnNumber:11},this),z===2&&l&&f.jsxDEV("div",{className:"flex min-h-0 flex-1 flex-col gap-4",children:[f.jsxDEV(zw,{refs:De,loading:ue,error:he,selectedRef:ee,commit:de,onRefChange:ce,onCommitChange:k,onValidChange:I,onRetry:()=>_e()},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:478,columnNumber:13},this),!ue&&De&&f.jsxDEV("div",{className:"rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:[f.jsxDEV("label",{className:"block font-mono text-xs uppercase tracking-tight text-c4a-text-secondary",children:n("sources.import.dir_name")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:491,columnNumber:17},this),f.jsxDEV("input",{type:"text",value:be,onChange:ke=>se(ke.target.value),placeholder:gr(Y),className:`mt-2 w-full rounded border bg-c4a-bg-surface px-3 py-2 font-mono text-sm text-c4a-accent placeholder:text-c4a-text-muted focus:outline-none ${ta?"border-red-400 focus:border-red-400":"border-c4a-border-default focus:border-c4a-accent"}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:494,columnNumber:17},this),ta?f.jsxDEV("p",{className:"mt-1.5 text-xs text-red-400",children:n("sources.import.dir_name_duplicate")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:506,columnNumber:19},this):f.jsxDEV("p",{className:"mt-1.5 text-xs text-c4a-text-muted",children:n("sources.import.dir_name_hint")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:510,columnNumber:19},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:490,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:477,columnNumber:11},this),z===3&&f.jsxDEV(Lw,{stages:qa,currentStage:ye,completedStages:ct,failedStage:Ct,progress:qt,failedError:Je,logs:xt},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:519,columnNumber:11},this),z===4&&f.jsxDEV(Hw,{repoName:gr(Y),repoIdentifier:Y,branch:ee,commit:Ee.current,packages:lt?.packages??[],mdFiles:lt?.mdFiles??[],importing:!1,completed:Re},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:530,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:467,columnNumber:7},this),ja?f.jsxDEV("div",{className:"mt-3 flex shrink-0 justify-end sm:mt-6",children:f.jsxDEV("button",{onClick:Ht,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("sources.import.done")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:546,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:545,columnNumber:9},this):ia?f.jsxDEV("div",{className:"mt-3 flex shrink-0 justify-end gap-2 sm:mt-6",children:[f.jsxDEV("button",{onClick:()=>{H(2),ra(null),yt(null),jt([]),Wt.current=null,ot(null),ba([])},className:"rounded border border-c4a-border-default px-4 py-2 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:n("sources.import.back")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:555,columnNumber:11},this),f.jsxDEV("button",{onClick:tt,className:"rounded bg-c4a-accent px-4 py-2 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("sources.import.retry")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:569,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:554,columnNumber:9},this):fs?f.jsxDEV(Ug,{step:z,totalSteps:2,importing:!1,stepBusy:ue,canProceed:ga,safetyNoticeKey:"sources.safety.notice.remote",confirmLabelKey:"common.next",onPrev:()=>H(ke=>ke-1),onNext:()=>H(ke=>ke+1),onImport:Pe},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:577,columnNumber:9},this):null]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/ImportRemoteRepo.tsx",lineNumber:438,columnNumber:5},this)}function tO(){const{t:n}=Ie(),o=_o(),l=za(S=>S.createLibrary),[c,u]=N.useState("waiting"),[d,p]=N.useState(null),[b,g]=N.useState(""),[y,E]=N.useState(!1);N.useEffect(()=>pn.on("ws:daemon:connected",_=>{const R=_;p(R),g(R.machine_id),u(R.needs_registration?"new_client":"reconnected")}),[]),N.useEffect(()=>{let S=!1;return(async()=>{try{const _=await Yt.get("/daemons/pending");if(S||_.pending.length===0)return;const R=_.pending[0];p({machine_id:R.machine_id,needs_registration:!0}),g(R.machine_id),u("new_client")}catch{}})(),()=>{S=!0}},[]);const x=N.useCallback(async()=>{if(d){E(!0);try{const S=await l({type:"daemon",name:b||d.machine_id,config:{machine_id:d.machine_id,os:d.os||"",daemon_version:d.daemon_version||""}});o(`/studio/sources/${S.id}`)}catch{E(!1)}}},[d,b,l,o]);return f.jsxDEV("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsxDEV(El,{segments:[{label:n("sources.add_client.title")}]},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:86,columnNumber:7},this),f.jsxDEV("p",{className:"mt-4 text-sm text-c4a-text-secondary",children:n("sources.add_client.description")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:90,columnNumber:7},this),f.jsxDEV("div",{className:"mt-6 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-5",children:f.jsxDEV("ol",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[f.jsxDEV("li",{children:[f.jsxDEV("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["1. ",n("sources.add_client.step1")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:98,columnNumber:13},this),f.jsxDEV("pre",{className:"mt-1 flex items-center gap-1.5 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:["npm install -g @c4a/daemon ",f.jsxDEV(ag,{text:"npm install -g @c4a/daemon"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:102,columnNumber:42},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:101,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:97,columnNumber:11},this),f.jsxDEV("li",{children:[f.jsxDEV("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["2. ",n("sources.add_client.step2")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:106,columnNumber:13},this),f.jsxDEV("pre",{className:"mt-1 flex items-center gap-1.5 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:[`c4a-daemon --server ${window.location.host}`," ",f.jsxDEV(ag,{text:`c4a-daemon --server ${window.location.host}`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:110,columnNumber:63},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:109,columnNumber:13},this),f.jsxDEV("p",{className:"mt-2 text-xs text-c4a-text-muted",children:n("sources.add_client.step2_allow")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:112,columnNumber:13},this),f.jsxDEV("pre",{className:"mt-1 flex items-center gap-1.5 rounded bg-c4a-bg-base px-3 py-2 font-mono text-xs text-c4a-accent",children:[`c4a-daemon --server ${window.location.host} --allow ~/dir1,~/dir2`," ",f.jsxDEV(ag,{text:`c4a-daemon --server ${window.location.host} --allow ~/dir1,~/dir2`},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:116,columnNumber:85},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:115,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:105,columnNumber:11},this),f.jsxDEV("li",{children:[f.jsxDEV("span",{className:"font-mono text-xs font-bold text-c4a-text-primary",children:["3. ",n("sources.add_client.step3")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:120,columnNumber:13},this),f.jsxDEV("p",{className:"mt-1 text-xs text-c4a-text-muted",children:n("sources.add_client.step3_desc")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:123,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:119,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:96,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:95,columnNumber:7},this),f.jsxDEV("div",{className:"mt-6 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-5",children:[c==="waiting"&&f.jsxDEV("div",{className:"flex items-center gap-3",children:[f.jsxDEV(Us,{size:16,className:"animate-spin text-c4a-warning"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:134,columnNumber:13},this),f.jsxDEV("span",{className:"text-sm text-c4a-warning",children:n("sources.add_client.waiting")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:135,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:133,columnNumber:11},this),c==="new_client"&&d&&f.jsxDEV("div",{className:"space-y-4",children:[f.jsxDEV("h3",{className:"font-mono text-sm font-bold text-c4a-accent",children:n("sources.add_client.detected")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:143,columnNumber:13},this),f.jsxDEV("div",{className:"space-y-2 text-sm",children:[f.jsxDEV(sg,{label:n("sources.add_client.machine_name"),value:d.machine_id},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:147,columnNumber:15},this),d.os&&f.jsxDEV(sg,{label:n("sources.add_client.os"),value:d.os},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:152,columnNumber:17},this),d.daemon_version&&f.jsxDEV(sg,{label:n("sources.add_client.daemon_version"),value:d.daemon_version},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:158,columnNumber:17},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:146,columnNumber:13},this),f.jsxDEV("div",{className:"flex items-center gap-2",children:[f.jsxDEV("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n("sources.add_client.client_name")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:165,columnNumber:15},this),f.jsxDEV("input",{value:b,onChange:S=>g(S.target.value),className:"min-w-0 flex-1 rounded border border-c4a-border-default bg-c4a-bg-base px-2 py-1 font-mono text-xs text-c4a-text-primary outline-none focus:border-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:168,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:164,columnNumber:13},this),f.jsxDEV("div",{className:"flex justify-end gap-2 pt-2",children:[f.jsxDEV("button",{onClick:()=>o("/studio/sources"),className:"rounded border border-c4a-border-default px-3 py-1.5 font-mono text-xs text-c4a-text-secondary transition-colors hover:bg-c4a-bg-hover",children:n("common.cancel")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:175,columnNumber:15},this),f.jsxDEV("button",{onClick:x,disabled:y||!b.trim(),className:"flex items-center gap-1.5 rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover disabled:opacity-50",children:[y&&f.jsxDEV(Us,{size:12,className:"animate-spin"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:187,columnNumber:19},this),n("sources.add_client.confirm")]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:181,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:174,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:142,columnNumber:11},this),c==="reconnected"&&d&&f.jsxDEV("div",{className:"space-y-4",children:[f.jsxDEV("div",{className:"flex items-center gap-2",children:[f.jsxDEV(ui,{size:16,className:"text-c4a-success"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:198,columnNumber:15},this),f.jsxDEV("span",{className:"text-sm text-c4a-text-primary",children:n("sources.add_client.reconnected",{name:d.machine_id})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:199,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:197,columnNumber:13},this),d.lib_id&&f.jsxDEV(us,{to:`/studio/sources/${d.lib_id}`,className:"inline-block rounded bg-c4a-accent px-3 py-1.5 font-mono text-xs text-white transition-colors hover:bg-c4a-accent-hover",children:n("sources.add_client.go_to",{name:d.machine_id})},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:206,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:196,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:131,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:85,columnNumber:5},this)}function ag({text:n}){const[o,l]=N.useState(!1),c=N.useCallback(()=>{navigator.clipboard.writeText(n).then(()=>{l(!0),setTimeout(()=>l(!1),1500)})},[n]);return f.jsxDEV("button",{type:"button",onClick:c,className:"shrink-0 rounded p-0.5 text-c4a-accent opacity-60 transition-opacity hover:opacity-100",title:"Copy",children:o?f.jsxDEV(ui,{size:13},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:237,columnNumber:17},this):f.jsxDEV(fg,{size:13},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:237,columnNumber:39},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:231,columnNumber:5},this)}function sg({label:n,value:o}){return f.jsxDEV("div",{className:"flex items-center gap-2",children:[f.jsxDEV("span",{className:"w-32 font-mono text-xs text-c4a-text-muted",children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:245,columnNumber:7},this),f.jsxDEV("span",{className:"font-mono text-xs text-c4a-text-primary",children:o},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:248,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/AddClient.tsx",lineNumber:244,columnNumber:5},this)}function aO(){const{t:n}=Ie(),{sourceUuid:o}=Nu(),[l]=tm(),c=l.get("path")||"",{currentRoot:u,loading:d,fetchRootSource:p}=om(),b=za(mi(wl)),[g,y]=N.useState("original");N.useEffect(()=>{o&&p(o)},[o,p]);const E=N.useMemo(()=>u?c?nm(u.tree,c):u.kind==="source"?{path:"",kind:u.kind,source_type:u.source_type,name:u.name,metadata:u.metadata,index_status:u.index_status}:null:null,[u,c]),x=b.find(Z=>Z.id===u?.library_id),S=E?.metadata,_=S?Object.fromEntries(Object.entries(S).map(([Z,J])=>[Z,String(J??"")])):null,R=E?.source_type==="code",z=E?.name??u?.name??"",H=E?.source_type??null,Y=N.useMemo(()=>{if(!u||!x)return[];const Z=u.kind==="source"&&!c,J=[{label:x.id===vr?n("sources.library.default_cloud_name"):x.name,to:`/studio/sources/${x.id}`},{label:u.name,...Z?{}:{to:`/studio/sources/${x.id}?rootId=${u.id}`}}];if(c){const ee=iu(u.tree,c);for(let ce=0;ce<ee.length-1;ce++){const de=ee[ce];J.push({label:de.name,to:`/studio/sources/${x.id}?rootId=${u.id}&path=${encodeURIComponent(de.path)}`})}ee.length>0&&J.push({label:ee[ee.length-1].name})}return J},[u,x,c,n]),K=[{key:"original",label:n(R?"sources.detail.tab.overview":"sources.detail.tab.original")},{key:"digest",label:n("sources.detail.tab.digest")},{key:"modeling",label:n("sources.detail.tab.modeling")}];return d||!u||!E?f.jsxDEV("div",{className:"flex flex-1 items-center justify-center p-8",children:f.jsxDEV("p",{className:"text-sm text-c4a-text-muted",children:n("common.loading")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:118,columnNumber:9},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:117,columnNumber:7},this):f.jsxDEV("div",{className:"flex flex-1 flex-col p-4 md:p-6",children:[f.jsxDEV(El,{segments:Y},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:125,columnNumber:7},this),f.jsxDEV("div",{className:"mt-4 flex flex-wrap items-baseline gap-x-6 gap-y-2",children:[f.jsxDEV("div",{className:"flex min-w-0 items-center gap-2",children:[R?f.jsxDEV(vl,{size:20,className:"shrink-0 text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:131,columnNumber:13},this):f.jsxDEV(xr,{size:20,className:"shrink-0 text-c4a-accent"},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:133,columnNumber:13},this),f.jsxDEV("h1",{className:"min-w-0 break-all font-mono text-xl font-bold leading-none text-c4a-text-primary",children:z},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:135,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:129,columnNumber:9},this),f.jsxDEV("div",{className:"flex flex-wrap items-baseline gap-4 text-xs text-c4a-text-muted",children:[f.jsxDEV("span",{children:[n("sources.detail.type"),":"," ",f.jsxDEV("span",{className:"text-c4a-text-secondary",children:n(H==="code"?"sources.type.code":"sources.type.doc")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:143,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:141,columnNumber:11},this),R&&_?.relative_path&&f.jsxDEV("span",{children:[n("sources.detail.path"),":"," ",f.jsxDEV("span",{className:"font-mono text-c4a-text-secondary",children:_.relative_path},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:152,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:150,columnNumber:13},this),!R&&f.jsxDEV("span",{children:[n("sources.detail.origin"),":"," ",f.jsxDEV("span",{className:"text-c4a-text-secondary",children:x?.type==="daemon"?n("sources.detail.origin.local"):n("sources.detail.origin.upload")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:160,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:158,columnNumber:13},this),f.jsxDEV("span",{children:[n("sources.detail.status"),":"," ",f.jsxDEV("span",{className:"text-c4a-text-secondary",children:n(`sources.status.${E.index_status??"none"}`)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:169,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:167,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:140,columnNumber:9},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:128,columnNumber:7},this),R&&_&&f.jsxDEV("div",{className:"mt-4 rounded border border-c4a-border-subtle bg-c4a-bg-surface p-4",children:f.jsxDEV("div",{className:"grid grid-cols-2 gap-x-8 gap-y-2 text-xs md:grid-cols-4",children:[_.repo_name&&f.jsxDEV(Yf,{label:n("sources.detail.repo"),value:_.repo_name},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:181,columnNumber:15},this),_.pinned_branch&&f.jsxDEV(Yf,{label:n("sources.detail.branch"),value:_.pinned_branch},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:187,columnNumber:15},this),_.pinned_hash&&f.jsxDEV(Yf,{label:n("sources.detail.commit"),value:_.pinned_hash.slice(0,7)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:193,columnNumber:15},this),_.tech_stack&&f.jsxDEV(Yf,{label:n("sources.detail.tech_stack"),value:_.tech_stack},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:199,columnNumber:15},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:179,columnNumber:11},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:178,columnNumber:9},this),f.jsxDEV("div",{className:"mt-3 flex border-b border-c4a-border-subtle",children:K.map(Z=>f.jsxDEV("button",{onClick:()=>y(Z.key),className:`border-b-2 px-4 py-2 font-mono text-xs uppercase transition-colors ${g===Z.key?"border-c4a-accent text-c4a-accent":"border-transparent text-c4a-text-muted hover:text-c4a-text-secondary"}`,children:Z.label},Z.key,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:211,columnNumber:11},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:209,columnNumber:7},this),f.jsxDEV("div",{className:"mt-4 flex-1",children:[g==="original"&&f.jsxDEV(sO,{node:E,isCode:R},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:228,columnNumber:11},this),g==="digest"&&f.jsxDEV(D4,{message:n("sources.detail.digest_placeholder")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:231,columnNumber:11},this),g==="modeling"&&f.jsxDEV(D4,{message:n("sources.detail.modeling_placeholder")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:234,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:226,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:124,columnNumber:5},this)}function Yf({label:n,value:o}){return f.jsxDEV("div",{children:[f.jsxDEV("span",{className:"text-c4a-text-muted",children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:246,columnNumber:7},this),f.jsxDEV("p",{className:"mt-0.5 font-mono text-c4a-text-primary",children:o},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:247,columnNumber:7},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:245,columnNumber:5},this)}function sO({node:n,isCode:o}){const{t:l}=Ie(),c=n.metadata;return o?f.jsxDEV("div",{className:"space-y-4 text-sm text-c4a-text-secondary",children:[!!c?.description&&f.jsxDEV("p",{children:String(c.description)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:266,columnNumber:11},this),!!c?.dependencies&&f.jsxDEV("div",{children:[f.jsxDEV("h4",{className:"font-mono text-xs font-bold uppercase text-c4a-text-primary",children:l("sources.detail.dependencies")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:270,columnNumber:13},this),f.jsxDEV("div",{className:"mt-2 rounded bg-c4a-bg-surface p-3 font-mono text-xs",children:Object.entries(c.dependencies).map(([u,d])=>f.jsxDEV("div",{className:"flex justify-between py-0.5",children:[f.jsxDEV("span",{className:"text-c4a-text-primary",children:u},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:278,columnNumber:19},this),f.jsxDEV("span",{className:"text-c4a-text-muted",children:d},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:279,columnNumber:19},this)]},u,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:277,columnNumber:17},this))},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:273,columnNumber:13},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:269,columnNumber:11},this),!c?.description&&!c?.dependencies&&f.jsxDEV("p",{className:"text-c4a-text-muted",children:l("sources.detail.original_code_placeholder")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:286,columnNumber:11},this)]},void 0,!0,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:264,columnNumber:7},this):f.jsxDEV("div",{className:"prose prose-invert max-w-none text-sm text-c4a-text-secondary",children:f.jsxDEV("p",{className:"text-c4a-text-muted",children:l("sources.detail.original_doc_placeholder")},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:296,columnNumber:7},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:295,columnNumber:5},this)}function D4({message:n}){return f.jsxDEV("div",{className:"flex items-center justify-center rounded border border-dashed border-c4a-border-subtle p-12",children:f.jsxDEV("p",{className:"text-center text-sm text-c4a-text-muted",children:n},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:306,columnNumber:7},this)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/pages/studio/sources/SourceDetail.tsx",lineNumber:305,columnNumber:5},this)}const nO=QC([{element:f.jsxDEV(GT,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:30,columnNumber:14},void 0),errorElement:f.jsxDEV(g4,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:31,columnNumber:19},void 0),children:[{path:"/",element:f.jsxDEV(JT,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:33,columnNumber:29},void 0)},{path:"/login",element:f.jsxDEV(KT,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:34,columnNumber:34},void 0)},{path:"/docs",element:f.jsxDEV(WT,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:35,columnNumber:33},void 0)}]},{path:"/studio",element:f.jsxDEV(ZT,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:42,columnNumber:14},void 0),errorElement:f.jsxDEV(g4,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:43,columnNumber:19},void 0),children:[{index:!0,element:f.jsxDEV(s4,{to:"/studio/sources",replace:!0},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:45,columnNumber:31},void 0)},{path:"sources",element:f.jsxDEV(s4,{to:`/studio/sources/${vr}`,replace:!0},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:49,columnNumber:11},void 0)},{path:"sources/add-client",element:f.jsxDEV(tO,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:55,columnNumber:46},void 0)},{path:"sources/import/:libId",element:f.jsxDEV(q3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:56,columnNumber:49},void 0)},{path:"sources/import-dir/:libId",element:f.jsxDEV(Q3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:57,columnNumber:53},void 0)},{path:"sources/import-remote/:libId",element:f.jsxDEV(eO,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:58,columnNumber:56},void 0)},{path:"sources/:libId",element:f.jsxDEV(A3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:59,columnNumber:42},void 0)},{path:"source/:sourceUuid",element:f.jsxDEV(aO,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:60,columnNumber:46},void 0)},{path:"modeling",element:f.jsxDEV(t3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:61,columnNumber:36},void 0)},{path:"modeling/code/setup",element:f.jsxDEV(i3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:62,columnNumber:47},void 0)},{path:"modeling/code/compile",element:f.jsxDEV(l3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:63,columnNumber:49},void 0)},{path:"modeling/code/review",element:f.jsxDEV(c3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:64,columnNumber:48},void 0)},{path:"modeling/code/result",element:f.jsxDEV(u3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:65,columnNumber:48},void 0)},{path:"brain",element:f.jsxDEV(a3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:66,columnNumber:33},void 0)},{path:"discovery",element:f.jsxDEV(s3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:67,columnNumber:37},void 0)},{path:"sharing",element:f.jsxDEV(n3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:68,columnNumber:35},void 0)},{path:"collaboration",element:f.jsxDEV(o3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:69,columnNumber:41},void 0)},{path:"settings",element:f.jsxDEV(r3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:70,columnNumber:36},void 0)}]},{path:"*",element:f.jsxDEV(e3,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/router.tsx",lineNumber:75,columnNumber:25},void 0)}]);function oO(){return N.useEffect(()=>{const o=`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`;return pn.connect(o),()=>{pn.disconnect()}},[]),f.jsxDEV(NC,{router:nO},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/App.tsx",lineNumber:17,columnNumber:10},this)}Mk.createRoot(document.getElementById("root")).render(f.jsxDEV(N.StrictMode,{children:f.jsxDEV(oO,{},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/main.tsx",lineNumber:9,columnNumber:5},void 0)},void 0,!1,{fileName:"/Users/bytedance/github/c4a/packages/web/src/main.tsx",lineNumber:8,columnNumber:3},void 0));