genaicode 0.14.1 → 0.14.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (59) hide show
  1. package/dist/ai-service/ai-studio.js +1 -1
  2. package/dist/ai-service/ai-studio.js.map +1 -1
  3. package/dist/files/file-id-utils.js +1 -1
  4. package/dist/files/file-id-utils.js.map +1 -1
  5. package/dist/files/read-files.js +10 -6
  6. package/dist/files/read-files.js.map +1 -1
  7. package/dist/files/source-code-types.d.ts +9 -5
  8. package/dist/files/source-code-utils.d.ts +2 -1
  9. package/dist/files/source-code-utils.js +30 -12
  10. package/dist/files/source-code-utils.js.map +1 -1
  11. package/dist/files/summary-cache.d.ts +6 -4
  12. package/dist/files/summary-cache.js +3 -2
  13. package/dist/files/summary-cache.js.map +1 -1
  14. package/dist/main/common/content-bus.d.ts +2 -0
  15. package/dist/main/common/content-bus.js +7 -0
  16. package/dist/main/common/content-bus.js.map +1 -1
  17. package/dist/main/ui/backend/endpoints/compress-context-endpoint.d.ts +1 -0
  18. package/dist/main/ui/backend/endpoints/compress-context-endpoint.js +18 -0
  19. package/dist/main/ui/backend/endpoints/compress-context-endpoint.js.map +1 -0
  20. package/dist/main/ui/backend/endpoints/context-endpoint.js +102 -0
  21. package/dist/main/ui/backend/endpoints/context-endpoint.js.map +1 -1
  22. package/dist/main/ui/backend/endpoints/index.d.ts +1 -0
  23. package/dist/main/ui/backend/endpoints/index.js +1 -0
  24. package/dist/main/ui/backend/endpoints/index.js.map +1 -1
  25. package/dist/main/ui/backend/service.d.ts +64 -3
  26. package/dist/main/ui/backend/service.js +252 -1
  27. package/dist/main/ui/backend/service.js.map +1 -1
  28. package/dist/main/ui/codegen-ui.js +2 -2
  29. package/dist/main/ui/codegen-ui.js.map +1 -1
  30. package/dist/main/ui/common/api-types.d.ts +5 -0
  31. package/dist/main/ui/common/api-types.js.map +1 -1
  32. package/dist/main/ui/frontend/assets/index-We_MLSaC.js +3405 -0
  33. package/dist/main/ui/frontend/index.html +1 -1
  34. package/dist/prompt/context-utils.d.ts +7 -0
  35. package/dist/prompt/context-utils.js +33 -0
  36. package/dist/prompt/context-utils.js.map +1 -0
  37. package/dist/prompt/function-defs/get-source-code.js +3 -3
  38. package/dist/prompt/function-defs/set-summaries.js +6 -2
  39. package/dist/prompt/function-defs/set-summaries.js.map +1 -1
  40. package/dist/prompt/limits.js +1 -1
  41. package/dist/prompt/prompt-service.js +7 -4
  42. package/dist/prompt/prompt-service.js.map +1 -1
  43. package/dist/prompt/source-code-optimize.d.ts +2 -0
  44. package/dist/prompt/source-code-optimize.js +27 -0
  45. package/dist/prompt/source-code-optimize.js.map +1 -0
  46. package/dist/prompt/steps/step-ask-question/step-ask-question.js +7 -1
  47. package/dist/prompt/steps/step-ask-question/step-ask-question.js.map +1 -1
  48. package/dist/prompt/steps/step-context-compression.js +5 -0
  49. package/dist/prompt/steps/step-context-compression.js.map +1 -1
  50. package/dist/prompt/steps/step-context-optimization.js +6 -3
  51. package/dist/prompt/steps/step-context-optimization.js.map +1 -1
  52. package/dist/prompt/steps/step-summarization.js +9 -19
  53. package/dist/prompt/steps/step-summarization.js.map +1 -1
  54. package/dist/prompt/systemprompt.js +93 -168
  55. package/dist/prompt/systemprompt.js.map +1 -1
  56. package/dist/prompt/token-estimator.js +1 -1
  57. package/dist/prompt/token-estimator.js.map +1 -1
  58. package/package.json +1 -1
  59. package/dist/main/ui/frontend/assets/index-5-emJmrg.js +0 -2881
@@ -0,0 +1,3405 @@
1
+ var Tk=Object.defineProperty;var $k=(e,t,r)=>t in e?Tk(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var Er=(e,t,r)=>$k(e,typeof t!="symbol"?t+"":t,r);(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))i(l);new MutationObserver(l=>{for(const a of l)if(a.type==="childList")for(const u of a.addedNodes)u.tagName==="LINK"&&u.rel==="modulepreload"&&i(u)}).observe(document,{childList:!0,subtree:!0});function r(l){const a={};return l.integrity&&(a.integrity=l.integrity),l.referrerPolicy&&(a.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?a.credentials="include":l.crossOrigin==="anonymous"?a.credentials="omit":a.credentials="same-origin",a}function i(l){if(l.ep)return;l.ep=!0;const a=r(l);fetch(l.href,a)}})();function Dd(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Sc={exports:{}},Le={};/**
2
+ * @license React
3
+ * react.production.min.js
4
+ *
5
+ * Copyright (c) Facebook, Inc. and its affiliates.
6
+ *
7
+ * This source code is licensed under the MIT license found in the
8
+ * LICENSE file in the root directory of this source tree.
9
+ */var mm;function Ik(){if(mm)return Le;mm=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),r=Symbol.for("react.fragment"),i=Symbol.for("react.strict_mode"),l=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),f=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),m=Symbol.iterator;function v(z){return z===null||typeof z!="object"?null:(z=m&&z[m]||z["@@iterator"],typeof z=="function"?z:null)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},k=Object.assign,S={};function j(z,G,I){this.props=z,this.context=G,this.refs=S,this.updater=I||w}j.prototype.isReactComponent={},j.prototype.setState=function(z,G){if(typeof z!="object"&&typeof z!="function"&&z!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,z,G,"setState")},j.prototype.forceUpdate=function(z){this.updater.enqueueForceUpdate(this,z,"forceUpdate")};function E(){}E.prototype=j.prototype;function P(z,G,I){this.props=z,this.context=G,this.refs=S,this.updater=I||w}var N=P.prototype=new E;N.constructor=P,k(N,j.prototype),N.isPureReactComponent=!0;var _=Array.isArray,q=Object.prototype.hasOwnProperty,A={current:null},H={key:!0,ref:!0,__self:!0,__source:!0};function K(z,G,I){var ce,xe={},ke=null,he=null;if(G!=null)for(ce in G.ref!==void 0&&(he=G.ref),G.key!==void 0&&(ke=""+G.key),G)q.call(G,ce)&&!H.hasOwnProperty(ce)&&(xe[ce]=G[ce]);var fe=arguments.length-2;if(fe===1)xe.children=I;else if(1<fe){for(var se=Array(fe),ve=0;ve<fe;ve++)se[ve]=arguments[ve+2];xe.children=se}if(z&&z.defaultProps)for(ce in fe=z.defaultProps,fe)xe[ce]===void 0&&(xe[ce]=fe[ce]);return{$$typeof:e,type:z,key:ke,ref:he,props:xe,_owner:A.current}}function te(z,G){return{$$typeof:e,type:z.type,key:G,ref:z.ref,props:z.props,_owner:z._owner}}function O(z){return typeof z=="object"&&z!==null&&z.$$typeof===e}function Z(z){var G={"=":"=0",":":"=2"};return"$"+z.replace(/[=:]/g,function(I){return G[I]})}var le=/\/+/g;function X(z,G){return typeof z=="object"&&z!==null&&z.key!=null?Z(""+z.key):G.toString(36)}function ne(z,G,I,ce,xe){var ke=typeof z;(ke==="undefined"||ke==="boolean")&&(z=null);var he=!1;if(z===null)he=!0;else switch(ke){case"string":case"number":he=!0;break;case"object":switch(z.$$typeof){case e:case t:he=!0}}if(he)return he=z,xe=xe(he),z=ce===""?"."+X(he,0):ce,_(xe)?(I="",z!=null&&(I=z.replace(le,"$&/")+"/"),ne(xe,G,I,"",function(ve){return ve})):xe!=null&&(O(xe)&&(xe=te(xe,I+(!xe.key||he&&he.key===xe.key?"":(""+xe.key).replace(le,"$&/")+"/")+z)),G.push(xe)),1;if(he=0,ce=ce===""?".":ce+":",_(z))for(var fe=0;fe<z.length;fe++){ke=z[fe];var se=ce+X(ke,fe);he+=ne(ke,G,I,se,xe)}else if(se=v(z),typeof se=="function")for(z=se.call(z),fe=0;!(ke=z.next()).done;)ke=ke.value,se=ce+X(ke,fe++),he+=ne(ke,G,I,se,xe);else if(ke==="object")throw G=String(z),Error("Objects are not valid as a React child (found: "+(G==="[object Object]"?"object with keys {"+Object.keys(z).join(", ")+"}":G)+"). If you meant to render a collection of children, use an array instead.");return he}function B(z,G,I){if(z==null)return z;var ce=[],xe=0;return ne(z,ce,"","",function(ke){return G.call(I,ke,xe++)}),ce}function pe(z){if(z._status===-1){var G=z._result;G=G(),G.then(function(I){(z._status===0||z._status===-1)&&(z._status=1,z._result=I)},function(I){(z._status===0||z._status===-1)&&(z._status=2,z._result=I)}),z._status===-1&&(z._status=0,z._result=G)}if(z._status===1)return z._result.default;throw z._result}var ae={current:null},Q={transition:null},de={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:Q,ReactCurrentOwner:A};function T(){throw Error("act(...) is not supported in production builds of React.")}return Le.Children={map:B,forEach:function(z,G,I){B(z,function(){G.apply(this,arguments)},I)},count:function(z){var G=0;return B(z,function(){G++}),G},toArray:function(z){return B(z,function(G){return G})||[]},only:function(z){if(!O(z))throw Error("React.Children.only expected to receive a single React element child.");return z}},Le.Component=j,Le.Fragment=r,Le.Profiler=l,Le.PureComponent=P,Le.StrictMode=i,Le.Suspense=f,Le.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=de,Le.act=T,Le.cloneElement=function(z,G,I){if(z==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+z+".");var ce=k({},z.props),xe=z.key,ke=z.ref,he=z._owner;if(G!=null){if(G.ref!==void 0&&(ke=G.ref,he=A.current),G.key!==void 0&&(xe=""+G.key),z.type&&z.type.defaultProps)var fe=z.type.defaultProps;for(se in G)q.call(G,se)&&!H.hasOwnProperty(se)&&(ce[se]=G[se]===void 0&&fe!==void 0?fe[se]:G[se])}var se=arguments.length-2;if(se===1)ce.children=I;else if(1<se){fe=Array(se);for(var ve=0;ve<se;ve++)fe[ve]=arguments[ve+2];ce.children=fe}return{$$typeof:e,type:z.type,key:xe,ref:ke,props:ce,_owner:he}},Le.createContext=function(z){return z={$$typeof:u,_currentValue:z,_currentValue2:z,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},z.Provider={$$typeof:a,_context:z},z.Consumer=z},Le.createElement=K,Le.createFactory=function(z){var G=K.bind(null,z);return G.type=z,G},Le.createRef=function(){return{current:null}},Le.forwardRef=function(z){return{$$typeof:d,render:z}},Le.isValidElement=O,Le.lazy=function(z){return{$$typeof:g,_payload:{_status:-1,_result:z},_init:pe}},Le.memo=function(z,G){return{$$typeof:p,type:z,compare:G===void 0?null:G}},Le.startTransition=function(z){var G=Q.transition;Q.transition={};try{z()}finally{Q.transition=G}},Le.unstable_act=T,Le.useCallback=function(z,G){return ae.current.useCallback(z,G)},Le.useContext=function(z){return ae.current.useContext(z)},Le.useDebugValue=function(){},Le.useDeferredValue=function(z){return ae.current.useDeferredValue(z)},Le.useEffect=function(z,G){return ae.current.useEffect(z,G)},Le.useId=function(){return ae.current.useId()},Le.useImperativeHandle=function(z,G,I){return ae.current.useImperativeHandle(z,G,I)},Le.useInsertionEffect=function(z,G){return ae.current.useInsertionEffect(z,G)},Le.useLayoutEffect=function(z,G){return ae.current.useLayoutEffect(z,G)},Le.useMemo=function(z,G){return ae.current.useMemo(z,G)},Le.useReducer=function(z,G,I){return ae.current.useReducer(z,G,I)},Le.useRef=function(z){return ae.current.useRef(z)},Le.useState=function(z){return ae.current.useState(z)},Le.useSyncExternalStore=function(z,G,I){return ae.current.useSyncExternalStore(z,G,I)},Le.useTransition=function(){return ae.current.useTransition()},Le.version="18.3.1",Le}var gm;function Md(){return gm||(gm=1,Sc.exports=Ik()),Sc.exports}var $=Md();const Et=Dd($);var Rs={},Cc={exports:{}},Gt={},Ec={exports:{}},jc={};/**
10
+ * @license React
11
+ * scheduler.production.min.js
12
+ *
13
+ * Copyright (c) Facebook, Inc. and its affiliates.
14
+ *
15
+ * This source code is licensed under the MIT license found in the
16
+ * LICENSE file in the root directory of this source tree.
17
+ */var ym;function Rk(){return ym||(ym=1,function(e){function t(Q,de){var T=Q.length;Q.push(de);e:for(;0<T;){var z=T-1>>>1,G=Q[z];if(0<l(G,de))Q[z]=de,Q[T]=G,T=z;else break e}}function r(Q){return Q.length===0?null:Q[0]}function i(Q){if(Q.length===0)return null;var de=Q[0],T=Q.pop();if(T!==de){Q[0]=T;e:for(var z=0,G=Q.length,I=G>>>1;z<I;){var ce=2*(z+1)-1,xe=Q[ce],ke=ce+1,he=Q[ke];if(0>l(xe,T))ke<G&&0>l(he,xe)?(Q[z]=he,Q[ke]=T,z=ke):(Q[z]=xe,Q[ce]=T,z=ce);else if(ke<G&&0>l(he,T))Q[z]=he,Q[ke]=T,z=ke;else break e}}return de}function l(Q,de){var T=Q.sortIndex-de.sortIndex;return T!==0?T:Q.id-de.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,d=u.now();e.unstable_now=function(){return u.now()-d}}var f=[],p=[],g=1,m=null,v=3,w=!1,k=!1,S=!1,j=typeof setTimeout=="function"?setTimeout:null,E=typeof clearTimeout=="function"?clearTimeout:null,P=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function N(Q){for(var de=r(p);de!==null;){if(de.callback===null)i(p);else if(de.startTime<=Q)i(p),de.sortIndex=de.expirationTime,t(f,de);else break;de=r(p)}}function _(Q){if(S=!1,N(Q),!k)if(r(f)!==null)k=!0,pe(q);else{var de=r(p);de!==null&&ae(_,de.startTime-Q)}}function q(Q,de){k=!1,S&&(S=!1,E(K),K=-1),w=!0;var T=v;try{for(N(de),m=r(f);m!==null&&(!(m.expirationTime>de)||Q&&!Z());){var z=m.callback;if(typeof z=="function"){m.callback=null,v=m.priorityLevel;var G=z(m.expirationTime<=de);de=e.unstable_now(),typeof G=="function"?m.callback=G:m===r(f)&&i(f),N(de)}else i(f);m=r(f)}if(m!==null)var I=!0;else{var ce=r(p);ce!==null&&ae(_,ce.startTime-de),I=!1}return I}finally{m=null,v=T,w=!1}}var A=!1,H=null,K=-1,te=5,O=-1;function Z(){return!(e.unstable_now()-O<te)}function le(){if(H!==null){var Q=e.unstable_now();O=Q;var de=!0;try{de=H(!0,Q)}finally{de?X():(A=!1,H=null)}}else A=!1}var X;if(typeof P=="function")X=function(){P(le)};else if(typeof MessageChannel<"u"){var ne=new MessageChannel,B=ne.port2;ne.port1.onmessage=le,X=function(){B.postMessage(null)}}else X=function(){j(le,0)};function pe(Q){H=Q,A||(A=!0,X())}function ae(Q,de){K=j(function(){Q(e.unstable_now())},de)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){k||w||(k=!0,pe(q))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):te=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return v},e.unstable_getFirstCallbackNode=function(){return r(f)},e.unstable_next=function(Q){switch(v){case 1:case 2:case 3:var de=3;break;default:de=v}var T=v;v=de;try{return Q()}finally{v=T}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,de){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var T=v;v=Q;try{return de()}finally{v=T}},e.unstable_scheduleCallback=function(Q,de,T){var z=e.unstable_now();switch(typeof T=="object"&&T!==null?(T=T.delay,T=typeof T=="number"&&0<T?z+T:z):T=z,Q){case 1:var G=-1;break;case 2:G=250;break;case 5:G=1073741823;break;case 4:G=1e4;break;default:G=5e3}return G=T+G,Q={id:g++,callback:de,priorityLevel:Q,startTime:T,expirationTime:G,sortIndex:-1},T>z?(Q.sortIndex=T,t(p,Q),r(f)===null&&Q===r(p)&&(S?(E(K),K=-1):S=!0,ae(_,T-z))):(Q.sortIndex=G,t(f,Q),k||w||(k=!0,pe(q))),Q},e.unstable_shouldYield=Z,e.unstable_wrapCallback=function(Q){var de=v;return function(){var T=v;v=de;try{return Q.apply(this,arguments)}finally{v=T}}}}(jc)),jc}var xm;function Pk(){return xm||(xm=1,Ec.exports=Rk()),Ec.exports}/**
18
+ * @license React
19
+ * react-dom.production.min.js
20
+ *
21
+ * Copyright (c) Facebook, Inc. and its affiliates.
22
+ *
23
+ * This source code is licensed under the MIT license found in the
24
+ * LICENSE file in the root directory of this source tree.
25
+ */var vm;function Nk(){if(vm)return Gt;vm=1;var e=Md(),t=Pk();function r(n){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+n,s=1;s<arguments.length;s++)o+="&args[]="+encodeURIComponent(arguments[s]);return"Minified React error #"+n+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var i=new Set,l={};function a(n,o){u(n,o),u(n+"Capture",o)}function u(n,o){for(l[n]=o,n=0;n<o.length;n++)i.add(o[n])}var d=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),f=Object.prototype.hasOwnProperty,p=/^[: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]*$/,g={},m={};function v(n){return f.call(m,n)?!0:f.call(g,n)?!1:p.test(n)?m[n]=!0:(g[n]=!0,!1)}function w(n,o,s,c){if(s!==null&&s.type===0)return!1;switch(typeof o){case"function":case"symbol":return!0;case"boolean":return c?!1:s!==null?!s.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function k(n,o,s,c){if(o===null||typeof o>"u"||w(n,o,s,c))return!0;if(c)return!1;if(s!==null)switch(s.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function S(n,o,s,c,y,x,b){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=c,this.attributeNamespace=y,this.mustUseProperty=s,this.propertyName=n,this.type=o,this.sanitizeURL=x,this.removeEmptyString=b}var j={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){j[n]=new S(n,0,!1,n,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var o=n[0];j[o]=new S(o,1,!1,n[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(n){j[n]=new S(n,2,!1,n.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){j[n]=new S(n,2,!1,n,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(n){j[n]=new S(n,3,!1,n.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(n){j[n]=new S(n,3,!0,n,null,!1,!1)}),["capture","download"].forEach(function(n){j[n]=new S(n,4,!1,n,null,!1,!1)}),["cols","rows","size","span"].forEach(function(n){j[n]=new S(n,6,!1,n,null,!1,!1)}),["rowSpan","start"].forEach(function(n){j[n]=new S(n,5,!1,n.toLowerCase(),null,!1,!1)});var E=/[\-:]([a-z])/g;function P(n){return n[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(n){var o=n.replace(E,P);j[o]=new S(o,1,!1,n,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var o=n.replace(E,P);j[o]=new S(o,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(n){var o=n.replace(E,P);j[o]=new S(o,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(n){j[n]=new S(n,1,!1,n.toLowerCase(),null,!1,!1)}),j.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(n){j[n]=new S(n,1,!1,n.toLowerCase(),null,!0,!0)});function N(n,o,s,c){var y=j.hasOwnProperty(o)?j[o]:null;(y!==null?y.type!==0:c||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(k(o,s,y,c)&&(s=null),c||y===null?v(o)&&(s===null?n.removeAttribute(o):n.setAttribute(o,""+s)):y.mustUseProperty?n[y.propertyName]=s===null?y.type===3?!1:"":s:(o=y.attributeName,c=y.attributeNamespace,s===null?n.removeAttribute(o):(y=y.type,s=y===3||y===4&&s===!0?"":""+s,c?n.setAttributeNS(c,o,s):n.setAttribute(o,s))))}var _=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,q=Symbol.for("react.element"),A=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),K=Symbol.for("react.strict_mode"),te=Symbol.for("react.profiler"),O=Symbol.for("react.provider"),Z=Symbol.for("react.context"),le=Symbol.for("react.forward_ref"),X=Symbol.for("react.suspense"),ne=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),Q=Symbol.iterator;function de(n){return n===null||typeof n!="object"?null:(n=Q&&n[Q]||n["@@iterator"],typeof n=="function"?n:null)}var T=Object.assign,z;function G(n){if(z===void 0)try{throw Error()}catch(s){var o=s.stack.trim().match(/\n( *(at )?)/);z=o&&o[1]||""}return`
26
+ `+z+n}var I=!1;function ce(n,o){if(!n||I)return"";I=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(U){var c=U}Reflect.construct(n,[],o)}else{try{o.call()}catch(U){c=U}n.call(o.prototype)}else{try{throw Error()}catch(U){c=U}n()}}catch(U){if(U&&c&&typeof U.stack=="string"){for(var y=U.stack.split(`
27
+ `),x=c.stack.split(`
28
+ `),b=y.length-1,R=x.length-1;1<=b&&0<=R&&y[b]!==x[R];)R--;for(;1<=b&&0<=R;b--,R--)if(y[b]!==x[R]){if(b!==1||R!==1)do if(b--,R--,0>R||y[b]!==x[R]){var L=`
29
+ `+y[b].replace(" at new "," at ");return n.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",n.displayName)),L}while(1<=b&&0<=R);break}}}finally{I=!1,Error.prepareStackTrace=s}return(n=n?n.displayName||n.name:"")?G(n):""}function xe(n){switch(n.tag){case 5:return G(n.type);case 16:return G("Lazy");case 13:return G("Suspense");case 19:return G("SuspenseList");case 0:case 2:case 15:return n=ce(n.type,!1),n;case 11:return n=ce(n.type.render,!1),n;case 1:return n=ce(n.type,!0),n;default:return""}}function ke(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case H:return"Fragment";case A:return"Portal";case te:return"Profiler";case K:return"StrictMode";case X:return"Suspense";case ne:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case Z:return(n.displayName||"Context")+".Consumer";case O:return(n._context.displayName||"Context")+".Provider";case le:var o=n.render;return n=n.displayName,n||(n=o.displayName||o.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case B:return o=n.displayName||null,o!==null?o:ke(n.type)||"Memo";case pe:o=n._payload,n=n._init;try{return ke(n(o))}catch{}}return null}function he(n){var o=n.type;switch(n.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=o.render,n=n.displayName||n.name||"",o.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ke(o);case 8:return o===K?"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 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function fe(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function se(n){var o=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function ve(n){var o=se(n)?"checked":"value",s=Object.getOwnPropertyDescriptor(n.constructor.prototype,o),c=""+n[o];if(!n.hasOwnProperty(o)&&typeof s<"u"&&typeof s.get=="function"&&typeof s.set=="function"){var y=s.get,x=s.set;return Object.defineProperty(n,o,{configurable:!0,get:function(){return y.call(this)},set:function(b){c=""+b,x.call(this,b)}}),Object.defineProperty(n,o,{enumerable:s.enumerable}),{getValue:function(){return c},setValue:function(b){c=""+b},stopTracking:function(){n._valueTracker=null,delete n[o]}}}}function Ae(n){n._valueTracker||(n._valueTracker=ve(n))}function Ie(n){if(!n)return!1;var o=n._valueTracker;if(!o)return!0;var s=o.getValue(),c="";return n&&(c=se(n)?n.checked?"true":"false":n.value),n=c,n!==s?(o.setValue(n),!0):!1}function Ge(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function jt(n,o){var s=o.checked;return T({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:s??n._wrapperState.initialChecked})}function zt(n,o){var s=o.defaultValue==null?"":o.defaultValue,c=o.checked!=null?o.checked:o.defaultChecked;s=fe(o.value!=null?o.value:s),n._wrapperState={initialChecked:c,initialValue:s,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function Bt(n,o){o=o.checked,o!=null&&N(n,"checked",o,!1)}function or(n,o){Bt(n,o);var s=fe(o.value),c=o.type;if(s!=null)c==="number"?(s===0&&n.value===""||n.value!=s)&&(n.value=""+s):n.value!==""+s&&(n.value=""+s);else if(c==="submit"||c==="reset"){n.removeAttribute("value");return}o.hasOwnProperty("value")?Ft(n,o.type,s):o.hasOwnProperty("defaultValue")&&Ft(n,o.type,fe(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(n.defaultChecked=!!o.defaultChecked)}function De(n,o,s){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var c=o.type;if(!(c!=="submit"&&c!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+n._wrapperState.initialValue,s||o===n.value||(n.value=o),n.defaultValue=o}s=n.name,s!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,s!==""&&(n.name=s)}function Ft(n,o,s){(o!=="number"||Ge(n.ownerDocument)!==n)&&(s==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+s&&(n.defaultValue=""+s))}var Zt=Array.isArray;function pt(n,o,s,c){if(n=n.options,o){o={};for(var y=0;y<s.length;y++)o["$"+s[y]]=!0;for(s=0;s<n.length;s++)y=o.hasOwnProperty("$"+n[s].value),n[s].selected!==y&&(n[s].selected=y),y&&c&&(n[s].defaultSelected=!0)}else{for(s=""+fe(s),o=null,y=0;y<n.length;y++){if(n[y].value===s){n[y].selected=!0,c&&(n[y].defaultSelected=!0);return}o!==null||n[y].disabled||(o=n[y])}o!==null&&(o.selected=!0)}}function _e(n,o){if(o.dangerouslySetInnerHTML!=null)throw Error(r(91));return T({},o,{value:void 0,defaultValue:void 0,children:""+n._wrapperState.initialValue})}function ht(n,o){var s=o.value;if(s==null){if(s=o.children,o=o.defaultValue,s!=null){if(o!=null)throw Error(r(92));if(Zt(s)){if(1<s.length)throw Error(r(93));s=s[0]}o=s}o==null&&(o=""),s=o}n._wrapperState={initialValue:fe(s)}}function Tt(n,o){var s=fe(o.value),c=fe(o.defaultValue);s!=null&&(s=""+s,s!==n.value&&(n.value=s),o.defaultValue==null&&n.defaultValue!==s&&(n.defaultValue=s)),c!=null&&(n.defaultValue=""+c)}function _t(n){var o=n.textContent;o===n._wrapperState.initialValue&&o!==""&&o!==null&&(n.value=o)}function W(n){switch(n){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function re(n,o){return n==null||n==="http://www.w3.org/1999/xhtml"?W(o):n==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":n}var Se,$e=function(n){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(o,s,c,y){MSApp.execUnsafeLocalFunction(function(){return n(o,s,c,y)})}:n}(function(n,o){if(n.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in n)n.innerHTML=o;else{for(Se=Se||document.createElement("div"),Se.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Se.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;o.firstChild;)n.appendChild(o.firstChild)}});function Me(n,o){if(o){var s=n.firstChild;if(s&&s===n.lastChild&&s.nodeType===3){s.nodeValue=o;return}}n.textContent=o}var kt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qn=["Webkit","ms","Moz","O"];Object.keys(kt).forEach(function(n){qn.forEach(function(o){o=o+n.charAt(0).toUpperCase()+n.substring(1),kt[o]=kt[n]})});function fn(n,o,s){return o==null||typeof o=="boolean"||o===""?"":s||typeof o!="number"||o===0||kt.hasOwnProperty(n)&&kt[n]?(""+o).trim():o+"px"}function ir(n,o){n=n.style;for(var s in o)if(o.hasOwnProperty(s)){var c=s.indexOf("--")===0,y=fn(s,o[s],c);s==="float"&&(s="cssFloat"),c?n.setProperty(s,y):n[s]=y}}var Lr=T({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function bt(n,o){if(o){if(Lr[n]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(r(137,n));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(r(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(r(61))}if(o.style!=null&&typeof o.style!="object")throw Error(r(62))}}function An(n,o){if(n.indexOf("-")===-1)return typeof o.is=="string";switch(n){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var en=null;function Oa(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var Da=null,fo=null,po=null;function Nf(n){if(n=Ii(n)){if(typeof Da!="function")throw Error(r(280));var o=n.stateNode;o&&(o=Wl(o),Da(n.stateNode,n.type,o))}}function Af(n){fo?po?po.push(n):po=[n]:fo=n}function Lf(){if(fo){var n=fo,o=po;if(po=fo=null,Nf(n),o)for(n=0;n<o.length;n++)Nf(o[n])}}function zf(n,o){return n(o)}function Ff(){}var Ma=!1;function _f(n,o,s){if(Ma)return n(o,s);Ma=!0;try{return zf(n,o,s)}finally{Ma=!1,(fo!==null||po!==null)&&(Ff(),Lf())}}function ai(n,o){var s=n.stateNode;if(s===null)return null;var c=Wl(s);if(c===null)return null;s=c[o];e:switch(o){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(c=!c.disabled)||(n=n.type,c=!(n==="button"||n==="input"||n==="select"||n==="textarea")),n=!c;break e;default:n=!1}if(n)return null;if(s&&typeof s!="function")throw Error(r(231,o,typeof s));return s}var Ba=!1;if(d)try{var ui={};Object.defineProperty(ui,"passive",{get:function(){Ba=!0}}),window.addEventListener("test",ui,ui),window.removeEventListener("test",ui,ui)}catch{Ba=!1}function A1(n,o,s,c,y,x,b,R,L){var U=Array.prototype.slice.call(arguments,3);try{o.apply(s,U)}catch(ee){this.onError(ee)}}var ci=!1,Sl=null,Cl=!1,Ua=null,L1={onError:function(n){ci=!0,Sl=n}};function z1(n,o,s,c,y,x,b,R,L){ci=!1,Sl=null,A1.apply(L1,arguments)}function F1(n,o,s,c,y,x,b,R,L){if(z1.apply(this,arguments),ci){if(ci){var U=Sl;ci=!1,Sl=null}else throw Error(r(198));Cl||(Cl=!0,Ua=U)}}function zr(n){var o=n,s=n;if(n.alternate)for(;o.return;)o=o.return;else{n=o;do o=n,(o.flags&4098)!==0&&(s=o.return),n=o.return;while(n)}return o.tag===3?s:null}function Of(n){if(n.tag===13){var o=n.memoizedState;if(o===null&&(n=n.alternate,n!==null&&(o=n.memoizedState)),o!==null)return o.dehydrated}return null}function Df(n){if(zr(n)!==n)throw Error(r(188))}function _1(n){var o=n.alternate;if(!o){if(o=zr(n),o===null)throw Error(r(188));return o!==n?null:n}for(var s=n,c=o;;){var y=s.return;if(y===null)break;var x=y.alternate;if(x===null){if(c=y.return,c!==null){s=c;continue}break}if(y.child===x.child){for(x=y.child;x;){if(x===s)return Df(y),n;if(x===c)return Df(y),o;x=x.sibling}throw Error(r(188))}if(s.return!==c.return)s=y,c=x;else{for(var b=!1,R=y.child;R;){if(R===s){b=!0,s=y,c=x;break}if(R===c){b=!0,c=y,s=x;break}R=R.sibling}if(!b){for(R=x.child;R;){if(R===s){b=!0,s=x,c=y;break}if(R===c){b=!0,c=x,s=y;break}R=R.sibling}if(!b)throw Error(r(189))}}if(s.alternate!==c)throw Error(r(190))}if(s.tag!==3)throw Error(r(188));return s.stateNode.current===s?n:o}function Mf(n){return n=_1(n),n!==null?Bf(n):null}function Bf(n){if(n.tag===5||n.tag===6)return n;for(n=n.child;n!==null;){var o=Bf(n);if(o!==null)return o;n=n.sibling}return null}var Uf=t.unstable_scheduleCallback,Vf=t.unstable_cancelCallback,O1=t.unstable_shouldYield,D1=t.unstable_requestPaint,lt=t.unstable_now,M1=t.unstable_getCurrentPriorityLevel,Va=t.unstable_ImmediatePriority,Hf=t.unstable_UserBlockingPriority,El=t.unstable_NormalPriority,B1=t.unstable_LowPriority,Wf=t.unstable_IdlePriority,jl=null,Ln=null;function U1(n){if(Ln&&typeof Ln.onCommitFiberRoot=="function")try{Ln.onCommitFiberRoot(jl,n,void 0,(n.current.flags&128)===128)}catch{}}var bn=Math.clz32?Math.clz32:W1,V1=Math.log,H1=Math.LN2;function W1(n){return n>>>=0,n===0?32:31-(V1(n)/H1|0)|0}var Tl=64,$l=4194304;function di(n){switch(n&-n){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: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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function Il(n,o){var s=n.pendingLanes;if(s===0)return 0;var c=0,y=n.suspendedLanes,x=n.pingedLanes,b=s&268435455;if(b!==0){var R=b&~y;R!==0?c=di(R):(x&=b,x!==0&&(c=di(x)))}else b=s&~y,b!==0?c=di(b):x!==0&&(c=di(x));if(c===0)return 0;if(o!==0&&o!==c&&(o&y)===0&&(y=c&-c,x=o&-o,y>=x||y===16&&(x&4194240)!==0))return o;if((c&4)!==0&&(c|=s&16),o=n.entangledLanes,o!==0)for(n=n.entanglements,o&=c;0<o;)s=31-bn(o),y=1<<s,c|=n[s],o&=~y;return c}function q1(n,o){switch(n){case 1:case 2:case 4:return o+250;case 8:case 16:case 32:case 64: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 o+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function G1(n,o){for(var s=n.suspendedLanes,c=n.pingedLanes,y=n.expirationTimes,x=n.pendingLanes;0<x;){var b=31-bn(x),R=1<<b,L=y[b];L===-1?((R&s)===0||(R&c)!==0)&&(y[b]=q1(R,o)):L<=o&&(n.expiredLanes|=R),x&=~R}}function Ha(n){return n=n.pendingLanes&-1073741825,n!==0?n:n&1073741824?1073741824:0}function qf(){var n=Tl;return Tl<<=1,(Tl&4194240)===0&&(Tl=64),n}function Wa(n){for(var o=[],s=0;31>s;s++)o.push(n);return o}function fi(n,o,s){n.pendingLanes|=o,o!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,o=31-bn(o),n[o]=s}function J1(n,o){var s=n.pendingLanes&~o;n.pendingLanes=o,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=o,n.mutableReadLanes&=o,n.entangledLanes&=o,o=n.entanglements;var c=n.eventTimes;for(n=n.expirationTimes;0<s;){var y=31-bn(s),x=1<<y;o[y]=0,c[y]=-1,n[y]=-1,s&=~x}}function qa(n,o){var s=n.entangledLanes|=o;for(n=n.entanglements;s;){var c=31-bn(s),y=1<<c;y&o|n[c]&o&&(n[c]|=o),s&=~y}}var We=0;function Gf(n){return n&=-n,1<n?4<n?(n&268435455)!==0?16:536870912:4:1}var Jf,Ga,Kf,Qf,Yf,Ja=!1,Rl=[],lr=null,sr=null,ar=null,pi=new Map,hi=new Map,ur=[],K1="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 submit".split(" ");function Xf(n,o){switch(n){case"focusin":case"focusout":lr=null;break;case"dragenter":case"dragleave":sr=null;break;case"mouseover":case"mouseout":ar=null;break;case"pointerover":case"pointerout":pi.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":hi.delete(o.pointerId)}}function mi(n,o,s,c,y,x){return n===null||n.nativeEvent!==x?(n={blockedOn:o,domEventName:s,eventSystemFlags:c,nativeEvent:x,targetContainers:[y]},o!==null&&(o=Ii(o),o!==null&&Ga(o)),n):(n.eventSystemFlags|=c,o=n.targetContainers,y!==null&&o.indexOf(y)===-1&&o.push(y),n)}function Q1(n,o,s,c,y){switch(o){case"focusin":return lr=mi(lr,n,o,s,c,y),!0;case"dragenter":return sr=mi(sr,n,o,s,c,y),!0;case"mouseover":return ar=mi(ar,n,o,s,c,y),!0;case"pointerover":var x=y.pointerId;return pi.set(x,mi(pi.get(x)||null,n,o,s,c,y)),!0;case"gotpointercapture":return x=y.pointerId,hi.set(x,mi(hi.get(x)||null,n,o,s,c,y)),!0}return!1}function Zf(n){var o=Fr(n.target);if(o!==null){var s=zr(o);if(s!==null){if(o=s.tag,o===13){if(o=Of(s),o!==null){n.blockedOn=o,Yf(n.priority,function(){Kf(s)});return}}else if(o===3&&s.stateNode.current.memoizedState.isDehydrated){n.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}n.blockedOn=null}function Pl(n){if(n.blockedOn!==null)return!1;for(var o=n.targetContainers;0<o.length;){var s=Qa(n.domEventName,n.eventSystemFlags,o[0],n.nativeEvent);if(s===null){s=n.nativeEvent;var c=new s.constructor(s.type,s);en=c,s.target.dispatchEvent(c),en=null}else return o=Ii(s),o!==null&&Ga(o),n.blockedOn=s,!1;o.shift()}return!0}function ep(n,o,s){Pl(n)&&s.delete(o)}function Y1(){Ja=!1,lr!==null&&Pl(lr)&&(lr=null),sr!==null&&Pl(sr)&&(sr=null),ar!==null&&Pl(ar)&&(ar=null),pi.forEach(ep),hi.forEach(ep)}function gi(n,o){n.blockedOn===o&&(n.blockedOn=null,Ja||(Ja=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,Y1)))}function yi(n){function o(y){return gi(y,n)}if(0<Rl.length){gi(Rl[0],n);for(var s=1;s<Rl.length;s++){var c=Rl[s];c.blockedOn===n&&(c.blockedOn=null)}}for(lr!==null&&gi(lr,n),sr!==null&&gi(sr,n),ar!==null&&gi(ar,n),pi.forEach(o),hi.forEach(o),s=0;s<ur.length;s++)c=ur[s],c.blockedOn===n&&(c.blockedOn=null);for(;0<ur.length&&(s=ur[0],s.blockedOn===null);)Zf(s),s.blockedOn===null&&ur.shift()}var ho=_.ReactCurrentBatchConfig,Nl=!0;function X1(n,o,s,c){var y=We,x=ho.transition;ho.transition=null;try{We=1,Ka(n,o,s,c)}finally{We=y,ho.transition=x}}function Z1(n,o,s,c){var y=We,x=ho.transition;ho.transition=null;try{We=4,Ka(n,o,s,c)}finally{We=y,ho.transition=x}}function Ka(n,o,s,c){if(Nl){var y=Qa(n,o,s,c);if(y===null)pu(n,o,c,Al,s),Xf(n,c);else if(Q1(y,n,o,s,c))c.stopPropagation();else if(Xf(n,c),o&4&&-1<K1.indexOf(n)){for(;y!==null;){var x=Ii(y);if(x!==null&&Jf(x),x=Qa(n,o,s,c),x===null&&pu(n,o,c,Al,s),x===y)break;y=x}y!==null&&c.stopPropagation()}else pu(n,o,c,null,s)}}var Al=null;function Qa(n,o,s,c){if(Al=null,n=Oa(c),n=Fr(n),n!==null)if(o=zr(n),o===null)n=null;else if(s=o.tag,s===13){if(n=Of(o),n!==null)return n;n=null}else if(s===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;n=null}else o!==n&&(n=null);return Al=n,null}function tp(n){switch(n){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"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 1;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"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(M1()){case Va:return 1;case Hf:return 4;case El:case B1:return 16;case Wf:return 536870912;default:return 16}default:return 16}}var cr=null,Ya=null,Ll=null;function np(){if(Ll)return Ll;var n,o=Ya,s=o.length,c,y="value"in cr?cr.value:cr.textContent,x=y.length;for(n=0;n<s&&o[n]===y[n];n++);var b=s-n;for(c=1;c<=b&&o[s-c]===y[x-c];c++);return Ll=y.slice(n,1<c?1-c:void 0)}function zl(n){var o=n.keyCode;return"charCode"in n?(n=n.charCode,n===0&&o===13&&(n=13)):n=o,n===10&&(n=13),32<=n||n===13?n:0}function Fl(){return!0}function rp(){return!1}function tn(n){function o(s,c,y,x,b){this._reactName=s,this._targetInst=y,this.type=c,this.nativeEvent=x,this.target=b,this.currentTarget=null;for(var R in n)n.hasOwnProperty(R)&&(s=n[R],this[R]=s?s(x):x[R]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?Fl:rp,this.isPropagationStopped=rp,this}return T(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Fl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Fl)},persist:function(){},isPersistent:Fl}),o}var mo={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(n){return n.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Xa=tn(mo),xi=T({},mo,{view:0,detail:0}),ew=tn(xi),Za,eu,vi,_l=T({},xi,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:nu,button:0,buttons:0,relatedTarget:function(n){return n.relatedTarget===void 0?n.fromElement===n.srcElement?n.toElement:n.fromElement:n.relatedTarget},movementX:function(n){return"movementX"in n?n.movementX:(n!==vi&&(vi&&n.type==="mousemove"?(Za=n.screenX-vi.screenX,eu=n.screenY-vi.screenY):eu=Za=0,vi=n),Za)},movementY:function(n){return"movementY"in n?n.movementY:eu}}),op=tn(_l),tw=T({},_l,{dataTransfer:0}),nw=tn(tw),rw=T({},xi,{relatedTarget:0}),tu=tn(rw),ow=T({},mo,{animationName:0,elapsedTime:0,pseudoElement:0}),iw=tn(ow),lw=T({},mo,{clipboardData:function(n){return"clipboardData"in n?n.clipboardData:window.clipboardData}}),sw=tn(lw),aw=T({},mo,{data:0}),ip=tn(aw),uw={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},cw={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"},dw={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function fw(n){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(n):(n=dw[n])?!!o[n]:!1}function nu(){return fw}var pw=T({},xi,{key:function(n){if(n.key){var o=uw[n.key]||n.key;if(o!=="Unidentified")return o}return n.type==="keypress"?(n=zl(n),n===13?"Enter":String.fromCharCode(n)):n.type==="keydown"||n.type==="keyup"?cw[n.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:nu,charCode:function(n){return n.type==="keypress"?zl(n):0},keyCode:function(n){return n.type==="keydown"||n.type==="keyup"?n.keyCode:0},which:function(n){return n.type==="keypress"?zl(n):n.type==="keydown"||n.type==="keyup"?n.keyCode:0}}),hw=tn(pw),mw=T({},_l,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),lp=tn(mw),gw=T({},xi,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:nu}),yw=tn(gw),xw=T({},mo,{propertyName:0,elapsedTime:0,pseudoElement:0}),vw=tn(xw),ww=T({},_l,{deltaX:function(n){return"deltaX"in n?n.deltaX:"wheelDeltaX"in n?-n.wheelDeltaX:0},deltaY:function(n){return"deltaY"in n?n.deltaY:"wheelDeltaY"in n?-n.wheelDeltaY:"wheelDelta"in n?-n.wheelDelta:0},deltaZ:0,deltaMode:0}),kw=tn(ww),bw=[9,13,27,32],ru=d&&"CompositionEvent"in window,wi=null;d&&"documentMode"in document&&(wi=document.documentMode);var Sw=d&&"TextEvent"in window&&!wi,sp=d&&(!ru||wi&&8<wi&&11>=wi),ap=" ",up=!1;function cp(n,o){switch(n){case"keyup":return bw.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function dp(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var go=!1;function Cw(n,o){switch(n){case"compositionend":return dp(o);case"keypress":return o.which!==32?null:(up=!0,ap);case"textInput":return n=o.data,n===ap&&up?null:n;default:return null}}function Ew(n,o){if(go)return n==="compositionend"||!ru&&cp(n,o)?(n=np(),Ll=Ya=cr=null,go=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return sp&&o.locale!=="ko"?null:o.data;default:return null}}var jw={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function fp(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o==="input"?!!jw[n.type]:o==="textarea"}function pp(n,o,s,c){Af(c),o=Ul(o,"onChange"),0<o.length&&(s=new Xa("onChange","change",null,s,c),n.push({event:s,listeners:o}))}var ki=null,bi=null;function Tw(n){Pp(n,0)}function Ol(n){var o=ko(n);if(Ie(o))return n}function $w(n,o){if(n==="change")return o}var hp=!1;if(d){var ou;if(d){var iu="oninput"in document;if(!iu){var mp=document.createElement("div");mp.setAttribute("oninput","return;"),iu=typeof mp.oninput=="function"}ou=iu}else ou=!1;hp=ou&&(!document.documentMode||9<document.documentMode)}function gp(){ki&&(ki.detachEvent("onpropertychange",yp),bi=ki=null)}function yp(n){if(n.propertyName==="value"&&Ol(bi)){var o=[];pp(o,bi,n,Oa(n)),_f(Tw,o)}}function Iw(n,o,s){n==="focusin"?(gp(),ki=o,bi=s,ki.attachEvent("onpropertychange",yp)):n==="focusout"&&gp()}function Rw(n){if(n==="selectionchange"||n==="keyup"||n==="keydown")return Ol(bi)}function Pw(n,o){if(n==="click")return Ol(o)}function Nw(n,o){if(n==="input"||n==="change")return Ol(o)}function Aw(n,o){return n===o&&(n!==0||1/n===1/o)||n!==n&&o!==o}var Sn=typeof Object.is=="function"?Object.is:Aw;function Si(n,o){if(Sn(n,o))return!0;if(typeof n!="object"||n===null||typeof o!="object"||o===null)return!1;var s=Object.keys(n),c=Object.keys(o);if(s.length!==c.length)return!1;for(c=0;c<s.length;c++){var y=s[c];if(!f.call(o,y)||!Sn(n[y],o[y]))return!1}return!0}function xp(n){for(;n&&n.firstChild;)n=n.firstChild;return n}function vp(n,o){var s=xp(n);n=0;for(var c;s;){if(s.nodeType===3){if(c=n+s.textContent.length,n<=o&&c>=o)return{node:s,offset:o-n};n=c}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=xp(s)}}function wp(n,o){return n&&o?n===o?!0:n&&n.nodeType===3?!1:o&&o.nodeType===3?wp(n,o.parentNode):"contains"in n?n.contains(o):n.compareDocumentPosition?!!(n.compareDocumentPosition(o)&16):!1:!1}function kp(){for(var n=window,o=Ge();o instanceof n.HTMLIFrameElement;){try{var s=typeof o.contentWindow.location.href=="string"}catch{s=!1}if(s)n=o.contentWindow;else break;o=Ge(n.document)}return o}function lu(n){var o=n&&n.nodeName&&n.nodeName.toLowerCase();return o&&(o==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||o==="textarea"||n.contentEditable==="true")}function Lw(n){var o=kp(),s=n.focusedElem,c=n.selectionRange;if(o!==s&&s&&s.ownerDocument&&wp(s.ownerDocument.documentElement,s)){if(c!==null&&lu(s)){if(o=c.start,n=c.end,n===void 0&&(n=o),"selectionStart"in s)s.selectionStart=o,s.selectionEnd=Math.min(n,s.value.length);else if(n=(o=s.ownerDocument||document)&&o.defaultView||window,n.getSelection){n=n.getSelection();var y=s.textContent.length,x=Math.min(c.start,y);c=c.end===void 0?x:Math.min(c.end,y),!n.extend&&x>c&&(y=c,c=x,x=y),y=vp(s,x);var b=vp(s,c);y&&b&&(n.rangeCount!==1||n.anchorNode!==y.node||n.anchorOffset!==y.offset||n.focusNode!==b.node||n.focusOffset!==b.offset)&&(o=o.createRange(),o.setStart(y.node,y.offset),n.removeAllRanges(),x>c?(n.addRange(o),n.extend(b.node,b.offset)):(o.setEnd(b.node,b.offset),n.addRange(o)))}}for(o=[],n=s;n=n.parentNode;)n.nodeType===1&&o.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof s.focus=="function"&&s.focus(),s=0;s<o.length;s++)n=o[s],n.element.scrollLeft=n.left,n.element.scrollTop=n.top}}var zw=d&&"documentMode"in document&&11>=document.documentMode,yo=null,su=null,Ci=null,au=!1;function bp(n,o,s){var c=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;au||yo==null||yo!==Ge(c)||(c=yo,"selectionStart"in c&&lu(c)?c={start:c.selectionStart,end:c.selectionEnd}:(c=(c.ownerDocument&&c.ownerDocument.defaultView||window).getSelection(),c={anchorNode:c.anchorNode,anchorOffset:c.anchorOffset,focusNode:c.focusNode,focusOffset:c.focusOffset}),Ci&&Si(Ci,c)||(Ci=c,c=Ul(su,"onSelect"),0<c.length&&(o=new Xa("onSelect","select",null,o,s),n.push({event:o,listeners:c}),o.target=yo)))}function Dl(n,o){var s={};return s[n.toLowerCase()]=o.toLowerCase(),s["Webkit"+n]="webkit"+o,s["Moz"+n]="moz"+o,s}var xo={animationend:Dl("Animation","AnimationEnd"),animationiteration:Dl("Animation","AnimationIteration"),animationstart:Dl("Animation","AnimationStart"),transitionend:Dl("Transition","TransitionEnd")},uu={},Sp={};d&&(Sp=document.createElement("div").style,"AnimationEvent"in window||(delete xo.animationend.animation,delete xo.animationiteration.animation,delete xo.animationstart.animation),"TransitionEvent"in window||delete xo.transitionend.transition);function Ml(n){if(uu[n])return uu[n];if(!xo[n])return n;var o=xo[n],s;for(s in o)if(o.hasOwnProperty(s)&&s in Sp)return uu[n]=o[s];return n}var Cp=Ml("animationend"),Ep=Ml("animationiteration"),jp=Ml("animationstart"),Tp=Ml("transitionend"),$p=new Map,Ip="abort auxClick 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(" ");function dr(n,o){$p.set(n,o),a(o,[n])}for(var cu=0;cu<Ip.length;cu++){var du=Ip[cu],Fw=du.toLowerCase(),_w=du[0].toUpperCase()+du.slice(1);dr(Fw,"on"+_w)}dr(Cp,"onAnimationEnd"),dr(Ep,"onAnimationIteration"),dr(jp,"onAnimationStart"),dr("dblclick","onDoubleClick"),dr("focusin","onFocus"),dr("focusout","onBlur"),dr(Tp,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Ei="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(" "),Ow=new Set("cancel close invalid load scroll toggle".split(" ").concat(Ei));function Rp(n,o,s){var c=n.type||"unknown-event";n.currentTarget=s,F1(c,o,void 0,n),n.currentTarget=null}function Pp(n,o){o=(o&4)!==0;for(var s=0;s<n.length;s++){var c=n[s],y=c.event;c=c.listeners;e:{var x=void 0;if(o)for(var b=c.length-1;0<=b;b--){var R=c[b],L=R.instance,U=R.currentTarget;if(R=R.listener,L!==x&&y.isPropagationStopped())break e;Rp(y,R,U),x=L}else for(b=0;b<c.length;b++){if(R=c[b],L=R.instance,U=R.currentTarget,R=R.listener,L!==x&&y.isPropagationStopped())break e;Rp(y,R,U),x=L}}}if(Cl)throw n=Ua,Cl=!1,Ua=null,n}function Xe(n,o){var s=o[vu];s===void 0&&(s=o[vu]=new Set);var c=n+"__bubble";s.has(c)||(Np(o,n,2,!1),s.add(c))}function fu(n,o,s){var c=0;o&&(c|=4),Np(s,n,c,o)}var Bl="_reactListening"+Math.random().toString(36).slice(2);function ji(n){if(!n[Bl]){n[Bl]=!0,i.forEach(function(s){s!=="selectionchange"&&(Ow.has(s)||fu(s,!1,n),fu(s,!0,n))});var o=n.nodeType===9?n:n.ownerDocument;o===null||o[Bl]||(o[Bl]=!0,fu("selectionchange",!1,o))}}function Np(n,o,s,c){switch(tp(o)){case 1:var y=X1;break;case 4:y=Z1;break;default:y=Ka}s=y.bind(null,o,s,n),y=void 0,!Ba||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(y=!0),c?y!==void 0?n.addEventListener(o,s,{capture:!0,passive:y}):n.addEventListener(o,s,!0):y!==void 0?n.addEventListener(o,s,{passive:y}):n.addEventListener(o,s,!1)}function pu(n,o,s,c,y){var x=c;if((o&1)===0&&(o&2)===0&&c!==null)e:for(;;){if(c===null)return;var b=c.tag;if(b===3||b===4){var R=c.stateNode.containerInfo;if(R===y||R.nodeType===8&&R.parentNode===y)break;if(b===4)for(b=c.return;b!==null;){var L=b.tag;if((L===3||L===4)&&(L=b.stateNode.containerInfo,L===y||L.nodeType===8&&L.parentNode===y))return;b=b.return}for(;R!==null;){if(b=Fr(R),b===null)return;if(L=b.tag,L===5||L===6){c=x=b;continue e}R=R.parentNode}}c=c.return}_f(function(){var U=x,ee=Oa(s),oe=[];e:{var Y=$p.get(n);if(Y!==void 0){var me=Xa,ye=n;switch(n){case"keypress":if(zl(s)===0)break e;case"keydown":case"keyup":me=hw;break;case"focusin":ye="focus",me=tu;break;case"focusout":ye="blur",me=tu;break;case"beforeblur":case"afterblur":me=tu;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":me=op;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":me=nw;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":me=yw;break;case Cp:case Ep:case jp:me=iw;break;case Tp:me=vw;break;case"scroll":me=ew;break;case"wheel":me=kw;break;case"copy":case"cut":case"paste":me=sw;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":me=lp}var we=(o&4)!==0,st=!we&&n==="scroll",D=we?Y!==null?Y+"Capture":null:Y;we=[];for(var F=U,M;F!==null;){M=F;var ue=M.stateNode;if(M.tag===5&&ue!==null&&(M=ue,D!==null&&(ue=ai(F,D),ue!=null&&we.push(Ti(F,ue,M)))),st)break;F=F.return}0<we.length&&(Y=new me(Y,ye,null,s,ee),oe.push({event:Y,listeners:we}))}}if((o&7)===0){e:{if(Y=n==="mouseover"||n==="pointerover",me=n==="mouseout"||n==="pointerout",Y&&s!==en&&(ye=s.relatedTarget||s.fromElement)&&(Fr(ye)||ye[Gn]))break e;if((me||Y)&&(Y=ee.window===ee?ee:(Y=ee.ownerDocument)?Y.defaultView||Y.parentWindow:window,me?(ye=s.relatedTarget||s.toElement,me=U,ye=ye?Fr(ye):null,ye!==null&&(st=zr(ye),ye!==st||ye.tag!==5&&ye.tag!==6)&&(ye=null)):(me=null,ye=U),me!==ye)){if(we=op,ue="onMouseLeave",D="onMouseEnter",F="mouse",(n==="pointerout"||n==="pointerover")&&(we=lp,ue="onPointerLeave",D="onPointerEnter",F="pointer"),st=me==null?Y:ko(me),M=ye==null?Y:ko(ye),Y=new we(ue,F+"leave",me,s,ee),Y.target=st,Y.relatedTarget=M,ue=null,Fr(ee)===U&&(we=new we(D,F+"enter",ye,s,ee),we.target=M,we.relatedTarget=st,ue=we),st=ue,me&&ye)t:{for(we=me,D=ye,F=0,M=we;M;M=vo(M))F++;for(M=0,ue=D;ue;ue=vo(ue))M++;for(;0<F-M;)we=vo(we),F--;for(;0<M-F;)D=vo(D),M--;for(;F--;){if(we===D||D!==null&&we===D.alternate)break t;we=vo(we),D=vo(D)}we=null}else we=null;me!==null&&Ap(oe,Y,me,we,!1),ye!==null&&st!==null&&Ap(oe,st,ye,we,!0)}}e:{if(Y=U?ko(U):window,me=Y.nodeName&&Y.nodeName.toLowerCase(),me==="select"||me==="input"&&Y.type==="file")var be=$w;else if(fp(Y))if(hp)be=Nw;else{be=Rw;var Ce=Iw}else(me=Y.nodeName)&&me.toLowerCase()==="input"&&(Y.type==="checkbox"||Y.type==="radio")&&(be=Pw);if(be&&(be=be(n,U))){pp(oe,be,s,ee);break e}Ce&&Ce(n,Y,U),n==="focusout"&&(Ce=Y._wrapperState)&&Ce.controlled&&Y.type==="number"&&Ft(Y,"number",Y.value)}switch(Ce=U?ko(U):window,n){case"focusin":(fp(Ce)||Ce.contentEditable==="true")&&(yo=Ce,su=U,Ci=null);break;case"focusout":Ci=su=yo=null;break;case"mousedown":au=!0;break;case"contextmenu":case"mouseup":case"dragend":au=!1,bp(oe,s,ee);break;case"selectionchange":if(zw)break;case"keydown":case"keyup":bp(oe,s,ee)}var Ee;if(ru)e:{switch(n){case"compositionstart":var Te="onCompositionStart";break e;case"compositionend":Te="onCompositionEnd";break e;case"compositionupdate":Te="onCompositionUpdate";break e}Te=void 0}else go?cp(n,s)&&(Te="onCompositionEnd"):n==="keydown"&&s.keyCode===229&&(Te="onCompositionStart");Te&&(sp&&s.locale!=="ko"&&(go||Te!=="onCompositionStart"?Te==="onCompositionEnd"&&go&&(Ee=np()):(cr=ee,Ya="value"in cr?cr.value:cr.textContent,go=!0)),Ce=Ul(U,Te),0<Ce.length&&(Te=new ip(Te,n,null,s,ee),oe.push({event:Te,listeners:Ce}),Ee?Te.data=Ee:(Ee=dp(s),Ee!==null&&(Te.data=Ee)))),(Ee=Sw?Cw(n,s):Ew(n,s))&&(U=Ul(U,"onBeforeInput"),0<U.length&&(ee=new ip("onBeforeInput","beforeinput",null,s,ee),oe.push({event:ee,listeners:U}),ee.data=Ee))}Pp(oe,o)})}function Ti(n,o,s){return{instance:n,listener:o,currentTarget:s}}function Ul(n,o){for(var s=o+"Capture",c=[];n!==null;){var y=n,x=y.stateNode;y.tag===5&&x!==null&&(y=x,x=ai(n,s),x!=null&&c.unshift(Ti(n,x,y)),x=ai(n,o),x!=null&&c.push(Ti(n,x,y))),n=n.return}return c}function vo(n){if(n===null)return null;do n=n.return;while(n&&n.tag!==5);return n||null}function Ap(n,o,s,c,y){for(var x=o._reactName,b=[];s!==null&&s!==c;){var R=s,L=R.alternate,U=R.stateNode;if(L!==null&&L===c)break;R.tag===5&&U!==null&&(R=U,y?(L=ai(s,x),L!=null&&b.unshift(Ti(s,L,R))):y||(L=ai(s,x),L!=null&&b.push(Ti(s,L,R)))),s=s.return}b.length!==0&&n.push({event:o,listeners:b})}var Dw=/\r\n?/g,Mw=/\u0000|\uFFFD/g;function Lp(n){return(typeof n=="string"?n:""+n).replace(Dw,`
30
+ `).replace(Mw,"")}function Vl(n,o,s){if(o=Lp(o),Lp(n)!==o&&s)throw Error(r(425))}function Hl(){}var hu=null,mu=null;function gu(n,o){return n==="textarea"||n==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var yu=typeof setTimeout=="function"?setTimeout:void 0,Bw=typeof clearTimeout=="function"?clearTimeout:void 0,zp=typeof Promise=="function"?Promise:void 0,Uw=typeof queueMicrotask=="function"?queueMicrotask:typeof zp<"u"?function(n){return zp.resolve(null).then(n).catch(Vw)}:yu;function Vw(n){setTimeout(function(){throw n})}function xu(n,o){var s=o,c=0;do{var y=s.nextSibling;if(n.removeChild(s),y&&y.nodeType===8)if(s=y.data,s==="/$"){if(c===0){n.removeChild(y),yi(o);return}c--}else s!=="$"&&s!=="$?"&&s!=="$!"||c++;s=y}while(s);yi(o)}function fr(n){for(;n!=null;n=n.nextSibling){var o=n.nodeType;if(o===1||o===3)break;if(o===8){if(o=n.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return n}function Fp(n){n=n.previousSibling;for(var o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="$"||s==="$!"||s==="$?"){if(o===0)return n;o--}else s==="/$"&&o++}n=n.previousSibling}return null}var wo=Math.random().toString(36).slice(2),zn="__reactFiber$"+wo,$i="__reactProps$"+wo,Gn="__reactContainer$"+wo,vu="__reactEvents$"+wo,Hw="__reactListeners$"+wo,Ww="__reactHandles$"+wo;function Fr(n){var o=n[zn];if(o)return o;for(var s=n.parentNode;s;){if(o=s[Gn]||s[zn]){if(s=o.alternate,o.child!==null||s!==null&&s.child!==null)for(n=Fp(n);n!==null;){if(s=n[zn])return s;n=Fp(n)}return o}n=s,s=n.parentNode}return null}function Ii(n){return n=n[zn]||n[Gn],!n||n.tag!==5&&n.tag!==6&&n.tag!==13&&n.tag!==3?null:n}function ko(n){if(n.tag===5||n.tag===6)return n.stateNode;throw Error(r(33))}function Wl(n){return n[$i]||null}var wu=[],bo=-1;function pr(n){return{current:n}}function Ze(n){0>bo||(n.current=wu[bo],wu[bo]=null,bo--)}function Ke(n,o){bo++,wu[bo]=n.current,n.current=o}var hr={},$t=pr(hr),Ut=pr(!1),_r=hr;function So(n,o){var s=n.type.contextTypes;if(!s)return hr;var c=n.stateNode;if(c&&c.__reactInternalMemoizedUnmaskedChildContext===o)return c.__reactInternalMemoizedMaskedChildContext;var y={},x;for(x in s)y[x]=o[x];return c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=o,n.__reactInternalMemoizedMaskedChildContext=y),y}function Vt(n){return n=n.childContextTypes,n!=null}function ql(){Ze(Ut),Ze($t)}function _p(n,o,s){if($t.current!==hr)throw Error(r(168));Ke($t,o),Ke(Ut,s)}function Op(n,o,s){var c=n.stateNode;if(o=o.childContextTypes,typeof c.getChildContext!="function")return s;c=c.getChildContext();for(var y in c)if(!(y in o))throw Error(r(108,he(n)||"Unknown",y));return T({},s,c)}function Gl(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||hr,_r=$t.current,Ke($t,n),Ke(Ut,Ut.current),!0}function Dp(n,o,s){var c=n.stateNode;if(!c)throw Error(r(169));s?(n=Op(n,o,_r),c.__reactInternalMemoizedMergedChildContext=n,Ze(Ut),Ze($t),Ke($t,n)):Ze(Ut),Ke(Ut,s)}var Jn=null,Jl=!1,ku=!1;function Mp(n){Jn===null?Jn=[n]:Jn.push(n)}function qw(n){Jl=!0,Mp(n)}function mr(){if(!ku&&Jn!==null){ku=!0;var n=0,o=We;try{var s=Jn;for(We=1;n<s.length;n++){var c=s[n];do c=c(!0);while(c!==null)}Jn=null,Jl=!1}catch(y){throw Jn!==null&&(Jn=Jn.slice(n+1)),Uf(Va,mr),y}finally{We=o,ku=!1}}return null}var Co=[],Eo=0,Kl=null,Ql=0,pn=[],hn=0,Or=null,Kn=1,Qn="";function Dr(n,o){Co[Eo++]=Ql,Co[Eo++]=Kl,Kl=n,Ql=o}function Bp(n,o,s){pn[hn++]=Kn,pn[hn++]=Qn,pn[hn++]=Or,Or=n;var c=Kn;n=Qn;var y=32-bn(c)-1;c&=~(1<<y),s+=1;var x=32-bn(o)+y;if(30<x){var b=y-y%5;x=(c&(1<<b)-1).toString(32),c>>=b,y-=b,Kn=1<<32-bn(o)+y|s<<y|c,Qn=x+n}else Kn=1<<x|s<<y|c,Qn=n}function bu(n){n.return!==null&&(Dr(n,1),Bp(n,1,0))}function Su(n){for(;n===Kl;)Kl=Co[--Eo],Co[Eo]=null,Ql=Co[--Eo],Co[Eo]=null;for(;n===Or;)Or=pn[--hn],pn[hn]=null,Qn=pn[--hn],pn[hn]=null,Kn=pn[--hn],pn[hn]=null}var nn=null,rn=null,tt=!1,Cn=null;function Up(n,o){var s=xn(5,null,null,0);s.elementType="DELETED",s.stateNode=o,s.return=n,o=n.deletions,o===null?(n.deletions=[s],n.flags|=16):o.push(s)}function Vp(n,o){switch(n.tag){case 5:var s=n.type;return o=o.nodeType!==1||s.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(n.stateNode=o,nn=n,rn=fr(o.firstChild),!0):!1;case 6:return o=n.pendingProps===""||o.nodeType!==3?null:o,o!==null?(n.stateNode=o,nn=n,rn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(s=Or!==null?{id:Kn,overflow:Qn}:null,n.memoizedState={dehydrated:o,treeContext:s,retryLane:1073741824},s=xn(18,null,null,0),s.stateNode=o,s.return=n,n.child=s,nn=n,rn=null,!0):!1;default:return!1}}function Cu(n){return(n.mode&1)!==0&&(n.flags&128)===0}function Eu(n){if(tt){var o=rn;if(o){var s=o;if(!Vp(n,o)){if(Cu(n))throw Error(r(418));o=fr(s.nextSibling);var c=nn;o&&Vp(n,o)?Up(c,s):(n.flags=n.flags&-4097|2,tt=!1,nn=n)}}else{if(Cu(n))throw Error(r(418));n.flags=n.flags&-4097|2,tt=!1,nn=n}}}function Hp(n){for(n=n.return;n!==null&&n.tag!==5&&n.tag!==3&&n.tag!==13;)n=n.return;nn=n}function Yl(n){if(n!==nn)return!1;if(!tt)return Hp(n),tt=!0,!1;var o;if((o=n.tag!==3)&&!(o=n.tag!==5)&&(o=n.type,o=o!=="head"&&o!=="body"&&!gu(n.type,n.memoizedProps)),o&&(o=rn)){if(Cu(n))throw Wp(),Error(r(418));for(;o;)Up(n,o),o=fr(o.nextSibling)}if(Hp(n),n.tag===13){if(n=n.memoizedState,n=n!==null?n.dehydrated:null,!n)throw Error(r(317));e:{for(n=n.nextSibling,o=0;n;){if(n.nodeType===8){var s=n.data;if(s==="/$"){if(o===0){rn=fr(n.nextSibling);break e}o--}else s!=="$"&&s!=="$!"&&s!=="$?"||o++}n=n.nextSibling}rn=null}}else rn=nn?fr(n.stateNode.nextSibling):null;return!0}function Wp(){for(var n=rn;n;)n=fr(n.nextSibling)}function jo(){rn=nn=null,tt=!1}function ju(n){Cn===null?Cn=[n]:Cn.push(n)}var Gw=_.ReactCurrentBatchConfig;function Ri(n,o,s){if(n=s.ref,n!==null&&typeof n!="function"&&typeof n!="object"){if(s._owner){if(s=s._owner,s){if(s.tag!==1)throw Error(r(309));var c=s.stateNode}if(!c)throw Error(r(147,n));var y=c,x=""+n;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===x?o.ref:(o=function(b){var R=y.refs;b===null?delete R[x]:R[x]=b},o._stringRef=x,o)}if(typeof n!="string")throw Error(r(284));if(!s._owner)throw Error(r(290,n))}return n}function Xl(n,o){throw n=Object.prototype.toString.call(o),Error(r(31,n==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":n))}function qp(n){var o=n._init;return o(n._payload)}function Gp(n){function o(D,F){if(n){var M=D.deletions;M===null?(D.deletions=[F],D.flags|=16):M.push(F)}}function s(D,F){if(!n)return null;for(;F!==null;)o(D,F),F=F.sibling;return null}function c(D,F){for(D=new Map;F!==null;)F.key!==null?D.set(F.key,F):D.set(F.index,F),F=F.sibling;return D}function y(D,F){return D=Sr(D,F),D.index=0,D.sibling=null,D}function x(D,F,M){return D.index=M,n?(M=D.alternate,M!==null?(M=M.index,M<F?(D.flags|=2,F):M):(D.flags|=2,F)):(D.flags|=1048576,F)}function b(D){return n&&D.alternate===null&&(D.flags|=2),D}function R(D,F,M,ue){return F===null||F.tag!==6?(F=yc(M,D.mode,ue),F.return=D,F):(F=y(F,M),F.return=D,F)}function L(D,F,M,ue){var be=M.type;return be===H?ee(D,F,M.props.children,ue,M.key):F!==null&&(F.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===pe&&qp(be)===F.type)?(ue=y(F,M.props),ue.ref=Ri(D,F,M),ue.return=D,ue):(ue=bs(M.type,M.key,M.props,null,D.mode,ue),ue.ref=Ri(D,F,M),ue.return=D,ue)}function U(D,F,M,ue){return F===null||F.tag!==4||F.stateNode.containerInfo!==M.containerInfo||F.stateNode.implementation!==M.implementation?(F=xc(M,D.mode,ue),F.return=D,F):(F=y(F,M.children||[]),F.return=D,F)}function ee(D,F,M,ue,be){return F===null||F.tag!==7?(F=Gr(M,D.mode,ue,be),F.return=D,F):(F=y(F,M),F.return=D,F)}function oe(D,F,M){if(typeof F=="string"&&F!==""||typeof F=="number")return F=yc(""+F,D.mode,M),F.return=D,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case q:return M=bs(F.type,F.key,F.props,null,D.mode,M),M.ref=Ri(D,null,F),M.return=D,M;case A:return F=xc(F,D.mode,M),F.return=D,F;case pe:var ue=F._init;return oe(D,ue(F._payload),M)}if(Zt(F)||de(F))return F=Gr(F,D.mode,M,null),F.return=D,F;Xl(D,F)}return null}function Y(D,F,M,ue){var be=F!==null?F.key:null;if(typeof M=="string"&&M!==""||typeof M=="number")return be!==null?null:R(D,F,""+M,ue);if(typeof M=="object"&&M!==null){switch(M.$$typeof){case q:return M.key===be?L(D,F,M,ue):null;case A:return M.key===be?U(D,F,M,ue):null;case pe:return be=M._init,Y(D,F,be(M._payload),ue)}if(Zt(M)||de(M))return be!==null?null:ee(D,F,M,ue,null);Xl(D,M)}return null}function me(D,F,M,ue,be){if(typeof ue=="string"&&ue!==""||typeof ue=="number")return D=D.get(M)||null,R(F,D,""+ue,be);if(typeof ue=="object"&&ue!==null){switch(ue.$$typeof){case q:return D=D.get(ue.key===null?M:ue.key)||null,L(F,D,ue,be);case A:return D=D.get(ue.key===null?M:ue.key)||null,U(F,D,ue,be);case pe:var Ce=ue._init;return me(D,F,M,Ce(ue._payload),be)}if(Zt(ue)||de(ue))return D=D.get(M)||null,ee(F,D,ue,be,null);Xl(F,ue)}return null}function ye(D,F,M,ue){for(var be=null,Ce=null,Ee=F,Te=F=0,yt=null;Ee!==null&&Te<M.length;Te++){Ee.index>Te?(yt=Ee,Ee=null):yt=Ee.sibling;var Ue=Y(D,Ee,M[Te],ue);if(Ue===null){Ee===null&&(Ee=yt);break}n&&Ee&&Ue.alternate===null&&o(D,Ee),F=x(Ue,F,Te),Ce===null?be=Ue:Ce.sibling=Ue,Ce=Ue,Ee=yt}if(Te===M.length)return s(D,Ee),tt&&Dr(D,Te),be;if(Ee===null){for(;Te<M.length;Te++)Ee=oe(D,M[Te],ue),Ee!==null&&(F=x(Ee,F,Te),Ce===null?be=Ee:Ce.sibling=Ee,Ce=Ee);return tt&&Dr(D,Te),be}for(Ee=c(D,Ee);Te<M.length;Te++)yt=me(Ee,D,Te,M[Te],ue),yt!==null&&(n&&yt.alternate!==null&&Ee.delete(yt.key===null?Te:yt.key),F=x(yt,F,Te),Ce===null?be=yt:Ce.sibling=yt,Ce=yt);return n&&Ee.forEach(function(Cr){return o(D,Cr)}),tt&&Dr(D,Te),be}function we(D,F,M,ue){var be=de(M);if(typeof be!="function")throw Error(r(150));if(M=be.call(M),M==null)throw Error(r(151));for(var Ce=be=null,Ee=F,Te=F=0,yt=null,Ue=M.next();Ee!==null&&!Ue.done;Te++,Ue=M.next()){Ee.index>Te?(yt=Ee,Ee=null):yt=Ee.sibling;var Cr=Y(D,Ee,Ue.value,ue);if(Cr===null){Ee===null&&(Ee=yt);break}n&&Ee&&Cr.alternate===null&&o(D,Ee),F=x(Cr,F,Te),Ce===null?be=Cr:Ce.sibling=Cr,Ce=Cr,Ee=yt}if(Ue.done)return s(D,Ee),tt&&Dr(D,Te),be;if(Ee===null){for(;!Ue.done;Te++,Ue=M.next())Ue=oe(D,Ue.value,ue),Ue!==null&&(F=x(Ue,F,Te),Ce===null?be=Ue:Ce.sibling=Ue,Ce=Ue);return tt&&Dr(D,Te),be}for(Ee=c(D,Ee);!Ue.done;Te++,Ue=M.next())Ue=me(Ee,D,Te,Ue.value,ue),Ue!==null&&(n&&Ue.alternate!==null&&Ee.delete(Ue.key===null?Te:Ue.key),F=x(Ue,F,Te),Ce===null?be=Ue:Ce.sibling=Ue,Ce=Ue);return n&&Ee.forEach(function(jk){return o(D,jk)}),tt&&Dr(D,Te),be}function st(D,F,M,ue){if(typeof M=="object"&&M!==null&&M.type===H&&M.key===null&&(M=M.props.children),typeof M=="object"&&M!==null){switch(M.$$typeof){case q:e:{for(var be=M.key,Ce=F;Ce!==null;){if(Ce.key===be){if(be=M.type,be===H){if(Ce.tag===7){s(D,Ce.sibling),F=y(Ce,M.props.children),F.return=D,D=F;break e}}else if(Ce.elementType===be||typeof be=="object"&&be!==null&&be.$$typeof===pe&&qp(be)===Ce.type){s(D,Ce.sibling),F=y(Ce,M.props),F.ref=Ri(D,Ce,M),F.return=D,D=F;break e}s(D,Ce);break}else o(D,Ce);Ce=Ce.sibling}M.type===H?(F=Gr(M.props.children,D.mode,ue,M.key),F.return=D,D=F):(ue=bs(M.type,M.key,M.props,null,D.mode,ue),ue.ref=Ri(D,F,M),ue.return=D,D=ue)}return b(D);case A:e:{for(Ce=M.key;F!==null;){if(F.key===Ce)if(F.tag===4&&F.stateNode.containerInfo===M.containerInfo&&F.stateNode.implementation===M.implementation){s(D,F.sibling),F=y(F,M.children||[]),F.return=D,D=F;break e}else{s(D,F);break}else o(D,F);F=F.sibling}F=xc(M,D.mode,ue),F.return=D,D=F}return b(D);case pe:return Ce=M._init,st(D,F,Ce(M._payload),ue)}if(Zt(M))return ye(D,F,M,ue);if(de(M))return we(D,F,M,ue);Xl(D,M)}return typeof M=="string"&&M!==""||typeof M=="number"?(M=""+M,F!==null&&F.tag===6?(s(D,F.sibling),F=y(F,M),F.return=D,D=F):(s(D,F),F=yc(M,D.mode,ue),F.return=D,D=F),b(D)):s(D,F)}return st}var To=Gp(!0),Jp=Gp(!1),Zl=pr(null),es=null,$o=null,Tu=null;function $u(){Tu=$o=es=null}function Iu(n){var o=Zl.current;Ze(Zl),n._currentValue=o}function Ru(n,o,s){for(;n!==null;){var c=n.alternate;if((n.childLanes&o)!==o?(n.childLanes|=o,c!==null&&(c.childLanes|=o)):c!==null&&(c.childLanes&o)!==o&&(c.childLanes|=o),n===s)break;n=n.return}}function Io(n,o){es=n,Tu=$o=null,n=n.dependencies,n!==null&&n.firstContext!==null&&((n.lanes&o)!==0&&(Ht=!0),n.firstContext=null)}function mn(n){var o=n._currentValue;if(Tu!==n)if(n={context:n,memoizedValue:o,next:null},$o===null){if(es===null)throw Error(r(308));$o=n,es.dependencies={lanes:0,firstContext:n}}else $o=$o.next=n;return o}var Mr=null;function Pu(n){Mr===null?Mr=[n]:Mr.push(n)}function Kp(n,o,s,c){var y=o.interleaved;return y===null?(s.next=s,Pu(o)):(s.next=y.next,y.next=s),o.interleaved=s,Yn(n,c)}function Yn(n,o){n.lanes|=o;var s=n.alternate;for(s!==null&&(s.lanes|=o),s=n,n=n.return;n!==null;)n.childLanes|=o,s=n.alternate,s!==null&&(s.childLanes|=o),s=n,n=n.return;return s.tag===3?s.stateNode:null}var gr=!1;function Nu(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Qp(n,o){n=n.updateQueue,o.updateQueue===n&&(o.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Xn(n,o){return{eventTime:n,lane:o,tag:0,payload:null,callback:null,next:null}}function yr(n,o,s){var c=n.updateQueue;if(c===null)return null;if(c=c.shared,(Be&2)!==0){var y=c.pending;return y===null?o.next=o:(o.next=y.next,y.next=o),c.pending=o,Yn(n,s)}return y=c.interleaved,y===null?(o.next=o,Pu(c)):(o.next=y.next,y.next=o),c.interleaved=o,Yn(n,s)}function ts(n,o,s){if(o=o.updateQueue,o!==null&&(o=o.shared,(s&4194240)!==0)){var c=o.lanes;c&=n.pendingLanes,s|=c,o.lanes=s,qa(n,s)}}function Yp(n,o){var s=n.updateQueue,c=n.alternate;if(c!==null&&(c=c.updateQueue,s===c)){var y=null,x=null;if(s=s.firstBaseUpdate,s!==null){do{var b={eventTime:s.eventTime,lane:s.lane,tag:s.tag,payload:s.payload,callback:s.callback,next:null};x===null?y=x=b:x=x.next=b,s=s.next}while(s!==null);x===null?y=x=o:x=x.next=o}else y=x=o;s={baseState:c.baseState,firstBaseUpdate:y,lastBaseUpdate:x,shared:c.shared,effects:c.effects},n.updateQueue=s;return}n=s.lastBaseUpdate,n===null?s.firstBaseUpdate=o:n.next=o,s.lastBaseUpdate=o}function ns(n,o,s,c){var y=n.updateQueue;gr=!1;var x=y.firstBaseUpdate,b=y.lastBaseUpdate,R=y.shared.pending;if(R!==null){y.shared.pending=null;var L=R,U=L.next;L.next=null,b===null?x=U:b.next=U,b=L;var ee=n.alternate;ee!==null&&(ee=ee.updateQueue,R=ee.lastBaseUpdate,R!==b&&(R===null?ee.firstBaseUpdate=U:R.next=U,ee.lastBaseUpdate=L))}if(x!==null){var oe=y.baseState;b=0,ee=U=L=null,R=x;do{var Y=R.lane,me=R.eventTime;if((c&Y)===Y){ee!==null&&(ee=ee.next={eventTime:me,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ye=n,we=R;switch(Y=o,me=s,we.tag){case 1:if(ye=we.payload,typeof ye=="function"){oe=ye.call(me,oe,Y);break e}oe=ye;break e;case 3:ye.flags=ye.flags&-65537|128;case 0:if(ye=we.payload,Y=typeof ye=="function"?ye.call(me,oe,Y):ye,Y==null)break e;oe=T({},oe,Y);break e;case 2:gr=!0}}R.callback!==null&&R.lane!==0&&(n.flags|=64,Y=y.effects,Y===null?y.effects=[R]:Y.push(R))}else me={eventTime:me,lane:Y,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ee===null?(U=ee=me,L=oe):ee=ee.next=me,b|=Y;if(R=R.next,R===null){if(R=y.shared.pending,R===null)break;Y=R,R=Y.next,Y.next=null,y.lastBaseUpdate=Y,y.shared.pending=null}}while(!0);if(ee===null&&(L=oe),y.baseState=L,y.firstBaseUpdate=U,y.lastBaseUpdate=ee,o=y.shared.interleaved,o!==null){y=o;do b|=y.lane,y=y.next;while(y!==o)}else x===null&&(y.shared.lanes=0);Vr|=b,n.lanes=b,n.memoizedState=oe}}function Xp(n,o,s){if(n=o.effects,o.effects=null,n!==null)for(o=0;o<n.length;o++){var c=n[o],y=c.callback;if(y!==null){if(c.callback=null,c=s,typeof y!="function")throw Error(r(191,y));y.call(c)}}}var Pi={},Fn=pr(Pi),Ni=pr(Pi),Ai=pr(Pi);function Br(n){if(n===Pi)throw Error(r(174));return n}function Au(n,o){switch(Ke(Ai,o),Ke(Ni,n),Ke(Fn,Pi),n=o.nodeType,n){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:re(null,"");break;default:n=n===8?o.parentNode:o,o=n.namespaceURI||null,n=n.tagName,o=re(o,n)}Ze(Fn),Ke(Fn,o)}function Ro(){Ze(Fn),Ze(Ni),Ze(Ai)}function Zp(n){Br(Ai.current);var o=Br(Fn.current),s=re(o,n.type);o!==s&&(Ke(Ni,n),Ke(Fn,s))}function Lu(n){Ni.current===n&&(Ze(Fn),Ze(Ni))}var rt=pr(0);function rs(n){for(var o=n;o!==null;){if(o.tag===13){var s=o.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||s.data==="$?"||s.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var zu=[];function Fu(){for(var n=0;n<zu.length;n++)zu[n]._workInProgressVersionPrimary=null;zu.length=0}var os=_.ReactCurrentDispatcher,_u=_.ReactCurrentBatchConfig,Ur=0,ot=null,dt=null,mt=null,is=!1,Li=!1,zi=0,Jw=0;function It(){throw Error(r(321))}function Ou(n,o){if(o===null)return!1;for(var s=0;s<o.length&&s<n.length;s++)if(!Sn(n[s],o[s]))return!1;return!0}function Du(n,o,s,c,y,x){if(Ur=x,ot=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,os.current=n===null||n.memoizedState===null?Xw:Zw,n=s(c,y),Li){x=0;do{if(Li=!1,zi=0,25<=x)throw Error(r(301));x+=1,mt=dt=null,o.updateQueue=null,os.current=ek,n=s(c,y)}while(Li)}if(os.current=as,o=dt!==null&&dt.next!==null,Ur=0,mt=dt=ot=null,is=!1,o)throw Error(r(300));return n}function Mu(){var n=zi!==0;return zi=0,n}function _n(){var n={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return mt===null?ot.memoizedState=mt=n:mt=mt.next=n,mt}function gn(){if(dt===null){var n=ot.alternate;n=n!==null?n.memoizedState:null}else n=dt.next;var o=mt===null?ot.memoizedState:mt.next;if(o!==null)mt=o,dt=n;else{if(n===null)throw Error(r(310));dt=n,n={memoizedState:dt.memoizedState,baseState:dt.baseState,baseQueue:dt.baseQueue,queue:dt.queue,next:null},mt===null?ot.memoizedState=mt=n:mt=mt.next=n}return mt}function Fi(n,o){return typeof o=="function"?o(n):o}function Bu(n){var o=gn(),s=o.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var c=dt,y=c.baseQueue,x=s.pending;if(x!==null){if(y!==null){var b=y.next;y.next=x.next,x.next=b}c.baseQueue=y=x,s.pending=null}if(y!==null){x=y.next,c=c.baseState;var R=b=null,L=null,U=x;do{var ee=U.lane;if((Ur&ee)===ee)L!==null&&(L=L.next={lane:0,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null}),c=U.hasEagerState?U.eagerState:n(c,U.action);else{var oe={lane:ee,action:U.action,hasEagerState:U.hasEagerState,eagerState:U.eagerState,next:null};L===null?(R=L=oe,b=c):L=L.next=oe,ot.lanes|=ee,Vr|=ee}U=U.next}while(U!==null&&U!==x);L===null?b=c:L.next=R,Sn(c,o.memoizedState)||(Ht=!0),o.memoizedState=c,o.baseState=b,o.baseQueue=L,s.lastRenderedState=c}if(n=s.interleaved,n!==null){y=n;do x=y.lane,ot.lanes|=x,Vr|=x,y=y.next;while(y!==n)}else y===null&&(s.lanes=0);return[o.memoizedState,s.dispatch]}function Uu(n){var o=gn(),s=o.queue;if(s===null)throw Error(r(311));s.lastRenderedReducer=n;var c=s.dispatch,y=s.pending,x=o.memoizedState;if(y!==null){s.pending=null;var b=y=y.next;do x=n(x,b.action),b=b.next;while(b!==y);Sn(x,o.memoizedState)||(Ht=!0),o.memoizedState=x,o.baseQueue===null&&(o.baseState=x),s.lastRenderedState=x}return[x,c]}function eh(){}function th(n,o){var s=ot,c=gn(),y=o(),x=!Sn(c.memoizedState,y);if(x&&(c.memoizedState=y,Ht=!0),c=c.queue,Vu(oh.bind(null,s,c,n),[n]),c.getSnapshot!==o||x||mt!==null&&mt.memoizedState.tag&1){if(s.flags|=2048,_i(9,rh.bind(null,s,c,y,o),void 0,null),gt===null)throw Error(r(349));(Ur&30)!==0||nh(s,o,y)}return y}function nh(n,o,s){n.flags|=16384,n={getSnapshot:o,value:s},o=ot.updateQueue,o===null?(o={lastEffect:null,stores:null},ot.updateQueue=o,o.stores=[n]):(s=o.stores,s===null?o.stores=[n]:s.push(n))}function rh(n,o,s,c){o.value=s,o.getSnapshot=c,ih(o)&&lh(n)}function oh(n,o,s){return s(function(){ih(o)&&lh(n)})}function ih(n){var o=n.getSnapshot;n=n.value;try{var s=o();return!Sn(n,s)}catch{return!0}}function lh(n){var o=Yn(n,1);o!==null&&$n(o,n,1,-1)}function sh(n){var o=_n();return typeof n=="function"&&(n=n()),o.memoizedState=o.baseState=n,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fi,lastRenderedState:n},o.queue=n,n=n.dispatch=Yw.bind(null,ot,n),[o.memoizedState,n]}function _i(n,o,s,c){return n={tag:n,create:o,destroy:s,deps:c,next:null},o=ot.updateQueue,o===null?(o={lastEffect:null,stores:null},ot.updateQueue=o,o.lastEffect=n.next=n):(s=o.lastEffect,s===null?o.lastEffect=n.next=n:(c=s.next,s.next=n,n.next=c,o.lastEffect=n)),n}function ah(){return gn().memoizedState}function ls(n,o,s,c){var y=_n();ot.flags|=n,y.memoizedState=_i(1|o,s,void 0,c===void 0?null:c)}function ss(n,o,s,c){var y=gn();c=c===void 0?null:c;var x=void 0;if(dt!==null){var b=dt.memoizedState;if(x=b.destroy,c!==null&&Ou(c,b.deps)){y.memoizedState=_i(o,s,x,c);return}}ot.flags|=n,y.memoizedState=_i(1|o,s,x,c)}function uh(n,o){return ls(8390656,8,n,o)}function Vu(n,o){return ss(2048,8,n,o)}function ch(n,o){return ss(4,2,n,o)}function dh(n,o){return ss(4,4,n,o)}function fh(n,o){if(typeof o=="function")return n=n(),o(n),function(){o(null)};if(o!=null)return n=n(),o.current=n,function(){o.current=null}}function ph(n,o,s){return s=s!=null?s.concat([n]):null,ss(4,4,fh.bind(null,o,n),s)}function Hu(){}function hh(n,o){var s=gn();o=o===void 0?null:o;var c=s.memoizedState;return c!==null&&o!==null&&Ou(o,c[1])?c[0]:(s.memoizedState=[n,o],n)}function mh(n,o){var s=gn();o=o===void 0?null:o;var c=s.memoizedState;return c!==null&&o!==null&&Ou(o,c[1])?c[0]:(n=n(),s.memoizedState=[n,o],n)}function gh(n,o,s){return(Ur&21)===0?(n.baseState&&(n.baseState=!1,Ht=!0),n.memoizedState=s):(Sn(s,o)||(s=qf(),ot.lanes|=s,Vr|=s,n.baseState=!0),o)}function Kw(n,o){var s=We;We=s!==0&&4>s?s:4,n(!0);var c=_u.transition;_u.transition={};try{n(!1),o()}finally{We=s,_u.transition=c}}function yh(){return gn().memoizedState}function Qw(n,o,s){var c=kr(n);if(s={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null},xh(n))vh(o,s);else if(s=Kp(n,o,s,c),s!==null){var y=Dt();$n(s,n,c,y),wh(s,o,c)}}function Yw(n,o,s){var c=kr(n),y={lane:c,action:s,hasEagerState:!1,eagerState:null,next:null};if(xh(n))vh(o,y);else{var x=n.alternate;if(n.lanes===0&&(x===null||x.lanes===0)&&(x=o.lastRenderedReducer,x!==null))try{var b=o.lastRenderedState,R=x(b,s);if(y.hasEagerState=!0,y.eagerState=R,Sn(R,b)){var L=o.interleaved;L===null?(y.next=y,Pu(o)):(y.next=L.next,L.next=y),o.interleaved=y;return}}catch{}finally{}s=Kp(n,o,y,c),s!==null&&(y=Dt(),$n(s,n,c,y),wh(s,o,c))}}function xh(n){var o=n.alternate;return n===ot||o!==null&&o===ot}function vh(n,o){Li=is=!0;var s=n.pending;s===null?o.next=o:(o.next=s.next,s.next=o),n.pending=o}function wh(n,o,s){if((s&4194240)!==0){var c=o.lanes;c&=n.pendingLanes,s|=c,o.lanes=s,qa(n,s)}}var as={readContext:mn,useCallback:It,useContext:It,useEffect:It,useImperativeHandle:It,useInsertionEffect:It,useLayoutEffect:It,useMemo:It,useReducer:It,useRef:It,useState:It,useDebugValue:It,useDeferredValue:It,useTransition:It,useMutableSource:It,useSyncExternalStore:It,useId:It,unstable_isNewReconciler:!1},Xw={readContext:mn,useCallback:function(n,o){return _n().memoizedState=[n,o===void 0?null:o],n},useContext:mn,useEffect:uh,useImperativeHandle:function(n,o,s){return s=s!=null?s.concat([n]):null,ls(4194308,4,fh.bind(null,o,n),s)},useLayoutEffect:function(n,o){return ls(4194308,4,n,o)},useInsertionEffect:function(n,o){return ls(4,2,n,o)},useMemo:function(n,o){var s=_n();return o=o===void 0?null:o,n=n(),s.memoizedState=[n,o],n},useReducer:function(n,o,s){var c=_n();return o=s!==void 0?s(o):o,c.memoizedState=c.baseState=o,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:o},c.queue=n,n=n.dispatch=Qw.bind(null,ot,n),[c.memoizedState,n]},useRef:function(n){var o=_n();return n={current:n},o.memoizedState=n},useState:sh,useDebugValue:Hu,useDeferredValue:function(n){return _n().memoizedState=n},useTransition:function(){var n=sh(!1),o=n[0];return n=Kw.bind(null,n[1]),_n().memoizedState=n,[o,n]},useMutableSource:function(){},useSyncExternalStore:function(n,o,s){var c=ot,y=_n();if(tt){if(s===void 0)throw Error(r(407));s=s()}else{if(s=o(),gt===null)throw Error(r(349));(Ur&30)!==0||nh(c,o,s)}y.memoizedState=s;var x={value:s,getSnapshot:o};return y.queue=x,uh(oh.bind(null,c,x,n),[n]),c.flags|=2048,_i(9,rh.bind(null,c,x,s,o),void 0,null),s},useId:function(){var n=_n(),o=gt.identifierPrefix;if(tt){var s=Qn,c=Kn;s=(c&~(1<<32-bn(c)-1)).toString(32)+s,o=":"+o+"R"+s,s=zi++,0<s&&(o+="H"+s.toString(32)),o+=":"}else s=Jw++,o=":"+o+"r"+s.toString(32)+":";return n.memoizedState=o},unstable_isNewReconciler:!1},Zw={readContext:mn,useCallback:hh,useContext:mn,useEffect:Vu,useImperativeHandle:ph,useInsertionEffect:ch,useLayoutEffect:dh,useMemo:mh,useReducer:Bu,useRef:ah,useState:function(){return Bu(Fi)},useDebugValue:Hu,useDeferredValue:function(n){var o=gn();return gh(o,dt.memoizedState,n)},useTransition:function(){var n=Bu(Fi)[0],o=gn().memoizedState;return[n,o]},useMutableSource:eh,useSyncExternalStore:th,useId:yh,unstable_isNewReconciler:!1},ek={readContext:mn,useCallback:hh,useContext:mn,useEffect:Vu,useImperativeHandle:ph,useInsertionEffect:ch,useLayoutEffect:dh,useMemo:mh,useReducer:Uu,useRef:ah,useState:function(){return Uu(Fi)},useDebugValue:Hu,useDeferredValue:function(n){var o=gn();return dt===null?o.memoizedState=n:gh(o,dt.memoizedState,n)},useTransition:function(){var n=Uu(Fi)[0],o=gn().memoizedState;return[n,o]},useMutableSource:eh,useSyncExternalStore:th,useId:yh,unstable_isNewReconciler:!1};function En(n,o){if(n&&n.defaultProps){o=T({},o),n=n.defaultProps;for(var s in n)o[s]===void 0&&(o[s]=n[s]);return o}return o}function Wu(n,o,s,c){o=n.memoizedState,s=s(c,o),s=s==null?o:T({},o,s),n.memoizedState=s,n.lanes===0&&(n.updateQueue.baseState=s)}var us={isMounted:function(n){return(n=n._reactInternals)?zr(n)===n:!1},enqueueSetState:function(n,o,s){n=n._reactInternals;var c=Dt(),y=kr(n),x=Xn(c,y);x.payload=o,s!=null&&(x.callback=s),o=yr(n,x,y),o!==null&&($n(o,n,y,c),ts(o,n,y))},enqueueReplaceState:function(n,o,s){n=n._reactInternals;var c=Dt(),y=kr(n),x=Xn(c,y);x.tag=1,x.payload=o,s!=null&&(x.callback=s),o=yr(n,x,y),o!==null&&($n(o,n,y,c),ts(o,n,y))},enqueueForceUpdate:function(n,o){n=n._reactInternals;var s=Dt(),c=kr(n),y=Xn(s,c);y.tag=2,o!=null&&(y.callback=o),o=yr(n,y,c),o!==null&&($n(o,n,c,s),ts(o,n,c))}};function kh(n,o,s,c,y,x,b){return n=n.stateNode,typeof n.shouldComponentUpdate=="function"?n.shouldComponentUpdate(c,x,b):o.prototype&&o.prototype.isPureReactComponent?!Si(s,c)||!Si(y,x):!0}function bh(n,o,s){var c=!1,y=hr,x=o.contextType;return typeof x=="object"&&x!==null?x=mn(x):(y=Vt(o)?_r:$t.current,c=o.contextTypes,x=(c=c!=null)?So(n,y):hr),o=new o(s,x),n.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=us,n.stateNode=o,o._reactInternals=n,c&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=y,n.__reactInternalMemoizedMaskedChildContext=x),o}function Sh(n,o,s,c){n=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(s,c),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(s,c),o.state!==n&&us.enqueueReplaceState(o,o.state,null)}function qu(n,o,s,c){var y=n.stateNode;y.props=s,y.state=n.memoizedState,y.refs={},Nu(n);var x=o.contextType;typeof x=="object"&&x!==null?y.context=mn(x):(x=Vt(o)?_r:$t.current,y.context=So(n,x)),y.state=n.memoizedState,x=o.getDerivedStateFromProps,typeof x=="function"&&(Wu(n,o,x,s),y.state=n.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(o=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),o!==y.state&&us.enqueueReplaceState(y,y.state,null),ns(n,s,y,c),y.state=n.memoizedState),typeof y.componentDidMount=="function"&&(n.flags|=4194308)}function Po(n,o){try{var s="",c=o;do s+=xe(c),c=c.return;while(c);var y=s}catch(x){y=`
31
+ Error generating stack: `+x.message+`
32
+ `+x.stack}return{value:n,source:o,stack:y,digest:null}}function Gu(n,o,s){return{value:n,source:null,stack:s??null,digest:o??null}}function Ju(n,o){try{console.error(o.value)}catch(s){setTimeout(function(){throw s})}}var tk=typeof WeakMap=="function"?WeakMap:Map;function Ch(n,o,s){s=Xn(-1,s),s.tag=3,s.payload={element:null};var c=o.value;return s.callback=function(){gs||(gs=!0,uc=c),Ju(n,o)},s}function Eh(n,o,s){s=Xn(-1,s),s.tag=3;var c=n.type.getDerivedStateFromError;if(typeof c=="function"){var y=o.value;s.payload=function(){return c(y)},s.callback=function(){Ju(n,o)}}var x=n.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(s.callback=function(){Ju(n,o),typeof c!="function"&&(vr===null?vr=new Set([this]):vr.add(this));var b=o.stack;this.componentDidCatch(o.value,{componentStack:b!==null?b:""})}),s}function jh(n,o,s){var c=n.pingCache;if(c===null){c=n.pingCache=new tk;var y=new Set;c.set(o,y)}else y=c.get(o),y===void 0&&(y=new Set,c.set(o,y));y.has(s)||(y.add(s),n=mk.bind(null,n,o,s),o.then(n,n))}function Th(n){do{var o;if((o=n.tag===13)&&(o=n.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return n;n=n.return}while(n!==null);return null}function $h(n,o,s,c,y){return(n.mode&1)===0?(n===o?n.flags|=65536:(n.flags|=128,s.flags|=131072,s.flags&=-52805,s.tag===1&&(s.alternate===null?s.tag=17:(o=Xn(-1,1),o.tag=2,yr(s,o,1))),s.lanes|=1),n):(n.flags|=65536,n.lanes=y,n)}var nk=_.ReactCurrentOwner,Ht=!1;function Ot(n,o,s,c){o.child=n===null?Jp(o,null,s,c):To(o,n.child,s,c)}function Ih(n,o,s,c,y){s=s.render;var x=o.ref;return Io(o,y),c=Du(n,o,s,c,x,y),s=Mu(),n!==null&&!Ht?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~y,Zn(n,o,y)):(tt&&s&&bu(o),o.flags|=1,Ot(n,o,c,y),o.child)}function Rh(n,o,s,c,y){if(n===null){var x=s.type;return typeof x=="function"&&!gc(x)&&x.defaultProps===void 0&&s.compare===null&&s.defaultProps===void 0?(o.tag=15,o.type=x,Ph(n,o,x,c,y)):(n=bs(s.type,null,c,o,o.mode,y),n.ref=o.ref,n.return=o,o.child=n)}if(x=n.child,(n.lanes&y)===0){var b=x.memoizedProps;if(s=s.compare,s=s!==null?s:Si,s(b,c)&&n.ref===o.ref)return Zn(n,o,y)}return o.flags|=1,n=Sr(x,c),n.ref=o.ref,n.return=o,o.child=n}function Ph(n,o,s,c,y){if(n!==null){var x=n.memoizedProps;if(Si(x,c)&&n.ref===o.ref)if(Ht=!1,o.pendingProps=c=x,(n.lanes&y)!==0)(n.flags&131072)!==0&&(Ht=!0);else return o.lanes=n.lanes,Zn(n,o,y)}return Ku(n,o,s,c,y)}function Nh(n,o,s){var c=o.pendingProps,y=c.children,x=n!==null?n.memoizedState:null;if(c.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ke(Ao,on),on|=s;else{if((s&1073741824)===0)return n=x!==null?x.baseLanes|s:s,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:n,cachePool:null,transitions:null},o.updateQueue=null,Ke(Ao,on),on|=n,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},c=x!==null?x.baseLanes:s,Ke(Ao,on),on|=c}else x!==null?(c=x.baseLanes|s,o.memoizedState=null):c=s,Ke(Ao,on),on|=c;return Ot(n,o,y,s),o.child}function Ah(n,o){var s=o.ref;(n===null&&s!==null||n!==null&&n.ref!==s)&&(o.flags|=512,o.flags|=2097152)}function Ku(n,o,s,c,y){var x=Vt(s)?_r:$t.current;return x=So(o,x),Io(o,y),s=Du(n,o,s,c,x,y),c=Mu(),n!==null&&!Ht?(o.updateQueue=n.updateQueue,o.flags&=-2053,n.lanes&=~y,Zn(n,o,y)):(tt&&c&&bu(o),o.flags|=1,Ot(n,o,s,y),o.child)}function Lh(n,o,s,c,y){if(Vt(s)){var x=!0;Gl(o)}else x=!1;if(Io(o,y),o.stateNode===null)ds(n,o),bh(o,s,c),qu(o,s,c,y),c=!0;else if(n===null){var b=o.stateNode,R=o.memoizedProps;b.props=R;var L=b.context,U=s.contextType;typeof U=="object"&&U!==null?U=mn(U):(U=Vt(s)?_r:$t.current,U=So(o,U));var ee=s.getDerivedStateFromProps,oe=typeof ee=="function"||typeof b.getSnapshotBeforeUpdate=="function";oe||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(R!==c||L!==U)&&Sh(o,b,c,U),gr=!1;var Y=o.memoizedState;b.state=Y,ns(o,c,b,y),L=o.memoizedState,R!==c||Y!==L||Ut.current||gr?(typeof ee=="function"&&(Wu(o,s,ee,c),L=o.memoizedState),(R=gr||kh(o,s,R,c,Y,L,U))?(oe||typeof b.UNSAFE_componentWillMount!="function"&&typeof b.componentWillMount!="function"||(typeof b.componentWillMount=="function"&&b.componentWillMount(),typeof b.UNSAFE_componentWillMount=="function"&&b.UNSAFE_componentWillMount()),typeof b.componentDidMount=="function"&&(o.flags|=4194308)):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=c,o.memoizedState=L),b.props=c,b.state=L,b.context=U,c=R):(typeof b.componentDidMount=="function"&&(o.flags|=4194308),c=!1)}else{b=o.stateNode,Qp(n,o),R=o.memoizedProps,U=o.type===o.elementType?R:En(o.type,R),b.props=U,oe=o.pendingProps,Y=b.context,L=s.contextType,typeof L=="object"&&L!==null?L=mn(L):(L=Vt(s)?_r:$t.current,L=So(o,L));var me=s.getDerivedStateFromProps;(ee=typeof me=="function"||typeof b.getSnapshotBeforeUpdate=="function")||typeof b.UNSAFE_componentWillReceiveProps!="function"&&typeof b.componentWillReceiveProps!="function"||(R!==oe||Y!==L)&&Sh(o,b,c,L),gr=!1,Y=o.memoizedState,b.state=Y,ns(o,c,b,y);var ye=o.memoizedState;R!==oe||Y!==ye||Ut.current||gr?(typeof me=="function"&&(Wu(o,s,me,c),ye=o.memoizedState),(U=gr||kh(o,s,U,c,Y,ye,L)||!1)?(ee||typeof b.UNSAFE_componentWillUpdate!="function"&&typeof b.componentWillUpdate!="function"||(typeof b.componentWillUpdate=="function"&&b.componentWillUpdate(c,ye,L),typeof b.UNSAFE_componentWillUpdate=="function"&&b.UNSAFE_componentWillUpdate(c,ye,L)),typeof b.componentDidUpdate=="function"&&(o.flags|=4),typeof b.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof b.componentDidUpdate!="function"||R===n.memoizedProps&&Y===n.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||R===n.memoizedProps&&Y===n.memoizedState||(o.flags|=1024),o.memoizedProps=c,o.memoizedState=ye),b.props=c,b.state=ye,b.context=L,c=U):(typeof b.componentDidUpdate!="function"||R===n.memoizedProps&&Y===n.memoizedState||(o.flags|=4),typeof b.getSnapshotBeforeUpdate!="function"||R===n.memoizedProps&&Y===n.memoizedState||(o.flags|=1024),c=!1)}return Qu(n,o,s,c,x,y)}function Qu(n,o,s,c,y,x){Ah(n,o);var b=(o.flags&128)!==0;if(!c&&!b)return y&&Dp(o,s,!1),Zn(n,o,x);c=o.stateNode,nk.current=o;var R=b&&typeof s.getDerivedStateFromError!="function"?null:c.render();return o.flags|=1,n!==null&&b?(o.child=To(o,n.child,null,x),o.child=To(o,null,R,x)):Ot(n,o,R,x),o.memoizedState=c.state,y&&Dp(o,s,!0),o.child}function zh(n){var o=n.stateNode;o.pendingContext?_p(n,o.pendingContext,o.pendingContext!==o.context):o.context&&_p(n,o.context,!1),Au(n,o.containerInfo)}function Fh(n,o,s,c,y){return jo(),ju(y),o.flags|=256,Ot(n,o,s,c),o.child}var Yu={dehydrated:null,treeContext:null,retryLane:0};function Xu(n){return{baseLanes:n,cachePool:null,transitions:null}}function _h(n,o,s){var c=o.pendingProps,y=rt.current,x=!1,b=(o.flags&128)!==0,R;if((R=b)||(R=n!==null&&n.memoizedState===null?!1:(y&2)!==0),R?(x=!0,o.flags&=-129):(n===null||n.memoizedState!==null)&&(y|=1),Ke(rt,y&1),n===null)return Eu(o),n=o.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?((o.mode&1)===0?o.lanes=1:n.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(b=c.children,n=c.fallback,x?(c=o.mode,x=o.child,b={mode:"hidden",children:b},(c&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=b):x=Ss(b,c,0,null),n=Gr(n,c,s,null),x.return=o,n.return=o,x.sibling=n,o.child=x,o.child.memoizedState=Xu(s),o.memoizedState=Yu,n):Zu(o,b));if(y=n.memoizedState,y!==null&&(R=y.dehydrated,R!==null))return rk(n,o,b,c,R,y,s);if(x){x=c.fallback,b=o.mode,y=n.child,R=y.sibling;var L={mode:"hidden",children:c.children};return(b&1)===0&&o.child!==y?(c=o.child,c.childLanes=0,c.pendingProps=L,o.deletions=null):(c=Sr(y,L),c.subtreeFlags=y.subtreeFlags&14680064),R!==null?x=Sr(R,x):(x=Gr(x,b,s,null),x.flags|=2),x.return=o,c.return=o,c.sibling=x,o.child=c,c=x,x=o.child,b=n.child.memoizedState,b=b===null?Xu(s):{baseLanes:b.baseLanes|s,cachePool:null,transitions:b.transitions},x.memoizedState=b,x.childLanes=n.childLanes&~s,o.memoizedState=Yu,c}return x=n.child,n=x.sibling,c=Sr(x,{mode:"visible",children:c.children}),(o.mode&1)===0&&(c.lanes=s),c.return=o,c.sibling=null,n!==null&&(s=o.deletions,s===null?(o.deletions=[n],o.flags|=16):s.push(n)),o.child=c,o.memoizedState=null,c}function Zu(n,o){return o=Ss({mode:"visible",children:o},n.mode,0,null),o.return=n,n.child=o}function cs(n,o,s,c){return c!==null&&ju(c),To(o,n.child,null,s),n=Zu(o,o.pendingProps.children),n.flags|=2,o.memoizedState=null,n}function rk(n,o,s,c,y,x,b){if(s)return o.flags&256?(o.flags&=-257,c=Gu(Error(r(422))),cs(n,o,b,c)):o.memoizedState!==null?(o.child=n.child,o.flags|=128,null):(x=c.fallback,y=o.mode,c=Ss({mode:"visible",children:c.children},y,0,null),x=Gr(x,y,b,null),x.flags|=2,c.return=o,x.return=o,c.sibling=x,o.child=c,(o.mode&1)!==0&&To(o,n.child,null,b),o.child.memoizedState=Xu(b),o.memoizedState=Yu,x);if((o.mode&1)===0)return cs(n,o,b,null);if(y.data==="$!"){if(c=y.nextSibling&&y.nextSibling.dataset,c)var R=c.dgst;return c=R,x=Error(r(419)),c=Gu(x,c,void 0),cs(n,o,b,c)}if(R=(b&n.childLanes)!==0,Ht||R){if(c=gt,c!==null){switch(b&-b){case 4:y=2;break;case 16:y=8;break;case 64: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:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(c.suspendedLanes|b))!==0?0:y,y!==0&&y!==x.retryLane&&(x.retryLane=y,Yn(n,y),$n(c,n,y,-1))}return mc(),c=Gu(Error(r(421))),cs(n,o,b,c)}return y.data==="$?"?(o.flags|=128,o.child=n.child,o=gk.bind(null,n),y._reactRetry=o,null):(n=x.treeContext,rn=fr(y.nextSibling),nn=o,tt=!0,Cn=null,n!==null&&(pn[hn++]=Kn,pn[hn++]=Qn,pn[hn++]=Or,Kn=n.id,Qn=n.overflow,Or=o),o=Zu(o,c.children),o.flags|=4096,o)}function Oh(n,o,s){n.lanes|=o;var c=n.alternate;c!==null&&(c.lanes|=o),Ru(n.return,o,s)}function ec(n,o,s,c,y){var x=n.memoizedState;x===null?n.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:c,tail:s,tailMode:y}:(x.isBackwards=o,x.rendering=null,x.renderingStartTime=0,x.last=c,x.tail=s,x.tailMode=y)}function Dh(n,o,s){var c=o.pendingProps,y=c.revealOrder,x=c.tail;if(Ot(n,o,c.children,s),c=rt.current,(c&2)!==0)c=c&1|2,o.flags|=128;else{if(n!==null&&(n.flags&128)!==0)e:for(n=o.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Oh(n,s,o);else if(n.tag===19)Oh(n,s,o);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===o)break e;for(;n.sibling===null;){if(n.return===null||n.return===o)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}c&=1}if(Ke(rt,c),(o.mode&1)===0)o.memoizedState=null;else switch(y){case"forwards":for(s=o.child,y=null;s!==null;)n=s.alternate,n!==null&&rs(n)===null&&(y=s),s=s.sibling;s=y,s===null?(y=o.child,o.child=null):(y=s.sibling,s.sibling=null),ec(o,!1,y,s,x);break;case"backwards":for(s=null,y=o.child,o.child=null;y!==null;){if(n=y.alternate,n!==null&&rs(n)===null){o.child=y;break}n=y.sibling,y.sibling=s,s=y,y=n}ec(o,!0,s,null,x);break;case"together":ec(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function ds(n,o){(o.mode&1)===0&&n!==null&&(n.alternate=null,o.alternate=null,o.flags|=2)}function Zn(n,o,s){if(n!==null&&(o.dependencies=n.dependencies),Vr|=o.lanes,(s&o.childLanes)===0)return null;if(n!==null&&o.child!==n.child)throw Error(r(153));if(o.child!==null){for(n=o.child,s=Sr(n,n.pendingProps),o.child=s,s.return=o;n.sibling!==null;)n=n.sibling,s=s.sibling=Sr(n,n.pendingProps),s.return=o;s.sibling=null}return o.child}function ok(n,o,s){switch(o.tag){case 3:zh(o),jo();break;case 5:Zp(o);break;case 1:Vt(o.type)&&Gl(o);break;case 4:Au(o,o.stateNode.containerInfo);break;case 10:var c=o.type._context,y=o.memoizedProps.value;Ke(Zl,c._currentValue),c._currentValue=y;break;case 13:if(c=o.memoizedState,c!==null)return c.dehydrated!==null?(Ke(rt,rt.current&1),o.flags|=128,null):(s&o.child.childLanes)!==0?_h(n,o,s):(Ke(rt,rt.current&1),n=Zn(n,o,s),n!==null?n.sibling:null);Ke(rt,rt.current&1);break;case 19:if(c=(s&o.childLanes)!==0,(n.flags&128)!==0){if(c)return Dh(n,o,s);o.flags|=128}if(y=o.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Ke(rt,rt.current),c)break;return null;case 22:case 23:return o.lanes=0,Nh(n,o,s)}return Zn(n,o,s)}var Mh,tc,Bh,Uh;Mh=function(n,o){for(var s=o.child;s!==null;){if(s.tag===5||s.tag===6)n.appendChild(s.stateNode);else if(s.tag!==4&&s.child!==null){s.child.return=s,s=s.child;continue}if(s===o)break;for(;s.sibling===null;){if(s.return===null||s.return===o)return;s=s.return}s.sibling.return=s.return,s=s.sibling}},tc=function(){},Bh=function(n,o,s,c){var y=n.memoizedProps;if(y!==c){n=o.stateNode,Br(Fn.current);var x=null;switch(s){case"input":y=jt(n,y),c=jt(n,c),x=[];break;case"select":y=T({},y,{value:void 0}),c=T({},c,{value:void 0}),x=[];break;case"textarea":y=_e(n,y),c=_e(n,c),x=[];break;default:typeof y.onClick!="function"&&typeof c.onClick=="function"&&(n.onclick=Hl)}bt(s,c);var b;s=null;for(U in y)if(!c.hasOwnProperty(U)&&y.hasOwnProperty(U)&&y[U]!=null)if(U==="style"){var R=y[U];for(b in R)R.hasOwnProperty(b)&&(s||(s={}),s[b]="")}else U!=="dangerouslySetInnerHTML"&&U!=="children"&&U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&U!=="autoFocus"&&(l.hasOwnProperty(U)?x||(x=[]):(x=x||[]).push(U,null));for(U in c){var L=c[U];if(R=y!=null?y[U]:void 0,c.hasOwnProperty(U)&&L!==R&&(L!=null||R!=null))if(U==="style")if(R){for(b in R)!R.hasOwnProperty(b)||L&&L.hasOwnProperty(b)||(s||(s={}),s[b]="");for(b in L)L.hasOwnProperty(b)&&R[b]!==L[b]&&(s||(s={}),s[b]=L[b])}else s||(x||(x=[]),x.push(U,s)),s=L;else U==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,R=R?R.__html:void 0,L!=null&&R!==L&&(x=x||[]).push(U,L)):U==="children"?typeof L!="string"&&typeof L!="number"||(x=x||[]).push(U,""+L):U!=="suppressContentEditableWarning"&&U!=="suppressHydrationWarning"&&(l.hasOwnProperty(U)?(L!=null&&U==="onScroll"&&Xe("scroll",n),x||R===L||(x=[])):(x=x||[]).push(U,L))}s&&(x=x||[]).push("style",s);var U=x;(o.updateQueue=U)&&(o.flags|=4)}},Uh=function(n,o,s,c){s!==c&&(o.flags|=4)};function Oi(n,o){if(!tt)switch(n.tailMode){case"hidden":o=n.tail;for(var s=null;o!==null;)o.alternate!==null&&(s=o),o=o.sibling;s===null?n.tail=null:s.sibling=null;break;case"collapsed":s=n.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?o||n.tail===null?n.tail=null:n.tail.sibling=null:c.sibling=null}}function Rt(n){var o=n.alternate!==null&&n.alternate.child===n.child,s=0,c=0;if(o)for(var y=n.child;y!==null;)s|=y.lanes|y.childLanes,c|=y.subtreeFlags&14680064,c|=y.flags&14680064,y.return=n,y=y.sibling;else for(y=n.child;y!==null;)s|=y.lanes|y.childLanes,c|=y.subtreeFlags,c|=y.flags,y.return=n,y=y.sibling;return n.subtreeFlags|=c,n.childLanes=s,o}function ik(n,o,s){var c=o.pendingProps;switch(Su(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rt(o),null;case 1:return Vt(o.type)&&ql(),Rt(o),null;case 3:return c=o.stateNode,Ro(),Ze(Ut),Ze($t),Fu(),c.pendingContext&&(c.context=c.pendingContext,c.pendingContext=null),(n===null||n.child===null)&&(Yl(o)?o.flags|=4:n===null||n.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Cn!==null&&(fc(Cn),Cn=null))),tc(n,o),Rt(o),null;case 5:Lu(o);var y=Br(Ai.current);if(s=o.type,n!==null&&o.stateNode!=null)Bh(n,o,s,c,y),n.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!c){if(o.stateNode===null)throw Error(r(166));return Rt(o),null}if(n=Br(Fn.current),Yl(o)){c=o.stateNode,s=o.type;var x=o.memoizedProps;switch(c[zn]=o,c[$i]=x,n=(o.mode&1)!==0,s){case"dialog":Xe("cancel",c),Xe("close",c);break;case"iframe":case"object":case"embed":Xe("load",c);break;case"video":case"audio":for(y=0;y<Ei.length;y++)Xe(Ei[y],c);break;case"source":Xe("error",c);break;case"img":case"image":case"link":Xe("error",c),Xe("load",c);break;case"details":Xe("toggle",c);break;case"input":zt(c,x),Xe("invalid",c);break;case"select":c._wrapperState={wasMultiple:!!x.multiple},Xe("invalid",c);break;case"textarea":ht(c,x),Xe("invalid",c)}bt(s,x),y=null;for(var b in x)if(x.hasOwnProperty(b)){var R=x[b];b==="children"?typeof R=="string"?c.textContent!==R&&(x.suppressHydrationWarning!==!0&&Vl(c.textContent,R,n),y=["children",R]):typeof R=="number"&&c.textContent!==""+R&&(x.suppressHydrationWarning!==!0&&Vl(c.textContent,R,n),y=["children",""+R]):l.hasOwnProperty(b)&&R!=null&&b==="onScroll"&&Xe("scroll",c)}switch(s){case"input":Ae(c),De(c,x,!0);break;case"textarea":Ae(c),_t(c);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(c.onclick=Hl)}c=y,o.updateQueue=c,c!==null&&(o.flags|=4)}else{b=y.nodeType===9?y:y.ownerDocument,n==="http://www.w3.org/1999/xhtml"&&(n=W(s)),n==="http://www.w3.org/1999/xhtml"?s==="script"?(n=b.createElement("div"),n.innerHTML="<script><\/script>",n=n.removeChild(n.firstChild)):typeof c.is=="string"?n=b.createElement(s,{is:c.is}):(n=b.createElement(s),s==="select"&&(b=n,c.multiple?b.multiple=!0:c.size&&(b.size=c.size))):n=b.createElementNS(n,s),n[zn]=o,n[$i]=c,Mh(n,o,!1,!1),o.stateNode=n;e:{switch(b=An(s,c),s){case"dialog":Xe("cancel",n),Xe("close",n),y=c;break;case"iframe":case"object":case"embed":Xe("load",n),y=c;break;case"video":case"audio":for(y=0;y<Ei.length;y++)Xe(Ei[y],n);y=c;break;case"source":Xe("error",n),y=c;break;case"img":case"image":case"link":Xe("error",n),Xe("load",n),y=c;break;case"details":Xe("toggle",n),y=c;break;case"input":zt(n,c),y=jt(n,c),Xe("invalid",n);break;case"option":y=c;break;case"select":n._wrapperState={wasMultiple:!!c.multiple},y=T({},c,{value:void 0}),Xe("invalid",n);break;case"textarea":ht(n,c),y=_e(n,c),Xe("invalid",n);break;default:y=c}bt(s,y),R=y;for(x in R)if(R.hasOwnProperty(x)){var L=R[x];x==="style"?ir(n,L):x==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&$e(n,L)):x==="children"?typeof L=="string"?(s!=="textarea"||L!=="")&&Me(n,L):typeof L=="number"&&Me(n,""+L):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(l.hasOwnProperty(x)?L!=null&&x==="onScroll"&&Xe("scroll",n):L!=null&&N(n,x,L,b))}switch(s){case"input":Ae(n),De(n,c,!1);break;case"textarea":Ae(n),_t(n);break;case"option":c.value!=null&&n.setAttribute("value",""+fe(c.value));break;case"select":n.multiple=!!c.multiple,x=c.value,x!=null?pt(n,!!c.multiple,x,!1):c.defaultValue!=null&&pt(n,!!c.multiple,c.defaultValue,!0);break;default:typeof y.onClick=="function"&&(n.onclick=Hl)}switch(s){case"button":case"input":case"select":case"textarea":c=!!c.autoFocus;break e;case"img":c=!0;break e;default:c=!1}}c&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Rt(o),null;case 6:if(n&&o.stateNode!=null)Uh(n,o,n.memoizedProps,c);else{if(typeof c!="string"&&o.stateNode===null)throw Error(r(166));if(s=Br(Ai.current),Br(Fn.current),Yl(o)){if(c=o.stateNode,s=o.memoizedProps,c[zn]=o,(x=c.nodeValue!==s)&&(n=nn,n!==null))switch(n.tag){case 3:Vl(c.nodeValue,s,(n.mode&1)!==0);break;case 5:n.memoizedProps.suppressHydrationWarning!==!0&&Vl(c.nodeValue,s,(n.mode&1)!==0)}x&&(o.flags|=4)}else c=(s.nodeType===9?s:s.ownerDocument).createTextNode(c),c[zn]=o,o.stateNode=c}return Rt(o),null;case 13:if(Ze(rt),c=o.memoizedState,n===null||n.memoizedState!==null&&n.memoizedState.dehydrated!==null){if(tt&&rn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)Wp(),jo(),o.flags|=98560,x=!1;else if(x=Yl(o),c!==null&&c.dehydrated!==null){if(n===null){if(!x)throw Error(r(318));if(x=o.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(r(317));x[zn]=o}else jo(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Rt(o),x=!1}else Cn!==null&&(fc(Cn),Cn=null),x=!0;if(!x)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=s,o):(c=c!==null,c!==(n!==null&&n.memoizedState!==null)&&c&&(o.child.flags|=8192,(o.mode&1)!==0&&(n===null||(rt.current&1)!==0?ft===0&&(ft=3):mc())),o.updateQueue!==null&&(o.flags|=4),Rt(o),null);case 4:return Ro(),tc(n,o),n===null&&ji(o.stateNode.containerInfo),Rt(o),null;case 10:return Iu(o.type._context),Rt(o),null;case 17:return Vt(o.type)&&ql(),Rt(o),null;case 19:if(Ze(rt),x=o.memoizedState,x===null)return Rt(o),null;if(c=(o.flags&128)!==0,b=x.rendering,b===null)if(c)Oi(x,!1);else{if(ft!==0||n!==null&&(n.flags&128)!==0)for(n=o.child;n!==null;){if(b=rs(n),b!==null){for(o.flags|=128,Oi(x,!1),c=b.updateQueue,c!==null&&(o.updateQueue=c,o.flags|=4),o.subtreeFlags=0,c=s,s=o.child;s!==null;)x=s,n=c,x.flags&=14680066,b=x.alternate,b===null?(x.childLanes=0,x.lanes=n,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=b.childLanes,x.lanes=b.lanes,x.child=b.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=b.memoizedProps,x.memoizedState=b.memoizedState,x.updateQueue=b.updateQueue,x.type=b.type,n=b.dependencies,x.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext}),s=s.sibling;return Ke(rt,rt.current&1|2),o.child}n=n.sibling}x.tail!==null&&lt()>Lo&&(o.flags|=128,c=!0,Oi(x,!1),o.lanes=4194304)}else{if(!c)if(n=rs(b),n!==null){if(o.flags|=128,c=!0,s=n.updateQueue,s!==null&&(o.updateQueue=s,o.flags|=4),Oi(x,!0),x.tail===null&&x.tailMode==="hidden"&&!b.alternate&&!tt)return Rt(o),null}else 2*lt()-x.renderingStartTime>Lo&&s!==1073741824&&(o.flags|=128,c=!0,Oi(x,!1),o.lanes=4194304);x.isBackwards?(b.sibling=o.child,o.child=b):(s=x.last,s!==null?s.sibling=b:o.child=b,x.last=b)}return x.tail!==null?(o=x.tail,x.rendering=o,x.tail=o.sibling,x.renderingStartTime=lt(),o.sibling=null,s=rt.current,Ke(rt,c?s&1|2:s&1),o):(Rt(o),null);case 22:case 23:return hc(),c=o.memoizedState!==null,n!==null&&n.memoizedState!==null!==c&&(o.flags|=8192),c&&(o.mode&1)!==0?(on&1073741824)!==0&&(Rt(o),o.subtreeFlags&6&&(o.flags|=8192)):Rt(o),null;case 24:return null;case 25:return null}throw Error(r(156,o.tag))}function lk(n,o){switch(Su(o),o.tag){case 1:return Vt(o.type)&&ql(),n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 3:return Ro(),Ze(Ut),Ze($t),Fu(),n=o.flags,(n&65536)!==0&&(n&128)===0?(o.flags=n&-65537|128,o):null;case 5:return Lu(o),null;case 13:if(Ze(rt),n=o.memoizedState,n!==null&&n.dehydrated!==null){if(o.alternate===null)throw Error(r(340));jo()}return n=o.flags,n&65536?(o.flags=n&-65537|128,o):null;case 19:return Ze(rt),null;case 4:return Ro(),null;case 10:return Iu(o.type._context),null;case 22:case 23:return hc(),null;case 24:return null;default:return null}}var fs=!1,Pt=!1,sk=typeof WeakSet=="function"?WeakSet:Set,ge=null;function No(n,o){var s=n.ref;if(s!==null)if(typeof s=="function")try{s(null)}catch(c){it(n,o,c)}else s.current=null}function nc(n,o,s){try{s()}catch(c){it(n,o,c)}}var Vh=!1;function ak(n,o){if(hu=Nl,n=kp(),lu(n)){if("selectionStart"in n)var s={start:n.selectionStart,end:n.selectionEnd};else e:{s=(s=n.ownerDocument)&&s.defaultView||window;var c=s.getSelection&&s.getSelection();if(c&&c.rangeCount!==0){s=c.anchorNode;var y=c.anchorOffset,x=c.focusNode;c=c.focusOffset;try{s.nodeType,x.nodeType}catch{s=null;break e}var b=0,R=-1,L=-1,U=0,ee=0,oe=n,Y=null;t:for(;;){for(var me;oe!==s||y!==0&&oe.nodeType!==3||(R=b+y),oe!==x||c!==0&&oe.nodeType!==3||(L=b+c),oe.nodeType===3&&(b+=oe.nodeValue.length),(me=oe.firstChild)!==null;)Y=oe,oe=me;for(;;){if(oe===n)break t;if(Y===s&&++U===y&&(R=b),Y===x&&++ee===c&&(L=b),(me=oe.nextSibling)!==null)break;oe=Y,Y=oe.parentNode}oe=me}s=R===-1||L===-1?null:{start:R,end:L}}else s=null}s=s||{start:0,end:0}}else s=null;for(mu={focusedElem:n,selectionRange:s},Nl=!1,ge=o;ge!==null;)if(o=ge,n=o.child,(o.subtreeFlags&1028)!==0&&n!==null)n.return=o,ge=n;else for(;ge!==null;){o=ge;try{var ye=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ye!==null){var we=ye.memoizedProps,st=ye.memoizedState,D=o.stateNode,F=D.getSnapshotBeforeUpdate(o.elementType===o.type?we:En(o.type,we),st);D.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var M=o.stateNode.containerInfo;M.nodeType===1?M.textContent="":M.nodeType===9&&M.documentElement&&M.removeChild(M.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(r(163))}}catch(ue){it(o,o.return,ue)}if(n=o.sibling,n!==null){n.return=o.return,ge=n;break}ge=o.return}return ye=Vh,Vh=!1,ye}function Di(n,o,s){var c=o.updateQueue;if(c=c!==null?c.lastEffect:null,c!==null){var y=c=c.next;do{if((y.tag&n)===n){var x=y.destroy;y.destroy=void 0,x!==void 0&&nc(o,s,x)}y=y.next}while(y!==c)}}function ps(n,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var s=o=o.next;do{if((s.tag&n)===n){var c=s.create;s.destroy=c()}s=s.next}while(s!==o)}}function rc(n){var o=n.ref;if(o!==null){var s=n.stateNode;switch(n.tag){case 5:n=s;break;default:n=s}typeof o=="function"?o(n):o.current=n}}function Hh(n){var o=n.alternate;o!==null&&(n.alternate=null,Hh(o)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(o=n.stateNode,o!==null&&(delete o[zn],delete o[$i],delete o[vu],delete o[Hw],delete o[Ww])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function Wh(n){return n.tag===5||n.tag===3||n.tag===4}function qh(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||Wh(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function oc(n,o,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?s.nodeType===8?s.parentNode.insertBefore(n,o):s.insertBefore(n,o):(s.nodeType===8?(o=s.parentNode,o.insertBefore(n,s)):(o=s,o.appendChild(n)),s=s._reactRootContainer,s!=null||o.onclick!==null||(o.onclick=Hl));else if(c!==4&&(n=n.child,n!==null))for(oc(n,o,s),n=n.sibling;n!==null;)oc(n,o,s),n=n.sibling}function ic(n,o,s){var c=n.tag;if(c===5||c===6)n=n.stateNode,o?s.insertBefore(n,o):s.appendChild(n);else if(c!==4&&(n=n.child,n!==null))for(ic(n,o,s),n=n.sibling;n!==null;)ic(n,o,s),n=n.sibling}var St=null,jn=!1;function xr(n,o,s){for(s=s.child;s!==null;)Gh(n,o,s),s=s.sibling}function Gh(n,o,s){if(Ln&&typeof Ln.onCommitFiberUnmount=="function")try{Ln.onCommitFiberUnmount(jl,s)}catch{}switch(s.tag){case 5:Pt||No(s,o);case 6:var c=St,y=jn;St=null,xr(n,o,s),St=c,jn=y,St!==null&&(jn?(n=St,s=s.stateNode,n.nodeType===8?n.parentNode.removeChild(s):n.removeChild(s)):St.removeChild(s.stateNode));break;case 18:St!==null&&(jn?(n=St,s=s.stateNode,n.nodeType===8?xu(n.parentNode,s):n.nodeType===1&&xu(n,s),yi(n)):xu(St,s.stateNode));break;case 4:c=St,y=jn,St=s.stateNode.containerInfo,jn=!0,xr(n,o,s),St=c,jn=y;break;case 0:case 11:case 14:case 15:if(!Pt&&(c=s.updateQueue,c!==null&&(c=c.lastEffect,c!==null))){y=c=c.next;do{var x=y,b=x.destroy;x=x.tag,b!==void 0&&((x&2)!==0||(x&4)!==0)&&nc(s,o,b),y=y.next}while(y!==c)}xr(n,o,s);break;case 1:if(!Pt&&(No(s,o),c=s.stateNode,typeof c.componentWillUnmount=="function"))try{c.props=s.memoizedProps,c.state=s.memoizedState,c.componentWillUnmount()}catch(R){it(s,o,R)}xr(n,o,s);break;case 21:xr(n,o,s);break;case 22:s.mode&1?(Pt=(c=Pt)||s.memoizedState!==null,xr(n,o,s),Pt=c):xr(n,o,s);break;default:xr(n,o,s)}}function Jh(n){var o=n.updateQueue;if(o!==null){n.updateQueue=null;var s=n.stateNode;s===null&&(s=n.stateNode=new sk),o.forEach(function(c){var y=yk.bind(null,n,c);s.has(c)||(s.add(c),c.then(y,y))})}}function Tn(n,o){var s=o.deletions;if(s!==null)for(var c=0;c<s.length;c++){var y=s[c];try{var x=n,b=o,R=b;e:for(;R!==null;){switch(R.tag){case 5:St=R.stateNode,jn=!1;break e;case 3:St=R.stateNode.containerInfo,jn=!0;break e;case 4:St=R.stateNode.containerInfo,jn=!0;break e}R=R.return}if(St===null)throw Error(r(160));Gh(x,b,y),St=null,jn=!1;var L=y.alternate;L!==null&&(L.return=null),y.return=null}catch(U){it(y,o,U)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)Kh(o,n),o=o.sibling}function Kh(n,o){var s=n.alternate,c=n.flags;switch(n.tag){case 0:case 11:case 14:case 15:if(Tn(o,n),On(n),c&4){try{Di(3,n,n.return),ps(3,n)}catch(we){it(n,n.return,we)}try{Di(5,n,n.return)}catch(we){it(n,n.return,we)}}break;case 1:Tn(o,n),On(n),c&512&&s!==null&&No(s,s.return);break;case 5:if(Tn(o,n),On(n),c&512&&s!==null&&No(s,s.return),n.flags&32){var y=n.stateNode;try{Me(y,"")}catch(we){it(n,n.return,we)}}if(c&4&&(y=n.stateNode,y!=null)){var x=n.memoizedProps,b=s!==null?s.memoizedProps:x,R=n.type,L=n.updateQueue;if(n.updateQueue=null,L!==null)try{R==="input"&&x.type==="radio"&&x.name!=null&&Bt(y,x),An(R,b);var U=An(R,x);for(b=0;b<L.length;b+=2){var ee=L[b],oe=L[b+1];ee==="style"?ir(y,oe):ee==="dangerouslySetInnerHTML"?$e(y,oe):ee==="children"?Me(y,oe):N(y,ee,oe,U)}switch(R){case"input":or(y,x);break;case"textarea":Tt(y,x);break;case"select":var Y=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!x.multiple;var me=x.value;me!=null?pt(y,!!x.multiple,me,!1):Y!==!!x.multiple&&(x.defaultValue!=null?pt(y,!!x.multiple,x.defaultValue,!0):pt(y,!!x.multiple,x.multiple?[]:"",!1))}y[$i]=x}catch(we){it(n,n.return,we)}}break;case 6:if(Tn(o,n),On(n),c&4){if(n.stateNode===null)throw Error(r(162));y=n.stateNode,x=n.memoizedProps;try{y.nodeValue=x}catch(we){it(n,n.return,we)}}break;case 3:if(Tn(o,n),On(n),c&4&&s!==null&&s.memoizedState.isDehydrated)try{yi(o.containerInfo)}catch(we){it(n,n.return,we)}break;case 4:Tn(o,n),On(n);break;case 13:Tn(o,n),On(n),y=n.child,y.flags&8192&&(x=y.memoizedState!==null,y.stateNode.isHidden=x,!x||y.alternate!==null&&y.alternate.memoizedState!==null||(ac=lt())),c&4&&Jh(n);break;case 22:if(ee=s!==null&&s.memoizedState!==null,n.mode&1?(Pt=(U=Pt)||ee,Tn(o,n),Pt=U):Tn(o,n),On(n),c&8192){if(U=n.memoizedState!==null,(n.stateNode.isHidden=U)&&!ee&&(n.mode&1)!==0)for(ge=n,ee=n.child;ee!==null;){for(oe=ge=ee;ge!==null;){switch(Y=ge,me=Y.child,Y.tag){case 0:case 11:case 14:case 15:Di(4,Y,Y.return);break;case 1:No(Y,Y.return);var ye=Y.stateNode;if(typeof ye.componentWillUnmount=="function"){c=Y,s=Y.return;try{o=c,ye.props=o.memoizedProps,ye.state=o.memoizedState,ye.componentWillUnmount()}catch(we){it(c,s,we)}}break;case 5:No(Y,Y.return);break;case 22:if(Y.memoizedState!==null){Xh(oe);continue}}me!==null?(me.return=Y,ge=me):Xh(oe)}ee=ee.sibling}e:for(ee=null,oe=n;;){if(oe.tag===5){if(ee===null){ee=oe;try{y=oe.stateNode,U?(x=y.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):(R=oe.stateNode,L=oe.memoizedProps.style,b=L!=null&&L.hasOwnProperty("display")?L.display:null,R.style.display=fn("display",b))}catch(we){it(n,n.return,we)}}}else if(oe.tag===6){if(ee===null)try{oe.stateNode.nodeValue=U?"":oe.memoizedProps}catch(we){it(n,n.return,we)}}else if((oe.tag!==22&&oe.tag!==23||oe.memoizedState===null||oe===n)&&oe.child!==null){oe.child.return=oe,oe=oe.child;continue}if(oe===n)break e;for(;oe.sibling===null;){if(oe.return===null||oe.return===n)break e;ee===oe&&(ee=null),oe=oe.return}ee===oe&&(ee=null),oe.sibling.return=oe.return,oe=oe.sibling}}break;case 19:Tn(o,n),On(n),c&4&&Jh(n);break;case 21:break;default:Tn(o,n),On(n)}}function On(n){var o=n.flags;if(o&2){try{e:{for(var s=n.return;s!==null;){if(Wh(s)){var c=s;break e}s=s.return}throw Error(r(160))}switch(c.tag){case 5:var y=c.stateNode;c.flags&32&&(Me(y,""),c.flags&=-33);var x=qh(n);ic(n,x,y);break;case 3:case 4:var b=c.stateNode.containerInfo,R=qh(n);oc(n,R,b);break;default:throw Error(r(161))}}catch(L){it(n,n.return,L)}n.flags&=-3}o&4096&&(n.flags&=-4097)}function uk(n,o,s){ge=n,Qh(n)}function Qh(n,o,s){for(var c=(n.mode&1)!==0;ge!==null;){var y=ge,x=y.child;if(y.tag===22&&c){var b=y.memoizedState!==null||fs;if(!b){var R=y.alternate,L=R!==null&&R.memoizedState!==null||Pt;R=fs;var U=Pt;if(fs=b,(Pt=L)&&!U)for(ge=y;ge!==null;)b=ge,L=b.child,b.tag===22&&b.memoizedState!==null?Zh(y):L!==null?(L.return=b,ge=L):Zh(y);for(;x!==null;)ge=x,Qh(x),x=x.sibling;ge=y,fs=R,Pt=U}Yh(n)}else(y.subtreeFlags&8772)!==0&&x!==null?(x.return=y,ge=x):Yh(n)}}function Yh(n){for(;ge!==null;){var o=ge;if((o.flags&8772)!==0){var s=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:Pt||ps(5,o);break;case 1:var c=o.stateNode;if(o.flags&4&&!Pt)if(s===null)c.componentDidMount();else{var y=o.elementType===o.type?s.memoizedProps:En(o.type,s.memoizedProps);c.componentDidUpdate(y,s.memoizedState,c.__reactInternalSnapshotBeforeUpdate)}var x=o.updateQueue;x!==null&&Xp(o,x,c);break;case 3:var b=o.updateQueue;if(b!==null){if(s=null,o.child!==null)switch(o.child.tag){case 5:s=o.child.stateNode;break;case 1:s=o.child.stateNode}Xp(o,b,s)}break;case 5:var R=o.stateNode;if(s===null&&o.flags&4){s=R;var L=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&s.focus();break;case"img":L.src&&(s.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var U=o.alternate;if(U!==null){var ee=U.memoizedState;if(ee!==null){var oe=ee.dehydrated;oe!==null&&yi(oe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(r(163))}Pt||o.flags&512&&rc(o)}catch(Y){it(o,o.return,Y)}}if(o===n){ge=null;break}if(s=o.sibling,s!==null){s.return=o.return,ge=s;break}ge=o.return}}function Xh(n){for(;ge!==null;){var o=ge;if(o===n){ge=null;break}var s=o.sibling;if(s!==null){s.return=o.return,ge=s;break}ge=o.return}}function Zh(n){for(;ge!==null;){var o=ge;try{switch(o.tag){case 0:case 11:case 15:var s=o.return;try{ps(4,o)}catch(L){it(o,s,L)}break;case 1:var c=o.stateNode;if(typeof c.componentDidMount=="function"){var y=o.return;try{c.componentDidMount()}catch(L){it(o,y,L)}}var x=o.return;try{rc(o)}catch(L){it(o,x,L)}break;case 5:var b=o.return;try{rc(o)}catch(L){it(o,b,L)}}}catch(L){it(o,o.return,L)}if(o===n){ge=null;break}var R=o.sibling;if(R!==null){R.return=o.return,ge=R;break}ge=o.return}}var ck=Math.ceil,hs=_.ReactCurrentDispatcher,lc=_.ReactCurrentOwner,yn=_.ReactCurrentBatchConfig,Be=0,gt=null,at=null,Ct=0,on=0,Ao=pr(0),ft=0,Mi=null,Vr=0,ms=0,sc=0,Bi=null,Wt=null,ac=0,Lo=1/0,er=null,gs=!1,uc=null,vr=null,ys=!1,wr=null,xs=0,Ui=0,cc=null,vs=-1,ws=0;function Dt(){return(Be&6)!==0?lt():vs!==-1?vs:vs=lt()}function kr(n){return(n.mode&1)===0?1:(Be&2)!==0&&Ct!==0?Ct&-Ct:Gw.transition!==null?(ws===0&&(ws=qf()),ws):(n=We,n!==0||(n=window.event,n=n===void 0?16:tp(n.type)),n)}function $n(n,o,s,c){if(50<Ui)throw Ui=0,cc=null,Error(r(185));fi(n,s,c),((Be&2)===0||n!==gt)&&(n===gt&&((Be&2)===0&&(ms|=s),ft===4&&br(n,Ct)),qt(n,c),s===1&&Be===0&&(o.mode&1)===0&&(Lo=lt()+500,Jl&&mr()))}function qt(n,o){var s=n.callbackNode;G1(n,o);var c=Il(n,n===gt?Ct:0);if(c===0)s!==null&&Vf(s),n.callbackNode=null,n.callbackPriority=0;else if(o=c&-c,n.callbackPriority!==o){if(s!=null&&Vf(s),o===1)n.tag===0?qw(tm.bind(null,n)):Mp(tm.bind(null,n)),Uw(function(){(Be&6)===0&&mr()}),s=null;else{switch(Gf(c)){case 1:s=Va;break;case 4:s=Hf;break;case 16:s=El;break;case 536870912:s=Wf;break;default:s=El}s=um(s,em.bind(null,n))}n.callbackPriority=o,n.callbackNode=s}}function em(n,o){if(vs=-1,ws=0,(Be&6)!==0)throw Error(r(327));var s=n.callbackNode;if(zo()&&n.callbackNode!==s)return null;var c=Il(n,n===gt?Ct:0);if(c===0)return null;if((c&30)!==0||(c&n.expiredLanes)!==0||o)o=ks(n,c);else{o=c;var y=Be;Be|=2;var x=rm();(gt!==n||Ct!==o)&&(er=null,Lo=lt()+500,Wr(n,o));do try{pk();break}catch(R){nm(n,R)}while(!0);$u(),hs.current=x,Be=y,at!==null?o=0:(gt=null,Ct=0,o=ft)}if(o!==0){if(o===2&&(y=Ha(n),y!==0&&(c=y,o=dc(n,y))),o===1)throw s=Mi,Wr(n,0),br(n,c),qt(n,lt()),s;if(o===6)br(n,c);else{if(y=n.current.alternate,(c&30)===0&&!dk(y)&&(o=ks(n,c),o===2&&(x=Ha(n),x!==0&&(c=x,o=dc(n,x))),o===1))throw s=Mi,Wr(n,0),br(n,c),qt(n,lt()),s;switch(n.finishedWork=y,n.finishedLanes=c,o){case 0:case 1:throw Error(r(345));case 2:qr(n,Wt,er);break;case 3:if(br(n,c),(c&130023424)===c&&(o=ac+500-lt(),10<o)){if(Il(n,0)!==0)break;if(y=n.suspendedLanes,(y&c)!==c){Dt(),n.pingedLanes|=n.suspendedLanes&y;break}n.timeoutHandle=yu(qr.bind(null,n,Wt,er),o);break}qr(n,Wt,er);break;case 4:if(br(n,c),(c&4194240)===c)break;for(o=n.eventTimes,y=-1;0<c;){var b=31-bn(c);x=1<<b,b=o[b],b>y&&(y=b),c&=~x}if(c=y,c=lt()-c,c=(120>c?120:480>c?480:1080>c?1080:1920>c?1920:3e3>c?3e3:4320>c?4320:1960*ck(c/1960))-c,10<c){n.timeoutHandle=yu(qr.bind(null,n,Wt,er),c);break}qr(n,Wt,er);break;case 5:qr(n,Wt,er);break;default:throw Error(r(329))}}}return qt(n,lt()),n.callbackNode===s?em.bind(null,n):null}function dc(n,o){var s=Bi;return n.current.memoizedState.isDehydrated&&(Wr(n,o).flags|=256),n=ks(n,o),n!==2&&(o=Wt,Wt=s,o!==null&&fc(o)),n}function fc(n){Wt===null?Wt=n:Wt.push.apply(Wt,n)}function dk(n){for(var o=n;;){if(o.flags&16384){var s=o.updateQueue;if(s!==null&&(s=s.stores,s!==null))for(var c=0;c<s.length;c++){var y=s[c],x=y.getSnapshot;y=y.value;try{if(!Sn(x(),y))return!1}catch{return!1}}}if(s=o.child,o.subtreeFlags&16384&&s!==null)s.return=o,o=s;else{if(o===n)break;for(;o.sibling===null;){if(o.return===null||o.return===n)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function br(n,o){for(o&=~sc,o&=~ms,n.suspendedLanes|=o,n.pingedLanes&=~o,n=n.expirationTimes;0<o;){var s=31-bn(o),c=1<<s;n[s]=-1,o&=~c}}function tm(n){if((Be&6)!==0)throw Error(r(327));zo();var o=Il(n,0);if((o&1)===0)return qt(n,lt()),null;var s=ks(n,o);if(n.tag!==0&&s===2){var c=Ha(n);c!==0&&(o=c,s=dc(n,c))}if(s===1)throw s=Mi,Wr(n,0),br(n,o),qt(n,lt()),s;if(s===6)throw Error(r(345));return n.finishedWork=n.current.alternate,n.finishedLanes=o,qr(n,Wt,er),qt(n,lt()),null}function pc(n,o){var s=Be;Be|=1;try{return n(o)}finally{Be=s,Be===0&&(Lo=lt()+500,Jl&&mr())}}function Hr(n){wr!==null&&wr.tag===0&&(Be&6)===0&&zo();var o=Be;Be|=1;var s=yn.transition,c=We;try{if(yn.transition=null,We=1,n)return n()}finally{We=c,yn.transition=s,Be=o,(Be&6)===0&&mr()}}function hc(){on=Ao.current,Ze(Ao)}function Wr(n,o){n.finishedWork=null,n.finishedLanes=0;var s=n.timeoutHandle;if(s!==-1&&(n.timeoutHandle=-1,Bw(s)),at!==null)for(s=at.return;s!==null;){var c=s;switch(Su(c),c.tag){case 1:c=c.type.childContextTypes,c!=null&&ql();break;case 3:Ro(),Ze(Ut),Ze($t),Fu();break;case 5:Lu(c);break;case 4:Ro();break;case 13:Ze(rt);break;case 19:Ze(rt);break;case 10:Iu(c.type._context);break;case 22:case 23:hc()}s=s.return}if(gt=n,at=n=Sr(n.current,null),Ct=on=o,ft=0,Mi=null,sc=ms=Vr=0,Wt=Bi=null,Mr!==null){for(o=0;o<Mr.length;o++)if(s=Mr[o],c=s.interleaved,c!==null){s.interleaved=null;var y=c.next,x=s.pending;if(x!==null){var b=x.next;x.next=y,c.next=b}s.pending=c}Mr=null}return n}function nm(n,o){do{var s=at;try{if($u(),os.current=as,is){for(var c=ot.memoizedState;c!==null;){var y=c.queue;y!==null&&(y.pending=null),c=c.next}is=!1}if(Ur=0,mt=dt=ot=null,Li=!1,zi=0,lc.current=null,s===null||s.return===null){ft=1,Mi=o,at=null;break}e:{var x=n,b=s.return,R=s,L=o;if(o=Ct,R.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var U=L,ee=R,oe=ee.tag;if((ee.mode&1)===0&&(oe===0||oe===11||oe===15)){var Y=ee.alternate;Y?(ee.updateQueue=Y.updateQueue,ee.memoizedState=Y.memoizedState,ee.lanes=Y.lanes):(ee.updateQueue=null,ee.memoizedState=null)}var me=Th(b);if(me!==null){me.flags&=-257,$h(me,b,R,x,o),me.mode&1&&jh(x,U,o),o=me,L=U;var ye=o.updateQueue;if(ye===null){var we=new Set;we.add(L),o.updateQueue=we}else ye.add(L);break e}else{if((o&1)===0){jh(x,U,o),mc();break e}L=Error(r(426))}}else if(tt&&R.mode&1){var st=Th(b);if(st!==null){(st.flags&65536)===0&&(st.flags|=256),$h(st,b,R,x,o),ju(Po(L,R));break e}}x=L=Po(L,R),ft!==4&&(ft=2),Bi===null?Bi=[x]:Bi.push(x),x=b;do{switch(x.tag){case 3:x.flags|=65536,o&=-o,x.lanes|=o;var D=Ch(x,L,o);Yp(x,D);break e;case 1:R=L;var F=x.type,M=x.stateNode;if((x.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||M!==null&&typeof M.componentDidCatch=="function"&&(vr===null||!vr.has(M)))){x.flags|=65536,o&=-o,x.lanes|=o;var ue=Eh(x,R,o);Yp(x,ue);break e}}x=x.return}while(x!==null)}im(s)}catch(be){o=be,at===s&&s!==null&&(at=s=s.return);continue}break}while(!0)}function rm(){var n=hs.current;return hs.current=as,n===null?as:n}function mc(){(ft===0||ft===3||ft===2)&&(ft=4),gt===null||(Vr&268435455)===0&&(ms&268435455)===0||br(gt,Ct)}function ks(n,o){var s=Be;Be|=2;var c=rm();(gt!==n||Ct!==o)&&(er=null,Wr(n,o));do try{fk();break}catch(y){nm(n,y)}while(!0);if($u(),Be=s,hs.current=c,at!==null)throw Error(r(261));return gt=null,Ct=0,ft}function fk(){for(;at!==null;)om(at)}function pk(){for(;at!==null&&!O1();)om(at)}function om(n){var o=am(n.alternate,n,on);n.memoizedProps=n.pendingProps,o===null?im(n):at=o,lc.current=null}function im(n){var o=n;do{var s=o.alternate;if(n=o.return,(o.flags&32768)===0){if(s=ik(s,o,on),s!==null){at=s;return}}else{if(s=lk(s,o),s!==null){s.flags&=32767,at=s;return}if(n!==null)n.flags|=32768,n.subtreeFlags=0,n.deletions=null;else{ft=6,at=null;return}}if(o=o.sibling,o!==null){at=o;return}at=o=n}while(o!==null);ft===0&&(ft=5)}function qr(n,o,s){var c=We,y=yn.transition;try{yn.transition=null,We=1,hk(n,o,s,c)}finally{yn.transition=y,We=c}return null}function hk(n,o,s,c){do zo();while(wr!==null);if((Be&6)!==0)throw Error(r(327));s=n.finishedWork;var y=n.finishedLanes;if(s===null)return null;if(n.finishedWork=null,n.finishedLanes=0,s===n.current)throw Error(r(177));n.callbackNode=null,n.callbackPriority=0;var x=s.lanes|s.childLanes;if(J1(n,x),n===gt&&(at=gt=null,Ct=0),(s.subtreeFlags&2064)===0&&(s.flags&2064)===0||ys||(ys=!0,um(El,function(){return zo(),null})),x=(s.flags&15990)!==0,(s.subtreeFlags&15990)!==0||x){x=yn.transition,yn.transition=null;var b=We;We=1;var R=Be;Be|=4,lc.current=null,ak(n,s),Kh(s,n),Lw(mu),Nl=!!hu,mu=hu=null,n.current=s,uk(s),D1(),Be=R,We=b,yn.transition=x}else n.current=s;if(ys&&(ys=!1,wr=n,xs=y),x=n.pendingLanes,x===0&&(vr=null),U1(s.stateNode),qt(n,lt()),o!==null)for(c=n.onRecoverableError,s=0;s<o.length;s++)y=o[s],c(y.value,{componentStack:y.stack,digest:y.digest});if(gs)throw gs=!1,n=uc,uc=null,n;return(xs&1)!==0&&n.tag!==0&&zo(),x=n.pendingLanes,(x&1)!==0?n===cc?Ui++:(Ui=0,cc=n):Ui=0,mr(),null}function zo(){if(wr!==null){var n=Gf(xs),o=yn.transition,s=We;try{if(yn.transition=null,We=16>n?16:n,wr===null)var c=!1;else{if(n=wr,wr=null,xs=0,(Be&6)!==0)throw Error(r(331));var y=Be;for(Be|=4,ge=n.current;ge!==null;){var x=ge,b=x.child;if((ge.flags&16)!==0){var R=x.deletions;if(R!==null){for(var L=0;L<R.length;L++){var U=R[L];for(ge=U;ge!==null;){var ee=ge;switch(ee.tag){case 0:case 11:case 15:Di(8,ee,x)}var oe=ee.child;if(oe!==null)oe.return=ee,ge=oe;else for(;ge!==null;){ee=ge;var Y=ee.sibling,me=ee.return;if(Hh(ee),ee===U){ge=null;break}if(Y!==null){Y.return=me,ge=Y;break}ge=me}}}var ye=x.alternate;if(ye!==null){var we=ye.child;if(we!==null){ye.child=null;do{var st=we.sibling;we.sibling=null,we=st}while(we!==null)}}ge=x}}if((x.subtreeFlags&2064)!==0&&b!==null)b.return=x,ge=b;else e:for(;ge!==null;){if(x=ge,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:Di(9,x,x.return)}var D=x.sibling;if(D!==null){D.return=x.return,ge=D;break e}ge=x.return}}var F=n.current;for(ge=F;ge!==null;){b=ge;var M=b.child;if((b.subtreeFlags&2064)!==0&&M!==null)M.return=b,ge=M;else e:for(b=F;ge!==null;){if(R=ge,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:ps(9,R)}}catch(be){it(R,R.return,be)}if(R===b){ge=null;break e}var ue=R.sibling;if(ue!==null){ue.return=R.return,ge=ue;break e}ge=R.return}}if(Be=y,mr(),Ln&&typeof Ln.onPostCommitFiberRoot=="function")try{Ln.onPostCommitFiberRoot(jl,n)}catch{}c=!0}return c}finally{We=s,yn.transition=o}}return!1}function lm(n,o,s){o=Po(s,o),o=Ch(n,o,1),n=yr(n,o,1),o=Dt(),n!==null&&(fi(n,1,o),qt(n,o))}function it(n,o,s){if(n.tag===3)lm(n,n,s);else for(;o!==null;){if(o.tag===3){lm(o,n,s);break}else if(o.tag===1){var c=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof c.componentDidCatch=="function"&&(vr===null||!vr.has(c))){n=Po(s,n),n=Eh(o,n,1),o=yr(o,n,1),n=Dt(),o!==null&&(fi(o,1,n),qt(o,n));break}}o=o.return}}function mk(n,o,s){var c=n.pingCache;c!==null&&c.delete(o),o=Dt(),n.pingedLanes|=n.suspendedLanes&s,gt===n&&(Ct&s)===s&&(ft===4||ft===3&&(Ct&130023424)===Ct&&500>lt()-ac?Wr(n,0):sc|=s),qt(n,o)}function sm(n,o){o===0&&((n.mode&1)===0?o=1:(o=$l,$l<<=1,($l&130023424)===0&&($l=4194304)));var s=Dt();n=Yn(n,o),n!==null&&(fi(n,o,s),qt(n,s))}function gk(n){var o=n.memoizedState,s=0;o!==null&&(s=o.retryLane),sm(n,s)}function yk(n,o){var s=0;switch(n.tag){case 13:var c=n.stateNode,y=n.memoizedState;y!==null&&(s=y.retryLane);break;case 19:c=n.stateNode;break;default:throw Error(r(314))}c!==null&&c.delete(o),sm(n,s)}var am;am=function(n,o,s){if(n!==null)if(n.memoizedProps!==o.pendingProps||Ut.current)Ht=!0;else{if((n.lanes&s)===0&&(o.flags&128)===0)return Ht=!1,ok(n,o,s);Ht=(n.flags&131072)!==0}else Ht=!1,tt&&(o.flags&1048576)!==0&&Bp(o,Ql,o.index);switch(o.lanes=0,o.tag){case 2:var c=o.type;ds(n,o),n=o.pendingProps;var y=So(o,$t.current);Io(o,s),y=Du(null,o,c,n,y,s);var x=Mu();return o.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Vt(c)?(x=!0,Gl(o)):x=!1,o.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,Nu(o),y.updater=us,o.stateNode=y,y._reactInternals=o,qu(o,c,n,s),o=Qu(null,o,c,!0,x,s)):(o.tag=0,tt&&x&&bu(o),Ot(null,o,y,s),o=o.child),o;case 16:c=o.elementType;e:{switch(ds(n,o),n=o.pendingProps,y=c._init,c=y(c._payload),o.type=c,y=o.tag=vk(c),n=En(c,n),y){case 0:o=Ku(null,o,c,n,s);break e;case 1:o=Lh(null,o,c,n,s);break e;case 11:o=Ih(null,o,c,n,s);break e;case 14:o=Rh(null,o,c,En(c.type,n),s);break e}throw Error(r(306,c,""))}return o;case 0:return c=o.type,y=o.pendingProps,y=o.elementType===c?y:En(c,y),Ku(n,o,c,y,s);case 1:return c=o.type,y=o.pendingProps,y=o.elementType===c?y:En(c,y),Lh(n,o,c,y,s);case 3:e:{if(zh(o),n===null)throw Error(r(387));c=o.pendingProps,x=o.memoizedState,y=x.element,Qp(n,o),ns(o,c,null,s);var b=o.memoizedState;if(c=b.element,x.isDehydrated)if(x={element:c,isDehydrated:!1,cache:b.cache,pendingSuspenseBoundaries:b.pendingSuspenseBoundaries,transitions:b.transitions},o.updateQueue.baseState=x,o.memoizedState=x,o.flags&256){y=Po(Error(r(423)),o),o=Fh(n,o,c,s,y);break e}else if(c!==y){y=Po(Error(r(424)),o),o=Fh(n,o,c,s,y);break e}else for(rn=fr(o.stateNode.containerInfo.firstChild),nn=o,tt=!0,Cn=null,s=Jp(o,null,c,s),o.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(jo(),c===y){o=Zn(n,o,s);break e}Ot(n,o,c,s)}o=o.child}return o;case 5:return Zp(o),n===null&&Eu(o),c=o.type,y=o.pendingProps,x=n!==null?n.memoizedProps:null,b=y.children,gu(c,y)?b=null:x!==null&&gu(c,x)&&(o.flags|=32),Ah(n,o),Ot(n,o,b,s),o.child;case 6:return n===null&&Eu(o),null;case 13:return _h(n,o,s);case 4:return Au(o,o.stateNode.containerInfo),c=o.pendingProps,n===null?o.child=To(o,null,c,s):Ot(n,o,c,s),o.child;case 11:return c=o.type,y=o.pendingProps,y=o.elementType===c?y:En(c,y),Ih(n,o,c,y,s);case 7:return Ot(n,o,o.pendingProps,s),o.child;case 8:return Ot(n,o,o.pendingProps.children,s),o.child;case 12:return Ot(n,o,o.pendingProps.children,s),o.child;case 10:e:{if(c=o.type._context,y=o.pendingProps,x=o.memoizedProps,b=y.value,Ke(Zl,c._currentValue),c._currentValue=b,x!==null)if(Sn(x.value,b)){if(x.children===y.children&&!Ut.current){o=Zn(n,o,s);break e}}else for(x=o.child,x!==null&&(x.return=o);x!==null;){var R=x.dependencies;if(R!==null){b=x.child;for(var L=R.firstContext;L!==null;){if(L.context===c){if(x.tag===1){L=Xn(-1,s&-s),L.tag=2;var U=x.updateQueue;if(U!==null){U=U.shared;var ee=U.pending;ee===null?L.next=L:(L.next=ee.next,ee.next=L),U.pending=L}}x.lanes|=s,L=x.alternate,L!==null&&(L.lanes|=s),Ru(x.return,s,o),R.lanes|=s;break}L=L.next}}else if(x.tag===10)b=x.type===o.type?null:x.child;else if(x.tag===18){if(b=x.return,b===null)throw Error(r(341));b.lanes|=s,R=b.alternate,R!==null&&(R.lanes|=s),Ru(b,s,o),b=x.sibling}else b=x.child;if(b!==null)b.return=x;else for(b=x;b!==null;){if(b===o){b=null;break}if(x=b.sibling,x!==null){x.return=b.return,b=x;break}b=b.return}x=b}Ot(n,o,y.children,s),o=o.child}return o;case 9:return y=o.type,c=o.pendingProps.children,Io(o,s),y=mn(y),c=c(y),o.flags|=1,Ot(n,o,c,s),o.child;case 14:return c=o.type,y=En(c,o.pendingProps),y=En(c.type,y),Rh(n,o,c,y,s);case 15:return Ph(n,o,o.type,o.pendingProps,s);case 17:return c=o.type,y=o.pendingProps,y=o.elementType===c?y:En(c,y),ds(n,o),o.tag=1,Vt(c)?(n=!0,Gl(o)):n=!1,Io(o,s),bh(o,c,y),qu(o,c,y,s),Qu(null,o,c,!0,n,s);case 19:return Dh(n,o,s);case 22:return Nh(n,o,s)}throw Error(r(156,o.tag))};function um(n,o){return Uf(n,o)}function xk(n,o,s,c){this.tag=n,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=c,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function xn(n,o,s,c){return new xk(n,o,s,c)}function gc(n){return n=n.prototype,!(!n||!n.isReactComponent)}function vk(n){if(typeof n=="function")return gc(n)?1:0;if(n!=null){if(n=n.$$typeof,n===le)return 11;if(n===B)return 14}return 2}function Sr(n,o){var s=n.alternate;return s===null?(s=xn(n.tag,o,n.key,n.mode),s.elementType=n.elementType,s.type=n.type,s.stateNode=n.stateNode,s.alternate=n,n.alternate=s):(s.pendingProps=o,s.type=n.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=n.flags&14680064,s.childLanes=n.childLanes,s.lanes=n.lanes,s.child=n.child,s.memoizedProps=n.memoizedProps,s.memoizedState=n.memoizedState,s.updateQueue=n.updateQueue,o=n.dependencies,s.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},s.sibling=n.sibling,s.index=n.index,s.ref=n.ref,s}function bs(n,o,s,c,y,x){var b=2;if(c=n,typeof n=="function")gc(n)&&(b=1);else if(typeof n=="string")b=5;else e:switch(n){case H:return Gr(s.children,y,x,o);case K:b=8,y|=8;break;case te:return n=xn(12,s,o,y|2),n.elementType=te,n.lanes=x,n;case X:return n=xn(13,s,o,y),n.elementType=X,n.lanes=x,n;case ne:return n=xn(19,s,o,y),n.elementType=ne,n.lanes=x,n;case ae:return Ss(s,y,x,o);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case O:b=10;break e;case Z:b=9;break e;case le:b=11;break e;case B:b=14;break e;case pe:b=16,c=null;break e}throw Error(r(130,n==null?n:typeof n,""))}return o=xn(b,s,o,y),o.elementType=n,o.type=c,o.lanes=x,o}function Gr(n,o,s,c){return n=xn(7,n,c,o),n.lanes=s,n}function Ss(n,o,s,c){return n=xn(22,n,c,o),n.elementType=ae,n.lanes=s,n.stateNode={isHidden:!1},n}function yc(n,o,s){return n=xn(6,n,null,o),n.lanes=s,n}function xc(n,o,s){return o=xn(4,n.children!==null?n.children:[],n.key,o),o.lanes=s,o.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},o}function wk(n,o,s,c,y){this.tag=o,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Wa(0),this.expirationTimes=Wa(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Wa(0),this.identifierPrefix=c,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function vc(n,o,s,c,y,x,b,R,L){return n=new wk(n,o,s,R,L),o===1?(o=1,x===!0&&(o|=8)):o=0,x=xn(3,null,null,o),n.current=x,x.stateNode=n,x.memoizedState={element:c,isDehydrated:s,cache:null,transitions:null,pendingSuspenseBoundaries:null},Nu(x),n}function kk(n,o,s){var c=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:c==null?null:""+c,children:n,containerInfo:o,implementation:s}}function cm(n){if(!n)return hr;n=n._reactInternals;e:{if(zr(n)!==n||n.tag!==1)throw Error(r(170));var o=n;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Vt(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(r(171))}if(n.tag===1){var s=n.type;if(Vt(s))return Op(n,s,o)}return o}function dm(n,o,s,c,y,x,b,R,L){return n=vc(s,c,!0,n,y,x,b,R,L),n.context=cm(null),s=n.current,c=Dt(),y=kr(s),x=Xn(c,y),x.callback=o??null,yr(s,x,y),n.current.lanes=y,fi(n,y,c),qt(n,c),n}function Cs(n,o,s,c){var y=o.current,x=Dt(),b=kr(y);return s=cm(s),o.context===null?o.context=s:o.pendingContext=s,o=Xn(x,b),o.payload={element:n},c=c===void 0?null:c,c!==null&&(o.callback=c),n=yr(y,o,b),n!==null&&($n(n,y,b,x),ts(n,y,b)),b}function Es(n){if(n=n.current,!n.child)return null;switch(n.child.tag){case 5:return n.child.stateNode;default:return n.child.stateNode}}function fm(n,o){if(n=n.memoizedState,n!==null&&n.dehydrated!==null){var s=n.retryLane;n.retryLane=s!==0&&s<o?s:o}}function wc(n,o){fm(n,o),(n=n.alternate)&&fm(n,o)}function bk(){return null}var pm=typeof reportError=="function"?reportError:function(n){console.error(n)};function kc(n){this._internalRoot=n}js.prototype.render=kc.prototype.render=function(n){var o=this._internalRoot;if(o===null)throw Error(r(409));Cs(n,o,null,null)},js.prototype.unmount=kc.prototype.unmount=function(){var n=this._internalRoot;if(n!==null){this._internalRoot=null;var o=n.containerInfo;Hr(function(){Cs(null,n,null,null)}),o[Gn]=null}};function js(n){this._internalRoot=n}js.prototype.unstable_scheduleHydration=function(n){if(n){var o=Qf();n={blockedOn:null,target:n,priority:o};for(var s=0;s<ur.length&&o!==0&&o<ur[s].priority;s++);ur.splice(s,0,n),s===0&&Zf(n)}};function bc(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11)}function Ts(n){return!(!n||n.nodeType!==1&&n.nodeType!==9&&n.nodeType!==11&&(n.nodeType!==8||n.nodeValue!==" react-mount-point-unstable "))}function hm(){}function Sk(n,o,s,c,y){if(y){if(typeof c=="function"){var x=c;c=function(){var U=Es(b);x.call(U)}}var b=dm(o,c,n,0,null,!1,!1,"",hm);return n._reactRootContainer=b,n[Gn]=b.current,ji(n.nodeType===8?n.parentNode:n),Hr(),b}for(;y=n.lastChild;)n.removeChild(y);if(typeof c=="function"){var R=c;c=function(){var U=Es(L);R.call(U)}}var L=vc(n,0,!1,null,null,!1,!1,"",hm);return n._reactRootContainer=L,n[Gn]=L.current,ji(n.nodeType===8?n.parentNode:n),Hr(function(){Cs(o,L,s,c)}),L}function $s(n,o,s,c,y){var x=s._reactRootContainer;if(x){var b=x;if(typeof y=="function"){var R=y;y=function(){var L=Es(b);R.call(L)}}Cs(o,b,n,y)}else b=Sk(s,o,n,y,c);return Es(b)}Jf=function(n){switch(n.tag){case 3:var o=n.stateNode;if(o.current.memoizedState.isDehydrated){var s=di(o.pendingLanes);s!==0&&(qa(o,s|1),qt(o,lt()),(Be&6)===0&&(Lo=lt()+500,mr()))}break;case 13:Hr(function(){var c=Yn(n,1);if(c!==null){var y=Dt();$n(c,n,1,y)}}),wc(n,1)}},Ga=function(n){if(n.tag===13){var o=Yn(n,134217728);if(o!==null){var s=Dt();$n(o,n,134217728,s)}wc(n,134217728)}},Kf=function(n){if(n.tag===13){var o=kr(n),s=Yn(n,o);if(s!==null){var c=Dt();$n(s,n,o,c)}wc(n,o)}},Qf=function(){return We},Yf=function(n,o){var s=We;try{return We=n,o()}finally{We=s}},Da=function(n,o,s){switch(o){case"input":if(or(n,s),o=s.name,s.type==="radio"&&o!=null){for(s=n;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<s.length;o++){var c=s[o];if(c!==n&&c.form===n.form){var y=Wl(c);if(!y)throw Error(r(90));Ie(c),or(c,y)}}}break;case"textarea":Tt(n,s);break;case"select":o=s.value,o!=null&&pt(n,!!s.multiple,o,!1)}},zf=pc,Ff=Hr;var Ck={usingClientEntryPoint:!1,Events:[Ii,ko,Wl,Af,Lf,pc]},Vi={findFiberByHostInstance:Fr,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Ek={bundleType:Vi.bundleType,version:Vi.version,rendererPackageName:Vi.rendererPackageName,rendererConfig:Vi.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(n){return n=Mf(n),n===null?null:n.stateNode},findFiberByHostInstance:Vi.findFiberByHostInstance||bk,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Is=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Is.isDisabled&&Is.supportsFiber)try{jl=Is.inject(Ek),Ln=Is}catch{}}return Gt.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Ck,Gt.createPortal=function(n,o){var s=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!bc(o))throw Error(r(200));return kk(n,o,null,s)},Gt.createRoot=function(n,o){if(!bc(n))throw Error(r(299));var s=!1,c="",y=pm;return o!=null&&(o.unstable_strictMode===!0&&(s=!0),o.identifierPrefix!==void 0&&(c=o.identifierPrefix),o.onRecoverableError!==void 0&&(y=o.onRecoverableError)),o=vc(n,1,!1,null,null,s,!1,c,y),n[Gn]=o.current,ji(n.nodeType===8?n.parentNode:n),new kc(o)},Gt.findDOMNode=function(n){if(n==null)return null;if(n.nodeType===1)return n;var o=n._reactInternals;if(o===void 0)throw typeof n.render=="function"?Error(r(188)):(n=Object.keys(n).join(","),Error(r(268,n)));return n=Mf(o),n=n===null?null:n.stateNode,n},Gt.flushSync=function(n){return Hr(n)},Gt.hydrate=function(n,o,s){if(!Ts(o))throw Error(r(200));return $s(null,n,o,!0,s)},Gt.hydrateRoot=function(n,o,s){if(!bc(n))throw Error(r(405));var c=s!=null&&s.hydratedSources||null,y=!1,x="",b=pm;if(s!=null&&(s.unstable_strictMode===!0&&(y=!0),s.identifierPrefix!==void 0&&(x=s.identifierPrefix),s.onRecoverableError!==void 0&&(b=s.onRecoverableError)),o=dm(o,null,n,1,s??null,y,!1,x,b),n[Gn]=o.current,ji(n),c)for(n=0;n<c.length;n++)s=c[n],y=s._getVersion,y=y(s._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[s,y]:o.mutableSourceEagerHydrationData.push(s,y);return new js(o)},Gt.render=function(n,o,s){if(!Ts(o))throw Error(r(200));return $s(null,n,o,!1,s)},Gt.unmountComponentAtNode=function(n){if(!Ts(n))throw Error(r(40));return n._reactRootContainer?(Hr(function(){$s(null,null,n,!1,function(){n._reactRootContainer=null,n[Gn]=null})}),!0):!1},Gt.unstable_batchedUpdates=pc,Gt.unstable_renderSubtreeIntoContainer=function(n,o,s,c){if(!Ts(s))throw Error(r(200));if(n==null||n._reactInternals===void 0)throw Error(r(38));return $s(n,o,s,!1,c)},Gt.version="18.3.1-next-f1338f8080-20240426",Gt}var wm;function Ak(){if(wm)return Cc.exports;wm=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Cc.exports=Nk(),Cc.exports}var km;function Lk(){if(km)return Rs;km=1;var e=Ak();return Rs.createRoot=e.createRoot,Rs.hydrateRoot=e.hydrateRoot,Rs}var zk=Lk(),Tc={exports:{}},Hi={};/**
33
+ * @license React
34
+ * react-jsx-runtime.production.min.js
35
+ *
36
+ * Copyright (c) Facebook, Inc. and its affiliates.
37
+ *
38
+ * This source code is licensed under the MIT license found in the
39
+ * LICENSE file in the root directory of this source tree.
40
+ */var bm;function Fk(){if(bm)return Hi;bm=1;var e=Md(),t=Symbol.for("react.element"),r=Symbol.for("react.fragment"),i=Object.prototype.hasOwnProperty,l=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(d,f,p){var g,m={},v=null,w=null;p!==void 0&&(v=""+p),f.key!==void 0&&(v=""+f.key),f.ref!==void 0&&(w=f.ref);for(g in f)i.call(f,g)&&!a.hasOwnProperty(g)&&(m[g]=f[g]);if(d&&d.defaultProps)for(g in f=d.defaultProps,f)m[g]===void 0&&(m[g]=f[g]);return{$$typeof:t,type:d,key:v,ref:w,props:m,_owner:l.current}}return Hi.Fragment=r,Hi.jsx=u,Hi.jsxs=u,Hi}var Sm;function _k(){return Sm||(Sm=1,Tc.exports=Fk()),Tc.exports}var h=_k(),wt=function(){return wt=Object.assign||function(t){for(var r,i=1,l=arguments.length;i<l;i++){r=arguments[i];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},wt.apply(this,arguments)};function Wo(e,t,r){if(r||arguments.length===2)for(var i=0,l=t.length,a;i<l;i++)(a||!(i in t))&&(a||(a=Array.prototype.slice.call(t,0,i)),a[i]=t[i]);return e.concat(a||Array.prototype.slice.call(t))}var et="-ms-",ol="-moz-",He="-webkit-",$y="comm",xa="rule",Bd="decl",Ok="@import",Iy="@keyframes",Dk="@layer",Ry=Math.abs,Ud=String.fromCharCode,od=Object.assign;function Mk(e,t){return xt(e,0)^45?(((t<<2^xt(e,0))<<2^xt(e,1))<<2^xt(e,2))<<2^xt(e,3):0}function Py(e){return e.trim()}function tr(e,t){return(e=t.exec(e))?e[0]:e}function Ne(e,t,r){return e.replace(t,r)}function Hs(e,t,r){return e.indexOf(t,r)}function xt(e,t){return e.charCodeAt(t)|0}function qo(e,t,r){return e.slice(t,r)}function Un(e){return e.length}function Ny(e){return e.length}function nl(e,t){return t.push(e),e}function Bk(e,t){return e.map(t).join("")}function Cm(e,t){return e.filter(function(r){return!tr(r,t)})}var va=1,Go=1,Ay=0,wn=0,ct=0,Zo="";function wa(e,t,r,i,l,a,u,d){return{value:e,root:t,parent:r,type:i,props:l,children:a,line:va,column:Go,length:u,return:"",siblings:d}}function $r(e,t){return od(wa("",null,null,"",null,null,0,e.siblings),e,{length:-e.length},t)}function Fo(e){for(;e.root;)e=$r(e.root,{children:[e]});nl(e,e.siblings)}function Uk(){return ct}function Vk(){return ct=wn>0?xt(Zo,--wn):0,Go--,ct===10&&(Go=1,va--),ct}function In(){return ct=wn<Ay?xt(Zo,wn++):0,Go++,ct===10&&(Go=1,va++),ct}function Zr(){return xt(Zo,wn)}function Ws(){return wn}function ka(e,t){return qo(Zo,e,t)}function id(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Hk(e){return va=Go=1,Ay=Un(Zo=e),wn=0,[]}function Wk(e){return Zo="",e}function $c(e){return Py(ka(wn-1,ld(e===91?e+2:e===40?e+1:e)))}function qk(e){for(;(ct=Zr())&&ct<33;)In();return id(e)>2||id(ct)>3?"":" "}function Gk(e,t){for(;--t&&In()&&!(ct<48||ct>102||ct>57&&ct<65||ct>70&&ct<97););return ka(e,Ws()+(t<6&&Zr()==32&&In()==32))}function ld(e){for(;In();)switch(ct){case e:return wn;case 34:case 39:e!==34&&e!==39&&ld(ct);break;case 40:e===41&&ld(e);break;case 92:In();break}return wn}function Jk(e,t){for(;In()&&e+ct!==57;)if(e+ct===84&&Zr()===47)break;return"/*"+ka(t,wn-1)+"*"+Ud(e===47?e:In())}function Kk(e){for(;!id(Zr());)In();return ka(e,wn)}function Qk(e){return Wk(qs("",null,null,null,[""],e=Hk(e),0,[0],e))}function qs(e,t,r,i,l,a,u,d,f){for(var p=0,g=0,m=u,v=0,w=0,k=0,S=1,j=1,E=1,P=0,N="",_=l,q=a,A=i,H=N;j;)switch(k=P,P=In()){case 40:if(k!=108&&xt(H,m-1)==58){Hs(H+=Ne($c(P),"&","&\f"),"&\f",Ry(p?d[p-1]:0))!=-1&&(E=-1);break}case 34:case 39:case 91:H+=$c(P);break;case 9:case 10:case 13:case 32:H+=qk(k);break;case 92:H+=Gk(Ws()-1,7);continue;case 47:switch(Zr()){case 42:case 47:nl(Yk(Jk(In(),Ws()),t,r,f),f);break;default:H+="/"}break;case 123*S:d[p++]=Un(H)*E;case 125*S:case 59:case 0:switch(P){case 0:case 125:j=0;case 59+g:E==-1&&(H=Ne(H,/\f/g,"")),w>0&&Un(H)-m&&nl(w>32?jm(H+";",i,r,m-1,f):jm(Ne(H," ","")+";",i,r,m-2,f),f);break;case 59:H+=";";default:if(nl(A=Em(H,t,r,p,g,l,d,N,_=[],q=[],m,a),a),P===123)if(g===0)qs(H,t,A,A,_,a,m,d,q);else switch(v===99&&xt(H,3)===110?100:v){case 100:case 108:case 109:case 115:qs(e,A,A,i&&nl(Em(e,A,A,0,0,l,d,N,l,_=[],m,q),q),l,q,m,d,i?_:q);break;default:qs(H,A,A,A,[""],q,0,d,q)}}p=g=w=0,S=E=1,N=H="",m=u;break;case 58:m=1+Un(H),w=k;default:if(S<1){if(P==123)--S;else if(P==125&&S++==0&&Vk()==125)continue}switch(H+=Ud(P),P*S){case 38:E=g>0?1:(H+="\f",-1);break;case 44:d[p++]=(Un(H)-1)*E,E=1;break;case 64:Zr()===45&&(H+=$c(In())),v=Zr(),g=m=Un(N=H+=Kk(Ws())),P++;break;case 45:k===45&&Un(H)==2&&(S=0)}}return a}function Em(e,t,r,i,l,a,u,d,f,p,g,m){for(var v=l-1,w=l===0?a:[""],k=Ny(w),S=0,j=0,E=0;S<i;++S)for(var P=0,N=qo(e,v+1,v=Ry(j=u[S])),_=e;P<k;++P)(_=Py(j>0?w[P]+" "+N:Ne(N,/&\f/g,w[P])))&&(f[E++]=_);return wa(e,t,r,l===0?xa:d,f,p,g,m)}function Yk(e,t,r,i){return wa(e,t,r,$y,Ud(Uk()),qo(e,2,-2),0,i)}function jm(e,t,r,i,l){return wa(e,t,r,Bd,qo(e,0,i),qo(e,i+1,-1),i,l)}function Ly(e,t,r){switch(Mk(e,t)){case 5103:return He+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return He+e+e;case 4789:return ol+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return He+e+ol+e+et+e+e;case 5936:switch(xt(e,t+11)){case 114:return He+e+et+Ne(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return He+e+et+Ne(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return He+e+et+Ne(e,/[svh]\w+-[tblr]{2}/,"lr")+e}case 6828:case 4268:case 2903:return He+e+et+e+e;case 6165:return He+e+et+"flex-"+e+e;case 5187:return He+e+Ne(e,/(\w+).+(:[^]+)/,He+"box-$1$2"+et+"flex-$1$2")+e;case 5443:return He+e+et+"flex-item-"+Ne(e,/flex-|-self/g,"")+(tr(e,/flex-|baseline/)?"":et+"grid-row-"+Ne(e,/flex-|-self/g,""))+e;case 4675:return He+e+et+"flex-line-pack"+Ne(e,/align-content|flex-|-self/g,"")+e;case 5548:return He+e+et+Ne(e,"shrink","negative")+e;case 5292:return He+e+et+Ne(e,"basis","preferred-size")+e;case 6060:return He+"box-"+Ne(e,"-grow","")+He+e+et+Ne(e,"grow","positive")+e;case 4554:return He+Ne(e,/([^-])(transform)/g,"$1"+He+"$2")+e;case 6187:return Ne(Ne(Ne(e,/(zoom-|grab)/,He+"$1"),/(image-set)/,He+"$1"),e,"")+e;case 5495:case 3959:return Ne(e,/(image-set\([^]*)/,He+"$1$`$1");case 4968:return Ne(Ne(e,/(.+:)(flex-)?(.*)/,He+"box-pack:$3"+et+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+He+e+e;case 4200:if(!tr(e,/flex-|baseline/))return et+"grid-column-align"+qo(e,t)+e;break;case 2592:case 3360:return et+Ne(e,"template-","")+e;case 4384:case 3616:return r&&r.some(function(i,l){return t=l,tr(i.props,/grid-\w+-end/)})?~Hs(e+(r=r[t].value),"span",0)?e:et+Ne(e,"-start","")+e+et+"grid-row-span:"+(~Hs(r,"span",0)?tr(r,/\d+/):+tr(r,/\d+/)-+tr(e,/\d+/))+";":et+Ne(e,"-start","")+e;case 4896:case 4128:return r&&r.some(function(i){return tr(i.props,/grid-\w+-start/)})?e:et+Ne(Ne(e,"-end","-span"),"span ","")+e;case 4095:case 3583:case 4068:case 2532:return Ne(e,/(.+)-inline(.+)/,He+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Un(e)-1-t>6)switch(xt(e,t+1)){case 109:if(xt(e,t+4)!==45)break;case 102:return Ne(e,/(.+:)(.+)-([^]+)/,"$1"+He+"$2-$3$1"+ol+(xt(e,t+3)==108?"$3":"$2-$3"))+e;case 115:return~Hs(e,"stretch",0)?Ly(Ne(e,"stretch","fill-available"),t,r)+e:e}break;case 5152:case 5920:return Ne(e,/(.+?):(\d+)(\s*\/\s*(span)?\s*(\d+))?(.*)/,function(i,l,a,u,d,f,p){return et+l+":"+a+p+(u?et+l+"-span:"+(d?f:+f-+a)+p:"")+e});case 4949:if(xt(e,t+6)===121)return Ne(e,":",":"+He)+e;break;case 6444:switch(xt(e,xt(e,14)===45?18:11)){case 120:return Ne(e,/(.+:)([^;\s!]+)(;|(\s+)?!.+)?/,"$1"+He+(xt(e,14)===45?"inline-":"")+"box$3$1"+He+"$2$3$1"+et+"$2box$3")+e;case 100:return Ne(e,":",":"+et)+e}break;case 5719:case 2647:case 2135:case 3927:case 2391:return Ne(e,"scroll-","scroll-snap-")+e}return e}function na(e,t){for(var r="",i=0;i<e.length;i++)r+=t(e[i],i,e,t)||"";return r}function Xk(e,t,r,i){switch(e.type){case Dk:if(e.children.length)break;case Ok:case Bd:return e.return=e.return||e.value;case $y:return"";case Iy:return e.return=e.value+"{"+na(e.children,i)+"}";case xa:if(!Un(e.value=e.props.join(",")))return""}return Un(r=na(e.children,i))?e.return=e.value+"{"+r+"}":""}function Zk(e){var t=Ny(e);return function(r,i,l,a){for(var u="",d=0;d<t;d++)u+=e[d](r,i,l,a)||"";return u}}function eb(e){return function(t){t.root||(t=t.return)&&e(t)}}function tb(e,t,r,i){if(e.length>-1&&!e.return)switch(e.type){case Bd:e.return=Ly(e.value,e.length,r);return;case Iy:return na([$r(e,{value:Ne(e.value,"@","@"+He)})],i);case xa:if(e.length)return Bk(r=e.props,function(l){switch(tr(l,i=/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":Fo($r(e,{props:[Ne(l,/:(read-\w+)/,":"+ol+"$1")]})),Fo($r(e,{props:[l]})),od(e,{props:Cm(r,i)});break;case"::placeholder":Fo($r(e,{props:[Ne(l,/:(plac\w+)/,":"+He+"input-$1")]})),Fo($r(e,{props:[Ne(l,/:(plac\w+)/,":"+ol+"$1")]})),Fo($r(e,{props:[Ne(l,/:(plac\w+)/,et+"input-$1")]})),Fo($r(e,{props:[l]})),od(e,{props:Cm(r,i)});break}return""})}}var nb={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},sn={},Jo=typeof process<"u"&&sn!==void 0&&(sn.REACT_APP_SC_ATTR||sn.SC_ATTR)||"data-styled",zy="active",Fy="data-styled-version",ba="6.1.13",Vd=`/*!sc*/
41
+ `,ra=typeof window<"u"&&"HTMLElement"in window,rb=!!(typeof SC_DISABLE_SPEEDY=="boolean"?SC_DISABLE_SPEEDY:typeof process<"u"&&sn!==void 0&&sn.REACT_APP_SC_DISABLE_SPEEDY!==void 0&&sn.REACT_APP_SC_DISABLE_SPEEDY!==""?sn.REACT_APP_SC_DISABLE_SPEEDY!=="false"&&sn.REACT_APP_SC_DISABLE_SPEEDY:typeof process<"u"&&sn!==void 0&&sn.SC_DISABLE_SPEEDY!==void 0&&sn.SC_DISABLE_SPEEDY!==""&&sn.SC_DISABLE_SPEEDY!=="false"&&sn.SC_DISABLE_SPEEDY),ob={},Sa=Object.freeze([]),Ko=Object.freeze({});function _y(e,t,r){return r===void 0&&(r=Ko),e.theme!==r.theme&&e.theme||t||r.theme}var Oy=new Set(["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","big","blockquote","body","br","button","canvas","caption","cite","code","col","colgroup","data","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","html","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meta","meter","nav","noscript","object","ol","optgroup","option","output","p","param","picture","pre","progress","q","rp","rt","ruby","s","samp","script","section","select","small","source","span","strong","style","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","use","var","video","wbr","circle","clipPath","defs","ellipse","foreignObject","g","image","line","linearGradient","marker","mask","path","pattern","polygon","polyline","radialGradient","rect","stop","svg","text","tspan"]),ib=/[!"#$%&'()*+,./:;<=>?@[\\\]^`{|}~-]+/g,lb=/(^-|-$)/g;function Tm(e){return e.replace(ib,"-").replace(lb,"")}var sb=/(a)(d)/gi,Ps=52,$m=function(e){return String.fromCharCode(e+(e>25?39:97))};function sd(e){var t,r="";for(t=Math.abs(e);t>Ps;t=t/Ps|0)r=$m(t%Ps)+r;return($m(t%Ps)+r).replace(sb,"$1-$2")}var Ic,Dy=5381,Bo=function(e,t){for(var r=t.length;r;)e=33*e^t.charCodeAt(--r);return e},My=function(e){return Bo(Dy,e)};function Hd(e){return sd(My(e)>>>0)}function ab(e){return e.displayName||e.name||"Component"}function Rc(e){return typeof e=="string"&&!0}var By=typeof Symbol=="function"&&Symbol.for,Uy=By?Symbol.for("react.memo"):60115,ub=By?Symbol.for("react.forward_ref"):60112,cb={childContextTypes:!0,contextType:!0,contextTypes:!0,defaultProps:!0,displayName:!0,getDefaultProps:!0,getDerivedStateFromError:!0,getDerivedStateFromProps:!0,mixins:!0,propTypes:!0,type:!0},db={name:!0,length:!0,prototype:!0,caller:!0,callee:!0,arguments:!0,arity:!0},Vy={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},fb=((Ic={})[ub]={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},Ic[Uy]=Vy,Ic);function Im(e){return("type"in(t=e)&&t.type.$$typeof)===Uy?Vy:"$$typeof"in e?fb[e.$$typeof]:cb;var t}var pb=Object.defineProperty,hb=Object.getOwnPropertyNames,Rm=Object.getOwnPropertySymbols,mb=Object.getOwnPropertyDescriptor,gb=Object.getPrototypeOf,Pm=Object.prototype;function Hy(e,t,r){if(typeof t!="string"){if(Pm){var i=gb(t);i&&i!==Pm&&Hy(e,i,r)}var l=hb(t);Rm&&(l=l.concat(Rm(t)));for(var a=Im(e),u=Im(t),d=0;d<l.length;++d){var f=l[d];if(!(f in db||r&&r[f]||u&&f in u||a&&f in a)){var p=mb(t,f);try{pb(e,f,p)}catch{}}}}return e}function oo(e){return typeof e=="function"}function Wd(e){return typeof e=="object"&&"styledComponentId"in e}function Yr(e,t){return e&&t?"".concat(e," ").concat(t):e||t||""}function oa(e,t){if(e.length===0)return"";for(var r=e[0],i=1;i<e.length;i++)r+=e[i];return r}function al(e){return e!==null&&typeof e=="object"&&e.constructor.name===Object.name&&!("props"in e&&e.$$typeof)}function ad(e,t,r){if(r===void 0&&(r=!1),!r&&!al(e)&&!Array.isArray(e))return t;if(Array.isArray(t))for(var i=0;i<t.length;i++)e[i]=ad(e[i],t[i]);else if(al(t))for(var i in t)e[i]=ad(e[i],t[i]);return e}function qd(e,t){Object.defineProperty(e,"toString",{value:t})}function Rr(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];return new Error("An error occurred. See https://github.com/styled-components/styled-components/blob/main/packages/styled-components/src/utils/errors.md#".concat(e," for more information.").concat(t.length>0?" Args: ".concat(t.join(", ")):""))}var yb=function(){function e(t){this.groupSizes=new Uint32Array(512),this.length=512,this.tag=t}return e.prototype.indexOfGroup=function(t){for(var r=0,i=0;i<t;i++)r+=this.groupSizes[i];return r},e.prototype.insertRules=function(t,r){if(t>=this.groupSizes.length){for(var i=this.groupSizes,l=i.length,a=l;t>=a;)if((a<<=1)<0)throw Rr(16,"".concat(t));this.groupSizes=new Uint32Array(a),this.groupSizes.set(i),this.length=a;for(var u=l;u<a;u++)this.groupSizes[u]=0}for(var d=this.indexOfGroup(t+1),f=(u=0,r.length);u<f;u++)this.tag.insertRule(d,r[u])&&(this.groupSizes[t]++,d++)},e.prototype.clearGroup=function(t){if(t<this.length){var r=this.groupSizes[t],i=this.indexOfGroup(t),l=i+r;this.groupSizes[t]=0;for(var a=i;a<l;a++)this.tag.deleteRule(i)}},e.prototype.getGroup=function(t){var r="";if(t>=this.length||this.groupSizes[t]===0)return r;for(var i=this.groupSizes[t],l=this.indexOfGroup(t),a=l+i,u=l;u<a;u++)r+="".concat(this.tag.getRule(u)).concat(Vd);return r},e}(),Gs=new Map,ia=new Map,Js=1,Ns=function(e){if(Gs.has(e))return Gs.get(e);for(;ia.has(Js);)Js++;var t=Js++;return Gs.set(e,t),ia.set(t,e),t},xb=function(e,t){Js=t+1,Gs.set(e,t),ia.set(t,e)},vb="style[".concat(Jo,"][").concat(Fy,'="').concat(ba,'"]'),wb=new RegExp("^".concat(Jo,'\\.g(\\d+)\\[id="([\\w\\d-]+)"\\].*?"([^"]*)')),kb=function(e,t,r){for(var i,l=r.split(","),a=0,u=l.length;a<u;a++)(i=l[a])&&e.registerName(t,i)},bb=function(e,t){for(var r,i=((r=t.textContent)!==null&&r!==void 0?r:"").split(Vd),l=[],a=0,u=i.length;a<u;a++){var d=i[a].trim();if(d){var f=d.match(wb);if(f){var p=0|parseInt(f[1],10),g=f[2];p!==0&&(xb(g,p),kb(e,g,f[3]),e.getTag().insertRules(p,l)),l.length=0}else l.push(d)}}},Nm=function(e){for(var t=document.querySelectorAll(vb),r=0,i=t.length;r<i;r++){var l=t[r];l&&l.getAttribute(Jo)!==zy&&(bb(e,l),l.parentNode&&l.parentNode.removeChild(l))}};function Sb(){return typeof __webpack_nonce__<"u"?__webpack_nonce__:null}var Wy=function(e){var t=document.head,r=e||t,i=document.createElement("style"),l=function(d){var f=Array.from(d.querySelectorAll("style[".concat(Jo,"]")));return f[f.length-1]}(r),a=l!==void 0?l.nextSibling:null;i.setAttribute(Jo,zy),i.setAttribute(Fy,ba);var u=Sb();return u&&i.setAttribute("nonce",u),r.insertBefore(i,a),i},Cb=function(){function e(t){this.element=Wy(t),this.element.appendChild(document.createTextNode("")),this.sheet=function(r){if(r.sheet)return r.sheet;for(var i=document.styleSheets,l=0,a=i.length;l<a;l++){var u=i[l];if(u.ownerNode===r)return u}throw Rr(17)}(this.element),this.length=0}return e.prototype.insertRule=function(t,r){try{return this.sheet.insertRule(r,t),this.length++,!0}catch{return!1}},e.prototype.deleteRule=function(t){this.sheet.deleteRule(t),this.length--},e.prototype.getRule=function(t){var r=this.sheet.cssRules[t];return r&&r.cssText?r.cssText:""},e}(),Eb=function(){function e(t){this.element=Wy(t),this.nodes=this.element.childNodes,this.length=0}return e.prototype.insertRule=function(t,r){if(t<=this.length&&t>=0){var i=document.createTextNode(r);return this.element.insertBefore(i,this.nodes[t]||null),this.length++,!0}return!1},e.prototype.deleteRule=function(t){this.element.removeChild(this.nodes[t]),this.length--},e.prototype.getRule=function(t){return t<this.length?this.nodes[t].textContent:""},e}(),jb=function(){function e(t){this.rules=[],this.length=0}return e.prototype.insertRule=function(t,r){return t<=this.length&&(this.rules.splice(t,0,r),this.length++,!0)},e.prototype.deleteRule=function(t){this.rules.splice(t,1),this.length--},e.prototype.getRule=function(t){return t<this.length?this.rules[t]:""},e}(),Am=ra,Tb={isServer:!ra,useCSSOMInjection:!rb},la=function(){function e(t,r,i){t===void 0&&(t=Ko),r===void 0&&(r={});var l=this;this.options=wt(wt({},Tb),t),this.gs=r,this.names=new Map(i),this.server=!!t.isServer,!this.server&&ra&&Am&&(Am=!1,Nm(this)),qd(this,function(){return function(a){for(var u=a.getTag(),d=u.length,f="",p=function(m){var v=function(E){return ia.get(E)}(m);if(v===void 0)return"continue";var w=a.names.get(v),k=u.getGroup(m);if(w===void 0||!w.size||k.length===0)return"continue";var S="".concat(Jo,".g").concat(m,'[id="').concat(v,'"]'),j="";w!==void 0&&w.forEach(function(E){E.length>0&&(j+="".concat(E,","))}),f+="".concat(k).concat(S,'{content:"').concat(j,'"}').concat(Vd)},g=0;g<d;g++)p(g);return f}(l)})}return e.registerId=function(t){return Ns(t)},e.prototype.rehydrate=function(){!this.server&&ra&&Nm(this)},e.prototype.reconstructWithOptions=function(t,r){return r===void 0&&(r=!0),new e(wt(wt({},this.options),t),this.gs,r&&this.names||void 0)},e.prototype.allocateGSInstance=function(t){return this.gs[t]=(this.gs[t]||0)+1},e.prototype.getTag=function(){return this.tag||(this.tag=(t=function(r){var i=r.useCSSOMInjection,l=r.target;return r.isServer?new jb(l):i?new Cb(l):new Eb(l)}(this.options),new yb(t)));var t},e.prototype.hasNameForId=function(t,r){return this.names.has(t)&&this.names.get(t).has(r)},e.prototype.registerName=function(t,r){if(Ns(t),this.names.has(t))this.names.get(t).add(r);else{var i=new Set;i.add(r),this.names.set(t,i)}},e.prototype.insertRules=function(t,r,i){this.registerName(t,r),this.getTag().insertRules(Ns(t),i)},e.prototype.clearNames=function(t){this.names.has(t)&&this.names.get(t).clear()},e.prototype.clearRules=function(t){this.getTag().clearGroup(Ns(t)),this.clearNames(t)},e.prototype.clearTag=function(){this.tag=void 0},e}(),$b=/&/g,Ib=/^\s*\/\/.*$/gm;function qy(e,t){return e.map(function(r){return r.type==="rule"&&(r.value="".concat(t," ").concat(r.value),r.value=r.value.replaceAll(",",",".concat(t," ")),r.props=r.props.map(function(i){return"".concat(t," ").concat(i)})),Array.isArray(r.children)&&r.type!=="@keyframes"&&(r.children=qy(r.children,t)),r})}function Rb(e){var t,r,i,l=Ko,a=l.options,u=a===void 0?Ko:a,d=l.plugins,f=d===void 0?Sa:d,p=function(v,w,k){return k.startsWith(r)&&k.endsWith(r)&&k.replaceAll(r,"").length>0?".".concat(t):v},g=f.slice();g.push(function(v){v.type===xa&&v.value.includes("&")&&(v.props[0]=v.props[0].replace($b,r).replace(i,p))}),u.prefix&&g.push(tb),g.push(Xk);var m=function(v,w,k,S){w===void 0&&(w=""),k===void 0&&(k=""),S===void 0&&(S="&"),t=S,r=w,i=new RegExp("\\".concat(r,"\\b"),"g");var j=v.replace(Ib,""),E=Qk(k||w?"".concat(k," ").concat(w," { ").concat(j," }"):j);u.namespace&&(E=qy(E,u.namespace));var P=[];return na(E,Zk(g.concat(eb(function(N){return P.push(N)})))),P};return m.hash=f.length?f.reduce(function(v,w){return w.name||Rr(15),Bo(v,w.name)},Dy).toString():"",m}var Pb=new la,ud=Rb(),Gy=Et.createContext({shouldForwardProp:void 0,styleSheet:Pb,stylis:ud});Gy.Consumer;Et.createContext(void 0);function cd(){return $.useContext(Gy)}var Jy=function(){function e(t,r){var i=this;this.inject=function(l,a){a===void 0&&(a=ud);var u=i.name+a.hash;l.hasNameForId(i.id,u)||l.insertRules(i.id,u,a(i.rules,u,"@keyframes"))},this.name=t,this.id="sc-keyframes-".concat(t),this.rules=r,qd(this,function(){throw Rr(12,String(i.name))})}return e.prototype.getName=function(t){return t===void 0&&(t=ud),this.name+t.hash},e}(),Nb=function(e){return e>="A"&&e<="Z"};function Lm(e){for(var t="",r=0;r<e.length;r++){var i=e[r];if(r===1&&i==="-"&&e[0]==="-")return e;Nb(i)?t+="-"+i.toLowerCase():t+=i}return t.startsWith("ms-")?"-"+t:t}var Ky=function(e){return e==null||e===!1||e===""},Qy=function(e){var t,r,i=[];for(var l in e){var a=e[l];e.hasOwnProperty(l)&&!Ky(a)&&(Array.isArray(a)&&a.isCss||oo(a)?i.push("".concat(Lm(l),":"),a,";"):al(a)?i.push.apply(i,Wo(Wo(["".concat(l," {")],Qy(a),!1),["}"],!1)):i.push("".concat(Lm(l),": ").concat((t=l,(r=a)==null||typeof r=="boolean"||r===""?"":typeof r!="number"||r===0||t in nb||t.startsWith("--")?String(r).trim():"".concat(r,"px")),";")))}return i};function Ir(e,t,r,i){if(Ky(e))return[];if(Wd(e))return[".".concat(e.styledComponentId)];if(oo(e)){if(!oo(a=e)||a.prototype&&a.prototype.isReactComponent||!t)return[e];var l=e(t);return Ir(l,t,r,i)}var a;return e instanceof Jy?r?(e.inject(r,i),[e.getName(i)]):[e]:al(e)?Qy(e):Array.isArray(e)?Array.prototype.concat.apply(Sa,e.map(function(u){return Ir(u,t,r,i)})):[e.toString()]}function Yy(e){for(var t=0;t<e.length;t+=1){var r=e[t];if(oo(r)&&!Wd(r))return!1}return!0}var Ab=My(ba),Lb=function(){function e(t,r,i){this.rules=t,this.staticRulesId="",this.isStatic=(i===void 0||i.isStatic)&&Yy(t),this.componentId=r,this.baseHash=Bo(Ab,r),this.baseStyle=i,la.registerId(r)}return e.prototype.generateAndInjectStyles=function(t,r,i){var l=this.baseStyle?this.baseStyle.generateAndInjectStyles(t,r,i):"";if(this.isStatic&&!i.hash)if(this.staticRulesId&&r.hasNameForId(this.componentId,this.staticRulesId))l=Yr(l,this.staticRulesId);else{var a=oa(Ir(this.rules,t,r,i)),u=sd(Bo(this.baseHash,a)>>>0);if(!r.hasNameForId(this.componentId,u)){var d=i(a,".".concat(u),void 0,this.componentId);r.insertRules(this.componentId,u,d)}l=Yr(l,u),this.staticRulesId=u}else{for(var f=Bo(this.baseHash,i.hash),p="",g=0;g<this.rules.length;g++){var m=this.rules[g];if(typeof m=="string")p+=m;else if(m){var v=oa(Ir(m,t,r,i));f=Bo(f,v+g),p+=v}}if(p){var w=sd(f>>>0);r.hasNameForId(this.componentId,w)||r.insertRules(this.componentId,w,i(p,".".concat(w),void 0,this.componentId)),l=Yr(l,w)}}return l},e}(),Qo=Et.createContext(void 0);Qo.Consumer;function zb(){var e=$.useContext(Qo);if(!e)throw Rr(18);return e}function zm(e){var t=Et.useContext(Qo),r=$.useMemo(function(){return function(i,l){if(!i)throw Rr(14);if(oo(i)){var a=i(l);return a}if(Array.isArray(i)||typeof i!="object")throw Rr(8);return l?wt(wt({},l),i):i}(e.theme,t)},[e.theme,t]);return e.children?Et.createElement(Qo.Provider,{value:r},e.children):null}var Pc={};function Fb(e,t,r){var i=Wd(e),l=e,a=!Rc(e),u=t.attrs,d=u===void 0?Sa:u,f=t.componentId,p=f===void 0?function(_,q){var A=typeof _!="string"?"sc":Tm(_);Pc[A]=(Pc[A]||0)+1;var H="".concat(A,"-").concat(Hd(ba+A+Pc[A]));return q?"".concat(q,"-").concat(H):H}(t.displayName,t.parentComponentId):f,g=t.displayName,m=g===void 0?function(_){return Rc(_)?"styled.".concat(_):"Styled(".concat(ab(_),")")}(e):g,v=t.displayName&&t.componentId?"".concat(Tm(t.displayName),"-").concat(t.componentId):t.componentId||p,w=i&&l.attrs?l.attrs.concat(d).filter(Boolean):d,k=t.shouldForwardProp;if(i&&l.shouldForwardProp){var S=l.shouldForwardProp;if(t.shouldForwardProp){var j=t.shouldForwardProp;k=function(_,q){return S(_,q)&&j(_,q)}}else k=S}var E=new Lb(r,v,i?l.componentStyle:void 0);function P(_,q){return function(A,H,K){var te=A.attrs,O=A.componentStyle,Z=A.defaultProps,le=A.foldedComponentIds,X=A.styledComponentId,ne=A.target,B=Et.useContext(Qo),pe=cd(),ae=A.shouldForwardProp||pe.shouldForwardProp,Q=_y(H,B,Z)||Ko,de=function(xe,ke,he){for(var fe,se=wt(wt({},ke),{className:void 0,theme:he}),ve=0;ve<xe.length;ve+=1){var Ae=oo(fe=xe[ve])?fe(se):fe;for(var Ie in Ae)se[Ie]=Ie==="className"?Yr(se[Ie],Ae[Ie]):Ie==="style"?wt(wt({},se[Ie]),Ae[Ie]):Ae[Ie]}return ke.className&&(se.className=Yr(se.className,ke.className)),se}(te,H,Q),T=de.as||ne,z={};for(var G in de)de[G]===void 0||G[0]==="$"||G==="as"||G==="theme"&&de.theme===Q||(G==="forwardedAs"?z.as=de.forwardedAs:ae&&!ae(G,T)||(z[G]=de[G]));var I=function(xe,ke){var he=cd(),fe=xe.generateAndInjectStyles(ke,he.styleSheet,he.stylis);return fe}(O,de),ce=Yr(le,X);return I&&(ce+=" "+I),de.className&&(ce+=" "+de.className),z[Rc(T)&&!Oy.has(T)?"class":"className"]=ce,z.ref=K,$.createElement(T,z)}(N,_,q)}P.displayName=m;var N=Et.forwardRef(P);return N.attrs=w,N.componentStyle=E,N.displayName=m,N.shouldForwardProp=k,N.foldedComponentIds=i?Yr(l.foldedComponentIds,l.styledComponentId):"",N.styledComponentId=v,N.target=i?l.target:e,Object.defineProperty(N,"defaultProps",{get:function(){return this._foldedDefaultProps},set:function(_){this._foldedDefaultProps=i?function(q){for(var A=[],H=1;H<arguments.length;H++)A[H-1]=arguments[H];for(var K=0,te=A;K<te.length;K++)ad(q,te[K],!0);return q}({},l.defaultProps,_):_}}),qd(N,function(){return".".concat(N.styledComponentId)}),a&&Hy(N,e,{attrs:!0,componentStyle:!0,displayName:!0,foldedComponentIds:!0,shouldForwardProp:!0,styledComponentId:!0,target:!0}),N}function Fm(e,t){for(var r=[e[0]],i=0,l=t.length;i<l;i+=1)r.push(t[i],e[i+1]);return r}var _m=function(e){return Object.assign(e,{isCss:!0})};function vt(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(oo(e)||al(e))return _m(Ir(Fm(Sa,Wo([e],t,!0))));var i=e;return t.length===0&&i.length===1&&typeof i[0]=="string"?Ir(i):_m(Ir(Fm(i,t)))}function dd(e,t,r){if(r===void 0&&(r=Ko),!t)throw Rr(1,t);var i=function(l){for(var a=[],u=1;u<arguments.length;u++)a[u-1]=arguments[u];return e(t,r,vt.apply(void 0,Wo([l],a,!1)))};return i.attrs=function(l){return dd(e,t,wt(wt({},r),{attrs:Array.prototype.concat(r.attrs,l).filter(Boolean)}))},i.withConfig=function(l){return dd(e,t,wt(wt({},r),l))},i}var Xy=function(e){return dd(Fb,e)},C=Xy;Oy.forEach(function(e){C[e]=Xy(e)});var _b=function(){function e(t,r){this.rules=t,this.componentId=r,this.isStatic=Yy(t),la.registerId(this.componentId+1)}return e.prototype.createStyles=function(t,r,i,l){var a=l(oa(Ir(this.rules,r,i,l)),""),u=this.componentId+t;i.insertRules(u,u,a)},e.prototype.removeStyles=function(t,r){r.clearRules(this.componentId+t)},e.prototype.renderStyles=function(t,r,i,l){t>2&&la.registerId(this.componentId+t),this.removeStyles(t,i),this.createStyles(t,r,i,l)},e}();function Ob(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=vt.apply(void 0,Wo([e],t,!1)),l="sc-global-".concat(Hd(JSON.stringify(i))),a=new _b(i,l),u=function(f){var p=cd(),g=Et.useContext(Qo),m=Et.useRef(p.styleSheet.allocateGSInstance(l)).current;return p.styleSheet.server&&d(m,f,p.styleSheet,g,p.stylis),Et.useLayoutEffect(function(){if(!p.styleSheet.server)return d(m,f,p.styleSheet,g,p.stylis),function(){return a.removeStyles(m,p.styleSheet)}},[m,f,p.styleSheet,g,p.stylis]),null};function d(f,p,g,m,v){if(a.isStatic)a.renderStyles(f,ob,g,v);else{var w=wt(wt({},p),{theme:_y(p,m,u.defaultProps)});a.renderStyles(f,w,g,v)}}return Et.memo(u)}function ei(e){for(var t=[],r=1;r<arguments.length;r++)t[r-1]=arguments[r];var i=oa(vt.apply(void 0,Wo([e],t,!1))),l=Hd(i);return new Jy(l,i)}const Db="/assets/logo-BGHkG1-J.png",Mb="/assets/logo-dark-KAsU1C78.png",Om={name:"light",colors:{background:"#ffffffaa",overlayBackground:"#ffffffdd",pageBackground:"#ffffff",backgroundSecondary:"#f6f8fa",text:"#333333",textSecondary:"#6a737d",primary:"#0056b3",primaryHover:"#004494",error:"#d32f2f",errorHover:"#b71c1c",warning:"#f57c00",info:"#0288d1",secondary:"#616161",secondaryHover:"#424242",border:"#e1e4e8",buttonBg:"#e0e0e0",buttonText:"#333333",buttonHoverBg:"#bdbdbd",inputBg:"#ffffff",inputBorder:"#bdbdbd",inputText:"#333333",codeBackground:"#f5f5f5",codeText:"#24292e",systemMessageBackground:"#e3f2fd",systemMessageText:"#0d47a1",systemMessageBorder:"#bbdefb",systemMessageTimestamp:"#1565c0",disabled:"#9e9e9e",userMessageBackground:"#e8f5e9",userMessageText:"#1b5e20",userMessageTimestamp:"#2e7d32",menuBackdrop:"rgba(0, 0, 0, 0.5)",menuBackground:"#ffffff",menuHover:"#f6f8fa",menuBorder:"#e1e4e8",menuShadow:"0 4px 12px rgba(0, 0, 0, 0.15)",diffAddedText:"rgba(0, 128, 0, 0.7)",diffRemovedText:"rgba(255, 0, 0, 0.7)"},backgroundImage:Db,zIndex:{modal:1e3,menuBackdrop:998,menu:999},transitions:{menuFade:"0.2s ease",menuSlide:"0.2s ease",menuHover:"0.2s ease"}},Dm={name:"dark",colors:{background:"#00000055",overlayBackground:"#000000cc",pageBackground:"#1e1e1e",backgroundSecondary:"#2d333b",text:"#d4d4d4",textSecondary:"#8b949e",primary:"#58a6ff",primaryHover:"#79b8ff",secondary:"#8b949e",error:"#f44336",errorHover:"#d32f2f",secondaryHover:"#9aa3ad",warning:"#ffa726",info:"#29b6f6",border:"#30363d",buttonBg:"#21262d",buttonText:"#c9d1d9",buttonHoverBg:"#30363d",inputBg:"#0d1117",inputBorder:"#30363d",inputText:"#c9d1d9",codeBackground:"#161b22",codeText:"#c9d1d9",systemMessageBackground:"#1c2128",systemMessageText:"#8b949e",systemMessageBorder:"#30363d",systemMessageTimestamp:"#6e7681",disabled:"#41464b",userMessageBackground:"#1c4a7d",userMessageText:"#e6f3ff",userMessageTimestamp:"#a8c7f0",menuBackdrop:"rgba(0, 0, 0, 0.7)",menuBackground:"#1e1e1e",menuHover:"#2d333b",menuBorder:"#30363d",menuShadow:"0 4px 12px rgba(0, 0, 0, 0.3)",diffAddedText:"rgba(0, 255, 0, 0.7)",diffRemovedText:"rgba(255, 0, 0, 0.7)"},backgroundImage:Mb,zIndex:{modal:1e3,menuBackdrop:998,menu:999},transitions:{menuFade:"0.2s ease",menuSlide:"0.2s ease",menuHover:"0.2s ease"}},Bb=({usage:e})=>{const[t,r]=$.useState("total"),i=m=>{r(m.target.value)},l=e.usageMetrics[t],a=e.usageMetrics[t].cost||0,u=Wi(a.toFixed(2)),d=Wi(l.rpm),f=Wi(l.rpd),p=Wi(Mm(l.tpm)),g=Wi(Mm(l.tpd));return h.jsx(Vb,{children:h.jsxs(Hb,{children:[h.jsx(Wb,{onChange:i,value:t,children:Object.keys(e.usageMetrics).map(m=>h.jsx("option",{value:m,children:m},m))}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"Cost:"}),h.jsxs(Ji,{children:["$",u]},u)]}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"RPM:"}),h.jsx(Ji,{children:d},d)]}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"RPD:"}),h.jsx(Ji,{children:f},f)]}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"TPM:"}),h.jsx(Ji,{children:p},p)]}),h.jsxs(qi,{children:[h.jsx(Gi,{children:"TPD:"}),h.jsx(Ji,{children:g},g)]})]})})},Mm=e=>e>=1e6?(e/1e6).toFixed(1)+"M":e>=1e3?(e/1e3).toFixed(0)+"K":e.toString(),Wi=e=>{const[t,r]=$.useState(e),i=$.useRef(e);return $.useEffect(()=>{e!==i.current&&(r(e),i.current=e)},[e]),t},Ub=ei`
42
+ 0% {
43
+ transform: scale(1);
44
+ opacity: 1;
45
+ }
46
+ 50% {
47
+ transform: scale(1.2);
48
+ opacity: 0.7;
49
+ }
50
+ 100% {
51
+ transform: scale(1);
52
+ opacity: 1;
53
+ }
54
+ `,Vb=C.div`
55
+ background-color: ${({theme:e})=>e.colors.background};
56
+ border-radius: 4px;
57
+ padding: 4px 4px;
58
+ box-shadow:
59
+ 0 1px 3px rgba(0, 0, 0, 0.12),
60
+ 0 1px 2px rgba(0, 0, 0, 0.24);
61
+ `,Hb=C.div`
62
+ display: flex;
63
+ flex-wrap: wrap;
64
+ gap: 8px;
65
+ align-items: center;
66
+ `,Wb=C.select`
67
+ padding: 2px 4px;
68
+ border-radius: 4px;
69
+ border: 1px solid ${({theme:e})=>e.colors.border};
70
+ background-color: ${({theme:e})=>e.colors.background};
71
+ color: ${({theme:e})=>e.colors.text};
72
+ font-size: 0.9em;
73
+ `,qi=C.div`
74
+ display: flex;
75
+ flex-direction: column;
76
+ align-items: center;
77
+ margin-left: 8px;
78
+ `,Gi=C.span`
79
+ font-size: 0.8em;
80
+ color: ${({theme:e})=>e.colors.textSecondary};
81
+ `,Ji=C.span`
82
+ font-size: 0.9em;
83
+ font-weight: bold;
84
+ color: ${({theme:e})=>e.colors.text};
85
+ animation: ${Ub} 0.5s ease-in-out;
86
+ `;function Zy(e,t){return function(){return e.apply(t,arguments)}}const{toString:qb}=Object.prototype,{getPrototypeOf:Gd}=Object,{iterator:Ca,toStringTag:ex}=Symbol,Ea=(e=>t=>{const r=qb.call(t);return e[r]||(e[r]=r.slice(8,-1).toLowerCase())})(Object.create(null)),Pn=e=>(e=e.toLowerCase(),t=>Ea(t)===e),ja=e=>t=>typeof t===e,{isArray:ti}=Array,Yo=ja("undefined");function pl(e){return e!==null&&!Yo(e)&&e.constructor!==null&&!Yo(e.constructor)&&Kt(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const tx=Pn("ArrayBuffer");function Gb(e){let t;return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&tx(e.buffer),t}const Jb=ja("string"),Kt=ja("function"),nx=ja("number"),hl=e=>e!==null&&typeof e=="object",Kb=e=>e===!0||e===!1,Ks=e=>{if(Ea(e)!=="object")return!1;const t=Gd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(ex in e)&&!(Ca in e)},Qb=e=>{if(!hl(e)||pl(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch{return!1}},Yb=Pn("Date"),Xb=Pn("File"),Zb=Pn("Blob"),eS=Pn("FileList"),tS=e=>hl(e)&&Kt(e.pipe),nS=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Kt(e.append)&&((t=Ea(e))==="formdata"||t==="object"&&Kt(e.toString)&&e.toString()==="[object FormData]"))},rS=Pn("URLSearchParams"),[oS,iS,lS,sS]=["ReadableStream","Request","Response","Headers"].map(Pn),aS=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ml(e,t,{allOwnKeys:r=!1}={}){if(e===null||typeof e>"u")return;let i,l;if(typeof e!="object"&&(e=[e]),ti(e))for(i=0,l=e.length;i<l;i++)t.call(null,e[i],i,e);else{if(pl(e))return;const a=r?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let d;for(i=0;i<u;i++)d=a[i],t.call(null,e[d],d,e)}}function rx(e,t){if(pl(e))return null;t=t.toLowerCase();const r=Object.keys(e);let i=r.length,l;for(;i-- >0;)if(l=r[i],t===l.toLowerCase())return l;return null}const Xr=typeof globalThis<"u"?globalThis:typeof self<"u"?self:typeof window<"u"?window:global,ox=e=>!Yo(e)&&e!==Xr;function fd(){const{caseless:e,skipUndefined:t}=ox(this)&&this||{},r={},i=(l,a)=>{const u=e&&rx(r,a)||a;Ks(r[u])&&Ks(l)?r[u]=fd(r[u],l):Ks(l)?r[u]=fd({},l):ti(l)?r[u]=l.slice():(!t||!Yo(l))&&(r[u]=l)};for(let l=0,a=arguments.length;l<a;l++)arguments[l]&&ml(arguments[l],i);return r}const uS=(e,t,r,{allOwnKeys:i}={})=>(ml(t,(l,a)=>{r&&Kt(l)?e[a]=Zy(l,r):e[a]=l},{allOwnKeys:i}),e),cS=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),dS=(e,t,r,i)=>{e.prototype=Object.create(t.prototype,i),e.prototype.constructor=e,Object.defineProperty(e,"super",{value:t.prototype}),r&&Object.assign(e.prototype,r)},fS=(e,t,r,i)=>{let l,a,u;const d={};if(t=t||{},e==null)return t;do{for(l=Object.getOwnPropertyNames(e),a=l.length;a-- >0;)u=l[a],(!i||i(u,e,t))&&!d[u]&&(t[u]=e[u],d[u]=!0);e=r!==!1&&Gd(e)}while(e&&(!r||r(e,t))&&e!==Object.prototype);return t},pS=(e,t,r)=>{e=String(e),(r===void 0||r>e.length)&&(r=e.length),r-=t.length;const i=e.indexOf(t,r);return i!==-1&&i===r},hS=e=>{if(!e)return null;if(ti(e))return e;let t=e.length;if(!nx(t))return null;const r=new Array(t);for(;t-- >0;)r[t]=e[t];return r},mS=(e=>t=>e&&t instanceof e)(typeof Uint8Array<"u"&&Gd(Uint8Array)),gS=(e,t)=>{const i=(e&&e[Ca]).call(e);let l;for(;(l=i.next())&&!l.done;){const a=l.value;t.call(e,a[0],a[1])}},yS=(e,t)=>{let r;const i=[];for(;(r=e.exec(t))!==null;)i.push(r);return i},xS=Pn("HTMLFormElement"),vS=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(r,i,l){return i.toUpperCase()+l}),Bm=(({hasOwnProperty:e})=>(t,r)=>e.call(t,r))(Object.prototype),wS=Pn("RegExp"),ix=(e,t)=>{const r=Object.getOwnPropertyDescriptors(e),i={};ml(r,(l,a)=>{let u;(u=t(l,a,e))!==!1&&(i[a]=u||l)}),Object.defineProperties(e,i)},kS=e=>{ix(e,(t,r)=>{if(Kt(e)&&["arguments","caller","callee"].indexOf(r)!==-1)return!1;const i=e[r];if(Kt(i)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+r+"'")})}})},bS=(e,t)=>{const r={},i=l=>{l.forEach(a=>{r[a]=!0})};return ti(e)?i(e):i(String(e).split(t)),r},SS=()=>{},CS=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function ES(e){return!!(e&&Kt(e.append)&&e[ex]==="FormData"&&e[Ca])}const jS=e=>{const t=new Array(10),r=(i,l)=>{if(hl(i)){if(t.indexOf(i)>=0)return;if(pl(i))return i;if(!("toJSON"in i)){t[l]=i;const a=ti(i)?[]:{};return ml(i,(u,d)=>{const f=r(u,l+1);!Yo(f)&&(a[d]=f)}),t[l]=void 0,a}}return i};return r(e,0)},TS=Pn("AsyncFunction"),$S=e=>e&&(hl(e)||Kt(e))&&Kt(e.then)&&Kt(e.catch),lx=((e,t)=>e?setImmediate:t?((r,i)=>(Xr.addEventListener("message",({source:l,data:a})=>{l===Xr&&a===r&&i.length&&i.shift()()},!1),l=>{i.push(l),Xr.postMessage(r,"*")}))(`axios@${Math.random()}`,[]):r=>setTimeout(r))(typeof setImmediate=="function",Kt(Xr.postMessage)),IS=typeof queueMicrotask<"u"?queueMicrotask.bind(Xr):typeof process<"u"&&process.nextTick||lx,RS=e=>e!=null&&Kt(e[Ca]),V={isArray:ti,isArrayBuffer:tx,isBuffer:pl,isFormData:nS,isArrayBufferView:Gb,isString:Jb,isNumber:nx,isBoolean:Kb,isObject:hl,isPlainObject:Ks,isEmptyObject:Qb,isReadableStream:oS,isRequest:iS,isResponse:lS,isHeaders:sS,isUndefined:Yo,isDate:Yb,isFile:Xb,isBlob:Zb,isRegExp:wS,isFunction:Kt,isStream:tS,isURLSearchParams:rS,isTypedArray:mS,isFileList:eS,forEach:ml,merge:fd,extend:uS,trim:aS,stripBOM:cS,inherits:dS,toFlatObject:fS,kindOf:Ea,kindOfTest:Pn,endsWith:pS,toArray:hS,forEachEntry:gS,matchAll:yS,isHTMLForm:xS,hasOwnProperty:Bm,hasOwnProp:Bm,reduceDescriptors:ix,freezeMethods:kS,toObjectSet:bS,toCamelCase:vS,noop:SS,toFiniteNumber:CS,findKey:rx,global:Xr,isContextDefined:ox,isSpecCompliantForm:ES,toJSONObject:jS,isAsyncFn:TS,isThenable:$S,setImmediate:lx,asap:IS,isIterable:RS};function Re(e,t,r,i,l){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack,this.message=e,this.name="AxiosError",t&&(this.code=t),r&&(this.config=r),i&&(this.request=i),l&&(this.response=l,this.status=l.status?l.status:null)}V.inherits(Re,Error,{toJSON:function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:V.toJSONObject(this.config),code:this.code,status:this.status}}});const sx=Re.prototype,ax={};["ERR_BAD_OPTION_VALUE","ERR_BAD_OPTION","ECONNABORTED","ETIMEDOUT","ERR_NETWORK","ERR_FR_TOO_MANY_REDIRECTS","ERR_DEPRECATED","ERR_BAD_RESPONSE","ERR_BAD_REQUEST","ERR_CANCELED","ERR_NOT_SUPPORT","ERR_INVALID_URL"].forEach(e=>{ax[e]={value:e}});Object.defineProperties(Re,ax);Object.defineProperty(sx,"isAxiosError",{value:!0});Re.from=(e,t,r,i,l,a)=>{const u=Object.create(sx);V.toFlatObject(e,u,function(g){return g!==Error.prototype},p=>p!=="isAxiosError");const d=e&&e.message?e.message:"Error",f=t==null&&e?e.code:t;return Re.call(u,d,f,r,i,l),e&&u.cause==null&&Object.defineProperty(u,"cause",{value:e,configurable:!0}),u.name=e&&e.name||"Error",a&&Object.assign(u,a),u};const PS=null;function pd(e){return V.isPlainObject(e)||V.isArray(e)}function ux(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function Um(e,t,r){return e?e.concat(t).map(function(l,a){return l=ux(l),!r&&a?"["+l+"]":l}).join(r?".":""):t}function NS(e){return V.isArray(e)&&!e.some(pd)}const AS=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function Ta(e,t,r){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,r=V.toFlatObject(r,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,j){return!V.isUndefined(j[S])});const i=r.metaTokens,l=r.visitor||g,a=r.dots,u=r.indexes,f=(r.Blob||typeof Blob<"u"&&Blob)&&V.isSpecCompliantForm(t);if(!V.isFunction(l))throw new TypeError("visitor must be a function");function p(k){if(k===null)return"";if(V.isDate(k))return k.toISOString();if(V.isBoolean(k))return k.toString();if(!f&&V.isBlob(k))throw new Re("Blob is not supported. Use a Buffer instead.");return V.isArrayBuffer(k)||V.isTypedArray(k)?f&&typeof Blob=="function"?new Blob([k]):Buffer.from(k):k}function g(k,S,j){let E=k;if(k&&!j&&typeof k=="object"){if(V.endsWith(S,"{}"))S=i?S:S.slice(0,-2),k=JSON.stringify(k);else if(V.isArray(k)&&NS(k)||(V.isFileList(k)||V.endsWith(S,"[]"))&&(E=V.toArray(k)))return S=ux(S),E.forEach(function(N,_){!(V.isUndefined(N)||N===null)&&t.append(u===!0?Um([S],_,a):u===null?S:S+"[]",p(N))}),!1}return pd(k)?!0:(t.append(Um(j,S,a),p(k)),!1)}const m=[],v=Object.assign(AS,{defaultVisitor:g,convertValue:p,isVisitable:pd});function w(k,S){if(!V.isUndefined(k)){if(m.indexOf(k)!==-1)throw Error("Circular reference detected in "+S.join("."));m.push(k),V.forEach(k,function(E,P){(!(V.isUndefined(E)||E===null)&&l.call(t,E,V.isString(P)?P.trim():P,S,v))===!0&&w(E,S?S.concat(P):[P])}),m.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return w(e),t}function Vm(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(i){return t[i]})}function Jd(e,t){this._pairs=[],e&&Ta(e,this,t)}const cx=Jd.prototype;cx.append=function(t,r){this._pairs.push([t,r])};cx.toString=function(t){const r=t?function(i){return t.call(this,i,Vm)}:Vm;return this._pairs.map(function(l){return r(l[0])+"="+r(l[1])},"").join("&")};function LS(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dx(e,t,r){if(!t)return e;const i=r&&r.encode||LS;V.isFunction(r)&&(r={serialize:r});const l=r&&r.serialize;let a;if(l?a=l(t,r):a=V.isURLSearchParams(t)?t.toString():new Jd(t,r).toString(i),a){const u=e.indexOf("#");u!==-1&&(e=e.slice(0,u)),e+=(e.indexOf("?")===-1?"?":"&")+a}return e}class Hm{constructor(){this.handlers=[]}use(t,r,i){return this.handlers.push({fulfilled:t,rejected:r,synchronous:i?i.synchronous:!1,runWhen:i?i.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){V.forEach(this.handlers,function(i){i!==null&&t(i)})}}const fx={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1},zS=typeof URLSearchParams<"u"?URLSearchParams:Jd,FS=typeof FormData<"u"?FormData:null,_S=typeof Blob<"u"?Blob:null,OS={isBrowser:!0,classes:{URLSearchParams:zS,FormData:FS,Blob:_S},protocols:["http","https","file","blob","url","data"]},Kd=typeof window<"u"&&typeof document<"u",hd=typeof navigator=="object"&&navigator||void 0,DS=Kd&&(!hd||["ReactNative","NativeScript","NS"].indexOf(hd.product)<0),MS=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",BS=Kd&&window.location.href||"http://localhost",US=Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Kd,hasStandardBrowserEnv:DS,hasStandardBrowserWebWorkerEnv:MS,navigator:hd,origin:BS},Symbol.toStringTag,{value:"Module"})),Nt={...US,...OS};function VS(e,t){return Ta(e,new Nt.classes.URLSearchParams,{visitor:function(r,i,l,a){return Nt.isNode&&V.isBuffer(r)?(this.append(i,r.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)},...t})}function HS(e){return V.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function WS(e){const t={},r=Object.keys(e);let i;const l=r.length;let a;for(i=0;i<l;i++)a=r[i],t[a]=e[a];return t}function px(e){function t(r,i,l,a){let u=r[a++];if(u==="__proto__")return!0;const d=Number.isFinite(+u),f=a>=r.length;return u=!u&&V.isArray(l)?l.length:u,f?(V.hasOwnProp(l,u)?l[u]=[l[u],i]:l[u]=i,!d):((!l[u]||!V.isObject(l[u]))&&(l[u]=[]),t(r,i,l[u],a)&&V.isArray(l[u])&&(l[u]=WS(l[u])),!d)}if(V.isFormData(e)&&V.isFunction(e.entries)){const r={};return V.forEachEntry(e,(i,l)=>{t(HS(i),l,r,0)}),r}return null}function qS(e,t,r){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(i){if(i.name!=="SyntaxError")throw i}return(r||JSON.stringify)(e)}const gl={transitional:fx,adapter:["xhr","http","fetch"],transformRequest:[function(t,r){const i=r.getContentType()||"",l=i.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return l?JSON.stringify(px(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return r.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let d;if(a){if(i.indexOf("application/x-www-form-urlencoded")>-1)return VS(t,this.formSerializer).toString();if((d=V.isFileList(t))||i.indexOf("multipart/form-data")>-1){const f=this.env&&this.env.FormData;return Ta(d?{"files[]":t}:t,f&&new f,this.formSerializer)}}return a||l?(r.setContentType("application/json",!1),qS(t)):t}],transformResponse:[function(t){const r=this.transitional||gl.transitional,i=r&&r.forcedJSONParsing,l=this.responseType==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(i&&!this.responseType||l)){const u=!(r&&r.silentJSONParsing)&&l;try{return JSON.parse(t,this.parseReviver)}catch(d){if(u)throw d.name==="SyntaxError"?Re.from(d,Re.ERR_BAD_RESPONSE,this,null,this.response):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Nt.classes.FormData,Blob:Nt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(["delete","get","head","post","put","patch"],e=>{gl.headers[e]={}});const GS=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),JS=e=>{const t={};let r,i,l;return e&&e.split(`
87
+ `).forEach(function(u){l=u.indexOf(":"),r=u.substring(0,l).trim().toLowerCase(),i=u.substring(l+1).trim(),!(!r||t[r]&&GS[r])&&(r==="set-cookie"?t[r]?t[r].push(i):t[r]=[i]:t[r]=t[r]?t[r]+", "+i:i)}),t},Wm=Symbol("internals");function Ki(e){return e&&String(e).trim().toLowerCase()}function Qs(e){return e===!1||e==null?e:V.isArray(e)?e.map(Qs):String(e)}function KS(e){const t=Object.create(null),r=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let i;for(;i=r.exec(e);)t[i[1]]=i[2];return t}const QS=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nc(e,t,r,i,l){if(V.isFunction(i))return i.call(this,t,r);if(l&&(t=r),!!V.isString(t)){if(V.isString(i))return t.indexOf(i)!==-1;if(V.isRegExp(i))return i.test(t)}}function YS(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,r,i)=>r.toUpperCase()+i)}function XS(e,t){const r=V.toCamelCase(" "+t);["get","set","has"].forEach(i=>{Object.defineProperty(e,i+r,{value:function(l,a,u){return this[i].call(this,t,l,a,u)},configurable:!0})})}let Qt=class{constructor(t){t&&this.set(t)}set(t,r,i){const l=this;function a(d,f,p){const g=Ki(f);if(!g)throw new Error("header name must be a non-empty string");const m=V.findKey(l,g);(!m||l[m]===void 0||p===!0||p===void 0&&l[m]!==!1)&&(l[m||f]=Qs(d))}const u=(d,f)=>V.forEach(d,(p,g)=>a(p,g,f));if(V.isPlainObject(t)||t instanceof this.constructor)u(t,r);else if(V.isString(t)&&(t=t.trim())&&!QS(t))u(JS(t),r);else if(V.isObject(t)&&V.isIterable(t)){let d={},f,p;for(const g of t){if(!V.isArray(g))throw TypeError("Object iterator must return a key-value pair");d[p=g[0]]=(f=d[p])?V.isArray(f)?[...f,g[1]]:[f,g[1]]:g[1]}u(d,r)}else t!=null&&a(r,t,i);return this}get(t,r){if(t=Ki(t),t){const i=V.findKey(this,t);if(i){const l=this[i];if(!r)return l;if(r===!0)return KS(l);if(V.isFunction(r))return r.call(this,l,i);if(V.isRegExp(r))return r.exec(l);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,r){if(t=Ki(t),t){const i=V.findKey(this,t);return!!(i&&this[i]!==void 0&&(!r||Nc(this,this[i],i,r)))}return!1}delete(t,r){const i=this;let l=!1;function a(u){if(u=Ki(u),u){const d=V.findKey(i,u);d&&(!r||Nc(i,i[d],d,r))&&(delete i[d],l=!0)}}return V.isArray(t)?t.forEach(a):a(t),l}clear(t){const r=Object.keys(this);let i=r.length,l=!1;for(;i--;){const a=r[i];(!t||Nc(this,this[a],a,t,!0))&&(delete this[a],l=!0)}return l}normalize(t){const r=this,i={};return V.forEach(this,(l,a)=>{const u=V.findKey(i,a);if(u){r[u]=Qs(l),delete r[a];return}const d=t?YS(a):String(a).trim();d!==a&&delete r[a],r[d]=Qs(l),i[d]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const r=Object.create(null);return V.forEach(this,(i,l)=>{i!=null&&i!==!1&&(r[l]=t&&V.isArray(i)?i.join(", "):i)}),r}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,r])=>t+": "+r).join(`
88
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...r){const i=new this(t);return r.forEach(l=>i.set(l)),i}static accessor(t){const i=(this[Wm]=this[Wm]={accessors:{}}).accessors,l=this.prototype;function a(u){const d=Ki(u);i[d]||(XS(l,u),i[d]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};Qt.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]);V.reduceDescriptors(Qt.prototype,({value:e},t)=>{let r=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(i){this[r]=i}}});V.freezeMethods(Qt);function Ac(e,t){const r=this||gl,i=t||r,l=Qt.from(i.headers);let a=i.data;return V.forEach(e,function(d){a=d.call(r,a,l.normalize(),t?t.status:void 0)}),l.normalize(),a}function hx(e){return!!(e&&e.__CANCEL__)}function ni(e,t,r){Re.call(this,e??"canceled",Re.ERR_CANCELED,t,r),this.name="CanceledError"}V.inherits(ni,Re,{__CANCEL__:!0});function mx(e,t,r){const i=r.config.validateStatus;!r.status||!i||i(r.status)?e(r):t(new Re("Request failed with status code "+r.status,[Re.ERR_BAD_REQUEST,Re.ERR_BAD_RESPONSE][Math.floor(r.status/100)-4],r.config,r.request,r))}function ZS(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function eC(e,t){e=e||10;const r=new Array(e),i=new Array(e);let l=0,a=0,u;return t=t!==void 0?t:1e3,function(f){const p=Date.now(),g=i[a];u||(u=p),r[l]=f,i[l]=p;let m=a,v=0;for(;m!==l;)v+=r[m++],m=m%e;if(l=(l+1)%e,l===a&&(a=(a+1)%e),p-u<t)return;const w=g&&p-g;return w?Math.round(v*1e3/w):void 0}}function tC(e,t){let r=0,i=1e3/t,l,a;const u=(p,g=Date.now())=>{r=g,l=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const g=Date.now(),m=g-r;m>=i?u(p,g):(l=p,a||(a=setTimeout(()=>{a=null,u(l)},i-m)))},()=>l&&u(l)]}const sa=(e,t,r=3)=>{let i=0;const l=eC(50,250);return tC(a=>{const u=a.loaded,d=a.lengthComputable?a.total:void 0,f=u-i,p=l(f),g=u<=d;i=u;const m={loaded:u,total:d,progress:d?u/d:void 0,bytes:f,rate:p||void 0,estimated:p&&d&&g?(d-u)/p:void 0,event:a,lengthComputable:d!=null,[t?"download":"upload"]:!0};e(m)},r)},qm=(e,t)=>{const r=e!=null;return[i=>t[0]({lengthComputable:r,total:e,loaded:i}),t[1]]},Gm=e=>(...t)=>V.asap(()=>e(...t)),nC=Nt.hasStandardBrowserEnv?((e,t)=>r=>(r=new URL(r,Nt.origin),e.protocol===r.protocol&&e.host===r.host&&(t||e.port===r.port)))(new URL(Nt.origin),Nt.navigator&&/(msie|trident)/i.test(Nt.navigator.userAgent)):()=>!0,rC=Nt.hasStandardBrowserEnv?{write(e,t,r,i,l,a){const u=[e+"="+encodeURIComponent(t)];V.isNumber(r)&&u.push("expires="+new Date(r).toGMTString()),V.isString(i)&&u.push("path="+i),V.isString(l)&&u.push("domain="+l),a===!0&&u.push("secure"),document.cookie=u.join("; ")},read(e){const t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove(e){this.write(e,"",Date.now()-864e5)}}:{write(){},read(){return null},remove(){}};function oC(e){return/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function iC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function gx(e,t,r){let i=!oC(t);return e&&(i||r==!1)?iC(e,t):t}const Jm=e=>e instanceof Qt?{...e}:e;function io(e,t){t=t||{};const r={};function i(p,g,m,v){return V.isPlainObject(p)&&V.isPlainObject(g)?V.merge.call({caseless:v},p,g):V.isPlainObject(g)?V.merge({},g):V.isArray(g)?g.slice():g}function l(p,g,m,v){if(V.isUndefined(g)){if(!V.isUndefined(p))return i(void 0,p,m,v)}else return i(p,g,m,v)}function a(p,g){if(!V.isUndefined(g))return i(void 0,g)}function u(p,g){if(V.isUndefined(g)){if(!V.isUndefined(p))return i(void 0,p)}else return i(void 0,g)}function d(p,g,m){if(m in t)return i(p,g);if(m in e)return i(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:d,headers:(p,g,m)=>l(Jm(p),Jm(g),m,!0)};return V.forEach(Object.keys({...e,...t}),function(g){const m=f[g]||l,v=m(e[g],t[g],g);V.isUndefined(v)&&m!==d||(r[g]=v)}),r}const yx=e=>{const t=io({},e);let{data:r,withXSRFToken:i,xsrfHeaderName:l,xsrfCookieName:a,headers:u,auth:d}=t;if(t.headers=u=Qt.from(u),t.url=dx(gx(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),d&&u.set("Authorization","Basic "+btoa((d.username||"")+":"+(d.password?unescape(encodeURIComponent(d.password)):""))),V.isFormData(r)){if(Nt.hasStandardBrowserEnv||Nt.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(V.isFunction(r.getHeaders)){const f=r.getHeaders(),p=["content-type","content-length"];Object.entries(f).forEach(([g,m])=>{p.includes(g.toLowerCase())&&u.set(g,m)})}}if(Nt.hasStandardBrowserEnv&&(i&&V.isFunction(i)&&(i=i(t)),i||i!==!1&&nC(t.url))){const f=l&&a&&rC.read(a);f&&u.set(l,f)}return t},lC=typeof XMLHttpRequest<"u",sC=lC&&function(e){return new Promise(function(r,i){const l=yx(e);let a=l.data;const u=Qt.from(l.headers).normalize();let{responseType:d,onUploadProgress:f,onDownloadProgress:p}=l,g,m,v,w,k;function S(){w&&w(),k&&k(),l.cancelToken&&l.cancelToken.unsubscribe(g),l.signal&&l.signal.removeEventListener("abort",g)}let j=new XMLHttpRequest;j.open(l.method.toUpperCase(),l.url,!0),j.timeout=l.timeout;function E(){if(!j)return;const N=Qt.from("getAllResponseHeaders"in j&&j.getAllResponseHeaders()),q={data:!d||d==="text"||d==="json"?j.responseText:j.response,status:j.status,statusText:j.statusText,headers:N,config:e,request:j};mx(function(H){r(H),S()},function(H){i(H),S()},q),j=null}"onloadend"in j?j.onloadend=E:j.onreadystatechange=function(){!j||j.readyState!==4||j.status===0&&!(j.responseURL&&j.responseURL.indexOf("file:")===0)||setTimeout(E)},j.onabort=function(){j&&(i(new Re("Request aborted",Re.ECONNABORTED,e,j)),j=null)},j.onerror=function(_){const q=_&&_.message?_.message:"Network Error",A=new Re(q,Re.ERR_NETWORK,e,j);A.event=_||null,i(A),j=null},j.ontimeout=function(){let _=l.timeout?"timeout of "+l.timeout+"ms exceeded":"timeout exceeded";const q=l.transitional||fx;l.timeoutErrorMessage&&(_=l.timeoutErrorMessage),i(new Re(_,q.clarifyTimeoutError?Re.ETIMEDOUT:Re.ECONNABORTED,e,j)),j=null},a===void 0&&u.setContentType(null),"setRequestHeader"in j&&V.forEach(u.toJSON(),function(_,q){j.setRequestHeader(q,_)}),V.isUndefined(l.withCredentials)||(j.withCredentials=!!l.withCredentials),d&&d!=="json"&&(j.responseType=l.responseType),p&&([v,k]=sa(p,!0),j.addEventListener("progress",v)),f&&j.upload&&([m,w]=sa(f),j.upload.addEventListener("progress",m),j.upload.addEventListener("loadend",w)),(l.cancelToken||l.signal)&&(g=N=>{j&&(i(!N||N.type?new ni(null,e,j):N),j.abort(),j=null)},l.cancelToken&&l.cancelToken.subscribe(g),l.signal&&(l.signal.aborted?g():l.signal.addEventListener("abort",g)));const P=ZS(l.url);if(P&&Nt.protocols.indexOf(P)===-1){i(new Re("Unsupported protocol "+P+":",Re.ERR_BAD_REQUEST,e));return}j.send(a||null)})},aC=(e,t)=>{const{length:r}=e=e?e.filter(Boolean):[];if(t||r){let i=new AbortController,l;const a=function(p){if(!l){l=!0,d();const g=p instanceof Error?p:this.reason;i.abort(g instanceof Re?g:new ni(g instanceof Error?g.message:g))}};let u=t&&setTimeout(()=>{u=null,a(new Re(`timeout ${t} of ms exceeded`,Re.ETIMEDOUT))},t);const d=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(p=>{p.unsubscribe?p.unsubscribe(a):p.removeEventListener("abort",a)}),e=null)};e.forEach(p=>p.addEventListener("abort",a));const{signal:f}=i;return f.unsubscribe=()=>V.asap(d),f}},uC=function*(e,t){let r=e.byteLength;if(r<t){yield e;return}let i=0,l;for(;i<r;)l=i+t,yield e.slice(i,l),i=l},cC=async function*(e,t){for await(const r of dC(e))yield*uC(r,t)},dC=async function*(e){if(e[Symbol.asyncIterator]){yield*e;return}const t=e.getReader();try{for(;;){const{done:r,value:i}=await t.read();if(r)break;yield i}}finally{await t.cancel()}},Km=(e,t,r,i)=>{const l=cC(e,t);let a=0,u,d=f=>{u||(u=!0,i&&i(f))};return new ReadableStream({async pull(f){try{const{done:p,value:g}=await l.next();if(p){d(),f.close();return}let m=g.byteLength;if(r){let v=a+=m;r(v)}f.enqueue(new Uint8Array(g))}catch(p){throw d(p),p}},cancel(f){return d(f),l.return()}},{highWaterMark:2})},Qm=64*1024,{isFunction:As}=V,xx=(({fetch:e,Request:t,Response:r})=>({fetch:e,Request:t,Response:r}))(V.global),{ReadableStream:Ym,TextEncoder:Xm}=V.global,Zm=(e,...t)=>{try{return!!e(...t)}catch{return!1}},fC=e=>{const{fetch:t,Request:r,Response:i}=Object.assign({},xx,e),l=As(t),a=As(r),u=As(i);if(!l)return!1;const d=l&&As(Ym),f=l&&(typeof Xm=="function"?(k=>S=>k.encode(S))(new Xm):async k=>new Uint8Array(await new r(k).arrayBuffer())),p=a&&d&&Zm(()=>{let k=!1;const S=new r(Nt.origin,{body:new Ym,method:"POST",get duplex(){return k=!0,"half"}}).headers.has("Content-Type");return k&&!S}),g=u&&d&&Zm(()=>V.isReadableStream(new i("").body)),m={stream:g&&(k=>k.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(k=>{!m[k]&&(m[k]=(S,j)=>{let E=S&&S[k];if(E)return E.call(S);throw new Re(`Response type '${k}' is not supported`,Re.ERR_NOT_SUPPORT,j)})});const v=async k=>{if(k==null)return 0;if(V.isBlob(k))return k.size;if(V.isSpecCompliantForm(k))return(await new r(Nt.origin,{method:"POST",body:k}).arrayBuffer()).byteLength;if(V.isArrayBufferView(k)||V.isArrayBuffer(k))return k.byteLength;if(V.isURLSearchParams(k)&&(k=k+""),V.isString(k))return(await f(k)).byteLength},w=async(k,S)=>{const j=V.toFiniteNumber(k.getContentLength());return j??v(S)};return async k=>{let{url:S,method:j,data:E,signal:P,cancelToken:N,timeout:_,onDownloadProgress:q,onUploadProgress:A,responseType:H,headers:K,withCredentials:te="same-origin",fetchOptions:O}=yx(k);H=H?(H+"").toLowerCase():"text";let Z=aC([P,N&&N.toAbortSignal()],_),le=null;const X=Z&&Z.unsubscribe&&(()=>{Z.unsubscribe()});let ne;try{if(A&&p&&j!=="get"&&j!=="head"&&(ne=await w(K,E))!==0){let T=new r(S,{method:"POST",body:E,duplex:"half"}),z;if(V.isFormData(E)&&(z=T.headers.get("content-type"))&&K.setContentType(z),T.body){const[G,I]=qm(ne,sa(Gm(A)));E=Km(T.body,Qm,G,I)}}V.isString(te)||(te=te?"include":"omit");const B=a&&"credentials"in r.prototype,pe={...O,signal:Z,method:j.toUpperCase(),headers:K.normalize().toJSON(),body:E,duplex:"half",credentials:B?te:void 0};le=a&&new r(S,pe);let ae=await(a?t(le,O):t(S,pe));const Q=g&&(H==="stream"||H==="response");if(g&&(q||Q&&X)){const T={};["status","statusText","headers"].forEach(ce=>{T[ce]=ae[ce]});const z=V.toFiniteNumber(ae.headers.get("content-length")),[G,I]=q&&qm(z,sa(Gm(q),!0))||[];ae=new i(Km(ae.body,Qm,G,()=>{I&&I(),X&&X()}),T)}H=H||"text";let de=await m[V.findKey(m,H)||"text"](ae,k);return!Q&&X&&X(),await new Promise((T,z)=>{mx(T,z,{data:de,headers:Qt.from(ae.headers),status:ae.status,statusText:ae.statusText,config:k,request:le})})}catch(B){throw X&&X(),B&&B.name==="TypeError"&&/Load failed|fetch/i.test(B.message)?Object.assign(new Re("Network Error",Re.ERR_NETWORK,k,le),{cause:B.cause||B}):Re.from(B,B&&B.code,k,le)}}},pC=new Map,vx=e=>{let t=V.merge.call({skipUndefined:!0},xx,e?e.env:null);const{fetch:r,Request:i,Response:l}=t,a=[i,l,r];let u=a.length,d=u,f,p,g=pC;for(;d--;)f=a[d],p=g.get(f),p===void 0&&g.set(f,p=d?new Map:fC(t)),g=p;return p};vx();const md={http:PS,xhr:sC,fetch:{get:vx}};V.forEach(md,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch{}Object.defineProperty(e,"adapterName",{value:t})}});const eg=e=>`- ${e}`,hC=e=>V.isFunction(e)||e===null||e===!1,wx={getAdapter:(e,t)=>{e=V.isArray(e)?e:[e];const{length:r}=e;let i,l;const a={};for(let u=0;u<r;u++){i=e[u];let d;if(l=i,!hC(i)&&(l=md[(d=String(i)).toLowerCase()],l===void 0))throw new Re(`Unknown adapter '${d}'`);if(l&&(V.isFunction(l)||(l=l.get(t))))break;a[d||"#"+u]=l}if(!l){const u=Object.entries(a).map(([f,p])=>`adapter ${f} `+(p===!1?"is not supported by the environment":"is not available in the build"));let d=r?u.length>1?`since :
89
+ `+u.map(eg).join(`
90
+ `):" "+eg(u[0]):"as no adapter specified";throw new Re("There is no suitable adapter to dispatch the request "+d,"ERR_NOT_SUPPORT")}return l},adapters:md};function Lc(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ni(null,e)}function tg(e){return Lc(e),e.headers=Qt.from(e.headers),e.data=Ac.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),wx.getAdapter(e.adapter||gl.adapter,e)(e).then(function(i){return Lc(e),i.data=Ac.call(e,e.transformResponse,i),i.headers=Qt.from(i.headers),i},function(i){return hx(i)||(Lc(e),i&&i.response&&(i.response.data=Ac.call(e,e.transformResponse,i.response),i.response.headers=Qt.from(i.response.headers))),Promise.reject(i)})}const kx="1.12.0",$a={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{$a[e]=function(i){return typeof i===e||"a"+(t<1?"n ":" ")+e}});const ng={};$a.transitional=function(t,r,i){function l(a,u){return"[Axios v"+kx+"] Transitional option '"+a+"'"+u+(i?". "+i:"")}return(a,u,d)=>{if(t===!1)throw new Re(l(u," has been removed"+(r?" in "+r:"")),Re.ERR_DEPRECATED);return r&&!ng[u]&&(ng[u]=!0,console.warn(l(u," has been deprecated since v"+r+" and will be removed in the near future"))),t?t(a,u,d):!0}};$a.spelling=function(t){return(r,i)=>(console.warn(`${i} is likely a misspelling of ${t}`),!0)};function mC(e,t,r){if(typeof e!="object")throw new Re("options must be an object",Re.ERR_BAD_OPTION_VALUE);const i=Object.keys(e);let l=i.length;for(;l-- >0;){const a=i[l],u=t[a];if(u){const d=e[a],f=d===void 0||u(d,a,e);if(f!==!0)throw new Re("option "+a+" must be "+f,Re.ERR_BAD_OPTION_VALUE);continue}if(r!==!0)throw new Re("Unknown option "+a,Re.ERR_BAD_OPTION)}}const Ys={assertOptions:mC,validators:$a},Dn=Ys.validators;let eo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Hm,response:new Hm}}async request(t,r){try{return await this._request(t,r)}catch(i){if(i instanceof Error){let l={};Error.captureStackTrace?Error.captureStackTrace(l):l=new Error;const a=l.stack?l.stack.replace(/^.+\n/,""):"";try{i.stack?a&&!String(i.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(i.stack+=`
91
+ `+a):i.stack=a}catch{}}throw i}}_request(t,r){typeof t=="string"?(r=r||{},r.url=t):r=t||{},r=io(this.defaults,r);const{transitional:i,paramsSerializer:l,headers:a}=r;i!==void 0&&Ys.assertOptions(i,{silentJSONParsing:Dn.transitional(Dn.boolean),forcedJSONParsing:Dn.transitional(Dn.boolean),clarifyTimeoutError:Dn.transitional(Dn.boolean)},!1),l!=null&&(V.isFunction(l)?r.paramsSerializer={serialize:l}:Ys.assertOptions(l,{encode:Dn.function,serialize:Dn.function},!0)),r.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?r.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:r.allowAbsoluteUrls=!0),Ys.assertOptions(r,{baseUrl:Dn.spelling("baseURL"),withXsrfToken:Dn.spelling("withXSRFToken")},!0),r.method=(r.method||this.defaults.method||"get").toLowerCase();let u=a&&V.merge(a.common,a[r.method]);a&&V.forEach(["delete","get","head","post","put","patch","common"],k=>{delete a[k]}),r.headers=Qt.concat(u,a);const d=[];let f=!0;this.interceptors.request.forEach(function(S){typeof S.runWhen=="function"&&S.runWhen(r)===!1||(f=f&&S.synchronous,d.unshift(S.fulfilled,S.rejected))});const p=[];this.interceptors.response.forEach(function(S){p.push(S.fulfilled,S.rejected)});let g,m=0,v;if(!f){const k=[tg.bind(this),void 0];for(k.unshift(...d),k.push(...p),v=k.length,g=Promise.resolve(r);m<v;)g=g.then(k[m++],k[m++]);return g}v=d.length;let w=r;for(m=0;m<v;){const k=d[m++],S=d[m++];try{w=k(w)}catch(j){S.call(this,j);break}}try{g=tg.call(this,w)}catch(k){return Promise.reject(k)}for(m=0,v=p.length;m<v;)g=g.then(p[m++],p[m++]);return g}getUri(t){t=io(this.defaults,t);const r=gx(t.baseURL,t.url,t.allowAbsoluteUrls);return dx(r,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){eo.prototype[t]=function(r,i){return this.request(io(i||{},{method:t,url:r,data:(i||{}).data}))}});V.forEach(["post","put","patch"],function(t){function r(i){return function(a,u,d){return this.request(io(d||{},{method:t,headers:i?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}eo.prototype[t]=r(),eo.prototype[t+"Form"]=r(!0)});let gC=class bx{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let r;this.promise=new Promise(function(a){r=a});const i=this;this.promise.then(l=>{if(!i._listeners)return;let a=i._listeners.length;for(;a-- >0;)i._listeners[a](l);i._listeners=null}),this.promise.then=l=>{let a;const u=new Promise(d=>{i.subscribe(d),a=d}).then(l);return u.cancel=function(){i.unsubscribe(a)},u},t(function(a,u,d){i.reason||(i.reason=new ni(a,u,d),r(i.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const r=this._listeners.indexOf(t);r!==-1&&this._listeners.splice(r,1)}toAbortSignal(){const t=new AbortController,r=i=>{t.abort(i)};return this.subscribe(r),t.signal.unsubscribe=()=>this.unsubscribe(r),t.signal}static source(){let t;return{token:new bx(function(l){t=l}),cancel:t}}};function yC(e){return function(r){return e.apply(null,r)}}function xC(e){return V.isObject(e)&&e.isAxiosError===!0}const gd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511};Object.entries(gd).forEach(([e,t])=>{gd[t]=e});function Sx(e){const t=new eo(e),r=Zy(eo.prototype.request,t);return V.extend(r,eo.prototype,t,{allOwnKeys:!0}),V.extend(r,t,null,{allOwnKeys:!0}),r.create=function(l){return Sx(io(e,l))},r}const nt=Sx(gl);nt.Axios=eo;nt.CanceledError=ni;nt.CancelToken=gC;nt.isCancel=hx;nt.VERSION=kx;nt.toFormData=Ta;nt.AxiosError=Re;nt.Cancel=nt.CanceledError;nt.all=function(t){return Promise.all(t)};nt.spread=yC;nt.isAxiosError=xC;nt.mergeConfig=io;nt.AxiosHeaders=Qt;nt.formToJSON=e=>px(V.isHTMLForm(e)?new FormData(e):e);nt.getAdapter=wx.getAdapter;nt.HttpStatusCode=gd;nt.default=nt;const{Axios:XL,AxiosError:ZL,CanceledError:ez,isCancel:tz,CancelToken:nz,VERSION:rz,all:oz,Cancel:iz,isAxiosError:lz,spread:sz,toFormData:az,AxiosHeaders:uz,HttpStatusCode:cz,formToJSON:dz,getAdapter:fz,mergeConfig:pz}=nt,vC="/api",Ve=nt.create({baseURL:vC,headers:{"Content-Type":"application/json"}}),wC=async()=>{try{const t=await(await fetch("/")).text();return new DOMParser().parseFromString(t,"text/html").body.getAttribute("data-security-token")}catch(e){return console.error("Error fetching security token:",e),null}};Ve.interceptors.request.use(e=>{var r;const t=(r=document.querySelector("body[data-security-token]"))==null?void 0:r.getAttribute("data-security-token");return t&&(e.headers.Authorization=`Bearer ${t}`),e},e=>Promise.reject(e));Ve.interceptors.response.use(e=>e,async e=>{var r;const t=e.config;if(e.response&&e.response.status===401&&!t._retry){t._retry=!0;const i=await wC();if(i)return t.headers.Authorization=`Bearer ${i}`,(r=document.querySelector("body[data-security-token]"))==null||r.setAttribute("data-security-token",i),Ve(t)}return Promise.reject(e)});const kC=async(e,t)=>{try{if(!e||!t.trim())throw new Error("Invalid message ID or content");if((await Ve.post("/edit-message",{messageId:e,newContent:t})).status!==200)throw new Error("Failed to edit message")}catch(r){throw nt.isAxiosError(r)?r.response?new Error(r.response.data.error||"Failed to edit message"):r.request?new Error("No response received from server"):new Error(`Error setting up request: ${r.message}`):r instanceof Error?r:new Error("An unexpected error occurred while editing the message")}},rg=async()=>(await Ve.get("/content")).data.content,bC=async(e,t,r)=>{const i=new FormData;i.append("prompt",e),i.append("options",JSON.stringify(t)),r&&r.length>0&&r.forEach(l=>{i.append("images",l)});try{await Ve.post("/execute-codegen",i,{headers:{"Content-Type":"multipart/form-data"}})}catch(l){throw nt.isAxiosError(l)?l.response?new Error(`Server error: ${l.response.data.message||"Unknown error"}`):l.request?new Error("No response received from server"):new Error(`Error setting up request: ${l.message}`):new Error("An unexpected error occurred")}},Cx=async(e,t,r,i)=>{try{if(!e||typeof e!="string")throw new Error("Prompt must be a string");if(typeof t!="number"||t<0||t>2)throw new Error("Temperature must be a number between 0 and 2");if(!["default","cheap","reasoning","lite"].includes(r))throw new Error("Model type must be one of: default, cheap, reasoning");return(await Ve.post("/generate-content",{prompt:e,temperature:t,modelType:r,options:i})).data.result}catch(l){if(nt.isAxiosError(l))if(l.response){const a=l.response.data.error||"Unknown server error";throw new Error(`Content generation failed: ${a}`)}else throw l.request?new Error("No response received from server during content generation"):new Error(`Request setup failed: ${l.message}`);throw l instanceof Error?l:new Error("An unexpected error occurred during content generation")}},yd=async()=>(await Ve.get("/execution-status")).data.status,SC=async()=>{await Ve.post("/interrupt-execution")},Ex=async()=>await Ve.post("/interrupt-execution",{scope:"container-command"}),CC=async()=>{await Ve.post("/pause-execution")},EC=async()=>{await Ve.post("/resume-execution")},xd=async()=>(await Ve.get("/current-question")).data.question,jC=async(e,t,r,i,l,a,u)=>{const d=new FormData;d.append("questionId",e),d.append("answer",t),r!==void 0&&d.append("confirmed",String(r)),i&&d.append("options",JSON.stringify(i)),l&&l.length>0&&l.forEach(f=>{d.append("images",f)}),a&&d.append("selectedActionType",a),u&&d.append("structuredResponse",JSON.stringify(u)),await Ve.post("/answer-question",d,{headers:{"Content-Type":"multipart/form-data"}})},og=async()=>(await Ve.get("/usage")).data,TC=async()=>(await Ve.get("/default-codegen-options")).data.options,$C=async()=>(await Ve.get("/rcconfig")).data.rcConfig,IC=async(e,t)=>{await Ve.post(`/app-context/${e}`,{value:t})},RC=async e=>{await Ve.delete(`/delete-iteration/${e}`)},Qd=async()=>(await Ve.get("/available-ai-services")).data.services,PC=async()=>(await Ve.get("/action-type-options")).data.options,jx=async()=>{try{return(await Ve.get("/service-configurations")).data.configurations}catch{throw new Error("Failed to fetch service configurations")}},NC=async e=>{await Ve.post("/service-configuration",e)},AC=async()=>(await Ve.get("/context-files")).data.files,LC=async e=>(await Ve.post("/context-files/remove",{filePaths:e})).data,zC=async()=>(await Ve.get("/all-project-files")).data.files,FC=async e=>(await Ve.post("/context-files/add",{filePaths:e})).data,_C=async()=>(await Ve.post("/context-optimization")).data,OC=async()=>(await Ve.get("/context-preview")).data,DC=async()=>(await Ve.post("/compress-context")).data;Ve.interceptors.response.use(e=>e,e=>(console.error("API request failed:",e),e.response?(console.error("Error data:",e.response.data),console.error("Error status:",e.response.status),console.error("Error headers:",e.response.headers)):e.request?console.error("No response received:",e.request):console.error("Error message:",e.message),Promise.reject(e)));function yl(e,t){const r=new CustomEvent(e,{bubbles:!0,detail:t});document.dispatchEvent(r)}function xl(e,t){$.useEffect(()=>{const r=i=>{t(i.detail)};return document.addEventListener(e,r,!1),()=>{document.removeEventListener(e,r,!1)}},[e,t])}function MC(e,t){if(!(t!=null&&t.modelOverrides))return e;const r=[];return t.modelOverrides.default&&r.push(t.modelOverrides.default),t.modelOverrides.cheap&&r.push(t.modelOverrides.cheap),r.length>0?`${e} (${r.join("/")})`:e}function Tx(){const[e,t]=$.useState([]),[r,i]=$.useState(null);return $.useEffect(()=>{(async()=>{try{const a=await Qd();t(a)}catch(a){console.error("Error fetching AI services:",a),i("Failed to fetch available AI services.")}})()},[]),[e,r]}function $x(){const[e,t]=$.useState({services:[],isLoading:!0,error:null});return $.useEffect(()=>{(async()=>{try{const[i,l]=await Promise.all([Qd(),jx()]),a=i.map(u=>({service:u,config:l[u],displayName:MC(u,l[u])}));t({services:a,isLoading:!1,error:null})}catch(i){console.error("Error fetching services with configurations:",i),t(l=>({...l,isLoading:!1,error:"Failed to fetch service configurations."}))}})()},[]),e}const nr=C.button`
92
+ background-color: transparent;
93
+ color: ${({theme:e})=>e.colors.text};
94
+ border: none;
95
+ border-radius: 50%;
96
+ width: 40px;
97
+ height: 40px;
98
+ font-size: 20px;
99
+ cursor: pointer;
100
+ display: flex;
101
+ align-items: center;
102
+ justify-content: center;
103
+ transition: background-color 0.3s;
104
+
105
+ &:hover {
106
+ background-color: ${({theme:e})=>e.colors.buttonHoverBg};
107
+ }
108
+
109
+ &:focus {
110
+ outline: none;
111
+ box-shadow: 0 0 0 2px ${({theme:e})=>e.colors.primary};
112
+ }
113
+ `;function Ix(){yl("openContentGenerationModel")}function BC(){return h.jsx(nr,{onClick:Ix,"aria-label":"Content generation modal",children:"✨"})}const UC=({currentService:e})=>{const[t,r]=$.useState(""),[i,l]=$.useState(e),[a,u]=$.useState(.7),[d,f]=$.useState("default"),[p,g]=$.useState(),[m,v]=$.useState(!1),[w,k]=$.useState(null),[S,j]=$.useState(null),[E,P]=$.useState(!1),N=()=>P(!1),[_]=Tx(),{services:q,isLoading:A}=$x();if(xl("openContentGenerationModel",()=>P(!0)),$.useEffect(()=>{var te;const K=(te=q.find(O=>O.service===i))==null?void 0:te.config;K!=null&&K.modelOverrides?g(K.modelOverrides[d]):g(void 0)},[i,d,q]),!E)return null;const H=async K=>{K.preventDefault(),v(!0),k(null),j(null);try{const te=await Cx(t,a,d,{aiService:i,askQuestion:!1});j(te)}catch(te){k(te instanceof Error?te.message:"An unexpected error occurred")}finally{v(!1)}};return h.jsx(VC,{onClick:K=>K.target===K.currentTarget&&N(),children:h.jsxs(HC,{children:[h.jsx(WC,{onClick:N,children:"×"}),h.jsx("h2",{children:"Generate Content"}),h.jsxs(qC,{onSubmit:H,children:[h.jsxs(Ls,{children:["Prompt",h.jsx(GC,{value:t,onChange:K=>r(K.target.value),placeholder:"Enter your prompt here...",required:!0})]}),h.jsxs(Ls,{children:["AI Service",h.jsx(ig,{value:i,onChange:K=>l(K.target.value),disabled:A,children:_.map(K=>h.jsx("option",{value:K,children:K},K))})]}),h.jsxs(Ls,{children:["Temperature (",a,")",h.jsxs(JC,{children:[h.jsx(KC,{type:"range",min:"0",max:"2",step:"0.1",value:a,onChange:K=>u(Number(K.target.value))}),h.jsx(QC,{children:a})]})]}),h.jsxs(Ls,{children:["Model Type ",p?`(${p})`:"",h.jsxs(ig,{value:d,onChange:K=>f(K.target.value),children:[h.jsx("option",{value:"default",children:"Default"}),h.jsx("option",{value:"cheap",children:"Cheap"}),h.jsx("option",{value:"lite",children:"Lite"}),h.jsx("option",{value:"reasoning",children:"Reasoning"})]})]}),h.jsx(YC,{type:"submit",disabled:m||!t,children:m?"Generating...":"Generate"})]}),w&&h.jsx(ZC,{children:w}),S&&h.jsx(XC,{children:S.map((K,te)=>h.jsxs("div",{children:[h.jsx("strong",{children:K.name}),h.jsx("pre",{children:JSON.stringify(K,null,2)})]},te))})]})})},VC=C.div`
114
+ position: fixed;
115
+ top: 0;
116
+ left: 0;
117
+ right: 0;
118
+ bottom: 0;
119
+ background-color: rgba(0, 0, 0, 0.5);
120
+ display: flex;
121
+ justify-content: center;
122
+ align-items: center;
123
+ z-index: 1000;
124
+ `,HC=C.div`
125
+ background: ${({theme:e})=>e.colors.background};
126
+ padding: 2rem;
127
+ border-radius: 8px;
128
+ width: 90%;
129
+ max-width: 800px;
130
+ max-height: 90vh;
131
+ overflow-y: auto;
132
+ position: relative;
133
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
134
+ `,WC=C.button`
135
+ position: absolute;
136
+ top: 1rem;
137
+ right: 1rem;
138
+ background: none;
139
+ border: none;
140
+ font-size: 1.5rem;
141
+ cursor: pointer;
142
+ color: ${({theme:e})=>e.colors.text};
143
+ &:hover {
144
+ opacity: 0.8;
145
+ }
146
+ `,qC=C.form`
147
+ display: flex;
148
+ flex-direction: column;
149
+ gap: 1rem;
150
+ `,Ls=C.label`
151
+ display: flex;
152
+ flex-direction: column;
153
+ gap: 0.5rem;
154
+ color: ${({theme:e})=>e.colors.text};
155
+ `,GC=C.textarea`
156
+ padding: 0.5rem;
157
+ border: 1px solid ${({theme:e})=>e.colors.border};
158
+ border-radius: 4px;
159
+ background: ${({theme:e})=>e.colors.background};
160
+ color: ${({theme:e})=>e.colors.text};
161
+ min-height: 100px;
162
+ resize: vertical;
163
+ `,ig=C.select`
164
+ padding: 0.5rem;
165
+ border: 1px solid ${({theme:e})=>e.colors.border};
166
+ border-radius: 4px;
167
+ background: ${({theme:e})=>e.colors.background};
168
+ color: ${({theme:e})=>e.colors.text};
169
+ `,JC=C.div`
170
+ display: flex;
171
+ align-items: center;
172
+ gap: 1rem;
173
+ `,KC=C.input`
174
+ flex: 1;
175
+ `,QC=C.span`
176
+ min-width: 3rem;
177
+ text-align: right;
178
+ `,YC=C.button`
179
+ padding: 0.5rem 1rem;
180
+ background: ${({theme:e})=>e.colors.primary};
181
+ color: white;
182
+ border: none;
183
+ border-radius: 4px;
184
+ cursor: pointer;
185
+ &:hover {
186
+ opacity: 0.9;
187
+ }
188
+ &:disabled {
189
+ opacity: 0.5;
190
+ cursor: not-allowed;
191
+ }
192
+ `,XC=C.div`
193
+ margin-top: 1rem;
194
+ padding: 1rem;
195
+ border: 1px solid ${({theme:e})=>e.colors.border};
196
+ border-radius: 4px;
197
+ background: ${({theme:e})=>e.colors.backgroundSecondary};
198
+ white-space: pre-wrap;
199
+
200
+ pre {
201
+ white-space: pre-wrap;
202
+ }
203
+ `,ZC=C.div`
204
+ color: ${({theme:e})=>e.colors.error};
205
+ margin-top: 1rem;
206
+ padding: 0.5rem;
207
+ border: 1px solid ${({theme:e})=>e.colors.error};
208
+ border-radius: 4px;
209
+ `;function Rx(){yl("openHealthCheckModal")}function eE(){return h.jsx(nr,{onClick:Rx,"aria-label":"Health check modal",children:"🏥"})}async function tE(){const e=(await Qd()).map(t=>[t,{status:void 0,lastChecked:new Date().toISOString()}]);return{services:Object.fromEntries(e),timestamp:new Date().toISOString()}}async function nE(e){var t,r;try{const[i]=await Cx("say: hello",.7,!0,{aiService:e,askQuestion:!1});return(r=(t=i==null?void 0:i.args)==null?void 0:t.message)!=null&&r.toLowerCase().includes("hello")?"success":void 0}catch{return"error"}}const rE=()=>{const[e,t]=$.useState(!1),[r,i]=$.useState(!1),[l,a]=$.useState(null),[u,d]=$.useState(null),[f,p]=$.useState(null);xl("openHealthCheckModal",()=>t(!0));const g=()=>t(!1),m=async()=>{i(!0),a(null);try{const k=await tE();d(k),p(new Date);for(const[S,j]of Object.entries(k.services)){const E=Date.now(),P=await nE(S);j.status=P,j.responseTime=Date.now()-E,j.lastChecked=new Date().toISOString(),d(k),p(new Date)}}catch(k){a(k instanceof Error?k.message:"An unexpected error occurred")}finally{i(!1)}};if($.useEffect(()=>{e&&m()},[e]),!e)return null;const v=k=>{switch(k){case"success":return"✅";case"error":return"❌";case"not_configured":return"⚠️";default:return"❓"}},w=k=>{switch(k){case"success":return"success";case"error":return"error";case"not_configured":return"warning";default:return"default"}};return h.jsx(oE,{onClick:k=>k.target===k.currentTarget&&g(),children:h.jsxs(iE,{children:[h.jsx(sE,{onClick:g,children:"×"}),h.jsxs(lE,{children:[h.jsx("h2",{children:"AI Services Health Check"}),h.jsx(aE,{onClick:m,disabled:r,children:r?"Checking...":"🔄 Refresh"})]}),l&&h.jsx(xE,{children:l}),h.jsx(uE,{children:u&&Object.entries(u.services).map(([k,S])=>h.jsxs(cE,{children:[h.jsxs(dE,{children:[h.jsx(fE,{children:k}),h.jsx(pE,{children:v(S.status)})]}),h.jsxs(hE,{color:w(S.status),children:[h.jsxs("div",{children:["Status: ",S.status]}),S.responseTime&&h.jsxs("div",{children:["Response time: ",S.responseTime,"ms"]}),S.error&&h.jsx(mE,{children:S.error}),h.jsxs(gE,{children:["Last checked: ",new Date(S.lastChecked).toLocaleTimeString()]})]})]},k))}),f&&h.jsxs(yE,{children:["Last updated: ",f.toLocaleTimeString()]}),r&&h.jsx(vE,{children:"Checking AI Services..."})]})})},oE=C.div`
210
+ position: fixed;
211
+ top: 0;
212
+ left: 0;
213
+ right: 0;
214
+ bottom: 0;
215
+ background-color: rgba(0, 0, 0, 0.5);
216
+ display: flex;
217
+ justify-content: center;
218
+ align-items: center;
219
+ z-index: 1000;
220
+ `,iE=C.div`
221
+ background: ${({theme:e})=>e.colors.background};
222
+ padding: 2rem;
223
+ border-radius: 8px;
224
+ width: 90%;
225
+ max-width: 800px;
226
+ max-height: 90vh;
227
+ overflow-y: auto;
228
+ position: relative;
229
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
230
+ `,lE=C.div`
231
+ display: flex;
232
+ justify-content: space-between;
233
+ align-items: center;
234
+ margin-bottom: 2rem;
235
+
236
+ h2 {
237
+ margin: 0;
238
+ }
239
+ `,sE=C.button`
240
+ position: absolute;
241
+ top: 1rem;
242
+ right: 1rem;
243
+ background: none;
244
+ border: none;
245
+ font-size: 1.5rem;
246
+ cursor: pointer;
247
+ color: ${({theme:e})=>e.colors.text};
248
+ &:hover {
249
+ opacity: 0.8;
250
+ }
251
+ `,aE=C.button`
252
+ padding: 0.5rem 1rem;
253
+ background: ${({theme:e})=>e.colors.primary};
254
+ color: white;
255
+ border: none;
256
+ border-radius: 4px;
257
+ cursor: pointer;
258
+ &:hover {
259
+ opacity: 0.9;
260
+ }
261
+ &:disabled {
262
+ opacity: 0.5;
263
+ cursor: not-allowed;
264
+ }
265
+ `,uE=C.div`
266
+ display: grid;
267
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
268
+ gap: 1rem;
269
+ margin-bottom: 1rem;
270
+ `,cE=C.div`
271
+ border: 1px solid ${({theme:e})=>e.colors.border};
272
+ border-radius: 4px;
273
+ padding: 1rem;
274
+ background: ${({theme:e})=>e.colors.backgroundSecondary};
275
+ `,dE=C.div`
276
+ display: flex;
277
+ justify-content: space-between;
278
+ align-items: center;
279
+ margin-bottom: 0.5rem;
280
+ `,fE=C.h3`
281
+ margin: 0;
282
+ font-size: 1.1rem;
283
+ `,pE=C.span`
284
+ font-size: 1.2rem;
285
+ `,hE=C.div`
286
+ color: ${({theme:e,color:t})=>{switch(t){case"success":return e.colors.success;case"error":return e.colors.error;case"warning":return e.colors.warning;default:return e.colors.text}}};
287
+ font-size: 0.9rem;
288
+ `,mE=C.div`
289
+ color: ${({theme:e})=>e.colors.error};
290
+ margin-top: 0.5rem;
291
+ `,gE=C.div`
292
+ color: ${({theme:e})=>e.colors.textSecondary};
293
+ font-size: 0.8rem;
294
+ margin-top: 0.5rem;
295
+ `,yE=C.div`
296
+ text-align: right;
297
+ color: ${({theme:e})=>e.colors.textSecondary};
298
+ font-size: 0.8rem;
299
+ margin-top: 1rem;
300
+ `,xE=C.div`
301
+ color: ${({theme:e})=>e.colors.error};
302
+ margin-bottom: 1rem;
303
+ padding: 0.5rem;
304
+ border: 1px solid ${({theme:e})=>e.colors.error};
305
+ border-radius: 4px;
306
+ `,vE=C.div`
307
+ position: absolute;
308
+ top: 0;
309
+ left: 0;
310
+ right: 0;
311
+ bottom: 0;
312
+ background: rgba(0, 0, 0, 0.3);
313
+ display: flex;
314
+ justify-content: center;
315
+ align-items: center;
316
+ border-radius: 8px;
317
+ color: white;
318
+ font-size: 1.2rem;
319
+ `,Px=C.div`
320
+ position: fixed;
321
+ top: 0;
322
+ left: 0;
323
+ right: 0;
324
+ bottom: 0;
325
+ background-color: rgba(0, 0, 0, 0.5);
326
+ display: flex;
327
+ justify-content: center;
328
+ align-items: center;
329
+ z-index: 1000;
330
+ `,Nx=C.div`
331
+ background: ${({theme:e})=>e.colors.background};
332
+ padding: 2rem;
333
+ border-radius: 8px;
334
+ width: 90%;
335
+ max-width: 800px;
336
+ max-height: 90vh;
337
+ overflow-y: auto;
338
+ position: relative;
339
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
340
+ `,Ax=C.div`
341
+ display: flex;
342
+ justify-content: space-between;
343
+ align-items: center;
344
+ margin-bottom: 2rem;
345
+
346
+ h2 {
347
+ margin: 0;
348
+ }
349
+ `,Lx=C.button`
350
+ position: absolute;
351
+ top: 1rem;
352
+ right: 1rem;
353
+ background: none;
354
+ border: none;
355
+ font-size: 1.5rem;
356
+ cursor: pointer;
357
+ color: ${({theme:e})=>e.colors.text};
358
+ &:hover {
359
+ opacity: 0.8;
360
+ }
361
+ `,wE=C.div`
362
+ display: grid;
363
+ grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
364
+ gap: 1rem;
365
+ margin-bottom: 1rem;
366
+ `,kE=C.div`
367
+ border: 1px solid ${({theme:e})=>e.colors.border};
368
+ border-radius: 4px;
369
+ background: ${({theme:e})=>e.colors.backgroundSecondary};
370
+ transition: box-shadow 0.2s ease;
371
+
372
+ &:hover {
373
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
374
+ }
375
+ `,bE=C.div`
376
+ cursor: pointer;
377
+ padding: 1rem;
378
+ user-select: none;
379
+ display: flex;
380
+ justify-content: space-between;
381
+ align-items: center;
382
+ width: 100%;
383
+ background: none;
384
+ border: none;
385
+ color: ${({theme:e})=>e.colors.text};
386
+ transition: background-color 0.2s ease;
387
+
388
+ &:hover {
389
+ background-color: ${({theme:e})=>`${e.colors.border}20`};
390
+ }
391
+ `,SE=C.div`
392
+ display: flex;
393
+ align-items: center;
394
+ gap: 0.5rem;
395
+ `,CE=C.h3`
396
+ margin: 0;
397
+ font-size: 1.1rem;
398
+ `,EE=C.span`
399
+ display: inline-block;
400
+ transition: transform 0.2s ease;
401
+ transform: rotate(${({$isCollapsed:e})=>e?"0deg":"180deg"});
402
+ font-size: 0.8rem;
403
+ `,jE=C.div`
404
+ overflow: hidden;
405
+ transition: height 0.3s ease;
406
+ height: ${({$isCollapsed:e})=>e?"0":"auto"};
407
+ padding: ${({$isCollapsed:e})=>e?"0 1rem":"0 1rem 1rem"};
408
+ opacity: ${({$isCollapsed:e})=>e?"0":"1"};
409
+ transition: all 0.3s ease;
410
+ `,TE=C.form`
411
+ display: flex;
412
+ flex-direction: column;
413
+ gap: 1rem;
414
+ `,an=C.div`
415
+ display: flex;
416
+ flex-direction: column;
417
+ gap: 0.5rem;
418
+ `,un=C.label`
419
+ font-size: 0.9rem;
420
+ color: ${({theme:e})=>e.colors.text};
421
+ `,Jr=C.input`
422
+ padding: 0.5rem;
423
+ border: 1px solid ${({theme:e})=>e.colors.border};
424
+ border-radius: 4px;
425
+ background: ${({theme:e})=>e.colors.background};
426
+ color: ${({theme:e})=>e.colors.text};
427
+ font-size: 0.9rem;
428
+
429
+ &:focus {
430
+ outline: none;
431
+ border-color: ${({theme:e})=>e.colors.primary};
432
+ }
433
+ `,$E=C.button`
434
+ padding: 0.5rem 1rem;
435
+ background: ${({theme:e})=>e.colors.primary};
436
+ color: white;
437
+ border: none;
438
+ border-radius: 4px;
439
+ cursor: pointer;
440
+ font-size: 0.9rem;
441
+
442
+ &:hover {
443
+ opacity: 0.9;
444
+ }
445
+
446
+ &:disabled {
447
+ opacity: 0.5;
448
+ cursor: not-allowed;
449
+ }
450
+ `,IE=C.div`
451
+ color: ${({theme:e})=>e.colors.error};
452
+ margin-bottom: 1rem;
453
+ padding: 0.5rem;
454
+ border: 1px solid ${({theme:e})=>e.colors.error};
455
+ border-radius: 4px;
456
+ `,RE=C.div`
457
+ color: ${({theme:e})=>e.colors.success};
458
+ margin-bottom: 1rem;
459
+ padding: 0.5rem;
460
+ border: 1px solid ${({theme:e})=>e.colors.success};
461
+ border-radius: 4px;
462
+ `,PE=C.div`
463
+ color: ${({theme:e})=>e.colors.error};
464
+ `,NE=C.div`
465
+ position: absolute;
466
+ top: 0;
467
+ left: 0;
468
+ right: 0;
469
+ bottom: 0;
470
+ background: rgba(0, 0, 0, 0.3);
471
+ display: flex;
472
+ justify-content: center;
473
+ align-items: center;
474
+ border-radius: 8px;
475
+ color: white;
476
+ font-size: 1.2rem;
477
+ `,jr=e=>e==="vertex-ai",AE=e=>e==="openai"||e==="local-llm",LE=({serviceType:e,config:t,onUpdate:r,isLoading:i,isExpanded:l,onCardClick:a})=>{var le,X,ne;const[u,d]=$.useState(""),[f,p]=$.useState(!!(t!=null&&t.hasApiKey)),[g,m]=$.useState(((le=t==null?void 0:t.modelOverrides)==null?void 0:le.default)||""),[v,w]=$.useState(((X=t==null?void 0:t.modelOverrides)==null?void 0:X.cheap)||""),[k,S]=$.useState(((ne=t==null?void 0:t.modelOverrides)==null?void 0:ne.lite)||""),[j,E]=$.useState((t==null?void 0:t.googleCloudProjectId)||""),[P,N]=$.useState((t==null?void 0:t.googleCloudRegion)||""),[_,q]=$.useState((t==null?void 0:t.openaiBaseUrl)||""),[A,H]=$.useState(null);$.useEffect(()=>{var B,pe,ae;p(!!(t!=null&&t.hasApiKey)),m(((B=t==null?void 0:t.modelOverrides)==null?void 0:B.default)||""),w(((pe=t==null?void 0:t.modelOverrides)==null?void 0:pe.cheap)||""),S(((ae=t==null?void 0:t.modelOverrides)==null?void 0:ae.lite)||""),E((t==null?void 0:t.googleCloudProjectId)||""),N((t==null?void 0:t.googleCloudRegion)||""),q((t==null?void 0:t.openaiBaseUrl)||"")},[t]);const K=()=>{if(jr(e)){if(!j)return H("GCP Project ID is required for Vertex AI services"),!1;if(jr(e)&&!P)return H("GCP Region is required for Vertex AI services"),!1}else if(!f&&!u)return H("API Key is required"),!1;return H(null),!0},te=B=>{if(B.preventDefault(),!K())return;const pe={modelOverrides:{default:g||void 0,cheap:v||void 0,lite:k||void 0}};jr(e)?(pe.googleCloudProjectId=j,pe.googleCloudRegion=P):(pe.apiKey=u||void 0,pe.openaiBaseUrl=_||void 0),r(pe)},O=$.useCallback(()=>{a&&a(e)},[a,e]),Z=B=>{(B.key==="Enter"||B.key===" ")&&(B.preventDefault(),O())};return h.jsxs(kE,{children:[h.jsxs(bE,{onClick:O,onKeyDown:Z,role:"button",tabIndex:0,"aria-expanded":!!l,"aria-controls":`config-content-${e}`,children:[h.jsxs(SE,{children:[h.jsx(CE,{children:e}),!jr(e)&&f&&h.jsx("span",{title:"API Key is set",children:"🔑"}),jr(e)&&j&&h.jsx("span",{title:"GCP Project ID is set",children:"🌐"})]}),h.jsx(EE,{$isCollapsed:!l,children:"▼"})]}),h.jsx(jE,{$isCollapsed:!l,id:`config-content-${e}`,"aria-hidden":!l,children:h.jsxs(TE,{onSubmit:te,children:[!jr(e)&&h.jsxs(an,{children:[h.jsx(un,{htmlFor:`apiKey-${e}`,children:"API Key"}),h.jsx(Jr,{id:`apiKey-${e}`,type:"password",value:u,onChange:B=>d(B.target.value),placeholder:f?"API key is set":"Enter API key","aria-label":`API Key for ${e}`})]}),AE(e)&&h.jsxs(an,{children:[h.jsx(un,{htmlFor:`baseUrl-${e}`,children:"Base URL"}),h.jsx(Jr,{id:`baseUrl-${e}`,type:"text",value:_,onChange:B=>q(B.target.value),placeholder:"Enter base URL","aria-label":`Base URL for ${e}`})]}),jr(e)&&h.jsxs(an,{children:[h.jsx(un,{htmlFor:`projectId-${e}`,children:"GCP Project ID"}),h.jsx(Jr,{id:`projectId-${e}`,type:"text",value:j,onChange:B=>E(B.target.value),placeholder:"Enter GCP Project ID","aria-label":`GCP Project ID for ${e}`,required:!0})]}),jr(e)&&h.jsxs(an,{children:[h.jsx(un,{htmlFor:`region-${e}`,children:"GCP Region"}),h.jsx(Jr,{id:`region-${e}`,type:"text",value:P,onChange:B=>N(B.target.value),placeholder:"Enter GCP Region","aria-label":`GCP Region for ${e}`,required:!0})]}),h.jsxs(an,{children:[h.jsx(un,{htmlFor:`defaultModel-${e}`,children:"Default Model"}),h.jsx(Jr,{id:`defaultModel-${e}`,type:"text",value:g,onChange:B=>m(B.target.value),placeholder:"Enter model name","aria-label":`Default Model for ${e}`})]}),h.jsxs(an,{children:[h.jsx(un,{htmlFor:`cheapModel-${e}`,children:"Cheap Model"}),h.jsx(Jr,{id:`cheapModel-${e}`,type:"text",value:v,onChange:B=>w(B.target.value),placeholder:"Enter model name","aria-label":`Cheap Model for ${e}`})]}),h.jsxs(an,{children:[h.jsx(un,{htmlFor:`liteModel-${e}`,children:"Lite Model"}),h.jsx(Jr,{id:`liteModel-${e}`,type:"text",value:k,onChange:B=>S(B.target.value),placeholder:"Enter model name","aria-label":`Lite Model for ${e}`})]}),A&&h.jsx(PE,{role:"alert","aria-live":"polite",children:A}),h.jsx($E,{type:"submit",disabled:i,"aria-busy":i,children:i?"Updating...":"Update Configuration"})]})})]})};function zx(){yl("openServiceConfigurationModal")}function zE(){return h.jsx(nr,{onClick:zx,"aria-label":"Open service configuration",children:"⚙️"})}const Fx=e=>e==="vertex-ai",FE=e=>e==="openai"||e==="local-llm",_E=(e,t)=>{var i,l,a;const r=["Configuration updated successfully for "+e];return Fx(e)?(t.googleCloudProjectId&&r.push(`GCP Project ID: ${t.googleCloudProjectId}`),t.googleCloudRegion&&r.push(`GCP Region: ${t.googleCloudRegion}`)):t.apiKey&&r.push("API key has been updated"),(i=t.modelOverrides)!=null&&i.default&&r.push(`Default model: ${t.modelOverrides.default}`),(l=t.modelOverrides)!=null&&l.cheap&&r.push(`Cheap model: ${t.modelOverrides.cheap}`),(a=t.modelOverrides)!=null&&a.lite&&r.push(`Lite model: ${t.modelOverrides.lite}`),FE(e)&&"openaiBaseUrl"in t&&r.push(`OpenAI base URL: ${t.openaiBaseUrl}`),r.join(`
478
+ `)},OE=(e,t)=>{if(Fx(e)){if(!t.googleCloudProjectId)return`GCP Project ID is required for ${e}`;if(e==="vertex-ai"&&!t.googleCloudRegion)return"GCP Region is required for Vertex AI"}return null},DE=()=>{const[e,t]=$.useState(!1),[r,i]=$.useState(!1),[l,a]=$.useState(null),[u,d]=$.useState(null),[f,p]=$.useState(),[g]=Tx();xl("openServiceConfigurationModal",()=>t(!0));const m=()=>{t(!1),a(null),d(null)};$.useEffect(()=>{e&&v()},[e]);const v=async()=>{i(!0),a(null);try{const E=await jx();p(E)}catch(E){a(E instanceof Error?E.message:"Failed to fetch configurations")}finally{i(!1)}},w=async(E,P)=>{i(!0),a(null),d(null);const N=OE(E,P);if(N){a(N),i(!1);return}try{await NC({serviceType:E,config:P}),await v(),d(_E(E,P))}catch(_){let q="Failed to update configuration";_ instanceof Error&&(q=_.message,_.message.includes("auth")?q=`Authentication error for ${E}: ${_.message}`:_.message.includes("permission")&&(q=`Permission error for ${E}: ${_.message}`)),a(q)}finally{i(!1)}},[k,S]=$.useState(null),j=$.useCallback(E=>{S(P=>P===E?null:E)},[S]);return e?h.jsx(Px,{onClick:E=>E.target===E.currentTarget&&m(),role:"dialog","aria-modal":"true","aria-labelledby":"service-config-title",children:h.jsxs(Nx,{children:[h.jsx(Lx,{onClick:m,"aria-label":"Close configuration modal",children:"×"}),h.jsx(Ax,{children:h.jsx("h2",{id:"service-config-title",children:"AI Services Configuration"})}),l&&h.jsx(IE,{role:"alert","aria-live":"polite",children:l}),u&&h.jsx(RE,{role:"status","aria-live":"polite",children:u.split(`
479
+ `).map((E,P)=>h.jsx("div",{children:E},P))}),h.jsx(wE,{children:f?g.map(E=>h.jsx(LE,{serviceType:E,config:f[E],onUpdate:P=>w(E,P),isLoading:r,isExpanded:k===E,onCardClick:j},E)):h.jsx("div",{"aria-live":"polite",children:"Loading configurations..."})}),r&&h.jsx(NE,{role:"status","aria-live":"polite",children:"Updating configurations..."})]})}):null},_x=ei`
480
+ from {
481
+ opacity: 0;
482
+ }
483
+ to {
484
+ opacity: 1;
485
+ }
486
+ `,ME=ei`
487
+ from {
488
+ transform: translateX(100%);
489
+ }
490
+ to {
491
+ transform: translateX(0);
492
+ }
493
+ `,BE=C.button`
494
+ background: none;
495
+ border: none;
496
+ font-size: 1.5rem;
497
+ cursor: pointer;
498
+ padding: 8px;
499
+ color: ${({theme:e})=>e.colors.text};
500
+ transition: color 0.2s ease;
501
+ display: flex;
502
+ align-items: center;
503
+ justify-content: center;
504
+
505
+ &:hover {
506
+ color: ${({theme:e})=>e.colors.primary};
507
+ }
508
+
509
+ &:focus {
510
+ outline: 2px solid ${({theme:e})=>e.colors.primary};
511
+ outline-offset: 2px;
512
+ border-radius: 4px;
513
+ }
514
+ `,UE=C.div`
515
+ position: fixed;
516
+ top: 0;
517
+ left: 0;
518
+ right: 0;
519
+ bottom: 0;
520
+ background-color: rgba(0, 0, 0, 0.5);
521
+ z-index: 998;
522
+ display: ${({isOpen:e})=>e?"block":"none"};
523
+ animation: ${_x} 0.2s ease;
524
+ `,VE=C.div`
525
+ position: absolute;
526
+ ${({position:e})=>e?vt`
527
+ top: ${e.top??"auto"};
528
+ right: ${e.right??"auto"};
529
+ left: ${e.left??"auto"};
530
+ bottom: ${e.bottom??"auto"};
531
+ `:vt`
532
+ top: 100%;
533
+ right: 0;
534
+ `}
535
+ background-color: ${({theme:e})=>e.colors.pageBackground};
536
+ border-radius: 8px;
537
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
538
+ padding: 8px 0;
539
+ min-width: 200px;
540
+ z-index: 999;
541
+ opacity: ${({isOpen:e})=>e?1:0};
542
+ visibility: ${({isOpen:e})=>e?"visible":"hidden"};
543
+ transform-origin: top right;
544
+ animation: ${({isOpen:e})=>e?vt`
545
+ ${ME} 0.2s ease,
546
+ ${_x} 0.2s ease
547
+ `:"none"};
548
+
549
+ @media (max-width: 576px) {
550
+ position: fixed;
551
+ top: 0;
552
+ right: 0;
553
+ bottom: 0;
554
+ min-width: 250px;
555
+ border-radius: 0;
556
+ border-top-left-radius: 8px;
557
+ border-bottom-left-radius: 8px;
558
+ transform-origin: center right;
559
+ }
560
+ `,HE=C.div`
561
+ padding: 12px 16px;
562
+ cursor: pointer;
563
+ transition: background-color 0.2s ease;
564
+ display: flex;
565
+ align-items: center;
566
+ gap: 8px;
567
+ color: ${({theme:e})=>e.colors.text};
568
+
569
+ &:hover {
570
+ background-color: ${({theme:e})=>e.colors.backgroundSecondary};
571
+ }
572
+
573
+ &:focus-within {
574
+ background-color: ${({theme:e})=>e.colors.backgroundSecondary};
575
+ outline: 2px solid ${({theme:e})=>e.colors.primary};
576
+ outline-offset: -2px;
577
+ }
578
+ `,WE=C.div`
579
+ position: relative;
580
+ display: inline-block;
581
+ `,qE=({menuItems:e,isOpen:t,onToggle:r,className:i,buttonAriaLabel:l="Toggle menu",menuAriaLabel:a="Navigation menu",position:u})=>{const d=$.useRef(null),f=$.useRef(null),p=$.useRef(null);$.useEffect(()=>{const v=k=>{var S;t&&d.current&&!d.current.contains(k.target)&&!((S=p.current)!=null&&S.contains(k.target))&&r()},w=k=>{var S;t&&k.key==="Escape"&&(r(),(S=p.current)==null||S.focus())};return document.addEventListener("mousedown",v),document.addEventListener("keydown",w),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("keydown",w)}},[t,r]),$.useEffect(()=>{var v;t&&((v=f.current)==null||v.focus())},[t]);const g=v=>{var S,j;if(!t)return;const w=Array.from(((S=d.current)==null?void 0:S.querySelectorAll('[role="menuitem"]'))||[]),k=w.indexOf(document.activeElement);switch(v.key){case"ArrowDown":v.preventDefault(),k<w.length-1?w[k+1].focus():w[0].focus();break;case"ArrowUp":v.preventDefault(),k>0?w[k-1].focus():w[w.length-1].focus();break;case"Home":v.preventDefault(),w[0].focus();break;case"End":v.preventDefault(),w[w.length-1].focus();break;case"Enter":case" ":v.preventDefault(),k>=0&&(e[k].onClick(),r(),(j=p.current)==null||j.focus());break}},m=v=>{var w;v(),r(),(w=p.current)==null||w.focus()};return h.jsxs(WE,{className:i,children:[h.jsx(BE,{onClick:r,"aria-expanded":t,"aria-haspopup":"true","aria-controls":"menu-items","aria-label":l,ref:p,children:"☰"}),h.jsx(UE,{isOpen:t,onClick:r}),h.jsx(VE,{isOpen:t,position:u,ref:d,role:"menu","aria-label":a,id:"menu-items",onKeyDown:g,children:e.map((v,w)=>h.jsxs(HE,{onClick:()=>m(v.onClick),role:"menuitem",tabIndex:t?0:-1,ref:w===0?f:null,"aria-label":v.ariaLabel,children:[v.content," ",v.ariaLabel]},v.key||w))})]})};function Ox(){yl("openRcConfigModal")}const GE=({rcConfig:e})=>{const[t,r]=$.useState(!1);xl("openRcConfigModal",()=>r(!0));const i=()=>{r(!1)};return!t||!e?null:h.jsx(Px,{onClick:l=>l.target===l.currentTarget&&i(),role:"dialog","aria-modal":"true","aria-labelledby":"rc-config-title",children:h.jsxs(Nx,{children:[h.jsx(Lx,{onClick:i,"aria-label":"Close RC configuration modal",children:"×"}),h.jsx(Ax,{children:h.jsx("h2",{id:"rc-config-title",children:"RC Configuration"})}),h.jsxs(JE,{children:[h.jsxs(an,{children:[h.jsx(un,{children:"Root Directory"}),h.jsx(_o,{children:e.rootDir})]}),e.lintCommand&&h.jsxs(an,{children:[h.jsx(un,{children:"Lint Command"}),h.jsx(_o,{children:e.lintCommand})]}),e.extensions&&e.extensions.length>0&&h.jsxs(an,{children:[h.jsx(un,{children:"Extensions"}),h.jsx(_o,{children:e.extensions.join(", ")})]}),e.ignorePaths&&e.ignorePaths.length>0&&h.jsxs(an,{children:[h.jsx(un,{children:"Ignore Paths"}),h.jsx(_o,{children:e.ignorePaths.join(", ")})]}),e.importantContext&&h.jsxs(an,{children:[h.jsx(un,{children:"Important Context"}),h.jsx(_o,{children:e.importantContext.files?`Files: ${e.importantContext.files.join(", ")}`:"None"})]}),e.modelOverrides&&h.jsxs(an,{children:[h.jsx(un,{children:"Model Overrides"}),h.jsx(_o,{children:h.jsx("pre",{children:JSON.stringify(e.modelOverrides,null,2)})})]})]})]})})},JE=C.div`
582
+ display: flex;
583
+ flex-direction: column;
584
+ gap: 1rem;
585
+ margin-top: 1rem;
586
+ `,_o=C.div`
587
+ color: ${({theme:e})=>e.colors.text};
588
+ font-family: monospace;
589
+ background-color: ${({theme:e})=>e.colors.backgroundSecondary};
590
+ padding: 0.5rem;
591
+ border-radius: 4px;
592
+ overflow-x: auto;
593
+
594
+ pre {
595
+ margin: 0;
596
+ white-space: pre-wrap;
597
+ }
598
+ `,KE=()=>h.jsx(nr,{onClick:Ox,children:"ℹ️"}),QE=C.div`
599
+ position: fixed;
600
+ top: 0;
601
+ left: 0;
602
+ right: 0;
603
+ bottom: 0;
604
+ background-color: rgba(0, 0, 0, 0.5);
605
+ display: flex;
606
+ justify-content: center;
607
+ align-items: center;
608
+ z-index: 1000;
609
+ `,YE=C.div`
610
+ background: ${({theme:e})=>e.colors.background};
611
+ padding: 2rem;
612
+ border-radius: 8px;
613
+ width: 90%;
614
+ max-width: 800px;
615
+ max-height: 90vh;
616
+ overflow-y: auto;
617
+ position: relative;
618
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
619
+ `,XE=C.div`
620
+ display: flex;
621
+ justify-content: space-between;
622
+ align-items: center;
623
+ margin-bottom: 2rem;
624
+
625
+ h2 {
626
+ margin: 0;
627
+ }
628
+ `,ZE=C.button`
629
+ position: absolute;
630
+ top: 1rem;
631
+ right: 1rem;
632
+ background: none;
633
+ border: none;
634
+ font-size: 1.5rem;
635
+ cursor: pointer;
636
+ color: ${({theme:e})=>e.colors.text};
637
+ &:hover {
638
+ opacity: 0.8;
639
+ }
640
+ `,ej=C.div`
641
+ display: flex;
642
+ flex-direction: column;
643
+ gap: 1rem;
644
+ margin-bottom: 1rem;
645
+ `,tj=C.div`
646
+ color: ${({theme:e})=>e.colors.error};
647
+ margin-bottom: 1rem;
648
+ padding: 0.5rem;
649
+ border: 1px solid ${({theme:e})=>e.colors.error};
650
+ border-radius: 4px;
651
+ `,nj=C.div`
652
+ color: ${({theme:e})=>e.colors.success};
653
+ margin-bottom: 1rem;
654
+ padding: 0.5rem;
655
+ border: 1px solid ${({theme:e})=>e.colors.success};
656
+ border-radius: 4px;
657
+ `,rj=C.div`
658
+ position: absolute;
659
+ top: 0;
660
+ left: 0;
661
+ right: 0;
662
+ bottom: 0;
663
+ background: rgba(0, 0, 0, 0.3);
664
+ display: flex;
665
+ justify-content: center;
666
+ align-items: center;
667
+ border-radius: 8px;
668
+ color: white;
669
+ font-size: 1.2rem;
670
+ `,aa=({value:e,onChange:t,disabled:r})=>{const{services:i,isLoading:l,error:a}=$x(),u=d=>{t(d.target.value)};return h.jsxs(oj,{children:[h.jsxs(ij,{id:"aiService",value:e,onChange:u,disabled:r||l||a!==null,children:[h.jsx("option",{value:"",children:"Select AI Service"}),i.map(({service:d,displayName:f})=>h.jsx("option",{value:d,children:f},d))]}),l&&h.jsx(lj,{children:"Loading services..."}),a&&h.jsx(sj,{children:a})]})},oj=C.div`
671
+ display: flex;
672
+ flex-direction: column;
673
+ gap: 4px;
674
+ `,ij=C.select`
675
+ padding: 8px;
676
+ border: 1px solid ${({theme:e})=>e.colors.border};
677
+ border-radius: 4px;
678
+ background-color: ${({theme:e})=>e.colors.inputBg};
679
+ color: ${({theme:e})=>e.colors.inputText};
680
+ font-size: 14px;
681
+ max-width: 200px; /* Ensure enough space for longer options */
682
+
683
+ &:disabled {
684
+ background-color: ${({theme:e})=>e.colors.disabled};
685
+ cursor: not-allowed;
686
+ }
687
+
688
+ option {
689
+ padding: 4px;
690
+ background-color: ${({theme:e})=>e.colors.inputBg};
691
+ color: ${({theme:e})=>e.colors.inputText};
692
+ }
693
+ `,lj=C.div`
694
+ color: ${({theme:e})=>e.colors.text};
695
+ font-size: 14px;
696
+ font-style: italic;
697
+ `,sj=C.div`
698
+ color: ${({theme:e})=>e.colors.error};
699
+ font-size: 14px;
700
+ `;function Dx(){yl("openGenaicodeConfigModal")}function aj(){return h.jsx(nr,{onClick:Dx,"aria-label":"Open Genaicode configuration",children:"🐺"})}const uj=({options:e,onOptionsChange:t})=>{const[r,i]=$.useState(!1),[l,a]=$.useState(!1),[u,d]=$.useState(null),[f,p]=$.useState(null);xl("openGenaicodeConfigModal",()=>i(!0));const g=()=>{i(!1),d(null),p(null)},m=async S=>{a(!0),d(null),p(null);try{t(S),p("Configuration updated successfully")}catch{d("Failed to update configuration")}finally{a(!1)}},v=S=>{const{name:j,value:E,type:P}=S.target,N=P==="checkbox"?S.target.checked:E;m({...e,[j]:N})},w=S=>{m({...e,aiService:S})},k=S=>{const j=S.target.value.split(",").map(E=>E.trim());m({...e,ignorePatterns:j})};return r?h.jsx(QE,{onClick:S=>S.target===S.currentTarget&&g(),role:"dialog","aria-modal":"true","aria-labelledby":"genaicode-config-title",children:h.jsxs(YE,{children:[h.jsx(ZE,{onClick:g,"aria-label":"Close configuration modal",children:"×"}),h.jsx(XE,{children:h.jsx("h2",{id:"genaicode-config-title",children:"Genaicode Configuration"})}),u&&h.jsx(tj,{role:"alert","aria-live":"polite",children:u}),f&&h.jsx(nj,{role:"status","aria-live":"polite",children:f}),h.jsxs(ej,{children:[h.jsxs(Qi,{children:[h.jsx(Mn,{htmlFor:"aiService",children:"Default AI Service:"}),h.jsx(aa,{value:e.aiService,onChange:w,disabled:l})]}),h.jsxs(Qi,{children:[h.jsx(Mn,{htmlFor:"contentMask",children:"Content Mask:"}),h.jsx(lg,{type:"text",id:"contentMask",name:"contentMask",value:e.contentMask||"",onChange:v,disabled:l})]}),h.jsxs(Qi,{children:[h.jsx(Mn,{htmlFor:"ignorePatterns",children:"Ignore Patterns:"}),h.jsx(lg,{type:"text",id:"ignorePatterns",name:"ignorePatterns",value:e.ignorePatterns?e.ignorePatterns.join(", "):"",onChange:k,disabled:l}),h.jsx("small",{children:"Comma-separated list of patterns"})]}),h.jsxs(Qi,{children:[h.jsx(Mn,{children:"File Operations:"}),h.jsxs(Mn,{htmlFor:"allowFileCreate",children:[h.jsx("input",{type:"checkbox",id:"allowFileCreate",name:"allowFileCreate",checked:e.allowFileCreate!==!1,onChange:v,disabled:l}),"Allow File Create"]}),h.jsxs(Mn,{htmlFor:"allowFileDelete",children:[h.jsx("input",{type:"checkbox",id:"allowFileDelete",name:"allowFileDelete",checked:e.allowFileDelete!==!1,onChange:v,disabled:l}),"Allow File Delete"]}),h.jsxs(Mn,{htmlFor:"allowDirectoryCreate",children:[h.jsx("input",{type:"checkbox",id:"allowDirectoryCreate",name:"allowDirectoryCreate",checked:e.allowDirectoryCreate!==!1,onChange:v,disabled:l}),"Allow Directory Create"]}),h.jsxs(Mn,{htmlFor:"allowFileMove",children:[h.jsx("input",{type:"checkbox",id:"allowFileMove",name:"allowFileMove",checked:e.allowFileMove!==!1,onChange:v,disabled:l}),"Allow File Move"]})]}),h.jsxs(Qi,{children:[h.jsx(Mn,{children:"Notification Settings:"}),h.jsxs(Mn,{htmlFor:"muteNotifications",children:[h.jsx("input",{type:"checkbox",id:"muteNotifications",name:"muteNotifications",checked:e.muteNotifications===!0,onChange:v,disabled:l}),"Mute Sound Notifications"]})]})]}),l&&h.jsx(rj,{role:"status","aria-live":"polite",children:"Updating configuration..."})]})}):null},Qi=C.div`
701
+ margin-bottom: 16px;
702
+ `,Mn=C.label`
703
+ display: block;
704
+ margin-bottom: 4px;
705
+ color: ${e=>e.theme.colors.text};
706
+ `,lg=C.input`
707
+ width: 100%;
708
+ padding: 8px;
709
+ border: 1px solid ${e=>e.theme.colors.border};
710
+ border-radius: 4px;
711
+ background-color: ${e=>e.theme.colors.inputBg};
712
+ color: ${e=>e.theme.colors.inputText};
713
+
714
+ &:disabled {
715
+ background-color: ${e=>e.theme.colors.disabled};
716
+ cursor: not-allowed;
717
+ }
718
+ `,cj="0.14.2",Mx=()=>h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:h.jsx("path",{d:"M19 3H5C3.9 3 3 3.9 3 5V19C3 20.1 3.9 21 5 21H19C20.1 21 21 20.1 21 19V5C21 3.9 20.1 3 19 3ZM19 19H5V5H19V19ZM13.96 12.29L11.21 15.83L9.25 13.47L6.5 17H17.5L13.96 12.29Z",fill:"currentColor"})}),dj=()=>h.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[h.jsx("path",{d:"M10 3H8C6.89543 3 6 3.89543 6 5V7M10 21H8C6.89543 21 6 20.1046 6 19V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("path",{d:"M14 3H16C17.1046 3 18 3.89543 18 5V7M14 21H16C17.1046 21 18 20.1046 18 19V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"}),h.jsx("rect",{x:"6",y:"10",width:"12",height:"4",rx:"1",stroke:"currentColor",strokeWidth:"2"}),h.jsx("path",{d:"M12 7V10",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"}),h.jsx("path",{d:"M12 14V17",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round"})]}),fj=500,zs=5e3,ri=$.createContext({messages:[],executionStatus:"idle",currentQuestion:null,suggestions:[],currentPrompt:"",theme:"dark",usage:void 0,codegenOptions:void 0,rcConfig:null,lastFinishedExecutionId:null,initialDataLoaded:!1,conversationGraphState:null,isGraphVisualiserOpen:!1,terminalEvents:{},isTerminalOpen:!1,isContextManagerOpen:!1,isCompressionModalOpen:!1,setMessages:()=>{},setExecutionStatus:()=>{},setCurrentQuestion:()=>{},setSuggestions:()=>{},setCurrentPrompt:()=>{},toggleTheme:()=>{},setCodegenOptions:()=>{},setLastFinishedExecutionId:()=>{},startPolling:()=>{},stopPolling:()=>{},handlePauseExecution:async()=>{},handleResumeExecution:async()=>{},setConversationGraphState:()=>{},toggleGraphVisualiser:()=>{},toggleTerminal:()=>{},toggleContextManager:()=>{},toggleCompressionModal:()=>{},clearTerminalEvents:()=>{}}),pj=({children:e})=>{const[t,r]=$.useState([]),[i,l]=$.useState("idle"),[a,u]=$.useState(null),[d,f]=$.useState([]),[p,g]=$.useState(""),[m,v]=$.useState("dark"),[w,k]=$.useState(),[S,j]=$.useState(void 0),[E,P]=$.useState(null),[N,_]=$.useState(null),q=$.useRef(!1),[A,H]=$.useState(!1),K=$.useRef(null),[te,O]=$.useState(null),[Z,le]=$.useState(!1),[X,ne]=$.useState({}),[B,pe]=$.useState(!1),[ae,Q]=$.useState(!1),[de,T]=$.useState(!1),[z,G]=$.useState(!0),I=$.useCallback(()=>{v(De=>De==="light"?"dark":"light")},[]),ce=$.useCallback(De=>{j(De)},[]),xe=$.useCallback(()=>{le(De=>!De)},[]),ke=$.useCallback(()=>{pe(De=>!De)},[]),he=$.useCallback(()=>{Q(De=>!De)},[]),fe=$.useCallback(()=>{T(De=>!De)},[]),se=$.useCallback(()=>{G(De=>!De)},[]),ve=$.useCallback(De=>{ne(Ft=>({...Ft,[De]:[]}))},[]),Ae=$.useCallback(async()=>{try{const[De,Ft,Zt,pt,_e,ht]=await Promise.all([yd(),xd(),rg(),og(),TC(),$C()]);l(De),u(Ft);const Tt=[],_t={};for(const W of Zt)if(W.message&&Tt.push({...W.message,timestamp:new Date(W.message.timestamp),data:W.data}),W.terminalEvent){const{iterationId:re}=W.terminalEvent;_t[re]||(_t[re]=[]),_t[re].push({...W.terminalEvent,timestamp:new Date(W.terminalEvent.timestamp).toString()})}for(const W in _t)_t[W].length>zs&&(_t[W]=_t[W].slice(-zs));r(Tt),ne(_t),k(pt),j(_e),P(ht),H(!0)}catch(De){console.error("Failed to fetch initial data:",De),H(!1)}},[]);$.useEffect(()=>{Ae()},[Ae]);const Ie=$.useCallback(async()=>{try{const[De,Ft,Zt,pt]=await Promise.all([yd(),xd(),rg(),og()]);l(_e=>_e!==De?De:_e),u(_e=>(_e==null?void 0:_e.id)!==(Ft==null?void 0:Ft.id)?Ft:_e),r(_e=>{const ht=Zt.filter(Tt=>!!Tt.message).map(Tt=>({...Tt.message,timestamp:new Date(Tt.message.timestamp),data:Tt.data}));return _e.length!==ht.length||_e.length>0&&ht.length>0&&_e[_e.length-1].id!==ht[ht.length-1].id?ht:_e}),ne(_e=>{const ht={};let Tt=!1;for(const re of Zt)if(re.terminalEvent){const{iterationId:Se}=re.terminalEvent;ht[Se]||(ht[Se]=[]),ht[Se].push({...re.terminalEvent,timestamp:new Date(re.terminalEvent.timestamp).toString()})}const _t=new Set([...Object.keys(_e),...Object.keys(ht)]),W={..._e};for(const re of _t){const Se=_e[re]||[],$e=ht[re]||[];(Se.length!==$e.length||$e.length>0&&Se.length>0&&Se[Se.length-1].id!==$e[$e.length-1].id)&&(Tt=!0,W[re]=$e.length>zs?$e.slice(-zs):$e)}return Tt?W:_e}),k(_e=>(_e==null?void 0:_e.usageMetrics.total.cost)!==(pt==null?void 0:pt.usageMetrics.total.cost)||(_e==null?void 0:_e.usageMetrics.total.tpd)!==(pt==null?void 0:pt.usageMetrics.total.tpd)?pt:_e)}catch(De){console.error("Failed to poll data:",De)}K.current&&clearTimeout(K.current),q.current&&(K.current=setTimeout(Ie,fj))},[]),Ge=$.useCallback(()=>{q.current||(console.log("Starting polling..."),q.current=!0,K.current&&clearTimeout(K.current),requestAnimationFrame(()=>{Ie()}))},[Ie]),jt=$.useCallback(()=>{q.current&&(console.log("Stopping polling..."),q.current=!1,K.current&&(clearTimeout(K.current),K.current=null))},[]);$.useEffect(()=>(A&&Ge(),()=>{jt()}),[A,Ge,jt]);const zt=$.useCallback(async()=>{try{await CC(),l("paused")}catch(De){console.error("Failed to pause execution:",De)}},[]),Bt=$.useCallback(async()=>{try{await EC(),l("executing")}catch(De){console.error("Failed to resume execution:",De)}},[]),or=$.useMemo(()=>({messages:t,executionStatus:i,currentQuestion:a,suggestions:d,currentPrompt:p,theme:m,usage:w,codegenOptions:S,rcConfig:E,lastFinishedExecutionId:N,initialDataLoaded:A,conversationGraphState:te,isGraphVisualiserOpen:Z,terminalEvents:X,isTerminalOpen:B,isContextManagerOpen:ae,isCompressionModalOpen:de,autoScrollTerminal:z,setMessages:r,setExecutionStatus:l,setCurrentQuestion:u,setSuggestions:f,setCurrentPrompt:g,toggleTheme:I,setCodegenOptions:ce,setLastFinishedExecutionId:_,startPolling:Ge,stopPolling:jt,handlePauseExecution:zt,handleResumeExecution:Bt,setConversationGraphState:O,toggleGraphVisualiser:xe,toggleTerminal:ke,toggleContextManager:he,toggleCompressionModal:fe,toggleAutoScrollTerminal:se,setAutoScrollTerminal:G,clearTerminalEvents:ve}),[t,i,a,d,p,m,w,S,E,N,A,te,Z,X,B,ae,de,z,I,ce,Ge,jt,zt,Bt,xe,ke,he,fe,se,ve]);return h.jsx(ri.Provider,{value:or,children:e})},Hn=()=>{const e=Et.useContext(ri);if(!e)throw new Error("useChatState must be used within a ChatStateProvider");return e},hj=ei`
719
+ 0% {
720
+ transform: scale(1);
721
+ box-shadow: 0 0 0 0 rgba(0, 123, 255, 0.7); // Use theme primary color ideally
722
+ }
723
+ 70% {
724
+ transform: scale(1.05);
725
+ box-shadow: 0 0 0 10px rgba(0, 123, 255, 0);
726
+ }
727
+ 100% {
728
+ transform: scale(1);
729
+ box-shadow: 0 0 0 0 rgba(0, 123, 255, 0);
730
+ }
731
+ `,mj=C.div`
732
+ position: absolute; // Positioned relative to MainContent
733
+ bottom: 40px;
734
+ right: 30px;
735
+ z-index: 1000; // Ensure it's above other content like scrollbars
736
+ `,gj=C(nr)`
737
+ width: 50px; // Increased size
738
+ height: 50px; // Increased size
739
+ background-color: ${({theme:e})=>e.colors.primary};
740
+ color: ${({theme:e})=>e.colors.buttonText||"#ffffff"}; // Ensure icon is visible
741
+ border: none;
742
+ animation: ${hj} 2s infinite;
743
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
744
+
745
+ &:hover {
746
+ background-color: ${({theme:e})=>e.colors.primaryHover};
747
+ animation-play-state: paused; // Pause animation on hover
748
+ }
749
+
750
+ // Style when the visualiser panel is open (isActive prop)
751
+ ${({isActive:e,theme:t})=>e&&vt`
752
+ background-color: ${t.colors.buttonHoverBg}; // Existing active style
753
+ border: 1px solid ${t.colors.primary};
754
+ animation: none; // Turn off animation when visualiser is open
755
+ `}
756
+ `,yj=()=>{const{toggleGraphVisualiser:e,isGraphVisualiserOpen:t,conversationGraphState:r}=Hn();return r!=null&&r.isActive?h.jsx(mj,{children:h.jsx(gj,{onClick:e,"aria-label":"Toggle Conversation Graph",title:"Toggle Conversation Graph",isActive:t,children:h.jsx(dj,{})})}):null},sg=C.div`
757
+ position: fixed;
758
+ top: 0;
759
+ left: 0;
760
+ right: 0;
761
+ bottom: 0;
762
+ background-color: ${e=>e.theme.colors.menuBackdrop};
763
+ display: flex;
764
+ justify-content: center;
765
+ align-items: center;
766
+ z-index: ${e=>e.theme.zIndex.modal};
767
+ `,ag=C.div`
768
+ background-color: ${e=>e.theme.colors.pageBackground};
769
+ border-radius: 8px;
770
+ width: 90%;
771
+ max-width: 800px;
772
+ max-height: 90vh;
773
+ display: flex;
774
+ flex-direction: column;
775
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
776
+ border: 1px solid ${e=>e.theme.colors.border};
777
+ color: ${e=>e.theme.colors.text};
778
+ `,ug=C.div`
779
+ padding: 16px 20px;
780
+ border-bottom: 1px solid ${e=>e.theme.colors.border};
781
+ display: flex;
782
+ justify-content: space-between;
783
+ align-items: center;
784
+
785
+ h2 {
786
+ margin: 0;
787
+ font-size: 1.2rem;
788
+ color: ${e=>e.theme.colors.text};
789
+ }
790
+ `,cg=C.button`
791
+ background: none;
792
+ border: none;
793
+ font-size: 1.5rem;
794
+ cursor: pointer;
795
+ color: ${e=>e.theme.colors.textSecondary};
796
+ padding: 0;
797
+ line-height: 1;
798
+
799
+ &:hover {
800
+ color: ${e=>e.theme.colors.text};
801
+ }
802
+ `,dg=C.div`
803
+ padding: 20px;
804
+ overflow-y: auto;
805
+ flex-grow: 1;
806
+ display: flex;
807
+ flex-direction: column;
808
+ gap: 16px;
809
+ `,xj=C.div`
810
+ border: 1px solid ${e=>e.theme.colors.border};
811
+ border-radius: 4px;
812
+ padding: 10px;
813
+ background-color: ${e=>e.theme.colors.inputBg};
814
+ max-height: 60vh;
815
+ overflow-y: auto;
816
+ `,vj=C.div`
817
+ display: flex;
818
+ align-items: center;
819
+ padding: 4px 0;
820
+ gap: 8px;
821
+ font-family: monospace;
822
+ font-size: 0.9rem;
823
+
824
+ &:hover {
825
+ background-color: ${e=>e.theme.colors.menuHover};
826
+ }
827
+ `,wj=C.div`
828
+ width: ${e=>e.level*20}px;
829
+ flex-shrink: 0;
830
+ `,fg=C.input.attrs({type:"checkbox"})`
831
+ cursor: pointer;
832
+ margin: 0;
833
+ width: 16px;
834
+ height: 16px;
835
+ `,kj=C.span`
836
+ cursor: pointer;
837
+ color: ${e=>e.type==="folder"?e.theme.colors.primary:e.theme.colors.text};
838
+ font-weight: ${e=>e.type==="folder"?"bold":"normal"};
839
+ flex-grow: 1;
840
+ white-space: nowrap;
841
+ overflow: hidden;
842
+ text-overflow: ellipsis;
843
+ `,pg=C.div`
844
+ display: flex;
845
+ justify-content: flex-end;
846
+ gap: 12px;
847
+ padding-top: 16px;
848
+ border-top: 1px solid ${e=>e.theme.colors.border};
849
+ `,Kr=C.button`
850
+ padding: 8px 16px;
851
+ border-radius: 4px;
852
+ border: 1px solid ${e=>e.theme.colors.border};
853
+ cursor: pointer;
854
+ font-size: 0.9rem;
855
+ transition: background-color 0.2s;
856
+
857
+ ${e=>{switch(e.variant){case"primary":return`
858
+ background-color: ${e.theme.colors.primary};
859
+ color: white;
860
+ border-color: ${e.theme.colors.primary};
861
+ &:hover { background-color: ${e.theme.colors.primaryHover}; }
862
+ `;case"danger":return`
863
+ background-color: ${e.theme.colors.error};
864
+ color: white;
865
+ border-color: ${e.theme.colors.error};
866
+ &:hover { background-color: ${e.theme.colors.errorHover}; }
867
+ `;default:return`
868
+ background-color: ${e.theme.colors.buttonBg};
869
+ color: ${e.theme.colors.buttonText};
870
+ &:hover { background-color: ${e.theme.colors.buttonHoverBg}; }
871
+ `}}}
872
+
873
+ &:disabled {
874
+ opacity: 0.6;
875
+ cursor: not-allowed;
876
+ background-color: ${e=>e.theme.colors.disabled};
877
+ border-color: ${e=>e.theme.colors.disabled};
878
+ color: ${e=>e.theme.colors.textSecondary};
879
+ }
880
+ `,hg=C.div`
881
+ text-align: center;
882
+ padding: 40px;
883
+ color: ${e=>e.theme.colors.textSecondary};
884
+ font-style: italic;
885
+ `,bj=C.div`
886
+ display: flex;
887
+ gap: 20px;
888
+ font-size: 0.85rem;
889
+ color: ${e=>e.theme.colors.textSecondary};
890
+ margin-bottom: 8px;
891
+ font-weight: 500;
892
+ `,Sj=C.span`
893
+ display: inline-flex;
894
+ align-items: center;
895
+ font-size: 0.8rem;
896
+ margin-left: 8px;
897
+ font-weight: 500;
898
+ color: ${e=>{switch(e.category){case"small":return e.theme.colors.success||"#4CAF50";case"medium":return e.theme.colors.warning||"#FFA726";case"large":return e.theme.colors.error||"#EF5350";default:return e.theme.colors.textSecondary}}};
899
+ `,Cj=C.div`
900
+ position: absolute;
901
+ top: -4px;
902
+ right: -4px;
903
+ min-width: 20px;
904
+ height: 20px;
905
+ border-radius: 10px;
906
+ font-size: 0.65rem;
907
+ font-weight: bold;
908
+ display: flex;
909
+ align-items: center;
910
+ justify-content: center;
911
+ padding: 2px 4px;
912
+ color: white;
913
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
914
+ background-color: ${e=>{switch(e.category){case"small":return e.theme.colors.success||"#4CAF50";case"medium":return e.theme.colors.warning||"#FFA726";case"large":return e.theme.colors.error||"#EF5350";default:return e.theme.colors.textSecondary}}};
915
+ `;C.div`
916
+ display: flex;
917
+ flex-direction: column;
918
+ gap: 4px;
919
+ font-size: 0.85rem;
920
+ `;const Ej=C.input`
921
+ width: 100%;
922
+ padding: 10px;
923
+ border: 1px solid ${e=>e.theme.colors.border};
924
+ border-radius: 4px;
925
+ background-color: ${e=>e.theme.colors.inputBg};
926
+ color: ${e=>e.theme.colors.text};
927
+ margin-bottom: 12px;
928
+ font-size: 0.95rem;
929
+
930
+ &:focus {
931
+ outline: none;
932
+ border-color: ${e=>e.theme.colors.primary};
933
+ }
934
+ `,jj=C.span`
935
+ cursor: pointer;
936
+ display: inline-flex;
937
+ width: 16px;
938
+ color: ${e=>e.theme.colors.textSecondary};
939
+ &:hover {
940
+ color: ${e=>e.theme.colors.text};
941
+ }
942
+ `,Tj=C.div`
943
+ display: flex;
944
+ align-items: center;
945
+ gap: 4px;
946
+ flex-grow: 1;
947
+ overflow: hidden;
948
+ `,$j=C.span`
949
+ font-size: 0.7rem;
950
+ padding: 2px 6px;
951
+ border-radius: 3px;
952
+ background-color: ${e=>e.theme.colors.success||"#4CAF50"};
953
+ color: white;
954
+ font-weight: 500;
955
+ margin-left: 8px;
956
+ `,Ij=C.div`
957
+ display: flex;
958
+ align-items: center;
959
+ gap: 12px;
960
+ margin-bottom: 12px;
961
+ `,Rj=C.label`
962
+ display: flex;
963
+ align-items: center;
964
+ gap: 6px;
965
+ font-size: 0.9rem;
966
+ cursor: pointer;
967
+ color: ${e=>e.theme.colors.text};
968
+ user-select: none;
969
+ `,Pj=C.div`
970
+ color: ${e=>e.theme.colors.error};
971
+ padding: 10px;
972
+ margin-bottom: 10px;
973
+ border: 1px solid ${e=>e.theme.colors.error};
974
+ border-radius: 4px;
975
+ background-color: rgba(255, 0, 0, 0.1);
976
+ `,Nj=C.div`
977
+ color: ${e=>e.theme.colors.success||"#4CAF50"};
978
+ padding: 10px;
979
+ margin-bottom: 10px;
980
+ border: 1px solid ${e=>e.theme.colors.success||"#4CAF50"};
981
+ border-radius: 4px;
982
+ background-color: rgba(0, 255, 0, 0.1);
983
+ `,Aj=C.div`
984
+ display: flex;
985
+ flex-direction: column;
986
+ align-items: center;
987
+ justify-content: center;
988
+ padding: 20px;
989
+ text-align: center;
990
+ gap: 20px;
991
+ height: 100%;
992
+ `;function ua(e){return e<1e3?`${e} tokens`:e<1e6?`${(e/1e3).toFixed(1)}K tokens`:`${(e/1e6).toFixed(1)}M tokens`}function Bx(e){return e<1e4?"small":e<1e5?"medium":"large"}function Ux(e,t){if(e.type==="file"){const r=t[e.path]||0;e.tokenCount=r,e.aggregatedTokenCount=r}else if(e.children){let r=0;for(const i of e.children)Ux(i,t),r+=i.aggregatedTokenCount||0;e.aggregatedTokenCount=r}else e.aggregatedTokenCount=0;e.formattedSize=ua(e.aggregatedTokenCount||0)}function Lj(e,t){var f;const r={children:[]},i=[...e].sort(),l=i.map(p=>p.split("/").filter(g=>g.length>0));let a=[];if(l.length>0){a=[...l[0]],a.pop();for(let p=1;p<l.length;p++){const g=l[p];let m=0;for(;m<a.length&&m<g.length-1&&g[m]===a[m];)m++;if(a=a.slice(0,m),a.length===0)break}}const u=a.length>0?"/"+a.join("/"):"";for(let p=0;p<i.length;p++){const m=l[p].slice(a.length);let v=r,w=u;for(let k=0;k<m.length;k++){const S=m[k],j=k===m.length-1;w+="/"+S;let E=(f=v.children)==null?void 0:f.find(P=>P.name===S);E||(E={name:S,path:w,type:j?"file":"folder",children:j?void 0:[],checked:!1,indeterminate:!1,collapsed:!1,visible:!0,inContext:!1},v.children=v.children||[],v.children.push(E)),v=E}}const d=r.children||[];if(t)for(const p of d)Ux(p,t);return{nodes:d,rootPath:u}}function zj(e){e.type==="folder"&&(e.collapsed=!e.collapsed)}function Xs(e,t,r=!1){const i=t.toLowerCase();for(const l of e){const a=!t||l.name.toLowerCase().includes(i),u=!r||l.type==="file"&&!!l.inContext;if(l.children){Xs(l.children,t,r);const d=l.children.some(f=>f.visible);r?l.visible=d:l.visible=a||d}else l.visible=a&&u}}function Zs(e,t){let r=!1;for(const i of e)i.type==="file"?i.visible&&(r=!0):i.children&&(Zs(i.children)&&(i.collapsed=!1,r=!0),i.visible&&(r=!0));return r}function Vx(e,t){if(e.visible!==!1&&(e.checked=t,e.indeterminate=!1,e.children))for(const r of e.children)Vx(r,t)}function Hx(e){if(!e.children||e.children.length===0)return;let t=!0,r=!1,i=!1,l=0;for(const a of e.children)a.type==="folder"&&Hx(a),a.visible!==!1&&(l++,a.checked||(t=!1),a.checked&&(r=!0),a.indeterminate&&(i=!0));l>0&&(e.checked=t,e.indeterminate=!t&&(r||i))}function Fs(e){const t=[];function r(i){if(i.type==="file"&&i.checked&&t.push(i.path),i.children)for(const l of i.children)r(l)}for(const i of e)r(i);return t}function Wx(e){for(const t of e)t.children&&(Wx(t.children),t.containsContext=t.children.some(r=>r.inContext||r.containsContext))}function qx(e){e.sort((t,r)=>{const i=t.inContext||t.containsContext,l=r.inContext||r.containsContext;return i!==l?i?-1:1:t.type!==r.type?t.type==="folder"?-1:1:t.name.localeCompare(r.name)});for(const t of e)t.children&&qx(t.children)}const Fj=()=>{const{isContextManagerOpen:e,toggleContextManager:t}=Hn(),[r,i]=$.useState([]),[l,a]=$.useState(!1),[u,d]=$.useState(0),[,f]=$.useState(0),[p,g]=$.useState(0),[m,v]=$.useState(0),[w,k]=$.useState(0),[S,j]=$.useState("Loading..."),[E,P]=$.useState(""),[N,_]=$.useState(!0),[,q]=$.useState([]),[A,H]=$.useState(""),[K,te]=$.useState(null),[O,Z]=$.useState(null),[le,X]=$.useState(null),ne=$.useCallback(async()=>{a(!0),j("Fetching files..."),te(null),Z(null);try{const[he,fe]=await Promise.all([AC(),zC()]);q(fe),g(fe.length),v(he.length),f(he.length),j("Processing files...");const se={},ve=new Set;let Ae=0;for(const zt of he)se[zt.path]=zt.tokenCount,ve.add(zt.path),Ae+=zt.tokenCount;k(Ae);const{nodes:Ie,rootPath:Ge}=Lj(fe,se);H(Ge);const jt=zt=>{for(const Bt of zt)Bt.type==="file"?Bt.inContext=ve.has(Bt.path):Bt.children&&jt(Bt.children)};jt(Ie),Wx(Ie),qx(Ie),Xs(Ie,E,N),(E||N)&&Zs(Ie,E),i(Ie),d(0)}catch(he){console.error("Failed to fetch context files:",he),te("Failed to fetch context files. Please try again.")}finally{a(!1)}},[E,N]);$.useEffect(()=>{e&&ne()},[e,ne]);const B=()=>{P(""),_(!0),te(null),Z(null),X(null),t()},pe=he=>{const fe=he.target.value;P(fe);const se=[...r];Xs(se,fe,N),(fe||N)&&Zs(se),i(se)},ae=he=>{const fe=he.target.checked;_(fe);const se=[...r];Xs(se,E,fe),(E||fe)&&Zs(se),i(se)},Q=he=>{zj(he),i([...r])},de=he=>{const fe=!he.checked;Vx(he,fe);const se=Ie=>{for(const Ge of Ie)Ge.children&&(se(Ge.children),Hx(Ge))},ve=[...r];se(ve),i(ve);const Ae=Fs(ve);d(Ae.length)},T=async()=>{const he=Fs(r),fe=[],se=(ve,Ae)=>{for(const Ie of ve){if(Ie.path===Ae)return Ie;if(Ie.children){const Ge=se(Ie.children,Ae);if(Ge)return Ge}}};for(const ve of he){const Ae=se(r,ve);Ae&&!Ae.inContext&&fe.push(ve)}fe.length!==0&&X({message:`Are you sure you want to add ${fe.length} file${fe.length>1?"s":""} to the context?`,onConfirm:async()=>{X(null),a(!0),j("Adding files..."),te(null),Z(null);try{const ve=await FC(fe);console.log("Context addition result:",ve),Z(`Successfully added ${ve.added} file${ve.added>1?"s":""} to context.`),await ne()}catch(ve){console.error("Failed to add context files:",ve),te("Failed to add files. Check console for details.")}finally{a(!1)}},onCancel:()=>{X(null)}})},z=async()=>{const he=Fs(r),fe=[],se=(ve,Ae)=>{for(const Ie of ve){if(Ie.path===Ae)return Ie;if(Ie.children){const Ge=se(Ie.children,Ae);if(Ge)return Ge}}};for(const ve of he){const Ae=se(r,ve);Ae&&Ae.inContext&&fe.push(ve)}fe.length!==0&&X({message:`Are you sure you want to remove ${fe.length} file${fe.length>1?"s":""} from the context?`,onConfirm:async()=>{X(null),a(!0),j("Removing files..."),te(null),Z(null);try{const ve=await LC(fe);console.log("Context removal result:",ve),Z(`Successfully removed ${ve.removed} file${ve.removed>1?"s":""} from context.`),await ne()}catch(ve){console.error("Failed to remove context files:",ve),te("Failed to remove files. Check console for details.")}finally{a(!1)}},onCancel:()=>{X(null)}})},G=async()=>{X({message:"This will analyze your context and remove files that are less relevant. Continue?",onConfirm:async()=>{X(null),a(!0),j("Optimizing context..."),te(null),Z(null);try{(await _C()).success?(Z("Context optimization complete."),await ne()):te("Context optimization failed. Please try again.")}catch(he){console.error("Failed to optimize context:",he),te("Failed to optimize context. Check console for details.")}finally{a(!1)}},onCancel:()=>{X(null)}})},I=(he,fe=0)=>he.map(se=>se.visible===!1?null:h.jsxs(Et.Fragment,{children:[h.jsxs(vj,{children:[h.jsx(wj,{level:fe}),se.type==="folder"?h.jsx(jj,{onClick:()=>Q(se),children:se.collapsed?"▶":"▼"}):h.jsx("span",{style:{width:"16px",display:"inline-block"}}),h.jsx(fg,{checked:se.checked||!1,ref:ve=>{ve&&(ve.indeterminate=se.indeterminate||!1)},onChange:()=>de(se)}),h.jsxs(Tj,{onClick:()=>se.type==="folder"?Q(se):de(se),children:[h.jsxs(kj,{type:se.type,title:se.path,children:[se.type==="folder"?"📁 ":"📄 ",se.name]}),se.type==="file"&&se.inContext&&!N&&h.jsx($j,{children:"In Context"}),se.aggregatedTokenCount!==void 0&&se.aggregatedTokenCount>0&&h.jsxs(Sj,{category:Bx(se.aggregatedTokenCount),children:["(",se.formattedSize,")"]})]})]}),se.children&&!se.collapsed&&I(se.children,fe+1)]},se.path)),ce=()=>{const he=Fs(r);let fe=0,se=0;const ve=(Ae,Ie)=>{for(const Ge of Ae){if(Ge.path===Ie)return Ge;if(Ge.children){const jt=ve(Ge.children,Ie);if(jt)return jt}}};for(const Ae of he){const Ie=ve(r,Ae);Ie&&(Ie.inContext?fe++:se++)}return{inContextCount:fe,notInContextCount:se}},{inContextCount:xe,notInContextCount:ke}=ce();return e?le?h.jsx(sg,{onClick:()=>X(null),children:h.jsxs(ag,{onClick:he=>he.stopPropagation(),style:{maxWidth:"500px"},children:[h.jsxs(ug,{children:[h.jsx("h2",{children:"Confirm Action"}),h.jsx(cg,{onClick:()=>X(null),children:"×"})]}),h.jsx(dg,{children:h.jsxs(Aj,{children:[h.jsx("p",{children:le.message}),h.jsxs(pg,{children:[h.jsx(Kr,{onClick:le.onCancel,children:"Cancel"}),h.jsx(Kr,{variant:"primary",onClick:le.onConfirm,children:"Confirm"})]})]})})]})}):h.jsx(sg,{onClick:B,children:h.jsxs(ag,{onClick:he=>he.stopPropagation(),children:[h.jsxs(ug,{children:[h.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:"4px"},children:[h.jsx("h2",{children:"Manage Context Files"}),A&&h.jsx("span",{style:{fontSize:"0.8rem",opacity:.7,fontFamily:"monospace"},children:A})]}),h.jsx(cg,{onClick:B,children:"×"})]}),h.jsxs(dg,{children:[K&&h.jsx(Pj,{children:K}),O&&h.jsx(Nj,{children:O}),h.jsxs(bj,{children:[h.jsxs("span",{children:["Total Project Files: ",p]}),h.jsxs("span",{children:["In Context: ",m]}),h.jsxs("span",{children:["Selected: ",u]}),w>0&&h.jsxs("span",{children:["Total Context Size: ",ua(w)]})]}),h.jsx(Ej,{placeholder:"Search files...",value:E,onChange:pe,autoFocus:!0}),h.jsx(Ij,{children:h.jsxs(Rj,{children:[h.jsx(fg,{checked:N,onChange:ae}),"Show only in context"]})}),h.jsx(xj,{children:l?h.jsx(hg,{children:S}):r.length>0?I(r):h.jsx(hg,{children:"No files found."})}),h.jsxs(pg,{children:[h.jsx(Kr,{onClick:ne,disabled:l,children:"Refresh"}),h.jsx(Kr,{onClick:G,disabled:l,title:"Optimize Context (Remove less relevant files)",children:"Optimize..."}),h.jsx(Kr,{variant:"primary",onClick:T,disabled:l||ke===0,children:"Add Selected"}),h.jsx(Kr,{variant:"danger",onClick:z,disabled:l||xe===0,children:"Remove Selected"}),h.jsx(Kr,{onClick:B,children:"Close"})]})]})]})}):null},_j=C.span`
993
+ position: relative;
994
+ display: inline-flex;
995
+ align-items: center;
996
+ justify-content: center;
997
+ `,Gx=()=>h.jsx(_j,{children:h.jsx("span",{role:"img","aria-label":"Context Manager",children:"📂"})});var Vn=(e=>(e.USER="user",e.ASSISTANT="assistant",e.SYSTEM="system",e))(Vn||{}),Yd=(e=>(e.CONVERSATION_SUMMARY="conversation-summary",e.MESSAGE_EDITABLE="editable",e))(Yd||{});const vd=e=>e>=1e3?`Context size: ${(e/1e3).toFixed(1)}K tokens`:`Context size: ${e} tokens`,mg=e=>e>=1e3?`${(e/1e3).toFixed(1)}K`:`${e}`,Oj=e=>{var r;const t=e.filter(i=>{var l;return[Vn.ASSISTANT,Vn.SYSTEM].includes(i.type)&&typeof((l=i.data)==null?void 0:l.contextSize)=="number"});if(t.length!==0)return(r=t[t.length-1].data)==null?void 0:r.contextSize},Dj=e=>{var r;const t=e.filter(i=>{var l;return i.type===Vn.SYSTEM&&typeof((l=i.data)==null?void 0:l.filesContextSize)=="number"});if(t.length!==0)return(r=t[t.length-1].data)==null?void 0:r.filesContextSize},Xd=e=>{const t=Oj(e),r=Dj(e),i=t!==void 0?vd(t):"Context size N/A",l=r!==void 0?vd(r):"Files context N/A",[a,u]=$.useState(null),[d,f]=$.useState(null),[p,g]=$.useState(!1),[m,v]=$.useState(null),w=$.useCallback(async()=>{g(!0),v(null);try{const k=await fetch("/api/prompt",{method:"GET"});if(!k.ok)throw new Error(`Failed to fetch prompt context: ${k.status} ${k.statusText}`);const S=await k.json();u(S.promptItems??[]),f(typeof S.totalTokens=="number"?S.totalTokens:0)}catch(k){const S=k instanceof Error?k.message:"Unknown error fetching prompt context";v(S),u([]),f(0)}finally{g(!1)}},[]);return{contextSize:t,filesOnlyContextSize:r,formattedSize:i,formattedFilesSize:l,promptItems:a,totalTokens:d,loading:p,error:m,refreshPromptContext:w}},Mj=C.div`
998
+ position: absolute;
999
+ bottom: 100px;
1000
+ right: 30px;
1001
+ z-index: 1000;
1002
+ `,Bj=C.div`
1003
+ position: relative;
1004
+ display: inline-block;
1005
+ `,Uj=C(nr)`
1006
+ width: 50px;
1007
+ height: 50px;
1008
+ background-color: ${({theme:e})=>e.colors.primary};
1009
+ color: ${({theme:e})=>e.colors.buttonText||"#ffffff"};
1010
+ border: none;
1011
+ box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
1012
+
1013
+ &:hover {
1014
+ background-color: ${({theme:e})=>e.colors.primaryHover};
1015
+ }
1016
+
1017
+ ${({isActive:e,theme:t})=>e&&vt`
1018
+ background-color: ${t.colors.buttonHoverBg};
1019
+ border: 1px solid ${t.colors.primary};
1020
+ `}
1021
+ `,Vj=()=>{const{toggleContextManager:e,isContextManagerOpen:t,messages:r,executionStatus:i}=Hn(),{filesOnlyContextSize:l}=Xd(r),a=l?Bx(l):"small",u=l?ua(l).split(" ")[0]:"N/A";return i==="idle"?null:h.jsx(Mj,{children:h.jsxs(Bj,{children:[h.jsx(Uj,{onClick:e,"aria-label":"Toggle Context Manager",title:"Toggle Context Manager",isActive:t,children:h.jsx(Gx,{})}),l!==void 0&&h.jsx(Cj,{category:a,title:`Context size: ${ua(l)}`,children:u})]})})},Hj=C.div`
1022
+ position: fixed;
1023
+ top: 0;
1024
+ left: 0;
1025
+ right: 0;
1026
+ bottom: 0;
1027
+ background-color: rgba(0, 0, 0, 0.7);
1028
+ display: flex;
1029
+ justify-content: center;
1030
+ align-items: center;
1031
+ z-index: 1000;
1032
+ `,Wj=C.div`
1033
+ background-color: ${({theme:e})=>e.colors.background};
1034
+ color: ${({theme:e})=>e.colors.text};
1035
+ border-radius: 8px;
1036
+ width: 90%;
1037
+ max-width: 800px;
1038
+ max-height: 90vh;
1039
+ display: flex;
1040
+ flex-direction: column;
1041
+ box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
1042
+ border: 1px solid ${({theme:e})=>e.colors.border};
1043
+ `,qj=C.div`
1044
+ padding: 16px 24px;
1045
+ border-bottom: 1px solid ${({theme:e})=>e.colors.border};
1046
+ display: flex;
1047
+ justify-content: space-between;
1048
+ align-items: center;
1049
+
1050
+ h2 {
1051
+ margin: 0;
1052
+ font-size: 1.25rem;
1053
+ color: ${({theme:e})=>e.colors.primary};
1054
+ }
1055
+ `,Gj=C.button`
1056
+ background: none;
1057
+ border: none;
1058
+ color: ${({theme:e})=>e.colors.text};
1059
+ font-size: 1.5rem;
1060
+ cursor: pointer;
1061
+ padding: 0;
1062
+ line-height: 1;
1063
+
1064
+ &:hover {
1065
+ color: ${({theme:e})=>e.colors.primary};
1066
+ }
1067
+ `,Jj=C.div`
1068
+ padding: 24px;
1069
+ overflow-y: auto;
1070
+ flex-grow: 1;
1071
+ display: flex;
1072
+ flex-direction: column;
1073
+ gap: 20px;
1074
+ `,Kj=C.div`
1075
+ display: flex;
1076
+ justify-content: flex-end;
1077
+ gap: 12px;
1078
+ margin-top: 20px;
1079
+ padding-top: 20px;
1080
+ border-top: 1px solid ${({theme:e})=>e.colors.border};
1081
+ `,gg=C.button`
1082
+ padding: 8px 16px;
1083
+ border-radius: 4px;
1084
+ font-weight: 500;
1085
+ cursor: pointer;
1086
+ transition: all 0.2s;
1087
+ border: 1px solid transparent;
1088
+
1089
+ ${({variant:e,theme:t})=>{switch(e){case"primary":return`
1090
+ background-color: ${t.colors.primary};
1091
+ color: white;
1092
+ &:hover { background-color: ${t.colors.primaryHover||t.colors.primary}; opacity: 0.9; }
1093
+ &:disabled { background-color: ${t.colors.border}; cursor: not-allowed; }
1094
+ `;case"danger":return`
1095
+ background-color: ${t.colors.error||"#dc3545"};
1096
+ color: white;
1097
+ &:hover { opacity: 0.9; }
1098
+ `;default:return`
1099
+ background-color: transparent;
1100
+ border-color: ${t.colors.border};
1101
+ color: ${t.colors.text};
1102
+ &:hover { background-color: ${t.colors.backgroundAlt}; }
1103
+ `}}}
1104
+ `,Qj=C.div`
1105
+ background-color: ${({theme:e})=>e.colors.backgroundAlt};
1106
+ border-radius: 6px;
1107
+ padding: 16px;
1108
+ border: 1px solid ${({theme:e})=>e.colors.border};
1109
+ `,Yj=C.h3`
1110
+ margin: 0 0 12px 0;
1111
+ font-size: 1rem;
1112
+ color: ${({theme:e})=>e.colors.text};
1113
+ display: flex;
1114
+ justify-content: space-between;
1115
+ align-items: center;
1116
+ `,Xj=C.div`
1117
+ display: grid;
1118
+ grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
1119
+ gap: 16px;
1120
+ margin-bottom: 16px;
1121
+ `,yg=C.div`
1122
+ display: flex;
1123
+ flex-direction: column;
1124
+ gap: 4px;
1125
+
1126
+ span.label {
1127
+ font-size: 0.8rem;
1128
+ color: ${({theme:e})=>e.colors.textSecondary||"#888"};
1129
+ }
1130
+
1131
+ span.value {
1132
+ font-size: 1.1rem;
1133
+ font-weight: 600;
1134
+ color: ${({theme:e})=>e.colors.text};
1135
+ }
1136
+ `,Zj=C.div`
1137
+ display: flex;
1138
+ flex-direction: column;
1139
+ gap: 8px;
1140
+ max-height: 300px;
1141
+ overflow-y: auto;
1142
+ padding-right: 8px;
1143
+
1144
+ &::-webkit-scrollbar {
1145
+ width: 6px;
1146
+ }
1147
+
1148
+ &::-webkit-scrollbar-track {
1149
+ background: ${({theme:e})=>e.colors.background};
1150
+ }
1151
+
1152
+ &::-webkit-scrollbar-thumb {
1153
+ background: ${({theme:e})=>e.colors.border};
1154
+ border-radius: 3px;
1155
+ }
1156
+ `,e2=C.div`
1157
+ display: flex;
1158
+ flex-direction: column;
1159
+ padding: 8px 12px;
1160
+ background-color: ${({theme:e})=>e.colors.background};
1161
+ border-left: 3px solid
1162
+ ${({type:e,theme:t})=>e==="systemPrompt"?t.colors.warning||"#f0ad4e":e==="user"?t.colors.success||"#5cb85c":t.colors.primary};
1163
+ border-radius: 4px;
1164
+ font-size: 0.9rem;
1165
+ cursor: help;
1166
+ transition: background-color 0.2s;
1167
+
1168
+ &:hover {
1169
+ background-color: ${({theme:e})=>e.colors.backgroundAlt};
1170
+ }
1171
+ `,t2=C.div`
1172
+ display: flex;
1173
+ justify-content: space-between;
1174
+ align-items: center;
1175
+ margin-bottom: 4px;
1176
+ `,n2=C.span`
1177
+ font-weight: 600;
1178
+ text-transform: capitalize;
1179
+ min-width: 100px;
1180
+ `,r2=C.span`
1181
+ font-family: monospace;
1182
+ font-size: 0.8rem;
1183
+ opacity: 0.7;
1184
+ min-width: 60px;
1185
+ text-align: right;
1186
+ `,o2=C.div`
1187
+ font-size: 0.85rem;
1188
+ opacity: 0.8;
1189
+ white-space: nowrap;
1190
+ overflow: hidden;
1191
+ text-overflow: ellipsis;
1192
+ max-width: 100%;
1193
+ `,i2=C.div`
1194
+ height: 4px;
1195
+ background-color: ${({theme:e})=>e.colors.border};
1196
+ border-radius: 2px;
1197
+ overflow: hidden;
1198
+ margin-top: 20px;
1199
+
1200
+ &::after {
1201
+ content: '';
1202
+ display: block;
1203
+ height: 100%;
1204
+ width: ${({progress:e})=>e}%;
1205
+ background-color: ${({theme:e})=>e.colors.primary};
1206
+ transition: width 0.3s ease;
1207
+ }
1208
+ `,l2=C.div`
1209
+ padding: 12px;
1210
+ border-radius: 4px;
1211
+ margin-top: 16px;
1212
+ background-color: ${({type:e,theme:t})=>e==="success"?t.colors.successBg||"rgba(92, 184, 92, 0.1)":t.colors.errorBg||"rgba(220, 53, 69, 0.1)"};
1213
+ color: ${({type:e,theme:t})=>e==="success"?t.colors.success||"#5cb85c":t.colors.error||"#dc3545"};
1214
+ border: 1px solid
1215
+ ${({type:e,theme:t})=>e==="success"?t.colors.success||"#5cb85c":t.colors.error||"#dc3545"};
1216
+ `,s2=()=>{const{isCompressionModalOpen:e,toggleCompressionModal:t}=Hn(),[r,i]=$.useState(!1),[l,a]=$.useState(null),[u,d]=$.useState([]),[f,p]=$.useState(0),g=$.useCallback(async()=>{i(!0);try{const v=await OC();d(v.preview),p(v.totalTokens)}catch(v){console.error("Failed to get context preview:",v)}finally{i(!1)}},[]);$.useEffect(()=>{e&&(g(),a(null))},[e,g]);const m=async()=>{i(!0),a(null);try{const v=await DC();a({success:!0,message:`Compression successful! Reduced context by ${v.savedTokens||"unknown"} tokens.`}),g()}catch(v){a({success:!1,message:v instanceof Error?v.message:"Compression failed"})}finally{i(!1)}};return e?h.jsx(Hj,{onClick:t,children:h.jsxs(Wj,{onClick:v=>v.stopPropagation(),children:[h.jsxs(qj,{children:[h.jsx("h2",{children:"Context Compression Tool"}),h.jsx(Gj,{onClick:t,children:"×"})]}),h.jsxs(Jj,{children:[h.jsx("p",{children:"This tool analyzes the current conversation context and compresses it to save tokens while preserving essential information. It will summarize past interactions and remove redundant data."}),h.jsxs(Qj,{children:[h.jsxs(Yj,{children:["Context Preview",h.jsx("span",{style:{fontSize:"0.8rem",fontWeight:"normal",opacity:.7},children:"(Actual breakdown)"})]}),h.jsxs(Xj,{children:[h.jsxs(yg,{children:[h.jsx("span",{className:"label",children:"Total Items"}),h.jsx("span",{className:"value",children:u.length})]}),h.jsxs(yg,{children:[h.jsx("span",{className:"label",children:"Total Tokens"}),h.jsx("span",{className:"value",children:f.toLocaleString()})]})]}),h.jsx(Zj,{children:u.map((v,w)=>h.jsxs(e2,{type:v.type,title:v.summary,children:[h.jsxs(t2,{children:[h.jsx(n2,{children:v.type==="systemPrompt"?"System":v.type}),h.jsxs(r2,{children:[v.tokenCount,"t"]})]}),h.jsx(o2,{children:v.summary})]},w))})]}),r&&h.jsx(i2,{progress:100,className:"animate-pulse"}),l&&h.jsx(l2,{type:l.success?"success":"error",children:l.message}),h.jsxs(Kj,{children:[h.jsx(gg,{onClick:t,disabled:r,children:"Close"}),h.jsx(gg,{variant:"primary",onClick:m,disabled:r,children:r?"Compressing...":"Compress Context"})]})]})]})}):null},a2=C.button`
1217
+ position: absolute;
1218
+ bottom: 160px; /* Positioned above the context manager button (which is at ~90px) */
1219
+ right: 30px;
1220
+ width: 48px;
1221
+ height: 48px;
1222
+ border-radius: 50%;
1223
+ background-color: ${({theme:e})=>e.colors.background};
1224
+ border: 1px solid ${({theme:e})=>e.colors.border};
1225
+ color: ${({theme:e})=>e.colors.text};
1226
+ display: flex;
1227
+ justify-content: center;
1228
+ align-items: center;
1229
+ cursor: pointer;
1230
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
1231
+ z-index: 95;
1232
+ font-size: 1.5rem;
1233
+ transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
1234
+
1235
+ &:hover {
1236
+ transform: scale(1.1);
1237
+ background-color: ${({theme:e})=>e.colors.primary};
1238
+ color: white;
1239
+ border-color: ${({theme:e})=>e.colors.primary};
1240
+ box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
1241
+ }
1242
+
1243
+ &:active {
1244
+ transform: scale(0.95);
1245
+ }
1246
+
1247
+ @media (max-width: 768px) {
1248
+ bottom: 140px;
1249
+ right: 16px;
1250
+ width: 42px;
1251
+ height: 42px;
1252
+ font-size: 1.2rem;
1253
+ }
1254
+ `,u2=C.div`
1255
+ position: absolute;
1256
+ top: -8px;
1257
+ right: -8px;
1258
+ background-color: ${({theme:e})=>e.colors.primary};
1259
+ color: white;
1260
+ border-radius: 12px;
1261
+ min-width: 32px;
1262
+ height: 24px;
1263
+ padding: 0 8px;
1264
+ font-size: 11px;
1265
+ font-weight: 600;
1266
+ line-height: 24px;
1267
+ text-align: center;
1268
+ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
1269
+ pointer-events: none;
1270
+ font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
1271
+ letter-spacing: 0.3px;
1272
+
1273
+ @media (max-width: 768px) {
1274
+ font-size: 10px;
1275
+ min-width: 28px;
1276
+ height: 20px;
1277
+ line-height: 20px;
1278
+ padding: 0 6px;
1279
+ }
1280
+ `,c2=()=>{const{toggleCompressionModal:e,messages:t,executionStatus:r}=Hn(),{contextSize:i}=Xd(t);return r==="idle"?null:h.jsxs(a2,{onClick:e,title:`Compress Context${i?` (${mg(i)} tokens)`:""}`,"aria-label":"Open Context Compression Tool",children:["📉",i!==void 0&&i>0&&h.jsx(u2,{children:mg(i)})]})},d2="https://github.com/gtanczyk/genaicode/issues",f2=({themeToggle:e,chatInterface:t,inputArea:r,usage:i,toggleTheme:l})=>{const[a,u]=$.useState(!1),{toggleContextManager:d}=Hn(),f=[{content:h.jsx(zE,{}),ariaLabel:"Service Configuration",key:"service-config",onClick:zx},{content:h.jsx(eE,{}),ariaLabel:"Health Check",key:"health-check",onClick:Rx},{content:h.jsx(BC,{}),ariaLabel:"Content Generation",key:"content-gen",onClick:Ix},{content:h.jsx(Gx,{}),ariaLabel:"Manage Context",key:"manage-context",onClick:d},{content:h.jsx(aj,{}),ariaLabel:"Genaicode Config",key:"genaicode-config",onClick:Dx},{content:e,ariaLabel:"Theme Toggle",key:"theme-toggle",onClick:l},{content:h.jsx(KE,{}),ariaLabel:"Information",key:"info",onClick:Ox},{content:h.jsx(nr,{children:"🐛"}),ariaLabel:"Report Bug",key:"report-bug",onClick:()=>window.open(d2,"_blank","noopener,noreferrer")}];return h.jsxs(p2,{children:[h.jsxs(h2,{children:[h.jsx(m2,{children:h.jsxs(g2,{children:[h.jsx(y2,{children:"GenAIcode"}),h.jsxs(x2,{children:["v",cj]})]})}),h.jsxs(v2,{children:[h.jsx(w2,{children:h.jsx(Bb,{usage:i})}),h.jsx(k2,{children:h.jsx(qE,{menuItems:f,isOpen:a,onToggle:()=>u(!a),buttonAriaLabel:"Toggle navigation menu",menuAriaLabel:"Navigation menu",position:{top:"100%",right:0}})})]})]}),h.jsxs(b2,{children:[h.jsx(S2,{children:t}),h.jsx(C2,{children:r}),h.jsx(yj,{}),h.jsx(c2,{}),h.jsx(Vj,{}),h.jsx(Fj,{}),h.jsx(s2,{})]})]})},p2=C.div`
1281
+ display: flex;
1282
+ flex-direction: column;
1283
+ height: 100vh;
1284
+ max-width: 1200px;
1285
+ margin: 0 auto;
1286
+ padding: 0 10px;
1287
+ `,h2=C.header`
1288
+ position: relative;
1289
+ display: flex;
1290
+ justify-content: space-between;
1291
+ align-items: center;
1292
+ padding: 10px 0;
1293
+ flex-wrap: nowrap;
1294
+ gap: 10px;
1295
+ `,m2=C.div`
1296
+ display: flex;
1297
+ align-items: center;
1298
+ gap: 10px;
1299
+ `,g2=C.div`
1300
+ position: relative;
1301
+ `,y2=C.h1`
1302
+ text-transform: uppercase;
1303
+ font-family: 'Press Start 2P', system-ui;
1304
+ color: ${({theme:e})=>e.colors.primary};
1305
+ margin: 0;
1306
+ font-size: clamp(0.6rem, 2.5vw, 1.5rem);
1307
+ white-space: nowrap;
1308
+ overflow: hidden;
1309
+ text-overflow: ellipsis;
1310
+ `,x2=C.span`
1311
+ position: absolute;
1312
+ bottom: 0;
1313
+ right: 0;
1314
+ font-size: 0.6rem;
1315
+ color: ${({theme:e})=>e.colors.text};
1316
+ background-color: ${({theme:e})=>e.colors.backgroundAlt};
1317
+ padding: 2px 4px;
1318
+ border-radius: 3px;
1319
+ transform: translateY(100%);
1320
+ white-space: nowrap;
1321
+ `,v2=C.div`
1322
+ display: flex;
1323
+ align-items: center;
1324
+ gap: 16px;
1325
+ flex-wrap: nowrap;
1326
+ flex-shrink: 0;
1327
+
1328
+ @media (max-width: 576px) {
1329
+ gap: 8px;
1330
+ }
1331
+ `,w2=C.div`
1332
+ flex-shrink: 1;
1333
+ min-width: 0;
1334
+ `,k2=C.div`
1335
+ display: flex;
1336
+ align-items: center;
1337
+
1338
+ @media (max-width: 576px) {
1339
+ position: relative;
1340
+ }
1341
+ `,b2=C.main`
1342
+ display: flex;
1343
+ flex-direction: column;
1344
+ flex-grow: 1;
1345
+ min-height: 0;
1346
+ position: relative;
1347
+ z-index: 1;
1348
+ `,S2=C.div`
1349
+ flex-grow: 1;
1350
+ overflow: hidden;
1351
+ margin-bottom: 20px;
1352
+ `,C2=C.div`
1353
+ flex-shrink: 0;
1354
+ `,E2=({codegenOptions:e})=>{const{setCurrentPrompt:t,setExecutionStatus:r,setCurrentQuestion:i,setCodegenOptions:l,handlePauseExecution:a,handleResumeExecution:u}=$.useContext(ri),d=async(w,k)=>{t(w),r("executing");try{if(await yd()==="executing"){console.warn("Execution is already executing"),r("executing");return}if(!e){console.error("Codegen options not available"),r("idle");return}await bC(w,e,k.length>0?k:void 0),l({...e,initialActionType:void 0}),r("executing")}catch(S){console.error("Failed to execute codegen:",S),r("idle")}},f=async(w,k,S,j,E,P)=>{const N=await xd();if(N)try{if(i(null),e){const _={...e,aiService:j??e.aiService};l(_),await jC(N.id,w,S,_,k,E,P)}else console.error("Codegen options not available for submitting answer")}catch(_){console.error("Failed to submit answer:",_),i(N)}},p=async()=>{try{i(null),await SC()}catch(w){console.error("Failed to interrupt execution:",w)}},g=$.useCallback(w=>{l(w)},[l]);return{handleExecute:d,handleQuestionSubmit:f,handleInterrupt:p,handleOptionsChange:g,handlePauseExecution:a,handleResumeExecution:u}};function J(){return J=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var i in r)({}).hasOwnProperty.call(r,i)&&(e[i]=r[i])}return e},J.apply(null,arguments)}function Fe(e,t){if(e==null)return{};var r={};for(var i in e)if({}.hasOwnProperty.call(e,i)){if(t.indexOf(i)!==-1)continue;r[i]=e[i]}return r}var Jx={},Kx=$.createContext(Jx),j2=(e,t)=>J({},e,t),T2=()=>$.useContext(Kx),Zd=$.createContext(()=>{});Zd.displayName="JVR.DispatchShowTools";function $2(){return $.useReducer(j2,Jx)}function Qx(){return $.useContext(Zd)}var Yx=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(Kx.Provider,{value:t,children:h.jsx(Zd.Provider,{value:r,children:i})})};Yx.displayName="JVR.ShowTools";var Xx={},Zx=$.createContext(Xx),I2=(e,t)=>J({},e,t),Ia=()=>$.useContext(Zx),ef=$.createContext(()=>{});ef.displayName="JVR.DispatchExpands";function R2(){return $.useReducer(I2,Xx)}function P2(){return $.useContext(ef)}var ev=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(Zx.Provider,{value:t,children:h.jsx(ef.Provider,{value:r,children:i})})};ev.displayName="JVR.Expands";var tv={Str:{as:"span","data-type":"string",style:{color:"var(--w-rjv-type-string-color, #cb4b16)"},className:"w-rjv-type",children:"string"},Url:{as:"a",style:{color:"var(--w-rjv-type-url-color, #0969da)"},"data-type":"url",className:"w-rjv-type",children:"url"},Undefined:{style:{color:"var(--w-rjv-type-undefined-color, #586e75)"},as:"span","data-type":"undefined",className:"w-rjv-type",children:"undefined"},Null:{style:{color:"var(--w-rjv-type-null-color, #d33682)"},as:"span","data-type":"null",className:"w-rjv-type",children:"null"},Map:{style:{color:"var(--w-rjv-type-map-color, #268bd2)",marginRight:3},as:"span","data-type":"map",className:"w-rjv-type",children:"Map"},Nan:{style:{color:"var(--w-rjv-type-nan-color, #859900)"},as:"span","data-type":"nan",className:"w-rjv-type",children:"NaN"},Bigint:{style:{color:"var(--w-rjv-type-bigint-color, #268bd2)"},as:"span","data-type":"bigint",className:"w-rjv-type",children:"bigint"},Int:{style:{color:"var(--w-rjv-type-int-color, #268bd2)"},as:"span","data-type":"int",className:"w-rjv-type",children:"int"},Set:{style:{color:"var(--w-rjv-type-set-color, #268bd2)",marginRight:3},as:"span","data-type":"set",className:"w-rjv-type",children:"Set"},Float:{style:{color:"var(--w-rjv-type-float-color, #859900)"},as:"span","data-type":"float",className:"w-rjv-type",children:"float"},True:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},False:{style:{color:"var(--w-rjv-type-boolean-color, #2aa198)"},as:"span","data-type":"bool",className:"w-rjv-type",children:"bool"},Date:{style:{color:"var(--w-rjv-type-date-color, #268bd2)"},as:"span","data-type":"date",className:"w-rjv-type",children:"date"}},nv=$.createContext(tv),N2=(e,t)=>J({},e,t),Ye=()=>$.useContext(nv),tf=$.createContext(()=>{});tf.displayName="JVR.DispatchTypes";function A2(){return $.useReducer(N2,tv)}function L2(){return $.useContext(tf)}function rv(e){var{initial:t,dispatch:r,children:i}=e;return h.jsx(nv.Provider,{value:t,children:h.jsx(tf.Provider,{value:r,children:i})})}rv.displayName="JVR.Types";var z2=["style"];function ov(e){var{style:t}=e,r=Fe(e,z2),i=J({cursor:"pointer",height:"1em",width:"1em",userSelect:"none",display:"inline-flex"},t);return h.jsx("svg",J({viewBox:"0 0 24 24",fill:"var(--w-rjv-arrow-color, currentColor)",style:i},r,{children:h.jsx("path",{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"})}))}ov.displayName="JVR.TriangleArrow";var iv={Arrow:{as:"span",className:"w-rjv-arrow",style:{transform:"rotate(0deg)",transition:"all 0.3s"},children:h.jsx(ov,{})},Colon:{as:"span",style:{color:"var(--w-rjv-colon-color, var(--w-rjv-color))",marginLeft:0,marginRight:2},className:"w-rjv-colon",children:":"},Quote:{as:"span",style:{color:"var(--w-rjv-quotes-color, #236a7c)"},className:"w-rjv-quotes",children:'"'},ValueQuote:{as:"span",style:{color:"var(--w-rjv-quotes-string-color, #cb4b16)"},className:"w-rjv-quotes",children:'"'},BracketsLeft:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-start",children:"["},BracketsRight:{as:"span",style:{color:"var(--w-rjv-brackets-color, #236a7c)"},className:"w-rjv-brackets-end",children:"]"},BraceLeft:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-start",children:"{"},BraceRight:{as:"span",style:{color:"var(--w-rjv-curlybraces-color, #236a7c)"},className:"w-rjv-curlybraces-end",children:"}"}},lv=$.createContext(iv),F2=(e,t)=>J({},e,t),Yt=()=>$.useContext(lv),nf=$.createContext(()=>{});nf.displayName="JVR.DispatchSymbols";function _2(){return $.useReducer(F2,iv)}function O2(){return $.useContext(nf)}var sv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(lv.Provider,{value:t,children:h.jsx(nf.Provider,{value:r,children:i})})};sv.displayName="JVR.Symbols";var av={Copied:{className:"w-rjv-copied",style:{height:"1em",width:"1em",cursor:"pointer",verticalAlign:"middle",marginLeft:5}},CountInfo:{as:"span",className:"w-rjv-object-size",style:{color:"var(--w-rjv-info-color, #0000004d)",paddingLeft:8,fontStyle:"italic"}},CountInfoExtra:{as:"span",className:"w-rjv-object-extra",style:{paddingLeft:8}},Ellipsis:{as:"span",style:{cursor:"pointer",color:"var(--w-rjv-ellipsis-color, #cb4b16)",userSelect:"none"},className:"w-rjv-ellipsis",children:"..."},Row:{as:"div",className:"w-rjv-line"},KeyName:{as:"span",className:"w-rjv-object-key"}},uv=$.createContext(av),D2=(e,t)=>J({},e,t),kn=()=>$.useContext(uv),rf=$.createContext(()=>{});rf.displayName="JVR.DispatchSection";function M2(){return $.useReducer(D2,av)}function B2(){return $.useContext(rf)}var cv=e=>{var{initial:t,dispatch:r,children:i}=e;return h.jsx(uv.Provider,{value:t,children:h.jsx(rf.Provider,{value:r,children:i})})};cv.displayName="JVR.Section";var dv={objectSortKeys:!1,indentWidth:15},of=$.createContext(dv);of.displayName="JVR.Context";var fv=$.createContext(()=>{});fv.displayName="JVR.DispatchContext";function U2(e,t){return J({},e,t)}var uo=()=>$.useContext(of),pv=e=>{var{children:t,initialState:r,initialTypes:i}=e,[l,a]=$.useReducer(U2,Object.assign({},dv,r)),[u,d]=$2(),[f,p]=R2(),[g,m]=A2(),[v,w]=_2(),[k,S]=M2();return $.useEffect(()=>a(J({},r)),[r]),h.jsx(of.Provider,{value:l,children:h.jsx(fv.Provider,{value:a,children:h.jsx(Yx,{initial:u,dispatch:d,children:h.jsx(ev,{initial:f,dispatch:p,children:h.jsx(rv,{initial:J({},g,i),dispatch:m,children:h.jsx(sv,{initial:v,dispatch:w,children:h.jsx(cv,{initial:k,dispatch:S,children:t})})})})})})})};pv.displayName="JVR.Provider";function V2(e){if(e==null)throw new TypeError("Cannot destructure "+e)}var H2=["isNumber","value","parentValue","keyName","keys"],W2=["as","render"],q2=["as","render"],G2=["as","render"],J2=["as","style","render"],K2=["as","render"],Q2=["as","render"],Y2=["as","render"],X2=["as","render"],wd=e=>{var{Quote:t={}}=Yt(),{isNumber:r,value:i,parentValue:l,keyName:a,keys:u}=e,d=Fe(e,H2);if(r)return null;var{as:f,render:p}=t,g=Fe(t,W2),m=f||"span",v=J({},d,g),w={value:i,parentValue:l,keyName:a,keys:u||(a?[a]:[])},k=p&&typeof p=="function"&&p(v,w);return k||h.jsx(m,J({},v))};wd.displayName="JVR.Quote";var ul=e=>{var{ValueQuote:t={}}=Yt(),r=J({},(V2(e),e)),{as:i,render:l}=t,a=Fe(t,q2),u=i||"span",d=J({},r,a),f=l&&typeof l=="function"&&l(d,{});return f||h.jsx(u,J({},d))};ul.displayName="JVR.ValueQuote";var hv=e=>{var{value:t,parentValue:r,keyName:i,keys:l}=e,{Colon:a={}}=Yt(),{as:u,render:d}=a,f=Fe(a,G2),p=u||"span",g=d&&typeof d=="function"&&d(f,{value:t,parentValue:r,keyName:i,keys:l||(i?[i]:[])});return g||h.jsx(p,J({},f))};hv.displayName="JVR.Colon";var mv=e=>{var{Arrow:t={}}=Yt(),r=Ia(),{expandKey:i,style:l,value:a,parentValue:u,keyName:d,keys:f}=e,p=!!r[i],{as:g,style:m,render:v}=t,w=Fe(t,J2),k=g||"span",S=v&&typeof v=="function",j=J({},w,{"data-expanded":p,style:J({},m,l)}),E={value:a,parentValue:u,keyName:d,keys:f||(d?[d]:[])},P=S&&v(j,E);return P||h.jsx(k,J({},w,{style:J({},m,l)}))};mv.displayName="JVR.Arrow";var gv=e=>{var{isBrackets:t,value:r,parentValue:i,keyName:l,keys:a}=e,{BracketsLeft:u={},BraceLeft:d={}}=Yt(),f={value:r,parentValue:i,keyName:l,keys:a||(l?[l]:[])};if(t){var{as:p,render:g}=u,m=Fe(u,K2),v=p||"span",w=g&&typeof g=="function"&&g(m,f);return w||h.jsx(v,J({},m))}var{as:k,render:S}=d,j=Fe(d,Q2),E=k||"span",P=S&&typeof S=="function"&&S(j,f);return P||h.jsx(E,J({},j))};gv.displayName="JVR.BracketsOpen";var lf=e=>{var{isBrackets:t,isVisiable:r,value:i,parentValue:l,keyName:a,keys:u}=e,d={value:i,parentValue:l,keyName:a,keys:u||(a?[a]:[])};if(!r)return null;var{BracketsRight:f={},BraceRight:p={}}=Yt();if(t){var{as:g,render:m}=f,v=Fe(f,Y2),w=g||"span",k=m&&typeof m=="function"&&m(v,d);return k||h.jsx(w,J({},v))}var{as:S,render:j}=p,E=Fe(p,X2),P=S||"span",N=j&&typeof j=="function"&&j(E,d);return N||h.jsx(P,J({},E))};lf.displayName="JVR.BracketsClose";var yv=e=>{var t,{value:r,expandKey:i,level:l,keys:a=[]}=e,u=Ia(),d=Array.isArray(r),{collapsed:f,shouldExpandNodeInitially:p}=uo(),g=r instanceof Set,m=typeof f=="boolean"?f:typeof f=="number"?l>f:!1,v=(t=u[i])!=null?t:m,w=Object.keys(r).length;if(u[i]===void 0&&p&&p(v,{value:r,keys:a,level:l})||v||w===0)return null;var k={paddingLeft:4};return h.jsx("div",{style:k,children:h.jsx(lf,{isBrackets:d||g,isVisiable:!0})})};yv.displayName="JVR.NestedClose";var Z2=["as","render"],eT=["as","render"],tT=["as","render"],nT=["as","render"],rT=["as","render"],oT=["as","render"],iT=["as","render"],lT=["as","render"],sT=["as","render"],aT=["as","render"],uT=["as","render"],cT=["as","render"],dT=["as","render"],kd=e=>{if(e===void 0)return"0n";if(typeof e=="string")try{e=BigInt(e)}catch{return"0n"}return e?e.toString()+"n":"0n"},xv=e=>{var{value:t,keyName:r}=e,{Set:i={},displayDataTypes:l}=Ye(),a=t instanceof Set;if(!a||!l)return null;var{as:u,render:d}=i,f=Fe(i,Z2),p=d&&typeof d=="function",g=p&&d(f,{type:"type",value:t,keyName:r});if(g)return g;var m=u||"span";return h.jsx(m,J({},f))};xv.displayName="JVR.SetComp";var vv=e=>{var{value:t,keyName:r}=e,{Map:i={},displayDataTypes:l}=Ye(),a=t instanceof Map;if(!a||!l)return null;var{as:u,render:d}=i,f=Fe(i,eT),p=d&&typeof d=="function",g=p&&d(f,{type:"type",value:t,keyName:r});if(g)return g;var m=u||"span";return h.jsx(m,J({},f))};vv.displayName="JVR.MapComp";var Nn={opacity:.75,paddingRight:4},wv=e=>{var{children:t="",keyName:r}=e,{Str:i={},displayDataTypes:l}=Ye(),{shortenTextAfterLength:a=30}=uo(),{as:u,render:d}=i,f=Fe(i,tT),p=t,[g,m]=$.useState(a&&p.length>a);$.useEffect(()=>m(a&&p.length>a),[a]);var v=u||"span",w=J({},Nn,i.style||{});a>0&&(f.style=J({},f.style,{cursor:p.length<=a?"initial":"pointer"}),p.length>a&&(f.onClick=()=>{m(!g)}));var k=g?p.slice(0,a)+"...":p,S=d&&typeof d=="function",j=S&&d(J({},f,{style:w}),{type:"type",value:t,keyName:r}),E=S&&d(J({},f,{children:k,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(j||h.jsx(v,J({},f,{style:w}))),E||h.jsxs($.Fragment,{children:[h.jsx(ul,{}),h.jsx(v,J({},f,{className:"w-rjv-value",children:k})),h.jsx(ul,{})]})]})};wv.displayName="JVR.TypeString";var kv=e=>{var{children:t,keyName:r}=e,{True:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,nT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};kv.displayName="JVR.TypeTrue";var bv=e=>{var{children:t,keyName:r}=e,{False:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,rT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};bv.displayName="JVR.TypeFalse";var Sv=e=>{var{children:t,keyName:r}=e,{Float:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,oT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Sv.displayName="JVR.TypeFloat";var Cv=e=>{var{children:t,keyName:r}=e,{Int:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,iT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:t==null?void 0:t.toString()}))]})};Cv.displayName="JVR.TypeInt";var Ev=e=>{var{children:t,keyName:r}=e,{Bigint:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,lT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsx(f,J({},d,{className:"w-rjv-value",children:kd(t==null?void 0:t.toString())}))]})};Ev.displayName="JVR.TypeFloat";var jv=e=>{var{children:t,keyName:r}=e,{Url:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,sT),f=a||"span",p=J({},Nn,i.style),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t==null?void 0:t.href,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v||h.jsxs("a",J({href:t==null?void 0:t.href,target:"_blank"},d,{className:"w-rjv-value",children:[h.jsx(ul,{}),t==null?void 0:t.href,h.jsx(ul,{})]}))]})};jv.displayName="JVR.TypeUrl";var Tv=e=>{var{children:t,keyName:r}=e,{Date:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,aT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=t instanceof Date?t.toLocaleString():t,w=g&&u(J({},d,{children:v,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),w||h.jsx(f,J({},d,{className:"w-rjv-value",children:v}))]})};Tv.displayName="JVR.TypeDate";var $v=e=>{var{children:t,keyName:r}=e,{Undefined:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,uT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v]})};$v.displayName="JVR.TypeUndefined";var Iv=e=>{var{children:t,keyName:r}=e,{Null:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,cT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t,className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v]})};Iv.displayName="JVR.TypeNull";var Rv=e=>{var{children:t,keyName:r}=e,{Nan:i={},displayDataTypes:l}=Ye(),{as:a,render:u}=i,d=Fe(i,dT),f=a||"span",p=J({},Nn,i.style||{}),g=u&&typeof u=="function",m=g&&u(J({},d,{style:p}),{type:"type",value:t,keyName:r}),v=g&&u(J({},d,{children:t==null?void 0:t.toString(),className:"w-rjv-value"}),{type:"value",value:t,keyName:r});return h.jsxs($.Fragment,{children:[l&&(m||h.jsx(f,J({},d,{style:p}))),v]})};Rv.displayName="JVR.TypeNan";var fT=e=>Number(e)===e&&e%1!==0||isNaN(e),Pv=e=>{var{value:t,keyName:r}=e,i={keyName:r};return t instanceof URL?h.jsx(jv,J({},i,{children:t})):typeof t=="string"?h.jsx(wv,J({},i,{children:t})):t===!0?h.jsx(kv,J({},i,{children:t})):t===!1?h.jsx(bv,J({},i,{children:t})):t===null?h.jsx(Iv,J({},i,{children:t})):t===void 0?h.jsx($v,J({},i,{children:t})):t instanceof Date?h.jsx(Tv,J({},i,{children:t})):typeof t=="number"&&isNaN(t)?h.jsx(Rv,J({},i,{children:t})):typeof t=="number"&&fT(t)?h.jsx(Sv,J({},i,{children:t})):typeof t=="bigint"?h.jsx(Ev,J({},i,{children:t})):typeof t=="number"?h.jsx(Cv,J({},i,{children:t})):null};Pv.displayName="JVR.Value";function Pr(e,t,r){var i=O2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});$.useEffect(()=>i({[r]:a}),[t])}function dn(e,t,r){var i=L2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});$.useEffect(()=>i({[r]:a}),[t])}function oi(e,t,r){var i=B2(),l=[e.className,t.className].filter(Boolean).join(" "),a=J({},e,t,{className:l,style:J({},e.style,t.style),children:t.children||e.children});$.useEffect(()=>i({[r]:a}),[t])}var pT=["as","render"],Nv=e=>{var{KeyName:t={}}=kn();return oi(t,e,"KeyName"),null};Nv.displayName="JVR.KeyName";var Av=e=>{var{children:t,value:r,parentValue:i,keyName:l,keys:a}=e,u=typeof t=="number",d={color:u?"var(--w-rjv-key-number, #268bd2)":"var(--w-rjv-key-string, #002b36)"},{KeyName:f={}}=kn(),{as:p,render:g}=f,m=Fe(f,pT);m.style=J({},m.style,d);var v=p||"span",w=g&&typeof g=="function"&&g(J({},m,{children:t}),{value:r,parentValue:i,keyName:l,keys:a||(l?[l]:[])});return w||h.jsx(v,J({},m,{children:t}))};Av.displayName="JVR.KeyNameComp";var hT=["children","value","parentValue","keyName","keys"],mT=["as","render","children"],Lv=e=>{var{Row:t={}}=kn();return oi(t,e,"Row"),null};Lv.displayName="JVR.Row";var zv=e=>{var{children:t,value:r,parentValue:i,keyName:l,keys:a}=e,u=Fe(e,hT),{Row:d={}}=kn(),{as:f,render:p}=d,g=Fe(d,mT),m=f||"div",v=p&&typeof p=="function"&&p(J({},u,g,{children:t}),{value:r,keyName:l,parentValue:i,keys:a});return v||h.jsx(m,J({},u,g,{children:t}))};zv.displayName="JVR.RowComp";function gT(e){var t=$.useRef();return $.useEffect(()=>{t.current=e}),t.current}function yT(e){var{value:t,highlightUpdates:r,highlightContainer:i}=e,l=gT(t),a=$.useMemo(()=>{if(!r||l===void 0)return!1;if(typeof t!=typeof l)return!0;if(typeof t=="number")return isNaN(t)&&isNaN(l)?!1:t!==l;if(Array.isArray(t)!==Array.isArray(l))return!0;if(typeof t=="object"||typeof t=="function")return!1;if(t!==l)return!0},[r,t]);$.useEffect(()=>{i&&i.current&&a&&"animate"in i.current&&i.current.animate([{backgroundColor:"var(--w-rjv-update-color, #ebcb8b)"},{backgroundColor:""}],{duration:1e3,easing:"ease-in"})},[a,t,i])}var xT=["keyName","value","parentValue","expandKey","keys"],vT=["as","render"],sf=e=>{var{keyName:t,value:r,parentValue:i,expandKey:l,keys:a}=e,u=Fe(e,xT),{onCopied:d,enableClipboard:f}=uo(),p=T2(),g=p[l],[m,v]=$.useState(!1),{Copied:w={}}=kn();if(f===!1||!g)return null;var k=q=>{q.stopPropagation();var A="";typeof r=="number"&&r===1/0?A="Infinity":typeof r=="number"&&isNaN(r)?A="NaN":typeof r=="bigint"?A=kd(r):r instanceof Date?A=r.toLocaleString():A=JSON.stringify(r,(K,te)=>typeof te=="bigint"?kd(te):te,2),d&&d(A,r),v(!0);var H=navigator.clipboard||{writeText(K){return new Promise((te,O)=>{var Z=document.createElement("textarea");Z.style.position="absolute",Z.style.opacity="0",Z.style.left="-99999999px",Z.value=K,document.body.appendChild(Z),Z.select(),document.execCommand("copy")?te():O(),Z.remove()})}};H.writeText(A).then(()=>{var K=setTimeout(()=>{v(!1),clearTimeout(K)},3e3)}).catch(K=>{})},S={style:{display:"inline-flex"},fill:m?"var(--w-rjv-copied-success-color, #28a745)":"var(--w-rjv-copied-color, currentColor)",onClick:k},{render:j}=w,E=Fe(w,vT),P=J({},E,u,S,{style:J({},E.style,u.style,S.style)}),N=j&&typeof j=="function",_=N&&j(J({},P,{"data-copied":m}),{value:r,keyName:t,keys:a,parentValue:i});return _||(m?h.jsx("svg",J({viewBox:"0 0 32 36"},P,{children:h.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,15.2249049 C29.1403264,13.8627542 29.9736597,13.1778155 30,13.1700887 C30,11.9705278 30,10.0804982 30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,26.1114493 L27.5,28.4926435 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M28.5589286,16 L32,19.6 L21.0160714,30.5382252 L13.5303571,24.2571429 L17.1303571,20.6571429 L21.0160714,24.5428571 L28.5589286,16 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})):h.jsx("svg",J({viewBox:"0 0 32 36"},P,{children:h.jsx("path",{d:"M27.5,33 L2.5,33 L2.5,12.5 L27.5,12.5 L27.5,20 L30,20 L30,7.5 C30,6.1 28.9,5 27.5,5 L20,5 C20,2.2 17.8,0 15,0 C12.2,0 10,2.2 10,5 L2.5,5 C1.1,5 0,6.1 0,7.5 L0,33 C0,34.4 1.1,36 2.5,36 L27.5,36 C28.9,36 30,34.4 30,33 L30,29 L27.5,29 L27.5,33 Z M7.5,7.5 L10,7.5 C10,7.5 12.5,6.4 12.5,5 C12.5,3.6 13.6,2.5 15,2.5 C16.4,2.5 17.5,3.6 17.5,5 C17.5,6.4 18.8,7.5 20,7.5 L22.5,7.5 C22.5,7.5 25,8.6 25,10 L5,10 C5,8.5 6.1,7.5 7.5,7.5 Z M5,27.5 L10,27.5 L10,25 L5,25 L5,27.5 Z M22.5,21.5 L22.5,16.5 L12.5,24 L22.5,31.5 L22.5,26.5 L32,26.5 L32,21.5 L22.5,21.5 Z M17.5,15 L5,15 L5,17.5 L17.5,17.5 L17.5,15 Z M10,20 L5,20 L5,22.5 L10,22.5 L10,20 Z"})})))};sf.displayName="JVR.Copied";function Fv(){var e=$.useRef(null);return e.current===null&&(e.current="custom-id-"+Math.random().toString(36).substr(2,9)),e.current}var _v=e=>{var t,{value:r,expandKey:i="",level:l,keys:a=[]}=e,u=Ia(),{objectSortKeys:d,indentWidth:f,collapsed:p,shouldExpandNodeInitially:g}=uo(),m=Array.isArray(r),v=typeof p=="boolean"?p:typeof p=="number"?l>p:!1,w=(t=u[i])!=null?t:v;if(u[i]===void 0&&g&&g(w,{value:r,keys:a,level:l})||w)return null;var k=m?Object.entries(r).map(j=>[Number(j[0]),j[1]]):Object.entries(r);d&&(k=d===!0?k.sort((j,E)=>{var[P]=j,[N]=E;return typeof P=="string"&&typeof N=="string"?P.localeCompare(N):0}):k.sort((j,E)=>{var[P,N]=j,[_,q]=E;return typeof P=="string"&&typeof _=="string"?d(P,_,N,q):0}));var S={borderLeft:"var(--w-rjv-border-left-width, 1px) var(--w-rjv-line-style, solid) var(--w-rjv-line-color, #ebebeb)",paddingLeft:f,marginLeft:6};return h.jsx("div",{className:"w-rjv-wrap",style:S,children:k.map((j,E)=>{var[P,N]=j;return h.jsx(Ov,{parentValue:r,keyName:P,keys:[...a,P],value:N,level:l},E)})})};_v.displayName="JVR.KeyValues";var af=e=>{var{keyName:t,parentValue:r,keys:i,value:l}=e,{highlightUpdates:a}=uo(),u=typeof t=="number",d=$.useRef(null);yT({value:l,highlightUpdates:a,highlightContainer:d});var f={keyName:t,value:l,keys:i,parentValue:r};return h.jsxs($.Fragment,{children:[h.jsxs("span",{ref:d,children:[h.jsx(wd,J({isNumber:u,"data-placement":"left"},f)),h.jsx(Av,J({},f,{children:t})),h.jsx(wd,J({isNumber:u,"data-placement":"right"},f))]}),h.jsx(hv,J({},f))]})};af.displayName="JVR.KayName";var Ov=e=>{var{keyName:t,value:r,parentValue:i,level:l=0,keys:a=[]}=e,u=Qx(),d=Fv(),f=Array.isArray(r),p=r instanceof Set,g=r instanceof Map,m=r instanceof Date,v=r instanceof URL,w=r&&typeof r=="object"&&!f&&!p&&!g&&!m&&!v,k=w||f||p||g;if(k){var S=p?Array.from(r):g?Object.fromEntries(r):r;return h.jsx(uf,{keyName:t,value:S,parentValue:i,initialValue:r,keys:a,level:l+1})}var j={onMouseEnter:()=>u({[d]:!0}),onMouseLeave:()=>u({[d]:!1})};return h.jsxs(zv,J({className:"w-rjv-line",value:r,keyName:t,keys:a,parentValue:i},j,{children:[h.jsx(af,{keyName:t,value:r,keys:a,parentValue:i}),h.jsx(Pv,{keyName:t,value:r}),h.jsx(sf,{keyName:t,value:r,keys:a,parentValue:i,expandKey:d})]}))};Ov.displayName="JVR.KeyValuesItem";var wT=["value","keyName"],kT=["as","render"],Dv=e=>{var{CountInfoExtra:t={}}=kn();return oi(t,e,"CountInfoExtra"),null};Dv.displayName="JVR.CountInfoExtra";var Mv=e=>{var{value:t={},keyName:r}=e,i=Fe(e,wT),{CountInfoExtra:l={}}=kn(),{as:a,render:u}=l,d=Fe(l,kT);if(!u&&!d.children)return null;var f=a||"span",p=u&&typeof u=="function",g=J({},d,i),m=p&&u(g,{value:t,keyName:r});return m||h.jsx(f,J({},g))};Mv.displayName="JVR.CountInfoExtraComps";var bT=["value","keyName"],ST=["as","render"],Bv=e=>{var{CountInfo:t={}}=kn();return oi(t,e,"CountInfo"),null};Bv.displayName="JVR.CountInfo";var Uv=e=>{var{value:t={},keyName:r}=e,i=Fe(e,bT),{displayObjectSize:l}=uo(),{CountInfo:a={}}=kn();if(!l)return null;var{as:u,render:d}=a,f=Fe(a,ST),p=u||"span";f.style=J({},f.style,e.style);var g=Object.keys(t).length;f.children||(f.children=g+" item"+(g===1?"":"s"));var m=J({},f,i),v=d&&typeof d=="function",w=v&&d(J({},m,{"data-length":g}),{value:t,keyName:r});return w||h.jsx(p,J({},m))};Uv.displayName="JVR.CountInfoComp";var CT=["as","render"],Vv=e=>{var{Ellipsis:t={}}=kn();return oi(t,e,"Ellipsis"),null};Vv.displayName="JVR.Ellipsis";var Hv=e=>{var{isExpanded:t,value:r,keyName:i}=e,{Ellipsis:l={}}=kn(),{as:a,render:u}=l,d=Fe(l,CT),f=a||"span",p=u&&typeof u=="function"&&u(J({},d,{"data-expanded":t}),{value:r,keyName:i});return p||(!t||typeof r=="object"&&Object.keys(r).length==0?null:h.jsx(f,J({},d)))};Hv.displayName="JVR.EllipsisComp";var Wv=e=>{var t,{keyName:r,expandKey:i,keys:l=[],initialValue:a,value:u,parentValue:d,level:f}=e,p=Ia(),g=P2(),{onExpand:m,collapsed:v,shouldExpandNodeInitially:w}=uo(),k=Array.isArray(u),S=u instanceof Set,j=typeof v=="boolean"?v:typeof v=="number"?f>v:!1,E=typeof u=="object",P=(t=p[i])!=null?t:j,N=w&&w(P,{value:u,keys:l,level:f});p[i]===void 0&&N!==void 0&&(P=N);var _=()=>{var Z={expand:!P,value:u,keyid:i,keyName:r};m&&m(Z),g({[i]:Z.expand})},q={display:"inline-flex",alignItems:"center"},A={transform:"rotate("+(P?"-90":"0")+"deg)",transition:"all 0.3s"},H=Object.keys(u).length,K=H!==0&&(k||S||E),te={style:q};K&&(te.onClick=_);var O={keyName:r,value:u,keys:l,parentValue:d};return h.jsxs("span",J({},te,{children:[K&&h.jsx(mv,J({style:A,expandKey:i},O)),(r||typeof r=="number")&&h.jsx(af,J({},O)),h.jsx(xv,{value:a,keyName:r}),h.jsx(vv,{value:a,keyName:r}),h.jsx(gv,J({isBrackets:k||S},O)),h.jsx(Hv,{keyName:r,value:u,isExpanded:P}),h.jsx(lf,J({isVisiable:P||!K,isBrackets:k||S},O)),h.jsx(Uv,{value:u,keyName:r}),h.jsx(Mv,{value:u,keyName:r}),h.jsx(sf,{keyName:r,value:u,expandKey:i,parentValue:d,keys:l})]}))};Wv.displayName="JVR.NestedOpen";var ET=["className","children","parentValue","keyid","level","value","initialValue","keys","keyName"],uf=$.forwardRef((e,t)=>{var{className:r="",parentValue:i,level:l=1,value:a,initialValue:u,keys:d,keyName:f}=e,p=Fe(e,ET),g=Qx(),m=Fv(),v=[r,"w-rjv-inner"].filter(Boolean).join(" "),w={onMouseEnter:()=>g({[m]:!0}),onMouseLeave:()=>g({[m]:!1})};return h.jsxs("div",J({className:v,ref:t},p,w,{children:[h.jsx(Wv,{expandKey:m,value:a,level:l,keys:d,parentValue:i,keyName:f,initialValue:u}),h.jsx(_v,{expandKey:m,value:a,level:l,keys:d,parentValue:i,keyName:f}),h.jsx(yv,{expandKey:m,value:a,level:l,keys:d})]}))});uf.displayName="JVR.Container";var qv=e=>{var{BraceLeft:t={}}=Yt();return Pr(t,e,"BraceLeft"),null};qv.displayName="JVR.BraceLeft";var Gv=e=>{var{BraceRight:t={}}=Yt();return Pr(t,e,"BraceRight"),null};Gv.displayName="JVR.BraceRight";var Jv=e=>{var{BracketsLeft:t={}}=Yt();return Pr(t,e,"BracketsLeft"),null};Jv.displayName="JVR.BracketsLeft";var Kv=e=>{var{BracketsRight:t={}}=Yt();return Pr(t,e,"BracketsRight"),null};Kv.displayName="JVR.BracketsRight";var Qv=e=>{var{Arrow:t={}}=Yt();return Pr(t,e,"Arrow"),null};Qv.displayName="JVR.Arrow";var Yv=e=>{var{Colon:t={}}=Yt();return Pr(t,e,"Colon"),null};Yv.displayName="JVR.Colon";var Xv=e=>{var{Quote:t={}}=Yt();return Pr(t,e,"Quote"),null};Xv.displayName="JVR.Quote";var Zv=e=>{var{ValueQuote:t={}}=Yt();return Pr(t,e,"ValueQuote"),null};Zv.displayName="JVR.ValueQuote";var e0=e=>{var{Bigint:t={}}=Ye();return dn(t,e,"Bigint"),null};e0.displayName="JVR.Bigint";var t0=e=>{var{Date:t={}}=Ye();return dn(t,e,"Date"),null};t0.displayName="JVR.Date";var n0=e=>{var{False:t={}}=Ye();return dn(t,e,"False"),null};n0.displayName="JVR.False";var r0=e=>{var{Float:t={}}=Ye();return dn(t,e,"Float"),null};r0.displayName="JVR.Float";var o0=e=>{var{Int:t={}}=Ye();return dn(t,e,"Int"),null};o0.displayName="JVR.Int";var i0=e=>{var{Map:t={}}=Ye();return dn(t,e,"Map"),null};i0.displayName="JVR.Map";var l0=e=>{var{Nan:t={}}=Ye();return dn(t,e,"Nan"),null};l0.displayName="JVR.Nan";var s0=e=>{var{Null:t={}}=Ye();return dn(t,e,"Null"),null};s0.displayName="JVR.Null";var a0=e=>{var{Set:t={}}=Ye();return dn(t,e,"Set"),null};a0.displayName="JVR.Set";var u0=e=>{var{Str:t={}}=Ye();return dn(t,e,"Str"),null};u0.displayName="JVR.StringText";var c0=e=>{var{True:t={}}=Ye();return dn(t,e,"True"),null};c0.displayName="JVR.True";var d0=e=>{var{Undefined:t={}}=Ye();return dn(t,e,"Undefined"),null};d0.displayName="JVR.Undefined";var f0=e=>{var{Url:t={}}=Ye();return dn(t,e,"Url"),null};f0.displayName="JVR.Url";var p0=e=>{var{Copied:t={}}=kn();return oi(t,e,"Copied"),null};p0.displayName="JVR.Copied";var jT=["className","style","value","children","collapsed","shouldExpandNodeInitially","indentWidth","displayObjectSize","shortenTextAfterLength","highlightUpdates","enableClipboard","displayDataTypes","objectSortKeys","onExpand","onCopied"],qe=$.forwardRef((e,t)=>{var{className:r="",style:i,value:l,children:a,collapsed:u,shouldExpandNodeInitially:d,indentWidth:f=15,displayObjectSize:p=!0,shortenTextAfterLength:g=30,highlightUpdates:m=!0,enableClipboard:v=!0,displayDataTypes:w=!0,objectSortKeys:k=!1,onExpand:S,onCopied:j}=e,E=Fe(e,jT),P=J({lineHeight:1.4,fontFamily:"var(--w-rjv-font-family, Menlo, monospace)",color:"var(--w-rjv-color, #002b36)",backgroundColor:"var(--w-rjv-background-color, #00000000)",fontSize:13},i),N=["w-json-view-container","w-rjv",r].filter(Boolean).join(" ");return h.jsxs(pv,{initialState:{value:l,objectSortKeys:k,indentWidth:f,shouldExpandNodeInitially:d,displayObjectSize:p,collapsed:u,enableClipboard:v,shortenTextAfterLength:g,highlightUpdates:m,onCopied:j,onExpand:S},initialTypes:{displayDataTypes:w},children:[h.jsx(uf,J({value:l},E,{ref:t,className:N,style:P})),a]})});qe.Bigint=e0;qe.Date=t0;qe.False=n0;qe.Float=r0;qe.Int=o0;qe.Map=i0;qe.Nan=l0;qe.Null=s0;qe.Set=a0;qe.String=u0;qe.True=c0;qe.Undefined=d0;qe.Url=f0;qe.ValueQuote=Zv;qe.Arrow=Qv;qe.Colon=Yv;qe.Quote=Xv;qe.Ellipsis=Vv;qe.BraceLeft=qv;qe.BraceRight=Gv;qe.BracketsLeft=Jv;qe.BracketsRight=Kv;qe.Copied=p0;qe.CountInfo=Bv;qe.CountInfoExtra=Dv;qe.KeyName=Nv;qe.Row=Lv;qe.displayName="JVR.JsonView";var TT={"--w-rjv-font-family":"monospace","--w-rjv-color":"#0184a6","--w-rjv-key-string":"#0184a6","--w-rjv-background-color":"#202020","--w-rjv-line-color":"#323232","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#656565","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#0184a6","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#1896b6","--w-rjv-brackets-color":"#1896b6","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#649bd8","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#076678","--w-rjv-type-undefined-color":"#586e75"},$T={"--w-rjv-font-family":"monospace","--w-rjv-color":"#002b36","--w-rjv-key-string":"#002b36","--w-rjv-background-color":"#ffffff","--w-rjv-line-color":"#ebebeb","--w-rjv-arrow-color":"var(--w-rjv-color)","--w-rjv-edit-color":"var(--w-rjv-color)","--w-rjv-info-color":"#0000004d","--w-rjv-update-color":"#ebcb8b","--w-rjv-copied-color":"#002b36","--w-rjv-copied-success-color":"#28a745","--w-rjv-curlybraces-color":"#236a7c","--w-rjv-colon-color":"#002b36","--w-rjv-brackets-color":"#236a7c","--w-rjv-quotes-color":"var(--w-rjv-key-string)","--w-rjv-quotes-string-color":"var(--w-rjv-type-string-color)","--w-rjv-type-string-color":"#cb4b16","--w-rjv-type-int-color":"#268bd2","--w-rjv-type-float-color":"#859900","--w-rjv-type-bigint-color":"#268bd2","--w-rjv-type-boolean-color":"#2aa198","--w-rjv-type-date-color":"#586e75","--w-rjv-type-url-color":"#0969da","--w-rjv-type-null-color":"#d33682","--w-rjv-type-nan-color":"#859900","--w-rjv-type-undefined-color":"#586e75"};const IT=C.pre`
1355
+ margin-top: 8px;
1356
+ padding: 8px;
1357
+ background-color: ${e=>e.theme.colors.codeBackground};
1358
+ border-radius: 4px;
1359
+ font-size: 0.9em;
1360
+ overflow-x: auto;
1361
+ white-space: pre-wrap;
1362
+ word-wrap: break-word;
1363
+
1364
+ .w-json-view-container {
1365
+ background: none !important;
1366
+ }
1367
+ `,h0=({data:e})=>{const t=zb();return h.jsx(IT,{children:typeof e=="object"?h.jsx(qe,{value:e,shortenTextAfterLength:0,style:t.name==="dark"?TT:$T}):JSON.stringify(e,null,2)})};function RT(e,t){const r={};return(e[e.length-1]===""?[...e,""]:e).join((r.padRight?" ":"")+","+(r.padLeft===!1?"":" ")).trim()}const PT=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,NT=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,AT={};function xg(e,t){return(AT.jsx?NT:PT).test(e)}const LT=/[ \t\n\f\r]/g;function zT(e){return typeof e=="object"?e.type==="text"?vg(e.value):!1:vg(e)}function vg(e){return e.replace(LT,"")===""}class vl{constructor(t,r,i){this.normal=r,this.property=t,i&&(this.space=i)}}vl.prototype.normal={};vl.prototype.property={};vl.prototype.space=void 0;function m0(e,t){const r={},i={};for(const l of e)Object.assign(r,l.property),Object.assign(i,l.normal);return new vl(r,i,t)}function bd(e){return e.toLowerCase()}class Xt{constructor(t,r){this.attribute=r,this.property=t}}Xt.prototype.attribute="";Xt.prototype.booleanish=!1;Xt.prototype.boolean=!1;Xt.prototype.commaOrSpaceSeparated=!1;Xt.prototype.commaSeparated=!1;Xt.prototype.defined=!1;Xt.prototype.mustUseProperty=!1;Xt.prototype.number=!1;Xt.prototype.overloadedBoolean=!1;Xt.prototype.property="";Xt.prototype.spaceSeparated=!1;Xt.prototype.space=void 0;let FT=0;const Pe=co(),ut=co(),Sd=co(),ie=co(),Qe=co(),Uo=co(),ln=co();function co(){return 2**++FT}const Cd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Pe,booleanish:ut,commaOrSpaceSeparated:ln,commaSeparated:Uo,number:ie,overloadedBoolean:Sd,spaceSeparated:Qe},Symbol.toStringTag,{value:"Module"})),zc=Object.keys(Cd);class cf extends Xt{constructor(t,r,i,l){let a=-1;if(super(t,r),wg(this,"space",l),typeof i=="number")for(;++a<zc.length;){const u=zc[a];wg(this,zc[a],(i&Cd[u])===Cd[u])}}}cf.prototype.defined=!0;function wg(e,t,r){r&&(e[t]=r)}function ii(e){const t={},r={};for(const[i,l]of Object.entries(e.properties)){const a=new cf(i,e.transform(e.attributes||{},i),l,e.space);e.mustUseProperty&&e.mustUseProperty.includes(i)&&(a.mustUseProperty=!0),t[i]=a,r[bd(i)]=i,r[bd(a.attribute)]=i}return new vl(t,r,e.space)}const g0=ii({properties:{ariaActiveDescendant:null,ariaAtomic:ut,ariaAutoComplete:null,ariaBusy:ut,ariaChecked:ut,ariaColCount:ie,ariaColIndex:ie,ariaColSpan:ie,ariaControls:Qe,ariaCurrent:null,ariaDescribedBy:Qe,ariaDetails:null,ariaDisabled:ut,ariaDropEffect:Qe,ariaErrorMessage:null,ariaExpanded:ut,ariaFlowTo:Qe,ariaGrabbed:ut,ariaHasPopup:null,ariaHidden:ut,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Qe,ariaLevel:ie,ariaLive:null,ariaModal:ut,ariaMultiLine:ut,ariaMultiSelectable:ut,ariaOrientation:null,ariaOwns:Qe,ariaPlaceholder:null,ariaPosInSet:ie,ariaPressed:ut,ariaReadOnly:ut,ariaRelevant:null,ariaRequired:ut,ariaRoleDescription:Qe,ariaRowCount:ie,ariaRowIndex:ie,ariaRowSpan:ie,ariaSelected:ut,ariaSetSize:ie,ariaSort:null,ariaValueMax:ie,ariaValueMin:ie,ariaValueNow:ie,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function y0(e,t){return t in e?e[t]:t}function x0(e,t){return y0(e,t.toLowerCase())}const _T=ii({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Uo,acceptCharset:Qe,accessKey:Qe,action:null,allow:null,allowFullScreen:Pe,allowPaymentRequest:Pe,allowUserMedia:Pe,alt:null,as:null,async:Pe,autoCapitalize:null,autoComplete:Qe,autoFocus:Pe,autoPlay:Pe,blocking:Qe,capture:null,charSet:null,checked:Pe,cite:null,className:Qe,cols:ie,colSpan:null,content:null,contentEditable:ut,controls:Pe,controlsList:Qe,coords:ie|Uo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Pe,defer:Pe,dir:null,dirName:null,disabled:Pe,download:Sd,draggable:ut,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Pe,formTarget:null,headers:Qe,height:ie,hidden:Sd,high:ie,href:null,hrefLang:null,htmlFor:Qe,httpEquiv:Qe,id:null,imageSizes:null,imageSrcSet:null,inert:Pe,inputMode:null,integrity:null,is:null,isMap:Pe,itemId:null,itemProp:Qe,itemRef:Qe,itemScope:Pe,itemType:Qe,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Pe,low:ie,manifest:null,max:null,maxLength:ie,media:null,method:null,min:null,minLength:ie,multiple:Pe,muted:Pe,name:null,nonce:null,noModule:Pe,noValidate:Pe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Pe,optimum:ie,pattern:null,ping:Qe,placeholder:null,playsInline:Pe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Pe,referrerPolicy:null,rel:Qe,required:Pe,reversed:Pe,rows:ie,rowSpan:ie,sandbox:Qe,scope:null,scoped:Pe,seamless:Pe,selected:Pe,shadowRootClonable:Pe,shadowRootDelegatesFocus:Pe,shadowRootMode:null,shape:null,size:ie,sizes:null,slot:null,span:ie,spellCheck:ut,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ie,step:null,style:null,tabIndex:ie,target:null,title:null,translate:null,type:null,typeMustMatch:Pe,useMap:null,value:ut,width:ie,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Qe,axis:null,background:null,bgColor:null,border:ie,borderColor:null,bottomMargin:ie,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Pe,declare:Pe,event:null,face:null,frame:null,frameBorder:null,hSpace:ie,leftMargin:ie,link:null,longDesc:null,lowSrc:null,marginHeight:ie,marginWidth:ie,noResize:Pe,noHref:Pe,noShade:Pe,noWrap:Pe,object:null,profile:null,prompt:null,rev:null,rightMargin:ie,rules:null,scheme:null,scrolling:ut,standby:null,summary:null,text:null,topMargin:ie,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ie,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Pe,disableRemotePlayback:Pe,prefix:null,property:null,results:ie,security:null,unselectable:null},space:"html",transform:x0}),OT=ii({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:ln,accentHeight:ie,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ie,amplitude:ie,arabicForm:null,ascent:ie,attributeName:null,attributeType:null,azimuth:ie,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ie,by:null,calcMode:null,capHeight:ie,className:Qe,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:ie,diffuseConstant:ie,direction:null,display:null,dur:null,divisor:ie,dominantBaseline:null,download:Pe,dx:null,dy:null,edgeMode:null,editable:null,elevation:ie,enableBackground:null,end:null,event:null,exponent:ie,externalResourcesRequired:null,fill:null,fillOpacity:ie,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Uo,g2:Uo,glyphName:Uo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ie,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ie,horizOriginX:ie,horizOriginY:ie,id:null,ideographic:ie,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ie,k:ie,k1:ie,k2:ie,k3:ie,k4:ie,kernelMatrix:ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ie,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ie,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ie,overlineThickness:ie,paintOrder:null,panose1:null,path:null,pathLength:ie,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Qe,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ie,pointsAtY:ie,pointsAtZ:ie,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ln,rev:ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ln,requiredFeatures:ln,requiredFonts:ln,requiredFormats:ln,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ie,specularExponent:ie,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ie,strikethroughThickness:ie,string:null,stroke:null,strokeDashArray:ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ie,strokeOpacity:ie,strokeWidth:null,style:null,surfaceScale:ie,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ln,tabIndex:ie,tableValues:null,target:null,targetX:ie,targetY:ie,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ie,underlineThickness:ie,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ie,values:null,vAlphabetic:ie,vMathematical:ie,vectorEffect:null,vHanging:ie,vIdeographic:ie,version:null,vertAdvY:ie,vertOriginX:ie,vertOriginY:ie,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ie,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:y0}),v0=ii({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),w0=ii({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:x0}),k0=ii({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),DT={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},MT=/[A-Z]/g,kg=/-[a-z]/g,BT=/^data[-\w.:]+$/i;function UT(e,t){const r=bd(t);let i=t,l=Xt;if(r in e.normal)return e.property[e.normal[r]];if(r.length>4&&r.slice(0,4)==="data"&&BT.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(kg,HT);i="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!kg.test(a)){let u=a.replace(MT,VT);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}l=cf}return new l(i,t)}function VT(e){return"-"+e.toLowerCase()}function HT(e){return e.charAt(1).toUpperCase()}const WT=m0([g0,_T,v0,w0,k0],"html"),df=m0([g0,OT,v0,w0,k0],"svg");function qT(e){return e.join(" ").trim()}var Oo={},Fc,bg;function GT(){if(bg)return Fc;bg=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,r=/^\s*/,i=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,l=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,d=/^\s+|\s+$/g,f=`
1368
+ `,p="/",g="*",m="",v="comment",w="declaration";Fc=function(S,j){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];j=j||{};var E=1,P=1;function N(X){var ne=X.match(t);ne&&(E+=ne.length);var B=X.lastIndexOf(f);P=~B?X.length-B:P+X.length}function _(){var X={line:E,column:P};return function(ne){return ne.position=new q(X),K(),ne}}function q(X){this.start=X,this.end={line:E,column:P},this.source=j.source}q.prototype.content=S;function A(X){var ne=new Error(j.source+":"+E+":"+P+": "+X);if(ne.reason=X,ne.filename=j.source,ne.line=E,ne.column=P,ne.source=S,!j.silent)throw ne}function H(X){var ne=X.exec(S);if(ne){var B=ne[0];return N(B),S=S.slice(B.length),ne}}function K(){H(r)}function te(X){var ne;for(X=X||[];ne=O();)ne!==!1&&X.push(ne);return X}function O(){var X=_();if(!(p!=S.charAt(0)||g!=S.charAt(1))){for(var ne=2;m!=S.charAt(ne)&&(g!=S.charAt(ne)||p!=S.charAt(ne+1));)++ne;if(ne+=2,m===S.charAt(ne-1))return A("End of comment missing");var B=S.slice(2,ne-2);return P+=2,N(B),S=S.slice(ne),P+=2,X({type:v,comment:B})}}function Z(){var X=_(),ne=H(i);if(ne){if(O(),!H(l))return A("property missing ':'");var B=H(a),pe=X({type:w,property:k(ne[0].replace(e,m)),value:B?k(B[0].replace(e,m)):m});return H(u),pe}}function le(){var X=[];te(X);for(var ne;ne=Z();)ne!==!1&&(X.push(ne),te(X));return X}return K(),le()};function k(S){return S?S.replace(d,m):m}return Fc}var Sg;function JT(){if(Sg)return Oo;Sg=1;var e=Oo&&Oo.__importDefault||function(i){return i&&i.__esModule?i:{default:i}};Object.defineProperty(Oo,"__esModule",{value:!0}),Oo.default=r;var t=e(GT());function r(i,l){var a=null;if(!i||typeof i!="string")return a;var u=(0,t.default)(i),d=typeof l=="function";return u.forEach(function(f){if(f.type==="declaration"){var p=f.property,g=f.value;d?l(p,g,f):g&&(a=a||{},a[p]=g)}}),a}return Oo}var Yi={},Cg;function KT(){if(Cg)return Yi;Cg=1,Object.defineProperty(Yi,"__esModule",{value:!0}),Yi.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,r=/^[^-]+$/,i=/^-(webkit|moz|ms|o|khtml)-/,l=/^-(ms)-/,a=function(p){return!p||r.test(p)||e.test(p)},u=function(p,g){return g.toUpperCase()},d=function(p,g){return"".concat(g,"-")},f=function(p,g){return g===void 0&&(g={}),a(p)?p:(p=p.toLowerCase(),g.reactCompat?p=p.replace(l,d):p=p.replace(i,d),p.replace(t,u))};return Yi.camelCase=f,Yi}var Xi,Eg;function QT(){if(Eg)return Xi;Eg=1;var e=Xi&&Xi.__importDefault||function(l){return l&&l.__esModule?l:{default:l}},t=e(JT()),r=KT();function i(l,a){var u={};return!l||typeof l!="string"||(0,t.default)(l,function(d,f){d&&f&&(u[(0,r.camelCase)(d,a)]=f)}),u}return i.default=i,Xi=i,Xi}var YT=QT();const XT=Dd(YT),b0=S0("end"),ff=S0("start");function S0(e){return t;function t(r){const i=r&&r.position&&r.position[e]||{};if(typeof i.line=="number"&&i.line>0&&typeof i.column=="number"&&i.column>0)return{line:i.line,column:i.column,offset:typeof i.offset=="number"&&i.offset>-1?i.offset:void 0}}}function ZT(e){const t=ff(e),r=b0(e);if(t&&r)return{start:t,end:r}}function il(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?jg(e.position):"start"in e||"end"in e?jg(e):"line"in e||"column"in e?Ed(e):""}function Ed(e){return Tg(e&&e.line)+":"+Tg(e&&e.column)}function jg(e){return Ed(e&&e.start)+"-"+Ed(e&&e.end)}function Tg(e){return e&&typeof e=="number"?e:1}class Lt extends Error{constructor(t,r,i){super(),typeof r=="string"&&(i=r,r=void 0);let l="",a={},u=!1;if(r&&("line"in r&&"column"in r?a={place:r}:"start"in r&&"end"in r?a={place:r}:"type"in r?a={ancestors:[r],place:r.position}:a={...r}),typeof t=="string"?l=t:!a.cause&&t&&(u=!0,l=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof i=="string"){const f=i.indexOf(":");f===-1?a.ruleId=i:(a.source=i.slice(0,f),a.ruleId=i.slice(f+1))}if(!a.place&&a.ancestors&&a.ancestors){const f=a.ancestors[a.ancestors.length-1];f&&(a.place=f.position)}const d=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=d?d.column:void 0,this.fatal=void 0,this.file,this.message=l,this.line=d?d.line:void 0,this.name=il(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}Lt.prototype.file="";Lt.prototype.name="";Lt.prototype.reason="";Lt.prototype.message="";Lt.prototype.stack="";Lt.prototype.column=void 0;Lt.prototype.line=void 0;Lt.prototype.ancestors=void 0;Lt.prototype.cause=void 0;Lt.prototype.fatal=void 0;Lt.prototype.place=void 0;Lt.prototype.ruleId=void 0;Lt.prototype.source=void 0;const pf={}.hasOwnProperty,e$=new Map,t$=/[A-Z]/g,n$=new Set(["table","tbody","thead","tfoot","tr"]),r$=new Set(["td","th"]),C0="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function o$(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const r=t.filePath||void 0;let i;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");i=f$(r,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");i=d$(r,t.jsx,t.jsxs)}const l={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:i,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:r,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?df:WT,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=E0(l,e,void 0);return a&&typeof a!="string"?a:l.create(e,l.Fragment,{children:a||void 0},void 0)}function E0(e,t,r){if(t.type==="element")return i$(e,t,r);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return l$(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return a$(e,t,r);if(t.type==="mdxjsEsm")return s$(e,t);if(t.type==="root")return u$(e,t,r);if(t.type==="text")return c$(e,t)}function i$(e,t,r){const i=e.schema;let l=i;t.tagName.toLowerCase()==="svg"&&i.space==="html"&&(l=df,e.schema=l),e.ancestors.push(t);const a=T0(e,t.tagName,!1),u=p$(e,t);let d=mf(e,t);return n$.has(t.tagName)&&(d=d.filter(function(f){return typeof f=="string"?!zT(f):!0})),j0(e,u,a,t),hf(u,d),e.ancestors.pop(),e.schema=i,e.create(t,a,u,r)}function l$(e,t){if(t.data&&t.data.estree&&e.evaluater){const i=t.data.estree.body[0];return i.type,e.evaluater.evaluateExpression(i.expression)}cl(e,t.position)}function s$(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);cl(e,t.position)}function a$(e,t,r){const i=e.schema;let l=i;t.name==="svg"&&i.space==="html"&&(l=df,e.schema=l),e.ancestors.push(t);const a=t.name===null?e.Fragment:T0(e,t.name,!0),u=h$(e,t),d=mf(e,t);return j0(e,u,a,t),hf(u,d),e.ancestors.pop(),e.schema=i,e.create(t,a,u,r)}function u$(e,t,r){const i={};return hf(i,mf(e,t)),e.create(t,e.Fragment,i,r)}function c$(e,t){return t.value}function j0(e,t,r,i){typeof r!="string"&&r!==e.Fragment&&e.passNode&&(t.node=i)}function hf(e,t){if(t.length>0){const r=t.length>1?t:t[0];r&&(e.children=r)}}function d$(e,t,r){return i;function i(l,a,u,d){const p=Array.isArray(u.children)?r:t;return d?p(a,u,d):p(a,u)}}function f$(e,t){return r;function r(i,l,a,u){const d=Array.isArray(a.children),f=ff(i);return t(l,a,u,d,{columnNumber:f?f.column-1:void 0,fileName:e,lineNumber:f?f.line:void 0},void 0)}}function p$(e,t){const r={};let i,l;for(l in t.properties)if(l!=="children"&&pf.call(t.properties,l)){const a=m$(e,l,t.properties[l]);if(a){const[u,d]=a;e.tableCellAlignToStyle&&u==="align"&&typeof d=="string"&&r$.has(t.tagName)?i=d:r[u]=d}}if(i){const a=r.style||(r.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=i}return r}function h$(e,t){const r={};for(const i of t.attributes)if(i.type==="mdxJsxExpressionAttribute")if(i.data&&i.data.estree&&e.evaluater){const a=i.data.estree.body[0];a.type;const u=a.expression;u.type;const d=u.properties[0];d.type,Object.assign(r,e.evaluater.evaluateExpression(d.argument))}else cl(e,t.position);else{const l=i.name;let a;if(i.value&&typeof i.value=="object")if(i.value.data&&i.value.data.estree&&e.evaluater){const d=i.value.data.estree.body[0];d.type,a=e.evaluater.evaluateExpression(d.expression)}else cl(e,t.position);else a=i.value===null?!0:i.value;r[l]=a}return r}function mf(e,t){const r=[];let i=-1;const l=e.passKeys?new Map:e$;for(;++i<t.children.length;){const a=t.children[i];let u;if(e.passKeys){const f=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(f){const p=l.get(f)||0;u=f+"-"+p,l.set(f,p+1)}}const d=E0(e,a,u);d!==void 0&&r.push(d)}return r}function m$(e,t,r){const i=UT(e.schema,t);if(!(r==null||typeof r=="number"&&Number.isNaN(r))){if(Array.isArray(r)&&(r=i.commaSeparated?RT(r):qT(r)),i.property==="style"){let l=typeof r=="object"?r:g$(e,String(r));return e.stylePropertyNameCase==="css"&&(l=y$(l)),["style",l]}return[e.elementAttributeNameCase==="react"&&i.space?DT[i.property]||i.property:i.attribute,r]}}function g$(e,t){try{return XT(t,{reactCompat:!0})}catch(r){if(e.ignoreInvalidStyle)return{};const i=r,l=new Lt("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:i,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw l.file=e.filePath||void 0,l.url=C0+"#cannot-parse-style-attribute",l}}function T0(e,t,r){let i;if(!r)i={type:"Literal",value:t};else if(t.includes(".")){const l=t.split(".");let a=-1,u;for(;++a<l.length;){const d=xg(l[a])?{type:"Identifier",name:l[a]}:{type:"Literal",value:l[a]};u=u?{type:"MemberExpression",object:u,property:d,computed:!!(a&&d.type==="Literal"),optional:!1}:d}i=u}else i=xg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(i.type==="Literal"){const l=i.value;return pf.call(e.components,l)?e.components[l]:l}if(e.evaluater)return e.evaluater.evaluateExpression(i);cl(e)}function cl(e,t){const r=new Lt("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw r.file=e.filePath||void 0,r.url=C0+"#cannot-handle-mdx-estrees-without-createevaluater",r}function y$(e){const t={};let r;for(r in e)pf.call(e,r)&&(t[x$(r)]=e[r]);return t}function x$(e){let t=e.replace(t$,v$);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function v$(e){return"-"+e.toLowerCase()}const _c={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},w$={};function gf(e,t){const r=w$,i=typeof r.includeImageAlt=="boolean"?r.includeImageAlt:!0,l=typeof r.includeHtml=="boolean"?r.includeHtml:!0;return $0(e,i,l)}function $0(e,t,r){if(k$(e)){if("value"in e)return e.type==="html"&&!r?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return $g(e.children,t,r)}return Array.isArray(e)?$g(e,t,r):""}function $g(e,t,r){const i=[];let l=-1;for(;++l<e.length;)i[l]=$0(e[l],t,r);return i.join("")}function k$(e){return!!(e&&typeof e=="object")}const Ig=document.createElement("i");function yf(e){const t="&"+e+";";Ig.innerHTML=t;const r=Ig.textContent;return r.charCodeAt(r.length-1)===59&&e!=="semi"||r===t?!1:r}function cn(e,t,r,i){const l=e.length;let a=0,u;if(t<0?t=-t>l?0:l+t:t=t>l?l:t,r=r>0?r:0,i.length<1e4)u=Array.from(i),u.unshift(t,r),e.splice(...u);else for(r&&e.splice(t,r);a<i.length;)u=i.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function vn(e,t){return e.length>0?(cn(e,e.length,0,t),e):t}const Rg={}.hasOwnProperty;function I0(e){const t={};let r=-1;for(;++r<e.length;)b$(t,e[r]);return t}function b$(e,t){let r;for(r in t){const l=(Rg.call(e,r)?e[r]:void 0)||(e[r]={}),a=t[r];let u;if(a)for(u in a){Rg.call(l,u)||(l[u]=[]);const d=a[u];S$(l[u],Array.isArray(d)?d:d?[d]:[])}}}function S$(e,t){let r=-1;const i=[];for(;++r<t.length;)(t[r].add==="after"?e:i).push(t[r]);cn(e,0,0,i)}function R0(e,t){const r=Number.parseInt(e,t);return r<9||r===11||r>13&&r<32||r>126&&r<160||r>55295&&r<57344||r>64975&&r<65008||(r&65535)===65535||(r&65535)===65534||r>1114111?"�":String.fromCodePoint(r)}function Rn(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mt=Nr(/[A-Za-z]/),At=Nr(/[\dA-Za-z]/),C$=Nr(/[#-'*+\--9=?A-Z^-~]/);function ca(e){return e!==null&&(e<32||e===127)}const jd=Nr(/\d/),E$=Nr(/[\dA-Fa-f]/),j$=Nr(/[!-/:-@[-`{-~]/);function je(e){return e!==null&&e<-2}function Je(e){return e!==null&&(e<0||e===32)}function ze(e){return e===-2||e===-1||e===32}const Ra=Nr(new RegExp("\\p{P}|\\p{S}","u")),lo=Nr(/\s/);function Nr(e){return t;function t(r){return r!==null&&r>-1&&e.test(String.fromCharCode(r))}}function li(e){const t=[];let r=-1,i=0,l=0;for(;++r<e.length;){const a=e.charCodeAt(r);let u="";if(a===37&&At(e.charCodeAt(r+1))&&At(e.charCodeAt(r+2)))l=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const d=e.charCodeAt(r+1);a<56320&&d>56319&&d<57344?(u=String.fromCharCode(a,d),l=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(i,r),encodeURIComponent(u)),i=r+l+1,u=""),l&&(r+=l,l=0)}return t.join("")+e.slice(i)}function Oe(e,t,r,i){const l=i?i-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(f){return ze(f)?(e.enter(r),d(f)):t(f)}function d(f){return ze(f)&&a++<l?(e.consume(f),d):(e.exit(r),t(f))}}const T$={tokenize:$$};function $$(e){const t=e.attempt(this.parser.constructs.contentInitial,i,l);let r;return t;function i(d){if(d===null){e.consume(d);return}return e.enter("lineEnding"),e.consume(d),e.exit("lineEnding"),Oe(e,t,"linePrefix")}function l(d){return e.enter("paragraph"),a(d)}function a(d){const f=e.enter("chunkText",{contentType:"text",previous:r});return r&&(r.next=f),r=f,u(d)}function u(d){if(d===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(d);return}return je(d)?(e.consume(d),e.exit("chunkText"),a):(e.consume(d),u)}}const I$={tokenize:R$},Pg={tokenize:P$};function R$(e){const t=this,r=[];let i=0,l,a,u;return d;function d(N){if(i<r.length){const _=r[i];return t.containerState=_[1],e.attempt(_[0].continuation,f,p)(N)}return p(N)}function f(N){if(i++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,l&&P();const _=t.events.length;let q=_,A;for(;q--;)if(t.events[q][0]==="exit"&&t.events[q][1].type==="chunkFlow"){A=t.events[q][1].end;break}E(i);let H=_;for(;H<t.events.length;)t.events[H][1].end={...A},H++;return cn(t.events,q+1,0,t.events.slice(_)),t.events.length=H,p(N)}return d(N)}function p(N){if(i===r.length){if(!l)return v(N);if(l.currentConstruct&&l.currentConstruct.concrete)return k(N);t.interrupt=!!(l.currentConstruct&&!l._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(Pg,g,m)(N)}function g(N){return l&&P(),E(i),v(N)}function m(N){return t.parser.lazy[t.now().line]=i!==r.length,u=t.now().offset,k(N)}function v(N){return t.containerState={},e.attempt(Pg,w,k)(N)}function w(N){return i++,r.push([t.currentConstruct,t.containerState]),v(N)}function k(N){if(N===null){l&&P(),E(0),e.consume(N);return}return l=l||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:l,contentType:"flow",previous:a}),S(N)}function S(N){if(N===null){j(e.exit("chunkFlow"),!0),E(0),e.consume(N);return}return je(N)?(e.consume(N),j(e.exit("chunkFlow")),i=0,t.interrupt=void 0,d):(e.consume(N),S)}function j(N,_){const q=t.sliceStream(N);if(_&&q.push(null),N.previous=a,a&&(a.next=N),a=N,l.defineSkip(N.start),l.write(q),t.parser.lazy[N.start.line]){let A=l.events.length;for(;A--;)if(l.events[A][1].start.offset<u&&(!l.events[A][1].end||l.events[A][1].end.offset>u))return;const H=t.events.length;let K=H,te,O;for(;K--;)if(t.events[K][0]==="exit"&&t.events[K][1].type==="chunkFlow"){if(te){O=t.events[K][1].end;break}te=!0}for(E(i),A=H;A<t.events.length;)t.events[A][1].end={...O},A++;cn(t.events,K+1,0,t.events.slice(H)),t.events.length=A}}function E(N){let _=r.length;for(;_-- >N;){const q=r[_];t.containerState=q[1],q[0].exit.call(t,e)}r.length=N}function P(){l.write([null]),a=void 0,l=void 0,t.containerState._closeFlow=void 0}}function P$(e,t,r){return Oe(e,e.attempt(this.parser.constructs.document,t,r),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Xo(e){if(e===null||Je(e)||lo(e))return 1;if(Ra(e))return 2}function Pa(e,t,r){const i=[];let l=-1;for(;++l<e.length;){const a=e[l].resolveAll;a&&!i.includes(a)&&(t=a(t,r),i.push(a))}return t}const Td={name:"attention",resolveAll:N$,tokenize:A$};function N$(e,t){let r=-1,i,l,a,u,d,f,p,g;for(;++r<e.length;)if(e[r][0]==="enter"&&e[r][1].type==="attentionSequence"&&e[r][1]._close){for(i=r;i--;)if(e[i][0]==="exit"&&e[i][1].type==="attentionSequence"&&e[i][1]._open&&t.sliceSerialize(e[i][1]).charCodeAt(0)===t.sliceSerialize(e[r][1]).charCodeAt(0)){if((e[i][1]._close||e[r][1]._open)&&(e[r][1].end.offset-e[r][1].start.offset)%3&&!((e[i][1].end.offset-e[i][1].start.offset+e[r][1].end.offset-e[r][1].start.offset)%3))continue;f=e[i][1].end.offset-e[i][1].start.offset>1&&e[r][1].end.offset-e[r][1].start.offset>1?2:1;const m={...e[i][1].end},v={...e[r][1].start};Ng(m,-f),Ng(v,f),u={type:f>1?"strongSequence":"emphasisSequence",start:m,end:{...e[i][1].end}},d={type:f>1?"strongSequence":"emphasisSequence",start:{...e[r][1].start},end:v},a={type:f>1?"strongText":"emphasisText",start:{...e[i][1].end},end:{...e[r][1].start}},l={type:f>1?"strong":"emphasis",start:{...u.start},end:{...d.end}},e[i][1].end={...u.start},e[r][1].start={...d.end},p=[],e[i][1].end.offset-e[i][1].start.offset&&(p=vn(p,[["enter",e[i][1],t],["exit",e[i][1],t]])),p=vn(p,[["enter",l,t],["enter",u,t],["exit",u,t],["enter",a,t]]),p=vn(p,Pa(t.parser.constructs.insideSpan.null,e.slice(i+1,r),t)),p=vn(p,[["exit",a,t],["enter",d,t],["exit",d,t],["exit",l,t]]),e[r][1].end.offset-e[r][1].start.offset?(g=2,p=vn(p,[["enter",e[r][1],t],["exit",e[r][1],t]])):g=0,cn(e,i-1,r-i+3,p),r=i+p.length-g-2;break}}for(r=-1;++r<e.length;)e[r][1].type==="attentionSequence"&&(e[r][1].type="data");return e}function A$(e,t){const r=this.parser.constructs.attentionMarkers.null,i=this.previous,l=Xo(i);let a;return u;function u(f){return a=f,e.enter("attentionSequence"),d(f)}function d(f){if(f===a)return e.consume(f),d;const p=e.exit("attentionSequence"),g=Xo(f),m=!g||g===2&&l||r.includes(f),v=!l||l===2&&g||r.includes(i);return p._open=!!(a===42?m:m&&(l||!v)),p._close=!!(a===42?v:v&&(g||!m)),t(f)}}function Ng(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const L$={name:"autolink",tokenize:z$};function z$(e,t,r){let i=0;return l;function l(w){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(w){return Mt(w)?(e.consume(w),u):w===64?r(w):p(w)}function u(w){return w===43||w===45||w===46||At(w)?(i=1,d(w)):p(w)}function d(w){return w===58?(e.consume(w),i=0,f):(w===43||w===45||w===46||At(w))&&i++<32?(e.consume(w),d):(i=0,p(w))}function f(w){return w===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):w===null||w===32||w===60||ca(w)?r(w):(e.consume(w),f)}function p(w){return w===64?(e.consume(w),g):C$(w)?(e.consume(w),p):r(w)}function g(w){return At(w)?m(w):r(w)}function m(w){return w===46?(e.consume(w),i=0,g):w===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(w),e.exit("autolinkMarker"),e.exit("autolink"),t):v(w)}function v(w){if((w===45||At(w))&&i++<63){const k=w===45?v:m;return e.consume(w),k}return r(w)}}const wl={partial:!0,tokenize:F$};function F$(e,t,r){return i;function i(a){return ze(a)?Oe(e,l,"linePrefix")(a):l(a)}function l(a){return a===null||je(a)?t(a):r(a)}}const P0={continuation:{tokenize:O$},exit:D$,name:"blockQuote",tokenize:_$};function _$(e,t,r){const i=this;return l;function l(u){if(u===62){const d=i.containerState;return d.open||(e.enter("blockQuote",{_container:!0}),d.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return r(u)}function a(u){return ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function O$(e,t,r){const i=this;return l;function l(u){return ze(u)?Oe(e,a,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(P0,t,r)(u)}}function D$(e){e.exit("blockQuote")}const N0={name:"characterEscape",tokenize:M$};function M$(e,t,r){return i;function i(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),l}function l(a){return j$(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):r(a)}}const A0={name:"characterReference",tokenize:B$};function B$(e,t,r){const i=this;let l=0,a,u;return d;function d(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),f}function f(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),p):(e.enter("characterReferenceValue"),a=31,u=At,g(m))}function p(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=E$,g):(e.enter("characterReferenceValue"),a=7,u=jd,g(m))}function g(m){if(m===59&&l){const v=e.exit("characterReferenceValue");return u===At&&!yf(i.sliceSerialize(v))?r(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&l++<a?(e.consume(m),g):r(m)}}const Ag={partial:!0,tokenize:V$},Lg={concrete:!0,name:"codeFenced",tokenize:U$};function U$(e,t,r){const i=this,l={partial:!0,tokenize:q};let a=0,u=0,d;return f;function f(A){return p(A)}function p(A){const H=i.events[i.events.length-1];return a=H&&H[1].type==="linePrefix"?H[2].sliceSerialize(H[1],!0).length:0,d=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),g(A)}function g(A){return A===d?(u++,e.consume(A),g):u<3?r(A):(e.exit("codeFencedFenceSequence"),ze(A)?Oe(e,m,"whitespace")(A):m(A))}function m(A){return A===null||je(A)?(e.exit("codeFencedFence"),i.interrupt?t(A):e.check(Ag,S,_)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),v(A))}function v(A){return A===null||je(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):ze(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Oe(e,w,"whitespace")(A)):A===96&&A===d?r(A):(e.consume(A),v)}function w(A){return A===null||je(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),k(A))}function k(A){return A===null||je(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===d?r(A):(e.consume(A),k)}function S(A){return e.attempt(l,_,j)(A)}function j(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),E}function E(A){return a>0&&ze(A)?Oe(e,P,"linePrefix",a+1)(A):P(A)}function P(A){return A===null||je(A)?e.check(Ag,S,_)(A):(e.enter("codeFlowValue"),N(A))}function N(A){return A===null||je(A)?(e.exit("codeFlowValue"),P(A)):(e.consume(A),N)}function _(A){return e.exit("codeFenced"),t(A)}function q(A,H,K){let te=0;return O;function O(B){return A.enter("lineEnding"),A.consume(B),A.exit("lineEnding"),Z}function Z(B){return A.enter("codeFencedFence"),ze(B)?Oe(A,le,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(B):le(B)}function le(B){return B===d?(A.enter("codeFencedFenceSequence"),X(B)):K(B)}function X(B){return B===d?(te++,A.consume(B),X):te>=u?(A.exit("codeFencedFenceSequence"),ze(B)?Oe(A,ne,"whitespace")(B):ne(B)):K(B)}function ne(B){return B===null||je(B)?(A.exit("codeFencedFence"),H(B)):K(B)}}}function V$(e,t,r){const i=this;return l;function l(u){return u===null?r(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return i.parser.lazy[i.now().line]?r(u):t(u)}}const Oc={name:"codeIndented",tokenize:W$},H$={partial:!0,tokenize:q$};function W$(e,t,r){const i=this;return l;function l(p){return e.enter("codeIndented"),Oe(e,a,"linePrefix",5)(p)}function a(p){const g=i.events[i.events.length-1];return g&&g[1].type==="linePrefix"&&g[2].sliceSerialize(g[1],!0).length>=4?u(p):r(p)}function u(p){return p===null?f(p):je(p)?e.attempt(H$,u,f)(p):(e.enter("codeFlowValue"),d(p))}function d(p){return p===null||je(p)?(e.exit("codeFlowValue"),u(p)):(e.consume(p),d)}function f(p){return e.exit("codeIndented"),t(p)}}function q$(e,t,r){const i=this;return l;function l(u){return i.parser.lazy[i.now().line]?r(u):je(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),l):Oe(e,a,"linePrefix",5)(u)}function a(u){const d=i.events[i.events.length-1];return d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(u):je(u)?l(u):r(u)}}const G$={name:"codeText",previous:K$,resolve:J$,tokenize:Q$};function J$(e){let t=e.length-4,r=3,i,l;if((e[r][1].type==="lineEnding"||e[r][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(i=r;++i<t;)if(e[i][1].type==="codeTextData"){e[r][1].type="codeTextPadding",e[t][1].type="codeTextPadding",r+=2,t-=2;break}}for(i=r-1,t++;++i<=t;)l===void 0?i!==t&&e[i][1].type!=="lineEnding"&&(l=i):(i===t||e[i][1].type==="lineEnding")&&(e[l][1].type="codeTextData",i!==l+2&&(e[l][1].end=e[i-1][1].end,e.splice(l+2,i-l-2),t-=i-l-2,i=l+2),l=void 0);return e}function K$(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function Q$(e,t,r){let i=0,l,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),d(m)}function d(m){return m===96?(e.consume(m),i++,d):(e.exit("codeTextSequence"),f(m))}function f(m){return m===null?r(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),f):m===96?(a=e.enter("codeTextSequence"),l=0,g(m)):je(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),f):(e.enter("codeTextData"),p(m))}function p(m){return m===null||m===32||m===96||je(m)?(e.exit("codeTextData"),f(m)):(e.consume(m),p)}function g(m){return m===96?(e.consume(m),l++,g):l===i?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",p(m))}}class Y${constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,r){const i=r??Number.POSITIVE_INFINITY;return i<this.left.length?this.left.slice(t,i):t>this.left.length?this.right.slice(this.right.length-i+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-i+this.left.length).reverse())}splice(t,r,i){const l=r||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-l,Number.POSITIVE_INFINITY);return i&&Zi(this.left,i),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Zi(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Zi(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const r=this.left.splice(t,Number.POSITIVE_INFINITY);Zi(this.right,r.reverse())}else{const r=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Zi(this.left,r.reverse())}}}function Zi(e,t){let r=0;if(t.length<1e4)e.push(...t);else for(;r<t.length;)e.push(...t.slice(r,r+1e4)),r+=1e4}function L0(e){const t={};let r=-1,i,l,a,u,d,f,p;const g=new Y$(e);for(;++r<g.length;){for(;r in t;)r=t[r];if(i=g.get(r),r&&i[1].type==="chunkFlow"&&g.get(r-1)[1].type==="listItemPrefix"&&(f=i[1]._tokenizer.events,a=0,a<f.length&&f[a][1].type==="lineEndingBlank"&&(a+=2),a<f.length&&f[a][1].type==="content"))for(;++a<f.length&&f[a][1].type!=="content";)f[a][1].type==="chunkText"&&(f[a][1]._isInFirstContentOfListItem=!0,a++);if(i[0]==="enter")i[1].contentType&&(Object.assign(t,X$(g,r)),r=t[r],p=!0);else if(i[1]._container){for(a=r,l=void 0;a--;)if(u=g.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(l&&(g.get(l)[1].type="lineEndingBlank"),u[1].type="lineEnding",l=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;l&&(i[1].end={...g.get(l)[1].start},d=g.slice(l,r),d.unshift(i),g.splice(l,r-l+1,d))}}return cn(e,0,Number.POSITIVE_INFINITY,g.slice(0)),!p}function X$(e,t){const r=e.get(t)[1],i=e.get(t)[2];let l=t-1;const a=[];let u=r._tokenizer;u||(u=i.parser[r.contentType](r.start),r._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const d=u.events,f=[],p={};let g,m,v=-1,w=r,k=0,S=0;const j=[S];for(;w;){for(;e.get(++l)[1]!==w;);a.push(l),w._tokenizer||(g=i.sliceStream(w),w.next||g.push(null),m&&u.defineSkip(w.start),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(g),w._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=w,w=w.next}for(w=r;++v<d.length;)d[v][0]==="exit"&&d[v-1][0]==="enter"&&d[v][1].type===d[v-1][1].type&&d[v][1].start.line!==d[v][1].end.line&&(S=v+1,j.push(S),w._tokenizer=void 0,w.previous=void 0,w=w.next);for(u.events=[],w?(w._tokenizer=void 0,w.previous=void 0):j.pop(),v=j.length;v--;){const E=d.slice(j[v],j[v+1]),P=a.pop();f.push([P,P+E.length-1]),e.splice(P,2,E)}for(f.reverse(),v=-1;++v<f.length;)p[k+f[v][0]]=k+f[v][1],k+=f[v][1]-f[v][0]-1;return p}const Z$={resolve:tI,tokenize:nI},eI={partial:!0,tokenize:rI};function tI(e){return L0(e),e}function nI(e,t){let r;return i;function i(d){return e.enter("content"),r=e.enter("chunkContent",{contentType:"content"}),l(d)}function l(d){return d===null?a(d):je(d)?e.check(eI,u,a)(d):(e.consume(d),l)}function a(d){return e.exit("chunkContent"),e.exit("content"),t(d)}function u(d){return e.consume(d),e.exit("chunkContent"),r.next=e.enter("chunkContent",{contentType:"content",previous:r}),r=r.next,l}}function rI(e,t,r){const i=this;return l;function l(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Oe(e,a,"linePrefix")}function a(u){if(u===null||je(u))return r(u);const d=i.events[i.events.length-1];return!i.parser.constructs.disable.null.includes("codeIndented")&&d&&d[1].type==="linePrefix"&&d[2].sliceSerialize(d[1],!0).length>=4?t(u):e.interrupt(i.parser.constructs.flow,r,t)(u)}}function z0(e,t,r,i,l,a,u,d,f){const p=f||Number.POSITIVE_INFINITY;let g=0;return m;function m(E){return E===60?(e.enter(i),e.enter(l),e.enter(a),e.consume(E),e.exit(a),v):E===null||E===32||E===41||ca(E)?r(E):(e.enter(i),e.enter(u),e.enter(d),e.enter("chunkString",{contentType:"string"}),S(E))}function v(E){return E===62?(e.enter(a),e.consume(E),e.exit(a),e.exit(l),e.exit(i),t):(e.enter(d),e.enter("chunkString",{contentType:"string"}),w(E))}function w(E){return E===62?(e.exit("chunkString"),e.exit(d),v(E)):E===null||E===60||je(E)?r(E):(e.consume(E),E===92?k:w)}function k(E){return E===60||E===62||E===92?(e.consume(E),w):w(E)}function S(E){return!g&&(E===null||E===41||Je(E))?(e.exit("chunkString"),e.exit(d),e.exit(u),e.exit(i),t(E)):g<p&&E===40?(e.consume(E),g++,S):E===41?(e.consume(E),g--,S):E===null||E===32||E===40||ca(E)?r(E):(e.consume(E),E===92?j:S)}function j(E){return E===40||E===41||E===92?(e.consume(E),S):S(E)}}function F0(e,t,r,i,l,a){const u=this;let d=0,f;return p;function p(w){return e.enter(i),e.enter(l),e.consume(w),e.exit(l),e.enter(a),g}function g(w){return d>999||w===null||w===91||w===93&&!f||w===94&&!d&&"_hiddenFootnoteSupport"in u.parser.constructs?r(w):w===93?(e.exit(a),e.enter(l),e.consume(w),e.exit(l),e.exit(i),t):je(w)?(e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),g):(e.enter("chunkString",{contentType:"string"}),m(w))}function m(w){return w===null||w===91||w===93||je(w)||d++>999?(e.exit("chunkString"),g(w)):(e.consume(w),f||(f=!ze(w)),w===92?v:m)}function v(w){return w===91||w===92||w===93?(e.consume(w),d++,m):m(w)}}function _0(e,t,r,i,l,a){let u;return d;function d(v){return v===34||v===39||v===40?(e.enter(i),e.enter(l),e.consume(v),e.exit(l),u=v===40?41:v,f):r(v)}function f(v){return v===u?(e.enter(l),e.consume(v),e.exit(l),e.exit(i),t):(e.enter(a),p(v))}function p(v){return v===u?(e.exit(a),f(u)):v===null?r(v):je(v)?(e.enter("lineEnding"),e.consume(v),e.exit("lineEnding"),Oe(e,p,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),g(v))}function g(v){return v===u||v===null||je(v)?(e.exit("chunkString"),p(v)):(e.consume(v),v===92?m:g)}function m(v){return v===u||v===92?(e.consume(v),g):g(v)}}function ll(e,t){let r;return i;function i(l){return je(l)?(e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),r=!0,i):ze(l)?Oe(e,i,r?"linePrefix":"lineSuffix")(l):t(l)}}const oI={name:"definition",tokenize:lI},iI={partial:!0,tokenize:sI};function lI(e,t,r){const i=this;let l;return a;function a(w){return e.enter("definition"),u(w)}function u(w){return F0.call(i,e,d,r,"definitionLabel","definitionLabelMarker","definitionLabelString")(w)}function d(w){return l=Rn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)),w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),f):r(w)}function f(w){return Je(w)?ll(e,p)(w):p(w)}function p(w){return z0(e,g,r,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(w)}function g(w){return e.attempt(iI,m,m)(w)}function m(w){return ze(w)?Oe(e,v,"whitespace")(w):v(w)}function v(w){return w===null||je(w)?(e.exit("definition"),i.parser.defined.push(l),t(w)):r(w)}}function sI(e,t,r){return i;function i(d){return Je(d)?ll(e,l)(d):r(d)}function l(d){return _0(e,a,r,"definitionTitle","definitionTitleMarker","definitionTitleString")(d)}function a(d){return ze(d)?Oe(e,u,"whitespace")(d):u(d)}function u(d){return d===null||je(d)?t(d):r(d)}}const aI={name:"hardBreakEscape",tokenize:uI};function uI(e,t,r){return i;function i(a){return e.enter("hardBreakEscape"),e.consume(a),l}function l(a){return je(a)?(e.exit("hardBreakEscape"),t(a)):r(a)}}const cI={name:"headingAtx",resolve:dI,tokenize:fI};function dI(e,t){let r=e.length-2,i=3,l,a;return e[i][1].type==="whitespace"&&(i+=2),r-2>i&&e[r][1].type==="whitespace"&&(r-=2),e[r][1].type==="atxHeadingSequence"&&(i===r-1||r-4>i&&e[r-2][1].type==="whitespace")&&(r-=i+1===r?2:4),r>i&&(l={type:"atxHeadingText",start:e[i][1].start,end:e[r][1].end},a={type:"chunkText",start:e[i][1].start,end:e[r][1].end,contentType:"text"},cn(e,i,r-i+1,[["enter",l,t],["enter",a,t],["exit",a,t],["exit",l,t]])),e}function fI(e,t,r){let i=0;return l;function l(g){return e.enter("atxHeading"),a(g)}function a(g){return e.enter("atxHeadingSequence"),u(g)}function u(g){return g===35&&i++<6?(e.consume(g),u):g===null||Je(g)?(e.exit("atxHeadingSequence"),d(g)):r(g)}function d(g){return g===35?(e.enter("atxHeadingSequence"),f(g)):g===null||je(g)?(e.exit("atxHeading"),t(g)):ze(g)?Oe(e,d,"whitespace")(g):(e.enter("atxHeadingText"),p(g))}function f(g){return g===35?(e.consume(g),f):(e.exit("atxHeadingSequence"),d(g))}function p(g){return g===null||g===35||Je(g)?(e.exit("atxHeadingText"),d(g)):(e.consume(g),p)}}const pI=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],zg=["pre","script","style","textarea"],hI={concrete:!0,name:"htmlFlow",resolveTo:yI,tokenize:xI},mI={partial:!0,tokenize:wI},gI={partial:!0,tokenize:vI};function yI(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function xI(e,t,r){const i=this;let l,a,u,d,f;return p;function p(I){return g(I)}function g(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),v):I===47?(e.consume(I),a=!0,S):I===63?(e.consume(I),l=3,i.interrupt?t:T):Mt(I)?(e.consume(I),u=String.fromCharCode(I),j):r(I)}function v(I){return I===45?(e.consume(I),l=2,w):I===91?(e.consume(I),l=5,d=0,k):Mt(I)?(e.consume(I),l=4,i.interrupt?t:T):r(I)}function w(I){return I===45?(e.consume(I),i.interrupt?t:T):r(I)}function k(I){const ce="CDATA[";return I===ce.charCodeAt(d++)?(e.consume(I),d===ce.length?i.interrupt?t:le:k):r(I)}function S(I){return Mt(I)?(e.consume(I),u=String.fromCharCode(I),j):r(I)}function j(I){if(I===null||I===47||I===62||Je(I)){const ce=I===47,xe=u.toLowerCase();return!ce&&!a&&zg.includes(xe)?(l=1,i.interrupt?t(I):le(I)):pI.includes(u.toLowerCase())?(l=6,ce?(e.consume(I),E):i.interrupt?t(I):le(I)):(l=7,i.interrupt&&!i.parser.lazy[i.now().line]?r(I):a?P(I):N(I))}return I===45||At(I)?(e.consume(I),u+=String.fromCharCode(I),j):r(I)}function E(I){return I===62?(e.consume(I),i.interrupt?t:le):r(I)}function P(I){return ze(I)?(e.consume(I),P):O(I)}function N(I){return I===47?(e.consume(I),O):I===58||I===95||Mt(I)?(e.consume(I),_):ze(I)?(e.consume(I),N):O(I)}function _(I){return I===45||I===46||I===58||I===95||At(I)?(e.consume(I),_):q(I)}function q(I){return I===61?(e.consume(I),A):ze(I)?(e.consume(I),q):N(I)}function A(I){return I===null||I===60||I===61||I===62||I===96?r(I):I===34||I===39?(e.consume(I),f=I,H):ze(I)?(e.consume(I),A):K(I)}function H(I){return I===f?(e.consume(I),f=null,te):I===null||je(I)?r(I):(e.consume(I),H)}function K(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||Je(I)?q(I):(e.consume(I),K)}function te(I){return I===47||I===62||ze(I)?N(I):r(I)}function O(I){return I===62?(e.consume(I),Z):r(I)}function Z(I){return I===null||je(I)?le(I):ze(I)?(e.consume(I),Z):r(I)}function le(I){return I===45&&l===2?(e.consume(I),pe):I===60&&l===1?(e.consume(I),ae):I===62&&l===4?(e.consume(I),z):I===63&&l===3?(e.consume(I),T):I===93&&l===5?(e.consume(I),de):je(I)&&(l===6||l===7)?(e.exit("htmlFlowData"),e.check(mI,G,X)(I)):I===null||je(I)?(e.exit("htmlFlowData"),X(I)):(e.consume(I),le)}function X(I){return e.check(gI,ne,G)(I)}function ne(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),B}function B(I){return I===null||je(I)?X(I):(e.enter("htmlFlowData"),le(I))}function pe(I){return I===45?(e.consume(I),T):le(I)}function ae(I){return I===47?(e.consume(I),u="",Q):le(I)}function Q(I){if(I===62){const ce=u.toLowerCase();return zg.includes(ce)?(e.consume(I),z):le(I)}return Mt(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),Q):le(I)}function de(I){return I===93?(e.consume(I),T):le(I)}function T(I){return I===62?(e.consume(I),z):I===45&&l===2?(e.consume(I),T):le(I)}function z(I){return I===null||je(I)?(e.exit("htmlFlowData"),G(I)):(e.consume(I),z)}function G(I){return e.exit("htmlFlow"),t(I)}}function vI(e,t,r){const i=this;return l;function l(u){return je(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):r(u)}function a(u){return i.parser.lazy[i.now().line]?r(u):t(u)}}function wI(e,t,r){return i;function i(l){return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),e.attempt(wl,t,r)}}const kI={name:"htmlText",tokenize:bI};function bI(e,t,r){const i=this;let l,a,u;return d;function d(T){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(T),f}function f(T){return T===33?(e.consume(T),p):T===47?(e.consume(T),q):T===63?(e.consume(T),N):Mt(T)?(e.consume(T),K):r(T)}function p(T){return T===45?(e.consume(T),g):T===91?(e.consume(T),a=0,k):Mt(T)?(e.consume(T),P):r(T)}function g(T){return T===45?(e.consume(T),w):r(T)}function m(T){return T===null?r(T):T===45?(e.consume(T),v):je(T)?(u=m,ae(T)):(e.consume(T),m)}function v(T){return T===45?(e.consume(T),w):m(T)}function w(T){return T===62?pe(T):T===45?v(T):m(T)}function k(T){const z="CDATA[";return T===z.charCodeAt(a++)?(e.consume(T),a===z.length?S:k):r(T)}function S(T){return T===null?r(T):T===93?(e.consume(T),j):je(T)?(u=S,ae(T)):(e.consume(T),S)}function j(T){return T===93?(e.consume(T),E):S(T)}function E(T){return T===62?pe(T):T===93?(e.consume(T),E):S(T)}function P(T){return T===null||T===62?pe(T):je(T)?(u=P,ae(T)):(e.consume(T),P)}function N(T){return T===null?r(T):T===63?(e.consume(T),_):je(T)?(u=N,ae(T)):(e.consume(T),N)}function _(T){return T===62?pe(T):N(T)}function q(T){return Mt(T)?(e.consume(T),A):r(T)}function A(T){return T===45||At(T)?(e.consume(T),A):H(T)}function H(T){return je(T)?(u=H,ae(T)):ze(T)?(e.consume(T),H):pe(T)}function K(T){return T===45||At(T)?(e.consume(T),K):T===47||T===62||Je(T)?te(T):r(T)}function te(T){return T===47?(e.consume(T),pe):T===58||T===95||Mt(T)?(e.consume(T),O):je(T)?(u=te,ae(T)):ze(T)?(e.consume(T),te):pe(T)}function O(T){return T===45||T===46||T===58||T===95||At(T)?(e.consume(T),O):Z(T)}function Z(T){return T===61?(e.consume(T),le):je(T)?(u=Z,ae(T)):ze(T)?(e.consume(T),Z):te(T)}function le(T){return T===null||T===60||T===61||T===62||T===96?r(T):T===34||T===39?(e.consume(T),l=T,X):je(T)?(u=le,ae(T)):ze(T)?(e.consume(T),le):(e.consume(T),ne)}function X(T){return T===l?(e.consume(T),l=void 0,B):T===null?r(T):je(T)?(u=X,ae(T)):(e.consume(T),X)}function ne(T){return T===null||T===34||T===39||T===60||T===61||T===96?r(T):T===47||T===62||Je(T)?te(T):(e.consume(T),ne)}function B(T){return T===47||T===62||Je(T)?te(T):r(T)}function pe(T){return T===62?(e.consume(T),e.exit("htmlTextData"),e.exit("htmlText"),t):r(T)}function ae(T){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),Q}function Q(T){return ze(T)?Oe(e,de,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(T):de(T)}function de(T){return e.enter("htmlTextData"),u(T)}}const xf={name:"labelEnd",resolveAll:jI,resolveTo:TI,tokenize:$I},SI={tokenize:II},CI={tokenize:RI},EI={tokenize:PI};function jI(e){let t=-1;const r=[];for(;++t<e.length;){const i=e[t][1];if(r.push(e[t]),i.type==="labelImage"||i.type==="labelLink"||i.type==="labelEnd"){const l=i.type==="labelImage"?4:2;i.type="data",t+=l}}return e.length!==r.length&&cn(e,0,e.length,r),e}function TI(e,t){let r=e.length,i=0,l,a,u,d;for(;r--;)if(l=e[r][1],a){if(l.type==="link"||l.type==="labelLink"&&l._inactive)break;e[r][0]==="enter"&&l.type==="labelLink"&&(l._inactive=!0)}else if(u){if(e[r][0]==="enter"&&(l.type==="labelImage"||l.type==="labelLink")&&!l._balanced&&(a=r,l.type!=="labelLink")){i=2;break}}else l.type==="labelEnd"&&(u=r);const f={type:e[a][1].type==="labelLink"?"link":"image",start:{...e[a][1].start},end:{...e[e.length-1][1].end}},p={type:"label",start:{...e[a][1].start},end:{...e[u][1].end}},g={type:"labelText",start:{...e[a+i+2][1].end},end:{...e[u-2][1].start}};return d=[["enter",f,t],["enter",p,t]],d=vn(d,e.slice(a+1,a+i+3)),d=vn(d,[["enter",g,t]]),d=vn(d,Pa(t.parser.constructs.insideSpan.null,e.slice(a+i+4,u-3),t)),d=vn(d,[["exit",g,t],e[u-2],e[u-1],["exit",p,t]]),d=vn(d,e.slice(u+1)),d=vn(d,[["exit",f,t]]),cn(e,a,e.length,d),e}function $I(e,t,r){const i=this;let l=i.events.length,a,u;for(;l--;)if((i.events[l][1].type==="labelImage"||i.events[l][1].type==="labelLink")&&!i.events[l][1]._balanced){a=i.events[l][1];break}return d;function d(v){return a?a._inactive?m(v):(u=i.parser.defined.includes(Rn(i.sliceSerialize({start:a.end,end:i.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(v),e.exit("labelMarker"),e.exit("labelEnd"),f):r(v)}function f(v){return v===40?e.attempt(SI,g,u?g:m)(v):v===91?e.attempt(CI,g,u?p:m)(v):u?g(v):m(v)}function p(v){return e.attempt(EI,g,m)(v)}function g(v){return t(v)}function m(v){return a._balanced=!0,r(v)}}function II(e,t,r){return i;function i(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),l}function l(m){return Je(m)?ll(e,a)(m):a(m)}function a(m){return m===41?g(m):z0(e,u,d,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return Je(m)?ll(e,f)(m):g(m)}function d(m){return r(m)}function f(m){return m===34||m===39||m===40?_0(e,p,r,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):g(m)}function p(m){return Je(m)?ll(e,g)(m):g(m)}function g(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):r(m)}}function RI(e,t,r){const i=this;return l;function l(d){return F0.call(i,e,a,u,"reference","referenceMarker","referenceString")(d)}function a(d){return i.parser.defined.includes(Rn(i.sliceSerialize(i.events[i.events.length-1][1]).slice(1,-1)))?t(d):r(d)}function u(d){return r(d)}}function PI(e,t,r){return i;function i(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),l}function l(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):r(a)}}const NI={name:"labelStartImage",resolveAll:xf.resolveAll,tokenize:AI};function AI(e,t,r){const i=this;return l;function l(d){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(d),e.exit("labelImageMarker"),a}function a(d){return d===91?(e.enter("labelMarker"),e.consume(d),e.exit("labelMarker"),e.exit("labelImage"),u):r(d)}function u(d){return d===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(d):t(d)}}const LI={name:"labelStartLink",resolveAll:xf.resolveAll,tokenize:zI};function zI(e,t,r){const i=this;return l;function l(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in i.parser.constructs?r(u):t(u)}}const Dc={name:"lineEnding",tokenize:FI};function FI(e,t){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),Oe(e,t,"linePrefix")}}const ea={name:"thematicBreak",tokenize:_I};function _I(e,t,r){let i=0,l;return a;function a(p){return e.enter("thematicBreak"),u(p)}function u(p){return l=p,d(p)}function d(p){return p===l?(e.enter("thematicBreakSequence"),f(p)):i>=3&&(p===null||je(p))?(e.exit("thematicBreak"),t(p)):r(p)}function f(p){return p===l?(e.consume(p),i++,f):(e.exit("thematicBreakSequence"),ze(p)?Oe(e,d,"whitespace")(p):d(p))}}const Jt={continuation:{tokenize:BI},exit:VI,name:"list",tokenize:MI},OI={partial:!0,tokenize:HI},DI={partial:!0,tokenize:UI};function MI(e,t,r){const i=this,l=i.events[i.events.length-1];let a=l&&l[1].type==="linePrefix"?l[2].sliceSerialize(l[1],!0).length:0,u=0;return d;function d(w){const k=i.containerState.type||(w===42||w===43||w===45?"listUnordered":"listOrdered");if(k==="listUnordered"?!i.containerState.marker||w===i.containerState.marker:jd(w)){if(i.containerState.type||(i.containerState.type=k,e.enter(k,{_container:!0})),k==="listUnordered")return e.enter("listItemPrefix"),w===42||w===45?e.check(ea,r,p)(w):p(w);if(!i.interrupt||w===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),f(w)}return r(w)}function f(w){return jd(w)&&++u<10?(e.consume(w),f):(!i.interrupt||u<2)&&(i.containerState.marker?w===i.containerState.marker:w===41||w===46)?(e.exit("listItemValue"),p(w)):r(w)}function p(w){return e.enter("listItemMarker"),e.consume(w),e.exit("listItemMarker"),i.containerState.marker=i.containerState.marker||w,e.check(wl,i.interrupt?r:g,e.attempt(OI,v,m))}function g(w){return i.containerState.initialBlankLine=!0,a++,v(w)}function m(w){return ze(w)?(e.enter("listItemPrefixWhitespace"),e.consume(w),e.exit("listItemPrefixWhitespace"),v):r(w)}function v(w){return i.containerState.size=a+i.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(w)}}function BI(e,t,r){const i=this;return i.containerState._closeFlow=void 0,e.check(wl,l,a);function l(d){return i.containerState.furtherBlankLines=i.containerState.furtherBlankLines||i.containerState.initialBlankLine,Oe(e,t,"listItemIndent",i.containerState.size+1)(d)}function a(d){return i.containerState.furtherBlankLines||!ze(d)?(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,u(d)):(i.containerState.furtherBlankLines=void 0,i.containerState.initialBlankLine=void 0,e.attempt(DI,t,u)(d))}function u(d){return i.containerState._closeFlow=!0,i.interrupt=void 0,Oe(e,e.attempt(Jt,t,r),"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(d)}}function UI(e,t,r){const i=this;return Oe(e,l,"listItemIndent",i.containerState.size+1);function l(a){const u=i.events[i.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===i.containerState.size?t(a):r(a)}}function VI(e){e.exit(this.containerState.type)}function HI(e,t,r){const i=this;return Oe(e,l,"listItemPrefixWhitespace",i.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function l(a){const u=i.events[i.events.length-1];return!ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):r(a)}}const Fg={name:"setextUnderline",resolveTo:WI,tokenize:qI};function WI(e,t){let r=e.length,i,l,a;for(;r--;)if(e[r][0]==="enter"){if(e[r][1].type==="content"){i=r;break}e[r][1].type==="paragraph"&&(l=r)}else e[r][1].type==="content"&&e.splice(r,1),!a&&e[r][1].type==="definition"&&(a=r);const u={type:"setextHeading",start:{...e[i][1].start},end:{...e[e.length-1][1].end}};return e[l][1].type="setextHeadingText",a?(e.splice(l,0,["enter",u,t]),e.splice(a+1,0,["exit",e[i][1],t]),e[i][1].end={...e[a][1].end}):e[i][1]=u,e.push(["exit",u,t]),e}function qI(e,t,r){const i=this;let l;return a;function a(p){let g=i.events.length,m;for(;g--;)if(i.events[g][1].type!=="lineEnding"&&i.events[g][1].type!=="linePrefix"&&i.events[g][1].type!=="content"){m=i.events[g][1].type==="paragraph";break}return!i.parser.lazy[i.now().line]&&(i.interrupt||m)?(e.enter("setextHeadingLine"),l=p,u(p)):r(p)}function u(p){return e.enter("setextHeadingLineSequence"),d(p)}function d(p){return p===l?(e.consume(p),d):(e.exit("setextHeadingLineSequence"),ze(p)?Oe(e,f,"lineSuffix")(p):f(p))}function f(p){return p===null||je(p)?(e.exit("setextHeadingLine"),t(p)):r(p)}}const GI={tokenize:JI};function JI(e){const t=this,r=e.attempt(wl,i,e.attempt(this.parser.constructs.flowInitial,l,Oe(e,e.attempt(this.parser.constructs.flow,l,e.attempt(Z$,l)),"linePrefix")));return r;function i(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,r}function l(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,r}}const KI={resolveAll:D0()},QI=O0("string"),YI=O0("text");function O0(e){return{resolveAll:D0(e==="text"?XI:void 0),tokenize:t};function t(r){const i=this,l=this.parser.constructs[e],a=r.attempt(l,u,d);return u;function u(g){return p(g)?a(g):d(g)}function d(g){if(g===null){r.consume(g);return}return r.enter("data"),r.consume(g),f}function f(g){return p(g)?(r.exit("data"),a(g)):(r.consume(g),f)}function p(g){if(g===null)return!0;const m=l[g];let v=-1;if(m)for(;++v<m.length;){const w=m[v];if(!w.previous||w.previous.call(i,i.previous))return!0}return!1}}}function D0(e){return t;function t(r,i){let l=-1,a;for(;++l<=r.length;)a===void 0?r[l]&&r[l][1].type==="data"&&(a=l,l++):(!r[l]||r[l][1].type!=="data")&&(l!==a+2&&(r[a][1].end=r[l-1][1].end,r.splice(a+2,l-a-2),l=a+2),a=void 0);return e?e(r,i):r}}function XI(e,t){let r=0;for(;++r<=e.length;)if((r===e.length||e[r][1].type==="lineEnding")&&e[r-1][1].type==="data"){const i=e[r-1][1],l=t.sliceStream(i);let a=l.length,u=-1,d=0,f;for(;a--;){const p=l[a];if(typeof p=="string"){for(u=p.length;p.charCodeAt(u-1)===32;)d++,u--;if(u)break;u=-1}else if(p===-2)f=!0,d++;else if(p!==-1){a++;break}}if(t._contentTypeTextTrailing&&r===e.length&&(d=0),d){const p={type:r===e.length||f||d<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:i.start._bufferIndex+u,_index:i.start._index+a,line:i.end.line,column:i.end.column-d,offset:i.end.offset-d},end:{...i.end}};i.end={...p.start},i.start.offset===i.end.offset?Object.assign(i,p):(e.splice(r,0,["enter",p,t],["exit",p,t]),r+=2)}r++}return e}const ZI={42:Jt,43:Jt,45:Jt,48:Jt,49:Jt,50:Jt,51:Jt,52:Jt,53:Jt,54:Jt,55:Jt,56:Jt,57:Jt,62:P0},eR={91:oI},tR={[-2]:Oc,[-1]:Oc,32:Oc},nR={35:cI,42:ea,45:[Fg,ea],60:hI,61:Fg,95:ea,96:Lg,126:Lg},rR={38:A0,92:N0},oR={[-5]:Dc,[-4]:Dc,[-3]:Dc,33:NI,38:A0,42:Td,60:[L$,kI],91:LI,92:[aI,N0],93:xf,95:Td,96:G$},iR={null:[Td,KI]},lR={null:[42,95]},sR={null:[]},aR=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:lR,contentInitial:eR,disable:sR,document:ZI,flow:nR,flowInitial:tR,insideSpan:iR,string:rR,text:oR},Symbol.toStringTag,{value:"Module"}));function uR(e,t,r){let i={_bufferIndex:-1,_index:0,line:r&&r.line||1,column:r&&r.column||1,offset:r&&r.offset||0};const l={},a=[];let u=[],d=[];const f={attempt:H(q),check:H(A),consume:P,enter:N,exit:_,interrupt:H(A,{interrupt:!0})},p={code:null,containerState:{},defineSkip:S,events:[],now:k,parser:e,previous:null,sliceSerialize:v,sliceStream:w,write:m};let g=t.tokenize.call(p,f);return t.resolveAll&&a.push(t),p;function m(Z){return u=vn(u,Z),j(),u[u.length-1]!==null?[]:(K(t,0),p.events=Pa(a,p.events,p),p.events)}function v(Z,le){return dR(w(Z),le)}function w(Z){return cR(u,Z)}function k(){const{_bufferIndex:Z,_index:le,line:X,column:ne,offset:B}=i;return{_bufferIndex:Z,_index:le,line:X,column:ne,offset:B}}function S(Z){l[Z.line]=Z.column,O()}function j(){let Z;for(;i._index<u.length;){const le=u[i._index];if(typeof le=="string")for(Z=i._index,i._bufferIndex<0&&(i._bufferIndex=0);i._index===Z&&i._bufferIndex<le.length;)E(le.charCodeAt(i._bufferIndex));else E(le)}}function E(Z){g=g(Z)}function P(Z){je(Z)?(i.line++,i.column=1,i.offset+=Z===-3?2:1,O()):Z!==-1&&(i.column++,i.offset++),i._bufferIndex<0?i._index++:(i._bufferIndex++,i._bufferIndex===u[i._index].length&&(i._bufferIndex=-1,i._index++)),p.previous=Z}function N(Z,le){const X=le||{};return X.type=Z,X.start=k(),p.events.push(["enter",X,p]),d.push(X),X}function _(Z){const le=d.pop();return le.end=k(),p.events.push(["exit",le,p]),le}function q(Z,le){K(Z,le.from)}function A(Z,le){le.restore()}function H(Z,le){return X;function X(ne,B,pe){let ae,Q,de,T;return Array.isArray(ne)?G(ne):"tokenize"in ne?G([ne]):z(ne);function z(ke){return he;function he(fe){const se=fe!==null&&ke[fe],ve=fe!==null&&ke.null,Ae=[...Array.isArray(se)?se:se?[se]:[],...Array.isArray(ve)?ve:ve?[ve]:[]];return G(Ae)(fe)}}function G(ke){return ae=ke,Q=0,ke.length===0?pe:I(ke[Q])}function I(ke){return he;function he(fe){return T=te(),de=ke,ke.partial||(p.currentConstruct=ke),ke.name&&p.parser.constructs.disable.null.includes(ke.name)?xe():ke.tokenize.call(le?Object.assign(Object.create(p),le):p,f,ce,xe)(fe)}}function ce(ke){return Z(de,T),B}function xe(ke){return T.restore(),++Q<ae.length?I(ae[Q]):pe}}}function K(Z,le){Z.resolveAll&&!a.includes(Z)&&a.push(Z),Z.resolve&&cn(p.events,le,p.events.length-le,Z.resolve(p.events.slice(le),p)),Z.resolveTo&&(p.events=Z.resolveTo(p.events,p))}function te(){const Z=k(),le=p.previous,X=p.currentConstruct,ne=p.events.length,B=Array.from(d);return{from:ne,restore:pe};function pe(){i=Z,p.previous=le,p.currentConstruct=X,p.events.length=ne,d=B,O()}}function O(){i.line in l&&i.column<2&&(i.column=l[i.line],i.offset+=l[i.line]-1)}}function cR(e,t){const r=t.start._index,i=t.start._bufferIndex,l=t.end._index,a=t.end._bufferIndex;let u;if(r===l)u=[e[r].slice(i,a)];else{if(u=e.slice(r,l),i>-1){const d=u[0];typeof d=="string"?u[0]=d.slice(i):u.shift()}a>0&&u.push(e[l].slice(0,a))}return u}function dR(e,t){let r=-1;const i=[];let l;for(;++r<e.length;){const a=e[r];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
1369
+ `;break}case-3:{u=`\r
1370
+ `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&l)continue;u=" ";break}default:u=String.fromCharCode(a)}l=a===-2,i.push(u)}return i.join("")}function fR(e){const i={constructs:I0([aR,...(e||{}).extensions||[]]),content:l(T$),defined:[],document:l(I$),flow:l(GI),lazy:{},string:l(QI),text:l(YI)};return i;function l(a){return u;function u(d){return uR(i,a,d)}}}function pR(e){for(;!L0(e););return e}const _g=/[\0\t\n\r]/g;function hR(){let e=1,t="",r=!0,i;return l;function l(a,u,d){const f=[];let p,g,m,v,w;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",r&&(a.charCodeAt(0)===65279&&m++,r=void 0);m<a.length;){if(_g.lastIndex=m,p=_g.exec(a),v=p&&p.index!==void 0?p.index:a.length,w=a.charCodeAt(v),!p){t=a.slice(m);break}if(w===10&&m===v&&i)f.push(-3),i=void 0;else switch(i&&(f.push(-5),i=void 0),m<v&&(f.push(a.slice(m,v)),e+=v-m),w){case 0:{f.push(65533),e++;break}case 9:{for(g=Math.ceil(e/4)*4,f.push(-2);e++<g;)f.push(-1);break}case 10:{f.push(-4),e=1;break}default:i=!0,e=1}m=v+1}return d&&(i&&f.push(-5),t&&f.push(t),f.push(null)),f}}const mR=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function gR(e){return e.replace(mR,yR)}function yR(e,t,r){if(t)return t;if(r.charCodeAt(0)===35){const l=r.charCodeAt(1),a=l===120||l===88;return R0(r.slice(a?2:1),a?16:10)}return yf(r)||e}const M0={}.hasOwnProperty;function xR(e,t,r){return typeof t!="string"&&(r=t,t=void 0),vR(r)(pR(fR(r).document().write(hR()(e,t,!0))))}function vR(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ft),autolinkProtocol:te,autolinkEmail:te,atxHeading:a(zt),blockQuote:a(ve),characterEscape:te,characterReference:te,codeFenced:a(Ae),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Ae,u),codeText:a(Ie,u),codeTextData:te,data:te,codeFlowValue:te,definition:a(Ge),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(jt),hardBreakEscape:a(Bt),hardBreakTrailing:a(Bt),htmlFlow:a(or,u),htmlFlowData:te,htmlText:a(or,u),htmlTextData:te,image:a(De),label:u,link:a(Ft),listItem:a(pt),listItemValue:v,listOrdered:a(Zt,m),listUnordered:a(Zt),paragraph:a(_e),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(zt),strong:a(ht),thematicBreak:a(_t)},exit:{atxHeading:f(),atxHeadingSequence:q,autolink:f(),autolinkEmail:se,autolinkProtocol:fe,blockQuote:f(),characterEscapeValue:O,characterReferenceMarkerHexadecimal:xe,characterReferenceMarkerNumeric:xe,characterReferenceValue:ke,characterReference:he,codeFenced:f(j),codeFencedFence:S,codeFencedFenceInfo:w,codeFencedFenceMeta:k,codeFlowValue:O,codeIndented:f(E),codeText:f(B),codeTextData:O,data:O,definition:f(),definitionDestinationString:_,definitionLabelString:P,definitionTitleString:N,emphasis:f(),hardBreakEscape:f(le),hardBreakTrailing:f(le),htmlFlow:f(X),htmlFlowData:O,htmlText:f(ne),htmlTextData:O,image:f(ae),label:de,labelText:Q,lineEnding:Z,link:f(pe),listItem:f(),listOrdered:f(),listUnordered:f(),paragraph:f(),referenceString:ce,resourceDestinationString:T,resourceTitleString:z,resource:G,setextHeading:f(K),setextHeadingLineSequence:H,setextHeadingText:A,strong:f(),thematicBreak:f()}};B0(t,(e||{}).mdastExtensions||[]);const r={};return i;function i(W){let re={type:"root",children:[]};const Se={stack:[re],tokenStack:[],config:t,enter:d,exit:p,buffer:u,resume:g,data:r},$e=[];let Me=-1;for(;++Me<W.length;)if(W[Me][1].type==="listOrdered"||W[Me][1].type==="listUnordered")if(W[Me][0]==="enter")$e.push(Me);else{const kt=$e.pop();Me=l(W,kt,Me)}for(Me=-1;++Me<W.length;){const kt=t[W[Me][0]];M0.call(kt,W[Me][1].type)&&kt[W[Me][1].type].call(Object.assign({sliceSerialize:W[Me][2].sliceSerialize},Se),W[Me][1])}if(Se.tokenStack.length>0){const kt=Se.tokenStack[Se.tokenStack.length-1];(kt[1]||Og).call(Se,void 0,kt[0])}for(re.position={start:Tr(W.length>0?W[0][1].start:{line:1,column:1,offset:0}),end:Tr(W.length>0?W[W.length-2][1].end:{line:1,column:1,offset:0})},Me=-1;++Me<t.transforms.length;)re=t.transforms[Me](re)||re;return re}function l(W,re,Se){let $e=re-1,Me=-1,kt=!1,qn,fn,ir,Lr;for(;++$e<=Se;){const bt=W[$e];switch(bt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{bt[0]==="enter"?Me++:Me--,Lr=void 0;break}case"lineEndingBlank":{bt[0]==="enter"&&(qn&&!Lr&&!Me&&!ir&&(ir=$e),Lr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:Lr=void 0}if(!Me&&bt[0]==="enter"&&bt[1].type==="listItemPrefix"||Me===-1&&bt[0]==="exit"&&(bt[1].type==="listUnordered"||bt[1].type==="listOrdered")){if(qn){let An=$e;for(fn=void 0;An--;){const en=W[An];if(en[1].type==="lineEnding"||en[1].type==="lineEndingBlank"){if(en[0]==="exit")continue;fn&&(W[fn][1].type="lineEndingBlank",kt=!0),en[1].type="lineEnding",fn=An}else if(!(en[1].type==="linePrefix"||en[1].type==="blockQuotePrefix"||en[1].type==="blockQuotePrefixWhitespace"||en[1].type==="blockQuoteMarker"||en[1].type==="listItemIndent"))break}ir&&(!fn||ir<fn)&&(qn._spread=!0),qn.end=Object.assign({},fn?W[fn][1].start:bt[1].end),W.splice(fn||$e,0,["exit",qn,bt[2]]),$e++,Se++}if(bt[1].type==="listItemPrefix"){const An={type:"listItem",_spread:!1,start:Object.assign({},bt[1].start),end:void 0};qn=An,W.splice($e,0,["enter",An,bt[2]]),$e++,Se++,ir=void 0,Lr=!0}}}return W[re][1]._spread=kt,Se}function a(W,re){return Se;function Se($e){d.call(this,W($e),$e),re&&re.call(this,$e)}}function u(){this.stack.push({type:"fragment",children:[]})}function d(W,re,Se){this.stack[this.stack.length-1].children.push(W),this.stack.push(W),this.tokenStack.push([re,Se||void 0]),W.position={start:Tr(re.start),end:void 0}}function f(W){return re;function re(Se){W&&W.call(this,Se),p.call(this,Se)}}function p(W,re){const Se=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==W.type&&(re?re.call(this,W,$e[0]):($e[1]||Og).call(this,W,$e[0]));else throw new Error("Cannot close `"+W.type+"` ("+il({start:W.start,end:W.end})+"): it’s not open");Se.position.end=Tr(W.end)}function g(){return gf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function v(W){if(this.data.expectingFirstListItemValue){const re=this.stack[this.stack.length-2];re.start=Number.parseInt(this.sliceSerialize(W),10),this.data.expectingFirstListItemValue=void 0}}function w(){const W=this.resume(),re=this.stack[this.stack.length-1];re.lang=W}function k(){const W=this.resume(),re=this.stack[this.stack.length-1];re.meta=W}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function j(){const W=this.resume(),re=this.stack[this.stack.length-1];re.value=W.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function E(){const W=this.resume(),re=this.stack[this.stack.length-1];re.value=W.replace(/(\r?\n|\r)$/g,"")}function P(W){const re=this.resume(),Se=this.stack[this.stack.length-1];Se.label=re,Se.identifier=Rn(this.sliceSerialize(W)).toLowerCase()}function N(){const W=this.resume(),re=this.stack[this.stack.length-1];re.title=W}function _(){const W=this.resume(),re=this.stack[this.stack.length-1];re.url=W}function q(W){const re=this.stack[this.stack.length-1];if(!re.depth){const Se=this.sliceSerialize(W).length;re.depth=Se}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function H(W){const re=this.stack[this.stack.length-1];re.depth=this.sliceSerialize(W).codePointAt(0)===61?1:2}function K(){this.data.setextHeadingSlurpLineEnding=void 0}function te(W){const Se=this.stack[this.stack.length-1].children;let $e=Se[Se.length-1];(!$e||$e.type!=="text")&&($e=Tt(),$e.position={start:Tr(W.start),end:void 0},Se.push($e)),this.stack.push($e)}function O(W){const re=this.stack.pop();re.value+=this.sliceSerialize(W),re.position.end=Tr(W.end)}function Z(W){const re=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Se=re.children[re.children.length-1];Se.position.end=Tr(W.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(re.type)&&(te.call(this,W),O.call(this,W))}function le(){this.data.atHardBreak=!0}function X(){const W=this.resume(),re=this.stack[this.stack.length-1];re.value=W}function ne(){const W=this.resume(),re=this.stack[this.stack.length-1];re.value=W}function B(){const W=this.resume(),re=this.stack[this.stack.length-1];re.value=W}function pe(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=re,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function ae(){const W=this.stack[this.stack.length-1];if(this.data.inReference){const re=this.data.referenceType||"shortcut";W.type+="Reference",W.referenceType=re,delete W.url,delete W.title}else delete W.identifier,delete W.label;this.data.referenceType=void 0}function Q(W){const re=this.sliceSerialize(W),Se=this.stack[this.stack.length-2];Se.label=gR(re),Se.identifier=Rn(re).toLowerCase()}function de(){const W=this.stack[this.stack.length-1],re=this.resume(),Se=this.stack[this.stack.length-1];if(this.data.inReference=!0,Se.type==="link"){const $e=W.children;Se.children=$e}else Se.alt=re}function T(){const W=this.resume(),re=this.stack[this.stack.length-1];re.url=W}function z(){const W=this.resume(),re=this.stack[this.stack.length-1];re.title=W}function G(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ce(W){const re=this.resume(),Se=this.stack[this.stack.length-1];Se.label=re,Se.identifier=Rn(this.sliceSerialize(W)).toLowerCase(),this.data.referenceType="full"}function xe(W){this.data.characterReferenceType=W.type}function ke(W){const re=this.sliceSerialize(W),Se=this.data.characterReferenceType;let $e;Se?($e=R0(re,Se==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=yf(re);const Me=this.stack[this.stack.length-1];Me.value+=$e}function he(W){const re=this.stack.pop();re.position.end=Tr(W.end)}function fe(W){O.call(this,W);const re=this.stack[this.stack.length-1];re.url=this.sliceSerialize(W)}function se(W){O.call(this,W);const re=this.stack[this.stack.length-1];re.url="mailto:"+this.sliceSerialize(W)}function ve(){return{type:"blockquote",children:[]}}function Ae(){return{type:"code",lang:null,meta:null,value:""}}function Ie(){return{type:"inlineCode",value:""}}function Ge(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function jt(){return{type:"emphasis",children:[]}}function zt(){return{type:"heading",depth:0,children:[]}}function Bt(){return{type:"break"}}function or(){return{type:"html",value:""}}function De(){return{type:"image",title:null,url:"",alt:null}}function Ft(){return{type:"link",title:null,url:"",children:[]}}function Zt(W){return{type:"list",ordered:W.type==="listOrdered",start:null,spread:W._spread,children:[]}}function pt(W){return{type:"listItem",spread:W._spread,checked:null,children:[]}}function _e(){return{type:"paragraph",children:[]}}function ht(){return{type:"strong",children:[]}}function Tt(){return{type:"text",value:""}}function _t(){return{type:"thematicBreak"}}}function Tr(e){return{line:e.line,column:e.column,offset:e.offset}}function B0(e,t){let r=-1;for(;++r<t.length;){const i=t[r];Array.isArray(i)?B0(e,i):wR(e,i)}}function wR(e,t){let r;for(r in t)if(M0.call(t,r))switch(r){case"canContainEols":{const i=t[r];i&&e[r].push(...i);break}case"transforms":{const i=t[r];i&&e[r].push(...i);break}case"enter":case"exit":{const i=t[r];i&&Object.assign(e[r],i);break}}}function Og(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+il({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+il({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+il({start:t.start,end:t.end})+") is still open")}function kR(e){const t=this;t.parser=r;function r(i){return xR(i,{...t.data("settings"),...e,extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]})}}function bR(e,t){const r={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,r),e.applyData(t,r)}function SR(e,t){const r={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,r),[e.applyData(t,r),{type:"text",value:`
1371
+ `}]}function CR(e,t){const r=t.value?t.value+`
1372
+ `:"",i={};t.lang&&(i.className=["language-"+t.lang]);let l={type:"element",tagName:"code",properties:i,children:[{type:"text",value:r}]};return t.meta&&(l.data={meta:t.meta}),e.patch(t,l),l=e.applyData(t,l),l={type:"element",tagName:"pre",properties:{},children:[l]},e.patch(t,l),l}function ER(e,t){const r={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function jR(e,t){const r={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function TR(e,t){const r=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",i=String(t.identifier).toUpperCase(),l=li(i.toLowerCase()),a=e.footnoteOrder.indexOf(i);let u,d=e.footnoteCounts.get(i);d===void 0?(d=0,e.footnoteOrder.push(i),u=e.footnoteOrder.length):u=a+1,d+=1,e.footnoteCounts.set(i,d);const f={type:"element",tagName:"a",properties:{href:"#"+r+"fn-"+l,id:r+"fnref-"+l+(d>1?"-"+d:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,f);const p={type:"element",tagName:"sup",properties:{},children:[f]};return e.patch(t,p),e.applyData(t,p)}function $R(e,t){const r={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function IR(e,t){if(e.options.allowDangerousHtml){const r={type:"raw",value:t.value};return e.patch(t,r),e.applyData(t,r)}}function U0(e,t){const r=t.referenceType;let i="]";if(r==="collapsed"?i+="[]":r==="full"&&(i+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+i}];const l=e.all(t),a=l[0];a&&a.type==="text"?a.value="["+a.value:l.unshift({type:"text",value:"["});const u=l[l.length-1];return u&&u.type==="text"?u.value+=i:l.push({type:"text",value:i}),l}function RR(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return U0(e,t);const l={src:li(i.url||""),alt:t.alt};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"img",properties:l,children:[]};return e.patch(t,a),e.applyData(t,a)}function PR(e,t){const r={src:li(t.url)};t.alt!==null&&t.alt!==void 0&&(r.alt=t.alt),t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"img",properties:r,children:[]};return e.patch(t,i),e.applyData(t,i)}function NR(e,t){const r={type:"text",value:t.value.replace(/\r?\n|\r/g," ")};e.patch(t,r);const i={type:"element",tagName:"code",properties:{},children:[r]};return e.patch(t,i),e.applyData(t,i)}function AR(e,t){const r=String(t.identifier).toUpperCase(),i=e.definitionById.get(r);if(!i)return U0(e,t);const l={href:li(i.url||"")};i.title!==null&&i.title!==void 0&&(l.title=i.title);const a={type:"element",tagName:"a",properties:l,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function LR(e,t){const r={href:li(t.url)};t.title!==null&&t.title!==void 0&&(r.title=t.title);const i={type:"element",tagName:"a",properties:r,children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function zR(e,t,r){const i=e.all(t),l=r?FR(r):V0(t),a={},u=[];if(typeof t.checked=="boolean"){const g=i[0];let m;g&&g.type==="element"&&g.tagName==="p"?m=g:(m={type:"element",tagName:"p",properties:{},children:[]},i.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let d=-1;for(;++d<i.length;){const g=i[d];(l||d!==0||g.type!=="element"||g.tagName!=="p")&&u.push({type:"text",value:`
1373
+ `}),g.type==="element"&&g.tagName==="p"&&!l?u.push(...g.children):u.push(g)}const f=i[i.length-1];f&&(l||f.type!=="element"||f.tagName!=="p")&&u.push({type:"text",value:`
1374
+ `});const p={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,p),e.applyData(t,p)}function FR(e){let t=!1;if(e.type==="list"){t=e.spread||!1;const r=e.children;let i=-1;for(;!t&&++i<r.length;)t=V0(r[i])}return t}function V0(e){const t=e.spread;return t??e.children.length>1}function _R(e,t){const r={},i=e.all(t);let l=-1;for(typeof t.start=="number"&&t.start!==1&&(r.start=t.start);++l<i.length;){const u=i[l];if(u.type==="element"&&u.tagName==="li"&&u.properties&&Array.isArray(u.properties.className)&&u.properties.className.includes("task-list-item")){r.className=["contains-task-list"];break}}const a={type:"element",tagName:t.ordered?"ol":"ul",properties:r,children:e.wrap(i,!0)};return e.patch(t,a),e.applyData(t,a)}function OR(e,t){const r={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function DR(e,t){const r={type:"root",children:e.wrap(e.all(t))};return e.patch(t,r),e.applyData(t,r)}function MR(e,t){const r={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function BR(e,t){const r=e.all(t),i=r.shift(),l=[];if(i){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([i],!0)};e.patch(t.children[0],u),l.push(u)}if(r.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(r,!0)},d=ff(t.children[1]),f=b0(t.children[t.children.length-1]);d&&f&&(u.position={start:d,end:f}),l.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(l,!0)};return e.patch(t,a),e.applyData(t,a)}function UR(e,t,r){const i=r?r.children:void 0,a=(i?i.indexOf(t):1)===0?"th":"td",u=r&&r.type==="table"?r.align:void 0,d=u?u.length:t.children.length;let f=-1;const p=[];for(;++f<d;){const m=t.children[f],v={},w=u?u[f]:void 0;w&&(v.align=w);let k={type:"element",tagName:a,properties:v,children:[]};m&&(k.children=e.all(m),e.patch(m,k),k=e.applyData(m,k)),p.push(k)}const g={type:"element",tagName:"tr",properties:{},children:e.wrap(p,!0)};return e.patch(t,g),e.applyData(t,g)}function VR(e,t){const r={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}const Dg=9,Mg=32;function HR(e){const t=String(e),r=/\r?\n|\r/g;let i=r.exec(t),l=0;const a=[];for(;i;)a.push(Bg(t.slice(l,i.index),l>0,!0),i[0]),l=i.index+i[0].length,i=r.exec(t);return a.push(Bg(t.slice(l),l>0,!1)),a.join("")}function Bg(e,t,r){let i=0,l=e.length;if(t){let a=e.codePointAt(i);for(;a===Dg||a===Mg;)i++,a=e.codePointAt(i)}if(r){let a=e.codePointAt(l-1);for(;a===Dg||a===Mg;)l--,a=e.codePointAt(l-1)}return l>i?e.slice(i,l):""}function WR(e,t){const r={type:"text",value:HR(String(t.value))};return e.patch(t,r),e.applyData(t,r)}function qR(e,t){const r={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,r),e.applyData(t,r)}const GR={blockquote:bR,break:SR,code:CR,delete:ER,emphasis:jR,footnoteReference:TR,heading:$R,html:IR,imageReference:RR,image:PR,inlineCode:NR,linkReference:AR,link:LR,listItem:zR,list:_R,paragraph:OR,root:DR,strong:MR,table:BR,tableCell:VR,tableRow:UR,text:WR,thematicBreak:qR,toml:_s,yaml:_s,definition:_s,footnoteDefinition:_s};function _s(){}const H0=-1,Na=0,da=1,fa=2,vf=3,wf=4,kf=5,bf=6,W0=7,q0=8,Ug=typeof self=="object"?self:globalThis,JR=(e,t)=>{const r=(l,a)=>(e.set(a,l),l),i=l=>{if(e.has(l))return e.get(l);const[a,u]=t[l];switch(a){case Na:case H0:return r(u,l);case da:{const d=r([],l);for(const f of u)d.push(i(f));return d}case fa:{const d=r({},l);for(const[f,p]of u)d[i(f)]=i(p);return d}case vf:return r(new Date(u),l);case wf:{const{source:d,flags:f}=u;return r(new RegExp(d,f),l)}case kf:{const d=r(new Map,l);for(const[f,p]of u)d.set(i(f),i(p));return d}case bf:{const d=r(new Set,l);for(const f of u)d.add(i(f));return d}case W0:{const{name:d,message:f}=u;return r(new Ug[d](f),l)}case q0:return r(BigInt(u),l);case"BigInt":return r(Object(BigInt(u)),l)}return r(new Ug[a](u),l)};return i},Vg=e=>JR(new Map,e)(0),Do="",{toString:KR}={},{keys:QR}=Object,el=e=>{const t=typeof e;if(t!=="object"||!e)return[Na,t];const r=KR.call(e).slice(8,-1);switch(r){case"Array":return[da,Do];case"Object":return[fa,Do];case"Date":return[vf,Do];case"RegExp":return[wf,Do];case"Map":return[kf,Do];case"Set":return[bf,Do]}return r.includes("Array")?[da,r]:r.includes("Error")?[W0,r]:[fa,r]},Os=([e,t])=>e===Na&&(t==="function"||t==="symbol"),YR=(e,t,r,i)=>{const l=(u,d)=>{const f=i.push(u)-1;return r.set(d,f),f},a=u=>{if(r.has(u))return r.get(u);let[d,f]=el(u);switch(d){case Na:{let g=u;switch(f){case"bigint":d=q0,g=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+f);g=null;break;case"undefined":return l([H0],u)}return l([d,g],u)}case da:{if(f)return l([f,[...u]],u);const g=[],m=l([d,g],u);for(const v of u)g.push(a(v));return m}case fa:{if(f)switch(f){case"BigInt":return l([f,u.toString()],u);case"Boolean":case"Number":case"String":return l([f,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const g=[],m=l([d,g],u);for(const v of QR(u))(e||!Os(el(u[v])))&&g.push([a(v),a(u[v])]);return m}case vf:return l([d,u.toISOString()],u);case wf:{const{source:g,flags:m}=u;return l([d,{source:g,flags:m}],u)}case kf:{const g=[],m=l([d,g],u);for(const[v,w]of u)(e||!(Os(el(v))||Os(el(w))))&&g.push([a(v),a(w)]);return m}case bf:{const g=[],m=l([d,g],u);for(const v of u)(e||!Os(el(v)))&&g.push(a(v));return m}}const{message:p}=u;return l([d,{name:f,message:p}],u)};return a},Hg=(e,{json:t,lossy:r}={})=>{const i=[];return YR(!(t||r),!!t,new Map,i)(e),i},pa=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Vg(Hg(e,t)):structuredClone(e):(e,t)=>Vg(Hg(e,t));function XR(e,t){const r=[{type:"text",value:"↩"}];return t>1&&r.push({type:"element",tagName:"sup",properties:{},children:[{type:"text",value:String(t)}]}),r}function ZR(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function e4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=e.options.footnoteBackContent||XR,i=e.options.footnoteBackLabel||ZR,l=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},d=[];let f=-1;for(;++f<e.footnoteOrder.length;){const p=e.footnoteById.get(e.footnoteOrder[f]);if(!p)continue;const g=e.all(p),m=String(p.identifier).toUpperCase(),v=li(m.toLowerCase());let w=0;const k=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++w<=S;){k.length>0&&k.push({type:"text",value:" "});let P=typeof r=="string"?r:r(f,w);typeof P=="string"&&(P={type:"text",value:P}),k.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+v+(w>1?"-"+w:""),dataFootnoteBackref:"",ariaLabel:typeof i=="string"?i:i(f,w),className:["data-footnote-backref"]},children:Array.isArray(P)?P:[P]})}const j=g[g.length-1];if(j&&j.type==="element"&&j.tagName==="p"){const P=j.children[j.children.length-1];P&&P.type==="text"?P.value+=" ":j.children.push({type:"text",value:" "}),j.children.push(...k)}else g.push(...k);const E={type:"element",tagName:"li",properties:{id:t+"fn-"+v},children:e.wrap(g,!0)};e.patch(p,E),d.push(E)}if(d.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:{...pa(u),id:"footnote-label"},children:[{type:"text",value:l}]},{type:"text",value:`
1375
+ `},{type:"element",tagName:"ol",properties:{},children:e.wrap(d,!0)},{type:"text",value:`
1376
+ `}]}}const Aa=function(e){if(e==null)return o4;if(typeof e=="function")return La(e);if(typeof e=="object")return Array.isArray(e)?t4(e):n4(e);if(typeof e=="string")return r4(e);throw new Error("Expected function, string, or object as test")};function t4(e){const t=[];let r=-1;for(;++r<e.length;)t[r]=Aa(e[r]);return La(i);function i(...l){let a=-1;for(;++a<t.length;)if(t[a].apply(this,l))return!0;return!1}}function n4(e){const t=e;return La(r);function r(i){const l=i;let a;for(a in e)if(l[a]!==t[a])return!1;return!0}}function r4(e){return La(t);function t(r){return r&&r.type===e}}function La(e){return t;function t(r,i,l){return!!(i4(r)&&e.call(this,r,typeof i=="number"?i:void 0,l||void 0))}}function o4(){return!0}function i4(e){return e!==null&&typeof e=="object"&&"type"in e}const G0=[],l4=!0,$d=!1,s4="skip";function J0(e,t,r,i){let l;typeof t=="function"&&typeof r!="function"?(i=r,r=t):l=t;const a=Aa(l),u=i?-1:1;d(e,void 0,[])();function d(f,p,g){const m=f&&typeof f=="object"?f:{};if(typeof m.type=="string"){const w=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(v,"name",{value:"node ("+(f.type+(w?"<"+w+">":""))+")"})}return v;function v(){let w=G0,k,S,j;if((!t||a(f,p,g[g.length-1]||void 0))&&(w=a4(r(f,g)),w[0]===$d))return w;if("children"in f&&f.children){const E=f;if(E.children&&w[0]!==s4)for(S=(i?E.children.length:-1)+u,j=g.concat(E);S>-1&&S<E.children.length;){const P=E.children[S];if(k=d(P,S,j)(),k[0]===$d)return k;S=typeof k[1]=="number"?k[1]:S+u}}return w}}}function a4(e){return Array.isArray(e)?e:typeof e=="number"?[l4,e]:e==null?G0:[e]}function Sf(e,t,r,i){let l,a,u;typeof t=="function"?(a=void 0,u=t,l=r):(a=t,u=r,l=i),J0(e,a,d,l);function d(f,p){const g=p[p.length-1],m=g?g.children.indexOf(f):void 0;return u(f,m,g)}}const Id={}.hasOwnProperty,u4={};function c4(e,t){const r=t||u4,i=new Map,l=new Map,a=new Map,u={...GR,...r.handlers},d={all:p,applyData:f4,definitionById:i,footnoteById:l,footnoteCounts:a,footnoteOrder:[],handlers:u,one:f,options:r,patch:d4,wrap:h4};return Sf(e,function(g){if(g.type==="definition"||g.type==="footnoteDefinition"){const m=g.type==="definition"?i:l,v=String(g.identifier).toUpperCase();m.has(v)||m.set(v,g)}}),d;function f(g,m){const v=g.type,w=d.handlers[v];if(Id.call(d.handlers,v)&&w)return w(d,g,m);if(d.options.passThrough&&d.options.passThrough.includes(v)){if("children"in g){const{children:S,...j}=g,E=pa(j);return E.children=d.all(g),E}return pa(g)}return(d.options.unknownHandler||p4)(d,g,m)}function p(g){const m=[];if("children"in g){const v=g.children;let w=-1;for(;++w<v.length;){const k=d.one(v[w],g);if(k){if(w&&v[w-1].type==="break"&&(!Array.isArray(k)&&k.type==="text"&&(k.value=Wg(k.value)),!Array.isArray(k)&&k.type==="element")){const S=k.children[0];S&&S.type==="text"&&(S.value=Wg(S.value))}Array.isArray(k)?m.push(...k):m.push(k)}}}return m}}function d4(e,t){e.position&&(t.position=ZT(e))}function f4(e,t){let r=t;if(e&&e.data){const i=e.data.hName,l=e.data.hChildren,a=e.data.hProperties;if(typeof i=="string")if(r.type==="element")r.tagName=i;else{const u="children"in r?r.children:[r];r={type:"element",tagName:i,properties:{},children:u}}r.type==="element"&&a&&Object.assign(r.properties,pa(a)),"children"in r&&r.children&&l!==null&&l!==void 0&&(r.children=l)}return r}function p4(e,t){const r=t.data||{},i="value"in t&&!(Id.call(r,"hProperties")||Id.call(r,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,i),e.applyData(t,i)}function h4(e,t){const r=[];let i=-1;for(t&&r.push({type:"text",value:`
1377
+ `});++i<e.length;)i&&r.push({type:"text",value:`
1378
+ `}),r.push(e[i]);return t&&e.length>0&&r.push({type:"text",value:`
1379
+ `}),r}function Wg(e){let t=0,r=e.charCodeAt(t);for(;r===9||r===32;)t++,r=e.charCodeAt(t);return e.slice(t)}function qg(e,t){const r=c4(e,t),i=r.one(e,void 0),l=e4(r),a=Array.isArray(i)?{type:"root",children:i}:i||{type:"root",children:[]};return l&&a.children.push({type:"text",value:`
1380
+ `},l),a}function m4(e,t){return e&&"run"in e?async function(r,i){const l=qg(r,{file:i,...t});await e.run(l,i)}:function(r,i){return qg(r,{file:i,...e||t})}}function Gg(e){if(e)throw e}var Mc,Jg;function g4(){if(Jg)return Mc;Jg=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,r=Object.defineProperty,i=Object.getOwnPropertyDescriptor,l=function(p){return typeof Array.isArray=="function"?Array.isArray(p):t.call(p)==="[object Array]"},a=function(p){if(!p||t.call(p)!=="[object Object]")return!1;var g=e.call(p,"constructor"),m=p.constructor&&p.constructor.prototype&&e.call(p.constructor.prototype,"isPrototypeOf");if(p.constructor&&!g&&!m)return!1;var v;for(v in p);return typeof v>"u"||e.call(p,v)},u=function(p,g){r&&g.name==="__proto__"?r(p,g.name,{enumerable:!0,configurable:!0,value:g.newValue,writable:!0}):p[g.name]=g.newValue},d=function(p,g){if(g==="__proto__")if(e.call(p,g)){if(i)return i(p,g).value}else return;return p[g]};return Mc=function f(){var p,g,m,v,w,k,S=arguments[0],j=1,E=arguments.length,P=!1;for(typeof S=="boolean"&&(P=S,S=arguments[1]||{},j=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});j<E;++j)if(p=arguments[j],p!=null)for(g in p)m=d(S,g),v=d(p,g),S!==v&&(P&&v&&(a(v)||(w=l(v)))?(w?(w=!1,k=m&&l(m)?m:[]):k=m&&a(m)?m:{},u(S,{name:g,newValue:f(P,k,v)})):typeof v<"u"&&u(S,{name:g,newValue:v}));return S},Mc}var y4=g4();const Bc=Dd(y4);function Rd(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function x4(){const e=[],t={run:r,use:i};return t;function r(...l){let a=-1;const u=l.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);d(null,...l);function d(f,...p){const g=e[++a];let m=-1;if(f){u(f);return}for(;++m<l.length;)(p[m]===null||p[m]===void 0)&&(p[m]=l[m]);l=p,g?v4(g,d)(...p):u(null,...p)}}function i(l){if(typeof l!="function")throw new TypeError("Expected `middelware` to be a function, not "+l);return e.push(l),t}}function v4(e,t){let r;return i;function i(...u){const d=e.length>u.length;let f;d&&u.push(l);try{f=e.apply(this,u)}catch(p){const g=p;if(d&&r)throw g;return l(g)}d||(f&&f.then&&typeof f.then=="function"?f.then(a,l):f instanceof Error?l(f):a(f))}function l(u,...d){r||(r=!0,t(u,...d))}function a(u){l(null,u)}}const Bn={basename:w4,dirname:k4,extname:b4,join:S4,sep:"/"};function w4(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');kl(e);let r=0,i=-1,l=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else i<0&&(a=!0,i=l+1);return i<0?"":e.slice(r,i)}if(t===e)return"";let u=-1,d=t.length-1;for(;l--;)if(e.codePointAt(l)===47){if(a){r=l+1;break}}else u<0&&(a=!0,u=l+1),d>-1&&(e.codePointAt(l)===t.codePointAt(d--)?d<0&&(i=l):(d=-1,i=u));return r===i?i=u:i<0&&(i=e.length),e.slice(r,i)}function k4(e){if(kl(e),e.length===0)return".";let t=-1,r=e.length,i;for(;--r;)if(e.codePointAt(r)===47){if(i){t=r;break}}else i||(i=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function b4(e){kl(e);let t=e.length,r=-1,i=0,l=-1,a=0,u;for(;t--;){const d=e.codePointAt(t);if(d===47){if(u){i=t+1;break}continue}r<0&&(u=!0,r=t+1),d===46?l<0?l=t:a!==1&&(a=1):l>-1&&(a=-1)}return l<0||r<0||a===0||a===1&&l===r-1&&l===i+1?"":e.slice(l,r)}function S4(...e){let t=-1,r;for(;++t<e.length;)kl(e[t]),e[t]&&(r=r===void 0?e[t]:r+"/"+e[t]);return r===void 0?".":C4(r)}function C4(e){kl(e);const t=e.codePointAt(0)===47;let r=E4(e,!t);return r.length===0&&!t&&(r="."),r.length>0&&e.codePointAt(e.length-1)===47&&(r+="/"),t?"/"+r:r}function E4(e,t){let r="",i=0,l=-1,a=0,u=-1,d,f;for(;++u<=e.length;){if(u<e.length)d=e.codePointAt(u);else{if(d===47)break;d=47}if(d===47){if(!(l===u-1||a===1))if(l!==u-1&&a===2){if(r.length<2||i!==2||r.codePointAt(r.length-1)!==46||r.codePointAt(r.length-2)!==46){if(r.length>2){if(f=r.lastIndexOf("/"),f!==r.length-1){f<0?(r="",i=0):(r=r.slice(0,f),i=r.length-1-r.lastIndexOf("/")),l=u,a=0;continue}}else if(r.length>0){r="",i=0,l=u,a=0;continue}}t&&(r=r.length>0?r+"/..":"..",i=2)}else r.length>0?r+="/"+e.slice(l+1,u):r=e.slice(l+1,u),i=u-l-1;l=u,a=0}else d===46&&a>-1?a++:a=-1}return r}function kl(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const j4={cwd:T4};function T4(){return"/"}function Pd(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function $4(e){if(typeof e=="string")e=new URL(e);else if(!Pd(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return I4(e)}function I4(e){if(e.hostname!==""){const i=new TypeError('File URL host must be "localhost" or empty on darwin');throw i.code="ERR_INVALID_FILE_URL_HOST",i}const t=e.pathname;let r=-1;for(;++r<t.length;)if(t.codePointAt(r)===37&&t.codePointAt(r+1)===50){const i=t.codePointAt(r+2);if(i===70||i===102){const l=new TypeError("File URL path must not include encoded / characters");throw l.code="ERR_INVALID_FILE_URL_PATH",l}}return decodeURIComponent(t)}const Uc=["history","path","basename","stem","extname","dirname"];class K0{constructor(t){let r;t?Pd(t)?r={path:t}:typeof t=="string"||R4(t)?r={value:t}:r=t:r={},this.cwd="cwd"in r?"":j4.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let i=-1;for(;++i<Uc.length;){const a=Uc[i];a in r&&r[a]!==void 0&&r[a]!==null&&(this[a]=a==="history"?[...r[a]]:r[a])}let l;for(l in r)Uc.includes(l)||(this[l]=r[l])}get basename(){return typeof this.path=="string"?Bn.basename(this.path):void 0}set basename(t){Hc(t,"basename"),Vc(t,"basename"),this.path=Bn.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Bn.dirname(this.path):void 0}set dirname(t){Kg(this.basename,"dirname"),this.path=Bn.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Bn.extname(this.path):void 0}set extname(t){if(Vc(t,"extname"),Kg(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Bn.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Pd(t)&&(t=$4(t)),Hc(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Bn.basename(this.path,this.extname):void 0}set stem(t){Hc(t,"stem"),Vc(t,"stem"),this.path=Bn.join(this.dirname||"",t+(this.extname||""))}fail(t,r,i){const l=this.message(t,r,i);throw l.fatal=!0,l}info(t,r,i){const l=this.message(t,r,i);return l.fatal=void 0,l}message(t,r,i){const l=new Lt(t,r,i);return this.path&&(l.name=this.path+":"+l.name,l.file=this.path),l.fatal=!1,this.messages.push(l),l}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Vc(e,t){if(e&&e.includes(Bn.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Bn.sep+"`")}function Hc(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Kg(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function R4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const P4=function(e){const i=this.constructor.prototype,l=i[e],a=function(){return l.apply(a,arguments)};return Object.setPrototypeOf(a,i),a},N4={}.hasOwnProperty;class Cf extends P4{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=x4()}copy(){const t=new Cf;let r=-1;for(;++r<this.attachers.length;){const i=this.attachers[r];t.use(...i)}return t.data(Bc(!0,{},this.namespace)),t}data(t,r){return typeof t=="string"?arguments.length===2?(Gc("data",this.frozen),this.namespace[t]=r,this):N4.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Gc("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[r,...i]=this.attachers[this.freezeIndex];if(i[0]===!1)continue;i[0]===!0&&(i[0]=void 0);const l=r.call(t,...i);typeof l=="function"&&this.transformers.use(l)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const r=Ds(t),i=this.parser||this.Parser;return Wc("parse",i),i(String(r),r)}process(t,r){const i=this;return this.freeze(),Wc("process",this.parser||this.Parser),qc("process",this.compiler||this.Compiler),r?l(void 0,r):new Promise(l);function l(a,u){const d=Ds(t),f=i.parse(d);i.run(f,d,function(g,m,v){if(g||!m||!v)return p(g);const w=m,k=i.stringify(w,v);z4(k)?v.value=k:v.result=k,p(g,v)});function p(g,m){g||!m?u(g):a?a(m):r(void 0,m)}}}processSync(t){let r=!1,i;return this.freeze(),Wc("processSync",this.parser||this.Parser),qc("processSync",this.compiler||this.Compiler),this.process(t,l),Yg("processSync","process",r),i;function l(a,u){r=!0,Gg(a),i=u}}run(t,r,i){Qg(t),this.freeze();const l=this.transformers;return!i&&typeof r=="function"&&(i=r,r=void 0),i?a(void 0,i):new Promise(a);function a(u,d){const f=Ds(r);l.run(t,f,p);function p(g,m,v){const w=m||t;g?d(g):u?u(w):i(void 0,w,v)}}}runSync(t,r){let i=!1,l;return this.run(t,r,a),Yg("runSync","run",i),l;function a(u,d){Gg(u),l=d,i=!0}}stringify(t,r){this.freeze();const i=Ds(r),l=this.compiler||this.Compiler;return qc("stringify",l),Qg(t),l(t,i)}use(t,...r){const i=this.attachers,l=this.namespace;if(Gc("use",this.frozen),t!=null)if(typeof t=="function")f(t,r);else if(typeof t=="object")Array.isArray(t)?d(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(p){if(typeof p=="function")f(p,[]);else if(typeof p=="object")if(Array.isArray(p)){const[g,...m]=p;f(g,m)}else u(p);else throw new TypeError("Expected usable value, not `"+p+"`")}function u(p){if(!("plugins"in p)&&!("settings"in p))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");d(p.plugins),p.settings&&(l.settings=Bc(!0,l.settings,p.settings))}function d(p){let g=-1;if(p!=null)if(Array.isArray(p))for(;++g<p.length;){const m=p[g];a(m)}else throw new TypeError("Expected a list of plugins, not `"+p+"`")}function f(p,g){let m=-1,v=-1;for(;++m<i.length;)if(i[m][0]===p){v=m;break}if(v===-1)i.push([p,...g]);else if(g.length>0){let[w,...k]=g;const S=i[v][1];Rd(S)&&Rd(w)&&(w=Bc(!0,S,w)),i[v]=[p,w,...k]}}}}const A4=new Cf().freeze();function Wc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function qc(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Gc(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Qg(e){if(!Rd(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Yg(e,t,r){if(!r)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Ds(e){return L4(e)?e:new K0(e)}function L4(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function z4(e){return typeof e=="string"||F4(e)}function F4(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const _4="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Xg=[],Zg={allowDangerousHtml:!0},O4=/^(https?|ircs?|mailto|xmpp)$/i,D4=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function so(e){const t=M4(e),r=B4(e);return U4(t.runSync(t.parse(r),r),e)}function M4(e){const t=e.rehypePlugins||Xg,r=e.remarkPlugins||Xg,i=e.remarkRehypeOptions?{...e.remarkRehypeOptions,...Zg}:Zg;return A4().use(kR).use(r).use(m4,i).use(t)}function B4(e){const t=e.children||"",r=new K0;return typeof t=="string"&&(r.value=t),r}function U4(e,t){const r=t.allowedElements,i=t.allowElement,l=t.components,a=t.disallowedElements,u=t.skipHtml,d=t.unwrapDisallowed,f=t.urlTransform||V4;for(const g of D4)Object.hasOwn(t,g.from)&&(""+g.from+(g.to?"use `"+g.to+"` instead":"remove it")+_4+g.id,void 0);return Sf(e,p),o$(e,{Fragment:h.Fragment,components:l,ignoreInvalidStyle:!0,jsx:h.jsx,jsxs:h.jsxs,passKeys:!0,passNode:!0});function p(g,m,v){if(g.type==="raw"&&v&&typeof m=="number")return u?v.children.splice(m,1):v.children[m]={type:"text",value:g.value},m;if(g.type==="element"){let w;for(w in _c)if(Object.hasOwn(_c,w)&&Object.hasOwn(g.properties,w)){const k=g.properties[w],S=_c[w];(S===null||S.includes(g.tagName))&&(g.properties[w]=f(String(k||""),w,g))}}if(g.type==="element"){let w=r?!r.includes(g.tagName):a?a.includes(g.tagName):!1;if(!w&&i&&typeof m=="number"&&(w=!i(g,m,v)),w&&v&&typeof m=="number")return d&&g.children?v.children.splice(m,1,...g.children):v.children.splice(m,1),m}}}function V4(e){const t=e.indexOf(":"),r=e.indexOf("?"),i=e.indexOf("#"),l=e.indexOf("/");return t===-1||l!==-1&&t>l||r!==-1&&t>r||i!==-1&&t>i||O4.test(e.slice(0,t))?e:""}function ey(e,t){const r=String(e);if(typeof t!="string")throw new TypeError("Expected character");let i=0,l=r.indexOf(t);for(;l!==-1;)i++,l=r.indexOf(t,l+t.length);return i}function H4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function W4(e,t,r){const l=Aa((r||{}).ignore||[]),a=q4(t);let u=-1;for(;++u<a.length;)J0(e,"text",d);function d(p,g){let m=-1,v;for(;++m<g.length;){const w=g[m],k=v?v.children:void 0;if(l(w,k?k.indexOf(w):void 0,v))return;v=w}if(v)return f(p,g)}function f(p,g){const m=g[g.length-1],v=a[u][0],w=a[u][1];let k=0;const j=m.children.indexOf(p);let E=!1,P=[];v.lastIndex=0;let N=v.exec(p.value);for(;N;){const _=N.index,q={index:N.index,input:N.input,stack:[...g,p]};let A=w(...N,q);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?v.lastIndex=_+1:(k!==_&&P.push({type:"text",value:p.value.slice(k,_)}),Array.isArray(A)?P.push(...A):A&&P.push(A),k=_+N[0].length,E=!0),!v.global)break;N=v.exec(p.value)}return E?(k<p.value.length&&P.push({type:"text",value:p.value.slice(k)}),m.children.splice(j,1,...P)):P=[p],j+P.length}}function q4(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const r=!e[0]||Array.isArray(e[0])?e:[e];let i=-1;for(;++i<r.length;){const l=r[i];t.push([G4(l[0]),J4(l[1])])}return t}function G4(e){return typeof e=="string"?new RegExp(H4(e),"g"):e}function J4(e){return typeof e=="function"?e:function(){return e}}const Jc="phrasing",Kc=["autolink","link","image","label"];function K4(){return{transforms:[nP],enter:{literalAutolink:Y4,literalAutolinkEmail:Qc,literalAutolinkHttp:Qc,literalAutolinkWww:Qc},exit:{literalAutolink:tP,literalAutolinkEmail:eP,literalAutolinkHttp:X4,literalAutolinkWww:Z4}}}function Q4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Jc,notInConstruct:Kc},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Jc,notInConstruct:Kc},{character:":",before:"[ps]",after:"\\/",inConstruct:Jc,notInConstruct:Kc}]}}function Y4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Qc(e){this.config.enter.autolinkProtocol.call(this,e)}function X4(e){this.config.exit.autolinkProtocol.call(this,e)}function Z4(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function eP(e){this.config.exit.autolinkEmail.call(this,e)}function tP(e){this.exit(e)}function nP(e){W4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,rP],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),oP]],{ignore:["link","linkReference"]})}function rP(e,t,r,i,l){let a="";if(!Q0(l)||(/^w/i.test(t)&&(r=t+r,t="",a="http://"),!iP(r)))return!1;const u=lP(r+i);if(!u[0])return!1;const d={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[d,{type:"text",value:u[1]}]:d}function oP(e,t,r,i){return!Q0(i,!0)||/[-\d_]$/.test(r)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+r,children:[{type:"text",value:t+"@"+r}]}}function iP(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function lP(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let r=t[0],i=r.indexOf(")");const l=ey(e,"(");let a=ey(e,")");for(;i!==-1&&l>a;)e+=r.slice(0,i+1),r=r.slice(i+1),i=r.indexOf(")"),a++;return[e,r]}function Q0(e,t){const r=e.input.charCodeAt(e.index-1);return(e.index===0||lo(r)||Ra(r))&&(!t||r!==47)}Y0.peek=mP;function sP(){this.buffer()}function aP(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function uP(){this.buffer()}function cP(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function dP(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Rn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function fP(e){this.exit(e)}function pP(e){const t=this.resume(),r=this.stack[this.stack.length-1];r.type,r.identifier=Rn(this.sliceSerialize(e)).toLowerCase(),r.label=t}function hP(e){this.exit(e)}function mP(){return"["}function Y0(e,t,r,i){const l=r.createTracker(i);let a=l.move("[^");const u=r.enter("footnoteReference"),d=r.enter("reference");return a+=l.move(r.safe(r.associationId(e),{after:"]",before:a})),d(),u(),a+=l.move("]"),a}function gP(){return{enter:{gfmFootnoteCallString:sP,gfmFootnoteCall:aP,gfmFootnoteDefinitionLabelString:uP,gfmFootnoteDefinition:cP},exit:{gfmFootnoteCallString:dP,gfmFootnoteCall:fP,gfmFootnoteDefinitionLabelString:pP,gfmFootnoteDefinition:hP}}}function yP(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:r,footnoteReference:Y0},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function r(i,l,a,u){const d=a.createTracker(u);let f=d.move("[^");const p=a.enter("footnoteDefinition"),g=a.enter("label");return f+=d.move(a.safe(a.associationId(i),{before:f,after:"]"})),g(),f+=d.move("]:"),i.children&&i.children.length>0&&(d.shift(4),f+=d.move((t?`
1381
+ `:" ")+a.indentLines(a.containerFlow(i,d.current()),t?X0:xP))),p(),f}}function xP(e,t,r){return t===0?e:X0(e,t,r)}function X0(e,t,r){return(r?"":" ")+e}const vP=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Z0.peek=CP;function wP(){return{canContainEols:["delete"],enter:{strikethrough:bP},exit:{strikethrough:SP}}}function kP(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:vP}],handlers:{delete:Z0}}}function bP(e){this.enter({type:"delete",children:[]},e)}function SP(e){this.exit(e)}function Z0(e,t,r,i){const l=r.createTracker(i),a=r.enter("strikethrough");let u=l.move("~~");return u+=r.containerPhrasing(e,{...l.current(),before:u,after:"~"}),u+=l.move("~~"),a(),u}function CP(){return"~"}function EP(e){return e.length}function jP(e,t){const r=t||{},i=(r.align||[]).concat(),l=r.stringLength||EP,a=[],u=[],d=[],f=[];let p=0,g=-1;for(;++g<e.length;){const S=[],j=[];let E=-1;for(e[g].length>p&&(p=e[g].length);++E<e[g].length;){const P=TP(e[g][E]);if(r.alignDelimiters!==!1){const N=l(P);j[E]=N,(f[E]===void 0||N>f[E])&&(f[E]=N)}S.push(P)}u[g]=S,d[g]=j}let m=-1;if(typeof i=="object"&&"length"in i)for(;++m<p;)a[m]=ty(i[m]);else{const S=ty(i);for(;++m<p;)a[m]=S}m=-1;const v=[],w=[];for(;++m<p;){const S=a[m];let j="",E="";S===99?(j=":",E=":"):S===108?j=":":S===114&&(E=":");let P=r.alignDelimiters===!1?1:Math.max(1,f[m]-j.length-E.length);const N=j+"-".repeat(P)+E;r.alignDelimiters!==!1&&(P=j.length+P+E.length,P>f[m]&&(f[m]=P),w[m]=P),v[m]=N}u.splice(1,0,v),d.splice(1,0,w),g=-1;const k=[];for(;++g<u.length;){const S=u[g],j=d[g];m=-1;const E=[];for(;++m<p;){const P=S[m]||"";let N="",_="";if(r.alignDelimiters!==!1){const q=f[m]-(j[m]||0),A=a[m];A===114?N=" ".repeat(q):A===99?q%2?(N=" ".repeat(q/2+.5),_=" ".repeat(q/2-.5)):(N=" ".repeat(q/2),_=N):_=" ".repeat(q)}r.delimiterStart!==!1&&!m&&E.push("|"),r.padding!==!1&&!(r.alignDelimiters===!1&&P==="")&&(r.delimiterStart!==!1||m)&&E.push(" "),r.alignDelimiters!==!1&&E.push(N),E.push(P),r.alignDelimiters!==!1&&E.push(_),r.padding!==!1&&E.push(" "),(r.delimiterEnd!==!1||m!==p-1)&&E.push("|")}k.push(r.delimiterEnd===!1?E.join("").replace(/ +$/,""):E.join(""))}return k.join(`
1382
+ `)}function TP(e){return e==null?"":String(e)}function ty(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function $P(e,t,r,i){const l=r.enter("blockquote"),a=r.createTracker(i);a.move("> "),a.shift(2);const u=r.indentLines(r.containerFlow(e,a.current()),IP);return l(),u}function IP(e,t,r){return">"+(r?"":" ")+e}function RP(e,t){return ny(e,t.inConstruct,!0)&&!ny(e,t.notInConstruct,!1)}function ny(e,t,r){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return r;let i=-1;for(;++i<t.length;)if(e.includes(t[i]))return!0;return!1}function ry(e,t,r,i){let l=-1;for(;++l<r.unsafe.length;)if(r.unsafe[l].character===`
1383
+ `&&RP(r.stack,r.unsafe[l]))return/[ \t]/.test(i.before)?"":" ";return`\\
1384
+ `}function PP(e,t){const r=String(e);let i=r.indexOf(t),l=i,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;i!==-1;)i===l?++a>u&&(u=a):a=1,l=i+t.length,i=r.indexOf(t,l);return u}function NP(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function AP(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function LP(e,t,r,i){const l=AP(r),a=e.value||"",u=l==="`"?"GraveAccent":"Tilde";if(NP(e,r)){const m=r.enter("codeIndented"),v=r.indentLines(a,zP);return m(),v}const d=r.createTracker(i),f=l.repeat(Math.max(PP(a,l)+1,3)),p=r.enter("codeFenced");let g=d.move(f);if(e.lang){const m=r.enter(`codeFencedLang${u}`);g+=d.move(r.safe(e.lang,{before:g,after:" ",encode:["`"],...d.current()})),m()}if(e.lang&&e.meta){const m=r.enter(`codeFencedMeta${u}`);g+=d.move(" "),g+=d.move(r.safe(e.meta,{before:g,after:`
1385
+ `,encode:["`"],...d.current()})),m()}return g+=d.move(`
1386
+ `),a&&(g+=d.move(a+`
1387
+ `)),g+=d.move(f),p(),g}function zP(e,t,r){return(r?"":" ")+e}function Ef(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function FP(e,t,r,i){const l=Ef(r),a=l==='"'?"Quote":"Apostrophe",u=r.enter("definition");let d=r.enter("label");const f=r.createTracker(i);let p=f.move("[");return p+=f.move(r.safe(r.associationId(e),{before:p,after:"]",...f.current()})),p+=f.move("]: "),d(),!e.url||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(r.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=r.enter("destinationRaw"),p+=f.move(r.safe(e.url,{before:p,after:e.title?" ":`
1388
+ `,...f.current()}))),d(),e.title&&(d=r.enter(`title${a}`),p+=f.move(" "+l),p+=f.move(r.safe(e.title,{before:p,after:l,...f.current()})),p+=f.move(l),d()),u(),p}function _P(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function dl(e){return"&#x"+e.toString(16).toUpperCase()+";"}function ha(e,t,r){const i=Xo(e),l=Xo(t);return i===void 0?l===void 0?r==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:i===1?l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:l===void 0?{inside:!1,outside:!1}:l===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}e1.peek=OP;function e1(e,t,r,i){const l=_P(r),a=r.enter("emphasis"),u=r.createTracker(i),d=u.move(l);let f=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const p=f.charCodeAt(0),g=ha(i.before.charCodeAt(i.before.length-1),p,l);g.inside&&(f=dl(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=ha(i.after.charCodeAt(0),m,l);v.inside&&(f=f.slice(0,-1)+dl(m));const w=u.move(l);return a(),r.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},d+f+w}function OP(e,t,r){return r.options.emphasis||"*"}function DP(e,t){let r=!1;return Sf(e,function(i){if("value"in i&&/\r?\n|\r/.test(i.value)||i.type==="break")return r=!0,$d}),!!((!e.depth||e.depth<3)&&gf(e)&&(t.options.setext||r))}function MP(e,t,r,i){const l=Math.max(Math.min(6,e.depth||1),1),a=r.createTracker(i);if(DP(e,r)){const g=r.enter("headingSetext"),m=r.enter("phrasing"),v=r.containerPhrasing(e,{...a.current(),before:`
1389
+ `,after:`
1390
+ `});return m(),g(),v+`
1391
+ `+(l===1?"=":"-").repeat(v.length-(Math.max(v.lastIndexOf("\r"),v.lastIndexOf(`
1392
+ `))+1))}const u="#".repeat(l),d=r.enter("headingAtx"),f=r.enter("phrasing");a.move(u+" ");let p=r.containerPhrasing(e,{before:"# ",after:`
1393
+ `,...a.current()});return/^[\t ]/.test(p)&&(p=dl(p.charCodeAt(0))+p.slice(1)),p=p?u+" "+p:u,r.options.closeAtx&&(p+=" "+u),f(),d(),p}t1.peek=BP;function t1(e){return e.value||""}function BP(){return"<"}n1.peek=UP;function n1(e,t,r,i){const l=Ef(r),a=l==='"'?"Quote":"Apostrophe",u=r.enter("image");let d=r.enter("label");const f=r.createTracker(i);let p=f.move("![");return p+=f.move(r.safe(e.alt,{before:p,after:"]",...f.current()})),p+=f.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=r.enter("destinationLiteral"),p+=f.move("<"),p+=f.move(r.safe(e.url,{before:p,after:">",...f.current()})),p+=f.move(">")):(d=r.enter("destinationRaw"),p+=f.move(r.safe(e.url,{before:p,after:e.title?" ":")",...f.current()}))),d(),e.title&&(d=r.enter(`title${a}`),p+=f.move(" "+l),p+=f.move(r.safe(e.title,{before:p,after:l,...f.current()})),p+=f.move(l),d()),p+=f.move(")"),u(),p}function UP(){return"!"}r1.peek=VP;function r1(e,t,r,i){const l=e.referenceType,a=r.enter("imageReference");let u=r.enter("label");const d=r.createTracker(i);let f=d.move("![");const p=r.safe(e.alt,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const m=r.safe(r.associationId(e),{before:f,after:"]",...d.current()});return u(),r.stack=g,a(),l==="full"||!p||p!==m?f+=d.move(m+"]"):l==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function VP(){return"!"}o1.peek=HP;function o1(e,t,r){let i=e.value||"",l="`",a=-1;for(;new RegExp("(^|[^`])"+l+"([^`]|$)").test(i);)l+="`";for(/[^ \r\n]/.test(i)&&(/^[ \r\n]/.test(i)&&/[ \r\n]$/.test(i)||/^`|`$/.test(i))&&(i=" "+i+" ");++a<r.unsafe.length;){const u=r.unsafe[a],d=r.compilePattern(u);let f;if(u.atBreak)for(;f=d.exec(i);){let p=f.index;i.charCodeAt(p)===10&&i.charCodeAt(p-1)===13&&p--,i=i.slice(0,p)+" "+i.slice(f.index+1)}}return l+i+l}function HP(){return"`"}function i1(e,t){const r=gf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(r===e.url||"mailto:"+r===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}l1.peek=WP;function l1(e,t,r,i){const l=Ef(r),a=l==='"'?"Quote":"Apostrophe",u=r.createTracker(i);let d,f;if(i1(e,r)){const g=r.stack;r.stack=[],d=r.enter("autolink");let m=u.move("<");return m+=u.move(r.containerPhrasing(e,{before:m,after:">",...u.current()})),m+=u.move(">"),d(),r.stack=g,m}d=r.enter("link"),f=r.enter("label");let p=u.move("[");return p+=u.move(r.containerPhrasing(e,{before:p,after:"](",...u.current()})),p+=u.move("]("),f(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(f=r.enter("destinationLiteral"),p+=u.move("<"),p+=u.move(r.safe(e.url,{before:p,after:">",...u.current()})),p+=u.move(">")):(f=r.enter("destinationRaw"),p+=u.move(r.safe(e.url,{before:p,after:e.title?" ":")",...u.current()}))),f(),e.title&&(f=r.enter(`title${a}`),p+=u.move(" "+l),p+=u.move(r.safe(e.title,{before:p,after:l,...u.current()})),p+=u.move(l),f()),p+=u.move(")"),d(),p}function WP(e,t,r){return i1(e,r)?"<":"["}s1.peek=qP;function s1(e,t,r,i){const l=e.referenceType,a=r.enter("linkReference");let u=r.enter("label");const d=r.createTracker(i);let f=d.move("[");const p=r.containerPhrasing(e,{before:f,after:"]",...d.current()});f+=d.move(p+"]["),u();const g=r.stack;r.stack=[],u=r.enter("reference");const m=r.safe(r.associationId(e),{before:f,after:"]",...d.current()});return u(),r.stack=g,a(),l==="full"||!p||p!==m?f+=d.move(m+"]"):l==="shortcut"?f=f.slice(0,-1):f+=d.move("]"),f}function qP(){return"["}function jf(e){const t=e.options.bullet||"*";if(t!=="*"&&t!=="+"&&t!=="-")throw new Error("Cannot serialize items with `"+t+"` for `options.bullet`, expected `*`, `+`, or `-`");return t}function GP(e){const t=jf(e),r=e.options.bulletOther;if(!r)return t==="*"?"-":"*";if(r!=="*"&&r!=="+"&&r!=="-")throw new Error("Cannot serialize items with `"+r+"` for `options.bulletOther`, expected `*`, `+`, or `-`");if(r===t)throw new Error("Expected `bullet` (`"+t+"`) and `bulletOther` (`"+r+"`) to be different");return r}function JP(e){const t=e.options.bulletOrdered||".";if(t!=="."&&t!==")")throw new Error("Cannot serialize items with `"+t+"` for `options.bulletOrdered`, expected `.` or `)`");return t}function a1(e){const t=e.options.rule||"*";if(t!=="*"&&t!=="-"&&t!=="_")throw new Error("Cannot serialize rules with `"+t+"` for `options.rule`, expected `*`, `-`, or `_`");return t}function KP(e,t,r,i){const l=r.enter("list"),a=r.bulletCurrent;let u=e.ordered?JP(r):jf(r);const d=e.ordered?u==="."?")":".":GP(r);let f=t&&r.bulletLastUsed?u===r.bulletLastUsed:!1;if(!e.ordered){const g=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&g&&(!g.children||!g.children[0])&&r.stack[r.stack.length-1]==="list"&&r.stack[r.stack.length-2]==="listItem"&&r.stack[r.stack.length-3]==="list"&&r.stack[r.stack.length-4]==="listItem"&&r.indexStack[r.indexStack.length-1]===0&&r.indexStack[r.indexStack.length-2]===0&&r.indexStack[r.indexStack.length-3]===0&&(f=!0),a1(r)===u&&g){let m=-1;for(;++m<e.children.length;){const v=e.children[m];if(v&&v.type==="listItem"&&v.children&&v.children[0]&&v.children[0].type==="thematicBreak"){f=!0;break}}}}f&&(u=d),r.bulletCurrent=u;const p=r.containerFlow(e,i);return r.bulletLastUsed=u,r.bulletCurrent=a,l(),p}function QP(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function YP(e,t,r,i){const l=QP(r);let a=r.bulletCurrent||jf(r);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(r.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(l==="tab"||l==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const d=r.createTracker(i);d.move(a+" ".repeat(u-a.length)),d.shift(u);const f=r.enter("listItem"),p=r.indentLines(r.containerFlow(e,d.current()),g);return f(),p;function g(m,v,w){return v?(w?"":" ".repeat(u))+m:(w?a:a+" ".repeat(u-a.length))+m}}function XP(e,t,r,i){const l=r.enter("paragraph"),a=r.enter("phrasing"),u=r.containerPhrasing(e,i);return a(),l(),u}const ZP=Aa(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function eN(e,t,r,i){return(e.children.some(function(u){return ZP(u)})?r.containerPhrasing:r.containerFlow).call(r,e,i)}function tN(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}u1.peek=nN;function u1(e,t,r,i){const l=tN(r),a=r.enter("strong"),u=r.createTracker(i),d=u.move(l+l);let f=u.move(r.containerPhrasing(e,{after:l,before:d,...u.current()}));const p=f.charCodeAt(0),g=ha(i.before.charCodeAt(i.before.length-1),p,l);g.inside&&(f=dl(p)+f.slice(1));const m=f.charCodeAt(f.length-1),v=ha(i.after.charCodeAt(0),m,l);v.inside&&(f=f.slice(0,-1)+dl(m));const w=u.move(l+l);return a(),r.attentionEncodeSurroundingInfo={after:v.outside,before:g.outside},d+f+w}function nN(e,t,r){return r.options.strong||"*"}function rN(e,t,r,i){return r.safe(e.value,i)}function oN(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function iN(e,t,r){const i=(a1(r)+(r.options.ruleSpaces?" ":"")).repeat(oN(r));return r.options.ruleSpaces?i.slice(0,-1):i}const c1={blockquote:$P,break:ry,code:LP,definition:FP,emphasis:e1,hardBreak:ry,heading:MP,html:t1,image:n1,imageReference:r1,inlineCode:o1,link:l1,linkReference:s1,list:KP,listItem:YP,paragraph:XP,root:eN,strong:u1,text:rN,thematicBreak:iN};function lN(){return{enter:{table:sN,tableData:oy,tableHeader:oy,tableRow:uN},exit:{codeText:cN,table:aN,tableData:Yc,tableHeader:Yc,tableRow:Yc}}}function sN(e){const t=e._align;this.enter({type:"table",align:t.map(function(r){return r==="none"?null:r}),children:[]},e),this.data.inTable=!0}function aN(e){this.exit(e),this.data.inTable=void 0}function uN(e){this.enter({type:"tableRow",children:[]},e)}function Yc(e){this.exit(e)}function oy(e){this.enter({type:"tableCell",children:[]},e)}function cN(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,dN));const r=this.stack[this.stack.length-1];r.type,r.value=t,this.exit(e)}function dN(e,t){return t==="|"?t:e}function fN(e){const t=e||{},r=t.tableCellPadding,i=t.tablePipeAlign,l=t.stringLength,a=r?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
1394
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:v,table:u,tableCell:f,tableRow:d}};function u(w,k,S,j){return p(g(w,S,j),w.align)}function d(w,k,S,j){const E=m(w,S,j),P=p([E]);return P.slice(0,P.indexOf(`
1395
+ `))}function f(w,k,S,j){const E=S.enter("tableCell"),P=S.enter("phrasing"),N=S.containerPhrasing(w,{...j,before:a,after:a});return P(),E(),N}function p(w,k){return jP(w,{align:k,alignDelimiters:i,padding:r,stringLength:l})}function g(w,k,S){const j=w.children;let E=-1;const P=[],N=k.enter("table");for(;++E<j.length;)P[E]=m(j[E],k,S);return N(),P}function m(w,k,S){const j=w.children;let E=-1;const P=[],N=k.enter("tableRow");for(;++E<j.length;)P[E]=f(j[E],w,k,S);return N(),P}function v(w,k,S){let j=c1.inlineCode(w,k,S);return S.stack.includes("tableCell")&&(j=j.replace(/\|/g,"\\$&")),j}}function pN(){return{exit:{taskListCheckValueChecked:iy,taskListCheckValueUnchecked:iy,paragraph:mN}}}function hN(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:gN}}}function iy(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function mN(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const r=this.stack[this.stack.length-1];r.type;const i=r.children[0];if(i&&i.type==="text"){const l=t.children;let a=-1,u;for(;++a<l.length;){const d=l[a];if(d.type==="paragraph"){u=d;break}}u===r&&(i.value=i.value.slice(1),i.value.length===0?r.children.shift():r.position&&i.position&&typeof i.position.start.offset=="number"&&(i.position.start.column++,i.position.start.offset++,r.position.start=Object.assign({},i.position.start)))}}this.exit(e)}function gN(e,t,r,i){const l=e.children[0],a=typeof e.checked=="boolean"&&l&&l.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",d=r.createTracker(i);a&&d.move(u);let f=c1.listItem(e,t,r,{...i,...d.current()});return a&&(f=f.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,p)),f;function p(g){return g+u}}function yN(){return[K4(),gP(),wP(),lN(),pN()]}function xN(e){return{extensions:[Q4(),yP(e),kP(),fN(e),hN()]}}const vN={tokenize:EN,partial:!0},d1={tokenize:jN,partial:!0},f1={tokenize:TN,partial:!0},p1={tokenize:$N,partial:!0},wN={tokenize:IN,partial:!0},h1={name:"wwwAutolink",tokenize:SN,previous:g1},m1={name:"protocolAutolink",tokenize:CN,previous:y1},rr={name:"emailAutolink",tokenize:bN,previous:x1},Wn={};function kN(){return{text:Wn}}let Qr=48;for(;Qr<123;)Wn[Qr]=rr,Qr++,Qr===58?Qr=65:Qr===91&&(Qr=97);Wn[43]=rr;Wn[45]=rr;Wn[46]=rr;Wn[95]=rr;Wn[72]=[rr,m1];Wn[104]=[rr,m1];Wn[87]=[rr,h1];Wn[119]=[rr,h1];function bN(e,t,r){const i=this;let l,a;return u;function u(m){return!Nd(m)||!x1.call(i,i.previous)||Tf(i.events)?r(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),d(m))}function d(m){return Nd(m)?(e.consume(m),d):m===64?(e.consume(m),f):r(m)}function f(m){return m===46?e.check(wN,g,p)(m):m===45||m===95||At(m)?(a=!0,e.consume(m),f):g(m)}function p(m){return e.consume(m),l=!0,f}function g(m){return a&&l&&Mt(i.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):r(m)}}function SN(e,t,r){const i=this;return l;function l(u){return u!==87&&u!==119||!g1.call(i,i.previous)||Tf(i.events)?r(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(vN,e.attempt(d1,e.attempt(f1,a),r),r)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function CN(e,t,r){const i=this;let l="",a=!1;return u;function u(m){return(m===72||m===104)&&y1.call(i,i.previous)&&!Tf(i.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),l+=String.fromCodePoint(m),e.consume(m),d):r(m)}function d(m){if(Mt(m)&&l.length<5)return l+=String.fromCodePoint(m),e.consume(m),d;if(m===58){const v=l.toLowerCase();if(v==="http"||v==="https")return e.consume(m),f}return r(m)}function f(m){return m===47?(e.consume(m),a?p:(a=!0,f)):r(m)}function p(m){return m===null||ca(m)||Je(m)||lo(m)||Ra(m)?r(m):e.attempt(d1,e.attempt(f1,g),r)(m)}function g(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function EN(e,t,r){let i=0;return l;function l(u){return(u===87||u===119)&&i<3?(i++,e.consume(u),l):u===46&&i===3?(e.consume(u),a):r(u)}function a(u){return u===null?r(u):t(u)}}function jN(e,t,r){let i,l,a;return u;function u(p){return p===46||p===95?e.check(p1,f,d)(p):p===null||Je(p)||lo(p)||p!==45&&Ra(p)?f(p):(a=!0,e.consume(p),u)}function d(p){return p===95?i=!0:(l=i,i=void 0),e.consume(p),u}function f(p){return l||i||!a?r(p):t(p)}}function TN(e,t){let r=0,i=0;return l;function l(u){return u===40?(r++,e.consume(u),l):u===41&&i<r?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(p1,t,a)(u):u===null||Je(u)||lo(u)?t(u):(e.consume(u),l)}function a(u){return u===41&&i++,e.consume(u),l}}function $N(e,t,r){return i;function i(d){return d===33||d===34||d===39||d===41||d===42||d===44||d===46||d===58||d===59||d===63||d===95||d===126?(e.consume(d),i):d===38?(e.consume(d),a):d===93?(e.consume(d),l):d===60||d===null||Je(d)||lo(d)?t(d):r(d)}function l(d){return d===null||d===40||d===91||Je(d)||lo(d)?t(d):i(d)}function a(d){return Mt(d)?u(d):r(d)}function u(d){return d===59?(e.consume(d),i):Mt(d)?(e.consume(d),u):r(d)}}function IN(e,t,r){return i;function i(a){return e.consume(a),l}function l(a){return At(a)?r(a):t(a)}}function g1(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Je(e)}function y1(e){return!Mt(e)}function x1(e){return!(e===47||Nd(e))}function Nd(e){return e===43||e===45||e===46||e===95||At(e)}function Tf(e){let t=e.length,r=!1;for(;t--;){const i=e[t][1];if((i.type==="labelLink"||i.type==="labelImage")&&!i._balanced){r=!0;break}if(i._gfmAutolinkLiteralWalkedInto){r=!1;break}}return e.length>0&&!r&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),r}const RN={tokenize:ON,partial:!0};function PN(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:zN,continuation:{tokenize:FN},exit:_N}},text:{91:{name:"gfmFootnoteCall",tokenize:LN},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:NN,resolveTo:AN}}}}function NN(e,t,r){const i=this;let l=i.events.length;const a=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let u;for(;l--;){const f=i.events[l][1];if(f.type==="labelImage"){u=f;break}if(f.type==="gfmFootnoteCall"||f.type==="labelLink"||f.type==="label"||f.type==="image"||f.type==="link")break}return d;function d(f){if(!u||!u._balanced)return r(f);const p=Rn(i.sliceSerialize({start:u.end,end:i.now()}));return p.codePointAt(0)!==94||!a.includes(p.slice(1))?r(f):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(f),e.exit("gfmFootnoteCallLabelMarker"),t(f))}}function AN(e,t){let r=e.length;for(;r--;)if(e[r][1].type==="labelImage"&&e[r][0]==="enter"){e[r][1];break}e[r+1][1].type="data",e[r+3][1].type="gfmFootnoteCallLabelMarker";const i={type:"gfmFootnoteCall",start:Object.assign({},e[r+3][1].start),end:Object.assign({},e[e.length-1][1].end)},l={type:"gfmFootnoteCallMarker",start:Object.assign({},e[r+3][1].end),end:Object.assign({},e[r+3][1].end)};l.end.column++,l.end.offset++,l.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},l.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},d=[e[r+1],e[r+2],["enter",i,t],e[r+3],e[r+4],["enter",l,t],["exit",l,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",i,t]];return e.splice(r,e.length-r+1,...d),e}function LN(e,t,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a=0,u;return d;function d(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),f}function f(m){return m!==94?r(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",p)}function p(m){if(a>999||m===93&&!u||m===null||m===91||Je(m))return r(m);if(m===93){e.exit("chunkString");const v=e.exit("gfmFootnoteCallString");return l.includes(Rn(i.sliceSerialize(v)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):r(m)}return Je(m)||(u=!0),a++,e.consume(m),m===92?g:p}function g(m){return m===91||m===92||m===93?(e.consume(m),a++,p):p(m)}}function zN(e,t,r){const i=this,l=i.parser.gfmFootnotes||(i.parser.gfmFootnotes=[]);let a,u=0,d;return f;function f(k){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),p}function p(k){return k===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",g):r(k)}function g(k){if(u>999||k===93&&!d||k===null||k===91||Je(k))return r(k);if(k===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=Rn(i.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(k),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),v}return Je(k)||(d=!0),u++,e.consume(k),k===92?m:g}function m(k){return k===91||k===92||k===93?(e.consume(k),u++,g):g(k)}function v(k){return k===58?(e.enter("definitionMarker"),e.consume(k),e.exit("definitionMarker"),l.includes(a)||l.push(a),Oe(e,w,"gfmFootnoteDefinitionWhitespace")):r(k)}function w(k){return t(k)}}function FN(e,t,r){return e.check(wl,t,e.attempt(RN,t,r))}function _N(e){e.exit("gfmFootnoteDefinition")}function ON(e,t,r){const i=this;return Oe(e,l,"gfmFootnoteDefinitionIndent",5);function l(a){const u=i.events[i.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):r(a)}}function DN(e){let r=(e||{}).singleTilde;const i={name:"strikethrough",tokenize:a,resolveAll:l};return r==null&&(r=!0),{text:{126:i},insideSpan:{null:[i]},attentionMarkers:{null:[126]}};function l(u,d){let f=-1;for(;++f<u.length;)if(u[f][0]==="enter"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._close){let p=f;for(;p--;)if(u[p][0]==="exit"&&u[p][1].type==="strikethroughSequenceTemporary"&&u[p][1]._open&&u[f][1].end.offset-u[f][1].start.offset===u[p][1].end.offset-u[p][1].start.offset){u[f][1].type="strikethroughSequence",u[p][1].type="strikethroughSequence";const g={type:"strikethrough",start:Object.assign({},u[p][1].start),end:Object.assign({},u[f][1].end)},m={type:"strikethroughText",start:Object.assign({},u[p][1].end),end:Object.assign({},u[f][1].start)},v=[["enter",g,d],["enter",u[p][1],d],["exit",u[p][1],d],["enter",m,d]],w=d.parser.constructs.insideSpan.null;w&&cn(v,v.length,0,Pa(w,u.slice(p+1,f),d)),cn(v,v.length,0,[["exit",m,d],["enter",u[f][1],d],["exit",u[f][1],d],["exit",g,d]]),cn(u,p-1,f-p+3,v),f=p+v.length-2;break}}for(f=-1;++f<u.length;)u[f][1].type==="strikethroughSequenceTemporary"&&(u[f][1].type="data");return u}function a(u,d,f){const p=this.previous,g=this.events;let m=0;return v;function v(k){return p===126&&g[g.length-1][1].type!=="characterEscape"?f(k):(u.enter("strikethroughSequenceTemporary"),w(k))}function w(k){const S=Xo(p);if(k===126)return m>1?f(k):(u.consume(k),m++,w);if(m<2&&!r)return f(k);const j=u.exit("strikethroughSequenceTemporary"),E=Xo(k);return j._open=!E||E===2&&!!S,j._close=!S||S===2&&!!E,d(k)}}}class MN{constructor(){this.map=[]}add(t,r,i){BN(this,t,r,i)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let r=this.map.length;const i=[];for(;r>0;)r-=1,i.push(t.slice(this.map[r][0]+this.map[r][1]),this.map[r][2]),t.length=this.map[r][0];i.push(t.slice()),t.length=0;let l=i.pop();for(;l;){for(const a of l)t.push(a);l=i.pop()}this.map.length=0}}function BN(e,t,r,i){let l=0;if(!(r===0&&i.length===0)){for(;l<e.map.length;){if(e.map[l][0]===t){e.map[l][1]+=r,e.map[l][2].push(...i);return}l+=1}e.map.push([t,r,i])}}function UN(e,t){let r=!1;const i=[];for(;t<e.length;){const l=e[t];if(r){if(l[0]==="enter")l[1].type==="tableContent"&&i.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(l[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=i.length-1;i[a]=i[a]==="left"?"center":"right"}}else if(l[1].type==="tableDelimiterRow")break}else l[0]==="enter"&&l[1].type==="tableDelimiterRow"&&(r=!0);t+=1}return i}function VN(){return{flow:{null:{name:"table",tokenize:HN,resolveAll:WN}}}}function HN(e,t,r){const i=this;let l=0,a=0,u;return d;function d(O){let Z=i.events.length-1;for(;Z>-1;){const ne=i.events[Z][1].type;if(ne==="lineEnding"||ne==="linePrefix")Z--;else break}const le=Z>-1?i.events[Z][1].type:null,X=le==="tableHead"||le==="tableRow"?A:f;return X===A&&i.parser.lazy[i.now().line]?r(O):X(O)}function f(O){return e.enter("tableHead"),e.enter("tableRow"),p(O)}function p(O){return O===124||(u=!0,a+=1),g(O)}function g(O){return O===null?r(O):je(O)?a>1?(a=0,i.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),w):r(O):ze(O)?Oe(e,g,"whitespace")(O):(a+=1,u&&(u=!1,l+=1),O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),u=!0,g):(e.enter("data"),m(O)))}function m(O){return O===null||O===124||Je(O)?(e.exit("data"),g(O)):(e.consume(O),O===92?v:m)}function v(O){return O===92||O===124?(e.consume(O),m):m(O)}function w(O){return i.interrupt=!1,i.parser.lazy[i.now().line]?r(O):(e.enter("tableDelimiterRow"),u=!1,ze(O)?Oe(e,k,"linePrefix",i.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):k(O))}function k(O){return O===45||O===58?j(O):O===124?(u=!0,e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),S):q(O)}function S(O){return ze(O)?Oe(e,j,"whitespace")(O):j(O)}function j(O){return O===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),E):O===45?(a+=1,E(O)):O===null||je(O)?_(O):q(O)}function E(O){return O===45?(e.enter("tableDelimiterFiller"),P(O)):q(O)}function P(O){return O===45?(e.consume(O),P):O===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(O),e.exit("tableDelimiterMarker"),N):(e.exit("tableDelimiterFiller"),N(O))}function N(O){return ze(O)?Oe(e,_,"whitespace")(O):_(O)}function _(O){return O===124?k(O):O===null||je(O)?!u||l!==a?q(O):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(O)):q(O)}function q(O){return r(O)}function A(O){return e.enter("tableRow"),H(O)}function H(O){return O===124?(e.enter("tableCellDivider"),e.consume(O),e.exit("tableCellDivider"),H):O===null||je(O)?(e.exit("tableRow"),t(O)):ze(O)?Oe(e,H,"whitespace")(O):(e.enter("data"),K(O))}function K(O){return O===null||O===124||Je(O)?(e.exit("data"),H(O)):(e.consume(O),O===92?te:K)}function te(O){return O===92||O===124?(e.consume(O),K):K(O)}}function WN(e,t){let r=-1,i=!0,l=0,a=[0,0,0,0],u=[0,0,0,0],d=!1,f=0,p,g,m;const v=new MN;for(;++r<e.length;){const w=e[r],k=w[1];w[0]==="enter"?k.type==="tableHead"?(d=!1,f!==0&&(ly(v,t,f,p,g),g=void 0,f=0),p={type:"table",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(r,0,[["enter",p,t]])):k.type==="tableRow"||k.type==="tableDelimiterRow"?(i=!0,m=void 0,a=[0,0,0,0],u=[0,r+1,0,0],d&&(d=!1,g={type:"tableBody",start:Object.assign({},k.start),end:Object.assign({},k.end)},v.add(r,0,[["enter",g,t]])),l=k.type==="tableDelimiterRow"?2:g?3:1):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")?(i=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=Ms(v,t,a,l,void 0,m),a=[0,0,0,0]),u[2]=r)):k.type==="tableCellDivider"&&(i?i=!1:(a[1]!==0&&(u[0]=u[1],m=Ms(v,t,a,l,void 0,m)),a=u,u=[a[1],r,0,0])):k.type==="tableHead"?(d=!0,f=r):k.type==="tableRow"||k.type==="tableDelimiterRow"?(f=r,a[1]!==0?(u[0]=u[1],m=Ms(v,t,a,l,r,m)):u[1]!==0&&(m=Ms(v,t,u,l,r,m)),l=0):l&&(k.type==="data"||k.type==="tableDelimiterMarker"||k.type==="tableDelimiterFiller")&&(u[3]=r)}for(f!==0&&ly(v,t,f,p,g),v.consume(t.events),r=-1;++r<t.events.length;){const w=t.events[r];w[0]==="enter"&&w[1].type==="table"&&(w[1]._align=UN(t.events,r))}return e}function Ms(e,t,r,i,l,a){const u=i===1?"tableHeader":i===2?"tableDelimiter":"tableData",d="tableContent";r[0]!==0&&(a.end=Object.assign({},Mo(t.events,r[0])),e.add(r[0],0,[["exit",a,t]]));const f=Mo(t.events,r[1]);if(a={type:u,start:Object.assign({},f),end:Object.assign({},f)},e.add(r[1],0,[["enter",a,t]]),r[2]!==0){const p=Mo(t.events,r[2]),g=Mo(t.events,r[3]),m={type:d,start:Object.assign({},p),end:Object.assign({},g)};if(e.add(r[2],0,[["enter",m,t]]),i!==2){const v=t.events[r[2]],w=t.events[r[3]];if(v[1].end=Object.assign({},w[1].end),v[1].type="chunkText",v[1].contentType="text",r[3]>r[2]+1){const k=r[2]+1,S=r[3]-r[2]-1;e.add(k,S,[])}}e.add(r[3]+1,0,[["exit",m,t]])}return l!==void 0&&(a.end=Object.assign({},Mo(t.events,l)),e.add(l,0,[["exit",a,t]]),a=void 0),a}function ly(e,t,r,i,l){const a=[],u=Mo(t.events,r);l&&(l.end=Object.assign({},u),a.push(["exit",l,t])),i.end=Object.assign({},u),a.push(["exit",i,t]),e.add(r+1,0,a)}function Mo(e,t){const r=e[t],i=r[0]==="enter"?"start":"end";return r[1][i]}const qN={name:"tasklistCheck",tokenize:JN};function GN(){return{text:{91:qN}}}function JN(e,t,r){const i=this;return l;function l(f){return i.previous!==null||!i._gfmTasklistFirstContentOfListItem?r(f):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),a)}function a(f){return Je(f)?(e.enter("taskListCheckValueUnchecked"),e.consume(f),e.exit("taskListCheckValueUnchecked"),u):f===88||f===120?(e.enter("taskListCheckValueChecked"),e.consume(f),e.exit("taskListCheckValueChecked"),u):r(f)}function u(f){return f===93?(e.enter("taskListCheckMarker"),e.consume(f),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),d):r(f)}function d(f){return je(f)?t(f):ze(f)?e.check({tokenize:KN},t,r)(f):r(f)}}function KN(e,t,r){return Oe(e,i,"whitespace");function i(l){return l===null?r(l):t(l)}}function QN(e){return I0([kN(),PN(),DN(e),VN(),GN()])}const YN={};function ao(e){const t=this,r=e||YN,i=t.data(),l=i.micromarkExtensions||(i.micromarkExtensions=[]),a=i.fromMarkdownExtensions||(i.fromMarkdownExtensions=[]),u=i.toMarkdownExtensions||(i.toMarkdownExtensions=[]);l.push(QN(r)),a.push(yN()),u.push(xN(r))}const si=C.div`
1396
+ display: flex;
1397
+ &[data-type='user'] {
1398
+ justify-content: flex-end;
1399
+ }
1400
+
1401
+ &[data-type='assistant'] {
1402
+ justify-content: flex-start;
1403
+ }
1404
+ `,v1=C.div`
1405
+ color: ${e=>e.theme.colors.text};
1406
+ border-radius: 12px;
1407
+ padding: 8px 12px;
1408
+ max-width: 70%;
1409
+ background-color: ${e=>e.theme.colors.backgroundSecondary};
1410
+
1411
+ ${si}[data-type='user'] & {
1412
+ background-color: ${e=>e.theme.colors.userMessageBackground};
1413
+ color: ${e=>e.theme.colors.userMessageText};
1414
+ }
1415
+
1416
+ /* Add subtle transition for edit mode */
1417
+ transition: box-shadow 0.2s ease-in-out;
1418
+
1419
+ &[data-edit-mode='true'] {
1420
+ box-shadow: 0 0 0 2px ${e=>e.theme.colors.primary};
1421
+ }
1422
+ `,XN=C.div`
1423
+ font-weight: bold;
1424
+ margin-bottom: 4px;
1425
+ display: flex;
1426
+ justify-content: space-between;
1427
+ align-items: center;
1428
+ `,ZN=C.div`
1429
+ word-wrap: break-word;
1430
+ font-family: inherit;
1431
+ margin: 0;
1432
+
1433
+ > *:first-child {
1434
+ margin-top: 0;
1435
+ }
1436
+
1437
+ > *:last-child {
1438
+ margin-bottom: 0;
1439
+ }
1440
+
1441
+ p {
1442
+ margin: 8px 0;
1443
+ }
1444
+
1445
+ ul,
1446
+ ol {
1447
+ padding-left: 20px;
1448
+ margin: 8px 0;
1449
+ }
1450
+
1451
+ li {
1452
+ margin-bottom: 4px;
1453
+ }
1454
+
1455
+ pre {
1456
+ background-color: ${e=>e.theme.colors.codeBackground};
1457
+ padding: 10px;
1458
+ border-radius: 4px;
1459
+ font-family: 'Courier New', Courier, monospace;
1460
+ white-space: pre-wrap;
1461
+ word-wrap: break-word;
1462
+ margin: 8px 0;
1463
+ }
1464
+
1465
+ code {
1466
+ font-family: 'Courier New', Courier, monospace;
1467
+ background-color: ${e=>e.theme.colors.codeBackground};
1468
+ padding: 2px 4px;
1469
+ border-radius: 3px;
1470
+ font-size: 0.9em;
1471
+ }
1472
+
1473
+ pre > code {
1474
+ background-color: transparent;
1475
+ padding: 0;
1476
+ border-radius: 0;
1477
+ font-size: inherit;
1478
+ }
1479
+
1480
+ blockquote {
1481
+ border-left: 4px solid ${e=>e.theme.colors.border};
1482
+ padding-left: 10px;
1483
+ margin: 8px 0;
1484
+ color: ${e=>e.theme.colors.textSecondary};
1485
+ }
1486
+ `,eA=C.textarea`
1487
+ width: 100%;
1488
+ min-height: 100px;
1489
+ padding: 8px;
1490
+ border: none;
1491
+ border-radius: 4px;
1492
+ background-color: ${e=>e.theme.colors.background};
1493
+ color: ${e=>e.theme.colors.text};
1494
+ font-family: inherit;
1495
+ font-size: inherit;
1496
+ resize: vertical;
1497
+ margin: 4px 0;
1498
+ field-sizing: content;
1499
+ box-sizing: border-box;
1500
+
1501
+ &:focus {
1502
+ outline: none;
1503
+ box-shadow: 0 0 0 1px ${e=>e.theme.colors.primary};
1504
+ }
1505
+
1506
+ ${si}[data-type='user'] & {
1507
+ background-color: ${e=>e.theme.colors.userMessageBackground};
1508
+ color: ${e=>e.theme.colors.userMessageText};
1509
+ }
1510
+ `,tA=C.div`
1511
+ display: flex;
1512
+ justify-content: space-between;
1513
+ align-items: center;
1514
+ margin-top: 4px;
1515
+ gap: 8px;
1516
+
1517
+ > div {
1518
+ display: flex;
1519
+ align-items: center;
1520
+ gap: 8px;
1521
+ }
1522
+ `,nA=C.div`
1523
+ font-size: 0.8em;
1524
+ color: ${e=>e.theme.colors.textSecondary};
1525
+
1526
+ ${si}[data-type='user'] & {
1527
+ color: ${e=>e.theme.colors.userMessageTimestamp};
1528
+ }
1529
+ `,rA=C.span`
1530
+ font-size: 0.8em;
1531
+ color: ${e=>e.theme.colors.primary};
1532
+ cursor: pointer;
1533
+ text-decoration: underline;
1534
+
1535
+ &:hover {
1536
+ color: ${e=>e.theme.colors.primaryHover};
1537
+ }
1538
+ `,oA=C.div`
1539
+ display: flex;
1540
+ gap: 8px;
1541
+ margin-top: 8px;
1542
+ `,$f=C.button`
1543
+ padding: 4px 8px;
1544
+ border: none;
1545
+ border-radius: 4px;
1546
+ cursor: pointer;
1547
+ font-size: 0.8em;
1548
+ transition: background-color 0.2s ease-in-out;
1549
+
1550
+ &:disabled {
1551
+ opacity: 0.5;
1552
+ cursor: not-allowed;
1553
+ }
1554
+ `,iA=C($f)`
1555
+ background-color: transparent;
1556
+ color: ${e=>e.theme.colors.primary};
1557
+
1558
+ &:hover:not(:disabled) {
1559
+ background-color: ${e=>e.theme.colors.primaryHover}20;
1560
+ }
1561
+
1562
+ ${si}[data-type='user'] & {
1563
+ color: ${e=>e.theme.colors.userMessageText};
1564
+ &:hover:not(:disabled) {
1565
+ background-color: ${e=>e.theme.colors.userMessageText}20;
1566
+ }
1567
+ }
1568
+ `,lA=C($f)`
1569
+ background-color: ${e=>e.theme.colors.primary};
1570
+ color: ${e=>e.theme.colors.buttonText};
1571
+
1572
+ &:hover:not(:disabled) {
1573
+ background-color: ${e=>e.theme.colors.primaryHover};
1574
+ }
1575
+ `,sA=C($f)`
1576
+ background-color: transparent;
1577
+ color: ${e=>e.theme.colors.error};
1578
+
1579
+ &:hover:not(:disabled) {
1580
+ background-color: ${e=>e.theme.colors.error}20;
1581
+ }
1582
+ `,aA=C.div`
1583
+ width: 16px;
1584
+ height: 16px;
1585
+ border: 2px solid ${e=>e.theme.colors.primary};
1586
+ border-top-color: transparent;
1587
+ border-radius: 50%;
1588
+ animation: spin 1s linear infinite;
1589
+ margin: 0 8px;
1590
+
1591
+ @keyframes spin {
1592
+ to {
1593
+ transform: rotate(360deg);
1594
+ }
1595
+ }
1596
+ `;C.span`
1597
+ font-size: 0.7em;
1598
+ color: ${e=>e.theme.colors.textSecondary};
1599
+ margin-left: 8px;
1600
+ font-style: italic;
1601
+ `;const uA=C.span`
1602
+ font-size: 12px;
1603
+ color: ${e=>e.theme.colors.textSecondary};
1604
+ white-space: nowrap;
1605
+ `,w1=({messages:e,className:t})=>{if(!e||e.length===0)return null;const{formattedSize:r,totalTokens:i}=Xd(e),l=typeof i=="number"?vd(i):r;return h.jsx(uA,{className:t,children:l})},k1=C.div`
1606
+ font-weight: bold;
1607
+ font-size: 0.9em;
1608
+ color: ${e=>e.theme.colors.text};
1609
+ `;C.div`
1610
+ font-size: 0.8em;
1611
+ color: ${e=>e.theme.colors.textSecondary};
1612
+ margin: 4px 0;
1613
+ `;C.div`
1614
+ font-size: 0.8em;
1615
+ color: ${e=>e.theme.colors.textSecondary};
1616
+ margin: 4px 0;
1617
+ `;C.div`
1618
+ display: inline-block;
1619
+ padding: 2px 4px;
1620
+ border-radius: 4px;
1621
+ font-size: 0.8em;
1622
+ font-weight: bold;
1623
+ color: ${e=>e.theme.colors.text};
1624
+ background-color: ${e=>e.variant==="updateFile"?e.theme.colors.primary:e.variant==="createFile"?e.theme.colors.success:(e.variant==="patchFile",e.theme.colors.warning)};
1625
+ `;C.div`
1626
+ display: flex;
1627
+ gap: 8px;
1628
+ `;C.button`
1629
+ padding: 4px 8px;
1630
+ border: 1px solid ${e=>e.theme.colors.border};
1631
+ border-radius: 4px;
1632
+ background-color: ${e=>e.theme.colors.background};
1633
+ cursor: pointer;
1634
+ font-size: 0.8em;
1635
+ color: ${e=>e.theme.colors.text};
1636
+
1637
+ &:hover {
1638
+ background-color: ${e=>e.theme.colors.backgroundHover};
1639
+ }
1640
+ `;C.div`
1641
+ margin: 16px 0;
1642
+ `;C.div`
1643
+ padding: 8px;
1644
+ border: 1px solid ${e=>e.theme.colors.border};
1645
+ border-radius: 4px;
1646
+ background-color: ${e=>e.theme.colors.background};
1647
+ font-size: 0.9em;
1648
+ line-height: 1.5;
1649
+
1650
+ > *:first-child {
1651
+ margin-top: 0;
1652
+ }
1653
+
1654
+ > *:last-child {
1655
+ margin-bottom: 0;
1656
+ }
1657
+
1658
+ p {
1659
+ margin: 8px 0;
1660
+ }
1661
+
1662
+ ul,
1663
+ ol {
1664
+ padding-left: 20px;
1665
+ margin: 8px 0;
1666
+ }
1667
+
1668
+ li {
1669
+ margin-bottom: 4px;
1670
+ }
1671
+
1672
+ pre {
1673
+ background-color: ${e=>e.theme.colors.codeBackground};
1674
+ padding: 10px;
1675
+ border-radius: 4px;
1676
+ font-family: 'Courier New', Courier, monospace;
1677
+ white-space: pre-wrap;
1678
+ word-wrap: break-word;
1679
+ margin: 8px 0;
1680
+ }
1681
+
1682
+ code {
1683
+ font-family: 'Courier New', Courier, monospace;
1684
+ background-color: ${e=>e.theme.colors.codeBackground};
1685
+ padding: 2px 4px;
1686
+ border-radius: 3px;
1687
+ font-size: 0.9em;
1688
+ }
1689
+
1690
+ pre > code {
1691
+ background-color: transparent;
1692
+ padding: 0;
1693
+ border-radius: 0;
1694
+ font-size: inherit;
1695
+ }
1696
+
1697
+ blockquote {
1698
+ border-left: 4px solid ${e=>e.theme.colors.border};
1699
+ padding-left: 10px;
1700
+ margin: 8px 0;
1701
+ color: ${e=>e.theme.colors.textSecondary};
1702
+ }
1703
+ `;C.div`
1704
+ margin: 16px 0;
1705
+ `;function Ar(){}Ar.prototype={diff:function(t,r){var i,l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},a=l.callback;typeof l=="function"&&(a=l,l={}),this.options=l;var u=this;function d(_){return a?(setTimeout(function(){a(void 0,_)},0),!0):_}t=this.castInput(t),r=this.castInput(r),t=this.removeEmpty(this.tokenize(t)),r=this.removeEmpty(this.tokenize(r));var f=r.length,p=t.length,g=1,m=f+p;l.maxEditLength&&(m=Math.min(m,l.maxEditLength));var v=(i=l.timeout)!==null&&i!==void 0?i:1/0,w=Date.now()+v,k=[{oldPos:-1,lastComponent:void 0}],S=this.extractCommon(k[0],r,t,0);if(k[0].oldPos+1>=p&&S+1>=f)return d([{value:this.join(r),count:r.length}]);var j=-1/0,E=1/0;function P(){for(var _=Math.max(j,-g);_<=Math.min(E,g);_+=2){var q=void 0,A=k[_-1],H=k[_+1];A&&(k[_-1]=void 0);var K=!1;if(H){var te=H.oldPos-_;K=H&&0<=te&&te<f}var O=A&&A.oldPos+1<p;if(!K&&!O){k[_]=void 0;continue}if(!O||K&&A.oldPos+1<H.oldPos?q=u.addToPath(H,!0,void 0,0):q=u.addToPath(A,void 0,!0,1),S=u.extractCommon(q,r,t,_),q.oldPos+1>=p&&S+1>=f)return d(cA(u,q.lastComponent,r,t,u.useLongestToken));k[_]=q,q.oldPos+1>=p&&(E=Math.min(E,_-1)),S+1>=f&&(j=Math.max(j,_+1))}g++}if(a)(function _(){setTimeout(function(){if(g>m||Date.now()>w)return a();P()||_()},0)})();else for(;g<=m&&Date.now()<=w;){var N=P();if(N)return N}},addToPath:function(t,r,i,l){var a=t.lastComponent;return a&&a.added===r&&a.removed===i?{oldPos:t.oldPos+l,lastComponent:{count:a.count+1,added:r,removed:i,previousComponent:a.previousComponent}}:{oldPos:t.oldPos+l,lastComponent:{count:1,added:r,removed:i,previousComponent:a}}},extractCommon:function(t,r,i,l){for(var a=r.length,u=i.length,d=t.oldPos,f=d-l,p=0;f+1<a&&d+1<u&&this.equals(r[f+1],i[d+1]);)f++,d++,p++;return p&&(t.lastComponent={count:p,previousComponent:t.lastComponent}),t.oldPos=d,f},equals:function(t,r){return this.options.comparator?this.options.comparator(t,r):t===r||this.options.ignoreCase&&t.toLowerCase()===r.toLowerCase()},removeEmpty:function(t){for(var r=[],i=0;i<t.length;i++)t[i]&&r.push(t[i]);return r},castInput:function(t){return t},tokenize:function(t){return t.split("")},join:function(t){return t.join("")}};function cA(e,t,r,i,l){for(var a=[],u;t;)a.push(t),u=t.previousComponent,delete t.previousComponent,t=u;a.reverse();for(var d=0,f=a.length,p=0,g=0;d<f;d++){var m=a[d];if(m.removed){if(m.value=e.join(i.slice(g,g+m.count)),g+=m.count,d&&a[d-1].added){var w=a[d-1];a[d-1]=a[d],a[d]=w}}else{if(!m.added&&l){var v=r.slice(p,p+m.count);v=v.map(function(S,j){var E=i[g+j];return E.length>S.length?E:S}),m.value=e.join(v)}else m.value=e.join(r.slice(p,p+m.count));p+=m.count,m.added||(g+=m.count)}}var k=a[f-1];return f>1&&typeof k.value=="string"&&(k.added||k.removed)&&e.equals("",k.value)&&(a[f-2].value+=k.value,a.pop()),a}var sy=/^[A-Za-z\xC0-\u02C6\u02C8-\u02D7\u02DE-\u02FF\u1E00-\u1EFF]+$/,ay=/\S/,b1=new Ar;b1.equals=function(e,t){return this.options.ignoreCase&&(e=e.toLowerCase(),t=t.toLowerCase()),e===t||this.options.ignoreWhitespace&&!ay.test(e)&&!ay.test(t)};b1.tokenize=function(e){for(var t=e.split(/([^\S\r\n]+|[()[\]{}'"\r\n]|\b)/),r=0;r<t.length-1;r++)!t[r+1]&&t[r+2]&&sy.test(t[r])&&sy.test(t[r+2])&&(t[r]+=t[r+2],t.splice(r+1,2),r--);return t};var If=new Ar;If.tokenize=function(e){this.options.stripTrailingCr&&(e=e.replace(/\r\n/g,`
1706
+ `));var t=[],r=e.split(/(\n|\r\n)/);r[r.length-1]||r.pop();for(var i=0;i<r.length;i++){var l=r[i];i%2&&!this.options.newlineIsToken?t[t.length-1]+=l:(this.options.ignoreWhitespace&&(l=l.trim()),t.push(l))}return t};function dA(e,t,r){return If.diff(e,t,r)}var fA=new Ar;fA.tokenize=function(e){return e.split(/(\S.+?[.!?])(?=\s+|$)/)};var pA=new Ar;pA.tokenize=function(e){return e.split(/([{}:;,]|\s+)/)};function ta(e){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?ta=function(t){return typeof t}:ta=function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ta(e)}var hA=Object.prototype.toString,fl=new Ar;fl.useLongestToken=!0;fl.tokenize=If.tokenize;fl.castInput=function(e){var t=this.options,r=t.undefinedReplacement,i=t.stringifyReplacer,l=i===void 0?function(a,u){return typeof u>"u"?r:u}:i;return typeof e=="string"?e:JSON.stringify(Ad(e,null,null,l),l," ")};fl.equals=function(e,t){return Ar.prototype.equals.call(fl,e.replace(/,([\r\n])/g,"$1"),t.replace(/,([\r\n])/g,"$1"))};function Ad(e,t,r,i,l){t=t||[],r=r||[],i&&(e=i(l,e));var a;for(a=0;a<t.length;a+=1)if(t[a]===e)return r[a];var u;if(hA.call(e)==="[object Array]"){for(t.push(e),u=new Array(e.length),r.push(u),a=0;a<e.length;a+=1)u[a]=Ad(e[a],t,r,i,l);return t.pop(),r.pop(),u}if(e&&e.toJSON&&(e=e.toJSON()),ta(e)==="object"&&e!==null){t.push(e),u={},r.push(u);var d=[],f;for(f in e)e.hasOwnProperty(f)&&d.push(f);for(d.sort(),a=0;a<d.length;a+=1)f=d[a],u[f]=Ad(e[f],t,r,i,f);t.pop(),r.pop()}else u=e;return u}var Ld=new Ar;Ld.tokenize=function(e){return e.slice()};Ld.join=Ld.removeEmpty=function(e){return e};const tl=({content:e})=>{const[t,r]=$.useState(null),i=async()=>{try{await navigator.clipboard.writeText(e),r("success"),setTimeout(()=>r(null),2e3)}catch{r("error"),setTimeout(()=>r(null),2e3)}};return h.jsxs(S1,{onClick:i,status:t,children:[t===null&&h.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:[h.jsx("path",{d:"M4 4v8h8V4H4zm1 1h6v6H5V5z"}),h.jsx("path",{d:"M3 3v9h9V3H3zm1 1h7v7H4V4z"})]}),t==="success"&&h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:h.jsx("path",{d:"M13.78 4.22a.75.75 0 0 1 0 1.06l-7.25 7.25a.75.75 0 0 1-1.06 0L2.22 9.28a.75.75 0 0 1 1.06-1.06L6 10.94l6.72-6.72a.75.75 0 0 1 1.06 0z"})}),t==="error"&&h.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"currentColor",children:h.jsx("path",{d:"M8 0a8 8 0 1 1 0 16A8 8 0 0 1 8 0zm0 1.5a6.5 6.5 0 1 0 0 13 6.5 6.5 0 0 0 0-13zM6.5 11a1.5 1.5 0 1 1 3 0 1.5 1.5 0 0 1-3 0zm.75-6.5h1.5v4.5h-1.5V4.5z"})})]})},S1=C.button`
1707
+ padding: 4px;
1708
+ border: 1px solid ${e=>e.theme.colors.border};
1709
+ border-radius: 4px;
1710
+ background-color: ${e=>{switch(e.status){case"success":return e.theme.colors.diffAdded;case"error":return e.theme.colors.diffRemoved;default:return e.theme.colors.background}}};
1711
+ color: ${e=>{switch(e.status){case"success":return e.theme.colors.diffAddedText;case"error":return e.theme.colors.diffRemovedText;default:return e.theme.colors.text}}};
1712
+ cursor: pointer;
1713
+ transition: background-color 0.2s ease-in-out;
1714
+ display: flex;
1715
+ align-items: center;
1716
+ justify-content: center;
1717
+ width: 24px;
1718
+ height: 24px;
1719
+
1720
+ &:hover {
1721
+ background-color: ${e=>e.theme.colors.backgroundHover};
1722
+ }
1723
+
1724
+ svg {
1725
+ width: 16px;
1726
+ height: 16px;
1727
+ }
1728
+ `,mA=({oldContent:e,newContent:t})=>{const[r,i]=$.useState("unified"),l=dA(e??"",t),a=()=>h.jsxs(xA,{children:[h.jsx(tl,{content:t}),l.map((p,g)=>h.jsx(Xc,{added:p.added,removed:p.removed,children:p.value},g))]}),u=()=>h.jsxs(vA,{children:[h.jsxs(uy,{children:[e&&h.jsx(tl,{content:e}),l.filter(p=>!p.added).map((p,g)=>h.jsx(Xc,{removed:p.removed,children:p.value},g))]}),h.jsxs(uy,{children:[h.jsx(tl,{content:t}),l.filter(p=>!p.removed).map((p,g)=>h.jsx(Xc,{added:p.added,children:p.value},g))]})]}),d=()=>h.jsxs(cy,{children:[e&&h.jsx(tl,{content:e}),h.jsx(dy,{children:e})]}),f=()=>h.jsxs(cy,{children:[h.jsx(tl,{content:t}),h.jsx(dy,{children:t})]});return h.jsxs(gA,{children:[h.jsxs(yA,{children:[h.jsx(Bs,{active:r==="unified",onClick:()=>i("unified"),children:"Unified"}),h.jsx(Bs,{active:r==="sideBySide",onClick:()=>i("sideBySide"),children:"Side by Side"}),h.jsx(Bs,{active:r==="old",onClick:()=>i("old"),children:"Old Content"}),h.jsx(Bs,{active:r==="new",onClick:()=>i("new"),children:"New Content"})]}),r==="unified"&&a(),r==="sideBySide"&&u(),r==="old"&&d(),r==="new"&&f()]})},gA=C.div`
1729
+ margin: 16px 0;
1730
+ position: relative;
1731
+
1732
+ ${S1} {
1733
+ position: absolute;
1734
+ right: 20px;
1735
+ }
1736
+ `,yA=C.div`
1737
+ display: flex;
1738
+ gap: 8px;
1739
+ margin-bottom: 16px;
1740
+ `,Bs=C.button`
1741
+ padding: 4px 8px;
1742
+ border: 1px solid ${e=>e.theme.colors.border};
1743
+ border-radius: 4px;
1744
+ background-color: ${e=>e.active?e.theme.colors.primary:e.theme.colors.background};
1745
+ color: ${e=>e.active?e.theme.colors.textOnPrimary:e.theme.colors.text};
1746
+ cursor: pointer;
1747
+ font-size: 0.8em;
1748
+
1749
+ &:hover {
1750
+ background-color: ${e=>e.theme.colors.primaryHover};
1751
+ }
1752
+ `,xA=C.div`
1753
+ margin: 16px 0;
1754
+ padding: 8px;
1755
+ border: 1px solid ${e=>e.theme.colors.border};
1756
+ border-radius: 4px;
1757
+ background-color: ${e=>e.theme.colors.background};
1758
+ max-height: 400px;
1759
+ overflow-y: auto;
1760
+ `,vA=C.div`
1761
+ display: grid;
1762
+ grid-template-columns: 1fr 1fr;
1763
+ gap: 16px;
1764
+ margin: 16px 0;
1765
+ `,uy=C.div`
1766
+ position: relative;
1767
+ padding: 8px;
1768
+ border: 1px solid ${e=>e.theme.colors.border};
1769
+ border-radius: 4px;
1770
+ background-color: ${e=>e.theme.colors.background};
1771
+ max-height: 400px;
1772
+ overflow-y: auto;
1773
+ `,cy=C.div`
1774
+ margin: 16px 0;
1775
+ padding: 8px;
1776
+ border: 1px solid ${e=>e.theme.colors.border};
1777
+ border-radius: 4px;
1778
+ background-color: ${e=>e.theme.colors.background};
1779
+ max-height: 400px;
1780
+ overflow-y: auto;
1781
+ `,dy=C.div`
1782
+ white-space: pre-wrap;
1783
+ font-family: monospace;
1784
+ font-size: 0.9em;
1785
+ line-height: 1.5;
1786
+ `,Xc=C.div`
1787
+ white-space: pre-wrap;
1788
+ font-family: monospace;
1789
+ font-size: 0.9em;
1790
+ line-height: 1.5;
1791
+ padding: 2px 4px;
1792
+ margin: 2px 0;
1793
+ background-color: ${e=>e.added?e.theme.colors.diffAdded:e.removed?e.theme.colors.diffRemoved:"transparent"};
1794
+ color: ${e=>e.added?e.theme.colors.diffAddedText:e.removed?e.theme.colors.diffRemovedText:e.theme.colors.text};
1795
+ `,Rf=C.div`
1796
+ display: flex;
1797
+ flex-direction: column;
1798
+ gap: 12px;
1799
+ width: 100%;
1800
+ margin-top: 8px;
1801
+ font-size: 0.95em;
1802
+ `,to=C.div`
1803
+ border: 1px solid ${e=>e.theme.colors.border};
1804
+ border-radius: 6px;
1805
+ overflow: hidden;
1806
+ background: ${e=>e.theme.colors.backgroundSecondary}11;
1807
+ transition: all 0.2s ease;
1808
+
1809
+ &:hover {
1810
+ border-color: ${e=>e.theme.colors.primary}66;
1811
+ }
1812
+ `,no=C.div`
1813
+ padding: 10px 12px;
1814
+ background: ${e=>e.theme.colors.backgroundSecondary}22;
1815
+ cursor: pointer;
1816
+ user-select: none;
1817
+ transition: background-color 0.2s ease;
1818
+
1819
+ &:hover {
1820
+ background: ${e=>e.theme.colors.backgroundSecondary}44;
1821
+ }
1822
+ `,ro=C.div`
1823
+ padding: 12px;
1824
+ border-top: 1px solid ${e=>e.theme.colors.border};
1825
+ animation: slideDown 0.2s ease;
1826
+ color: ${e=>e.theme.colors.textSecondary};
1827
+ font-size: 0.95em;
1828
+
1829
+ > *:first-child {
1830
+ margin-top: 0;
1831
+ }
1832
+
1833
+ > *:last-child {
1834
+ margin-bottom: 0;
1835
+ }
1836
+
1837
+ p {
1838
+ margin: 8px 0;
1839
+ }
1840
+
1841
+ ul,
1842
+ ol {
1843
+ padding-left: 20px;
1844
+ margin: 8px 0;
1845
+ }
1846
+
1847
+ li {
1848
+ margin-bottom: 4px;
1849
+ }
1850
+
1851
+ pre {
1852
+ background-color: ${e=>e.theme.colors.codeBackground};
1853
+ padding: 10px;
1854
+ border-radius: 4px;
1855
+ font-family: 'Courier New', Courier, monospace;
1856
+ white-space: pre-wrap;
1857
+ word-wrap: break-word;
1858
+ margin: 8px 0;
1859
+ }
1860
+
1861
+ code {
1862
+ font-family: 'Courier New', Courier, monospace;
1863
+ background-color: ${e=>e.theme.colors.codeBackground};
1864
+ padding: 2px 4px;
1865
+ border-radius: 3px;
1866
+ font-size: 0.9em;
1867
+ }
1868
+
1869
+ pre > code {
1870
+ background-color: transparent;
1871
+ padding: 0;
1872
+ border-radius: 0;
1873
+ font-size: inherit;
1874
+ }
1875
+
1876
+ blockquote {
1877
+ border-left: 4px solid ${e=>e.theme.colors.border};
1878
+ padding-left: 10px;
1879
+ margin: 8px 0;
1880
+ color: ${e=>e.theme.colors.textSecondary};
1881
+ }
1882
+
1883
+ @keyframes slideDown {
1884
+ from {
1885
+ opacity: 0;
1886
+ transform: translateY(-10px);
1887
+ }
1888
+ to {
1889
+ opacity: 1;
1890
+ transform: translateY(0);
1891
+ }
1892
+ }
1893
+ `,Vo=C.div`
1894
+ display: flex;
1895
+ align-items: center;
1896
+ gap: 8px;
1897
+ color: ${e=>e.theme.colors.primary};
1898
+ font-weight: 500;
1899
+
1900
+ ${e=>e.expanded&&vt`
1901
+ margin-bottom: -1px;
1902
+ `}
1903
+ `,Ho=C.span`
1904
+ display: inline-block;
1905
+ width: 16px;
1906
+ height: 16px;
1907
+ line-height: 16px;
1908
+ text-align: center;
1909
+ font-size: 0.8em;
1910
+ transition: transform 0.2s ease;
1911
+ `,ma=C.div`
1912
+ display: flex;
1913
+ flex-direction: column;
1914
+ gap: 12px;
1915
+ `,ga=C.div`
1916
+ padding: 10px;
1917
+ border-radius: 4px;
1918
+ background: ${e=>e.theme.colors.backgroundSecondary}22;
1919
+ border: 1px solid ${e=>e.theme.colors.border};
1920
+
1921
+ &:hover {
1922
+ border-color: ${e=>e.theme.colors.primary}66;
1923
+ }
1924
+ `,wA=C.div`
1925
+ color: ${e=>e.theme.colors.textSecondary};
1926
+ font-size: 0.95em;
1927
+ font-weight: 500;
1928
+ margin-bottom: 6px;
1929
+ margin-top: 8px;
1930
+ `,zd=C.div`
1931
+ font-family: monospace;
1932
+ padding: 4px 8px;
1933
+ padding-left: 0px;
1934
+ background: ${e=>e.theme.colors.codeBackground};
1935
+ border-radius: 3px;
1936
+ color: ${e=>e.theme.colors.codeText};
1937
+ word-break: break-all;
1938
+ `,kA=C.div`
1939
+ margin-top: 8px;
1940
+ color: ${e=>e.theme.colors.textSecondary};
1941
+ font-size: 0.95em;
1942
+ line-height: 1.4;
1943
+
1944
+ > *:first-child {
1945
+ margin-top: 0;
1946
+ }
1947
+
1948
+ > *:last-child {
1949
+ margin-bottom: 0;
1950
+ }
1951
+
1952
+ p {
1953
+ margin: 8px 0;
1954
+ }
1955
+
1956
+ ul,
1957
+ ol {
1958
+ padding-left: 20px;
1959
+ margin: 8px 0;
1960
+ }
1961
+
1962
+ li {
1963
+ margin-bottom: 4px;
1964
+ }
1965
+
1966
+ pre {
1967
+ background-color: ${e=>e.theme.colors.codeBackground};
1968
+ padding: 10px;
1969
+ border-radius: 4px;
1970
+ font-family: 'Courier New', Courier, monospace;
1971
+ white-space: pre-wrap;
1972
+ word-wrap: break-word;
1973
+ margin: 8px 0;
1974
+ }
1975
+
1976
+ code {
1977
+ font-family: 'Courier New', Courier, monospace;
1978
+ background-color: ${e=>e.theme.colors.codeBackground};
1979
+ padding: 2px 4px;
1980
+ border-radius: 3px;
1981
+ font-size: 0.9em;
1982
+ }
1983
+
1984
+ pre > code {
1985
+ background-color: transparent;
1986
+ padding: 0;
1987
+ border-radius: 0;
1988
+ font-size: inherit;
1989
+ }
1990
+
1991
+ blockquote {
1992
+ border-left: 4px solid ${e=>e.theme.colors.border};
1993
+ padding-left: 10px;
1994
+ margin: 8px 0;
1995
+ color: ${e=>e.theme.colors.textSecondary};
1996
+ }
1997
+ `,bA=C.div`
1998
+ font-size: 0.9em;
1999
+ color: ${e=>e.theme.colors.textSecondary};
2000
+ `,SA=C.div`
2001
+ margin-top: 4px;
2002
+ font-family: monospace;
2003
+ color: ${e=>e.theme.colors.info};
2004
+ `,Fd=C.div`
2005
+ display: inline-block;
2006
+ margin-left: 8px;
2007
+ padding: 2px 6px;
2008
+ border-radius: 3px;
2009
+ background: ${e=>e.theme.colors.backgroundSecondary}22;
2010
+ border: 1px solid ${e=>e.theme.colors.border};
2011
+ color: ${e=>e.theme.colors.textSecondary};
2012
+ font-size: 0.85em;
2013
+ cursor: pointer;
2014
+ transition: all 0.2s ease;
2015
+
2016
+ &:hover {
2017
+ background: ${e=>e.theme.colors.backgroundSecondary}44;
2018
+ border-color: ${e=>e.theme.colors.primary}66;
2019
+ }
2020
+ `,C1=C.div`
2021
+ margin-top: 8px;
2022
+ padding: 8px;
2023
+ border-radius: 4px;
2024
+ background: ${e=>e.theme.colors.backgroundSecondary}22;
2025
+ border: 1px solid ${e=>e.theme.colors.border};
2026
+ animation: slideDown 0.2s ease;
2027
+ `;C.pre`
2028
+ margin: 0;
2029
+ padding: 12px;
2030
+ background: ${e=>e.theme.colors.codeBackground};
2031
+ border-radius: 4px;
2032
+ color: ${e=>e.theme.colors.codeText};
2033
+ font-family: monospace;
2034
+ font-size: 0.9em;
2035
+ line-height: 1.4;
2036
+ overflow-x: auto;
2037
+ white-space: pre-wrap;
2038
+ word-wrap: break-word;
2039
+ `;const CA=(e,t)=>{switch(e){case"createFile":return vt`
2040
+ background: ${t.colors.info}22;
2041
+ color: ${t.colors.info};
2042
+ border-color: ${t.colors.info}44;
2043
+ `;case"updateFile":return vt`
2044
+ background: ${t.colors.primary}22;
2045
+ color: ${t.colors.primary};
2046
+ border-color: ${t.colors.primary}44;
2047
+ `;case"deleteFile":return vt`
2048
+ background: ${t.colors.error}22;
2049
+ color: ${t.colors.error};
2050
+ border-color: ${t.colors.error}44;
2051
+ `;case"moveFile":return vt`
2052
+ background: ${t.colors.warning}22;
2053
+ color: ${t.colors.warning};
2054
+ border-color: ${t.colors.warning}44;
2055
+ `;case"temperature":return vt`
2056
+ background: ${t.colors.success}22;
2057
+ color: ${t.colors.success};
2058
+ border-color: ${t.colors.success}44;
2059
+ margin-left: auto;
2060
+ `;case"cheap":return vt`
2061
+ background: ${t.colors.secondary}22;
2062
+ color: ${t.colors.secondary};
2063
+ border-color: ${t.colors.secondary}44;
2064
+ `;default:return vt`
2065
+ background: ${t.colors.secondary}22;
2066
+ color: ${t.colors.secondary};
2067
+ border-color: ${t.colors.secondary}44;
2068
+ `}},sl=C.div`
2069
+ display: inline-block;
2070
+ padding: 2px 8px;
2071
+ border-radius: 3px;
2072
+ font-size: 0.85em;
2073
+ font-weight: 500;
2074
+ margin-bottom: 6px;
2075
+ border: 1px solid;
2076
+ ${e=>CA(e.variant,e.theme)}
2077
+ `;C.div`
2078
+ margin-top: 8px;
2079
+ font-size: 0.9em;
2080
+ color: ${e=>e.theme.colors.textSecondary};
2081
+ `;const E1=C.div`
2082
+ display: flex;
2083
+ gap: 8px;
2084
+ align-items: center;
2085
+ flex-wrap: wrap;
2086
+ `,EA=({data:{fileUpdates:e}})=>h.jsx("div",{children:e.map((t,r)=>h.jsx(Pf,{data:{name:t.name,args:t.args}},r))}),Pf=({data:{name:e,args:{filePath:t,explanation:r,oldContent:i,newContent:l}}})=>{const[a,u]=$.useState(!0),[d,f]=$.useState(!1);return h.jsxs(TA,{children:[h.jsxs($A,{children:[h.jsx(sl,{variant:e,children:e}),h.jsx(k1,{children:t}),h.jsxs(IA,{children:[h.jsx(py,{onClick:()=>u(!a),children:a?"Hide Explanation":"Explanation"}),(i||l)&&h.jsx(py,{onClick:()=>f(!d),children:d?"Hide Diff":"Show Diff"})]})]}),a&&r&&h.jsx(RA,{children:h.jsx(so,{remarkPlugins:[ao],children:r})}),d&&h.jsx(PA,{children:h.jsx(mA,{oldContent:i,newContent:l})})]})},jA=["updateFile","createFile","patchFile","createDirectory","deleteFile","moveFile","downloadFile","splitImage","resizeImage","imglyRemoveBackground"];function ya(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.name!="string"||!jA.includes(t.name)?!1:typeof t.args.filePath=="string"}function fy(e){if(typeof e!="object"||e===null)return!1;const t=e;return Array.isArray(t.fileUpdates)&&t.fileUpdates.every(ya)}const TA=C.div`
2087
+ margin: 16px 0;
2088
+ padding: 16px;
2089
+ border: 1px solid ${e=>e.theme.colors.border};
2090
+ border-radius: 8px;
2091
+ background-color: ${e=>e.theme.colors.background};
2092
+ `,$A=C.div`
2093
+ display: flex;
2094
+ gap: 8px;
2095
+ align-items: center;
2096
+ `,IA=C.div`
2097
+ display: flex;
2098
+ gap: 8px;
2099
+ margin-left: auto;
2100
+ `,py=C.button`
2101
+ padding: 4px 8px;
2102
+ border: 1px solid ${e=>e.theme.colors.border};
2103
+ border-radius: 4px;
2104
+ background-color: ${e=>e.theme.colors.background};
2105
+ cursor: pointer;
2106
+ font-size: 0.8em;
2107
+ color: ${e=>e.theme.colors.text};
2108
+
2109
+ &:hover {
2110
+ background-color: ${e=>e.theme.colors.backgroundHover};
2111
+ }
2112
+ `,RA=C.div`
2113
+ margin-top: 8px;
2114
+ padding: 8px;
2115
+ border: 1px solid ${e=>e.theme.colors.border};
2116
+ border-radius: 4px;
2117
+ background-color: ${e=>e.theme.colors.background};
2118
+ font-size: 0.9em;
2119
+ line-height: 1.5;
2120
+ `,PA=C.div`
2121
+ margin: 16px 0;
2122
+ `,NA=C.div`
2123
+ display: grid;
2124
+ grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
2125
+ gap: 8px;
2126
+ max-width: 800px;
2127
+ margin: 8px 0;
2128
+ `,AA=C.div`
2129
+ position: relative;
2130
+ width: 100%;
2131
+ padding-bottom: 100%; /* Creates a square aspect ratio */
2132
+ `,LA=C.img`
2133
+ position: absolute;
2134
+ top: 0;
2135
+ left: 0;
2136
+ width: 100%;
2137
+ height: 100%;
2138
+ object-fit: contain;
2139
+ border-radius: 4px;
2140
+ background-color: rgba(0, 0, 0, 0.05);
2141
+ `,zA=({message:e,visibleDataIds:t,toggleDataVisibility:r})=>{var P;const[i,l]=$.useState(!1),[a,u]=$.useState(e.content),[d,f]=$.useState(!1),[p,g]=$.useState(null),m=$.useRef(null);$.useEffect(()=>{i&&m.current&&(m.current.focus(),m.current.selectionStart=m.current.value.length,m.current.selectionEnd=m.current.value.length)},[i]);const v=()=>{u(e.content),l(!0),g(null)},w=()=>{l(!1),u(e.content),g(null)},k=N=>N.trim()?N===e.content?(g("No changes made to the message"),!1):!0:(g("Message content cannot be empty"),!1),S=async()=>{if(k(a)){f(!0),g(null);try{await kC(e.id,a),l(!1)}catch(N){g(N instanceof Error?N.message:"Failed to save changes")}finally{f(!1)}}},j=N=>{N.key==="Enter"&&N.ctrlKey?S():N.key==="Escape"&&w()},E=e.type!=="system"&&((P=e.flags)==null?void 0:P.includes(Yd.MESSAGE_EDITABLE));return h.jsx(si,{"data-type":e.type,children:h.jsxs(v1,{"data-edit-mode":i,children:[h.jsxs(XN,{children:[h.jsx("div",{children:e.type==="user"?"You":"Assistant"}),E&&!i&&h.jsx(iA,{onClick:v,title:"Edit message",children:"✎"})]}),i?h.jsxs(h.Fragment,{children:[h.jsx(eA,{ref:m,value:a,onChange:N=>u(N.target.value),onKeyDown:j,placeholder:"Enter your message..."}),p&&h.jsx("div",{style:{color:"red",fontSize:"0.8em",marginTop:"4px"},children:p}),h.jsxs(oA,{children:[h.jsx(lA,{onClick:S,disabled:d,children:d?h.jsx(aA,{}):"Save"}),h.jsx(sA,{onClick:w,disabled:d,children:"Cancel"})]})]}):h.jsx(ZN,{children:h.jsx(so,{remarkPlugins:[ao],children:e.content})}),e.images&&e.images.length>0&&h.jsx(NA,{children:e.images.map((N,_)=>h.jsx(AA,{children:h.jsx(LA,{src:`data:${N.mediaType};base64,${N.base64url}`,alt:N.originalName||`Image ${_+1}`,title:N.originalName||`Image ${_+1}`})},_))}),h.jsxs(tA,{children:[h.jsx("div",{children:e.data?h.jsx(rA,{onClick:()=>r(e.id),children:t.has(e.id)?"Hide data":"Show data"}):null}),h.jsxs("div",{children:[e.timestamp&&e.type==="assistant"&&e.data&&"contextSize"in e.data&&h.jsx(w1,{messages:[e]}),h.jsx(nA,{children:e.timestamp.toLocaleString()})]})]}),t.has(e.id)&&e.data?h.jsx(h.Fragment,{children:ya(e.data)?h.jsx(Pf,{data:e.data}):h.jsx(h0,{data:e.data})}):null]})})},hy=C.div`
2142
+ background-color: ${e=>e.theme.colors.systemMessageBackground};
2143
+ color: ${e=>e.theme.colors.systemMessageText};
2144
+ border: 1px solid ${e=>e.theme.colors.systemMessageBorder};
2145
+ border-radius: 8px;
2146
+ padding: 8px 12px;
2147
+ margin: 8px 0;
2148
+ font-style: italic;
2149
+ font-size: 0.9em;
2150
+ opacity: 0.8;
2151
+ transition: margin 0.2s ease-in-out;
2152
+
2153
+ /* Increase bottom margin when followed by a codegen view */
2154
+ & + div {\n margin-top: 16px;
2155
+ }\n
2156
+ ${e=>e.isExecutionEnd&&`
2157
+ border-bottom: 3px solid ${e.theme.colors.primary};
2158
+ `}\n`,my=C.div`
2159
+ cursor: pointer;
2160
+ font-weight: bold;
2161
+ margin-bottom: 8px;
2162
+ display: flex;
2163
+ align-items: center;
2164
+ gap: 4px;
2165
+
2166
+ &:hover {\n opacity: 0.8;
2167
+ }\n`,FA=C.div`
2168
+ white-space: pre-wrap;
2169
+ word-wrap: break-word;
2170
+ font-family: inherit;
2171
+ margin: 0;
2172
+
2173
+ /* Add spacing between content sections */
2174
+ & > *:not(:last-child) {\n margin-bottom: 12px;
2175
+ }\n`,_A=C.div`
2176
+ margin-bottom: 8px;
2177
+ position: relative;
2178
+ padding-right: 150px; /* Space for timestamp and data link */
2179
+
2180
+ &:last-child {\n margin-bottom: 0;
2181
+ }\n`,OA=C.div`
2182
+ font-size: 0.8em;
2183
+ color: ${e=>e.theme.colors.systemMessageTimestamp};
2184
+ position: absolute;
2185
+ right: 60px;
2186
+ top: 0;
2187
+ `,DA=C.span`
2188
+ font-size: 0.8em;
2189
+ color: ${e=>e.theme.colors.primary};
2190
+ cursor: pointer;
2191
+ text-decoration: underline;
2192
+ position: absolute;
2193
+ right: 0;
2194
+ top: 0;
2195
+
2196
+ &:hover {\n color: ${e=>e.theme.colors.primaryHover};\n }\n`,MA=({data:e})=>{const[t,r]=$.useState({analysis:!0,changes:!0,files:!0}),[i,l]=$.useState({}),a=d=>{r(f=>({...f,[d]:!f[d]}))},u=d=>{l(f=>({...f,[d]:!f[d]}))};return h.jsxs(Rf,{children:[h.jsxs(to,{children:[h.jsx(no,{onClick:()=>a("analysis"),children:h.jsxs(Vo,{expanded:t.analysis,children:[h.jsx(Ho,{children:t.analysis?"▼":"▶"}),"Problem Analysis"]})}),t.analysis&&h.jsx(ro,{children:h.jsx(so,{remarkPlugins:[ao],children:e.args.problemAnalysis})})]}),h.jsxs(to,{children:[h.jsx(no,{onClick:()=>a("changes"),children:h.jsxs(Vo,{expanded:t.changes,children:[h.jsx(Ho,{children:t.changes?"▼":"▶"}),"Implementation Plan"]})}),t.changes&&h.jsx(ro,{children:h.jsx(so,{remarkPlugins:[ao],children:e.args.codeChanges})})]}),h.jsxs(to,{children:[h.jsx(no,{onClick:()=>a("files"),children:h.jsxs(Vo,{expanded:t.files,children:[h.jsx(Ho,{children:t.files?"▼":"▶"}),"Affected Files"]})}),t.files&&h.jsx(ro,{children:h.jsx(ma,{children:e.args.affectedFiles.map((d,f)=>h.jsxs(ga,{children:[h.jsxs(zd,{children:[d.filePath,d.dependencies&&d.dependencies.length>0&&h.jsxs(Fd,{onClick:()=>u(d.filePath),title:"Dependencies",children:["(",d.dependencies.length,")"]})]}),d.dependencies&&d.dependencies.length>0&&i[d.filePath]&&h.jsx(C1,{children:h.jsxs(bA,{children:["Dependencies:",d.dependencies.map((p,g)=>h.jsx(SA,{children:p},g))]})}),h.jsx(wA,{children:d.reason})]},f))})})]})]})};function gy(e){if(typeof e!="object"||e===null)return!1;const t=e;if(!t.args||typeof t.args!="object"||t.args===null)return!1;const r=t.args;return typeof r.problemAnalysis=="string"&&typeof r.codeChanges=="string"&&Array.isArray(r.affectedFiles)&&r.affectedFiles.every(i=>typeof i=="object"&&i!==null&&typeof i.reason=="string"&&typeof i.filePath=="string")}const BA=({data:e})=>{const[t,r]=$.useState({explanation:!0,updates:!0,context:!1}),i=l=>{r(a=>({...a,[l]:!a[l]}))};return h.jsxs(Rf,{children:[h.jsxs(to,{children:[h.jsx(no,{onClick:()=>i("explanation"),children:h.jsxs(Vo,{expanded:t.explanation,children:[h.jsx(Ho,{children:t.explanation?"▼":"▶"}),"Explanation"]})}),t.explanation&&h.jsx(ro,{children:h.jsx(so,{remarkPlugins:[ao],children:e.args.explanation})})]}),h.jsxs(to,{children:[h.jsx(no,{onClick:()=>i("updates"),children:h.jsxs(Vo,{expanded:t.updates,children:[h.jsx(Ho,{children:t.updates?"▼":"▶"}),"File Updates (",e.args.fileUpdates.length,")"]})}),t.updates&&h.jsx(ro,{children:h.jsx(ma,{children:e.args.fileUpdates.map((l,a)=>{var u;return h.jsxs(ga,{id:"file-update-"+l.id,children:[h.jsxs(E1,{children:[h.jsx(sl,{variant:l.updateToolName,children:l.updateToolName}),h.jsx(zd,{children:l.filePath}),h.jsx(Fd,{onClick:()=>i(l.id),children:l.id}),l.temperature&&h.jsx(sl,{variant:"temperature",title:"Temperature",children:l.temperature}),l.cheap&&h.jsx(sl,{variant:"cheap",title:"Use cheaper model",children:"Cheap"})]}),l.dependsOn&&t[l.id]&&h.jsxs(C1,{children:["Depends on:"," ",(u=l.dependsOn)==null?void 0:u.map(d=>h.jsx(Fd,{onClick:()=>{var f;return(f=document.getElementById("file-update-"+d))==null?void 0:f.scrollIntoView()},children:d},d))]}),h.jsx(kA,{title:"Prompt",children:h.jsx(so,{remarkPlugins:[ao],children:l.prompt})})]},a)})})})]}),h.jsxs(to,{children:[h.jsx(no,{onClick:()=>i("context"),children:h.jsxs(Vo,{expanded:t.context,children:[h.jsx(Ho,{children:t.context?"▼":"▶"}),"Context Paths (",e.args.contextPaths.length,")"]})}),t.context&&h.jsx(ro,{children:h.jsx(ma,{children:e.args.contextPaths.map((l,a)=>h.jsx(ga,{children:h.jsx(zd,{children:l})},a))})})]})]})};function yy(e){if(typeof e!="object"||e===null)return!1;const t=e;if(!t.args||typeof t.args!="object"||t.args===null)return!1;const r=t.args;return typeof r.explanation=="string"&&Array.isArray(r.fileUpdates)&&Array.isArray(r.contextPaths)&&r.fileUpdates.every(i=>typeof i=="object"&&i!==null&&typeof i.prompt=="string"&&typeof i.filePath=="string"&&typeof i.updateToolName=="string")}const UA=C(sl)``;C.div`
2197
+ margin-top: 8px;
2198
+ padding: 12px;
2199
+ border-radius: 4px;
2200
+ background: ${e=>e.theme.colors.backgroundSecondary}22;
2201
+ border: 1px solid ${e=>e.theme.colors.border};
2202
+ animation: slideDown 0.2s ease;
2203
+
2204
+ pre {
2205
+ margin: 0;
2206
+ padding: 0;
2207
+ background: transparent;
2208
+ font-family: 'Courier New', Courier, monospace;
2209
+ font-size: 0.9em;
2210
+ white-space: pre-wrap;
2211
+ word-wrap: break-word;
2212
+ color: ${e=>e.theme.colors.textSecondary};
2213
+ }
2214
+
2215
+ @keyframes slideDown {
2216
+ from {
2217
+ opacity: 0;
2218
+ transform: translateY(-10px);
2219
+ }
2220
+ to {
2221
+ opacity: 1;
2222
+ transform: translateY(0);
2223
+ }
2224
+ }
2225
+ `;function xy(e){if(typeof e!="object"||e===null)return!1;const t=e;return typeof t.summary=="string"&&Array.isArray(t.actions)&&t.actions.every(r=>typeof r=="object"&&r!==null&&typeof r.name=="string"&&typeof r.filePath=="string")}const VA=({data:e})=>h.jsx(Rf,{children:h.jsxs(to,{children:[h.jsxs(no,{children:["Inferred Actions (",e.actions.length,")"]}),h.jsxs(ro,{children:[e.summary&&h.jsx(so,{remarkPlugins:[ao],children:e.summary}),h.jsx(ma,{children:e.actions.map((t,r)=>h.jsx(ga,{children:h.jsxs(E1,{children:[h.jsx(UA,{variant:t.name,children:t.name}),h.jsx(k1,{children:t.filePath})]})},r))})]})]})}),HA=({message:e,collapsedExecutions:t,toggleExecutionCollapse:r,visibleDataIds:i,toggleDataVisibility:l})=>t.has(e.id)?h.jsx(hy,{isExecutionEnd:e.isExecutionEnd,children:h.jsxs(my,{onClick:()=>r(e.id),children:["▶ Execution ",e.id.split("_")[1]]})}):WA(e.parts).map((u,d)=>u.parts.length>0?h.jsxs(hy,{isExecutionEnd:e.isExecutionEnd,children:[h.jsxs(my,{onClick:()=>r(e.id),children:["▼ Execution ",e.id.split("_")[1]]}),h.jsx(FA,{children:u.parts.map(f=>h.jsxs(_A,{children:[f.content,h.jsx(OA,{children:f.timestamp.toLocaleString()}),f.data?h.jsx(DA,{onClick:()=>l(f.id),children:i.has(f.id)?"Hide data":"Show data"}):null,i.has(f.id)&&f.data?h.jsx(h0,{data:f.data}):null]},f.id))})]},`section-${d}`):u.codegenView?h.jsx(Et.Fragment,{children:u.codegenView},`view-${d}`):null);function WA(e){const t=[];let r=[];return t.push({parts:r}),e.forEach(i=>{if(r.push(i),gy(i.data)||yy(i.data)||ya(i.data)||fy(i.data)||xy(i.data)){const l=gy(i.data)?h.jsx(MA,{data:i.data},`planning-${i.id}`):yy(i.data)?h.jsx(BA,{data:i.data},`summary-${i.id}`):ya(i.data)?h.jsx(Pf,{data:i.data},`file-update-${i.id}`):fy(i.data)?h.jsx(EA,{data:i.data}):xy(i.data)?h.jsx(VA,{data:i.data}):null;t.push({parts:[],codegenView:l}),r=[],t.push({parts:r})}}),t}const qA=C.div`
2226
+ display: flex;
2227
+ flex-direction: column;
2228
+ height: 100%;
2229
+ background-color: ${e=>e.theme.colors.background};
2230
+ position: relative;
2231
+ overflow: hidden;
2232
+ `,GA=C.div`
2233
+ display: flex;
2234
+ flex-direction: column;
2235
+ gap: 16px;
2236
+ padding: 16px;
2237
+ overflow-y: auto;
2238
+ flex-grow: 1;
2239
+ max-height: calc(100% - 60px); // Adjust this value based on the height of your UnreadMessagesNotification
2240
+ margin-bottom: 60px; // This should match the height of UnreadMessagesNotification plus its bottom margin
2241
+ `,JA=C.div`
2242
+ display: flex;
2243
+ flex-direction: column;
2244
+ gap: 8px;
2245
+ border: 1px solid ${e=>e.theme.colors.border};
2246
+ border-radius: 8px;
2247
+ margin-bottom: 24px;
2248
+ `,KA=C.div`
2249
+ font-size: 16px;
2250
+ font-weight: bold;
2251
+ color: ${e=>e.theme.colors.text};
2252
+ background-color: ${e=>e.theme.colors.backgroundSecondary};
2253
+ padding: 12px 16px;
2254
+ border-bottom: 1px solid ${e=>e.theme.colors.border};
2255
+ border-top-left-radius: 8px;
2256
+ border-top-right-radius: 8px;
2257
+ display: flex;
2258
+ justify-content: space-between;
2259
+ align-items: center;
2260
+ cursor: pointer;
2261
+ position: sticky;
2262
+ top: -22px;
2263
+ z-index: 10;
2264
+
2265
+ /* Wrap title in a div to control its layout */
2266
+ > .title-wrapper {
2267
+ display: flex;
2268
+ align-items: start;
2269
+ flex-grow: 1;
2270
+ overflow: hidden; /* Ensure long text doesn't overflow */
2271
+ }
2272
+
2273
+ > .title {
2274
+ display: flex;
2275
+ align-items: start;
2276
+ white-space: nowrap; /* Prevent text wrapping */
2277
+ overflow: hidden; /* Hide overflowing text */
2278
+ text-overflow: ellipsis; /* Add ellipsis for overflow */
2279
+ }
2280
+
2281
+ /* Wrap meta in a div for consistent layout */
2282
+ > .meta-wrapper {
2283
+ display: flex;
2284
+ align-items: center; /* Align meta content vertically */
2285
+ flex-shrink: 0; /* Prevent meta from shrinking */
2286
+ margin-left: auto; /* Push meta to the right */
2287
+ }
2288
+
2289
+ > .meta {
2290
+ font-size: 12px;
2291
+ font-weight: normal;
2292
+ color: ${e=>e.theme.colors.textSecondary};
2293
+ display: flex;
2294
+ flex-direction: row;
2295
+ align-items: center;
2296
+ gap: 10px;
2297
+ white-space: nowrap;
2298
+ overflow: visible;
2299
+ text-overflow: ellipsis;
2300
+ }
2301
+ `,QA=C.button`
2302
+ display: flex;
2303
+ justify-content: center;
2304
+ align-items: center;
2305
+ background-color: transparent;
2306
+ border: none;
2307
+ color: ${e=>e.theme.colors.textSecondary};
2308
+ cursor: pointer;
2309
+ font-size: 16px;
2310
+ padding: 4px 8px;
2311
+ border-radius: 4px;
2312
+ margin-left: 8px;
2313
+ z-index: 11;
2314
+ position: relative;
2315
+ min-width: 24px;
2316
+ flex-shrink: 0; /* Prevent the button from shrinking */
2317
+
2318
+ &:hover {
2319
+ background-color: ${e=>e.theme.colors.backgroundSecondary};
2320
+ color: ${e=>e.theme.colors.error};
2321
+ }
2322
+ `,YA=C.div`
2323
+ display: ${e=>e.isCollapsed?"none":"flex"};
2324
+ flex-direction: column;
2325
+ gap: 8px;
2326
+ padding: 16px;
2327
+ `,XA=C.p`
2328
+ font-size: 14px;
2329
+ color: ${e=>e.theme.colors.textSecondary};
2330
+ background-color: ${e=>e.theme.colors.backgroundTertiary};
2331
+ padding: 8px;
2332
+ border-radius: 4px;
2333
+ margin: 0 0 16px 0;
2334
+ `;C.div`
2335
+ margin-bottom: 16px;
2336
+
2337
+ &:last-child {
2338
+ margin-bottom: 0;
2339
+ }
2340
+ `;const ZA=C.span`
2341
+ &:before {
2342
+ content: '▼';
2343
+ margin-right: 8px;
2344
+ }
2345
+ `,e5=C.span`
2346
+ &:before {
2347
+ content: '▶';
2348
+ margin-right: 8px;
2349
+ }
2350
+ `;C.span`
2351
+ color: ${e=>e.theme.colors.primary};
2352
+ cursor: pointer;
2353
+ margin-right: 8px;
2354
+
2355
+ &:hover {
2356
+ text-decoration: underline;
2357
+ }
2358
+ `;const t5=C.div`
2359
+ // TODO
2360
+ `;function n5(e){return $.useMemo(()=>{const t=[];let r=null,i=null,l=0;return e.sort((a,u)=>a.iterationId<u.iterationId?-1:1).forEach((a,u)=>{var d;(!r||a.iterationId!==r.iterationId)&&(r&&(r.timestampEnd=new Date(a.timestamp),t.push(r)),r={iterationId:a.iterationId,timestampStart:new Date(a.timestamp),timestampEnd:new Date(a.timestamp),conversationSummaries:[],messages:[]}),(d=a.flags)!=null&&d.includes(Yd.CONVERSATION_SUMMARY)&&a.data&&(r.conversationSummaries.push(a.data),r.iterationTitle=a.data),a.type===Vn.SYSTEM?i?i.parts.push(a):(l++,i={...a,type:Vn.SYSTEM,parts:[a],id:`execution_${l}`,isExecutionEnd:u===e.length-1||e[u+1].type!==Vn.SYSTEM},r.messages.push(i)):(i&&(i.isExecutionEnd=!0),i=null,r.messages.push(a)),r.timestampEnd=new Date(a.timestamp)}),r&&t.push(r),t.sort((a,u)=>a.timestampStart.getTime()-u.timestampStart.getTime())},[e])}const r5=({onClick:e})=>h.jsxs(i5,{onClick:e,children:[h.jsx(l5,{children:"New messages"}),h.jsx(Zc,{}),h.jsx(Zc,{}),h.jsx(Zc,{})]}),o5=ei`
2361
+ 0%, 80%, 100% {
2362
+ transform: scale(0.8);
2363
+ }
2364
+ 40% {
2365
+ transform: scale(1.2);
2366
+ }
2367
+ `,i5=C.div`
2368
+ display: flex;
2369
+ justify-content: center;
2370
+ align-items: center;
2371
+ padding: 10px;
2372
+ background-color: ${e=>e.theme.colors.primary};
2373
+ color: ${e=>e.theme.colors.text};
2374
+ border-radius: 20px;
2375
+ position: absolute;
2376
+ bottom: 20px;
2377
+ left: 50%;
2378
+ transform: translateX(-50%);
2379
+ cursor: pointer;
2380
+ box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
2381
+ transition: all 0.3s ease;
2382
+ z-index: 10;
2383
+
2384
+ &:hover {
2385
+ background-color: ${e=>e.theme.colors.primaryHover};
2386
+ }
2387
+ `,l5=C.span`
2388
+ margin-right: 10px;
2389
+ font-weight: bold;
2390
+ `,Zc=C.div`
2391
+ width: 8px;
2392
+ height: 8px;
2393
+ background-color: ${e=>e.theme.colors.text};
2394
+ border-radius: 50%;
2395
+ margin: 0 2px;
2396
+ animation: ${o5} 1.4s infinite ease-in-out both;
2397
+
2398
+ &:nth-child(2) {
2399
+ animation-delay: -0.32s;
2400
+ }
2401
+
2402
+ &:nth-child(3) {
2403
+ animation-delay: -0.16s;
2404
+ }
2405
+ `,s5=C.div`
2406
+ position: relative;
2407
+ width: 100%;
2408
+ `,a5=C.textarea`
2409
+ width: 100%;
2410
+ min-height: 60px;
2411
+ resize: none;
2412
+ padding: 8px;
2413
+ border: 1px solid ${e=>e.theme.colors.border};
2414
+ border-radius: 4px;
2415
+ font-family: inherit;
2416
+ font-size: 14px;
2417
+ background-color: ${e=>e.theme.colors.inputBg};
2418
+ color: ${e=>e.theme.colors.inputText};
2419
+ box-sizing: border-box;
2420
+ /* Allow vertical scrolling when content exceeds max height, keep horizontal hidden */
2421
+ overflow-x: hidden;
2422
+ overflow-y: auto;
2423
+ -webkit-overflow-scrolling: touch;
2424
+
2425
+ &:focus {
2426
+ outline: none;
2427
+ border-color: ${e=>e.theme.colors.primary};
2428
+ }
2429
+ `,j1=({value:e,onChange:t,onKeyDown:r,onPaste:i,onImagePaste:l,maxViewportHeight:a=.5,...u})=>{const d=$.useRef(null);$.useEffect(()=>{const g=d.current;if(!g)return;const m=()=>{g.style.height="auto";const w=g.scrollHeight,k=a*window.innerHeight,S=Math.min(w,k);g.style.height=`${S}px`,g.style.overflowY=w<=k?"hidden":"auto"};m();const v=()=>m();return window.addEventListener("resize",v),()=>{window.removeEventListener("resize",v)}},[e,a]);const f=g=>{t(g.target.value)},p=g=>{var v;const m=(v=g.clipboardData)==null?void 0:v.items;if(m){for(let w=0;w<m.length;w++)if(m[w].type.indexOf("image")!==-1){g.preventDefault();const k=m[w].getAsFile();if(k){const S=new File([k],`pasted-image-${Date.now()}.png`,{type:"image/png"});l==null||l(S)}break}}i==null||i(g)};return h.jsx(s5,{children:h.jsx(a5,{ref:d,value:e,onChange:f,onKeyDown:r,onPaste:p,...u})})},u5=5*1024*1024,vy=["image/jpeg","image/png","image/gif","image/webp"],wy=5,T1=({images:e,onImagesChange:t,error:r,setError:i,fileInputRef:l})=>{const a=d=>{const p=Array.from(d.target.files||[]).filter(g=>vy.includes(g.type)?g.size>u5?(i(`File too large: ${g.name}. Maximum size is 5MB.`),!1):!0:(i(`Invalid file type: ${g.name}. Allowed types are JPEG, PNG, GIF, and WebP.`),!1));if(p.length+e.length>wy){i(`Too many images. Maximum ${wy} images allowed.`);return}t([...e,...p]),i(null)},u=d=>{const f=e.filter((p,g)=>g!==d);t(f)};return h.jsxs(c5,{children:[r&&h.jsx(d5,{children:r}),h.jsx(f5,{children:e.map((d,f)=>h.jsxs(p5,{children:[h.jsx("img",{src:URL.createObjectURL(d),alt:`Uploaded ${f+1}`}),h.jsx(h5,{onClick:()=>u(f),children:"×"})]},f))}),h.jsx("input",{type:"file",ref:l,style:{display:"none"},onChange:a,accept:vy.join(","),multiple:!0})]})},c5=C.div`
2430
+ margin-bottom: 8px;
2431
+ `,d5=C.div`
2432
+ color: ${e=>e.theme.colors.error};
2433
+ font-size: 14px;
2434
+ margin-bottom: 8px;
2435
+ `,f5=C.div`
2436
+ display: flex;
2437
+ flex-wrap: wrap;
2438
+ gap: 8px;
2439
+ `,p5=C.div`
2440
+ position: relative;
2441
+ width: 60px;
2442
+ height: 60px;
2443
+
2444
+ img {
2445
+ width: 100%;
2446
+ height: 100%;
2447
+ object-fit: cover;
2448
+ border-radius: 4px;
2449
+ }
2450
+ `,h5=C.button`
2451
+ position: absolute;
2452
+ top: -8px;
2453
+ right: -8px;
2454
+ background-color: ${e=>e.theme.colors.error};
2455
+ color: white;
2456
+ border: none;
2457
+ border-radius: 50%;
2458
+ width: 20px;
2459
+ height: 20px;
2460
+ font-size: 14px;
2461
+ line-height: 1;
2462
+ cursor: pointer;
2463
+ display: flex;
2464
+ align-items: center;
2465
+ justify-content: center;
2466
+
2467
+ &:hover {
2468
+ background-color: ${e=>e.theme.colors.errorHover};
2469
+ }
2470
+ `,m5={sendMessage:"Send Message ✉️",updateFile:"Update File 📝",createFile:"Create File 📄",confirmCodeGeneration:"Generate Code 🚀",runProjectCommand:"Run Command ⚙️",runBashCommand:"Run Bash Command 셸",searchCode:"Search Code 🔍",requestFilesContent:"Request Files 📂",endConversation:"End Conversation 👋",compoundAction:"Compound Action 🧱",runContainerTask:"Run Container Task 🐳",requestPermissions:"Request Permissions 🔒",performAnalysis:"Perform Analysis 🔬",contextOptimization:"Optimize Context ✨",reasoningInference:"Reasoning Inference 🤔",genaicodeHelp:"GenAIcode Help ❓",conversationGraph:"Conversation Graph 📊",generateImage:"Generate Image 🎨",readExternalFiles:"Read External Files 📖",exploreExternalDirectories:"Explore External Dirs 🗺️",removeFilesFromContext:"Remove Files from Context 🗑️",requestGitContext:"Request Git Context 🐙",webSearch:"Web Search 🌐",codeGeneration:"Code Generation 💻",contextCompression:"Compress Context 📦",pullAppContext:"Pull App Context 🔽",pushAppContext:"Push App Context 🔼",requestFilesFragments:"Request Files Fragments 🧩",pullConsoleLogs:"Pull Console Logs 🖥️",structuredQuestion:"Structured Question ❓"},g5=e=>m5[e]||e,_d=({value:e,onChange:t,disabled:r})=>{const[i,l]=$.useState([]),[a,u]=$.useState(!0),[d,f]=$.useState(null);$.useEffect(()=>{(async()=>{try{u(!0);const m=await PC();l(m),f(null)}catch(m){f("Failed to load action types."),console.error(m)}finally{u(!1)}})()},[]);const p=g=>{t(g.target.value)};return h.jsxs(y5,{children:[h.jsxs(x5,{id:"promptActionType",value:e||"",onChange:p,disabled:r||a||d!==null,children:[h.jsx("option",{value:"",children:"Auto mode"}),i.map(g=>h.jsx("option",{value:g,children:g5(g)},g))]}),a&&h.jsx(v5,{children:"Loading actions..."}),d&&h.jsx(w5,{children:d})]})},y5=C.div`
2471
+ display: flex;
2472
+ flex-direction: column;
2473
+ gap: 4px;
2474
+ `,x5=C.select`
2475
+ padding: 8px;
2476
+ border: 1px solid ${({theme:e})=>e.colors.border};
2477
+ border-radius: 4px;
2478
+ background-color: ${({theme:e})=>e.colors.inputBg};
2479
+ color: ${({theme:e})=>e.colors.inputText};
2480
+ font-size: 14px;
2481
+ max-width: 200px;
2482
+
2483
+ &:disabled {
2484
+ background-color: ${({theme:e})=>e.colors.disabled};
2485
+ cursor: not-allowed;
2486
+ }
2487
+
2488
+ option {
2489
+ padding: 4px;
2490
+ background-color: ${({theme:e})=>e.colors.inputBg};
2491
+ color: ${({theme:e})=>e.colors.inputText};
2492
+ }
2493
+ `,v5=C.div`
2494
+ color: ${({theme:e})=>e.colors.text};
2495
+ font-size: 14px;
2496
+ font-style: italic;
2497
+ `,w5=C.div`
2498
+ color: ${({theme:e})=>e.colors.error};
2499
+ font-size: 14px;
2500
+ `,k5=C.form`
2501
+ display: flex;
2502
+ flex-direction: column;
2503
+ gap: 16px;
2504
+ padding: 24px;
2505
+ border: 1px solid ${({theme:e})=>e.colors.border};
2506
+ border-radius: 8px;
2507
+ background-color: ${({theme:e})=>e.colors.background};
2508
+ max-width: 70%;
2509
+ width: 100%;
2510
+ box-sizing: border-box;
2511
+ margin-top: 10px;
2512
+ margin-bottom: 10px;
2513
+ `,b5=C.h3`
2514
+ margin: 0 0 8px 0;
2515
+ color: ${({theme:e})=>e.colors.text};
2516
+ font-size: 1.5rem;
2517
+ font-weight: 600;
2518
+ `,S5=C.p`
2519
+ margin: 0 0 16px 0;
2520
+ color: ${({theme:e})=>e.colors.textSecondary};
2521
+ font-size: 0.95rem;
2522
+ line-height: 1.5;
2523
+ `,za=C.div`
2524
+ display: flex;
2525
+ flex-direction: column;
2526
+ gap: 8px;
2527
+ `,Fa=C.label`
2528
+ font-weight: 600;
2529
+ color: ${({theme:e})=>e.colors.text};
2530
+ font-size: 0.95rem;
2531
+ `,C5=C.input`
2532
+ padding: 10px 12px;
2533
+ border: 1px solid ${({theme:e})=>e.colors.inputBorder};
2534
+ border-radius: 4px;
2535
+ background-color: ${({theme:e})=>e.colors.inputBg};
2536
+ color: ${({theme:e})=>e.colors.inputText};
2537
+ font-size: 0.95rem;
2538
+ font-family: inherit;
2539
+ transition:
2540
+ border-color 0.2s ease,
2541
+ box-shadow 0.2s ease;
2542
+
2543
+ &:focus {
2544
+ outline: none;
2545
+ border-color: ${({theme:e})=>e.colors.primary};
2546
+ box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
2547
+ }
2548
+
2549
+ &:disabled {
2550
+ background-color: ${({theme:e})=>e.colors.backgroundSecondary};
2551
+ color: ${({theme:e})=>e.colors.disabled};
2552
+ cursor: not-allowed;
2553
+ }
2554
+ `,E5=C.textarea`
2555
+ padding: 10px 12px;
2556
+ border: 1px solid ${({theme:e})=>e.colors.inputBorder};
2557
+ border-radius: 4px;
2558
+ background-color: ${({theme:e})=>e.colors.inputBg};
2559
+ color: ${({theme:e})=>e.colors.inputText};
2560
+ font-size: 0.95rem;
2561
+ font-family: inherit;
2562
+ resize: vertical;
2563
+ min-height: 100px;
2564
+ line-height: 1.5;
2565
+ transition:
2566
+ border-color 0.2s ease,
2567
+ box-shadow 0.2s ease;
2568
+
2569
+ &:focus {
2570
+ outline: none;
2571
+ border-color: ${({theme:e})=>e.colors.primary};
2572
+ box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
2573
+ }
2574
+
2575
+ &:disabled {
2576
+ background-color: ${({theme:e})=>e.colors.backgroundSecondary};
2577
+ color: ${({theme:e})=>e.colors.disabled};
2578
+ cursor: not-allowed;
2579
+ }
2580
+ `,j5=C.select`
2581
+ padding: 10px 12px;
2582
+ border: 1px solid ${({theme:e})=>e.colors.inputBorder};
2583
+ border-radius: 4px;
2584
+ background-color: ${({theme:e})=>e.colors.inputBg};
2585
+ color: ${({theme:e})=>e.colors.inputText};
2586
+ font-size: 0.95rem;
2587
+ font-family: inherit;
2588
+ cursor: pointer;
2589
+ transition:
2590
+ border-color 0.2s ease,
2591
+ box-shadow 0.2s ease;
2592
+
2593
+ &:focus {
2594
+ outline: none;
2595
+ border-color: ${({theme:e})=>e.colors.primary};
2596
+ box-shadow: 0 0 0 3px ${({theme:e})=>e.colors.primary}22;
2597
+ }
2598
+
2599
+ &:disabled {
2600
+ background-color: ${({theme:e})=>e.colors.backgroundSecondary};
2601
+ color: ${({theme:e})=>e.colors.disabled};
2602
+ cursor: not-allowed;
2603
+ }
2604
+ `,$1=C.div`
2605
+ display: flex;
2606
+ flex-direction: column;
2607
+ gap: 10px;
2608
+ `,I1=C.label`
2609
+ display: flex;
2610
+ align-items: center;
2611
+ gap: 10px;
2612
+ cursor: pointer;
2613
+ color: ${({theme:e})=>e.colors.text};
2614
+ font-size: 0.95rem;
2615
+ transition: color 0.2s ease;
2616
+
2617
+ &:hover {
2618
+ color: ${({theme:e})=>e.colors.primary};
2619
+ }
2620
+
2621
+ input[type='checkbox'],
2622
+ input[type='radio'] {
2623
+ cursor: pointer;
2624
+ width: 16px;
2625
+ height: 16px;
2626
+ }
2627
+ `,T5=C.div`
2628
+ display: flex;
2629
+ justify-content: flex-end;
2630
+ gap: 12px;
2631
+ margin-top: 8px;
2632
+ `,ky=C.button`
2633
+ padding: 10px 20px;
2634
+ border: none;
2635
+ border-radius: 4px;
2636
+ font-size: 0.95rem;
2637
+ font-weight: 500;
2638
+ cursor: pointer;
2639
+ transition:
2640
+ background-color 0.2s ease,
2641
+ transform 0.1s ease;
2642
+ font-family: inherit;
2643
+
2644
+ &:active {
2645
+ transform: translateY(1px);
2646
+ }
2647
+
2648
+ &:disabled {
2649
+ background-color: ${({theme:e})=>e.colors.disabled};
2650
+ color: ${({theme:e})=>e.colors.textSecondary};
2651
+ cursor: not-allowed;
2652
+ opacity: 0.6;
2653
+ }
2654
+
2655
+ /* Default/Primary button */
2656
+ background-color: ${({theme:e})=>e.colors.primary};
2657
+ color: white;
2658
+
2659
+ &:hover:not(:disabled) {
2660
+ background-color: ${({theme:e})=>e.colors.primaryHover};
2661
+ }
2662
+
2663
+ /* Secondary button */
2664
+ &[data-secondary='true'] {
2665
+ background-color: ${({theme:e})=>e.colors.secondary};
2666
+ color: white;
2667
+
2668
+ &:hover:not(:disabled) {
2669
+ background-color: ${({theme:e})=>e.colors.secondaryHover};
2670
+ }
2671
+ }
2672
+
2673
+ /* Error/Cancel button */
2674
+ &[data-error='true'] {
2675
+ background-color: ${({theme:e})=>e.colors.error};
2676
+ color: white;
2677
+
2678
+ &:hover:not(:disabled) {
2679
+ background-color: ${({theme:e})=>e.colors.errorHover};
2680
+ }
2681
+ }
2682
+ `,_a=C.p`
2683
+ color: ${({theme:e})=>e.colors.error};
2684
+ font-size: 0.85rem;
2685
+ margin: 4px 0 0 0;
2686
+ font-weight: 500;
2687
+ `,$5=({field:e,value:t,onChange:r,error:i})=>{const{id:l,label:a,type:u,required:d,placeholder:f}=e,p=()=>{const g={id:l,name:l,value:t||"",onChange:m=>r(m.target.value),placeholder:f,required:d};switch(u){case"textarea":return h.jsx(E5,{...g,rows:4});case"number":case"email":case"text":default:return h.jsx(C5,{type:u,...g})}};return h.jsxs(za,{children:[h.jsxs(Fa,{htmlFor:l,children:[a,d&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),p(),i&&h.jsx(_a,{children:i})]})},I5=({field:e,value:t,onChange:r,error:i})=>{var a;const l=u=>{const d=t.includes(u)?t.filter(f=>f!==u):[...t,u];r(d)};return h.jsxs(za,{children:[h.jsxs(Fa,{children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsx($1,{children:(a=e.options)==null?void 0:a.map(u=>h.jsxs(I1,{children:[h.jsx("input",{type:"checkbox",value:u.value,checked:t.includes(u.value),onChange:()=>l(u.value)}),u.label]},u.value))}),i&&h.jsx(_a,{children:i})]})},R5=({field:e,value:t,onChange:r,error:i})=>{var l;return h.jsxs(za,{children:[h.jsxs(Fa,{children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsx($1,{children:(l=e.options)==null?void 0:l.map(a=>h.jsxs(I1,{children:[h.jsx("input",{type:"radio",id:`${e.id}-${a.value}`,name:e.id,value:a.value,checked:t===a.value,onChange:()=>r(a.value)}),a.label]},a.value))}),i&&h.jsx(_a,{children:i})]})},P5=({field:e,value:t,onChange:r,error:i})=>{var l;return h.jsxs(za,{children:[h.jsxs(Fa,{htmlFor:e.id,children:[e.label,e.required&&h.jsx("span",{style:{color:"var(--error-color, #f44336)",marginLeft:"4px"},children:"*"})]}),h.jsxs(j5,{id:e.id,value:t||"",onChange:a=>r(a.target.value),required:e.required,children:[e.placeholder&&h.jsx("option",{value:"",children:e.placeholder}),(l=e.options)==null?void 0:l.map(a=>h.jsx("option",{value:a.value,children:a.label},a.value))]}),i&&h.jsx(_a,{children:i})]})},N5=({form:e,onSubmit:t,onCancel:r})=>{const[i,l]=$.useState(()=>{const m={};return e.fields.forEach(v=>{m[v.id]=v.defaultValue??""}),m}),[a,u]=$.useState({}),d=(m,v)=>{l(w=>({...w,[m]:v})),a[m]&&u(w=>{const k={...w};return delete k[m],k})},f=()=>{const m={};return e.fields.forEach(v=>{v.required&&(!i[v.id]||Array.isArray(i[v.id])&&i[v.id].length===0)&&(m[v.id]=`${v.label} is required.`)}),u(m),Object.keys(m).length===0},p=m=>{m.preventDefault(),f()&&t(i)},g=m=>{switch(m.type){case"checkbox":return h.jsx(I5,{field:m,value:i[m.id]||[],onChange:v=>d(m.id,v),error:a[m.id]},m.id);case"radio":return h.jsx(R5,{field:m,value:i[m.id]||"",onChange:v=>d(m.id,v),error:a[m.id]},m.id);case"select":return h.jsx(P5,{field:m,value:i[m.id]||"",onChange:v=>d(m.id,v),error:a[m.id]},m.id);case"text":case"textarea":case"number":case"email":default:return h.jsx($5,{field:m,value:i[m.id]||"",onChange:v=>d(m.id,v),error:a[m.id]},m.id)}};return h.jsxs(k5,{onSubmit:p,children:[e.title&&h.jsx(b5,{children:e.title}),e.description&&h.jsx(S5,{children:e.description}),e.fields.map(g),h.jsxs(T5,{children:[h.jsx(ky,{type:"submit",children:e.submitLabel||"Submit"}),e.cancelLabel&&h.jsx(ky,{type:"button",onClick:r,"data-secondary":"true",children:e.cancelLabel})]})]})},by=({onSubmit:e,onInterrupt:t,onPauseResume:r,question:i,codegenOptions:l,executionStatus:a})=>{var ae,Q,de,T,z,G,I;const[u,d]=$.useState(""),[f,p]=$.useState([]),[g,m]=$.useState(null),{suggestions:v}=$.useContext(ri)??{suggestions:[]},[w,k]=$.useState(null),[S,j]=$.useState(l.aiService),[E,P]=$.useState(void 0),[N,_]=$.useState(!1),q=$.useRef(null),A=$.useRef(null);$.useEffect(()=>{j(l.aiService)},[l.aiService]),$.useEffect(()=>{const ce=xe=>{q.current&&!q.current.contains(xe.target)&&_(!1)};return document.addEventListener("mousedown",ce),()=>{document.removeEventListener("mousedown",ce)}},[q]);const H=ce=>{p(xe=>[...xe,ce]),m(null)},K=async ce=>{if(ce.preventDefault(),(u.trim()||f.length>0)&&i)try{await e(u,f,void 0,S,E),d(""),p([]),k(null),m(null)}catch(xe){console.error("Error submitting answer:",xe),k("Failed to submit the answer. Please try again.")}},te=async ce=>{try{await e(u,f,ce,S,E),d(""),p([]),k(null),m(null)}catch(xe){console.error("Error submitting confirmation:",xe),k("Failed to submit the confirmation. Please try again.")}},O=async ce=>{try{await e("",void 0,void 0,S,E,{submitted:!0,values:ce}),k(null)}catch(xe){console.error("Error submitting structured question:",xe),k("Failed to submit the form. Please try again.")}},Z=async()=>{try{await e("",void 0,void 0,S,E,{submitted:!1,values:{}}),k(null)}catch(ce){console.error("Error cancelling structured question:",ce),k("Failed to cancel the form. Please try again.")}},le=ce=>{d(ce),_(!1)},X=()=>{_(!N)},ne=()=>{var ce;(ce=A.current)==null||ce.click()},B=a==="paused",pe=!(i!=null&&i.confirmation)||!i.confirmation.confirmLabel&&!i.confirmation.declineLabel&&!i.confirmation.secret;return i!=null&&i.structuredForm?h.jsxs(h.Fragment,{children:[h.jsx(N5,{form:i.structuredForm,onSubmit:O,onCancel:Z}),w&&h.jsx(Cy,{children:w})]}):h.jsxs(A5,{children:[i?h.jsxs(L5,{onSubmit:K,children:[h.jsx("p",{children:i.text}),(ae=i.confirmation)!=null&&ae.secret?h.jsx(z5,{type:"password",value:u,onChange:ce=>d(ce.target.value),placeholder:"Enter secret",autoFocus:!0}):((Q=i.confirmation)==null?void 0:Q.includeAnswer)!==!1&&h.jsxs(h.Fragment,{children:[h.jsx(j1,{value:u,onChange:d,placeholder:"Enter your answer here or select a suggestion",maxViewportHeight:.3,onImagePaste:H}),h.jsx(T1,{images:f,onImagesChange:p,error:g,setError:m,fileInputRef:A})]}),(de=i.confirmation)!=null&&de.secret?h.jsxs(Us,{children:[h.jsx(Sy,{type:"submit",disabled:!u.trim(),children:"Submit"}),h.jsx(ed,{onClick:()=>te(!1),"data-secondary":"true",children:"Decline"}),h.jsx(Vs,{onClick:t,children:"Interrupt"})]}):pe?h.jsxs(Us,{children:[h.jsx(Sy,{type:"submit",disabled:!u.trim()&&f.length===0,children:"Submit Answer"}),h.jsx(B5,{type:"button",onClick:ne,title:"Upload Images",children:h.jsx(Mx,{})}),h.jsx(aa,{value:S,onChange:j,disabled:!1}),((T=i.confirmation)==null?void 0:T.promptActionType)&&h.jsx(_d,{value:E,onChange:P,disabled:!1}),v&&v.length>0&&h.jsxs(F5,{ref:q,children:[h.jsxs(_5,{type:"button",onClick:X,children:[v[0],v.length>1&&h.jsx(O5,{children:" ▼"})]}),N&&h.jsx(D5,{children:v.map((ce,xe)=>h.jsx(M5,{onClick:()=>le(ce),children:ce},xe))})]}),h.jsx(Vs,{onClick:t,children:"Interrupt"})]}):h.jsxs(Us,{children:[h.jsx(ed,{onClick:()=>te(!0),children:(z=i.confirmation)==null?void 0:z.confirmLabel}),h.jsx(ed,{onClick:()=>te(!1),"data-secondary":"true",children:(G=i.confirmation)==null?void 0:G.declineLabel}),h.jsx(aa,{value:S,onChange:j,disabled:!1}),((I=i.confirmation)==null?void 0:I.promptActionType)&&h.jsx(_d,{value:E,onChange:P,disabled:!1}),h.jsx(Vs,{onClick:t,children:"Interrupt"})]})]}):h.jsxs(Us,{children:[h.jsx(U5,{onClick:r,isPaused:B,children:B?"Resume":"Pause"}),h.jsx(Vs,{onClick:t,children:"Interrupt"})]}),w&&h.jsx(Cy,{children:w})]})},A5=C.div`
2688
+ background-color: ${({theme:e})=>e.colors.background};
2689
+ border: 1px solid ${({theme:e})=>e.colors.border};
2690
+ border-radius: 8px;
2691
+ padding: 15px;
2692
+ margin-top: 10px;
2693
+ margin-bottom: 10px;
2694
+ max-width: 70%;
2695
+ width: 100%;
2696
+ box-sizing: border-box;
2697
+ `,L5=C.form`
2698
+ display: flex;
2699
+ flex-direction: column;
2700
+
2701
+ > p {
2702
+ margin-top: 0;
2703
+ }
2704
+ `,z5=C.input`
2705
+ width: 100%;
2706
+ padding: 10px;
2707
+ border: 1px solid ${({theme:e})=>e.colors.inputBorder};
2708
+ border-radius: 4px;
2709
+ background-color: ${({theme:e})=>e.colors.inputBg};
2710
+ color: ${({theme:e})=>e.colors.inputText};
2711
+ font-family: inherit;
2712
+ font-size: 14px;
2713
+ box-sizing: border-box;
2714
+ margin-bottom: 10px;
2715
+ `,F5=C.div`
2716
+ position: relative;
2717
+ display: inline-block;
2718
+ `,_5=C.button`
2719
+ background-color: ${e=>e.theme.colors.backgroundSecondary};
2720
+ color: ${e=>e.theme.colors.text};
2721
+ border: 1px solid ${e=>e.theme.colors.border};
2722
+ border-radius: 4px;
2723
+ padding: 8px 12px;
2724
+ font-size: 14px;
2725
+ cursor: pointer;
2726
+ transition: background-color 0.3s ease;
2727
+ display: flex;
2728
+ align-items: center;
2729
+ white-space: nowrap;
2730
+ overflow: hidden;
2731
+ text-overflow: ellipsis;
2732
+ max-width: 200px;
2733
+
2734
+ &:hover {
2735
+ background-color: ${e=>e.theme.colors.primary+"22"};
2736
+ }
2737
+ `,O5=C.span`
2738
+ margin-left: 5px;
2739
+ font-size: 0.8em;
2740
+ `,D5=C.div`
2741
+ position: absolute;
2742
+ bottom: 100%;
2743
+ left: 0;
2744
+ background-color: ${({theme:e})=>e.colors.inputBg};
2745
+ border: 1px solid ${({theme:e})=>e.colors.border};
2746
+ border-radius: 4px;
2747
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
2748
+ z-index: 1000;
2749
+ max-width: 300px;
2750
+ max-height: 200px;
2751
+ overflow-y: auto;
2752
+ margin-bottom: 5px;
2753
+ `,M5=C.div`
2754
+ padding: 8px 12px;
2755
+ color: ${({theme:e})=>e.colors.inputText};
2756
+ cursor: pointer;
2757
+ white-space: nowrap;
2758
+ overflow: hidden;
2759
+ text-overflow: ellipsis;
2760
+
2761
+ &:hover {
2762
+ background-color: ${({theme:e})=>e.colors.primary+"22"};
2763
+ }
2764
+ `,Us=C.div`
2765
+ display: flex;
2766
+ align-items: center;
2767
+ justify-content: flex-start;
2768
+ gap: 10px;
2769
+ margin-top: 10px;
2770
+ flex-wrap: wrap;
2771
+ `,bl=C.button`
2772
+ color: #ffffff;
2773
+ border: none;
2774
+ border-radius: 4px;
2775
+ padding: 8px 12px;
2776
+ font-size: 14px;
2777
+ cursor: pointer;
2778
+ transition: background-color 0.3s ease;
2779
+
2780
+ &:disabled {
2781
+ background-color: ${({theme:e})=>e.colors.disabled};
2782
+ cursor: not-allowed;
2783
+ }
2784
+ `,Sy=C(bl)`
2785
+ background-color: ${({theme:e})=>e.colors.primary};
2786
+
2787
+ &:hover:not(:disabled) {
2788
+ background-color: ${({theme:e})=>e.colors.primary}dd;
2789
+ }
2790
+ `,B5=C(bl)`
2791
+ background-color: ${({theme:e})=>e.colors.buttonBg}; /* Or choose another appropriate color */
2792
+
2793
+ &:hover {
2794
+ background-color: ${({theme:e})=>e.colors.buttonHoverBg}dd;
2795
+ }
2796
+ `,ed=C(bl)`
2797
+ background-color: ${({theme:e})=>e.colors.primary};
2798
+ &:hover {
2799
+ background-color: ${({theme:e})=>e.colors.primary}dd;
2800
+ }
2801
+
2802
+ &[data-secondary='true'] {
2803
+ background-color: ${({theme:e})=>e.colors.secondary};
2804
+ &:hover {
2805
+ background-color: ${({theme:e})=>e.colors.secondary}dd;
2806
+ }
2807
+ }
2808
+ `,Vs=C(bl)`
2809
+ background-color: ${({theme:e})=>e.colors.error};
2810
+ margin-left: auto;
2811
+
2812
+ &:hover {
2813
+ background-color: ${({theme:e})=>e.colors.error}dd;
2814
+ }
2815
+ `,U5=C(bl)`
2816
+ background-color: ${({theme:e,isPaused:t})=>t?e.colors.warning:e.colors.info};
2817
+
2818
+ &:hover {
2819
+ background-color: ${({theme:e,isPaused:t})=>t?e.colors.warning:e.colors.info}dd;
2820
+ }
2821
+ `,Cy=C.p`
2822
+ color: ${({theme:e})=>e.colors.error};
2823
+ font-weight: bold;
2824
+ margin-top: 10px;
2825
+ margin-bottom: 0;
2826
+ `,V5=({isVisible:e,onInterrupt:t,onPauseResume:r,executionStatus:i})=>e?h.jsxs(W5,{children:[h.jsx(G5,{onClick:t,children:"Interrupt"}),h.jsxs(q5,{"data-execution-status":i,children:[h.jsx(td,{}),h.jsx(td,{}),h.jsx(td,{})]}),h.jsx(R1,{onClick:r,children:i==="paused"?"Resume":"Pause"})]}):null,H5=ei`
2827
+ 0%, 80%, 100% {
2828
+ transform: scale(0);
2829
+ }
2830
+ 40% {
2831
+ transform: scale(1.0);
2832
+ }
2833
+ `,W5=C.div`
2834
+ display: flex;
2835
+ flex-direction: row;
2836
+ align-items: center;
2837
+ justify-content: center;
2838
+ gap: 50px;
2839
+ padding: 10px;
2840
+ background-color: ${e=>e.theme.colors.background};
2841
+ border-top: 1px solid ${e=>e.theme.colors.border};
2842
+ `,q5=C.div`
2843
+ display: flex;
2844
+ align-items: center;
2845
+ justify-content: center;
2846
+ align-items: center;
2847
+ margin-bottom: 10px;
2848
+ `,td=C.div`
2849
+ width: 10px;
2850
+ height: 10px;
2851
+ background-color: ${e=>e.theme.colors.primary};
2852
+ border-radius: 50%;
2853
+ margin: 0 5px;
2854
+
2855
+ [data-execution-status='executing'] & {
2856
+ animation: ${H5} 1.4s infinite ease-in-out both;
2857
+ }
2858
+
2859
+ &:nth-child(1) {
2860
+ animation-delay: -0.32s;
2861
+ }
2862
+
2863
+ &:nth-child(2) {
2864
+ animation-delay: -0.16s;
2865
+ }
2866
+ `,R1=C.button`
2867
+ padding: 8px 16px;
2868
+ background-color: ${e=>e.theme.colors.primary};
2869
+ color: #ffffff;
2870
+ border: none;
2871
+ border-radius: 4px;
2872
+ cursor: pointer;
2873
+ font-size: 14px;
2874
+ font-weight: 600;
2875
+ transition: background-color 0.3s, transform 0.1s;
2876
+
2877
+ &:hover {
2878
+ background-color: ${e=>e.theme.colors.primaryHover};
2879
+ transform: translateY(-1px);
2880
+ }
2881
+
2882
+ &:active {
2883
+ transform: translateY(0);
2884
+ }
2885
+ `,G5=C(R1)`
2886
+ background-color: ${({theme:e})=>e.colors.error};
2887
+
2888
+ &:hover {
2889
+ background-color: ${({theme:e})=>e.colors.errorHover};
2890
+ }
2891
+ `,P1={info:"#3498db",warn:"#f39c12",error:"#e74c3c",success:"#2ecc71",debug:"#9b59b6"},J5=C.div`
2892
+ position: fixed;
2893
+ bottom: 70px;
2894
+ right: 20px;
2895
+ width: clamp(750px, 50vw, 750px);
2896
+ height: 55vh;
2897
+ background-color: ${({theme:e})=>e.colors.backgroundAlt||e.colors.overlayBackground};
2898
+ border: 1px solid ${({theme:e})=>e.colors.border};
2899
+ border-radius: 8px;
2900
+ box-shadow: 0 6px 18px rgba(0, 0, 0, 0.25);
2901
+ z-index: 1001;
2902
+ padding: 12px;
2903
+ display: flex;
2904
+ flex-direction: column;
2905
+ font-family: 'Courier New', Courier, monospace;
2906
+ `,K5=C.div`
2907
+ display: flex;
2908
+ align-items: center;
2909
+ margin-bottom: 10px;
2910
+ padding-bottom: 10px;
2911
+ border-bottom: 1px solid ${({theme:e})=>e.colors.border};
2912
+ color: ${({theme:e})=>e.colors.text};
2913
+ gap: 16px;
2914
+ flex-wrap: wrap;
2915
+
2916
+ h4 {
2917
+ margin: 0;
2918
+ font-size: 1.1em;
2919
+ }
2920
+ `,Q5=C.button`
2921
+ background: none;
2922
+ border: none;
2923
+ color: ${({theme:e})=>e.colors.text};
2924
+ font-size: 1.2rem;
2925
+ cursor: pointer;
2926
+ padding: 0;
2927
+ line-height: 1;
2928
+
2929
+ &:hover {
2930
+ color: ${({theme:e})=>e.colors.primary};
2931
+ }
2932
+ `,Y5=C.div`
2933
+ display: flex;
2934
+ align-items: center;
2935
+ flex-wrap: wrap;
2936
+ gap: 8px;
2937
+ flex-grow: 1;
2938
+ justify-content: flex-end;
2939
+ `,X5=C.div`
2940
+ display: flex;
2941
+ gap: 5px;
2942
+ `,Ey=C.button`
2943
+ background-color: ${({active:e,theme:t})=>e?t.colors.primary:"transparent"};
2944
+ color: ${({active:e,theme:t})=>e?"white":t.colors.text};
2945
+ border: 1px solid ${({active:e,theme:t})=>e?t.colors.primary:t.colors.border};
2946
+ border-radius: 6px;
2947
+ padding: 6px 12px;
2948
+ cursor: pointer;
2949
+ font-size: 0.9rem;
2950
+ font-weight: 500;
2951
+ transition: all 0.2s ease-in-out;
2952
+
2953
+ &:hover:not(:disabled) {
2954
+ background-color: ${({theme:e})=>e.colors.secondary};
2955
+ border-color: ${({theme:e})=>e.colors.secondary};
2956
+ color: white;
2957
+ }
2958
+ margin-left: auto; /* Pushes it to the right */
2959
+ `,nd=C.button`
2960
+ background-color: ${({active:e,theme:t})=>e?t.colors.primary:t.colors.secondary};
2961
+ color: ${({active:e,theme:t})=>e?"white":t.colors.buttonText};
2962
+ border: 1px solid ${({theme:e})=>e.colors.border};
2963
+ border-radius: 6px;
2964
+ padding: 6px 10px;
2965
+ cursor: pointer;
2966
+ font-size: 0.85rem;
2967
+ transition: opacity 0.2s ease;
2968
+
2969
+ &:hover {
2970
+ opacity: 0.9;
2971
+ }
2972
+
2973
+ &:disabled {
2974
+ opacity: 0.6;
2975
+ cursor: not-allowed;
2976
+ }
2977
+
2978
+ &:focus-visible {
2979
+ outline: 2px solid ${({theme:e})=>e.colors.primary};
2980
+ outline-offset: 2px;
2981
+ }
2982
+ `,Z5=C.div`
2983
+ flex-grow: 1;
2984
+ overflow-y: auto;
2985
+ background-color: ${({theme:e})=>e.colors.inputBackground};
2986
+ padding: 10px;
2987
+ border-radius: 6px;
2988
+ color: ${({theme:e})=>e.colors.text};
2989
+ font-size: 0.9em;
2990
+ white-space: pre-wrap;
2991
+ word-wrap: break-word;
2992
+
2993
+ &::-webkit-scrollbar {
2994
+ width: 8px;
2995
+ }
2996
+ &::-webkit-scrollbar-track {
2997
+ background: ${({theme:e})=>e.colors.background};
2998
+ }
2999
+ &::-webkit-scrollbar-thumb {
3000
+ background-color: ${({theme:e})=>e.colors.border};
3001
+ border-radius: 4px;
3002
+ }
3003
+ `,eL=C.div`
3004
+ display: grid;
3005
+ grid-template-columns: 80px 70px 90px 1fr;
3006
+ align-items: start;
3007
+ gap: 8px;
3008
+ padding-bottom: 6px;
3009
+ margin-bottom: 6px;
3010
+ border-bottom: 1px dashed ${({theme:e})=>e.colors.border};
3011
+ line-height: 1.4;
3012
+
3013
+ .timestamp {
3014
+ color: ${({theme:e})=>e.colors.textSecondary};
3015
+ font-size: 0.8em;
3016
+ white-space: nowrap;
3017
+ }
3018
+
3019
+ .source {
3020
+ color: ${({theme:e})=>e.colors.textSecondary};
3021
+ font-style: italic;
3022
+ word-break: break-word;
3023
+ }
3024
+
3025
+ @media (max-width: 520px) {
3026
+ grid-template-columns: 110px 1fr;
3027
+ .source {
3028
+ grid-column: 2;
3029
+ }
3030
+ }
3031
+ `,tL=C.span`
3032
+ background-color: ${({level:e})=>P1[e]||"#7f8c8d"};
3033
+ color: white;
3034
+ padding: 2px 6px;
3035
+ border-radius: 4px;
3036
+ font-size: 0.8em;
3037
+ font-weight: bold;
3038
+ text-transform: uppercase;
3039
+ flex-shrink: 0;
3040
+ justify-self: start;
3041
+ `,nL=C.div`
3042
+ word-wrap: break-word;
3043
+ white-space: pre-wrap;
3044
+ `,rL=C.button`
3045
+ background: none;
3046
+ border: none;
3047
+ color: ${({theme:e})=>e.colors.primary};
3048
+ cursor: pointer;
3049
+ font-size: 0.8rem;
3050
+ margin-left: 8px;
3051
+ padding: 0;
3052
+ text-decoration: underline;
3053
+
3054
+ &:hover {
3055
+ opacity: 0.8;
3056
+ }
3057
+ `,oL=C.div`
3058
+ grid-column: 1 / -1;
3059
+ background-color: ${({theme:e})=>e.colors.background};
3060
+ border: 1px solid ${({theme:e})=>e.colors.border};
3061
+ border-radius: 6px;
3062
+ margin-top: 8px;
3063
+ padding: 5px;
3064
+ `,iL=C.pre`
3065
+ margin: 0;
3066
+ padding: 8px;
3067
+ font-family: 'Courier New', Courier, monospace;
3068
+ font-size: 0.9em;
3069
+ white-space: pre-wrap;
3070
+ word-wrap: break-word;
3071
+ max-height: 220px;
3072
+ overflow-y: auto;
3073
+ background-color: ${({theme:e})=>e.colors.inputBackground};
3074
+ border-radius: 3px;
3075
+
3076
+ &::-webkit-scrollbar {
3077
+ width: 8px;
3078
+ }
3079
+ &::-webkit-scrollbar-track {
3080
+ background: ${({theme:e})=>e.colors.background};
3081
+ }
3082
+ &::-webkit-scrollbar-thumb {
3083
+ background-color: ${({theme:e})=>e.colors.border};
3084
+ border-radius: 4px;
3085
+ }
3086
+ `,lL=C(si)`
3087
+ align-items: center;
3088
+ `,sL=C(v1).attrs({as:"button"})`
3089
+ display: flex;
3090
+ align-items: center;
3091
+ gap: 8px;
3092
+ width: 100%;
3093
+ cursor: pointer;
3094
+ border: 1px solid transparent;
3095
+ text-align: left;
3096
+ &:hover {
3097
+ border-color: ${({theme:e})=>e.colors.border};
3098
+ }
3099
+ position: relative;
3100
+ outline: none;
3101
+ ${({flashing:e})=>e&&vt`
3102
+ @keyframes flash {
3103
+ 0%,
3104
+ 100% {
3105
+ box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
3106
+ }
3107
+ 50% {
3108
+ box-shadow: 0 0 0 4px rgba(231, 76, 60, 0.35);
3109
+ }
3110
+ }
3111
+ animation: flash 1.2s ease-in-out infinite;
3112
+ `}
3113
+ `,aL=C.span`
3114
+ background-color: ${({level:e})=>P1[e]||"#7f8c8d"};
3115
+ color: #fff;
3116
+ padding: 2px 6px;
3117
+ border-radius: 6px;
3118
+ font-size: 0.75em;
3119
+ text-transform: uppercase;
3120
+ flex-shrink: 0;
3121
+ `,uL=C.span`
3122
+ flex: 1;
3123
+ min-width: 0;
3124
+ white-space: nowrap;
3125
+ overflow: hidden;
3126
+ text-overflow: ellipsis;
3127
+ color: ${({theme:e})=>e.colors.text};
3128
+ `,cL=C.span`
3129
+ color: ${({theme:e})=>e.colors.textSecondary};
3130
+ font-size: 0.75em;
3131
+ flex-shrink: 0;
3132
+ `,dL=C.span`
3133
+ width: 8px;
3134
+ height: 8px;
3135
+ border-radius: 50%;
3136
+ background-color: ${({theme:e})=>e.colors.error};
3137
+ flex-shrink: 0;
3138
+ `,fL=C.button`
3139
+ background-color: ${({theme:e})=>e.colors.buttonBg};
3140
+ color: ${({theme:e})=>e.colors.buttonText};
3141
+ border: none;
3142
+ border-radius: 50%;
3143
+ width: 24px;
3144
+ height: 24px;
3145
+ font-size: 14px;
3146
+ line-height: 24px;
3147
+ text-align: center;
3148
+ cursor: pointer;
3149
+ margin-right: 8px;
3150
+ flex-shrink: 0;
3151
+ display: flex;
3152
+ align-items: center;
3153
+ justify-content: center;
3154
+
3155
+ &:hover {
3156
+ background-color: ${({theme:e})=>e.colors.buttonHoverBg};
3157
+ }
3158
+ `,pL=C(fL)`
3159
+ background-color: ${({theme:e})=>e.colors.error||"#dc3545"};
3160
+ color: white;
3161
+
3162
+ &:hover {
3163
+ background-color: ${({theme:e})=>e.colors.errorHover||"#c82333"};
3164
+ }
3165
+ `,hL=({iterationId:e})=>{const{terminalEvents:t,isTerminalOpen:r,toggleTerminal:i}=Hn(),l=$.useRef({}),a=$.useMemo(()=>!e||!t[e]?[]:t[e],[e,t]),u=a[a.length-1];if($.useEffect(()=>{r&&e&&u&&(l.current[e]=u.id)},[r,e,u]),!e||a.length===0)return null;const d=!r&&u&&l.current[e]!==u.id,f=()=>{i(),e&&u&&(l.current[e]=u.id)},p=async g=>{g.stopPropagation();try{await Ex()}catch(m){console.error("Failed to interrupt command:",m),alert(`Failed to interrupt command: ${m instanceof Error?m.message:"Unknown error"}`)}};return h.jsxs(lL,{"data-type":"assistant",children:[h.jsx(pL,{onClick:p,title:"Interrupt current command",children:"⏹"}),u&&h.jsxs(sL,{flashing:d,onClick:f,"aria-label":`Toggle terminal. Last log: ${u.text}`,title:`Toggle terminal. Last log: ${u.text}`,children:[h.jsx(aL,{level:u.level,children:u.level}),h.jsxs(uL,{children:["Container log: ",u.text]}),h.jsx(cL,{children:new Date(u.timestamp).toLocaleTimeString()}),d&&h.jsx(dL,{"aria-hidden":"true"})]})]})},mL=({messages:e,currentQuestion:t,codegenOptions:r,onQuestionSubmit:i,onInterrupt:l,onPauseResume:a,executionStatus:u})=>{var ne;const[d,f]=$.useState(()=>new Set),[p,g]=$.useState(()=>new Set),[m,v]=$.useState(()=>new Set),[w]=$.useState(null),k=$.useRef(null),S=$.useRef(null),[j,E]=$.useState(!1),[P,N]=$.useState(!0),[_,q]=$.useState(null),A=n5(e),H=u!=="idle"?(ne=A[A.length-1])==null?void 0:ne.iterationId:null,K=$.useCallback(()=>{if(!S.current)return!0;const{scrollTop:B,scrollHeight:pe,clientHeight:ae}=S.current;return Math.abs(pe-ae-B)<5||pe<=ae},[]);$.useEffect(()=>{const B=S.current;if(!B)return;const pe=()=>{const ae=K();N(ae),ae&&E(!1)};return B.addEventListener("scroll",pe),()=>B.removeEventListener("scroll",pe)},[K]),$.useEffect(()=>{P?le():e.length>0&&E(!0)},[A,P,e.length]),$.useEffect(()=>{const B=new Set(A.slice(0,-1).map(pe=>pe.iterationId));v(B)},[A.length]);const te=B=>{f(pe=>{const ae=new Set(pe);return ae.has(B)?ae.delete(B):ae.add(B),ae})},O=B=>{g(pe=>{const ae=new Set(pe);return ae.has(B)?ae.delete(B):ae.add(B),ae})},Z=B=>{var pe;w&&((pe=e.find(ae=>ae.id===w))==null?void 0:pe.iterationId)===B||v(ae=>{const Q=new Set(ae);return Q.has(B)?Q.delete(B):Q.add(B),Q})},le=()=>{requestAnimationFrame(()=>{var B;(B=S.current)==null||B.scrollTo({top:S.current.scrollHeight,behavior:"smooth"})}),E(!1)},X=async B=>{if(_===B)try{await RC(B),q(null)}catch(pe){console.error("Failed to delete iteration:",pe)}else q(B)};return h.jsxs(qA,{children:[h.jsxs(GA,{ref:S,children:[A.map((B,pe)=>h.jsxs(JA,{children:[h.jsxs(KA,{children:[h.jsxs("div",{className:"title",onClick:()=>Z(B.iterationId),children:[m.has(B.iterationId)?h.jsx(e5,{}):h.jsx(ZA,{}),h.jsx("span",{children:B.iterationTitle??`Iteration ${B.iterationId}`})]}),h.jsxs("span",{className:"meta",children:[B.timestampStart.toLocaleString()," - ",B.timestampEnd.toLocaleString(),h.jsx(w1,{messages:B.messages}),B.iterationId!==H&&h.jsx(QA,{onClick:()=>X(B.iterationId),title:_===B.iterationId?"Confirm deletion":"Delete iteration",children:_===B.iterationId?"🗑️ Confirm":"🗑️"})]})]}),h.jsxs(YA,{isCollapsed:m.has(B.iterationId),children:[B.conversationSummaries.length>0&&h.jsx(XA,{children:B.conversationSummaries.join(" ")}),B.messages.map((ae,Q)=>h.jsxs(Et.Fragment,{children:[ae.type===Vn.SYSTEM?h.jsx(HA,{message:ae,collapsedExecutions:p,toggleExecutionCollapse:O,visibleDataIds:d,toggleDataVisibility:te}):h.jsx(zA,{message:ae,visibleDataIds:d,toggleDataVisibility:te}),u!=="idle"&&t&&pe===A.length-1&&Q===B.messages.length-1&&h.jsx(by,{onSubmit:i,onInterrupt:l,onPauseResume:a,question:t,codegenOptions:r,executionStatus:u})]},ae.id)),pe===A.length-1&&h.jsx(t5,{children:h.jsx(hL,{iterationId:H})})]})]},B.iterationId)),u!=="idle"&&t&&A.length>0&&A[A.length-1].messages.length===0&&h.jsx(by,{onSubmit:i,onInterrupt:l,onPauseResume:a,question:t,codegenOptions:r,executionStatus:u}),h.jsx("div",{ref:k})]}),j&&!P&&h.jsx(r5,{onClick:le}),h.jsx(V5,{isVisible:u!=="idle"&&!t,onInterrupt:l,onPauseResume:a,executionStatus:u})]})},gL=({onSubmit:e,onUploadClick:t,onAiServiceChange:r,onInitialActionTypeChange:i,options:l,disabled:a})=>h.jsxs(xL,{children:[h.jsx(yL,{onClick:e,disabled:a,children:"Submit"}),h.jsx(N1,{onClick:t,title:"Upload Images",children:h.jsx(Mx,{})}),h.jsx(aa,{value:l.aiService,onChange:r}),h.jsx(_d,{value:l.initialActionType,onChange:u=>i(u||void 0)})]}),N1=C.button`
3166
+ color: ${({theme:e})=>e.colors.buttonText};
3167
+ background-color: ${({theme:e})=>e.colors.buttonBg};
3168
+ border: none;
3169
+ border-radius: 4px;
3170
+ padding: 10px 15px;
3171
+ font-size: 14px;
3172
+ cursor: pointer;
3173
+ transition: background-color 0.3s ease;
3174
+
3175
+ &:hover {
3176
+ background-color: ${({theme:e})=>e.colors.buttonHoverBg};
3177
+ }
3178
+
3179
+ &:disabled {
3180
+ background-color: ${({theme:e})=>e.colors.disabled};
3181
+ cursor: not-allowed;
3182
+ }
3183
+ `,yL=C(N1)`
3184
+ background-color: ${({theme:e})=>e.colors.primary};
3185
+ color: #ffffff;
3186
+
3187
+ &:hover {
3188
+ background-color: ${({theme:e})=>e.colors.primaryHover};
3189
+ }
3190
+
3191
+ &:disabled {
3192
+ background-color: ${({theme:e})=>e.colors.disabled};
3193
+ }
3194
+ `,xL=C.div`
3195
+ display: flex;
3196
+ justify-content: flex-start;
3197
+ margin-top: 10px;
3198
+ gap: 10px;
3199
+ `,vL=e=>{const{onSubmit:t,isExecuting:r,codegenOptions:i,onOptionsChange:l}=e,[a,u]=$.useState(""),[d,f]=$.useState([]),[p,g]=$.useState(null),m=$.useRef(null);if(r)return null;const v=()=>{(a.trim()||d.length>0)&&(t(a.trim(),d),u(""),f([]))},w=P=>{f(P)},k=()=>{var P;(P=m.current)==null||P.click()},S=P=>{const N=[...d,P];w(N)},j=P=>{l({...i,aiService:P})},E=P=>{l({...i,initialActionType:P})};return h.jsxs(wL,{children:[h.jsx(kL,{children:h.jsx(j1,{value:a,onChange:u,placeholder:"Enter your input here",onImagePaste:S})}),h.jsx(T1,{images:d,onImagesChange:w,error:p,setError:g,fileInputRef:m}),h.jsx(gL,{onSubmit:v,onUploadClick:k,onAiServiceChange:j,onInitialActionTypeChange:E,options:i,disabled:!a.trim()&&d.length===0})]})},wL=C.div`
3200
+ display: flex;
3201
+ flex-direction: column;
3202
+ background-color: ${e=>e.theme.colors.background};
3203
+ border-top: 1px solid ${e=>e.theme.colors.border};
3204
+ padding: 16px;
3205
+ width: 100%;
3206
+ box-sizing: border-box;
3207
+ `,kL=C.div`
3208
+ margin-bottom: 16px;
3209
+ width: 100%;
3210
+ `,bL=({theme:e,toggleTheme:t})=>h.jsx(nr,{onClick:t,"aria-label":`Switch to ${e==="light"?"dark":"light"} mode`,children:e==="light"?"🌙":"☀️"}),jy=Ob`
3211
+ body {
3212
+ color: ${({theme:e})=>e.colors.text};
3213
+ font-family: Arial, sans-serif;
3214
+ margin: 0;
3215
+ padding: 0;
3216
+ background-color: ${({theme:e})=>e.colors.pageBackground};
3217
+ }
3218
+
3219
+ body::before {
3220
+ content: '';
3221
+ position: fixed;
3222
+ top: 0;
3223
+ left: 0;
3224
+ right: 0;
3225
+ bottom: 0;
3226
+ transition: all 0.3s ease;
3227
+ opacity: 0.1;
3228
+ background-image: url(${e=>e.theme.backgroundImage});
3229
+ background-size: cover;
3230
+ background-position: center;
3231
+ background-repeat: no-repeat;
3232
+ background-attachment: fixed;
3233
+ z-index: -1;
3234
+ }
3235
+ `;var rl=(e=>(e.FOCUS="GENAICODE_FOCUS",e.BLUR="GENAICODE_BLUR",e.NEW_MESSAGES="GENAICODE_NEW_MESSAGES",e.RESET_NOTIFICATIONS="GENAICODE_RESET_NOTIFICATIONS",e))(rl||{});const SL=new URL("/assets/wolf-bark-Bl17CX4O.mp3",import.meta.url);class CL{constructor(){Er(this,"context");Er(this,"bufferCache",new Map);Er(this,"initialized",!1);Er(this,"currentSources",[]);const t=window.AudioContext||window.webkitAudioContext;this.context=new t,this.initSounds()}async initSounds(){if(!this.initialized)try{const t=await this.loadAudioBuffer(SL.href);this.bufferCache.set("bark",t),this.initialized=!0}catch(t){console.error("Failed to initialize sounds:",t)}}async loadAudioBuffer(t){const i=await(await fetch(t)).arrayBuffer();return await this.context.decodeAudioData(i)}async play(t,r=.5){this.initialized||await this.initSounds();const i=this.bufferCache.get(t);if(!i){console.warn(`Sound "${t}" not found in cache`);return}try{this.context.state==="suspended"&&await this.context.resume();const l=this.context.createBufferSource();l.buffer=i;const a=this.context.createGain();a.gain.value=Math.max(0,Math.min(1,r)),l.connect(a),a.connect(this.context.destination),l.start(0),this.currentSources.push(l)}catch(l){console.error(`Failed to play sound "${t}":`,l)}}async playBark(t=.5){return this.play("bark",t)}stop(){this.currentSources.forEach(t=>t.stop())}dispose(){this.context.close(),this.bufferCache.clear(),this.initialized=!1}}const rd=new CL,EL=({messages:e,muteNotifications:t=!1})=>{const r=$.useRef(e.length),i=$.useRef(document.hasFocus()),l=$.useRef(document.title),[a,u]=$.useState(0),d=window!==window.parent;$.useEffect(()=>(l.current=document.title,()=>{document.title=l.current}),[]);const f=p=>{if(d&&window.parent){const g={...p,source:"genaicode",origin:window.location.origin};window.parent.postMessage(g,"*")}};return $.useEffect(()=>{const p=()=>{const g=document.hasFocus()&&document.visibilityState==="visible";i.current=g,d?f({type:g?rl.FOCUS:rl.BLUR,payload:{isFocused:g,timestamp:Date.now()}}):g&&(document.title=l.current),g&&(u(0),document.title=l.current,rd.stop())};return window.addEventListener("focus",p),window.addEventListener("blur",p),document.addEventListener("visibilitychange",p,!1),d&&p(),()=>{window.removeEventListener("focus",p),window.removeEventListener("blur",p),document.removeEventListener("visibilitychange",p,!1)}},[]),$.useEffect(()=>{if(!d)return;const p=g=>{if(g.source===window.parent)try{const{type:m,source:v}=g.data;if(v!=="genaicode")return;switch(m){case rl.RESET_NOTIFICATIONS:u(0),rd.stop();break}}catch(m){console.warn("Error handling notification message:",m)}};return window.addEventListener("message",p),()=>window.removeEventListener("message",p)},[]),$.useEffect(()=>{if(e.length>r.current){const p=e.length-r.current;if(d)f({type:rl.NEW_MESSAGES,payload:{count:p,timestamp:Date.now()}});else if(!i.current){const g=a+p;u(g),document.title=`(${g}) ${l.current}`}!i.current&&!t&&rd.playBark(.5)}r.current=e.length},[e,a,t]),null};async function jL(e){return[]}const TL=()=>{const e=Hn();if(!e)return console.warn("SuggestionGenerator used outside of ChatStateProvider"),null;const{messages:t,executionStatus:r,currentQuestion:i,setSuggestions:l}=e;return $.useEffect(()=>{var f;if(!l)return;if(r!=="executing"||!i||i.confirmation){l([]);return}const a=t.length>0?(f=t[t.length-1])==null?void 0:f.iterationId:null;if(!a){l([]);return}t.filter(p=>p.iterationId===a).flatMap(p=>p.type===Vn.SYSTEM&&"parts"in p&&Array.isArray(p.parts)?p.parts:[p]).length>0?(console.log("Attempting to generate suggestions using conversation context in SuggestionGenerator..."),jL().then(p=>{p.length>0?(console.log("Suggestions generated by SuggestionGenerator:",p),l(p)):(console.log("No suggestions generated or generation failed in SuggestionGenerator."),l([]))}).catch(p=>{console.error("Error generating suggestions in SuggestionGenerator:",p),l([])})):l([])},[r,i,t,l]),null},$L=C.div`
3236
+ position: fixed;
3237
+ bottom: 70px; /* Adjust as needed to not overlap input area */
3238
+ right: 20px;
3239
+ width: 400px;
3240
+ max-height: 50vh;
3241
+ background-color: ${({theme:e})=>e.colors.backgroundAlt};
3242
+ border: 1px solid ${({theme:e})=>e.colors.border};
3243
+ border-radius: 8px;
3244
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3245
+ z-index: 1000;
3246
+ overflow: auto;
3247
+ padding: 15px;
3248
+ display: flex;
3249
+ flex-direction: column;
3250
+ `,IL=C.div`
3251
+ display: flex;
3252
+ justify-content: space-between;
3253
+ align-items: center;
3254
+ margin-bottom: 10px;
3255
+ padding-bottom: 10px;
3256
+ border-bottom: 1px solid ${({theme:e})=>e.colors.border};
3257
+
3258
+ h3 {
3259
+ margin: 0;
3260
+ font-size: 1rem;
3261
+ color: ${({theme:e})=>e.colors.text};
3262
+ }
3263
+ `,RL=C.button`
3264
+ background: none;
3265
+ border: none;
3266
+ color: ${({theme:e})=>e.colors.text};
3267
+ font-size: 1.2rem;
3268
+ cursor: pointer;
3269
+ padding: 0;
3270
+ line-height: 1;
3271
+
3272
+ &:hover {
3273
+ color: ${({theme:e})=>e.colors.primary};
3274
+ }
3275
+ `,PL=C.div`
3276
+ flex-grow: 1;
3277
+ /* Basic layout for nodes and edges - consider using a graph library for actual rendering */
3278
+ display: flex;
3279
+ flex-direction: column;
3280
+ gap: 10px;
3281
+ `,NL=C.div`
3282
+ background-color: ${({theme:e})=>e.colors.inputBg};
3283
+ border: 1px solid ${({theme:e})=>e.colors.border};
3284
+ border-radius: 4px;
3285
+ padding: 8px 12px;
3286
+ font-size: 0.9rem;
3287
+ color: ${({theme:e})=>e.colors.inputText};
3288
+
3289
+ ${({isActive:e,theme:t})=>e&&vt`
3290
+ border-color: ${t.colors.primary};
3291
+ box-shadow: 0 0 0 2px ${t.colors.primary}40;
3292
+ font-weight: bold;
3293
+ `}
3294
+
3295
+ strong {
3296
+ color: ${({theme:e})=>e.colors.primary};
3297
+ }
3298
+
3299
+ p {
3300
+ margin: 5px 0 0 0;
3301
+ font-size: 0.8rem;
3302
+ color: ${({theme:e})=>e.colors.textSecondary};
3303
+ }
3304
+ `,AL=C.div`
3305
+ font-size: 0.8rem;
3306
+ color: ${({theme:e})=>e.colors.textSecondary};
3307
+ padding-left: 15px;
3308
+ position: relative;
3309
+
3310
+ &::before {
3311
+ content: '->';
3312
+ position: absolute;
3313
+ left: 0;
3314
+ color: ${({theme:e})=>e.colors.primary};
3315
+ }
3316
+ `,LL=()=>{const{conversationGraphState:e,isGraphVisualiserOpen:t,toggleGraphVisualiser:r}=Hn();if(!t||!(e!=null&&e.isActive))return null;const{nodes:i=[],edges:l=[],currentNodeId:a}=e;return h.jsxs($L,{children:[h.jsxs(IL,{children:[h.jsx("h3",{children:"Conversation Flow"}),h.jsx(RL,{onClick:r,"aria-label":"Close visualiser",children:"×"})]}),h.jsxs(PL,{children:[h.jsx("h4",{children:"Nodes:"}),i.map(u=>h.jsxs(NL,{isActive:u.id===a,children:[h.jsxs("strong",{children:["ID: ",u.id]})," (",u.actionType,")",h.jsx("p",{children:u.instruction})]},u.id)),h.jsx("h4",{children:"Edges:"}),l.map((u,d)=>h.jsxs(AL,{children:[u.sourceNode," to ",u.targetNode,": ",u.instruction]},`${u.sourceNode}-${u.targetNode}-${d}`)),a&&h.jsxs("p",{children:[h.jsx("strong",{children:"Current Node:"})," ",a]})]})]})},zL=e=>{var t;for(let r=e.length-1;r>=0;r--){const i=e[r];if(i.type===Vn.SYSTEM&&((t=i.data)!=null&&t.conversationGraphState))return i.data.conversationGraphState}return null},FL=()=>{const{messages:e,setConversationGraphState:t}=$.useContext(ri);return $.useEffect(()=>{const r=zL(e);t(i=>JSON.stringify(i)!==JSON.stringify(r)?r:i)},[e,t]),null};C.div`
3317
+ position: fixed;
3318
+ bottom: 70px; /* Adjust as needed to not overlap input area */
3319
+ right: 20px;
3320
+ width: 400px;
3321
+ max-height: 50vh;
3322
+ background-color: ${({theme:e})=>e.colors.backgroundSecondary};
3323
+ border: 1px solid ${({theme:e})=>e.colors.border};
3324
+ border-radius: 8px;
3325
+ box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3326
+ z-index: 1000;
3327
+ overflow: auto;
3328
+ padding: 15px;
3329
+ display: flex;
3330
+ flex-direction: column;
3331
+ `;C.div`
3332
+ display: flex;
3333
+ justify-content: space-between;
3334
+ align-items: center;
3335
+ margin-bottom: 10px;
3336
+ padding-bottom: 10px;
3337
+ border-bottom: 1px solid ${({theme:e})=>e.colors.border};
3338
+
3339
+ h3 {
3340
+ margin: 0;
3341
+ font-size: 1rem;
3342
+ color: ${({theme:e})=>e.colors.text};
3343
+ }
3344
+ `;C.button`
3345
+ background: none;
3346
+ border: none;
3347
+ color: ${({theme:e})=>e.colors.text};
3348
+ font-size: 1.2rem;
3349
+ cursor: pointer;
3350
+ padding: 0;
3351
+ line-height: 1;
3352
+
3353
+ &:hover {
3354
+ color: ${({theme:e})=>e.colors.primary};
3355
+ }
3356
+ `;const Ty=C.div`
3357
+ flex-grow: 1;
3358
+ display: flex;
3359
+ flex-direction: column;
3360
+ gap: 10px;
3361
+ `,Od={pending:e=>e.colors.textSecondary,"in-progress":e=>e.colors.info,completed:e=>e.colors.success,failed:e=>e.colors.error,skipped:e=>e.colors.warning},_L=C.div`
3362
+ background-color: ${({theme:e})=>e.colors.inputBg};
3363
+ border: 1px solid ${({theme:e})=>e.colors.border};
3364
+ border-left: 4px solid ${({state:e,theme:t})=>Od[e](t)};
3365
+ border-radius: 4px;
3366
+ padding: 8px 12px;
3367
+ font-size: 0.9rem;
3368
+ color: ${({theme:e})=>e.colors.inputText};
3369
+ transition: border-color 0.3s ease;
3370
+ display: flex;
3371
+ align-items: center;
3372
+
3373
+ strong {
3374
+ color: ${({state:e,theme:t})=>Od[e](t)};
3375
+ }
3376
+
3377
+ p {
3378
+ margin: 5px 0 0 0;
3379
+ font-size: 0.8rem;
3380
+ color: ${({theme:e})=>e.colors.textSecondary};
3381
+ }
3382
+ `,OL=C.div`
3383
+ font-weight: bold;
3384
+ text-transform: capitalize;
3385
+ color: ${({state:e,theme:t})=>Od[e](t)};
3386
+ margin-right: 10px;
3387
+ flex-shrink: 0;
3388
+ width: 80px; /* Align states */
3389
+ `,DL=C.div`
3390
+ display: flex;
3391
+ flex-direction: column;
3392
+ flex-grow: 1;
3393
+
3394
+ small {
3395
+ margin-top: 4px;
3396
+ font-size: 0.8em;
3397
+ color: ${({theme:e})=>e.colors.textSecondary};
3398
+ }
3399
+ `;C.div`
3400
+ font-size: 0.8rem;
3401
+ color: ${({theme:e})=>e.colors.textSecondary};
3402
+ margin-top: 5px;
3403
+ padding-left: 10px;
3404
+ border-left: 2px solid ${({theme:e})=>e.colors.border};
3405
+ `;const ML=({executionPlan:e,planUpdates:t})=>{if(!e||!e.length)return h.jsx(Ty,{children:"No execution plan available."});const r=JSON.parse(JSON.stringify(e));for(const i of t){const l=r.find(a=>a.id===i.id);l&&(l.statusUpdate=i.statusUpdate,l.state=i.state)}return h.jsx(Ty,{children:r.map(i=>h.jsxs(_L,{state:i.state??"pending",children:[h.jsx(OL,{state:i.state??"pending",children:i.state??"pending"}),h.jsxs(DL,{children:[h.jsxs("strong",{children:["ID: ",i.id]}),h.jsx("p",{children:i.description}),i.statusUpdate&&h.jsxs("small",{children:["Update: ",i.statusUpdate]})]})]},i.id))})},BL=5e3,UL=16,VL=({events:e,onClear:t})=>{const r=$.useRef(null),[i,l]=$.useState(!1),[a,u]=$.useState(new Set),[d,f]=$.useState("logs"),{toggleTerminal:p}=Hn(),g=$.useRef(!0),{executionPlan:m,planUpdates:v}=$.useMemo(()=>{var N;const j=[...e].reverse().find(_=>{var q;return(q=_.data)==null?void 0:q.plan}),E=(N=j==null?void 0:j.data)==null?void 0:N.plan,P=e.filter(_=>{var q,A,H;return((q=_.data)==null?void 0:q.statusUpdate)&&((A=_.data)==null?void 0:A.id)&&((H=_.data)==null?void 0:H.state)}).map(_=>_.data);return{executionPlan:E,planUpdates:P}},[e]);$.useLayoutEffect(()=>{r.current&&d==="logs"&&g.current&&setTimeout(()=>{r.current&&(r.current.scrollTop=r.current.scrollHeight)},100)},[e,d]);const w=async()=>{try{await Ex()}catch(j){console.error("Failed to interrupt command:",j)}},k=e.length>BL?e.slice(-5e3):e,S=()=>{r.current&&(g.current=r.current.scrollHeight-r.current.scrollTop<=r.current.clientHeight+UL)};return h.jsxs(J5,{children:[h.jsxs(K5,{children:[h.jsx("h4",{children:"Container Task"}),h.jsxs(X5,{children:[h.jsx(Ey,{active:d==="logs",onClick:()=>f("logs"),children:"Logs"}),h.jsx(Ey,{active:d==="plan",onClick:()=>f("plan"),disabled:!m,children:"Execution Plan"})]}),h.jsxs(Y5,{children:[d==="logs"&&h.jsxs(h.Fragment,{children:[h.jsx(nd,{active:!1,onClick:t,"aria-label":"Clear terminal log",children:"Clear"}),h.jsx(nd,{active:i,onClick:()=>l(!i),"aria-label":i?"Hide all payloads":"Show all payloads",children:"Payloads"})]}),h.jsx(nd,{active:!1,onClick:w,"aria-label":"Interrupt current container command",children:"Interrupt"}),h.jsx(Q5,{onClick:p,"aria-label":"Close terminal",children:"×"})]})]}),h.jsx(Z5,{ref:r,onScroll:S,children:d==="logs"?k.map(j=>{const E=!!(j.data&&Object.keys(j.data).length>0),P=i||a.has(j.id);let N="";if(E)try{N=JSON.stringify(j.data,null,2)}catch{N=String(j.data)}return h.jsxs(Et.Fragment,{children:[h.jsxs(eL,{children:[h.jsx("span",{className:"timestamp",children:new Date(j.timestamp).toLocaleTimeString()}),h.jsx(tL,{level:j.level,children:j.level}),h.jsxs("span",{className:"source",children:["[",j.source,"]"]}),h.jsxs(nL,{children:[j.text,E&&h.jsx(rL,{onClick:()=>{const _=new Set(a);P?_.delete(j.id):_.add(j.id),u(_)},children:P?"Hide payload":"Show payload"})]})]}),E&&P&&h.jsx(oL,{children:h.jsx(iL,{children:N})})]},j.id)}):h.jsx(ML,{executionPlan:m,planUpdates:v})})]})};class HL{constructor(t=1e3,r){Er(this,"buffer",[]);Er(this,"maxBufferSize");Er(this,"callback");this.maxBufferSize=t,this.callback=r,this._wrapConsoleMethods()}_wrapConsoleMethods(){["log","info","warn","error","debug","trace","assert"].forEach(r=>{const i=console[r];console[r]=(...l)=>{this._addToBuffer(r,l),i.apply(console,l)}})}_formatMessage(t){return t.map(r=>{if(typeof r=="string")return r;try{return JSON.stringify(r)}catch{return String(r)}}).join(" ")}_addToBuffer(t,r){const i={timestamp:Date.now(),level:t,message:this._formatMessage(r),args:r};this.buffer.push(i),this.buffer.length>this.maxBufferSize&&this.buffer.shift(),this.callback(this.buffer).catch(l=>{console.warn.call(console,"ConsoleInterceptor: Failed to execute callback:",l)})}getBuffer(){return[...this.buffer]}clearBuffer(){this.buffer=[]}}const WL=()=>{const{messages:e,executionStatus:t,currentQuestion:r,theme:i,usage:l,codegenOptions:a,rcConfig:u,toggleTheme:d,setCodegenOptions:f,handlePauseExecution:p,handleResumeExecution:g,isTerminalOpen:m,terminalEvents:v,clearTerminalEvents:w}=$.useContext(ri),{handleExecute:k,handleQuestionSubmit:S,handleInterrupt:j}=E2({codegenOptions:a}),E=t!=="idle"&&e.length>0?e[e.length-1].iterationId:null,P=E&&v[E]||[];$.useEffect(()=>{if(!(a!=null&&a.isDev))return;const q=1e3;new HL(q,async A=>{try{await IC("__console_logs",A)}catch(H){console.warn("Failed to push console logs to app context:",H)}}),console.log("GenAIcode: Console log interception enabled in dev mode.")},[a==null?void 0:a.isDev]);const N=()=>{t==="paused"?g():p()};if(!l||!a)return h.jsxs(zm,{theme:i==="light"?Om:Dm,children:[h.jsx(jy,{}),h.jsx("div",{children:"Loading..."})," "]});const _=t!=="idle";return h.jsxs(zm,{theme:i==="light"?Om:Dm,children:[h.jsx(jy,{}),h.jsx(f2,{themeToggle:h.jsx(bL,{theme:i,toggleTheme:d}),toggleTheme:d,chatInterface:h.jsx(mL,{messages:e,currentQuestion:r,codegenOptions:a,onQuestionSubmit:S,onInterrupt:j,onPauseResume:N,executionStatus:t}),inputArea:!_&&h.jsx(vL,{onSubmit:k,isExecuting:_,onInterrupt:j,codegenOptions:a,onOptionsChange:f}),usage:l}),m&&E&&h.jsx(VL,{events:P,onClear:()=>w(E)}),h.jsx(UC,{currentService:a.aiService}),h.jsx(rE,{}),h.jsx(DE,{}),h.jsx(GE,{rcConfig:u}),h.jsx(uj,{options:a,onOptionsChange:f}),h.jsx(EL,{messages:e,muteNotifications:a.muteNotifications}),h.jsx(LL,{}),h.jsx(FL,{})]})};function qL(){return h.jsxs(pj,{children:[h.jsx(TL,{})," ",h.jsx(WL,{})," "]})}const GL=document.getElementById("root"),JL=zk.createRoot(GL);JL.render(Et.createElement(qL,null));