@musistudio/claude-code-router 2.0.0 → 3.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (49) hide show
  1. package/README.md +321 -694
  2. package/README_zh.md +320 -666
  3. package/dist/main/cli.js +5242 -0
  4. package/dist/main/fusion-tool-fallback-mcp.js +5 -0
  5. package/dist/main/fusion-vision-mcp.js +10 -0
  6. package/dist/main/toolhub-mcp.js +48 -0
  7. package/dist/marketplace/plugins/claude-design-plugin.cjs +8216 -0
  8. package/dist/marketplace/plugins/cursor-proxy-plugin.cjs +7080 -0
  9. package/dist/models.json +490722 -0
  10. package/dist/renderer/assets/assets/anthropic-CJYB5ODC.png +0 -0
  11. package/dist/renderer/assets/assets/bailian-6RH6ASGG.ico +0 -0
  12. package/dist/renderer/assets/assets/claude-code-WX35JWK4.png +0 -0
  13. package/dist/renderer/assets/assets/claudeapi-A6VUG2I3.png +0 -0
  14. package/dist/renderer/assets/assets/code0-XF6QJ6WD.png +0 -0
  15. package/dist/renderer/assets/assets/codex-3X2KBXKY.png +0 -0
  16. package/dist/renderer/assets/assets/deepseek-ZIDCDTQF.ico +0 -0
  17. package/dist/renderer/assets/assets/gemini-7QB7T63T.svg +1 -0
  18. package/dist/renderer/assets/assets/logo-IPLFWCDN.png +0 -0
  19. package/dist/renderer/assets/assets/mascot-transition-DUBPNIIV.svg +100 -0
  20. package/dist/renderer/assets/assets/mistral-2RFSC6K3.webp +0 -0
  21. package/dist/renderer/assets/assets/moonshot-FNEXMLNW.ico +0 -0
  22. package/dist/renderer/assets/assets/openai-2EIP7LI2.png +0 -0
  23. package/dist/renderer/assets/assets/openrouter-CZIFREDB.ico +0 -0
  24. package/dist/renderer/assets/assets/runapi-UAX35AOL.jpg +0 -0
  25. package/dist/renderer/assets/assets/siliconflow-QCZUQAH2.png +0 -0
  26. package/dist/renderer/assets/assets/teamorouter-3LCEETRZ.png +0 -0
  27. package/dist/renderer/assets/assets/tray-cyan-C3U4WBE7.png +0 -0
  28. package/dist/renderer/assets/assets/tray-orange-VUJTRHBB.png +0 -0
  29. package/dist/renderer/assets/assets/tray-violet-EGMLZ2GB.png +0 -0
  30. package/dist/renderer/assets/assets/zai-global-coding-OMCES3LL.svg +219 -0
  31. package/dist/renderer/assets/assets/zai-global-general-OMCES3LL.svg +219 -0
  32. package/dist/renderer/assets/assets/zcode-Z7V7YY2Q.png +0 -0
  33. package/dist/renderer/assets/assets/zhipu-cn-coding-7BBWPUTC.png +0 -0
  34. package/dist/renderer/assets/assets/zhipu-cn-general-7BBWPUTC.png +0 -0
  35. package/dist/renderer/assets/browser.js +412 -0
  36. package/dist/renderer/assets/main.css +2 -0
  37. package/dist/renderer/assets/main.js +158 -0
  38. package/dist/renderer/assets/tray.js +8 -0
  39. package/dist/renderer/assets/web-client-bridge.js +1 -0
  40. package/dist/renderer/pages/browser/index.html +13 -0
  41. package/dist/renderer/pages/home/index.html +18 -0
  42. package/dist/renderer/pages/tray/index.html +17 -0
  43. package/package.json +37 -38
  44. package/dist/cli.js +0 -1179
  45. package/dist/index.html +0 -225
  46. package/dist/tiktoken_bg.wasm +0 -0
  47. package/pnpm-workspace.yaml +0 -3
  48. package/tsconfig.base.json +0 -17
  49. package/tsconfig.json +0 -20
@@ -0,0 +1,158 @@
1
+ var Sge=Object.create;var aw=Object.defineProperty;var Pge=Object.getOwnPropertyDescriptor;var Age=Object.getOwnPropertyNames;var Ige=Object.getPrototypeOf,Dge=Object.prototype.hasOwnProperty;var rj=(e=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(e,{get:(t,r)=>(typeof require<"u"?require:t)[r]}):e)(function(e){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+e+'" is not supported')});var Lge=(e,t)=>()=>(e&&(t=e(e=0)),t);var Re=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),oj=(e,t)=>{for(var r in t)aw(e,r,{get:t[r],enumerable:!0})},nj=(e,t,r,o)=>{if(t&&typeof t=="object"||typeof t=="function")for(let n of Age(t))!Dge.call(e,n)&&n!==r&&aw(e,n,{get:()=>t[n],enumerable:!(o=Pge(t,n))||o.enumerable});return e};var z=(e,t,r)=>(r=e!=null?Sge(Ige(e)):{},nj(t||!e||!e.__esModule?aw(r,"default",{value:e,enumerable:!0}):r,e)),Rge=e=>nj(aw({},"__esModule",{value:!0}),e);var kj=Re(Et=>{"use strict";var Eh=Symbol.for("react.element"),Nge=Symbol.for("react.portal"),Tge=Symbol.for("react.fragment"),Oge=Symbol.for("react.strict_mode"),Ege=Symbol.for("react.profiler"),_ge=Symbol.for("react.provider"),Fge=Symbol.for("react.context"),Bge=Symbol.for("react.forward_ref"),Vge=Symbol.for("react.suspense"),Uge=Symbol.for("react.memo"),Wge=Symbol.for("react.lazy"),aj=Symbol.iterator;function Gge(e){return e===null||typeof e!="object"?null:(e=aj&&e[aj]||e["@@iterator"],typeof e=="function"?e:null)}var lj={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},uj=Object.assign,dj={};function qm(e,t,r){this.props=e,this.context=t,this.refs=dj,this.updater=r||lj}qm.prototype.isReactComponent={};qm.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=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,e,t,"setState")};qm.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function cj(){}cj.prototype=qm.prototype;function jN(e,t,r){this.props=e,this.context=t,this.refs=dj,this.updater=r||lj}var zN=jN.prototype=new cj;zN.constructor=jN;uj(zN,qm.prototype);zN.isPureReactComponent=!0;var ij=Array.isArray,fj=Object.prototype.hasOwnProperty,qN={current:null},pj={key:!0,ref:!0,__self:!0,__source:!0};function mj(e,t,r){var o,n={},a=null,i=null;if(t!=null)for(o in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(a=""+t.key),t)fj.call(t,o)&&!pj.hasOwnProperty(o)&&(n[o]=t[o]);var s=arguments.length-2;if(s===1)n.children=r;else if(1<s){for(var l=Array(s),u=0;u<s;u++)l[u]=arguments[u+2];n.children=l}if(e&&e.defaultProps)for(o in s=e.defaultProps,s)n[o]===void 0&&(n[o]=s[o]);return{$$typeof:Eh,type:e,key:a,ref:i,props:n,_owner:qN.current}}function jge(e,t){return{$$typeof:Eh,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}function HN(e){return typeof e=="object"&&e!==null&&e.$$typeof===Eh}function zge(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(r){return t[r]})}var sj=/\/+/g;function GN(e,t){return typeof e=="object"&&e!==null&&e.key!=null?zge(""+e.key):t.toString(36)}function sw(e,t,r,o,n){var a=typeof e;(a==="undefined"||a==="boolean")&&(e=null);var i=!1;if(e===null)i=!0;else switch(a){case"string":case"number":i=!0;break;case"object":switch(e.$$typeof){case Eh:case Nge:i=!0}}if(i)return i=e,n=n(i),e=o===""?"."+GN(i,0):o,ij(n)?(r="",e!=null&&(r=e.replace(sj,"$&/")+"/"),sw(n,t,r,"",function(u){return u})):n!=null&&(HN(n)&&(n=jge(n,r+(!n.key||i&&i.key===n.key?"":(""+n.key).replace(sj,"$&/")+"/")+e)),t.push(n)),1;if(i=0,o=o===""?".":o+":",ij(e))for(var s=0;s<e.length;s++){a=e[s];var l=o+GN(a,s);i+=sw(a,t,r,l,n)}else if(l=Gge(e),typeof l=="function")for(e=l.call(e),s=0;!(a=e.next()).done;)a=a.value,l=o+GN(a,s++),i+=sw(a,t,r,l,n);else if(a==="object")throw t=String(e),Error("Objects are not valid as a React child (found: "+(t==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return i}function iw(e,t,r){if(e==null)return e;var o=[],n=0;return sw(e,o,"","",function(a){return t.call(r,a,n++)}),o}function qge(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(r){(e._status===0||e._status===-1)&&(e._status=1,e._result=r)},function(r){(e._status===0||e._status===-1)&&(e._status=2,e._result=r)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var En={current:null},lw={transition:null},Hge={ReactCurrentDispatcher:En,ReactCurrentBatchConfig:lw,ReactCurrentOwner:qN};function gj(){throw Error("act(...) is not supported in production builds of React.")}Et.Children={map:iw,forEach:function(e,t,r){iw(e,function(){t.apply(this,arguments)},r)},count:function(e){var t=0;return iw(e,function(){t++}),t},toArray:function(e){return iw(e,function(t){return t})||[]},only:function(e){if(!HN(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};Et.Component=qm;Et.Fragment=Tge;Et.Profiler=Ege;Et.PureComponent=jN;Et.StrictMode=Oge;Et.Suspense=Vge;Et.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Hge;Et.act=gj;Et.cloneElement=function(e,t,r){if(e==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var o=uj({},e.props),n=e.key,a=e.ref,i=e._owner;if(t!=null){if(t.ref!==void 0&&(a=t.ref,i=qN.current),t.key!==void 0&&(n=""+t.key),e.type&&e.type.defaultProps)var s=e.type.defaultProps;for(l in t)fj.call(t,l)&&!pj.hasOwnProperty(l)&&(o[l]=t[l]===void 0&&s!==void 0?s[l]:t[l])}var l=arguments.length-2;if(l===1)o.children=r;else if(1<l){s=Array(l);for(var u=0;u<l;u++)s[u]=arguments[u+2];o.children=s}return{$$typeof:Eh,type:e.type,key:n,ref:a,props:o,_owner:i}};Et.createContext=function(e){return e={$$typeof:Fge,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},e.Provider={$$typeof:_ge,_context:e},e.Consumer=e};Et.createElement=mj;Et.createFactory=function(e){var t=mj.bind(null,e);return t.type=e,t};Et.createRef=function(){return{current:null}};Et.forwardRef=function(e){return{$$typeof:Bge,render:e}};Et.isValidElement=HN;Et.lazy=function(e){return{$$typeof:Wge,_payload:{_status:-1,_result:e},_init:qge}};Et.memo=function(e,t){return{$$typeof:Uge,type:e,compare:t===void 0?null:t}};Et.startTransition=function(e){var t=lw.transition;lw.transition={};try{e()}finally{lw.transition=t}};Et.unstable_act=gj;Et.useCallback=function(e,t){return En.current.useCallback(e,t)};Et.useContext=function(e){return En.current.useContext(e)};Et.useDebugValue=function(){};Et.useDeferredValue=function(e){return En.current.useDeferredValue(e)};Et.useEffect=function(e,t){return En.current.useEffect(e,t)};Et.useId=function(){return En.current.useId()};Et.useImperativeHandle=function(e,t,r){return En.current.useImperativeHandle(e,t,r)};Et.useInsertionEffect=function(e,t){return En.current.useInsertionEffect(e,t)};Et.useLayoutEffect=function(e,t){return En.current.useLayoutEffect(e,t)};Et.useMemo=function(e,t){return En.current.useMemo(e,t)};Et.useReducer=function(e,t,r){return En.current.useReducer(e,t,r)};Et.useRef=function(e){return En.current.useRef(e)};Et.useState=function(e){return En.current.useState(e)};Et.useSyncExternalStore=function(e,t,r){return En.current.useSyncExternalStore(e,t,r)};Et.useTransition=function(){return En.current.useTransition()};Et.version="18.3.1"});var ie=Re((rqe,Mj)=>{"use strict";Mj.exports=kj()});var Aj=Re(Sr=>{"use strict";function ZN(e,t){var r=e.length;e.push(t);e:for(;0<r;){var o=r-1>>>1,n=e[o];if(0<uw(n,t))e[o]=t,e[r]=n,r=o;else break e}}function Xi(e){return e.length===0?null:e[0]}function cw(e){if(e.length===0)return null;var t=e[0],r=e.pop();if(r!==t){e[0]=r;e:for(var o=0,n=e.length,a=n>>>1;o<a;){var i=2*(o+1)-1,s=e[i],l=i+1,u=e[l];if(0>uw(s,r))l<n&&0>uw(u,s)?(e[o]=u,e[l]=r,o=l):(e[o]=s,e[i]=r,o=i);else if(l<n&&0>uw(u,r))e[o]=u,e[l]=r,o=l;else break e}}return t}function uw(e,t){var r=e.sortIndex-t.sortIndex;return r!==0?r:e.id-t.id}typeof performance=="object"&&typeof performance.now=="function"?(hj=performance,Sr.unstable_now=function(){return hj.now()}):(KN=Date,vj=KN.now(),Sr.unstable_now=function(){return KN.now()-vj});var hj,KN,vj,_s=[],Ju=[],Kge=1,ii=null,Mn=3,fw=!1,af=!1,Fh=!1,bj=typeof setTimeout=="function"?setTimeout:null,wj=typeof clearTimeout=="function"?clearTimeout:null,yj=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function XN(e){for(var t=Xi(Ju);t!==null;){if(t.callback===null)cw(Ju);else if(t.startTime<=e)cw(Ju),t.sortIndex=t.expirationTime,ZN(_s,t);else break;t=Xi(Ju)}}function JN(e){if(Fh=!1,XN(e),!af)if(Xi(_s)!==null)af=!0,eT(QN);else{var t=Xi(Ju);t!==null&&tT(JN,t.startTime-e)}}function QN(e,t){af=!1,Fh&&(Fh=!1,wj(Bh),Bh=-1),fw=!0;var r=Mn;try{for(XN(t),ii=Xi(_s);ii!==null&&(!(ii.expirationTime>t)||e&&!Pj());){var o=ii.callback;if(typeof o=="function"){ii.callback=null,Mn=ii.priorityLevel;var n=o(ii.expirationTime<=t);t=Sr.unstable_now(),typeof n=="function"?ii.callback=n:ii===Xi(_s)&&cw(_s),XN(t)}else cw(_s);ii=Xi(_s)}if(ii!==null)var a=!0;else{var i=Xi(Ju);i!==null&&tT(JN,i.startTime-t),a=!1}return a}finally{ii=null,Mn=r,fw=!1}}var pw=!1,dw=null,Bh=-1,Cj=5,Sj=-1;function Pj(){return!(Sr.unstable_now()-Sj<Cj)}function $N(){if(dw!==null){var e=Sr.unstable_now();Sj=e;var t=!0;try{t=dw(!0,e)}finally{t?_h():(pw=!1,dw=null)}}else pw=!1}var _h;typeof yj=="function"?_h=function(){yj($N)}:typeof MessageChannel<"u"?(YN=new MessageChannel,xj=YN.port2,YN.port1.onmessage=$N,_h=function(){xj.postMessage(null)}):_h=function(){bj($N,0)};var YN,xj;function eT(e){dw=e,pw||(pw=!0,_h())}function tT(e,t){Bh=bj(function(){e(Sr.unstable_now())},t)}Sr.unstable_IdlePriority=5;Sr.unstable_ImmediatePriority=1;Sr.unstable_LowPriority=4;Sr.unstable_NormalPriority=3;Sr.unstable_Profiling=null;Sr.unstable_UserBlockingPriority=2;Sr.unstable_cancelCallback=function(e){e.callback=null};Sr.unstable_continueExecution=function(){af||fw||(af=!0,eT(QN))};Sr.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Cj=0<e?Math.floor(1e3/e):5};Sr.unstable_getCurrentPriorityLevel=function(){return Mn};Sr.unstable_getFirstCallbackNode=function(){return Xi(_s)};Sr.unstable_next=function(e){switch(Mn){case 1:case 2:case 3:var t=3;break;default:t=Mn}var r=Mn;Mn=t;try{return e()}finally{Mn=r}};Sr.unstable_pauseExecution=function(){};Sr.unstable_requestPaint=function(){};Sr.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var r=Mn;Mn=e;try{return t()}finally{Mn=r}};Sr.unstable_scheduleCallback=function(e,t,r){var o=Sr.unstable_now();switch(typeof r=="object"&&r!==null?(r=r.delay,r=typeof r=="number"&&0<r?o+r:o):r=o,e){case 1:var n=-1;break;case 2:n=250;break;case 5:n=1073741823;break;case 4:n=1e4;break;default:n=5e3}return n=r+n,e={id:Kge++,callback:t,priorityLevel:e,startTime:r,expirationTime:n,sortIndex:-1},r>o?(e.sortIndex=r,ZN(Ju,e),Xi(_s)===null&&e===Xi(Ju)&&(Fh?(wj(Bh),Bh=-1):Fh=!0,tT(JN,r-o))):(e.sortIndex=n,ZN(_s,e),af||fw||(af=!0,eT(QN))),e};Sr.unstable_shouldYield=Pj;Sr.unstable_wrapCallback=function(e){var t=Mn;return function(){var r=Mn;Mn=t;try{return e.apply(this,arguments)}finally{Mn=r}}}});var Dj=Re((nqe,Ij)=>{"use strict";Ij.exports=Aj()});var T7=Re(Pa=>{"use strict";var $ge=ie(),Ca=Dj();function Ne(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,r=1;r<arguments.length;r++)t+="&args[]="+encodeURIComponent(arguments[r]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var _z=new Set,iv={};function vf(e,t){fg(e,t),fg(e+"Capture",t)}function fg(e,t){for(iv[e]=t,e=0;e<t.length;e++)_z.add(t[e])}var Fl=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),CT=Object.prototype.hasOwnProperty,Yge=/^[: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]*$/,Lj={},Rj={};function Zge(e){return CT.call(Rj,e)?!0:CT.call(Lj,e)?!1:Yge.test(e)?Rj[e]=!0:(Lj[e]=!0,!1)}function Xge(e,t,r,o){if(r!==null&&r.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return o?!1:r!==null?!r.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Jge(e,t,r,o){if(t===null||typeof t>"u"||Xge(e,t,r,o))return!0;if(o)return!1;if(r!==null)switch(r.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function Bn(e,t,r,o,n,a,i){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=o,this.attributeNamespace=n,this.mustUseProperty=r,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=i}var nn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){nn[e]=new Bn(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];nn[t]=new Bn(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){nn[e]=new Bn(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){nn[e]=new Bn(e,2,!1,e,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(e){nn[e]=new Bn(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){nn[e]=new Bn(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){nn[e]=new Bn(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){nn[e]=new Bn(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){nn[e]=new Bn(e,5,!1,e.toLowerCase(),null,!1,!1)});var k2=/[\-:]([a-z])/g;function M2(e){return e[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(e){var t=e.replace(k2,M2);nn[t]=new Bn(t,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var t=e.replace(k2,M2);nn[t]=new Bn(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var t=e.replace(k2,M2);nn[t]=new Bn(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){nn[e]=new Bn(e,1,!1,e.toLowerCase(),null,!1,!1)});nn.xlinkHref=new Bn("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){nn[e]=new Bn(e,1,!1,e.toLowerCase(),null,!0,!0)});function h2(e,t,r,o){var n=nn.hasOwnProperty(t)?nn[t]:null;(n!==null?n.type!==0:o||!(2<t.length)||t[0]!=="o"&&t[0]!=="O"||t[1]!=="n"&&t[1]!=="N")&&(Jge(t,r,n,o)&&(r=null),o||n===null?Zge(t)&&(r===null?e.removeAttribute(t):e.setAttribute(t,""+r)):n.mustUseProperty?e[n.propertyName]=r===null?n.type===3?!1:"":r:(t=n.attributeName,o=n.attributeNamespace,r===null?e.removeAttribute(t):(n=n.type,r=n===3||n===4&&r===!0?"":""+r,o?e.setAttributeNS(o,t,r):e.setAttribute(t,r))))}var Wl=$ge.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,mw=Symbol.for("react.element"),$m=Symbol.for("react.portal"),Ym=Symbol.for("react.fragment"),v2=Symbol.for("react.strict_mode"),ST=Symbol.for("react.profiler"),Fz=Symbol.for("react.provider"),Bz=Symbol.for("react.context"),y2=Symbol.for("react.forward_ref"),PT=Symbol.for("react.suspense"),AT=Symbol.for("react.suspense_list"),x2=Symbol.for("react.memo"),ed=Symbol.for("react.lazy"),Vz=Symbol.for("react.offscreen"),Nj=Symbol.iterator;function Vh(e){return e===null||typeof e!="object"?null:(e=Nj&&e[Nj]||e["@@iterator"],typeof e=="function"?e:null)}var $r=Object.assign,rT;function Kh(e){if(rT===void 0)try{throw Error()}catch(r){var t=r.stack.trim().match(/\n( *(at )?)/);rT=t&&t[1]||""}return`
2
+ `+rT+e}var oT=!1;function nT(e,t){if(!e||oT)return"";oT=!0;var r=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(t,[])}catch(u){var o=u}Reflect.construct(e,[],t)}else{try{t.call()}catch(u){o=u}e.call(t.prototype)}else{try{throw Error()}catch(u){o=u}e()}}catch(u){if(u&&o&&typeof u.stack=="string"){for(var n=u.stack.split(`
3
+ `),a=o.stack.split(`
4
+ `),i=n.length-1,s=a.length-1;1<=i&&0<=s&&n[i]!==a[s];)s--;for(;1<=i&&0<=s;i--,s--)if(n[i]!==a[s]){if(i!==1||s!==1)do if(i--,s--,0>s||n[i]!==a[s]){var l=`
5
+ `+n[i].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}while(1<=i&&0<=s);break}}}finally{oT=!1,Error.prepareStackTrace=r}return(e=e?e.displayName||e.name:"")?Kh(e):""}function Qge(e){switch(e.tag){case 5:return Kh(e.type);case 16:return Kh("Lazy");case 13:return Kh("Suspense");case 19:return Kh("SuspenseList");case 0:case 2:case 15:return e=nT(e.type,!1),e;case 11:return e=nT(e.type.render,!1),e;case 1:return e=nT(e.type,!0),e;default:return""}}function IT(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Ym:return"Fragment";case $m:return"Portal";case ST:return"Profiler";case v2:return"StrictMode";case PT:return"Suspense";case AT:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case Bz:return(e.displayName||"Context")+".Consumer";case Fz:return(e._context.displayName||"Context")+".Provider";case y2:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case x2:return t=e.displayName||null,t!==null?t:IT(e.type)||"Memo";case ed:t=e._payload,e=e._init;try{return IT(e(t))}catch{}}return null}function eke(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=t.render,e=e.displayName||e.name||"",t.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return IT(t);case 8:return t===v2?"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 t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function md(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Uz(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function tke(e){var t=Uz(e)?"checked":"value",r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),o=""+e[t];if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var n=r.get,a=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return n.call(this)},set:function(i){o=""+i,a.call(this,i)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return o},setValue:function(i){o=""+i},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function gw(e){e._valueTracker||(e._valueTracker=tke(e))}function Wz(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var r=t.getValue(),o="";return e&&(o=Uz(e)?e.checked?"true":"false":e.value),e=o,e!==r?(t.setValue(e),!0):!1}function jw(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function DT(e,t){var r=t.checked;return $r({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:r??e._wrapperState.initialChecked})}function Tj(e,t){var r=t.defaultValue==null?"":t.defaultValue,o=t.checked!=null?t.checked:t.defaultChecked;r=md(t.value!=null?t.value:r),e._wrapperState={initialChecked:o,initialValue:r,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function Gz(e,t){t=t.checked,t!=null&&h2(e,"checked",t,!1)}function LT(e,t){Gz(e,t);var r=md(t.value),o=t.type;if(r!=null)o==="number"?(r===0&&e.value===""||e.value!=r)&&(e.value=""+r):e.value!==""+r&&(e.value=""+r);else if(o==="submit"||o==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?RT(e,t.type,r):t.hasOwnProperty("defaultValue")&&RT(e,t.type,md(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Oj(e,t,r){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var o=t.type;if(!(o!=="submit"&&o!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,r||t===e.value||(e.value=t),e.defaultValue=t}r=e.name,r!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,r!==""&&(e.name=r)}function RT(e,t,r){(t!=="number"||jw(e.ownerDocument)!==e)&&(r==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+r&&(e.defaultValue=""+r))}var $h=Array.isArray;function ig(e,t,r,o){if(e=e.options,t){t={};for(var n=0;n<r.length;n++)t["$"+r[n]]=!0;for(r=0;r<e.length;r++)n=t.hasOwnProperty("$"+e[r].value),e[r].selected!==n&&(e[r].selected=n),n&&o&&(e[r].defaultSelected=!0)}else{for(r=""+md(r),t=null,n=0;n<e.length;n++){if(e[n].value===r){e[n].selected=!0,o&&(e[n].defaultSelected=!0);return}t!==null||e[n].disabled||(t=e[n])}t!==null&&(t.selected=!0)}}function NT(e,t){if(t.dangerouslySetInnerHTML!=null)throw Error(Ne(91));return $r({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function Ej(e,t){var r=t.value;if(r==null){if(r=t.children,t=t.defaultValue,r!=null){if(t!=null)throw Error(Ne(92));if($h(r)){if(1<r.length)throw Error(Ne(93));r=r[0]}t=r}t==null&&(t=""),r=t}e._wrapperState={initialValue:md(r)}}function jz(e,t){var r=md(t.value),o=md(t.defaultValue);r!=null&&(r=""+r,r!==e.value&&(e.value=r),t.defaultValue==null&&e.defaultValue!==r&&(e.defaultValue=r)),o!=null&&(e.defaultValue=""+o)}function _j(e){var t=e.textContent;t===e._wrapperState.initialValue&&t!==""&&t!==null&&(e.value=t)}function zz(e){switch(e){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 TT(e,t){return e==null||e==="http://www.w3.org/1999/xhtml"?zz(t):e==="http://www.w3.org/2000/svg"&&t==="foreignObject"?"http://www.w3.org/1999/xhtml":e}var kw,qz=(function(e){return typeof MSApp<"u"&&MSApp.execUnsafeLocalFunction?function(t,r,o,n){MSApp.execUnsafeLocalFunction(function(){return e(t,r,o,n)})}:e})(function(e,t){if(e.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in e)e.innerHTML=t;else{for(kw=kw||document.createElement("div"),kw.innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=kw.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function sv(e,t){if(t){var r=e.firstChild;if(r&&r===e.lastChild&&r.nodeType===3){r.nodeValue=t;return}}e.textContent=t}var Xh={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},rke=["Webkit","ms","Moz","O"];Object.keys(Xh).forEach(function(e){rke.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Xh[t]=Xh[e]})});function Hz(e,t,r){return t==null||typeof t=="boolean"||t===""?"":r||typeof t!="number"||t===0||Xh.hasOwnProperty(e)&&Xh[e]?(""+t).trim():t+"px"}function Kz(e,t){e=e.style;for(var r in t)if(t.hasOwnProperty(r)){var o=r.indexOf("--")===0,n=Hz(r,t[r],o);r==="float"&&(r="cssFloat"),o?e.setProperty(r,n):e[r]=n}}var oke=$r({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 OT(e,t){if(t){if(oke[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(Ne(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(Ne(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(Ne(61))}if(t.style!=null&&typeof t.style!="object")throw Error(Ne(62))}}function ET(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _T=null;function b2(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var FT=null,sg=null,lg=null;function Fj(e){if(e=Sv(e)){if(typeof FT!="function")throw Error(Ne(280));var t=e.stateNode;t&&(t=MC(t),FT(e.stateNode,e.type,t))}}function $z(e){sg?lg?lg.push(e):lg=[e]:sg=e}function Yz(){if(sg){var e=sg,t=lg;if(lg=sg=null,Fj(e),t)for(e=0;e<t.length;e++)Fj(t[e])}}function Zz(e,t){return e(t)}function Xz(){}var aT=!1;function Jz(e,t,r){if(aT)return e(t,r);aT=!0;try{return Zz(e,t,r)}finally{aT=!1,(sg!==null||lg!==null)&&(Xz(),Yz())}}function lv(e,t){var r=e.stateNode;if(r===null)return null;var o=MC(r);if(o===null)return null;r=o[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(o=!o.disabled)||(e=e.type,o=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!o;break e;default:e=!1}if(e)return null;if(r&&typeof r!="function")throw Error(Ne(231,t,typeof r));return r}var BT=!1;if(Fl)try{Hm={},Object.defineProperty(Hm,"passive",{get:function(){BT=!0}}),window.addEventListener("test",Hm,Hm),window.removeEventListener("test",Hm,Hm)}catch{BT=!1}var Hm;function nke(e,t,r,o,n,a,i,s,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(r,u)}catch(d){this.onError(d)}}var Jh=!1,zw=null,qw=!1,VT=null,ake={onError:function(e){Jh=!0,zw=e}};function ike(e,t,r,o,n,a,i,s,l){Jh=!1,zw=null,nke.apply(ake,arguments)}function ske(e,t,r,o,n,a,i,s,l){if(ike.apply(this,arguments),Jh){if(Jh){var u=zw;Jh=!1,zw=null}else throw Error(Ne(198));qw||(qw=!0,VT=u)}}function yf(e){var t=e,r=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(r=t.return),e=t.return;while(e)}return t.tag===3?r:null}function Qz(e){if(e.tag===13){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function Bj(e){if(yf(e)!==e)throw Error(Ne(188))}function lke(e){var t=e.alternate;if(!t){if(t=yf(e),t===null)throw Error(Ne(188));return t!==e?null:e}for(var r=e,o=t;;){var n=r.return;if(n===null)break;var a=n.alternate;if(a===null){if(o=n.return,o!==null){r=o;continue}break}if(n.child===a.child){for(a=n.child;a;){if(a===r)return Bj(n),e;if(a===o)return Bj(n),t;a=a.sibling}throw Error(Ne(188))}if(r.return!==o.return)r=n,o=a;else{for(var i=!1,s=n.child;s;){if(s===r){i=!0,r=n,o=a;break}if(s===o){i=!0,o=n,r=a;break}s=s.sibling}if(!i){for(s=a.child;s;){if(s===r){i=!0,r=a,o=n;break}if(s===o){i=!0,o=a,r=n;break}s=s.sibling}if(!i)throw Error(Ne(189))}}if(r.alternate!==o)throw Error(Ne(190))}if(r.tag!==3)throw Error(Ne(188));return r.stateNode.current===r?e:t}function e6(e){return e=lke(e),e!==null?t6(e):null}function t6(e){if(e.tag===5||e.tag===6)return e;for(e=e.child;e!==null;){var t=t6(e);if(t!==null)return t;e=e.sibling}return null}var r6=Ca.unstable_scheduleCallback,Vj=Ca.unstable_cancelCallback,uke=Ca.unstable_shouldYield,dke=Ca.unstable_requestPaint,lo=Ca.unstable_now,cke=Ca.unstable_getCurrentPriorityLevel,w2=Ca.unstable_ImmediatePriority,o6=Ca.unstable_UserBlockingPriority,Hw=Ca.unstable_NormalPriority,fke=Ca.unstable_LowPriority,n6=Ca.unstable_IdlePriority,pC=null,Us=null;function pke(e){if(Us&&typeof Us.onCommitFiberRoot=="function")try{Us.onCommitFiberRoot(pC,e,void 0,(e.current.flags&128)===128)}catch{}}var rs=Math.clz32?Math.clz32:kke,mke=Math.log,gke=Math.LN2;function kke(e){return e>>>=0,e===0?32:31-(mke(e)/gke|0)|0}var Mw=64,hw=4194304;function Yh(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64: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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Kw(e,t){var r=e.pendingLanes;if(r===0)return 0;var o=0,n=e.suspendedLanes,a=e.pingedLanes,i=r&268435455;if(i!==0){var s=i&~n;s!==0?o=Yh(s):(a&=i,a!==0&&(o=Yh(a)))}else i=r&~n,i!==0?o=Yh(i):a!==0&&(o=Yh(a));if(o===0)return 0;if(t!==0&&t!==o&&(t&n)===0&&(n=o&-o,a=t&-t,n>=a||n===16&&(a&4194240)!==0))return t;if((o&4)!==0&&(o|=r&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=o;0<t;)r=31-rs(t),n=1<<r,o|=e[r],t&=~n;return o}function Mke(e,t){switch(e){case 1:case 2:case 4:return t+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 t+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 hke(e,t){for(var r=e.suspendedLanes,o=e.pingedLanes,n=e.expirationTimes,a=e.pendingLanes;0<a;){var i=31-rs(a),s=1<<i,l=n[i];l===-1?((s&r)===0||(s&o)!==0)&&(n[i]=Mke(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}function UT(e){return e=e.pendingLanes&-1073741825,e!==0?e:e&1073741824?1073741824:0}function a6(){var e=Mw;return Mw<<=1,(Mw&4194240)===0&&(Mw=64),e}function iT(e){for(var t=[],r=0;31>r;r++)t.push(e);return t}function wv(e,t,r){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-rs(t),e[t]=r}function vke(e,t){var r=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var o=e.eventTimes;for(e=e.expirationTimes;0<r;){var n=31-rs(r),a=1<<n;t[n]=0,o[n]=-1,e[n]=-1,r&=~a}}function C2(e,t){var r=e.entangledLanes|=t;for(e=e.entanglements;r;){var o=31-rs(r),n=1<<o;n&t|e[o]&t&&(e[o]|=t),r&=~n}}var ur=0;function i6(e){return e&=-e,1<e?4<e?(e&268435455)!==0?16:536870912:4:1}var s6,S2,l6,u6,d6,WT=!1,vw=[],id=null,sd=null,ld=null,uv=new Map,dv=new Map,rd=[],yke="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 Uj(e,t){switch(e){case"focusin":case"focusout":id=null;break;case"dragenter":case"dragleave":sd=null;break;case"mouseover":case"mouseout":ld=null;break;case"pointerover":case"pointerout":uv.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":dv.delete(t.pointerId)}}function Uh(e,t,r,o,n,a){return e===null||e.nativeEvent!==a?(e={blockedOn:t,domEventName:r,eventSystemFlags:o,nativeEvent:a,targetContainers:[n]},t!==null&&(t=Sv(t),t!==null&&S2(t)),e):(e.eventSystemFlags|=o,t=e.targetContainers,n!==null&&t.indexOf(n)===-1&&t.push(n),e)}function xke(e,t,r,o,n){switch(t){case"focusin":return id=Uh(id,e,t,r,o,n),!0;case"dragenter":return sd=Uh(sd,e,t,r,o,n),!0;case"mouseover":return ld=Uh(ld,e,t,r,o,n),!0;case"pointerover":var a=n.pointerId;return uv.set(a,Uh(uv.get(a)||null,e,t,r,o,n)),!0;case"gotpointercapture":return a=n.pointerId,dv.set(a,Uh(dv.get(a)||null,e,t,r,o,n)),!0}return!1}function c6(e){var t=uf(e.target);if(t!==null){var r=yf(t);if(r!==null){if(t=r.tag,t===13){if(t=Qz(r),t!==null){e.blockedOn=t,d6(e.priority,function(){l6(r)});return}}else if(t===3&&r.stateNode.current.memoizedState.isDehydrated){e.blockedOn=r.tag===3?r.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Tw(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var r=GT(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(r===null){r=e.nativeEvent;var o=new r.constructor(r.type,r);_T=o,r.target.dispatchEvent(o),_T=null}else return t=Sv(r),t!==null&&S2(t),e.blockedOn=r,!1;t.shift()}return!0}function Wj(e,t,r){Tw(e)&&r.delete(t)}function bke(){WT=!1,id!==null&&Tw(id)&&(id=null),sd!==null&&Tw(sd)&&(sd=null),ld!==null&&Tw(ld)&&(ld=null),uv.forEach(Wj),dv.forEach(Wj)}function Wh(e,t){e.blockedOn===t&&(e.blockedOn=null,WT||(WT=!0,Ca.unstable_scheduleCallback(Ca.unstable_NormalPriority,bke)))}function cv(e){function t(n){return Wh(n,e)}if(0<vw.length){Wh(vw[0],e);for(var r=1;r<vw.length;r++){var o=vw[r];o.blockedOn===e&&(o.blockedOn=null)}}for(id!==null&&Wh(id,e),sd!==null&&Wh(sd,e),ld!==null&&Wh(ld,e),uv.forEach(t),dv.forEach(t),r=0;r<rd.length;r++)o=rd[r],o.blockedOn===e&&(o.blockedOn=null);for(;0<rd.length&&(r=rd[0],r.blockedOn===null);)c6(r),r.blockedOn===null&&rd.shift()}var ug=Wl.ReactCurrentBatchConfig,$w=!0;function wke(e,t,r,o){var n=ur,a=ug.transition;ug.transition=null;try{ur=1,P2(e,t,r,o)}finally{ur=n,ug.transition=a}}function Cke(e,t,r,o){var n=ur,a=ug.transition;ug.transition=null;try{ur=4,P2(e,t,r,o)}finally{ur=n,ug.transition=a}}function P2(e,t,r,o){if($w){var n=GT(e,t,r,o);if(n===null)pT(e,t,o,Yw,r),Uj(e,o);else if(xke(n,e,t,r,o))o.stopPropagation();else if(Uj(e,o),t&4&&-1<yke.indexOf(e)){for(;n!==null;){var a=Sv(n);if(a!==null&&s6(a),a=GT(e,t,r,o),a===null&&pT(e,t,o,Yw,r),a===n)break;n=a}n!==null&&o.stopPropagation()}else pT(e,t,o,null,r)}}var Yw=null;function GT(e,t,r,o){if(Yw=null,e=b2(o),e=uf(e),e!==null)if(t=yf(e),t===null)e=null;else if(r=t.tag,r===13){if(e=Qz(t),e!==null)return e;e=null}else if(r===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yw=e,null}function f6(e){switch(e){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(cke()){case w2:return 1;case o6:return 4;case Hw:case fke:return 16;case n6:return 536870912;default:return 16}default:return 16}}var nd=null,A2=null,Ow=null;function p6(){if(Ow)return Ow;var e,t=A2,r=t.length,o,n="value"in nd?nd.value:nd.textContent,a=n.length;for(e=0;e<r&&t[e]===n[e];e++);var i=r-e;for(o=1;o<=i&&t[r-o]===n[a-o];o++);return Ow=n.slice(e,1<o?1-o:void 0)}function Ew(e){var t=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&t===13&&(e=13)):e=t,e===10&&(e=13),32<=e||e===13?e:0}function yw(){return!0}function Gj(){return!1}function Sa(e){function t(r,o,n,a,i){this._reactName=r,this._targetInst=n,this.type=o,this.nativeEvent=a,this.target=i,this.currentTarget=null;for(var s in e)e.hasOwnProperty(s)&&(r=e[s],this[s]=r?r(a):a[s]);return this.isDefaultPrevented=(a.defaultPrevented!=null?a.defaultPrevented:a.returnValue===!1)?yw:Gj,this.isPropagationStopped=Gj,this}return $r(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var r=this.nativeEvent;r&&(r.preventDefault?r.preventDefault():typeof r.returnValue!="unknown"&&(r.returnValue=!1),this.isDefaultPrevented=yw)},stopPropagation:function(){var r=this.nativeEvent;r&&(r.stopPropagation?r.stopPropagation():typeof r.cancelBubble!="unknown"&&(r.cancelBubble=!0),this.isPropagationStopped=yw)},persist:function(){},isPersistent:yw}),t}var vg={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},I2=Sa(vg),Cv=$r({},vg,{view:0,detail:0}),Ske=Sa(Cv),sT,lT,Gh,mC=$r({},Cv,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:D2,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Gh&&(Gh&&e.type==="mousemove"?(sT=e.screenX-Gh.screenX,lT=e.screenY-Gh.screenY):lT=sT=0,Gh=e),sT)},movementY:function(e){return"movementY"in e?e.movementY:lT}}),jj=Sa(mC),Pke=$r({},mC,{dataTransfer:0}),Ake=Sa(Pke),Ike=$r({},Cv,{relatedTarget:0}),uT=Sa(Ike),Dke=$r({},vg,{animationName:0,elapsedTime:0,pseudoElement:0}),Lke=Sa(Dke),Rke=$r({},vg,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),Nke=Sa(Rke),Tke=$r({},vg,{data:0}),zj=Sa(Tke),Oke={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},Eke={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"},_ke={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Fke(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=_ke[e])?!!t[e]:!1}function D2(){return Fke}var Bke=$r({},Cv,{key:function(e){if(e.key){var t=Oke[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Ew(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?Eke[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:D2,charCode:function(e){return e.type==="keypress"?Ew(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Ew(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),Vke=Sa(Bke),Uke=$r({},mC,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),qj=Sa(Uke),Wke=$r({},Cv,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:D2}),Gke=Sa(Wke),jke=$r({},vg,{propertyName:0,elapsedTime:0,pseudoElement:0}),zke=Sa(jke),qke=$r({},mC,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Hke=Sa(qke),Kke=[9,13,27,32],L2=Fl&&"CompositionEvent"in window,Qh=null;Fl&&"documentMode"in document&&(Qh=document.documentMode);var $ke=Fl&&"TextEvent"in window&&!Qh,m6=Fl&&(!L2||Qh&&8<Qh&&11>=Qh),Hj=" ",Kj=!1;function g6(e,t){switch(e){case"keyup":return Kke.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k6(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Zm=!1;function Yke(e,t){switch(e){case"compositionend":return k6(t);case"keypress":return t.which!==32?null:(Kj=!0,Hj);case"textInput":return e=t.data,e===Hj&&Kj?null:e;default:return null}}function Zke(e,t){if(Zm)return e==="compositionend"||!L2&&g6(e,t)?(e=p6(),Ow=A2=nd=null,Zm=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return m6&&t.locale!=="ko"?null:t.data;default:return null}}var Xke={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 $j(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!Xke[e.type]:t==="textarea"}function M6(e,t,r,o){$z(o),t=Zw(t,"onChange"),0<t.length&&(r=new I2("onChange","change",null,r,o),e.push({event:r,listeners:t}))}var ev=null,fv=null;function Jke(e){I6(e,0)}function gC(e){var t=Qm(e);if(Wz(t))return e}function Qke(e,t){if(e==="change")return t}var h6=!1;Fl&&(Fl?(bw="oninput"in document,bw||(dT=document.createElement("div"),dT.setAttribute("oninput","return;"),bw=typeof dT.oninput=="function"),xw=bw):xw=!1,h6=xw&&(!document.documentMode||9<document.documentMode));var xw,bw,dT;function Yj(){ev&&(ev.detachEvent("onpropertychange",v6),fv=ev=null)}function v6(e){if(e.propertyName==="value"&&gC(fv)){var t=[];M6(t,fv,e,b2(e)),Jz(Jke,t)}}function eMe(e,t,r){e==="focusin"?(Yj(),ev=t,fv=r,ev.attachEvent("onpropertychange",v6)):e==="focusout"&&Yj()}function tMe(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return gC(fv)}function rMe(e,t){if(e==="click")return gC(t)}function oMe(e,t){if(e==="input"||e==="change")return gC(t)}function nMe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ns=typeof Object.is=="function"?Object.is:nMe;function pv(e,t){if(ns(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(o=0;o<r.length;o++){var n=r[o];if(!CT.call(t,n)||!ns(e[n],t[n]))return!1}return!0}function Zj(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Xj(e,t){var r=Zj(e);e=0;for(var o;r;){if(r.nodeType===3){if(o=e+r.textContent.length,e<=t&&o>=t)return{node:r,offset:t-e};e=o}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=Zj(r)}}function y6(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?y6(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function x6(){for(var e=window,t=jw();t instanceof e.HTMLIFrameElement;){try{var r=typeof t.contentWindow.location.href=="string"}catch{r=!1}if(r)e=t.contentWindow;else break;t=jw(e.document)}return t}function R2(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function aMe(e){var t=x6(),r=e.focusedElem,o=e.selectionRange;if(t!==r&&r&&r.ownerDocument&&y6(r.ownerDocument.documentElement,r)){if(o!==null&&R2(r)){if(t=o.start,e=o.end,e===void 0&&(e=t),"selectionStart"in r)r.selectionStart=t,r.selectionEnd=Math.min(e,r.value.length);else if(e=(t=r.ownerDocument||document)&&t.defaultView||window,e.getSelection){e=e.getSelection();var n=r.textContent.length,a=Math.min(o.start,n);o=o.end===void 0?a:Math.min(o.end,n),!e.extend&&a>o&&(n=o,o=a,a=n),n=Xj(r,a);var i=Xj(r,o);n&&i&&(e.rangeCount!==1||e.anchorNode!==n.node||e.anchorOffset!==n.offset||e.focusNode!==i.node||e.focusOffset!==i.offset)&&(t=t.createRange(),t.setStart(n.node,n.offset),e.removeAllRanges(),a>o?(e.addRange(t),e.extend(i.node,i.offset)):(t.setEnd(i.node,i.offset),e.addRange(t)))}}for(t=[],e=r;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof r.focus=="function"&&r.focus(),r=0;r<t.length;r++)e=t[r],e.element.scrollLeft=e.left,e.element.scrollTop=e.top}}var iMe=Fl&&"documentMode"in document&&11>=document.documentMode,Xm=null,jT=null,tv=null,zT=!1;function Jj(e,t,r){var o=r.window===r?r.document:r.nodeType===9?r:r.ownerDocument;zT||Xm==null||Xm!==jw(o)||(o=Xm,"selectionStart"in o&&R2(o)?o={start:o.selectionStart,end:o.selectionEnd}:(o=(o.ownerDocument&&o.ownerDocument.defaultView||window).getSelection(),o={anchorNode:o.anchorNode,anchorOffset:o.anchorOffset,focusNode:o.focusNode,focusOffset:o.focusOffset}),tv&&pv(tv,o)||(tv=o,o=Zw(jT,"onSelect"),0<o.length&&(t=new I2("onSelect","select",null,t,r),e.push({event:t,listeners:o}),t.target=Xm)))}function ww(e,t){var r={};return r[e.toLowerCase()]=t.toLowerCase(),r["Webkit"+e]="webkit"+t,r["Moz"+e]="moz"+t,r}var Jm={animationend:ww("Animation","AnimationEnd"),animationiteration:ww("Animation","AnimationIteration"),animationstart:ww("Animation","AnimationStart"),transitionend:ww("Transition","TransitionEnd")},cT={},b6={};Fl&&(b6=document.createElement("div").style,"AnimationEvent"in window||(delete Jm.animationend.animation,delete Jm.animationiteration.animation,delete Jm.animationstart.animation),"TransitionEvent"in window||delete Jm.transitionend.transition);function kC(e){if(cT[e])return cT[e];if(!Jm[e])return e;var t=Jm[e],r;for(r in t)if(t.hasOwnProperty(r)&&r in b6)return cT[e]=t[r];return e}var w6=kC("animationend"),C6=kC("animationiteration"),S6=kC("animationstart"),P6=kC("transitionend"),A6=new Map,Qj="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 kd(e,t){A6.set(e,t),vf(t,[e])}for(Cw=0;Cw<Qj.length;Cw++)Sw=Qj[Cw],ez=Sw.toLowerCase(),tz=Sw[0].toUpperCase()+Sw.slice(1),kd(ez,"on"+tz);var Sw,ez,tz,Cw;kd(w6,"onAnimationEnd");kd(C6,"onAnimationIteration");kd(S6,"onAnimationStart");kd("dblclick","onDoubleClick");kd("focusin","onFocus");kd("focusout","onBlur");kd(P6,"onTransitionEnd");fg("onMouseEnter",["mouseout","mouseover"]);fg("onMouseLeave",["mouseout","mouseover"]);fg("onPointerEnter",["pointerout","pointerover"]);fg("onPointerLeave",["pointerout","pointerover"]);vf("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));vf("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));vf("onBeforeInput",["compositionend","keypress","textInput","paste"]);vf("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));vf("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));vf("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Zh="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(" "),sMe=new Set("cancel close invalid load scroll toggle".split(" ").concat(Zh));function rz(e,t,r){var o=e.type||"unknown-event";e.currentTarget=r,ske(o,t,void 0,e),e.currentTarget=null}function I6(e,t){t=(t&4)!==0;for(var r=0;r<e.length;r++){var o=e[r],n=o.event;o=o.listeners;e:{var a=void 0;if(t)for(var i=o.length-1;0<=i;i--){var s=o[i],l=s.instance,u=s.currentTarget;if(s=s.listener,l!==a&&n.isPropagationStopped())break e;rz(n,s,u),a=l}else for(i=0;i<o.length;i++){if(s=o[i],l=s.instance,u=s.currentTarget,s=s.listener,l!==a&&n.isPropagationStopped())break e;rz(n,s,u),a=l}}}if(qw)throw e=VT,qw=!1,VT=null,e}function Dr(e,t){var r=t[YT];r===void 0&&(r=t[YT]=new Set);var o=e+"__bubble";r.has(o)||(D6(t,e,2,!1),r.add(o))}function fT(e,t,r){var o=0;t&&(o|=4),D6(r,e,o,t)}var Pw="_reactListening"+Math.random().toString(36).slice(2);function mv(e){if(!e[Pw]){e[Pw]=!0,_z.forEach(function(r){r!=="selectionchange"&&(sMe.has(r)||fT(r,!1,e),fT(r,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Pw]||(t[Pw]=!0,fT("selectionchange",!1,t))}}function D6(e,t,r,o){switch(f6(t)){case 1:var n=wke;break;case 4:n=Cke;break;default:n=P2}r=n.bind(null,t,r,e),n=void 0,!BT||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(n=!0),o?n!==void 0?e.addEventListener(t,r,{capture:!0,passive:n}):e.addEventListener(t,r,!0):n!==void 0?e.addEventListener(t,r,{passive:n}):e.addEventListener(t,r,!1)}function pT(e,t,r,o,n){var a=o;if((t&1)===0&&(t&2)===0&&o!==null)e:for(;;){if(o===null)return;var i=o.tag;if(i===3||i===4){var s=o.stateNode.containerInfo;if(s===n||s.nodeType===8&&s.parentNode===n)break;if(i===4)for(i=o.return;i!==null;){var l=i.tag;if((l===3||l===4)&&(l=i.stateNode.containerInfo,l===n||l.nodeType===8&&l.parentNode===n))return;i=i.return}for(;s!==null;){if(i=uf(s),i===null)return;if(l=i.tag,l===5||l===6){o=a=i;continue e}s=s.parentNode}}o=o.return}Jz(function(){var u=a,d=b2(r),c=[];e:{var f=A6.get(e);if(f!==void 0){var p=I2,g=e;switch(e){case"keypress":if(Ew(r)===0)break e;case"keydown":case"keyup":p=Vke;break;case"focusin":g="focus",p=uT;break;case"focusout":g="blur",p=uT;break;case"beforeblur":case"afterblur":p=uT;break;case"click":if(r.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":p=jj;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":p=Ake;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":p=Gke;break;case w6:case C6:case S6:p=Lke;break;case P6:p=zke;break;case"scroll":p=Ske;break;case"wheel":p=Hke;break;case"copy":case"cut":case"paste":p=Nke;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":p=qj}var m=(t&4)!==0,h=!m&&e==="scroll",k=m?f!==null?f+"Capture":null:f;m=[];for(var M=u,v;M!==null;){v=M;var b=v.stateNode;if(v.tag===5&&b!==null&&(v=b,k!==null&&(b=lv(M,k),b!=null&&m.push(gv(M,b,v)))),h)break;M=M.return}0<m.length&&(f=new p(f,g,null,r,d),c.push({event:f,listeners:m}))}}if((t&7)===0){e:{if(f=e==="mouseover"||e==="pointerover",p=e==="mouseout"||e==="pointerout",f&&r!==_T&&(g=r.relatedTarget||r.fromElement)&&(uf(g)||g[Bl]))break e;if((p||f)&&(f=d.window===d?d:(f=d.ownerDocument)?f.defaultView||f.parentWindow:window,p?(g=r.relatedTarget||r.toElement,p=u,g=g?uf(g):null,g!==null&&(h=yf(g),g!==h||g.tag!==5&&g.tag!==6)&&(g=null)):(p=null,g=u),p!==g)){if(m=jj,b="onMouseLeave",k="onMouseEnter",M="mouse",(e==="pointerout"||e==="pointerover")&&(m=qj,b="onPointerLeave",k="onPointerEnter",M="pointer"),h=p==null?f:Qm(p),v=g==null?f:Qm(g),f=new m(b,M+"leave",p,r,d),f.target=h,f.relatedTarget=v,b=null,uf(d)===u&&(m=new m(k,M+"enter",g,r,d),m.target=v,m.relatedTarget=h,b=m),h=b,p&&g)t:{for(m=p,k=g,M=0,v=m;v;v=Km(v))M++;for(v=0,b=k;b;b=Km(b))v++;for(;0<M-v;)m=Km(m),M--;for(;0<v-M;)k=Km(k),v--;for(;M--;){if(m===k||k!==null&&m===k.alternate)break t;m=Km(m),k=Km(k)}m=null}else m=null;p!==null&&oz(c,f,p,m,!1),g!==null&&h!==null&&oz(c,h,g,m,!0)}}e:{if(f=u?Qm(u):window,p=f.nodeName&&f.nodeName.toLowerCase(),p==="select"||p==="input"&&f.type==="file")var w=Qke;else if($j(f))if(h6)w=oMe;else{w=tMe;var P=eMe}else(p=f.nodeName)&&p.toLowerCase()==="input"&&(f.type==="checkbox"||f.type==="radio")&&(w=rMe);if(w&&(w=w(e,u))){M6(c,w,r,d);break e}P&&P(e,f,u),e==="focusout"&&(P=f._wrapperState)&&P.controlled&&f.type==="number"&&RT(f,"number",f.value)}switch(P=u?Qm(u):window,e){case"focusin":($j(P)||P.contentEditable==="true")&&(Xm=P,jT=u,tv=null);break;case"focusout":tv=jT=Xm=null;break;case"mousedown":zT=!0;break;case"contextmenu":case"mouseup":case"dragend":zT=!1,Jj(c,r,d);break;case"selectionchange":if(iMe)break;case"keydown":case"keyup":Jj(c,r,d)}var L;if(L2)e:{switch(e){case"compositionstart":var C="onCompositionStart";break e;case"compositionend":C="onCompositionEnd";break e;case"compositionupdate":C="onCompositionUpdate";break e}C=void 0}else Zm?g6(e,r)&&(C="onCompositionEnd"):e==="keydown"&&r.keyCode===229&&(C="onCompositionStart");C&&(m6&&r.locale!=="ko"&&(Zm||C!=="onCompositionStart"?C==="onCompositionEnd"&&Zm&&(L=p6()):(nd=d,A2="value"in nd?nd.value:nd.textContent,Zm=!0)),P=Zw(u,C),0<P.length&&(C=new zj(C,e,null,r,d),c.push({event:C,listeners:P}),L?C.data=L:(L=k6(r),L!==null&&(C.data=L)))),(L=$ke?Yke(e,r):Zke(e,r))&&(u=Zw(u,"onBeforeInput"),0<u.length&&(d=new zj("onBeforeInput","beforeinput",null,r,d),c.push({event:d,listeners:u}),d.data=L))}I6(c,t)})}function gv(e,t,r){return{instance:e,listener:t,currentTarget:r}}function Zw(e,t){for(var r=t+"Capture",o=[];e!==null;){var n=e,a=n.stateNode;n.tag===5&&a!==null&&(n=a,a=lv(e,r),a!=null&&o.unshift(gv(e,a,n)),a=lv(e,t),a!=null&&o.push(gv(e,a,n))),e=e.return}return o}function Km(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5);return e||null}function oz(e,t,r,o,n){for(var a=t._reactName,i=[];r!==null&&r!==o;){var s=r,l=s.alternate,u=s.stateNode;if(l!==null&&l===o)break;s.tag===5&&u!==null&&(s=u,n?(l=lv(r,a),l!=null&&i.unshift(gv(r,l,s))):n||(l=lv(r,a),l!=null&&i.push(gv(r,l,s)))),r=r.return}i.length!==0&&e.push({event:t,listeners:i})}var lMe=/\r\n?/g,uMe=/\u0000|\uFFFD/g;function nz(e){return(typeof e=="string"?e:""+e).replace(lMe,`
6
+ `).replace(uMe,"")}function Aw(e,t,r){if(t=nz(t),nz(e)!==t&&r)throw Error(Ne(425))}function Xw(){}var qT=null,HT=null;function KT(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var $T=typeof setTimeout=="function"?setTimeout:void 0,dMe=typeof clearTimeout=="function"?clearTimeout:void 0,az=typeof Promise=="function"?Promise:void 0,cMe=typeof queueMicrotask=="function"?queueMicrotask:typeof az<"u"?function(e){return az.resolve(null).then(e).catch(fMe)}:$T;function fMe(e){setTimeout(function(){throw e})}function mT(e,t){var r=t,o=0;do{var n=r.nextSibling;if(e.removeChild(r),n&&n.nodeType===8)if(r=n.data,r==="/$"){if(o===0){e.removeChild(n),cv(t);return}o--}else r!=="$"&&r!=="$?"&&r!=="$!"||o++;r=n}while(r);cv(t)}function ud(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?")break;if(t==="/$")return null}}return e}function iz(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="$"||r==="$!"||r==="$?"){if(t===0)return e;t--}else r==="/$"&&t++}e=e.previousSibling}return null}var yg=Math.random().toString(36).slice(2),Vs="__reactFiber$"+yg,kv="__reactProps$"+yg,Bl="__reactContainer$"+yg,YT="__reactEvents$"+yg,pMe="__reactListeners$"+yg,mMe="__reactHandles$"+yg;function uf(e){var t=e[Vs];if(t)return t;for(var r=e.parentNode;r;){if(t=r[Bl]||r[Vs]){if(r=t.alternate,t.child!==null||r!==null&&r.child!==null)for(e=iz(e);e!==null;){if(r=e[Vs])return r;e=iz(e)}return t}e=r,r=e.parentNode}return null}function Sv(e){return e=e[Vs]||e[Bl],!e||e.tag!==5&&e.tag!==6&&e.tag!==13&&e.tag!==3?null:e}function Qm(e){if(e.tag===5||e.tag===6)return e.stateNode;throw Error(Ne(33))}function MC(e){return e[kv]||null}var ZT=[],eg=-1;function Md(e){return{current:e}}function Lr(e){0>eg||(e.current=ZT[eg],ZT[eg]=null,eg--)}function Pr(e,t){eg++,ZT[eg]=e.current,e.current=t}var gd={},xn=Md(gd),Qn=Md(!1),mf=gd;function pg(e,t){var r=e.type.contextTypes;if(!r)return gd;var o=e.stateNode;if(o&&o.__reactInternalMemoizedUnmaskedChildContext===t)return o.__reactInternalMemoizedMaskedChildContext;var n={},a;for(a in r)n[a]=t[a];return o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=n),n}function ea(e){return e=e.childContextTypes,e!=null}function Jw(){Lr(Qn),Lr(xn)}function sz(e,t,r){if(xn.current!==gd)throw Error(Ne(168));Pr(xn,t),Pr(Qn,r)}function L6(e,t,r){var o=e.stateNode;if(t=t.childContextTypes,typeof o.getChildContext!="function")return r;o=o.getChildContext();for(var n in o)if(!(n in t))throw Error(Ne(108,eke(e)||"Unknown",n));return $r({},r,o)}function Qw(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||gd,mf=xn.current,Pr(xn,e),Pr(Qn,Qn.current),!0}function lz(e,t,r){var o=e.stateNode;if(!o)throw Error(Ne(169));r?(e=L6(e,t,mf),o.__reactInternalMemoizedMergedChildContext=e,Lr(Qn),Lr(xn),Pr(xn,e)):Lr(Qn),Pr(Qn,r)}var Tl=null,hC=!1,gT=!1;function R6(e){Tl===null?Tl=[e]:Tl.push(e)}function gMe(e){hC=!0,R6(e)}function hd(){if(!gT&&Tl!==null){gT=!0;var e=0,t=ur;try{var r=Tl;for(ur=1;e<r.length;e++){var o=r[e];do o=o(!0);while(o!==null)}Tl=null,hC=!1}catch(n){throw Tl!==null&&(Tl=Tl.slice(e+1)),r6(w2,hd),n}finally{ur=t,gT=!1}}return null}var tg=[],rg=0,eC=null,tC=0,si=[],li=0,gf=null,Ol=1,El="";function sf(e,t){tg[rg++]=tC,tg[rg++]=eC,eC=e,tC=t}function N6(e,t,r){si[li++]=Ol,si[li++]=El,si[li++]=gf,gf=e;var o=Ol;e=El;var n=32-rs(o)-1;o&=~(1<<n),r+=1;var a=32-rs(t)+n;if(30<a){var i=n-n%5;a=(o&(1<<i)-1).toString(32),o>>=i,n-=i,Ol=1<<32-rs(t)+n|r<<n|o,El=a+e}else Ol=1<<a|r<<n|o,El=e}function N2(e){e.return!==null&&(sf(e,1),N6(e,1,0))}function T2(e){for(;e===eC;)eC=tg[--rg],tg[rg]=null,tC=tg[--rg],tg[rg]=null;for(;e===gf;)gf=si[--li],si[li]=null,El=si[--li],si[li]=null,Ol=si[--li],si[li]=null}var wa=null,ba=null,Er=!1,ts=null;function T6(e,t){var r=ui(5,null,null,0);r.elementType="DELETED",r.stateNode=t,r.return=e,t=e.deletions,t===null?(e.deletions=[r],e.flags|=16):t.push(r)}function uz(e,t){switch(e.tag){case 5:var r=e.type;return t=t.nodeType!==1||r.toLowerCase()!==t.nodeName.toLowerCase()?null:t,t!==null?(e.stateNode=t,wa=e,ba=ud(t.firstChild),!0):!1;case 6:return t=e.pendingProps===""||t.nodeType!==3?null:t,t!==null?(e.stateNode=t,wa=e,ba=null,!0):!1;case 13:return t=t.nodeType!==8?null:t,t!==null?(r=gf!==null?{id:Ol,overflow:El}:null,e.memoizedState={dehydrated:t,treeContext:r,retryLane:1073741824},r=ui(18,null,null,0),r.stateNode=t,r.return=e,e.child=r,wa=e,ba=null,!0):!1;default:return!1}}function XT(e){return(e.mode&1)!==0&&(e.flags&128)===0}function JT(e){if(Er){var t=ba;if(t){var r=t;if(!uz(e,t)){if(XT(e))throw Error(Ne(418));t=ud(r.nextSibling);var o=wa;t&&uz(e,t)?T6(o,r):(e.flags=e.flags&-4097|2,Er=!1,wa=e)}}else{if(XT(e))throw Error(Ne(418));e.flags=e.flags&-4097|2,Er=!1,wa=e}}}function dz(e){for(e=e.return;e!==null&&e.tag!==5&&e.tag!==3&&e.tag!==13;)e=e.return;wa=e}function Iw(e){if(e!==wa)return!1;if(!Er)return dz(e),Er=!0,!1;var t;if((t=e.tag!==3)&&!(t=e.tag!==5)&&(t=e.type,t=t!=="head"&&t!=="body"&&!KT(e.type,e.memoizedProps)),t&&(t=ba)){if(XT(e))throw O6(),Error(Ne(418));for(;t;)T6(e,t),t=ud(t.nextSibling)}if(dz(e),e.tag===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(Ne(317));e:{for(e=e.nextSibling,t=0;e;){if(e.nodeType===8){var r=e.data;if(r==="/$"){if(t===0){ba=ud(e.nextSibling);break e}t--}else r!=="$"&&r!=="$!"&&r!=="$?"||t++}e=e.nextSibling}ba=null}}else ba=wa?ud(e.stateNode.nextSibling):null;return!0}function O6(){for(var e=ba;e;)e=ud(e.nextSibling)}function mg(){ba=wa=null,Er=!1}function O2(e){ts===null?ts=[e]:ts.push(e)}var kMe=Wl.ReactCurrentBatchConfig;function jh(e,t,r){if(e=r.ref,e!==null&&typeof e!="function"&&typeof e!="object"){if(r._owner){if(r=r._owner,r){if(r.tag!==1)throw Error(Ne(309));var o=r.stateNode}if(!o)throw Error(Ne(147,e));var n=o,a=""+e;return t!==null&&t.ref!==null&&typeof t.ref=="function"&&t.ref._stringRef===a?t.ref:(t=function(i){var s=n.refs;i===null?delete s[a]:s[a]=i},t._stringRef=a,t)}if(typeof e!="string")throw Error(Ne(284));if(!r._owner)throw Error(Ne(290,e))}return e}function Dw(e,t){throw e=Object.prototype.toString.call(t),Error(Ne(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function cz(e){var t=e._init;return t(e._payload)}function E6(e){function t(k,M){if(e){var v=k.deletions;v===null?(k.deletions=[M],k.flags|=16):v.push(M)}}function r(k,M){if(!e)return null;for(;M!==null;)t(k,M),M=M.sibling;return null}function o(k,M){for(k=new Map;M!==null;)M.key!==null?k.set(M.key,M):k.set(M.index,M),M=M.sibling;return k}function n(k,M){return k=pd(k,M),k.index=0,k.sibling=null,k}function a(k,M,v){return k.index=v,e?(v=k.alternate,v!==null?(v=v.index,v<M?(k.flags|=2,M):v):(k.flags|=2,M)):(k.flags|=1048576,M)}function i(k){return e&&k.alternate===null&&(k.flags|=2),k}function s(k,M,v,b){return M===null||M.tag!==6?(M=bT(v,k.mode,b),M.return=k,M):(M=n(M,v),M.return=k,M)}function l(k,M,v,b){var w=v.type;return w===Ym?d(k,M,v.props.children,b,v.key):M!==null&&(M.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ed&&cz(w)===M.type)?(b=n(M,v.props),b.ref=jh(k,M,v),b.return=k,b):(b=Gw(v.type,v.key,v.props,null,k.mode,b),b.ref=jh(k,M,v),b.return=k,b)}function u(k,M,v,b){return M===null||M.tag!==4||M.stateNode.containerInfo!==v.containerInfo||M.stateNode.implementation!==v.implementation?(M=wT(v,k.mode,b),M.return=k,M):(M=n(M,v.children||[]),M.return=k,M)}function d(k,M,v,b,w){return M===null||M.tag!==7?(M=pf(v,k.mode,b,w),M.return=k,M):(M=n(M,v),M.return=k,M)}function c(k,M,v){if(typeof M=="string"&&M!==""||typeof M=="number")return M=bT(""+M,k.mode,v),M.return=k,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case mw:return v=Gw(M.type,M.key,M.props,null,k.mode,v),v.ref=jh(k,null,M),v.return=k,v;case $m:return M=wT(M,k.mode,v),M.return=k,M;case ed:var b=M._init;return c(k,b(M._payload),v)}if($h(M)||Vh(M))return M=pf(M,k.mode,v,null),M.return=k,M;Dw(k,M)}return null}function f(k,M,v,b){var w=M!==null?M.key:null;if(typeof v=="string"&&v!==""||typeof v=="number")return w!==null?null:s(k,M,""+v,b);if(typeof v=="object"&&v!==null){switch(v.$$typeof){case mw:return v.key===w?l(k,M,v,b):null;case $m:return v.key===w?u(k,M,v,b):null;case ed:return w=v._init,f(k,M,w(v._payload),b)}if($h(v)||Vh(v))return w!==null?null:d(k,M,v,b,null);Dw(k,v)}return null}function p(k,M,v,b,w){if(typeof b=="string"&&b!==""||typeof b=="number")return k=k.get(v)||null,s(M,k,""+b,w);if(typeof b=="object"&&b!==null){switch(b.$$typeof){case mw:return k=k.get(b.key===null?v:b.key)||null,l(M,k,b,w);case $m:return k=k.get(b.key===null?v:b.key)||null,u(M,k,b,w);case ed:var P=b._init;return p(k,M,v,P(b._payload),w)}if($h(b)||Vh(b))return k=k.get(v)||null,d(M,k,b,w,null);Dw(M,b)}return null}function g(k,M,v,b){for(var w=null,P=null,L=M,C=M=0,F=null;L!==null&&C<v.length;C++){L.index>C?(F=L,L=null):F=L.sibling;var T=f(k,L,v[C],b);if(T===null){L===null&&(L=F);break}e&&L&&T.alternate===null&&t(k,L),M=a(T,M,C),P===null?w=T:P.sibling=T,P=T,L=F}if(C===v.length)return r(k,L),Er&&sf(k,C),w;if(L===null){for(;C<v.length;C++)L=c(k,v[C],b),L!==null&&(M=a(L,M,C),P===null?w=L:P.sibling=L,P=L);return Er&&sf(k,C),w}for(L=o(k,L);C<v.length;C++)F=p(L,k,C,v[C],b),F!==null&&(e&&F.alternate!==null&&L.delete(F.key===null?C:F.key),M=a(F,M,C),P===null?w=F:P.sibling=F,P=F);return e&&L.forEach(function(G){return t(k,G)}),Er&&sf(k,C),w}function m(k,M,v,b){var w=Vh(v);if(typeof w!="function")throw Error(Ne(150));if(v=w.call(v),v==null)throw Error(Ne(151));for(var P=w=null,L=M,C=M=0,F=null,T=v.next();L!==null&&!T.done;C++,T=v.next()){L.index>C?(F=L,L=null):F=L.sibling;var G=f(k,L,T.value,b);if(G===null){L===null&&(L=F);break}e&&L&&G.alternate===null&&t(k,L),M=a(G,M,C),P===null?w=G:P.sibling=G,P=G,L=F}if(T.done)return r(k,L),Er&&sf(k,C),w;if(L===null){for(;!T.done;C++,T=v.next())T=c(k,T.value,b),T!==null&&(M=a(T,M,C),P===null?w=T:P.sibling=T,P=T);return Er&&sf(k,C),w}for(L=o(k,L);!T.done;C++,T=v.next())T=p(L,k,C,T.value,b),T!==null&&(e&&T.alternate!==null&&L.delete(T.key===null?C:T.key),M=a(T,M,C),P===null?w=T:P.sibling=T,P=T);return e&&L.forEach(function($){return t(k,$)}),Er&&sf(k,C),w}function h(k,M,v,b){if(typeof v=="object"&&v!==null&&v.type===Ym&&v.key===null&&(v=v.props.children),typeof v=="object"&&v!==null){switch(v.$$typeof){case mw:e:{for(var w=v.key,P=M;P!==null;){if(P.key===w){if(w=v.type,w===Ym){if(P.tag===7){r(k,P.sibling),M=n(P,v.props.children),M.return=k,k=M;break e}}else if(P.elementType===w||typeof w=="object"&&w!==null&&w.$$typeof===ed&&cz(w)===P.type){r(k,P.sibling),M=n(P,v.props),M.ref=jh(k,P,v),M.return=k,k=M;break e}r(k,P);break}else t(k,P);P=P.sibling}v.type===Ym?(M=pf(v.props.children,k.mode,b,v.key),M.return=k,k=M):(b=Gw(v.type,v.key,v.props,null,k.mode,b),b.ref=jh(k,M,v),b.return=k,k=b)}return i(k);case $m:e:{for(P=v.key;M!==null;){if(M.key===P)if(M.tag===4&&M.stateNode.containerInfo===v.containerInfo&&M.stateNode.implementation===v.implementation){r(k,M.sibling),M=n(M,v.children||[]),M.return=k,k=M;break e}else{r(k,M);break}else t(k,M);M=M.sibling}M=wT(v,k.mode,b),M.return=k,k=M}return i(k);case ed:return P=v._init,h(k,M,P(v._payload),b)}if($h(v))return g(k,M,v,b);if(Vh(v))return m(k,M,v,b);Dw(k,v)}return typeof v=="string"&&v!==""||typeof v=="number"?(v=""+v,M!==null&&M.tag===6?(r(k,M.sibling),M=n(M,v),M.return=k,k=M):(r(k,M),M=bT(v,k.mode,b),M.return=k,k=M),i(k)):r(k,M)}return h}var gg=E6(!0),_6=E6(!1),rC=Md(null),oC=null,og=null,E2=null;function _2(){E2=og=oC=null}function F2(e){var t=rC.current;Lr(rC),e._currentValue=t}function QT(e,t,r){for(;e!==null;){var o=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,o!==null&&(o.childLanes|=t)):o!==null&&(o.childLanes&t)!==t&&(o.childLanes|=t),e===r)break;e=e.return}}function dg(e,t){oC=e,E2=og=null,e=e.dependencies,e!==null&&e.firstContext!==null&&((e.lanes&t)!==0&&(Jn=!0),e.firstContext=null)}function ci(e){var t=e._currentValue;if(E2!==e)if(e={context:e,memoizedValue:t,next:null},og===null){if(oC===null)throw Error(Ne(308));og=e,oC.dependencies={lanes:0,firstContext:e}}else og=og.next=e;return t}var df=null;function B2(e){df===null?df=[e]:df.push(e)}function F6(e,t,r,o){var n=t.interleaved;return n===null?(r.next=r,B2(t)):(r.next=n.next,n.next=r),t.interleaved=r,Vl(e,o)}function Vl(e,t){e.lanes|=t;var r=e.alternate;for(r!==null&&(r.lanes|=t),r=e,e=e.return;e!==null;)e.childLanes|=t,r=e.alternate,r!==null&&(r.childLanes|=t),r=e,e=e.return;return r.tag===3?r.stateNode:null}var td=!1;function V2(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function B6(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function _l(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function dd(e,t,r){var o=e.updateQueue;if(o===null)return null;if(o=o.shared,(Zt&2)!==0){var n=o.pending;return n===null?t.next=t:(t.next=n.next,n.next=t),o.pending=t,Vl(e,r)}return n=o.interleaved,n===null?(t.next=t,B2(o)):(t.next=n.next,n.next=t),o.interleaved=t,Vl(e,r)}function _w(e,t,r){if(t=t.updateQueue,t!==null&&(t=t.shared,(r&4194240)!==0)){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,C2(e,r)}}function fz(e,t){var r=e.updateQueue,o=e.alternate;if(o!==null&&(o=o.updateQueue,r===o)){var n=null,a=null;if(r=r.firstBaseUpdate,r!==null){do{var i={eventTime:r.eventTime,lane:r.lane,tag:r.tag,payload:r.payload,callback:r.callback,next:null};a===null?n=a=i:a=a.next=i,r=r.next}while(r!==null);a===null?n=a=t:a=a.next=t}else n=a=t;r={baseState:o.baseState,firstBaseUpdate:n,lastBaseUpdate:a,shared:o.shared,effects:o.effects},e.updateQueue=r;return}e=r.lastBaseUpdate,e===null?r.firstBaseUpdate=t:e.next=t,r.lastBaseUpdate=t}function nC(e,t,r,o){var n=e.updateQueue;td=!1;var a=n.firstBaseUpdate,i=n.lastBaseUpdate,s=n.shared.pending;if(s!==null){n.shared.pending=null;var l=s,u=l.next;l.next=null,i===null?a=u:i.next=u,i=l;var d=e.alternate;d!==null&&(d=d.updateQueue,s=d.lastBaseUpdate,s!==i&&(s===null?d.firstBaseUpdate=u:s.next=u,d.lastBaseUpdate=l))}if(a!==null){var c=n.baseState;i=0,d=u=l=null,s=a;do{var f=s.lane,p=s.eventTime;if((o&f)===f){d!==null&&(d=d.next={eventTime:p,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var g=e,m=s;switch(f=t,p=r,m.tag){case 1:if(g=m.payload,typeof g=="function"){c=g.call(p,c,f);break e}c=g;break e;case 3:g.flags=g.flags&-65537|128;case 0:if(g=m.payload,f=typeof g=="function"?g.call(p,c,f):g,f==null)break e;c=$r({},c,f);break e;case 2:td=!0}}s.callback!==null&&s.lane!==0&&(e.flags|=64,f=n.effects,f===null?n.effects=[s]:f.push(s))}else p={eventTime:p,lane:f,tag:s.tag,payload:s.payload,callback:s.callback,next:null},d===null?(u=d=p,l=c):d=d.next=p,i|=f;if(s=s.next,s===null){if(s=n.shared.pending,s===null)break;f=s,s=f.next,f.next=null,n.lastBaseUpdate=f,n.shared.pending=null}}while(!0);if(d===null&&(l=c),n.baseState=l,n.firstBaseUpdate=u,n.lastBaseUpdate=d,t=n.shared.interleaved,t!==null){n=t;do i|=n.lane,n=n.next;while(n!==t)}else a===null&&(n.shared.lanes=0);Mf|=i,e.lanes=i,e.memoizedState=c}}function pz(e,t,r){if(e=t.effects,t.effects=null,e!==null)for(t=0;t<e.length;t++){var o=e[t],n=o.callback;if(n!==null){if(o.callback=null,o=r,typeof n!="function")throw Error(Ne(191,n));n.call(o)}}}var Pv={},Ws=Md(Pv),Mv=Md(Pv),hv=Md(Pv);function cf(e){if(e===Pv)throw Error(Ne(174));return e}function U2(e,t){switch(Pr(hv,t),Pr(Mv,e),Pr(Ws,Pv),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:TT(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=TT(t,e)}Lr(Ws),Pr(Ws,t)}function kg(){Lr(Ws),Lr(Mv),Lr(hv)}function V6(e){cf(hv.current);var t=cf(Ws.current),r=TT(t,e.type);t!==r&&(Pr(Mv,e),Pr(Ws,r))}function W2(e){Mv.current===e&&(Lr(Ws),Lr(Mv))}var Hr=Md(0);function aC(e){for(var t=e;t!==null;){if(t.tag===13){var r=t.memoizedState;if(r!==null&&(r=r.dehydrated,r===null||r.data==="$?"||r.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if((t.flags&128)!==0)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var kT=[];function G2(){for(var e=0;e<kT.length;e++)kT[e]._workInProgressVersionPrimary=null;kT.length=0}var Fw=Wl.ReactCurrentDispatcher,MT=Wl.ReactCurrentBatchConfig,kf=0,Kr=null,Po=null,Vo=null,iC=!1,rv=!1,vv=0,MMe=0;function hn(){throw Error(Ne(321))}function j2(e,t){if(t===null)return!1;for(var r=0;r<t.length&&r<e.length;r++)if(!ns(e[r],t[r]))return!1;return!0}function z2(e,t,r,o,n,a){if(kf=a,Kr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,Fw.current=e===null||e.memoizedState===null?xMe:bMe,e=r(o,n),rv){a=0;do{if(rv=!1,vv=0,25<=a)throw Error(Ne(301));a+=1,Vo=Po=null,t.updateQueue=null,Fw.current=wMe,e=r(o,n)}while(rv)}if(Fw.current=sC,t=Po!==null&&Po.next!==null,kf=0,Vo=Po=Kr=null,iC=!1,t)throw Error(Ne(300));return e}function q2(){var e=vv!==0;return vv=0,e}function Bs(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Vo===null?Kr.memoizedState=Vo=e:Vo=Vo.next=e,Vo}function fi(){if(Po===null){var e=Kr.alternate;e=e!==null?e.memoizedState:null}else e=Po.next;var t=Vo===null?Kr.memoizedState:Vo.next;if(t!==null)Vo=t,Po=e;else{if(e===null)throw Error(Ne(310));Po=e,e={memoizedState:Po.memoizedState,baseState:Po.baseState,baseQueue:Po.baseQueue,queue:Po.queue,next:null},Vo===null?Kr.memoizedState=Vo=e:Vo=Vo.next=e}return Vo}function yv(e,t){return typeof t=="function"?t(e):t}function hT(e){var t=fi(),r=t.queue;if(r===null)throw Error(Ne(311));r.lastRenderedReducer=e;var o=Po,n=o.baseQueue,a=r.pending;if(a!==null){if(n!==null){var i=n.next;n.next=a.next,a.next=i}o.baseQueue=n=a,r.pending=null}if(n!==null){a=n.next,o=o.baseState;var s=i=null,l=null,u=a;do{var d=u.lane;if((kf&d)===d)l!==null&&(l=l.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),o=u.hasEagerState?u.eagerState:e(o,u.action);else{var c={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};l===null?(s=l=c,i=o):l=l.next=c,Kr.lanes|=d,Mf|=d}u=u.next}while(u!==null&&u!==a);l===null?i=o:l.next=s,ns(o,t.memoizedState)||(Jn=!0),t.memoizedState=o,t.baseState=i,t.baseQueue=l,r.lastRenderedState=o}if(e=r.interleaved,e!==null){n=e;do a=n.lane,Kr.lanes|=a,Mf|=a,n=n.next;while(n!==e)}else n===null&&(r.lanes=0);return[t.memoizedState,r.dispatch]}function vT(e){var t=fi(),r=t.queue;if(r===null)throw Error(Ne(311));r.lastRenderedReducer=e;var o=r.dispatch,n=r.pending,a=t.memoizedState;if(n!==null){r.pending=null;var i=n=n.next;do a=e(a,i.action),i=i.next;while(i!==n);ns(a,t.memoizedState)||(Jn=!0),t.memoizedState=a,t.baseQueue===null&&(t.baseState=a),r.lastRenderedState=a}return[a,o]}function U6(){}function W6(e,t){var r=Kr,o=fi(),n=t(),a=!ns(o.memoizedState,n);if(a&&(o.memoizedState=n,Jn=!0),o=o.queue,H2(z6.bind(null,r,o,e),[e]),o.getSnapshot!==t||a||Vo!==null&&Vo.memoizedState.tag&1){if(r.flags|=2048,xv(9,j6.bind(null,r,o,n,t),void 0,null),Uo===null)throw Error(Ne(349));(kf&30)!==0||G6(r,t,n)}return n}function G6(e,t,r){e.flags|=16384,e={getSnapshot:t,value:r},t=Kr.updateQueue,t===null?(t={lastEffect:null,stores:null},Kr.updateQueue=t,t.stores=[e]):(r=t.stores,r===null?t.stores=[e]:r.push(e))}function j6(e,t,r,o){t.value=r,t.getSnapshot=o,q6(t)&&H6(e)}function z6(e,t,r){return r(function(){q6(t)&&H6(e)})}function q6(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ns(e,r)}catch{return!0}}function H6(e){var t=Vl(e,1);t!==null&&os(t,e,1,-1)}function mz(e){var t=Bs();return typeof e=="function"&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:yv,lastRenderedState:e},t.queue=e,e=e.dispatch=yMe.bind(null,Kr,e),[t.memoizedState,e]}function xv(e,t,r,o){return e={tag:e,create:t,destroy:r,deps:o,next:null},t=Kr.updateQueue,t===null?(t={lastEffect:null,stores:null},Kr.updateQueue=t,t.lastEffect=e.next=e):(r=t.lastEffect,r===null?t.lastEffect=e.next=e:(o=r.next,r.next=e,e.next=o,t.lastEffect=e)),e}function K6(){return fi().memoizedState}function Bw(e,t,r,o){var n=Bs();Kr.flags|=e,n.memoizedState=xv(1|t,r,void 0,o===void 0?null:o)}function vC(e,t,r,o){var n=fi();o=o===void 0?null:o;var a=void 0;if(Po!==null){var i=Po.memoizedState;if(a=i.destroy,o!==null&&j2(o,i.deps)){n.memoizedState=xv(t,r,a,o);return}}Kr.flags|=e,n.memoizedState=xv(1|t,r,a,o)}function gz(e,t){return Bw(8390656,8,e,t)}function H2(e,t){return vC(2048,8,e,t)}function $6(e,t){return vC(4,2,e,t)}function Y6(e,t){return vC(4,4,e,t)}function Z6(e,t){if(typeof t=="function")return e=e(),t(e),function(){t(null)};if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function X6(e,t,r){return r=r!=null?r.concat([e]):null,vC(4,4,Z6.bind(null,t,e),r)}function K2(){}function J6(e,t){var r=fi();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&j2(t,o[1])?o[0]:(r.memoizedState=[e,t],e)}function Q6(e,t){var r=fi();t=t===void 0?null:t;var o=r.memoizedState;return o!==null&&t!==null&&j2(t,o[1])?o[0]:(e=e(),r.memoizedState=[e,t],e)}function e7(e,t,r){return(kf&21)===0?(e.baseState&&(e.baseState=!1,Jn=!0),e.memoizedState=r):(ns(r,t)||(r=a6(),Kr.lanes|=r,Mf|=r,e.baseState=!0),t)}function hMe(e,t){var r=ur;ur=r!==0&&4>r?r:4,e(!0);var o=MT.transition;MT.transition={};try{e(!1),t()}finally{ur=r,MT.transition=o}}function t7(){return fi().memoizedState}function vMe(e,t,r){var o=fd(e);if(r={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null},r7(e))o7(t,r);else if(r=F6(e,t,r,o),r!==null){var n=Fn();os(r,e,o,n),n7(r,t,o)}}function yMe(e,t,r){var o=fd(e),n={lane:o,action:r,hasEagerState:!1,eagerState:null,next:null};if(r7(e))o7(t,n);else{var a=e.alternate;if(e.lanes===0&&(a===null||a.lanes===0)&&(a=t.lastRenderedReducer,a!==null))try{var i=t.lastRenderedState,s=a(i,r);if(n.hasEagerState=!0,n.eagerState=s,ns(s,i)){var l=t.interleaved;l===null?(n.next=n,B2(t)):(n.next=l.next,l.next=n),t.interleaved=n;return}}catch{}r=F6(e,t,n,o),r!==null&&(n=Fn(),os(r,e,o,n),n7(r,t,o))}}function r7(e){var t=e.alternate;return e===Kr||t!==null&&t===Kr}function o7(e,t){rv=iC=!0;var r=e.pending;r===null?t.next=t:(t.next=r.next,r.next=t),e.pending=t}function n7(e,t,r){if((r&4194240)!==0){var o=t.lanes;o&=e.pendingLanes,r|=o,t.lanes=r,C2(e,r)}}var sC={readContext:ci,useCallback:hn,useContext:hn,useEffect:hn,useImperativeHandle:hn,useInsertionEffect:hn,useLayoutEffect:hn,useMemo:hn,useReducer:hn,useRef:hn,useState:hn,useDebugValue:hn,useDeferredValue:hn,useTransition:hn,useMutableSource:hn,useSyncExternalStore:hn,useId:hn,unstable_isNewReconciler:!1},xMe={readContext:ci,useCallback:function(e,t){return Bs().memoizedState=[e,t===void 0?null:t],e},useContext:ci,useEffect:gz,useImperativeHandle:function(e,t,r){return r=r!=null?r.concat([e]):null,Bw(4194308,4,Z6.bind(null,t,e),r)},useLayoutEffect:function(e,t){return Bw(4194308,4,e,t)},useInsertionEffect:function(e,t){return Bw(4,2,e,t)},useMemo:function(e,t){var r=Bs();return t=t===void 0?null:t,e=e(),r.memoizedState=[e,t],e},useReducer:function(e,t,r){var o=Bs();return t=r!==void 0?r(t):t,o.memoizedState=o.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},o.queue=e,e=e.dispatch=vMe.bind(null,Kr,e),[o.memoizedState,e]},useRef:function(e){var t=Bs();return e={current:e},t.memoizedState=e},useState:mz,useDebugValue:K2,useDeferredValue:function(e){return Bs().memoizedState=e},useTransition:function(){var e=mz(!1),t=e[0];return e=hMe.bind(null,e[1]),Bs().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,r){var o=Kr,n=Bs();if(Er){if(r===void 0)throw Error(Ne(407));r=r()}else{if(r=t(),Uo===null)throw Error(Ne(349));(kf&30)!==0||G6(o,t,r)}n.memoizedState=r;var a={value:r,getSnapshot:t};return n.queue=a,gz(z6.bind(null,o,a,e),[e]),o.flags|=2048,xv(9,j6.bind(null,o,a,r,t),void 0,null),r},useId:function(){var e=Bs(),t=Uo.identifierPrefix;if(Er){var r=El,o=Ol;r=(o&~(1<<32-rs(o)-1)).toString(32)+r,t=":"+t+"R"+r,r=vv++,0<r&&(t+="H"+r.toString(32)),t+=":"}else r=MMe++,t=":"+t+"r"+r.toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},bMe={readContext:ci,useCallback:J6,useContext:ci,useEffect:H2,useImperativeHandle:X6,useInsertionEffect:$6,useLayoutEffect:Y6,useMemo:Q6,useReducer:hT,useRef:K6,useState:function(){return hT(yv)},useDebugValue:K2,useDeferredValue:function(e){var t=fi();return e7(t,Po.memoizedState,e)},useTransition:function(){var e=hT(yv)[0],t=fi().memoizedState;return[e,t]},useMutableSource:U6,useSyncExternalStore:W6,useId:t7,unstable_isNewReconciler:!1},wMe={readContext:ci,useCallback:J6,useContext:ci,useEffect:H2,useImperativeHandle:X6,useInsertionEffect:$6,useLayoutEffect:Y6,useMemo:Q6,useReducer:vT,useRef:K6,useState:function(){return vT(yv)},useDebugValue:K2,useDeferredValue:function(e){var t=fi();return Po===null?t.memoizedState=e:e7(t,Po.memoizedState,e)},useTransition:function(){var e=vT(yv)[0],t=fi().memoizedState;return[e,t]},useMutableSource:U6,useSyncExternalStore:W6,useId:t7,unstable_isNewReconciler:!1};function Qi(e,t){if(e&&e.defaultProps){t=$r({},t),e=e.defaultProps;for(var r in e)t[r]===void 0&&(t[r]=e[r]);return t}return t}function e2(e,t,r,o){t=e.memoizedState,r=r(o,t),r=r==null?t:$r({},t,r),e.memoizedState=r,e.lanes===0&&(e.updateQueue.baseState=r)}var yC={isMounted:function(e){return(e=e._reactInternals)?yf(e)===e:!1},enqueueSetState:function(e,t,r){e=e._reactInternals;var o=Fn(),n=fd(e),a=_l(o,n);a.payload=t,r!=null&&(a.callback=r),t=dd(e,a,n),t!==null&&(os(t,e,n,o),_w(t,e,n))},enqueueReplaceState:function(e,t,r){e=e._reactInternals;var o=Fn(),n=fd(e),a=_l(o,n);a.tag=1,a.payload=t,r!=null&&(a.callback=r),t=dd(e,a,n),t!==null&&(os(t,e,n,o),_w(t,e,n))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var r=Fn(),o=fd(e),n=_l(r,o);n.tag=2,t!=null&&(n.callback=t),t=dd(e,n,o),t!==null&&(os(t,e,o,r),_w(t,e,o))}};function kz(e,t,r,o,n,a,i){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(o,a,i):t.prototype&&t.prototype.isPureReactComponent?!pv(r,o)||!pv(n,a):!0}function a7(e,t,r){var o=!1,n=gd,a=t.contextType;return typeof a=="object"&&a!==null?a=ci(a):(n=ea(t)?mf:xn.current,o=t.contextTypes,a=(o=o!=null)?pg(e,n):gd),t=new t(r,a),e.memoizedState=t.state!==null&&t.state!==void 0?t.state:null,t.updater=yC,e.stateNode=t,t._reactInternals=e,o&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=a),t}function Mz(e,t,r,o){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(r,o),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(r,o),t.state!==e&&yC.enqueueReplaceState(t,t.state,null)}function t2(e,t,r,o){var n=e.stateNode;n.props=r,n.state=e.memoizedState,n.refs={},V2(e);var a=t.contextType;typeof a=="object"&&a!==null?n.context=ci(a):(a=ea(t)?mf:xn.current,n.context=pg(e,a)),n.state=e.memoizedState,a=t.getDerivedStateFromProps,typeof a=="function"&&(e2(e,t,a,r),n.state=e.memoizedState),typeof t.getDerivedStateFromProps=="function"||typeof n.getSnapshotBeforeUpdate=="function"||typeof n.UNSAFE_componentWillMount!="function"&&typeof n.componentWillMount!="function"||(t=n.state,typeof n.componentWillMount=="function"&&n.componentWillMount(),typeof n.UNSAFE_componentWillMount=="function"&&n.UNSAFE_componentWillMount(),t!==n.state&&yC.enqueueReplaceState(n,n.state,null),nC(e,r,n,o),n.state=e.memoizedState),typeof n.componentDidMount=="function"&&(e.flags|=4194308)}function Mg(e,t){try{var r="",o=t;do r+=Qge(o),o=o.return;while(o);var n=r}catch(a){n=`
7
+ Error generating stack: `+a.message+`
8
+ `+a.stack}return{value:e,source:t,stack:n,digest:null}}function yT(e,t,r){return{value:e,source:null,stack:r??null,digest:t??null}}function r2(e,t){try{console.error(t.value)}catch(r){setTimeout(function(){throw r})}}var CMe=typeof WeakMap=="function"?WeakMap:Map;function i7(e,t,r){r=_l(-1,r),r.tag=3,r.payload={element:null};var o=t.value;return r.callback=function(){uC||(uC=!0,f2=o),r2(e,t)},r}function s7(e,t,r){r=_l(-1,r),r.tag=3;var o=e.type.getDerivedStateFromError;if(typeof o=="function"){var n=t.value;r.payload=function(){return o(n)},r.callback=function(){r2(e,t)}}var a=e.stateNode;return a!==null&&typeof a.componentDidCatch=="function"&&(r.callback=function(){r2(e,t),typeof o!="function"&&(cd===null?cd=new Set([this]):cd.add(this));var i=t.stack;this.componentDidCatch(t.value,{componentStack:i!==null?i:""})}),r}function hz(e,t,r){var o=e.pingCache;if(o===null){o=e.pingCache=new CMe;var n=new Set;o.set(t,n)}else n=o.get(t),n===void 0&&(n=new Set,o.set(t,n));n.has(r)||(n.add(r),e=BMe.bind(null,e,t,r),t.then(e,e))}function vz(e){do{var t;if((t=e.tag===13)&&(t=e.memoizedState,t=t!==null?t.dehydrated!==null:!0),t)return e;e=e.return}while(e!==null);return null}function yz(e,t,r,o,n){return(e.mode&1)===0?(e===t?e.flags|=65536:(e.flags|=128,r.flags|=131072,r.flags&=-52805,r.tag===1&&(r.alternate===null?r.tag=17:(t=_l(-1,1),t.tag=2,dd(r,t,1))),r.lanes|=1),e):(e.flags|=65536,e.lanes=n,e)}var SMe=Wl.ReactCurrentOwner,Jn=!1;function _n(e,t,r,o){t.child=e===null?_6(t,null,r,o):gg(t,e.child,r,o)}function xz(e,t,r,o,n){r=r.render;var a=t.ref;return dg(t,n),o=z2(e,t,r,o,a,n),r=q2(),e!==null&&!Jn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ul(e,t,n)):(Er&&r&&N2(t),t.flags|=1,_n(e,t,o,n),t.child)}function bz(e,t,r,o,n){if(e===null){var a=r.type;return typeof a=="function"&&!tO(a)&&a.defaultProps===void 0&&r.compare===null&&r.defaultProps===void 0?(t.tag=15,t.type=a,l7(e,t,a,o,n)):(e=Gw(r.type,null,o,t,t.mode,n),e.ref=t.ref,e.return=t,t.child=e)}if(a=e.child,(e.lanes&n)===0){var i=a.memoizedProps;if(r=r.compare,r=r!==null?r:pv,r(i,o)&&e.ref===t.ref)return Ul(e,t,n)}return t.flags|=1,e=pd(a,o),e.ref=t.ref,e.return=t,t.child=e}function l7(e,t,r,o,n){if(e!==null){var a=e.memoizedProps;if(pv(a,o)&&e.ref===t.ref)if(Jn=!1,t.pendingProps=o=a,(e.lanes&n)!==0)(e.flags&131072)!==0&&(Jn=!0);else return t.lanes=e.lanes,Ul(e,t,n)}return o2(e,t,r,o,n)}function u7(e,t,r){var o=t.pendingProps,n=o.children,a=e!==null?e.memoizedState:null;if(o.mode==="hidden")if((t.mode&1)===0)t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Pr(ag,xa),xa|=r;else{if((r&1073741824)===0)return e=a!==null?a.baseLanes|r:r,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Pr(ag,xa),xa|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},o=a!==null?a.baseLanes:r,Pr(ag,xa),xa|=o}else a!==null?(o=a.baseLanes|r,t.memoizedState=null):o=r,Pr(ag,xa),xa|=o;return _n(e,t,n,r),t.child}function d7(e,t){var r=t.ref;(e===null&&r!==null||e!==null&&e.ref!==r)&&(t.flags|=512,t.flags|=2097152)}function o2(e,t,r,o,n){var a=ea(r)?mf:xn.current;return a=pg(t,a),dg(t,n),r=z2(e,t,r,o,a,n),o=q2(),e!==null&&!Jn?(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n,Ul(e,t,n)):(Er&&o&&N2(t),t.flags|=1,_n(e,t,r,n),t.child)}function wz(e,t,r,o,n){if(ea(r)){var a=!0;Qw(t)}else a=!1;if(dg(t,n),t.stateNode===null)Vw(e,t),a7(t,r,o),t2(t,r,o,n),o=!0;else if(e===null){var i=t.stateNode,s=t.memoizedProps;i.props=s;var l=i.context,u=r.contextType;typeof u=="object"&&u!==null?u=ci(u):(u=ea(r)?mf:xn.current,u=pg(t,u));var d=r.getDerivedStateFromProps,c=typeof d=="function"||typeof i.getSnapshotBeforeUpdate=="function";c||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==o||l!==u)&&Mz(t,i,o,u),td=!1;var f=t.memoizedState;i.state=f,nC(t,o,i,n),l=t.memoizedState,s!==o||f!==l||Qn.current||td?(typeof d=="function"&&(e2(t,r,d,o),l=t.memoizedState),(s=td||kz(t,r,s,o,f,l,u))?(c||typeof i.UNSAFE_componentWillMount!="function"&&typeof i.componentWillMount!="function"||(typeof i.componentWillMount=="function"&&i.componentWillMount(),typeof i.UNSAFE_componentWillMount=="function"&&i.UNSAFE_componentWillMount()),typeof i.componentDidMount=="function"&&(t.flags|=4194308)):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=o,t.memoizedState=l),i.props=o,i.state=l,i.context=u,o=s):(typeof i.componentDidMount=="function"&&(t.flags|=4194308),o=!1)}else{i=t.stateNode,B6(e,t),s=t.memoizedProps,u=t.type===t.elementType?s:Qi(t.type,s),i.props=u,c=t.pendingProps,f=i.context,l=r.contextType,typeof l=="object"&&l!==null?l=ci(l):(l=ea(r)?mf:xn.current,l=pg(t,l));var p=r.getDerivedStateFromProps;(d=typeof p=="function"||typeof i.getSnapshotBeforeUpdate=="function")||typeof i.UNSAFE_componentWillReceiveProps!="function"&&typeof i.componentWillReceiveProps!="function"||(s!==c||f!==l)&&Mz(t,i,o,l),td=!1,f=t.memoizedState,i.state=f,nC(t,o,i,n);var g=t.memoizedState;s!==c||f!==g||Qn.current||td?(typeof p=="function"&&(e2(t,r,p,o),g=t.memoizedState),(u=td||kz(t,r,u,o,f,g,l)||!1)?(d||typeof i.UNSAFE_componentWillUpdate!="function"&&typeof i.componentWillUpdate!="function"||(typeof i.componentWillUpdate=="function"&&i.componentWillUpdate(o,g,l),typeof i.UNSAFE_componentWillUpdate=="function"&&i.UNSAFE_componentWillUpdate(o,g,l)),typeof i.componentDidUpdate=="function"&&(t.flags|=4),typeof i.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),t.memoizedProps=o,t.memoizedState=g),i.props=o,i.state=g,i.context=l,o=u):(typeof i.componentDidUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=4),typeof i.getSnapshotBeforeUpdate!="function"||s===e.memoizedProps&&f===e.memoizedState||(t.flags|=1024),o=!1)}return n2(e,t,r,o,a,n)}function n2(e,t,r,o,n,a){d7(e,t);var i=(t.flags&128)!==0;if(!o&&!i)return n&&lz(t,r,!1),Ul(e,t,a);o=t.stateNode,SMe.current=t;var s=i&&typeof r.getDerivedStateFromError!="function"?null:o.render();return t.flags|=1,e!==null&&i?(t.child=gg(t,e.child,null,a),t.child=gg(t,null,s,a)):_n(e,t,s,a),t.memoizedState=o.state,n&&lz(t,r,!0),t.child}function c7(e){var t=e.stateNode;t.pendingContext?sz(e,t.pendingContext,t.pendingContext!==t.context):t.context&&sz(e,t.context,!1),U2(e,t.containerInfo)}function Cz(e,t,r,o,n){return mg(),O2(n),t.flags|=256,_n(e,t,r,o),t.child}var a2={dehydrated:null,treeContext:null,retryLane:0};function i2(e){return{baseLanes:e,cachePool:null,transitions:null}}function f7(e,t,r){var o=t.pendingProps,n=Hr.current,a=!1,i=(t.flags&128)!==0,s;if((s=i)||(s=e!==null&&e.memoizedState===null?!1:(n&2)!==0),s?(a=!0,t.flags&=-129):(e===null||e.memoizedState!==null)&&(n|=1),Pr(Hr,n&1),e===null)return JT(t),e=t.memoizedState,e!==null&&(e=e.dehydrated,e!==null)?((t.mode&1)===0?t.lanes=1:e.data==="$!"?t.lanes=8:t.lanes=1073741824,null):(i=o.children,e=o.fallback,a?(o=t.mode,a=t.child,i={mode:"hidden",children:i},(o&1)===0&&a!==null?(a.childLanes=0,a.pendingProps=i):a=wC(i,o,0,null),e=pf(e,o,r,null),a.return=t,e.return=t,a.sibling=e,t.child=a,t.child.memoizedState=i2(r),t.memoizedState=a2,e):$2(t,i));if(n=e.memoizedState,n!==null&&(s=n.dehydrated,s!==null))return PMe(e,t,i,o,s,n,r);if(a){a=o.fallback,i=t.mode,n=e.child,s=n.sibling;var l={mode:"hidden",children:o.children};return(i&1)===0&&t.child!==n?(o=t.child,o.childLanes=0,o.pendingProps=l,t.deletions=null):(o=pd(n,l),o.subtreeFlags=n.subtreeFlags&14680064),s!==null?a=pd(s,a):(a=pf(a,i,r,null),a.flags|=2),a.return=t,o.return=t,o.sibling=a,t.child=o,o=a,a=t.child,i=e.child.memoizedState,i=i===null?i2(r):{baseLanes:i.baseLanes|r,cachePool:null,transitions:i.transitions},a.memoizedState=i,a.childLanes=e.childLanes&~r,t.memoizedState=a2,o}return a=e.child,e=a.sibling,o=pd(a,{mode:"visible",children:o.children}),(t.mode&1)===0&&(o.lanes=r),o.return=t,o.sibling=null,e!==null&&(r=t.deletions,r===null?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=o,t.memoizedState=null,o}function $2(e,t){return t=wC({mode:"visible",children:t},e.mode,0,null),t.return=e,e.child=t}function Lw(e,t,r,o){return o!==null&&O2(o),gg(t,e.child,null,r),e=$2(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function PMe(e,t,r,o,n,a,i){if(r)return t.flags&256?(t.flags&=-257,o=yT(Error(Ne(422))),Lw(e,t,i,o)):t.memoizedState!==null?(t.child=e.child,t.flags|=128,null):(a=o.fallback,n=t.mode,o=wC({mode:"visible",children:o.children},n,0,null),a=pf(a,n,i,null),a.flags|=2,o.return=t,a.return=t,o.sibling=a,t.child=o,(t.mode&1)!==0&&gg(t,e.child,null,i),t.child.memoizedState=i2(i),t.memoizedState=a2,a);if((t.mode&1)===0)return Lw(e,t,i,null);if(n.data==="$!"){if(o=n.nextSibling&&n.nextSibling.dataset,o)var s=o.dgst;return o=s,a=Error(Ne(419)),o=yT(a,o,void 0),Lw(e,t,i,o)}if(s=(i&e.childLanes)!==0,Jn||s){if(o=Uo,o!==null){switch(i&-i){case 4:n=2;break;case 16:n=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:n=32;break;case 536870912:n=268435456;break;default:n=0}n=(n&(o.suspendedLanes|i))!==0?0:n,n!==0&&n!==a.retryLane&&(a.retryLane=n,Vl(e,n),os(o,e,n,-1))}return eO(),o=yT(Error(Ne(421))),Lw(e,t,i,o)}return n.data==="$?"?(t.flags|=128,t.child=e.child,t=VMe.bind(null,e),n._reactRetry=t,null):(e=a.treeContext,ba=ud(n.nextSibling),wa=t,Er=!0,ts=null,e!==null&&(si[li++]=Ol,si[li++]=El,si[li++]=gf,Ol=e.id,El=e.overflow,gf=t),t=$2(t,o.children),t.flags|=4096,t)}function Sz(e,t,r){e.lanes|=t;var o=e.alternate;o!==null&&(o.lanes|=t),QT(e.return,t,r)}function xT(e,t,r,o,n){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:o,tail:r,tailMode:n}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=o,a.tail=r,a.tailMode=n)}function p7(e,t,r){var o=t.pendingProps,n=o.revealOrder,a=o.tail;if(_n(e,t,o.children,r),o=Hr.current,(o&2)!==0)o=o&1|2,t.flags|=128;else{if(e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&Sz(e,r,t);else if(e.tag===19)Sz(e,r,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}o&=1}if(Pr(Hr,o),(t.mode&1)===0)t.memoizedState=null;else switch(n){case"forwards":for(r=t.child,n=null;r!==null;)e=r.alternate,e!==null&&aC(e)===null&&(n=r),r=r.sibling;r=n,r===null?(n=t.child,t.child=null):(n=r.sibling,r.sibling=null),xT(t,!1,n,r,a);break;case"backwards":for(r=null,n=t.child,t.child=null;n!==null;){if(e=n.alternate,e!==null&&aC(e)===null){t.child=n;break}e=n.sibling,n.sibling=r,r=n,n=e}xT(t,!0,r,null,a);break;case"together":xT(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vw(e,t){(t.mode&1)===0&&e!==null&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Ul(e,t,r){if(e!==null&&(t.dependencies=e.dependencies),Mf|=t.lanes,(r&t.childLanes)===0)return null;if(e!==null&&t.child!==e.child)throw Error(Ne(153));if(t.child!==null){for(e=t.child,r=pd(e,e.pendingProps),t.child=r,r.return=t;e.sibling!==null;)e=e.sibling,r=r.sibling=pd(e,e.pendingProps),r.return=t;r.sibling=null}return t.child}function AMe(e,t,r){switch(t.tag){case 3:c7(t),mg();break;case 5:V6(t);break;case 1:ea(t.type)&&Qw(t);break;case 4:U2(t,t.stateNode.containerInfo);break;case 10:var o=t.type._context,n=t.memoizedProps.value;Pr(rC,o._currentValue),o._currentValue=n;break;case 13:if(o=t.memoizedState,o!==null)return o.dehydrated!==null?(Pr(Hr,Hr.current&1),t.flags|=128,null):(r&t.child.childLanes)!==0?f7(e,t,r):(Pr(Hr,Hr.current&1),e=Ul(e,t,r),e!==null?e.sibling:null);Pr(Hr,Hr.current&1);break;case 19:if(o=(r&t.childLanes)!==0,(e.flags&128)!==0){if(o)return p7(e,t,r);t.flags|=128}if(n=t.memoizedState,n!==null&&(n.rendering=null,n.tail=null,n.lastEffect=null),Pr(Hr,Hr.current),o)break;return null;case 22:case 23:return t.lanes=0,u7(e,t,r)}return Ul(e,t,r)}var m7,s2,g7,k7;m7=function(e,t){for(var r=t.child;r!==null;){if(r.tag===5||r.tag===6)e.appendChild(r.stateNode);else if(r.tag!==4&&r.child!==null){r.child.return=r,r=r.child;continue}if(r===t)break;for(;r.sibling===null;){if(r.return===null||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}};s2=function(){};g7=function(e,t,r,o){var n=e.memoizedProps;if(n!==o){e=t.stateNode,cf(Ws.current);var a=null;switch(r){case"input":n=DT(e,n),o=DT(e,o),a=[];break;case"select":n=$r({},n,{value:void 0}),o=$r({},o,{value:void 0}),a=[];break;case"textarea":n=NT(e,n),o=NT(e,o),a=[];break;default:typeof n.onClick!="function"&&typeof o.onClick=="function"&&(e.onclick=Xw)}OT(r,o);var i;r=null;for(u in n)if(!o.hasOwnProperty(u)&&n.hasOwnProperty(u)&&n[u]!=null)if(u==="style"){var s=n[u];for(i in s)s.hasOwnProperty(i)&&(r||(r={}),r[i]="")}else u!=="dangerouslySetInnerHTML"&&u!=="children"&&u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&u!=="autoFocus"&&(iv.hasOwnProperty(u)?a||(a=[]):(a=a||[]).push(u,null));for(u in o){var l=o[u];if(s=n?.[u],o.hasOwnProperty(u)&&l!==s&&(l!=null||s!=null))if(u==="style")if(s){for(i in s)!s.hasOwnProperty(i)||l&&l.hasOwnProperty(i)||(r||(r={}),r[i]="");for(i in l)l.hasOwnProperty(i)&&s[i]!==l[i]&&(r||(r={}),r[i]=l[i])}else r||(a||(a=[]),a.push(u,r)),r=l;else u==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,s=s?s.__html:void 0,l!=null&&s!==l&&(a=a||[]).push(u,l)):u==="children"?typeof l!="string"&&typeof l!="number"||(a=a||[]).push(u,""+l):u!=="suppressContentEditableWarning"&&u!=="suppressHydrationWarning"&&(iv.hasOwnProperty(u)?(l!=null&&u==="onScroll"&&Dr("scroll",e),a||s===l||(a=[])):(a=a||[]).push(u,l))}r&&(a=a||[]).push("style",r);var u=a;(t.updateQueue=u)&&(t.flags|=4)}};k7=function(e,t,r,o){r!==o&&(t.flags|=4)};function zh(e,t){if(!Er)switch(e.tailMode){case"hidden":t=e.tail;for(var r=null;t!==null;)t.alternate!==null&&(r=t),t=t.sibling;r===null?e.tail=null:r.sibling=null;break;case"collapsed":r=e.tail;for(var o=null;r!==null;)r.alternate!==null&&(o=r),r=r.sibling;o===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:o.sibling=null}}function vn(e){var t=e.alternate!==null&&e.alternate.child===e.child,r=0,o=0;if(t)for(var n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags&14680064,o|=n.flags&14680064,n.return=e,n=n.sibling;else for(n=e.child;n!==null;)r|=n.lanes|n.childLanes,o|=n.subtreeFlags,o|=n.flags,n.return=e,n=n.sibling;return e.subtreeFlags|=o,e.childLanes=r,t}function IMe(e,t,r){var o=t.pendingProps;switch(T2(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vn(t),null;case 1:return ea(t.type)&&Jw(),vn(t),null;case 3:return o=t.stateNode,kg(),Lr(Qn),Lr(xn),G2(),o.pendingContext&&(o.context=o.pendingContext,o.pendingContext=null),(e===null||e.child===null)&&(Iw(t)?t.flags|=4:e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,ts!==null&&(g2(ts),ts=null))),s2(e,t),vn(t),null;case 5:W2(t);var n=cf(hv.current);if(r=t.type,e!==null&&t.stateNode!=null)g7(e,t,r,o,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!o){if(t.stateNode===null)throw Error(Ne(166));return vn(t),null}if(e=cf(Ws.current),Iw(t)){o=t.stateNode,r=t.type;var a=t.memoizedProps;switch(o[Vs]=t,o[kv]=a,e=(t.mode&1)!==0,r){case"dialog":Dr("cancel",o),Dr("close",o);break;case"iframe":case"object":case"embed":Dr("load",o);break;case"video":case"audio":for(n=0;n<Zh.length;n++)Dr(Zh[n],o);break;case"source":Dr("error",o);break;case"img":case"image":case"link":Dr("error",o),Dr("load",o);break;case"details":Dr("toggle",o);break;case"input":Tj(o,a),Dr("invalid",o);break;case"select":o._wrapperState={wasMultiple:!!a.multiple},Dr("invalid",o);break;case"textarea":Ej(o,a),Dr("invalid",o)}OT(r,a),n=null;for(var i in a)if(a.hasOwnProperty(i)){var s=a[i];i==="children"?typeof s=="string"?o.textContent!==s&&(a.suppressHydrationWarning!==!0&&Aw(o.textContent,s,e),n=["children",s]):typeof s=="number"&&o.textContent!==""+s&&(a.suppressHydrationWarning!==!0&&Aw(o.textContent,s,e),n=["children",""+s]):iv.hasOwnProperty(i)&&s!=null&&i==="onScroll"&&Dr("scroll",o)}switch(r){case"input":gw(o),Oj(o,a,!0);break;case"textarea":gw(o),_j(o);break;case"select":case"option":break;default:typeof a.onClick=="function"&&(o.onclick=Xw)}o=n,t.updateQueue=o,o!==null&&(t.flags|=4)}else{i=n.nodeType===9?n:n.ownerDocument,e==="http://www.w3.org/1999/xhtml"&&(e=zz(r)),e==="http://www.w3.org/1999/xhtml"?r==="script"?(e=i.createElement("div"),e.innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):typeof o.is=="string"?e=i.createElement(r,{is:o.is}):(e=i.createElement(r),r==="select"&&(i=e,o.multiple?i.multiple=!0:o.size&&(i.size=o.size))):e=i.createElementNS(e,r),e[Vs]=t,e[kv]=o,m7(e,t,!1,!1),t.stateNode=e;e:{switch(i=ET(r,o),r){case"dialog":Dr("cancel",e),Dr("close",e),n=o;break;case"iframe":case"object":case"embed":Dr("load",e),n=o;break;case"video":case"audio":for(n=0;n<Zh.length;n++)Dr(Zh[n],e);n=o;break;case"source":Dr("error",e),n=o;break;case"img":case"image":case"link":Dr("error",e),Dr("load",e),n=o;break;case"details":Dr("toggle",e),n=o;break;case"input":Tj(e,o),n=DT(e,o),Dr("invalid",e);break;case"option":n=o;break;case"select":e._wrapperState={wasMultiple:!!o.multiple},n=$r({},o,{value:void 0}),Dr("invalid",e);break;case"textarea":Ej(e,o),n=NT(e,o),Dr("invalid",e);break;default:n=o}OT(r,n),s=n;for(a in s)if(s.hasOwnProperty(a)){var l=s[a];a==="style"?Kz(e,l):a==="dangerouslySetInnerHTML"?(l=l?l.__html:void 0,l!=null&&qz(e,l)):a==="children"?typeof l=="string"?(r!=="textarea"||l!=="")&&sv(e,l):typeof l=="number"&&sv(e,""+l):a!=="suppressContentEditableWarning"&&a!=="suppressHydrationWarning"&&a!=="autoFocus"&&(iv.hasOwnProperty(a)?l!=null&&a==="onScroll"&&Dr("scroll",e):l!=null&&h2(e,a,l,i))}switch(r){case"input":gw(e),Oj(e,o,!1);break;case"textarea":gw(e),_j(e);break;case"option":o.value!=null&&e.setAttribute("value",""+md(o.value));break;case"select":e.multiple=!!o.multiple,a=o.value,a!=null?ig(e,!!o.multiple,a,!1):o.defaultValue!=null&&ig(e,!!o.multiple,o.defaultValue,!0);break;default:typeof n.onClick=="function"&&(e.onclick=Xw)}switch(r){case"button":case"input":case"select":case"textarea":o=!!o.autoFocus;break e;case"img":o=!0;break e;default:o=!1}}o&&(t.flags|=4)}t.ref!==null&&(t.flags|=512,t.flags|=2097152)}return vn(t),null;case 6:if(e&&t.stateNode!=null)k7(e,t,e.memoizedProps,o);else{if(typeof o!="string"&&t.stateNode===null)throw Error(Ne(166));if(r=cf(hv.current),cf(Ws.current),Iw(t)){if(o=t.stateNode,r=t.memoizedProps,o[Vs]=t,(a=o.nodeValue!==r)&&(e=wa,e!==null))switch(e.tag){case 3:Aw(o.nodeValue,r,(e.mode&1)!==0);break;case 5:e.memoizedProps.suppressHydrationWarning!==!0&&Aw(o.nodeValue,r,(e.mode&1)!==0)}a&&(t.flags|=4)}else o=(r.nodeType===9?r:r.ownerDocument).createTextNode(o),o[Vs]=t,t.stateNode=o}return vn(t),null;case 13:if(Lr(Hr),o=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(Er&&ba!==null&&(t.mode&1)!==0&&(t.flags&128)===0)O6(),mg(),t.flags|=98560,a=!1;else if(a=Iw(t),o!==null&&o.dehydrated!==null){if(e===null){if(!a)throw Error(Ne(318));if(a=t.memoizedState,a=a!==null?a.dehydrated:null,!a)throw Error(Ne(317));a[Vs]=t}else mg(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;vn(t),a=!1}else ts!==null&&(g2(ts),ts=null),a=!0;if(!a)return t.flags&65536?t:null}return(t.flags&128)!==0?(t.lanes=r,t):(o=o!==null,o!==(e!==null&&e.memoizedState!==null)&&o&&(t.child.flags|=8192,(t.mode&1)!==0&&(e===null||(Hr.current&1)!==0?Ao===0&&(Ao=3):eO())),t.updateQueue!==null&&(t.flags|=4),vn(t),null);case 4:return kg(),s2(e,t),e===null&&mv(t.stateNode.containerInfo),vn(t),null;case 10:return F2(t.type._context),vn(t),null;case 17:return ea(t.type)&&Jw(),vn(t),null;case 19:if(Lr(Hr),a=t.memoizedState,a===null)return vn(t),null;if(o=(t.flags&128)!==0,i=a.rendering,i===null)if(o)zh(a,!1);else{if(Ao!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(i=aC(e),i!==null){for(t.flags|=128,zh(a,!1),o=i.updateQueue,o!==null&&(t.updateQueue=o,t.flags|=4),t.subtreeFlags=0,o=r,r=t.child;r!==null;)a=r,e=o,a.flags&=14680066,i=a.alternate,i===null?(a.childLanes=0,a.lanes=e,a.child=null,a.subtreeFlags=0,a.memoizedProps=null,a.memoizedState=null,a.updateQueue=null,a.dependencies=null,a.stateNode=null):(a.childLanes=i.childLanes,a.lanes=i.lanes,a.child=i.child,a.subtreeFlags=0,a.deletions=null,a.memoizedProps=i.memoizedProps,a.memoizedState=i.memoizedState,a.updateQueue=i.updateQueue,a.type=i.type,e=i.dependencies,a.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext}),r=r.sibling;return Pr(Hr,Hr.current&1|2),t.child}e=e.sibling}a.tail!==null&&lo()>hg&&(t.flags|=128,o=!0,zh(a,!1),t.lanes=4194304)}else{if(!o)if(e=aC(i),e!==null){if(t.flags|=128,o=!0,r=e.updateQueue,r!==null&&(t.updateQueue=r,t.flags|=4),zh(a,!0),a.tail===null&&a.tailMode==="hidden"&&!i.alternate&&!Er)return vn(t),null}else 2*lo()-a.renderingStartTime>hg&&r!==1073741824&&(t.flags|=128,o=!0,zh(a,!1),t.lanes=4194304);a.isBackwards?(i.sibling=t.child,t.child=i):(r=a.last,r!==null?r.sibling=i:t.child=i,a.last=i)}return a.tail!==null?(t=a.tail,a.rendering=t,a.tail=t.sibling,a.renderingStartTime=lo(),t.sibling=null,r=Hr.current,Pr(Hr,o?r&1|2:r&1),t):(vn(t),null);case 22:case 23:return Q2(),o=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==o&&(t.flags|=8192),o&&(t.mode&1)!==0?(xa&1073741824)!==0&&(vn(t),t.subtreeFlags&6&&(t.flags|=8192)):vn(t),null;case 24:return null;case 25:return null}throw Error(Ne(156,t.tag))}function DMe(e,t){switch(T2(t),t.tag){case 1:return ea(t.type)&&Jw(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return kg(),Lr(Qn),Lr(xn),G2(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 5:return W2(t),null;case 13:if(Lr(Hr),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(Ne(340));mg()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Lr(Hr),null;case 4:return kg(),null;case 10:return F2(t.type._context),null;case 22:case 23:return Q2(),null;case 24:return null;default:return null}}var Rw=!1,yn=!1,LMe=typeof WeakSet=="function"?WeakSet:Set,$e=null;function ng(e,t){var r=e.ref;if(r!==null)if(typeof r=="function")try{r(null)}catch(o){to(e,t,o)}else r.current=null}function l2(e,t,r){try{r()}catch(o){to(e,t,o)}}var Pz=!1;function RMe(e,t){if(qT=$w,e=x6(),R2(e)){if("selectionStart"in e)var r={start:e.selectionStart,end:e.selectionEnd};else e:{r=(r=e.ownerDocument)&&r.defaultView||window;var o=r.getSelection&&r.getSelection();if(o&&o.rangeCount!==0){r=o.anchorNode;var n=o.anchorOffset,a=o.focusNode;o=o.focusOffset;try{r.nodeType,a.nodeType}catch{r=null;break e}var i=0,s=-1,l=-1,u=0,d=0,c=e,f=null;t:for(;;){for(var p;c!==r||n!==0&&c.nodeType!==3||(s=i+n),c!==a||o!==0&&c.nodeType!==3||(l=i+o),c.nodeType===3&&(i+=c.nodeValue.length),(p=c.firstChild)!==null;)f=c,c=p;for(;;){if(c===e)break t;if(f===r&&++u===n&&(s=i),f===a&&++d===o&&(l=i),(p=c.nextSibling)!==null)break;c=f,f=c.parentNode}c=p}r=s===-1||l===-1?null:{start:s,end:l}}else r=null}r=r||{start:0,end:0}}else r=null;for(HT={focusedElem:e,selectionRange:r},$w=!1,$e=t;$e!==null;)if(t=$e,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,$e=e;else for(;$e!==null;){t=$e;try{var g=t.alternate;if((t.flags&1024)!==0)switch(t.tag){case 0:case 11:case 15:break;case 1:if(g!==null){var m=g.memoizedProps,h=g.memoizedState,k=t.stateNode,M=k.getSnapshotBeforeUpdate(t.elementType===t.type?m:Qi(t.type,m),h);k.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var v=t.stateNode.containerInfo;v.nodeType===1?v.textContent="":v.nodeType===9&&v.documentElement&&v.removeChild(v.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Ne(163))}}catch(b){to(t,t.return,b)}if(e=t.sibling,e!==null){e.return=t.return,$e=e;break}$e=t.return}return g=Pz,Pz=!1,g}function ov(e,t,r){var o=t.updateQueue;if(o=o!==null?o.lastEffect:null,o!==null){var n=o=o.next;do{if((n.tag&e)===e){var a=n.destroy;n.destroy=void 0,a!==void 0&&l2(t,r,a)}n=n.next}while(n!==o)}}function xC(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==null){var r=t=t.next;do{if((r.tag&e)===e){var o=r.create;r.destroy=o()}r=r.next}while(r!==t)}}function u2(e){var t=e.ref;if(t!==null){var r=e.stateNode;e.tag,e=r,typeof t=="function"?t(e):t.current=e}}function M7(e){var t=e.alternate;t!==null&&(e.alternate=null,M7(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Vs],delete t[kv],delete t[YT],delete t[pMe],delete t[mMe])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function h7(e){return e.tag===5||e.tag===3||e.tag===4}function Az(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||h7(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function d2(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.nodeType===8?r.parentNode.insertBefore(e,t):r.insertBefore(e,t):(r.nodeType===8?(t=r.parentNode,t.insertBefore(e,r)):(t=r,t.appendChild(e)),r=r._reactRootContainer,r!=null||t.onclick!==null||(t.onclick=Xw));else if(o!==4&&(e=e.child,e!==null))for(d2(e,t,r),e=e.sibling;e!==null;)d2(e,t,r),e=e.sibling}function c2(e,t,r){var o=e.tag;if(o===5||o===6)e=e.stateNode,t?r.insertBefore(e,t):r.appendChild(e);else if(o!==4&&(e=e.child,e!==null))for(c2(e,t,r),e=e.sibling;e!==null;)c2(e,t,r),e=e.sibling}var rn=null,es=!1;function Qu(e,t,r){for(r=r.child;r!==null;)v7(e,t,r),r=r.sibling}function v7(e,t,r){if(Us&&typeof Us.onCommitFiberUnmount=="function")try{Us.onCommitFiberUnmount(pC,r)}catch{}switch(r.tag){case 5:yn||ng(r,t);case 6:var o=rn,n=es;rn=null,Qu(e,t,r),rn=o,es=n,rn!==null&&(es?(e=rn,r=r.stateNode,e.nodeType===8?e.parentNode.removeChild(r):e.removeChild(r)):rn.removeChild(r.stateNode));break;case 18:rn!==null&&(es?(e=rn,r=r.stateNode,e.nodeType===8?mT(e.parentNode,r):e.nodeType===1&&mT(e,r),cv(e)):mT(rn,r.stateNode));break;case 4:o=rn,n=es,rn=r.stateNode.containerInfo,es=!0,Qu(e,t,r),rn=o,es=n;break;case 0:case 11:case 14:case 15:if(!yn&&(o=r.updateQueue,o!==null&&(o=o.lastEffect,o!==null))){n=o=o.next;do{var a=n,i=a.destroy;a=a.tag,i!==void 0&&((a&2)!==0||(a&4)!==0)&&l2(r,t,i),n=n.next}while(n!==o)}Qu(e,t,r);break;case 1:if(!yn&&(ng(r,t),o=r.stateNode,typeof o.componentWillUnmount=="function"))try{o.props=r.memoizedProps,o.state=r.memoizedState,o.componentWillUnmount()}catch(s){to(r,t,s)}Qu(e,t,r);break;case 21:Qu(e,t,r);break;case 22:r.mode&1?(yn=(o=yn)||r.memoizedState!==null,Qu(e,t,r),yn=o):Qu(e,t,r);break;default:Qu(e,t,r)}}function Iz(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var r=e.stateNode;r===null&&(r=e.stateNode=new LMe),t.forEach(function(o){var n=UMe.bind(null,e,o);r.has(o)||(r.add(o),o.then(n,n))})}}function Ji(e,t){var r=t.deletions;if(r!==null)for(var o=0;o<r.length;o++){var n=r[o];try{var a=e,i=t,s=i;e:for(;s!==null;){switch(s.tag){case 5:rn=s.stateNode,es=!1;break e;case 3:rn=s.stateNode.containerInfo,es=!0;break e;case 4:rn=s.stateNode.containerInfo,es=!0;break e}s=s.return}if(rn===null)throw Error(Ne(160));v7(a,i,n),rn=null,es=!1;var l=n.alternate;l!==null&&(l.return=null),n.return=null}catch(u){to(n,t,u)}}if(t.subtreeFlags&12854)for(t=t.child;t!==null;)y7(t,e),t=t.sibling}function y7(e,t){var r=e.alternate,o=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(Ji(t,e),Fs(e),o&4){try{ov(3,e,e.return),xC(3,e)}catch(m){to(e,e.return,m)}try{ov(5,e,e.return)}catch(m){to(e,e.return,m)}}break;case 1:Ji(t,e),Fs(e),o&512&&r!==null&&ng(r,r.return);break;case 5:if(Ji(t,e),Fs(e),o&512&&r!==null&&ng(r,r.return),e.flags&32){var n=e.stateNode;try{sv(n,"")}catch(m){to(e,e.return,m)}}if(o&4&&(n=e.stateNode,n!=null)){var a=e.memoizedProps,i=r!==null?r.memoizedProps:a,s=e.type,l=e.updateQueue;if(e.updateQueue=null,l!==null)try{s==="input"&&a.type==="radio"&&a.name!=null&&Gz(n,a),ET(s,i);var u=ET(s,a);for(i=0;i<l.length;i+=2){var d=l[i],c=l[i+1];d==="style"?Kz(n,c):d==="dangerouslySetInnerHTML"?qz(n,c):d==="children"?sv(n,c):h2(n,d,c,u)}switch(s){case"input":LT(n,a);break;case"textarea":jz(n,a);break;case"select":var f=n._wrapperState.wasMultiple;n._wrapperState.wasMultiple=!!a.multiple;var p=a.value;p!=null?ig(n,!!a.multiple,p,!1):f!==!!a.multiple&&(a.defaultValue!=null?ig(n,!!a.multiple,a.defaultValue,!0):ig(n,!!a.multiple,a.multiple?[]:"",!1))}n[kv]=a}catch(m){to(e,e.return,m)}}break;case 6:if(Ji(t,e),Fs(e),o&4){if(e.stateNode===null)throw Error(Ne(162));n=e.stateNode,a=e.memoizedProps;try{n.nodeValue=a}catch(m){to(e,e.return,m)}}break;case 3:if(Ji(t,e),Fs(e),o&4&&r!==null&&r.memoizedState.isDehydrated)try{cv(t.containerInfo)}catch(m){to(e,e.return,m)}break;case 4:Ji(t,e),Fs(e);break;case 13:Ji(t,e),Fs(e),n=e.child,n.flags&8192&&(a=n.memoizedState!==null,n.stateNode.isHidden=a,!a||n.alternate!==null&&n.alternate.memoizedState!==null||(X2=lo())),o&4&&Iz(e);break;case 22:if(d=r!==null&&r.memoizedState!==null,e.mode&1?(yn=(u=yn)||d,Ji(t,e),yn=u):Ji(t,e),Fs(e),o&8192){if(u=e.memoizedState!==null,(e.stateNode.isHidden=u)&&!d&&(e.mode&1)!==0)for($e=e,d=e.child;d!==null;){for(c=$e=d;$e!==null;){switch(f=$e,p=f.child,f.tag){case 0:case 11:case 14:case 15:ov(4,f,f.return);break;case 1:ng(f,f.return);var g=f.stateNode;if(typeof g.componentWillUnmount=="function"){o=f,r=f.return;try{t=o,g.props=t.memoizedProps,g.state=t.memoizedState,g.componentWillUnmount()}catch(m){to(o,r,m)}}break;case 5:ng(f,f.return);break;case 22:if(f.memoizedState!==null){Lz(c);continue}}p!==null?(p.return=f,$e=p):Lz(c)}d=d.sibling}e:for(d=null,c=e;;){if(c.tag===5){if(d===null){d=c;try{n=c.stateNode,u?(a=n.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none"):(s=c.stateNode,l=c.memoizedProps.style,i=l!=null&&l.hasOwnProperty("display")?l.display:null,s.style.display=Hz("display",i))}catch(m){to(e,e.return,m)}}}else if(c.tag===6){if(d===null)try{c.stateNode.nodeValue=u?"":c.memoizedProps}catch(m){to(e,e.return,m)}}else if((c.tag!==22&&c.tag!==23||c.memoizedState===null||c===e)&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===e)break e;for(;c.sibling===null;){if(c.return===null||c.return===e)break e;d===c&&(d=null),c=c.return}d===c&&(d=null),c.sibling.return=c.return,c=c.sibling}}break;case 19:Ji(t,e),Fs(e),o&4&&Iz(e);break;case 21:break;default:Ji(t,e),Fs(e)}}function Fs(e){var t=e.flags;if(t&2){try{e:{for(var r=e.return;r!==null;){if(h7(r)){var o=r;break e}r=r.return}throw Error(Ne(160))}switch(o.tag){case 5:var n=o.stateNode;o.flags&32&&(sv(n,""),o.flags&=-33);var a=Az(e);c2(e,a,n);break;case 3:case 4:var i=o.stateNode.containerInfo,s=Az(e);d2(e,s,i);break;default:throw Error(Ne(161))}}catch(l){to(e,e.return,l)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function NMe(e,t,r){$e=e,x7(e,t,r)}function x7(e,t,r){for(var o=(e.mode&1)!==0;$e!==null;){var n=$e,a=n.child;if(n.tag===22&&o){var i=n.memoizedState!==null||Rw;if(!i){var s=n.alternate,l=s!==null&&s.memoizedState!==null||yn;s=Rw;var u=yn;if(Rw=i,(yn=l)&&!u)for($e=n;$e!==null;)i=$e,l=i.child,i.tag===22&&i.memoizedState!==null?Rz(n):l!==null?(l.return=i,$e=l):Rz(n);for(;a!==null;)$e=a,x7(a,t,r),a=a.sibling;$e=n,Rw=s,yn=u}Dz(e,t,r)}else(n.subtreeFlags&8772)!==0&&a!==null?(a.return=n,$e=a):Dz(e,t,r)}}function Dz(e){for(;$e!==null;){var t=$e;if((t.flags&8772)!==0){var r=t.alternate;try{if((t.flags&8772)!==0)switch(t.tag){case 0:case 11:case 15:yn||xC(5,t);break;case 1:var o=t.stateNode;if(t.flags&4&&!yn)if(r===null)o.componentDidMount();else{var n=t.elementType===t.type?r.memoizedProps:Qi(t.type,r.memoizedProps);o.componentDidUpdate(n,r.memoizedState,o.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;a!==null&&pz(t,a,o);break;case 3:var i=t.updateQueue;if(i!==null){if(r=null,t.child!==null)switch(t.child.tag){case 5:r=t.child.stateNode;break;case 1:r=t.child.stateNode}pz(t,i,r)}break;case 5:var s=t.stateNode;if(r===null&&t.flags&4){r=s;var l=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":l.autoFocus&&r.focus();break;case"img":l.src&&(r.src=l.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(t.memoizedState===null){var u=t.alternate;if(u!==null){var d=u.memoizedState;if(d!==null){var c=d.dehydrated;c!==null&&cv(c)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(Ne(163))}yn||t.flags&512&&u2(t)}catch(f){to(t,t.return,f)}}if(t===e){$e=null;break}if(r=t.sibling,r!==null){r.return=t.return,$e=r;break}$e=t.return}}function Lz(e){for(;$e!==null;){var t=$e;if(t===e){$e=null;break}var r=t.sibling;if(r!==null){r.return=t.return,$e=r;break}$e=t.return}}function Rz(e){for(;$e!==null;){var t=$e;try{switch(t.tag){case 0:case 11:case 15:var r=t.return;try{xC(4,t)}catch(l){to(t,r,l)}break;case 1:var o=t.stateNode;if(typeof o.componentDidMount=="function"){var n=t.return;try{o.componentDidMount()}catch(l){to(t,n,l)}}var a=t.return;try{u2(t)}catch(l){to(t,a,l)}break;case 5:var i=t.return;try{u2(t)}catch(l){to(t,i,l)}}}catch(l){to(t,t.return,l)}if(t===e){$e=null;break}var s=t.sibling;if(s!==null){s.return=t.return,$e=s;break}$e=t.return}}var TMe=Math.ceil,lC=Wl.ReactCurrentDispatcher,Y2=Wl.ReactCurrentOwner,di=Wl.ReactCurrentBatchConfig,Zt=0,Uo=null,xo=null,on=0,xa=0,ag=Md(0),Ao=0,bv=null,Mf=0,bC=0,Z2=0,nv=null,Xn=null,X2=0,hg=1/0,Nl=null,uC=!1,f2=null,cd=null,Nw=!1,ad=null,dC=0,av=0,p2=null,Uw=-1,Ww=0;function Fn(){return(Zt&6)!==0?lo():Uw!==-1?Uw:Uw=lo()}function fd(e){return(e.mode&1)===0?1:(Zt&2)!==0&&on!==0?on&-on:kMe.transition!==null?(Ww===0&&(Ww=a6()),Ww):(e=ur,e!==0||(e=window.event,e=e===void 0?16:f6(e.type)),e)}function os(e,t,r,o){if(50<av)throw av=0,p2=null,Error(Ne(185));wv(e,r,o),((Zt&2)===0||e!==Uo)&&(e===Uo&&((Zt&2)===0&&(bC|=r),Ao===4&&od(e,on)),ta(e,o),r===1&&Zt===0&&(t.mode&1)===0&&(hg=lo()+500,hC&&hd()))}function ta(e,t){var r=e.callbackNode;hke(e,t);var o=Kw(e,e===Uo?on:0);if(o===0)r!==null&&Vj(r),e.callbackNode=null,e.callbackPriority=0;else if(t=o&-o,e.callbackPriority!==t){if(r!=null&&Vj(r),t===1)e.tag===0?gMe(Nz.bind(null,e)):R6(Nz.bind(null,e)),cMe(function(){(Zt&6)===0&&hd()}),r=null;else{switch(i6(o)){case 1:r=w2;break;case 4:r=o6;break;case 16:r=Hw;break;case 536870912:r=n6;break;default:r=Hw}r=D7(r,b7.bind(null,e))}e.callbackPriority=t,e.callbackNode=r}}function b7(e,t){if(Uw=-1,Ww=0,(Zt&6)!==0)throw Error(Ne(327));var r=e.callbackNode;if(cg()&&e.callbackNode!==r)return null;var o=Kw(e,e===Uo?on:0);if(o===0)return null;if((o&30)!==0||(o&e.expiredLanes)!==0||t)t=cC(e,o);else{t=o;var n=Zt;Zt|=2;var a=C7();(Uo!==e||on!==t)&&(Nl=null,hg=lo()+500,ff(e,t));do try{_Me();break}catch(s){w7(e,s)}while(!0);_2(),lC.current=a,Zt=n,xo!==null?t=0:(Uo=null,on=0,t=Ao)}if(t!==0){if(t===2&&(n=UT(e),n!==0&&(o=n,t=m2(e,n))),t===1)throw r=bv,ff(e,0),od(e,o),ta(e,lo()),r;if(t===6)od(e,o);else{if(n=e.current.alternate,(o&30)===0&&!OMe(n)&&(t=cC(e,o),t===2&&(a=UT(e),a!==0&&(o=a,t=m2(e,a))),t===1))throw r=bv,ff(e,0),od(e,o),ta(e,lo()),r;switch(e.finishedWork=n,e.finishedLanes=o,t){case 0:case 1:throw Error(Ne(345));case 2:lf(e,Xn,Nl);break;case 3:if(od(e,o),(o&130023424)===o&&(t=X2+500-lo(),10<t)){if(Kw(e,0)!==0)break;if(n=e.suspendedLanes,(n&o)!==o){Fn(),e.pingedLanes|=e.suspendedLanes&n;break}e.timeoutHandle=$T(lf.bind(null,e,Xn,Nl),t);break}lf(e,Xn,Nl);break;case 4:if(od(e,o),(o&4194240)===o)break;for(t=e.eventTimes,n=-1;0<o;){var i=31-rs(o);a=1<<i,i=t[i],i>n&&(n=i),o&=~a}if(o=n,o=lo()-o,o=(120>o?120:480>o?480:1080>o?1080:1920>o?1920:3e3>o?3e3:4320>o?4320:1960*TMe(o/1960))-o,10<o){e.timeoutHandle=$T(lf.bind(null,e,Xn,Nl),o);break}lf(e,Xn,Nl);break;case 5:lf(e,Xn,Nl);break;default:throw Error(Ne(329))}}}return ta(e,lo()),e.callbackNode===r?b7.bind(null,e):null}function m2(e,t){var r=nv;return e.current.memoizedState.isDehydrated&&(ff(e,t).flags|=256),e=cC(e,t),e!==2&&(t=Xn,Xn=r,t!==null&&g2(t)),e}function g2(e){Xn===null?Xn=e:Xn.push.apply(Xn,e)}function OMe(e){for(var t=e;;){if(t.flags&16384){var r=t.updateQueue;if(r!==null&&(r=r.stores,r!==null))for(var o=0;o<r.length;o++){var n=r[o],a=n.getSnapshot;n=n.value;try{if(!ns(a(),n))return!1}catch{return!1}}}if(r=t.child,t.subtreeFlags&16384&&r!==null)r.return=t,t=r;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function od(e,t){for(t&=~Z2,t&=~bC,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var r=31-rs(t),o=1<<r;e[r]=-1,t&=~o}}function Nz(e){if((Zt&6)!==0)throw Error(Ne(327));cg();var t=Kw(e,0);if((t&1)===0)return ta(e,lo()),null;var r=cC(e,t);if(e.tag!==0&&r===2){var o=UT(e);o!==0&&(t=o,r=m2(e,o))}if(r===1)throw r=bv,ff(e,0),od(e,t),ta(e,lo()),r;if(r===6)throw Error(Ne(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,lf(e,Xn,Nl),ta(e,lo()),null}function J2(e,t){var r=Zt;Zt|=1;try{return e(t)}finally{Zt=r,Zt===0&&(hg=lo()+500,hC&&hd())}}function hf(e){ad!==null&&ad.tag===0&&(Zt&6)===0&&cg();var t=Zt;Zt|=1;var r=di.transition,o=ur;try{if(di.transition=null,ur=1,e)return e()}finally{ur=o,di.transition=r,Zt=t,(Zt&6)===0&&hd()}}function Q2(){xa=ag.current,Lr(ag)}function ff(e,t){e.finishedWork=null,e.finishedLanes=0;var r=e.timeoutHandle;if(r!==-1&&(e.timeoutHandle=-1,dMe(r)),xo!==null)for(r=xo.return;r!==null;){var o=r;switch(T2(o),o.tag){case 1:o=o.type.childContextTypes,o!=null&&Jw();break;case 3:kg(),Lr(Qn),Lr(xn),G2();break;case 5:W2(o);break;case 4:kg();break;case 13:Lr(Hr);break;case 19:Lr(Hr);break;case 10:F2(o.type._context);break;case 22:case 23:Q2()}r=r.return}if(Uo=e,xo=e=pd(e.current,null),on=xa=t,Ao=0,bv=null,Z2=bC=Mf=0,Xn=nv=null,df!==null){for(t=0;t<df.length;t++)if(r=df[t],o=r.interleaved,o!==null){r.interleaved=null;var n=o.next,a=r.pending;if(a!==null){var i=a.next;a.next=n,o.next=i}r.pending=o}df=null}return e}function w7(e,t){do{var r=xo;try{if(_2(),Fw.current=sC,iC){for(var o=Kr.memoizedState;o!==null;){var n=o.queue;n!==null&&(n.pending=null),o=o.next}iC=!1}if(kf=0,Vo=Po=Kr=null,rv=!1,vv=0,Y2.current=null,r===null||r.return===null){Ao=1,bv=t,xo=null;break}e:{var a=e,i=r.return,s=r,l=t;if(t=on,s.flags|=32768,l!==null&&typeof l=="object"&&typeof l.then=="function"){var u=l,d=s,c=d.tag;if((d.mode&1)===0&&(c===0||c===11||c===15)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=vz(i);if(p!==null){p.flags&=-257,yz(p,i,s,a,t),p.mode&1&&hz(a,u,t),t=p,l=u;var g=t.updateQueue;if(g===null){var m=new Set;m.add(l),t.updateQueue=m}else g.add(l);break e}else{if((t&1)===0){hz(a,u,t),eO();break e}l=Error(Ne(426))}}else if(Er&&s.mode&1){var h=vz(i);if(h!==null){(h.flags&65536)===0&&(h.flags|=256),yz(h,i,s,a,t),O2(Mg(l,s));break e}}a=l=Mg(l,s),Ao!==4&&(Ao=2),nv===null?nv=[a]:nv.push(a),a=i;do{switch(a.tag){case 3:a.flags|=65536,t&=-t,a.lanes|=t;var k=i7(a,l,t);fz(a,k);break e;case 1:s=l;var M=a.type,v=a.stateNode;if((a.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||v!==null&&typeof v.componentDidCatch=="function"&&(cd===null||!cd.has(v)))){a.flags|=65536,t&=-t,a.lanes|=t;var b=s7(a,s,t);fz(a,b);break e}}a=a.return}while(a!==null)}P7(r)}catch(w){t=w,xo===r&&r!==null&&(xo=r=r.return);continue}break}while(!0)}function C7(){var e=lC.current;return lC.current=sC,e===null?sC:e}function eO(){(Ao===0||Ao===3||Ao===2)&&(Ao=4),Uo===null||(Mf&268435455)===0&&(bC&268435455)===0||od(Uo,on)}function cC(e,t){var r=Zt;Zt|=2;var o=C7();(Uo!==e||on!==t)&&(Nl=null,ff(e,t));do try{EMe();break}catch(n){w7(e,n)}while(!0);if(_2(),Zt=r,lC.current=o,xo!==null)throw Error(Ne(261));return Uo=null,on=0,Ao}function EMe(){for(;xo!==null;)S7(xo)}function _Me(){for(;xo!==null&&!uke();)S7(xo)}function S7(e){var t=I7(e.alternate,e,xa);e.memoizedProps=e.pendingProps,t===null?P7(e):xo=t,Y2.current=null}function P7(e){var t=e;do{var r=t.alternate;if(e=t.return,(t.flags&32768)===0){if(r=IMe(r,t,xa),r!==null){xo=r;return}}else{if(r=DMe(r,t),r!==null){r.flags&=32767,xo=r;return}if(e!==null)e.flags|=32768,e.subtreeFlags=0,e.deletions=null;else{Ao=6,xo=null;return}}if(t=t.sibling,t!==null){xo=t;return}xo=t=e}while(t!==null);Ao===0&&(Ao=5)}function lf(e,t,r){var o=ur,n=di.transition;try{di.transition=null,ur=1,FMe(e,t,r,o)}finally{di.transition=n,ur=o}return null}function FMe(e,t,r,o){do cg();while(ad!==null);if((Zt&6)!==0)throw Error(Ne(327));r=e.finishedWork;var n=e.finishedLanes;if(r===null)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(Ne(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(vke(e,a),e===Uo&&(xo=Uo=null,on=0),(r.subtreeFlags&2064)===0&&(r.flags&2064)===0||Nw||(Nw=!0,D7(Hw,function(){return cg(),null})),a=(r.flags&15990)!==0,(r.subtreeFlags&15990)!==0||a){a=di.transition,di.transition=null;var i=ur;ur=1;var s=Zt;Zt|=4,Y2.current=null,RMe(e,r),y7(r,e),aMe(HT),$w=!!qT,HT=qT=null,e.current=r,NMe(r,e,n),dke(),Zt=s,ur=i,di.transition=a}else e.current=r;if(Nw&&(Nw=!1,ad=e,dC=n),a=e.pendingLanes,a===0&&(cd=null),pke(r.stateNode,o),ta(e,lo()),t!==null)for(o=e.onRecoverableError,r=0;r<t.length;r++)n=t[r],o(n.value,{componentStack:n.stack,digest:n.digest});if(uC)throw uC=!1,e=f2,f2=null,e;return(dC&1)!==0&&e.tag!==0&&cg(),a=e.pendingLanes,(a&1)!==0?e===p2?av++:(av=0,p2=e):av=0,hd(),null}function cg(){if(ad!==null){var e=i6(dC),t=di.transition,r=ur;try{if(di.transition=null,ur=16>e?16:e,ad===null)var o=!1;else{if(e=ad,ad=null,dC=0,(Zt&6)!==0)throw Error(Ne(331));var n=Zt;for(Zt|=4,$e=e.current;$e!==null;){var a=$e,i=a.child;if(($e.flags&16)!==0){var s=a.deletions;if(s!==null){for(var l=0;l<s.length;l++){var u=s[l];for($e=u;$e!==null;){var d=$e;switch(d.tag){case 0:case 11:case 15:ov(8,d,a)}var c=d.child;if(c!==null)c.return=d,$e=c;else for(;$e!==null;){d=$e;var f=d.sibling,p=d.return;if(M7(d),d===u){$e=null;break}if(f!==null){f.return=p,$e=f;break}$e=p}}}var g=a.alternate;if(g!==null){var m=g.child;if(m!==null){g.child=null;do{var h=m.sibling;m.sibling=null,m=h}while(m!==null)}}$e=a}}if((a.subtreeFlags&2064)!==0&&i!==null)i.return=a,$e=i;else e:for(;$e!==null;){if(a=$e,(a.flags&2048)!==0)switch(a.tag){case 0:case 11:case 15:ov(9,a,a.return)}var k=a.sibling;if(k!==null){k.return=a.return,$e=k;break e}$e=a.return}}var M=e.current;for($e=M;$e!==null;){i=$e;var v=i.child;if((i.subtreeFlags&2064)!==0&&v!==null)v.return=i,$e=v;else e:for(i=M;$e!==null;){if(s=$e,(s.flags&2048)!==0)try{switch(s.tag){case 0:case 11:case 15:xC(9,s)}}catch(w){to(s,s.return,w)}if(s===i){$e=null;break e}var b=s.sibling;if(b!==null){b.return=s.return,$e=b;break e}$e=s.return}}if(Zt=n,hd(),Us&&typeof Us.onPostCommitFiberRoot=="function")try{Us.onPostCommitFiberRoot(pC,e)}catch{}o=!0}return o}finally{ur=r,di.transition=t}}return!1}function Tz(e,t,r){t=Mg(r,t),t=i7(e,t,1),e=dd(e,t,1),t=Fn(),e!==null&&(wv(e,1,t),ta(e,t))}function to(e,t,r){if(e.tag===3)Tz(e,e,r);else for(;t!==null;){if(t.tag===3){Tz(t,e,r);break}else if(t.tag===1){var o=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof o.componentDidCatch=="function"&&(cd===null||!cd.has(o))){e=Mg(r,e),e=s7(t,e,1),t=dd(t,e,1),e=Fn(),t!==null&&(wv(t,1,e),ta(t,e));break}}t=t.return}}function BMe(e,t,r){var o=e.pingCache;o!==null&&o.delete(t),t=Fn(),e.pingedLanes|=e.suspendedLanes&r,Uo===e&&(on&r)===r&&(Ao===4||Ao===3&&(on&130023424)===on&&500>lo()-X2?ff(e,0):Z2|=r),ta(e,t)}function A7(e,t){t===0&&((e.mode&1)===0?t=1:(t=hw,hw<<=1,(hw&130023424)===0&&(hw=4194304)));var r=Fn();e=Vl(e,t),e!==null&&(wv(e,t,r),ta(e,r))}function VMe(e){var t=e.memoizedState,r=0;t!==null&&(r=t.retryLane),A7(e,r)}function UMe(e,t){var r=0;switch(e.tag){case 13:var o=e.stateNode,n=e.memoizedState;n!==null&&(r=n.retryLane);break;case 19:o=e.stateNode;break;default:throw Error(Ne(314))}o!==null&&o.delete(t),A7(e,r)}var I7;I7=function(e,t,r){if(e!==null)if(e.memoizedProps!==t.pendingProps||Qn.current)Jn=!0;else{if((e.lanes&r)===0&&(t.flags&128)===0)return Jn=!1,AMe(e,t,r);Jn=(e.flags&131072)!==0}else Jn=!1,Er&&(t.flags&1048576)!==0&&N6(t,tC,t.index);switch(t.lanes=0,t.tag){case 2:var o=t.type;Vw(e,t),e=t.pendingProps;var n=pg(t,xn.current);dg(t,r),n=z2(null,t,o,e,n,r);var a=q2();return t.flags|=1,typeof n=="object"&&n!==null&&typeof n.render=="function"&&n.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,ea(o)?(a=!0,Qw(t)):a=!1,t.memoizedState=n.state!==null&&n.state!==void 0?n.state:null,V2(t),n.updater=yC,t.stateNode=n,n._reactInternals=t,t2(t,o,e,r),t=n2(null,t,o,!0,a,r)):(t.tag=0,Er&&a&&N2(t),_n(null,t,n,r),t=t.child),t;case 16:o=t.elementType;e:{switch(Vw(e,t),e=t.pendingProps,n=o._init,o=n(o._payload),t.type=o,n=t.tag=GMe(o),e=Qi(o,e),n){case 0:t=o2(null,t,o,e,r);break e;case 1:t=wz(null,t,o,e,r);break e;case 11:t=xz(null,t,o,e,r);break e;case 14:t=bz(null,t,o,Qi(o.type,e),r);break e}throw Error(Ne(306,o,""))}return t;case 0:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Qi(o,n),o2(e,t,o,n,r);case 1:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Qi(o,n),wz(e,t,o,n,r);case 3:e:{if(c7(t),e===null)throw Error(Ne(387));o=t.pendingProps,a=t.memoizedState,n=a.element,B6(e,t),nC(t,o,null,r);var i=t.memoizedState;if(o=i.element,a.isDehydrated)if(a={element:o,isDehydrated:!1,cache:i.cache,pendingSuspenseBoundaries:i.pendingSuspenseBoundaries,transitions:i.transitions},t.updateQueue.baseState=a,t.memoizedState=a,t.flags&256){n=Mg(Error(Ne(423)),t),t=Cz(e,t,o,r,n);break e}else if(o!==n){n=Mg(Error(Ne(424)),t),t=Cz(e,t,o,r,n);break e}else for(ba=ud(t.stateNode.containerInfo.firstChild),wa=t,Er=!0,ts=null,r=_6(t,null,o,r),t.child=r;r;)r.flags=r.flags&-3|4096,r=r.sibling;else{if(mg(),o===n){t=Ul(e,t,r);break e}_n(e,t,o,r)}t=t.child}return t;case 5:return V6(t),e===null&&JT(t),o=t.type,n=t.pendingProps,a=e!==null?e.memoizedProps:null,i=n.children,KT(o,n)?i=null:a!==null&&KT(o,a)&&(t.flags|=32),d7(e,t),_n(e,t,i,r),t.child;case 6:return e===null&&JT(t),null;case 13:return f7(e,t,r);case 4:return U2(t,t.stateNode.containerInfo),o=t.pendingProps,e===null?t.child=gg(t,null,o,r):_n(e,t,o,r),t.child;case 11:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Qi(o,n),xz(e,t,o,n,r);case 7:return _n(e,t,t.pendingProps,r),t.child;case 8:return _n(e,t,t.pendingProps.children,r),t.child;case 12:return _n(e,t,t.pendingProps.children,r),t.child;case 10:e:{if(o=t.type._context,n=t.pendingProps,a=t.memoizedProps,i=n.value,Pr(rC,o._currentValue),o._currentValue=i,a!==null)if(ns(a.value,i)){if(a.children===n.children&&!Qn.current){t=Ul(e,t,r);break e}}else for(a=t.child,a!==null&&(a.return=t);a!==null;){var s=a.dependencies;if(s!==null){i=a.child;for(var l=s.firstContext;l!==null;){if(l.context===o){if(a.tag===1){l=_l(-1,r&-r),l.tag=2;var u=a.updateQueue;if(u!==null){u=u.shared;var d=u.pending;d===null?l.next=l:(l.next=d.next,d.next=l),u.pending=l}}a.lanes|=r,l=a.alternate,l!==null&&(l.lanes|=r),QT(a.return,r,t),s.lanes|=r;break}l=l.next}}else if(a.tag===10)i=a.type===t.type?null:a.child;else if(a.tag===18){if(i=a.return,i===null)throw Error(Ne(341));i.lanes|=r,s=i.alternate,s!==null&&(s.lanes|=r),QT(i,r,t),i=a.sibling}else i=a.child;if(i!==null)i.return=a;else for(i=a;i!==null;){if(i===t){i=null;break}if(a=i.sibling,a!==null){a.return=i.return,i=a;break}i=i.return}a=i}_n(e,t,n.children,r),t=t.child}return t;case 9:return n=t.type,o=t.pendingProps.children,dg(t,r),n=ci(n),o=o(n),t.flags|=1,_n(e,t,o,r),t.child;case 14:return o=t.type,n=Qi(o,t.pendingProps),n=Qi(o.type,n),bz(e,t,o,n,r);case 15:return l7(e,t,t.type,t.pendingProps,r);case 17:return o=t.type,n=t.pendingProps,n=t.elementType===o?n:Qi(o,n),Vw(e,t),t.tag=1,ea(o)?(e=!0,Qw(t)):e=!1,dg(t,r),a7(t,o,n),t2(t,o,n,r),n2(null,t,o,!0,e,r);case 19:return p7(e,t,r);case 22:return u7(e,t,r)}throw Error(Ne(156,t.tag))};function D7(e,t){return r6(e,t)}function WMe(e,t,r,o){this.tag=e,this.key=r,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=o,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ui(e,t,r,o){return new WMe(e,t,r,o)}function tO(e){return e=e.prototype,!(!e||!e.isReactComponent)}function GMe(e){if(typeof e=="function")return tO(e)?1:0;if(e!=null){if(e=e.$$typeof,e===y2)return 11;if(e===x2)return 14}return 2}function pd(e,t){var r=e.alternate;return r===null?(r=ui(e.tag,t,e.key,e.mode),r.elementType=e.elementType,r.type=e.type,r.stateNode=e.stateNode,r.alternate=e,e.alternate=r):(r.pendingProps=t,r.type=e.type,r.flags=0,r.subtreeFlags=0,r.deletions=null),r.flags=e.flags&14680064,r.childLanes=e.childLanes,r.lanes=e.lanes,r.child=e.child,r.memoizedProps=e.memoizedProps,r.memoizedState=e.memoizedState,r.updateQueue=e.updateQueue,t=e.dependencies,r.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},r.sibling=e.sibling,r.index=e.index,r.ref=e.ref,r}function Gw(e,t,r,o,n,a){var i=2;if(o=e,typeof e=="function")tO(e)&&(i=1);else if(typeof e=="string")i=5;else e:switch(e){case Ym:return pf(r.children,n,a,t);case v2:i=8,n|=8;break;case ST:return e=ui(12,r,t,n|2),e.elementType=ST,e.lanes=a,e;case PT:return e=ui(13,r,t,n),e.elementType=PT,e.lanes=a,e;case AT:return e=ui(19,r,t,n),e.elementType=AT,e.lanes=a,e;case Vz:return wC(r,n,a,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Fz:i=10;break e;case Bz:i=9;break e;case y2:i=11;break e;case x2:i=14;break e;case ed:i=16,o=null;break e}throw Error(Ne(130,e==null?e:typeof e,""))}return t=ui(i,r,t,n),t.elementType=e,t.type=o,t.lanes=a,t}function pf(e,t,r,o){return e=ui(7,e,o,t),e.lanes=r,e}function wC(e,t,r,o){return e=ui(22,e,o,t),e.elementType=Vz,e.lanes=r,e.stateNode={isHidden:!1},e}function bT(e,t,r){return e=ui(6,e,null,t),e.lanes=r,e}function wT(e,t,r){return t=ui(4,e.children!==null?e.children:[],e.key,t),t.lanes=r,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function jMe(e,t,r,o,n){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=iT(0),this.expirationTimes=iT(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=iT(0),this.identifierPrefix=o,this.onRecoverableError=n,this.mutableSourceEagerHydrationData=null}function rO(e,t,r,o,n,a,i,s,l){return e=new jMe(e,t,r,s,l),t===1?(t=1,a===!0&&(t|=8)):t=0,a=ui(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:o,isDehydrated:r,cache:null,transitions:null,pendingSuspenseBoundaries:null},V2(a),e}function zMe(e,t,r){var o=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:$m,key:o==null?null:""+o,children:e,containerInfo:t,implementation:r}}function L7(e){if(!e)return gd;e=e._reactInternals;e:{if(yf(e)!==e||e.tag!==1)throw Error(Ne(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(ea(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(t!==null);throw Error(Ne(171))}if(e.tag===1){var r=e.type;if(ea(r))return L6(e,r,t)}return t}function R7(e,t,r,o,n,a,i,s,l){return e=rO(r,o,!0,e,n,a,i,s,l),e.context=L7(null),r=e.current,o=Fn(),n=fd(r),a=_l(o,n),a.callback=t??null,dd(r,a,n),e.current.lanes=n,wv(e,n,o),ta(e,o),e}function CC(e,t,r,o){var n=t.current,a=Fn(),i=fd(n);return r=L7(r),t.context===null?t.context=r:t.pendingContext=r,t=_l(a,i),t.payload={element:e},o=o===void 0?null:o,o!==null&&(t.callback=o),e=dd(n,t,i),e!==null&&(os(e,n,i,a),_w(e,n,i)),i}function fC(e){return e=e.current,e.child?(e.child.tag===5,e.child.stateNode):null}function Oz(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var r=e.retryLane;e.retryLane=r!==0&&r<t?r:t}}function oO(e,t){Oz(e,t),(e=e.alternate)&&Oz(e,t)}function qMe(){return null}var N7=typeof reportError=="function"?reportError:function(e){console.error(e)};function nO(e){this._internalRoot=e}SC.prototype.render=nO.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(Ne(409));CC(e,t,null,null)};SC.prototype.unmount=nO.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;hf(function(){CC(null,e,null,null)}),t[Bl]=null}};function SC(e){this._internalRoot=e}SC.prototype.unstable_scheduleHydration=function(e){if(e){var t=u6();e={blockedOn:null,target:e,priority:t};for(var r=0;r<rd.length&&t!==0&&t<rd[r].priority;r++);rd.splice(r,0,e),r===0&&c6(e)}};function aO(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function PC(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11&&(e.nodeType!==8||e.nodeValue!==" react-mount-point-unstable "))}function Ez(){}function HMe(e,t,r,o,n){if(n){if(typeof o=="function"){var a=o;o=function(){var u=fC(i);a.call(u)}}var i=R7(t,o,e,0,null,!1,!1,"",Ez);return e._reactRootContainer=i,e[Bl]=i.current,mv(e.nodeType===8?e.parentNode:e),hf(),i}for(;n=e.lastChild;)e.removeChild(n);if(typeof o=="function"){var s=o;o=function(){var u=fC(l);s.call(u)}}var l=rO(e,0,!1,null,null,!1,!1,"",Ez);return e._reactRootContainer=l,e[Bl]=l.current,mv(e.nodeType===8?e.parentNode:e),hf(function(){CC(t,l,r,o)}),l}function AC(e,t,r,o,n){var a=r._reactRootContainer;if(a){var i=a;if(typeof n=="function"){var s=n;n=function(){var l=fC(i);s.call(l)}}CC(t,i,e,n)}else i=HMe(r,t,e,n,o);return fC(i)}s6=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var r=Yh(t.pendingLanes);r!==0&&(C2(t,r|1),ta(t,lo()),(Zt&6)===0&&(hg=lo()+500,hd()))}break;case 13:hf(function(){var o=Vl(e,1);if(o!==null){var n=Fn();os(o,e,1,n)}}),oO(e,1)}};S2=function(e){if(e.tag===13){var t=Vl(e,134217728);if(t!==null){var r=Fn();os(t,e,134217728,r)}oO(e,134217728)}};l6=function(e){if(e.tag===13){var t=fd(e),r=Vl(e,t);if(r!==null){var o=Fn();os(r,e,t,o)}oO(e,t)}};u6=function(){return ur};d6=function(e,t){var r=ur;try{return ur=e,t()}finally{ur=r}};FT=function(e,t,r){switch(t){case"input":if(LT(e,r),t=r.name,r.type==="radio"&&t!=null){for(r=e;r.parentNode;)r=r.parentNode;for(r=r.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<r.length;t++){var o=r[t];if(o!==e&&o.form===e.form){var n=MC(o);if(!n)throw Error(Ne(90));Wz(o),LT(o,n)}}}break;case"textarea":jz(e,r);break;case"select":t=r.value,t!=null&&ig(e,!!r.multiple,t,!1)}};Zz=J2;Xz=hf;var KMe={usingClientEntryPoint:!1,Events:[Sv,Qm,MC,$z,Yz,J2]},qh={findFiberByHostInstance:uf,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},$Me={bundleType:qh.bundleType,version:qh.version,rendererPackageName:qh.rendererPackageName,rendererConfig:qh.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Wl.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return e=e6(e),e===null?null:e.stateNode},findFiberByHostInstance:qh.findFiberByHostInstance||qMe,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(Hh=__REACT_DEVTOOLS_GLOBAL_HOOK__,!Hh.isDisabled&&Hh.supportsFiber))try{pC=Hh.inject($Me),Us=Hh}catch{}var Hh;Pa.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=KMe;Pa.createPortal=function(e,t){var r=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!aO(t))throw Error(Ne(200));return zMe(e,t,null,r)};Pa.createRoot=function(e,t){if(!aO(e))throw Error(Ne(299));var r=!1,o="",n=N7;return t!=null&&(t.unstable_strictMode===!0&&(r=!0),t.identifierPrefix!==void 0&&(o=t.identifierPrefix),t.onRecoverableError!==void 0&&(n=t.onRecoverableError)),t=rO(e,1,!1,null,null,r,!1,o,n),e[Bl]=t.current,mv(e.nodeType===8?e.parentNode:e),new nO(t)};Pa.findDOMNode=function(e){if(e==null)return null;if(e.nodeType===1)return e;var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(Ne(188)):(e=Object.keys(e).join(","),Error(Ne(268,e)));return e=e6(t),e=e===null?null:e.stateNode,e};Pa.flushSync=function(e){return hf(e)};Pa.hydrate=function(e,t,r){if(!PC(t))throw Error(Ne(200));return AC(null,e,t,!0,r)};Pa.hydrateRoot=function(e,t,r){if(!aO(e))throw Error(Ne(405));var o=r!=null&&r.hydratedSources||null,n=!1,a="",i=N7;if(r!=null&&(r.unstable_strictMode===!0&&(n=!0),r.identifierPrefix!==void 0&&(a=r.identifierPrefix),r.onRecoverableError!==void 0&&(i=r.onRecoverableError)),t=R7(t,null,e,1,r??null,n,!1,a,i),e[Bl]=t.current,mv(e),o)for(e=0;e<o.length;e++)r=o[e],n=r._getVersion,n=n(r._source),t.mutableSourceEagerHydrationData==null?t.mutableSourceEagerHydrationData=[r,n]:t.mutableSourceEagerHydrationData.push(r,n);return new SC(t)};Pa.render=function(e,t,r){if(!PC(t))throw Error(Ne(200));return AC(null,e,t,!1,r)};Pa.unmountComponentAtNode=function(e){if(!PC(e))throw Error(Ne(40));return e._reactRootContainer?(hf(function(){AC(null,null,e,!1,function(){e._reactRootContainer=null,e[Bl]=null})}),!0):!1};Pa.unstable_batchedUpdates=J2;Pa.unstable_renderSubtreeIntoContainer=function(e,t,r,o){if(!PC(r))throw Error(Ne(200));if(e==null||e._reactInternals===void 0)throw Error(Ne(38));return AC(e,t,r,!1,o)};Pa.version="18.3.1-next-f1338f8080-20240426"});var xg=Re((iqe,E7)=>{"use strict";function O7(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(O7)}catch(e){console.error(e)}}O7(),E7.exports=T7()});var F7=Re(iO=>{"use strict";var _7=xg();iO.createRoot=_7.createRoot,iO.hydrateRoot=_7.hydrateRoot;var sqe});var bg=Re(vd=>{"use strict";Object.defineProperty(vd,"__esModule",{value:!0});vd.primitiveLightColors=vd.primitiveDarkColors=vd.default=void 0;var Av=vd.default={white:"#FFFFFF",gray50:"#F3F3F3",gray100:"#E8E8E8",gray200:"#DDDDDD",gray300:"#C6C6C6",gray400:"#A6A6A6",gray500:"#868686",gray600:"#727272",gray700:"#5E5E5E",gray800:"#4B4B4B",gray900:"#282828",black:"#000000",platinum50:"#F4FAFB",platinum100:"#EBF5F7",platinum200:"#CCDFE5",platinum300:"#A1BDCA",platinum400:"#8EA3AD",platinum500:"#6C7C83",platinum600:"#556268",platinum700:"#394145",platinum800:"#142328",red50:"#FFF0EE",red100:"#FFE1DE",red200:"#FFD2CD",red300:"#FFB2AB",red400:"#FC7F79",red500:"#F83446",red600:"#DE1135",red700:"#BB032A",red800:"#950F22",red900:"#520810",orange50:"#FFF0E9",orange100:"#FEE2D4",orange200:"#FFD3BC",orange300:"#FFB48C",orange400:"#FC823A",orange500:"#E65300",orange600:"#C54600",orange700:"#A33B04",orange800:"#823006",orange900:"#461A00",amber50:"#FFF1E1",amber100:"#FFE4B7",amber200:"#FFD5A1",amber300:"#FFB749",amber400:"#DF9500",amber500:"#C46E00",amber600:"#A95F03",amber700:"#904A07",amber800:"#763A00",amber900:"#401E04",yellow50:"#FDF2DC",yellow100:"#FBE5B6",yellow200:"#FFD688",yellow300:"#F6BC2F",yellow400:"#D79900",yellow500:"#B97502",yellow600:"#9F6402",yellow700:"#845201",yellow800:"#6B4100",yellow900:"#392300",lime50:"#EEF6E3",lime100:"#DEEEC6",lime200:"#CAE6A0",lime300:"#A6D467",lime400:"#77B71C",lime500:"#5B9500",lime600:"#4F7F06",lime700:"#3F6900",lime800:"#365310",lime900:"#1B2D00",green50:"#EAF6ED",green100:"#D3EFDA",green200:"#B1EAC2",green300:"#7FD99A",green400:"#06C167",green500:"#009A51",green600:"#0E8345",green700:"#166C3B",green800:"#0D572D",green900:"#002F14",teal50:"#E2F8FB",teal100:"#CDEEF3",teal200:"#B0E7EF",teal300:"#77D5E3",teal400:"#01B8CA",teal500:"#0095A4",teal600:"#007F8C",teal700:"#016974",teal800:"#1A535A",teal900:"#002D33",blue50:"#EFF4FE",blue100:"#DEE9FE",blue200:"#CDDEFF",blue300:"#A9C9FF",blue400:"#6DAAFB",blue500:"#068BEE",blue600:"#276EF1",blue700:"#175BCC",blue800:"#1948A3",blue900:"#002661",cobalt50:"#EBEDFA",cobalt100:"#D2D7F0",cobalt200:"#949CE3",cobalt300:"#535FCF",cobalt400:"#0E1FC1",cobalt500:"#0A1899",cobalt600:"#081270",cobalt700:"#050C4D",purple50:"#F9F1FF",purple100:"#F2E3FF",purple200:"#EBD5FF",purple300:"#DDB9FF",purple400:"#C490F9",purple500:"#A964F7",purple600:"#944DE7",purple700:"#7C3EC3",purple800:"#633495",purple900:"#3A1659",magenta50:"#FEEFF9",magenta100:"#FEDFF3",magenta200:"#FFCEF2",magenta300:"#FFACE5",magenta400:"#F877D2",magenta500:"#E142BC",magenta600:"#CA26A5",magenta700:"#A91A90",magenta800:"#891869",magenta900:"#50003F",brown50:"#F6F0EA",brown100:"#EBE0DB",brown200:"#D2BBB0",brown300:"#B18977",brown400:"#99644C",brown500:"#744C3A",brown600:"#5C3C2E",brown700:"#3D281E",brandDefault50:"#EFF4FE",brandDefault100:"#DEE9FE",brandDefault200:"#CDDEFF",brandDefault300:"#A9C9FF",brandDefault400:"#6DAAFB",brandDefault500:"#068BEE",brandDefault600:"#276EF1",brandDefault700:"#175BCC",brandDefault800:"#1948A3",brandDefault900:"#002661",gray50Dark:"#161616",gray100Dark:"#292929",gray200Dark:"#383838",gray300Dark:"#484848",gray400Dark:"#5D5D5D",gray500Dark:"#717171",gray600Dark:"#8C8C8C",gray700Dark:"#ABABAB",gray800Dark:"#C4C4C4",gray900Dark:"#DEDEDE",red50Dark:"#2E0608",red100Dark:"#4A1216",red200Dark:"#621C20",red300Dark:"#7F1F26",red400Dark:"#A32C34",red500Dark:"#C33840",red600Dark:"#DE5B5D",red700Dark:"#EA9B98",red800Dark:"#EFBCB9",red900Dark:"#F2D7D5",orange50Dark:"#260F03",orange100Dark:"#401F0C",orange200Dark:"#562A12",orange300Dark:"#6D3715",orange400Dark:"#8C4922",orange500Dark:"#AB5727",orange600Dark:"#C97245",orange700Dark:"#ED9E74",orange800Dark:"#F1BDA3",orange900Dark:"#F8D6C5",amber50Dark:"#241003",amber100Dark:"#3C220F",amber200Dark:"#502F18",amber300Dark:"#653D18",amber400Dark:"#805127",amber500Dark:"#956724",amber600Dark:"#B68131",amber700Dark:"#DEA85E",amber800Dark:"#EEC28D",amber900Dark:"#F6D9B7",yellow50Dark:"#211201",yellow100Dark:"#39240A",yellow200Dark:"#4C3111",yellow300Dark:"#624013",yellow400Dark:"#7A5616",yellow500Dark:"#916C1A",yellow600Dark:"#AE8523",yellow700Dark:"#D7AC57",yellow800Dark:"#E6C681",yellow900Dark:"#F3DCAE",lime50Dark:"#0F1A03",lime100Dark:"#202E13",lime200Dark:"#2C3F19",lime300Dark:"#39501F",lime400Dark:"#4A682B",lime500Dark:"#5A7E35",lime600Dark:"#759954",lime700Dark:"#9EC080",lime800Dark:"#BDD4AB",lime900Dark:"#D6E3CB",green50Dark:"#081B0E",green100Dark:"#162F1E",green200Dark:"#20402A",green300Dark:"#2A5237",green400Dark:"#306C44",green500Dark:"#3D8351",green600Dark:"#5C9D70",green700Dark:"#8FC19C",green800Dark:"#AED6B8",green900Dark:"#CBE6D2",teal50Dark:"#071A1C",teal100Dark:"#0C2E34",teal200Dark:"#113F46",teal300Dark:"#155158",teal400Dark:"#216972",teal500Dark:"#217F8B",teal600Dark:"#3B9BA8",teal700Dark:"#72C1CD",teal800Dark:"#9CD5DF",teal900Dark:"#C5E5EA",blue50Dark:"#061431",blue100Dark:"#182946",blue200Dark:"#22375C",blue300Dark:"#2D4775",blue400Dark:"#335BA3",blue500Dark:"#3F6EC5",blue600Dark:"#5E8BDB",blue700Dark:"#93B4EE",blue800Dark:"#B3CCF6",blue900Dark:"#D1DFF6",purple50Dark:"#1B0E2D",purple100Dark:"#2F2044",purple200Dark:"#3F2D59",purple300Dark:"#513974",purple400Dark:"#694B96",purple500Dark:"#7F5BB6",purple600Dark:"#9A78CE",purple700Dark:"#BDA7E4",purple800Dark:"#D2C1EF",purple900Dark:"#E2D9F5",magenta50Dark:"#28071F",magenta100Dark:"#411636",magenta200Dark:"#581F48",magenta300Dark:"#6E2A5B",magenta400Dark:"#8E3777",magenta500Dark:"#AB4490",magenta600Dark:"#C664A9",magenta700Dark:"#E099C9",magenta800Dark:"#EEB6DB",magenta900Dark:"#F1D4E7",brandDefault50Dark:"#09152C",brandDefault100Dark:"#182946",brandDefault200Dark:"#22375C",brandDefault300Dark:"#2D4775",brandDefault400Dark:"#335BA3",brandDefault500Dark:"#3F6EC5",brandDefault600Dark:"#5E8BDB",brandDefault700Dark:"#93B4EE",brandDefault800Dark:"#B3CCF6",brandDefault900Dark:"#D1DFF6"},B7=vd.primitiveLightColors={},V7=vd.primitiveDarkColors={};for(let e in Av)e.endsWith("Dark")?V7[e]=Av[e]:e==="white"||e==="black"?(B7[e]=Av[e],V7[e]=Av[e]):B7[e]=Av[e]});var U7=Re(()=>{"use strict"});var xf=Re(Gl=>{"use strict";Object.defineProperty(Gl,"__esModule",{value:!0});var YMe={primitiveColors:!0,primitiveLightColors:!0,primitiveDarkColors:!0,colors:!0};Object.defineProperty(Gl,"colors",{enumerable:!0,get:function(){return IC.default}});Object.defineProperty(Gl,"primitiveColors",{enumerable:!0,get:function(){return IC.default}});Object.defineProperty(Gl,"primitiveDarkColors",{enumerable:!0,get:function(){return IC.primitiveDarkColors}});Object.defineProperty(Gl,"primitiveLightColors",{enumerable:!0,get:function(){return IC.primitiveLightColors}});var IC=ZMe(bg()),sO=U7();Object.keys(sO).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(YMe,e)||e in Gl&&Gl[e]===sO[e]||Object.defineProperty(Gl,e,{enumerable:!0,get:function(){return sO[e]}})});function W7(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(W7=function(o){return o?r:t})(e)}function ZMe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=W7(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}});var Iv=Re(DC=>{"use strict";Object.defineProperty(DC,"__esModule",{value:!0});DC.default=void 0;var wg=xf(),XMe={primaryA:wg.primitiveLightColors.black,primaryB:wg.primitiveLightColors.white,primary:"#000000",primary50:"#F6F6F6",primary100:"#EEEEEE",primary200:"#E2E2E2",primary300:"#CBCBCB",primary400:"#AFAFAF",primary500:"#6B6B6B",primary600:"#545454",primary700:"#333333",accent:wg.primitiveLightColors.blue600,accent50:"#EFF3FE",accent100:"#D4E2FC",accent200:"#A0BFF8",accent300:"#5B91F5",accent400:"#276EF1",accent500:"#1E54B7",accent600:"#174291",accent700:"#102C60",negative:wg.primitiveLightColors.red600,negative50:"#FFEFED",negative100:"#FED7D2",negative200:"#F1998E",negative300:"#E85C4A",negative400:"#E11900",negative500:"#AB1300",negative600:"#870F00",negative700:"#5A0A00",warning:wg.primitiveLightColors.yellow300,warning50:"#FFFAF0",warning100:"#FFF2D9",warning200:"#FFE3AC",warning300:"#FFCF70",warning400:"#FFC043",warning500:"#BC8B2C",warning600:"#996F00",warning700:"#674D1B",positive:wg.primitiveLightColors.green600,positive50:"#E6F2ED",positive100:"#ADDEC9",positive200:"#66D19E",positive300:"#06C167",positive400:"#048848",positive500:"#03703C",positive600:"#03582F",positive700:"#10462D",white:"#FFFFFF",black:"#000000",mono100:"#FFFFFF",mono200:"#F6F6F6",mono300:"#EEEEEE",mono400:"#E2E2E2",mono500:"#CBCBCB",mono600:"#AFAFAF",mono700:"#6B6B6B",mono800:"#545454",mono900:"#333333",mono1000:"#000000"},pqe=DC.default=XMe});var LC=Re(Cg=>{"use strict";Object.defineProperty(Cg,"__esModule",{value:!0});Cg.ellipsisText=void 0;Cg.expandBorderStyles=QMe;Cg.hexToRgb=JMe;function JMe(e="",t="1"){let r=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;e=e.replace(r,function(n,a,i,s){return a+a+i+i+s+s});let o=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return o?`rgba(${parseInt(o[1],16)}, ${parseInt(o[2],16)}, ${parseInt(o[3],16)}, ${t})`:null}var gqe=Cg.ellipsisText={overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",wordWrap:"normal"};function QMe(e){return{borderTopWidth:e.borderWidth,borderTopStyle:e.borderStyle,borderTopColor:e.borderColor,borderBottomWidth:e.borderWidth,borderBottomStyle:e.borderStyle,borderBottomColor:e.borderColor,borderLeftWidth:e.borderWidth,borderLeftStyle:e.borderStyle,borderLeftColor:e.borderColor,borderRightWidth:e.borderWidth,borderRightStyle:e.borderStyle,borderRightColor:e.borderColor}}});var NC=Re(RC=>{"use strict";Object.defineProperty(RC,"__esModule",{value:!0});RC.default=void 0;var lO=G7(Iv()),Sg=LC(),me=G7(bg());function G7(e){return e&&e.__esModule?e:{default:e}}var ehe=(e=lO.default)=>{let t={backgroundPrimary:e.primaryB,backgroundSecondary:me.default.gray50,backgroundTertiary:me.default.gray100,backgroundInversePrimary:e.primaryA,backgroundInverseSecondary:me.default.gray900,contentPrimary:e.primaryA,contentSecondary:me.default.gray800,contentTertiary:me.default.gray700,contentInversePrimary:e.primaryB,contentInverseSecondary:me.default.gray200,contentInverseTertiary:me.default.gray400,borderOpaque:me.default.gray50,borderTransparent:(0,Sg.hexToRgb)(e.primaryA,"0.08")||(0,Sg.hexToRgb)(lO.default.primaryA,"0.08")||"",borderSelected:e.primaryA,borderInverseOpaque:me.default.gray800,borderInverseTransparent:(0,Sg.hexToRgb)(e.primaryB,"0.2")||(0,Sg.hexToRgb)(lO.default.primaryB,"0.2")||"",borderInverseSelected:e.primaryB,brandBackgroundPrimary:me.default.brandDefault600,brandBackgroundSecondary:me.default.brandDefault50,brandBackgroundTertiary:me.default.white,brandBackgroundDisabled:me.default.brandDefault50,brandContentPrimary:me.default.brandDefault600,brandContentOnPrimary:me.default.white,brandContentOnSecondary:me.default.brandDefault700,brandContentOnTertiary:me.default.black,brandContentOnGradient:me.default.white,brandContentDisabled:me.default.brandDefault300,brandBorderAccessible:me.default.brandDefault600,brandBorderSubtle:me.default.brandDefault100},r={backgroundStateDisabled:me.default.gray50,backgroundOverlay:(0,Sg.hexToRgb)(me.default.black,"0.5")||"",backgroundOverlayArt:(0,Sg.hexToRgb)(me.default.black,"0.00")||"",backgroundAccent:e.accent,backgroundNegative:e.negative,backgroundWarning:e.warning,backgroundPositive:e.positive,backgroundAccentLight:me.default.blue50,backgroundNegativeLight:me.default.red50,backgroundWarningLight:me.default.yellow50,backgroundPositiveLight:me.default.green50,backgroundAlwaysDark:me.default.black,backgroundAlwaysLight:me.default.white,contentStateDisabled:me.default.gray400,contentOnColor:me.default.white,contentOnColorInverse:me.default.black,contentAccent:me.default.blue600,contentNegative:me.default.red600,contentWarning:me.default.yellow600,contentPositive:me.default.green600,tagRedContentSecondary:me.default.red700,borderStateDisabled:me.default.gray50,borderAccent:me.default.blue600,borderAccentLight:me.default.blue300,borderNegative:me.default.red600,borderNegativeLight:me.default.red300,borderWarning:me.default.yellow600,borderWarningLight:me.default.yellow200,borderPositive:me.default.green600,borderPositiveLight:me.default.green300,tagRedBorderSecondarySelected:me.default.red700,safety:me.default.blue600,eatsGreen400:me.default.green600,freightBlue400:me.default.cobalt400,rewardsTier1:me.default.blue600,rewardsTier2:me.default.yellow300,rewardsTier3:me.default.platinum400,rewardsTier4:me.default.black,membership:me.default.yellow600},o={jumpRed400:me.default.red400,backgroundOverlayLight:r.backgroundOverlay,backgroundOverlayDark:r.backgroundOverlay,backgroundLightAccent:r.backgroundAccentLight,backgroundLightPositive:r.backgroundPositiveLight,backgroundLightWarning:r.backgroundWarningLight,backgroundLightNegative:r.backgroundNegativeLight},n={tagGrayBackgroundPrimary:me.default.gray600,tagGrayBackgroundSecondary:me.default.gray50,tagGrayContentPrimary:me.default.white,tagGrayContentSecondary:me.default.gray700,tagGrayBackgroundStateDisabled:me.default.gray50,tagGrayContentStateDisabled:me.default.gray300,tagGrayBorderPrimaryUnselected:me.default.gray700,tagGrayBorderSecondaryUnselected:me.default.gray100,tagGrayBorderSecondarySelected:me.default.gray600,tagRedBackgroundPrimary:me.default.red600,tagRedBackgroundSecondary:me.default.red50,tagRedContentPrimary:me.default.white,tagRedContentSecondary:me.default.red700,tagRedBackgroundStateDisabled:me.default.red50,tagRedContentStateDisabled:me.default.red300,tagRedBorderPrimaryUnselected:me.default.red700,tagRedBorderSecondaryUnselected:me.default.red100,tagRedBorderSecondarySelected:me.default.red700,tagOrangeBackgroundPrimary:me.default.orange600,tagOrangeBackgroundSecondary:me.default.orange50,tagOrangeContentPrimary:me.default.white,tagOrangeContentSecondary:me.default.orange700,tagOrangeBackgroundStateDisabled:me.default.orange50,tagOrangeContentStateDisabled:me.default.orange300,tagYellowBackgroundPrimary:me.default.yellow300,tagOrangeBorderPrimaryUnselected:me.default.orange700,tagYellowBackgroundSecondary:me.default.yellow50,tagOrangeBorderSecondaryUnselected:me.default.orange100,tagOrangeBorderSecondarySelected:me.default.orange700,tagYellowContentPrimary:me.default.black,tagYellowContentSecondary:me.default.yellow700,tagYellowBackgroundStateDisabled:me.default.yellow50,tagYellowContentStateDisabled:me.default.yellow200,tagYellowBorderPrimaryUnselected:me.default.yellow400,tagYellowBorderSecondaryUnselected:me.default.yellow100,tagYellowBorderSecondarySelected:me.default.yellow700,tagGreenBackgroundPrimary:me.default.green600,tagGreenBackgroundSecondary:me.default.green50,tagGreenContentPrimary:me.default.white,tagGreenContentSecondary:me.default.green700,tagGreenBackgroundStateDisabled:me.default.green50,tagGreenContentStateDisabled:me.default.green300,tagGreenBorderPrimaryUnselected:me.default.green700,tagBlueBackgroundPrimary:me.default.blue600,tagBlueBackgroundSecondary:me.default.blue50,tagGreenBorderSecondaryUnselected:me.default.green100,tagBlueContentPrimary:me.default.white,tagGreenBorderSecondarySelected:me.default.green700,tagBlueContentSecondary:me.default.blue700,tagBlueBackgroundStateDisabled:me.default.blue50,tagBlueContentStateDisabled:me.default.blue300,tagBlueBorderPrimaryUnselected:me.default.blue700,tagPurpleBackgroundPrimary:me.default.purple600,tagPurpleBackgroundSecondary:me.default.purple50,tagBlueBorderSecondaryUnselected:me.default.blue100,tagBlueBorderSecondarySelected:me.default.blue700,tagPurpleContentPrimary:me.default.white,tagPurpleContentSecondary:me.default.purple700,tagPurpleBackgroundStateDisabled:me.default.purple50,tagPurpleContentStateDisabled:me.default.purple300,tagPurpleBorderPrimaryUnselected:me.default.purple700,tagMagentaBackgroundPrimary:me.default.magenta600,tagPurpleBorderSecondaryUnselected:me.default.purple100,tagMagentaBackgroundSecondary:me.default.magenta50,tagPurpleBorderSecondarySelected:me.default.purple700,tagMagentaContentPrimary:me.default.white,tagMagentaContentSecondary:me.default.magenta700,tagMagentaBackgroundStateDisabled:me.default.magenta50,tagMagentaContentStateDisabled:me.default.magenta300,tagMagentaBorderPrimaryUnselected:me.default.magenta700,tagMagentaBorderSecondaryUnselected:me.default.magenta100,tagMagentaBorderSecondarySelected:me.default.magenta700,tagTealBackgroundPrimary:me.default.teal600,tagTealBackgroundSecondary:me.default.teal50,tagTealContentPrimary:me.default.white,tagTealContentSecondary:me.default.teal700,tagTealBackgroundStateDisabled:me.default.teal50,tagTealContentStateDisabled:me.default.teal300,tagTealBorderPrimaryUnselected:me.default.teal700,tagTealBorderSecondaryUnselected:me.default.teal100,tagTealBorderSecondarySelected:me.default.teal700,tagLimeBackgroundPrimary:me.default.lime600,tagLimeBackgroundSecondary:me.default.lime50,tagLimeContentPrimary:me.default.white,tagLimeContentSecondary:me.default.lime700,tagLimeBackgroundStateDisabled:me.default.lime50,tagLimeContentStateDisabled:me.default.lime300,tagLimeBorderPrimaryUnselected:me.default.lime700,tagLimeBorderSecondaryUnselected:me.default.lime100,tagLimeBorderSecondarySelected:me.default.lime700};return{...t,...r,...n,...{hoverOverlayInverseAlpha:"rgba(255, 255, 255, 0.1)",hoverOverlayAlpha:"rgba(0, 0, 0, 0.04)",hoverNegativeAlpha:"rgba(222, 17, 53, 0.1)",pressedOverlayAlpha:"rgba(0, 0, 0, 0.08)",pressedOverlayInverseAlpha:"rgba(255, 255, 255, 0.2)",pressedNegativeAlpha:"rgba(222, 17, 53, 0.15)"},...o}};RC.default=ehe});var uO=Re(TC=>{"use strict";Object.defineProperty(TC,"__esModule",{value:!0});TC.default=void 0;var the=rhe(NC()),Me=xf();function rhe(e){return e&&e.__esModule?e:{default:e}}var ohe=(0,the.default)(),Pg="rgba(0, 0, 0, 0.08)",nhe=(e=ohe)=>({bannerActionLowInfo:Me.primitiveLightColors.blue100,bannerActionLowNegative:Me.primitiveLightColors.red100,bannerActionLowPositive:Me.primitiveLightColors.green100,bannerActionLowWarning:Me.primitiveLightColors.yellow100,bannerActionHighInfo:Me.primitiveLightColors.blue700,bannerActionHighNegative:Me.primitiveLightColors.red700,bannerActionHighPositive:Me.primitiveLightColors.green700,bannerActionHighWarning:Me.primitiveLightColors.yellow200,bottomNavigationText:Me.primitiveLightColors.gray600,bottomNavigationSelectedText:e.contentPrimary,buttonPrimaryFill:e.backgroundInversePrimary,buttonPrimaryText:e.contentInversePrimary,buttonPrimaryHover:Me.primitiveLightColors.gray900,buttonPrimaryActive:Me.primitiveLightColors.gray800,buttonPrimaryHoverOverlay:e.hoverOverlayInverseAlpha,buttonPrimaryActiveOverlay:e.pressedOverlayInverseAlpha,buttonPrimarySelectedFill:e.backgroundInversePrimary,buttonPrimarySelectedText:e.contentInversePrimary,buttonPrimaryLoadingFill:e.backgroundInversePrimary,buttonPrimarySpinnerForeground:e.backgroundAccent,buttonPrimarySpinnerBackground:e.backgroundPrimary,buttonSecondaryFill:e.backgroundSecondary,buttonSecondaryText:e.contentPrimary,buttonSecondaryHover:Me.primitiveLightColors.gray200,buttonSecondaryActive:Me.primitiveLightColors.gray300,buttonSecondaryHoverOverlay:e.hoverOverlayAlpha,buttonSecondaryActiveOverlay:e.pressedOverlayAlpha,buttonSecondarySelectedFill:e.backgroundInversePrimary,buttonSecondarySelectedText:e.contentInversePrimary,buttonSecondaryLoadingFill:e.backgroundSecondary,buttonSecondarySpinnerForeground:e.backgroundAccent,buttonSecondarySpinnerBackground:e.backgroundPrimary,buttonTertiaryFill:"transparent",buttonTertiaryText:e.contentPrimary,buttonTertiaryHover:Me.primitiveLightColors.gray50,buttonTertiaryActive:Me.primitiveLightColors.gray100,buttonTertiaryHoverOverlay:e.hoverOverlayAlpha,buttonTertiaryActiveOverlay:e.pressedOverlayAlpha,buttonTertiarySelectedFill:"transparent",buttonTertiarySelectedText:e.contentPrimary,buttonTertiaryLoadingFill:"transparent",buttonTertiaryFocusFill:e.backgroundTertiary,buttonTertiaryDisabledActiveFill:e.backgroundStateDisabled,buttonTertiaryDisabledActiveText:e.contentStateDisabled,buttonTertiarySpinnerForeground:e.backgroundAccent,buttonTertiarySpinnerBackground:e.backgroundTertiary,buttonDangerPrimaryFill:e.backgroundNegative,buttonDangerPrimaryText:e.contentOnColor,buttonDangerPrimaryHoverOverlay:e.hoverOverlayAlpha,buttonDangerPrimaryActiveOverlay:e.pressedOverlayAlpha,buttonDangerPrimarySelectedFill:e.backgroundNegative,buttonDangerPrimarySelectedText:e.contentOnColor,buttonDangerPrimaryLoadingFill:e.backgroundNegative,buttonDangerPrimarySpinnerForeground:e.backgroundAccent,buttonDangerPrimarySpinnerBackground:e.backgroundPrimary,buttonDangerSecondaryFill:e.backgroundSecondary,buttonDangerSecondaryText:e.tagRedContentSecondary,buttonDangerSecondaryHoverOverlay:e.hoverOverlayAlpha,buttonDangerSecondaryActiveOverlay:e.pressedOverlayAlpha,buttonDangerSecondarySelectedFill:e.backgroundNegative,buttonDangerSecondarySelectedText:e.contentOnColor,buttonDangerSecondaryLoadingFill:e.backgroundSecondary,buttonDangerSecondarySpinnerForeground:e.backgroundAccent,buttonDangerSecondarySpinnerBackground:e.backgroundPrimary,buttonDangerTertiaryFill:"transparent",buttonDangerTertiaryText:e.tagRedContentSecondary,buttonDangerTertiaryHoverOverlay:e.hoverOverlayAlpha,buttonDangerTertiaryActiveOverlay:e.pressedOverlayAlpha,buttonDangerTertiarySelectedFill:e.backgroundPrimary,buttonDangerTertiarySelectedText:e.tagRedContentSecondary,buttonDangerTertiaryLoadingFill:"transparent",buttonDangerTertiarySpinnerForeground:e.backgroundAccent,buttonDangerTertiarySpinnerBackground:e.backgroundPrimary,buttonOutlineFill:"transparent",buttonOutlineText:e.contentPrimary,buttonOutlineHoverOverlay:e.hoverOverlayAlpha,buttonOutlineActiveOverlay:e.pressedOverlayAlpha,buttonOutlineSelectedFill:"transparent",buttonOutlineSelectedText:e.contentPrimary,buttonOutlineFocusFill:e.backgroundTertiary,buttonOutlineLoadingFill:"transparent",buttonOutlineSpinnerForeground:e.backgroundAccent,buttonOutlineSpinnerBackground:e.backgroundPrimary,buttonDisabledFill:e.backgroundStateDisabled,buttonDisabledText:e.contentStateDisabled,buttonDisabledActiveFill:e.backgroundStateDisabled,buttonDisabledActiveText:e.contentStateDisabled,buttonDisabledSpinnerForeground:e.contentStateDisabled,buttonDisabledSpinnerBackground:e.backgroundPrimary,buttonOuterBorder:e.borderSelected,buttonOutlineOuterBorder:e.borderOpaque,buttonDangerTertiaryOuterBorder:e.tagRedBorderSecondarySelected,buttonInnerBorder:e.contentInversePrimary,buttonTransparentBorder:"transparent",buttonFocusOuterBorder:e.borderAccent,breadcrumbsText:e.contentPrimary,breadcrumbsSeparatorFill:e.contentTertiary,calendarBackground:e.backgroundPrimary,calendarForeground:e.contentPrimary,calendarForegroundDisabled:e.contentStateDisabled,calendarHeaderBackground:e.backgroundPrimary,calendarHeaderForeground:e.contentPrimary,calendarHeaderBackgroundActive:e.backgroundInversePrimary,calendarHeaderForegroundDisabled:e.contentStateDisabled,calendarDayForegroundPseudoSelected:e.backgroundInversePrimary,calendarDayBackgroundPseudoSelectedHighlighted:e.backgroundTertiary,calendarDayForegroundPseudoSelectedHighlighted:e.contentPrimary,calendarDayBackgroundSelected:e.backgroundInversePrimary,calendarDayForegroundSelected:e.contentInversePrimary,calendarDayBackgroundSelectedHighlighted:e.backgroundInversePrimary,calendarDayForegroundSelectedHighlighted:e.contentInversePrimary,comboboxListItemFocus:e.backgroundSecondary,comboboxListItemHover:e.backgroundTertiary,fileUploaderBackgroundColor:e.backgroundSecondary,fileUploaderBackgroundColorActive:e.backgroundPrimary,fileUploaderBorderColorActive:e.borderSelected,fileUploaderBorderColorDefault:e.borderOpaque,fileUploaderMessageColor:e.contentPrimary,linkText:e.contentPrimary,linkVisited:Me.primitiveLightColors.gray600,linkHover:Me.primitiveLightColors.gray800,linkActive:Me.primitiveLightColors.gray700,listHeaderFill:e.backgroundPrimary,listBodyFill:e.backgroundPrimary,progressStepsCompletedText:e.contentInversePrimary,progressStepsCompletedFill:e.backgroundInversePrimary,progressStepsActiveText:e.contentInversePrimary,progressStepsActiveFill:e.backgroundInversePrimary,toggleFill:e.backgroundPrimary,toggleFillChecked:e.contentPrimary,toggleFillDisabled:e.contentStateDisabled,toggleTrackFill:e.backgroundTertiary,toggleTrackFillDisabled:e.backgroundStateDisabled,tickFill:e.backgroundPrimary,tickFillHover:Me.primitiveLightColors.gray50,tickFillActive:Me.primitiveLightColors.gray100,tickFillSelected:e.contentPrimary,tickFillSelectedHover:Me.primitiveLightColors.gray900,tickFillSelectedHoverActive:Me.primitiveLightColors.gray800,tickFillError:e.backgroundPrimary,tickFillErrorHover:Me.primitiveLightColors.gray50,tickFillErrorHoverActive:Me.primitiveLightColors.gray100,tickFillErrorSelected:e.contentNegative,tickFillErrorSelectedHover:Me.primitiveLightColors.red700,tickFillErrorSelectedHoverActive:Me.primitiveLightColors.red800,tickFillDisabled:e.backgroundStateDisabled,tickBorder:e.contentTertiary,tickBorderError:e.borderNegative,tickMarkFill:e.contentInversePrimary,tickMarkFillError:e.contentOnColor,tickMarkFillDisabled:e.contentInversePrimary,sliderTrackFill:"transparent",sliderHandleFill:e.contentPrimary,sliderHandleFillDisabled:e.backgroundStateDisabled,sliderHandleInnerFill:e.contentPrimary,sliderTrackFillHover:Me.primitiveLightColors.gray200,sliderTrackFillActive:Me.primitiveLightColors.gray300,sliderTrackFillDisabled:e.backgroundStateDisabled,sliderHandleInnerFillDisabled:e.backgroundStateDisabled,sliderHandleInnerFillSelectedHover:Me.primitiveLightColors.gray900,sliderHandleInnerFillSelectedActive:Me.primitiveLightColors.gray800,inputBorder:e.borderOpaque,inputFill:e.backgroundSecondary,inputFillError:e.backgroundPrimary,inputFillDisabled:e.backgroundStateDisabled,inputFillActive:e.backgroundPrimary,inputFillPositive:e.backgroundPrimary,inputTextDisabled:e.contentStateDisabled,inputBorderError:e.borderNegative,inputBorderPositive:e.borderPositive,inputEnhancerFill:e.contentPrimary,inputEnhancerFillDisabled:e.contentStateDisabled,inputEnhancerTextDisabled:e.contentStateDisabled,inputPlaceholder:e.contentTertiary,inputPlaceholderDisabled:e.contentStateDisabled,menuFill:e.backgroundPrimary,menuFillHover:e.backgroundSecondary,menuFontDefault:e.contentPrimary,menuFontDisabled:e.contentStateDisabled,menuFontHighlighted:e.contentPrimary,menuFontSelected:e.contentPrimary,modalCloseColor:e.contentPrimary,modalCloseColorHover:Me.primitiveLightColors.gray900,modalCloseColorFocus:Me.primitiveLightColors.gray800,tabBarFill:e.backgroundPrimary,tabColor:e.contentTertiary,notificationInfoBackground:e.backgroundAccentLight,notificationInfoText:e.contentPrimary,notificationPositiveBackground:e.backgroundPositiveLight,notificationPositiveText:e.contentPrimary,notificationWarningBackground:e.backgroundWarningLight,notificationWarningText:e.contentPrimary,notificationNegativeBackground:e.backgroundNegativeLight,notificationNegativeText:e.contentPrimary,tagFontDisabledRampUnit:"200",tagSolidFontRampUnit:"0",tagSolidRampUnit:"400",tagOutlinedFontRampUnit:"600",tagOutlinedRampUnit:"600",tagSolidHoverRampUnit:"50",tagSolidActiveRampUnit:"100",tagSolidDisabledRampUnit:"50",tagSolidFontHoverRampUnit:"700",tagLightRampUnit:"50",tagLightHoverRampUnit:"100",tagLightActiveRampUnit:"200",tagLightFontRampUnit:"600",tagLightFontHoverRampUnit:"200",tagOutlinedHoverRampUnit:"700",tagOutlinedActiveRampUnit:"800",tagOutlinedFontHoverRampUnit:"700",tagNeutralFontDisabled:Me.primitiveLightColors.gray200,tagNeutralOutlinedDisabled:Me.primitiveLightColors.gray200,tagNeutralSolidFont:Me.primitiveLightColors.white,tagNeutralSolidBackground:Me.primitiveLightColors.gray600,tagNeutralOutlinedBackground:Me.primitiveLightColors.gray50,tagNeutralOutlinedFont:Me.primitiveLightColors.gray700,tagNeutralSolidHover:Me.primitiveLightColors.gray900,tagNeutralSolidActive:Me.primitiveLightColors.gray800,tagNeutralSolidDisabled:Me.primitiveLightColors.gray200,tagNeutralSolidFontHover:Me.primitiveLightColors.gray700,tagNeutralLightBackground:Me.primitiveLightColors.white,tagNeutralLightHover:Me.primitiveLightColors.gray50,tagNeutralLightActive:Me.primitiveLightColors.gray100,tagNeutralLightDisabled:Me.primitiveLightColors.gray200,tagNeutralLightFont:Me.primitiveLightColors.gray600,tagNeutralLightFontHover:Me.primitiveLightColors.gray700,tagNeutralOutlinedActive:Me.primitiveLightColors.gray800,tagNeutralOutlinedFontHover:Me.primitiveLightColors.gray700,tagNeutralOutlinedHover:Pg,tagPrimaryFontDisabled:Me.primitiveLightColors.gray300,tagPrimaryOutlinedDisabled:Me.primitiveLightColors.gray200,tagPrimarySolidFont:Me.primitiveLightColors.white,tagPrimarySolidBackground:Me.primitiveLightColors.gray600,tagPrimaryOutlinedFontHover:Me.primitiveLightColors.gray900,tagPrimaryOutlinedFont:Me.primitiveLightColors.gray700,tagPrimarySolidHover:Me.primitiveLightColors.gray900,tagPrimarySolidActive:Me.primitiveLightColors.gray900,tagPrimarySolidDisabled:Me.primitiveLightColors.gray200,tagPrimarySolidFontHover:Me.primitiveLightColors.gray900,tagPrimaryLightBackground:Me.primitiveLightColors.white,tagPrimaryLightHover:Me.primitiveLightColors.gray50,tagPrimaryLightActive:Me.primitiveLightColors.gray100,tagPrimaryLightDisabled:Me.primitiveLightColors.gray200,tagPrimaryLightFont:Me.primitiveLightColors.black,tagPrimaryLightFontHover:Me.primitiveLightColors.gray900,tagPrimaryOutlinedActive:Me.primitiveLightColors.gray900,tagPrimaryOutlinedHover:Pg,tagPrimaryOutlinedBackground:Me.primitiveLightColors.gray50,tagAccentFontDisabled:Me.primitiveLightColors.blue300,tagAccentOutlinedDisabled:Me.primitiveLightColors.blue200,tagAccentSolidFont:Me.primitiveLightColors.white,tagAccentSolidBackground:Me.primitiveLightColors.blue600,tagAccentOutlinedBackground:Me.primitiveLightColors.blue50,tagAccentOutlinedFont:Me.primitiveLightColors.blue700,tagAccentSolidHover:Me.primitiveLightColors.blue50,tagAccentSolidActive:Me.primitiveLightColors.blue100,tagAccentSolidDisabled:Me.primitiveLightColors.blue50,tagAccentSolidFontHover:Me.primitiveLightColors.blue500,tagAccentLightBackground:Me.primitiveLightColors.blue50,tagAccentLightHover:Me.primitiveLightColors.blue100,tagAccentLightActive:Me.primitiveLightColors.blue200,tagAccentLightDisabled:Me.primitiveLightColors.blue50,tagAccentLightFont:Me.primitiveLightColors.blue600,tagAccentLightFontHover:Me.primitiveLightColors.blue700,tagAccentOutlinedActive:Me.primitiveLightColors.blue800,tagAccentOutlinedFontHover:Me.primitiveLightColors.blue700,tagAccentOutlinedHover:Pg,tagPositiveFontDisabled:Me.primitiveLightColors.green300,tagPositiveOutlinedDisabled:Me.primitiveLightColors.green200,tagPositiveSolidFont:Me.primitiveLightColors.white,tagPositiveSolidBackground:Me.primitiveLightColors.green600,tagPositiveOutlinedBackground:Me.primitiveLightColors.green50,tagPositiveOutlinedFont:Me.primitiveLightColors.green700,tagPositiveSolidHover:Me.primitiveLightColors.green50,tagPositiveSolidActive:Me.primitiveLightColors.green100,tagPositiveSolidDisabled:Me.primitiveLightColors.green50,tagPositiveSolidFontHover:Me.primitiveLightColors.green500,tagPositiveLightBackground:Me.primitiveLightColors.green50,tagPositiveLightHover:Me.primitiveLightColors.green100,tagPositiveLightActive:Me.primitiveLightColors.green200,tagPositiveLightDisabled:Me.primitiveLightColors.green50,tagPositiveLightFont:Me.primitiveLightColors.green600,tagPositiveLightFontHover:Me.primitiveLightColors.green700,tagPositiveOutlinedActive:Me.primitiveLightColors.green800,tagPositiveOutlinedFontHover:Me.primitiveLightColors.green700,tagPositiveOutlinedHover:Pg,tagWarningFontDisabled:Me.primitiveLightColors.yellow200,tagWarningOutlinedDisabled:Me.primitiveLightColors.yellow200,tagWarningSolidFont:Me.primitiveLightColors.yellow900,tagWarningSolidBackground:Me.primitiveLightColors.yellow300,tagWarningOutlinedBackground:Me.primitiveLightColors.yellow50,tagWarningOutlinedFont:Me.primitiveLightColors.yellow700,tagWarningSolidHover:Me.primitiveLightColors.yellow50,tagWarningSolidActive:Me.primitiveLightColors.yellow100,tagWarningSolidDisabled:Me.primitiveLightColors.yellow50,tagWarningSolidFontHover:Me.primitiveLightColors.yellow500,tagWarningLightBackground:Me.primitiveLightColors.yellow50,tagWarningLightHover:Me.primitiveLightColors.yellow100,tagWarningLightActive:Me.primitiveLightColors.yellow200,tagWarningLightDisabled:Me.primitiveLightColors.yellow50,tagWarningLightFont:Me.primitiveLightColors.yellow600,tagWarningLightFontHover:Me.primitiveLightColors.yellow700,tagWarningOutlinedActive:Me.primitiveLightColors.yellow800,tagWarningOutlinedFontHover:Me.primitiveLightColors.yellow700,tagWarningOutlinedHover:Pg,tagNegativeFontDisabled:Me.primitiveLightColors.red300,tagNegativeOutlinedDisabled:Me.primitiveLightColors.red200,tagNegativeSolidFont:Me.primitiveLightColors.white,tagNegativeSolidBackground:Me.primitiveLightColors.red600,tagNegativeOutlinedBackground:Me.primitiveLightColors.red50,tagNegativeOutlinedFont:Me.primitiveLightColors.red700,tagNegativeSolidHover:Me.primitiveLightColors.red50,tagNegativeSolidActive:Me.primitiveLightColors.red100,tagNegativeSolidDisabled:Me.primitiveLightColors.red50,tagNegativeSolidFontHover:Me.primitiveLightColors.red500,tagNegativeLightBackground:Me.primitiveLightColors.red50,tagNegativeLightHover:Me.primitiveLightColors.red100,tagNegativeLightActive:Me.primitiveLightColors.red200,tagNegativeLightDisabled:Me.primitiveLightColors.red50,tagNegativeLightFont:Me.primitiveLightColors.red600,tagNegativeLightFontHover:Me.primitiveLightColors.red700,tagNegativeOutlinedActive:Me.primitiveLightColors.red800,tagNegativeOutlinedFontHover:Me.primitiveLightColors.red700,tagNegativeOutlinedHover:Pg,tableHeadBackgroundColor:e.backgroundPrimary,tableBackground:e.backgroundPrimary,tableStripedBackground:e.backgroundSecondary,tableFilter:e.contentTertiary,tableFilterHeading:e.contentPrimary,tableFilterBackground:e.backgroundPrimary,tableFilterFooterBackground:e.backgroundSecondary,toastText:e.contentOnColor,toastPrimaryText:e.contentOnColor,toastInfoBackground:e.backgroundAccent,toastInfoText:e.contentOnColor,toastPositiveBackground:e.backgroundPositive,toastPositiveText:e.contentOnColor,toastWarningBackground:e.backgroundWarning,toastWarningText:e.contentOnColorInverse,toastNegativeBackground:e.backgroundNegative,toastNegativeText:e.contentOnColor,spinnerTrackFill:e.backgroundTertiary,progressbarTrackFill:e.backgroundTertiary,tooltipBackground:e.backgroundInverseSecondary,tooltipText:e.contentInversePrimary,ratingInactiveFill:e.backgroundPrimary,ratingStroke:e.contentPrimary});TC.default=nhe});var dO=Re(OC=>{"use strict";Object.defineProperty(OC,"__esModule",{value:!0});OC.default=void 0;var ahe={border100:{borderColor:"hsla(0, 0%, 0%, 0.04)",borderStyle:"solid",borderWidth:"1px"},border200:{borderColor:"hsla(0, 0%, 0%, 0.08)",borderStyle:"solid",borderWidth:"1px"},border300:{borderColor:"hsla(0, 0%, 0%, 0.12)",borderStyle:"solid",borderWidth:"1px"},border400:{borderColor:"hsla(0, 0%, 0%, 0.16)",borderStyle:"solid",borderWidth:"1px"},border500:{borderColor:"hsla(0, 0%, 0%, 0.2)",borderStyle:"solid",borderWidth:"1px"},border600:{borderColor:"hsla(0, 0%, 0%, 0.24)",borderStyle:"solid",borderWidth:"1px"},radius100:"2px",radius200:"4px",radius300:"8px",radius400:"12px",radius500:"16px",useRoundedCorners:!0,buttonBorderRadiusMini:"4px",buttonBorderRadius:"8px",checkboxBorderRadius:"0px",inputBorderRadiusMini:"4px",inputBorderRadius:"8px",popoverBorderRadius:"8px",surfaceBorderRadius:"0px",tagBorderRadius:"24px"},vqe=OC.default=ahe});var cO=Re(EC=>{"use strict";Object.defineProperty(EC,"__esModule",{value:!0});EC.default=void 0;var ihe={shadow400:"0 1px 4px hsla(0, 0%, 0%, 0.16)",shadow500:"0 2px 8px hsla(0, 0%, 0%, 0.16)",shadow600:"0 4px 16px hsla(0, 0%, 0%, 0.16)",shadow700:"0 8px 24px hsla(0, 0%, 0%, 0.16)",overlay0:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0)",overlay100:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.04)",overlay200:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.08)",overlay300:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.12)",overlay400:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.16)",overlay500:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.2)",overlay600:"inset 0 0 0 1000px hsla(0, 0%, 0%, 0.24)",shallowAbove:"0px -4px 16px rgba(0, 0, 0, 0.12)",shallowBelow:"0px 4px 16px rgba(0, 0, 0, 0.12)",deepAbove:"0px -16px 48px rgba(0, 0, 0, 0.22)",deepBelow:"0px 16px 48px rgba(0, 0, 0, 0.22)"},xqe=EC.default=ihe});var Dv=Re(Ag=>{"use strict";Object.defineProperty(Ag,"__esModule",{value:!0});Ag.fontTokens=Ag.default=void 0;var Wt=Ag.fontTokens={primaryFontFamily:'UberMoveText, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif',secondaryFontFamily:'UberMove, UberMoveText, system-ui, "Helvetica Neue", Helvetica, Arial, sans-serif',monoFontFamily:'UberMoveMono, "Lucida Console", Monaco, monospace'},fO={fontFamily:Wt.primaryFontFamily,fontSize:"12px",fontWeight:"normal",lineHeight:"20px"},pO={fontFamily:Wt.primaryFontFamily,fontSize:"12px",fontWeight:500,lineHeight:"16px"},mO={fontFamily:Wt.primaryFontFamily,fontSize:"14px",fontWeight:"normal",lineHeight:"20px"},gO={fontFamily:Wt.primaryFontFamily,fontSize:"14px",fontWeight:500,lineHeight:"16px"},kO={fontFamily:Wt.primaryFontFamily,fontSize:"16px",fontWeight:"normal",lineHeight:"24px"},MO={fontFamily:Wt.primaryFontFamily,fontSize:"16px",fontWeight:500,lineHeight:"20px"},hO={fontFamily:Wt.primaryFontFamily,fontSize:"18px",fontWeight:"normal",lineHeight:"28px"},vO={fontFamily:Wt.primaryFontFamily,fontSize:"18px",fontWeight:500,lineHeight:"24px"},yO={fontFamily:Wt.secondaryFontFamily,fontSize:"20px",fontWeight:700,lineHeight:"28px"},xO={fontFamily:Wt.secondaryFontFamily,fontSize:"24px",fontWeight:700,lineHeight:"32px"},bO={fontFamily:Wt.secondaryFontFamily,fontSize:"28px",fontWeight:700,lineHeight:"36px"},wO={fontFamily:Wt.secondaryFontFamily,fontSize:"32px",fontWeight:700,lineHeight:"40px"},CO={fontFamily:Wt.secondaryFontFamily,fontSize:"36px",fontWeight:700,lineHeight:"44px"},SO={fontFamily:Wt.secondaryFontFamily,fontSize:"40px",fontWeight:700,lineHeight:"52px"},PO={fontFamily:Wt.secondaryFontFamily,fontSize:"36px",fontWeight:700,lineHeight:"44px"},AO={fontFamily:Wt.secondaryFontFamily,fontSize:"44px",fontWeight:700,lineHeight:"52px"},IO={fontFamily:Wt.secondaryFontFamily,fontSize:"52px",fontWeight:700,lineHeight:"64px"},DO={fontFamily:Wt.secondaryFontFamily,fontSize:"96px",fontWeight:700,lineHeight:"112px"},she={font100:fO,font150:pO,font200:mO,font250:gO,font300:kO,font350:MO,font400:hO,font450:vO,font550:yO,font650:xO,font750:bO,font850:wO,font950:CO,font1050:SO,font1150:PO,font1250:AO,font1350:IO,font1450:DO,ParagraphXSmall:fO,ParagraphSmall:mO,ParagraphMedium:kO,ParagraphLarge:hO,LabelXSmall:pO,LabelSmall:gO,LabelMedium:MO,LabelLarge:vO,HeadingXSmall:yO,HeadingSmall:xO,HeadingMedium:bO,HeadingLarge:wO,HeadingXLarge:CO,HeadingXXLarge:SO,DisplayXSmall:PO,DisplaySmall:AO,DisplayMedium:IO,DisplayLarge:DO,MonoParagraphXSmall:{...fO,fontFamily:Wt.monoFontFamily},MonoParagraphSmall:{...mO,fontFamily:Wt.monoFontFamily},MonoParagraphMedium:{...kO,fontFamily:Wt.monoFontFamily},MonoParagraphLarge:{...hO,fontFamily:Wt.monoFontFamily},MonoLabelXSmall:{...pO,fontFamily:Wt.monoFontFamily},MonoLabelSmall:{...gO,fontFamily:Wt.monoFontFamily},MonoLabelMedium:{...MO,fontFamily:Wt.monoFontFamily},MonoLabelLarge:{...vO,fontFamily:Wt.monoFontFamily},MonoHeadingXSmall:{...yO,fontFamily:Wt.monoFontFamily},MonoHeadingSmall:{...xO,fontFamily:Wt.monoFontFamily},MonoHeadingMedium:{...bO,fontFamily:Wt.monoFontFamily},MonoHeadingLarge:{...wO,fontFamily:Wt.monoFontFamily},MonoHeadingXLarge:{...CO,fontFamily:Wt.monoFontFamily},MonoHeadingXXLarge:{...SO,fontFamily:Wt.monoFontFamily},MonoDisplayXSmall:{...PO,fontFamily:Wt.monoFontFamily},MonoDisplaySmall:{...AO,fontFamily:Wt.monoFontFamily},MonoDisplayMedium:{...IO,fontFamily:Wt.monoFontFamily},MonoDisplayLarge:{...DO,fontFamily:Wt.monoFontFamily}},wqe=Ag.default=she});var LO=Re(_C=>{"use strict";Object.defineProperty(_C,"__esModule",{value:!0});_C.default=void 0;var lhe={timing0:"0",timing100:"100ms",timing150:"150ms",timing200:"200ms",timing250:"250ms",timing300:"300ms",timing400:"400ms",timing500:"500ms",timing600:"600ms",timing700:"700ms",timing800:"800ms",timing900:"900ms",timing1000:"1000ms",timing1500:"1500ms",timing3000:"3000ms",timing5000:"5000ms",timing7000:"7000ms",easeLinear:"cubic-bezier(0, 0, 1, 1)",linearCurve:"cubic-bezier(0, 0, 1, 1)",easeDecelerate:"cubic-bezier(0.22, 1, 0.36, 1)",easeOutQuinticCurve:"cubic-bezier(0.22, 1, 0.36, 1)",easeOutCurve:"cubic-bezier(.2, .8, .4, 1)",easeAccelerate:"cubic-bezier(0.64, 0, 0.78, 0)",easeInQuinticCurve:"cubic-bezier(0.64, 0, 0.78, 0)",easeInCurve:"cubic-bezier(.8, .2, .6, 1)",easeAccelerateDecelerate:"cubic-bezier(0.83, 0, 0.17, 1)",easeInOutQuinticCurve:"cubic-bezier(0.86, 0, 0.07, 1)",easeInOutCurve:"cubic-bezier(0.4, 0, 0.2, 1)",easeResponsiveAccelerate:"cubic-bezier(0.11, 0, 0.5, 0)"},Sqe=_C.default=lhe});var BC=Re(FC=>{"use strict";Object.defineProperty(FC,"__esModule",{value:!0});FC.default=void 0;var uhe={small:320,medium:600,large:1136},Aqe=FC.default=uhe});var RO=Re(VC=>{"use strict";Object.defineProperty(VC,"__esModule",{value:!0});VC.default=void 0;var dhe={columns:[4,8,12],gutters:[16,36,36],margins:[16,36,64],gaps:0,unit:"px",maxWidth:1280},Dqe=VC.default=dhe});var q7=Re(Gs=>{"use strict";Object.defineProperty(Gs,"__esModule",{value:!0});Gs.getMinimumPageMargins=Gs.getMediaQueryPageMargins=Gs.getMediaQuery=Gs.getMediaQueries=void 0;var j7=e=>`@media screen and (min-width: ${e}px)`;Gs.getMediaQuery=j7;var z7=e=>Object.keys(e).map(t=>e[t]).sort((t,r)=>t-r).map(j7);Gs.getMediaQueries=z7;var che=e=>{let t=Array.isArray(e)?e[0]:e;return{paddingInlineStart:`${t}px`,paddingInlineEnd:`${t}px`}};Gs.getMinimumPageMargins=che;var fhe=e=>{let t={},r=z7(e.breakpoints);for(let[o,n]of r.entries()){let a=Array.isArray(e.grid.margins)?e.grid.margins[o]??e.grid.margins.at(-1):e.grid.margins;t[n]={paddingInlineStart:`${a}px`,paddingInlineEnd:`${a}px`}}return t};Gs.getMediaQueryPageMargins=fhe});var OO=Re(UC=>{"use strict";Object.defineProperty(UC,"__esModule",{value:!0});UC.default=void 0;var NO=q7(),TO=phe(BC());function phe(e){return e&&e.__esModule?e:{default:e}}var mhe={small:(0,NO.getMediaQuery)(TO.default.small),medium:(0,NO.getMediaQuery)(TO.default.medium),large:(0,NO.getMediaQuery)(TO.default.large)},Nqe=UC.default=mhe});var EO=Re(WC=>{"use strict";Object.defineProperty(WC,"__esModule",{value:!0});WC.default=void 0;var ghe={scale0:"2px",scale100:"4px",scale200:"6px",scale300:"8px",scale400:"10px",scale500:"12px",scale550:"14px",scale600:"16px",scale650:"18px",scale700:"20px",scale750:"22px",scale800:"24px",scale850:"28px",scale900:"32px",scale950:"36px",scale1000:"40px",scale1200:"48px",scale1400:"56px",scale1600:"64px",scale2400:"96px",scale3200:"128px",scale4800:"192px"},Oqe=WC.default=ghe});var jC=Re(GC=>{"use strict";Object.defineProperty(GC,"__esModule",{value:!0});GC.LightTheme=void 0;var khe=pi(Iv()),Mhe=pi(bg()),hhe=pi(NC()),vhe=pi(uO()),yhe=pi(dO()),xhe=pi(cO()),bhe=pi(Dv()),whe=pi(LO()),Che=pi(BC()),She=pi(RO()),Phe=pi(OO()),Ahe=pi(EO());function pi(e){return e&&e.__esModule?e:{default:e}}var _qe=GC.LightTheme={name:"light-theme",colors:{...khe.default,...Mhe.default,...(0,vhe.default)(),...(0,hhe.default)()},animation:whe.default,breakpoints:Che.default,borders:yhe.default,direction:"auto",grid:She.default,lighting:xhe.default,mediaQuery:Phe.default,sizing:Ahe.default,typography:bhe.default,zIndex:{modal:2e3}}});var bf=Re(_O=>{"use strict";Object.defineProperty(_O,"__esModule",{value:!0});_O.default=H7;function H7(e,...t){e=e||{};let r=t.length,o,n;for(let a=0;a<r;a++){o=t[a]||{};for(let i in o)typeof o[i]!==void 0&&(n=o[i],Ihe(n)?e[i]=H7(e[i]||Array.isArray(n)&&[]||{},n):e[i]=n)}return e}function Ihe(e){return Array.isArray(e)||{}.toString.call(e)=="[object Object]"}});var K7=Re(zC=>{"use strict";Object.defineProperty(zC,"__esModule",{value:!0});zC.LightThemeMove=void 0;var Dhe=Rhe(bf()),Lhe=jC();function Rhe(e){return e&&e.__esModule?e:{default:e}}var Vqe=zC.LightThemeMove=(0,Dhe.default)({},Lhe.LightTheme,{name:"light-theme-with-move"})});var Lv=Re(Dg=>{"use strict";Object.defineProperty(Dg,"__esModule",{value:!0});Dg.foundationColors=Dg.default=void 0;var Ig=xf(),Nhe=Dg.foundationColors={primaryA:Ig.primitiveDarkColors.gray900Dark,primaryB:Ig.primitiveDarkColors.gray50Dark,primary:"#FFFFFF",primary50:"#F6F6F6",primary100:"#EEEEEE",primary200:"#E2E2E2",primary300:"#CBCBCB",primary400:"#AFAFAF",primary500:"#6B6B6B",primary600:"#545454",primary700:"#333333",accent:Ig.primitiveDarkColors.blue400Dark,accent50:"#EFF3FE",accent100:"#D4E2FC",accent200:"#A0BFF8",accent300:"#5B91F5",accent400:"#276EF1",accent500:"#1E54B7",accent600:"#174291",accent700:"#102C60",negative:Ig.primitiveDarkColors.red400Dark,negative50:"#FFEFED",negative100:"#FED7D2",negative200:"#F1998E",negative300:"#E85C4A",negative400:"#E11900",negative500:"#AB1300",negative600:"#870F00",negative700:"#5A0A00",warning:Ig.primitiveDarkColors.yellow400Dark,warning50:"#FFFAF0",warning100:"#FFF2D9",warning200:"#FFE3AC",warning300:"#FFCF70",warning400:"#FFC043",warning500:"#BC8B2C",warning600:"#996F00",warning700:"#674D1B",positive:Ig.primitiveDarkColors.green400Dark,positive50:"#E6F2ED",positive100:"#ADDEC9",positive200:"#66D19E",positive300:"#06C167",positive400:"#048848",positive500:"#03703C",positive600:"#03582F",positive700:"#10462D",white:"#FFFFFF",black:"#000000",mono100:"#CBCBCB",mono200:"#AFAFAF",mono300:"#6B6B6B",mono400:"#545454",mono500:"#333333",mono600:"#292929",mono700:"#1F1F1F",mono800:"#141414",mono900:"#111111",mono1000:"#000000"},Wqe=Dg.default=Nhe});var KC=Re(HC=>{"use strict";Object.defineProperty(HC,"__esModule",{value:!0});HC.default=void 0;var The=Ohe(Lv()),qC=LC(),ce=bg();function Ohe(e){return e&&e.__esModule?e:{default:e}}var Ehe=(e=The.default)=>{let t={backgroundPrimary:e.primaryB,backgroundSecondary:ce.primitiveDarkColors.gray100Dark,backgroundTertiary:ce.primitiveDarkColors.gray200Dark,backgroundInversePrimary:ce.primitiveDarkColors.gray800Dark,backgroundInverseSecondary:ce.primitiveDarkColors.gray700Dark,contentPrimary:e.primaryA,contentSecondary:ce.primitiveDarkColors.gray800Dark,contentTertiary:ce.primitiveDarkColors.gray700Dark,contentInversePrimary:ce.primitiveDarkColors.black,contentInverseSecondary:ce.primitiveDarkColors.gray200Dark,contentInverseTertiary:ce.primitiveDarkColors.gray300Dark,borderOpaque:ce.primitiveDarkColors.gray100Dark,borderTransparent:(0,qC.hexToRgb)(e.primaryA,"0.08")||"",borderSelected:e.primaryA,borderInverseOpaque:ce.primitiveDarkColors.gray300Dark,borderInverseTransparent:(0,qC.hexToRgb)(e.primaryB,"0.2")||"",borderInverseSelected:e.primaryB,brandBackgroundPrimary:ce.primitiveDarkColors.brandDefault500Dark,brandBackgroundSecondary:ce.primitiveDarkColors.brandDefault100Dark,brandBackgroundTertiary:ce.primitiveDarkColors.white,brandBackgroundDisabled:ce.primitiveDarkColors.brandDefault100Dark,brandContentPrimary:ce.primitiveDarkColors.brandDefault600Dark,brandContentOnPrimary:ce.primitiveDarkColors.white,brandContentOnSecondary:ce.primitiveDarkColors.brandDefault700Dark,brandContentOnTertiary:ce.primitiveDarkColors.black,brandContentOnGradient:ce.primitiveDarkColors.white,brandContentDisabled:ce.primitiveDarkColors.brandDefault400Dark,brandBorderAccessible:ce.primitiveDarkColors.brandDefault600Dark,brandBorderSubtle:ce.primitiveDarkColors.brandDefault400Dark},r={backgroundStateDisabled:ce.primitiveDarkColors.gray100Dark,backgroundOverlay:(0,qC.hexToRgb)(ce.primitiveDarkColors.black,"0.7")||"",backgroundOverlayArt:(0,qC.hexToRgb)(ce.primitiveDarkColors.black,"0.16")||"",backgroundAccent:e.accent,backgroundNegative:e.negative,backgroundWarning:e.warning,backgroundPositive:e.positive,backgroundAccentLight:ce.primitiveDarkColors.blue100Dark,backgroundPositiveLight:ce.primitiveDarkColors.green100Dark,backgroundNegativeLight:ce.primitiveDarkColors.red100Dark,backgroundWarningLight:ce.primitiveDarkColors.yellow100Dark,backgroundAlwaysDark:ce.primitiveDarkColors.gray100Dark,backgroundAlwaysLight:ce.primitiveDarkColors.gray900Dark,contentStateDisabled:ce.primitiveDarkColors.gray400Dark,contentAccent:ce.primitiveDarkColors.blue600Dark,contentOnColor:ce.primitiveDarkColors.gray900Dark,contentOnColorInverse:ce.primitiveDarkColors.black,contentNegative:ce.primitiveDarkColors.red600Dark,contentWarning:ce.primitiveDarkColors.yellow600Dark,contentPositive:ce.primitiveDarkColors.green600Dark,tagRedContentSecondary:ce.primitiveDarkColors.red700Dark,borderStateDisabled:ce.primitiveDarkColors.gray100Dark,borderAccent:ce.primitiveDarkColors.blue500Dark,borderAccentLight:ce.primitiveDarkColors.blue400Dark,borderNegative:ce.primitiveDarkColors.red500Dark,borderNegativeLight:ce.primitiveDarkColors.red400Dark,borderWarning:ce.primitiveDarkColors.yellow500Dark,borderWarningLight:ce.primitiveDarkColors.yellow400Dark,borderPositive:ce.primitiveDarkColors.green500Dark,borderPositiveLight:ce.primitiveDarkColors.green400Dark,tagRedBorderSecondarySelected:ce.primitiveDarkColors.red800Dark,safety:ce.primitiveLightColors.blue600,eatsGreen400:ce.primitiveLightColors.green600,freightBlue400:ce.primitiveLightColors.cobalt400,rewardsTier1:ce.primitiveLightColors.blue600,rewardsTier2:ce.primitiveLightColors.yellow300,rewardsTier3:ce.primitiveLightColors.platinum400,rewardsTier4:ce.primitiveLightColors.black,membership:ce.primitiveLightColors.yellow600},o={jumpRed400:ce.primitiveLightColors.red600,backgroundOverlayLight:r.backgroundOverlay,backgroundOverlayDark:r.backgroundOverlay,backgroundLightAccent:r.backgroundAccentLight,backgroundLightPositive:r.backgroundPositiveLight,backgroundLightWarning:r.backgroundWarningLight,backgroundLightNegative:r.backgroundNegativeLight},n={tagGrayBackgroundPrimary:ce.primitiveDarkColors.gray400Dark,tagGrayBackgroundSecondary:ce.primitiveDarkColors.gray100Dark,tagGrayContentPrimary:ce.primitiveDarkColors.gray900Dark,tagGrayContentSecondary:ce.primitiveDarkColors.gray700Dark,tagGrayBackgroundStateDisabled:ce.primitiveDarkColors.gray100Dark,tagGrayContentStateDisabled:ce.primitiveDarkColors.gray400Dark,tagGrayBorderPrimaryUnselected:ce.primitiveDarkColors.gray500Dark,tagGrayBorderSecondaryUnselected:ce.primitiveDarkColors.gray500Dark,tagGrayBorderSecondarySelected:ce.primitiveDarkColors.gray800Dark,tagRedBackgroundPrimary:ce.primitiveDarkColors.red400Dark,tagRedBackgroundSecondary:ce.primitiveDarkColors.red100Dark,tagRedContentPrimary:ce.primitiveDarkColors.red900Dark,tagRedContentSecondary:ce.primitiveDarkColors.red700Dark,tagRedBackgroundStateDisabled:ce.primitiveDarkColors.red100Dark,tagRedContentStateDisabled:ce.primitiveDarkColors.red400Dark,tagRedBorderPrimaryUnselected:ce.primitiveDarkColors.red500Dark,tagRedBorderSecondaryUnselected:ce.primitiveDarkColors.red500Dark,tagRedBorderSecondarySelected:ce.primitiveDarkColors.red800Dark,tagOrangeBackgroundPrimary:ce.primitiveDarkColors.orange400Dark,tagOrangeBackgroundSecondary:ce.primitiveDarkColors.orange100Dark,tagOrangeContentPrimary:ce.primitiveDarkColors.orange900Dark,tagOrangeContentSecondary:ce.primitiveDarkColors.orange700Dark,tagOrangeBackgroundStateDisabled:ce.primitiveDarkColors.orange100Dark,tagOrangeContentStateDisabled:ce.primitiveDarkColors.orange400Dark,tagYellowBackgroundPrimary:ce.primitiveDarkColors.yellow700Dark,tagOrangeBorderPrimaryUnselected:ce.primitiveDarkColors.orange500Dark,tagYellowBackgroundSecondary:ce.primitiveDarkColors.yellow100Dark,tagOrangeBorderSecondaryUnselected:ce.primitiveDarkColors.orange500Dark,tagOrangeBorderSecondarySelected:ce.primitiveDarkColors.orange800Dark,tagYellowContentPrimary:ce.primitiveDarkColors.yellow50Dark,tagYellowContentSecondary:ce.primitiveDarkColors.yellow900Dark,tagYellowBackgroundStateDisabled:ce.primitiveDarkColors.yellow100Dark,tagYellowContentStateDisabled:ce.primitiveDarkColors.yellow400Dark,tagYellowBorderPrimaryUnselected:ce.primitiveDarkColors.yellow800Dark,tagYellowBorderSecondaryUnselected:ce.primitiveDarkColors.yellow500Dark,tagYellowBorderSecondarySelected:ce.primitiveDarkColors.yellow800Dark,tagGreenBackgroundPrimary:ce.primitiveDarkColors.green400Dark,tagGreenBackgroundSecondary:ce.primitiveDarkColors.green100Dark,tagGreenContentPrimary:ce.primitiveDarkColors.green900Dark,tagGreenContentSecondary:ce.primitiveDarkColors.green700Dark,tagGreenBackgroundStateDisabled:ce.primitiveDarkColors.green100Dark,tagGreenContentStateDisabled:ce.primitiveDarkColors.green400Dark,tagGreenBorderPrimaryUnselected:ce.primitiveDarkColors.green500Dark,tagBlueBackgroundPrimary:ce.primitiveDarkColors.blue400Dark,tagBlueBackgroundSecondary:ce.primitiveDarkColors.blue100Dark,tagGreenBorderSecondaryUnselected:ce.primitiveDarkColors.green500Dark,tagBlueContentPrimary:ce.primitiveDarkColors.blue900Dark,tagGreenBorderSecondarySelected:ce.primitiveDarkColors.green800Dark,tagBlueContentSecondary:ce.primitiveDarkColors.blue700Dark,tagBlueBackgroundStateDisabled:ce.primitiveDarkColors.blue100Dark,tagBlueContentStateDisabled:ce.primitiveDarkColors.blue400Dark,tagBlueBorderPrimaryUnselected:ce.primitiveDarkColors.blue500Dark,tagPurpleBackgroundPrimary:ce.primitiveDarkColors.purple400Dark,tagPurpleBackgroundSecondary:ce.primitiveDarkColors.purple100Dark,tagBlueBorderSecondaryUnselected:ce.primitiveDarkColors.blue500Dark,tagBlueBorderSecondarySelected:ce.primitiveDarkColors.blue800Dark,tagPurpleContentPrimary:ce.primitiveDarkColors.purple900Dark,tagPurpleContentSecondary:ce.primitiveDarkColors.purple700Dark,tagPurpleBackgroundStateDisabled:ce.primitiveDarkColors.purple100Dark,tagPurpleContentStateDisabled:ce.primitiveDarkColors.purple400Dark,tagPurpleBorderPrimaryUnselected:ce.primitiveDarkColors.purple500Dark,tagMagentaBackgroundPrimary:ce.primitiveDarkColors.magenta400Dark,tagPurpleBorderSecondaryUnselected:ce.primitiveDarkColors.purple500Dark,tagMagentaBackgroundSecondary:ce.primitiveDarkColors.magenta100Dark,tagPurpleBorderSecondarySelected:ce.primitiveDarkColors.purple800Dark,tagMagentaContentPrimary:ce.primitiveDarkColors.magenta900Dark,tagMagentaContentSecondary:ce.primitiveDarkColors.magenta700Dark,tagMagentaBackgroundStateDisabled:ce.primitiveDarkColors.magenta100Dark,tagMagentaContentStateDisabled:ce.primitiveDarkColors.magenta400Dark,tagMagentaBorderPrimaryUnselected:ce.primitiveDarkColors.magenta500Dark,tagMagentaBorderSecondaryUnselected:ce.primitiveDarkColors.magenta500Dark,tagMagentaBorderSecondarySelected:ce.primitiveDarkColors.magenta800Dark,tagTealBackgroundPrimary:ce.primitiveDarkColors.teal400Dark,tagTealBackgroundSecondary:ce.primitiveDarkColors.teal100Dark,tagTealContentPrimary:ce.primitiveDarkColors.teal900Dark,tagTealContentSecondary:ce.primitiveDarkColors.teal700Dark,tagTealBackgroundStateDisabled:ce.primitiveDarkColors.teal100Dark,tagTealContentStateDisabled:ce.primitiveDarkColors.teal400Dark,tagTealBorderPrimaryUnselected:ce.primitiveDarkColors.teal500Dark,tagTealBorderSecondaryUnselected:ce.primitiveDarkColors.teal500Dark,tagTealBorderSecondarySelected:ce.primitiveDarkColors.teal800Dark,tagLimeBackgroundPrimary:ce.primitiveDarkColors.lime400Dark,tagLimeBackgroundSecondary:ce.primitiveDarkColors.lime100Dark,tagLimeContentPrimary:ce.primitiveDarkColors.lime900Dark,tagLimeContentSecondary:ce.primitiveDarkColors.lime700Dark,tagLimeBackgroundStateDisabled:ce.primitiveDarkColors.lime100Dark,tagLimeContentStateDisabled:ce.primitiveDarkColors.lime400Dark,tagLimeBorderPrimaryUnselected:ce.primitiveDarkColors.lime500Dark,tagLimeBorderSecondaryUnselected:ce.primitiveDarkColors.lime500Dark,tagLimeBorderSecondarySelected:ce.primitiveDarkColors.lime800Dark};return{...t,...r,...n,...{hoverOverlayInverseAlpha:"rgba(0, 0, 0, 0.04)",hoverOverlayAlpha:"rgba(255, 255, 255, 0.1)",hoverNegativeAlpha:"rgba(163, 44, 52, 0.4)",pressedOverlayAlpha:"rgba(255, 255, 255, 0.15)",pressedOverlayInverseAlpha:"rgba(0, 0, 0, 0.08)",pressedNegativeAlpha:"rgba(163, 44, 52, 0.6)"},...o}};HC.default=Ehe});var FO=Re($C=>{"use strict";Object.defineProperty($C,"__esModule",{value:!0});$C.default=void 0;var _he=Fhe(KC()),ke=xf();function Fhe(e){return e&&e.__esModule?e:{default:e}}var Bhe=(0,_he.default)(),Lg="rgba(255, 255, 255, 0.2)",Vhe=(e=Bhe)=>({bannerActionLowInfo:ke.primitiveDarkColors.blue100Dark,bannerActionLowNegative:ke.primitiveDarkColors.red200Dark,bannerActionLowPositive:ke.primitiveDarkColors.green200Dark,bannerActionLowWarning:ke.primitiveDarkColors.yellow200Dark,bannerActionHighInfo:ke.primitiveDarkColors.blue300Dark,bannerActionHighNegative:ke.primitiveDarkColors.red300Dark,bannerActionHighPositive:ke.primitiveDarkColors.green300Dark,bannerActionHighWarning:ke.primitiveDarkColors.yellow300Dark,bottomNavigationText:ke.primitiveDarkColors.gray600Dark,bottomNavigationSelectedText:e.contentPrimary,buttonPrimaryFill:e.backgroundInversePrimary,buttonPrimaryText:e.contentInversePrimary,buttonPrimaryHover:ke.primitiveDarkColors.gray700Dark,buttonPrimaryActive:ke.primitiveDarkColors.gray600Dark,buttonPrimaryHoverOverlay:e.hoverOverlayInverseAlpha,buttonPrimaryActiveOverlay:e.pressedOverlayInverseAlpha,buttonPrimarySelectedFill:e.backgroundInversePrimary,buttonPrimarySelectedText:e.contentInversePrimary,buttonPrimaryLoadingFill:e.backgroundInversePrimary,buttonPrimarySpinnerForeground:e.backgroundAccent,buttonPrimarySpinnerBackground:e.backgroundPrimary,buttonSecondaryFill:e.backgroundSecondary,buttonSecondaryText:e.contentPrimary,buttonSecondaryHover:ke.primitiveDarkColors.gray300Dark,buttonSecondaryActive:ke.primitiveDarkColors.gray400Dark,buttonSecondaryHoverOverlay:e.hoverOverlayAlpha,buttonSecondaryActiveOverlay:e.pressedOverlayAlpha,buttonSecondarySelectedFill:e.backgroundInversePrimary,buttonSecondarySelectedText:e.contentInversePrimary,buttonSecondaryLoadingFill:e.backgroundSecondary,buttonSecondarySpinnerForeground:e.backgroundAccent,buttonSecondarySpinnerBackground:e.backgroundPrimary,buttonTertiaryFill:"transparent",buttonTertiaryText:e.contentPrimary,buttonTertiaryHover:ke.primitiveDarkColors.gray100Dark,buttonTertiaryActive:ke.primitiveDarkColors.gray200Dark,buttonTertiaryHoverOverlay:e.hoverOverlayAlpha,buttonTertiaryActiveOverlay:e.pressedOverlayAlpha,buttonTertiarySelectedFill:"transparent",buttonTertiarySelectedText:e.contentPrimary,buttonTertiaryLoadingFill:"transparent",buttonTertiaryFocusFill:e.backgroundTertiary,buttonTertiaryDisabledActiveFill:e.backgroundStateDisabled,buttonTertiaryDisabledActiveText:e.contentStateDisabled,buttonTertiarySpinnerForeground:e.backgroundAccent,buttonTertiarySpinnerBackground:e.backgroundTertiary,buttonDangerPrimaryFill:e.backgroundNegative,buttonDangerPrimaryText:e.contentOnColor,buttonDangerPrimaryHoverOverlay:e.hoverOverlayAlpha,buttonDangerPrimaryActiveOverlay:e.pressedOverlayAlpha,buttonDangerPrimarySelectedFill:e.backgroundNegative,buttonDangerPrimarySelectedText:e.contentOnColor,buttonDangerPrimaryLoadingFill:e.backgroundNegative,buttonDangerPrimarySpinnerForeground:e.backgroundAccent,buttonDangerPrimarySpinnerBackground:e.backgroundPrimary,buttonDangerSecondaryFill:e.backgroundSecondary,buttonDangerSecondaryText:e.contentNegative,buttonDangerSecondaryHoverOverlay:e.hoverOverlayAlpha,buttonDangerSecondaryActiveOverlay:e.pressedOverlayAlpha,buttonDangerSecondarySelectedFill:e.backgroundNegative,buttonDangerSecondarySelectedText:e.contentOnColor,buttonDangerSecondaryLoadingFill:e.backgroundSecondary,buttonDangerSecondarySpinnerForeground:e.backgroundAccent,buttonDangerSecondarySpinnerBackground:e.backgroundPrimary,buttonDangerTertiaryFill:"transparent",buttonDangerTertiaryText:e.contentNegative,buttonDangerTertiaryHoverOverlay:e.hoverOverlayAlpha,buttonDangerTertiaryActiveOverlay:e.pressedOverlayAlpha,buttonDangerTertiarySelectedFill:e.backgroundPrimary,buttonDangerTertiarySelectedText:e.contentNegative,buttonDangerTertiaryLoadingFill:"transparent",buttonDangerTertiarySpinnerForeground:e.backgroundAccent,buttonDangerTertiarySpinnerBackground:e.backgroundPrimary,buttonOutlineFill:"transparent",buttonOutlineText:e.contentPrimary,buttonOutlineHoverOverlay:e.hoverOverlayAlpha,buttonOutlineActiveOverlay:e.pressedOverlayAlpha,buttonOutlineSelectedFill:"transparent",buttonOutlineSelectedText:e.contentPrimary,buttonOutlineFocusFill:e.backgroundTertiary,buttonOutlineLoadingFill:"transparent",buttonOutlineSpinnerForeground:e.backgroundAccent,buttonOutlineSpinnerBackground:e.backgroundPrimary,buttonDisabledFill:e.backgroundStateDisabled,buttonDisabledText:e.contentStateDisabled,buttonDisabledActiveFill:e.backgroundStateDisabled,buttonDisabledActiveText:e.contentStateDisabled,buttonDisabledSpinnerForeground:e.contentStateDisabled,buttonDisabledSpinnerBackground:e.backgroundPrimary,buttonOuterBorder:e.borderSelected,buttonOutlineOuterBorder:e.borderOpaque,buttonDangerTertiaryOuterBorder:e.tagRedBorderSecondarySelected,buttonInnerBorder:e.contentInversePrimary,buttonTransparentBorder:"transparent",buttonFocusOuterBorder:e.borderAccent,breadcrumbsText:e.contentPrimary,breadcrumbsSeparatorFill:e.contentTertiary,calendarBackground:e.backgroundPrimary,calendarForeground:e.contentPrimary,calendarForegroundDisabled:e.contentStateDisabled,calendarHeaderBackground:e.backgroundPrimary,calendarHeaderForeground:e.contentPrimary,calendarHeaderBackgroundActive:e.backgroundInversePrimary,calendarHeaderForegroundDisabled:e.contentStateDisabled,calendarDayForegroundPseudoSelected:e.backgroundInversePrimary,calendarDayBackgroundPseudoSelectedHighlighted:e.backgroundTertiary,calendarDayForegroundPseudoSelectedHighlighted:e.contentPrimary,calendarDayBackgroundSelected:e.backgroundInversePrimary,calendarDayForegroundSelected:e.contentInversePrimary,calendarDayBackgroundSelectedHighlighted:e.backgroundInversePrimary,calendarDayForegroundSelectedHighlighted:e.contentInversePrimary,comboboxListItemFocus:e.backgroundSecondary,comboboxListItemHover:e.backgroundTertiary,fileUploaderBackgroundColor:e.backgroundSecondary,fileUploaderBackgroundColorActive:e.backgroundPrimary,fileUploaderBorderColorActive:e.borderSelected,fileUploaderBorderColorDefault:e.borderOpaque,fileUploaderMessageColor:e.contentPrimary,linkText:e.contentPrimary,linkVisited:ke.primitiveDarkColors.gray500Dark,linkHover:ke.primitiveDarkColors.gray700Dark,linkActive:ke.primitiveDarkColors.gray600Dark,listHeaderFill:e.backgroundPrimary,listBodyFill:e.backgroundPrimary,progressStepsCompletedText:e.contentInversePrimary,progressStepsCompletedFill:e.backgroundInversePrimary,progressStepsActiveText:e.contentInversePrimary,progressStepsActiveFill:e.backgroundInversePrimary,modalCloseColor:e.contentPrimary,modalCloseColorHover:ke.primitiveDarkColors.gray700Dark,modalCloseColorFocus:ke.primitiveDarkColors.gray600Dark,notificationInfoBackground:e.backgroundAccentLight,notificationInfoText:e.contentPrimary,notificationPositiveBackground:e.backgroundPositiveLight,notificationPositiveText:e.contentPrimary,notificationWarningBackground:e.backgroundWarningLight,notificationWarningText:e.contentPrimary,notificationNegativeBackground:e.backgroundNegativeLight,notificationNegativeText:e.contentPrimary,tagFontDisabledRampUnit:"600",tagSolidFontRampUnit:"0",tagSolidRampUnit:"600",tagOutlinedFontRampUnit:"500",tagOutlinedRampUnit:"500",tagSolidHoverRampUnit:"500",tagSolidActiveRampUnit:"400",tagSolidDisabledRampUnit:"700",tagSolidFontHoverRampUnit:"100",tagLightRampUnit:"700",tagLightHoverRampUnit:"700",tagLightActiveRampUnit:"600",tagLightFontRampUnit:"100",tagLightFontHoverRampUnit:"100",tagOutlinedActiveRampUnit:"300",tagOutlinedHoverRampUnit:"800",tagOutlinedFontHoverRampUnit:"100",tagNeutralFontDisabled:ke.primitiveDarkColors.gray400Dark,tagNeutralOutlinedDisabled:ke.primitiveDarkColors.gray400Dark,tagNeutralSolidFont:ke.primitiveDarkColors.gray900Dark,tagNeutralSolidBackground:ke.primitiveDarkColors.gray400Dark,tagNeutralOutlinedBackground:ke.primitiveDarkColors.gray100Dark,tagNeutralOutlinedFont:ke.primitiveDarkColors.gray700Dark,tagNeutralSolidHover:ke.primitiveDarkColors.gray700Dark,tagNeutralSolidActive:ke.primitiveDarkColors.gray600Dark,tagNeutralSolidDisabled:ke.primitiveDarkColors.gray100Dark,tagNeutralSolidFontHover:ke.primitiveDarkColors.gray800Dark,tagNeutralLightBackground:ke.primitiveDarkColors.gray100Dark,tagNeutralLightHover:ke.primitiveDarkColors.gray800Dark,tagNeutralLightActive:ke.primitiveDarkColors.gray700Dark,tagNeutralLightDisabled:ke.primitiveDarkColors.gray400Dark,tagNeutralLightFont:ke.primitiveDarkColors.gray900Dark,tagNeutralLightFontHover:ke.primitiveDarkColors.gray800Dark,tagNeutralOutlinedActive:ke.primitiveDarkColors.gray700Dark,tagNeutralOutlinedFontHover:ke.primitiveDarkColors.gray700Dark,tagNeutralOutlinedHover:Lg,tagPrimaryOutlinedFont:ke.primitiveDarkColors.gray700Dark,tagPrimaryOutlinedBackground:ke.primitiveDarkColors.gray100Dark,tagPrimarySolidFont:ke.primitiveDarkColors.gray900Dark,tagPrimarySolidBackground:ke.primitiveDarkColors.gray400Dark,tagPrimaryFontDisabled:ke.primitiveDarkColors.gray400Dark,tagPrimaryOutlinedDisabled:ke.primitiveDarkColors.gray400Dark,tagPrimarySolidHover:ke.primitiveDarkColors.gray300Dark,tagPrimarySolidActive:ke.primitiveDarkColors.gray200Dark,tagPrimarySolidDisabled:ke.primitiveDarkColors.gray100Dark,tagPrimarySolidFontHover:ke.primitiveDarkColors.gray800Dark,tagPrimaryLightBackground:ke.primitiveDarkColors.gray100Dark,tagPrimaryLightHover:ke.primitiveDarkColors.gray200Dark,tagPrimaryLightActive:ke.primitiveDarkColors.gray300Dark,tagPrimaryLightDisabled:ke.primitiveDarkColors.gray400Dark,tagPrimaryLightFont:ke.primitiveDarkColors.gray900Dark,tagPrimaryLightFontHover:ke.primitiveDarkColors.gray800Dark,tagPrimaryOutlinedActive:ke.primitiveDarkColors.gray700Dark,tagPrimaryOutlinedFontHover:ke.primitiveDarkColors.gray700Dark,tagPrimaryOutlinedHover:Lg,tagAccentOutlinedFont:ke.primitiveDarkColors.blue700Dark,tagAccentOutlinedBackground:ke.primitiveDarkColors.blue100Dark,tagAccentSolidFont:ke.primitiveDarkColors.blue900Dark,tagAccentSolidBackground:ke.primitiveDarkColors.blue500Dark,tagAccentFontDisabled:ke.primitiveDarkColors.blue400Dark,tagAccentOutlinedDisabled:ke.primitiveDarkColors.blue400Dark,tagAccentSolidHover:ke.primitiveDarkColors.blue300Dark,tagAccentSolidActive:ke.primitiveDarkColors.blue200Dark,tagAccentSolidDisabled:ke.primitiveDarkColors.blue100Dark,tagAccentSolidFontHover:ke.primitiveDarkColors.gray800Dark,tagAccentLightBackground:ke.primitiveDarkColors.blue100Dark,tagAccentLightHover:ke.primitiveDarkColors.blue200Dark,tagAccentLightActive:ke.primitiveDarkColors.blue300Dark,tagAccentLightDisabled:ke.primitiveDarkColors.blue400Dark,tagAccentLightFont:ke.primitiveDarkColors.blue900Dark,tagAccentLightFontHover:ke.primitiveDarkColors.blue800Dark,tagAccentOutlinedActive:ke.primitiveDarkColors.blue700Dark,tagAccentOutlinedFontHover:ke.primitiveDarkColors.blue700Dark,tagAccentOutlinedHover:Lg,tagPositiveFontDisabled:ke.primitiveDarkColors.green400Dark,tagPositiveOutlinedDisabled:ke.primitiveDarkColors.green400Dark,tagPositiveSolidFont:ke.primitiveDarkColors.green900Dark,tagPositiveSolidBackground:ke.primitiveDarkColors.green500Dark,tagPositiveOutlinedBackground:ke.primitiveDarkColors.green100Dark,tagPositiveOutlinedFont:ke.primitiveDarkColors.green700Dark,tagPositiveSolidHover:ke.primitiveDarkColors.green300Dark,tagPositiveSolidActive:ke.primitiveDarkColors.green200Dark,tagPositiveSolidDisabled:ke.primitiveDarkColors.green100Dark,tagPositiveSolidFontHover:ke.primitiveDarkColors.gray800Dark,tagPositiveLightBackground:ke.primitiveDarkColors.green100Dark,tagPositiveLightHover:ke.primitiveDarkColors.green200Dark,tagPositiveLightActive:ke.primitiveDarkColors.green300Dark,tagPositiveLightDisabled:ke.primitiveDarkColors.green400Dark,tagPositiveLightFont:ke.primitiveDarkColors.green900Dark,tagPositiveLightFontHover:ke.primitiveDarkColors.green800Dark,tagPositiveOutlinedActive:ke.primitiveDarkColors.green700Dark,tagPositiveOutlinedFontHover:ke.primitiveDarkColors.green700Dark,tagPositiveOutlinedHover:Lg,tagWarningOutlinedFont:ke.primitiveDarkColors.yellow700Dark,tagWarningOutlinedBackground:ke.primitiveDarkColors.yellow100Dark,tagWarningSolidFont:ke.primitiveDarkColors.yellow50Dark,tagWarningSolidBackground:ke.primitiveDarkColors.yellow700Dark,tagWarningFontDisabled:ke.primitiveDarkColors.yellow400Dark,tagWarningOutlinedDisabled:ke.primitiveDarkColors.yellow400Dark,tagWarningSolidHover:ke.primitiveDarkColors.yellow300Dark,tagWarningSolidActive:ke.primitiveDarkColors.yellow200Dark,tagWarningSolidDisabled:ke.primitiveDarkColors.yellow100Dark,tagWarningSolidFontHover:ke.primitiveDarkColors.gray800Dark,tagWarningLightBackground:ke.primitiveDarkColors.yellow100Dark,tagWarningLightHover:ke.primitiveDarkColors.yellow200Dark,tagWarningLightActive:ke.primitiveDarkColors.yellow300Dark,tagWarningLightDisabled:ke.primitiveDarkColors.yellow400Dark,tagWarningLightFont:ke.primitiveDarkColors.yellow900Dark,tagWarningLightFontHover:ke.primitiveDarkColors.yellow800Dark,tagWarningOutlinedActive:ke.primitiveDarkColors.yellow700Dark,tagWarningOutlinedFontHover:ke.primitiveDarkColors.yellow700Dark,tagWarningOutlinedHover:Lg,tagNegativeOutlinedFont:ke.primitiveDarkColors.red700Dark,tagNegativeOutlinedBackground:ke.primitiveDarkColors.red100Dark,tagNegativeSolidFont:ke.primitiveDarkColors.gray900Dark,tagNegativeSolidBackground:ke.primitiveDarkColors.red500Dark,tagNegativeFontDisabled:ke.primitiveDarkColors.red400Dark,tagNegativeOutlinedDisabled:ke.primitiveDarkColors.red400Dark,tagNegativeSolidHover:ke.primitiveDarkColors.red300Dark,tagNegativeSolidActive:ke.primitiveDarkColors.red200Dark,tagNegativeSolidDisabled:ke.primitiveDarkColors.red100Dark,tagNegativeSolidFontHover:ke.primitiveDarkColors.gray800Dark,tagNegativeLightBackground:ke.primitiveDarkColors.red100Dark,tagNegativeLightHover:ke.primitiveDarkColors.red200Dark,tagNegativeLightActive:ke.primitiveDarkColors.red300Dark,tagNegativeLightDisabled:ke.primitiveDarkColors.red400Dark,tagNegativeLightFont:ke.primitiveDarkColors.red900Dark,tagNegativeLightFontHover:ke.primitiveDarkColors.red800Dark,tagNegativeOutlinedActive:ke.primitiveDarkColors.red700Dark,tagNegativeOutlinedFontHover:ke.primitiveDarkColors.red700Dark,tagNegativeOutlinedHover:Lg,tableHeadBackgroundColor:e.backgroundPrimary,tableBackground:e.backgroundPrimary,tableStripedBackground:e.backgroundSecondary,tableFilter:e.contentTertiary,tableFilterHeading:e.contentPrimary,tableFilterBackground:e.backgroundPrimary,tableFilterFooterBackground:e.backgroundSecondary,toastText:e.contentOnColor,toastPrimaryText:e.contentOnColor,toastInfoBackground:e.backgroundAccent,toastInfoText:e.contentOnColor,toastPositiveBackground:e.backgroundPositive,toastPositiveText:e.contentOnColor,toastWarningBackground:e.backgroundWarning,toastWarningText:e.contentOnColorInverse,toastNegativeBackground:e.backgroundNegative,toastNegativeText:e.contentOnColor,toggleFill:e.backgroundPrimary,toggleFillChecked:e.contentPrimary,toggleFillDisabled:e.contentStateDisabled,toggleTrackFill:e.backgroundTertiary,toggleTrackFillDisabled:e.backgroundStateDisabled,tickFill:e.backgroundPrimary,tickFillHover:ke.primitiveDarkColors.gray100Dark,tickFillActive:ke.primitiveDarkColors.gray200Dark,tickFillSelected:e.contentPrimary,tickFillSelectedHover:ke.primitiveDarkColors.gray800Dark,tickFillSelectedHoverActive:ke.primitiveDarkColors.gray700Dark,tickFillError:e.backgroundPrimary,tickFillErrorHover:ke.primitiveDarkColors.gray100Dark,tickFillErrorHoverActive:ke.primitiveDarkColors.gray200Dark,tickFillErrorSelected:e.contentNegative,tickFillErrorSelectedHover:ke.primitiveDarkColors.red500Dark,tickFillErrorSelectedHoverActive:ke.primitiveDarkColors.red400Dark,tickFillDisabled:e.backgroundStateDisabled,tickBorder:e.contentTertiary,tickBorderError:e.borderNegative,tickMarkFill:e.contentInversePrimary,tickMarkFillError:e.contentOnColor,tickMarkFillDisabled:e.contentInversePrimary,sliderTrackFill:"transparent",sliderHandleFill:e.contentPrimary,sliderHandleFillDisabled:e.backgroundStateDisabled,sliderHandleInnerFill:e.contentPrimary,sliderTrackFillHover:ke.primitiveDarkColors.gray300Dark,sliderTrackFillActive:ke.primitiveDarkColors.gray400Dark,sliderTrackFillDisabled:e.backgroundStateDisabled,sliderHandleInnerFillDisabled:e.backgroundStateDisabled,sliderHandleInnerFillSelectedHover:ke.primitiveDarkColors.gray600Dark,sliderHandleInnerFillSelectedActive:ke.primitiveDarkColors.gray700Dark,inputBorder:e.borderOpaque,inputFill:e.backgroundSecondary,inputFillError:e.backgroundPrimary,inputFillDisabled:e.backgroundStateDisabled,inputFillActive:e.backgroundPrimary,inputFillPositive:e.backgroundPrimary,inputTextDisabled:e.contentStateDisabled,inputBorderError:e.borderNegative,inputBorderPositive:e.borderPositive,inputEnhancerFill:e.contentPrimary,inputEnhancerFillDisabled:e.contentStateDisabled,inputEnhancerTextDisabled:e.contentStateDisabled,inputPlaceholder:e.contentTertiary,inputPlaceholderDisabled:e.contentStateDisabled,menuFill:e.backgroundPrimary,menuFillHover:e.backgroundSecondary,menuFontDefault:e.contentPrimary,menuFontDisabled:e.contentStateDisabled,menuFontHighlighted:e.contentPrimary,menuFontSelected:e.contentPrimary,tabBarFill:e.backgroundPrimary,tabColor:e.contentTertiary,spinnerTrackFill:e.backgroundTertiary,progressbarTrackFill:e.backgroundTertiary,tooltipBackground:e.backgroundInverseSecondary,tooltipText:e.contentInversePrimary,ratingInactiveFill:ke.primitiveDarkColors.gray500Dark,ratingStroke:ke.primitiveDarkColors.gray700Dark});$C.default=Vhe});var Y7=Re(YC=>{"use strict";Object.defineProperty(YC,"__esModule",{value:!0});YC.default=void 0;var Uhe=$7(dO()),Whe=$7(bf());function $7(e){return e&&e.__esModule?e:{default:e}}var Ghe=(0,Whe.default)({},Uhe.default,{border100:{borderColor:"hsla(0, 0%, 100%, 0.04)"},border200:{borderColor:"hsla(0, 0%, 100%, 0.08)"},border300:{borderColor:"hsla(0, 0%, 100%, 0.12)"},border400:{borderColor:"hsla(0, 0%, 100%, 0.16)"},border500:{borderColor:"hsla(0, 0%, 100%, 0.2)"},border600:{borderColor:"hsla(0, 0%, 100%, 0.24)"}}),qqe=YC.default=Ghe});var XC=Re(ZC=>{"use strict";Object.defineProperty(ZC,"__esModule",{value:!0});ZC.DarkTheme=void 0;var jhe=mi(Lv()),zhe=mi(bg()),qhe=mi(KC()),Hhe=mi(FO()),Khe=mi(Y7()),$he=mi(cO()),Yhe=mi(Dv()),Zhe=mi(LO()),Xhe=mi(BC()),Jhe=mi(RO()),Qhe=mi(OO()),eve=mi(EO());function mi(e){return e&&e.__esModule?e:{default:e}}var Kqe=ZC.DarkTheme={name:"dark-theme",colors:{...jhe.default,...zhe.default,...(0,Hhe.default)(),...(0,qhe.default)()},animation:Zhe.default,breakpoints:Xhe.default,borders:Khe.default,direction:"auto",grid:Jhe.default,lighting:$he.default,mediaQuery:Qhe.default,sizing:eve.default,typography:Yhe.default,zIndex:{modal:2e3}}});var Z7=Re(JC=>{"use strict";Object.defineProperty(JC,"__esModule",{value:!0});JC.DarkThemeMove=void 0;var tve=ove(bf()),rve=XC();function ove(e){return e&&e.__esModule?e:{default:e}}var Yqe=JC.DarkThemeMove=(0,tve.default)({},rve.DarkTheme,{name:"dark-theme-with-move"})});var VO=Re(BO=>{"use strict";Object.defineProperty(BO,"__esModule",{value:!0});BO.getFoundationColorOverrides=ave;var nve=["primaryA","primaryB","primary","accent","negative","warning","positive"];function ave(e){return e?nve.reduce((t,r)=>(e[r]&&(t[r]=e[r]),t),{}):{}}});var X7=Re(UO=>{"use strict";Object.defineProperty(UO,"__esModule",{value:!0});UO.default=pve;var ive=QC(bf()),sve=VO(),lve=xf(),uve=QC(FO()),dve=QC(KC()),cve=QC(Lv()),fve=XC();function QC(e){return e&&e.__esModule?e:{default:e}}function pve(e){let t={...cve.default,...(0,sve.getFoundationColorOverrides)(e?.colors)},r=(0,dve.default)(t),o=(0,uve.default)(r),n={...structuredClone(fve.DarkTheme),colors:{...lve.primitiveColors,...t,...r,...o}};return(0,ive.default)(n,e)}});var J7=Re(WO=>{"use strict";Object.defineProperty(WO,"__esModule",{value:!0});WO.default=xve;var mve=eS(bf()),gve=VO(),kve=xf(),Mve=eS(uO()),hve=eS(NC()),vve=eS(Iv()),yve=jC();function eS(e){return e&&e.__esModule?e:{default:e}}function xve(e){let t={...vve.default,...(0,gve.getFoundationColorOverrides)(e?.colors)},r=(0,hve.default)(t),o=(0,Mve.default)(r),n={...structuredClone(yve.LightTheme),colors:{...kve.primitiveColors,...t,...r,...o}};return(0,mve.default)(n,e)}});var Q7=Re(tS=>{"use strict";Object.defineProperty(tS,"__esModule",{value:!0});tS.default=void 0;var bve=Cve(Lv()),wve=Dv();function Cve(e){return e&&e.__esModule?e:{default:e}}var Sve={...bve.default,...wve.fontTokens},e8e=tS.default=Sve});var eq=Re(rS=>{"use strict";Object.defineProperty(rS,"__esModule",{value:!0});rS.default=void 0;var Pve=Ive(Iv()),Ave=Dv();function Ive(e){return e&&e.__esModule?e:{default:e}}var Dve={...Pve.default,...Ave.fontTokens},r8e=rS.default=Dve});var tq=Re(()=>{"use strict"});var jO=Re(Vn=>{"use strict";Object.defineProperty(Vn,"__esModule",{value:!0});var Lve={LightTheme:!0,LightThemeMove:!0,DarkTheme:!0,darkThemeOverrides:!0,DarkThemeMove:!0,createDarkTheme:!0,createLightTheme:!0,createTheme:!0,darkThemePrimitives:!0,lightThemePrimitives:!0};Object.defineProperty(Vn,"DarkTheme",{enumerable:!0,get:function(){return rq.DarkTheme}});Object.defineProperty(Vn,"DarkThemeMove",{enumerable:!0,get:function(){return Tve.DarkThemeMove}});Object.defineProperty(Vn,"LightTheme",{enumerable:!0,get:function(){return Rve.LightTheme}});Object.defineProperty(Vn,"LightThemeMove",{enumerable:!0,get:function(){return Nve.LightThemeMove}});Object.defineProperty(Vn,"createDarkTheme",{enumerable:!0,get:function(){return Ove.default}});Object.defineProperty(Vn,"createLightTheme",{enumerable:!0,get:function(){return oq.default}});Object.defineProperty(Vn,"createTheme",{enumerable:!0,get:function(){return oq.default}});Object.defineProperty(Vn,"darkThemeOverrides",{enumerable:!0,get:function(){return rq.DarkTheme}});Object.defineProperty(Vn,"darkThemePrimitives",{enumerable:!0,get:function(){return Eve.default}});Object.defineProperty(Vn,"lightThemePrimitives",{enumerable:!0,get:function(){return _ve.default}});var Rve=jC(),Nve=K7(),rq=XC(),Tve=Z7(),Ove=oS(X7()),oq=oS(J7()),Eve=oS(Q7()),_ve=oS(eq()),GO=tq();Object.keys(GO).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(Lve,e)||e in Vn&&Vn[e]===GO[e]||Object.defineProperty(Vn,e,{enumerable:!0,get:function(){return GO[e]}})});function oS(e){return e&&e.__esModule?e:{default:e}}});var zO=Re(Rg=>{"use strict";Object.defineProperty(Rg,"__esModule",{value:!0});Rg.default=Rg.ThemeContext=void 0;var nq=Bve(ie()),Fve=jO();function aq(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(aq=function(o){return o?r:t})(e)}function Bve(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=aq(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}var Vve=Rg.ThemeContext=nq.createContext(Fve.LightTheme),Uve=e=>{let{theme:t,children:r}=e;return nq.createElement(Vve.Provider,{value:t},r)},s8e=Rg.default=Uve});var HO=Re(Rv=>{"use strict";Object.defineProperty(Rv,"__esModule",{value:!0});Rv.driver=Wve;Rv.getInitialStyle=Gve;Rv.renderDeclarativeRules=qO;function Wve(e,t){let r=qO(e,t);return t.renderStyle(r)}function Gve(){return{}}function qO(e,t){for(let r in e){let o=e[r];if(r==="animationName"&&typeof o!="string"){e.animationName=t.renderKeyframes(o);continue}if(r==="fontFamily"&&typeof o!="string")if(Array.isArray(o)){let n="";for(let a of o)typeof a=="object"?n+=`${t.renderFontFace(a)},`:typeof a=="string"&&(n+=`${a},`);e.fontFamily=n.slice(0,-1);continue}else{if(o===void 0)continue;e.fontFamily=t.renderFontFace(o);continue}typeof o=="object"&&o!==null&&qO(o,t)}return e}});var iq=Re((as,$O)=>{"use strict";Object.defineProperty(as,"__esModule",{value:!0});as.NoopDebugEngine=as.DebugEngine=as.BrowserDebugEngine=void 0;as.addDebugMetadata=jve;as.setupDevtoolsExtension=void 0;function jve(e,t){let{stack:r,stacktrace:o,message:n}=new Error("stacktrace source");e.debug={stackInfo:{stack:r,stacktrace:o,message:n},stackIndex:t}}var zve=()=>{let e={},t=new Map,r=new Map,o=n=>{let a={};if(typeof n!="string")return a;if(r.has(n)){a.styles=r.get(n);let i=n.split(" ");if(i.length){let s={};i.forEach(l=>{s[l]=e[l]}),a.classes=s}if(t.has(n)){let s=t.get(n);a.extends=s}return a}};window.__STYLETRON_DEVTOOLS__={atomicMap:e,extensionsMap:t,stylesMap:r,getStyles:o}};as.setupDevtoolsExtension=zve;var nS=class{constructor(t){if(!t){let r=new Blob(['importScripts("https://unpkg.com/css-to-js-sourcemap-worker@2.0.5/worker.js")'],{type:"application/javascript"});t=new Worker(URL.createObjectURL(r)),t.postMessage({id:"init_wasm",url:"https://unpkg.com/css-to-js-sourcemap-worker@2.0.5/mappings.wasm"}),t.postMessage({id:"set_render_interval",interval:120}),$O.hot&&$O.hot.addStatusHandler(o=>{o==="dispose"&&t.postMessage({id:"invalidate"})})}this.worker=t,this.counter=0,this.worker.onmessage=r=>{let{id:o,css:n}=r.data;if(o==="render_css"&&n){let a=document.createElement("style");a.appendChild(document.createTextNode(n)),document.head.appendChild(a)}}}debug({stackIndex:t,stackInfo:r}){let o=`__debug-${this.counter++}`;return this.worker.postMessage({id:"add_mapped_class",className:o,stackInfo:r,stackIndex:t}),o}};as.BrowserDebugEngine=nS;var KO=class{debug(){}};as.NoopDebugEngine=KO;var qve=nS;as.DebugEngine=qve});var oE=Re(dr=>{"use strict";Object.defineProperty(dr,"__esModule",{value:!0});Object.defineProperty(dr,"DebugEngine",{enumerable:!0,get:function(){return Hve.DebugEngine}});dr.Provider=void 0;dr.autoComposeDeep=gq;dr.autoComposeShallow=mq;dr.composeDynamic=Tv;dr.composeStatic=rE;dr.createDeepMergeReducer=tE;dr.createShallowMergeReducer=eE;dr.createStyled=fq;dr.createStyledElementComponent=Ov;dr.dynamicComposeDeep=vq;dr.dynamicComposeShallow=hq;dr.resolveStyle=yq;dr.staticComposeDeep=Mq;dr.staticComposeShallow=kq;dr.styled=void 0;dr.useStyletron=Yve;dr.withWrapper=dr.withTransform=dr.withStyleDeep=dr.withStyle=void 0;var an=Kve(ie()),YO=HO(),Hve=iq();function uq(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(uq=function(o){return o?r:t})(e)}function Kve(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=uq(t);if(r&&r.has(e))return r.get(e);var o={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}function ZO(){return ZO=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ZO.apply(this,arguments)}var dq={renderStyle:()=>"",renderKeyframes:()=>"",renderFontFace:()=>""},aS=an.createContext(dq),JO=an.createContext(!1),QO=an.createContext(void 0),sq=class extends an.Component{constructor(t){super(t),this.state={hydrating:!!t.debugAfterHydration}}componentDidMount(){this.state.hydrating===!0&&this.setState({hydrating:!1})}render(){return an.createElement(aS.Provider,{value:this.props.value},an.createElement(QO.Provider,{value:this.props.debug},an.createElement(JO.Provider,{value:this.state.hydrating},this.props.children)))}},$ve=aS.Provider;dr.Provider=$ve;function cq(e){e===dq&&console.warn("Styletron Provider is not set up. Defaulting to no-op.")}function Yve(){let e=an.useContext(aS),t=an.useContext(QO),r=an.useContext(JO);cq(e);let o=an.useRef(""),n=an.useRef([]);return[function(i){let s=(0,YO.driver)(i,e);return s}]}function fq({getInitialStyle:e,driver:t,wrapper:r}){function o(n,a){return Ov(mq({reducers:[],base:n,driver:t,getInitialStyle:e,wrapper:r},a))}return o}var Zve=fq({getInitialStyle:YO.getInitialStyle,driver:YO.driver,wrapper:e=>e});dr.styled=Zve;var Xve=(e,t)=>{let r=e.__STYLETRON__;return Ov(Tv(r,t))};dr.withTransform=Xve;var pq=(e,t)=>{let r=e.__STYLETRON__;return Ov(gq(r,t))};dr.withStyleDeep=pq;var Jve=pq;dr.withStyle=Jve;var Qve=(e,t)=>{let r=e.__STYLETRON__,o={getInitialStyle:r.getInitialStyle,base:r.base,driver:r.driver,wrapper:t,reducers:r.reducers};return Ov(o)};dr.withWrapper=Qve;function mq(e,t){return typeof t=="function"?hq(e,t):kq(e,t)}function gq(e,t){return typeof t=="function"?vq(e,t):Mq(e,t)}function kq(e,t){return rE(e,eE(t))}function Mq(e,t){return rE(e,tE(t))}function hq(e,t){return Tv(e,(r,o)=>xq(r,t(o)))}function vq(e,t){return Tv(e,(r,o)=>Nv(r,t(o)))}function eE(e){return{reducer:t=>xq(t,e),assignmentCommutative:!0,factory:eE,style:e}}function tE(e){return{reducer:t=>Nv(t,e),assignmentCommutative:!0,factory:tE,style:e}}function rE(e,t){if(e.reducers.length===0){let r=t.reducer(e.getInitialStyle());return{reducers:e.reducers,base:e.base,driver:e.driver,wrapper:e.wrapper,getInitialStyle:()=>r}}else{let r=e.reducers[0];if(r.assignmentCommutative===!0&&t.assignmentCommutative===!0){let o=t.reducer(r.style);return{getInitialStyle:e.getInitialStyle,base:e.base,driver:e.driver,wrapper:e.wrapper,reducers:[r.factory(o)].concat(e.reducers.slice(1))}}return Tv(e,t.reducer)}}function Tv(e,t){return{getInitialStyle:e.getInitialStyle,base:e.base,driver:e.driver,wrapper:e.wrapper,reducers:[{assignmentCommutative:!1,reducer:t}].concat(e.reducers)}}function Ov(e){let{reducers:t,base:r,driver:o,wrapper:n,getInitialStyle:a,ext:i}=e;if(0)var s,l;if(0)var u;let c=n(an.forwardRef((f,p)=>{let g=an.useContext(aS),m=an.useContext(QO),h=an.useContext(JO);cq(g);let k=eye(f),M=yq(a,t,f);f.$style&&(typeof f.$style=="function"?M=Nv(M,f.$style(f)):M=Nv(M,f.$style));let v=o(M,g),b=f.$as?f.$as:r;return k.className=f.className?`${f.className} ${v}`:v,f.$ref&&console.warn("The prop `$ref` has been deprecated. Use `ref` instead. Refs are now forwarded with React.forwardRef."),an.createElement(b,ZO({},k,{ref:p||f.$ref}))}));return c.__STYLETRON__={base:r,reducers:t,driver:o,wrapper:n,getInitialStyle:a},c}function yq(e,t,r){let o=e(),n=t.length;for(;n--;){let a=t[n].reducer;o=a(o,r)}return o}function lq(e){return typeof e=="object"&&e!==null}function eye(e){let t={};for(let r in e)r[0]!=="$"&&(t[r]=e[r]);return t}function Nv(e,t){let r=XO({},e);for(let o in t){let n=t[o];lq(n)&&lq(e[o])?r[o]=Nv(e[o],n):r[o]=n}return r}function xq(e,t){return XO(XO({},e),t)}function XO(e,t){for(let r in t)e[r]=t[r];return e}});var Aq=Re(gi=>{"use strict";Object.defineProperty(gi,"__esModule",{value:!0});gi.createThemedStyled=Cq;gi.createThemedUseStyletron=Pq;gi.createThemedWithStyle=Sq;gi.withStyle=gi.useStyletron=gi.styled=void 0;gi.withWrapper=oye;var Ng=tye(ie()),iS=oE(),bq=HO(),aE=zO();function wq(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(wq=function(o){return o?r:t})(e)}function tye(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=wq(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}function nE(){return nE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},nE.apply(this,arguments)}var rye=e=>Ng.forwardRef((t,r)=>Ng.createElement(aE.ThemeContext.Consumer,null,o=>Ng.createElement(e,nE({ref:r},t,{$theme:o}))));function Cq(){return(0,iS.createStyled)({wrapper:rye,getInitialStyle:bq.getInitialStyle,driver:bq.driver})}var c8e=gi.styled=Cq();function Sq(){return iS.withStyle}var f8e=gi.withStyle=Sq();function Pq(){return function(){let e=Ng.useContext(aE.ThemeContext),[t]=(0,iS.useStyletron)();return[t,e]}}var p8e=gi.useStyletron=Pq();function oye(e,t){return(0,iS.withWrapper)(e,r=>Ng.forwardRef((o,n)=>Ng.createElement(aE.ThemeContext.Consumer,null,a=>t(r)({ref:n,...o,$theme:a}))))}});var Iq=Re(()=>{"use strict"});var Ev=Re(sn=>{"use strict";Object.defineProperty(sn,"__esModule",{value:!0});var nye={ThemeConsumer:!0,ThemeProvider:!0,createThemedStyled:!0,createThemedWithStyle:!0,createThemedUseStyletron:!0,styled:!0,withStyle:!0,useStyletron:!0,withWrapper:!0,hexToRgb:!0,expandBorderStyles:!0};sn.ThemeConsumer=void 0;Object.defineProperty(sn,"ThemeProvider",{enumerable:!0,get:function(){return Dq.default}});Object.defineProperty(sn,"createThemedStyled",{enumerable:!0,get:function(){return wf.createThemedStyled}});Object.defineProperty(sn,"createThemedUseStyletron",{enumerable:!0,get:function(){return wf.createThemedUseStyletron}});Object.defineProperty(sn,"createThemedWithStyle",{enumerable:!0,get:function(){return wf.createThemedWithStyle}});Object.defineProperty(sn,"expandBorderStyles",{enumerable:!0,get:function(){return Lq.expandBorderStyles}});Object.defineProperty(sn,"hexToRgb",{enumerable:!0,get:function(){return Lq.hexToRgb}});Object.defineProperty(sn,"styled",{enumerable:!0,get:function(){return wf.styled}});Object.defineProperty(sn,"useStyletron",{enumerable:!0,get:function(){return wf.useStyletron}});Object.defineProperty(sn,"withStyle",{enumerable:!0,get:function(){return wf.withStyle}});Object.defineProperty(sn,"withWrapper",{enumerable:!0,get:function(){return wf.withWrapper}});var Dq=aye(zO()),wf=Aq(),Lq=LC(),iE=Iq();Object.keys(iE).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(nye,e)||e in sn&&sn[e]===iE[e]||Object.defineProperty(sn,e,{enumerable:!0,get:function(){return iE[e]}})});function Rq(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Rq=function(o){return o?r:t})(e)}function aye(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Rq(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}var M8e=sn.ThemeConsumer=Dq.ThemeContext.Consumer});var Eq=Re((v8e,Oq)=>{Oq.exports=Tq;function Tq(){var e=[].slice.call(arguments),t=!1;typeof e[0]=="boolean"&&(t=e.shift());var r=e[0];if(Nq(r))throw new Error("extendee must be an object");for(var o=e.slice(1),n=o.length,a=0;a<n;a++){var i=o[a];for(var s in i)if(Object.prototype.hasOwnProperty.call(i,s)){var l=i[s];if(t&&iye(l)){var u=Array.isArray(l)?[]:{};r[s]=Tq(!0,Object.prototype.hasOwnProperty.call(r,s)&&!Nq(r[s])?r[s]:u,l)}else r[s]=l}}return r}function iye(e){return Array.isArray(e)||{}.toString.call(e)=="[object Object]"}function Nq(e){return!e||typeof e!="object"&&typeof e!="function"}});var _q=Re(sS=>{"use strict";Object.defineProperty(sS,"__esModule",{value:!0});sS.default=void 0;var sye={collapse:"Collapse",expand:"Expand"},y8e=sS.default=sye});var Fq=Re(lS=>{"use strict";Object.defineProperty(lS,"__esModule",{value:!0});lS.default=void 0;var lye={ariaLabel:"Breadcrumbs navigation"},b8e=lS.default=lye});var Bq=Re(uS=>{"use strict";Object.defineProperty(uS,"__esModule",{value:!0});uS.default=void 0;var uye={ariaLabel:"Select a date.",ariaLabelRange:"Select a date range.",ariaLabelCalendar:"Calendar.",ariaRoleDescriptionCalendarMonth:"Calendar month",previousMonth:"Previous month.",nextMonth:"Next month.",pastWeek:"Past Week",pastMonth:"Past Month",pastThreeMonths:"Past 3 Months",pastSixMonths:"Past 6 Months",pastYear:"Past Year",pastTwoYears:"Past 2 Years",screenReaderMessageInput:"Date format is ${formatString}. Press the down arrow or enter key to interact with the calendar and select a date. Press the escape button to close the calendar.",selectedDate:"Selected date is ${date}.",selectedDateRange:"Selected date range is from ${startDate} to ${endDate}.",selectSecondDatePrompt:"Select the second date.",quickSelectLabel:"Choose a date range",quickSelectAriaLabel:"Choose a date range",quickSelectPlaceholder:"None",timeSelectEndLabel:"End time",timeSelectStartLabel:"Start time",timePickerAriaLabel12Hour:"Select a time, 12-hour format.",timePickerAriaLabel24Hour:"Select a time, 24-hour format.",timezonePickerAriaLabel:"Select a timezone.",selectedStartDateLabel:"Selected start date.",selectedEndDateLabel:"Selected end date.",dateNotAvailableLabel:"Not available.",dateAvailableLabel:"It's available.",selectedLabel:"Selected.",chooseLabel:"Choose"},C8e=uS.default=uye});var Vq=Re(dS=>{"use strict";Object.defineProperty(dS,"__esModule",{value:!0});dS.default=void 0;var dye={emptyState:"No rows match the filter criteria defined. Please remove one or more filters to view more data.",loadingState:"Loading rows.",searchAriaLabel:"Search by text",filterAdd:"Add Filter",filterExclude:"Exclude",filterApply:"Apply",filterExcludeRange:"Exclude range",filterExcludeValue:"Exclude value",filterAppliedTo:"filter applied to",optionsLabel:"Select column to filter by",optionsSearch:"Search for a column to filter by...",optionsEmpty:"No columns available.",categoricalFilterSearchLabel:"Search categories",categoricalFilterSelectAll:"Select All",categoricalFilterSelectClear:"Clear",categoricalFilterEmpty:"No categories found",datetimeFilterRange:"Range",datetimeFilterRangeDatetime:"Date, Time",datetimeFilterRangeDate:"Date",datetimeFilterRangeTime:"Time",datetimeFilterCategorical:"Categorical",datetimeFilterCategoricalWeekday:"Weekday",datetimeFilterCategoricalMonth:"Month",datetimeFilterCategoricalQuarter:"Quarter",datetimeFilterCategoricalHalf:"Half",datetimeFilterCategoricalFirstHalf:"H1",datetimeFilterCategoricalSecondHalf:"H2",datetimeFilterCategoricalYear:"Year",numericalFilterRange:"Range",numericalFilterSingleValue:"Single Value",booleanFilterTrue:"true",booleanFilterFalse:"false",booleanColumnTrueShort:"T",booleanColumnFalseShort:"F",selectRow:"Select row",selectAllRows:"Select all rows",sortColumn:"Sort column",textQueryPlaceholder:"Search..."},P8e=dS.default=dye});var Uq=Re(cS=>{"use strict";Object.defineProperty(cS,"__esModule",{value:!0});cS.default=void 0;var cye={ariaLabel:"button group"},I8e=cS.default=cye});var Wq=Re(fS=>{"use strict";Object.defineProperty(fS,"__esModule",{value:!0});fS.default=void 0;var fye={added:"Uploading",buttonText:"Browse files",contentMessage:"or drop to upload",error:"Upload failed: ",processed:"Upload successful"},L8e=fS.default=fye});var Gq=Re(pS=>{"use strict";Object.defineProperty(pS,"__esModule",{value:!0});pS.default=void 0;var pye={dropFilesToUpload:"Drop files here to upload...",or:"",browseFiles:"Browse files",retry:"Retry Upload",cancel:"Cancel"},N8e=pS.default=pye});var jq=Re(mS=>{"use strict";Object.defineProperty(mS,"__esModule",{value:!0});mS.default=void 0;var mye={noResultsMsg:"No results",parentMenuItemAriaLabel:"You are currently at an item that opens a nested listbox. Press right arrow to enter that element and left arrow to return."},O8e=mS.default=mye});var zq=Re(gS=>{"use strict";Object.defineProperty(gS,"__esModule",{value:!0});gS.default=void 0;var gye={close:"Close"},_8e=gS.default=gye});var qq=Re(kS=>{"use strict";Object.defineProperty(kS,"__esModule",{value:!0});kS.default=void 0;var kye={close:"Close"},B8e=kS.default=kye});var Hq=Re(MS=>{"use strict";Object.defineProperty(MS,"__esModule",{value:!0});MS.default=void 0;var Mye={prev:"Prev",next:"Next",preposition:"of"},U8e=MS.default=Mye});var Kq=Re(hS=>{"use strict";Object.defineProperty(hS,"__esModule",{value:!0});hS.default=void 0;var hye={noResultsMsg:"No results found",placeholder:"Select...",create:"Create"},G8e=hS.default=hye});var $q=Re(vS=>{"use strict";Object.defineProperty(vS,"__esModule",{value:!0});vS.default=void 0;var vye={close:"Close"},z8e=vS.default=vye});var Yq=Re(yS=>{"use strict";Object.defineProperty(yS,"__esModule",{value:!0});yS.default=void 0;var yye=Aa(_q()),xye=Aa(Fq()),bye=Aa(Bq()),wye=Aa(Vq()),Cye=Aa(Uq()),Sye=Aa(Wq()),Pye=Aa(Gq()),Aye=Aa(jq()),Iye=Aa(zq()),Dye=Aa(qq()),Lye=Aa(Hq()),Rye=Aa(Kq()),Nye=Aa($q());function Aa(e){return e&&e.__esModule?e:{default:e}}var Tye={accordion:yye.default,breadcrumbs:xye.default,datepicker:bye.default,datatable:wye.default,buttongroup:Cye.default,fileuploader:Sye.default,fileuploaderbasic:Pye.default,menu:Aye.default,modal:Iye.default,drawer:Dye.default,pagination:Lye.default,select:Rye.default,toast:Nye.default},H8e=yS.default=Tye});var e8=Re(Tg=>{"use strict";Object.defineProperty(Tg,"__esModule",{value:!0});Tg.default=Tg.LocaleContext=void 0;var sE=Eye(ie()),Oye=Jq(Eq()),Xq=Jq(Yq());function Jq(e){return e&&e.__esModule?e:{default:e}}function Qq(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Qq=function(o){return o?r:t})(e)}function Eye(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Qq(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}var Zq=Tg.LocaleContext=sE.createContext(Xq.default),_ye=e=>{let{locale:t,children:r}=e,o=sE.useContext(Zq)??{};return sE.createElement(Zq.Provider,{value:(0,Oye.default)(!0,{},Xq.default,o,t)},r)},$8e=Tg.default=_ye});var lE=Re(Cf=>{"use strict";Object.defineProperty(Cf,"__esModule",{value:!0});Cf.uid=Cf.generateUID=void 0;Cf.generateUID=function(){var e=1,t=new WeakMap,r=function(o,n){return typeof o=="number"||typeof o=="string"?n?"idx-"+n:"val-"+o:t.has(o)?"uid"+t.get(o):(t.set(o,e++),r(o))};return r};Cf.uid=Cf.generateUID()});var xS=Re(ra=>{"use strict";Object.defineProperty(ra,"__esModule",{value:!0});ra.getPrefix=ra.getId=ra.source=ra.counter=ra.createSource=void 0;var Fye=ie(),Bye=lE();ra.createSource=function(e){return e===void 0&&(e=""),{value:1,prefix:e,uid:Bye.generateUID()}};ra.counter=ra.createSource();ra.source=Fye.createContext(ra.createSource());ra.getId=function(e){return e.value++};ra.getPrefix=function(e){return e?e.prefix:""}});var r8={};oj(r8,{__assign:()=>dE,__asyncDelegator:()=>Xye,__asyncGenerator:()=>Zye,__asyncValues:()=>Jye,__await:()=>_v,__awaiter:()=>zye,__classPrivateFieldGet:()=>rxe,__classPrivateFieldSet:()=>oxe,__createBinding:()=>Hye,__decorate:()=>Wye,__exportStar:()=>Kye,__extends:()=>Vye,__generator:()=>qye,__importDefault:()=>txe,__importStar:()=>exe,__makeTemplateObject:()=>Qye,__metadata:()=>jye,__param:()=>Gye,__read:()=>t8,__rest:()=>Uye,__spread:()=>$ye,__spreadArrays:()=>Yye,__values:()=>cE});function Vye(e,t){uE(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}function Uye(e,t){var r={};for(var o in e)Object.prototype.hasOwnProperty.call(e,o)&&t.indexOf(o)<0&&(r[o]=e[o]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,o=Object.getOwnPropertySymbols(e);n<o.length;n++)t.indexOf(o[n])<0&&Object.prototype.propertyIsEnumerable.call(e,o[n])&&(r[o[n]]=e[o[n]]);return r}function Wye(e,t,r,o){var n=arguments.length,a=n<3?t:o===null?o=Object.getOwnPropertyDescriptor(t,r):o,i;if(typeof Reflect=="object"&&typeof Reflect.decorate=="function")a=Reflect.decorate(e,t,r,o);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(a=(n<3?i(a):n>3?i(t,r,a):i(t,r))||a);return n>3&&a&&Object.defineProperty(t,r,a),a}function Gye(e,t){return function(r,o){t(r,o,e)}}function jye(e,t){if(typeof Reflect=="object"&&typeof Reflect.metadata=="function")return Reflect.metadata(e,t)}function zye(e,t,r,o){function n(a){return a instanceof r?a:new r(function(i){i(a)})}return new(r||(r=Promise))(function(a,i){function s(d){try{u(o.next(d))}catch(c){i(c)}}function l(d){try{u(o.throw(d))}catch(c){i(c)}}function u(d){d.done?a(d.value):n(d.value).then(s,l)}u((o=o.apply(e,t||[])).next())})}function qye(e,t){var r={label:0,sent:function(){if(a[0]&1)throw a[1];return a[1]},trys:[],ops:[]},o,n,a,i;return i={next:s(0),throw:s(1),return:s(2)},typeof Symbol=="function"&&(i[Symbol.iterator]=function(){return this}),i;function s(u){return function(d){return l([u,d])}}function l(u){if(o)throw new TypeError("Generator is already executing.");for(;r;)try{if(o=1,n&&(a=u[0]&2?n.return:u[0]?n.throw||((a=n.return)&&a.call(n),0):n.next)&&!(a=a.call(n,u[1])).done)return a;switch(n=0,a&&(u=[u[0]&2,a.value]),u[0]){case 0:case 1:a=u;break;case 4:return r.label++,{value:u[1],done:!1};case 5:r.label++,n=u[1],u=[0];continue;case 7:u=r.ops.pop(),r.trys.pop();continue;default:if(a=r.trys,!(a=a.length>0&&a[a.length-1])&&(u[0]===6||u[0]===2)){r=0;continue}if(u[0]===3&&(!a||u[1]>a[0]&&u[1]<a[3])){r.label=u[1];break}if(u[0]===6&&r.label<a[1]){r.label=a[1],a=u;break}if(a&&r.label<a[2]){r.label=a[2],r.ops.push(u);break}a[2]&&r.ops.pop(),r.trys.pop();continue}u=t.call(e,r)}catch(d){u=[6,d],n=0}finally{o=a=0}if(u[0]&5)throw u[1];return{value:u[0]?u[1]:void 0,done:!0}}}function Hye(e,t,r,o){o===void 0&&(o=r),e[o]=t[r]}function Kye(e,t){for(var r in e)r!=="default"&&!t.hasOwnProperty(r)&&(t[r]=e[r])}function cE(e){var t=typeof Symbol=="function"&&Symbol.iterator,r=t&&e[t],o=0;if(r)return r.call(e);if(e&&typeof e.length=="number")return{next:function(){return e&&o>=e.length&&(e=void 0),{value:e&&e[o++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function t8(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o=r.call(e),n,a=[],i;try{for(;(t===void 0||t-- >0)&&!(n=o.next()).done;)a.push(n.value)}catch(s){i={error:s}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return a}function $ye(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(t8(arguments[t]));return e}function Yye(){for(var e=0,t=0,r=arguments.length;t<r;t++)e+=arguments[t].length;for(var o=Array(e),n=0,t=0;t<r;t++)for(var a=arguments[t],i=0,s=a.length;i<s;i++,n++)o[n]=a[i];return o}function _v(e){return this instanceof _v?(this.v=e,this):new _v(e)}function Zye(e,t,r){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var o=r.apply(e,t||[]),n,a=[];return n={},i("next"),i("throw"),i("return"),n[Symbol.asyncIterator]=function(){return this},n;function i(f){o[f]&&(n[f]=function(p){return new Promise(function(g,m){a.push([f,p,g,m])>1||s(f,p)})})}function s(f,p){try{l(o[f](p))}catch(g){c(a[0][3],g)}}function l(f){f.value instanceof _v?Promise.resolve(f.value.v).then(u,d):c(a[0][2],f)}function u(f){s("next",f)}function d(f){s("throw",f)}function c(f,p){f(p),a.shift(),a.length&&s(a[0][0],a[0][1])}}function Xye(e){var t,r;return t={},o("next"),o("throw",function(n){throw n}),o("return"),t[Symbol.iterator]=function(){return this},t;function o(n,a){t[n]=e[n]?function(i){return(r=!r)?{value:_v(e[n](i)),done:n==="return"}:a?a(i):i}:a}}function Jye(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=e[Symbol.asyncIterator],r;return t?t.call(e):(e=typeof cE=="function"?cE(e):e[Symbol.iterator](),r={},o("next"),o("throw"),o("return"),r[Symbol.asyncIterator]=function(){return this},r);function o(a){r[a]=e[a]&&function(i){return new Promise(function(s,l){i=e[a](i),n(s,l,i.done,i.value)})}}function n(a,i,s,l){Promise.resolve(l).then(function(u){a({value:u,done:s})},i)}}function Qye(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e}function exe(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var r in e)Object.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t.default=e,t}function txe(e){return e&&e.__esModule?e:{default:e}}function rxe(e,t){if(!t.has(e))throw new TypeError("attempted to get private field on non-instance");return t.get(e)}function oxe(e,t,r){if(!t.has(e))throw new TypeError("attempted to set private field on non-instance");return t.set(e,r),r}var uE,dE,o8=Lge(()=>{uE=function(e,t){return uE=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,o){r.__proto__=o}||function(r,o){for(var n in o)o.hasOwnProperty(n)&&(r[n]=o[n])},uE(e,t)};dE=function(){return dE=Object.assign||function(t){for(var r,o=1,n=arguments.length;o<n;o++){r=arguments[o];for(var a in r)Object.prototype.hasOwnProperty.call(r,a)&&(t[a]=r[a])}return t},dE.apply(this,arguments)}});var fE=Re(wS=>{"use strict";Object.defineProperty(wS,"__esModule",{value:!0});wS.UID=void 0;var nxe=(o8(),Rge(r8)),axe=ie(),bS=xS(),n8=function(e,t,r){var o=t+e;return String(r?r(o):o)},ixe=(function(e){nxe.__extends(t,e);function t(){var r=e!==null&&e.apply(this,arguments)||this;return r.state={quartz:r.props.idSource||bS.counter,prefix:bS.getPrefix(r.props.idSource),id:bS.getId(r.props.idSource||bS.counter)},r.uid=function(o){return n8(r.state.id+"-"+r.state.quartz.uid(o),r.state.prefix,r.props.name)},r}return t.prototype.render=function(){var r=this.props,o=r.children,n=r.name,a=this.state,i=a.id,s=a.prefix;return o(n8(i,s,n),this.uid)},t})(axe.Component);wS.UID=ixe});var a8=Re(jl=>{"use strict";Object.defineProperty(jl,"__esModule",{value:!0});jl.UIDConsumer=jl.UIDFork=jl.UIDReset=void 0;var Fv=ie(),Bv=xS(),sxe=fE();jl.UIDReset=function(e){var t=e.children,r=e.prefix,o=r===void 0?"":r;return Fv.createElement(Bv.source.Provider,{value:Bv.createSource(o)},t)};jl.UIDFork=function(e){var t=e.children,r=e.prefix,o=r===void 0?"":r;return Fv.createElement(jl.UIDConsumer,null,function(n){return Fv.createElement(Bv.source.Provider,{value:Bv.createSource(n+"-"+o)},t)})};jl.UIDConsumer=function(e){var t=e.name,r=e.children;return Fv.createElement(Bv.source.Consumer,null,function(o){return Fv.createElement(sxe.UID,{name:t,idSource:o,children:r})})}});var l8=Re(Og=>{"use strict";Object.defineProperty(Og,"__esModule",{value:!0});Og.useUIDSeed=Og.useUID=void 0;var i8=ie(),CS=xS(),lxe=function(e){var t=e||CS.counter,r=CS.getPrefix(t),o=CS.getId(t),n=r+o,a=function(i){return n+t.uid(i)};return{uid:n,gen:a}},s8=function(){return i8.useState(lxe(i8.useContext(CS.source)))};Og.useUID=function(){var e=s8()[0].uid;return e};Og.useUIDSeed=function(){var e=s8()[0].gen;return e}});var c8=Re(Wo=>{"use strict";Object.defineProperty(Wo,"__esModule",{value:!0});Wo.useUIDSeed=Wo.useUID=Wo.UIDFork=Wo.UIDReset=Wo.UIDConsumer=Wo.UID=Wo.uid=Wo.generateUID=void 0;var u8=lE();Object.defineProperty(Wo,"generateUID",{enumerable:!0,get:function(){return u8.generateUID}});Object.defineProperty(Wo,"uid",{enumerable:!0,get:function(){return u8.uid}});var pE=a8();Object.defineProperty(Wo,"UIDReset",{enumerable:!0,get:function(){return pE.UIDReset}});Object.defineProperty(Wo,"UIDConsumer",{enumerable:!0,get:function(){return pE.UIDConsumer}});Object.defineProperty(Wo,"UIDFork",{enumerable:!0,get:function(){return pE.UIDFork}});var d8=l8();Object.defineProperty(Wo,"useUID",{enumerable:!0,get:function(){return d8.useUID}});Object.defineProperty(Wo,"useUIDSeed",{enumerable:!0,get:function(){return d8.useUIDSeed}});var uxe=fE();Object.defineProperty(Wo,"UID",{enumerable:!0,get:function(){return uxe.UID}})});var M8=Re(hr=>{"use strict";var SS=60103,PS=60106,Vv=60107,Uv=60108,Wv=60114,Gv=60109,jv=60110,zv=60112,qv=60113,mE=60120,Hv=60115,Kv=60116,f8=60121,p8=60122,m8=60117,g8=60129,k8=60131;typeof Symbol=="function"&&Symbol.for&&(Go=Symbol.for,SS=Go("react.element"),PS=Go("react.portal"),Vv=Go("react.fragment"),Uv=Go("react.strict_mode"),Wv=Go("react.profiler"),Gv=Go("react.provider"),jv=Go("react.context"),zv=Go("react.forward_ref"),qv=Go("react.suspense"),mE=Go("react.suspense_list"),Hv=Go("react.memo"),Kv=Go("react.lazy"),f8=Go("react.block"),p8=Go("react.server.block"),m8=Go("react.fundamental"),g8=Go("react.debug_trace_mode"),k8=Go("react.legacy_hidden"));var Go;function is(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case SS:switch(e=e.type,e){case Vv:case Wv:case Uv:case qv:case mE:return e;default:switch(e=e&&e.$$typeof,e){case jv:case zv:case Kv:case Hv:case Gv:return e;default:return t}}case PS:return t}}}var dxe=Gv,cxe=SS,fxe=zv,pxe=Vv,mxe=Kv,gxe=Hv,kxe=PS,Mxe=Wv,hxe=Uv,vxe=qv;hr.ContextConsumer=jv;hr.ContextProvider=dxe;hr.Element=cxe;hr.ForwardRef=fxe;hr.Fragment=pxe;hr.Lazy=mxe;hr.Memo=gxe;hr.Portal=kxe;hr.Profiler=Mxe;hr.StrictMode=hxe;hr.Suspense=vxe;hr.isAsyncMode=function(){return!1};hr.isConcurrentMode=function(){return!1};hr.isContextConsumer=function(e){return is(e)===jv};hr.isContextProvider=function(e){return is(e)===Gv};hr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===SS};hr.isForwardRef=function(e){return is(e)===zv};hr.isFragment=function(e){return is(e)===Vv};hr.isLazy=function(e){return is(e)===Kv};hr.isMemo=function(e){return is(e)===Hv};hr.isPortal=function(e){return is(e)===PS};hr.isProfiler=function(e){return is(e)===Wv};hr.isStrictMode=function(e){return is(e)===Uv};hr.isSuspense=function(e){return is(e)===qv};hr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===Vv||e===Wv||e===g8||e===Uv||e===qv||e===mE||e===k8||typeof e=="object"&&e!==null&&(e.$$typeof===Kv||e.$$typeof===Hv||e.$$typeof===Gv||e.$$typeof===jv||e.$$typeof===zv||e.$$typeof===m8||e.$$typeof===f8||e[0]===p8)};hr.typeOf=is});var v8=Re((oHe,h8)=>{"use strict";h8.exports=M8()});var yE=Re(js=>{"use strict";Object.defineProperty(js,"__esModule",{value:!0});js.getOverride=w8;js.getOverrideProps=ME;js.getOverrides=C8;js.mergeConfigurationOverrides=vE;js.mergeOverride=S8;js.mergeOverrides=bxe;js.toObjectOverride=hE;js.useOverrides=wxe;var gE=xxe(ie()),x8=v8(),y8=yxe(bf());function yxe(e){return e&&e.__esModule?e:{default:e}}function b8(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(b8=function(o){return o?r:t})(e)}function xxe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=b8(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}function kE(){return kE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},kE.apply(this,arguments)}function w8(e){return(0,x8.isValidElementType)(e)?e:e&&typeof e=="object"?e.component:e}function ME(e){return e&&typeof e=="object"?typeof e.props=="object"?{...e.props,$style:e.style}:{$style:e.style}:{}}function hE(e){return(0,x8.isValidElementType)(e)?{component:e}:e||{}}function C8(e,t){let r=w8(e)||t;if(e&&typeof e=="object"&&typeof e.props=="function"){let n=gE.forwardRef((a,i)=>{let s=e.props(a),l=ME({...e,props:s});return gE.createElement(r,kE({ref:i},l))});return n.displayName=r.displayName,[n,{}]}let o=ME(e);return[r,o]}function bxe(e={},t={}){let r=Object.assign({},e,t);return Object.keys(r).reduce((n,a)=>(n[a]=S8(hE(e[a]),hE(t[a])),n),{})}function S8(e,t){let r={...e,...t};return e.props&&t.props&&(r.props=vE(e.props,t.props)),e.style&&t.style&&(r.style=vE(e.style,t.style)),r}function vE(e,t){return typeof e=="object"&&typeof t=="object"?(0,y8.default)({},e,t):(...r)=>(0,y8.default)({},typeof e=="function"?e(...r):e,typeof t=="function"?t(...r):t)}function wxe(e,t={}){return gE.useMemo(()=>Object.keys(e).reduce((r,o)=>(r[o]=C8(t[o],e[o]),r),{}),[t])}});var L8=Re(zs=>{"use strict";Object.defineProperty(zs,"__esModule",{value:!0});zs.forkFocus=zs.forkBlur=void 0;zs.handleBlurVisible=Dxe;zs.initFocusVisible=Lxe;zs.isFocusVisible=Ixe;zs.teardown=Axe;var P8=!1,AS=!0,xE=!1,A8=null,Cxe={text:!0,search:!0,url:!0,tel:!0,email:!0,password:!0,number:!0,date:!0,month:!0,week:!0,time:!0,datetime:!0,"datetime-local":!0};function Sxe(e){let{type:t,tagName:r}=e;return!!(r==="INPUT"&&Cxe[t]&&!e.readOnly||r==="TEXTAREA"&&!e.readOnly||e.isContentEditable)}function I8(e){e.metaKey||e.altKey||e.ctrlKey||(AS=!0)}function Eg(){AS=!1}function D8(){document.visibilityState==="hidden"&&xE&&(AS=!0)}function Pxe(e){e.addEventListener("keydown",I8,!0),e.addEventListener("mousedown",Eg,!0),e.addEventListener("pointerdown",Eg,!0),e.addEventListener("touchstart",Eg,!0),e.addEventListener("visibilitychange",D8,!0)}function Axe(e){e.removeEventListener("keydown",I8,!0),e.removeEventListener("mousedown",Eg,!0),e.removeEventListener("pointerdown",Eg,!0),e.removeEventListener("touchstart",Eg,!0),e.removeEventListener("visibilitychange",D8,!0)}function Ixe(e){try{return e.target.matches(":focus-visible")}catch{}return AS||Sxe(e.target)}function Dxe(){xE=!0,typeof document<"u"&&(window.clearTimeout(A8),A8=window.setTimeout(()=>{xE=!1},100))}function Lxe(e){!P8&&e!=null&&(P8=!0,Pxe(e.ownerDocument))}var Rxe=(e,t)=>r=>{typeof e.onFocus=="function"&&e.onFocus(r),t(r)};zs.forkFocus=Rxe;var Nxe=(e,t)=>r=>{typeof e.onBlur=="function"&&e.onBlur(r),t(r)};zs.forkBlur=Nxe});var wE=Re(Hs=>{"use strict";Object.defineProperty(Hs,"__esModule",{value:!0});Hs.default=Hs.Provider=Hs.LayersContext=Hs.Consumer=void 0;var yd=Oxe(ie()),N8=Ev(),R8=yE(),Txe=L8();function T8(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(T8=function(o){return o?r:t})(e)}function Oxe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=T8(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}function IS(){return IS=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},IS.apply(this,arguments)}function bn(e,t,r){return t=Exe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Exe(e){var t=_xe(e,"string");return typeof t=="symbol"?t:String(t)}function _xe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var O8=(0,N8.styled)("div",{});O8.displayName="StyledAppContainer";var E8=(0,N8.styled)("div",{});E8.displayName="StyledLayersContainer";function qs(){}var _8=Hs.LayersContext=yd.createContext({addEscapeHandler:qs,removeEscapeHandler:qs,addKeyDownHandler:qs,removeKeyDownHandler:qs,addKeyUpHandler:qs,removeKeyUpHandler:qs,addKeyPressHandler:qs,removeKeyPressHandler:qs,addDocClickHandler:qs,removeDocClickHandler:qs,host:void 0,zIndex:void 0}),Fxe=Hs.Provider=_8.Provider,Bxe=Hs.Consumer=_8.Consumer,bE=class extends yd.Component{constructor(t){super(t),bn(this,"host",yd.createRef()),bn(this,"containerRef",yd.createRef()),bn(this,"onDocumentClick",r=>{let o=this.state.docClickHandlers[this.state.docClickHandlers.length-1];o&&o(r)}),bn(this,"onKeyDown",r=>{let o=this.state.keyDownHandlers[this.state.keyDownHandlers.length-1];o&&o(r)}),bn(this,"onKeyUp",r=>{if(r.key==="Escape"){let n=this.state.escapeKeyHandlers[this.state.escapeKeyHandlers.length-1];n&&n()}let o=this.state.keyUpHandlers[this.state.keyUpHandlers.length-1];o&&o(r)}),bn(this,"onKeyPress",r=>{let o=this.state.keyPressHandlers[this.state.keyPressHandlers.length-1];o&&o(r)}),bn(this,"onAddEscapeHandler",r=>{this.setState(o=>({escapeKeyHandlers:[...o.escapeKeyHandlers,r]}))}),bn(this,"onRemoveEscapeHandler",r=>{this.setState(o=>({escapeKeyHandlers:o.escapeKeyHandlers.filter(n=>n!==r)}))}),bn(this,"onAddKeyDownHandler",r=>{this.setState(o=>({keyDownHandlers:[...o.keyDownHandlers,r]}))}),bn(this,"onRemoveKeyDownHandler",r=>{this.setState(o=>({keyDownHandlers:o.keyDownHandlers.filter(n=>n!==r)}))}),bn(this,"onAddKeyUpHandler",r=>{this.setState(o=>({keyUpHandlers:[...o.keyUpHandlers,r]}))}),bn(this,"onRemoveKeyUpHandler",r=>{this.setState(o=>({keyUpHandlers:o.keyUpHandlers.filter(n=>n!==r)}))}),bn(this,"onAddKeyPressHandler",r=>{this.setState(o=>({keyPressHandlers:[...o.keyPressHandlers,r]}))}),bn(this,"onRemoveKeyPressHandler",r=>{this.setState(o=>({keyPressHandlers:o.keyPressHandlers.filter(n=>n!==r)}))}),bn(this,"onAddDocClickHandler",r=>{this.setState(o=>({docClickHandlers:[...o.docClickHandlers,r]}))}),bn(this,"onRemoveDocClickHandler",r=>{this.setState(o=>({docClickHandlers:o.docClickHandlers.filter(n=>n!==r)}))}),this.state={escapeKeyHandlers:[],keyDownHandlers:[],keyUpHandlers:[],keyPressHandlers:[],docClickHandlers:[]}}componentDidMount(){this.forceUpdate(),(0,Txe.initFocusVisible)(this.containerRef.current),typeof document<"u"&&(document.addEventListener("keydown",this.onKeyDown),document.addEventListener("keyup",this.onKeyUp),document.addEventListener("keypress",this.onKeyPress),document.addEventListener("mousedown",this.onDocumentClick))}componentWillUnmount(){typeof document<"u"&&(document.removeEventListener("keydown",this.onKeyDown),document.removeEventListener("keyup",this.onKeyUp),document.removeEventListener("keypress",this.onKeyPress),document.removeEventListener("mousedown",this.onDocumentClick))}render(){let{overrides:t={}}=this.props,[r,o]=(0,R8.getOverrides)(t.AppContainer,O8),[n,a]=(0,R8.getOverrides)(t.LayersContainer,E8);return yd.createElement(Bxe,null,({host:i})=>yd.createElement(Fxe,{value:{host:i||this.host.current,zIndex:this.props.zIndex,addEscapeHandler:this.onAddEscapeHandler,removeEscapeHandler:this.onRemoveEscapeHandler,addKeyDownHandler:this.onAddKeyDownHandler,removeKeyDownHandler:this.onRemoveKeyDownHandler,addKeyUpHandler:this.onAddKeyUpHandler,removeKeyUpHandler:this.onRemoveKeyUpHandler,addKeyPressHandler:this.onAddKeyPressHandler,removeKeyPressHandler:this.onRemoveKeyPressHandler,addDocClickHandler:this.onAddDocClickHandler,removeDocClickHandler:this.onRemoveDocClickHandler}},yd.createElement(r,IS({},o,{ref:this.containerRef}),this.props.children),yd.createElement(n,IS({},a,{ref:this.host}))))}};Hs.default=bE});var W8=Re(SE=>{"use strict";Object.defineProperty(SE,"__esModule",{value:!0});SE.default=zxe;var DS=Wxe(ie()),F8=Uxe(xg()),Vxe=Ev(),B8=wE();function Uxe(e){return e&&e.__esModule?e:{default:e}}function V8(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(V8=function(o){return o?r:t})(e)}function Wxe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=V8(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}function CE(){return CE=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)Object.prototype.hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},CE.apply(this,arguments)}function xd(e,t,r){return t=Gxe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Gxe(e){var t=jxe(e,"string");return typeof t=="symbol"?t:String(t)}function jxe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U8=(0,Vxe.styled)("div",({$zIndex:e})=>({position:"absolute",top:0,left:0,right:0,zIndex:e||null}));U8.displayName="Container";var LS=class extends DS.Component{constructor(...t){super(...t),xd(this,"context",void 0),xd(this,"state",{container:null}),xd(this,"onEscape",()=>{this.props.onEscape&&this.props.onEscape()}),xd(this,"onKeyDown",r=>{this.props.onKeyDown&&this.props.onKeyDown(r)}),xd(this,"onKeyUp",r=>{this.props.onKeyUp&&this.props.onKeyUp(r)}),xd(this,"onKeyPress",r=>{this.props.onKeyPress&&this.props.onKeyPress(r)}),xd(this,"onDocumentClick",r=>{this.props.onDocumentClick&&this.props.onDocumentClick(r)})}componentDidMount(){this.context.addEscapeHandler(this.onEscape),this.context.addKeyDownHandler(this.onKeyDown),this.context.addKeyUpHandler(this.onKeyUp),this.context.addKeyPressHandler(this.onKeyPress),this.props.isHoverLayer||this.context.addDocClickHandler(this.onDocumentClick);let{onMount:t,mountNode:r,host:o}=this.props;if(r){t&&t();return}let a=o!==void 0?o:document.body;a&&this.addContainer(a)}componentDidUpdate(t){let{host:r,mountNode:o}=this.props;o||(r&&r!==t.host&&t.host===null&&this.addContainer(r),t.isHoverLayer!=this.props.isHoverLayer&&(this.props.isHoverLayer?this.context.removeDocClickHandler(this.onDocumentClick):this.context.addDocClickHandler(this.onDocumentClick)))}componentWillUnmount(){this.context.removeEscapeHandler(this.onEscape),this.context.removeKeyDownHandler(this.onKeyDown),this.context.removeKeyUpHandler(this.onKeyUp),this.context.removeKeyPressHandler(this.onKeyPress),this.context.removeDocClickHandler(this.onDocumentClick),this.props.onUnmount&&this.props.onUnmount();let t=this.props.host,r=this.state.container;t&&r&&t.contains(r)&&t.removeChild(r)}addContainer(t){let{index:r,mountNode:o,onMount:n}=this.props;if(!o&&t){let a=t.ownerDocument.createElement("div"),i=typeof r=="number"?t.children[r]:null;i?t.insertBefore(a,i):t.appendChild(a),this.setState({container:a},()=>{n&&n()})}}render(){let{container:t}=this.state,{children:r,mountNode:o,zIndex:n}=this.props,a=n?DS.createElement(U8,{$zIndex:n},r):r;return typeof document<"u"?o?F8.default.createPortal(a,o):t?F8.default.createPortal(a,t):null:null}};xd(LS,"contextType",B8.LayersContext);function zxe(e){return DS.createElement(B8.Consumer,null,({host:t,zIndex:r})=>DS.createElement(LS,CE({},e,{host:t,zIndex:r})))}});var G8=Re((PE,AE)=>{(function(e,t){typeof PE=="object"&&typeof AE<"u"?AE.exports=t():typeof define=="function"&&define.amd?define(t):e.Popper=t()})(PE,(function(){"use strict";var e=typeof window<"u"&&typeof document<"u"&&typeof navigator<"u",t=(function(){for(var I=["Edge","Trident","Firefox"],q=0;q<I.length;q+=1)if(e&&navigator.userAgent.indexOf(I[q])>=0)return 1;return 0})();function r(I){var q=!1;return function(){q||(q=!0,window.Promise.resolve().then(function(){q=!1,I()}))}}function o(I){var q=!1;return function(){q||(q=!0,setTimeout(function(){q=!1,I()},t))}}var n=e&&window.Promise,a=n?r:o;function i(I){var q={};return I&&q.toString.call(I)==="[object Function]"}function s(I,q){if(I.nodeType!==1)return[];var X=I.ownerDocument.defaultView,ae=X.getComputedStyle(I,null);return q?ae[q]:ae}function l(I){return I.nodeName==="HTML"?I:I.parentNode||I.host}function u(I){if(!I)return document.body;switch(I.nodeName){case"HTML":case"BODY":return I.ownerDocument.body;case"#document":return I.body}var q=s(I),X=q.overflow,ae=q.overflowX,Se=q.overflowY;return/(auto|scroll|overlay)/.test(X+Se+ae)?I:u(l(I))}function d(I){return I&&I.referenceNode?I.referenceNode:I}var c=e&&!!(window.MSInputMethodContext&&document.documentMode),f=e&&/MSIE 10/.test(navigator.userAgent);function p(I){return I===11?c:I===10?f:c||f}function g(I){if(!I)return document.documentElement;for(var q=p(10)?document.body:null,X=I.offsetParent||null;X===q&&I.nextElementSibling;)X=(I=I.nextElementSibling).offsetParent;var ae=X&&X.nodeName;return!ae||ae==="BODY"||ae==="HTML"?I?I.ownerDocument.documentElement:document.documentElement:["TH","TD","TABLE"].indexOf(X.nodeName)!==-1&&s(X,"position")==="static"?g(X):X}function m(I){var q=I.nodeName;return q==="BODY"?!1:q==="HTML"||g(I.firstElementChild)===I}function h(I){return I.parentNode!==null?h(I.parentNode):I}function k(I,q){if(!I||!I.nodeType||!q||!q.nodeType)return document.documentElement;var X=I.compareDocumentPosition(q)&Node.DOCUMENT_POSITION_FOLLOWING,ae=X?I:q,Se=X?q:I,ye=document.createRange();ye.setStart(ae,0),ye.setEnd(Se,0);var Ie=ye.commonAncestorContainer;if(I!==Ie&&q!==Ie||ae.contains(Se))return m(Ie)?Ie:g(Ie);var Le=h(I);return Le.host?k(Le.host,q):k(I,h(q).host)}function M(I){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"top",X=q==="top"?"scrollTop":"scrollLeft",ae=I.nodeName;if(ae==="BODY"||ae==="HTML"){var Se=I.ownerDocument.documentElement,ye=I.ownerDocument.scrollingElement||Se;return ye[X]}return I[X]}function v(I,q){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ae=M(q,"top"),Se=M(q,"left"),ye=X?-1:1;return I.top+=ae*ye,I.bottom+=ae*ye,I.left+=Se*ye,I.right+=Se*ye,I}function b(I,q){var X=q==="x"?"Left":"Top",ae=X==="Left"?"Right":"Bottom";return parseFloat(I["border"+X+"Width"])+parseFloat(I["border"+ae+"Width"])}function w(I,q,X,ae){return Math.max(q["offset"+I],q["scroll"+I],X["client"+I],X["offset"+I],X["scroll"+I],p(10)?parseInt(X["offset"+I])+parseInt(ae["margin"+(I==="Height"?"Top":"Left")])+parseInt(ae["margin"+(I==="Height"?"Bottom":"Right")]):0)}function P(I){var q=I.body,X=I.documentElement,ae=p(10)&&getComputedStyle(X);return{height:w("Height",q,X,ae),width:w("Width",q,X,ae)}}var L=function(I,q){if(!(I instanceof q))throw new TypeError("Cannot call a class as a function")},C=(function(){function I(q,X){for(var ae=0;ae<X.length;ae++){var Se=X[ae];Se.enumerable=Se.enumerable||!1,Se.configurable=!0,"value"in Se&&(Se.writable=!0),Object.defineProperty(q,Se.key,Se)}}return function(q,X,ae){return X&&I(q.prototype,X),ae&&I(q,ae),q}})(),F=function(I,q,X){return q in I?Object.defineProperty(I,q,{value:X,enumerable:!0,configurable:!0,writable:!0}):I[q]=X,I},T=Object.assign||function(I){for(var q=1;q<arguments.length;q++){var X=arguments[q];for(var ae in X)Object.prototype.hasOwnProperty.call(X,ae)&&(I[ae]=X[ae])}return I};function G(I){return T({},I,{right:I.left+I.width,bottom:I.top+I.height})}function $(I){var q={};try{if(p(10)){q=I.getBoundingClientRect();var X=M(I,"top"),ae=M(I,"left");q.top+=X,q.left+=ae,q.bottom+=X,q.right+=ae}else q=I.getBoundingClientRect()}catch{}var Se={left:q.left,top:q.top,width:q.right-q.left,height:q.bottom-q.top},ye=I.nodeName==="HTML"?P(I.ownerDocument):{},Ie=ye.width||I.clientWidth||Se.width,Le=ye.height||I.clientHeight||Se.height,Fe=I.offsetWidth-Ie,Ge=I.offsetHeight-Le;if(Fe||Ge){var Xe=s(I);Fe-=b(Xe,"x"),Ge-=b(Xe,"y"),Se.width-=Fe,Se.height-=Ge}return G(Se)}function oe(I,q){var X=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,ae=p(10),Se=q.nodeName==="HTML",ye=$(I),Ie=$(q),Le=u(I),Fe=s(q),Ge=parseFloat(Fe.borderTopWidth),Xe=parseFloat(Fe.borderLeftWidth);X&&Se&&(Ie.top=Math.max(Ie.top,0),Ie.left=Math.max(Ie.left,0));var qe=G({top:ye.top-Ie.top-Ge,left:ye.left-Ie.left-Xe,width:ye.width,height:ye.height});if(qe.marginTop=0,qe.marginLeft=0,!ae&&Se){var st=parseFloat(Fe.marginTop),tt=parseFloat(Fe.marginLeft);qe.top-=Ge-st,qe.bottom-=Ge-st,qe.left-=Xe-tt,qe.right-=Xe-tt,qe.marginTop=st,qe.marginLeft=tt}return(ae&&!X?q.contains(Le):q===Le&&Le.nodeName!=="BODY")&&(qe=v(qe,q)),qe}function se(I){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=I.ownerDocument.documentElement,ae=oe(I,X),Se=Math.max(X.clientWidth,window.innerWidth||0),ye=Math.max(X.clientHeight,window.innerHeight||0),Ie=q?0:M(X),Le=q?0:M(X,"left"),Fe={top:Ie-ae.top+ae.marginTop,left:Le-ae.left+ae.marginLeft,width:Se,height:ye};return G(Fe)}function pe(I){var q=I.nodeName;if(q==="BODY"||q==="HTML")return!1;if(s(I,"position")==="fixed")return!0;var X=l(I);return X?pe(X):!1}function N(I){if(!I||!I.parentElement||p())return document.documentElement;for(var q=I.parentElement;q&&s(q,"transform")==="none";)q=q.parentElement;return q||document.documentElement}function R(I,q,X,ae){var Se=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!1,ye={top:0,left:0},Ie=Se?N(I):k(I,d(q));if(ae==="viewport")ye=se(Ie,Se);else{var Le=void 0;ae==="scrollParent"?(Le=u(l(q)),Le.nodeName==="BODY"&&(Le=I.ownerDocument.documentElement)):ae==="window"?Le=I.ownerDocument.documentElement:Le=ae;var Fe=oe(Le,Ie,Se);if(Le.nodeName==="HTML"&&!pe(Ie)){var Ge=P(I.ownerDocument),Xe=Ge.height,qe=Ge.width;ye.top+=Fe.top-Fe.marginTop,ye.bottom=Xe+Fe.top,ye.left+=Fe.left-Fe.marginLeft,ye.right=qe+Fe.left}else ye=Fe}X=X||0;var st=typeof X=="number";return ye.left+=st?X:X.left||0,ye.top+=st?X:X.top||0,ye.right-=st?X:X.right||0,ye.bottom-=st?X:X.bottom||0,ye}function U(I){var q=I.width,X=I.height;return q*X}function E(I,q,X,ae,Se){var ye=arguments.length>5&&arguments[5]!==void 0?arguments[5]:0;if(I.indexOf("auto")===-1)return I;var Ie=R(X,ae,ye,Se),Le={top:{width:Ie.width,height:q.top-Ie.top},right:{width:Ie.right-q.right,height:Ie.height},bottom:{width:Ie.width,height:Ie.bottom-q.bottom},left:{width:q.left-Ie.left,height:Ie.height}},Fe=Object.keys(Le).map(function(st){return T({key:st},Le[st],{area:U(Le[st])})}).sort(function(st,tt){return tt.area-st.area}),Ge=Fe.filter(function(st){var tt=st.width,at=st.height;return tt>=X.clientWidth&&at>=X.clientHeight}),Xe=Ge.length>0?Ge[0].key:Fe[0].key,qe=I.split("-")[1];return Xe+(qe?"-"+qe:"")}function _(I,q,X){var ae=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,Se=ae?N(q):k(q,d(X));return oe(X,Se,ae)}function B(I){var q=I.ownerDocument.defaultView,X=q.getComputedStyle(I),ae=parseFloat(X.marginTop||0)+parseFloat(X.marginBottom||0),Se=parseFloat(X.marginLeft||0)+parseFloat(X.marginRight||0),ye={width:I.offsetWidth+Se,height:I.offsetHeight+ae};return ye}function j(I){var q={left:"right",right:"left",bottom:"top",top:"bottom"};return I.replace(/left|right|bottom|top/g,function(X){return q[X]})}function re(I,q,X){X=X.split("-")[0];var ae=B(I),Se={width:ae.width,height:ae.height},ye=["right","left"].indexOf(X)!==-1,Ie=ye?"top":"left",Le=ye?"left":"top",Fe=ye?"height":"width",Ge=ye?"width":"height";return Se[Ie]=q[Ie]+q[Fe]/2-ae[Fe]/2,X===Le?Se[Le]=q[Le]-ae[Ge]:Se[Le]=q[j(Le)],Se}function W(I,q){return Array.prototype.find?I.find(q):I.filter(q)[0]}function K(I,q,X){if(Array.prototype.findIndex)return I.findIndex(function(Se){return Se[q]===X});var ae=W(I,function(Se){return Se[q]===X});return I.indexOf(ae)}function Q(I,q,X){var ae=X===void 0?I:I.slice(0,K(I,"name",X));return ae.forEach(function(Se){Se.function&&console.warn("`modifier.function` is deprecated, use `modifier.fn`!");var ye=Se.function||Se.fn;Se.enabled&&i(ye)&&(q.offsets.popper=G(q.offsets.popper),q.offsets.reference=G(q.offsets.reference),q=ye(q,Se))}),q}function ue(){if(!this.state.isDestroyed){var I={instance:this,styles:{},arrowStyles:{},attributes:{},flipped:!1,offsets:{}};I.offsets.reference=_(this.state,this.popper,this.reference,this.options.positionFixed),I.placement=E(this.options.placement,I.offsets.reference,this.popper,this.reference,this.options.modifiers.flip.boundariesElement,this.options.modifiers.flip.padding),I.originalPlacement=I.placement,I.positionFixed=this.options.positionFixed,I.offsets.popper=re(this.popper,I.offsets.reference,I.placement),I.offsets.popper.position=this.options.positionFixed?"fixed":"absolute",I=Q(this.modifiers,I),this.state.isCreated?this.options.onUpdate(I):(this.state.isCreated=!0,this.options.onCreate(I))}}function Ue(I,q){return I.some(function(X){var ae=X.name,Se=X.enabled;return Se&&ae===q})}function de(I){for(var q=[!1,"ms","Webkit","Moz","O"],X=I.charAt(0).toUpperCase()+I.slice(1),ae=0;ae<q.length;ae++){var Se=q[ae],ye=Se?""+Se+X:I;if(typeof document.body.style[ye]<"u")return ye}return null}function Pe(){return this.state.isDestroyed=!0,Ue(this.modifiers,"applyStyle")&&(this.popper.removeAttribute("x-placement"),this.popper.style.position="",this.popper.style.top="",this.popper.style.left="",this.popper.style.right="",this.popper.style.bottom="",this.popper.style.willChange="",this.popper.style[de("transform")]=""),this.disableEventListeners(),this.options.removeOnDestroy&&this.popper.parentNode.removeChild(this.popper),this}function Oe(I){var q=I.ownerDocument;return q?q.defaultView:window}function Y(I,q,X,ae){var Se=I.nodeName==="BODY",ye=Se?I.ownerDocument.defaultView:I;ye.addEventListener(q,X,{passive:!0}),Se||Y(u(ye.parentNode),q,X,ae),ae.push(ye)}function Je(I,q,X,ae){X.updateBound=ae,Oe(I).addEventListener("resize",X.updateBound,{passive:!0});var Se=u(I);return Y(Se,"scroll",X.updateBound,X.scrollParents),X.scrollElement=Se,X.eventsEnabled=!0,X}function _e(){this.state.eventsEnabled||(this.state=Je(this.reference,this.options,this.state,this.scheduleUpdate))}function it(I,q){return Oe(I).removeEventListener("resize",q.updateBound),q.scrollParents.forEach(function(X){X.removeEventListener("scroll",q.updateBound)}),q.updateBound=null,q.scrollParents=[],q.scrollElement=null,q.eventsEnabled=!1,q}function Lt(){this.state.eventsEnabled&&(cancelAnimationFrame(this.scheduleUpdate),this.state=it(this.reference,this.state))}function jr(I){return I!==""&&!isNaN(parseFloat(I))&&isFinite(I)}function zr(I,q){Object.keys(q).forEach(function(X){var ae="";["width","height","top","right","bottom","left"].indexOf(X)!==-1&&jr(q[X])&&(ae="px"),I.style[X]=q[X]+ae})}function Yt(I,q){Object.keys(q).forEach(function(X){var ae=q[X];ae!==!1?I.setAttribute(X,q[X]):I.removeAttribute(X)})}function vo(I){return zr(I.instance.popper,I.styles),Yt(I.instance.popper,I.attributes),I.arrowElement&&Object.keys(I.arrowStyles).length&&zr(I.arrowElement,I.arrowStyles),I}function Fo(I,q,X,ae,Se){var ye=_(Se,q,I,X.positionFixed),Ie=E(X.placement,ye,q,I,X.modifiers.flip.boundariesElement,X.modifiers.flip.padding);return q.setAttribute("x-placement",Ie),zr(q,{position:X.positionFixed?"fixed":"absolute"}),X}function Yi(I,q){var X=I.offsets,ae=X.popper,Se=X.reference,ye=Math.round,Ie=Math.floor,Le=function(Bo){return Bo},Fe=ye(Se.width),Ge=ye(ae.width),Xe=["left","right"].indexOf(I.placement)!==-1,qe=I.placement.indexOf("-")!==-1,st=Fe%2===Ge%2,tt=Fe%2===1&&Ge%2===1,at=q?Xe||qe||st?ye:Ie:Le,kr=q?ye:Le;return{left:at(tt&&!qe&&q?ae.left-1:ae.left),top:kr(ae.top),bottom:kr(ae.bottom),right:at(ae.right)}}var yo=e&&/Firefox/i.test(navigator.userAgent);function ir(I,q){var X=q.x,ae=q.y,Se=I.offsets.popper,ye=W(I.instance.modifiers,function(ni){return ni.name==="applyStyle"}).gpuAcceleration;ye!==void 0&&console.warn("WARNING: `gpuAcceleration` option moved to `computeStyle` modifier and will not be supported in future versions of Popper.js!");var Ie=ye!==void 0?ye:q.gpuAcceleration,Le=g(I.instance.popper),Fe=$(Le),Ge={position:Se.position},Xe=Yi(I,window.devicePixelRatio<2||!yo),qe=X==="bottom"?"top":"bottom",st=ae==="right"?"left":"right",tt=de("transform"),at=void 0,kr=void 0;if(qe==="bottom"?Le.nodeName==="HTML"?kr=-Le.clientHeight+Xe.bottom:kr=-Fe.height+Xe.bottom:kr=Xe.top,st==="right"?Le.nodeName==="HTML"?at=-Le.clientWidth+Xe.right:at=-Fe.width+Xe.right:at=Xe.left,Ie&&tt)Ge[tt]="translate3d("+at+"px, "+kr+"px, 0)",Ge[qe]=0,Ge[st]=0,Ge.willChange="transform";else{var ya=qe==="bottom"?-1:1,Bo=st==="right"?-1:1;Ge[qe]=kr*ya,Ge[st]=at*Bo,Ge.willChange=qe+", "+st}var Zn={"x-placement":I.placement};return I.attributes=T({},Zn,I.attributes),I.styles=T({},Ge,I.styles),I.arrowStyles=T({},I.offsets.arrow,I.arrowStyles),I}function Ns(I,q,X){var ae=W(I,function(Le){var Fe=Le.name;return Fe===q}),Se=!!ae&&I.some(function(Le){return Le.name===X&&Le.enabled&&Le.order<ae.order});if(!Se){var ye="`"+q+"`",Ie="`"+X+"`";console.warn(Ie+" modifier is required by "+ye+" modifier in order to work, be sure to include it before "+ye+"!")}return Se}function vh(I,q){var X;if(!Ns(I.instance.modifiers,"arrow","keepTogether"))return I;var ae=q.element;if(typeof ae=="string"){if(ae=I.instance.popper.querySelector(ae),!ae)return I}else if(!I.instance.popper.contains(ae))return console.warn("WARNING: `arrow.element` must be child of its popper element!"),I;var Se=I.placement.split("-")[0],ye=I.offsets,Ie=ye.popper,Le=ye.reference,Fe=["left","right"].indexOf(Se)!==-1,Ge=Fe?"height":"width",Xe=Fe?"Top":"Left",qe=Xe.toLowerCase(),st=Fe?"left":"top",tt=Fe?"bottom":"right",at=B(ae)[Ge];Le[tt]-at<Ie[qe]&&(I.offsets.popper[qe]-=Ie[qe]-(Le[tt]-at)),Le[qe]+at>Ie[tt]&&(I.offsets.popper[qe]+=Le[qe]+at-Ie[tt]),I.offsets.popper=G(I.offsets.popper);var kr=Le[qe]+Le[Ge]/2-at/2,ya=s(I.instance.popper),Bo=parseFloat(ya["margin"+Xe]),Zn=parseFloat(ya["border"+Xe+"Width"]),ni=kr-I.offsets.popper[qe]-Bo-Zn;return ni=Math.max(Math.min(Ie[Ge]-at,ni),0),I.arrowElement=ae,I.offsets.arrow=(X={},F(X,qe,Math.round(ni)),F(X,st,""),X),I}function ri(I){return I==="end"?"start":I==="start"?"end":I}var gn=["auto-start","auto","auto-end","top-start","top","top-end","right-start","right","right-end","bottom-end","bottom","bottom-start","left-end","left","left-start"],oi=gn.slice(3);function Ts(I){var q=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1,X=oi.indexOf(I),ae=oi.slice(X+1).concat(oi.slice(0,X));return q?ae.reverse():ae}var Tn={FLIP:"flip",CLOCKWISE:"clockwise",COUNTERCLOCKWISE:"counterclockwise"};function Il(I,q){if(Ue(I.instance.modifiers,"inner")||I.flipped&&I.placement===I.originalPlacement)return I;var X=R(I.instance.popper,I.instance.reference,q.padding,q.boundariesElement,I.positionFixed),ae=I.placement.split("-")[0],Se=j(ae),ye=I.placement.split("-")[1]||"",Ie=[];switch(q.behavior){case Tn.FLIP:Ie=[ae,Se];break;case Tn.CLOCKWISE:Ie=Ts(ae);break;case Tn.COUNTERCLOCKWISE:Ie=Ts(ae,!0);break;default:Ie=q.behavior}return Ie.forEach(function(Le,Fe){if(ae!==Le||Ie.length===Fe+1)return I;ae=I.placement.split("-")[0],Se=j(ae);var Ge=I.offsets.popper,Xe=I.offsets.reference,qe=Math.floor,st=ae==="left"&&qe(Ge.right)>qe(Xe.left)||ae==="right"&&qe(Ge.left)<qe(Xe.right)||ae==="top"&&qe(Ge.bottom)>qe(Xe.top)||ae==="bottom"&&qe(Ge.top)<qe(Xe.bottom),tt=qe(Ge.left)<qe(X.left),at=qe(Ge.right)>qe(X.right),kr=qe(Ge.top)<qe(X.top),ya=qe(Ge.bottom)>qe(X.bottom),Bo=ae==="left"&&tt||ae==="right"&&at||ae==="top"&&kr||ae==="bottom"&&ya,Zn=["top","bottom"].indexOf(ae)!==-1,ni=!!q.flipVariations&&(Zn&&ye==="start"&&tt||Zn&&ye==="end"&&at||!Zn&&ye==="start"&&kr||!Zn&&ye==="end"&&ya),MN=!!q.flipVariationsByContent&&(Zn&&ye==="start"&&at||Zn&&ye==="end"&&tt||!Zn&&ye==="start"&&ya||!Zn&&ye==="end"&&kr),rf=ni||MN;(st||Bo||rf)&&(I.flipped=!0,(st||Bo)&&(ae=Ie[Fe+1]),rf&&(ye=ri(ye)),I.placement=ae+(ye?"-"+ye:""),I.offsets.popper=T({},I.offsets.popper,re(I.instance.popper,I.offsets.reference,I.placement)),I=Q(I.instance.modifiers,I,"flip"))}),I}function Jc(I){var q=I.offsets,X=q.popper,ae=q.reference,Se=I.placement.split("-")[0],ye=Math.floor,Ie=["top","bottom"].indexOf(Se)!==-1,Le=Ie?"right":"bottom",Fe=Ie?"left":"top",Ge=Ie?"width":"height";return X[Le]<ye(ae[Fe])&&(I.offsets.popper[Fe]=ye(ae[Fe])-X[Ge]),X[Fe]>ye(ae[Le])&&(I.offsets.popper[Fe]=ye(ae[Le])),I}function Qc(I,q,X,ae){var Se=I.match(/((?:\-|\+)?\d*\.?\d*)(.*)/),ye=+Se[1],Ie=Se[2];if(!ye)return I;if(Ie.indexOf("%")===0){var Le=void 0;Ie==="%p"?Le=X:Le=ae;var Fe=G(Le);return Fe[q]/100*ye}else if(Ie==="vh"||Ie==="vw"){var Ge=void 0;return Ie==="vh"?Ge=Math.max(document.documentElement.clientHeight,window.innerHeight||0):Ge=Math.max(document.documentElement.clientWidth,window.innerWidth||0),Ge/100*ye}else return ye}function kn(I,q,X,ae){var Se=[0,0],ye=["right","left"].indexOf(ae)!==-1,Ie=I.split(/(\+|\-)/).map(function(Xe){return Xe.trim()}),Le=Ie.indexOf(W(Ie,function(Xe){return Xe.search(/,|\s/)!==-1}));Ie[Le]&&Ie[Le].indexOf(",")===-1&&console.warn("Offsets separated by white space(s) are deprecated, use a comma (,) instead.");var Fe=/\s*,\s*|\s+/,Ge=Le!==-1?[Ie.slice(0,Le).concat([Ie[Le].split(Fe)[0]]),[Ie[Le].split(Fe)[1]].concat(Ie.slice(Le+1))]:[Ie];return Ge=Ge.map(function(Xe,qe){var st=(qe===1?!ye:ye)?"height":"width",tt=!1;return Xe.reduce(function(at,kr){return at[at.length-1]===""&&["+","-"].indexOf(kr)!==-1?(at[at.length-1]=kr,tt=!0,at):tt?(at[at.length-1]+=kr,tt=!1,at):at.concat(kr)},[]).map(function(at){return Qc(at,st,q,X)})}),Ge.forEach(function(Xe,qe){Xe.forEach(function(st,tt){jr(st)&&(Se[qe]+=st*(Xe[tt-1]==="-"?-1:1))})}),Se}function Wu(I,q){var X=q.offset,ae=I.placement,Se=I.offsets,ye=Se.popper,Ie=Se.reference,Le=ae.split("-")[0],Fe=void 0;return jr(+X)?Fe=[+X,0]:Fe=kn(X,ye,Ie,Le),Le==="left"?(ye.top+=Fe[0],ye.left-=Fe[1]):Le==="right"?(ye.top+=Fe[0],ye.left+=Fe[1]):Le==="top"?(ye.left+=Fe[0],ye.top-=Fe[1]):Le==="bottom"&&(ye.left+=Fe[0],ye.top+=Fe[1]),I.popper=ye,I}function ef(I,q){var X=q.boundariesElement||g(I.instance.popper);I.instance.reference===X&&(X=g(X));var ae=de("transform"),Se=I.instance.popper.style,ye=Se.top,Ie=Se.left,Le=Se[ae];Se.top="",Se.left="",Se[ae]="";var Fe=R(I.instance.popper,I.instance.reference,q.padding,X,I.positionFixed);Se.top=ye,Se.left=Ie,Se[ae]=Le,q.boundaries=Fe;var Ge=q.priority,Xe=I.offsets.popper,qe={primary:function(tt){var at=Xe[tt];return Xe[tt]<Fe[tt]&&!q.escapeWithReference&&(at=Math.max(Xe[tt],Fe[tt])),F({},tt,at)},secondary:function(tt){var at=tt==="right"?"left":"top",kr=Xe[at];return Xe[tt]>Fe[tt]&&!q.escapeWithReference&&(kr=Math.min(Xe[at],Fe[tt]-(tt==="right"?Xe.width:Xe.height))),F({},at,kr)}};return Ge.forEach(function(st){var tt=["left","top"].indexOf(st)!==-1?"primary":"secondary";Xe=T({},Xe,qe[tt](st))}),I.offsets.popper=Xe,I}function Os(I){var q=I.placement,X=q.split("-")[0],ae=q.split("-")[1];if(ae){var Se=I.offsets,ye=Se.reference,Ie=Se.popper,Le=["bottom","top"].indexOf(X)!==-1,Fe=Le?"left":"top",Ge=Le?"width":"height",Xe={start:F({},Fe,ye[Fe]),end:F({},Fe,ye[Fe]+ye[Ge]-Ie[Ge])};I.offsets.popper=T({},Ie,Xe[ae])}return I}function Es(I){if(!Ns(I.instance.modifiers,"hide","preventOverflow"))return I;var q=I.offsets.reference,X=W(I.instance.modifiers,function(ae){return ae.name==="preventOverflow"}).boundaries;if(q.bottom<X.top||q.left>X.right||q.top>X.bottom||q.right<X.left){if(I.hide===!0)return I;I.hide=!0,I.attributes["x-out-of-boundaries"]=""}else{if(I.hide===!1)return I;I.hide=!1,I.attributes["x-out-of-boundaries"]=!1}return I}function Gu(I){var q=I.placement,X=q.split("-")[0],ae=I.offsets,Se=ae.popper,ye=ae.reference,Ie=["left","right"].indexOf(X)!==-1,Le=["top","left"].indexOf(X)===-1;return Se[Ie?"left":"top"]=ye[X]-(Le?Se[Ie?"width":"height"]:0),I.placement=j(q),I.offsets.popper=G(Se),I}var tf={shift:{order:100,enabled:!0,fn:Os},offset:{order:200,enabled:!0,fn:Wu,offset:0},preventOverflow:{order:300,enabled:!0,fn:ef,priority:["left","right","top","bottom"],padding:5,boundariesElement:"scrollParent"},keepTogether:{order:400,enabled:!0,fn:Jc},arrow:{order:500,enabled:!0,fn:vh,element:"[x-arrow]"},flip:{order:600,enabled:!0,fn:Il,behavior:"flip",padding:5,boundariesElement:"viewport",flipVariations:!1,flipVariationsByContent:!1},inner:{order:700,enabled:!1,fn:Gu},hide:{order:800,enabled:!0,fn:Es},computeStyle:{order:850,enabled:!0,fn:ir,gpuAcceleration:!0,x:"bottom",y:"right"},applyStyle:{order:900,enabled:!0,fn:vo,onLoad:Fo,gpuAcceleration:void 0}},qr={placement:"bottom",positionFixed:!1,eventsEnabled:!0,removeOnDestroy:!1,onCreate:function(){},onUpdate:function(){},modifiers:tf},gr=(function(){function I(q,X){var ae=this,Se=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};L(this,I),this.scheduleUpdate=function(){return requestAnimationFrame(ae.update)},this.update=a(this.update.bind(this)),this.options=T({},I.Defaults,Se),this.state={isDestroyed:!1,isCreated:!1,scrollParents:[]},this.reference=q&&q.jquery?q[0]:q,this.popper=X&&X.jquery?X[0]:X,this.options.modifiers={},Object.keys(T({},I.Defaults.modifiers,Se.modifiers)).forEach(function(Ie){ae.options.modifiers[Ie]=T({},I.Defaults.modifiers[Ie]||{},Se.modifiers?Se.modifiers[Ie]:{})}),this.modifiers=Object.keys(this.options.modifiers).map(function(Ie){return T({name:Ie},ae.options.modifiers[Ie])}).sort(function(Ie,Le){return Ie.order-Le.order}),this.modifiers.forEach(function(Ie){Ie.enabled&&i(Ie.onLoad)&&Ie.onLoad(ae.reference,ae.popper,ae.options,Ie,ae.state)}),this.update();var ye=this.options.eventsEnabled;ye&&this.enableEventListeners(),this.state.eventsEnabled=ye}return C(I,[{key:"update",value:function(){return ue.call(this)}},{key:"destroy",value:function(){return Pe.call(this)}},{key:"enableEventListeners",value:function(){return _e.call(this)}},{key:"disableEventListeners",value:function(){return Lt.call(this)}}]),I})();return gr.Utils=(typeof window<"u"?window:global).PopperUtils,gr.placements=gn,gr.Defaults=qr,gr}))});var j8=Re(RS=>{"use strict";Object.defineProperty(RS,"__esModule",{value:!0});RS.parsePopperOffset=Hxe;RS.toPopperPlacement=qxe;function qxe(e){return e.replace(/(Top|Left)$/,"-start").replace(/(Right|Bottom)$/,"-end")}function Hxe(e){return{top:Math.floor(e.top||0),left:Math.floor(e.left||0)}}});var IE=Re(NS=>{"use strict";Object.defineProperty(NS,"__esModule",{value:!0});NS.TETHER_PLACEMENT=void 0;var uHe=NS.TETHER_PLACEMENT={auto:"auto",topLeft:"topLeft",top:"top",topRight:"topRight",rightTop:"rightTop",right:"right",rightBottom:"rightBottom",bottomRight:"bottomRight",bottom:"bottom",bottomLeft:"bottomLeft",leftBottom:"leftBottom",left:"left",leftTop:"leftTop"}});var q8=Re(OS=>{"use strict";Object.defineProperty(OS,"__esModule",{value:!0});OS.default=void 0;var Kxe=Xxe(ie()),$xe=Zxe(G8()),DE=j8(),Yxe=IE();function Zxe(e){return e&&e.__esModule?e:{default:e}}function z8(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(z8=function(o){return o?r:t})(e)}function Xxe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=z8(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}function bd(e,t,r){return t=Jxe(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Jxe(e){var t=Qxe(e,"string");return typeof t=="symbol"?t:String(t)}function Qxe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TS=class extends Kxe.Component{constructor(...t){super(...t),bd(this,"popper",void 0),bd(this,"popperHeight",0),bd(this,"popperWidth",0),bd(this,"anchorHeight",0),bd(this,"anchorWidth",0),bd(this,"state",{isMounted:!1}),bd(this,"onPopperUpdate",r=>{let o={popper:(0,DE.parsePopperOffset)(r.offsets.popper),arrow:r.offsets.arrow?(0,DE.parsePopperOffset)(r.offsets.arrow):{top:0,left:0}};this.props.onPopperUpdate(o,r)})}componentDidMount(){this.setState({isMounted:!0})}componentDidUpdate(t,r){if(this.props.anchorRef){let{height:o,width:n}=this.props.anchorRef.getBoundingClientRect();(this.anchorHeight!==o||this.anchorWidth!==n)&&(this.anchorHeight=o,this.anchorWidth=n,this.popper&&this.popper.scheduleUpdate())}if(this.props.popperRef){let{height:o,width:n}=this.props.popperRef.getBoundingClientRect();(this.popperHeight!==o||this.popperWidth!==n)&&(this.popperHeight=o,this.popperWidth=n,this.popper&&this.popper.scheduleUpdate()),this.state.isMounted!==r.isMounted&&this.props.anchorRef&&this.initializePopper()}}componentWillUnmount(){this.destroyPopover()}initializePopper(){let{placement:t,popperOptions:r}=this.props,{modifiers:o,...n}=r;!this.props.anchorRef||!this.props.popperRef||(this.popper=new $xe.default(this.props.anchorRef,this.props.popperRef,{placement:(0,DE.toPopperPlacement)(t),modifiers:{arrow:{element:this.props.arrowRef,enabled:!!this.props.arrowRef},computeStyle:{gpuAcceleration:!1},applyStyle:{enabled:!1},applyReactStyle:{enabled:!0,fn:this.onPopperUpdate,order:900},preventOverflow:{enabled:!0},...o},...n}))}destroyPopover(){this.popper&&(this.popper.destroy(),delete this.popper)}render(){return this.props.children||null}};bd(TS,"defaultProps",{anchorRef:null,onPopperUpdate:()=>null,placement:Yxe.TETHER_PLACEMENT.auto,popperRef:null,popperOptions:{}});var cHe=OS.default=TS});var H8=Re(()=>{"use strict"});var Z8=Re(Ks=>{"use strict";Object.defineProperty(Ks,"__esModule",{value:!0});var ebe={LayersManager:!0,LayersContext:!0,Layer:!0,TetherBehavior:!0,TETHER_PLACEMENT:!0};Object.defineProperty(Ks,"Layer",{enumerable:!0,get:function(){return tbe.default}});Object.defineProperty(Ks,"LayersContext",{enumerable:!0,get:function(){return K8.LayersContext}});Object.defineProperty(Ks,"LayersManager",{enumerable:!0,get:function(){return K8.default}});Object.defineProperty(Ks,"TETHER_PLACEMENT",{enumerable:!0,get:function(){return obe.TETHER_PLACEMENT}});Object.defineProperty(Ks,"TetherBehavior",{enumerable:!0,get:function(){return rbe.default}});var K8=nbe(wE()),tbe=$8(W8()),rbe=$8(q8()),obe=IE(),LE=H8();Object.keys(LE).forEach(function(e){e==="default"||e==="__esModule"||Object.prototype.hasOwnProperty.call(ebe,e)||e in Ks&&Ks[e]===LE[e]||Object.defineProperty(Ks,e,{enumerable:!0,get:function(){return LE[e]}})});function $8(e){return e&&e.__esModule?e:{default:e}}function Y8(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(Y8=function(o){return o?r:t})(e)}function nbe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=Y8(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}});var J8=Re(ES=>{"use strict";Object.defineProperty(ES,"__esModule",{value:!0});ES.default=void 0;var RE=lbe(ie()),abe=c8(),ibe=Z8(),sbe=Ev();function X8(e){if(typeof WeakMap!="function")return null;var t=new WeakMap,r=new WeakMap;return(X8=function(o){return o?r:t})(e)}function lbe(e,t){if(!t&&e&&e.__esModule)return e;if(e===null||typeof e!="object"&&typeof e!="function")return{default:e};var r=X8(t);if(r&&r.has(e))return r.get(e);var o={__proto__:null},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(a!=="default"&&Object.prototype.hasOwnProperty.call(e,a)){var i=n?Object.getOwnPropertyDescriptor(e,a):null;i&&(i.get||i.set)?Object.defineProperty(o,a,i):o[a]=e[a]}return o.default=e,r&&r.set(e,o),o}var ube=e=>{let{children:t,overrides:r,theme:o,zIndex:n}=e;return RE.createElement(ibe.LayersManager,{zIndex:n,overrides:r},RE.createElement(abe.UIDReset,{prefix:"bui"},RE.createElement(sbe.ThemeProvider,{theme:o},t)))},kHe=ES.default=ube});var tH=Re(Rr=>{"use strict";Object.defineProperty(Rr,"__esModule",{value:!0});Object.defineProperty(Rr,"BaseProvider",{enumerable:!0,get:function(){return cbe.default}});Object.defineProperty(Rr,"DarkTheme",{enumerable:!0,get:function(){return $s.DarkTheme}});Object.defineProperty(Rr,"DarkThemeMove",{enumerable:!0,get:function(){return $s.DarkThemeMove}});Object.defineProperty(Rr,"LightTheme",{enumerable:!0,get:function(){return $s.LightTheme}});Object.defineProperty(Rr,"LightThemeMove",{enumerable:!0,get:function(){return $s.LightThemeMove}});Object.defineProperty(Rr,"LocaleProvider",{enumerable:!0,get:function(){return dbe.default}});Object.defineProperty(Rr,"ThemeConsumer",{enumerable:!0,get:function(){return zl.ThemeConsumer}});Object.defineProperty(Rr,"ThemeProvider",{enumerable:!0,get:function(){return zl.ThemeProvider}});Object.defineProperty(Rr,"createDarkTheme",{enumerable:!0,get:function(){return $s.createDarkTheme}});Object.defineProperty(Rr,"createLightTheme",{enumerable:!0,get:function(){return $s.createLightTheme}});Object.defineProperty(Rr,"createTheme",{enumerable:!0,get:function(){return $s.createTheme}});Object.defineProperty(Rr,"createThemedStyled",{enumerable:!0,get:function(){return zl.createThemedStyled}});Object.defineProperty(Rr,"createThemedUseStyletron",{enumerable:!0,get:function(){return zl.createThemedUseStyletron}});Object.defineProperty(Rr,"createThemedWithStyle",{enumerable:!0,get:function(){return zl.createThemedWithStyle}});Object.defineProperty(Rr,"darkThemeOverrides",{enumerable:!0,get:function(){return $s.darkThemeOverrides}});Object.defineProperty(Rr,"darkThemePrimitives",{enumerable:!0,get:function(){return $s.darkThemePrimitives}});Object.defineProperty(Rr,"getOverrides",{enumerable:!0,get:function(){return Q8.getOverrides}});Object.defineProperty(Rr,"lightThemePrimitives",{enumerable:!0,get:function(){return $s.lightThemePrimitives}});Object.defineProperty(Rr,"mergeOverrides",{enumerable:!0,get:function(){return Q8.mergeOverrides}});Object.defineProperty(Rr,"styled",{enumerable:!0,get:function(){return zl.styled}});Object.defineProperty(Rr,"useStyletron",{enumerable:!0,get:function(){return zl.useStyletron}});Object.defineProperty(Rr,"withStyle",{enumerable:!0,get:function(){return zl.withStyle}});Object.defineProperty(Rr,"withWrapper",{enumerable:!0,get:function(){return zl.withWrapper}});var zl=Ev(),$s=jO(),dbe=eH(e8()),cbe=eH(J8()),Q8=yE();function eH(e){return e&&e.__esModule?e:{default:e}}});var Fg=Re((VS,gH)=>{"use strict";Object.defineProperty(VS,"__esModule",{value:!0});VS.default=Sbe;var Cbe=/-webkit-|-moz-|-ms-/;function Sbe(e){return typeof e=="string"&&Cbe.test(e)}gH.exports=VS.default});var IH=Re(($He,AH)=>{"use strict";var Obe=/[A-Z]/g,Ebe=/^ms-/,XE={};function _be(e){return"-"+e.toLowerCase()}function Fbe(e){if(XE.hasOwnProperty(e))return XE[e];var t=e.replace(Obe,_be);return XE[e]=Ebe.test(t)?"-"+t:t}AH.exports=Fbe});var LH=Re((WS,DH)=>{"use strict";Object.defineProperty(WS,"__esModule",{value:!0});WS.default=Wbe;var Bbe=IH(),Vbe=Ube(Bbe);function Ube(e){return e&&e.__esModule?e:{default:e}}function Wbe(e){return(0,Vbe.default)(e)}DH.exports=WS.default});var UH=Re(jS=>{"use strict";var Xbe=ie(),Jbe=Symbol.for("react.element"),Qbe=Symbol.for("react.fragment"),e0e=Object.prototype.hasOwnProperty,t0e=Xbe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,r0e={key:!0,ref:!0,__self:!0,__source:!0};function VH(e,t,r){var o,n={},a=null,i=null;r!==void 0&&(a=""+r),t.key!==void 0&&(a=""+t.key),t.ref!==void 0&&(i=t.ref);for(o in t)e0e.call(t,o)&&!r0e.hasOwnProperty(o)&&(n[o]=t[o]);if(e&&e.defaultProps)for(o in t=e.defaultProps,t)n[o]===void 0&&(n[o]=t[o]);return{$$typeof:Jbe,type:e,key:a,ref:i,props:n,_owner:t0e.current}}jS.Fragment=Qbe;jS.jsx=VH;jS.jsxs=VH});var ze=Re((PKe,WH)=>{"use strict";WH.exports=UH()});var kX=Re(gX=>{"use strict";var Nk=ie();function YAe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var ZAe=typeof Object.is=="function"?Object.is:YAe,XAe=Nk.useState,JAe=Nk.useEffect,QAe=Nk.useLayoutEffect,eIe=Nk.useDebugValue;function tIe(e,t){var r=t(),o=XAe({inst:{value:r,getSnapshot:t}}),n=o[0].inst,a=o[1];return QAe(function(){n.value=r,n.getSnapshot=t,PB(n)&&a({inst:n})},[e,r,t]),JAe(function(){return PB(n)&&a({inst:n}),e(function(){PB(n)&&a({inst:n})})},[e]),eIe(r),r}function PB(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!ZAe(e,r)}catch{return!0}}function rIe(e,t){return t()}var oIe=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?rIe:tIe;gX.useSyncExternalStore=Nk.useSyncExternalStore!==void 0?Nk.useSyncExternalStore:oIe});var hX=Re((Ggt,MX)=>{"use strict";MX.exports=kX()});var yX=Re(vX=>{"use strict";var JA=ie(),nIe=hX();function aIe(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var iIe=typeof Object.is=="function"?Object.is:aIe,sIe=nIe.useSyncExternalStore,lIe=JA.useRef,uIe=JA.useEffect,dIe=JA.useMemo,cIe=JA.useDebugValue;vX.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var a=lIe(null);if(a.current===null){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=dIe(function(){function l(p){if(!u){if(u=!0,d=p,p=o(p),n!==void 0&&i.hasValue){var g=i.value;if(n(g,p))return c=g}return c=p}if(g=c,iIe(d,p))return g;var m=o(p);return n!==void 0&&n(g,m)?(d=p,g):(d=p,c=m)}var u=!1,d,c,f=r===void 0?null:r;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,r,o,n]);var s=sIe(e,a[0],a[1]);return uIe(function(){i.hasValue=!0,i.value=s},[s]),cIe(s),s}});var bX=Re((zgt,xX)=>{"use strict";xX.exports=yX()});var YJ=Re($J=>{"use strict";var xx=ie();function Y1e(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Z1e=typeof Object.is=="function"?Object.is:Y1e,X1e=xx.useSyncExternalStore,J1e=xx.useRef,Q1e=xx.useEffect,eDe=xx.useMemo,tDe=xx.useDebugValue;$J.useSyncExternalStoreWithSelector=function(e,t,r,o,n){var a=J1e(null);if(a.current===null){var i={hasValue:!1,value:null};a.current=i}else i=a.current;a=eDe(function(){function l(p){if(!u){if(u=!0,d=p,p=o(p),n!==void 0&&i.hasValue){var g=i.value;if(n(g,p))return c=g}return c=p}if(g=c,Z1e(d,p))return g;var m=o(p);return n!==void 0&&n(g,m)?(d=p,g):(d=p,c=m)}var u=!1,d,c,f=r===void 0?null:r;return[function(){return l(t())},f===null?void 0:function(){return l(f())}]},[t,r,o,n]);var s=X1e(e,a[0],a[1]);return Q1e(function(){i.hasValue=!0,i.value=s},[s]),tDe(s),s}});var XJ=Re((TMt,ZJ)=>{"use strict";ZJ.exports=YJ()});var k3=Re((pee,a1)=>{(function(e){"use strict";var t=1e9,r={precision:20,rounding:4,toExpNeg:-7,toExpPos:21,LN10:"2.302585092994045684017991454684364207601101488628772976033327900967572609677352480235997205089598298341967784042286"},o=!0,n="[DecimalError] ",a=n+"Invalid argument: ",i=n+"Exponent out of range: ",s=Math.floor,l=Math.pow,u=/^(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,d,c=1e7,f=7,p=9007199254740991,g=s(p/f),m={};m.absoluteValue=m.abs=function(){var N=new this.constructor(this);return N.s&&(N.s=1),N},m.comparedTo=m.cmp=function(N){var R,U,E,_,B=this;if(N=new B.constructor(N),B.s!==N.s)return B.s||-N.s;if(B.e!==N.e)return B.e>N.e^B.s<0?1:-1;for(E=B.d.length,_=N.d.length,R=0,U=E<_?E:_;R<U;++R)if(B.d[R]!==N.d[R])return B.d[R]>N.d[R]^B.s<0?1:-1;return E===_?0:E>_^B.s<0?1:-1},m.decimalPlaces=m.dp=function(){var N=this,R=N.d.length-1,U=(R-N.e)*f;if(R=N.d[R],R)for(;R%10==0;R/=10)U--;return U<0?0:U},m.dividedBy=m.div=function(N){return v(this,new this.constructor(N))},m.dividedToIntegerBy=m.idiv=function(N){var R=this,U=R.constructor;return T(v(R,new U(N),0,1),U.precision)},m.equals=m.eq=function(N){return!this.cmp(N)},m.exponent=function(){return w(this)},m.greaterThan=m.gt=function(N){return this.cmp(N)>0},m.greaterThanOrEqualTo=m.gte=function(N){return this.cmp(N)>=0},m.isInteger=m.isint=function(){return this.e>this.d.length-2},m.isNegative=m.isneg=function(){return this.s<0},m.isPositive=m.ispos=function(){return this.s>0},m.isZero=function(){return this.s===0},m.lessThan=m.lt=function(N){return this.cmp(N)<0},m.lessThanOrEqualTo=m.lte=function(N){return this.cmp(N)<1},m.logarithm=m.log=function(N){var R,U=this,E=U.constructor,_=E.precision,B=_+5;if(N===void 0)N=new E(10);else if(N=new E(N),N.s<1||N.eq(d))throw Error(n+"NaN");if(U.s<1)throw Error(n+(U.s?"NaN":"-Infinity"));return U.eq(d)?new E(0):(o=!1,R=v(C(U,B),C(N,B),B),o=!0,T(R,_))},m.minus=m.sub=function(N){var R=this;return N=new R.constructor(N),R.s==N.s?G(R,N):h(R,(N.s=-N.s,N))},m.modulo=m.mod=function(N){var R,U=this,E=U.constructor,_=E.precision;if(N=new E(N),!N.s)throw Error(n+"NaN");return U.s?(o=!1,R=v(U,N,0,1).times(N),o=!0,U.minus(R)):T(new E(U),_)},m.naturalExponential=m.exp=function(){return b(this)},m.naturalLogarithm=m.ln=function(){return C(this)},m.negated=m.neg=function(){var N=new this.constructor(this);return N.s=-N.s||0,N},m.plus=m.add=function(N){var R=this;return N=new R.constructor(N),R.s==N.s?h(R,N):G(R,(N.s=-N.s,N))},m.precision=m.sd=function(N){var R,U,E,_=this;if(N!==void 0&&N!==!!N&&N!==1&&N!==0)throw Error(a+N);if(R=w(_)+1,E=_.d.length-1,U=E*f+1,E=_.d[E],E){for(;E%10==0;E/=10)U--;for(E=_.d[0];E>=10;E/=10)U++}return N&&R>U?R:U},m.squareRoot=m.sqrt=function(){var N,R,U,E,_,B,j,re=this,W=re.constructor;if(re.s<1){if(!re.s)return new W(0);throw Error(n+"NaN")}for(N=w(re),o=!1,_=Math.sqrt(+re),_==0||_==1/0?(R=M(re.d),(R.length+N)%2==0&&(R+="0"),_=Math.sqrt(R),N=s((N+1)/2)-(N<0||N%2),_==1/0?R="5e"+N:(R=_.toExponential(),R=R.slice(0,R.indexOf("e")+1)+N),E=new W(R)):E=new W(_.toString()),U=W.precision,_=j=U+3;;)if(B=E,E=B.plus(v(re,B,j+2)).times(.5),M(B.d).slice(0,j)===(R=M(E.d)).slice(0,j)){if(R=R.slice(j-3,j+1),_==j&&R=="4999"){if(T(B,U+1,0),B.times(B).eq(re)){E=B;break}}else if(R!="9999")break;j+=4}return o=!0,T(E,U)},m.times=m.mul=function(N){var R,U,E,_,B,j,re,W,K,Q=this,ue=Q.constructor,Ue=Q.d,de=(N=new ue(N)).d;if(!Q.s||!N.s)return new ue(0);for(N.s*=Q.s,U=Q.e+N.e,W=Ue.length,K=de.length,W<K&&(B=Ue,Ue=de,de=B,j=W,W=K,K=j),B=[],j=W+K,E=j;E--;)B.push(0);for(E=K;--E>=0;){for(R=0,_=W+E;_>E;)re=B[_]+de[E]*Ue[_-E-1]+R,B[_--]=re%c|0,R=re/c|0;B[_]=(B[_]+R)%c|0}for(;!B[--j];)B.pop();return R?++U:B.shift(),N.d=B,N.e=U,o?T(N,ue.precision):N},m.toDecimalPlaces=m.todp=function(N,R){var U=this,E=U.constructor;return U=new E(U),N===void 0?U:(k(N,0,t),R===void 0?R=E.rounding:k(R,0,8),T(U,N+w(U)+1,R))},m.toExponential=function(N,R){var U,E=this,_=E.constructor;return N===void 0?U=$(E,!0):(k(N,0,t),R===void 0?R=_.rounding:k(R,0,8),E=T(new _(E),N+1,R),U=$(E,!0,N+1)),U},m.toFixed=function(N,R){var U,E,_=this,B=_.constructor;return N===void 0?$(_):(k(N,0,t),R===void 0?R=B.rounding:k(R,0,8),E=T(new B(_),N+w(_)+1,R),U=$(E.abs(),!1,N+w(E)+1),_.isneg()&&!_.isZero()?"-"+U:U)},m.toInteger=m.toint=function(){var N=this,R=N.constructor;return T(new R(N),w(N)+1,R.rounding)},m.toNumber=function(){return+this},m.toPower=m.pow=function(N){var R,U,E,_,B,j,re=this,W=re.constructor,K=12,Q=+(N=new W(N));if(!N.s)return new W(d);if(re=new W(re),!re.s){if(N.s<1)throw Error(n+"Infinity");return re}if(re.eq(d))return re;if(E=W.precision,N.eq(d))return T(re,E);if(R=N.e,U=N.d.length-1,j=R>=U,B=re.s,j){if((U=Q<0?-Q:Q)<=p){for(_=new W(d),R=Math.ceil(E/f+4),o=!1;U%2&&(_=_.times(re),oe(_.d,R)),U=s(U/2),U!==0;)re=re.times(re),oe(re.d,R);return o=!0,N.s<0?new W(d).div(_):T(_,E)}}else if(B<0)throw Error(n+"NaN");return B=B<0&&N.d[Math.max(R,U)]&1?-1:1,re.s=1,o=!1,_=N.times(C(re,E+K)),o=!0,_=b(_),_.s=B,_},m.toPrecision=function(N,R){var U,E,_=this,B=_.constructor;return N===void 0?(U=w(_),E=$(_,U<=B.toExpNeg||U>=B.toExpPos)):(k(N,1,t),R===void 0?R=B.rounding:k(R,0,8),_=T(new B(_),N,R),U=w(_),E=$(_,N<=U||U<=B.toExpNeg,N)),E},m.toSignificantDigits=m.tosd=function(N,R){var U=this,E=U.constructor;return N===void 0?(N=E.precision,R=E.rounding):(k(N,1,t),R===void 0?R=E.rounding:k(R,0,8)),T(new E(U),N,R)},m.toString=m.valueOf=m.val=m.toJSON=function(){var N=this,R=w(N),U=N.constructor;return $(N,R<=U.toExpNeg||R>=U.toExpPos)};function h(N,R){var U,E,_,B,j,re,W,K,Q=N.constructor,ue=Q.precision;if(!N.s||!R.s)return R.s||(R=new Q(N)),o?T(R,ue):R;if(W=N.d,K=R.d,j=N.e,_=R.e,W=W.slice(),B=j-_,B){for(B<0?(E=W,B=-B,re=K.length):(E=K,_=j,re=W.length),j=Math.ceil(ue/f),re=j>re?j+1:re+1,B>re&&(B=re,E.length=1),E.reverse();B--;)E.push(0);E.reverse()}for(re=W.length,B=K.length,re-B<0&&(B=re,E=K,K=W,W=E),U=0;B;)U=(W[--B]=W[B]+K[B]+U)/c|0,W[B]%=c;for(U&&(W.unshift(U),++_),re=W.length;W[--re]==0;)W.pop();return R.d=W,R.e=_,o?T(R,ue):R}function k(N,R,U){if(N!==~~N||N<R||N>U)throw Error(a+N)}function M(N){var R,U,E,_=N.length-1,B="",j=N[0];if(_>0){for(B+=j,R=1;R<_;R++)E=N[R]+"",U=f-E.length,U&&(B+=L(U)),B+=E;j=N[R],E=j+"",U=f-E.length,U&&(B+=L(U))}else if(j===0)return"0";for(;j%10===0;)j/=10;return B+j}var v=(function(){function N(E,_){var B,j=0,re=E.length;for(E=E.slice();re--;)B=E[re]*_+j,E[re]=B%c|0,j=B/c|0;return j&&E.unshift(j),E}function R(E,_,B,j){var re,W;if(B!=j)W=B>j?1:-1;else for(re=W=0;re<B;re++)if(E[re]!=_[re]){W=E[re]>_[re]?1:-1;break}return W}function U(E,_,B){for(var j=0;B--;)E[B]-=j,j=E[B]<_[B]?1:0,E[B]=j*c+E[B]-_[B];for(;!E[0]&&E.length>1;)E.shift()}return function(E,_,B,j){var re,W,K,Q,ue,Ue,de,Pe,Oe,Y,Je,_e,it,Lt,jr,zr,Yt,vo,Fo=E.constructor,Yi=E.s==_.s?1:-1,yo=E.d,ir=_.d;if(!E.s)return new Fo(E);if(!_.s)throw Error(n+"Division by zero");for(W=E.e-_.e,Yt=ir.length,jr=yo.length,de=new Fo(Yi),Pe=de.d=[],K=0;ir[K]==(yo[K]||0);)++K;if(ir[K]>(yo[K]||0)&&--W,B==null?_e=B=Fo.precision:j?_e=B+(w(E)-w(_))+1:_e=B,_e<0)return new Fo(0);if(_e=_e/f+2|0,K=0,Yt==1)for(Q=0,ir=ir[0],_e++;(K<jr||Q)&&_e--;K++)it=Q*c+(yo[K]||0),Pe[K]=it/ir|0,Q=it%ir|0;else{for(Q=c/(ir[0]+1)|0,Q>1&&(ir=N(ir,Q),yo=N(yo,Q),Yt=ir.length,jr=yo.length),Lt=Yt,Oe=yo.slice(0,Yt),Y=Oe.length;Y<Yt;)Oe[Y++]=0;vo=ir.slice(),vo.unshift(0),zr=ir[0],ir[1]>=c/2&&++zr;do Q=0,re=R(ir,Oe,Yt,Y),re<0?(Je=Oe[0],Yt!=Y&&(Je=Je*c+(Oe[1]||0)),Q=Je/zr|0,Q>1?(Q>=c&&(Q=c-1),ue=N(ir,Q),Ue=ue.length,Y=Oe.length,re=R(ue,Oe,Ue,Y),re==1&&(Q--,U(ue,Yt<Ue?vo:ir,Ue))):(Q==0&&(re=Q=1),ue=ir.slice()),Ue=ue.length,Ue<Y&&ue.unshift(0),U(Oe,ue,Y),re==-1&&(Y=Oe.length,re=R(ir,Oe,Yt,Y),re<1&&(Q++,U(Oe,Yt<Y?vo:ir,Y))),Y=Oe.length):re===0&&(Q++,Oe=[0]),Pe[K++]=Q,re&&Oe[0]?Oe[Y++]=yo[Lt]||0:(Oe=[yo[Lt]],Y=1);while((Lt++<jr||Oe[0]!==void 0)&&_e--)}return Pe[0]||Pe.shift(),de.e=W,T(de,j?B+w(de)+1:B)}})();function b(N,R){var U,E,_,B,j,re,W=0,K=0,Q=N.constructor,ue=Q.precision;if(w(N)>16)throw Error(i+w(N));if(!N.s)return new Q(d);for(R==null?(o=!1,re=ue):re=R,j=new Q(.03125);N.abs().gte(.1);)N=N.times(j),K+=5;for(E=Math.log(l(2,K))/Math.LN10*2+5|0,re+=E,U=_=B=new Q(d),Q.precision=re;;){if(_=T(_.times(N),re),U=U.times(++W),j=B.plus(v(_,U,re)),M(j.d).slice(0,re)===M(B.d).slice(0,re)){for(;K--;)B=T(B.times(B),re);return Q.precision=ue,R==null?(o=!0,T(B,ue)):B}B=j}}function w(N){for(var R=N.e*f,U=N.d[0];U>=10;U/=10)R++;return R}function P(N,R,U){if(R>N.LN10.sd())throw o=!0,U&&(N.precision=U),Error(n+"LN10 precision limit exceeded");return T(new N(N.LN10),R)}function L(N){for(var R="";N--;)R+="0";return R}function C(N,R){var U,E,_,B,j,re,W,K,Q,ue=1,Ue=10,de=N,Pe=de.d,Oe=de.constructor,Y=Oe.precision;if(de.s<1)throw Error(n+(de.s?"NaN":"-Infinity"));if(de.eq(d))return new Oe(0);if(R==null?(o=!1,K=Y):K=R,de.eq(10))return R==null&&(o=!0),P(Oe,K);if(K+=Ue,Oe.precision=K,U=M(Pe),E=U.charAt(0),B=w(de),Math.abs(B)<15e14){for(;E<7&&E!=1||E==1&&U.charAt(1)>3;)de=de.times(N),U=M(de.d),E=U.charAt(0),ue++;B=w(de),E>1?(de=new Oe("0."+U),B++):de=new Oe(E+"."+U.slice(1))}else return W=P(Oe,K+2,Y).times(B+""),de=C(new Oe(E+"."+U.slice(1)),K-Ue).plus(W),Oe.precision=Y,R==null?(o=!0,T(de,Y)):de;for(re=j=de=v(de.minus(d),de.plus(d),K),Q=T(de.times(de),K),_=3;;){if(j=T(j.times(Q),K),W=re.plus(v(j,new Oe(_),K)),M(W.d).slice(0,K)===M(re.d).slice(0,K))return re=re.times(2),B!==0&&(re=re.plus(P(Oe,K+2,Y).times(B+""))),re=v(re,new Oe(ue),K),Oe.precision=Y,R==null?(o=!0,T(re,Y)):re;re=W,_+=2}}function F(N,R){var U,E,_;for((U=R.indexOf("."))>-1&&(R=R.replace(".","")),(E=R.search(/e/i))>0?(U<0&&(U=E),U+=+R.slice(E+1),R=R.substring(0,E)):U<0&&(U=R.length),E=0;R.charCodeAt(E)===48;)++E;for(_=R.length;R.charCodeAt(_-1)===48;)--_;if(R=R.slice(E,_),R){if(_-=E,U=U-E-1,N.e=s(U/f),N.d=[],E=(U+1)%f,U<0&&(E+=f),E<_){for(E&&N.d.push(+R.slice(0,E)),_-=f;E<_;)N.d.push(+R.slice(E,E+=f));R=R.slice(E),E=f-R.length}else E-=_;for(;E--;)R+="0";if(N.d.push(+R),o&&(N.e>g||N.e<-g))throw Error(i+U)}else N.s=0,N.e=0,N.d=[0];return N}function T(N,R,U){var E,_,B,j,re,W,K,Q,ue=N.d;for(j=1,B=ue[0];B>=10;B/=10)j++;if(E=R-j,E<0)E+=f,_=R,K=ue[Q=0];else{if(Q=Math.ceil((E+1)/f),B=ue.length,Q>=B)return N;for(K=B=ue[Q],j=1;B>=10;B/=10)j++;E%=f,_=E-f+j}if(U!==void 0&&(B=l(10,j-_-1),re=K/B%10|0,W=R<0||ue[Q+1]!==void 0||K%B,W=U<4?(re||W)&&(U==0||U==(N.s<0?3:2)):re>5||re==5&&(U==4||W||U==6&&(E>0?_>0?K/l(10,j-_):0:ue[Q-1])%10&1||U==(N.s<0?8:7))),R<1||!ue[0])return W?(B=w(N),ue.length=1,R=R-B-1,ue[0]=l(10,(f-R%f)%f),N.e=s(-R/f)||0):(ue.length=1,ue[0]=N.e=N.s=0),N;if(E==0?(ue.length=Q,B=1,Q--):(ue.length=Q+1,B=l(10,f-E),ue[Q]=_>0?(K/l(10,j-_)%l(10,_)|0)*B:0),W)for(;;)if(Q==0){(ue[0]+=B)==c&&(ue[0]=1,++N.e);break}else{if(ue[Q]+=B,ue[Q]!=c)break;ue[Q--]=0,B=1}for(E=ue.length;ue[--E]===0;)ue.pop();if(o&&(N.e>g||N.e<-g))throw Error(i+w(N));return N}function G(N,R){var U,E,_,B,j,re,W,K,Q,ue,Ue=N.constructor,de=Ue.precision;if(!N.s||!R.s)return R.s?R.s=-R.s:R=new Ue(N),o?T(R,de):R;if(W=N.d,ue=R.d,E=R.e,K=N.e,W=W.slice(),j=K-E,j){for(Q=j<0,Q?(U=W,j=-j,re=ue.length):(U=ue,E=K,re=W.length),_=Math.max(Math.ceil(de/f),re)+2,j>_&&(j=_,U.length=1),U.reverse(),_=j;_--;)U.push(0);U.reverse()}else{for(_=W.length,re=ue.length,Q=_<re,Q&&(re=_),_=0;_<re;_++)if(W[_]!=ue[_]){Q=W[_]<ue[_];break}j=0}for(Q&&(U=W,W=ue,ue=U,R.s=-R.s),re=W.length,_=ue.length-re;_>0;--_)W[re++]=0;for(_=ue.length;_>j;){if(W[--_]<ue[_]){for(B=_;B&&W[--B]===0;)W[B]=c-1;--W[B],W[_]+=c}W[_]-=ue[_]}for(;W[--re]===0;)W.pop();for(;W[0]===0;W.shift())--E;return W[0]?(R.d=W,R.e=E,o?T(R,de):R):new Ue(0)}function $(N,R,U){var E,_=w(N),B=M(N.d),j=B.length;return R?(U&&(E=U-j)>0?B=B.charAt(0)+"."+B.slice(1)+L(E):j>1&&(B=B.charAt(0)+"."+B.slice(1)),B=B+(_<0?"e":"e+")+_):_<0?(B="0."+L(-_-1)+B,U&&(E=U-j)>0&&(B+=L(E))):_>=j?(B+=L(_+1-j),U&&(E=U-_-1)>0&&(B=B+"."+L(E))):((E=_+1)<j&&(B=B.slice(0,E)+"."+B.slice(E)),U&&(E=U-j)>0&&(_+1===j&&(B+="."),B+=L(E))),N.s<0?"-"+B:B}function oe(N,R){if(N.length>R)return N.length=R,!0}function se(N){var R,U,E;function _(B){var j=this;if(!(j instanceof _))return new _(B);if(j.constructor=_,B instanceof _){j.s=B.s,j.e=B.e,j.d=(B=B.d)?B.slice():B;return}if(typeof B=="number"){if(B*0!==0)throw Error(a+B);if(B>0)j.s=1;else if(B<0)B=-B,j.s=-1;else{j.s=0,j.e=0,j.d=[0];return}if(B===~~B&&B<1e7){j.e=0,j.d=[B];return}return F(j,B.toString())}else if(typeof B!="string")throw Error(a+B);if(B.charCodeAt(0)===45?(B=B.slice(1),j.s=-1):j.s=1,u.test(B))F(j,B);else throw Error(a+B)}if(_.prototype=m,_.ROUND_UP=0,_.ROUND_DOWN=1,_.ROUND_CEIL=2,_.ROUND_FLOOR=3,_.ROUND_HALF_UP=4,_.ROUND_HALF_DOWN=5,_.ROUND_HALF_EVEN=6,_.ROUND_HALF_CEIL=7,_.ROUND_HALF_FLOOR=8,_.clone=se,_.config=_.set=pe,N===void 0&&(N={}),N)for(E=["precision","rounding","toExpNeg","toExpPos","LN10"],R=0;R<E.length;)N.hasOwnProperty(U=E[R++])||(N[U]=this[U]);return _.config(N),_}function pe(N){if(!N||typeof N!="object")throw Error(n+"Object expected");var R,U,E,_=["precision",1,t,"rounding",0,8,"toExpNeg",-1/0,0,"toExpPos",0,1/0];for(R=0;R<_.length;R+=3)if((E=N[U=_[R]])!==void 0)if(s(E)===E&&E>=_[R+1]&&E<=_[R+2])this[U]=E;else throw Error(a+U+": "+E);if((E=N[U="LN10"])!==void 0)if(E==Math.LN10)this[U]=new this(E);else throw Error(a+U+": "+E);return this}r=se(r),r.default=r.Decimal=r,d=new r(1),typeof define=="function"&&define.amd?define(function(){return r}):typeof a1<"u"&&a1.exports?a1.exports=r:(e||(e=typeof self<"u"&&self&&self.self==self?self:Function("return this")()),e.Decimal=r)})(pee)});var aoe=Re((tAt,QV)=>{"use strict";var nOe=Object.prototype.hasOwnProperty,Kn="~";function db(){}Object.create&&(db.prototype=Object.create(null),new db().__proto__||(Kn=!1));function aOe(e,t,r){this.fn=e,this.context=t,this.once=r||!1}function noe(e,t,r,o,n){if(typeof r!="function")throw new TypeError("The listener must be a function");var a=new aOe(r,o||e,n),i=Kn?Kn+t:t;return e._events[i]?e._events[i].fn?e._events[i]=[e._events[i],a]:e._events[i].push(a):(e._events[i]=a,e._eventsCount++),e}function ID(e,t){--e._eventsCount===0?e._events=new db:delete e._events[t]}function In(){this._events=new db,this._eventsCount=0}In.prototype.eventNames=function(){var t=[],r,o;if(this._eventsCount===0)return t;for(o in r=this._events)nOe.call(r,o)&&t.push(Kn?o.slice(1):o);return Object.getOwnPropertySymbols?t.concat(Object.getOwnPropertySymbols(r)):t};In.prototype.listeners=function(t){var r=Kn?Kn+t:t,o=this._events[r];if(!o)return[];if(o.fn)return[o.fn];for(var n=0,a=o.length,i=new Array(a);n<a;n++)i[n]=o[n].fn;return i};In.prototype.listenerCount=function(t){var r=Kn?Kn+t:t,o=this._events[r];return o?o.fn?1:o.length:0};In.prototype.emit=function(t,r,o,n,a,i){var s=Kn?Kn+t:t;if(!this._events[s])return!1;var l=this._events[s],u=arguments.length,d,c;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,r),!0;case 3:return l.fn.call(l.context,r,o),!0;case 4:return l.fn.call(l.context,r,o,n),!0;case 5:return l.fn.call(l.context,r,o,n,a),!0;case 6:return l.fn.call(l.context,r,o,n,a,i),!0}for(c=1,d=new Array(u-1);c<u;c++)d[c-1]=arguments[c];l.fn.apply(l.context,d)}else{var f=l.length,p;for(c=0;c<f;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),u){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,r);break;case 3:l[c].fn.call(l[c].context,r,o);break;case 4:l[c].fn.call(l[c].context,r,o,n);break;default:if(!d)for(p=1,d=new Array(u-1);p<u;p++)d[p-1]=arguments[p];l[c].fn.apply(l[c].context,d)}}return!0};In.prototype.on=function(t,r,o){return noe(this,t,r,o,!1)};In.prototype.once=function(t,r,o){return noe(this,t,r,o,!0)};In.prototype.removeListener=function(t,r,o,n){var a=Kn?Kn+t:t;if(!this._events[a])return this;if(!r)return ID(this,a),this;var i=this._events[a];if(i.fn)i.fn===r&&(!n||i.once)&&(!o||i.context===o)&&ID(this,a);else{for(var s=0,l=[],u=i.length;s<u;s++)(i[s].fn!==r||n&&!i[s].once||o&&i[s].context!==o)&&l.push(i[s]);l.length?this._events[a]=l.length===1?l[0]:l:ID(this,a)}return this};In.prototype.removeAllListeners=function(t){var r;return t?(r=Kn?Kn+t:t,this._events[r]&&ID(this,r)):(this._events=new db,this._eventsCount=0),this};In.prototype.off=In.prototype.removeListener;In.prototype.addListener=In.prototype.on;In.prefixed=Kn;In.EventEmitter=In;typeof QV<"u"&&(QV.exports=In)});var cne=Re(xr=>{"use strict";var lU=Symbol.for("react.transitional.element"),uU=Symbol.for("react.portal"),UD=Symbol.for("react.fragment"),WD=Symbol.for("react.strict_mode"),GD=Symbol.for("react.profiler"),jD=Symbol.for("react.consumer"),zD=Symbol.for("react.context"),qD=Symbol.for("react.forward_ref"),HD=Symbol.for("react.suspense"),KD=Symbol.for("react.suspense_list"),$D=Symbol.for("react.memo"),YD=Symbol.for("react.lazy"),EEe=Symbol.for("react.view_transition"),_Ee=Symbol.for("react.client.reference");function Fi(e){if(typeof e=="object"&&e!==null){var t=e.$$typeof;switch(t){case lU:switch(e=e.type,e){case UD:case GD:case WD:case HD:case KD:case EEe:return e;default:switch(e=e&&e.$$typeof,e){case zD:case qD:case YD:case $D:return e;case jD:return e;default:return t}}case uU:return t}}}xr.ContextConsumer=jD;xr.ContextProvider=zD;xr.Element=lU;xr.ForwardRef=qD;xr.Fragment=UD;xr.Lazy=YD;xr.Memo=$D;xr.Portal=uU;xr.Profiler=GD;xr.StrictMode=WD;xr.Suspense=HD;xr.SuspenseList=KD;xr.isContextConsumer=function(e){return Fi(e)===jD};xr.isContextProvider=function(e){return Fi(e)===zD};xr.isElement=function(e){return typeof e=="object"&&e!==null&&e.$$typeof===lU};xr.isForwardRef=function(e){return Fi(e)===qD};xr.isFragment=function(e){return Fi(e)===UD};xr.isLazy=function(e){return Fi(e)===YD};xr.isMemo=function(e){return Fi(e)===$D};xr.isPortal=function(e){return Fi(e)===uU};xr.isProfiler=function(e){return Fi(e)===GD};xr.isStrictMode=function(e){return Fi(e)===WD};xr.isSuspense=function(e){return Fi(e)===HD};xr.isSuspenseList=function(e){return Fi(e)===KD};xr.isValidElementType=function(e){return typeof e=="string"||typeof e=="function"||e===UD||e===GD||e===WD||e===HD||e===KD||typeof e=="object"&&e!==null&&(e.$$typeof===YD||e.$$typeof===$D||e.$$typeof===zD||e.$$typeof===jD||e.$$typeof===qD||e.$$typeof===_Ee||e.getModuleId!==void 0)};xr.typeOf=Fi});var pne=Re((o1t,fne)=>{"use strict";fne.exports=cne()});var Jfe=z(ie()),Qfe=z(F7());var zS=z(tH());var Sf=class{constructor(t=""){this.prefix=t,this.count=0,this.offset=374,this.msb=1295,this.power=2}next(){let t=this.increment().toString(36);return this.prefix?`${this.prefix}${t}`:t}increment(){let t=this.count+this.offset;return t===this.msb&&(this.offset+=(this.msb+1)*9,this.msb=Math.pow(36,++this.power)-1),this.count++,t}};var uH=/(!?\(\s*min(-device-)?-width).+\(\s*max(-device)?-width/i,fbe=/\(\s*min(-device)?-width/i,dH=/(!?\(\s*max(-device)?-width).+\(\s*min(-device)?-width/i,pbe=/\(\s*max(-device)?-width/i,rH=_S(uH,dH,fbe),oH=_S(dH,uH,pbe),cH=/(!?\(\s*min(-device)?-height).+\(\s*max(-device)?-height/i,mbe=/\(\s*min(-device)?-height/i,fH=/(!?\(\s*max(-device)?-height).+\(\s*min(-device)?-height/i,gbe=/\(\s*max(-device)?-height/i,nH=_S(cH,fH,mbe),aH=_S(fH,cH,gbe),iH=/print/i,sH=/^print$/i,$v=Number.MAX_VALUE;function lH(e){let t=/(-?\d*\.?\d+)(ch|em|ex|px|rem)/.exec(e);if(t===null)return $v;let r=t[1];switch(t[2]){case"ch":r=parseFloat(r)*8.8984375;break;case"em":case"rem":r=parseFloat(r)*16;break;case"ex":r=parseFloat(r)*8.296875;break;case"px":r=parseFloat(r);break}return+r}function _S(e,t,r){return function(o){return e.test(o)?!0:t.test(o)?!1:r.test(o)}}function kbe(e,t){let r=iH.test(e),o=sH.test(e),n=iH.test(t),a=sH.test(t);return r&&n?!o&&a?1:o&&!a?-1:e.localeCompare(t):r?1:n?-1:null}function NE(e,t){if(e==="")return-1;if(t==="")return 1;let r=kbe(e,t);if(r!==null)return r;let o=rH(e)||nH(e),n=oH(e)||aH(e),a=rH(t)||nH(t),i=oH(t)||aH(t);if(o&&i)return-1;if(n&&a)return 1;let s=lH(e),l=lH(t);return s===$v&&l===$v?e.localeCompare(t):s===$v?1:l===$v?-1:s>l?n?-1:1:s<l?n?1:-1:e.localeCompare(t)}var FS=class{constructor(t,r,o){this.idGenerator=t,this.onNewCache=r,this.onNewValue=o,this.sortedCacheKeys=[],this.caches={}}getCache(t){if(!this.caches[t]){let r=new Pf(this.idGenerator,this.onNewValue);r.key=t,this.sortedCacheKeys.push(t),this.sortedCacheKeys.sort(NE);let o=this.sortedCacheKeys.indexOf(t),n=o<this.sortedCacheKeys.length-1?this.sortedCacheKeys[o+1]:void 0;this.caches[t]=r,this.onNewCache(t,r,n)}return this.caches[t]}getSortedCacheKeys(){return this.sortedCacheKeys}},Pf=class{constructor(t,r){this.cache={},this.idGenerator=t,this.onNewValue=r}addValue(t,r){let o=this.cache[t];if(o)return o;let n=this.idGenerator.next();return this.cache[t]=n,this.onNewValue(this,n,r),n}};var Mbe=/[A-Z]/g,hbe=/^ms-/,TE={};function Af(e){return e in TE?TE[e]:TE[e]=e.replace(Mbe,"-$&").toLowerCase().replace(hbe,"-ms-")}function _g(e){return e.charAt(0).toUpperCase()+e.slice(1)}function OE(e,t,r){if(e.hasOwnProperty(t)){for(var o={},n=e[t],a=_g(t),i=Object.keys(r),s=0;s<i.length;s++){var l=i[s];if(l===t)for(var u=0;u<n.length;u++)o[n[u]+a]=r[t];o[l]=r[l]}return o}return r}function BS(e,t,r,o,n){for(var a=0,i=e.length;a<i;++a){var s=e[a](t,r,o,n);if(s)return s}}function pH(e,t){e.indexOf(t)===-1&&e.push(t)}function EE(e,t){if(Array.isArray(t))for(var r=0,o=t.length;r<o;++r)pH(e,t[r]);else pH(e,t)}function _E(e){return e instanceof Object&&!Array.isArray(e)}function FE(e){var t=e.prefixMap,r=e.plugins;return function o(n){for(var a in n){var i=n[a];if(_E(i))n[a]=o(i);else if(Array.isArray(i)){for(var s=[],l=0,u=i.length;l<u;++l){var d=BS(r,a,i[l],n,t);EE(s,d||i[l])}s.length>0&&(n[a]=s)}else{var c=BS(r,a,i,n,t);c&&(n[a]=c),n=OE(t,a,n)}}return n}}var kt=["Webkit"],vbe=["Moz"],BE=["ms"],ybe=["Webkit","Moz"],oa=["Webkit","ms"],xbe=["Webkit","Moz","ms"],mH={plugins:[],prefixMap:{appearance:ybe,textEmphasisPosition:kt,textEmphasis:kt,textEmphasisStyle:kt,textEmphasisColor:kt,boxDecorationBreak:kt,maskImage:kt,maskMode:kt,maskRepeat:kt,maskPosition:kt,maskClip:kt,maskOrigin:kt,maskSize:kt,maskComposite:kt,mask:kt,maskBorderSource:kt,maskBorderMode:kt,maskBorderSlice:kt,maskBorderWidth:kt,maskBorderOutset:kt,maskBorderRepeat:kt,maskBorder:kt,maskType:kt,textDecorationStyle:kt,textDecorationSkip:kt,textDecorationLine:kt,textDecorationColor:kt,userSelect:xbe,backdropFilter:kt,fontKerning:kt,scrollSnapType:oa,scrollSnapPointsX:oa,scrollSnapPointsY:oa,scrollSnapDestination:oa,scrollSnapCoordinate:oa,clipPath:kt,shapeImageThreshold:kt,shapeImageMargin:kt,shapeImageOutside:kt,filter:kt,hyphens:oa,flowInto:oa,flowFrom:oa,breakBefore:oa,breakAfter:oa,breakInside:oa,regionFragment:oa,writingMode:oa,textOrientation:kt,tabSize:vbe,fontFeatureSettings:kt,columnCount:kt,columnFill:kt,columnGap:kt,columnRule:kt,columnRuleColor:kt,columnRuleStyle:kt,columnRuleWidth:kt,columns:kt,columnSpan:kt,columnWidth:kt,wrapFlow:BE,wrapThrough:BE,wrapMargin:BE,textSizeAdjust:oa}};function VE(e,t){if(typeof t=="string"&&t==="text")return["-webkit-text","text"]}var bbe=["-webkit-","-moz-",""],wbe={"zoom-in":!0,"zoom-out":!0,grab:!0,grabbing:!0};function UE(e,t){if(e==="cursor"&&wbe.hasOwnProperty(t))return bbe.map(function(r){return r+t})}var kH=z(Fg()),Pbe=["-webkit-",""];function WE(e,t){if(typeof t=="string"&&!(0,kH.default)(t)&&t.indexOf("cross-fade(")>-1)return Pbe.map(function(r){return t.replace(/cross-fade\(/g,r+"cross-fade(")})}var MH=z(Fg()),Abe=["-webkit-",""];function GE(e,t){if(typeof t=="string"&&!(0,MH.default)(t)&&t.indexOf("filter(")>-1)return Abe.map(function(r){return t.replace(/filter\(/g,r+"filter(")})}var hH={flex:["-webkit-box","-moz-box","-ms-flexbox","-webkit-flex","flex"],"inline-flex":["-webkit-inline-box","-moz-inline-box","-ms-inline-flexbox","-webkit-inline-flex","inline-flex"]};function jE(e,t){if(e==="display"&&hH.hasOwnProperty(t))return hH[t]}var Ibe={"space-around":"justify","space-between":"justify","flex-start":"start","flex-end":"end","wrap-reverse":"multiple",wrap:"multiple"},vH={alignItems:"WebkitBoxAlign",justifyContent:"WebkitBoxPack",flexWrap:"WebkitBoxLines",flexGrow:"WebkitBoxFlex"};function zE(e,t,r){e==="flexDirection"&&typeof t=="string"&&(t.indexOf("column")>-1?r.WebkitBoxOrient="vertical":r.WebkitBoxOrient="horizontal",t.indexOf("reverse")>-1?r.WebkitBoxDirection="reverse":r.WebkitBoxDirection="normal"),vH.hasOwnProperty(e)&&(r[vH[e]]=Ibe[t]||t)}var xH=z(Fg()),Dbe=["-webkit-","-moz-",""],yH=/linear-gradient|radial-gradient|repeating-linear-gradient|repeating-radial-gradient/gi;function qE(e,t){if(typeof t=="string"&&!(0,xH.default)(t)&&yH.test(t))return Dbe.map(function(r){return t.replace(yH,function(o){return r+o})})}var US=(function(){function e(t,r){var o=[],n=!0,a=!1,i=void 0;try{for(var s=t[Symbol.iterator](),l;!(n=(l=s.next()).done)&&(o.push(l.value),!(r&&o.length===r));n=!0);}catch(u){a=!0,i=u}finally{try{!n&&s.return&&s.return()}finally{if(a)throw i}}return o}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})();function wd(e){return typeof e=="number"&&!isNaN(e)}function bH(e){return typeof e=="string"&&e.includes("/")}var wH=["center","end","start","stretch"],CH={"inline-grid":["-ms-inline-grid","inline-grid"],grid:["-ms-grid","grid"]},Ys={alignSelf:function(t,r){wH.indexOf(t)>-1&&(r.msGridRowAlign=t)},gridColumn:function(t,r){if(wd(t))r.msGridColumn=t;else if(bH(t)){var o=t.split("/"),n=US(o,2),a=n[0],i=n[1];Ys.gridColumnStart(+a,r);var s=i.split(/ ?span /),l=US(s,2),u=l[0],d=l[1];u===""?Ys.gridColumnEnd(+a+ +d,r):Ys.gridColumnEnd(+i,r)}else Ys.gridColumnStart(t,r)},gridColumnEnd:function(t,r){var o=r.msGridColumn;wd(t)&&wd(o)&&(r.msGridColumnSpan=t-o)},gridColumnStart:function(t,r){wd(t)&&(r.msGridColumn=t)},gridRow:function(t,r){if(wd(t))r.msGridRow=t;else if(bH(t)){var o=t.split("/"),n=US(o,2),a=n[0],i=n[1];Ys.gridRowStart(+a,r);var s=i.split(/ ?span /),l=US(s,2),u=l[0],d=l[1];u===""?Ys.gridRowEnd(+a+ +d,r):Ys.gridRowEnd(+i,r)}else Ys.gridRowStart(t,r)},gridRowEnd:function(t,r){var o=r.msGridRow;wd(t)&&wd(o)&&(r.msGridRowSpan=t-o)},gridRowStart:function(t,r){wd(t)&&(r.msGridRow=t)},gridTemplateColumns:function(t,r){r.msGridColumns=t},gridTemplateRows:function(t,r){r.msGridRows=t},justifySelf:function(t,r){wH.indexOf(t)>-1&&(r.msGridColumnAlign=t)}};function HE(e,t,r){if(e==="display"&&t in CH)return CH[t];if(e in Ys){var o=Ys[e];o(t,r)}}var SH=z(Fg()),Lbe=["-webkit-",""];function KE(e,t){if(typeof t=="string"&&!(0,SH.default)(t)&&t.indexOf("image-set(")>-1)return Lbe.map(function(r){return t.replace(/image-set\(/g,r+"image-set(")})}var PH={marginBlockStart:["WebkitMarginBefore"],marginBlockEnd:["WebkitMarginAfter"],marginInlineStart:["WebkitMarginStart","MozMarginStart"],marginInlineEnd:["WebkitMarginEnd","MozMarginEnd"],paddingBlockStart:["WebkitPaddingBefore"],paddingBlockEnd:["WebkitPaddingAfter"],paddingInlineStart:["WebkitPaddingStart","MozPaddingStart"],paddingInlineEnd:["WebkitPaddingEnd","MozPaddingEnd"],borderBlockStart:["WebkitBorderBefore"],borderBlockStartColor:["WebkitBorderBeforeColor"],borderBlockStartStyle:["WebkitBorderBeforeStyle"],borderBlockStartWidth:["WebkitBorderBeforeWidth"],borderBlockEnd:["WebkitBorderAfter"],borderBlockEndColor:["WebkitBorderAfterColor"],borderBlockEndStyle:["WebkitBorderAfterStyle"],borderBlockEndWidth:["WebkitBorderAfterWidth"],borderInlineStart:["WebkitBorderStart","MozBorderStart"],borderInlineStartColor:["WebkitBorderStartColor","MozBorderStartColor"],borderInlineStartStyle:["WebkitBorderStartStyle","MozBorderStartStyle"],borderInlineStartWidth:["WebkitBorderStartWidth","MozBorderStartWidth"],borderInlineEnd:["WebkitBorderEnd","MozBorderEnd"],borderInlineEndColor:["WebkitBorderEndColor","MozBorderEndColor"],borderInlineEndStyle:["WebkitBorderEndStyle","MozBorderEndStyle"],borderInlineEndWidth:["WebkitBorderEndWidth","MozBorderEndWidth"]};function $E(e,t,r){if(Object.prototype.hasOwnProperty.call(PH,e))for(var o=PH[e],n=0,a=o.length;n<a;++n)r[o[n]]=t}function YE(e,t){if(e==="position"&&t==="sticky")return["-webkit-sticky","sticky"]}var Rbe=["-webkit-","-moz-",""],Nbe={maxHeight:!0,maxWidth:!0,width:!0,height:!0,columnWidth:!0,minWidth:!0,minHeight:!0},Tbe={"min-content":!0,"max-content":!0,"fill-available":!0,"fit-content":!0,"contain-floats":!0};function ZE(e,t){if(Nbe.hasOwnProperty(e)&&Tbe.hasOwnProperty(t))return Rbe.map(function(r){return r+t})}var RH=z(LH()),NH=z(Fg());var Gbe={transition:!0,transitionProperty:!0,WebkitTransition:!0,WebkitTransitionProperty:!0,MozTransition:!0,MozTransitionProperty:!0},jbe={Webkit:"-webkit-",Moz:"-moz-",ms:"-ms-"};function zbe(e,t){if((0,NH.default)(e))return e;for(var r=e.split(/,(?![^()]*(?:\([^()]*\))?\))/g),o=0,n=r.length;o<n;++o){var a=r[o],i=[a];for(var s in t){var l=(0,RH.default)(s);if(a.indexOf(l)>-1&&l!=="order")for(var u=t[s],d=0,c=u.length;d<c;++d)i.unshift(a.replace(l,jbe[u[d]]+l))}r[o]=i.join(",")}return r.join(",")}function JE(e,t,r,o){if(typeof t=="string"&&Gbe.hasOwnProperty(e)){var n=zbe(t,o),a=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(s){return!/-moz-|-ms-/.test(s)}).join(",");if(e.indexOf("Webkit")>-1)return a;var i=n.split(/,(?![^()]*(?:\([^()]*\))?\))/g).filter(function(s){return!/-webkit-|-ms-/.test(s)}).join(",");return e.indexOf("Moz")>-1?i:(r["Webkit"+_g(e)]=a,r["Moz"+_g(e)]=i,n)}}var qbe=[VE,WE,UE,GE,zE,qE,HE,KE,$E,YE,ZE,JE,jE],TH=FE({prefixMap:mH.prefixMap,plugins:qbe});function Yv(e,t,r,o){let n=e.getCache(r),a="";for(let i in t){let s=t[i];if(s!=null)if(typeof s!="object"){let l=`${Af(i)}:${s}`,u=`${o}${l}`,d=n.cache[u];if(d!==void 0){a+=" "+d;continue}else{let c="",f=TH({[i]:s});for(let g in f){let m=f[g],h=typeof m;if(h==="string"||h==="number"){let k=`${Af(g)}:${m}`;k!==l&&(c+=`${k};`)}else if(Array.isArray(m)){let k=Af(g);for(let M=0;M<m.length;M++){let v=`${k}:${m[M]}`;v!==l&&(c+=`${v};`)}}}c+=l;let p=n.addValue(u,{pseudo:o,block:c});a+=" "+p}}else i[0]===":"?a+=" "+Yv(e,s,r,o+i):i.substring(0,6)==="@media"&&(a+=" "+Yv(e,s,i.substr(7),o))}return a.slice(1)}function OH(e,t){let r=`.${e}`;return t&&(r+=t),r}function QE(e){let t="";for(let r in e)t+=`${r}{${GS(e[r])}}`;return t}function GS(e){let t="";for(let r in e){let o=e[r];(typeof o=="string"||typeof o=="number")&&(t+=`${Af(r)}:${o};`)}return t.slice(0,-1)}function EH(e,t){return`@keyframes ${e}{${t}}`}function _H(e,t){return`@font-face{font-family:${e};${t}}`}function FH(e,t){return`${e}{${t}}`}var Hbe=/\.([^{:]+)(:[^{]+)?{(?:[^}]*;)?([^}]*?)}/g,Kbe=/@keyframes ([^{]+){((?:(?:from|to|(?:\d+\.?\d*%))\{(?:[^}])*})*)}/g,$be=/@font-face\{font-family:([^;]+);([^}]*)\}/g;function Ybe(e,t,r){let o;for(;o=t.exec(r);){let[,n,a,i]=o,s=a?`${a}${i}`:i;e.cache[s]=n,e.idGenerator.increment()}}function BH(e,t,r){let o;for(;o=t.exec(r);){let[,n,a]=o;e.cache[a]=n,e.idGenerator.increment()}}var e_=class{constructor(t={}){this.styleElements={};let r=new Sf(t.prefix),o=(n,a,i)=>{let{pseudo:s,block:l}=i,u=this.styleElements[n.key].sheet,d=OH(a,s),c=FH(d,l);try{u.insertRule(c,u.cssRules.length)}catch{}};if(this.styleCache=new FS(r,(n,a,i)=>{let s=document.createElement("style");if(s.media=n,i===void 0)this.container.appendChild(s);else{let l=Zbe(this.container.children,i);this.container.insertBefore(s,this.container.children[l])}this.styleElements[n]=s},o),this.keyframesCache=new Pf(new Sf(t.prefix),(n,a,i)=>{this.styleCache.getCache("");let s=this.styleElements[""].sheet,l=EH(a,QE(i));try{s.insertRule(l,s.cssRules.length)}catch{}}),this.fontFaceCache=new Pf(new Sf(t.prefix),(n,a,i)=>{this.styleCache.getCache("");let s=this.styleElements[""].sheet,l=_H(a,GS(i));try{s.insertRule(l,s.cssRules.length)}catch{}}),t.container&&(this.container=t.container),t.hydrate&&t.hydrate.length>0){if(!this.container){let n=t.hydrate[0].parentElement;n!=null&&(this.container=n)}for(let n=0;n<t.hydrate.length;n++){let a=t.hydrate[n],i=a.getAttribute("data-hydrate");if(i==="font-face"){BH(this.fontFaceCache,$be,a.textContent);continue}if(i==="keyframes"){BH(this.keyframesCache,Kbe,a.textContent);continue}let s=a.media?a.media:"";this.styleElements[s]=a;let l=new Pf(r,o);l.key=s,Ybe(l,Hbe,a.textContent),this.styleCache.sortedCacheKeys.push(s),this.styleCache.caches[s]=l}}if(!this.container){if(document.head===null)throw new Error("No container provided and `document.head` was null");this.container=document.head}}renderStyle(t){return Yv(this.styleCache,t,"","")}renderFontFace(t){let r=GS(t);return this.fontFaceCache.addValue(r,t)}renderKeyframes(t){let r=QE(t);return this.keyframesCache.addValue(r,t)}},t_=e_;function Zbe(e,t){let r=0;for(;r<e.length;r++){let o=e[r];if(o.tagName==="STYLE"&&o.media===t)return r}return-1}var GH=z(oE()),r_=z(ze()),o0e=new t_;function jH({children:e}){return(0,r_.jsx)(GH.Provider,{value:o0e,children:(0,r_.jsx)(zS.BaseProvider,{overrides:{AppContainer:{style:{height:"100%",minHeight:"0",minWidth:"0",width:"100%"}}},theme:zS.LightTheme,children:e})})}var D=z(ie());var Ce=z(ie()),Of=z(xg());var uo=z(ie());function qH(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,uo.useMemo)(()=>o=>{t.forEach(n=>n(o))},t)}var Zv=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u";function If(e){let t=Object.prototype.toString.call(e);return t==="[object Window]"||t==="[object global]"}function qS(e){return"nodeType"in e}function wn(e){var t,r;return e?If(e)?e:qS(e)&&(t=(r=e.ownerDocument)==null?void 0:r.defaultView)!=null?t:window:window}function HS(e){let{Document:t}=wn(e);return e instanceof t}function Bg(e){return If(e)?!1:e instanceof wn(e).HTMLElement}function n_(e){return e instanceof wn(e).SVGElement}function Df(e){return e?If(e)?e.document:qS(e)?HS(e)?e:Bg(e)||n_(e)?e.ownerDocument:document:document:document}var Ia=Zv?uo.useLayoutEffect:uo.useEffect;function Xv(e){let t=(0,uo.useRef)(e);return Ia(()=>{t.current=e}),(0,uo.useCallback)(function(){for(var r=arguments.length,o=new Array(r),n=0;n<r;n++)o[n]=arguments[n];return t.current==null?void 0:t.current(...o)},[])}function HH(){let e=(0,uo.useRef)(null),t=(0,uo.useCallback)((o,n)=>{e.current=setInterval(o,n)},[]),r=(0,uo.useCallback)(()=>{e.current!==null&&(clearInterval(e.current),e.current=null)},[]);return[t,r]}function Vg(e,t){t===void 0&&(t=[e]);let r=(0,uo.useRef)(e);return Ia(()=>{r.current!==e&&(r.current=e)},t),r}function Ug(e,t){let r=(0,uo.useRef)();return(0,uo.useMemo)(()=>{let o=e(r.current);return r.current=o,o},[...t])}function Jv(e){let t=Xv(e),r=(0,uo.useRef)(null),o=(0,uo.useCallback)(n=>{n!==r.current&&t?.(n,r.current),r.current=n},[]);return[r,o]}function Qv(e){let t=(0,uo.useRef)();return(0,uo.useEffect)(()=>{t.current=e},[e]),t.current}var o_={};function Lf(e,t){return(0,uo.useMemo)(()=>{if(t)return t;let r=o_[e]==null?0:o_[e]+1;return o_[e]=r,e+"-"+r},[e,t])}function KH(e){return function(t){for(var r=arguments.length,o=new Array(r>1?r-1:0),n=1;n<r;n++)o[n-1]=arguments[n];return o.reduce((a,i)=>{let s=Object.entries(i);for(let[l,u]of s){let d=a[l];d!=null&&(a[l]=d+e*u)}return a},{...t})}}var Rf=KH(1),Nf=KH(-1);function n0e(e){return"clientX"in e&&"clientY"in e}function Wg(e){if(!e)return!1;let{KeyboardEvent:t}=wn(e.target);return t&&e instanceof t}function a0e(e){if(!e)return!1;let{TouchEvent:t}=wn(e.target);return t&&e instanceof t}function ey(e){if(a0e(e)){if(e.touches&&e.touches.length){let{clientX:t,clientY:r}=e.touches[0];return{x:t,y:r}}else if(e.changedTouches&&e.changedTouches.length){let{clientX:t,clientY:r}=e.changedTouches[0];return{x:t,y:r}}}return n0e(e)?{x:e.clientX,y:e.clientY}:null}var na=Object.freeze({Translate:{toString(e){if(!e)return;let{x:t,y:r}=e;return"translate3d("+(t?Math.round(t):0)+"px, "+(r?Math.round(r):0)+"px, 0)"}},Scale:{toString(e){if(!e)return;let{scaleX:t,scaleY:r}=e;return"scaleX("+t+") scaleY("+r+")"}},Transform:{toString(e){if(e)return[na.Translate.toString(e),na.Scale.toString(e)].join(" ")}},Transition:{toString(e){let{property:t,duration:r,easing:o}=e;return t+" "+r+"ms "+o}}}),zH="a,frame,iframe,input:not([type=hidden]):not(:disabled),select:not(:disabled),textarea:not(:disabled),button:not(:disabled),*[tabindex]";function $H(e){return e.matches(zH)?e:e.querySelector(zH)}var Tf=z(ie()),i0e={display:"none"};function YH(e){let{id:t,value:r}=e;return Tf.default.createElement("div",{id:t,style:i0e},r)}function ZH(e){let{id:t,announcement:r,ariaLiveType:o="assertive"}=e,n={position:"fixed",top:0,left:0,width:1,height:1,margin:-1,border:0,padding:0,overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(100%)",whiteSpace:"nowrap"};return Tf.default.createElement("div",{id:t,style:n,role:"status","aria-live":o,"aria-atomic":!0},r)}function XH(){let[e,t]=(0,Tf.useState)("");return{announce:(0,Tf.useCallback)(o=>{o!=null&&t(o)},[]),announcement:e}}var dK=(0,Ce.createContext)(null);function s0e(e){let t=(0,Ce.useContext)(dK);(0,Ce.useEffect)(()=>{if(!t)throw new Error("useDndMonitor must be used within a children of <DndContext>");return t(e)},[e,t])}function l0e(){let[e]=(0,Ce.useState)(()=>new Set),t=(0,Ce.useCallback)(o=>(e.add(o),()=>e.delete(o)),[e]);return[(0,Ce.useCallback)(o=>{let{type:n,event:a}=o;e.forEach(i=>{var s;return(s=i[n])==null?void 0:s.call(i,a)})},[e]),t]}var u0e={draggable:`
9
+ To pick up a draggable item, press the space bar.
10
+ While dragging, use the arrow keys to move the item.
11
+ Press space again to drop the item in its new position, or press escape to cancel.
12
+ `},d0e={onDragStart(e){let{active:t}=e;return"Picked up draggable item "+t.id+"."},onDragOver(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was moved over droppable area "+r.id+".":"Draggable item "+t.id+" is no longer over a droppable area."},onDragEnd(e){let{active:t,over:r}=e;return r?"Draggable item "+t.id+" was dropped over droppable area "+r.id:"Draggable item "+t.id+" was dropped."},onDragCancel(e){let{active:t}=e;return"Dragging was cancelled. Draggable item "+t.id+" was dropped."}};function c0e(e){let{announcements:t=d0e,container:r,hiddenTextDescribedById:o,screenReaderInstructions:n=u0e}=e,{announce:a,announcement:i}=XH(),s=Lf("DndLiveRegion"),[l,u]=(0,Ce.useState)(!1);if((0,Ce.useEffect)(()=>{u(!0)},[]),s0e((0,Ce.useMemo)(()=>({onDragStart(c){let{active:f}=c;a(t.onDragStart({active:f}))},onDragMove(c){let{active:f,over:p}=c;t.onDragMove&&a(t.onDragMove({active:f,over:p}))},onDragOver(c){let{active:f,over:p}=c;a(t.onDragOver({active:f,over:p}))},onDragEnd(c){let{active:f,over:p}=c;a(t.onDragEnd({active:f,over:p}))},onDragCancel(c){let{active:f,over:p}=c;a(t.onDragCancel({active:f,over:p}))}}),[a,t])),!l)return null;let d=Ce.default.createElement(Ce.default.Fragment,null,Ce.default.createElement(YH,{id:o,value:n.draggable}),Ce.default.createElement(ZH,{id:s,announcement:i}));return r?(0,Of.createPortal)(d,r):d}var Io;(function(e){e.DragStart="dragStart",e.DragMove="dragMove",e.DragEnd="dragEnd",e.DragCancel="dragCancel",e.DragOver="dragOver",e.RegisterDroppable="registerDroppable",e.SetDroppableDisabled="setDroppableDisabled",e.UnregisterDroppable="unregisterDroppable"})(Io||(Io={}));function $S(){}function Ff(e,t){return(0,Ce.useMemo)(()=>({sensor:e,options:t??{}}),[e,t])}function ny(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return(0,Ce.useMemo)(()=>[...t].filter(o=>o!=null),[...t])}var ss=Object.freeze({x:0,y:0});function m_(e,t){return Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2))}function f0e(e,t){let r=ey(e);if(!r)return"0 0";let o={x:(r.x-t.left)/t.width*100,y:(r.y-t.top)/t.height*100};return o.x+"% "+o.y+"%"}function g_(e,t){let{data:{value:r}}=e,{data:{value:o}}=t;return r-o}function p0e(e,t){let{data:{value:r}}=e,{data:{value:o}}=t;return o-r}function l_(e){let{left:t,top:r,height:o,width:n}=e;return[{x:t,y:r},{x:t+n,y:r},{x:t,y:r+o},{x:t+n,y:r+o}]}function Bf(e,t){if(!e||e.length===0)return null;let[r]=e;return t?r[t]:r}function JH(e,t,r){return t===void 0&&(t=e.left),r===void 0&&(r=e.top),{x:t+e.width*.5,y:r+e.height*.5}}var ay=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:o}=e,n=JH(t,t.left,t.top),a=[];for(let i of o){let{id:s}=i,l=r.get(s);if(l){let u=m_(JH(l),n);a.push({id:s,data:{droppableContainer:i,value:u}})}}return a.sort(g_)},cK=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:o}=e,n=l_(t),a=[];for(let i of o){let{id:s}=i,l=r.get(s);if(l){let u=l_(l),d=n.reduce((f,p,g)=>f+m_(u[g],p),0),c=Number((d/4).toFixed(4));a.push({id:s,data:{droppableContainer:i,value:c}})}}return a.sort(g_)};function m0e(e,t){let r=Math.max(t.top,e.top),o=Math.max(t.left,e.left),n=Math.min(t.left+t.width,e.left+e.width),a=Math.min(t.top+t.height,e.top+e.height),i=n-o,s=a-r;if(o<n&&r<a){let l=t.width*t.height,u=e.width*e.height,d=i*s,c=d/(l+u-d);return Number(c.toFixed(4))}return 0}var ZS=e=>{let{collisionRect:t,droppableRects:r,droppableContainers:o}=e,n=[];for(let a of o){let{id:i}=a,s=r.get(i);if(s){let l=m0e(s,t);l>0&&n.push({id:i,data:{droppableContainer:a,value:l}})}}return n.sort(p0e)};function g0e(e,t){let{top:r,left:o,bottom:n,right:a}=t;return r<=e.y&&e.y<=n&&o<=e.x&&e.x<=a}var k_=e=>{let{droppableContainers:t,droppableRects:r,pointerCoordinates:o}=e;if(!o)return[];let n=[];for(let a of t){let{id:i}=a,s=r.get(i);if(s&&g0e(o,s)){let u=l_(s).reduce((c,f)=>c+m_(o,f),0),d=Number((u/4).toFixed(4));n.push({id:i,data:{droppableContainer:a,value:d}})}}return n.sort(g_)};function k0e(e,t,r){return{...e,scaleX:t&&r?t.width/r.width:1,scaleY:t&&r?t.height/r.height:1}}function fK(e,t){return e&&t?{x:e.left-t.left,y:e.top-t.top}:ss}function M0e(e){return function(r){for(var o=arguments.length,n=new Array(o>1?o-1:0),a=1;a<o;a++)n[a-1]=arguments[a];return n.reduce((i,s)=>({...i,top:i.top+e*s.y,bottom:i.bottom+e*s.y,left:i.left+e*s.x,right:i.right+e*s.x}),{...r})}}var h0e=M0e(1);function pK(e){if(e.startsWith("matrix3d(")){let t=e.slice(9,-1).split(/, /);return{x:+t[12],y:+t[13],scaleX:+t[0],scaleY:+t[5]}}else if(e.startsWith("matrix(")){let t=e.slice(7,-1).split(/, /);return{x:+t[4],y:+t[5],scaleX:+t[0],scaleY:+t[3]}}return null}function v0e(e,t,r){let o=pK(t);if(!o)return e;let{scaleX:n,scaleY:a,x:i,y:s}=o,l=e.left-i-(1-n)*parseFloat(r),u=e.top-s-(1-a)*parseFloat(r.slice(r.indexOf(" ")+1)),d=n?e.width/n:e.width,c=a?e.height/a:e.height;return{width:d,height:c,top:u,right:l+d,bottom:u+c,left:l}}var y0e={ignoreTransform:!1};function Vf(e,t){t===void 0&&(t=y0e);let r=e.getBoundingClientRect();if(t.ignoreTransform){let{transform:u,transformOrigin:d}=wn(e).getComputedStyle(e);u&&(r=v0e(r,u,d))}let{top:o,left:n,width:a,height:i,bottom:s,right:l}=r;return{top:o,left:n,width:a,height:i,bottom:s,right:l}}function QH(e){return Vf(e,{ignoreTransform:!0})}function x0e(e){let t=e.innerWidth,r=e.innerHeight;return{top:0,left:0,right:t,bottom:r,width:t,height:r}}function b0e(e,t){return t===void 0&&(t=wn(e).getComputedStyle(e)),t.position==="fixed"}function w0e(e,t){t===void 0&&(t=wn(e).getComputedStyle(e));let r=/(auto|scroll|overlay)/;return["overflow","overflowX","overflowY"].some(n=>{let a=t[n];return typeof a=="string"?r.test(a):!1})}function iy(e,t){let r=[];function o(n){if(t!=null&&r.length>=t||!n)return r;if(HS(n)&&n.scrollingElement!=null&&!r.includes(n.scrollingElement))return r.push(n.scrollingElement),r;if(!Bg(n)||n_(n)||r.includes(n))return r;let a=wn(e).getComputedStyle(n);return n!==e&&w0e(n,a)&&r.push(n),b0e(n,a)?r:o(n.parentNode)}return e?o(e):r}function mK(e){let[t]=iy(e,1);return t??null}function a_(e){return!Zv||!e?null:If(e)?e:qS(e)?HS(e)||e===Df(e).scrollingElement?window:Bg(e)?e:null:null}function gK(e){return If(e)?e.scrollX:e.scrollLeft}function kK(e){return If(e)?e.scrollY:e.scrollTop}function u_(e){return{x:gK(e),y:kK(e)}}var jo;(function(e){e[e.Forward=1]="Forward",e[e.Backward=-1]="Backward"})(jo||(jo={}));function MK(e){return!Zv||!e?!1:e===document.scrollingElement}function hK(e){let t={x:0,y:0},r=MK(e)?{height:window.innerHeight,width:window.innerWidth}:{height:e.clientHeight,width:e.clientWidth},o={x:e.scrollWidth-r.width,y:e.scrollHeight-r.height},n=e.scrollTop<=t.y,a=e.scrollLeft<=t.x,i=e.scrollTop>=o.y,s=e.scrollLeft>=o.x;return{isTop:n,isLeft:a,isBottom:i,isRight:s,maxScroll:o,minScroll:t}}var C0e={x:.2,y:.2};function S0e(e,t,r,o,n){let{top:a,left:i,right:s,bottom:l}=r;o===void 0&&(o=10),n===void 0&&(n=C0e);let{isTop:u,isBottom:d,isLeft:c,isRight:f}=hK(e),p={x:0,y:0},g={x:0,y:0},m={height:t.height*n.y,width:t.width*n.x};return!u&&a<=t.top+m.height?(p.y=jo.Backward,g.y=o*Math.abs((t.top+m.height-a)/m.height)):!d&&l>=t.bottom-m.height&&(p.y=jo.Forward,g.y=o*Math.abs((t.bottom-m.height-l)/m.height)),!f&&s>=t.right-m.width?(p.x=jo.Forward,g.x=o*Math.abs((t.right-m.width-s)/m.width)):!c&&i<=t.left+m.width&&(p.x=jo.Backward,g.x=o*Math.abs((t.left+m.width-i)/m.width)),{direction:p,speed:g}}function P0e(e){if(e===document.scrollingElement){let{innerWidth:a,innerHeight:i}=window;return{top:0,left:0,right:a,bottom:i,width:a,height:i}}let{top:t,left:r,right:o,bottom:n}=e.getBoundingClientRect();return{top:t,left:r,right:o,bottom:n,width:e.clientWidth,height:e.clientHeight}}function vK(e){return e.reduce((t,r)=>Rf(t,u_(r)),ss)}function A0e(e){return e.reduce((t,r)=>t+gK(r),0)}function I0e(e){return e.reduce((t,r)=>t+kK(r),0)}function yK(e,t){if(t===void 0&&(t=Vf),!e)return;let{top:r,left:o,bottom:n,right:a}=t(e);mK(e)&&(n<=0||a<=0||r>=window.innerHeight||o>=window.innerWidth)&&e.scrollIntoView({block:"center",inline:"center"})}var D0e=[["x",["left","right"],A0e],["y",["top","bottom"],I0e]],ry=class{constructor(t,r){this.rect=void 0,this.width=void 0,this.height=void 0,this.top=void 0,this.bottom=void 0,this.right=void 0,this.left=void 0;let o=iy(r),n=vK(o);this.rect={...t},this.width=t.width,this.height=t.height;for(let[a,i,s]of D0e)for(let l of i)Object.defineProperty(this,l,{get:()=>{let u=s(o),d=n[a]-u;return this.rect[l]+d},enumerable:!0});Object.defineProperty(this,"rect",{enumerable:!1})}},Ef=class{constructor(t){this.target=void 0,this.listeners=[],this.removeAll=()=>{this.listeners.forEach(r=>{var o;return(o=this.target)==null?void 0:o.removeEventListener(...r)})},this.target=t}add(t,r,o){var n;(n=this.target)==null||n.addEventListener(t,r,o),this.listeners.push([t,r,o])}};function L0e(e){let{EventTarget:t}=wn(e);return e instanceof t?e:Df(e)}function i_(e,t){let r=Math.abs(e.x),o=Math.abs(e.y);return typeof t=="number"?Math.sqrt(r**2+o**2)>t:"x"in t&&"y"in t?r>t.x&&o>t.y:"x"in t?r>t.x:"y"in t?o>t.y:!1}var ki;(function(e){e.Click="click",e.DragStart="dragstart",e.Keydown="keydown",e.ContextMenu="contextmenu",e.Resize="resize",e.SelectionChange="selectionchange",e.VisibilityChange="visibilitychange"})(ki||(ki={}));function eK(e){e.preventDefault()}function R0e(e){e.stopPropagation()}var Gt;(function(e){e.Space="Space",e.Down="ArrowDown",e.Right="ArrowRight",e.Left="ArrowLeft",e.Up="ArrowUp",e.Esc="Escape",e.Enter="Enter",e.Tab="Tab"})(Gt||(Gt={}));var xK={start:[Gt.Space,Gt.Enter],cancel:[Gt.Esc],end:[Gt.Space,Gt.Enter,Gt.Tab]},N0e=(e,t)=>{let{currentCoordinates:r}=t;switch(e.code){case Gt.Right:return{...r,x:r.x+25};case Gt.Left:return{...r,x:r.x-25};case Gt.Down:return{...r,y:r.y+25};case Gt.Up:return{...r,y:r.y-25}}},ql=class{constructor(t){this.props=void 0,this.autoScrollEnabled=!1,this.referenceCoordinates=void 0,this.listeners=void 0,this.windowListeners=void 0,this.props=t;let{event:{target:r}}=t;this.props=t,this.listeners=new Ef(Df(r)),this.windowListeners=new Ef(wn(r)),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleCancel=this.handleCancel.bind(this),this.attach()}attach(){this.handleStart(),this.windowListeners.add(ki.Resize,this.handleCancel),this.windowListeners.add(ki.VisibilityChange,this.handleCancel),setTimeout(()=>this.listeners.add(ki.Keydown,this.handleKeyDown))}handleStart(){let{activeNode:t,onStart:r}=this.props,o=t.node.current;o&&yK(o),r(ss)}handleKeyDown(t){if(Wg(t)){let{active:r,context:o,options:n}=this.props,{keyboardCodes:a=xK,coordinateGetter:i=N0e,scrollBehavior:s="smooth"}=n,{code:l}=t;if(a.end.includes(l)){this.handleEnd(t);return}if(a.cancel.includes(l)){this.handleCancel(t);return}let{collisionRect:u}=o.current,d=u?{x:u.left,y:u.top}:ss;this.referenceCoordinates||(this.referenceCoordinates=d);let c=i(t,{active:r,context:o.current,currentCoordinates:d});if(c){let f=Nf(c,d),p={x:0,y:0},{scrollableAncestors:g}=o.current;for(let m of g){let h=t.code,{isTop:k,isRight:M,isLeft:v,isBottom:b,maxScroll:w,minScroll:P}=hK(m),L=P0e(m),C={x:Math.min(h===Gt.Right?L.right-L.width/2:L.right,Math.max(h===Gt.Right?L.left:L.left+L.width/2,c.x)),y:Math.min(h===Gt.Down?L.bottom-L.height/2:L.bottom,Math.max(h===Gt.Down?L.top:L.top+L.height/2,c.y))},F=h===Gt.Right&&!M||h===Gt.Left&&!v,T=h===Gt.Down&&!b||h===Gt.Up&&!k;if(F&&C.x!==c.x){let G=m.scrollLeft+f.x,$=h===Gt.Right&&G<=w.x||h===Gt.Left&&G>=P.x;if($&&!f.y){m.scrollTo({left:G,behavior:s});return}$?p.x=m.scrollLeft-G:p.x=h===Gt.Right?m.scrollLeft-w.x:m.scrollLeft-P.x,p.x&&m.scrollBy({left:-p.x,behavior:s});break}else if(T&&C.y!==c.y){let G=m.scrollTop+f.y,$=h===Gt.Down&&G<=w.y||h===Gt.Up&&G>=P.y;if($&&!f.x){m.scrollTo({top:G,behavior:s});return}$?p.y=m.scrollTop-G:p.y=h===Gt.Down?m.scrollTop-w.y:m.scrollTop-P.y,p.y&&m.scrollBy({top:-p.y,behavior:s});break}}this.handleMove(t,Rf(Nf(c,this.referenceCoordinates),p))}}}handleMove(t,r){let{onMove:o}=this.props;t.preventDefault(),o(r)}handleEnd(t){let{onEnd:r}=this.props;t.preventDefault(),this.detach(),r()}handleCancel(t){let{onCancel:r}=this.props;t.preventDefault(),this.detach(),r()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll()}};ql.activators=[{eventName:"onKeyDown",handler:(e,t,r)=>{let{keyboardCodes:o=xK,onActivation:n}=t,{active:a}=r,{code:i}=e.nativeEvent;if(o.start.includes(i)){let s=a.activatorNode.current;return s&&e.target!==s?!1:(e.preventDefault(),n?.({event:e.nativeEvent}),!0)}return!1}}];function tK(e){return!!(e&&"distance"in e)}function rK(e){return!!(e&&"delay"in e)}var oy=class{constructor(t,r,o){var n;o===void 0&&(o=L0e(t.event.target)),this.props=void 0,this.events=void 0,this.autoScrollEnabled=!0,this.document=void 0,this.activated=!1,this.initialCoordinates=void 0,this.timeoutId=null,this.listeners=void 0,this.documentListeners=void 0,this.windowListeners=void 0,this.props=t,this.events=r;let{event:a}=t,{target:i}=a;this.props=t,this.events=r,this.document=Df(i),this.documentListeners=new Ef(this.document),this.listeners=new Ef(o),this.windowListeners=new Ef(wn(i)),this.initialCoordinates=(n=ey(a))!=null?n:ss,this.handleStart=this.handleStart.bind(this),this.handleMove=this.handleMove.bind(this),this.handleEnd=this.handleEnd.bind(this),this.handleCancel=this.handleCancel.bind(this),this.handleKeydown=this.handleKeydown.bind(this),this.removeTextSelection=this.removeTextSelection.bind(this),this.attach()}attach(){let{events:t,props:{options:{activationConstraint:r,bypassActivationConstraint:o}}}=this;if(this.listeners.add(t.move.name,this.handleMove,{passive:!1}),this.listeners.add(t.end.name,this.handleEnd),t.cancel&&this.listeners.add(t.cancel.name,this.handleCancel),this.windowListeners.add(ki.Resize,this.handleCancel),this.windowListeners.add(ki.DragStart,eK),this.windowListeners.add(ki.VisibilityChange,this.handleCancel),this.windowListeners.add(ki.ContextMenu,eK),this.documentListeners.add(ki.Keydown,this.handleKeydown),r){if(o!=null&&o({event:this.props.event,activeNode:this.props.activeNode,options:this.props.options}))return this.handleStart();if(rK(r)){this.timeoutId=setTimeout(this.handleStart,r.delay),this.handlePending(r);return}if(tK(r)){this.handlePending(r);return}}this.handleStart()}detach(){this.listeners.removeAll(),this.windowListeners.removeAll(),setTimeout(this.documentListeners.removeAll,50),this.timeoutId!==null&&(clearTimeout(this.timeoutId),this.timeoutId=null)}handlePending(t,r){let{active:o,onPending:n}=this.props;n(o,t,this.initialCoordinates,r)}handleStart(){let{initialCoordinates:t}=this,{onStart:r}=this.props;t&&(this.activated=!0,this.documentListeners.add(ki.Click,R0e,{capture:!0}),this.removeTextSelection(),this.documentListeners.add(ki.SelectionChange,this.removeTextSelection),r(t))}handleMove(t){var r;let{activated:o,initialCoordinates:n,props:a}=this,{onMove:i,options:{activationConstraint:s}}=a;if(!n)return;let l=(r=ey(t))!=null?r:ss,u=Nf(n,l);if(!o&&s){if(tK(s)){if(s.tolerance!=null&&i_(u,s.tolerance))return this.handleCancel();if(i_(u,s.distance))return this.handleStart()}if(rK(s)&&i_(u,s.tolerance))return this.handleCancel();this.handlePending(s,u);return}t.cancelable&&t.preventDefault(),i(l)}handleEnd(){let{onAbort:t,onEnd:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleCancel(){let{onAbort:t,onCancel:r}=this.props;this.detach(),this.activated||t(this.props.active),r()}handleKeydown(t){t.code===Gt.Esc&&this.handleCancel()}removeTextSelection(){var t;(t=this.document.getSelection())==null||t.removeAllRanges()}},T0e={cancel:{name:"pointercancel"},move:{name:"pointermove"},end:{name:"pointerup"}},Hl=class extends oy{constructor(t){let{event:r}=t,o=Df(r.target);super(t,T0e,o)}};Hl.activators=[{eventName:"onPointerDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:o}=t;return!r.isPrimary||r.button!==0?!1:(o?.({event:r}),!0)}}];var O0e={move:{name:"mousemove"},end:{name:"mouseup"}},d_;(function(e){e[e.RightClick=2]="RightClick"})(d_||(d_={}));var c_=class extends oy{constructor(t){super(t,O0e,Df(t.event.target))}};c_.activators=[{eventName:"onMouseDown",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:o}=t;return r.button===d_.RightClick?!1:(o?.({event:r}),!0)}}];var s_={cancel:{name:"touchcancel"},move:{name:"touchmove"},end:{name:"touchend"}},f_=class extends oy{constructor(t){super(t,s_)}static setup(){return window.addEventListener(s_.move.name,t,{capture:!1,passive:!1}),function(){window.removeEventListener(s_.move.name,t)};function t(){}}};f_.activators=[{eventName:"onTouchStart",handler:(e,t)=>{let{nativeEvent:r}=e,{onActivation:o}=t,{touches:n}=r;return n.length>1?!1:(o?.({event:r}),!0)}}];var ty;(function(e){e[e.Pointer=0]="Pointer",e[e.DraggableRect=1]="DraggableRect"})(ty||(ty={}));var YS;(function(e){e[e.TreeOrder=0]="TreeOrder",e[e.ReversedTreeOrder=1]="ReversedTreeOrder"})(YS||(YS={}));function E0e(e){let{acceleration:t,activator:r=ty.Pointer,canScroll:o,draggingRect:n,enabled:a,interval:i=5,order:s=YS.TreeOrder,pointerCoordinates:l,scrollableAncestors:u,scrollableAncestorRects:d,delta:c,threshold:f}=e,p=F0e({delta:c,disabled:!a}),[g,m]=HH(),h=(0,Ce.useRef)({x:0,y:0}),k=(0,Ce.useRef)({x:0,y:0}),M=(0,Ce.useMemo)(()=>{switch(r){case ty.Pointer:return l?{top:l.y,bottom:l.y,left:l.x,right:l.x}:null;case ty.DraggableRect:return n}},[r,n,l]),v=(0,Ce.useRef)(null),b=(0,Ce.useCallback)(()=>{let P=v.current;if(!P)return;let L=h.current.x*k.current.x,C=h.current.y*k.current.y;P.scrollBy(L,C)},[]),w=(0,Ce.useMemo)(()=>s===YS.TreeOrder?[...u].reverse():u,[s,u]);(0,Ce.useEffect)(()=>{if(!a||!u.length||!M){m();return}for(let P of w){if(o?.(P)===!1)continue;let L=u.indexOf(P),C=d[L];if(!C)continue;let{direction:F,speed:T}=S0e(P,C,M,t,f);for(let G of["x","y"])p[G][F[G]]||(T[G]=0,F[G]=0);if(T.x>0||T.y>0){m(),v.current=P,g(b,i),h.current=T,k.current=F;return}}h.current={x:0,y:0},k.current={x:0,y:0},m()},[t,b,o,m,a,i,JSON.stringify(M),JSON.stringify(p),g,u,w,d,JSON.stringify(f)])}var _0e={x:{[jo.Backward]:!1,[jo.Forward]:!1},y:{[jo.Backward]:!1,[jo.Forward]:!1}};function F0e(e){let{delta:t,disabled:r}=e,o=Qv(t);return Ug(n=>{if(r||!o||!n)return _0e;let a={x:Math.sign(t.x-o.x),y:Math.sign(t.y-o.y)};return{x:{[jo.Backward]:n.x[jo.Backward]||a.x===-1,[jo.Forward]:n.x[jo.Forward]||a.x===1},y:{[jo.Backward]:n.y[jo.Backward]||a.y===-1,[jo.Forward]:n.y[jo.Forward]||a.y===1}}},[r,t,o])}function B0e(e,t){let r=t!=null?e.get(t):void 0,o=r?r.node.current:null;return Ug(n=>{var a;return t==null?null:(a=o??n)!=null?a:null},[o,t])}function V0e(e,t){return(0,Ce.useMemo)(()=>e.reduce((r,o)=>{let{sensor:n}=o,a=n.activators.map(i=>({eventName:i.eventName,handler:t(i.handler,o)}));return[...r,...a]},[]),[e,t])}var Sd;(function(e){e[e.Always=0]="Always",e[e.BeforeDragging=1]="BeforeDragging",e[e.WhileDragging=2]="WhileDragging"})(Sd||(Sd={}));var p_;(function(e){e.Optimized="optimized"})(p_||(p_={}));var oK=new Map;function U0e(e,t){let{dragging:r,dependencies:o,config:n}=t,[a,i]=(0,Ce.useState)(null),{frequency:s,measure:l,strategy:u}=n,d=(0,Ce.useRef)(e),c=h(),f=Vg(c),p=(0,Ce.useCallback)(function(k){k===void 0&&(k=[]),!f.current&&i(M=>M===null?k:M.concat(k.filter(v=>!M.includes(v))))},[f]),g=(0,Ce.useRef)(null),m=Ug(k=>{if(c&&!r)return oK;if(!k||k===oK||d.current!==e||a!=null){let M=new Map;for(let v of e){if(!v)continue;if(a&&a.length>0&&!a.includes(v.id)&&v.rect.current){M.set(v.id,v.rect.current);continue}let b=v.node.current,w=b?new ry(l(b),b):null;v.rect.current=w,w&&M.set(v.id,w)}return M}return k},[e,a,r,c,l]);return(0,Ce.useEffect)(()=>{d.current=e},[e]),(0,Ce.useEffect)(()=>{c||p()},[r,c]),(0,Ce.useEffect)(()=>{a&&a.length>0&&i(null)},[JSON.stringify(a)]),(0,Ce.useEffect)(()=>{c||typeof s!="number"||g.current!==null||(g.current=setTimeout(()=>{p(),g.current=null},s))},[s,c,p,...o]),{droppableRects:m,measureDroppableContainers:p,measuringScheduled:a!=null};function h(){switch(u){case Sd.Always:return!1;case Sd.BeforeDragging:return r;default:return!r}}}function M_(e,t){return Ug(r=>e?r||(typeof t=="function"?t(e):e):null,[t,e])}function W0e(e,t){return M_(e,t)}function G0e(e){let{callback:t,disabled:r}=e,o=Xv(t),n=(0,Ce.useMemo)(()=>{if(r||typeof window>"u"||typeof window.MutationObserver>"u")return;let{MutationObserver:a}=window;return new a(o)},[o,r]);return(0,Ce.useEffect)(()=>()=>n?.disconnect(),[n]),n}function XS(e){let{callback:t,disabled:r}=e,o=Xv(t),n=(0,Ce.useMemo)(()=>{if(r||typeof window>"u"||typeof window.ResizeObserver>"u")return;let{ResizeObserver:a}=window;return new a(o)},[r]);return(0,Ce.useEffect)(()=>()=>n?.disconnect(),[n]),n}function j0e(e){return new ry(Vf(e),e)}function nK(e,t,r){t===void 0&&(t=j0e);let[o,n]=(0,Ce.useState)(null);function a(){n(l=>{if(!e)return null;if(e.isConnected===!1){var u;return(u=l??r)!=null?u:null}let d=t(e);return JSON.stringify(l)===JSON.stringify(d)?l:d})}let i=G0e({callback(l){if(e)for(let u of l){let{type:d,target:c}=u;if(d==="childList"&&c instanceof HTMLElement&&c.contains(e)){a();break}}}}),s=XS({callback:a});return Ia(()=>{a(),e?(s?.observe(e),i?.observe(document.body,{childList:!0,subtree:!0})):(s?.disconnect(),i?.disconnect())},[e]),o}function z0e(e){let t=M_(e);return fK(e,t)}var aK=[];function q0e(e){let t=(0,Ce.useRef)(e),r=Ug(o=>e?o&&o!==aK&&e&&t.current&&e.parentNode===t.current.parentNode?o:iy(e):aK,[e]);return(0,Ce.useEffect)(()=>{t.current=e},[e]),r}function H0e(e){let[t,r]=(0,Ce.useState)(null),o=(0,Ce.useRef)(e),n=(0,Ce.useCallback)(a=>{let i=a_(a.target);i&&r(s=>s?(s.set(i,u_(i)),new Map(s)):null)},[]);return(0,Ce.useEffect)(()=>{let a=o.current;if(e!==a){i(a);let s=e.map(l=>{let u=a_(l);return u?(u.addEventListener("scroll",n,{passive:!0}),[u,u_(u)]):null}).filter(l=>l!=null);r(s.length?new Map(s):null),o.current=e}return()=>{i(e),i(a)};function i(s){s.forEach(l=>{let u=a_(l);u?.removeEventListener("scroll",n)})}},[n,e]),(0,Ce.useMemo)(()=>e.length?t?Array.from(t.values()).reduce((a,i)=>Rf(a,i),ss):vK(e):ss,[e,t])}function iK(e,t){t===void 0&&(t=[]);let r=(0,Ce.useRef)(null);return(0,Ce.useEffect)(()=>{r.current=null},t),(0,Ce.useEffect)(()=>{let o=e!==ss;o&&!r.current&&(r.current=e),!o&&r.current&&(r.current=null)},[e]),r.current?Nf(e,r.current):ss}function K0e(e){(0,Ce.useEffect)(()=>{if(!Zv)return;let t=e.map(r=>{let{sensor:o}=r;return o.setup==null?void 0:o.setup()});return()=>{for(let r of t)r?.()}},e.map(t=>{let{sensor:r}=t;return r}))}function $0e(e,t){return(0,Ce.useMemo)(()=>e.reduce((r,o)=>{let{eventName:n,handler:a}=o;return r[n]=i=>{a(i,t)},r},{}),[e,t])}function bK(e){return(0,Ce.useMemo)(()=>e?x0e(e):null,[e])}var sK=[];function Y0e(e,t){t===void 0&&(t=Vf);let[r]=e,o=bK(r?wn(r):null),[n,a]=(0,Ce.useState)(sK);function i(){a(()=>e.length?e.map(l=>MK(l)?o:new ry(t(l),l)):sK)}let s=XS({callback:i});return Ia(()=>{s?.disconnect(),i(),e.forEach(l=>s?.observe(l))},[e]),n}function wK(e){if(!e)return null;if(e.children.length>1)return e;let t=e.children[0];return Bg(t)?t:e}function Z0e(e){let{measure:t}=e,[r,o]=(0,Ce.useState)(null),n=(0,Ce.useCallback)(u=>{for(let{target:d}of u)if(Bg(d)){o(c=>{let f=t(d);return c?{...c,width:f.width,height:f.height}:f});break}},[t]),a=XS({callback:n}),i=(0,Ce.useCallback)(u=>{let d=wK(u);a?.disconnect(),d&&a?.observe(d),o(d?t(d):null)},[t,a]),[s,l]=Jv(i);return(0,Ce.useMemo)(()=>({nodeRef:s,rect:r,setRef:l}),[r,s,l])}var X0e=[{sensor:Hl,options:{}},{sensor:ql,options:{}}],J0e={current:{}},KS={draggable:{measure:QH},droppable:{measure:QH,strategy:Sd.WhileDragging,frequency:p_.Optimized},dragOverlay:{measure:Vf}},_f=class extends Map{get(t){var r;return t!=null&&(r=super.get(t))!=null?r:void 0}toArray(){return Array.from(this.values())}getEnabled(){return this.toArray().filter(t=>{let{disabled:r}=t;return!r})}getNodeFor(t){var r,o;return(r=(o=this.get(t))==null?void 0:o.node.current)!=null?r:void 0}},Q0e={activatorEvent:null,active:null,activeNode:null,activeNodeRect:null,collisions:null,containerNodeRect:null,draggableNodes:new Map,droppableRects:new Map,droppableContainers:new _f,over:null,dragOverlay:{nodeRef:{current:null},rect:null,setRef:$S},scrollableAncestors:[],scrollableAncestorRects:[],measuringConfiguration:KS,measureDroppableContainers:$S,windowRect:null,measuringScheduled:!1},CK={activatorEvent:null,activators:[],active:null,activeNodeRect:null,ariaDescribedById:{draggable:""},dispatch:$S,draggableNodes:new Map,over:null,measureDroppableContainers:$S},sy=(0,Ce.createContext)(CK),SK=(0,Ce.createContext)(Q0e);function ewe(){return{draggable:{active:null,initialCoordinates:{x:0,y:0},nodes:new Map,translate:{x:0,y:0}},droppable:{containers:new _f}}}function twe(e,t){switch(t.type){case Io.DragStart:return{...e,draggable:{...e.draggable,initialCoordinates:t.initialCoordinates,active:t.active}};case Io.DragMove:return e.draggable.active==null?e:{...e,draggable:{...e.draggable,translate:{x:t.coordinates.x-e.draggable.initialCoordinates.x,y:t.coordinates.y-e.draggable.initialCoordinates.y}}};case Io.DragEnd:case Io.DragCancel:return{...e,draggable:{...e.draggable,active:null,initialCoordinates:{x:0,y:0},translate:{x:0,y:0}}};case Io.RegisterDroppable:{let{element:r}=t,{id:o}=r,n=new _f(e.droppable.containers);return n.set(o,r),{...e,droppable:{...e.droppable,containers:n}}}case Io.SetDroppableDisabled:{let{id:r,key:o,disabled:n}=t,a=e.droppable.containers.get(r);if(!a||o!==a.key)return e;let i=new _f(e.droppable.containers);return i.set(r,{...a,disabled:n}),{...e,droppable:{...e.droppable,containers:i}}}case Io.UnregisterDroppable:{let{id:r,key:o}=t,n=e.droppable.containers.get(r);if(!n||o!==n.key)return e;let a=new _f(e.droppable.containers);return a.delete(r),{...e,droppable:{...e.droppable,containers:a}}}default:return e}}function rwe(e){let{disabled:t}=e,{active:r,activatorEvent:o,draggableNodes:n}=(0,Ce.useContext)(sy),a=Qv(o),i=Qv(r?.id);return(0,Ce.useEffect)(()=>{if(!t&&!o&&a&&i!=null){if(!Wg(a)||document.activeElement===a.target)return;let s=n.get(i);if(!s)return;let{activatorNode:l,node:u}=s;if(!l.current&&!u.current)return;requestAnimationFrame(()=>{for(let d of[l.current,u.current]){if(!d)continue;let c=$H(d);if(c){c.focus();break}}})}},[o,t,n,i,a]),null}function PK(e,t){let{transform:r,...o}=t;return e!=null&&e.length?e.reduce((n,a)=>a({transform:n,...o}),r):r}function owe(e){return(0,Ce.useMemo)(()=>({draggable:{...KS.draggable,...e?.draggable},droppable:{...KS.droppable,...e?.droppable},dragOverlay:{...KS.dragOverlay,...e?.dragOverlay}}),[e?.draggable,e?.droppable,e?.dragOverlay])}function nwe(e){let{activeNode:t,measure:r,initialRect:o,config:n=!0}=e,a=(0,Ce.useRef)(!1),{x:i,y:s}=typeof n=="boolean"?{x:n,y:n}:n;Ia(()=>{if(!i&&!s||!t){a.current=!1;return}if(a.current||!o)return;let u=t?.node.current;if(!u||u.isConnected===!1)return;let d=r(u),c=fK(d,o);if(i||(c.x=0),s||(c.y=0),a.current=!0,Math.abs(c.x)>0||Math.abs(c.y)>0){let f=mK(u);f&&f.scrollBy({top:c.y,left:c.x})}},[t,i,s,o,r])}var JS=(0,Ce.createContext)({...ss,scaleX:1,scaleY:1}),Cd;(function(e){e[e.Uninitialized=0]="Uninitialized",e[e.Initializing=1]="Initializing",e[e.Initialized=2]="Initialized"})(Cd||(Cd={}));var ly=(0,Ce.memo)(function(t){var r,o,n,a;let{id:i,accessibility:s,autoScroll:l=!0,children:u,sensors:d=X0e,collisionDetection:c=ZS,measuring:f,modifiers:p,...g}=t,m=(0,Ce.useReducer)(twe,void 0,ewe),[h,k]=m,[M,v]=l0e(),[b,w]=(0,Ce.useState)(Cd.Uninitialized),P=b===Cd.Initialized,{draggable:{active:L,nodes:C,translate:F},droppable:{containers:T}}=h,G=L!=null?C.get(L):null,$=(0,Ce.useRef)({initial:null,translated:null}),oe=(0,Ce.useMemo)(()=>{var qr;return L!=null?{id:L,data:(qr=G?.data)!=null?qr:J0e,rect:$}:null},[L,G]),se=(0,Ce.useRef)(null),[pe,N]=(0,Ce.useState)(null),[R,U]=(0,Ce.useState)(null),E=Vg(g,Object.values(g)),_=Lf("DndDescribedBy",i),B=(0,Ce.useMemo)(()=>T.getEnabled(),[T]),j=owe(f),{droppableRects:re,measureDroppableContainers:W,measuringScheduled:K}=U0e(B,{dragging:P,dependencies:[F.x,F.y],config:j.droppable}),Q=B0e(C,L),ue=(0,Ce.useMemo)(()=>R?ey(R):null,[R]),Ue=tf(),de=W0e(Q,j.draggable.measure);nwe({activeNode:L!=null?C.get(L):null,config:Ue.layoutShiftCompensation,initialRect:de,measure:j.draggable.measure});let Pe=nK(Q,j.draggable.measure,de),Oe=nK(Q?Q.parentElement:null),Y=(0,Ce.useRef)({activatorEvent:null,active:null,activeNode:Q,collisionRect:null,collisions:null,droppableRects:re,draggableNodes:C,draggingNode:null,draggingNodeRect:null,droppableContainers:T,over:null,scrollableAncestors:[],scrollAdjustedTranslate:null}),Je=T.getNodeFor((r=Y.current.over)==null?void 0:r.id),_e=Z0e({measure:j.dragOverlay.measure}),it=(o=_e.nodeRef.current)!=null?o:Q,Lt=P?(n=_e.rect)!=null?n:Pe:null,jr=!!(_e.nodeRef.current&&_e.rect),zr=z0e(jr?null:Pe),Yt=bK(it?wn(it):null),vo=q0e(P?Je??Q:null),Fo=Y0e(vo),Yi=PK(p,{transform:{x:F.x-zr.x,y:F.y-zr.y,scaleX:1,scaleY:1},activatorEvent:R,active:oe,activeNodeRect:Pe,containerNodeRect:Oe,draggingNodeRect:Lt,over:Y.current.over,overlayNodeRect:_e.rect,scrollableAncestors:vo,scrollableAncestorRects:Fo,windowRect:Yt}),yo=ue?Rf(ue,F):null,ir=H0e(vo),Ns=iK(ir),vh=iK(ir,[Pe]),ri=Rf(Yi,Ns),gn=Lt?h0e(Lt,Yi):null,oi=oe&&gn?c({active:oe,collisionRect:gn,droppableRects:re,droppableContainers:B,pointerCoordinates:yo}):null,Ts=Bf(oi,"id"),[Tn,Il]=(0,Ce.useState)(null),Jc=jr?Yi:Rf(Yi,vh),Qc=k0e(Jc,(a=Tn?.rect)!=null?a:null,Pe),kn=(0,Ce.useRef)(null),Wu=(0,Ce.useCallback)((qr,gr)=>{let{sensor:I,options:q}=gr;if(se.current==null)return;let X=C.get(se.current);if(!X)return;let ae=qr.nativeEvent,Se=new I({active:se.current,activeNode:X,event:ae,options:q,context:Y,onAbort(Ie){if(!C.get(Ie))return;let{onDragAbort:Fe}=E.current,Ge={id:Ie};Fe?.(Ge),M({type:"onDragAbort",event:Ge})},onPending(Ie,Le,Fe,Ge){if(!C.get(Ie))return;let{onDragPending:qe}=E.current,st={id:Ie,constraint:Le,initialCoordinates:Fe,offset:Ge};qe?.(st),M({type:"onDragPending",event:st})},onStart(Ie){let Le=se.current;if(Le==null)return;let Fe=C.get(Le);if(!Fe)return;let{onDragStart:Ge}=E.current,Xe={activatorEvent:ae,active:{id:Le,data:Fe.data,rect:$}};(0,Of.unstable_batchedUpdates)(()=>{Ge?.(Xe),w(Cd.Initializing),k({type:Io.DragStart,initialCoordinates:Ie,active:Le}),M({type:"onDragStart",event:Xe}),N(kn.current),U(ae)})},onMove(Ie){k({type:Io.DragMove,coordinates:Ie})},onEnd:ye(Io.DragEnd),onCancel:ye(Io.DragCancel)});kn.current=Se;function ye(Ie){return async function(){let{active:Fe,collisions:Ge,over:Xe,scrollAdjustedTranslate:qe}=Y.current,st=null;if(Fe&&qe){let{cancelDrop:tt}=E.current;st={activatorEvent:ae,active:Fe,collisions:Ge,delta:qe,over:Xe},Ie===Io.DragEnd&&typeof tt=="function"&&await Promise.resolve(tt(st))&&(Ie=Io.DragCancel)}se.current=null,(0,Of.unstable_batchedUpdates)(()=>{k({type:Ie}),w(Cd.Uninitialized),Il(null),N(null),U(null),kn.current=null;let tt=Ie===Io.DragEnd?"onDragEnd":"onDragCancel";if(st){let at=E.current[tt];at?.(st),M({type:tt,event:st})}})}}},[C]),ef=(0,Ce.useCallback)((qr,gr)=>(I,q)=>{let X=I.nativeEvent,ae=C.get(q);if(se.current!==null||!ae||X.dndKit||X.defaultPrevented)return;let Se={active:ae};qr(I,gr.options,Se)===!0&&(X.dndKit={capturedBy:gr.sensor},se.current=q,Wu(I,gr))},[C,Wu]),Os=V0e(d,ef);K0e(d),Ia(()=>{Pe&&b===Cd.Initializing&&w(Cd.Initialized)},[Pe,b]),(0,Ce.useEffect)(()=>{let{onDragMove:qr}=E.current,{active:gr,activatorEvent:I,collisions:q,over:X}=Y.current;if(!gr||!I)return;let ae={active:gr,activatorEvent:I,collisions:q,delta:{x:ri.x,y:ri.y},over:X};(0,Of.unstable_batchedUpdates)(()=>{qr?.(ae),M({type:"onDragMove",event:ae})})},[ri.x,ri.y]),(0,Ce.useEffect)(()=>{let{active:qr,activatorEvent:gr,collisions:I,droppableContainers:q,scrollAdjustedTranslate:X}=Y.current;if(!qr||se.current==null||!gr||!X)return;let{onDragOver:ae}=E.current,Se=q.get(Ts),ye=Se&&Se.rect.current?{id:Se.id,rect:Se.rect.current,data:Se.data,disabled:Se.disabled}:null,Ie={active:qr,activatorEvent:gr,collisions:I,delta:{x:X.x,y:X.y},over:ye};(0,Of.unstable_batchedUpdates)(()=>{Il(ye),ae?.(Ie),M({type:"onDragOver",event:Ie})})},[Ts]),Ia(()=>{Y.current={activatorEvent:R,active:oe,activeNode:Q,collisionRect:gn,collisions:oi,droppableRects:re,draggableNodes:C,draggingNode:it,draggingNodeRect:Lt,droppableContainers:T,over:Tn,scrollableAncestors:vo,scrollAdjustedTranslate:ri},$.current={initial:Lt,translated:gn}},[oe,Q,oi,gn,C,it,Lt,re,T,Tn,vo,ri]),E0e({...Ue,delta:F,draggingRect:gn,pointerCoordinates:yo,scrollableAncestors:vo,scrollableAncestorRects:Fo});let Es=(0,Ce.useMemo)(()=>({active:oe,activeNode:Q,activeNodeRect:Pe,activatorEvent:R,collisions:oi,containerNodeRect:Oe,dragOverlay:_e,draggableNodes:C,droppableContainers:T,droppableRects:re,over:Tn,measureDroppableContainers:W,scrollableAncestors:vo,scrollableAncestorRects:Fo,measuringConfiguration:j,measuringScheduled:K,windowRect:Yt}),[oe,Q,Pe,R,oi,Oe,_e,C,T,re,Tn,W,vo,Fo,j,K,Yt]),Gu=(0,Ce.useMemo)(()=>({activatorEvent:R,activators:Os,active:oe,activeNodeRect:Pe,ariaDescribedById:{draggable:_},dispatch:k,draggableNodes:C,over:Tn,measureDroppableContainers:W}),[R,Os,oe,Pe,k,_,C,Tn,W]);return Ce.default.createElement(dK.Provider,{value:v},Ce.default.createElement(sy.Provider,{value:Gu},Ce.default.createElement(SK.Provider,{value:Es},Ce.default.createElement(JS.Provider,{value:Qc},u)),Ce.default.createElement(rwe,{disabled:s?.restoreFocus===!1})),Ce.default.createElement(c0e,{...s,hiddenTextDescribedById:_}));function tf(){let qr=pe?.autoScrollEnabled===!1,gr=typeof l=="object"?l.enabled===!1:l===!1,I=P&&!qr&&!gr;return typeof l=="object"?{...l,enabled:I}:{enabled:I}}}),awe=(0,Ce.createContext)(null),lK="button",iwe="Draggable";function AK(e){let{id:t,data:r,disabled:o=!1,attributes:n}=e,a=Lf(iwe),{activators:i,activatorEvent:s,active:l,activeNodeRect:u,ariaDescribedById:d,draggableNodes:c,over:f}=(0,Ce.useContext)(sy),{role:p=lK,roleDescription:g="draggable",tabIndex:m=0}=n??{},h=l?.id===t,k=(0,Ce.useContext)(h?JS:awe),[M,v]=Jv(),[b,w]=Jv(),P=$0e(i,t),L=Vg(r);Ia(()=>(c.set(t,{id:t,key:a,node:M,activatorNode:b,data:L}),()=>{let F=c.get(t);F&&F.key===a&&c.delete(t)}),[c,t]);let C=(0,Ce.useMemo)(()=>({role:p,tabIndex:m,"aria-disabled":o,"aria-pressed":h&&p===lK?!0:void 0,"aria-roledescription":g,"aria-describedby":d.draggable}),[o,p,m,h,g,d.draggable]);return{active:l,activatorEvent:s,activeNodeRect:u,attributes:C,isDragging:h,listeners:o?void 0:P,node:M,over:f,setNodeRef:v,setActivatorNodeRef:w,transform:k}}function h_(){return(0,Ce.useContext)(SK)}var swe="Droppable",lwe={timeout:25};function IK(e){let{data:t,disabled:r=!1,id:o,resizeObserverConfig:n}=e,a=Lf(swe),{active:i,dispatch:s,over:l,measureDroppableContainers:u}=(0,Ce.useContext)(sy),d=(0,Ce.useRef)({disabled:r}),c=(0,Ce.useRef)(!1),f=(0,Ce.useRef)(null),p=(0,Ce.useRef)(null),{disabled:g,updateMeasurementsFor:m,timeout:h}={...lwe,...n},k=Vg(m??o),M=(0,Ce.useCallback)(()=>{if(!c.current){c.current=!0;return}p.current!=null&&clearTimeout(p.current),p.current=setTimeout(()=>{u(Array.isArray(k.current)?k.current:[k.current]),p.current=null},h)},[h]),v=XS({callback:M,disabled:g||!i}),b=(0,Ce.useCallback)((C,F)=>{v&&(F&&(v.unobserve(F),c.current=!1),C&&v.observe(C))},[v]),[w,P]=Jv(b),L=Vg(t);return(0,Ce.useEffect)(()=>{!v||!w.current||(v.disconnect(),c.current=!1,v.observe(w.current))},[w,v]),(0,Ce.useEffect)(()=>(s({type:Io.RegisterDroppable,element:{id:o,key:a,disabled:r,node:w,rect:f,data:L}}),()=>s({type:Io.UnregisterDroppable,key:a,id:o})),[o]),(0,Ce.useEffect)(()=>{r!==d.current.disabled&&(s({type:Io.SetDroppableDisabled,id:o,key:a,disabled:r}),d.current.disabled=r)},[o,a,r,s]),{active:i,rect:f,isOver:l?.id===o,node:w,over:l,setNodeRef:P}}function uwe(e){let{animation:t,children:r}=e,[o,n]=(0,Ce.useState)(null),[a,i]=(0,Ce.useState)(null),s=Qv(r);return!r&&!o&&s&&n(s),Ia(()=>{if(!a)return;let l=o?.key,u=o?.props.id;if(l==null||u==null){n(null);return}Promise.resolve(t(u,a)).then(()=>{n(null)})},[t,o,a]),Ce.default.createElement(Ce.default.Fragment,null,r,o?(0,Ce.cloneElement)(o,{ref:i}):null)}var dwe={x:0,y:0,scaleX:1,scaleY:1};function cwe(e){let{children:t}=e;return Ce.default.createElement(sy.Provider,{value:CK},Ce.default.createElement(JS.Provider,{value:dwe},t))}var fwe={position:"fixed",touchAction:"none"},pwe=e=>Wg(e)?"transform 250ms ease":void 0,mwe=(0,Ce.forwardRef)((e,t)=>{let{as:r,activatorEvent:o,adjustScale:n,children:a,className:i,rect:s,style:l,transform:u,transition:d=pwe}=e;if(!s)return null;let c=n?u:{...u,scaleX:1,scaleY:1},f={...fwe,width:s.width,height:s.height,top:s.top,left:s.left,transform:na.Transform.toString(c),transformOrigin:n&&o?f0e(o,s):void 0,transition:typeof d=="function"?d(o):d,...l};return Ce.default.createElement(r,{className:i,style:f,ref:t},a)}),gwe=e=>t=>{let{active:r,dragOverlay:o}=t,n={},{styles:a,className:i}=e;if(a!=null&&a.active)for(let[s,l]of Object.entries(a.active))l!==void 0&&(n[s]=r.node.style.getPropertyValue(s),r.node.style.setProperty(s,l));if(a!=null&&a.dragOverlay)for(let[s,l]of Object.entries(a.dragOverlay))l!==void 0&&o.node.style.setProperty(s,l);return i!=null&&i.active&&r.node.classList.add(i.active),i!=null&&i.dragOverlay&&o.node.classList.add(i.dragOverlay),function(){for(let[l,u]of Object.entries(n))r.node.style.setProperty(l,u);i!=null&&i.active&&r.node.classList.remove(i.active)}},kwe=e=>{let{transform:{initial:t,final:r}}=e;return[{transform:na.Transform.toString(t)},{transform:na.Transform.toString(r)}]},Mwe={duration:250,easing:"ease",keyframes:kwe,sideEffects:gwe({styles:{active:{opacity:"0"}}})};function hwe(e){let{config:t,draggableNodes:r,droppableContainers:o,measuringConfiguration:n}=e;return Xv((a,i)=>{if(t===null)return;let s=r.get(a);if(!s)return;let l=s.node.current;if(!l)return;let u=wK(i);if(!u)return;let{transform:d}=wn(i).getComputedStyle(i),c=pK(d);if(!c)return;let f=typeof t=="function"?t:vwe(t);return yK(l,n.draggable.measure),f({active:{id:a,data:s.data,node:l,rect:n.draggable.measure(l)},draggableNodes:r,dragOverlay:{node:i,rect:n.dragOverlay.measure(u)},droppableContainers:o,measuringConfiguration:n,transform:c})})}function vwe(e){let{duration:t,easing:r,sideEffects:o,keyframes:n}={...Mwe,...e};return a=>{let{active:i,dragOverlay:s,transform:l,...u}=a;if(!t)return;let d={x:s.rect.left-i.rect.left,y:s.rect.top-i.rect.top},c={scaleX:l.scaleX!==1?i.rect.width*l.scaleX/s.rect.width:1,scaleY:l.scaleY!==1?i.rect.height*l.scaleY/s.rect.height:1},f={x:l.x-d.x,y:l.y-d.y,...c},p=n({...u,active:i,dragOverlay:s,transform:{initial:l,final:f}}),[g]=p,m=p[p.length-1];if(JSON.stringify(g)===JSON.stringify(m))return;let h=o?.({active:i,dragOverlay:s,...u}),k=s.node.animate(p,{duration:t,easing:r,fill:"forwards"});return new Promise(M=>{k.onfinish=()=>{h?.(),M()}})}}var uK=0;function ywe(e){return(0,Ce.useMemo)(()=>{if(e!=null)return uK++,uK},[e])}var v_=Ce.default.memo(e=>{let{adjustScale:t=!1,children:r,dropAnimation:o,style:n,transition:a,modifiers:i,wrapperElement:s="div",className:l,zIndex:u=999}=e,{activatorEvent:d,active:c,activeNodeRect:f,containerNodeRect:p,draggableNodes:g,droppableContainers:m,dragOverlay:h,over:k,measuringConfiguration:M,scrollableAncestors:v,scrollableAncestorRects:b,windowRect:w}=h_(),P=(0,Ce.useContext)(JS),L=ywe(c?.id),C=PK(i,{activatorEvent:d,active:c,activeNodeRect:f,containerNodeRect:p,draggingNodeRect:h.rect,over:k,overlayNodeRect:h.rect,scrollableAncestors:v,scrollableAncestorRects:b,transform:P,windowRect:w}),F=M_(f),T=hwe({config:o,draggableNodes:g,droppableContainers:m,measuringConfiguration:M}),G=F?h.setRef:void 0;return Ce.default.createElement(cwe,null,Ce.default.createElement(uwe,{animation:T},c&&L?Ce.default.createElement(mwe,{key:L,id:c.id,ref:G,as:s,activatorEvent:d,adjustScale:t,className:l,transition:a,rect:F,style:{zIndex:u,...n},transform:C},r):null))});var co=z(ie());function Uf(e,t,r){let o=e.slice();return o.splice(r<0?o.length+r:r,0,o.splice(t,1)[0]),o}function xwe(e,t){return e.reduce((r,o,n)=>{let a=t.get(o);return a&&(r[n]=a),r},Array(e.length))}function QS(e){return e!==null&&e>=0}function bwe(e,t){if(e===t)return!0;if(e.length!==t.length)return!1;for(let r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}function wwe(e){return typeof e=="boolean"?{draggable:e,droppable:e}:e}var Wf=e=>{let{rects:t,activeIndex:r,overIndex:o,index:n}=e,a=Uf(t,o,r),i=t[n],s=a[n];return!s||!i?null:{x:s.left-i.left,y:s.top-i.top,scaleX:s.width/i.width,scaleY:s.height/i.height}};var DK="Sortable",LK=co.default.createContext({activeIndex:-1,containerId:DK,disableTransforms:!1,items:[],overIndex:-1,useDragOverlay:!1,sortedRects:[],strategy:Wf,disabled:{draggable:!1,droppable:!1}});function uy(e){let{children:t,id:r,items:o,strategy:n=Wf,disabled:a=!1}=e,{active:i,dragOverlay:s,droppableRects:l,over:u,measureDroppableContainers:d}=h_(),c=Lf(DK,r),f=s.rect!==null,p=(0,co.useMemo)(()=>o.map(P=>typeof P=="object"&&"id"in P?P.id:P),[o]),g=i!=null,m=i?p.indexOf(i.id):-1,h=u?p.indexOf(u.id):-1,k=(0,co.useRef)(p),M=!bwe(p,k.current),v=h!==-1&&m===-1||M,b=wwe(a);Ia(()=>{M&&g&&d(p)},[M,p,g,d]),(0,co.useEffect)(()=>{k.current=p},[p]);let w=(0,co.useMemo)(()=>({activeIndex:m,containerId:c,disabled:b,disableTransforms:v,items:p,overIndex:h,useDragOverlay:f,sortedRects:xwe(p,l),strategy:n}),[m,c,b.draggable,b.droppable,v,p,h,l,f,n]);return co.default.createElement(LK.Provider,{value:w},t)}var Cwe=e=>{let{id:t,items:r,activeIndex:o,overIndex:n}=e;return Uf(r,o,n).indexOf(t)},Swe=e=>{let{containerId:t,isSorting:r,wasDragging:o,index:n,items:a,newIndex:i,previousItems:s,previousContainerId:l,transition:u}=e;return!u||!o||s!==a&&n===i?!1:r?!0:i!==n&&t===l},Pwe={duration:200,easing:"ease"},RK="transform",Awe=na.Transition.toString({property:RK,duration:0,easing:"linear"}),Iwe={roleDescription:"sortable"};function Dwe(e){let{disabled:t,index:r,node:o,rect:n}=e,[a,i]=(0,co.useState)(null),s=(0,co.useRef)(r);return Ia(()=>{if(!t&&r!==s.current&&o.current){let l=n.current;if(l){let u=Vf(o.current,{ignoreTransform:!0}),d={x:l.left-u.left,y:l.top-u.top,scaleX:l.width/u.width,scaleY:l.height/u.height};(d.x||d.y)&&i(d)}}r!==s.current&&(s.current=r)},[t,r,o,n]),(0,co.useEffect)(()=>{a&&i(null)},[a]),a}function dy(e){let{animateLayoutChanges:t=Swe,attributes:r,disabled:o,data:n,getNewIndex:a=Cwe,id:i,strategy:s,resizeObserverConfig:l,transition:u=Pwe}=e,{items:d,containerId:c,activeIndex:f,disabled:p,disableTransforms:g,sortedRects:m,overIndex:h,useDragOverlay:k,strategy:M}=(0,co.useContext)(LK),v=Lwe(o,p),b=d.indexOf(i),w=(0,co.useMemo)(()=>({sortable:{containerId:c,index:b,items:d},...n}),[c,n,b,d]),P=(0,co.useMemo)(()=>d.slice(d.indexOf(i)),[d,i]),{rect:L,node:C,isOver:F,setNodeRef:T}=IK({id:i,data:w,disabled:v.droppable,resizeObserverConfig:{updateMeasurementsFor:P,...l}}),{active:G,activatorEvent:$,activeNodeRect:oe,attributes:se,setNodeRef:pe,listeners:N,isDragging:R,over:U,setActivatorNodeRef:E,transform:_}=AK({id:i,data:w,attributes:{...Iwe,...r},disabled:v.draggable}),B=qH(T,pe),j=!!G,re=j&&!g&&QS(f)&&QS(h),W=!k&&R,K=W&&re?_:null,ue=re?K??(s??M)({rects:m,activeNodeRect:oe,activeIndex:f,overIndex:h,index:b}):null,Ue=QS(f)&&QS(h)?a({id:i,items:d,activeIndex:f,overIndex:h}):b,de=G?.id,Pe=(0,co.useRef)({activeId:de,items:d,newIndex:Ue,containerId:c}),Oe=d!==Pe.current.items,Y=t({active:G,containerId:c,isDragging:R,isSorting:j,id:i,index:b,items:d,newIndex:Pe.current.newIndex,previousItems:Pe.current.items,previousContainerId:Pe.current.containerId,transition:u,wasDragging:Pe.current.activeId!=null}),Je=Dwe({disabled:!Y,index:b,node:C,rect:L});return(0,co.useEffect)(()=>{j&&Pe.current.newIndex!==Ue&&(Pe.current.newIndex=Ue),c!==Pe.current.containerId&&(Pe.current.containerId=c),d!==Pe.current.items&&(Pe.current.items=d)},[j,Ue,c,d]),(0,co.useEffect)(()=>{if(de===Pe.current.activeId)return;if(de!=null&&Pe.current.activeId==null){Pe.current.activeId=de;return}let it=setTimeout(()=>{Pe.current.activeId=de},50);return()=>clearTimeout(it)},[de]),{active:G,activeIndex:f,attributes:se,data:w,rect:L,index:b,newIndex:Ue,items:d,isOver:F,isSorting:j,isDragging:R,listeners:N,node:C,overIndex:h,over:U,setNodeRef:B,setActivatorNodeRef:E,setDroppableNodeRef:T,setDraggableNodeRef:pe,transform:Je??ue,transition:_e()};function _e(){if(Je||Oe&&Pe.current.newIndex===b)return Awe;if(!(W&&!Wg($)||!u)&&(j||Y))return na.Transition.toString({...u,property:RK})}}function Lwe(e,t){var r,o;return typeof e=="boolean"?{draggable:e,droppable:!1}:{draggable:(r=e?.draggable)!=null?r:t.draggable,droppable:(o=e?.droppable)!=null?o:t.droppable}}function eP(e){if(!e)return!1;let t=e.data.current;return!!(t&&"sortable"in t&&typeof t.sortable=="object"&&"containerId"in t.sortable&&"items"in t.sortable&&"index"in t.sortable)}var Rwe=[Gt.Down,Gt.Right,Gt.Up,Gt.Left],cy=(e,t)=>{let{context:{active:r,collisionRect:o,droppableRects:n,droppableContainers:a,over:i,scrollableAncestors:s}}=t;if(Rwe.includes(e.code)){if(e.preventDefault(),!r||!o)return;let l=[];a.getEnabled().forEach(c=>{if(!c||c!=null&&c.disabled)return;let f=n.get(c.id);if(f)switch(e.code){case Gt.Down:o.top<f.top&&l.push(c);break;case Gt.Up:o.top>f.top&&l.push(c);break;case Gt.Left:o.left>f.left&&l.push(c);break;case Gt.Right:o.left<f.left&&l.push(c);break}});let u=cK({active:r,collisionRect:o,droppableRects:n,droppableContainers:l,pointerCoordinates:null}),d=Bf(u,"id");if(d===i?.id&&u.length>1&&(d=u[1].id),d!=null){let c=a.get(r.id),f=a.get(d),p=f?n.get(f.id):null,g=f?.node.current;if(g&&p&&c&&f){let h=iy(g).some((P,L)=>s[L]!==P),k=NK(c,f),M=Nwe(c,f),v=h||!k?{x:0,y:0}:{x:M?o.width-p.width:0,y:M?o.height-p.height:0},b={x:p.left,y:p.top};return v.x&&v.y?b:Nf(b,v)}}}};function NK(e,t){return!eP(e)||!eP(t)?!1:e.data.current.sortable.containerId===t.data.current.sortable.containerId}function Nwe(e,t){return!eP(e)||!eP(t)||!NK(e,t)?!1:e.data.current.sortable.index<t.data.current.sortable.index}var ex=z(ze(),1),ds=z(ie(),1);var TK=z(ie(),1),Kl=(0,TK.createContext)({});var OK=z(ie(),1);function Gg(e){let t=(0,OK.useRef)(null);return t.current===null&&(t.current=e()),t.current}var tP=z(ie(),1);var EK=typeof window<"u";var jg=EK?tP.useLayoutEffect:tP.useEffect;var IF=z(ze(),1),z$=z(ie(),1),Jy=z(ie(),1);var _K=z(ie(),1),Pd=(0,_K.createContext)(null);var G$=z(ze(),1);function Gf(e,t){e.indexOf(t)===-1&&e.push(t)}function Ad(e,t){let r=e.indexOf(t);r>-1&&e.splice(r,1)}var Do=(e,t,r)=>r>t?t:r<e?e:r;var $l=()=>{},Mi=()=>{};var Un={};var fy=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);var py=e=>typeof e=="object"&&e!==null;var my=e=>/^0[^.\s]+$/u.test(e);function gy(e){let t;return()=>(t===void 0&&(t=e()),t)}var Yr=e=>e;var ls=(...e)=>e.reduce((t,r)=>o=>r(t(o)));var Zs=(e,t,r)=>{let o=t-e;return o?(r-e)/o:1};var Yl=class{constructor(){this.subscriptions=[]}add(t){return Gf(this.subscriptions,t),()=>Ad(this.subscriptions,t)}notify(t,r,o){let n=this.subscriptions.length;if(n)if(n===1)this.subscriptions[0](t,r,o);else for(let a=0;a<n;a++){let i=this.subscriptions[a];i&&i(t,r,o)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}};var fo=e=>e*1e3,zo=e=>e/1e3;var ky=(e,t)=>t?e*(1e3/t):0;var FK=(e,t,r)=>(((1-3*r+3*t)*e+(3*r-6*t))*e+3*t)*e,Twe=1e-7,Owe=12;function Ewe(e,t,r,o,n){let a,i,s=0;do i=t+(r-t)/2,a=FK(i,o,n)-e,a>0?r=i:t=i;while(Math.abs(a)>Twe&&++s<Owe);return i}function Id(e,t,r,o){if(e===t&&r===o)return Yr;let n=a=>Ewe(a,0,1,e,r);return a=>a===0||a===1?a:FK(n(a),t,o)}var rP=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2;var oP=e=>t=>1-e(1-t);var nP=Id(.33,1.53,.69,.99),zg=oP(nP),My=rP(zg);var hy=e=>e>=1?1:(e*=2)<1?.5*zg(e):.5*(2-Math.pow(2,-10*(e-1)));var vy=e=>1-Math.sin(Math.acos(e)),yy=oP(vy),xy=rP(vy);var y_=Id(.42,0,1,1),x_=Id(0,0,.58,1),by=Id(.42,0,.58,1);var b_=e=>Array.isArray(e)&&typeof e[0]!="number";var wy=e=>Array.isArray(e)&&typeof e[0]=="number";var BK={linear:Yr,easeIn:y_,easeInOut:by,easeOut:x_,circIn:vy,circInOut:xy,circOut:yy,backIn:zg,backInOut:My,backOut:nP,anticipate:hy},_we=e=>typeof e=="string",aP=e=>{if(wy(e)){Mi(e.length===4,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,r,o,n]=e;return Id(t,r,o,n)}else if(_we(e))return Mi(BK[e]!==void 0,`Invalid easing type '${e}'`,"invalid-easing-type"),BK[e];return e};var Cy=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"];var Da={value:null,addProjectionMetrics:null};function VK(e,t){let r=new Set,o=new Set,n=!1,a=!1,i=new WeakSet,s={delta:0,timestamp:0,isProcessing:!1},l=0;function u(c){i.has(c)&&(d.schedule(c),e()),l++,c(s)}let d={schedule:(c,f=!1,p=!1)=>{let m=p&&n?r:o;return f&&i.add(c),m.add(c),c},cancel:c=>{o.delete(c),i.delete(c)},process:c=>{if(s=c,n){a=!0;return}n=!0;let f=r;r=o,o=f,r.forEach(u),t&&Da.value&&Da.value.frameloop[t].push(l),l=0,r.clear(),n=!1,a&&(a=!1,d.process(c))}};return d}var Fwe=40;function iP(e,t){let r=!1,o=!0,n={delta:0,timestamp:0,isProcessing:!1},a=()=>r=!0,i=Cy.reduce((v,b)=>(v[b]=VK(a,t?b:void 0),v),{}),{setup:s,read:l,resolveKeyframes:u,preUpdate:d,update:c,preRender:f,render:p,postRender:g}=i,m=()=>{let v=Un.useManualTiming,b=v?n.timestamp:performance.now();r=!1,v||(n.delta=o?1e3/60:Math.max(Math.min(b-n.timestamp,Fwe),1)),n.timestamp=b,n.isProcessing=!0,s.process(n),l.process(n),u.process(n),d.process(n),c.process(n),f.process(n),p.process(n),g.process(n),n.isProcessing=!1,r&&t&&(o=!1,e(m))},h=()=>{r=!0,o=!0,n.isProcessing||e(m)};return{schedule:Cy.reduce((v,b)=>{let w=i[b];return v[b]=(P,L=!1,C=!1)=>(r||h(),w.schedule(P,L,C)),v},{}),cancel:v=>{for(let b=0;b<Cy.length;b++)i[Cy[b]].cancel(v)},state:n,steps:i}}var{schedule:ht,cancel:aa,state:ro,steps:Sy}=iP(typeof requestAnimationFrame<"u"?requestAnimationFrame:Yr,!0);var sP;function Bwe(){sP=void 0}var Zr={now:()=>(sP===void 0&&Zr.set(ro.isProcessing||Un.useManualTiming?ro.timestamp:performance.now()),sP),set:e=>{sP=e,queueMicrotask(Bwe)}};var Xs={layout:0,mainThread:0,waapi:0};var UK=e=>t=>typeof t=="string"&&t.startsWith(e),lP=UK("--"),Vwe=UK("var(--"),qg=e=>Vwe(e)?Uwe.test(e.split("/*")[0].trim()):!1,Uwe=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function w_(e){return typeof e!="string"?!1:e.split("/*")[0].includes("var(--")}var Js={test:e=>typeof e=="number",parse:parseFloat,transform:e=>e},Zl={...Js,transform:e=>Do(0,1,e)},Py={...Js,default:1};var Dd=e=>Math.round(e*1e5)/1e5;var Hg=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;function WK(e){return e==null}var GK=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu;var Kg=(e,t)=>r=>!!(typeof r=="string"&&GK.test(r)&&r.startsWith(e)||t&&!WK(r)&&Object.prototype.hasOwnProperty.call(r,t)),uP=(e,t,r)=>o=>{if(typeof o!="string")return o;let[n,a,i,s]=o.match(Hg);return{[e]:parseFloat(n),[t]:parseFloat(a),[r]:parseFloat(i),alpha:s!==void 0?parseFloat(s):1}};var Wwe=e=>Do(0,255,e),C_={...Js,transform:e=>Math.round(Wwe(e))},Qs={test:Kg("rgb","red"),parse:uP("red","green","blue"),transform:({red:e,green:t,blue:r,alpha:o=1})=>"rgba("+C_.transform(e)+", "+C_.transform(t)+", "+C_.transform(r)+", "+Dd(Zl.transform(o))+")"};function Gwe(e){let t="",r="",o="",n="";return e.length>5?(t=e.substring(1,3),r=e.substring(3,5),o=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),r=e.substring(2,3),o=e.substring(3,4),n=e.substring(4,5),t+=t,r+=r,o+=o,n+=n),{red:parseInt(t,16),green:parseInt(r,16),blue:parseInt(o,16),alpha:n?parseInt(n,16)/255:1}}var Ay={test:Kg("#"),parse:Gwe,transform:Qs.transform};var Iy=e=>({test:t=>typeof t=="string"&&t.endsWith(e)&&t.split(" ").length===1,parse:parseFloat,transform:t=>`${t}${e}`}),hi=Iy("deg"),Cn=Iy("%"),He=Iy("px"),S_=Iy("vh"),P_=Iy("vw"),dP={...Cn,parse:e=>Cn.parse(e)/100,transform:e=>Cn.transform(e*100)};var Ld={test:Kg("hsl","hue"),parse:uP("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:o=1})=>"hsla("+Math.round(e)+", "+Cn.transform(Dd(t))+", "+Cn.transform(Dd(r))+", "+Dd(Zl.transform(o))+")"};var _r={test:e=>Qs.test(e)||Ay.test(e)||Ld.test(e),parse:e=>Qs.test(e)?Qs.parse(e):Ld.test(e)?Ld.parse(e):Ay.parse(e),transform:e=>typeof e=="string"?e:e.hasOwnProperty("red")?Qs.transform(e):Ld.transform(e),getAnimatableNone:e=>{let t=_r.parse(e);return t.alpha=0,_r.transform(t)}};var jK=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;function jwe(e){return isNaN(e)&&typeof e=="string"&&(e.match(Hg)?.length||0)+(e.match(jK)?.length||0)>0}var qK="number",HK="color",zwe="var",qwe="var(",zK="${}",Hwe=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function Rd(e){let t=e.toString(),r=[],o={color:[],number:[],var:[]},n=[],a=0,s=t.replace(Hwe,l=>(_r.test(l)?(o.color.push(a),n.push(HK),r.push(_r.parse(l))):l.startsWith(qwe)?(o.var.push(a),n.push(zwe),r.push(l)):(o.number.push(a),n.push(qK),r.push(parseFloat(l))),++a,zK)).split(zK);return{values:r,split:s,indexes:o,types:n}}function Kwe(e){return Rd(e).values}function KK({split:e,types:t}){let r=e.length;return o=>{let n="";for(let a=0;a<r;a++)if(n+=e[a],o[a]!==void 0){let i=t[a];i===qK?n+=Dd(o[a]):i===HK?n+=_r.transform(o[a]):n+=o[a]}return n}}function $we(e){return KK(Rd(e))}var Ywe=e=>typeof e=="number"?0:_r.test(e)?_r.getAnimatableNone(e):e,Zwe=(e,t)=>typeof e=="number"?t?.trim().endsWith("/")?e:0:Ywe(e);function Xwe(e){let t=Rd(e);return KK(t)(t.values.map((o,n)=>Zwe(o,t.split[n])))}var Lo={test:jwe,parse:Kwe,createTransformer:$we,getAnimatableNone:Xwe};function A_(e,t,r){return r<0&&(r+=1),r>1&&(r-=1),r<1/6?e+(t-e)*6*r:r<1/2?t:r<2/3?e+(t-e)*(2/3-r)*6:e}function $K({hue:e,saturation:t,lightness:r,alpha:o}){e/=360,t/=100,r/=100;let n=0,a=0,i=0;if(!t)n=a=i=r;else{let s=r<.5?r*(1+t):r+t-r*t,l=2*r-s;n=A_(l,s,e+1/3),a=A_(l,s,e),i=A_(l,s,e-1/3)}return{red:Math.round(n*255),green:Math.round(a*255),blue:Math.round(i*255),alpha:o}}function $g(e,t){return r=>r>0?t:e}var bt=(e,t,r)=>e+(t-e)*r;var I_=(e,t,r)=>{let o=e*e,n=r*(t*t-o)+o;return n<0?0:Math.sqrt(n)},Jwe=[Ay,Qs,Ld],Qwe=e=>Jwe.find(t=>t.test(e));function YK(e){let t=Qwe(e);if($l(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let r=t.parse(e);return t===Ld&&(r=$K(r)),r}var D_=(e,t)=>{let r=YK(e),o=YK(t);if(!r||!o)return $g(e,t);let n={...r};return a=>(n.red=I_(r.red,o.red,a),n.green=I_(r.green,o.green,a),n.blue=I_(r.blue,o.blue,a),n.alpha=bt(r.alpha,o.alpha,a),Qs.transform(n))};var cP=new Set(["none","hidden"]);function ZK(e,t){return cP.has(e)?r=>r<=0?e:t:r=>r>=1?t:e}function eCe(e,t){return r=>bt(e,t,r)}function fP(e){return typeof e=="number"?eCe:typeof e=="string"?qg(e)?$g:_r.test(e)?D_:oCe:Array.isArray(e)?XK:typeof e=="object"?_r.test(e)?D_:tCe:$g}function XK(e,t){let r=[...e],o=r.length,n=e.map((a,i)=>fP(a)(a,t[i]));return a=>{for(let i=0;i<o;i++)r[i]=n[i](a);return r}}function tCe(e,t){let r={...e,...t},o={};for(let n in r)e[n]!==void 0&&t[n]!==void 0&&(o[n]=fP(e[n])(e[n],t[n]));return n=>{for(let a in o)r[a]=o[a](n);return r}}function rCe(e,t){let r=[],o={color:0,var:0,number:0};for(let n=0;n<t.values.length;n++){let a=t.types[n],i=e.indexes[a][o[a]],s=e.values[i]??0;r[n]=s,o[a]++}return r}var oCe=(e,t)=>{let r=Lo.createTransformer(t),o=Rd(e),n=Rd(t);return o.indexes.var.length===n.indexes.var.length&&o.indexes.color.length===n.indexes.color.length&&o.indexes.number.length>=n.indexes.number.length?cP.has(e)&&!n.values.length||cP.has(t)&&!o.values.length?ZK(e,t):ls(XK(rCe(o,n),n.values),r):($l(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),$g(e,t))};function pP(e,t,r){return typeof e=="number"&&typeof t=="number"&&typeof r=="number"?bt(e,t,r):fP(e)(e,t)}var JK=e=>{let t=({timestamp:r})=>e(r);return{start:(r=!0)=>ht.update(t,r),stop:()=>aa(t),now:()=>ro.isProcessing?ro.timestamp:Zr.now()}};var mP=(e,t,r=10)=>{let o="",n=Math.max(Math.round(t/r),2);for(let a=0;a<n;a++)o+=Math.round(e(a/(n-1))*1e4)/1e4+", ";return`linear(${o.substring(0,o.length-2)})`};function Yg(e){let t=0,r=50,o=e.next(t);for(;!o.done&&t<2e4;)t+=r,o=e.next(t);return t>=2e4?1/0:t}function QK(e,t=100,r){let o=r({...e,keyframes:[0,t]}),n=Math.min(Yg(o),2e4);return{type:"keyframes",ease:a=>o.next(n*a).value/t,duration:zo(n)}}var Xr={stiffness:100,damping:10,mass:1,velocity:0,duration:800,bounce:.3,visualDuration:.3,restSpeed:{granular:.01,default:2},restDelta:{granular:.005,default:.5},minDuration:.01,maxDuration:10,minDamping:.05,maxDamping:1};function N_(e,t){return e*Math.sqrt(1-t*t)}var nCe=12;function aCe(e,t,r){let o=r;for(let n=1;n<nCe;n++)o=o-e(o)/t(o);return o}var R_=.001;function iCe({duration:e=Xr.duration,bounce:t=Xr.bounce,velocity:r=Xr.velocity,mass:o=Xr.mass}){let n,a;$l(e<=fo(Xr.maxDuration),"Spring duration must be 10 seconds or less","spring-duration-limit");let i=1-t;i=Do(Xr.minDamping,Xr.maxDamping,i),e=Do(Xr.minDuration,Xr.maxDuration,zo(e)),i<1?(n=u=>{let d=u*i,c=d*e,f=d-r,p=N_(u,i),g=Math.exp(-c);return R_-f/p*g},a=u=>{let c=u*i*e,f=c*r+r,p=Math.pow(i,2)*Math.pow(u,2)*e,g=Math.exp(-c),m=N_(Math.pow(u,2),i);return(-n(u)+R_>0?-1:1)*((f-p)*g)/m}):(n=u=>{let d=Math.exp(-u*e),c=(u-r)*e+1;return-R_+d*c},a=u=>{let d=Math.exp(-u*e),c=(r-u)*(e*e);return d*c});let s=5/e,l=aCe(n,a,s);if(e=fo(e),isNaN(l))return{stiffness:Xr.stiffness,damping:Xr.damping,duration:e};{let u=Math.pow(l,2)*o;return{stiffness:u,damping:i*2*Math.sqrt(o*u),duration:e}}}var sCe=["duration","bounce"],lCe=["stiffness","damping","mass"];function e9(e,t){return t.some(r=>e[r]!==void 0)}function uCe(e){let t={velocity:Xr.velocity,stiffness:Xr.stiffness,damping:Xr.damping,mass:Xr.mass,isResolvedFromDuration:!1,...e};if(!e9(e,lCe)&&e9(e,sCe))if(t.velocity=0,e.visualDuration){let r=e.visualDuration,o=2*Math.PI/(r*1.2),n=o*o,a=2*Do(.05,1,1-(e.bounce||0))*Math.sqrt(n);t={...t,mass:Xr.mass,stiffness:n,damping:a}}else{let r=iCe({...e,velocity:0});t={...t,...r,mass:Xr.mass},t.isResolvedFromDuration=!0}return t}function Zg(e=Xr.visualDuration,t=Xr.bounce){let r=typeof e!="object"?{visualDuration:e,keyframes:[0,1],bounce:t}:e,{restSpeed:o,restDelta:n}=r,a=r.keyframes[0],i=r.keyframes[r.keyframes.length-1],s={done:!1,value:a},{stiffness:l,damping:u,mass:d,duration:c,velocity:f,isResolvedFromDuration:p}=uCe({...r,velocity:-zo(r.velocity||0)}),g=f||0,m=u/(2*Math.sqrt(l*d)),h=i-a,k=zo(Math.sqrt(l/d)),M=Math.abs(h)<5;o||(o=M?Xr.restSpeed.granular:Xr.restSpeed.default),n||(n=M?Xr.restDelta.granular:Xr.restDelta.default);let v,b,w,P,L,C;if(m<1)w=N_(k,m),P=(g+m*k*h)/w,v=T=>{let G=Math.exp(-m*k*T);return i-G*(P*Math.sin(w*T)+h*Math.cos(w*T))},L=m*k*P+h*w,C=m*k*h-P*w,b=T=>Math.exp(-m*k*T)*(L*Math.sin(w*T)+C*Math.cos(w*T));else if(m===1){v=G=>i-Math.exp(-k*G)*(h+(g+k*h)*G);let T=g+k*h;b=G=>Math.exp(-k*G)*(k*T*G-g)}else{let T=k*Math.sqrt(m*m-1);v=se=>{let pe=Math.exp(-m*k*se),N=Math.min(T*se,300);return i-pe*((g+m*k*h)*Math.sinh(N)+T*h*Math.cosh(N))/T};let G=(g+m*k*h)/T,$=m*k*G-h*T,oe=m*k*h-G*T;b=se=>{let pe=Math.exp(-m*k*se),N=Math.min(T*se,300);return pe*($*Math.sinh(N)+oe*Math.cosh(N))}}let F={calculatedDuration:p&&c||null,velocity:T=>fo(b(T)),next:T=>{if(!p&&m<1){let $=Math.exp(-m*k*T),oe=Math.sin(w*T),se=Math.cos(w*T),pe=i-$*(P*oe+h*se),N=fo($*(L*oe+C*se));return s.done=Math.abs(N)<=o&&Math.abs(i-pe)<=n,s.value=s.done?i:pe,s}let G=v(T);if(p)s.done=T>=c;else{let $=fo(b(T));s.done=Math.abs($)<=o&&Math.abs(i-G)<=n}return s.value=s.done?i:G,s},toString:()=>{let T=Math.min(Yg(F),2e4),G=mP($=>F.next(T*$).value,T,30);return T+"ms "+G},toTransition:()=>{}};return F}Zg.applyToOptions=e=>{let t=QK(e,100,Zg);return e.ease=t.ease,e.duration=fo(t.duration),e.type="keyframes",e};var dCe=5;function gP(e,t,r){let o=Math.max(t-dCe,0);return ky(r-e(o),t-o)}function Dy({keyframes:e,velocity:t=0,power:r=.8,timeConstant:o=325,bounceDamping:n=10,bounceStiffness:a=500,modifyTarget:i,min:s,max:l,restDelta:u=.5,restSpeed:d}){let c=e[0],f={done:!1,value:c},p=C=>s!==void 0&&C<s||l!==void 0&&C>l,g=C=>s===void 0?l:l===void 0||Math.abs(s-C)<Math.abs(l-C)?s:l,m=r*t,h=c+m,k=i===void 0?h:i(h);k!==h&&(m=k-c);let M=C=>-m*Math.exp(-C/o),v=C=>k+M(C),b=C=>{let F=M(C),T=v(C);f.done=Math.abs(F)<=u,f.value=f.done?k:T},w,P,L=C=>{p(f.value)&&(w=C,P=Zg({keyframes:[f.value,g(f.value)],velocity:gP(v,C,f.value),damping:n,stiffness:a,restDelta:u,restSpeed:d}))};return L(0),{calculatedDuration:null,next:C=>{let F=!1;return!P&&w===void 0&&(F=!0,b(C),L(C)),w!==void 0&&C>=w?P.next(C-w):(!F&&b(C),f)}}}function cCe(e,t,r){let o=[],n=r||Un.mix||pP,a=e.length-1;for(let i=0;i<a;i++){let s=n(e[i],e[i+1]);if(t){let l=Array.isArray(t)?t[i]||Yr:t;s=ls(l,s)}o.push(s)}return o}function t9(e,t,{clamp:r=!0,ease:o,mixer:n}={}){let a=e.length;if(Mi(a===t.length,"Both input and output ranges must be the same length","range-length"),a===1)return()=>t[0];if(a===2&&t[0]===t[1])return()=>t[1];let i=e[0]===e[1];e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());let s=cCe(t,o,n),l=s.length,u=d=>{if(i&&d<e[0])return t[0];let c=0;if(l>1)for(;c<e.length-2&&!(d<e[c+1]);c++);let f=Zs(e[c],e[c+1],d);return s[c](f)};return r?d=>u(Do(e[0],e[a-1],d)):u}function r9(e,t){let r=e[e.length-1];for(let o=1;o<=t;o++){let n=Zs(0,t,o);e.push(bt(r,1,n))}}function o9(e){let t=[0];return r9(t,e.length-1),t}function n9(e,t){return e.map(r=>r*t)}function fCe(e,t){return e.map(()=>t||by).splice(0,e.length-1)}function jf({duration:e=300,keyframes:t,times:r,ease:o="easeInOut"}){let n=b_(o)?o.map(aP):aP(o),a={done:!1,value:t[0]},i=n9(r&&r.length===t.length?r:o9(t),e),s=t9(i,t,{ease:Array.isArray(n)?n:fCe(t,n)});return{calculatedDuration:e,next:l=>(a.value=s(l),a.done=l>=e,a)}}var pCe=e=>e!==null;function Nd(e,{repeat:t,repeatType:r="loop"},o,n=1){let a=e.filter(pCe),s=n<0||t&&r!=="loop"&&t%2===1?0:a.length-1;return!s||o===void 0?a[s]:o}var mCe={decay:Dy,inertia:Dy,tween:jf,keyframes:jf,spring:Zg};function kP(e){typeof e.type=="string"&&(e.type=mCe[e.type])}var Td=class{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(t=>{this.resolve=t})}notifyFinished(){this.resolve()}then(t,r){return this.finished.then(t,r)}};var gCe=e=>e/100,Xl=class extends Td{constructor(t){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.delayState={done:!1,value:void 0},this.stop=()=>{let{motionValue:r}=this.options;r&&r.updatedAt!==Zr.now()&&this.tick(Zr.now()),this.isStopped=!0,this.state!=="idle"&&(this.teardown(),this.options.onStop?.())},Xs.mainThread++,this.options=t,this.initAnimation(),this.play(),t.autoplay===!1&&this.pause()}initAnimation(){let{options:t}=this;kP(t);let{type:r=jf,repeat:o=0,repeatDelay:n=0,repeatType:a,velocity:i=0}=t,{keyframes:s}=t,l=r||jf;l!==jf&&typeof s[0]!="number"&&(this.mixKeyframes=ls(gCe,pP(s[0],s[1])),s=[0,100]);let u=l({...t,keyframes:s});a==="mirror"&&(this.mirroredGenerator=l({...t,keyframes:[...s].reverse(),velocity:-i})),u.calculatedDuration===null&&(u.calculatedDuration=Yg(u));let{calculatedDuration:d}=u;this.calculatedDuration=d,this.resolvedDuration=d+n,this.totalDuration=this.resolvedDuration*(o+1)-n,this.generator=u}updateTime(t){let r=Math.round(t-this.startTime)*this.playbackSpeed;this.holdTime!==null?this.currentTime=this.holdTime:this.currentTime=r}tick(t,r=!1){let{generator:o,totalDuration:n,mixKeyframes:a,mirroredGenerator:i,resolvedDuration:s,calculatedDuration:l}=this;if(this.startTime===null)return o.next(0);let{delay:u=0,keyframes:d,repeat:c,repeatType:f,repeatDelay:p,type:g,onUpdate:m,finalKeyframe:h}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,t):this.speed<0&&(this.startTime=Math.min(t-n/this.speed,this.startTime)),r?this.currentTime=t:this.updateTime(t);let k=this.currentTime-u*(this.playbackSpeed>=0?1:-1),M=this.playbackSpeed>=0?k<0:k>n;this.currentTime=Math.max(k,0),this.state==="finished"&&this.holdTime===null&&(this.currentTime=n);let v=this.currentTime,b=o;if(c){let C=Math.min(this.currentTime,n)/s,F=Math.floor(C),T=C%1;!T&&C>=1&&(T=1),T===1&&F--,F=Math.min(F,c+1),F%2&&(f==="reverse"?(T=1-T,p&&(T-=p/s)):f==="mirror"&&(b=i)),v=Do(0,1,T)*s}let w;M?(this.delayState.value=d[0],w=this.delayState):w=b.next(v),a&&!M&&(w.value=a(w.value));let{done:P}=w;!M&&l!==null&&(P=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let L=this.holdTime===null&&(this.state==="finished"||this.state==="running"&&P);return L&&g!==Dy&&(w.value=Nd(d,this.options,h,this.speed)),m&&m(w.value),L&&this.finish(),w}then(t,r){return this.finished.then(t,r)}get duration(){return zo(this.calculatedDuration)}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+zo(t)}get time(){return zo(this.currentTime)}set time(t){t=fo(t),this.currentTime=t,this.startTime===null||this.holdTime!==null||this.playbackSpeed===0?this.holdTime=t:this.driver&&(this.startTime=this.driver.now()-t/this.playbackSpeed),this.driver?this.driver.start(!1):(this.startTime=0,this.state="paused",this.holdTime=t,this.tick(t))}getGeneratorVelocity(){let t=this.currentTime;if(t<=0)return this.options.velocity||0;if(this.generator.velocity)return this.generator.velocity(t);let r=this.generator.next(t).value;return gP(o=>this.generator.next(o).value,t,r)}get speed(){return this.playbackSpeed}set speed(t){let r=this.playbackSpeed!==t;r&&this.driver&&this.updateTime(Zr.now()),this.playbackSpeed=t,r&&this.driver&&(this.time=zo(this.currentTime))}play(){if(this.isStopped)return;let{driver:t=JK,startTime:r}=this.options;this.driver||(this.driver=t(n=>this.tick(n))),this.options.onPlay?.();let o=this.driver.now();this.state==="finished"?(this.updateFinished(),this.startTime=o):this.holdTime!==null?this.startTime=o-this.holdTime:this.startTime||(this.startTime=r??o),this.state==="finished"&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(Zr.now()),this.holdTime=this.currentTime}complete(){this.state!=="running"&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,Xs.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(t){return this.startTime=0,this.tick(t,!0)}attachTimeline(t){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),t.observe(this)}};function a9(e){for(let t=1;t<e.length;t++)e[t]??(e[t]=e[t-1])}var zf=e=>e*180/Math.PI,T_=e=>{let t=zf(Math.atan2(e[1],e[0]));return O_(t)},kCe={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:T_,rotateZ:T_,skewX:e=>zf(Math.atan(e[1])),skewY:e=>zf(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},O_=e=>(e=e%360,e<0&&(e+=360),e),i9=T_,s9=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),l9=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),MCe={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:s9,scaleY:l9,scale:e=>(s9(e)+l9(e))/2,rotateX:e=>O_(zf(Math.atan2(e[6],e[5]))),rotateY:e=>O_(zf(Math.atan2(-e[2],e[0]))),rotateZ:i9,rotate:i9,skewX:e=>zf(Math.atan(e[4])),skewY:e=>zf(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function MP(e){return e.includes("scale")?1:0}function hP(e,t){if(!e||e==="none")return MP(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u),o,n;if(r)o=MCe,n=r;else{let s=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);o=kCe,n=s}if(!n)return MP(t);let a=o[t],i=n[1].split(",").map(hCe);return typeof a=="function"?a(i):i[a]}var u9=(e,t)=>{let{transform:r="none"}=getComputedStyle(e);return hP(r,t)};function hCe(e){return parseFloat(e.trim())}var el=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],vi=new Set([...el,"pathRotation"]);var E_=e=>e===Js||e===He,vCe=new Set(["x","y","z"]),yCe=el.filter(e=>!vCe.has(e));function d9(e){let t=[];return yCe.forEach(r=>{let o=e.getValue(r);o!==void 0&&(t.push([r,o.get()]),o.set(r.startsWith("scale")?1:0))}),t}var Jl={width:({x:e},{paddingLeft:t="0",paddingRight:r="0",boxSizing:o})=>{let n=e.max-e.min;return o==="border-box"?n:n-parseFloat(t)-parseFloat(r)},height:({y:e},{paddingTop:t="0",paddingBottom:r="0",boxSizing:o})=>{let n=e.max-e.min;return o==="border-box"?n:n-parseFloat(t)-parseFloat(r)},top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>hP(t,"x"),y:(e,{transform:t})=>hP(t,"y")};Jl.translateX=Jl.x;Jl.translateY=Jl.y;var qf=new Set,__=!1,F_=!1,B_=!1;function c9(){if(F_){let e=Array.from(qf).filter(o=>o.needsMeasurement),t=new Set(e.map(o=>o.element)),r=new Map;t.forEach(o=>{let n=d9(o);n.length&&(r.set(o,n),o.render())}),e.forEach(o=>o.measureInitialState()),t.forEach(o=>{o.render();let n=r.get(o);n&&n.forEach(([a,i])=>{o.getValue(a)?.set(i)})}),e.forEach(o=>o.measureEndState()),e.forEach(o=>{o.suspendedScrollY!==void 0&&window.scrollTo(0,o.suspendedScrollY)})}F_=!1,__=!1,qf.forEach(e=>e.complete(B_)),qf.clear()}function f9(){qf.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(F_=!0)})}function p9(){B_=!0,f9(),c9(),B_=!1}var Od=class{constructor(t,r,o,n,a,i=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...t],this.onComplete=r,this.name=o,this.motionValue=n,this.element=a,this.isAsync=i}scheduleResolve(){this.state="scheduled",this.isAsync?(qf.add(this),__||(__=!0,ht.read(f9),ht.resolveKeyframes(c9))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:t,name:r,element:o,motionValue:n}=this;if(t[0]===null){let a=n?.get(),i=t[t.length-1];if(a!==void 0)t[0]=a;else if(o&&r){let s=o.readValue(r,i);s!=null&&(t[0]=s)}t[0]===void 0&&(t[0]=i),n&&a===void 0&&n.set(t[0])}a9(t)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(t=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,t),qf.delete(this)}cancel(){this.state==="scheduled"&&(qf.delete(this),this.state="pending")}resume(){this.state==="pending"&&this.scheduleResolve()}};var m9=e=>e.startsWith("--");function vP(e,t,r){m9(t)?e.style.setProperty(t,r):e.style[t]=r}var g9={};function yP(e,t){let r=gy(e);return()=>g9[t]??r()}var k9=yP(()=>window.ScrollTimeline!==void 0,"scrollTimeline");var xP=yP(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch{return!1}return!0},"linearEasing");var Hf=([e,t,r,o])=>`cubic-bezier(${e}, ${t}, ${r}, ${o})`;var V_={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Hf([0,.65,.55,1]),circOut:Hf([.55,0,1,.45]),backIn:Hf([.31,.01,.66,-.59]),backOut:Hf([.33,1.53,.69,.99])};function U_(e,t){if(e)return typeof e=="function"?xP()?mP(e,t):"ease-out":wy(e)?Hf(e):Array.isArray(e)?e.map(r=>U_(r,t)||V_.easeOut):V_[e]}function M9(e,t,r,{delay:o=0,duration:n=300,repeat:a=0,repeatType:i="loop",ease:s="easeOut",times:l}={},u=void 0){let d={[t]:r};l&&(d.offset=l);let c=U_(s,n);Array.isArray(c)&&(d.easing=c),Da.value&&Xs.waapi++;let f={delay:o,duration:n,easing:Array.isArray(c)?"linear":c,fill:"both",iterations:a+1,direction:i==="reverse"?"alternate":"normal"};u&&(f.pseudoElement=u);let p=e.animate(d,f);return Da.value&&p.finished.finally(()=>{Xs.waapi--}),p}function bP(e){return typeof e=="function"&&"applyToOptions"in e}function h9({type:e,...t}){return bP(e)&&xP()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}var Xg=class extends Td{constructor(t){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!t)return;let{element:r,name:o,keyframes:n,pseudoElement:a,allowFlatten:i=!1,finalKeyframe:s,onComplete:l}=t;this.isPseudoElement=!!a,this.allowFlatten=i,this.options=t,Mi(typeof t.type!="string",`Mini animate() doesn't support "type" as a string.`,"mini-spring");let u=h9(t);this.animation=M9(r,o,n,u,a),u.autoplay===!1&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!a){let d=Nd(n,this.options,s,this.speed);this.updateMotionValue&&this.updateMotionValue(d),vP(r,o,d),this.animation.cancel()}l?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),this.state==="finished"&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch{}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:t}=this;t==="idle"||t==="finished"||(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let t=this.options?.element;!this.isPseudoElement&&t?.isConnected&&this.animation.commitStyles?.()}get duration(){let t=this.animation.effect?.getComputedTiming?.().duration||0;return zo(Number(t))}get iterationDuration(){let{delay:t=0}=this.options||{};return this.duration+zo(t)}get time(){return zo(Number(this.animation.currentTime)||0)}set time(t){let r=this.finishedTime!==null;this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=fo(t),r&&this.animation.pause()}get speed(){return this.animation.playbackRate}set speed(t){t<0&&(this.finishedTime=null),this.animation.playbackRate=t}get state(){return this.finishedTime!==null?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(t){this.manualStartTime=this.animation.startTime=t}attachTimeline({timeline:t,rangeStart:r,rangeEnd:o,observe:n}){return this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,t&&k9()?(this.animation.timeline=t,r&&(this.animation.rangeStart=r),o&&(this.animation.rangeEnd=o),Yr):n(this)}};var v9={anticipate:hy,backInOut:My,circInOut:xy};function xCe(e){return e in v9}function y9(e){typeof e.ease=="string"&&xCe(e.ease)&&(e.ease=v9[e.ease])}var W_=10,wP=class extends Xg{constructor(t){y9(t),kP(t),super(t),t.startTime!==void 0&&t.autoplay!==!1&&(this.startTime=t.startTime),this.options=t}updateMotionValue(t){let{motionValue:r,onUpdate:o,onComplete:n,element:a,...i}=this.options;if(!r)return;if(t!==void 0){r.set(t);return}let s=new Xl({...i,autoplay:!1}),l=Math.max(W_,Zr.now()-this.startTime),u=Do(0,W_,l-W_),d=s.sample(l).value,{name:c}=this.options;a&&c&&vP(a,c,d),r.setWithVelocity(s.sample(Math.max(0,l-u)).value,d,u),s.stop()}};var G_=(e,t)=>t==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Lo.test(e)||e==="0")&&!e.startsWith("url("));function bCe(e){let t=e[0];if(e.length===1)return!0;for(let r=0;r<e.length;r++)if(e[r]!==t)return!0}function x9(e,t,r,o){let n=e[0];if(n===null)return!1;if(t==="display"||t==="visibility")return!0;let a=e[e.length-1],i=G_(n,t),s=G_(a,t);return $l(i===s,`You are trying to animate ${t} from "${n}" to "${a}". "${i?a:n}" is not an animatable value.`,"value-not-animatable"),!i||!s?!1:bCe(e)||(r==="spring"||bP(r))&&o}function Ly(e){e.duration=0,e.type="keyframes"}var CP=new Set(["opacity","clipPath","filter","transform"]);var wCe=/^(?:oklch|oklab|lab|lch|color|color-mix|light-dark)\(/;function b9(e){for(let t=0;t<e.length;t++)if(typeof e[t]=="string"&&wCe.test(e[t]))return!0;return!1}var CCe=new Set(["color","backgroundColor","outlineColor","fill","stroke","borderColor","borderTopColor","borderRightColor","borderBottomColor","borderLeftColor"]),SCe=gy(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));function w9(e){let{motionValue:t,name:r,repeatDelay:o,repeatType:n,damping:a,type:i,keyframes:s}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:u,transformTemplate:d}=t.owner.getProps();return SCe()&&r&&(CP.has(r)||CCe.has(r)&&b9(s))&&(r!=="transform"||!d)&&!u&&!o&&n!=="mirror"&&a!==0&&i!=="inertia"}var PCe=40,SP=class extends Td{constructor({autoplay:t=!0,delay:r=0,type:o="keyframes",repeat:n=0,repeatDelay:a=0,repeatType:i="loop",keyframes:s,name:l,motionValue:u,element:d,...c}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=Zr.now();let f={autoplay:t,delay:r,type:o,repeat:n,repeatDelay:a,repeatType:i,name:l,motionValue:u,element:d,...c},p=d?.KeyframeResolver||Od;this.keyframeResolver=new p(s,(g,m,h)=>this.onKeyframesResolved(g,m,f,!h),l,u,d),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(t,r,o,n){this.keyframeResolver=void 0;let{name:a,type:i,velocity:s,delay:l,isHandoff:u,onUpdate:d}=o;this.resolvedAt=Zr.now();let c=!0;x9(t,a,i,s)||(c=!1,(Un.instantAnimations||!l)&&d?.(Nd(t,o,r)),t[0]=t[t.length-1],Ly(o),o.repeat=0);let p={startTime:n?this.resolvedAt?this.resolvedAt-this.createdAt>PCe?this.resolvedAt:this.createdAt:this.createdAt:void 0,finalKeyframe:r,...o,keyframes:t},g=c&&!u&&w9(p),m=p.motionValue?.owner?.current,h;if(g)try{h=new wP({...p,element:m})}catch{h=new Xl(p)}else h=new Xl(p);h.finished.then(()=>{this.notifyFinished()}).catch(Yr),this.pendingTimeline&&(this.stopTimeline=h.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=h}get finished(){return this._animation?this.animation.finished:this._finished}then(t,r){return this.finished.finally(t).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),p9()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(t){this.animation.time=t}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(t){this.animation.speed=t}get startTime(){return this.animation.startTime}attachTimeline(t){return this._animation?this.stopTimeline=this.animation.attachTimeline(t):this.pendingTimeline=t,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}};function PP(e,t,r,o=0,n=1){let a=Array.from(e).sort((u,d)=>u.sortNodePosition(d)).indexOf(t),i=e.size,s=(i-1)*o;return typeof r=="function"?r(a,i):n===1?a*o:s-a*o}var C9=30,ACe=e=>!isNaN(parseFloat(e)),S9={current:void 0},j_=class{constructor(t,r={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=o=>{let n=Zr.now();if(this.updatedAt!==n&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(o),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let a of this.dependents)a.dirty()},this.hasAnimated=!1,this.setCurrent(t),this.owner=r.owner}setCurrent(t){this.current=t,this.updatedAt=Zr.now(),this.canTrackVelocity===null&&t!==void 0&&(this.canTrackVelocity=ACe(this.current))}setPrevFrameValue(t=this.current){this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt}onChange(t){return this.on("change",t)}on(t,r){this.events[t]||(this.events[t]=new Yl);let o=this.events[t].add(r);return t==="change"?()=>{o(),ht.read(()=>{this.events.change.getSize()||this.stop()})}:o}clearListeners(){for(let t in this.events)this.events[t].clear()}attach(t,r){this.passiveEffect=t,this.stopPassiveEffect=r}set(t){this.passiveEffect?this.passiveEffect(t,this.updateAndNotify):this.updateAndNotify(t)}setWithVelocity(t,r,o){this.set(r),this.prev=void 0,this.prevFrameValue=t,this.prevUpdatedAt=this.updatedAt-o}jump(t,r=!0){this.updateAndNotify(t),this.prev=t,this.prevUpdatedAt=this.prevFrameValue=void 0,r&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(t){this.dependents||(this.dependents=new Set),this.dependents.add(t)}removeDependent(t){this.dependents&&this.dependents.delete(t)}get(){return S9.current&&S9.current.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let t=Zr.now();if(!this.canTrackVelocity||this.prevFrameValue===void 0||t-this.updatedAt>C9)return 0;let r=Math.min(this.updatedAt-this.prevUpdatedAt,C9);return ky(parseFloat(this.current)-parseFloat(this.prevFrameValue),r)}start(t){return this.stop(),new Promise(r=>{this.hasAnimated=!0,this.animation=t(r),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}};function us(e,t){return new j_(e,t)}function AP(e,t){if(e?.inherit&&t){let{inherit:r,...o}=e;return{...t,...o}}return e}function Jg(e,t){let r=e?.[t]??e?.default??e;return r!==e?AP(r,e):r}var ICe={type:"spring",stiffness:500,damping:25,restSpeed:10},DCe=e=>({type:"spring",stiffness:550,damping:e===0?2*Math.sqrt(550):30,restSpeed:10}),LCe={type:"keyframes",duration:.8},RCe={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},P9=(e,{keyframes:t})=>t.length>2?LCe:vi.has(e)?e.startsWith("scale")?DCe(t[1]):ICe:RCe;var NCe=new Set(["when","delay","delayChildren","staggerChildren","staggerDirection","repeat","repeatType","repeatDelay","from","elapsed"]);function A9(e){for(let t in e)if(!NCe.has(t))return!0;return!1}var Kf=(e,t,r,o={},n,a)=>i=>{let s=Jg(o,e)||{},l=s.delay||o.delay||0,{elapsed:u=0}=o;u=u-fo(l);let d={keyframes:Array.isArray(r)?r:[null,r],ease:"easeOut",velocity:t.getVelocity(),...s,delay:-u,onUpdate:f=>{t.set(f),s.onUpdate&&s.onUpdate(f)},onComplete:()=>{i(),s.onComplete&&s.onComplete()},name:e,motionValue:t,element:a?void 0:n};A9(s)||Object.assign(d,P9(e,d)),d.duration&&(d.duration=fo(d.duration)),d.repeatDelay&&(d.repeatDelay=fo(d.repeatDelay)),d.from!==void 0&&(d.keyframes[0]=d.from);let c=!1;if((d.type===!1||d.duration===0&&!d.repeatDelay)&&(Ly(d),d.delay===0&&(c=!0)),(Un.instantAnimations||Un.skipAnimations||n?.shouldSkipAnimations||s.skipAnimations)&&(c=!0,Ly(d),d.delay=0),d.allowFlatten=!s.type&&!s.ease,c&&!a&&t.get()!==void 0){let f=Nd(d.keyframes,s);if(f!==void 0){ht.update(()=>{d.onUpdate(f),d.onComplete()});return}}return s.isSync?new Xl(d):new SP(d)};var TCe=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;function OCe(e){let t=TCe.exec(e);if(!t)return[,];let[,r,o,n]=t;return[`--${r??o}`,n]}var ECe=4;function z_(e,t,r=1){Mi(r<=ECe,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[o,n]=OCe(e);if(!o)return;let a=window.getComputedStyle(t).getPropertyValue(o);if(a){let i=a.trim();return fy(i)?parseFloat(i):i}return qg(n)?z_(n,t,r+1):n}function I9(e){let t=[{},{}];return e?.values.forEach((r,o)=>{t[0][o]=r.get(),t[1][o]=r.getVelocity()}),t}function $f(e,t,r,o){if(typeof t=="function"){let[n,a]=I9(o);t=t(r!==void 0?r:e.custom,n,a)}if(typeof t=="string"&&(t=e.variants&&e.variants[t]),typeof t=="function"){let[n,a]=I9(o);t=t(r!==void 0?r:e.custom,n,a)}return t}function La(e,t,r){let o=e.getProps();return $f(o,t,r!==void 0?r:o.custom,e)}var IP=new Set(["width","height","top","left","right","bottom",...el]);var Ry=e=>Array.isArray(e);function _Ce(e,t,r){e.hasValue(t)?e.getValue(t).set(r):e.addValue(t,us(r))}function FCe(e){return Ry(e)?e[e.length-1]||0:e}function D9(e,t){let r=La(e,t),{transitionEnd:o={},transition:n={},...a}=r||{};a={...a,...o};for(let i in a){let s=FCe(a[i]);_Ce(e,i,s)}}var cr=e=>!!(e&&e.getVelocity);function L9(e){return!!(cr(e)&&e.add)}function Qg(e,t){let r=e.getValue("willChange");if(L9(r))return r.add(t);if(!r&&Un.WillChange){let o=new Un.WillChange("auto");e.addValue("willChange",o),o.add(t)}}function ek(e){return e.replace(/([A-Z])/g,t=>`-${t.toLowerCase()}`)}var R9="framerAppearId",Ny="data-"+ek(R9);function DP(e){return e.props[Ny]}function BCe({protectedKeys:e,needsAnimating:t},r){let o=e.hasOwnProperty(r)&&t[r]!==!0;return t[r]=!1,o}function LP(e,t,{delay:r=0,transitionOverride:o,type:n}={}){let{transition:a,transitionEnd:i,...s}=t,l=e.getDefaultTransition();a=a?AP(a,l):l;let u=a?.reduceMotion,d=a?.skipAnimations;o&&(a=o);let c=[],f=n&&e.animationState&&e.animationState.getState()[n],p=a?.path;p&&p.animateVisualElement(e,s,a,r,c);for(let g in s){let m=e.getValue(g,e.latestValues[g]??null),h=s[g];if(h===void 0||f&&BCe(f,g))continue;let k={delay:r,...Jg(a||{},g)};d&&(k.skipAnimations=!0);let M=m.get();if(M!==void 0&&!m.isAnimating()&&!Array.isArray(h)&&h===M&&!k.velocity){ht.update(()=>m.set(h));continue}let v=!1;if(window.MotionHandoffAnimation){let P=DP(e);if(P){let L=window.MotionHandoffAnimation(P,g,ht);L!==null&&(k.startTime=L,v=!0)}}Qg(e,g);let b=u??e.shouldReduceMotion;m.start(Kf(g,m,h,b&&IP.has(g)?{type:!1}:k,e,v));let w=m.animation;w&&c.push(w)}if(i){let g=()=>ht.update(()=>{i&&D9(e,i)});c.length?Promise.all(c).then(g):g()}return c}function RP(e,t,r={}){let o=La(e,t,r.type==="exit"?e.presenceContext?.custom:void 0),{transition:n=e.getDefaultTransition()||{}}=o||{};r.transitionOverride&&(n=r.transitionOverride);let a=o?()=>Promise.all(LP(e,o,r)):()=>Promise.resolve(),i=e.variantChildren&&e.variantChildren.size?(l=0)=>{let{delayChildren:u=0,staggerChildren:d,staggerDirection:c}=n;return VCe(e,t,l,u,d,c,r)}:()=>Promise.resolve(),{when:s}=n;if(s){let[l,u]=s==="beforeChildren"?[a,i]:[i,a];return l().then(()=>u())}else return Promise.all([a(),i(r.delay)])}function VCe(e,t,r=0,o=0,n=0,a=1,i){let s=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),s.push(RP(l,t,{...i,delay:r+(typeof o=="function"?0:o)+PP(e.variantChildren,l,o,n,a)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(s)}function N9(e,t,r={}){e.notify("AnimationStart",t);let o;if(Array.isArray(t)){let n=t.map(a=>RP(e,a,r));o=Promise.all(n)}else if(typeof t=="string")o=RP(e,t,r);else{let n=typeof t=="function"?La(e,t,r.custom):t;o=Promise.all(LP(e,n,r))}return o.then(()=>{e.notify("AnimationComplete",t)})}var T9={test:e=>e==="auto",parse:e=>e};var NP=e=>t=>t.test(e);var q_=[Js,He,Cn,hi,P_,S_,T9],H_=e=>q_.find(NP(e));function O9(e){return typeof e=="number"?e===0:e!==null?e==="none"||e==="0"||my(e):!0}var UCe=new Set(["brightness","contrast","saturate","opacity"]);function WCe(e){let[t,r]=e.slice(0,-1).split("(");if(t==="drop-shadow")return e;let[o]=r.match(Hg)||[];if(!o)return e;let n=r.replace(o,""),a=UCe.has(t)?1:0;return o!==r&&(a*=100),t+"("+a+n+")"}var GCe=/\b([a-z-]*)\(.*?\)/gu,Ty={...Lo,getAnimatableNone:e=>{let t=e.match(GCe);return t?t.map(WCe).join(" "):e}};var Oy={...Lo,getAnimatableNone:e=>{let t=Lo.parse(e);return Lo.createTransformer(e)(t.map(o=>typeof o=="number"?0:typeof o=="object"?{...o,alpha:1}:o))}};var K_={...Js,transform:Math.round};var E9={rotate:hi,pathRotation:hi,rotateX:hi,rotateY:hi,rotateZ:hi,scale:Py,scaleX:Py,scaleY:Py,scaleZ:Py,skew:hi,skewX:hi,skewY:hi,distance:He,translateX:He,translateY:He,translateZ:He,x:He,y:He,z:He,perspective:He,transformPerspective:He,opacity:Zl,originX:dP,originY:dP,originZ:He};var Yf={borderWidth:He,borderTopWidth:He,borderRightWidth:He,borderBottomWidth:He,borderLeftWidth:He,borderRadius:He,borderTopLeftRadius:He,borderTopRightRadius:He,borderBottomRightRadius:He,borderBottomLeftRadius:He,width:He,maxWidth:He,height:He,maxHeight:He,top:He,right:He,bottom:He,left:He,inset:He,insetBlock:He,insetBlockStart:He,insetBlockEnd:He,insetInline:He,insetInlineStart:He,insetInlineEnd:He,padding:He,paddingTop:He,paddingRight:He,paddingBottom:He,paddingLeft:He,paddingBlock:He,paddingBlockStart:He,paddingBlockEnd:He,paddingInline:He,paddingInlineStart:He,paddingInlineEnd:He,margin:He,marginTop:He,marginRight:He,marginBottom:He,marginLeft:He,marginBlock:He,marginBlockStart:He,marginBlockEnd:He,marginInline:He,marginInlineStart:He,marginInlineEnd:He,fontSize:He,backgroundPositionX:He,backgroundPositionY:He,...E9,zIndex:K_,fillOpacity:Zl,strokeOpacity:Zl,numOctaves:K_};var jCe={...Yf,color:_r,backgroundColor:_r,outlineColor:_r,fill:_r,stroke:_r,borderColor:_r,borderTopColor:_r,borderRightColor:_r,borderBottomColor:_r,borderLeftColor:_r,filter:Ty,WebkitFilter:Ty,mask:Oy,WebkitMask:Oy},TP=e=>jCe[e];var zCe=new Set([Ty,Oy]);function OP(e,t){let r=TP(e);return zCe.has(r)||(r=Lo),r.getAnimatableNone?r.getAnimatableNone(t):void 0}var qCe=new Set(["auto","none","0"]);function _9(e,t,r){let o=0,n;for(;o<e.length&&!n;){let a=e[o];typeof a=="string"&&!qCe.has(a)&&Rd(a).values.length&&(n=e[o]),o++}if(n&&r)for(let a of t)e[a]=OP(r,n)}var EP=class extends Od{constructor(t,r,o,n,a){super(t,r,o,n,a,!0)}readKeyframes(){let{unresolvedKeyframes:t,element:r,name:o}=this;if(!r||!r.current)return;super.readKeyframes();for(let d=0;d<t.length;d++){let c=t[d];if(typeof c=="string"&&(c=c.trim(),qg(c))){let f=z_(c,r.current);f!==void 0&&(t[d]=f),d===t.length-1&&(this.finalKeyframe=c)}}if(this.resolveNoneKeyframes(),!IP.has(o)||t.length!==2)return;let[n,a]=t,i=H_(n),s=H_(a),l=w_(n),u=w_(a);if(l!==u&&Jl[o]){this.needsMeasurement=!0;return}if(i!==s)if(E_(i)&&E_(s))for(let d=0;d<t.length;d++){let c=t[d];typeof c=="string"&&(t[d]=parseFloat(c))}else Jl[o]&&(this.needsMeasurement=!0)}resolveNoneKeyframes(){let{unresolvedKeyframes:t,name:r}=this,o=[];for(let n=0;n<t.length;n++)(t[n]===null||O9(t[n]))&&o.push(n);o.length&&_9(t,o,r)}measureInitialState(){let{element:t,unresolvedKeyframes:r,name:o}=this;if(!t||!t.current)return;o==="height"&&(this.suspendedScrollY=window.pageYOffset),this.measuredOrigin=Jl[o](t.measureViewportBox(),window.getComputedStyle(t.current)),r[0]=this.measuredOrigin;let n=r[r.length-1];n!==void 0&&t.getValue(o,n).jump(n,!1)}measureEndState(){let{element:t,name:r,unresolvedKeyframes:o}=this;if(!t||!t.current)return;let n=t.getValue(r);n&&n.jump(this.measuredOrigin,!1);let a=o.length-1,i=o[a];o[a]=Jl[r](t.measureViewportBox(),window.getComputedStyle(t.current)),i!==null&&this.finalKeyframe===void 0&&(this.finalKeyframe=i),this.removedTransforms?.length&&this.removedTransforms.forEach(([s,l])=>{t.getValue(s).set(l)}),this.resolveNoneKeyframes()}};function _P(e,t,r){if(e==null)return[];if(e instanceof EventTarget)return[e];if(typeof e=="string"){let o=document;t&&(o=t.current);let n=r?.[e]??o.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e).filter(o=>o!=null)}var Ey=(e,t)=>t&&typeof e=="number"?t.transform(e):e;function Zf(e){return py(e)&&"offsetHeight"in e&&!("ownerSVGElement"in e)}var{schedule:Xf,cancel:HCe}=iP(queueMicrotask,!1);var yi={x:!1,y:!1};function FP(){return yi.x||yi.y}function $_(e){return e==="x"||e==="y"?yi[e]?null:(yi[e]=!0,()=>{yi[e]=!1}):yi.x||yi.y?null:(yi.x=yi.y=!0,()=>{yi.x=yi.y=!1})}function BP(e,t){let r=_P(e),o=new AbortController,n={passive:!0,...t,signal:o.signal};return[r,n,()=>o.abort()]}function KCe(e){return!(e.pointerType==="touch"||FP())}function Y_(e,t,r={}){let[o,n,a]=BP(e,r);return o.forEach(i=>{let s=!1,l=!1,u,d=()=>{i.removeEventListener("pointerleave",g)},c=h=>{u&&(u(h),u=void 0),d()},f=h=>{s=!1,window.removeEventListener("pointerup",f),window.removeEventListener("pointercancel",f),l&&(l=!1,c(h))},p=()=>{s=!0,window.addEventListener("pointerup",f,n),window.addEventListener("pointercancel",f,n)},g=h=>{if(h.pointerType!=="touch"){if(s){l=!0;return}c(h)}},m=h=>{if(!KCe(h))return;l=!1;let k=t(i,h);typeof k=="function"&&(u=k,i.addEventListener("pointerleave",g,n))};i.addEventListener("pointerenter",m,n),i.addEventListener("pointerdown",p,n)}),a}var Z_=(e,t)=>t?e===t?!0:Z_(e,t.parentElement):!1;var Jf=e=>e.pointerType==="mouse"?typeof e.button!="number"||e.button<=0:e.isPrimary!==!1;var $Ce=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function X_(e){return $Ce.has(e.tagName)||e.isContentEditable===!0}var YCe=new Set(["INPUT","SELECT","TEXTAREA"]);function J_(e){return YCe.has(e.tagName)||e.isContentEditable===!0}var tk=new WeakSet;function F9(e){return t=>{t.key==="Enter"&&e(t)}}function Q_(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}var B9=(e,t)=>{let r=e.currentTarget;if(!r)return;let o=F9(()=>{if(tk.has(r))return;Q_(r,"down");let n=F9(()=>{Q_(r,"up")}),a=()=>Q_(r,"cancel");r.addEventListener("keyup",n,t),r.addEventListener("blur",a,t)});r.addEventListener("keydown",o,t),r.addEventListener("blur",()=>r.removeEventListener("keydown",o),t)};function V9(e){return Jf(e)&&!FP()}var U9=new WeakSet;function eF(e,t,r={}){let[o,n,a]=BP(e,r),i=s=>{let l=s.currentTarget;if(!V9(s)||U9.has(s))return;tk.add(l),r.stopPropagation&&U9.add(s);let u=t(l,s),d=(p,g)=>{window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",f),tk.has(l)&&tk.delete(l),V9(p)&&typeof u=="function"&&u(p,{success:g})},c=p=>{d(p,l===window||l===document||r.useGlobalTarget||Z_(l,p.target))},f=p=>{d(p,!1)};window.addEventListener("pointerup",c,n),window.addEventListener("pointercancel",f,n)};return o.forEach(s=>{(r.useGlobalTarget?window:s).addEventListener("pointerdown",i,n),Zf(s)&&(s.addEventListener("focus",u=>B9(u,n)),!X_(s)&&!s.hasAttribute("tabindex")&&(s.tabIndex=0))}),a}function rk(e){return py(e)&&"ownerSVGElement"in e}var VP=new WeakMap,UP,W9=(e,t,r)=>(o,n)=>n&&n[0]?n[0][e+"Size"]:rk(o)&&"getBBox"in o?o.getBBox()[t]:o[r],ZCe=W9("inline","width","offsetWidth"),XCe=W9("block","height","offsetHeight");function JCe({target:e,borderBoxSize:t}){VP.get(e)?.forEach(r=>{r(e,{get width(){return ZCe(e,t)},get height(){return XCe(e,t)}})})}function QCe(e){e.forEach(JCe)}function eSe(){typeof ResizeObserver>"u"||(UP=new ResizeObserver(QCe))}function G9(e,t){UP||eSe();let r=_P(e);return r.forEach(o=>{let n=VP.get(o);n||(n=new Set,VP.set(o,n)),n.add(t),UP?.observe(o)}),()=>{r.forEach(o=>{let n=VP.get(o);n?.delete(t),n?.size||UP?.unobserve(o)})}}var WP=new Set,ok;function tSe(){ok=()=>{let e={get width(){return window.innerWidth},get height(){return window.innerHeight}};WP.forEach(t=>t(e))},window.addEventListener("resize",ok)}function j9(e){return WP.add(e),ok||tSe(),()=>{WP.delete(e),!WP.size&&typeof ok=="function"&&(window.removeEventListener("resize",ok),ok=void 0)}}function GP(e,t){return typeof e=="function"?j9(e):G9(e,t)}function z9(e){return rk(e)&&e.tagName==="svg"}var rSe=[...q_,_r,Lo],q9=e=>rSe.find(NP(e));var tF=()=>({translate:0,scale:1,origin:0,originPoint:0}),Ed=()=>({x:tF(),y:tF()}),rF=()=>({min:0,max:0}),Fr=()=>({x:rF(),y:rF()});var H9=new WeakMap;function Ql(e){return e!==null&&typeof e=="object"&&typeof e.start=="function"}function tl(e){return typeof e=="string"||Array.isArray(e)}var jP=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],_y=["initial",...jP];function _d(e){return Ql(e.animate)||_y.some(t=>tl(e[t]))}function Fy(e){return!!(_d(e)||e.variants)}function K9(e,t,r){for(let o in t){let n=t[o],a=r[o];if(cr(n))e.addValue(o,n);else if(cr(a))e.addValue(o,us(n,{owner:e}));else if(a!==n)if(e.hasValue(o)){let i=e.getValue(o);i.liveStyle===!0?i.jump(n):i.hasAnimated||i.set(n)}else{let i=e.getStaticValue(o);e.addValue(o,us(i!==void 0?i:n,{owner:e}))}}for(let o in r)t[o]===void 0&&e.removeValue(o);return t}var Fd={current:null},Qf={current:!1};var oSe=typeof window<"u";function By(){if(Qf.current=!0,!!oSe)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Fd.current=e.matches;e.addEventListener("change",t),t()}else Fd.current=!1}var $9=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],zP={};function Uy(e){zP=e}function oF(){return zP}var Vy=class{scrapeMotionValuesFromProps(t,r,o){return{}}constructor({parent:t,props:r,presenceContext:o,reducedMotionConfig:n,skipAnimations:a,blockInitialAnimation:i,visualState:s},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=Od,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let p=Zr.now();this.renderScheduledAt<p&&(this.renderScheduledAt=p,ht.render(this.render,!1,!0))};let{latestValues:u,renderState:d}=s;this.latestValues=u,this.baseTarget={...u},this.initialValues=r.initial?{...u}:{},this.renderState=d,this.parent=t,this.props=r,this.presenceContext=o,this.depth=t?t.depth+1:0,this.reducedMotionConfig=n,this.skipAnimationsConfig=a,this.options=l,this.blockInitialAnimation=!!i,this.isControllingVariants=_d(r),this.isVariantNode=Fy(r),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(t&&t.current);let{willChange:c,...f}=this.scrapeMotionValuesFromProps(r,{},this);for(let p in f){let g=f[p];u[p]!==void 0&&cr(g)&&g.set(u[p])}}mount(t){if(this.hasBeenMounted)for(let r in this.initialValues)this.values.get(r)?.jump(this.initialValues[r]),this.latestValues[r]=this.initialValues[r];this.current=t,H9.set(t,this),this.projection&&!this.projection.instance&&this.projection.mount(t),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((r,o)=>this.bindToMotionValue(o,r)),this.reducedMotionConfig==="never"?this.shouldReduceMotion=!1:this.reducedMotionConfig==="always"?this.shouldReduceMotion=!0:(Qf.current||By(),this.shouldReduceMotion=Fd.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){this.projection&&this.projection.unmount(),aa(this.notifyUpdate),aa(this.render),this.valueSubscriptions.forEach(t=>t()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this);for(let t in this.events)this.events[t].clear();for(let t in this.features){let r=this.features[t];r&&(r.unmount(),r.isMounted=!1)}this.current=null}addChild(t){this.children.add(t),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(t)}removeChild(t){this.children.delete(t),this.enteringChildren&&this.enteringChildren.delete(t)}bindToMotionValue(t,r){if(this.valueSubscriptions.has(t)&&this.valueSubscriptions.get(t)(),r.accelerate&&CP.has(t)&&this.current instanceof HTMLElement){let{factory:i,keyframes:s,times:l,ease:u,duration:d}=r.accelerate,c=new Xg({element:this.current,name:t,keyframes:s,times:l,ease:u,duration:fo(d)}),f=i(c);this.valueSubscriptions.set(t,()=>{f(),c.cancel()});return}let o=vi.has(t);o&&this.onBindTransform&&this.onBindTransform();let n=r.on("change",i=>{this.latestValues[t]=i,this.props.onUpdate&&ht.preRender(this.notifyUpdate),o&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()}),a;typeof window<"u"&&window.MotionCheckAppearSync&&(a=window.MotionCheckAppearSync(this,t,r)),this.valueSubscriptions.set(t,()=>{n(),a&&a()})}sortNodePosition(t){return!this.current||!this.sortInstanceNodePosition||this.type!==t.type?0:this.sortInstanceNodePosition(this.current,t.current)}updateFeatures(){let t="animation";for(t in zP){let r=zP[t];if(!r)continue;let{isEnabled:o,Feature:n}=r;if(!this.features[t]&&n&&o(this.props)&&(this.features[t]=new n(this)),this.features[t]){let a=this.features[t];a.isMounted?a.update():(a.mount(),a.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):Fr()}getStaticValue(t){return this.latestValues[t]}setStaticValue(t,r){this.latestValues[t]=r}update(t,r){(t.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=t,this.prevPresenceContext=this.presenceContext,this.presenceContext=r;for(let o=0;o<$9.length;o++){let n=$9[o];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);let a="on"+n,i=t[a];i&&(this.propEventSubscriptions[n]=this.on(n,i))}this.prevMotionValues=K9(this,this.scrapeMotionValuesFromProps(t,this.prevProps||{},this),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(t){return this.props.variants?this.props.variants[t]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}addVariantChild(t){let r=this.getClosestVariantNode();if(r)return r.variantChildren&&r.variantChildren.add(t),()=>r.variantChildren.delete(t)}addValue(t,r){let o=this.values.get(t);r!==o&&(o&&this.removeValue(t),this.bindToMotionValue(t,r),this.values.set(t,r),this.latestValues[t]=r.get())}removeValue(t){this.values.delete(t);let r=this.valueSubscriptions.get(t);r&&(r(),this.valueSubscriptions.delete(t)),delete this.latestValues[t],this.removeValueFromRenderState(t,this.renderState)}hasValue(t){return this.values.has(t)}getValue(t,r){if(this.props.values&&this.props.values[t])return this.props.values[t];let o=this.values.get(t);return o===void 0&&r!==void 0&&(o=us(r===null?void 0:r,{owner:this}),this.addValue(t,o)),o}readValue(t,r){let o=this.latestValues[t]!==void 0||!this.current?this.latestValues[t]:this.getBaseTargetFromProps(this.props,t)??this.readValueFromInstance(this.current,t,this.options);return o!=null&&(typeof o=="string"&&(fy(o)||my(o))?o=parseFloat(o):!q9(o)&&Lo.test(r)&&(o=OP(t,r)),this.setBaseTarget(t,cr(o)?o.get():o)),cr(o)?o.get():o}setBaseTarget(t,r){this.baseTarget[t]=r}getBaseTarget(t){let{initial:r}=this.props,o;if(typeof r=="string"||typeof r=="object"){let a=$f(this.props,r,this.presenceContext?.custom);a&&(o=a[t])}if(r&&o!==void 0)return o;let n=this.getBaseTargetFromProps(this.props,t);return n!==void 0&&!cr(n)?n:this.initialValues[t]!==void 0&&o===void 0?void 0:this.baseTarget[t]}on(t,r){return this.events[t]||(this.events[t]=new Yl),this.events[t].add(r)}notify(t,...r){this.events[t]&&this.events[t].notify(...r)}scheduleRenderMicrotask(){Xf.render(this.render)}};var nk=class extends Vy{constructor(){super(...arguments),this.KeyframeResolver=EP}sortInstanceNodePosition(t,r){return t.compareDocumentPosition(r)&2?1:-1}getBaseTargetFromProps(t,r){let o=t.style;return o?o[r]:void 0}removeValueFromRenderState(t,{vars:r,style:o}){delete r[t],delete o[t]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:t}=this.props;cr(t)&&(this.childSubscription=t.on("change",r=>{this.current&&(this.current.textContent=`${r}`)}))}};var Ro=class{constructor(t){this.isMounted=!1,this.node=t}update(){}};function Wy({top:e,left:t,right:r,bottom:o}){return{x:{min:t,max:r},y:{min:e,max:o}}}function nF({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function aF(e,t){if(!t)return e;let r=t({x:e.left,y:e.top}),o=t({x:e.right,y:e.bottom});return{top:r.y,left:r.x,bottom:o.y,right:o.x}}function iF(e){return e===void 0||e===1}function qP({scale:e,scaleX:t,scaleY:r}){return!iF(e)||!iF(t)||!iF(r)}function eu(e){return qP(e)||sF(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function sF(e){return Y9(e.x)||Y9(e.y)}function Y9(e){return e&&e!=="0%"}function Gy(e,t,r){let o=e-r,n=t*o;return r+n}function Z9(e,t,r,o,n){return n!==void 0&&(e=Gy(e,n,o)),Gy(e,r,o)+t}function lF(e,t=0,r=1,o,n){e.min=Z9(e.min,t,r,o,n),e.max=Z9(e.max,t,r,o,n)}function uF(e,{x:t,y:r}){lF(e.x,t.translate,t.scale,t.originPoint),lF(e.y,r.translate,r.scale,r.originPoint)}var X9=.999999999999,J9=1.0000000000001;function t$(e,t,r,o=!1){let n=r.length;if(!n)return;t.x=t.y=1;let a,i;for(let s=0;s<n;s++){a=r[s],i=a.projectionDelta;let{visualElement:l}=a.options;l&&l.props.style&&l.props.style.display==="contents"||(o&&a.options.layoutScroll&&a.scroll&&a!==a.root&&(xi(e.x,-a.scroll.offset.x),xi(e.y,-a.scroll.offset.y)),i&&(t.x*=i.x.scale,t.y*=i.y.scale,uF(e,i)),o&&eu(a.latestValues)&&jy(e,a.latestValues,a.layout?.layoutBox))}t.x<J9&&t.x>X9&&(t.x=1),t.y<J9&&t.y>X9&&(t.y=1)}function xi(e,t){e.min+=t,e.max+=t}function Q9(e,t,r,o,n=.5){let a=bt(e.min,e.max,n);lF(e,t,r,a,o)}function e$(e,t){return typeof e=="string"?parseFloat(e)/100*(t.max-t.min):e}function jy(e,t,r){let o=r??e;Q9(e.x,e$(t.x,o.x),t.scaleX,t.scale,t.originX),Q9(e.y,e$(t.y,o.y),t.scaleY,t.scale,t.originY)}function HP(e,t){return Wy(aF(e.getBoundingClientRect(),t))}function dF(e,t,r){let o=HP(e,r),{scroll:n}=t;return n&&(xi(o.x,n.offset.x),xi(o.y,n.offset.y)),o}var nSe={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},aSe=el.length;function r$(e,t,r){let o="",n=!0;for(let i=0;i<aSe;i++){let s=el[i],l=e[s];if(l===void 0)continue;let u=!0;if(typeof l=="number")u=l===(s.startsWith("scale")?1:0);else{let d=parseFloat(l);u=s.startsWith("scale")?d===1:d===0}if(!u||r){let d=Ey(l,Yf[s]);if(!u){n=!1;let c=nSe[s]||s;o+=`${c}(${d}) `}r&&(t[s]=d)}}let a=e.pathRotation;return a&&(n=!1,o+=`rotate(${Ey(a,Yf.pathRotation)}) `),o=o.trim(),r?o=r(t,n?"":o):n&&(o="none"),o}function ep(e,t,r){let{style:o,vars:n,transformOrigin:a}=e,i=!1,s=!1;for(let l in t){let u=t[l];if(vi.has(l)){i=!0;continue}else if(lP(l)){n[l]=u;continue}else{let d=Ey(u,Yf[l]);l.startsWith("origin")?(s=!0,a[l]=d):o[l]=d}}if(t.transform||(i||r?o.transform=r$(t,e.transform,r):o.transform&&(o.transform="none")),s){let{originX:l="50%",originY:u="50%",originZ:d=0}=a;o.transformOrigin=`${l} ${u} ${d}`}}function KP(e,{style:t,vars:r},o,n){let a=e.style,i;for(i in t)a[i]=t[i];n?.applyProjectionStyles(a,o);for(i in r)a.setProperty(i,r[i])}function o$(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}var ak={correct:(e,t)=>{if(!t.target)return e;if(typeof e=="string")if(He.test(e))e=parseFloat(e);else return e;let r=o$(e,t.target.x),o=o$(e,t.target.y);return`${r}% ${o}%`}};var n$={correct:(e,{treeScale:t,projectionDelta:r})=>{let o=e,n=Lo.parse(e);if(n.length>5)return o;let a=Lo.createTransformer(e),i=typeof n[0]!="number"?1:0,s=r.x.scale*t.x,l=r.y.scale*t.y;n[0+i]/=s,n[1+i]/=l;let u=bt(s,l,.5);return typeof n[2+i]=="number"&&(n[2+i]/=u),typeof n[3+i]=="number"&&(n[3+i]/=u),a(n)}};var zy={borderRadius:{...ak,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ak,borderTopRightRadius:ak,borderBottomLeftRadius:ak,borderBottomRightRadius:ak,boxShadow:n$};function qy(e,{layout:t,layoutId:r}){return vi.has(e)||e.startsWith("origin")||(t||r!==void 0)&&(!!zy[e]||e==="opacity")}function tp(e,t,r){let o=e.style,n=t?.style,a={};if(!o)return a;for(let i in o)(cr(o[i])||n&&cr(n[i])||qy(i,e)||r?.getValue(i)?.liveStyle!==void 0)&&(a[i]=o[i]);return a}function iSe(e){return window.getComputedStyle(e)}var Hy=class extends nk{constructor(){super(...arguments),this.type="html",this.renderInstance=KP}readValueFromInstance(t,r){if(vi.has(r))return this.projection?.isProjecting?MP(r):u9(t,r);{let o=iSe(t),n=(lP(r)?o.getPropertyValue(r):o[r])||0;return typeof n=="string"?n.trim():n}}measureInstanceViewportBox(t,{transformPagePoint:r}){return HP(t,r)}build(t,r,o){ep(t,r,o.transformTemplate)}scrapeMotionValuesFromProps(t,r,o){return tp(t,r,o)}};var sSe={offset:"stroke-dashoffset",array:"stroke-dasharray"},lSe={offset:"strokeDashoffset",array:"strokeDasharray"};function a$(e,t,r=1,o=0,n=!0){e.pathLength=1;let a=n?sSe:lSe;e[a.offset]=`${-o}`,e[a.array]=`${t} ${r}`}var uSe=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function Ky(e,{attrX:t,attrY:r,attrScale:o,pathLength:n,pathSpacing:a=1,pathOffset:i=0,...s},l,u,d){if(ep(e,s,u),l){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:c,style:f}=e;c.transform&&(f.transform=c.transform,delete c.transform),(f.transform||c.transformOrigin)&&(f.transformOrigin=c.transformOrigin??"50% 50%",delete c.transformOrigin),f.transform&&(f.transformBox=d?.transformBox??"fill-box",delete c.transformBox);for(let p of uSe)c[p]!==void 0&&(f[p]=c[p],delete c[p]);t!==void 0&&(c.x=t),r!==void 0&&(c.y=r),o!==void 0&&(c.scale=o),n!==void 0&&a$(c,n,a,i,!1)}var $P=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);var $y=e=>typeof e=="string"&&e.toLowerCase()==="svg";function i$(e,t,r,o){KP(e,t,void 0,o);for(let n in t.attrs)e.setAttribute($P.has(n)?n:ek(n),t.attrs[n])}function Yy(e,t,r){let o=tp(e,t,r);for(let n in e)if(cr(e[n])||cr(t[n])){let a=el.indexOf(n)!==-1?"attr"+n.charAt(0).toUpperCase()+n.substring(1):n;o[a]=e[n]}return o}var Zy=class extends nk{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=Fr}getBaseTargetFromProps(t,r){return t[r]}readValueFromInstance(t,r){if(vi.has(r)){let o=TP(r);return o&&o.default||0}return r=$P.has(r)?r:ek(r),t.getAttribute(r)}scrapeMotionValuesFromProps(t,r,o){return Yy(t,r,o)}build(t,r,o){Ky(t,r,this.isSVGTag,o.transformTemplate,o.style)}renderInstance(t,r,o,n){i$(t,r,o,n)}mount(t){this.isSVGTag=$y(t.tagName),super.mount(t)}};var dSe=_y.length;function cF(e){if(!e)return;if(!e.isControllingVariants){let r=e.parent?cF(e.parent)||{}:{};return e.props.initial!==void 0&&(r.initial=e.props.initial),r}let t={};for(let r=0;r<dSe;r++){let o=_y[r],n=e.props[o];(tl(n)||n===!1)&&(t[o]=n)}return t}function fF(e,t){if(!Array.isArray(t))return!1;let r=t.length;if(r!==e.length)return!1;for(let o=0;o<r;o++)if(t[o]!==e[o])return!1;return!0}var cSe=[...jP].reverse(),fSe=jP.length;function pSe(e){return t=>Promise.all(t.map(({animation:r,options:o})=>N9(e,r,o)))}function pF(e){let t=pSe(e),r=s$(),o=!0,n=!1,a=u=>(d,c)=>{let f=La(e,c,u==="exit"?e.presenceContext?.custom:void 0);if(f){let{transition:p,transitionEnd:g,...m}=f;d={...d,...m,...g}}return d};function i(u){t=u(e)}function s(u){let{props:d}=e,c=cF(e.parent)||{},f=[],p=new Set,g={},m=1/0;for(let k=0;k<fSe;k++){let M=cSe[k],v=r[M],b=d[M]!==void 0?d[M]:c[M],w=tl(b),P=M===u?v.isActive:null;P===!1&&(m=k);let L=b===c[M]&&b!==d[M]&&w;if(L&&(o||n)&&e.manuallyAnimateOnMount&&(L=!1),v.protectedKeys={...g},!v.isActive&&P===null||!b&&!v.prevProp||Ql(b)||typeof b=="boolean")continue;if(M==="exit"&&v.isActive&&P!==!0){v.prevResolvedValues&&(g={...g,...v.prevResolvedValues});continue}let C=l$(v.prevProp,b),F=C||M===u&&v.isActive&&!L&&w||k>m&&w,T=!1,G=Array.isArray(b)?b:[b],$=G.reduce(a(M),{});P===!1&&($={});let{prevResolvedValues:oe={}}=v,se={...oe,...$},pe=U=>{F=!0,p.has(U)&&(T=!0,p.delete(U)),v.needsAnimating[U]=!0;let E=e.getValue(U);E&&(E.liveStyle=!1)};for(let U in se){let E=$[U],_=oe[U];if(g.hasOwnProperty(U))continue;let B=!1;Ry(E)&&Ry(_)?B=!fF(E,_)||C:B=E!==_,B?E!=null?pe(U):p.add(U):E!==void 0&&p.has(U)?pe(U):v.protectedKeys[U]=!0}v.prevProp=b,v.prevResolvedValues=$,v.isActive&&(g={...g,...$}),(o||n)&&e.blockInitialAnimation&&(F=!1);let N=L&&C;F&&(!N||T)&&f.push(...G.map(U=>{let E={type:M};if(typeof U=="string"&&(o||n)&&!N&&e.manuallyAnimateOnMount&&e.parent){let{parent:_}=e,B=La(_,U);if(_.enteringChildren&&B){let{delayChildren:j}=B.transition||{};E.delay=PP(_.enteringChildren,e,j)}}return{animation:U,options:E}}))}if(p.size){let k={};if(typeof d.initial!="boolean"){let M=La(e,Array.isArray(d.initial)?d.initial[0]:d.initial);M&&M.transition&&(k.transition=M.transition)}p.forEach(M=>{let v=e.getBaseTarget(M),b=e.getValue(M);b&&(b.liveStyle=!0),k[M]=v??null}),f.push({animation:k})}let h=!!f.length;return o&&(d.initial===!1||d.initial===d.animate)&&!e.manuallyAnimateOnMount&&(h=!1),o=!1,n=!1,h?t(f):Promise.resolve()}function l(u,d){if(r[u].isActive===d)return Promise.resolve();e.variantChildren?.forEach(f=>f.animationState?.setActive(u,d)),r[u].isActive=d;let c=s(u);for(let f in r)r[f].protectedKeys={};return c}return{animateChanges:s,setActive:l,setAnimateFunction:i,getState:()=>r,reset:()=>{r=s$(),n=!0}}}function l$(e,t){return typeof t=="string"?t!==e:Array.isArray(t)?!fF(t,e):!1}function rp(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function s$(){return{animate:rp(!0),whileInView:rp(),whileHover:rp(),whileTap:rp(),whileDrag:rp(),whileFocus:rp(),exit:rp()}}function YP(e,t){e.min=t.min,e.max=t.max}function bi(e,t){YP(e.x,t.x),YP(e.y,t.y)}function mF(e,t){e.translate=t.translate,e.scale=t.scale,e.originPoint=t.originPoint,e.origin=t.origin}var u$=1e-4,mSe=1-u$,gSe=1+u$,d$=.01,kSe=0-d$,MSe=0+d$;function bo(e){return e.max-e.min}function hF(e,t,r){return Math.abs(e-t)<=r}function gF(e,t,r,o=.5){e.origin=o,e.originPoint=bt(t.min,t.max,e.origin),e.scale=bo(r)/bo(t),e.translate=bt(r.min,r.max,e.origin)-e.originPoint,(e.scale>=mSe&&e.scale<=gSe||isNaN(e.scale))&&(e.scale=1),(e.translate>=kSe&&e.translate<=MSe||isNaN(e.translate))&&(e.translate=0)}function op(e,t,r,o){gF(e.x,t.x,r.x,o?o.originX:void 0),gF(e.y,t.y,r.y,o?o.originY:void 0)}function kF(e,t,r,o=0){let n=o?bt(r.min,r.max,o):r.min;e.min=n+t.min,e.max=e.min+bo(t)}function vF(e,t,r,o){kF(e.x,t.x,r.x,o?.x),kF(e.y,t.y,r.y,o?.y)}function MF(e,t,r,o=0){let n=o?bt(r.min,r.max,o):r.min;e.min=t.min-n,e.max=e.min+bo(t)}function ik(e,t,r,o){MF(e.x,t.x,r.x,o?.x),MF(e.y,t.y,r.y,o?.y)}function c$(e,t,r,o,n){return e-=t,e=Gy(e,1/r,o),n!==void 0&&(e=Gy(e,1/n,o)),e}function hSe(e,t=0,r=1,o=.5,n,a=e,i=e){if(Cn.test(t)&&(t=parseFloat(t),t=bt(i.min,i.max,t/100)-i.min),typeof t!="number")return;let s=bt(a.min,a.max,o);e===a&&(s-=t),e.min=c$(e.min,t,r,s,n),e.max=c$(e.max,t,r,s,n)}function f$(e,t,[r,o,n],a,i){hSe(e,t[r],t[o],t[n],t.scale,a,i)}var vSe=["x","scaleX","originX"],ySe=["y","scaleY","originY"];function yF(e,t,r,o){f$(e.x,t,vSe,r?r.x:void 0,o?o.x:void 0),f$(e.y,t,ySe,r?r.y:void 0,o?o.y:void 0)}function p$(e){return e.translate===0&&e.scale===1}function xF(e){return p$(e.x)&&p$(e.y)}function m$(e,t){return e.min===t.min&&e.max===t.max}function k$(e,t){return m$(e.x,t.x)&&m$(e.y,t.y)}function g$(e,t){return Math.round(e.min)===Math.round(t.min)&&Math.round(e.max)===Math.round(t.max)}function bF(e,t){return g$(e.x,t.x)&&g$(e.y,t.y)}function wF(e){return bo(e.x)/bo(e.y)}function CF(e,t){return e.translate===t.translate&&e.scale===t.scale&&e.originPoint===t.originPoint}function Ra(e){return[e("x"),e("y")]}function M$(e,t,r){let o="",n=e.x.translate/t.x,a=e.y.translate/t.y,i=r?.z||0;if((n||a||i)&&(o=`translate3d(${n}px, ${a}px, ${i}px) `),(t.x!==1||t.y!==1)&&(o+=`scale(${1/t.x}, ${1/t.y}) `),r){let{transformPerspective:u,rotate:d,pathRotation:c,rotateX:f,rotateY:p,skewX:g,skewY:m}=r;u&&(o=`perspective(${u}px) ${o}`),d&&(o+=`rotate(${d}deg) `),c&&(o+=`rotate(${c}deg) `),f&&(o+=`rotateX(${f}deg) `),p&&(o+=`rotateY(${p}deg) `),g&&(o+=`skewX(${g}deg) `),m&&(o+=`skewY(${m}deg) `)}let s=e.x.scale*t.x,l=e.y.scale*t.y;return(s!==1||l!==1)&&(o+=`scale(${s}, ${l})`),o||"none"}var x$=["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"],xSe=x$.length,h$=e=>typeof e=="string"?parseFloat(e):e,v$=e=>typeof e=="number"||He.test(e);function b$(e,t,r,o,n,a){n?(e.opacity=bt(0,r.opacity??1,bSe(o)),e.opacityExit=bt(t.opacity??1,0,wSe(o))):a&&(e.opacity=bt(t.opacity??1,r.opacity??1,o));for(let i=0;i<xSe;i++){let s=x$[i],l=y$(t,s),u=y$(r,s);if(l===void 0&&u===void 0)continue;l||(l=0),u||(u=0),l===0||u===0||v$(l)===v$(u)?(e[s]=Math.max(bt(h$(l),h$(u),o),0),(Cn.test(u)||Cn.test(l))&&(e[s]+="%")):e[s]=u}(t.rotate||r.rotate)&&(e.rotate=bt(t.rotate||0,r.rotate||0,o))}function y$(e,t){return e[t]!==void 0?e[t]:e.borderRadius}var bSe=w$(0,.5,yy),wSe=w$(.5,.95,Yr);function w$(e,t,r){return o=>o<e?0:o>t?1:r(Zs(e,t,o))}function C$(e,t,r){let o=cr(e)?e:us(e);return o.start(Kf("",o,t,r)),o.animation}function rl(e,t,r,o={passive:!0}){return e.addEventListener(t,r,o),()=>e.removeEventListener(t,r)}var S$=(e,t)=>e.depth-t.depth;var ZP=class{constructor(){this.children=[],this.isDirty=!1}add(t){Gf(this.children,t),this.isDirty=!0}remove(t){Ad(this.children,t),this.isDirty=!0}forEach(t){this.isDirty&&this.children.sort(S$),this.isDirty=!1,this.children.forEach(t)}};function P$(e,t){let r=Zr.now(),o=({timestamp:n})=>{let a=n-r;a>=t&&(aa(o),e(a-t))};return ht.setup(o,!0),()=>aa(o)}function np(e){return cr(e)?e.get():e}var XP=class{constructor(){this.members=[]}add(t){Gf(this.members,t);for(let r=this.members.length-1;r>=0;r--){let o=this.members[r];if(o===t||o===this.lead||o===this.prevLead)continue;let n=o.instance;(!n||n.isConnected===!1)&&!o.snapshot&&(Ad(this.members,o),o.unmount())}t.scheduleRender()}remove(t){if(Ad(this.members,t),t===this.prevLead&&(this.prevLead=void 0),t===this.lead){let r=this.members[this.members.length-1];r&&this.promote(r)}}relegate(t){for(let r=this.members.indexOf(t)-1;r>=0;r--){let o=this.members[r];if(o.isPresent!==!1&&o.instance?.isConnected!==!1)return this.promote(o),!0}return!1}promote(t,r){let o=this.lead;if(t!==o&&(this.prevLead=o,this.lead=t,t.show(),o)){o.updateSnapshot(),t.scheduleRender();let{layoutDependency:n}=o.options,{layoutDependency:a}=t.options;(n===void 0||n!==a)&&(t.resumeFrom=o,r&&(o.preserveOpacity=!0),o.snapshot&&(t.snapshot=o.snapshot,t.snapshot.latestValues=o.animationValues||o.latestValues),t.root?.isUpdating&&(t.isLayoutDirty=!0)),t.options.crossfade===!1&&o.hide()}}exitAnimationComplete(){this.members.forEach(t=>{t.options.onExitComplete?.(),t.resumingFrom?.options.onExitComplete?.()})}scheduleRender(){this.members.forEach(t=>t.instance&&t.scheduleRender(!1))}removeLeadSnapshot(){this.lead?.snapshot&&(this.lead.snapshot=void 0)}};var ap={hasAnimatedSinceResize:!0,hasEverUpdated:!1};var ip={nodes:0,calculatedTargetDeltas:0,calculatedProjections:0},SF=["","X","Y","Z"],CSe=1e3,SSe=0;function PF(e,t,r,o){let{latestValues:n}=t;n[e]&&(r[e]=n[e],t.setStaticValue(e,0),o&&(o[e]=0))}function E$(e){if(e.hasCheckedOptimisedAppear=!0,e.root===e)return;let{visualElement:t}=e.options;if(!t)return;let r=DP(t);if(window.MotionHasOptimisedAnimation(r,"transform")){let{layout:n,layoutId:a}=e.options;window.MotionCancelOptimisedAnimation(r,"transform",ht,!(n||a))}let{parent:o}=e;o&&!o.hasCheckedOptimisedAppear&&E$(o)}function JP({attachResizeListener:e,defaultParent:t,measureScroll:r,checkIsScrollRoot:o,resetTransform:n}){return class{constructor(i={},s=t?.()){this.id=SSe++,this.animationId=0,this.animationCommitId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.hasCheckedOptimisedAppear=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.layoutVersion=0,this.updateScheduled=!1,this.scheduleUpdate=()=>this.update(),this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Da.value&&(ip.nodes=ip.calculatedTargetDeltas=ip.calculatedProjections=0),this.nodes.forEach(ISe),this.nodes.forEach(OSe),this.nodes.forEach(ESe),this.nodes.forEach(DSe),Da.addProjectionMetrics&&Da.addProjectionMetrics(ip)},this.resolvedRelativeTargetAt=0,this.linkedParentVersion=0,this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=i,this.root=s?s.root||s:this,this.path=s?[...s.path,s]:[],this.parent=s,this.depth=s?s.depth+1:0;for(let l=0;l<this.path.length;l++)this.path[l].shouldResetTransform=!0;this.root===this&&(this.nodes=new ZP)}addEventListener(i,s){return this.eventHandlers.has(i)||this.eventHandlers.set(i,new Yl),this.eventHandlers.get(i).add(s)}notifyListeners(i,...s){let l=this.eventHandlers.get(i);l&&l.notify(...s)}hasListeners(i){return this.eventHandlers.has(i)}mount(i){if(this.instance)return;this.isSVG=rk(i)&&!z9(i),this.instance=i;let{layoutId:s,layout:l,visualElement:u}=this.options;if(u&&!u.current&&u.mount(i),this.root.nodes.add(this),this.parent&&this.parent.children.add(this),this.root.hasTreeAnimated&&(l||s)&&(this.isLayoutDirty=!0),e){let d,c=0,f=()=>this.root.updateBlockedByResize=!1;ht.read(()=>{c=window.innerWidth}),e(i,()=>{let p=window.innerWidth;p!==c&&(c=p,this.root.updateBlockedByResize=!0,d&&d(),d=P$(f,250),ap.hasAnimatedSinceResize&&(ap.hasAnimatedSinceResize=!1,this.nodes.forEach(D$)))})}s&&this.root.registerSharedNode(s,this),this.options.animate!==!1&&u&&(s||l)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:c,hasRelativeLayoutChanged:f,layout:p})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}let g=this.options.transition||u.getDefaultTransition()||USe,{onLayoutAnimationStart:m,onLayoutAnimationComplete:h}=u.getProps(),k=!this.targetLayout||!bF(this.targetLayout,p),M=!c&&f;if(this.options.layoutRoot||this.resumeFrom||M||c&&(k||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0);let v={...Jg(g,"layout"),onPlay:m,onComplete:h};(u.shouldReduceMotion||this.options.layoutRoot)&&(v.delay=0,v.type=!1),this.startAnimation(v),this.setAnimationOrigin(d,M,v.path)}else c||D$(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=p})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);let i=this.getStack();i&&i.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,this.eventHandlers.clear(),aa(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(_Se),this.animationId++)}getTransformTemplate(){let{visualElement:i}=this.options;return i&&i.getProps().transformTemplate}willUpdate(i=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(window.MotionCancelOptimisedAnimation&&!this.hasCheckedOptimisedAppear&&E$(this),!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let d=0;d<this.path.length;d++){let c=this.path[d];c.shouldResetTransform=!0,(typeof c.latestValues.x=="string"||typeof c.latestValues.y=="string")&&(c.isLayoutDirty=!0),c.updateScroll("snapshot"),c.options.layoutRoot&&c.willUpdate(!1)}let{layoutId:s,layout:l}=this.options;if(s===void 0&&!l)return;let u=this.getTransformTemplate();this.prevTransformTemplateValue=u?u(this.latestValues,""):void 0,this.updateSnapshot(),i&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked()){let l=this.updateBlockedByResize;this.unblockUpdate(),this.updateBlockedByResize=!1,this.clearAllSnapshots(),l&&this.nodes.forEach(RSe),this.nodes.forEach(A$);return}if(this.animationId<=this.animationCommitId){this.nodes.forEach(I$);return}this.animationCommitId=this.animationId,this.isUpdating?(this.isUpdating=!1,this.nodes.forEach(NSe),this.nodes.forEach(TSe),this.nodes.forEach(PSe),this.nodes.forEach(ASe)):this.nodes.forEach(I$),this.clearAllSnapshots();let s=Zr.now();ro.delta=Do(0,1e3/60,s-ro.timestamp),ro.timestamp=s,ro.isProcessing=!0,Sy.update.process(ro),Sy.preRender.process(ro),Sy.render.process(ro),ro.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,Xf.read(this.scheduleUpdate))}clearAllSnapshots(){this.nodes.forEach(LSe),this.sharedNodes.forEach(FSe)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,ht.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){ht.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure(),this.snapshot&&!bo(this.snapshot.measuredBox.x)&&!bo(this.snapshot.measuredBox.y)&&(this.snapshot=void 0))}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l<this.path.length;l++)this.path[l].updateScroll();let i=this.layout;this.layout=this.measure(!1),this.layoutVersion++,this.layoutCorrected||(this.layoutCorrected=Fr()),this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);let{visualElement:s}=this.options;s&&s.notify("LayoutMeasure",this.layout.layoutBox,i?i.layoutBox:void 0)}updateScroll(i="measure"){let s=!!(this.options.layoutScroll&&this.instance);if(this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===i&&(s=!1),s&&this.instance){let l=o(this.instance);this.scroll={animationId:this.root.animationId,phase:i,isRoot:l,offset:r(this.instance),wasRoot:this.scroll?this.scroll.isRoot:l}}}resetTransform(){if(!n)return;let i=this.isLayoutDirty||this.shouldResetTransform||this.options.alwaysMeasureLayout,s=this.projectionDelta&&!xF(this.projectionDelta),l=this.getTransformTemplate(),u=l?l(this.latestValues,""):void 0,d=u!==this.prevTransformTemplateValue;i&&this.instance&&(s||eu(this.latestValues)||d)&&(n(this.instance,u),this.shouldResetTransform=!1,this.scheduleRender())}measure(i=!0){let s=this.measurePageBox(),l=this.removeElementScroll(s);return i&&(l=this.removeTransform(l)),WSe(l),{animationId:this.root.animationId,measuredBox:s,layoutBox:l,latestValues:{},source:this.id}}measurePageBox(){let{visualElement:i}=this.options;if(!i)return Fr();let s=i.measureViewportBox();if(!(this.scroll?.wasRoot||this.path.some(GSe))){let{scroll:u}=this.root;u&&(xi(s.x,u.offset.x),xi(s.y,u.offset.y))}return s}removeElementScroll(i){let s=Fr();if(bi(s,i),this.scroll?.wasRoot)return s;for(let l=0;l<this.path.length;l++){let u=this.path[l],{scroll:d,options:c}=u;u!==this.root&&d&&c.layoutScroll&&(d.wasRoot&&bi(s,i),xi(s.x,d.offset.x),xi(s.y,d.offset.y))}return s}applyTransform(i,s=!1,l){let u=l||Fr();bi(u,i);for(let d=0;d<this.path.length;d++){let c=this.path[d];!s&&c.options.layoutScroll&&c.scroll&&c!==c.root&&(xi(u.x,-c.scroll.offset.x),xi(u.y,-c.scroll.offset.y)),eu(c.latestValues)&&jy(u,c.latestValues,c.layout?.layoutBox)}return eu(this.latestValues)&&jy(u,this.latestValues,this.layout?.layoutBox),u}removeTransform(i){let s=Fr();bi(s,i);for(let l=0;l<this.path.length;l++){let u=this.path[l];if(!eu(u.latestValues))continue;let d;u.instance&&(qP(u.latestValues)&&u.updateSnapshot(),d=Fr(),bi(d,u.measurePageBox())),yF(s,u.latestValues,u.snapshot?.layoutBox,d)}return eu(this.latestValues)&&yF(s,this.latestValues),s}setTargetDelta(i){this.targetDelta=i,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(i){this.options={...this.options,...i,crossfade:i.crossfade!==void 0?i.crossfade:!0}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==ro.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(i=!1){let s=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=s.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=s.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=s.isSharedProjectionDirty);let l=!!this.resumingFrom||this!==s;if(!(i||l&&this.isSharedProjectionDirty||this.isProjectionDirty||this.parent?.isProjectionDirty||this.attemptToResolveRelativeTarget||this.root.updateBlockedByResize))return;let{layout:d,layoutId:c}=this.options;if(!this.layout||!(d||c))return;this.resolvedRelativeTargetAt=ro.timestamp;let f=this.getClosestProjectingParent();f&&this.linkedParentVersion!==f.layoutVersion&&!f.options.layoutRoot&&this.removeRelativeTarget(),!this.targetDelta&&!this.relativeTarget&&(this.options.layoutAnchor!==!1&&f&&f.layout?this.createRelativeTarget(f,this.layout.layoutBox,f.layout.layoutBox):this.removeRelativeTarget()),!(!this.relativeTarget&&!this.targetDelta)&&(this.target||(this.target=Fr(),this.targetWithTransforms=Fr()),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),vF(this.target,this.relativeTarget,this.relativeParent.target,this.options.layoutAnchor||void 0)):this.targetDelta?(this.resumingFrom?this.applyTransform(this.layout.layoutBox,!1,this.target):bi(this.target,this.layout.layoutBox),uF(this.target,this.targetDelta)):bi(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget&&(this.attemptToResolveRelativeTarget=!1,this.options.layoutAnchor!==!1&&f&&!!f.resumingFrom==!!this.resumingFrom&&!f.options.layoutScroll&&f.target&&this.animationProgress!==1?this.createRelativeTarget(f,this.target,f.target):this.relativeParent=this.relativeTarget=void 0),Da.value&&ip.calculatedTargetDeltas++)}getClosestProjectingParent(){if(!(!this.parent||qP(this.parent.latestValues)||sF(this.parent.latestValues)))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return!!((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}createRelativeTarget(i,s,l){this.relativeParent=i,this.linkedParentVersion=i.layoutVersion,this.forceRelativeParentToResolveTarget(),this.relativeTarget=Fr(),this.relativeTargetOrigin=Fr(),ik(this.relativeTargetOrigin,s,l,this.options.layoutAnchor||void 0),bi(this.relativeTarget,this.relativeTargetOrigin)}removeRelativeTarget(){this.relativeParent=this.relativeTarget=void 0}calcProjection(){let i=this.getLead(),s=!!this.resumingFrom||this!==i,l=!0;if((this.isProjectionDirty||this.parent?.isProjectionDirty)&&(l=!1),s&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(l=!1),this.resolvedRelativeTargetAt===ro.timestamp&&(l=!1),l)return;let{layout:u,layoutId:d}=this.options;if(this.isTreeAnimating=!!(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!(u||d))return;bi(this.layoutCorrected,this.layout.layoutBox);let c=this.treeScale.x,f=this.treeScale.y;t$(this.layoutCorrected,this.treeScale,this.path,s),i.layout&&!i.target&&(this.treeScale.x!==1||this.treeScale.y!==1)&&(i.target=i.layout.layoutBox,i.targetWithTransforms=Fr());let{target:p}=i;if(!p){this.prevProjectionDelta&&(this.createProjectionDeltas(),this.scheduleRender());return}!this.projectionDelta||!this.prevProjectionDelta?this.createProjectionDeltas():(mF(this.prevProjectionDelta.x,this.projectionDelta.x),mF(this.prevProjectionDelta.y,this.projectionDelta.y)),op(this.projectionDelta,this.layoutCorrected,p,this.latestValues),(this.treeScale.x!==c||this.treeScale.y!==f||!CF(this.projectionDelta.x,this.prevProjectionDelta.x)||!CF(this.projectionDelta.y,this.prevProjectionDelta.y))&&(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",p)),Da.value&&ip.calculatedProjections++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(i=!0){if(this.options.visualElement?.scheduleRender(),i){let s=this.getStack();s&&s.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}createProjectionDeltas(){this.prevProjectionDelta=Ed(),this.projectionDelta=Ed(),this.projectionDeltaWithTransform=Ed()}setAnimationOrigin(i,s=!1,l){let u=this.snapshot,d=u?u.latestValues:{},c={...this.latestValues},f=Ed();(!this.relativeParent||!this.relativeParent.options.layoutRoot)&&(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!s;let p=Fr(),g=u?u.source:void 0,m=this.layout?this.layout.source:void 0,h=g!==m,k=this.getStack(),M=!k||k.members.length<=1,v=!!(h&&!M&&this.options.crossfade===!0&&!this.path.some(VSe));this.animationProgress=0;let b,w=l?.interpolateProjection(i);this.mixTargetDelta=P=>{let L=P/1e3,C=w?.(L);C?(f.x.translate=C.x,f.x.scale=bt(i.x.scale,1,L),f.x.origin=i.x.origin,f.x.originPoint=i.x.originPoint,f.y.translate=C.y,f.y.scale=bt(i.y.scale,1,L),f.y.origin=i.y.origin,f.y.originPoint=i.y.originPoint):(L$(f.x,i.x,L),L$(f.y,i.y,L)),this.setTargetDelta(f),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(ik(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox,this.options.layoutAnchor||void 0),BSe(this.relativeTarget,this.relativeTargetOrigin,p,L),b&&k$(this.relativeTarget,b)&&(this.isProjectionDirty=!1),b||(b=Fr()),bi(b,this.relativeTarget)),h&&(this.animationValues=c,b$(c,d,this.latestValues,L,v,M)),C&&C.rotate!==void 0&&(this.animationValues||(this.animationValues=c),this.animationValues.pathRotation=C.rotate),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=L},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(i){this.notifyListeners("animationStart"),this.currentAnimation?.stop(),this.resumingFrom?.currentAnimation?.stop(),this.pendingAnimation&&(aa(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=ht.update(()=>{ap.hasAnimatedSinceResize=!0,Xs.layout++,this.motionValue||(this.motionValue=us(0)),this.motionValue.jump(0,!1),this.currentAnimation=C$(this.motionValue,[0,1e3],{...i,velocity:0,isSync:!0,onUpdate:s=>{this.mixTargetDelta(s),i.onUpdate&&i.onUpdate(s)},onStop:()=>{Xs.layout--},onComplete:()=>{Xs.layout--,i.onComplete&&i.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);let i=this.getStack();i&&i.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(CSe),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){let i=this.getLead(),{targetWithTransforms:s,target:l,layout:u,latestValues:d}=i;if(!(!s||!l||!u)){if(this!==i&&this.layout&&u&&_$(this.options.animationType,this.layout.layoutBox,u.layoutBox)){l=this.target||Fr();let c=bo(this.layout.layoutBox.x);l.x.min=i.target.x.min,l.x.max=l.x.min+c;let f=bo(this.layout.layoutBox.y);l.y.min=i.target.y.min,l.y.max=l.y.min+f}bi(s,l),jy(s,d),op(this.projectionDeltaWithTransform,this.layoutCorrected,s,d)}}registerSharedNode(i,s){this.sharedNodes.has(i)||this.sharedNodes.set(i,new XP),this.sharedNodes.get(i).add(s);let u=s.options.initialPromotionConfig;s.promote({transition:u?u.transition:void 0,preserveFollowOpacity:u&&u.shouldPreserveFollowOpacity?u.shouldPreserveFollowOpacity(s):void 0})}isLead(){let i=this.getStack();return i?i.lead===this:!0}getLead(){let{layoutId:i}=this.options;return i?this.getStack()?.lead||this:this}getPrevLead(){let{layoutId:i}=this.options;return i?this.getStack()?.prevLead:void 0}getStack(){let{layoutId:i}=this.options;if(i)return this.root.sharedNodes.get(i)}promote({needsReset:i,transition:s,preserveFollowOpacity:l}={}){let u=this.getStack();u&&u.promote(this,l),i&&(this.projectionDelta=void 0,this.needsReset=!0),s&&this.setOptions({transition:s})}relegate(){let i=this.getStack();return i?i.relegate(this):!1}resetSkewAndRotation(){let{visualElement:i}=this.options;if(!i)return;let s=!1,{latestValues:l}=i;if((l.z||l.rotate||l.rotateX||l.rotateY||l.rotateZ||l.skewX||l.skewY)&&(s=!0),!s)return;let u={};l.z&&PF("z",i,u,this.animationValues);for(let d=0;d<SF.length;d++)PF(`rotate${SF[d]}`,i,u,this.animationValues),PF(`skew${SF[d]}`,i,u,this.animationValues);i.render();for(let d in u)i.setStaticValue(d,u[d]),this.animationValues&&(this.animationValues[d]=u[d]);i.scheduleRender()}applyProjectionStyles(i,s){if(!this.instance||this.isSVG)return;if(!this.isVisible){i.visibility="hidden";return}let l=this.getTransformTemplate();if(this.needsReset){this.needsReset=!1,i.visibility="",i.opacity="",i.pointerEvents=np(s?.pointerEvents)||"",i.transform=l?l(this.latestValues,""):"none";return}let u=this.getLead();if(!this.projectionDelta||!this.layout||!u.target){this.options.layoutId&&(i.opacity=this.latestValues.opacity!==void 0?this.latestValues.opacity:1,i.pointerEvents=np(s?.pointerEvents)||""),this.hasProjected&&!eu(this.latestValues)&&(i.transform=l?l({},""):"none",this.hasProjected=!1);return}i.visibility="";let d=u.animationValues||u.latestValues;this.applyTransformsToTarget();let c=M$(this.projectionDeltaWithTransform,this.treeScale,d);l&&(c=l(d,c)),i.transform=c;let{x:f,y:p}=this.projectionDelta;i.transformOrigin=`${f.origin*100}% ${p.origin*100}% 0`,u.animationValues?i.opacity=u===this?d.opacity??this.latestValues.opacity??1:this.preserveOpacity?this.latestValues.opacity:d.opacityExit:i.opacity=u===this?d.opacity!==void 0?d.opacity:"":d.opacityExit!==void 0?d.opacityExit:0;for(let g in zy){if(d[g]===void 0)continue;let{correct:m,applyTo:h,isCSSVariable:k}=zy[g],M=c==="none"?d[g]:m(d[g],u);if(h){let v=h.length;for(let b=0;b<v;b++)i[h[b]]=M}else k?this.options.visualElement.renderState.vars[g]=M:i[g]=M}this.options.layoutId&&(i.pointerEvents=u===this?np(s?.pointerEvents)||"":"none")}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach(i=>i.currentAnimation?.stop()),this.root.nodes.forEach(A$),this.root.sharedNodes.clear()}}}function PSe(e){e.updateLayout()}function ASe(e){let t=e.resumeFrom?.snapshot||e.snapshot;if(e.isLead()&&e.layout&&t&&e.hasListeners("didUpdate")){let{layoutBox:r,measuredBox:o}=e.layout,{animationType:n}=e.options,a=t.source!==e.layout.source;if(n==="size")Ra(d=>{let c=a?t.measuredBox[d]:t.layoutBox[d],f=bo(c);c.min=r[d].min,c.max=c.min+f});else if(n==="x"||n==="y"){let d=n==="x"?"y":"x";YP(a?t.measuredBox[d]:t.layoutBox[d],r[d])}else _$(n,t.layoutBox,r)&&Ra(d=>{let c=a?t.measuredBox[d]:t.layoutBox[d],f=bo(r[d]);c.max=c.min+f,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[d].max=e.relativeTarget[d].min+f)});let i=Ed();op(i,r,t.layoutBox);let s=Ed();a?op(s,e.applyTransform(o,!0),t.measuredBox):op(s,r,t.layoutBox);let l=!xF(i),u=!1;if(!e.resumeFrom){let d=e.getClosestProjectingParent();if(d&&!d.resumeFrom){let{snapshot:c,layout:f}=d;if(c&&f){let p=e.options.layoutAnchor||void 0,g=Fr();ik(g,t.layoutBox,c.layoutBox,p);let m=Fr();ik(m,r,f.layoutBox,p),bF(g,m)||(u=!0),d.options.layoutRoot&&(e.relativeTarget=m,e.relativeTargetOrigin=g,e.relativeParent=d)}}}e.notifyListeners("didUpdate",{layout:r,snapshot:t,delta:s,layoutDelta:i,hasLayoutChanged:l,hasRelativeLayoutChanged:u})}else if(e.isLead()){let{onExitComplete:r}=e.options;r&&r()}e.options.transition=void 0}function ISe(e){Da.value&&ip.nodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=!!(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function DSe(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function LSe(e){e.clearSnapshot()}function A$(e){e.clearMeasurements()}function RSe(e){e.isLayoutDirty=!0,e.updateLayout()}function I$(e){e.isLayoutDirty=!1}function NSe(e){e.isAnimationBlocked&&e.layout&&!e.isLayoutDirty&&(e.snapshot=e.layout,e.isLayoutDirty=!0)}function TSe(e){let{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function D$(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function OSe(e){e.resolveTargetDelta()}function ESe(e){e.calcProjection()}function _Se(e){e.resetSkewAndRotation()}function FSe(e){e.removeLeadSnapshot()}function L$(e,t,r){e.translate=bt(t.translate,0,r),e.scale=bt(t.scale,1,r),e.origin=t.origin,e.originPoint=t.originPoint}function R$(e,t,r,o){e.min=bt(t.min,r.min,o),e.max=bt(t.max,r.max,o)}function BSe(e,t,r,o){R$(e.x,t.x,r.x,o),R$(e.y,t.y,r.y,o)}function VSe(e){return e.animationValues&&e.animationValues.opacityExit!==void 0}var USe={duration:.45,ease:[.4,0,.1,1]},N$=e=>typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().includes(e),T$=N$("applewebkit/")&&!N$("chrome/")?Math.round:Yr;function O$(e){e.min=T$(e.min),e.max=T$(e.max)}function WSe(e){O$(e.x),O$(e.y)}function _$(e,t,r){return e==="position"||e==="preserve-aspect"&&!hF(wF(t),wF(r),.2)}function GSe(e){return e!==e.root&&e.scroll?.wasRoot}var F$=JP({attachResizeListener:(e,t)=>rl(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body?.scrollLeft||0,y:document.documentElement.scrollTop||document.body?.scrollTop||0}),checkIsScrollRoot:()=>!0});var jSe=e=>!e.isLayoutDirty&&e.willUpdate(!1);function QP(){let e=new Set,t=new WeakMap,r=()=>e.forEach(jSe);return{add:o=>{e.add(o),t.set(o,o.addEventListener("willUpdate",r))},remove:o=>{e.delete(o);let n=t.get(o);n&&(n(),t.delete(o)),r()},dirty:r}}var eA={current:void 0},Xy=JP({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!eA.current){let e=new F$({});e.mount(window),e.setOptions({layoutScroll:!0}),eA.current=e}return eA.current},resetTransform:(e,t)=>{e.style.transform=t!==void 0?t:"none"},checkIsScrollRoot:e=>window.getComputedStyle(e).position==="fixed"});var tA=z(ie(),1),tu=z(ie(),1);var B$=z(ie(),1),sk=(0,B$.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"});var U$=z(ie(),1);function V$(e,t){if(typeof e=="function")return e(t);e!=null&&(e.current=t)}function zSe(...e){return t=>{let r=!1,o=e.map(n=>{let a=V$(n,t);return!r&&typeof a=="function"&&(r=!0),a});if(r)return()=>{for(let n=0;n<o.length;n++){let a=o[n];typeof a=="function"?a():V$(e[n],null)}}}}function W$(...e){return U$.useCallback(zSe(...e),e)}var AF=class extends tA.Component{getSnapshotBeforeUpdate(t){let r=this.props.childRef.current;if(Zf(r)&&t.isPresent&&!this.props.isPresent&&this.props.pop!==!1){let o=r.offsetParent,n=Zf(o)&&o.offsetWidth||0,a=Zf(o)&&o.offsetHeight||0,i=getComputedStyle(r),s=this.props.sizeRef.current;s.height=parseFloat(i.height),s.width=parseFloat(i.width),s.top=r.offsetTop,s.left=r.offsetLeft,s.right=n-s.width-s.left,s.bottom=a-s.height-s.top,s.direction=i.direction}return null}componentDidUpdate(){}render(){return this.props.children}};function j$({children:e,isPresent:t,anchorX:r,anchorY:o,root:n,pop:a}){let i=(0,tu.useId)(),s=(0,tu.useRef)(null),l=(0,tu.useRef)({width:0,height:0,top:0,left:0,right:0,bottom:0,direction:"ltr"}),{nonce:u}=(0,tu.useContext)(sk),d=e.props?.ref??e?.ref,c=W$(s,d);return(0,tu.useInsertionEffect)(()=>{let{width:f,height:p,top:g,left:m,right:h,bottom:k,direction:M}=l.current;if(t||a===!1||!s.current||!f||!p)return;let v=M==="rtl",b=r==="left"?v?`right: ${h}`:`left: ${m}`:v?`left: ${m}`:`right: ${h}`,w=o==="bottom"?`bottom: ${k}`:`top: ${g}`;s.current.dataset.motionPopId=i;let P=document.createElement("style");u&&(P.nonce=u);let L=n??document.head;return L.appendChild(P),P.sheet&&P.sheet.insertRule(`
13
+ [data-motion-pop-id="${i}"] {
14
+ position: absolute !important;
15
+ width: ${f}px !important;
16
+ height: ${p}px !important;
17
+ ${b}px !important;
18
+ ${w}px !important;
19
+ }
20
+ `),()=>{s.current?.removeAttribute("data-motion-pop-id"),L.contains(P)&&L.removeChild(P)}},[t]),(0,G$.jsx)(AF,{isPresent:t,childRef:s,sizeRef:l,pop:a,children:a===!1?e:tA.cloneElement(e,{ref:c})})}var q$=({children:e,initial:t,isPresent:r,onExitComplete:o,custom:n,presenceAffectsLayout:a,mode:i,anchorX:s,anchorY:l,root:u})=>{let d=Gg(qSe),c=(0,Jy.useId)(),f=!0,p=(0,Jy.useMemo)(()=>(f=!1,{id:c,initial:t,isPresent:r,custom:n,onExitComplete:g=>{d.set(g,!0);for(let m of d.values())if(!m)return;o&&o()},register:g=>(d.set(g,!1),()=>d.delete(g))}),[r,d,o]);return a&&f&&(p={...p}),(0,Jy.useMemo)(()=>{d.forEach((g,m)=>d.set(m,!1))},[r]),z$.useEffect(()=>{!r&&!d.size&&o&&o()},[r]),e=(0,IF.jsx)(j$,{pop:i==="popLayout",isPresent:r,anchorX:s,anchorY:l,root:u,children:e}),(0,IF.jsx)(Pd.Provider,{value:p,children:e})};function qSe(){return new Map}var Bd=z(ie(),1);function rA(e=!0){let t=(0,Bd.useContext)(Pd);if(t===null)return[!0,null];let{isPresent:r,onExitComplete:o,register:n}=t,a=(0,Bd.useId)();(0,Bd.useEffect)(()=>{if(e)return n(a)},[e]);let i=(0,Bd.useCallback)(()=>e&&o&&o(a),[a,o,e]);return!r&&o?[!1,i]:[!0]}var oA=z(ie(),1),Qy=e=>e.key||"";function DF(e){let t=[];return oA.Children.forEach(e,r=>{(0,oA.isValidElement)(r)&&t.push(r)}),t}var wt=({children:e,custom:t,initial:r=!0,onExitComplete:o,presenceAffectsLayout:n=!0,mode:a="sync",propagate:i=!1,anchorX:s="left",anchorY:l="top",root:u})=>{let[d,c]=rA(i),f=(0,ds.useMemo)(()=>DF(e),[e]),p=i&&!d?[]:f.map(Qy),g=(0,ds.useRef)(!0),m=(0,ds.useRef)(f),h=Gg(()=>new Map),k=(0,ds.useRef)(new Set),[M,v]=(0,ds.useState)(f),[b,w]=(0,ds.useState)(f);jg(()=>{g.current=!1,m.current=f;for(let C=0;C<b.length;C++){let F=Qy(b[C]);p.includes(F)?(h.delete(F),k.current.delete(F)):h.get(F)!==!0&&h.set(F,!1)}},[b,p.length,p.join("-")]);let P=[];if(f!==M){let C=[...f];for(let F=0;F<b.length;F++){let T=b[F],G=Qy(T);p.includes(G)||(C.splice(F,0,T),P.push(T))}return a==="wait"&&P.length&&(C=P),w(DF(C)),v(f),null}let{forceRender:L}=(0,ds.useContext)(Kl);return(0,ex.jsx)(ex.Fragment,{children:b.map(C=>{let F=Qy(C),T=i&&!d?!1:f===b||p.includes(F),G=()=>{if(k.current.has(F))return;if(h.has(F))k.current.add(F),h.set(F,!0);else return;let $=!0;h.forEach(oe=>{oe||($=!1)}),$&&(L?.(),w(m.current),i&&c?.(),o&&o())};return(0,ex.jsx)(q$,{isPresent:T,initial:!g.current||r?void 0:!1,custom:t,presenceAffectsLayout:n,mode:a,root:u,onExitComplete:T?void 0:G,anchorX:s,anchorY:l,children:C},F)})})};var X$=z(ze(),1),sp=z(ie(),1);var H$=z(ie(),1),K$=(0,H$.createContext)(null);var tx=z(ie(),1);var $$=z(ie(),1);function Y$(){let e=(0,$$.useRef)(!1);return jg(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Z$(){let e=Y$(),[t,r]=(0,tx.useState)(0),o=(0,tx.useCallback)(()=>{e.current&&r(t+1)},[t]);return[(0,tx.useCallback)(()=>ht.postRender(o),[o]),t]}var J$=e=>e===!0,HSe=e=>J$(e===!0)||e==="id",lk=({children:e,id:t,inherit:r=!0})=>{let o=(0,sp.useContext)(Kl),n=(0,sp.useContext)(K$),[a,i]=Z$(),s=(0,sp.useRef)(null),l=o.id||n;s.current===null&&(HSe(r)&&l&&(t=t?l+"-"+t:l),s.current={id:t,group:J$(r)?o.group||QP():QP()});let u=(0,sp.useMemo)(()=>({...s.current,forceRender:a}),[i]);return(0,X$.jsx)(Kl.Provider,{value:u,children:e})};var Q$=z(ie(),1),nA=(0,Q$.createContext)({strict:!1});var eY={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},tY=!1;function KSe(){if(tY)return;let e={};for(let t in eY)e[t]={isEnabled:r=>eY[t].some(o=>!!r[o])};Uy(e),tY=!0}function aA(){return KSe(),oF()}function rY(e){let t=aA();for(let r in e)t[r]={...t[r],...e[r]};Uy(t)}var $Se=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","propagate","ignoreStrict","viewport"]);function rx(e){return e.startsWith("while")||e.startsWith("drag")&&e!=="draggable"||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||e.startsWith("onLayout")||$Se.has(e)}var oY=e=>!rx(e);function YSe(e){typeof e=="function"&&(oY=t=>t.startsWith("on")?!rx(t):e(t))}try{YSe(rj("@emotion/is-prop-valid").default)}catch{}function nY(e,t,r){let o={};for(let n in e)n==="values"&&typeof e.values=="object"||cr(e[n])||(oY(n)||r===!0&&rx(n)||!t&&!rx(n)||e.draggable&&n.startsWith("onDrag"))&&(o[n]=e[n]);return o}var dA=z(ze(),1);var fk=z(ie(),1);var aY=z(ie(),1),Vd=(0,aY.createContext)({});var iA=z(ie(),1);function iY(e,t){if(_d(e)){let{initial:r,animate:o}=e;return{initial:r===!1||tl(r)?r:void 0,animate:tl(o)?o:void 0}}return e.inherit!==!1?t:{}}function lY(e){let{initial:t,animate:r}=iY(e,(0,iA.useContext)(Vd));return(0,iA.useMemo)(()=>({initial:t,animate:r}),[sY(t),sY(r)])}function sY(e){return Array.isArray(e)?e.join(" "):e}var ck=z(ie(),1);var uY=z(ie(),1);var uk=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function LF(e,t,r){for(let o in t)!cr(t[o])&&!qy(o,r)&&(e[o]=t[o])}function ZSe({transformTemplate:e},t){return(0,uY.useMemo)(()=>{let r=uk();return ep(r,t,e),Object.assign({},r.vars,r.style)},[t])}function XSe(e,t){let r=e.style||{},o={};return LF(o,r,e),Object.assign(o,ZSe(e,t)),o}function dY(e,t){let r={},o=XSe(e,t);return e.drag&&e.dragListener!==!1&&(r.draggable=!1,o.userSelect=o.WebkitUserSelect=o.WebkitTouchCallout="none",o.touchAction=e.drag===!0?"none":`pan-${e.drag==="x"?"y":"x"}`),e.tabIndex===void 0&&(e.onTap||e.onTapStart||e.whileTap)&&(r.tabIndex=0),r.style=o,r}var cY=z(ie(),1);var sA=()=>({...uk(),attrs:{}});function fY(e,t,r,o){let n=(0,cY.useMemo)(()=>{let a=sA();return Ky(a,t,$y(o),e.transformTemplate,e.style),{...a.attrs,style:{...a.style}}},[t]);if(e.style){let a={};LF(a,e.style,e),n.style={...a,...n.style}}return n}var pY=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function dk(e){return typeof e!="string"||e.includes("-")?!1:!!(pY.indexOf(e)>-1||/[A-Z]/u.test(e))}function mY(e,t,r,{latestValues:o},n,a=!1,i){let l=(i??dk(e)?fY:dY)(t,o,n,e),u=nY(t,typeof e=="string",a),d=e!==ck.Fragment?{...u,...l,ref:r}:{},{children:c}=t,f=(0,ck.useMemo)(()=>cr(c)?c.get():c,[c]);return(0,ck.createElement)(e,{...d,children:f})}var RF=z(ie(),1);function JSe({scrapeMotionValuesFromProps:e,createRenderState:t},r,o,n){return{latestValues:QSe(r,o,n,e),renderState:t()}}function QSe(e,t,r,o){let n={},a=o(e,{});for(let f in a)n[f]=np(a[f]);let{initial:i,animate:s}=e,l=_d(e),u=Fy(e);t&&u&&!l&&e.inherit!==!1&&(i===void 0&&(i=t.initial),s===void 0&&(s=t.animate));let d=r?r.initial===!1:!1;d=d||i===!1;let c=d?s:i;if(c&&typeof c!="boolean"&&!Ql(c)){let f=Array.isArray(c)?c:[c];for(let p=0;p<f.length;p++){let g=$f(e,f[p]);if(g){let{transitionEnd:m,transition:h,...k}=g;for(let M in k){let v=k[M];if(Array.isArray(v)){let b=d?v.length-1:0;v=v[b]}v!==null&&(n[M]=v)}for(let M in m)n[M]=m[M]}}}return n}var lA=e=>(t,r)=>{let o=(0,RF.useContext)(Vd),n=(0,RF.useContext)(Pd),a=()=>JSe(e,t,o,n);return r?a():Gg(a)};var gY=lA({scrapeMotionValuesFromProps:tp,createRenderState:uk});var kY=lA({scrapeMotionValuesFromProps:Yy,createRenderState:sA});var MY=Symbol.for("motionComponentSymbol");var lp=z(ie(),1);function hY(e,t,r){let o=(0,lp.useRef)(r);(0,lp.useInsertionEffect)(()=>{o.current=r});let n=(0,lp.useRef)(null);return(0,lp.useCallback)(a=>{a&&e.onMount?.(a),t&&(a?t.mount(a):t.unmount());let i=o.current;if(typeof i=="function")if(a){let s=i(a);typeof s=="function"&&(n.current=s)}else n.current?(n.current(),n.current=null):i(a);else i&&(i.current=a)},[t])}var Wn=z(ie(),1);var vY=z(ie(),1),uA=(0,vY.createContext)({});function Ud(e){return e&&typeof e=="object"&&Object.prototype.hasOwnProperty.call(e,"current")}function yY(e,t,r,o,n,a){let{visualElement:i}=(0,Wn.useContext)(Vd),s=(0,Wn.useContext)(nA),l=(0,Wn.useContext)(Pd),u=(0,Wn.useContext)(sk),d=u.reducedMotion,c=u.skipAnimations,f=(0,Wn.useRef)(null),p=(0,Wn.useRef)(!1);o=o||s.renderer,!f.current&&o&&(f.current=o(e,{visualState:t,parent:i,props:r,presenceContext:l,blockInitialAnimation:l?l.initial===!1:!1,reducedMotionConfig:d,skipAnimations:c,isSVG:a}),p.current&&f.current&&(f.current.manuallyAnimateOnMount=!0));let g=f.current,m=(0,Wn.useContext)(uA);g&&!g.projection&&n&&(g.type==="html"||g.type==="svg")&&ePe(f.current,r,n,m);let h=(0,Wn.useRef)(!1);(0,Wn.useInsertionEffect)(()=>{g&&h.current&&g.update(r,l)});let k=r[Ny],M=(0,Wn.useRef)(!!k&&typeof window<"u"&&!window.MotionHandoffIsComplete?.(k)&&window.MotionHasOptimisedAnimation?.(k));return jg(()=>{p.current=!0,g&&(h.current=!0,window.MotionIsMounted=!0,g.updateFeatures(),g.scheduleRenderMicrotask(),M.current&&g.animationState&&g.animationState.animateChanges())}),(0,Wn.useEffect)(()=>{g&&(!M.current&&g.animationState&&g.animationState.animateChanges(),M.current&&(queueMicrotask(()=>{window.MotionHandoffMarkAsComplete?.(k)}),M.current=!1),g.enteringChildren=void 0)}),g}function ePe(e,t,r,o){let{layoutId:n,layout:a,drag:i,dragConstraints:s,layoutScroll:l,layoutRoot:u,layoutAnchor:d,layoutCrossfade:c}=t;e.projection=new r(e.latestValues,t["data-framer-portal-id"]?void 0:xY(e.parent)),e.projection.setOptions({layoutId:n,layout:a,alwaysMeasureLayout:!!i||s&&Ud(s),visualElement:e,animationType:typeof a=="string"?a:"both",initialPromotionConfig:o,crossfade:c,layoutScroll:l,layoutRoot:u,layoutAnchor:d})}function xY(e){if(e)return e.options.allowProjection!==!1?e.projection:xY(e.parent)}function cA(e,{forwardMotionProps:t=!1,type:r}={},o,n){o&&rY(o);let a=r?r==="svg":dk(e),i=a?kY:gY;function s(u,d){let c,f={...(0,fk.useContext)(sk),...u,layoutId:tPe(u)},{isStatic:p}=f,g=lY(u),m=i(u,p);if(!p&&typeof window<"u"){rPe(f,o);let h=oPe(f);c=h.MeasureLayout,g.visualElement=yY(e,m,f,n,h.ProjectionNode,a)}return(0,dA.jsxs)(Vd.Provider,{value:g,children:[c&&g.visualElement?(0,dA.jsx)(c,{visualElement:g.visualElement,...f}):null,mY(e,u,hY(m,g.visualElement,d),m,p,t,a)]})}s.displayName=`motion.${typeof e=="string"?e:`create(${e.displayName??e.name??""})`}`;let l=(0,fk.forwardRef)(s);return l[MY]=e,l}function tPe({layoutId:e}){let t=(0,fk.useContext)(Kl).id;return t&&e!==void 0?t+"-"+e:e}function rPe(e,t){let r=(0,fk.useContext)(nA).strict}function oPe(e){let t=aA(),{drag:r,layout:o}=t;if(!r&&!o)return{};let n={...r,...o};return{MeasureLayout:r?.isEnabled(e)||o?.isEnabled(e)?n.MeasureLayout:void 0,ProjectionNode:n.ProjectionNode}}function bY(e,t){if(typeof Proxy>"u")return cA;let r=new Map,o=(a,i)=>cA(a,i,e,t),n=(a,i)=>o(a,i);return new Proxy(n,{get:(a,i)=>i==="create"?o:(r.has(i)||r.set(i,cA(i,void 0,e,t)),r.get(i))})}var wY=z(ie(),1);var CY=(e,t)=>t.isSVG??dk(e)?new Zy(t):new Hy(t,{allowProjection:e!==wY.Fragment});var fA=class extends Ro{constructor(t){super(t),t.animationState||(t.animationState=pF(t))}updateAnimationControlsSubscription(){let{animate:t}=this.node.getProps();Ql(t)&&(this.unmountControls=t.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:t}=this.node.getProps(),{animate:r}=this.node.prevProps||{};t!==r&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}};var nPe=0,pA=class extends Ro{constructor(){super(...arguments),this.id=nPe++,this.isExitComplete=!1}update(){if(!this.node.presenceContext)return;let{isPresent:t,onExitComplete:r}=this.node.presenceContext,{isPresent:o}=this.node.prevPresenceContext||{};if(!this.node.animationState||t===o)return;if(t&&o===!1){if(this.isExitComplete){let{initial:a,custom:i}=this.node.getProps();if(typeof a=="string"||typeof a=="object"&&a!==null&&!Array.isArray(a)){let s=La(this.node,a,i);if(s){let{transition:l,transitionEnd:u,...d}=s;for(let c in d)this.node.getValue(c)?.jump(d[c])}}this.node.animationState.reset(),this.node.animationState.animateChanges()}else this.node.animationState.setActive("exit",!1);this.isExitComplete=!1;return}let n=this.node.animationState.setActive("exit",!t);r&&!t&&n.then(()=>{this.isExitComplete=!0,r(this.id)})}mount(){let{register:t,onExitComplete:r}=this.node.presenceContext||{};r&&r(this.id),t&&(this.unmount=t(this.id))}unmount(){}};var SY={animation:{Feature:fA},exit:{Feature:pA}};function ru(e){return{point:{x:e.pageX,y:e.pageY}}}var PY=e=>t=>Jf(t)&&e(t,ru(t));function Wd(e,t,r,o){return rl(e,t,PY(r),o)}var mA=({current:e})=>e?e.ownerDocument.defaultView:null;var AY=(e,t)=>Math.abs(e-t);function IY(e,t){let r=AY(e.x,t.x),o=AY(e.y,t.y);return Math.sqrt(r**2+o**2)}var DY=new Set(["auto","scroll"]),pk=class{constructor(t,r,{transformPagePoint:o,contextWindow:n=window,dragSnapToOrigin:a=!1,distanceThreshold:i=3,element:s}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.lastRawMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.scrollPositions=new Map,this.removeScrollListeners=null,this.onElementScroll=p=>{this.handleScroll(p.target)},this.onWindowScroll=()=>{this.handleScroll(window)},this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;this.lastRawMoveEventInfo&&(this.lastMoveEventInfo=gA(this.lastRawMoveEventInfo,this.transformPagePoint));let p=NF(this.lastMoveEventInfo,this.history),g=this.startEvent!==null,m=IY(p.offset,{x:0,y:0})>=this.distanceThreshold;if(!g&&!m)return;let{point:h}=p,{timestamp:k}=ro;this.history.push({...h,timestamp:k});let{onStart:M,onMove:v}=this.handlers;g||(M&&M(this.lastMoveEvent,p),this.startEvent=this.lastMoveEvent),v&&v(this.lastMoveEvent,p)},this.handlePointerMove=(p,g)=>{this.lastMoveEvent=p,this.lastRawMoveEventInfo=g,this.lastMoveEventInfo=gA(g,this.transformPagePoint),ht.update(this.updatePoint,!0)},this.handlePointerUp=(p,g)=>{this.end();let{onEnd:m,onSessionEnd:h,resumeAnimation:k}=this.handlers;if((this.dragSnapToOrigin||!this.startEvent)&&k&&k(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;let M=NF(p.type==="pointercancel"?this.lastMoveEventInfo:gA(g,this.transformPagePoint),this.history);this.startEvent&&m&&m(p,M),h&&h(p,M)},!Jf(t))return;this.dragSnapToOrigin=a,this.handlers=r,this.transformPagePoint=o,this.distanceThreshold=i,this.contextWindow=n||window;let l=ru(t),u=gA(l,this.transformPagePoint),{point:d}=u,{timestamp:c}=ro;this.history=[{...d,timestamp:c}];let{onSessionStart:f}=r;f&&f(t,NF(u,this.history)),this.removeListeners=ls(Wd(this.contextWindow,"pointermove",this.handlePointerMove),Wd(this.contextWindow,"pointerup",this.handlePointerUp),Wd(this.contextWindow,"pointercancel",this.handlePointerUp)),s&&this.startScrollTracking(s)}startScrollTracking(t){let r=t.parentElement;for(;r;){let o=getComputedStyle(r);(DY.has(o.overflowX)||DY.has(o.overflowY))&&this.scrollPositions.set(r,{x:r.scrollLeft,y:r.scrollTop}),r=r.parentElement}this.scrollPositions.set(window,{x:window.scrollX,y:window.scrollY}),window.addEventListener("scroll",this.onElementScroll,{capture:!0}),window.addEventListener("scroll",this.onWindowScroll),this.removeScrollListeners=()=>{window.removeEventListener("scroll",this.onElementScroll,{capture:!0}),window.removeEventListener("scroll",this.onWindowScroll)}}handleScroll(t){let r=this.scrollPositions.get(t);if(!r)return;let o=t===window,n=o?{x:window.scrollX,y:window.scrollY}:{x:t.scrollLeft,y:t.scrollTop},a={x:n.x-r.x,y:n.y-r.y};a.x===0&&a.y===0||(o?this.lastMoveEventInfo&&(this.lastMoveEventInfo.point.x+=a.x,this.lastMoveEventInfo.point.y+=a.y):this.history.length>0&&(this.history[0].x-=a.x,this.history[0].y-=a.y),this.scrollPositions.set(t,n),ht.update(this.updatePoint,!0))}updateHandlers(t){this.handlers=t}end(){this.removeListeners&&this.removeListeners(),this.removeScrollListeners&&this.removeScrollListeners(),this.scrollPositions.clear(),aa(this.updatePoint)}};function gA(e,t){return t?{point:t(e.point)}:e}function LY(e,t){return{x:e.x-t.x,y:e.y-t.y}}function NF({point:e},t){return{point:e,delta:LY(e,RY(t)),offset:LY(e,aPe(t)),velocity:iPe(t,.1)}}function aPe(e){return e[0]}function RY(e){return e[e.length-1]}function iPe(e,t){if(e.length<2)return{x:0,y:0};let r=e.length-1,o=null,n=RY(e);for(;r>=0&&(o=e[r],!(n.timestamp-o.timestamp>fo(t)));)r--;if(!o)return{x:0,y:0};o===e[0]&&e.length>2&&n.timestamp-o.timestamp>fo(t)*2&&(o=e[1]);let a=zo(n.timestamp-o.timestamp);if(a===0)return{x:0,y:0};let i={x:(n.x-o.x)/a,y:(n.y-o.y)/a};return i.x===1/0&&(i.x=0),i.y===1/0&&(i.y=0),i}function _Y(e,{min:t,max:r},o){return t!==void 0&&e<t?e=o?bt(t,e,o.min):Math.max(e,t):r!==void 0&&e>r&&(e=o?bt(r,e,o.max):Math.min(e,r)),e}function NY(e,t,r){return{min:t!==void 0?e.min+t:void 0,max:r!==void 0?e.max+r-(e.max-e.min):void 0}}function FY(e,{top:t,left:r,bottom:o,right:n}){return{x:NY(e.x,r,n),y:NY(e.y,t,o)}}function TY(e,t){let r=t.min-e.min,o=t.max-e.max;return t.max-t.min<e.max-e.min&&([r,o]=[o,r]),{min:r,max:o}}function BY(e,t){return{x:TY(e.x,t.x),y:TY(e.y,t.y)}}function VY(e,t){let r=.5,o=bo(e),n=bo(t);return n>o?r=Zs(t.min,t.max-o,e.min):o>n&&(r=Zs(e.min,e.max-n,t.min)),Do(0,1,r)}function UY(e,t){let r={};return t.min!==void 0&&(r.min=t.min-e.min),t.max!==void 0&&(r.max=t.max-e.min),r}var kA=.35;function WY(e=kA){return e===!1?e=0:e===!0&&(e=kA),{x:OY(e,"left","right"),y:OY(e,"top","bottom")}}function OY(e,t,r){return{min:EY(e,t),max:EY(e,r)}}function EY(e,t){return typeof e=="number"?e:e[t]||0}var sPe=new WeakMap,hA=class{constructor(t){this.openDragLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=Fr(),this.latestPointerEvent=null,this.latestPanInfo=null,this.visualElement=t}start(t,{snapToCursor:r=!1,distanceThreshold:o}={}){let{presenceContext:n}=this.visualElement;if(n&&n.isPresent===!1)return;let a=c=>{r&&this.snapToCursor(ru(c).point),this.stopAnimation()},i=(c,f)=>{let{drag:p,dragPropagation:g,onDragStart:m}=this.getProps();if(p&&!g&&(this.openDragLock&&this.openDragLock(),this.openDragLock=$_(p),!this.openDragLock))return;this.latestPointerEvent=c,this.latestPanInfo=f,this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Ra(k=>{let M=this.getAxisMotionValue(k).get()||0;if(Cn.test(M)){let{projection:v}=this.visualElement;if(v&&v.layout){let b=v.layout.layoutBox[k];b&&(M=bo(b)*(parseFloat(M)/100))}}this.originPoint[k]=M}),m&&ht.update(()=>m(c,f),!1,!0),Qg(this.visualElement,"transform");let{animationState:h}=this.visualElement;h&&h.setActive("whileDrag",!0)},s=(c,f)=>{this.latestPointerEvent=c,this.latestPanInfo=f;let{dragPropagation:p,dragDirectionLock:g,onDirectionLock:m,onDrag:h}=this.getProps();if(!p&&!this.openDragLock)return;let{offset:k}=f;if(g&&this.currentDirection===null){this.currentDirection=uPe(k),this.currentDirection!==null&&m&&m(this.currentDirection);return}this.updateAxis("x",f.point,k),this.updateAxis("y",f.point,k),this.visualElement.render(),h&&ht.update(()=>h(c,f),!1,!0)},l=(c,f)=>{this.latestPointerEvent=c,this.latestPanInfo=f,this.stop(c,f),this.latestPointerEvent=null,this.latestPanInfo=null},u=()=>{let{dragSnapToOrigin:c}=this.getProps();(c||this.constraints)&&this.startAnimation({x:0,y:0})},{dragSnapToOrigin:d}=this.getProps();this.panSession=new pk(t,{onSessionStart:a,onStart:i,onMove:s,onSessionEnd:l,resumeAnimation:u},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:d,distanceThreshold:o,contextWindow:mA(this.visualElement),element:this.visualElement.current})}stop(t,r){let o=t||this.latestPointerEvent,n=r||this.latestPanInfo,a=this.isDragging;if(this.cancel(),!a||!n||!o)return;let{velocity:i}=n;this.startAnimation(i);let{onDragEnd:s}=this.getProps();s&&ht.postRender(()=>s(o,n))}cancel(){this.isDragging=!1;let{projection:t,animationState:r}=this.visualElement;t&&(t.isAnimationBlocked=!1),this.endPanSession();let{dragPropagation:o}=this.getProps();!o&&this.openDragLock&&(this.openDragLock(),this.openDragLock=null),r&&r.setActive("whileDrag",!1)}endPanSession(){this.panSession&&this.panSession.end(),this.panSession=void 0}updateAxis(t,r,o){let{drag:n}=this.getProps();if(!o||!MA(t,n,this.currentDirection))return;let a=this.getAxisMotionValue(t),i=this.originPoint[t]+o[t];this.constraints&&this.constraints[t]&&(i=_Y(i,this.constraints[t],this.elastic[t])),a.set(i)}resolveConstraints(){let{dragConstraints:t,dragElastic:r}=this.getProps(),o=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):this.visualElement.projection?.layout,n=this.constraints;t&&Ud(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&o?this.constraints=FY(o.layoutBox,t):this.constraints=!1,this.elastic=WY(r),n!==this.constraints&&!Ud(t)&&o&&this.constraints&&!this.hasMutatedConstraints&&Ra(a=>{this.constraints!==!1&&this.getAxisMotionValue(a)&&(this.constraints[a]=UY(o.layoutBox[a],this.constraints[a]))})}resolveRefConstraints(){let{dragConstraints:t,onMeasureDragConstraints:r}=this.getProps();if(!t||!Ud(t))return!1;let o=t.current;Mi(o!==null,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.","drag-constraints-ref");let{projection:n}=this.visualElement;if(!n||!n.layout)return!1;n.root&&(n.root.scroll=void 0,n.root.updateScroll());let a=dF(o,n.root,this.visualElement.getTransformPagePoint()),i=BY(n.layout.layoutBox,a);if(r){let s=r(nF(i));this.hasMutatedConstraints=!!s,s&&(i=Wy(s))}return i}startAnimation(t){let{drag:r,dragMomentum:o,dragElastic:n,dragTransition:a,dragSnapToOrigin:i,onDragTransitionEnd:s}=this.getProps(),l=this.constraints||{},u=Ra(d=>{if(!MA(d,r,this.currentDirection))return;let c=l&&l[d]||{};(i===!0||i===d)&&(c={min:0,max:0});let f=n?200:1e6,p=n?40:1e7,g={type:"inertia",velocity:o?t[d]:0,bounceStiffness:f,bounceDamping:p,timeConstant:750,restDelta:1,restSpeed:10,...a,...c};return this.startAxisValueAnimation(d,g)});return Promise.all(u).then(s)}startAxisValueAnimation(t,r){let o=this.getAxisMotionValue(t);return Qg(this.visualElement,t),o.start(Kf(t,o,0,r,this.visualElement,!1))}stopAnimation(){Ra(t=>this.getAxisMotionValue(t).stop())}getAxisMotionValue(t){let r=`_drag${t.toUpperCase()}`,n=this.visualElement.getProps()[r];return n||this.visualElement.getValue(t,this.visualElement.latestValues[t]??0)}snapToCursor(t){Ra(r=>{let{drag:o}=this.getProps();if(!MA(r,o,this.currentDirection))return;let{projection:n}=this.visualElement,a=this.getAxisMotionValue(r);if(n&&n.layout){let{min:i,max:s}=n.layout.layoutBox[r],l=a.get()||0;a.set(t[r]-bt(i,s,.5)+l)}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;let{drag:t,dragConstraints:r}=this.getProps(),{projection:o}=this.visualElement;if(!Ud(r)||!o||!this.constraints)return;this.stopAnimation();let n={x:0,y:0};Ra(i=>{let s=this.getAxisMotionValue(i);if(s&&this.constraints!==!1){let l=s.get();n[i]=VY({min:l,max:l},this.constraints[i])}});let{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",o.root&&o.root.updateScroll(),o.updateLayout(),this.constraints=!1,this.resolveConstraints(),Ra(i=>{if(!MA(i,t,null))return;let s=this.getAxisMotionValue(i),{min:l,max:u}=this.constraints[i];s.set(bt(l,u,n[i]))}),this.visualElement.render()}addListeners(){if(!this.visualElement.current)return;sPe.set(this.visualElement,this);let t=this.visualElement.current,r=Wd(t,"pointerdown",u=>{let{drag:d,dragListener:c=!0}=this.getProps(),f=u.target,p=f!==t&&J_(f);d&&c&&!p&&this.start(u)}),o,n=()=>{let{dragConstraints:u}=this.getProps();Ud(u)&&u.current&&(this.constraints=this.resolveRefConstraints(),o||(o=lPe(t,u.current,()=>this.scalePositionWithinConstraints())))},{projection:a}=this.visualElement,i=a.addEventListener("measure",n);a&&!a.layout&&(a.root&&a.root.updateScroll(),a.updateLayout()),ht.read(n);let s=rl(window,"resize",()=>this.scalePositionWithinConstraints()),l=a.addEventListener("didUpdate",(({delta:u,hasLayoutChanged:d})=>{this.isDragging&&d&&(Ra(c=>{let f=this.getAxisMotionValue(c);f&&(this.originPoint[c]+=u[c].translate,f.set(f.get()+u[c].translate))}),this.visualElement.render())}));return()=>{s(),r(),i(),l&&l(),o&&o()}}getProps(){let t=this.visualElement.getProps(),{drag:r=!1,dragDirectionLock:o=!1,dragPropagation:n=!1,dragConstraints:a=!1,dragElastic:i=kA,dragMomentum:s=!0}=t;return{...t,drag:r,dragDirectionLock:o,dragPropagation:n,dragConstraints:a,dragElastic:i,dragMomentum:s}}};function GY(e){let t=!0;return()=>{if(t){t=!1;return}e()}}function lPe(e,t,r){let o=GP(e,GY(r)),n=GP(t,GY(r));return()=>{o(),n()}}function MA(e,t,r){return(t===!0||t===e)&&(r===null||r===e)}function uPe(e,t=10){let r=null;return Math.abs(e.y)>t?r="y":Math.abs(e.x)>t&&(r="x"),r}var vA=class extends Ro{constructor(t){super(t),this.removeGroupControls=Yr,this.removeListeners=Yr,this.controls=new hA(t)}mount(){let{dragControls:t}=this.node.getProps();t&&(this.removeGroupControls=t.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||Yr}update(){let{dragControls:t}=this.node.getProps(),{dragControls:r}=this.node.prevProps||{};t!==r&&(this.removeGroupControls(),t&&(this.removeGroupControls=t.subscribe(this.controls)))}unmount(){this.removeGroupControls(),this.removeListeners(),this.controls.isDragging||this.controls.endPanSession()}};var TF=e=>(t,r)=>{e&&ht.update(()=>e(t,r),!1,!0)},yA=class extends Ro{constructor(){super(...arguments),this.removePointerDownListener=Yr}onPointerDown(t){this.session=new pk(t,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:mA(this.node)})}createPanHandlers(){let{onPanSessionStart:t,onPanStart:r,onPan:o,onPanEnd:n}=this.node.getProps();return{onSessionStart:TF(t),onStart:TF(r),onMove:TF(o),onEnd:(a,i)=>{delete this.session,n&&ht.postRender(()=>n(a,i))}}}mount(){this.removePointerDownListener=Wd(this.node.current,"pointerdown",t=>this.onPointerDown(t))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}};var jY=z(ze(),1);var ox=z(ie(),1);var OF=!1,EF=class extends ox.Component{componentDidMount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o,layoutId:n}=this.props,{projection:a}=t;a&&(r.group&&r.group.add(a),o&&o.register&&n&&o.register(a),OF&&a.root.didUpdate(),a.addEventListener("animationComplete",()=>{this.safeToRemove()}),a.setOptions({...a.options,layoutDependency:this.props.layoutDependency,onExitComplete:()=>this.safeToRemove()})),ap.hasEverUpdated=!0}getSnapshotBeforeUpdate(t){let{layoutDependency:r,visualElement:o,drag:n,isPresent:a}=this.props,{projection:i}=o;return i&&(i.isPresent=a,t.layoutDependency!==r&&i.setOptions({...i.options,layoutDependency:r}),OF=!0,n||t.layoutDependency!==r||r===void 0||t.isPresent!==a?i.willUpdate():this.safeToRemove(),t.isPresent!==a&&(a?i.promote():i.relegate()||ht.postRender(()=>{let s=i.getStack();(!s||!s.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){let{visualElement:t,layoutAnchor:r}=this.props,{projection:o}=t;o&&(o.options.layoutAnchor=r,o.root.didUpdate(),Xf.postRender(()=>{!o.currentAnimation&&o.isLead()&&this.safeToRemove()}))}componentWillUnmount(){let{visualElement:t,layoutGroup:r,switchLayoutGroup:o}=this.props,{projection:n}=t;OF=!0,n&&(n.scheduleCheckAfterUnmount(),r&&r.group&&r.group.remove(n),o&&o.deregister&&o.deregister(n))}safeToRemove(){let{safeToRemove:t}=this.props;t&&t()}render(){return null}};function xA(e){let[t,r]=rA(),o=(0,ox.useContext)(Kl);return(0,jY.jsx)(EF,{...e,layoutGroup:o,switchLayoutGroup:(0,ox.useContext)(uA),isPresent:t,safeToRemove:r})}var zY={pan:{Feature:yA},drag:{Feature:vA,ProjectionNode:Xy,MeasureLayout:xA}};function qY(e,t,r){let{props:o}=e;e.animationState&&o.whileHover&&e.animationState.setActive("whileHover",r==="Start");let n="onHover"+r,a=o[n];a&&ht.postRender(()=>a(t,ru(t)))}var bA=class extends Ro{mount(){let{current:t}=this.node;t&&(this.unmount=Y_(t,(r,o)=>(qY(this.node,o,"Start"),n=>qY(this.node,n,"End"))))}unmount(){}};var wA=class extends Ro{constructor(){super(...arguments),this.isActive=!1}onFocus(){let t=!1;try{t=this.node.current.matches(":focus-visible")}catch{t=!0}!t||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=ls(rl(this.node.current,"focus",()=>this.onFocus()),rl(this.node.current,"blur",()=>this.onBlur()))}unmount(){}};function HY(e,t,r){let{props:o}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&o.whileTap&&e.animationState.setActive("whileTap",r==="Start");let n="onTap"+(r==="End"?"":r),a=o[n];a&&ht.postRender(()=>a(t,ru(t)))}var CA=class extends Ro{mount(){let{current:t}=this.node;if(!t)return;let{globalTapTarget:r,propagate:o}=this.node.props;this.unmount=eF(t,(n,a)=>(HY(this.node,a,"Start"),(i,{success:s})=>HY(this.node,i,s?"End":"Cancel")),{useGlobalTarget:r,stopPropagation:o?.tap===!1})}unmount(){}};var FF=new WeakMap,_F=new WeakMap,dPe=e=>{let t=FF.get(e.target);t&&t(e)},cPe=e=>{e.forEach(dPe)};function fPe({root:e,...t}){let r=e||document;_F.has(r)||_F.set(r,{});let o=_F.get(r),n=JSON.stringify(t);return o[n]||(o[n]=new IntersectionObserver(cPe,{root:e,...t})),o[n]}function KY(e,t,r){let o=fPe(t);return FF.set(e,r),o.observe(e),()=>{FF.delete(e),o.unobserve(e)}}var pPe={some:0,all:1},SA=class extends Ro{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.stopObserver?.();let{viewport:t={}}=this.node.getProps(),{root:r,margin:o,amount:n="some",once:a}=t,i={root:r?r.current:void 0,rootMargin:o,threshold:typeof n=="number"?n:pPe[n]},s=l=>{let{isIntersecting:u}=l;if(this.isInView===u||(this.isInView=u,a&&!u&&this.hasEnteredView))return;u&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",u);let{onViewportEnter:d,onViewportLeave:c}=this.node.getProps(),f=u?d:c;f&&f(l)};this.stopObserver=KY(this.node.current,i,s)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;let{props:t,prevProps:r}=this.node;["amount","margin","root"].some(mPe(t,r))&&this.startObserver()}unmount(){this.stopObserver?.(),this.hasEnteredView=!1,this.isInView=!1}};function mPe({viewport:e={}},{viewport:t={}}={}){return r=>e[r]!==t[r]}var $Y={inView:{Feature:SA},tap:{Feature:CA},focus:{Feature:wA},hover:{Feature:bA}};var YY={layout:{ProjectionNode:Xy,MeasureLayout:xA}};var ZY={...SY,...$Y,...zY,...YY};var Qe=bY(ZY,CY);var XY=z(ie(),1);function ln(){!Qf.current&&By();let[e]=(0,XY.useState)(Fd.current);return e}var IA=z(ie(),1);var PA=(...e)=>e.filter((t,r,o)=>!!t&&t.trim()!==""&&o.indexOf(t)===r).join(" ").trim();var JY=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase();var QY=e=>e.replace(/^([A-Z])|[\s-_]+(\w)/g,(t,r,o)=>o?o.toUpperCase():r.toLowerCase());var BF=e=>{let t=QY(e);return t.charAt(0).toUpperCase()+t.slice(1)};var nx=z(ie(),1);var AA={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};var eZ=e=>{for(let t in e)if(t.startsWith("aria-")||t==="role"||t==="title")return!0;return!1};var mk=z(ie(),1);var gPe=(0,mk.createContext)({});var tZ=()=>(0,mk.useContext)(gPe);var rZ=(0,nx.forwardRef)(({color:e,size:t,strokeWidth:r,absoluteStrokeWidth:o,className:n="",children:a,iconNode:i,...s},l)=>{let{size:u=24,strokeWidth:d=2,absoluteStrokeWidth:c=!1,color:f="currentColor",className:p=""}=tZ()??{},g=o??c?Number(r??d)*24/Number(t??u):r??d;return(0,nx.createElement)("svg",{ref:l,...AA,width:t??u??AA.width,height:t??u??AA.height,stroke:e??f,strokeWidth:g,className:PA("lucide",p,n),...!a&&!eZ(s)&&{"aria-hidden":"true"},...s},[...i.map(([m,h])=>(0,nx.createElement)(m,h)),...Array.isArray(a)?a:[a]])});var Ee=(e,t)=>{let r=(0,IA.forwardRef)(({className:o,...n},a)=>(0,IA.createElement)(rZ,{ref:a,iconNode:t,className:PA(`lucide-${JY(BF(e))}`,`lucide-${e}`,o),...n}));return r.displayName=BF(e),r};var kPe=[["path",{d:"M22 12h-2.48a2 2 0 0 0-1.93 1.46l-2.35 8.36a.25.25 0 0 1-.48 0L9.24 2.18a.25.25 0 0 0-.48 0l-2.35 8.36A2 2 0 0 1 4.49 12H2",key:"169zse"}]],cs=Ee("activity",kPe);var MPe=[["path",{d:"M12 5v14",key:"s699le"}],["path",{d:"m19 12-7 7-7-7",key:"1idqje"}]],up=Ee("arrow-down",MPe);var hPe=[["path",{d:"m5 12 7-7 7 7",key:"hav0vg"}],["path",{d:"M12 19V5",key:"x0mq9r"}]],dp=Ee("arrow-up",hPe);var vPe=[["path",{d:"M21 8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16Z",key:"hh9hay"}],["path",{d:"m3.3 7 8.7 5 8.7-5",key:"g66t2b"}],["path",{d:"M12 22V12",key:"d0xqtd"}]],Gd=Ee("box",vPe);var yPe=[["path",{d:"M2.97 12.92A2 2 0 0 0 2 14.63v3.24a2 2 0 0 0 .97 1.71l3 1.8a2 2 0 0 0 2.06 0L12 19v-5.5l-5-3-4.03 2.42Z",key:"lc1i9w"}],["path",{d:"m7 16.5-4.74-2.85",key:"1o9zyk"}],["path",{d:"m7 16.5 5-3",key:"va8pkn"}],["path",{d:"M7 16.5v5.17",key:"jnp8gn"}],["path",{d:"M12 13.5V19l3.97 2.38a2 2 0 0 0 2.06 0l3-1.8a2 2 0 0 0 .97-1.71v-3.24a2 2 0 0 0-.97-1.71L17 10.5l-5 3Z",key:"8zsnat"}],["path",{d:"m17 16.5-5-3",key:"8arw3v"}],["path",{d:"m17 16.5 4.74-2.85",key:"8rfmw"}],["path",{d:"M17 16.5v5.17",key:"k6z78m"}],["path",{d:"M7.97 4.42A2 2 0 0 0 7 6.13v4.37l5 3 5-3V6.13a2 2 0 0 0-.97-1.71l-3-1.8a2 2 0 0 0-2.06 0l-3 1.8Z",key:"1xygjf"}],["path",{d:"M12 8 7.26 5.15",key:"1vbdud"}],["path",{d:"m12 8 4.74-2.85",key:"3rx089"}],["path",{d:"M12 13.5V8",key:"1io7kd"}]],fs=Ee("boxes",yPe);var xPe=[["path",{d:"M8 3H7a2 2 0 0 0-2 2v5a2 2 0 0 1-2 2 2 2 0 0 1 2 2v5c0 1.1.9 2 2 2h1",key:"ezmyqa"}],["path",{d:"M16 21h1a2 2 0 0 0 2-2v-5c0-1.1.9-2 2-2a2 2 0 0 1-2-2V5a2 2 0 0 0-2-2h-1",key:"e1hn23"}]],Na=Ee("braces",xPe);var bPe=[["path",{d:"M20 6 9 17l-5-5",key:"1gmf2c"}]],yt=Ee("check",bPe);var wPe=[["path",{d:"m6 9 6 6 6-6",key:"qrunsl"}]],po=Ee("chevron-down",wPe);var CPe=[["path",{d:"m15 18-6-6 6-6",key:"1wnfg3"}]],ol=Ee("chevron-left",CPe);var SPe=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],qo=Ee("chevron-right",SPe);var PPe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]],Xt=Ee("circle-alert",PPe);var APe=[["path",{d:"M17.5 19H9a7 7 0 1 1 6.71-9h1.79a4.5 4.5 0 1 1 0 9Z",key:"p7xjir"}]],cp=Ee("cloud",APe);var IPe=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],Ta=Ee("copy",IPe);var DPe=[["ellipse",{cx:"12",cy:"5",rx:"9",ry:"3",key:"msslwz"}],["path",{d:"M3 5V19A9 3 0 0 0 21 19V5",key:"1wlel7"}],["path",{d:"M3 12A9 3 0 0 0 21 12",key:"mv7ke4"}]],ia=Ee("database",DPe);var LPe=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],nl=Ee("download",LPe);var RPe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"M10 14 21 3",key:"gplh6r"}],["path",{d:"M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6",key:"a6xqqp"}]],ou=Ee("external-link",RPe);var NPe=[["path",{d:"m6 14 1.5-2.9A2 2 0 0 1 9.24 10H20a2 2 0 0 1 1.94 2.5l-1.54 6a2 2 0 0 1-1.95 1.5H4a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h3.9a2 2 0 0 1 1.69.9l.81 1.2a2 2 0 0 0 1.67.9H18a2 2 0 0 1 2 2v2",key:"usdka0"}]],gk=Ee("folder-open",NPe);var TPe=[["path",{d:"m12 14 4-4",key:"9kzdfg"}],["path",{d:"M3.34 19a10 10 0 1 1 17.32 0",key:"19p75a"}]],ps=Ee("gauge",TPe);var OPe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],nu=Ee("globe",OPe);var EPe=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 16v-4",key:"1dtifu"}],["path",{d:"M12 8h.01",key:"e9boi3"}]],al=Ee("info",EPe);var _Pe=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],ms=Ee("key-round",_Pe);var FPe=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],Gn=Ee("layers",FPe);var BPe=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],ct=Ee("loader-circle",BPe);var VPe=[["path",{d:"M15 3h6v6",key:"1q9fwt"}],["path",{d:"m21 3-7 7",key:"1l2asr"}],["path",{d:"m3 21 7-7",key:"tjx5ai"}],["path",{d:"M9 21H3v-6",key:"wtvkvv"}]],ax=Ee("maximize-2",VPe);var UPe=[["path",{d:"M18 8L22 12L18 16",key:"1r0oui"}],["path",{d:"M2 12H22",key:"1m8cig"}]],kk=Ee("move-right",UPe);var WPe=[["rect",{x:"16",y:"16",width:"6",height:"6",rx:"1",key:"4q2zg0"}],["rect",{x:"2",y:"16",width:"6",height:"6",rx:"1",key:"8cvhb9"}],["rect",{x:"9",y:"2",width:"6",height:"6",rx:"1",key:"1egb70"}],["path",{d:"M5 16v-3a1 1 0 0 1 1-1h12a1 1 0 0 1 1 1v3",key:"1jsf9p"}],["path",{d:"M12 12V8",key:"2874zd"}]],jd=Ee("network",WPe);var GPe=[["path",{d:"M12 22a1 1 0 0 1 0-20 10 9 0 0 1 10 9 5 5 0 0 1-5 5h-2.25a1.75 1.75 0 0 0-1.4 2.8l.3.4a1.75 1.75 0 0 1-1.4 2.8z",key:"e79jfc"}],["circle",{cx:"13.5",cy:"6.5",r:".5",fill:"currentColor",key:"1okk4w"}],["circle",{cx:"17.5",cy:"10.5",r:".5",fill:"currentColor",key:"f64h9f"}],["circle",{cx:"6.5",cy:"12.5",r:".5",fill:"currentColor",key:"qy21gx"}],["circle",{cx:"8.5",cy:"7.5",r:".5",fill:"currentColor",key:"fotxhn"}]],Mk=Ee("palette",GPe);var jPe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m16 15-3-3 3-3",key:"14y99z"}]],au=Ee("panel-left-close",jPe);var zPe=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M9 3v18",key:"fh3hqa"}],["path",{d:"m14 9 3 3-3 3",key:"8010ee"}]],gs=Ee("panel-left-open",zPe);var qPe=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],zd=Ee("pause",qPe);var HPe=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],No=Ee("pencil",HPe);var KPe=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],ks=Ee("play",KPe);var $Pe=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],It=Ee("plus",$Pe);var YPe=[["path",{d:"M12 2v10",key:"mnfbl"}],["path",{d:"M18.4 6.6a9 9 0 1 1-12.77.04",key:"obofu9"}]],il=Ee("power",YPe);var ZPe=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],Ho=Ee("refresh-cw",ZPe);var XPe=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],fp=Ee("rocket",XPe);var JPe=[["circle",{cx:"6",cy:"19",r:"3",key:"1kj8tv"}],["path",{d:"M9 19h8.5a3.5 3.5 0 0 0 0-7h-11a3.5 3.5 0 0 1 0-7H15",key:"1d8sl"}],["circle",{cx:"18",cy:"5",r:"3",key:"gq8acd"}]],qd=Ee("route",JPe);var QPe=[["path",{d:"m21 21-4.34-4.34",key:"14j7rj"}],["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}]],Jr=Ee("search",QPe);var eAe=[["rect",{width:"20",height:"8",x:"2",y:"2",rx:"2",ry:"2",key:"ngkwjq"}],["rect",{width:"20",height:"8",x:"2",y:"14",rx:"2",ry:"2",key:"iecqi9"}],["line",{x1:"6",x2:"6.01",y1:"6",y2:"6",key:"16zg32"}],["line",{x1:"6",x2:"6.01",y1:"18",y2:"18",key:"nzw8ys"}]],hk=Ee("server",eAe);var tAe=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Hd=Ee("settings",tAe);var rAe=[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],Oa=Ee("shield-check",rAe);var oAe=[["path",{d:"M12 19h8",key:"baeox8"}],["path",{d:"m4 17 6-6-6-6",key:"1yngyt"}]],vk=Ee("terminal",oAe);var nAe=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],ar=Ee("trash-2",nAe);var aAe=[["circle",{cx:"12",cy:"8",r:"5",key:"1hypcn"}],["path",{d:"M20 21a8 8 0 0 0-16 0",key:"rfgkzh"}]],Ms=Ee("user-round",aAe);var iAe=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],ft=Ee("x",iAe);var DA=z(ie()),sZ=z(ie());function oZ(e){var t,r,o="";if(typeof e=="string"||typeof e=="number")o+=e;else if(typeof e=="object")if(Array.isArray(e)){var n=e.length;for(t=0;t<n;t++)e[t]&&(r=oZ(e[t]))&&(o&&(o+=" "),o+=r)}else for(r in e)e[r]&&(o&&(o+=" "),o+=r);return o}function et(){for(var e,t,r=0,o="",n=arguments.length;r<n;r++)(e=arguments[r])&&(t=oZ(e))&&(o&&(o+=" "),o+=t);return o}var aZ=z(ie());var sAe=["dangerouslySetInnerHTML","onCopy","onCopyCapture","onCut","onCutCapture","onPaste","onPasteCapture","onCompositionEnd","onCompositionEndCapture","onCompositionStart","onCompositionStartCapture","onCompositionUpdate","onCompositionUpdateCapture","onFocus","onFocusCapture","onBlur","onBlurCapture","onChange","onChangeCapture","onBeforeInput","onBeforeInputCapture","onInput","onInputCapture","onReset","onResetCapture","onSubmit","onSubmitCapture","onInvalid","onInvalidCapture","onLoad","onLoadCapture","onError","onErrorCapture","onKeyDown","onKeyDownCapture","onKeyPress","onKeyPressCapture","onKeyUp","onKeyUpCapture","onAbort","onAbortCapture","onCanPlay","onCanPlayCapture","onCanPlayThrough","onCanPlayThroughCapture","onDurationChange","onDurationChangeCapture","onEmptied","onEmptiedCapture","onEncrypted","onEncryptedCapture","onEnded","onEndedCapture","onLoadedData","onLoadedDataCapture","onLoadedMetadata","onLoadedMetadataCapture","onLoadStart","onLoadStartCapture","onPause","onPauseCapture","onPlay","onPlayCapture","onPlaying","onPlayingCapture","onProgress","onProgressCapture","onRateChange","onRateChangeCapture","onSeeked","onSeekedCapture","onSeeking","onSeekingCapture","onStalled","onStalledCapture","onSuspend","onSuspendCapture","onTimeUpdate","onTimeUpdateCapture","onVolumeChange","onVolumeChangeCapture","onWaiting","onWaitingCapture","onAuxClick","onAuxClickCapture","onClick","onClickCapture","onContextMenu","onContextMenuCapture","onDoubleClick","onDoubleClickCapture","onDrag","onDragCapture","onDragEnd","onDragEndCapture","onDragEnter","onDragEnterCapture","onDragExit","onDragExitCapture","onDragLeave","onDragLeaveCapture","onDragOver","onDragOverCapture","onDragStart","onDragStartCapture","onDrop","onDropCapture","onMouseDown","onMouseDownCapture","onMouseEnter","onMouseLeave","onMouseMove","onMouseMoveCapture","onMouseOut","onMouseOutCapture","onMouseOver","onMouseOverCapture","onMouseUp","onMouseUpCapture","onSelect","onSelectCapture","onTouchCancel","onTouchCancelCapture","onTouchEnd","onTouchEndCapture","onTouchMove","onTouchMoveCapture","onTouchStart","onTouchStartCapture","onPointerDown","onPointerDownCapture","onPointerMove","onPointerMoveCapture","onPointerUp","onPointerUpCapture","onPointerCancel","onPointerCancelCapture","onPointerEnter","onPointerEnterCapture","onPointerLeave","onPointerLeaveCapture","onPointerOver","onPointerOverCapture","onPointerOut","onPointerOutCapture","onGotPointerCapture","onGotPointerCaptureCapture","onLostPointerCapture","onLostPointerCaptureCapture","onScroll","onScrollCapture","onWheel","onWheelCapture","onAnimationStart","onAnimationStartCapture","onAnimationEnd","onAnimationEndCapture","onAnimationIteration","onAnimationIterationCapture","onTransitionEnd","onTransitionEndCapture"];function ix(e){if(typeof e!="string")return!1;var t=sAe;return t.includes(e)}var nZ=z(ie()),lAe=["aria-activedescendant","aria-atomic","aria-autocomplete","aria-busy","aria-checked","aria-colcount","aria-colindex","aria-colspan","aria-controls","aria-current","aria-describedby","aria-details","aria-disabled","aria-errormessage","aria-expanded","aria-flowto","aria-haspopup","aria-hidden","aria-invalid","aria-keyshortcuts","aria-label","aria-labelledby","aria-level","aria-live","aria-modal","aria-multiline","aria-multiselectable","aria-orientation","aria-owns","aria-placeholder","aria-posinset","aria-pressed","aria-readonly","aria-relevant","aria-required","aria-roledescription","aria-rowcount","aria-rowindex","aria-rowspan","aria-selected","aria-setsize","aria-sort","aria-valuemax","aria-valuemin","aria-valuenow","aria-valuetext","className","color","height","id","lang","max","media","method","min","name","style","target","width","role","tabIndex","accentHeight","accumulate","additive","alignmentBaseline","allowReorder","alphabetic","amplitude","arabicForm","ascent","attributeName","attributeType","autoReverse","azimuth","baseFrequency","baselineShift","baseProfile","bbox","begin","bias","by","calcMode","capHeight","clip","clipPath","clipPathUnits","clipRule","colorInterpolation","colorInterpolationFilters","colorProfile","colorRendering","contentScriptType","contentStyleType","cursor","cx","cy","d","decelerate","descent","diffuseConstant","direction","display","divisor","dominantBaseline","dur","dx","dy","edgeMode","elevation","enableBackground","end","exponent","externalResourcesRequired","fill","fillOpacity","fillRule","filter","filterRes","filterUnits","floodColor","floodOpacity","focusable","fontFamily","fontSize","fontSizeAdjust","fontStretch","fontStyle","fontVariant","fontWeight","format","from","fx","fy","g1","g2","glyphName","glyphOrientationHorizontal","glyphOrientationVertical","glyphRef","gradientTransform","gradientUnits","hanging","horizAdvX","horizOriginX","href","ideographic","imageRendering","in2","in","intercept","k1","k2","k3","k4","k","kernelMatrix","kernelUnitLength","kerning","keyPoints","keySplines","keyTimes","lengthAdjust","letterSpacing","lightingColor","limitingConeAngle","local","markerEnd","markerHeight","markerMid","markerStart","markerUnits","markerWidth","mask","maskContentUnits","maskUnits","mathematical","mode","numOctaves","offset","opacity","operator","order","orient","orientation","origin","overflow","overlinePosition","overlineThickness","paintOrder","panose1","pathLength","patternContentUnits","patternTransform","patternUnits","pointerEvents","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","r","radius","refX","refY","renderingIntent","repeatCount","repeatDur","requiredExtensions","requiredFeatures","restart","result","rotate","rx","ry","seed","shapeRendering","slope","spacing","specularConstant","specularExponent","speed","spreadMethod","startOffset","stdDeviation","stemh","stemv","stitchTiles","stopColor","stopOpacity","strikethroughPosition","strikethroughThickness","string","stroke","strokeDasharray","strokeDashoffset","strokeLinecap","strokeLinejoin","strokeMiterlimit","strokeOpacity","strokeWidth","surfaceScale","systemLanguage","tableValues","targetX","targetY","textAnchor","textDecoration","textLength","textRendering","to","transform","u1","u2","underlinePosition","underlineThickness","unicode","unicodeBidi","unicodeRange","unitsPerEm","vAlphabetic","values","vectorEffect","version","vertAdvY","vertOriginX","vertOriginY","vHanging","vIdeographic","viewTarget","visibility","vMathematical","widths","wordSpacing","writingMode","x1","x2","x","xChannelSelector","xHeight","xlinkActuate","xlinkArcrole","xlinkHref","xlinkRole","xlinkShow","xlinkTitle","xlinkType","xmlBase","xmlLang","xmlns","xmlnsXlink","xmlSpace","y1","y2","y","yChannelSelector","z","zoomAndPan","ref","key","angle"],uAe=new Set(lAe);function VF(e){return typeof e!="string"?!1:uAe.has(e)}function UF(e){return typeof e=="string"&&e.startsWith("data-")}function Br(e){if(typeof e!="object"||e===null)return{};var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(VF(r)||UF(r))&&(t[r]=e[r]);return t}function Ea(e){if(e==null)return null;if((0,nZ.isValidElement)(e)&&typeof e.props=="object"&&e.props!==null){var t=e.props;return Br(t)}return typeof e=="object"&&!Array.isArray(e)?Br(e):null}function mr(e){var t={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(VF(r)||UF(r)||ix(r))&&(t[r]=e[r]);return t}function iZ(e){return e==null?null:(0,aZ.isValidElement)(e)?mr(e.props):typeof e=="object"&&!Array.isArray(e)?mr(e):null}var dAe=["children","width","height","viewBox","className","style","title","desc"];function WF(){return WF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},WF.apply(null,arguments)}function cAe(e,t){if(e==null)return{};var r,o,n=fAe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function fAe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var GF=(0,sZ.forwardRef)((e,t)=>{var{children:r,width:o,height:n,viewBox:a,className:i,style:s,title:l,desc:u}=e,d=cAe(e,dAe),c=a||{width:o,height:n,x:0,y:0},f=et("recharts-surface",i);return DA.createElement("svg",WF({},mr(d),{className:f,width:o,height:n,style:s,viewBox:"".concat(c.x," ").concat(c.y," ").concat(c.width," ").concat(c.height),ref:t}),DA.createElement("title",null,l),DA.createElement("desc",null,u),r)});var LA=z(ie());var pAe=["children","className"];function jF(){return jF=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},jF.apply(null,arguments)}function mAe(e,t){if(e==null)return{};var r,o,n=gAe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function gAe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var Jt=LA.forwardRef((e,t)=>{var{children:r,className:o}=e,n=mAe(e,pAe),a=et("recharts-layer",o);return LA.createElement("g",jF({className:a},mr(n),{ref:t}),r)});var zF=z(ie()),lZ=(0,zF.createContext)(null);var AZ=z(ie());function sr(e){return function(){return e}}var qF=Math.cos;var sx=Math.sin,Ko=Math.sqrt;var pp=Math.PI,nft=pp/2,yk=2*pp;var HF=Math.PI,KF=2*HF,mp=1e-6,kAe=KF-mp;function uZ(e){this._+=e[0];for(let t=1,r=e.length;t<r;++t)this._+=arguments[t]+e[t]}function MAe(e){let t=Math.floor(e);if(!(t>=0))throw new Error(`invalid digits: ${e}`);if(t>15)return uZ;let r=10**t;return function(o){this._+=o[0];for(let n=1,a=o.length;n<a;++n)this._+=Math.round(arguments[n]*r)/r+o[n]}}var gp=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=t==null?uZ:MAe(t)}moveTo(t,r){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,r){this._append`L${this._x1=+t},${this._y1=+r}`}quadraticCurveTo(t,r,o,n){this._append`Q${+t},${+r},${this._x1=+o},${this._y1=+n}`}bezierCurveTo(t,r,o,n,a,i){this._append`C${+t},${+r},${+o},${+n},${this._x1=+a},${this._y1=+i}`}arcTo(t,r,o,n,a){if(t=+t,r=+r,o=+o,n=+n,a=+a,a<0)throw new Error(`negative radius: ${a}`);let i=this._x1,s=this._y1,l=o-t,u=n-r,d=i-t,c=s-r,f=d*d+c*c;if(this._x1===null)this._append`M${this._x1=t},${this._y1=r}`;else if(f>mp)if(!(Math.abs(c*l-u*d)>mp)||!a)this._append`L${this._x1=t},${this._y1=r}`;else{let p=o-i,g=n-s,m=l*l+u*u,h=p*p+g*g,k=Math.sqrt(m),M=Math.sqrt(f),v=a*Math.tan((HF-Math.acos((m+f-h)/(2*k*M)))/2),b=v/M,w=v/k;Math.abs(b-1)>mp&&this._append`L${t+b*d},${r+b*c}`,this._append`A${a},${a},0,0,${+(c*p>d*g)},${this._x1=t+w*l},${this._y1=r+w*u}`}}arc(t,r,o,n,a,i){if(t=+t,r=+r,o=+o,i=!!i,o<0)throw new Error(`negative radius: ${o}`);let s=o*Math.cos(n),l=o*Math.sin(n),u=t+s,d=r+l,c=1^i,f=i?n-a:a-n;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>mp||Math.abs(this._y1-d)>mp)&&this._append`L${u},${d}`,o&&(f<0&&(f=f%KF+KF),f>kAe?this._append`A${o},${o},0,1,${c},${t-s},${r-l}A${o},${o},0,1,${c},${this._x1=u},${this._y1=d}`:f>mp&&this._append`A${o},${o},0,${+(f>=HF)},${c},${this._x1=t+o*Math.cos(a)},${this._y1=r+o*Math.sin(a)}`)}rect(t,r,o,n){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+r}h${o=+o}v${+n}h${-o}Z`}toString(){return this._}};function dZ(){return new gp}dZ.prototype=gp.prototype;function xk(e){let t=3;return e.digits=function(r){if(!arguments.length)return t;if(r==null)t=null;else{let o=Math.floor(r);if(!(o>=0))throw new RangeError(`invalid digits: ${r}`);t=o}return e},()=>new gp(t)}var fft=Array.prototype.slice;function bk(e){return typeof e=="object"&&"length"in e?e:Array.from(e)}function cZ(e){this._context=e}cZ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:this._context.lineTo(e,t);break}}};function Kd(e){return new cZ(e)}function RA(e){return e[0]}function NA(e){return e[1]}function lx(e,t){var r=sr(!0),o=null,n=Kd,a=null,i=xk(s);e=typeof e=="function"?e:e===void 0?RA:sr(e),t=typeof t=="function"?t:t===void 0?NA:sr(t);function s(l){var u,d=(l=bk(l)).length,c,f=!1,p;for(o==null&&(a=n(p=i())),u=0;u<=d;++u)!(u<d&&r(c=l[u],u,l))===f&&((f=!f)?a.lineStart():a.lineEnd()),f&&a.point(+e(c,u,l),+t(c,u,l));if(p)return a=null,p+""||null}return s.x=function(l){return arguments.length?(e=typeof l=="function"?l:sr(+l),s):e},s.y=function(l){return arguments.length?(t=typeof l=="function"?l:sr(+l),s):t},s.defined=function(l){return arguments.length?(r=typeof l=="function"?l:sr(!!l),s):r},s.curve=function(l){return arguments.length?(n=l,o!=null&&(a=n(o)),s):n},s.context=function(l){return arguments.length?(l==null?o=a=null:a=n(o=l),s):o},s}function wk(e,t,r){var o=null,n=sr(!0),a=null,i=Kd,s=null,l=xk(u);e=typeof e=="function"?e:e===void 0?RA:sr(+e),t=typeof t=="function"?t:t===void 0?sr(0):sr(+t),r=typeof r=="function"?r:r===void 0?NA:sr(+r);function u(c){var f,p,g,m=(c=bk(c)).length,h,k=!1,M,v=new Array(m),b=new Array(m);for(a==null&&(s=i(M=l())),f=0;f<=m;++f){if(!(f<m&&n(h=c[f],f,c))===k)if(k=!k)p=f,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),g=f-1;g>=p;--g)s.point(v[g],b[g]);s.lineEnd(),s.areaEnd()}k&&(v[f]=+e(h,f,c),b[f]=+t(h,f,c),s.point(o?+o(h,f,c):v[f],r?+r(h,f,c):b[f]))}if(M)return s=null,M+""||null}function d(){return lx().defined(n).curve(i).context(a)}return u.x=function(c){return arguments.length?(e=typeof c=="function"?c:sr(+c),o=null,u):e},u.x0=function(c){return arguments.length?(e=typeof c=="function"?c:sr(+c),u):e},u.x1=function(c){return arguments.length?(o=c==null?null:typeof c=="function"?c:sr(+c),u):o},u.y=function(c){return arguments.length?(t=typeof c=="function"?c:sr(+c),r=null,u):t},u.y0=function(c){return arguments.length?(t=typeof c=="function"?c:sr(+c),u):t},u.y1=function(c){return arguments.length?(r=c==null?null:typeof c=="function"?c:sr(+c),u):r},u.lineX0=u.lineY0=function(){return d().x(e).y(t)},u.lineY1=function(){return d().x(e).y(r)},u.lineX1=function(){return d().x(o).y(t)},u.defined=function(c){return arguments.length?(n=typeof c=="function"?c:sr(!!c),u):n},u.curve=function(c){return arguments.length?(i=c,a!=null&&(s=i(a)),u):i},u.context=function(c){return arguments.length?(c==null?a=s=null:s=i(a=c),u):a},u}var TA=class{constructor(t,r){this._context=t,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(t,r){switch(t=+t,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(t,r):this._context.moveTo(t,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,r,t,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,t,this._y0,t,r);break}}this._x0=t,this._y0=r}};function $F(e){return new TA(e,!0)}function YF(e){return new TA(e,!1)}var Ck={draw(e,t){let r=Ko(t/pp);e.moveTo(r,0),e.arc(0,0,r,0,yk)}};var ZF={draw(e,t){let r=Ko(t/5)/2;e.moveTo(-3*r,-r),e.lineTo(-r,-r),e.lineTo(-r,-3*r),e.lineTo(r,-3*r),e.lineTo(r,-r),e.lineTo(3*r,-r),e.lineTo(3*r,r),e.lineTo(r,r),e.lineTo(r,3*r),e.lineTo(-r,3*r),e.lineTo(-r,r),e.lineTo(-3*r,r),e.closePath()}};var fZ=Ko(1/3),hAe=fZ*2,XF={draw(e,t){let r=Ko(t/hAe),o=r*fZ;e.moveTo(0,-r),e.lineTo(o,0),e.lineTo(0,r),e.lineTo(-o,0),e.closePath()}};var JF={draw(e,t){let r=Ko(t),o=-r/2;e.rect(o,o,r,r)}};var vAe=.8908130915292852,pZ=sx(pp/10)/sx(7*pp/10),yAe=sx(yk/10)*pZ,xAe=-qF(yk/10)*pZ,QF={draw(e,t){let r=Ko(t*vAe),o=yAe*r,n=xAe*r;e.moveTo(0,-r),e.lineTo(o,n);for(let a=1;a<5;++a){let i=yk*a/5,s=qF(i),l=sx(i);e.lineTo(l*r,-s*r),e.lineTo(s*o-l*n,l*o+s*n)}e.closePath()}};var eB=Ko(3),tB={draw(e,t){let r=-Ko(t/(eB*3));e.moveTo(0,r*2),e.lineTo(-eB*r,-r),e.lineTo(eB*r,-r),e.closePath()}};var wi=-.5,Ci=Ko(3)/2,rB=1/Ko(12),bAe=(rB/2+1)*3,oB={draw(e,t){let r=Ko(t/bAe),o=r/2,n=r*rB,a=o,i=r*rB+r,s=-a,l=i;e.moveTo(o,n),e.lineTo(a,i),e.lineTo(s,l),e.lineTo(wi*o-Ci*n,Ci*o+wi*n),e.lineTo(wi*a-Ci*i,Ci*a+wi*i),e.lineTo(wi*s-Ci*l,Ci*s+wi*l),e.lineTo(wi*o+Ci*n,wi*n-Ci*o),e.lineTo(wi*a+Ci*i,wi*i-Ci*a),e.lineTo(wi*s+Ci*l,wi*l-Ci*s),e.closePath()}};function OA(e,t){let r=null,o=xk(n);e=typeof e=="function"?e:sr(e||Ck),t=typeof t=="function"?t:sr(t===void 0?64:+t);function n(){let a;if(r||(r=a=o()),e.apply(this,arguments).draw(r,+t.apply(this,arguments)),a)return r=null,a+""||null}return n.type=function(a){return arguments.length?(e=typeof a=="function"?a:sr(a),n):e},n.size=function(a){return arguments.length?(t=typeof a=="function"?a:sr(+a),n):t},n.context=function(a){return arguments.length?(r=a??null,n):r},n}function Sk(){}function Pk(e,t,r){e._context.bezierCurveTo((2*e._x0+e._x1)/3,(2*e._y0+e._y1)/3,(e._x0+2*e._x1)/3,(e._y0+2*e._y1)/3,(e._x0+4*e._x1+t)/6,(e._y0+4*e._y1+r)/6)}function mZ(e){this._context=e}mZ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:Pk(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:Pk(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function nB(e){return new mZ(e)}function gZ(e){this._context=e}gZ.prototype={areaStart:Sk,areaEnd:Sk,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._x2=e,this._y2=t;break;case 1:this._point=2,this._x3=e,this._y3=t;break;case 2:this._point=3,this._x4=e,this._y4=t,this._context.moveTo((this._x0+4*this._x1+e)/6,(this._y0+4*this._y1+t)/6);break;default:Pk(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function aB(e){return new gZ(e)}function kZ(e){this._context=e}kZ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+e)/6,o=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,o):this._context.moveTo(r,o);break;case 3:this._point=4;default:Pk(this,e,t);break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t}};function iB(e){return new kZ(e)}function MZ(e){this._context=e}MZ.prototype={areaStart:Sk,areaEnd:Sk,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(e,t){e=+e,t=+t,this._point?this._context.lineTo(e,t):(this._point=1,this._context.moveTo(e,t))}};function sB(e){return new MZ(e)}function hZ(e){return e<0?-1:1}function vZ(e,t,r){var o=e._x1-e._x0,n=t-e._x1,a=(e._y1-e._y0)/(o||n<0&&-0),i=(r-e._y1)/(n||o<0&&-0),s=(a*n+i*o)/(o+n);return(hZ(a)+hZ(i))*Math.min(Math.abs(a),Math.abs(i),.5*Math.abs(s))||0}function yZ(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function lB(e,t,r){var o=e._x0,n=e._y0,a=e._x1,i=e._y1,s=(a-o)/3;e._context.bezierCurveTo(o+s,n+s*t,a-s,i-s*r,a,i)}function EA(e){this._context=e}EA.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:lB(this,this._t0,yZ(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(e,t){var r=NaN;if(e=+e,t=+t,!(e===this._x1&&t===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;break;case 2:this._point=3,lB(this,yZ(this,r=vZ(this,e,t)),r);break;default:lB(this,this._t0,r=vZ(this,e,t));break}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}}};function xZ(e){this._context=new bZ(e)}(xZ.prototype=Object.create(EA.prototype)).point=function(e,t){EA.prototype.point.call(this,t,e)};function bZ(e){this._context=e}bZ.prototype={moveTo:function(e,t){this._context.moveTo(t,e)},closePath:function(){this._context.closePath()},lineTo:function(e,t){this._context.lineTo(t,e)},bezierCurveTo:function(e,t,r,o,n,a){this._context.bezierCurveTo(t,e,o,r,a,n)}};function uB(e){return new EA(e)}function dB(e){return new xZ(e)}function CZ(e){this._context=e}CZ.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var e=this._x,t=this._y,r=e.length;if(r)if(this._line?this._context.lineTo(e[0],t[0]):this._context.moveTo(e[0],t[0]),r===2)this._context.lineTo(e[1],t[1]);else for(var o=wZ(e),n=wZ(t),a=0,i=1;i<r;++a,++i)this._context.bezierCurveTo(o[0][a],n[0][a],o[1][a],n[1][a],e[i],t[i]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(e,t){this._x.push(+e),this._y.push(+t)}};function wZ(e){var t,r=e.length-1,o,n=new Array(r),a=new Array(r),i=new Array(r);for(n[0]=0,a[0]=2,i[0]=e[0]+2*e[1],t=1;t<r-1;++t)n[t]=1,a[t]=4,i[t]=4*e[t]+2*e[t+1];for(n[r-1]=2,a[r-1]=7,i[r-1]=8*e[r-1]+e[r],t=1;t<r;++t)o=n[t]/a[t-1],a[t]-=o,i[t]-=o*i[t-1];for(n[r-1]=i[r-1]/a[r-1],t=r-2;t>=0;--t)n[t]=(i[t]-n[t+1])/a[t];for(a[r-1]=(e[r]+n[r-1])/2,t=0;t<r-1;++t)a[t]=2*e[t+1]-n[t+1];return[n,a]}function cB(e){return new CZ(e)}function _A(e,t){this._context=e,this._t=t}_A.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(e,t){switch(e=+e,t=+t,this._point){case 0:this._point=1,this._line?this._context.lineTo(e,t):this._context.moveTo(e,t);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,t),this._context.lineTo(e,t);else{var r=this._x*(1-this._t)+e*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,t)}break}}this._x=e,this._y=t}};function fB(e){return new _A(e,.5)}function pB(e){return new _A(e,0)}function mB(e){return new _A(e,1)}function _a(e,t){if((i=e.length)>1)for(var r=1,o,n,a=e[t[0]],i,s=a.length;r<i;++r)for(n=a,a=e[t[r]],o=0;o<s;++o)a[o][1]+=a[o][0]=isNaN(n[o][1])?n[o][0]:n[o][1]}function Ak(e){for(var t=e.length,r=new Array(t);--t>=0;)r[t]=t;return r}function wAe(e,t){return e[t]}function CAe(e){let t=[];return t.key=e,t}function gB(){var e=sr([]),t=Ak,r=_a,o=wAe;function n(a){var i=Array.from(e.apply(this,arguments),CAe),s,l=i.length,u=-1,d;for(let c of a)for(s=0,++u;s<l;++s)(i[s][u]=[0,+o(c,i[s].key,u,a)]).data=c;for(s=0,d=bk(t(i));s<l;++s)i[d[s]].index=s;return r(i,d),i}return n.keys=function(a){return arguments.length?(e=typeof a=="function"?a:sr(Array.from(a)),n):e},n.value=function(a){return arguments.length?(o=typeof a=="function"?a:sr(+a),n):o},n.order=function(a){return arguments.length?(t=a==null?Ak:typeof a=="function"?a:sr(Array.from(a)),n):t},n.offset=function(a){return arguments.length?(r=a??_a,n):r},n}function kB(e,t){if((o=e.length)>0){for(var r,o,n=0,a=e[0].length,i;n<a;++n){for(i=r=0;r<o;++r)i+=e[r][n][1]||0;if(i)for(r=0;r<o;++r)e[r][n][1]/=i}_a(e,t)}}function MB(e,t){if((n=e.length)>0){for(var r=0,o=e[t[0]],n,a=o.length;r<a;++r){for(var i=0,s=0;i<n;++i)s+=e[i][r][1]||0;o[r][1]+=o[r][0]=-s/2}_a(e,t)}}function hB(e,t){if(!(!((i=e.length)>0)||!((a=(n=e[t[0]]).length)>0))){for(var r=0,o=1,n,a,i;o<a;++o){for(var s=0,l=0,u=0;s<i;++s){for(var d=e[t[s]],c=d[o][1]||0,f=d[o-1][1]||0,p=(c-f)/2,g=0;g<s;++g){var m=e[t[g]],h=m[o][1]||0,k=m[o-1][1]||0;p+=h-k}l+=c,u+=p*c}n[o-1][1]+=n[o-1][0]=r,l&&(r-=u/l)}n[o-1][1]+=n[o-1][0]=r,_a(e,t)}}function FA(e){return e==="__proto__"}function BA(e){switch(typeof e){case"number":case"symbol":return!1;case"string":return e.includes(".")||e.includes("[")||e.includes("]")}}function Ik(e){return typeof e=="string"||typeof e=="symbol"?e:Object.is(e?.valueOf?.(),-0)?"-0":String(e)}function vB(e){if(e==null)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.map(vB).join(",");let t=String(e);return t==="0"&&Object.is(Number(e),-0)?"-0":t}function Dk(e){if(Array.isArray(e))return e.map(Ik);if(typeof e=="symbol")return[e];e=vB(e);let t=[],r=e.length;if(r===0)return t;let o=0,n="",a="",i=!1;for(e.charCodeAt(0)===46&&(t.push(""),o++);o<r;){let s=e[o];a?s==="\\"&&o+1<r?(o++,n+=e[o]):s===a?a="":n+=s:i?s==='"'||s==="'"?a=s:s==="]"?(i=!1,t.push(n),n=""):n+=s:s==="["?(i=!0,n&&(t.push(n),n="")):s==="."?n&&(t.push(n),n=""):n+=s,o++}return n&&t.push(n),t}function $o(e,t,r){if(e==null)return r;switch(typeof t){case"string":{if(FA(t))return r;let o=e[t];return o===void 0?BA(t)?$o(e,Dk(t),r):r:o}case"number":case"symbol":{typeof t=="number"&&(t=Ik(t));let o=e[t];return o===void 0?r:o}default:{if(Array.isArray(t))return PAe(e,t,r);if(Object.is(t?.valueOf(),-0)?t="-0":t=String(t),FA(t))return r;let o=e[t];return o===void 0?r:o}}}function PAe(e,t,r){if(t.length===0)return r;let o=e;for(let n=0;n<t.length;n++){if(o==null||FA(t[n]))return r;o=o[t[n]]}return o===void 0?r:o}var AAe=4;function sl(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:AAe,r=10**t,o=Math.round(e*r)/r;return Object.is(o,-0)?0:o}function Nr(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),o=1;o<t;o++)r[o-1]=arguments[o];return e.reduce((n,a,i)=>{var s=r[i-1];return typeof s=="string"?n+s+a:s!==void 0?n+sl(s)+a:n+a},"")}var vr=e=>e===0?0:e>0?1:-1,Yo=e=>typeof e=="number"&&e!=+e,VA=e=>typeof e=="string"&&e.indexOf("%")===e.length-1,Be=e=>(typeof e=="number"||e instanceof Number)&&!Yo(e),jn=e=>Be(e)||typeof e=="string",IAe=0,iu=e=>{var t=++IAe;return"".concat(e||"").concat(t)},Qr=function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(!Be(t)&&typeof t!="string")return o;var a;if(VA(t)){if(r==null)return o;var i=t.indexOf("%");a=r*parseFloat(t.slice(0,i))/100}else a=+t;return Yo(a)&&(a=o),n&&r!=null&&a>r&&(a=r),a},yB=e=>{if(!Array.isArray(e))return!1;for(var t=e.length,r={},o=0;o<t;o++)if(!r[String(e[o])])r[String(e[o])]=!0;else return!0;return!1};function jt(e,t,r){return Be(e)&&Be(t)?sl(e+r*(t-e)):t}function UA(e,t,r){if(!(!e||!e.length))return e.find(o=>o&&(typeof t=="function"?t(o):$o(o,t))===r)}var Rt=e=>e===null||typeof e>"u",su=e=>Rt(e)?e:"".concat(e.charAt(0).toUpperCase()).concat(e.slice(1));function un(e){return e!=null}function Fa(){}var DAe=["type","size","sizeType"];function xB(){return xB=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},xB.apply(null,arguments)}function SZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function PZ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?SZ(Object(r),!0).forEach(function(o){LAe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):SZ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function LAe(e,t,r){return(t=RAe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function RAe(e){var t=NAe(e,"string");return typeof t=="symbol"?t:t+""}function NAe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function TAe(e,t){if(e==null)return{};var r,o,n=OAe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OAe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var IZ={symbolCircle:Ck,symbolCross:ZF,symbolDiamond:XF,symbolSquare:JF,symbolStar:QF,symbolTriangle:tB,symbolWye:oB},EAe=Math.PI/180,_Ae=e=>{var t="symbol".concat(su(e));return IZ[t]||Ck},FAe=(e,t,r)=>{if(t==="area")return e;switch(r){case"cross":return 5*e*e/9;case"diamond":return .5*e*e/Math.sqrt(3);case"square":return e*e;case"star":{var o=18*EAe;return 1.25*e*e*(Math.tan(o)-Math.tan(o*2)*Math.tan(o)**2)}case"triangle":return Math.sqrt(3)*e*e/4;case"wye":return(21-10*Math.sqrt(3))*e*e/8;default:return Math.PI*e*e/4}},BAe=(e,t)=>{IZ["symbol".concat(su(e))]=t},bB=e=>{var{type:t="circle",size:r=64,sizeType:o="area"}=e,n=TAe(e,DAe),a=PZ(PZ({},n),{},{type:t,size:r,sizeType:o}),i="circle";typeof t=="string"&&(i=t);var s=()=>{var f=_Ae(i),p=OA().type(f).size(FAe(r,o,i)),g=p();if(g!==null)return g},{className:l,cx:u,cy:d}=a,c=mr(a);return Be(u)&&Be(d)&&Be(r)?AZ.createElement("path",xB({},c,{className:et("recharts-symbols",l),transform:"translate(".concat(u,", ").concat(d,")"),d:s()})):null};bB.registerSymbol=BAe;var DZ=z(ie());var WA=e=>"radius"in e&&"startAngle"in e&&"endAngle"in e,Lk=(e,t)=>{if(!e||typeof e=="function"||typeof e=="boolean")return null;var r=e;if((0,DZ.isValidElement)(e)&&(r=e.props),typeof r!="object"&&typeof r!="function")return null;var o={};return Object.keys(r).forEach(n=>{ix(n)&&typeof r[n]=="function"&&(o[n]=t||(a=>r[n](r,a)))}),o},VAe=(e,t,r)=>o=>(e(t,r,o),null),kp=(e,t,r)=>{if(e===null||typeof e!="object"&&typeof e!="function")return null;var o=null;return Object.keys(e).forEach(n=>{var a=e[n];ix(n)&&typeof a=="function"&&(o||(o={}),o[n]=VAe(a,t,r))}),o};function LZ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function UAe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?LZ(Object(r),!0).forEach(function(o){WAe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):LZ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function WAe(e,t,r){return(t=GAe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function GAe(e){var t=jAe(e,"string");return typeof t=="symbol"?t:t+""}function jAe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function _t(e,t){var r=UAe({},e),o=t,n=Object.keys(t),a=n.reduce((i,s)=>(i[s]===void 0&&o[s]!==void 0&&(i[s]=o[s]),i),r);return a}function RZ(e,t){let r=new Map;for(let o=0;o<e.length;o++){let n=e[o],a=t(n,o,e);r.has(a)||r.set(a,n)}return Array.from(r.values())}function NZ(e,t){return function(...r){return e.apply(this,r.slice(0,t))}}function GA(e){return e}function TZ(e){return function(t){return $o(t,e)}}function ux(e){return e==null||typeof e!="object"&&typeof e!="function"}function OZ(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function EZ(e){return Object.getOwnPropertySymbols(e).filter(t=>Object.prototype.propertyIsEnumerable.call(e,t))}function Rk(e){return e==null?e===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(e)}var _Z="[object RegExp]",jA="[object String]",zA="[object Number]",qA="[object Boolean]",HA="[object Arguments]",FZ="[object Symbol]",BZ="[object Date]",VZ="[object Map]",UZ="[object Set]",WZ="[object Array]";var GZ="[object ArrayBuffer]",jZ="[object Object]";var zZ="[object DataView]",qZ="[object Uint8Array]",HZ="[object Uint8ClampedArray]",KZ="[object Uint16Array]",$Z="[object Uint32Array]";var YZ="[object Int8Array]",ZZ="[object Int16Array]",XZ="[object Int32Array]";var JZ="[object Float32Array]",QZ="[object Float64Array]";var wB=typeof globalThis=="object"&&globalThis||typeof window=="object"&&window||typeof self=="object"&&self||typeof global=="object"&&global||(function(){return this})();function eX(e){return typeof wB.Buffer<"u"&&wB.Buffer.isBuffer(e)}function tX(e,t){return $d(e,void 0,e,new Map,t)}function $d(e,t,r,o=new Map,n=void 0){let a=n?.(e,t,r,o);if(a!==void 0)return a;if(ux(e))return e;if(o.has(e))return o.get(e);if(Array.isArray(e)){let i=new Array(e.length);o.set(e,i);for(let s=0;s<e.length;s++)i[s]=$d(e[s],s,r,o,n);return Object.hasOwn(e,"index")&&(i.index=e.index),Object.hasOwn(e,"input")&&(i.input=e.input),i}if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp){let i=new RegExp(e.source,e.flags);return i.lastIndex=e.lastIndex,i}if(e instanceof Map){let i=new Map;o.set(e,i);for(let[s,l]of e)i.set(s,$d(l,s,r,o,n));return i}if(e instanceof Set){let i=new Set;o.set(e,i);for(let s of e)i.add($d(s,void 0,r,o,n));return i}if(eX(e))return e.subarray();if(OZ(e)){let i=new(Object.getPrototypeOf(e)).constructor(e.length);o.set(e,i);for(let s=0;s<e.length;s++)i[s]=$d(e[s],s,r,o,n);return i}if(e instanceof ArrayBuffer||typeof SharedArrayBuffer<"u"&&e instanceof SharedArrayBuffer)return e.slice(0);if(e instanceof DataView){let i=new DataView(e.buffer.slice(0),e.byteOffset,e.byteLength);return o.set(e,i),Si(i,e,r,o,n),i}if(typeof File<"u"&&e instanceof File){let i=new File([e],e.name,{type:e.type});return o.set(e,i),Si(i,e,r,o,n),i}if(typeof Blob<"u"&&e instanceof Blob){let i=new Blob([e],{type:e.type});return o.set(e,i),Si(i,e,r,o,n),i}if(e instanceof Error){let i=structuredClone(e);return o.set(e,i),i.message=e.message,i.name=e.name,i.stack=e.stack,i.cause=e.cause,i.constructor=e.constructor,Si(i,e,r,o,n),i}if(e instanceof Boolean){let i=new Boolean(e.valueOf());return o.set(e,i),Si(i,e,r,o,n),i}if(e instanceof Number){let i=new Number(e.valueOf());return o.set(e,i),Si(i,e,r,o,n),i}if(e instanceof String){let i=new String(e.valueOf());return o.set(e,i),Si(i,e,r,o,n),i}if(typeof e=="object"&&zAe(e)){let i=Object.create(Object.getPrototypeOf(e));return o.set(e,i),Si(i,e,r,o,n),i}return e}function Si(e,t,r=e,o,n){let a=[...Object.keys(t),...EZ(t)];for(let i=0;i<a.length;i++){let s=a[i],l=Object.getOwnPropertyDescriptor(e,s);(l==null||l.writable)&&(e[s]=$d(t[s],s,r,o,n))}}function zAe(e){switch(Rk(e)){case HA:case WZ:case GZ:case zZ:case qA:case BZ:case JZ:case QZ:case YZ:case ZZ:case XZ:case VZ:case zA:case jZ:case _Z:case UZ:case jA:case FZ:case qZ:case HZ:case KZ:case $Z:return!0;default:return!1}}function rX(e){return $d(e,void 0,e,new Map,void 0)}function dx(e,t){return e===t||Number.isNaN(e)&&Number.isNaN(t)}function KA(e){return e!==null&&(typeof e=="object"||typeof e=="function")}function SB(e,t,r){return typeof r!="function"?SB(e,t,()=>{}):CB(e,t,function o(n,a,i,s,l,u){let d=r(n,a,i,s,l,u);return d!==void 0?!!d:CB(n,a,o,u)},new Map)}function CB(e,t,r,o){if(t===e)return!0;switch(typeof t){case"object":return qAe(e,t,r,o);case"function":return Object.keys(t).length>0?CB(e,{...t},r,o):dx(e,t);default:return KA(e)?typeof t=="string"?t==="":!0:dx(e,t)}}function qAe(e,t,r,o){if(t==null)return!0;if(Array.isArray(t))return oX(e,t,r,o);if(t instanceof Map)return HAe(e,t,r,o);if(t instanceof Set)return KAe(e,t,r,o);let n=Object.keys(t);if(e==null||ux(e))return n.length===0;if(n.length===0)return!0;if(o?.has(t))return o.get(t)===e;o?.set(t,e);try{for(let a=0;a<n.length;a++){let i=n[a];if(!ux(e)&&!(i in e)||t[i]===void 0&&e[i]!==void 0||t[i]===null&&e[i]!==null||!r(e[i],t[i],i,e,t,o))return!1}return!0}finally{o?.delete(t)}}function HAe(e,t,r,o){if(t.size===0)return!0;if(!(e instanceof Map))return!1;for(let[n,a]of t.entries())if(r(e.get(n),a,n,e,t,o)===!1)return!1;return!0}function oX(e,t,r,o){if(t.length===0)return!0;if(!Array.isArray(e))return!1;let n=new Set;for(let a=0;a<t.length;a++){let i=t[a],s=!1;for(let l=0;l<e.length;l++){if(n.has(l))continue;let u=e[l],d=!1;if(r(u,i,a,e,t,o)&&(d=!0),d){n.add(l),s=!0;break}}if(!s)return!1}return!0}function KAe(e,t,r,o){return t.size===0?!0:e instanceof Set?oX([...e],[...t],r,o):!1}function $A(e,t){return SB(e,t,()=>{})}function nX(e){return e=rX(e),t=>$A(t,e)}function aX(e,t){return tX(e,(r,o,n,a)=>{let i=t?.(r,o,n,a);if(i!==void 0)return i;if(typeof e=="object"){if(Rk(e)==="[object Object]"&&typeof e.constructor!="function"){let s={};return a.set(e,s),Si(s,e,n,a),s}switch(Object.prototype.toString.call(e)){case zA:case jA:case qA:{let s=new e.constructor(e?.valueOf());return Si(s,e),s}case HA:{let s={};return Si(s,e),s.length=e.length,s[Symbol.iterator]=e[Symbol.iterator],s}default:return}}})}function iX(e){return aX(e)}var $Ae=/^(?:0|[1-9]\d*)$/;function YA(e,t=Number.MAX_SAFE_INTEGER){switch(typeof e){case"number":return Number.isInteger(e)&&e>=0&&e<t;case"symbol":return!1;case"string":return $Ae.test(e)}}function sX(e){return e!==null&&typeof e=="object"&&Rk(e)==="[object Arguments]"}function lX(e,t){let r;if(Array.isArray(t)?r=t:typeof t=="string"&&BA(t)&&e?.[t]==null?r=Dk(t):r=[t],r.length===0)return!1;let o=e;for(let n=0;n<r.length;n++){let a=r[n];if((o==null||!Object.hasOwn(o,a))&&!((Array.isArray(o)||sX(o))&&YA(a)&&a<o.length))return!1;o=o[a]}return!0}function uX(e,t){switch(typeof e){case"object":Object.is(e?.valueOf(),-0)&&(e="-0");break;case"number":e=Ik(e);break}return t=iX(t),function(r){let o=$o(r,e);return o===void 0?lX(r,e):t===void 0?o===void 0:$A(o,t)}}function dX(e){if(e==null)return GA;switch(typeof e){case"function":return e;case"object":return Array.isArray(e)&&e.length===2?uX(e[0],e[1]):nX(e);case"string":case"symbol":case"number":return TZ(e)}}function cX(e){return Number.isSafeInteger(e)&&e>=0}function ZA(e){return e!=null&&typeof e!="function"&&cX(e.length)}function fX(e){return typeof e=="object"&&e!==null}function pX(e){return fX(e)&&ZA(e)}function XA(e,t=GA){return pX(e)?RZ(Array.from(e),NZ(dX(t),1)):[]}function mX(e,t,r){return t===!0?XA(e,r):typeof t=="function"?XA(e,t):e}var CX=z(bX()),fx=z(ie());var wX=z(ie()),cx=(0,wX.createContext)(null);var fIe=e=>e,Mt=()=>{var e=(0,fx.useContext)(cx);return e?e.store.dispatch:fIe},QA=()=>{},pIe=()=>QA,mIe=(e,t)=>e===t;function Ve(e){var t=(0,fx.useContext)(cx),r=(0,fx.useMemo)(()=>t?o=>{if(o!=null)return e(o)}:QA,[t,e]);return(0,CX.useSyncExternalStoreWithSelector)(t?t.subscription.addNestedSub:pIe,t?t.store.getState:QA,t?t.store.getState:QA,r,mIe)}function gIe(e,t=`expected a function, instead received ${typeof e}`){if(typeof e!="function")throw new TypeError(t)}function kIe(e,t=`expected an object, instead received ${typeof e}`){if(typeof e!="object")throw new TypeError(t)}function MIe(e,t="expected all items to be functions, instead received the following types: "){if(!e.every(r=>typeof r=="function")){let r=e.map(o=>typeof o=="function"?`function ${o.name||"unnamed"}()`:typeof o).join(", ");throw new TypeError(`${t}[${r}]`)}}var SX=e=>Array.isArray(e)?e:[e];function hIe(e){let t=Array.isArray(e[0])?e[0]:e;return MIe(t,"createSelector expects all input-selectors to be functions, but received the following types: "),t}function vIe(e,t){let r=[],{length:o}=e;for(let n=0;n<o;n++)r.push(e[n].apply(null,t));return r}var $gt=Object.getPrototypeOf({});var yIe=class{constructor(e){this.value=e}deref(){return this.value}},xIe=typeof WeakRef<"u"?WeakRef:yIe,bIe=0,PX=1;function eI(){return{s:bIe,v:void 0,o:null,p:null}}function AX(e,t={}){let r=eI(),{resultEqualityCheck:o}=t,n,a=0;function i(){let s=r,{length:l}=arguments;for(let c=0,f=l;c<f;c++){let p=arguments[c];if(typeof p=="function"||typeof p=="object"&&p!==null){let g=s.o;g===null&&(s.o=g=new WeakMap);let m=g.get(p);m===void 0?(s=eI(),g.set(p,s)):s=m}else{let g=s.p;g===null&&(s.p=g=new Map);let m=g.get(p);m===void 0?(s=eI(),g.set(p,s)):s=m}}let u=s,d;if(s.s===PX)d=s.v;else if(d=e.apply(null,arguments),a++,o){let c=n?.deref?.()??n;c!=null&&o(c,d)&&(d=c,a!==0&&a--),n=typeof d=="object"&&d!==null||typeof d=="function"?new xIe(d):d}return u.s=PX,u.v=d,d}return i.clearCache=()=>{r=eI(),i.resetResultsCount()},i.resultsCount=()=>a,i.resetResultsCount=()=>{a=0},i}function wIe(e,...t){let r=typeof e=="function"?{memoize:e,memoizeOptions:t}:e,o=(...n)=>{let a=0,i=0,s,l={},u=n.pop();typeof u=="object"&&(l=u,u=n.pop()),gIe(u,`createSelector expects an output function after the inputs, but received: [${typeof u}]`);let d={...r,...l},{memoize:c,memoizeOptions:f=[],argsMemoize:p=AX,argsMemoizeOptions:g=[],devModeChecks:m={}}=d,h=SX(f),k=SX(g),M=hIe(n),v=c(function(){return a++,u.apply(null,arguments)},...h),b=!0,w=p(function(){i++;let L=vIe(M,arguments);return s=v.apply(null,L),s},...k);return Object.assign(w,{resultFunc:u,memoizedResultFunc:v,dependencies:M,dependencyRecomputations:()=>i,resetDependencyRecomputations:()=>{i=0},lastResult:()=>s,recomputations:()=>a,resetRecomputations:()=>{a=0},memoize:c,argsMemoize:p})};return Object.assign(o,{withTypes:()=>o}),o}var te=wIe(AX),CIe=Object.assign((e,t=te)=>{kIe(e,`createStructuredSelector expects first argument to be an object where each property is a selector, instead received a ${typeof e}`);let r=Object.keys(e),o=r.map(a=>e[a]);return t(o,(...a)=>a.reduce((i,s,l)=>(i[r[l]]=s,i),{}))},{withTypes:()=>CIe});function IX(e,t=1){let r=[],o=Math.floor(t),n=(a,i)=>{for(let s=0;s<a.length;s++){let l=a[s];Array.isArray(l)&&i<o?n(l,i+1):r.push(l)}};return n(e,0),r}function px(e,t,r){return KA(r)&&(typeof t=="number"&&ZA(r)&&YA(t)&&t<r.length||typeof t=="string"&&t in r)?dx(r[t],e):!1}function DX(e){return typeof e=="symbol"?1:e===null?2:e===void 0?3:e!==e?4:0}var LX=(e,t,r)=>{if(e!==t){let o=DX(e),n=DX(t);if(o===n&&o===0){if(e<t)return r==="desc"?1:-1;if(e>t)return r==="desc"?-1:1}return r==="desc"?n-o:o-n}return 0};function tI(e){return typeof e=="symbol"||e instanceof Symbol}var SIe=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,PIe=/^\w*$/;function RX(e,t){return Array.isArray(e)?!1:typeof e=="number"||typeof e=="boolean"||e==null||tI(e)?!0:typeof e=="string"&&(PIe.test(e)||!SIe.test(e))||t!=null&&Object.hasOwn(t,e)}function NX(e,t,r,o){if(e==null)return[];r=o?void 0:r,Array.isArray(e)||(e=Object.values(e)),Array.isArray(t)||(t=t==null?[null]:[t]),t.length===0&&(t=[null]),Array.isArray(r)||(r=r==null?[]:[r]),r=r.map(s=>String(s));let n=(s,l)=>{let u=s;for(let d=0;d<l.length&&u!=null;++d)u=u[l[d]];return u},a=(s,l)=>l==null||s==null?l:typeof s=="object"&&"key"in s?Object.hasOwn(l,s.key)?l[s.key]:n(l,s.path):typeof s=="function"?s(l):Array.isArray(s)?n(l,s):typeof l=="object"?l[s]:l,i=t.map(s=>(Array.isArray(s)&&s.length===1&&(s=s[0]),s==null||typeof s=="function"||Array.isArray(s)||RX(s)?s:{key:s,path:Dk(s)}));return e.map(s=>({original:s,criteria:i.map(l=>a(l,s))})).slice().sort((s,l)=>{for(let u=0;u<i.length;u++){let d=LX(s.criteria[u],l.criteria[u],r[u]);if(d!==0)return d}return 0}).map(s=>s.original)}function lu(e,...t){let r=t.length;return r>1&&px(e,t[0],t[1])?t=[]:r>2&&px(t[0],t[1],t[2])&&(t=[t[0]]),NX(e,IX(t),["asc"])}var AB=e=>e.legend.settings,TX=e=>e.legend.size,AIe=e=>e.legend.payload,vkt=te([AIe,AB],(e,t)=>{var{itemSorter:r}=t,o=e.flat(1);return r?lu(o,r):o});var oI=z(ie()),rI=1;function OX(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],[t,r]=(0,oI.useState)({height:0,left:0,top:0,width:0}),o=(0,oI.useCallback)(n=>{if(n!=null){var a=n.getBoundingClientRect(),i={height:a.height,left:a.left,top:a.top,width:a.width};(Math.abs(i.height-t.height)>rI||Math.abs(i.left-t.left)>rI||Math.abs(i.top-t.top)>rI||Math.abs(i.width-t.width)>rI)&&r({height:i.height,left:i.left,top:i.top,width:i.width})}},[t.width,t.height,t.top,t.left,...e]);return[t,o]}var zJ=z(ie());function dn(e){return`Minified Redux error #${e}; visit https://redux.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var IIe=typeof Symbol=="function"&&Symbol.observable||"@@observable",EX=IIe,IB=()=>Math.random().toString(36).substring(7).split("").join("."),DIe={INIT:`@@redux/INIT${IB()}`,REPLACE:`@@redux/REPLACE${IB()}`,PROBE_UNKNOWN_ACTION:()=>`@@redux/PROBE_UNKNOWN_ACTION${IB()}`},nI=DIe;function aI(e){if(typeof e!="object"||e===null)return!1;let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t||Object.getPrototypeOf(e)===null}function DB(e,t,r){if(typeof e!="function")throw new Error(dn(2));if(typeof t=="function"&&typeof r=="function"||typeof r=="function"&&typeof arguments[3]=="function")throw new Error(dn(0));if(typeof t=="function"&&typeof r>"u"&&(r=t,t=void 0),typeof r<"u"){if(typeof r!="function")throw new Error(dn(1));return r(DB)(e,t)}let o=e,n=t,a=new Map,i=a,s=0,l=!1;function u(){i===a&&(i=new Map,a.forEach((h,k)=>{i.set(k,h)}))}function d(){if(l)throw new Error(dn(3));return n}function c(h){if(typeof h!="function")throw new Error(dn(4));if(l)throw new Error(dn(5));let k=!0;u();let M=s++;return i.set(M,h),function(){if(k){if(l)throw new Error(dn(6));k=!1,u(),i.delete(M),a=null}}}function f(h){if(!aI(h))throw new Error(dn(7));if(typeof h.type>"u")throw new Error(dn(8));if(typeof h.type!="string")throw new Error(dn(17));if(l)throw new Error(dn(9));try{l=!0,n=o(n,h)}finally{l=!1}return(a=i).forEach(M=>{M()}),h}function p(h){if(typeof h!="function")throw new Error(dn(10));o=h,f({type:nI.REPLACE})}function g(){let h=c;return{subscribe(k){if(typeof k!="object"||k===null)throw new Error(dn(11));function M(){let b=k;b.next&&b.next(d())}return M(),{unsubscribe:h(M)}},[EX](){return this}}}return f({type:nI.INIT}),{dispatch:f,subscribe:c,getState:d,replaceReducer:p,[EX]:g}}function LIe(e){Object.keys(e).forEach(t=>{let r=e[t];if(typeof r(void 0,{type:nI.INIT})>"u")throw new Error(dn(12));if(typeof r(void 0,{type:nI.PROBE_UNKNOWN_ACTION()})>"u")throw new Error(dn(13))})}function iI(e){let t=Object.keys(e),r={};for(let i=0;i<t.length;i++){let s=t[i];typeof e[s]=="function"&&(r[s]=e[s])}let o=Object.keys(r),n,a;try{LIe(r)}catch(i){a=i}return function(s={},l){if(a)throw a;let u=!1,d={};for(let c=0;c<o.length;c++){let f=o[c],p=r[f],g=s[f],m=p(g,l);if(typeof m>"u"){let h=l&&l.type;throw new Error(dn(14))}d[f]=m,u=u||m!==g}return u=u||o.length!==Object.keys(s).length,u?d:s}}function mx(...e){return e.length===0?t=>t:e.length===1?e[0]:e.reduce((t,r)=>(...o)=>t(r(...o)))}function _X(...e){return t=>(r,o)=>{let n=t(r,o),a=()=>{throw new Error(dn(15))},i={getState:n.getState,dispatch:(l,...u)=>a(l,...u)},s=e.map(l=>l(i));return a=mx(...s)(n.dispatch),{...n,dispatch:a}}}function LB(e){return aI(e)&&"type"in e&&typeof e.type=="string"}var HX=Symbol.for("immer-nothing"),FX=Symbol.for("immer-draftable"),zn=Symbol.for("immer-state");function hs(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Ba=Object,Ok=Ba.getPrototypeOf,dI="constructor",kI="prototype",TB="configurable",cI="enumerable",lI="writable",gx="value",ll=e=>!!e&&!!e[zn];function Pi(e){return e?KX(e)||hI(e)||!!e[FX]||!!e[dI]?.[FX]||vI(e)||yI(e):!1}var RIe=Ba[kI][dI].toString(),BX=new WeakMap;function KX(e){if(!e||!WB(e))return!1;let t=Ok(e);if(t===null||t===Ba[kI])return!0;let r=Ba.hasOwnProperty.call(t,dI)&&t[dI];if(r===Object)return!0;if(!Tk(r))return!1;let o=BX.get(r);return o===void 0&&(o=Function.toString.call(r),BX.set(r,o)),o===RIe}function MI(e,t,r=!0){hx(e)===0?(r?Reflect.ownKeys(e):Ba.keys(e)).forEach(n=>{t(n,e[n],e)}):e.forEach((o,n)=>t(n,o,e))}function hx(e){let t=e[zn];return t?t.type_:hI(e)?1:vI(e)?2:yI(e)?3:0}var VX=(e,t,r=hx(e))=>r===2?e.has(t):Ba[kI].hasOwnProperty.call(e,t),OB=(e,t,r=hx(e))=>r===2?e.get(t):e[t],fI=(e,t,r,o=hx(e))=>{o===2?e.set(t,r):o===3?e.add(r):e[t]=r};function NIe(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}var hI=Array.isArray,vI=e=>e instanceof Map,yI=e=>e instanceof Set,WB=e=>typeof e=="object",Tk=e=>typeof e=="function",RB=e=>typeof e=="boolean";function TIe(e){let t=+e;return Number.isInteger(t)&&String(t)===e}var uu=e=>e.copy_||e.base_;var GB=e=>e.modified_?e.copy_:e.base_;function EB(e,t){if(vI(e))return new Map(e);if(yI(e))return new Set(e);if(hI(e))return Array[kI].slice.call(e);let r=KX(e);if(t===!0||t==="class_only"&&!r){let o=Ba.getOwnPropertyDescriptors(e);delete o[zn];let n=Reflect.ownKeys(o);for(let a=0;a<n.length;a++){let i=n[a],s=o[i];s[lI]===!1&&(s[lI]=!0,s[TB]=!0),(s.get||s.set)&&(o[i]={[TB]:!0,[lI]:!0,[cI]:s[cI],[gx]:e[i]})}return Ba.create(Ok(e),o)}else{let o=Ok(e);if(o!==null&&r)return{...e};let n=Ba.create(o);return Ba.assign(n,e)}}function jB(e,t=!1){return xI(e)||ll(e)||!Pi(e)||(hx(e)>1&&Ba.defineProperties(e,{set:sI,add:sI,clear:sI,delete:sI}),Ba.freeze(e),t&&MI(e,(r,o)=>{jB(o,!0)},!1)),e}function OIe(){hs(2)}var sI={[gx]:OIe};function xI(e){return e===null||!WB(e)?!0:Ba.isFrozen(e)}var pI="MapSet",_B="Patches",UX="ArrayMethods",$X={};function Mp(e){let t=$X[e];return t||hs(0,e),t}var WX=e=>!!$X[e];var kx,YX=()=>kx,EIe=(e,t)=>({drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0,handledSet_:new Set,processedForPatches_:new Set,mapSetPlugin_:WX(pI)?Mp(pI):void 0,arrayMethodsPlugin_:WX(UX)?Mp(UX):void 0});function GX(e,t){t&&(e.patchPlugin_=Mp(_B),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function FB(e){BB(e),e.drafts_.forEach(_Ie),e.drafts_=null}function BB(e){e===kx&&(kx=e.parent_)}var jX=e=>kx=EIe(kx,e);function _Ie(e){let t=e[zn];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function zX(e,t){t.unfinalizedDrafts_=t.drafts_.length;let r=t.drafts_[0];if(e!==void 0&&e!==r){r[zn].modified_&&(FB(t),hs(4)),Pi(e)&&(e=qX(t,e));let{patchPlugin_:n}=t;n&&n.generateReplacementPatches_(r[zn].base_,e,t)}else e=qX(t,r);return FIe(t,e,!0),FB(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==HX?e:void 0}function qX(e,t){if(xI(t))return t;let r=t[zn];if(!r)return mI(t,e.handledSet_,e);if(!bI(r,e))return t;if(!r.modified_)return r.base_;if(!r.finalized_){let{callbacks_:o}=r;if(o)for(;o.length>0;)o.pop()(e);JX(r,e)}return r.copy_}function FIe(e,t,r=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&jB(t,r)}function ZX(e){e.finalized_=!0,e.scope_.unfinalizedDrafts_--}var bI=(e,t)=>e.scope_===t,BIe=[];function XX(e,t,r,o){let n=uu(e),a=e.type_;if(o!==void 0&&OB(n,o,a)===t){fI(n,o,r,a);return}if(!e.draftLocations_){let s=e.draftLocations_=new Map;MI(n,(l,u)=>{if(ll(u)){let d=s.get(u)||[];d.push(l),s.set(u,d)}})}let i=e.draftLocations_.get(t)??BIe;for(let s of i)fI(n,s,r,a)}function VIe(e,t,r){e.callbacks_.push(function(n){let a=t;if(!a||!bI(a,n))return;n.mapSetPlugin_?.fixSetContents(a);let i=GB(a);XX(e,a.draft_??a,i,r),JX(a,n)})}function JX(e,t){if(e.modified_&&!e.finalized_&&(e.type_===3||e.type_===1&&e.allIndicesReassigned_||(e.assigned_?.size??0)>0)){let{patchPlugin_:o}=t;if(o){let n=o.getPath(e);n&&o.generatePatches_(e,n,t)}ZX(e)}}function UIe(e,t,r){let{scope_:o}=e;if(ll(r)){let n=r[zn];bI(n,o)&&n.callbacks_.push(function(){uI(e);let i=GB(n);XX(e,r,i,t)})}else Pi(r)&&e.callbacks_.push(function(){let a=uu(e);e.type_===3?a.has(r)&&mI(r,o.handledSet_,o):OB(a,t,e.type_)===r&&o.drafts_.length>1&&(e.assigned_.get(t)??!1)===!0&&e.copy_&&mI(OB(e.copy_,t,e.type_),o.handledSet_,o)})}function mI(e,t,r){return!r.immer_.autoFreeze_&&r.unfinalizedDrafts_<1||ll(e)||t.has(e)||!Pi(e)||xI(e)||(t.add(e),MI(e,(o,n)=>{if(ll(n)){let a=n[zn];if(bI(a,r)){let i=GB(a);fI(e,o,i,e.type_),ZX(a)}}else Pi(n)&&mI(n,t,r)})),e}function WIe(e,t){let r=hI(e),o={type_:r?1:0,scope_:t?t.scope_:YX(),modified_:!1,finalized_:!1,assigned_:void 0,parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1,callbacks_:void 0},n=o,a=gI;r&&(n=[o],a=Mx);let{revoke:i,proxy:s}=Proxy.revocable(n,a);return o.draft_=s,o.revoke_=i,[s,o]}var gI={get(e,t){if(t===zn)return e;let r=e.scope_.arrayMethodsPlugin_,o=e.type_===1&&typeof t=="string";if(o&&r?.isArrayOperationMethod(t))return r.createMethodInterceptor(e,t);let n=uu(e);if(!VX(n,t,e.type_))return GIe(e,n,t);let a=n[t];if(e.finalized_||!Pi(a)||o&&e.operationMethod&&r?.isMutatingArrayMethod(e.operationMethod)&&TIe(t))return a;if(a===NB(e.base_,t)){uI(e);let i=e.type_===1?+t:t,s=UB(e.scope_,a,e,i);return e.copy_[i]=s}return a},has(e,t){return t in uu(e)},ownKeys(e){return Reflect.ownKeys(uu(e))},set(e,t,r){let o=QX(uu(e),t);if(o?.set)return o.set.call(e.draft_,r),!0;if(!e.modified_){let n=NB(uu(e),t),a=n?.[zn];if(a&&a.base_===r)return e.copy_[t]=r,e.assigned_.set(t,!1),!0;if(NIe(r,n)&&(r!==void 0||VX(e.base_,t,e.type_)))return!0;uI(e),VB(e)}return e.copy_[t]===r&&(r!==void 0||t in e.copy_)||Number.isNaN(r)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=r,e.assigned_.set(t,!0),UIe(e,t,r)),!0},deleteProperty(e,t){return uI(e),NB(e.base_,t)!==void 0||t in e.base_?(e.assigned_.set(t,!1),VB(e)):e.assigned_.delete(t),e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){let r=uu(e),o=Reflect.getOwnPropertyDescriptor(r,t);return o&&{[lI]:!0,[TB]:e.type_!==1||t!=="length",[cI]:o[cI],[gx]:r[t]}},defineProperty(){hs(11)},getPrototypeOf(e){return Ok(e.base_)},setPrototypeOf(){hs(12)}},Mx={};for(let e in gI){let t=gI[e];Mx[e]=function(){let r=arguments;return r[0]=r[0][0],t.apply(this,r)}}Mx.deleteProperty=function(e,t){return Mx.set.call(this,e,t,void 0)};Mx.set=function(e,t,r){return gI.set.call(this,e[0],t,r,e[0])};function NB(e,t){let r=e[zn];return(r?uu(r):e)[t]}function GIe(e,t,r){let o=QX(t,r);return o?gx in o?o[gx]:o.get?.call(e.draft_):void 0}function QX(e,t){if(!(t in e))return;let r=Ok(e);for(;r;){let o=Object.getOwnPropertyDescriptor(r,t);if(o)return o;r=Ok(r)}}function VB(e){e.modified_||(e.modified_=!0,e.parent_&&VB(e.parent_))}function uI(e){e.copy_||(e.assigned_=new Map,e.copy_=EB(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var jIe=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.useStrictIteration_=!1,this.produce=(t,r,o)=>{if(Tk(t)&&!Tk(r)){let a=r;r=t;let i=this;return function(l=a,...u){return i.produce(l,d=>r.call(this,d,...u))}}Tk(r)||hs(6),o!==void 0&&!Tk(o)&&hs(7);let n;if(Pi(t)){let a=jX(this),i=UB(a,t,void 0),s=!0;try{n=r(i),s=!1}finally{s?FB(a):BB(a)}return GX(a,o),zX(n,a)}else if(!t||!WB(t)){if(n=r(t),n===void 0&&(n=t),n===HX&&(n=void 0),this.autoFreeze_&&jB(n,!0),o){let a=[],i=[];Mp(_B).generateReplacementPatches_(t,n,{patches_:a,inversePatches_:i}),o(a,i)}return n}else hs(1,t)},this.produceWithPatches=(t,r)=>{if(Tk(t))return(i,...s)=>this.produceWithPatches(i,l=>t(l,...s));let o,n;return[this.produce(t,r,(i,s)=>{o=i,n=s}),o,n]},RB(e?.autoFreeze)&&this.setAutoFreeze(e.autoFreeze),RB(e?.useStrictShallowCopy)&&this.setUseStrictShallowCopy(e.useStrictShallowCopy),RB(e?.useStrictIteration)&&this.setUseStrictIteration(e.useStrictIteration)}createDraft(e){Pi(e)||hs(8),ll(e)&&(e=cn(e));let t=jX(this),r=UB(t,e,void 0);return r[zn].isManual_=!0,BB(t),r}finishDraft(e,t){let r=e&&e[zn];(!r||!r.isManual_)&&hs(9);let{scope_:o}=r;return GX(o,t),zX(void 0,o)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}setUseStrictIteration(e){this.useStrictIteration_=e}shouldUseStrictIteration(){return this.useStrictIteration_}applyPatches(e,t){let r;for(r=t.length-1;r>=0;r--){let n=t[r];if(n.path.length===0&&n.op==="replace"){e=n.value;break}}r>-1&&(t=t.slice(r+1));let o=Mp(_B).applyPatches_;return ll(e)?o(e,t):this.produce(e,n=>o(n,t))}};function UB(e,t,r,o){let[n,a]=vI(t)?Mp(pI).proxyMap_(t,r):yI(t)?Mp(pI).proxySet_(t,r):WIe(t,r);return(r?.scope_??YX()).drafts_.push(n),a.callbacks_=r?.callbacks_??[],a.key_=o,r&&o!==void 0?VIe(r,a,o):a.callbacks_.push(function(l){l.mapSetPlugin_?.fixSetContents(a);let{patchPlugin_:u}=l;a.modified_&&u&&u.generatePatches_(a,[],l)}),n}function cn(e){return ll(e)||hs(10,e),eJ(e)}function eJ(e){if(!Pi(e)||xI(e))return e;let t=e[zn],r,o=!0;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,r=EB(e,t.scope_.immer_.useStrictShallowCopy_),o=t.scope_.immer_.shouldUseStrictIteration()}else r=EB(e,!0);return MI(r,(n,a)=>{fI(r,n,eJ(a))},o),t&&(t.finalized_=!1),r}var zIe=new jIe,zB=zIe.produce;function tJ(e){return({dispatch:r,getState:o})=>n=>a=>typeof a=="function"?a(r,o,e):n(a)}var rJ=tJ(),oJ=tJ;var qIe=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__?window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__:function(){if(arguments.length!==0)return typeof arguments[0]=="object"?mx:mx.apply(null,arguments)},Dkt=typeof window<"u"&&window.__REDUX_DEVTOOLS_EXTENSION__?window.__REDUX_DEVTOOLS_EXTENSION__:function(){return function(e){return e}},HIe=e=>e&&typeof e.match=="function";function wo(e,t){function r(...o){if(t){let n=t(...o);if(!n)throw new Error(Va(0));return{type:e,payload:n.payload,..."meta"in n&&{meta:n.meta},..."error"in n&&{error:n.error}}}return{type:e,payload:o[0]}}return r.toString=()=>`${e}`,r.type=e,r.match=o=>LB(o)&&o.type===e,r}var cJ=class vx extends Array{constructor(...t){super(...t),Object.setPrototypeOf(this,vx.prototype)}static get[Symbol.species](){return vx}concat(...t){return super.concat.apply(this,t)}prepend(...t){return t.length===1&&Array.isArray(t[0])?new vx(...t[0].concat(this)):new vx(...t.concat(this))}};function nJ(e){return Pi(e)?zB(e,()=>{}):e}function wI(e,t,r){return e.has(t)?e.get(t):e.set(t,r(t)).get(t)}function KIe(e){return typeof e=="boolean"}var $Ie=()=>function(t){let{thunk:r=!0,immutableCheck:o=!0,serializableCheck:n=!0,actionCreatorCheck:a=!0}=t??{},i=new cJ;return r&&(KIe(r)?i.push(rJ):i.push(oJ(r.extraArgument))),i},fJ="RTK_autoBatch",lr=()=>e=>({payload:e,meta:{[fJ]:!0}}),aJ=e=>t=>{setTimeout(t,e)},YIe=(e,t)=>r=>{let o=!1,n=()=>{o||(o=!0,cancelAnimationFrame(a),clearTimeout(i),r())},a=e(n),i=setTimeout(n,t)},$B=(e={type:"raf"})=>t=>(...r)=>{let o=t(...r),n=!0,a=!1,i=!1,s=new Set,l=e.type==="tick"?queueMicrotask:e.type==="raf"?typeof window<"u"&&window.requestAnimationFrame?YIe(window.requestAnimationFrame,100):aJ(10):e.type==="callback"?e.queueNotification:aJ(e.timeout),u=()=>{i=!1,a&&(a=!1,s.forEach(d=>d()))};return Object.assign({},o,{subscribe(d){let c=()=>n&&d(),f=o.subscribe(c);return s.add(d),()=>{f(),s.delete(d)}},dispatch(d){try{return n=!d?.meta?.[fJ],a=!n,a&&(i||(i=!0,l(u))),o.dispatch(d)}finally{n=!0}}})},ZIe=e=>function(r){let{autoBatch:o=!0}=r??{},n=new cJ(e);return o&&n.push($B(typeof o=="object"?o:void 0)),n};function pJ(e){let t=$Ie(),{reducer:r=void 0,middleware:o,devTools:n=!0,duplicateMiddlewareCheck:a=!0,preloadedState:i=void 0,enhancers:s=void 0}=e||{},l;if(typeof r=="function")l=r;else if(aI(r))l=iI(r);else throw new Error(Va(1));let u;typeof o=="function"?u=o(t):u=t();let d=mx;n&&(d=qIe({trace:!1,...typeof n=="object"&&n}));let c=_X(...u),f=ZIe(c),p=typeof s=="function"?s(f):f(),g=d(...p);return DB(l,i,g)}function mJ(e){let t={},r=[],o,n={addCase(a,i){let s=typeof a=="string"?a:a.type;if(!s)throw new Error(Va(28));if(s in t)throw new Error(Va(29));return t[s]=i,n},addAsyncThunk(a,i){return i.pending&&(t[a.pending.type]=i.pending),i.rejected&&(t[a.rejected.type]=i.rejected),i.fulfilled&&(t[a.fulfilled.type]=i.fulfilled),i.settled&&r.push({matcher:a.settled,reducer:i.settled}),n},addMatcher(a,i){return r.push({matcher:a,reducer:i}),n},addDefaultCase(a){return o=a,n}};return e(n),[t,r,o]}function XIe(e){return typeof e=="function"}function JIe(e,t){let[r,o,n]=mJ(t),a;if(XIe(e))a=()=>nJ(e());else{let s=nJ(e);a=()=>s}function i(s=a(),l){let u=[r[l.type],...o.filter(({matcher:d})=>d(l)).map(({reducer:d})=>d)];return u.filter(d=>!!d).length===0&&(u=[n]),u.reduce((d,c)=>{if(c)if(ll(d)){let p=c(d,l);return p===void 0?d:p}else{if(Pi(d))return zB(d,f=>c(f,l));{let f=c(d,l);if(f===void 0){if(d===null)return d;throw Error("A case reducer on a non-draftable value must not return undefined")}return f}}return d},s)}return i.getInitialState=a,i}var QIe=(e,t)=>HIe(e)?e.match(t):e(t);function e1e(...e){return t=>e.some(r=>QIe(r,t))}var t1e="ModuleSymbhasOwnPr-0123456789ABCDEFGHNRVfgctiUvz_KqYTJkLxpZXIjQW",gJ=(e=21)=>{let t="",r=e;for(;r--;)t+=t1e[Math.random()*64|0];return t},r1e=["name","message","stack","code"],qB=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},iJ=class{constructor(e,t){this.payload=e,this.meta=t}payload;meta;_type},o1e=e=>{if(typeof e=="object"&&e!==null){let t={};for(let r of r1e)typeof e[r]=="string"&&(t[r]=e[r]);return t}return{message:String(e)}},sJ="External signal was aborted",n1e=(()=>{function e(t,r,o){let n=wo(t+"/fulfilled",(l,u,d,c)=>({payload:l,meta:{...c||{},arg:d,requestId:u,requestStatus:"fulfilled"}})),a=wo(t+"/pending",(l,u,d)=>({payload:void 0,meta:{...d||{},arg:u,requestId:l,requestStatus:"pending"}})),i=wo(t+"/rejected",(l,u,d,c,f)=>({payload:c,error:(o&&o.serializeError||o1e)(l||"Rejected"),meta:{...f||{},arg:d,requestId:u,rejectedWithValue:!!c,requestStatus:"rejected",aborted:l?.name==="AbortError",condition:l?.name==="ConditionError"}}));function s(l,{signal:u}={}){return(d,c,f)=>{let p=o?.idGenerator?o.idGenerator(l):gJ(),g=new AbortController,m,h;function k(v){h=v,g.abort()}u&&(u.aborted?k(sJ):u.addEventListener("abort",()=>k(sJ),{once:!0}));let M=(async function(){let v;try{let w=o?.condition?.(l,{getState:c,extra:f});if(i1e(w)&&(w=await w),w===!1||g.signal.aborted)throw{name:"ConditionError",message:"Aborted due to condition callback returning false."};let P=new Promise((L,C)=>{m=()=>{C({name:"AbortError",message:h||"Aborted"})},g.signal.addEventListener("abort",m,{once:!0})});d(a(p,l,o?.getPendingMeta?.({requestId:p,arg:l},{getState:c,extra:f}))),v=await Promise.race([P,Promise.resolve(r(l,{dispatch:d,getState:c,extra:f,requestId:p,signal:g.signal,abort:k,rejectWithValue:((L,C)=>new qB(L,C)),fulfillWithValue:((L,C)=>new iJ(L,C))})).then(L=>{if(L instanceof qB)throw L;return L instanceof iJ?n(L.payload,p,l,L.meta):n(L,p,l)})])}catch(w){v=w instanceof qB?i(null,p,l,w.payload,w.meta):i(w,p,l)}finally{m&&g.signal.removeEventListener("abort",m)}return o&&!o.dispatchConditionRejection&&i.match(v)&&v.meta.condition||d(v),v})();return Object.assign(M,{abort:k,requestId:p,arg:l,unwrap(){return M.then(a1e)}})}}return Object.assign(s,{pending:a,rejected:i,fulfilled:n,settled:e1e(i,n),typePrefix:t})}return e.withTypes=()=>e,e})();function a1e(e){if(e.meta&&e.meta.rejectedWithValue)throw e.payload;if(e.error)throw e.error;return e.payload}function i1e(e){return e!==null&&typeof e=="object"&&typeof e.then=="function"}var kJ=Symbol.for("rtk-slice-createasyncthunk"),Rkt={[kJ]:n1e};function s1e(e,t){return`${e}/${t}`}function l1e({creators:e}={}){let t=e?.asyncThunk?.[kJ];return function(o){let{name:n,reducerPath:a=n}=o;if(!n)throw new Error(Va(11));typeof process<"u";let i=(typeof o.reducers=="function"?o.reducers(d1e()):o.reducers)||{},s=Object.keys(i),l={sliceCaseReducersByName:{},sliceCaseReducersByType:{},actionCreators:{},sliceMatchers:[]},u={addCase(v,b){let w=typeof v=="string"?v:v.type;if(!w)throw new Error(Va(12));if(w in l.sliceCaseReducersByType)throw new Error(Va(13));return l.sliceCaseReducersByType[w]=b,u},addMatcher(v,b){return l.sliceMatchers.push({matcher:v,reducer:b}),u},exposeAction(v,b){return l.actionCreators[v]=b,u},exposeCaseReducer(v,b){return l.sliceCaseReducersByName[v]=b,u}};s.forEach(v=>{let b=i[v],w={reducerName:v,type:s1e(n,v),createNotation:typeof o.reducers=="function"};f1e(b)?m1e(w,b,u,t):c1e(w,b,u)});function d(){let[v={},b=[],w=void 0]=typeof o.extraReducers=="function"?mJ(o.extraReducers):[o.extraReducers],P={...v,...l.sliceCaseReducersByType};return JIe(o.initialState,L=>{for(let C in P)L.addCase(C,P[C]);for(let C of l.sliceMatchers)L.addMatcher(C.matcher,C.reducer);for(let C of b)L.addMatcher(C.matcher,C.reducer);w&&L.addDefaultCase(w)})}let c=v=>v,f=new Map,p=new WeakMap,g;function m(v,b){return g||(g=d()),g(v,b)}function h(){return g||(g=d()),g.getInitialState()}function k(v,b=!1){function w(L){let C=L[v];return typeof C>"u"&&b&&(C=wI(p,w,h)),C}function P(L=c){let C=wI(f,b,()=>new WeakMap);return wI(C,L,()=>{let F={};for(let[T,G]of Object.entries(o.selectors??{}))F[T]=u1e(G,L,()=>wI(p,L,h),b);return F})}return{reducerPath:v,getSelectors:P,get selectors(){return P(w)},selectSlice:w}}let M={name:n,reducer:m,actions:l.actionCreators,caseReducers:l.sliceCaseReducersByName,getInitialState:h,...k(a),injectInto(v,{reducerPath:b,...w}={}){let P=b??a;return v.inject({reducerPath:P,reducer:m},w),{...M,...k(P,!0)}}};return M}}function u1e(e,t,r,o){function n(a,...i){let s=t(a);return typeof s>"u"&&o&&(s=r()),e(s,...i)}return n.unwrapped=e,n}var er=l1e();function d1e(){function e(t,r){return{_reducerDefinitionType:"asyncThunk",payloadCreator:t,...r}}return e.withTypes=()=>e,{reducer(t){return Object.assign({[t.name](...r){return t(...r)}}[t.name],{_reducerDefinitionType:"reducer"})},preparedReducer(t,r){return{_reducerDefinitionType:"reducerWithPrepare",prepare:t,reducer:r}},asyncThunk:e}}function c1e({type:e,reducerName:t,createNotation:r},o,n){let a,i;if("reducer"in o){if(r&&!p1e(o))throw new Error(Va(17));a=o.reducer,i=o.prepare}else a=o;n.addCase(e,a).exposeCaseReducer(t,a).exposeAction(t,i?wo(e,i):wo(e))}function f1e(e){return e._reducerDefinitionType==="asyncThunk"}function p1e(e){return e._reducerDefinitionType==="reducerWithPrepare"}function m1e({type:e,reducerName:t},r,o,n){if(!n)throw new Error(Va(18));let{payloadCreator:a,fulfilled:i,pending:s,rejected:l,settled:u,options:d}=r,c=n(e,a,d);o.exposeAction(t,c),i&&o.addCase(c.fulfilled,i),s&&o.addCase(c.pending,s),l&&o.addCase(c.rejected,l),u&&o.addMatcher(c.settled,u),o.exposeCaseReducer(t,{fulfilled:i||CI,pending:s||CI,rejected:l||CI,settled:u||CI})}function CI(){}var g1e="task",MJ="listener",hJ="completed",YB="cancelled",k1e=`task-${YB}`,M1e=`task-${hJ}`,HB=`${MJ}-${YB}`,h1e=`${MJ}-${hJ}`,AI=class{constructor(e){this.code=e,this.message=`${g1e} ${YB} (reason: ${e})`}code;name="TaskAbortError";message},ZB=(e,t)=>{if(typeof e!="function")throw new TypeError(Va(32))},SI=()=>{},vJ=(e,t=SI)=>(e.catch(t),e),yJ=(e,t)=>(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)),hp=e=>{if(e.aborted)throw new AI(e.reason)};function xJ(e,t){let r=SI;return new Promise((o,n)=>{let a=()=>n(new AI(e.reason));if(e.aborted){a();return}r=yJ(e,a),t.finally(()=>r()).then(o,n)}).finally(()=>{r=SI})}var v1e=async(e,t)=>{try{return await Promise.resolve(),{status:"ok",value:await e()}}catch(r){return{status:r instanceof AI?"cancelled":"rejected",error:r}}finally{t?.()}},PI=e=>t=>vJ(xJ(e,t).then(r=>(hp(e),r))),bJ=e=>{let t=PI(e);return r=>t(new Promise(o=>setTimeout(o,r)))},{assign:Ek}=Object,lJ={},II="listenerMiddleware",y1e=(e,t)=>{let r=o=>yJ(e,()=>o.abort(e.reason));return(o,n)=>{ZB(o,"taskExecutor");let a=new AbortController;r(a);let i=v1e(async()=>{hp(e),hp(a.signal);let s=await o({pause:PI(a.signal),delay:bJ(a.signal),signal:a.signal});return hp(a.signal),s},()=>a.abort(M1e));return n?.autoJoin&&t.push(i.catch(SI)),{result:PI(e)(i),cancel(){a.abort(k1e)}}}},x1e=(e,t)=>{let r=async(o,n)=>{hp(t);let a=()=>{},s=[new Promise((l,u)=>{let d=e({predicate:o,effect:(c,f)=>{f.unsubscribe(),l([c,f.getState(),f.getOriginalState()])}});a=()=>{d(),u()}})];n!=null&&s.push(new Promise(l=>setTimeout(l,n,null)));try{let l=await xJ(t,Promise.race(s));return hp(t),l}finally{a()}};return((o,n)=>vJ(r(o,n)))},wJ=e=>{let{type:t,actionCreator:r,matcher:o,predicate:n,effect:a}=e;if(t)n=wo(t).match;else if(r)t=r.type,n=r.match;else if(o)n=o;else if(!n)throw new Error(Va(21));return ZB(a,"options.listener"),{predicate:n,type:t,effect:a}},CJ=Ek(e=>{let{type:t,predicate:r,effect:o}=wJ(e);return{id:gJ(),effect:o,type:t,predicate:r,pending:new Set,unsubscribe:()=>{throw new Error(Va(22))}}},{withTypes:()=>CJ}),uJ=(e,t)=>{let{type:r,effect:o,predicate:n}=wJ(t);return Array.from(e.values()).find(a=>(typeof r=="string"?a.type===r:a.predicate===n)&&a.effect===o)},KB=e=>{e.pending.forEach(t=>{t.abort(HB)})},b1e=(e,t)=>()=>{for(let r of t.keys())KB(r);e.clear()},dJ=(e,t,r)=>{try{e(t,r)}catch(o){setTimeout(()=>{throw o},0)}},SJ=Ek(wo(`${II}/add`),{withTypes:()=>SJ}),w1e=wo(`${II}/removeAll`),PJ=Ek(wo(`${II}/remove`),{withTypes:()=>PJ}),C1e=(...e)=>{console.error(`${II}/error`,...e)},du=(e={})=>{let t=new Map,r=new Map,o=p=>{let g=r.get(p)??0;r.set(p,g+1)},n=p=>{let g=r.get(p)??1;g===1?r.delete(p):r.set(p,g-1)},{extra:a,onError:i=C1e}=e;ZB(i,"onError");let s=p=>(p.unsubscribe=()=>t.delete(p.id),t.set(p.id,p),g=>{p.unsubscribe(),g?.cancelActive&&KB(p)}),l=(p=>{let g=uJ(t,p)??CJ(p);return s(g)});Ek(l,{withTypes:()=>l});let u=p=>{let g=uJ(t,p);return g&&(g.unsubscribe(),p.cancelActive&&KB(g)),!!g};Ek(u,{withTypes:()=>u});let d=async(p,g,m,h)=>{let k=new AbortController,M=x1e(l,k.signal),v=[];try{p.pending.add(k),o(p),await Promise.resolve(p.effect(g,Ek({},m,{getOriginalState:h,condition:(b,w)=>M(b,w).then(Boolean),take:M,delay:bJ(k.signal),pause:PI(k.signal),extra:a,signal:k.signal,fork:y1e(k.signal,v),unsubscribe:p.unsubscribe,subscribe:()=>{t.set(p.id,p)},cancelActiveListeners:()=>{p.pending.forEach((b,w,P)=>{b!==k&&(b.abort(HB),P.delete(b))})},cancel:()=>{k.abort(HB),p.pending.delete(k)},throwIfCancelled:()=>{hp(k.signal)}})))}catch(b){b instanceof AI||dJ(i,b,{raisedBy:"effect"})}finally{await Promise.all(v),k.abort(h1e),n(p),p.pending.delete(k)}},c=b1e(t,r);return{middleware:p=>g=>m=>{if(!LB(m))return g(m);if(SJ.match(m))return l(m.payload);if(w1e.match(m)){c();return}if(PJ.match(m))return u(m.payload);let h=p.getState(),k=()=>{if(h===lJ)throw new Error(Va(23));return h},M;try{if(M=g(m),t.size>0){let v=p.getState(),b=Array.from(t.values());for(let w of b){let P=!1;try{P=w.predicate(m,v,h)}catch(L){P=!1,dJ(i,L,{raisedBy:"predicate"})}P&&d(w,m,p,k)}}}finally{h=lJ}return M},startListening:l,stopListening:u,clearListeners:c}};function Va(e){return`Minified Redux Toolkit error #${e}; visit https://redux-toolkit.js.org/Errors?code=${e} for the full message or use the non-minified dev environment for full errors. `}var S1e={layoutType:"horizontal",width:0,height:0,margin:{top:5,right:5,bottom:5,left:5},scale:1},AJ=er({name:"chartLayout",initialState:S1e,reducers:{setLayout(e,t){e.layoutType=t.payload},setChartSize(e,t){e.width=t.payload.width,e.height=t.payload.height},setMargin(e,t){var r,o,n,a;e.margin.top=(r=t.payload.top)!==null&&r!==void 0?r:0,e.margin.right=(o=t.payload.right)!==null&&o!==void 0?o:0,e.margin.bottom=(n=t.payload.bottom)!==null&&n!==void 0?n:0,e.margin.left=(a=t.payload.left)!==null&&a!==void 0?a:0},setScale(e,t){e.scale=t.payload}}}),{setMargin:XB,setLayout:IJ,setChartSize:DJ,setScale:LJ}=AJ.actions,RJ=AJ.reducer;function DI(e,t,r){return Array.isArray(e)&&e&&t+r!==0?e.slice(t,r+1):e}function lt(e){return Number.isFinite(e)}function cu(e){return typeof e=="number"&&e>0&&Number.isFinite(e)}function NJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function _k(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?NJ(Object(r),!0).forEach(function(o){P1e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):NJ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function P1e(e,t,r){return(t=A1e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function A1e(e){var t=I1e(e,"string");return typeof t=="symbol"?t:t+""}function I1e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vt(e,t,r){return Rt(e)||Rt(t)?r:jn(t)?$o(e,t,r):typeof t=="function"?t(e):r}var TJ=(e,t,r)=>{if(t&&r){var{width:o,height:n}=r,{align:a,verticalAlign:i,layout:s}=t;if((s==="vertical"||s==="horizontal"&&i==="middle")&&a!=="center"&&Be(e[a]))return _k(_k({},e),{},{[a]:e[a]+(o||0)});if((s==="horizontal"||s==="vertical"&&a==="center")&&i!=="middle"&&Be(e[i]))return _k(_k({},e),{},{[i]:e[i]+(n||0)})}return e},Sn=(e,t)=>e==="horizontal"&&t==="xAxis"||e==="vertical"&&t==="yAxis"||e==="centric"&&t==="angleAxis"||e==="radial"&&t==="radiusAxis",JB=(e,t,r,o)=>{if(o)return e.map(s=>s.coordinate);var n,a,i=e.map(s=>(s.coordinate===t&&(n=!0),s.coordinate===r&&(a=!0),s.coordinate));return n||i.push(t),a||i.push(r),i},QB=(e,t,r)=>{if(!e)return null;var{duplicateDomain:o,type:n,range:a,scale:i,realScaleType:s,isCategorical:l,categoricalDomain:u,tickCount:d,ticks:c,niceTicks:f,axisType:p}=e;if(!i)return null;var g=s==="scaleBand"&&i.bandwidth?i.bandwidth()/2:2,m=(t||r)&&n==="category"&&i.bandwidth?i.bandwidth()/g:0;if(m=p==="angleAxis"&&a&&a.length>=2?vr(a[0]-a[1])*2*m:m,t&&(c||f)){var h=(c||f||[]).map((k,M)=>{var v=o?o.indexOf(k):k,b=i.map(v);return lt(b)?{coordinate:b+m,value:k,offset:m,index:M}:null}).filter(un);return h}return l&&u?u.map((k,M)=>{var v=i.map(k);return lt(v)?{coordinate:v+m,value:k,index:M,offset:m}:null}).filter(un):i.ticks&&!r&&d!=null?i.ticks(d).map((k,M)=>{var v=i.map(k);return lt(v)?{coordinate:v+m,value:k,index:M,offset:m}:null}).filter(un):i.domain().map((k,M)=>{var v=i.map(k);return lt(v)?{coordinate:v+m,value:o?o[k]:k,index:M,offset:m}:null}).filter(un)},OJ=(e,t)=>{if(!t||t.length!==2||!Be(t[0])||!Be(t[1]))return e;var r=Math.min(t[0],t[1]),o=Math.max(t[0],t[1]),n=[e[0],e[1]];return(!Be(e[0])||e[0]<r)&&(n[0]=r),(!Be(e[1])||e[1]>o)&&(n[1]=o),n[0]>o&&(n[0]=o),n[1]<r&&(n[1]=r),n},D1e=e=>{var t,r=e.length;if(!(r<=0)){var o=(t=e[0])===null||t===void 0?void 0:t.length;if(!(o==null||o<=0))for(var n=0;n<o;++n)for(var a=0,i=0,s=0;s<r;++s){var l=e[s],u=l?.[n];if(u!=null){var d=u[1],c=u[0],f=Yo(d)?c:d;f>=0?(u[0]=a,a+=f,u[1]=a):(u[0]=i,i+=f,u[1]=i)}}}},L1e=e=>{var t,r=e.length;if(!(r<=0)){var o=(t=e[0])===null||t===void 0?void 0:t.length;if(!(o==null||o<=0))for(var n=0;n<o;++n)for(var a=0,i=0;i<r;++i){var s=e[i],l=s?.[n];if(l!=null){var u=Yo(l[1])?l[0]:l[1];u>=0?(l[0]=a,a+=u,l[1]=a):(l[0]=0,l[1]=0)}}}},R1e={sign:D1e,expand:kB,none:_a,silhouette:MB,wiggle:hB,positive:L1e},EJ=(e,t,r)=>{var o,n=(o=R1e[r])!==null&&o!==void 0?o:_a,a=gB().keys(t).value((s,l)=>Number(vt(s,l,0))).order(Ak).offset(n),i=a(e);return i.forEach((s,l)=>{s.forEach((u,d)=>{var c=vt(e[d],t[l],0);Array.isArray(c)&&c.length===2&&Be(c[0])&&Be(c[1])&&(u[0]=c[0],u[1]=c[1])})}),i};function LI(e){return e==null?void 0:String(e)}function Fk(e){var{axis:t,ticks:r,bandSize:o,entry:n,index:a,dataKey:i}=e;if(t.type==="category"){if(!t.allowDuplicatedCategory&&t.dataKey&&!Rt(n[t.dataKey])){var s=UA(r,"value",n[t.dataKey]);if(s)return s.coordinate+o/2}return r!=null&&r[a]?r[a].coordinate+o/2:null}var l=vt(n,Rt(i)?t.dataKey:i),u=t.scale.map(l);return Be(u)?u:null}var e3=e=>{var{axis:t,ticks:r,offset:o,bandSize:n,entry:a,index:i}=e;if(t.type==="category")return r[i]?r[i].coordinate+o:null;var s=vt(a,t.dataKey,t.scale.domain()[i]);if(Rt(s))return null;var l=t.scale.map(s);return Be(l)?l-n/2+o:null},_J=e=>{var{numericAxis:t}=e,r=t.scale.domain();if(t.type==="number"){var o=Math.min(r[0],r[1]),n=Math.max(r[0],r[1]);return o<=0&&n>=0?0:n<0?n:o}return r[0]},N1e=e=>{var t=e.flat(2).filter(Be);return[Math.min(...t),Math.max(...t)]},T1e=e=>[e[0]===1/0?0:e[0],e[1]===-1/0?0:e[1]],FJ=(e,t,r)=>{if(e!=null)return T1e(Object.keys(e).reduce((o,n)=>{var a=e[n];if(!a)return o;var{stackedData:i}=a,s=i.reduce((l,u)=>{var d=DI(u,t,r),c=N1e(d);return!lt(c[0])||!lt(c[1])?l:[Math.min(l[0],c[0]),Math.max(l[1],c[1])]},[1/0,-1/0]);return[Math.min(s[0],o[0]),Math.max(s[1],o[1])]},[1/0,-1/0]))},t3=/^dataMin[\s]*-[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,r3=/^dataMax[\s]*\+[\s]*([0-9]+([.]{1}[0-9]+){0,1})$/,Ai=(e,t,r)=>{if(e&&e.scale&&e.scale.bandwidth){var o=e.scale.bandwidth();if(!r||o>0)return o}if(e&&t&&t.length>=2){for(var n=lu(t,d=>d.coordinate),a=1/0,i=1,s=n.length;i<s;i++){var l=n[i],u=n[i-1];a=Math.min((l?.coordinate||0)-(u?.coordinate||0),a)}return a===1/0?0:a}return r?void 0:0};function o3(e){var{tooltipEntrySettings:t,dataKey:r,payload:o,value:n,name:a}=e;return _k(_k({},t),{},{dataKey:r,payload:o,value:n,name:a})}function Ua(e,t){if(e)return String(e);if(typeof t=="string")return t}var BJ=(e,t)=>{if(t==="horizontal")return e.relativeX;if(t==="vertical")return e.relativeY},VJ=(e,t)=>t==="centric"?e.angle:e.radius;var Pn=e=>e.layout.width,An=e=>e.layout.height,UJ=e=>e.layout.scale,RI=e=>e.layout.margin;var Bk=te(e=>e.cartesianAxis.xAxis,e=>Object.values(e)),Vk=te(e=>e.cartesianAxis.yAxis,e=>Object.values(e));var NI="data-recharts-item-index",TI="data-recharts-item-id",vp=60;function WJ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function OI(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?WJ(Object(r),!0).forEach(function(o){O1e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):WJ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function O1e(e,t,r){return(t=E1e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E1e(e){var t=_1e(e,"string");return typeof t=="symbol"?t:t+""}function _1e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var F1e=e=>e.brush.height;function B1e(e){var t=Vk(e);return t.reduce((r,o)=>{if(o.orientation==="left"&&!o.mirror&&!o.hide){var n=typeof o.width=="number"?o.width:vp;return r+n}return r},0)}function V1e(e){var t=Vk(e);return t.reduce((r,o)=>{if(o.orientation==="right"&&!o.mirror&&!o.hide){var n=typeof o.width=="number"?o.width:vp;return r+n}return r},0)}function U1e(e){var t=Bk(e);return t.reduce((r,o)=>o.orientation==="top"&&!o.mirror&&!o.hide?r+o.height:r,0)}function W1e(e){var t=Bk(e);return t.reduce((r,o)=>o.orientation==="bottom"&&!o.mirror&&!o.hide?r+o.height:r,0)}var fr=te([Pn,An,RI,F1e,B1e,V1e,U1e,W1e,AB,TX],(e,t,r,o,n,a,i,s,l,u)=>{var d={left:(r.left||0)+n,right:(r.right||0)+a},c={top:(r.top||0)+i,bottom:(r.bottom||0)+s},f=OI(OI({},c),d),p=f.bottom;f.bottom+=o,f=TJ(f,l,u);var g=e-f.left-f.right,m=t-f.top-f.bottom;return OI(OI({brushBottom:p},f),{},{width:Math.max(g,0),height:Math.max(m,0)})}),GJ=te(fr,e=>({x:e.left,y:e.top,width:e.width,height:e.height})),Uk=te(Pn,An,(e,t)=>({x:0,y:0,width:e,height:t}));var G1e=z(ie()),EI=z(ie()),j1e=(0,EI.createContext)(null),tr=()=>(0,EI.useContext)(j1e)!=null;var Wk=e=>e.brush,yp=te([Wk,fr,RI],(e,t,r)=>({height:e.height,x:Be(e.x)?e.x:t.left,y:Be(e.y)?e.y:t.top+t.height+t.brushBottom-(r?.bottom||0),width:Be(e.width)?e.width:t.width}));var q1e=z(ie()),vs=z(ie());var z1e=!0,n3=function(t,r){for(var o=arguments.length,n=new Array(o>2?o-2:0),a=2;a<o;a++)n[a-2]=arguments[a];if(z1e&&typeof console<"u"&&console.warn&&(r===void 0&&console.warn("LogUtils requires an error message argument"),!t))if(r===void 0)console.warn("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var i=0;console.warn(r.replace(/%s/g,()=>n[i++]))}};var jJ={width:"100%",height:"100%",debounce:0,minWidth:0,initialDimension:{width:-1,height:-1}};var H1e=(0,vs.createContext)(jJ.initialDimension);var _I=()=>(0,vs.useContext)(H1e);function yx(e){if(e)return{x:e.x,y:e.y,upperWidth:"upperWidth"in e?e.upperWidth:e.width,lowerWidth:"lowerWidth"in e?e.lowerWidth:e.width,width:e.width,height:e.height}}var xp=()=>{var e,t=tr(),r=Ve(GJ),o=Ve(yp),n=(e=Ve(Wk))===null||e===void 0?void 0:e.padding;return!t||!o||!n?r:{width:o.width-n.left-n.right,height:o.height-n.top-n.bottom,x:n.left,y:n.top}},K1e={top:0,bottom:0,left:0,right:0,width:0,height:0,brushBottom:0},FI=()=>{var e;return(e=Ve(fr))!==null&&e!==void 0?e:K1e},BI=()=>Ve(Pn),VI=()=>Ve(An);var mt=e=>e.layout.layoutType,sa=()=>Ve(mt),Gk=()=>{var e=sa();if(e==="horizontal"||e==="vertical")return e},a3=e=>{var t=e.layout.layoutType;if(t==="centric"||t==="radial")return t};var qJ=()=>{var e=sa();return e!==void 0},bp=e=>{var t=Mt(),r=tr(),{width:o,height:n}=e,a=_I(),i=o,s=n;return a&&(i=a.width>0?a.width:o,s=a.height>0?a.height:n),(0,zJ.useEffect)(()=>{!r&&cu(i)&&cu(s)&&t(DJ({width:i,height:s}))},[t,r,i,s]),null};var $1e={settings:{layout:"horizontal",align:"center",verticalAlign:"middle",itemSorter:"value"},size:{width:0,height:0},payload:[]},HJ=er({name:"legend",initialState:$1e,reducers:{setLegendSize(e,t){e.size.width=t.payload.width,e.size.height=t.payload.height},setLegendSettings(e,t){e.settings.align=t.payload.align,e.settings.layout=t.payload.layout,e.settings.verticalAlign=t.payload.verticalAlign,e.settings.itemSorter=t.payload.itemSorter},addLegendPayload:{reducer(e,t){e.payload.push(t.payload)},prepare:lr()},replaceLegendPayload:{reducer(e,t){var{prev:r,next:o}=t.payload,n=cn(e).payload.indexOf(r);n>-1&&(e.payload[n]=o)},prepare:lr()},removeLegendPayload:{reducer(e,t){var r=cn(e).payload.indexOf(t.payload);r>-1&&e.payload.splice(r,1)},prepare:lr()}}}),{setLegendSize:DMt,setLegendSettings:LMt,addLegendPayload:i3,replaceLegendPayload:s3,removeLegendPayload:l3}=HJ.actions,KJ=HJ.reducer;var oo=z(ie(),1),bDe=z(XJ(),1);var rDe=Symbol.for("react.forward_ref");var oDe=Symbol.for("react.memo");var nDe=rDe,aDe=oDe;function iDe(e){e()}function sDe(){let e=null,t=null;return{clear(){e=null,t=null},notify(){iDe(()=>{let r=e;for(;r;)r.callback(),r=r.next})},get(){let r=[],o=e;for(;o;)r.push(o),o=o.next;return r},subscribe(r){let o=!0,n=t={callback:r,next:null,prev:t};return n.prev?n.prev.next=n:e=n,function(){!o||e===null||(o=!1,n.next?n.next.prev=n.prev:t=n.prev,n.prev?n.prev.next=n.next:e=n.next)}}}}var JJ={notify(){},get:()=>[]};function lDe(e,t){let r,o=JJ,n=0,a=!1;function i(m){d();let h=o.subscribe(m),k=!1;return()=>{k||(k=!0,h(),c())}}function s(){o.notify()}function l(){g.onStateChange&&g.onStateChange()}function u(){return a}function d(){n++,r||(r=t?t.addNestedSub(l):e.subscribe(l),o=sDe())}function c(){n--,r&&n===0&&(r(),r=void 0,o.clear(),o=JJ)}function f(){a||(a=!0,d())}function p(){a&&(a=!1,c())}let g={addNestedSub:i,notifyNestedSubs:s,handleChangeWrapper:l,isSubscribed:u,trySubscribe:f,tryUnsubscribe:p,getListeners:()=>o};return g}var uDe=()=>typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",dDe=uDe(),cDe=()=>typeof navigator<"u"&&navigator.product==="ReactNative",fDe=cDe(),pDe=()=>dDe||fDe?oo.useLayoutEffect:oo.useEffect,mDe=pDe();function QJ(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}function eQ(e,t){if(QJ(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;let r=Object.keys(e),o=Object.keys(t);if(r.length!==o.length)return!1;for(let n=0;n<r.length;n++)if(!Object.prototype.hasOwnProperty.call(t,r[n])||!QJ(e[r[n]],t[r[n]]))return!1;return!0}var gDe={$$typeof:!0,render:!0,defaultProps:!0,displayName:!0,propTypes:!0},kDe={$$typeof:!0,compare:!0,defaultProps:!0,displayName:!0,propTypes:!0,type:!0},OMt={[nDe]:gDe,[aDe]:kDe};var EMt=Object.prototype;var MDe=Symbol.for("react-redux-context"),hDe=typeof globalThis<"u"?globalThis:{};function vDe(){if(!oo.createContext)return{};let e=hDe[MDe]??=new Map,t=e.get(oo.createContext);return t||(t=oo.createContext(null),e.set(oo.createContext,t)),t}var yDe=vDe();function xDe(e){let{children:t,context:r,serverState:o,store:n}=e,a=oo.useMemo(()=>{let l=lDe(n);return{store:n,subscription:l,getServerState:o?()=>o:void 0}},[n,o]),i=oo.useMemo(()=>n.getState(),[n]);return mDe(()=>{let{subscription:l}=a;return l.onStateChange=l.notifyNestedSubs,l.trySubscribe(),i!==n.getState()&&l.notifyNestedSubs(),()=>{l.tryUnsubscribe(),l.onStateChange=void 0}},[a,i]),oo.createElement((r||yDe).Provider,{value:a},t)}var tQ=xDe;var wDe=new Set(["axisLine","tickLine","activeBar","activeDot","activeLabel","activeShape","allowEscapeViewBox","background","cursor","dot","label","line","margin","padding","position","shape","style","tick","wrapperStyle","radius","throttledEvents"]);function CDe(e,t){return e==null&&t==null?!0:typeof e=="number"&&typeof t=="number"?e===t||e!==e&&t!==t:e===t}function Ii(e,t){var r=new Set([...Object.keys(e),...Object.keys(t)]);for(var o of r)if(wDe.has(o)){if(e[o]==null&&t[o]==null)continue;if(!eQ(e[o],t[o]))return!1}else if(!CDe(e[o],t[o]))return!1;return!0}var _i=z(ie()),xoe=z(ie()),boe=z(xg());var ys=z(ie());function u3(){return u3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},u3.apply(null,arguments)}function rQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function bx(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rQ(Object(r),!0).forEach(function(o){SDe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rQ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function SDe(e,t,r){return(t=PDe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function PDe(e){var t=ADe(e,"string");return typeof t=="symbol"?t:t+""}function ADe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IDe(e){return Array.isArray(e)&&jn(e[0])&&jn(e[1])?e.join(" ~ "):e}var jk={separator:" : ",contentStyle:{margin:0,padding:10,backgroundColor:"#fff",border:"1px solid #ccc",whiteSpace:"nowrap"},itemStyle:{display:"block",paddingTop:4,paddingBottom:4,color:"#000"},labelStyle:{},accessibilityLayer:!1};function DDe(e,t){return t==null?e:lu(e,t)}var oQ=e=>{var{separator:t=jk.separator,contentStyle:r,itemStyle:o,labelStyle:n=jk.labelStyle,payload:a,formatter:i,itemSorter:s,wrapperClassName:l,labelClassName:u,label:d,labelFormatter:c,accessibilityLayer:f=jk.accessibilityLayer}=e,p=()=>{if(a&&a.length){var w={padding:0,margin:0},P=DDe(a,s),L=P.map((C,F)=>{if(!C||C.type==="none")return null;var T=C.formatter||i||IDe,{value:G,name:$}=C,oe=G,se=$;if(T){var pe=T(G,$,C,F,a);if(Array.isArray(pe))[oe,se]=pe;else if(pe!=null)oe=pe;else return null}var N=bx(bx({},jk.itemStyle),{},{color:C.color||jk.itemStyle.color},o);return ys.createElement("li",{className:"recharts-tooltip-item",key:"tooltip-item-".concat(F),style:N},jn(se)?ys.createElement("span",{className:"recharts-tooltip-item-name"},se):null,jn(se)?ys.createElement("span",{className:"recharts-tooltip-item-separator"},t):null,ys.createElement("span",{className:"recharts-tooltip-item-value"},oe),ys.createElement("span",{className:"recharts-tooltip-item-unit"},C.unit||""))});return ys.createElement("ul",{className:"recharts-tooltip-item-list",style:w},L)}return null},g=bx(bx({},jk.contentStyle),r),m=bx({margin:0},n),h=!Rt(d),k=h?d:"",M=et("recharts-default-tooltip",l),v=et("recharts-tooltip-label",u);h&&c&&a!==void 0&&a!==null&&(k=c(d,a));var b=f?{role:"status","aria-live":"assertive"}:{};return ys.createElement("div",u3({className:M,style:g},b),ys.createElement("p",{className:v,style:m},ys.isValidElement(k)?k:"".concat(k)),p())};var Yd=z(ie());var wx="recharts-tooltip-wrapper",LDe={visibility:"hidden"};function RDe(e){var{coordinate:t,translateX:r,translateY:o}=e;return et(wx,{["".concat(wx,"-right")]:Be(r)&&t&&Be(t.x)&&r>=t.x,["".concat(wx,"-left")]:Be(r)&&t&&Be(t.x)&&r<t.x,["".concat(wx,"-bottom")]:Be(o)&&t&&Be(t.y)&&o>=t.y,["".concat(wx,"-top")]:Be(o)&&t&&Be(t.y)&&o<t.y})}function nQ(e){var{allowEscapeViewBox:t,coordinate:r,key:o,offset:n,position:a,reverseDirection:i,tooltipDimension:s,viewBox:l,viewBoxDimension:u}=e;if(a&&Be(a[o]))return a[o];var d=r[o]-s-(n>0?n:0),c=r[o]+n;if(t[o])return i[o]?d:c;var f=l[o];if(f==null)return 0;if(i[o]){var p=d,g=f;return p<g?Math.max(c,f):Math.max(d,f)}if(u==null)return 0;var m=c+s,h=f+u;return m>h?Math.max(d,f):Math.max(c,f)}function NDe(e){var{translateX:t,translateY:r,useTranslate3d:o}=e;return{transform:o?"translate3d(".concat(t,"px, ").concat(r,"px, 0)"):"translate(".concat(t,"px, ").concat(r,"px)")}}function aQ(e){var{allowEscapeViewBox:t,coordinate:r,offsetTop:o,offsetLeft:n,position:a,reverseDirection:i,tooltipBox:s,useTranslate3d:l,viewBox:u}=e,d,c,f;return s.height>0&&s.width>0&&r?(c=nQ({allowEscapeViewBox:t,coordinate:r,key:"x",offset:n,position:a,reverseDirection:i,tooltipDimension:s.width,viewBox:u,viewBoxDimension:u.width}),f=nQ({allowEscapeViewBox:t,coordinate:r,key:"y",offset:o,position:a,reverseDirection:i,tooltipDimension:s.height,viewBox:u,viewBoxDimension:u.height}),d=NDe({translateX:c,translateY:f,useTranslate3d:l})):d=LDe,{cssProperties:d,cssClasses:RDe({translateX:c,translateY:f,coordinate:r})}}var UI=z(ie());var TDe=()=>!(typeof window<"u"&&window.document&&window.document.createElement&&window.setTimeout),Di={devToolsEnabled:!0,isSsr:TDe()};function WI(){var[e,t]=(0,UI.useState)(()=>Di.isSsr||!window.matchMedia?!1:window.matchMedia("(prefers-reduced-motion: reduce)").matches);return(0,UI.useEffect)(()=>{if(window.matchMedia){var r=window.matchMedia("(prefers-reduced-motion: reduce)"),o=()=>{t(r.matches)};return r.addEventListener("change",o),()=>{r.removeEventListener("change",o)}}},[]),e}function iQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function zk(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?iQ(Object(r),!0).forEach(function(o){ODe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):iQ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function ODe(e,t,r){return(t=EDe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function EDe(e){var t=_De(e,"string");return typeof t=="symbol"?t:t+""}function _De(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function FDe(e){if(!(e.prefersReducedMotion&&e.isAnimationActive==="auto")&&e.isAnimationActive&&e.active)return"transform ".concat(e.animationDuration,"ms ").concat(e.animationEasing)}function BDe(e){var t,r,o,n,a,i,s=WI(),[l,u]=Yd.useState(()=>({dismissed:!1,dismissedAtCoordinate:{x:0,y:0}}));Yd.useEffect(()=>{var g=m=>{if(m.key==="Escape"){var h,k,M,v;u({dismissed:!0,dismissedAtCoordinate:{x:(h=(k=e.coordinate)===null||k===void 0?void 0:k.x)!==null&&h!==void 0?h:0,y:(M=(v=e.coordinate)===null||v===void 0?void 0:v.y)!==null&&M!==void 0?M:0}})}};return document.addEventListener("keydown",g),()=>{document.removeEventListener("keydown",g)}},[(t=e.coordinate)===null||t===void 0?void 0:t.x,(r=e.coordinate)===null||r===void 0?void 0:r.y]),l.dismissed&&(((o=(n=e.coordinate)===null||n===void 0?void 0:n.x)!==null&&o!==void 0?o:0)!==l.dismissedAtCoordinate.x||((a=(i=e.coordinate)===null||i===void 0?void 0:i.y)!==null&&a!==void 0?a:0)!==l.dismissedAtCoordinate.y)&&u(zk(zk({},l),{},{dismissed:!1}));var{cssClasses:d,cssProperties:c}=aQ({allowEscapeViewBox:e.allowEscapeViewBox,coordinate:e.coordinate,offsetLeft:typeof e.offset=="number"?e.offset:e.offset.x,offsetTop:typeof e.offset=="number"?e.offset:e.offset.y,position:e.position,reverseDirection:e.reverseDirection,tooltipBox:{height:e.lastBoundingBox.height,width:e.lastBoundingBox.width},useTranslate3d:e.useTranslate3d,viewBox:e.viewBox}),f=e.hasPortalFromProps?{}:zk(zk({transition:FDe({prefersReducedMotion:s,isAnimationActive:e.isAnimationActive,active:e.active,animationDuration:e.animationDuration,animationEasing:e.animationEasing})},c),{},{pointerEvents:"none",position:"absolute",top:0,left:0}),p=zk(zk({},f),{},{visibility:!l.dismissed&&e.active&&e.hasPayload?"visible":"hidden"},e.wrapperStyle);return Yd.createElement("div",{xmlns:"http://www.w3.org/1999/xhtml",tabIndex:-1,className:d,style:p,ref:e.innerRef},e.children)}var sQ=Yd.memo(BDe);var GI=()=>{var e;return(e=Ve(t=>t.rootProps.accessibilityLayer))!==null&&e!==void 0?e:!0};var PD=z(ie()),yM=z(ie());var pQ=z(ie());function d3(){return d3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},d3.apply(null,arguments)}function lQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function uQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lQ(Object(r),!0).forEach(function(o){VDe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lQ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function VDe(e,t,r){return(t=UDe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function UDe(e){var t=WDe(e,"string");return typeof t=="symbol"?t:t+""}function WDe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var dQ={curveBasisClosed:aB,curveBasisOpen:iB,curveBasis:nB,curveBumpX:$F,curveBumpY:YF,curveLinearClosed:sB,curveLinear:Kd,curveMonotoneX:uB,curveMonotoneY:dB,curveNatural:cB,curveStep:fB,curveStepAfter:mB,curveStepBefore:pB},jI=e=>lt(e.x)&&lt(e.y),cQ=e=>e.base!=null&&jI(e.base)&&jI(e),Cx=e=>e.x,Sx=e=>e.y,GDe=(e,t)=>{if(typeof e=="function")return e;var r="curve".concat(su(e));if((r==="curveMonotone"||r==="curveBump")&&t){var o=dQ["".concat(r).concat(t==="vertical"?"Y":"X")];if(o)return o}return dQ[r]||Kd},fQ={connectNulls:!1,type:"linear"},jDe=e=>{var{type:t=fQ.type,points:r=[],baseLine:o,layout:n,connectNulls:a=fQ.connectNulls}=e,i=GDe(t,n),s=a?r.filter(jI):r;if(Array.isArray(o)){var l,u=r.map((g,m)=>uQ(uQ({},g),{},{base:o[m]}));n==="vertical"?l=wk().y(Sx).x1(Cx).x0(g=>g.base.x):l=wk().x(Cx).y1(Sx).y0(g=>g.base.y);var d=l.defined(cQ).curve(i),c=a?u.filter(cQ):u;return d(c)}var f;n==="vertical"&&Be(o)?f=wk().y(Sx).x1(Cx).x0(o):Be(o)?f=wk().x(Cx).y1(Sx).y0(o):f=lx().x(Cx).y(Sx);var p=f.defined(jI).curve(i);return p(s)},ul=e=>{var{className:t,points:r,path:o,pathRef:n}=e,a=sa();if((!r||!r.length)&&!o)return null;var i={type:e.type,points:e.points,baseLine:e.baseLine,layout:e.layout||a,connectNulls:e.connectNulls},s=r&&r.length?jDe(i):o;return pQ.createElement("path",d3({},Br(e),Lk(e),{className:et("recharts-curve",t),d:s===null?void 0:s,ref:n}))};var gQ=z(ie());var zDe=["x","y","top","left","width","height","className"];function c3(){return c3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},c3.apply(null,arguments)}function mQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function qDe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?mQ(Object(r),!0).forEach(function(o){HDe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):mQ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function HDe(e,t,r){return(t=KDe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function KDe(e){var t=$De(e,"string");return typeof t=="symbol"?t:t+""}function $De(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YDe(e,t){if(e==null)return{};var r,o,n=ZDe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function ZDe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var XDe=(e,t,r,o,n,a)=>"M".concat(e,",").concat(n,"v").concat(o,"M").concat(a,",").concat(t,"h").concat(r),kQ=e=>{var{x:t=0,y:r=0,top:o=0,left:n=0,width:a=0,height:i=0,className:s}=e,l=YDe(e,zDe),u=qDe({x:t,y:r,top:o,left:n,width:a,height:i},l);return!Be(t)||!Be(r)||!Be(a)||!Be(i)||!Be(o)||!Be(n)?null:gQ.createElement("path",c3({},mr(u),{className:et("recharts-cross",s),d:XDe(t,r,a,i,o,n)}))};function MQ(e,t,r,o){var n=o/2;return{stroke:"none",fill:"#ccc",x:e==="horizontal"?t.x-n:r.left+.5,y:e==="horizontal"?r.top+.5:t.y-n,width:e==="horizontal"?o:r.width-1,height:e==="horizontal"?r.height-1:o}}var $I=z(ie()),Ni=z(ie());var wp=z(ie());function hQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function vQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hQ(Object(r),!0).forEach(function(o){JDe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hQ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function JDe(e,t,r){return(t=QDe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QDe(e){var t=eLe(e,"string");return typeof t=="symbol"?t:t+""}function eLe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var tLe=e=>e.replace(/([A-Z])/g,t=>"-".concat(t.toLowerCase())),zI=(e,t,r)=>e.map(o=>"".concat(tLe(o)," ").concat(t,"ms ").concat(r)).join(","),yQ=(e,t)=>[Object.keys(e),Object.keys(t)].reduce((r,o)=>r.filter(n=>o.includes(n))),qk=(e,t)=>Object.keys(t).reduce((r,o)=>vQ(vQ({},r),{},{[o]:e(o,t[o])}),{});function xQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function To(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?xQ(Object(r),!0).forEach(function(o){rLe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):xQ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function rLe(e,t,r){return(t=oLe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function oLe(e){var t=nLe(e,"string");return typeof t=="symbol"?t:t+""}function nLe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var qI=(e,t,r)=>e+(t-e)*r,f3=e=>{var{from:t,to:r}=e;return t!==r},bQ=(e,t,r)=>{var o=qk((n,a)=>{if(f3(a)){var[i,s]=e(a.from,a.to,a.velocity);return To(To({},a),{},{from:i,velocity:s})}return a},t);return r<1?qk((n,a)=>f3(a)&&o[n]!=null?To(To({},a),{},{velocity:qI(a.velocity,o[n].velocity,r),from:qI(a.from,o[n].from,r)}):a,t):bQ(e,o,r-1)};function aLe(e,t,r,o,n,a){var i,s=o.reduce((f,p)=>To(To({},f),{},{[p]:{from:e[p],velocity:0,to:t[p]}}),{}),l=()=>qk((f,p)=>p.from,s),u=()=>!Object.values(s).filter(f3).length,d=null,c=f=>{i||(i=f);var p=f-i,g=p/r.dt;s=bQ(r,s,g),n(To(To(To({},e),t),l())),i=f,u()||(d=a.setTimeout(c))};return()=>(d=a.setTimeout(c),()=>{var f;(f=d)===null||f===void 0||f()})}function iLe(e,t,r,o,n,a,i){var s=null,l=n.reduce((c,f)=>{var p=e[f],g=t[f];return p==null||g==null?c:To(To({},c),{},{[f]:[p,g]})},{}),u,d=c=>{u||(u=c);var f=(c-u)/o,p=qk((m,h)=>qI(...h,r(f)),l);if(a(To(To(To({},e),t),p)),f<1)s=i.setTimeout(d);else{var g=qk((m,h)=>qI(...h,r(1)),l);a(To(To(To({},e),t),g))}};return()=>(s=i.setTimeout(d),()=>{var c;(c=s)===null||c===void 0||c()})}var wQ=(e,t,r,o,n,a)=>{var i=yQ(e,t);return r==null?()=>(n(To(To({},e),t)),()=>{}):r.isStepper===!0?aLe(e,t,r,i,n,a):iLe(e,t,r,o,i,n,a)};var HI=1e-4,PQ=(e,t)=>[0,3*e,3*t-6*e,3*e-3*t+1],AQ=(e,t)=>e.map((r,o)=>r*t**o).reduce((r,o)=>r+o),CQ=(e,t)=>r=>{var o=PQ(e,t);return AQ(o,r)},sLe=(e,t)=>r=>{var o=PQ(e,t),n=[...o.map((a,i)=>a*i).slice(1),0];return AQ(n,r)},lLe=e=>{var t,r=e.split("(");if(r.length!==2||r[0]!=="cubic-bezier")return null;var o=(t=r[1])===null||t===void 0||(t=t.split(")")[0])===null||t===void 0?void 0:t.split(",");if(o==null||o.length!==4)return null;var n=o.map(a=>parseFloat(a));return[n[0],n[1],n[2],n[3]]},uLe=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];if(r.length===1)switch(r[0]){case"linear":return[0,0,1,1];case"ease":return[.25,.1,.25,1];case"ease-in":return[.42,0,1,1];case"ease-out":return[.42,0,.58,1];case"ease-in-out":return[0,0,.58,1];default:{var n=lLe(r[0]);if(n)return n}}return r.length===4?r:[0,0,1,1]},dLe=(e,t,r,o)=>{var n=CQ(e,r),a=CQ(t,o),i=sLe(e,r),s=u=>u>1?1:u<0?0:u,l=u=>{for(var d=u>1?1:u,c=d,f=0;f<8;++f){var p=n(c)-d,g=i(c);if(Math.abs(p-d)<HI||g<HI)return a(c);c=s(c-p/g)}return a(c)};return l.isStepper=!1,l},SQ=function(){return dLe(...uLe(...arguments))},cLe=function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},{stiff:r=100,damping:o=8,dt:n=17}=t,a=(i,s,l)=>{var u=-(i-s)*r,d=l*o,c=l+(u-d)*n/1e3,f=l*n/1e3+i;return Math.abs(f-s)<HI&&Math.abs(c)<HI?[s,0]:[f,c]};return a.isStepper=!0,a.dt=n,a},IQ=e=>{if(typeof e=="string")switch(e){case"ease":case"ease-in-out":case"ease-out":case"ease-in":case"linear":return SQ(e);case"spring":return cLe();default:if(e.split("(")[0]==="cubic-bezier")return SQ(e)}return typeof e=="function"?e:null};var Hk=z(ie());function DQ(e){var t,r=()=>null,o=!1,n=null,a=i=>{if(!o){if(Array.isArray(i)){if(!i.length)return;var s=i,[l,...u]=s;if(typeof l=="number"){n=e.setTimeout(a.bind(null,u),l);return}a(l),n=e.setTimeout(a.bind(null,u));return}typeof i=="string"&&(t=i,r(t)),typeof i=="object"&&(t=i,r(t)),typeof i=="function"&&i()}};return{stop:()=>{o=!0},start:i=>{o=!1,n&&(n(),n=null),a(i)},subscribe:i=>(r=i,()=>{r=()=>null}),getTimeoutController:()=>e}}var KI=class{setTimeout(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,o=performance.now(),n=null,a=i=>{i-o>=r?t(i):typeof requestAnimationFrame=="function"&&(n=requestAnimationFrame(a))};return n=requestAnimationFrame(a),()=>{n!=null&&cancelAnimationFrame(n)}}};function LQ(){return DQ(new KI)}var fLe=(0,Hk.createContext)(LQ);function RQ(e,t){var r=(0,Hk.useContext)(fLe);return(0,Hk.useMemo)(()=>t??r(e),[e,t,r])}var pLe={begin:0,duration:1e3,easing:"ease",isActive:!0,canBegin:!0,onAnimationEnd:()=>{},onAnimationStart:()=>{}},NQ={t:0},p3={t:1};function Li(e){var t=_t(e,pLe),{isActive:r,canBegin:o,duration:n,easing:a,begin:i,onAnimationEnd:s,onAnimationStart:l,children:u}=t,d=WI(),c=r==="auto"?!Di.isSsr&&!d:r,f=RQ(t.animationId,t.animationManager),[p,g]=(0,wp.useState)(c?NQ:p3),m=(0,wp.useRef)(null);return(0,wp.useEffect)(()=>{c||g(p3)},[c]),(0,wp.useEffect)(()=>{if(!c||!o)return Fa;var h=wQ(NQ,p3,IQ(a),n,g,f.getTimeoutController()),k=()=>{m.current=h()};return f.start([l,i,k,n,s]),()=>{f.stop(),m.current&&m.current(),s()}},[c,o,n,a,i,l,s,f]),u(p.t)}var m3=z(ie());function Ri(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"animation-",r=(0,m3.useRef)(iu(t)),o=(0,m3.useRef)(e);return o.current!==e&&(r.current=iu(t),o.current=e),r.current}var mLe=["radius"],gLe=["radius"],TQ,OQ,EQ,_Q,FQ,BQ,VQ,UQ,WQ,GQ;function jQ(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function zQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jQ(Object(r),!0).forEach(function(o){kLe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jQ(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function kLe(e,t,r){return(t=MLe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function MLe(e){var t=hLe(e,"string");return typeof t=="symbol"?t:t+""}function hLe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function YI(){return YI=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},YI.apply(null,arguments)}function qQ(e,t){if(e==null)return{};var r,o,n=vLe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function vLe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function dl(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var HQ=(e,t,r,o,n)=>{var a=sl(r),i=sl(o),s=Math.min(Math.abs(a)/2,Math.abs(i)/2),l=i>=0?1:-1,u=a>=0?1:-1,d=i>=0&&a>=0||i<0&&a<0?1:0,c;if(s>0&&Array.isArray(n)){for(var f=[0,0,0,0],p=0,g=4;p<g;p++){var m,h=(m=n[p])!==null&&m!==void 0?m:0;f[p]=h>s?s:h}c=Nr(TQ||(TQ=dl(["M",",",""])),e,t+l*f[0]),f[0]>0&&(c+=Nr(OQ||(OQ=dl(["A ",",",",0,0,",",",",",""])),f[0],f[0],d,e+u*f[0],t)),c+=Nr(EQ||(EQ=dl(["L ",",",""])),e+r-u*f[1],t),f[1]>0&&(c+=Nr(_Q||(_Q=dl(["A ",",",",0,0,",`,
21
+ `,",",""])),f[1],f[1],d,e+r,t+l*f[1])),c+=Nr(FQ||(FQ=dl(["L ",",",""])),e+r,t+o-l*f[2]),f[2]>0&&(c+=Nr(BQ||(BQ=dl(["A ",",",",0,0,",`,
22
+ `,",",""])),f[2],f[2],d,e+r-u*f[2],t+o)),c+=Nr(VQ||(VQ=dl(["L ",",",""])),e+u*f[3],t+o),f[3]>0&&(c+=Nr(UQ||(UQ=dl(["A ",",",",0,0,",`,
23
+ `,",",""])),f[3],f[3],d,e,t+o-l*f[3])),c+="Z"}else if(s>0&&n===+n&&n>0){var k=Math.min(s,n);c=Nr(WQ||(WQ=dl(["M ",",",`
24
+ A `,",",",0,0,",",",",",`
25
+ L `,",",`
26
+ A `,",",",0,0,",",",",",`
27
+ L `,",",`
28
+ A `,",",",0,0,",",",",",`
29
+ L `,",",`
30
+ A `,",",",0,0,",",",","," Z"])),e,t+l*k,k,k,d,e+u*k,t,e+r-u*k,t,k,k,d,e+r,t+l*k,e+r,t+o-l*k,k,k,d,e+r-u*k,t+o,e+u*k,t+o,k,k,d,e,t+o-l*k)}else c=Nr(GQ||(GQ=dl(["M ",","," h "," v "," h "," Z"])),e,t,r,o,-r);return c},KQ={x:0,y:0,width:0,height:0,radius:0,isAnimationActive:!1,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},ZI=e=>{var t=_t(e,KQ),r=(0,Ni.useRef)(null),[o,n]=(0,Ni.useState)(-1);(0,Ni.useEffect)(()=>{if(r.current&&r.current.getTotalLength)try{var R=r.current.getTotalLength();R&&n(R)}catch{}},[]);var{x:a,y:i,width:s,height:l,radius:u,className:d}=t,{animationEasing:c,animationDuration:f,animationBegin:p,isAnimationActive:g,isUpdateAnimationActive:m}=t,h=(0,Ni.useRef)(s),k=(0,Ni.useRef)(l),M=(0,Ni.useRef)(a),v=(0,Ni.useRef)(i),b=(0,Ni.useMemo)(()=>({x:a,y:i,width:s,height:l,radius:u}),[a,i,s,l,u]),w=Ri(b,"rectangle-");if(a!==+a||i!==+i||s!==+s||l!==+l||s===0||l===0)return null;var P=et("recharts-rectangle",d);if(!m){var L=mr(t),{radius:C}=L,F=qQ(L,mLe);return $I.createElement("path",YI({},F,{x:sl(a),y:sl(i),width:sl(s),height:sl(l),radius:typeof u=="number"?u:void 0,className:P,d:HQ(a,i,s,l,u)}))}var T=h.current,G=k.current,$=M.current,oe=v.current,se="0px ".concat(o===-1?1:o,"px"),pe="".concat(o,"px ").concat(o,"px"),N=zI(["strokeDasharray"],f,typeof c=="string"?c:KQ.animationEasing);return $I.createElement(Li,{animationId:w,key:w,canBegin:o>0,duration:f,easing:c,isActive:m,begin:p},R=>{var U=jt(T,s,R),E=jt(G,l,R),_=jt($,a,R),B=jt(oe,i,R);r.current&&(h.current=U,k.current=E,M.current=_,v.current=B);var j;g?R>0?j={transition:N,strokeDasharray:pe}:j={strokeDasharray:se}:j={strokeDasharray:pe};var re=mr(t),{radius:W}=re,K=qQ(re,gLe);return $I.createElement("path",YI({},K,{radius:typeof u=="number"?u:void 0,className:P,d:HQ(_,B,U,E,u),ref:r,style:zQ(zQ({},j),t.style)}))})};function $Q(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function YQ(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?$Q(Object(r),!0).forEach(function(o){yLe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):$Q(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function yLe(e,t,r){return(t=xLe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function xLe(e){var t=bLe(e,"string");return typeof t=="symbol"?t:t+""}function bLe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Px=Math.PI/180;var wLe=e=>e*180/Math.PI,Ar=(e,t,r,o)=>({x:e+Math.cos(-Px*o)*r,y:t+Math.sin(-Px*o)*r}),XI=function(t,r){var o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{top:0,right:0,bottom:0,left:0,width:0,height:0,brushBottom:0};return Math.min(Math.abs(t-(o.left||0)-(o.right||0)),Math.abs(r-(o.top||0)-(o.bottom||0)))/2},CLe=(e,t)=>{var{x:r,y:o}=e,{x:n,y:a}=t;return Math.sqrt((r-n)**2+(o-a)**2)},SLe=(e,t)=>{var{x:r,y:o}=e,{cx:n,cy:a}=t,i=CLe({x:r,y:o},{x:n,y:a});if(i<=0)return{radius:i,angle:0};var s=(r-n)/i,l=Math.acos(s);return o>a&&(l=2*Math.PI-l),{radius:i,angle:wLe(l),angleInRadian:l}},PLe=e=>{var{startAngle:t,endAngle:r}=e,o=Math.floor(t/360),n=Math.floor(r/360),a=Math.min(o,n);return{startAngle:t-a*360,endAngle:r-a*360}},ALe=(e,t)=>{var{startAngle:r,endAngle:o}=t,n=Math.floor(r/360),a=Math.floor(o/360),i=Math.min(n,a);return e+i*360},ZQ=(e,t)=>{var{relativeX:r,relativeY:o}=e,{radius:n,angle:a}=SLe({x:r,y:o},t),{innerRadius:i,outerRadius:s}=t;if(n<i||n>s||n===0)return null;var{startAngle:l,endAngle:u}=PLe(t),d=a,c;if(l<=u){for(;d>u;)d-=360;for(;d<l;)d+=360;c=d>=l&&d<=u}else{for(;d>l;)d-=360;for(;d<u;)d+=360;c=d>=u&&d<=l}return c?YQ(YQ({},t),{},{radius:n,angle:ALe(d,t)}):null};function JI(e){var{cx:t,cy:r,radius:o,startAngle:n,endAngle:a}=e,i=Ar(t,r,o,n),s=Ar(t,r,o,a);return{points:[i,s],cx:t,cy:r,radius:o,startAngle:n,endAngle:a}}var nee=z(ie());var XQ,JQ,QQ,eee,tee,ree,oee;function g3(){return g3=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},g3.apply(null,arguments)}function Cp(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var ILe=(e,t)=>{var r=vr(t-e),o=Math.min(Math.abs(t-e),359.999);return r*o},QI=e=>{var{cx:t,cy:r,radius:o,angle:n,sign:a,isExternal:i,cornerRadius:s,cornerIsExternal:l}=e,u=s*(i?1:-1)+o,d=Math.asin(s/u)/Px,c=l?n:n+a*d,f=Ar(t,r,u,c),p=Ar(t,r,o,c),g=l?n-a*d:n,m=Ar(t,r,u*Math.cos(d*Px),g);return{center:f,circleTangency:p,lineTangency:m,theta:d}},aee=e=>{var{cx:t,cy:r,innerRadius:o,outerRadius:n,startAngle:a,endAngle:i}=e,s=ILe(a,i),l=a+s,u=Ar(t,r,n,a),d=Ar(t,r,n,l),c=Nr(XQ||(XQ=Cp(["M ",",",`
31
+ A `,",",`,0,
32
+ `,",",`,
33
+ `,",",`
34
+ `])),u.x,u.y,n,n,+(Math.abs(s)>180),+(a>l),d.x,d.y);if(o>0){var f=Ar(t,r,o,a),p=Ar(t,r,o,l);c+=Nr(JQ||(JQ=Cp(["L ",",",`
35
+ A `,",",`,0,
36
+ `,",",`,
37
+ `,","," Z"])),p.x,p.y,o,o,+(Math.abs(s)>180),+(a<=l),f.x,f.y)}else c+=Nr(QQ||(QQ=Cp(["L ",","," Z"])),t,r);return c},DLe=e=>{var{cx:t,cy:r,innerRadius:o,outerRadius:n,cornerRadius:a,forceCornerRadius:i,cornerIsExternal:s,startAngle:l,endAngle:u}=e,d=vr(u-l),{circleTangency:c,lineTangency:f,theta:p}=QI({cx:t,cy:r,radius:n,angle:l,sign:d,cornerRadius:a,cornerIsExternal:s}),{circleTangency:g,lineTangency:m,theta:h}=QI({cx:t,cy:r,radius:n,angle:u,sign:-d,cornerRadius:a,cornerIsExternal:s}),k=s?Math.abs(l-u):Math.abs(l-u)-p-h;if(k<0)return i?Nr(eee||(eee=Cp(["M ",",",`
38
+ a`,",",",0,0,1,",`,0
39
+ a`,",",",0,0,1,",`,0
40
+ `])),f.x,f.y,a,a,a*2,a,a,-a*2):aee({cx:t,cy:r,innerRadius:o,outerRadius:n,startAngle:l,endAngle:u});var M=Nr(tee||(tee=Cp(["M ",",",`
41
+ A`,",",",0,0,",",",",",`
42
+ A`,",",",0,",",",",",",",`
43
+ A`,",",",0,0,",",",",",`
44
+ `])),f.x,f.y,a,a,+(d<0),c.x,c.y,n,n,+(k>180),+(d<0),g.x,g.y,a,a,+(d<0),m.x,m.y);if(o>0){var{circleTangency:v,lineTangency:b,theta:w}=QI({cx:t,cy:r,radius:o,angle:l,sign:d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),{circleTangency:P,lineTangency:L,theta:C}=QI({cx:t,cy:r,radius:o,angle:u,sign:-d,isExternal:!0,cornerRadius:a,cornerIsExternal:s}),F=s?Math.abs(l-u):Math.abs(l-u)-w-C;if(F<0&&a===0)return"".concat(M,"L").concat(t,",").concat(r,"Z");M+=Nr(ree||(ree=Cp(["L",",",`
45
+ A`,",",",0,0,",",",",",`
46
+ A`,",",",0,",",",",",",",`
47
+ A`,",",",0,0,",",",",","Z"])),L.x,L.y,a,a,+(d<0),P.x,P.y,o,o,+(F>180),+(d>0),v.x,v.y,a,a,+(d<0),b.x,b.y)}else M+=Nr(oee||(oee=Cp(["L",",","Z"])),t,r);return M},LLe={cx:0,cy:0,innerRadius:0,outerRadius:0,startAngle:0,endAngle:0,cornerRadius:0,forceCornerRadius:!1,cornerIsExternal:!1},e1=e=>{var t=_t(e,LLe),{cx:r,cy:o,innerRadius:n,outerRadius:a,cornerRadius:i,forceCornerRadius:s,cornerIsExternal:l,startAngle:u,endAngle:d,className:c}=t;if(a<n||u===d)return null;var f=et("recharts-sector",c),p=a-n,g=Qr(i,p,0,!0),m;return g>0&&Math.abs(u-d)<360?m=DLe({cx:r,cy:o,innerRadius:n,outerRadius:a,cornerRadius:Math.min(g,p/2),forceCornerRadius:s,cornerIsExternal:l,startAngle:u,endAngle:d}):m=aee({cx:r,cy:o,innerRadius:n,outerRadius:a,startAngle:u,endAngle:d}),nee.createElement("path",g3({},mr(t),{className:f,d:m}))};function iee(e,t,r){if(e==="horizontal")return[{x:t.x,y:r.top},{x:t.x,y:r.top+r.height}];if(e==="vertical")return[{x:r.left,y:t.y},{x:r.left+r.width,y:t.y}];if(WA(t)){if(e==="centric"){var{cx:o,cy:n,innerRadius:a,outerRadius:i,angle:s}=t,l=Ar(o,n,a,s),u=Ar(o,n,i,s);return[{x:l.x,y:l.y},{x:u.x,y:u.y}]}return JI(t)}}function see(e){return tI(e)?NaN:Number(e)}function t1(e){return e?(e=see(e),e===1/0||e===-1/0?(e<0?-1:1)*Number.MAX_VALUE:e===e?e:0):e===0?e:0}function r1(e,t,r){r&&typeof r!="number"&&px(e,t,r)&&(t=r=void 0),e=t1(e),t===void 0?(t=e,e=0):t=t1(t),r=r===void 0?e<t?1:-1:t1(r);let o=Math.max(Math.ceil((t-e)/(r||1)),0),n=new Array(o);for(let a=0;a<o;a++)n[a]=e,e+=r;return n}var la=e=>e.chartData,Sp=te([la],e=>{var t=e.chartData!=null?e.chartData.length-1:0;return{chartData:e.chartData,computedData:e.computedData,dataEndIndex:t,dataStartIndex:0}}),Pp=(e,t,r,o)=>o?Sp(e):la(e),o1=(e,t,r)=>r?Sp(e):la(e),lee=te([Pp],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:o}=e;return t!=null?t.slice(r,o+1):[]}),uee=te([Sp],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:o}=e;return t!=null?t.slice(r,o+1):[]}),dee=te([la],e=>{var{chartData:t,dataStartIndex:r,dataEndIndex:o}=e;return t!=null?t.slice(r,o+1):[]});function Wa(e){if(Array.isArray(e)&&e.length===2){var[t,r]=e;if(lt(t)&&lt(r))return!0}return!1}function cee(e,t,r){return r?e:[Math.min(e[0],t[0]),Math.max(e[1],t[1])]}function n1(e,t){if(t&&typeof e!="function"&&Array.isArray(e)&&e.length===2){var[r,o]=e,n,a;if(lt(r))n=r;else if(typeof r=="function")return;if(lt(o))a=o;else if(typeof o=="function")return;var i=[n,a];if(Wa(i))return i}}function fee(e,t,r){if(!(!r&&t==null)){if(typeof e=="function"&&t!=null)try{var o=e(t,r);if(Wa(o))return cee(o,t,r)}catch{}if(Array.isArray(e)&&e.length===2){var[n,a]=e,i,s;if(n==="auto")t!=null&&(i=Math.min(...t));else if(Be(n))i=n;else if(typeof n=="function")try{t!=null&&(i=n(t?.[0]))}catch{}else if(typeof n=="string"&&t3.test(n)){var l=t3.exec(n);if(l==null||l[1]==null||t==null)i=void 0;else{var u=+l[1];i=t[0]-u}}else i=t?.[0];if(a==="auto")t!=null&&(s=Math.max(...t));else if(Be(a))s=a;else if(typeof a=="function")try{t!=null&&(s=a(t?.[1]))}catch{}else if(typeof a=="string"&&r3.test(a)){var d=r3.exec(a);if(d==null||d[1]==null||t==null)s=void 0;else{var c=+d[1];s=t[1]+c}}else s=t?.[1];var f=[i,s];if(Wa(f))return t==null?f:cee(f,t,r)}}}var Kt=z(k3());var M3=z(k3());function h3(e){var t;return e===0?t=1:t=Math.floor(new M3.default(e).abs().log(10).toNumber())+1,t}function v3(e,t,r){for(var o=new M3.default(e),n=0,a=[];o.lt(t)&&n<1e5;)a.push(o.toNumber()),o=o.add(r),n++;return a}var mee=e=>{var[t,r]=e,[o,n]=[t,r];return t>r&&([o,n]=[r,t]),[o,n]},y3=(e,t,r)=>{if(e.lte(0))return new Kt.default(0);var o=h3(e.toNumber()),n=new Kt.default(10).pow(o),a=e.div(n),i=o!==1?.05:.1,s=new Kt.default(Math.ceil(a.div(i).toNumber())).add(r).mul(i),l=s.mul(n);return t?new Kt.default(l.toNumber()):new Kt.default(Math.ceil(l.toNumber()))},gee=(e,t,r)=>{var o;if(e.lte(0))return new Kt.default(0);var n=[1,2,2.5,5],a=e.toNumber(),i=Math.floor(new Kt.default(a).abs().log(10).toNumber()),s=new Kt.default(10).pow(i),l=e.div(s).toNumber(),u=n.findIndex(p=>p>=l-1e-10);if(u===-1&&(s=s.mul(10),u=0),u+=r,u>=n.length){var d=Math.floor(u/n.length);u%=n.length,s=s.mul(new Kt.default(10).pow(d))}var c=(o=n[u])!==null&&o!==void 0?o:1,f=new Kt.default(c).mul(s);return t?f:new Kt.default(Math.ceil(f.toNumber()))},RLe=(e,t,r)=>{var o=new Kt.default(1),n=new Kt.default(e);if(!n.isint()&&r){var a=Math.abs(e);a<1?(o=new Kt.default(10).pow(h3(e)-1),n=new Kt.default(Math.floor(n.div(o).toNumber())).mul(o)):a>1&&(n=new Kt.default(Math.floor(e)))}else e===0?n=new Kt.default(Math.floor((t-1)/2)):r||(n=new Kt.default(Math.floor(e)));for(var i=Math.floor((t-1)/2),s=[],l=0;l<t;l++)s.push(n.add(new Kt.default(l-i).mul(o)).toNumber());return s},kee=function(t,r,o,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:y3;if(!Number.isFinite((r-t)/(o-1)))return{step:new Kt.default(0),tickMin:new Kt.default(0),tickMax:new Kt.default(0)};var s=i(new Kt.default(r).sub(t).div(o-1),n,a),l;t<=0&&r>=0?l=new Kt.default(0):(l=new Kt.default(t).add(r).div(2),l=l.sub(new Kt.default(l).mod(s)));var u=Math.ceil(l.sub(t).div(s).toNumber()),d=Math.ceil(new Kt.default(r).sub(l).div(s).toNumber()),c=u+d+1;return c>o?kee(t,r,o,n,a+1,i):(c<o&&(d=r>0?d+(o-c):d,u=r>0?u:u+(o-c)),{step:s,tickMin:l.sub(new Kt.default(u).mul(s)),tickMax:l.add(new Kt.default(d).mul(s))})};var i1=function(t){var[r,o]=t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:6,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",s=Math.max(n,2),[l,u]=mee([r,o]);if(l===-1/0||u===1/0){var d=u===1/0?[l,...Array(n-1).fill(1/0)]:[...Array(n-1).fill(-1/0),u];return r>o?d.reverse():d}if(l===u)return RLe(l,n,a);var c=i==="snap125"?gee:y3,{step:f,tickMin:p,tickMax:g}=kee(l,u,s,a,0,c),m=v3(p,g.add(new Kt.default(.1).mul(f)),f);return r>o?m.reverse():m},s1=function(t,r){var[o,n]=t,a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,i=arguments.length>3&&arguments[3]!==void 0?arguments[3]:"auto",[s,l]=mee([o,n]);if(s===-1/0||l===1/0)return[o,n];if(s===l)return[s];var u=i==="snap125"?gee:y3,d=Math.max(r,2),c=u(new Kt.default(l).sub(s).div(d-1),a,0),f=[...v3(new Kt.default(s),new Kt.default(l),c),l];return a===!1&&(f=f.map(p=>Math.round(p))),o>n?f.reverse():f};var x3=e=>e.rootProps.maxBarSize,Mee=e=>e.rootProps.barGap,l1=e=>e.rootProps.barCategoryGap,hee=e=>e.rootProps.barSize,Zd=e=>e.rootProps.stackOffset,u1=e=>e.rootProps.reverseStackOrder,Kk=e=>e.options.chartName,d1=e=>e.rootProps.syncId,b3=e=>e.rootProps.syncMethod,c1=e=>e.options.eventEmitter,vee=e=>e.rootProps.baseValue;var Nt={grid:-100,barBackground:-50,area:100,cursorRectangle:200,bar:300,line:400,axis:500,scatter:600,activeBar:1e3,cursorLine:1100,activeDot:1200,label:2e3};var Xd={allowDecimals:!1,allowDuplicatedCategory:!0,allowDataOverflow:!1,angle:0,angleAxisId:0,axisLine:!0,axisLineType:"polygon",cx:0,cy:0,hide:!1,includeHidden:!1,label:!1,niceTicks:"auto",orientation:"outer",reversed:!1,scale:"auto",tick:!0,tickLine:!0,tickSize:8,type:"auto",zIndex:Nt.axis};var xs={allowDataOverflow:!1,allowDecimals:!1,allowDuplicatedCategory:!0,angle:0,axisLine:!0,includeHidden:!1,hide:!1,niceTicks:"auto",label:!1,orientation:"right",radiusAxisId:0,reversed:!1,scale:"auto",stroke:"#ccc",tick:!0,tickCount:5,tickLine:!0,type:"auto",zIndex:Nt.axis};var Ap=(e,t)=>{if(!(!e||!t))return e!=null&&e.reversed?[t[1],t[0]]:t};function Ip(e,t,r){if(r!=="auto")return r;if(e!=null)return Sn(e,t)?"category":"number"}function yee(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function f1(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yee(Object(r),!0).forEach(function(o){NLe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yee(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function NLe(e,t,r){return(t=TLe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TLe(e){var t=OLe(e,"string");return typeof t=="symbol"?t:t+""}function OLe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xee={allowDataOverflow:Xd.allowDataOverflow,allowDecimals:Xd.allowDecimals,allowDuplicatedCategory:!1,dataKey:void 0,domain:void 0,id:Xd.angleAxisId,includeHidden:!1,name:void 0,reversed:Xd.reversed,scale:Xd.scale,tick:Xd.tick,tickCount:void 0,ticks:void 0,type:Xd.type,unit:void 0,niceTicks:"auto"},bee={allowDataOverflow:xs.allowDataOverflow,allowDecimals:xs.allowDecimals,allowDuplicatedCategory:xs.allowDuplicatedCategory,dataKey:void 0,domain:void 0,id:xs.radiusAxisId,includeHidden:xs.includeHidden,name:void 0,reversed:xs.reversed,scale:xs.scale,tick:xs.tick,tickCount:xs.tickCount,ticks:void 0,type:xs.type,unit:void 0,niceTicks:"auto"},ELe=(e,t)=>{if(t!=null)return e.polarAxis.angleAxis[t]},p1=te([ELe,a3],(e,t)=>{var r;if(e!=null)return e;var o=(r=Ip(t,"angleAxis",xee.type))!==null&&r!==void 0?r:"category";return f1(f1({},xee),{},{type:o})}),_Le=(e,t)=>e.polarAxis.radiusAxis[t],m1=te([_Le,a3],(e,t)=>{var r;if(e!=null)return e;var o=(r=Ip(t,"radiusAxis",bee.type))!==null&&r!==void 0?r:"category";return f1(f1({},bee),{},{type:o})}),g1=e=>e.polarOptions,w3=te([Pn,An,fr],XI),wee=te([g1,w3],(e,t)=>{if(e!=null)return Qr(e.innerRadius,t,0)}),Cee=te([g1,w3],(e,t)=>{if(e!=null)return Qr(e.outerRadius,t,t*.8)}),FLe=e=>{if(e==null)return[0,0];var{startAngle:t,endAngle:r}=e;return[t,r]},C3=te([g1],FLe),Gvt=te([p1,C3],Ap),S3=te([w3,wee,Cee],(e,t,r)=>{if(!(e==null||t==null||r==null))return[t,r]}),jvt=te([m1,S3],Ap),k1=te([mt,g1,wee,Cee,Pn,An],(e,t,r,o,n,a)=>{if(!(e!=="centric"&&e!=="radial"||t==null||r==null||o==null)){var{cx:i,cy:s,startAngle:l,endAngle:u}=t;return{cx:Qr(i,n,n/2),cy:Qr(s,a,a/2),innerRadius:r,outerRadius:o,startAngle:l,endAngle:u,clockWise:!1}}});var Tr=(e,t)=>t;var Dp=(e,t,r)=>r;function Jd(e){return e?.id}function M1(e,t,r){var{chartData:o=[]}=t,{allowDuplicatedCategory:n,dataKey:a}=r,i=new Map;return e.forEach(s=>{var l,u=(l=s.data)!==null&&l!==void 0?l:o;if(!(u==null||u.length===0)){var d=Jd(s);u.forEach((c,f)=>{var p=a==null||n?f:String(vt(c,a,null)),g=vt(c,s.dataKey,0),m;i.has(p)?m=i.get(p):m={},Object.assign(m,{[d]:g}),i.set(p,m)})}}),Array.from(i.values())}function Lp(e){return"stackId"in e&&e.stackId!=null&&e.dataKey!=null}var $k=(e,t)=>e===t?!0:e==null||t==null?!1:e[0]===t[0]&&e[1]===t[1];function Yk(e,t){return Array.isArray(e)&&Array.isArray(t)&&e.length===0&&t.length===0?!0:e===t}function See(e,t){if(e.length===t.length){for(var r=0;r<e.length;r++)if(e[r]!==t[r])return!1;return!0}return!1}var mo=e=>{var t=mt(e);return t==="horizontal"?"xAxis":t==="vertical"?"yAxis":t==="centric"?"angleAxis":"radiusAxis"};var Qd=e=>e.tooltip.settings.axisId;function Ax(e){if(e!=null){var t=e.ticks,r=e.bandwidth,o=e.range(),n=[Math.min(...o),Math.max(...o)];return{domain:()=>e.domain(),range:(function(a){function i(){return a.apply(this,arguments)}return i.toString=function(){return a.toString()},i})(()=>n),rangeMin:()=>n[0],rangeMax:()=>n[1],isInRange(a){var i=n[0],s=n[1];return i<=s?a>=i&&a<=s:a>=s&&a<=i},bandwidth:r?()=>r.call(e):void 0,ticks:t?a=>t.call(e,a):void 0,map:(a,i)=>{var s=e(a);if(s!=null){if(e.bandwidth&&i!==null&&i!==void 0&&i.position){var l=e.bandwidth();switch(i.position){case"middle":s+=l/2;break;case"end":s+=l;break;default:break}}return s}}}}}var h1=(e,t)=>{if(t!=null)switch(e){case"linear":{if(!Wa(t)){for(var r,o,n=0;n<t.length;n++){var a=t[n];lt(a)&&((r===void 0||a<r)&&(r=a),(o===void 0||a>o)&&(o=a))}return r!==void 0&&o!==void 0?[r,o]:void 0}return t}default:return t}};var $x={};oj($x,{scaleBand:()=>Rx,scaleDiverging:()=>Q1,scaleDivergingLog:()=>nV,scaleDivergingPow:()=>eD,scaleDivergingSqrt:()=>Kte,scaleDivergingSymlog:()=>aV,scaleIdentity:()=>F1,scaleImplicit:()=>S1,scaleLinear:()=>_1,scaleLog:()=>B1,scaleOrdinal:()=>Jk,scalePoint:()=>Nee,scalePow:()=>Gx,scaleQuantile:()=>W1,scaleQuantize:()=>G1,scaleRadial:()=>U1,scaleSequential:()=>Y1,scaleSequentialLog:()=>rV,scaleSequentialPow:()=>Z1,scaleSequentialQuantile:()=>X1,scaleSequentialSqrt:()=>Hte,scaleSequentialSymlog:()=>oV,scaleSqrt:()=>mte,scaleSymlog:()=>V1,scaleThreshold:()=>j1,scaleTime:()=>eV,scaleUtc:()=>tV,tickFormat:()=>Fx});function qn(e,t){return e==null||t==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function P3(e,t){return e==null||t==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function Rp(e){let t,r,o;e.length!==2?(t=qn,r=(s,l)=>qn(e(s),l),o=(s,l)=>e(s)-l):(t=e===qn||e===P3?e:BLe,r=e,o=e);function n(s,l,u=0,d=s.length){if(u<d){if(t(l,l)!==0)return d;do{let c=u+d>>>1;r(s[c],l)<0?u=c+1:d=c}while(u<d)}return u}function a(s,l,u=0,d=s.length){if(u<d){if(t(l,l)!==0)return d;do{let c=u+d>>>1;r(s[c],l)<=0?u=c+1:d=c}while(u<d)}return u}function i(s,l,u=0,d=s.length){let c=n(s,l,u,d-1);return c>u&&o(s[c-1],l)>-o(s[c],l)?c-1:c}return{left:n,center:i,right:a}}function BLe(){return 0}function Ix(e){return e===null?NaN:+e}function*Pee(e,t){if(t===void 0)for(let r of e)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let o of e)(o=t(o,++r,e))!=null&&(o=+o)>=o&&(yield o)}}var Aee=Rp(qn),Iee=Aee.right,VLe=Aee.left,ULe=Rp(Ix).center,bs=Iee;var Zk=class extends Map{constructor(t,r=jLe){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),t!=null)for(let[o,n]of t)this.set(o,n)}get(t){return super.get(Dee(this,t))}has(t){return super.has(Dee(this,t))}set(t,r){return super.set(WLe(this,t),r)}delete(t){return super.delete(GLe(this,t))}};function Dee({_intern:e,_key:t},r){let o=t(r);return e.has(o)?e.get(o):r}function WLe({_intern:e,_key:t},r){let o=t(r);return e.has(o)?e.get(o):(e.set(o,r),r)}function GLe({_intern:e,_key:t},r){let o=t(r);return e.has(o)&&(r=e.get(o),e.delete(o)),r}function jLe(e){return e!==null&&typeof e=="object"?e.valueOf():e}function Lee(e=qn){if(e===qn)return A3;if(typeof e!="function")throw new TypeError("compare is not a function");return(t,r)=>{let o=e(t,r);return o||o===0?o:(e(r,r)===0)-(e(t,t)===0)}}function A3(e,t){return(e==null||!(e>=e))-(t==null||!(t>=t))||(e<t?-1:e>t?1:0)}var zLe=Math.sqrt(50),qLe=Math.sqrt(10),HLe=Math.sqrt(2);function v1(e,t,r){let o=(t-e)/Math.max(0,r),n=Math.floor(Math.log10(o)),a=o/Math.pow(10,n),i=a>=zLe?10:a>=qLe?5:a>=HLe?2:1,s,l,u;return n<0?(u=Math.pow(10,-n)/i,s=Math.round(e*u),l=Math.round(t*u),s/u<e&&++s,l/u>t&&--l,u=-u):(u=Math.pow(10,n)*i,s=Math.round(e/u),l=Math.round(t/u),s*u<e&&++s,l*u>t&&--l),l<s&&.5<=r&&r<2?v1(e,t,r*2):[s,l,u]}function Np(e,t,r){if(t=+t,e=+e,r=+r,!(r>0))return[];if(e===t)return[e];let o=t<e,[n,a,i]=o?v1(t,e,r):v1(e,t,r);if(!(a>=n))return[];let s=a-n+1,l=new Array(s);if(o)if(i<0)for(let u=0;u<s;++u)l[u]=(a-u)/-i;else for(let u=0;u<s;++u)l[u]=(a-u)*i;else if(i<0)for(let u=0;u<s;++u)l[u]=(n+u)/-i;else for(let u=0;u<s;++u)l[u]=(n+u)*i;return l}function Dx(e,t,r){return t=+t,e=+e,r=+r,v1(e,t,r)[2]}function Xk(e,t,r){t=+t,e=+e,r=+r;let o=t<e,n=o?Dx(t,e,r):Dx(e,t,r);return(o?-1:1)*(n<0?1/-n:n)}function y1(e,t){let r;if(t===void 0)for(let o of e)o!=null&&(r<o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let n of e)(n=t(n,++o,e))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function x1(e,t){let r;if(t===void 0)for(let o of e)o!=null&&(r>o||r===void 0&&o>=o)&&(r=o);else{let o=-1;for(let n of e)(n=t(n,++o,e))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function b1(e,t,r=0,o=1/0,n){if(t=Math.floor(t),r=Math.floor(Math.max(0,r)),o=Math.floor(Math.min(e.length-1,o)),!(r<=t&&t<=o))return e;for(n=n===void 0?A3:Lee(n);o>r;){if(o-r>600){let l=o-r+1,u=t-r+1,d=Math.log(l),c=.5*Math.exp(2*d/3),f=.5*Math.sqrt(d*c*(l-c)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(t-u*c/l+f)),g=Math.min(o,Math.floor(t+(l-u)*c/l+f));b1(e,t,p,g,n)}let a=e[t],i=r,s=o;for(Lx(e,r,t),n(e[o],a)>0&&Lx(e,r,o);i<s;){for(Lx(e,i,s),++i,--s;n(e[i],a)<0;)++i;for(;n(e[s],a)>0;)--s}n(e[r],a)===0?Lx(e,r,s):(++s,Lx(e,s,o)),s<=t&&(r=s+1),t<=s&&(o=s-1)}return e}function Lx(e,t,r){let o=e[t];e[t]=e[r],e[r]=o}function w1(e,t,r){if(e=Float64Array.from(Pee(e,r)),!(!(o=e.length)||isNaN(t=+t))){if(t<=0||o<2)return x1(e);if(t>=1)return y1(e);var o,n=(o-1)*t,a=Math.floor(n),i=y1(b1(e,a).subarray(0,a+1)),s=x1(e.subarray(a+1));return i+(s-i)*(n-a)}}function I3(e,t,r=Ix){if(!(!(o=e.length)||isNaN(t=+t))){if(t<=0||o<2)return+r(e[0],0,e);if(t>=1)return+r(e[o-1],o-1,e);var o,n=(o-1)*t,a=Math.floor(n),i=+r(e[a],a,e),s=+r(e[a+1],a+1,e);return i+(s-i)*(n-a)}}function C1(e,t,r){e=+e,t=+t,r=(n=arguments.length)<2?(t=e,e=0,1):n<3?1:+r;for(var o=-1,n=Math.max(0,Math.ceil((t-e)/r))|0,a=new Array(n);++o<n;)a[o]=e+o*r;return a}function Vr(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e);break}return this}function Ti(e,t){switch(arguments.length){case 0:break;case 1:{typeof e=="function"?this.interpolator(e):this.range(e);break}default:{this.domain(e),typeof t=="function"?this.interpolator(t):this.range(t);break}}return this}var S1=Symbol("implicit");function Jk(){var e=new Zk,t=[],r=[],o=S1;function n(a){let i=e.get(a);if(i===void 0){if(o!==S1)return o;e.set(a,i=t.push(a)-1)}return r[i%r.length]}return n.domain=function(a){if(!arguments.length)return t.slice();t=[],e=new Zk;for(let i of a)e.has(i)||e.set(i,t.push(i)-1);return n},n.range=function(a){return arguments.length?(r=Array.from(a),n):r.slice()},n.unknown=function(a){return arguments.length?(o=a,n):o},n.copy=function(){return Jk(t,r).unknown(o)},Vr.apply(n,arguments),n}function Rx(){var e=Jk().unknown(void 0),t=e.domain,r=e.range,o=0,n=1,a,i,s=!1,l=0,u=0,d=.5;delete e.unknown;function c(){var f=t().length,p=n<o,g=p?n:o,m=p?o:n;a=(m-g)/Math.max(1,f-l+u*2),s&&(a=Math.floor(a)),g+=(m-g-a*(f-l))*d,i=a*(1-l),s&&(g=Math.round(g),i=Math.round(i));var h=C1(f).map(function(k){return g+a*k});return r(p?h.reverse():h)}return e.domain=function(f){return arguments.length?(t(f),c()):t()},e.range=function(f){return arguments.length?([o,n]=f,o=+o,n=+n,c()):[o,n]},e.rangeRound=function(f){return[o,n]=f,o=+o,n=+n,s=!0,c()},e.bandwidth=function(){return i},e.step=function(){return a},e.round=function(f){return arguments.length?(s=!!f,c()):s},e.padding=function(f){return arguments.length?(l=Math.min(1,u=+f),c()):l},e.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),c()):l},e.paddingOuter=function(f){return arguments.length?(u=+f,c()):u},e.align=function(f){return arguments.length?(d=Math.max(0,Math.min(1,f)),c()):d},e.copy=function(){return Rx(t(),[o,n]).round(s).paddingInner(l).paddingOuter(u).align(d)},Vr.apply(c(),arguments)}function Ree(e){var t=e.copy;return e.padding=e.paddingOuter,delete e.paddingInner,delete e.paddingOuter,e.copy=function(){return Ree(t())},e}function Nee(){return Ree(Rx.apply(null,arguments).paddingInner(1))}function P1(e,t,r){e.prototype=t.prototype=r,r.constructor=e}function D3(e,t){var r=Object.create(e.prototype);for(var o in t)r[o]=t[o];return r}function Ox(){}var Nx=.7,D1=1/Nx,Qk="\\s*([+-]?\\d+)\\s*",Tx="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",cl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",KLe=/^#([0-9a-f]{3,8})$/,$Le=new RegExp(`^rgb\\(${Qk},${Qk},${Qk}\\)$`),YLe=new RegExp(`^rgb\\(${cl},${cl},${cl}\\)$`),ZLe=new RegExp(`^rgba\\(${Qk},${Qk},${Qk},${Tx}\\)$`),XLe=new RegExp(`^rgba\\(${cl},${cl},${cl},${Tx}\\)$`),JLe=new RegExp(`^hsl\\(${Tx},${cl},${cl}\\)$`),QLe=new RegExp(`^hsla\\(${Tx},${cl},${cl},${Tx}\\)$`),Tee={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074};P1(Ox,ec,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:Oee,formatHex:Oee,formatHex8:eRe,formatHsl:tRe,formatRgb:Eee,toString:Eee});function Oee(){return this.rgb().formatHex()}function eRe(){return this.rgb().formatHex8()}function tRe(){return Wee(this).formatHsl()}function Eee(){return this.rgb().formatRgb()}function ec(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=KLe.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?_ee(t):r===3?new ua(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?A1(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?A1(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=$Le.exec(e))?new ua(t[1],t[2],t[3],1):(t=YLe.exec(e))?new ua(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ZLe.exec(e))?A1(t[1],t[2],t[3],t[4]):(t=XLe.exec(e))?A1(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=JLe.exec(e))?Vee(t[1],t[2]/100,t[3]/100,1):(t=QLe.exec(e))?Vee(t[1],t[2]/100,t[3]/100,t[4]):Tee.hasOwnProperty(e)?_ee(Tee[e]):e==="transparent"?new ua(NaN,NaN,NaN,0):null}function _ee(e){return new ua(e>>16&255,e>>8&255,e&255,1)}function A1(e,t,r,o){return o<=0&&(e=t=r=NaN),new ua(e,t,r,o)}function rRe(e){return e instanceof Ox||(e=ec(e)),e?(e=e.rgb(),new ua(e.r,e.g,e.b,e.opacity)):new ua}function eM(e,t,r,o){return arguments.length===1?rRe(e):new ua(e,t,r,o??1)}function ua(e,t,r,o){this.r=+e,this.g=+t,this.b=+r,this.opacity=+o}P1(ua,eM,D3(Ox,{brighter(e){return e=e==null?D1:Math.pow(D1,e),new ua(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?Nx:Math.pow(Nx,e),new ua(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new ua(Op(this.r),Op(this.g),Op(this.b),L1(this.opacity))},displayable(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:Fee,formatHex:Fee,formatHex8:oRe,formatRgb:Bee,toString:Bee}));function Fee(){return`#${Tp(this.r)}${Tp(this.g)}${Tp(this.b)}`}function oRe(){return`#${Tp(this.r)}${Tp(this.g)}${Tp(this.b)}${Tp((isNaN(this.opacity)?1:this.opacity)*255)}`}function Bee(){let e=L1(this.opacity);return`${e===1?"rgb(":"rgba("}${Op(this.r)}, ${Op(this.g)}, ${Op(this.b)}${e===1?")":`, ${e})`}`}function L1(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Op(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Tp(e){return e=Op(e),(e<16?"0":"")+e.toString(16)}function Vee(e,t,r,o){return o<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new ws(e,t,r,o)}function Wee(e){if(e instanceof ws)return new ws(e.h,e.s,e.l,e.opacity);if(e instanceof Ox||(e=ec(e)),!e)return new ws;if(e instanceof ws)return e;e=e.rgb();var t=e.r/255,r=e.g/255,o=e.b/255,n=Math.min(t,r,o),a=Math.max(t,r,o),i=NaN,s=a-n,l=(a+n)/2;return s?(t===a?i=(r-o)/s+(r<o)*6:r===a?i=(o-t)/s+2:i=(t-r)/s+4,s/=l<.5?a+n:2-a-n,i*=60):s=l>0&&l<1?0:i,new ws(i,s,l,e.opacity)}function Gee(e,t,r,o){return arguments.length===1?Wee(e):new ws(e,t,r,o??1)}function ws(e,t,r,o){this.h=+e,this.s=+t,this.l=+r,this.opacity=+o}P1(ws,Gee,D3(Ox,{brighter(e){return e=e==null?D1:Math.pow(D1,e),new ws(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?Nx:Math.pow(Nx,e),new ws(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,o=r+(r<.5?r:1-r)*t,n=2*r-o;return new ua(L3(e>=240?e-240:e+120,n,o),L3(e,n,o),L3(e<120?e+240:e-120,n,o),this.opacity)},clamp(){return new ws(Uee(this.h),I1(this.s),I1(this.l),L1(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=L1(this.opacity);return`${e===1?"hsl(":"hsla("}${Uee(this.h)}, ${I1(this.s)*100}%, ${I1(this.l)*100}%${e===1?")":`, ${e})`}`}}));function Uee(e){return e=(e||0)%360,e<0?e+360:e}function I1(e){return Math.max(0,Math.min(1,e||0))}function L3(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}function R3(e,t,r,o,n){var a=e*e,i=a*e;return((1-3*e+3*a-i)*t+(4-6*a+3*i)*r+(1+3*e+3*a-3*i)*o+i*n)/6}function jee(e){var t=e.length-1;return function(r){var o=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),n=e[o],a=e[o+1],i=o>0?e[o-1]:2*n-a,s=o<t-1?e[o+2]:2*a-n;return R3((r-o/t)*t,i,n,a,s)}}function zee(e){var t=e.length;return function(r){var o=Math.floor(((r%=1)<0?++r:r)*t),n=e[(o+t-1)%t],a=e[o%t],i=e[(o+1)%t],s=e[(o+2)%t];return R3((r-o/t)*t,n,a,i,s)}}var Ex=e=>()=>e;function nRe(e,t){return function(r){return e+r*t}}function aRe(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(o){return Math.pow(e+o*t,r)}}function qee(e){return(e=+e)==1?R1:function(t,r){return r-t?aRe(t,r,e):Ex(isNaN(t)?r:t)}}function R1(e,t){var r=t-e;return r?nRe(e,r):Ex(isNaN(e)?t:e)}var N3=(function e(t){var r=qee(t);function o(n,a){var i=r((n=eM(n)).r,(a=eM(a)).r),s=r(n.g,a.g),l=r(n.b,a.b),u=R1(n.opacity,a.opacity);return function(d){return n.r=i(d),n.g=s(d),n.b=l(d),n.opacity=u(d),n+""}}return o.gamma=e,o})(1);function Hee(e){return function(t){var r=t.length,o=new Array(r),n=new Array(r),a=new Array(r),i,s;for(i=0;i<r;++i)s=eM(t[i]),o[i]=s.r||0,n[i]=s.g||0,a[i]=s.b||0;return o=e(o),n=e(n),a=e(a),s.opacity=1,function(l){return s.r=o(l),s.g=n(l),s.b=a(l),s+""}}}var dxt=Hee(jee),cxt=Hee(zee);function Kee(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,o=t.slice(),n;return function(a){for(n=0;n<r;++n)o[n]=e[n]*(1-a)+t[n]*a;return o}}function $ee(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Yee(e,t){var r=t?t.length:0,o=e?Math.min(r,e.length):0,n=new Array(o),a=new Array(r),i;for(i=0;i<o;++i)n[i]=Ga(e[i],t[i]);for(;i<r;++i)a[i]=t[i];return function(s){for(i=0;i<o;++i)a[i]=n[i](s);return a}}function Zee(e,t){var r=new Date;return e=+e,t=+t,function(o){return r.setTime(e*(1-o)+t*o),r}}function tc(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}function Xee(e,t){var r={},o={},n;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(n in t)n in e?r[n]=Ga(e[n],t[n]):o[n]=t[n];return function(a){for(n in r)o[n]=r[n](a);return o}}var O3=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,T3=new RegExp(O3.source,"g");function iRe(e){return function(){return e}}function sRe(e){return function(t){return e(t)+""}}function Jee(e,t){var r=O3.lastIndex=T3.lastIndex=0,o,n,a,i=-1,s=[],l=[];for(e=e+"",t=t+"";(o=O3.exec(e))&&(n=T3.exec(t));)(a=n.index)>r&&(a=t.slice(r,a),s[i]?s[i]+=a:s[++i]=a),(o=o[0])===(n=n[0])?s[i]?s[i]+=n:s[++i]=n:(s[++i]=null,l.push({i,x:tc(o,n)})),r=T3.lastIndex;return r<t.length&&(a=t.slice(r),s[i]?s[i]+=a:s[++i]=a),s.length<2?l[0]?sRe(l[0].x):iRe(t):(t=l.length,function(u){for(var d=0,c;d<t;++d)s[(c=l[d]).i]=c.x(u);return s.join("")})}function Ga(e,t){var r=typeof t,o;return t==null||r==="boolean"?Ex(t):(r==="number"?tc:r==="string"?(o=ec(t))?(t=o,N3):Jee:t instanceof ec?N3:t instanceof Date?Zee:$ee(t)?Kee:Array.isArray(t)?Yee:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?Xee:tc)(e,t)}function Ep(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}function N1(e,t){t===void 0&&(t=e,e=Ga);for(var r=0,o=t.length-1,n=t[0],a=new Array(o<0?0:o);r<o;)a[r]=e(n,n=t[++r]);return function(i){var s=Math.max(0,Math.min(o-1,Math.floor(i*=o)));return a[s](i-s)}}function E3(e){return function(){return e}}function rc(e){return+e}var Qee=[0,1];function Oo(e){return e}function _3(e,t){return(t-=e=+e)?function(r){return(r-e)/t}:E3(isNaN(t)?NaN:.5)}function lRe(e,t){var r;return e>t&&(r=e,e=t,t=r),function(o){return Math.max(e,Math.min(t,o))}}function uRe(e,t,r){var o=e[0],n=e[1],a=t[0],i=t[1];return n<o?(o=_3(n,o),a=r(i,a)):(o=_3(o,n),a=r(a,i)),function(s){return a(o(s))}}function dRe(e,t,r){var o=Math.min(e.length,t.length)-1,n=new Array(o),a=new Array(o),i=-1;for(e[o]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++i<o;)n[i]=_3(e[i],e[i+1]),a[i]=r(t[i],t[i+1]);return function(s){var l=bs(e,s,1,o)-1;return a[l](n[l](s))}}function fl(e,t){return t.domain(e.domain()).range(e.range()).interpolate(e.interpolate()).clamp(e.clamp()).unknown(e.unknown())}function _p(){var e=Qee,t=Qee,r=Ga,o,n,a,i=Oo,s,l,u;function d(){var f=Math.min(e.length,t.length);return i!==Oo&&(i=lRe(e[0],e[f-1])),s=f>2?dRe:uRe,l=u=null,c}function c(f){return f==null||isNaN(f=+f)?a:(l||(l=s(e.map(o),t,r)))(o(i(f)))}return c.invert=function(f){return i(n((u||(u=s(t,e.map(o),tc)))(f)))},c.domain=function(f){return arguments.length?(e=Array.from(f,rc),d()):e.slice()},c.range=function(f){return arguments.length?(t=Array.from(f),d()):t.slice()},c.rangeRound=function(f){return t=Array.from(f),r=Ep,d()},c.clamp=function(f){return arguments.length?(i=f?!0:Oo,d()):i!==Oo},c.interpolate=function(f){return arguments.length?(r=f,d()):r},c.unknown=function(f){return arguments.length?(a=f,c):a},function(f,p){return o=f,n=p,d()}}function Fp(){return _p()(Oo,Oo)}function ete(e){return Math.abs(e=Math.round(e))>=1e21?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function Bp(e,t){if(!isFinite(e)||e===0)return null;var r=(e=t?e.toExponential(t-1):e.toExponential()).indexOf("e"),o=e.slice(0,r);return[o.length>1?o[0]+o.slice(2):o,+e.slice(r+1)]}function pl(e){return e=Bp(Math.abs(e)),e?e[1]:NaN}function tte(e,t){return function(r,o){for(var n=r.length,a=[],i=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>o&&(s=Math.max(1,o-l)),a.push(r.substring(n-=s,n+s)),!((l+=s+1)>o));)s=e[i=(i+1)%e.length];return a.reverse().join(t)}}function rte(e){return function(t){return t.replace(/[0-9]/g,function(r){return e[+r]})}}var cRe=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ml(e){if(!(t=cRe.exec(e)))throw new Error("invalid format: "+e);var t;return new T1({fill:t[1],align:t[2],sign:t[3],symbol:t[4],zero:t[5],width:t[6],comma:t[7],precision:t[8]&&t[8].slice(1),trim:t[9],type:t[10]})}ml.prototype=T1.prototype;function T1(e){this.fill=e.fill===void 0?" ":e.fill+"",this.align=e.align===void 0?">":e.align+"",this.sign=e.sign===void 0?"-":e.sign+"",this.symbol=e.symbol===void 0?"":e.symbol+"",this.zero=!!e.zero,this.width=e.width===void 0?void 0:+e.width,this.comma=!!e.comma,this.precision=e.precision===void 0?void 0:+e.precision,this.trim=!!e.trim,this.type=e.type===void 0?"":e.type+""}T1.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function ote(e){e:for(var t=e.length,r=1,o=-1,n;r<t;++r)switch(e[r]){case".":o=n=r;break;case"0":o===0&&(o=r),n=r;break;default:if(!+e[r])break e;o>0&&(o=0);break}return o>0?e.slice(0,o)+e.slice(n+1):e}var _x;function nte(e,t){var r=Bp(e,t);if(!r)return _x=void 0,e.toPrecision(t);var o=r[0],n=r[1],a=n-(_x=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,i=o.length;return a===i?o:a>i?o+new Array(a-i+1).join("0"):a>0?o.slice(0,a)+"."+o.slice(a):"0."+new Array(1-a).join("0")+Bp(e,Math.max(0,t+a-1))[0]}function F3(e,t){var r=Bp(e,t);if(!r)return e+"";var o=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+o:o.length>n+1?o.slice(0,n+1)+"."+o.slice(n+1):o+new Array(n-o.length+2).join("0")}var B3={"%":(e,t)=>(e*100).toFixed(t),b:e=>Math.round(e).toString(2),c:e=>e+"",d:ete,e:(e,t)=>e.toExponential(t),f:(e,t)=>e.toFixed(t),g:(e,t)=>e.toPrecision(t),o:e=>Math.round(e).toString(8),p:(e,t)=>F3(e*100,t),r:F3,s:nte,X:e=>Math.round(e).toString(16).toUpperCase(),x:e=>Math.round(e).toString(16)};function V3(e){return e}var ate=Array.prototype.map,ite=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function ste(e){var t=e.grouping===void 0||e.thousands===void 0?V3:tte(ate.call(e.grouping,Number),e.thousands+""),r=e.currency===void 0?"":e.currency[0]+"",o=e.currency===void 0?"":e.currency[1]+"",n=e.decimal===void 0?".":e.decimal+"",a=e.numerals===void 0?V3:rte(ate.call(e.numerals,String)),i=e.percent===void 0?"%":e.percent+"",s=e.minus===void 0?"\u2212":e.minus+"",l=e.nan===void 0?"NaN":e.nan+"";function u(c,f){c=ml(c);var p=c.fill,g=c.align,m=c.sign,h=c.symbol,k=c.zero,M=c.width,v=c.comma,b=c.precision,w=c.trim,P=c.type;P==="n"?(v=!0,P="g"):B3[P]||(b===void 0&&(b=12),w=!0,P="g"),(k||p==="0"&&g==="=")&&(k=!0,p="0",g="=");var L=(f&&f.prefix!==void 0?f.prefix:"")+(h==="$"?r:h==="#"&&/[boxX]/.test(P)?"0"+P.toLowerCase():""),C=(h==="$"?o:/[%p]/.test(P)?i:"")+(f&&f.suffix!==void 0?f.suffix:""),F=B3[P],T=/[defgprs%]/.test(P);b=b===void 0?6:/[gprs]/.test(P)?Math.max(1,Math.min(21,b)):Math.max(0,Math.min(20,b));function G($){var oe=L,se=C,pe,N,R;if(P==="c")se=F($)+se,$="";else{$=+$;var U=$<0||1/$<0;if($=isNaN($)?l:F(Math.abs($),b),w&&($=ote($)),U&&+$==0&&m!=="+"&&(U=!1),oe=(U?m==="("?m:s:m==="-"||m==="("?"":m)+oe,se=(P==="s"&&!isNaN($)&&_x!==void 0?ite[8+_x/3]:"")+se+(U&&m==="("?")":""),T){for(pe=-1,N=$.length;++pe<N;)if(R=$.charCodeAt(pe),48>R||R>57){se=(R===46?n+$.slice(pe+1):$.slice(pe))+se,$=$.slice(0,pe);break}}}v&&!k&&($=t($,1/0));var E=oe.length+$.length+se.length,_=E<M?new Array(M-E+1).join(p):"";switch(v&&k&&($=t(_+$,_.length?M-se.length:1/0),_=""),g){case"<":$=oe+$+se+_;break;case"=":$=oe+_+$+se;break;case"^":$=_.slice(0,E=_.length>>1)+oe+$+se+_.slice(E);break;default:$=_+oe+$+se;break}return a($)}return G.toString=function(){return c+""},G}function d(c,f){var p=Math.max(-8,Math.min(8,Math.floor(pl(f)/3)))*3,g=Math.pow(10,-p),m=u((c=ml(c),c.type="f",c),{suffix:ite[8+p/3]});return function(h){return m(g*h)}}return{format:u,formatPrefix:d}}var O1,tM,E1;U3({thousands:",",grouping:[3],currency:["$",""]});function U3(e){return O1=ste(e),tM=O1.format,E1=O1.formatPrefix,O1}function W3(e){return Math.max(0,-pl(Math.abs(e)))}function G3(e,t){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(pl(t)/3)))*3-pl(Math.abs(e)))}function j3(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,pl(t)-pl(e))+1}function Fx(e,t,r,o){var n=Xk(e,t,r),a;switch(o=ml(o??",f"),o.type){case"s":{var i=Math.max(Math.abs(e),Math.abs(t));return o.precision==null&&!isNaN(a=G3(n,i))&&(o.precision=a),E1(o,i)}case"":case"e":case"g":case"p":case"r":{o.precision==null&&!isNaN(a=j3(n,Math.max(Math.abs(e),Math.abs(t))))&&(o.precision=a-(o.type==="e"));break}case"f":case"%":{o.precision==null&&!isNaN(a=W3(n))&&(o.precision=a-(o.type==="%")*2);break}}return tM(o)}function Hn(e){var t=e.domain;return e.ticks=function(r){var o=t();return Np(o[0],o[o.length-1],r??10)},e.tickFormat=function(r,o){var n=t();return Fx(n[0],n[n.length-1],r??10,o)},e.nice=function(r){r==null&&(r=10);var o=t(),n=0,a=o.length-1,i=o[n],s=o[a],l,u,d=10;for(s<i&&(u=i,i=s,s=u,u=n,n=a,a=u);d-- >0;){if(u=Dx(i,s,r),u===l)return o[n]=i,o[a]=s,t(o);if(u>0)i=Math.floor(i/u)*u,s=Math.ceil(s/u)*u;else if(u<0)i=Math.ceil(i*u)/u,s=Math.floor(s*u)/u;else break;l=u}return e},e}function _1(){var e=Fp();return e.copy=function(){return fl(e,_1())},Vr.apply(e,arguments),Hn(e)}function F1(e){var t;function r(o){return o==null||isNaN(o=+o)?t:o}return r.invert=r,r.domain=r.range=function(o){return arguments.length?(e=Array.from(o,rc),r):e.slice()},r.unknown=function(o){return arguments.length?(t=o,r):t},r.copy=function(){return F1(e).unknown(t)},e=arguments.length?Array.from(e,rc):[0,1],Hn(r)}function Bx(e,t){e=e.slice();var r=0,o=e.length-1,n=e[r],a=e[o],i;return a<n&&(i=r,r=o,o=i,i=n,n=a,a=i),e[r]=t.floor(n),e[o]=t.ceil(a),e}function lte(e){return Math.log(e)}function ute(e){return Math.exp(e)}function fRe(e){return-Math.log(-e)}function pRe(e){return-Math.exp(-e)}function mRe(e){return isFinite(e)?+("1e"+e):e<0?0:e}function gRe(e){return e===10?mRe:e===Math.E?Math.exp:t=>Math.pow(e,t)}function kRe(e){return e===Math.E?Math.log:e===10&&Math.log10||e===2&&Math.log2||(e=Math.log(e),t=>Math.log(t)/e)}function dte(e){return(t,r)=>-e(-t,r)}function Vx(e){let t=e(lte,ute),r=t.domain,o=10,n,a;function i(){return n=kRe(o),a=gRe(o),r()[0]<0?(n=dte(n),a=dte(a),e(fRe,pRe)):e(lte,ute),t}return t.base=function(s){return arguments.length?(o=+s,i()):o},t.domain=function(s){return arguments.length?(r(s),i()):r()},t.ticks=s=>{let l=r(),u=l[0],d=l[l.length-1],c=d<u;c&&([u,d]=[d,u]);let f=n(u),p=n(d),g,m,h=s==null?10:+s,k=[];if(!(o%1)&&p-f<h){if(f=Math.floor(f),p=Math.ceil(p),u>0){for(;f<=p;++f)for(g=1;g<o;++g)if(m=f<0?g/a(-f):g*a(f),!(m<u)){if(m>d)break;k.push(m)}}else for(;f<=p;++f)for(g=o-1;g>=1;--g)if(m=f>0?g/a(-f):g*a(f),!(m<u)){if(m>d)break;k.push(m)}k.length*2<h&&(k=Np(u,d,h))}else k=Np(f,p,Math.min(p-f,h)).map(a);return c?k.reverse():k},t.tickFormat=(s,l)=>{if(s==null&&(s=10),l==null&&(l=o===10?"s":","),typeof l!="function"&&(!(o%1)&&(l=ml(l)).precision==null&&(l.trim=!0),l=tM(l)),s===1/0)return l;let u=Math.max(1,o*s/t.ticks().length);return d=>{let c=d/a(Math.round(n(d)));return c*o<o-.5&&(c*=o),c<=u?l(d):""}},t.nice=()=>r(Bx(r(),{floor:s=>a(Math.floor(n(s))),ceil:s=>a(Math.ceil(n(s)))})),t}function B1(){let e=Vx(_p()).domain([1,10]);return e.copy=()=>fl(e,B1()).base(e.base()),Vr.apply(e,arguments),e}function cte(e){return function(t){return Math.sign(t)*Math.log1p(Math.abs(t/e))}}function fte(e){return function(t){return Math.sign(t)*Math.expm1(Math.abs(t))*e}}function Ux(e){var t=1,r=e(cte(t),fte(t));return r.constant=function(o){return arguments.length?e(cte(t=+o),fte(t)):t},Hn(r)}function V1(){var e=Ux(_p());return e.copy=function(){return fl(e,V1()).constant(e.constant())},Vr.apply(e,arguments)}function pte(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function MRe(e){return e<0?-Math.sqrt(-e):Math.sqrt(e)}function hRe(e){return e<0?-e*e:e*e}function Wx(e){var t=e(Oo,Oo),r=1;function o(){return r===1?e(Oo,Oo):r===.5?e(MRe,hRe):e(pte(r),pte(1/r))}return t.exponent=function(n){return arguments.length?(r=+n,o()):r},Hn(t)}function Gx(){var e=Wx(_p());return e.copy=function(){return fl(e,Gx()).exponent(e.exponent())},Vr.apply(e,arguments),e}function mte(){return Gx.apply(null,arguments).exponent(.5)}function gte(e){return Math.sign(e)*e*e}function vRe(e){return Math.sign(e)*Math.sqrt(Math.abs(e))}function U1(){var e=Fp(),t=[0,1],r=!1,o;function n(a){var i=vRe(e(a));return isNaN(i)?o:r?Math.round(i):i}return n.invert=function(a){return e.invert(gte(a))},n.domain=function(a){return arguments.length?(e.domain(a),n):e.domain()},n.range=function(a){return arguments.length?(e.range((t=Array.from(a,rc)).map(gte)),n):t.slice()},n.rangeRound=function(a){return n.range(a).round(!0)},n.round=function(a){return arguments.length?(r=!!a,n):r},n.clamp=function(a){return arguments.length?(e.clamp(a),n):e.clamp()},n.unknown=function(a){return arguments.length?(o=a,n):o},n.copy=function(){return U1(e.domain(),t).round(r).clamp(e.clamp()).unknown(o)},Vr.apply(n,arguments),Hn(n)}function W1(){var e=[],t=[],r=[],o;function n(){var i=0,s=Math.max(1,t.length);for(r=new Array(s-1);++i<s;)r[i-1]=I3(e,i/s);return a}function a(i){return i==null||isNaN(i=+i)?o:t[bs(r,i)]}return a.invertExtent=function(i){var s=t.indexOf(i);return s<0?[NaN,NaN]:[s>0?r[s-1]:e[0],s<r.length?r[s]:e[e.length-1]]},a.domain=function(i){if(!arguments.length)return e.slice();e=[];for(let s of i)s!=null&&!isNaN(s=+s)&&e.push(s);return e.sort(qn),n()},a.range=function(i){return arguments.length?(t=Array.from(i),n()):t.slice()},a.unknown=function(i){return arguments.length?(o=i,a):o},a.quantiles=function(){return r.slice()},a.copy=function(){return W1().domain(e).range(t).unknown(o)},Vr.apply(a,arguments)}function G1(){var e=0,t=1,r=1,o=[.5],n=[0,1],a;function i(l){return l!=null&&l<=l?n[bs(o,l,0,r)]:a}function s(){var l=-1;for(o=new Array(r);++l<r;)o[l]=((l+1)*t-(l-r)*e)/(r+1);return i}return i.domain=function(l){return arguments.length?([e,t]=l,e=+e,t=+t,s()):[e,t]},i.range=function(l){return arguments.length?(r=(n=Array.from(l)).length-1,s()):n.slice()},i.invertExtent=function(l){var u=n.indexOf(l);return u<0?[NaN,NaN]:u<1?[e,o[0]]:u>=r?[o[r-1],t]:[o[u-1],o[u]]},i.unknown=function(l){return arguments.length&&(a=l),i},i.thresholds=function(){return o.slice()},i.copy=function(){return G1().domain([e,t]).range(n).unknown(a)},Vr.apply(Hn(i),arguments)}function j1(){var e=[.5],t=[0,1],r,o=1;function n(a){return a!=null&&a<=a?t[bs(e,a,0,o)]:r}return n.domain=function(a){return arguments.length?(e=Array.from(a),o=Math.min(e.length,t.length-1),n):e.slice()},n.range=function(a){return arguments.length?(t=Array.from(a),o=Math.min(e.length,t.length-1),n):t.slice()},n.invertExtent=function(a){var i=t.indexOf(a);return[e[i-1],e[i]]},n.unknown=function(a){return arguments.length?(r=a,n):r},n.copy=function(){return j1().domain(e).range(t).unknown(r)},Vr.apply(n,arguments)}var z3=new Date,q3=new Date;function yr(e,t,r,o){function n(a){return e(a=arguments.length===0?new Date:new Date(+a)),a}return n.floor=a=>(e(a=new Date(+a)),a),n.ceil=a=>(e(a=new Date(a-1)),t(a,1),e(a),a),n.round=a=>{let i=n(a),s=n.ceil(a);return a-i<s-a?i:s},n.offset=(a,i)=>(t(a=new Date(+a),i==null?1:Math.floor(i)),a),n.range=(a,i,s)=>{let l=[];if(a=n.ceil(a),s=s==null?1:Math.floor(s),!(a<i)||!(s>0))return l;let u;do l.push(u=new Date(+a)),t(a,s),e(a);while(u<a&&a<i);return l},n.filter=a=>yr(i=>{if(i>=i)for(;e(i),!a(i);)i.setTime(i-1)},(i,s)=>{if(i>=i)if(s<0)for(;++s<=0;)for(;t(i,-1),!a(i););else for(;--s>=0;)for(;t(i,1),!a(i););}),r&&(n.count=(a,i)=>(z3.setTime(+a),q3.setTime(+i),e(z3),e(q3),Math.floor(r(z3,q3))),n.every=a=>(a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?n.filter(o?i=>o(i)%a===0:i=>n.count(0,i)%a===0):n)),n}var jx=yr(()=>{},(e,t)=>{e.setTime(+e+t)},(e,t)=>t-e);jx.every=e=>(e=Math.floor(e),!isFinite(e)||!(e>0)?null:e>1?yr(t=>{t.setTime(Math.floor(t/e)*e)},(t,r)=>{t.setTime(+t+r*e)},(t,r)=>(r-t)/e):jx);var x0t=jx.range;var Oi=yr(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+t*1e3)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds()),kte=Oi.range;var rM=yr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getMinutes()),yRe=rM.range,oM=yr(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+t*6e4)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes()),xRe=oM.range;var nM=yr(e=>{e.setTime(e-e.getMilliseconds()-e.getSeconds()*1e3-e.getMinutes()*6e4)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getHours()),bRe=nM.range,aM=yr(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+t*36e5)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours()),wRe=aM.range;var fu=yr(e=>e.setHours(0,0,0,0),(e,t)=>e.setDate(e.getDate()+t),(e,t)=>(t-e-(t.getTimezoneOffset()-e.getTimezoneOffset())*6e4)/864e5,e=>e.getDate()-1),CRe=fu.range,Wp=yr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1),SRe=Wp.range,z1=yr(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>Math.floor(e/864e5)),PRe=z1.range;function Gp(e){return yr(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,r)=>{t.setDate(t.getDate()+r*7)},(t,r)=>(r-t-(r.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}var pu=Gp(0),iM=Gp(1),hte=Gp(2),vte=Gp(3),oc=Gp(4),yte=Gp(5),xte=Gp(6),bte=pu.range,ARe=iM.range,IRe=hte.range,DRe=vte.range,LRe=oc.range,RRe=yte.range,NRe=xte.range;function jp(e){return yr(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCDate(t.getUTCDate()+r*7)},(t,r)=>(r-t)/6048e5)}var mu=jp(0),sM=jp(1),wte=jp(2),Cte=jp(3),nc=jp(4),Ste=jp(5),Pte=jp(6),Ate=mu.range,TRe=sM.range,ORe=wte.range,ERe=Cte.range,_Re=nc.range,FRe=Ste.range,BRe=Pte.range;var lM=yr(e=>{e.setDate(1),e.setHours(0,0,0,0)},(e,t)=>{e.setMonth(e.getMonth()+t)},(e,t)=>t.getMonth()-e.getMonth()+(t.getFullYear()-e.getFullYear())*12,e=>e.getMonth()),VRe=lM.range,uM=yr(e=>{e.setUTCDate(1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCMonth(e.getUTCMonth()+t)},(e,t)=>t.getUTCMonth()-e.getUTCMonth()+(t.getUTCFullYear()-e.getUTCFullYear())*12,e=>e.getUTCMonth()),URe=uM.range;var ja=yr(e=>{e.setMonth(0,1),e.setHours(0,0,0,0)},(e,t)=>{e.setFullYear(e.getFullYear()+t)},(e,t)=>t.getFullYear()-e.getFullYear(),e=>e.getFullYear());ja.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yr(t=>{t.setFullYear(Math.floor(t.getFullYear()/e)*e),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,r)=>{t.setFullYear(t.getFullYear()+r*e)});var WRe=ja.range,za=yr(e=>{e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCFullYear(e.getUTCFullYear()+t)},(e,t)=>t.getUTCFullYear()-e.getUTCFullYear(),e=>e.getUTCFullYear());za.every=e=>!isFinite(e=Math.floor(e))||!(e>0)?null:yr(t=>{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/e)*e),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,r)=>{t.setUTCFullYear(t.getUTCFullYear()+r*e)});var GRe=za.range;function Dte(e,t,r,o,n,a){let i=[[Oi,1,1e3],[Oi,5,5*1e3],[Oi,15,15*1e3],[Oi,30,30*1e3],[a,1,6e4],[a,5,5*6e4],[a,15,15*6e4],[a,30,30*6e4],[n,1,36e5],[n,3,3*36e5],[n,6,6*36e5],[n,12,12*36e5],[o,1,864e5],[o,2,2*864e5],[r,1,6048e5],[t,1,2592e6],[t,3,3*2592e6],[e,1,31536e6]];function s(u,d,c){let f=d<u;f&&([u,d]=[d,u]);let p=c&&typeof c.range=="function"?c:l(u,d,c),g=p?p.range(u,+d+1):[];return f?g.reverse():g}function l(u,d,c){let f=Math.abs(d-u)/c,p=Rp(([,,h])=>h).right(i,f);if(p===i.length)return e.every(Xk(u/31536e6,d/31536e6,c));if(p===0)return jx.every(Math.max(Xk(u,d,c),1));let[g,m]=i[f/i[p-1][2]<i[p][2]/f?p-1:p];return g.every(m)}return[s,l]}var[H3,K3]=Dte(za,uM,mu,z1,aM,oM),[$3,Y3]=Dte(ja,lM,pu,fu,nM,rM);function Z3(e){if(0<=e.y&&e.y<100){var t=new Date(-1,e.m,e.d,e.H,e.M,e.S,e.L);return t.setFullYear(e.y),t}return new Date(e.y,e.m,e.d,e.H,e.M,e.S,e.L)}function X3(e){if(0<=e.y&&e.y<100){var t=new Date(Date.UTC(-1,e.m,e.d,e.H,e.M,e.S,e.L));return t.setUTCFullYear(e.y),t}return new Date(Date.UTC(e.y,e.m,e.d,e.H,e.M,e.S,e.L))}function qx(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function J3(e){var t=e.dateTime,r=e.date,o=e.time,n=e.periods,a=e.days,i=e.shortDays,s=e.months,l=e.shortMonths,u=Hx(n),d=Kx(n),c=Hx(a),f=Kx(a),p=Hx(i),g=Kx(i),m=Hx(s),h=Kx(s),k=Hx(l),M=Kx(l),v={a:R,A:U,b:E,B:_,c:null,d:Ete,e:Ete,f:fNe,g:bNe,G:CNe,H:uNe,I:dNe,j:cNe,L:Ute,m:pNe,M:mNe,p:B,q:j,Q:Bte,s:Vte,S:gNe,u:kNe,U:MNe,V:hNe,w:vNe,W:yNe,x:null,X:null,y:xNe,Y:wNe,Z:SNe,"%":Fte},b={a:re,A:W,b:K,B:Q,c:null,d:_te,e:_te,f:DNe,g:VNe,G:WNe,H:PNe,I:ANe,j:INe,L:Gte,m:LNe,M:RNe,p:ue,q:Ue,Q:Bte,s:Vte,S:NNe,u:TNe,U:ONe,V:ENe,w:_Ne,W:FNe,x:null,X:null,y:BNe,Y:UNe,Z:GNe,"%":Fte},w={a:T,A:G,b:$,B:oe,c:se,d:Tte,e:Tte,f:aNe,g:Nte,G:Rte,H:Ote,I:Ote,j:tNe,L:nNe,m:eNe,M:rNe,p:F,q:QRe,Q:sNe,s:lNe,S:oNe,u:$Re,U:YRe,V:ZRe,w:KRe,W:XRe,x:pe,X:N,y:Nte,Y:Rte,Z:JRe,"%":iNe};v.x=P(r,v),v.X=P(o,v),v.c=P(t,v),b.x=P(r,b),b.X=P(o,b),b.c=P(t,b);function P(de,Pe){return function(Oe){var Y=[],Je=-1,_e=0,it=de.length,Lt,jr,zr;for(Oe instanceof Date||(Oe=new Date(+Oe));++Je<it;)de.charCodeAt(Je)===37&&(Y.push(de.slice(_e,Je)),(jr=Lte[Lt=de.charAt(++Je)])!=null?Lt=de.charAt(++Je):jr=Lt==="e"?" ":"0",(zr=Pe[Lt])&&(Lt=zr(Oe,jr)),Y.push(Lt),_e=Je+1);return Y.push(de.slice(_e,Je)),Y.join("")}}function L(de,Pe){return function(Oe){var Y=qx(1900,void 0,1),Je=C(Y,de,Oe+="",0),_e,it;if(Je!=Oe.length)return null;if("Q"in Y)return new Date(Y.Q);if("s"in Y)return new Date(Y.s*1e3+("L"in Y?Y.L:0));if(Pe&&!("Z"in Y)&&(Y.Z=0),"p"in Y&&(Y.H=Y.H%12+Y.p*12),Y.m===void 0&&(Y.m="q"in Y?Y.q:0),"V"in Y){if(Y.V<1||Y.V>53)return null;"w"in Y||(Y.w=1),"Z"in Y?(_e=X3(qx(Y.y,0,1)),it=_e.getUTCDay(),_e=it>4||it===0?sM.ceil(_e):sM(_e),_e=Wp.offset(_e,(Y.V-1)*7),Y.y=_e.getUTCFullYear(),Y.m=_e.getUTCMonth(),Y.d=_e.getUTCDate()+(Y.w+6)%7):(_e=Z3(qx(Y.y,0,1)),it=_e.getDay(),_e=it>4||it===0?iM.ceil(_e):iM(_e),_e=fu.offset(_e,(Y.V-1)*7),Y.y=_e.getFullYear(),Y.m=_e.getMonth(),Y.d=_e.getDate()+(Y.w+6)%7)}else("W"in Y||"U"in Y)&&("w"in Y||(Y.w="u"in Y?Y.u%7:"W"in Y?1:0),it="Z"in Y?X3(qx(Y.y,0,1)).getUTCDay():Z3(qx(Y.y,0,1)).getDay(),Y.m=0,Y.d="W"in Y?(Y.w+6)%7+Y.W*7-(it+5)%7:Y.w+Y.U*7-(it+6)%7);return"Z"in Y?(Y.H+=Y.Z/100|0,Y.M+=Y.Z%100,X3(Y)):Z3(Y)}}function C(de,Pe,Oe,Y){for(var Je=0,_e=Pe.length,it=Oe.length,Lt,jr;Je<_e;){if(Y>=it)return-1;if(Lt=Pe.charCodeAt(Je++),Lt===37){if(Lt=Pe.charAt(Je++),jr=w[Lt in Lte?Pe.charAt(Je++):Lt],!jr||(Y=jr(de,Oe,Y))<0)return-1}else if(Lt!=Oe.charCodeAt(Y++))return-1}return Y}function F(de,Pe,Oe){var Y=u.exec(Pe.slice(Oe));return Y?(de.p=d.get(Y[0].toLowerCase()),Oe+Y[0].length):-1}function T(de,Pe,Oe){var Y=p.exec(Pe.slice(Oe));return Y?(de.w=g.get(Y[0].toLowerCase()),Oe+Y[0].length):-1}function G(de,Pe,Oe){var Y=c.exec(Pe.slice(Oe));return Y?(de.w=f.get(Y[0].toLowerCase()),Oe+Y[0].length):-1}function $(de,Pe,Oe){var Y=k.exec(Pe.slice(Oe));return Y?(de.m=M.get(Y[0].toLowerCase()),Oe+Y[0].length):-1}function oe(de,Pe,Oe){var Y=m.exec(Pe.slice(Oe));return Y?(de.m=h.get(Y[0].toLowerCase()),Oe+Y[0].length):-1}function se(de,Pe,Oe){return C(de,t,Pe,Oe)}function pe(de,Pe,Oe){return C(de,r,Pe,Oe)}function N(de,Pe,Oe){return C(de,o,Pe,Oe)}function R(de){return i[de.getDay()]}function U(de){return a[de.getDay()]}function E(de){return l[de.getMonth()]}function _(de){return s[de.getMonth()]}function B(de){return n[+(de.getHours()>=12)]}function j(de){return 1+~~(de.getMonth()/3)}function re(de){return i[de.getUTCDay()]}function W(de){return a[de.getUTCDay()]}function K(de){return l[de.getUTCMonth()]}function Q(de){return s[de.getUTCMonth()]}function ue(de){return n[+(de.getUTCHours()>=12)]}function Ue(de){return 1+~~(de.getUTCMonth()/3)}return{format:function(de){var Pe=P(de+="",v);return Pe.toString=function(){return de},Pe},parse:function(de){var Pe=L(de+="",!1);return Pe.toString=function(){return de},Pe},utcFormat:function(de){var Pe=P(de+="",b);return Pe.toString=function(){return de},Pe},utcParse:function(de){var Pe=L(de+="",!0);return Pe.toString=function(){return de},Pe}}}var Lte={"-":"",_:" ",0:"0"},Zo=/^\s*\d+/,zRe=/^%/,qRe=/[\\^$*+?|[\]().{}]/g;function rr(e,t,r){var o=e<0?"-":"",n=(o?-e:e)+"",a=n.length;return o+(a<r?new Array(r-a+1).join(t)+n:n)}function HRe(e){return e.replace(qRe,"\\$&")}function Hx(e){return new RegExp("^(?:"+e.map(HRe).join("|")+")","i")}function Kx(e){return new Map(e.map((t,r)=>[t.toLowerCase(),r]))}function KRe(e,t,r){var o=Zo.exec(t.slice(r,r+1));return o?(e.w=+o[0],r+o[0].length):-1}function $Re(e,t,r){var o=Zo.exec(t.slice(r,r+1));return o?(e.u=+o[0],r+o[0].length):-1}function YRe(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.U=+o[0],r+o[0].length):-1}function ZRe(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.V=+o[0],r+o[0].length):-1}function XRe(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.W=+o[0],r+o[0].length):-1}function Rte(e,t,r){var o=Zo.exec(t.slice(r,r+4));return o?(e.y=+o[0],r+o[0].length):-1}function Nte(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.y=+o[0]+(+o[0]>68?1900:2e3),r+o[0].length):-1}function JRe(e,t,r){var o=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(t.slice(r,r+6));return o?(e.Z=o[1]?0:-(o[2]+(o[3]||"00")),r+o[0].length):-1}function QRe(e,t,r){var o=Zo.exec(t.slice(r,r+1));return o?(e.q=o[0]*3-3,r+o[0].length):-1}function eNe(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.m=o[0]-1,r+o[0].length):-1}function Tte(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.d=+o[0],r+o[0].length):-1}function tNe(e,t,r){var o=Zo.exec(t.slice(r,r+3));return o?(e.m=0,e.d=+o[0],r+o[0].length):-1}function Ote(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.H=+o[0],r+o[0].length):-1}function rNe(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.M=+o[0],r+o[0].length):-1}function oNe(e,t,r){var o=Zo.exec(t.slice(r,r+2));return o?(e.S=+o[0],r+o[0].length):-1}function nNe(e,t,r){var o=Zo.exec(t.slice(r,r+3));return o?(e.L=+o[0],r+o[0].length):-1}function aNe(e,t,r){var o=Zo.exec(t.slice(r,r+6));return o?(e.L=Math.floor(o[0]/1e3),r+o[0].length):-1}function iNe(e,t,r){var o=zRe.exec(t.slice(r,r+1));return o?r+o[0].length:-1}function sNe(e,t,r){var o=Zo.exec(t.slice(r));return o?(e.Q=+o[0],r+o[0].length):-1}function lNe(e,t,r){var o=Zo.exec(t.slice(r));return o?(e.s=+o[0],r+o[0].length):-1}function Ete(e,t){return rr(e.getDate(),t,2)}function uNe(e,t){return rr(e.getHours(),t,2)}function dNe(e,t){return rr(e.getHours()%12||12,t,2)}function cNe(e,t){return rr(1+fu.count(ja(e),e),t,3)}function Ute(e,t){return rr(e.getMilliseconds(),t,3)}function fNe(e,t){return Ute(e,t)+"000"}function pNe(e,t){return rr(e.getMonth()+1,t,2)}function mNe(e,t){return rr(e.getMinutes(),t,2)}function gNe(e,t){return rr(e.getSeconds(),t,2)}function kNe(e){var t=e.getDay();return t===0?7:t}function MNe(e,t){return rr(pu.count(ja(e)-1,e),t,2)}function Wte(e){var t=e.getDay();return t>=4||t===0?oc(e):oc.ceil(e)}function hNe(e,t){return e=Wte(e),rr(oc.count(ja(e),e)+(ja(e).getDay()===4),t,2)}function vNe(e){return e.getDay()}function yNe(e,t){return rr(iM.count(ja(e)-1,e),t,2)}function xNe(e,t){return rr(e.getFullYear()%100,t,2)}function bNe(e,t){return e=Wte(e),rr(e.getFullYear()%100,t,2)}function wNe(e,t){return rr(e.getFullYear()%1e4,t,4)}function CNe(e,t){var r=e.getDay();return e=r>=4||r===0?oc(e):oc.ceil(e),rr(e.getFullYear()%1e4,t,4)}function SNe(e){var t=e.getTimezoneOffset();return(t>0?"-":(t*=-1,"+"))+rr(t/60|0,"0",2)+rr(t%60,"0",2)}function _te(e,t){return rr(e.getUTCDate(),t,2)}function PNe(e,t){return rr(e.getUTCHours(),t,2)}function ANe(e,t){return rr(e.getUTCHours()%12||12,t,2)}function INe(e,t){return rr(1+Wp.count(za(e),e),t,3)}function Gte(e,t){return rr(e.getUTCMilliseconds(),t,3)}function DNe(e,t){return Gte(e,t)+"000"}function LNe(e,t){return rr(e.getUTCMonth()+1,t,2)}function RNe(e,t){return rr(e.getUTCMinutes(),t,2)}function NNe(e,t){return rr(e.getUTCSeconds(),t,2)}function TNe(e){var t=e.getUTCDay();return t===0?7:t}function ONe(e,t){return rr(mu.count(za(e)-1,e),t,2)}function jte(e){var t=e.getUTCDay();return t>=4||t===0?nc(e):nc.ceil(e)}function ENe(e,t){return e=jte(e),rr(nc.count(za(e),e)+(za(e).getUTCDay()===4),t,2)}function _Ne(e){return e.getUTCDay()}function FNe(e,t){return rr(sM.count(za(e)-1,e),t,2)}function BNe(e,t){return rr(e.getUTCFullYear()%100,t,2)}function VNe(e,t){return e=jte(e),rr(e.getUTCFullYear()%100,t,2)}function UNe(e,t){return rr(e.getUTCFullYear()%1e4,t,4)}function WNe(e,t){var r=e.getUTCDay();return e=r>=4||r===0?nc(e):nc.ceil(e),rr(e.getUTCFullYear()%1e4,t,4)}function GNe(){return"+0000"}function Fte(){return"%"}function Bte(e){return+e}function Vte(e){return Math.floor(+e/1e3)}var dM,q1,zte,H1,qte;Q3({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function Q3(e){return dM=J3(e),q1=dM.format,zte=dM.parse,H1=dM.utcFormat,qte=dM.utcParse,dM}function jNe(e){return new Date(e)}function zNe(e){return e instanceof Date?+e:+new Date(+e)}function K1(e,t,r,o,n,a,i,s,l,u){var d=Fp(),c=d.invert,f=d.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),h=u("%I %p"),k=u("%a %d"),M=u("%b %d"),v=u("%B"),b=u("%Y");function w(P){return(l(P)<P?p:s(P)<P?g:i(P)<P?m:a(P)<P?h:o(P)<P?n(P)<P?k:M:r(P)<P?v:b)(P)}return d.invert=function(P){return new Date(c(P))},d.domain=function(P){return arguments.length?f(Array.from(P,zNe)):f().map(jNe)},d.ticks=function(P){var L=f();return e(L[0],L[L.length-1],P??10)},d.tickFormat=function(P,L){return L==null?w:u(L)},d.nice=function(P){var L=f();return(!P||typeof P.range!="function")&&(P=t(L[0],L[L.length-1],P??10)),P?f(Bx(L,P)):d},d.copy=function(){return fl(d,K1(e,t,r,o,n,a,i,s,l,u))},d}function eV(){return Vr.apply(K1($3,Y3,ja,lM,pu,fu,nM,rM,Oi,q1).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function tV(){return Vr.apply(K1(H3,K3,za,uM,mu,Wp,aM,oM,Oi,H1).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function $1(){var e=0,t=1,r,o,n,a,i=Oo,s=!1,l;function u(c){return c==null||isNaN(c=+c)?l:i(n===0?.5:(c=(a(c)-r)*n,s?Math.max(0,Math.min(1,c)):c))}u.domain=function(c){return arguments.length?([e,t]=c,r=a(e=+e),o=a(t=+t),n=r===o?0:1/(o-r),u):[e,t]},u.clamp=function(c){return arguments.length?(s=!!c,u):s},u.interpolator=function(c){return arguments.length?(i=c,u):i};function d(c){return function(f){var p,g;return arguments.length?([p,g]=f,i=c(p,g),u):[i(0),i(1)]}}return u.range=d(Ga),u.rangeRound=d(Ep),u.unknown=function(c){return arguments.length?(l=c,u):l},function(c){return a=c,r=c(e),o=c(t),n=r===o?0:1/(o-r),u}}function gu(e,t){return t.domain(e.domain()).interpolator(e.interpolator()).clamp(e.clamp()).unknown(e.unknown())}function Y1(){var e=Hn($1()(Oo));return e.copy=function(){return gu(e,Y1())},Ti.apply(e,arguments)}function rV(){var e=Vx($1()).domain([1,10]);return e.copy=function(){return gu(e,rV()).base(e.base())},Ti.apply(e,arguments)}function oV(){var e=Ux($1());return e.copy=function(){return gu(e,oV()).constant(e.constant())},Ti.apply(e,arguments)}function Z1(){var e=Wx($1());return e.copy=function(){return gu(e,Z1()).exponent(e.exponent())},Ti.apply(e,arguments)}function Hte(){return Z1.apply(null,arguments).exponent(.5)}function X1(){var e=[],t=Oo;function r(o){if(o!=null&&!isNaN(o=+o))return t((bs(e,o,1)-1)/(e.length-1))}return r.domain=function(o){if(!arguments.length)return e.slice();e=[];for(let n of o)n!=null&&!isNaN(n=+n)&&e.push(n);return e.sort(qn),r},r.interpolator=function(o){return arguments.length?(t=o,r):t},r.range=function(){return e.map((o,n)=>t(n/(e.length-1)))},r.quantiles=function(o){return Array.from({length:o+1},(n,a)=>w1(e,a/o))},r.copy=function(){return X1(t).domain(e)},Ti.apply(r,arguments)}function J1(){var e=0,t=.5,r=1,o=1,n,a,i,s,l,u=Oo,d,c=!1,f;function p(m){return isNaN(m=+m)?f:(m=.5+((m=+d(m))-a)*(o*m<o*a?s:l),u(c?Math.max(0,Math.min(1,m)):m))}p.domain=function(m){return arguments.length?([e,t,r]=m,n=d(e=+e),a=d(t=+t),i=d(r=+r),s=n===a?0:.5/(a-n),l=a===i?0:.5/(i-a),o=a<n?-1:1,p):[e,t,r]},p.clamp=function(m){return arguments.length?(c=!!m,p):c},p.interpolator=function(m){return arguments.length?(u=m,p):u};function g(m){return function(h){var k,M,v;return arguments.length?([k,M,v]=h,u=N1(m,[k,M,v]),p):[u(0),u(.5),u(1)]}}return p.range=g(Ga),p.rangeRound=g(Ep),p.unknown=function(m){return arguments.length?(f=m,p):f},function(m){return d=m,n=m(e),a=m(t),i=m(r),s=n===a?0:.5/(a-n),l=a===i?0:.5/(i-a),o=a<n?-1:1,p}}function Q1(){var e=Hn(J1()(Oo));return e.copy=function(){return gu(e,Q1())},Ti.apply(e,arguments)}function nV(){var e=Vx(J1()).domain([.1,1,10]);return e.copy=function(){return gu(e,nV()).base(e.base())},Ti.apply(e,arguments)}function aV(){var e=Ux(J1());return e.copy=function(){return gu(e,aV()).constant(e.constant())},Ti.apply(e,arguments)}function eD(){var e=Wx(J1());return e.copy=function(){return gu(e,eD()).exponent(e.exponent())},Ti.apply(e,arguments)}function Kte(){return eD.apply(null,arguments).exponent(.5)}function qNe(e){var t=$x;if(e in t&&typeof t[e]=="function")return t[e]();var r="scale".concat(su(e));if(r in t&&typeof t[r]=="function")return t[r]()}function $te(e,t,r){if(typeof e=="function")return e.copy().domain(t).range(r);if(e!=null){var o=qNe(e);if(o!=null)return o.domain(t).range(r),o}}function Yx(e,t,r,o){if(!(r==null||o==null))return typeof e.scale=="function"?$te(e.scale,r,o):$te(t,r,o)}function HNe(e){return"scale".concat(su(e))}function KNe(e){return HNe(e)in $x}var tD=(e,t,r)=>{if(e!=null){var{scale:o,type:n}=e;if(o==="auto")return n==="category"&&r&&(r.indexOf("LineChart")>=0||r.indexOf("AreaChart")>=0||r.indexOf("ComposedChart")>=0&&!t)?"point":n==="category"?"band":"linear";if(typeof o=="string")return KNe(o)?o:"point"}};function $Ne(e,t){for(var r=0,o=e.length,n=e[0]<e[e.length-1];r<o;){var a=Math.floor((r+o)/2);(n?e[a]<t:e[a]>t)?r=a+1:o=a}return r}function rD(e,t){if(e){var r=t??e.domain(),o=r.map(a=>{var i;return(i=e(a))!==null&&i!==void 0?i:0}),n=e.range();if(!(r.length===0||n.length<2))return a=>{var i,s,l=$Ne(o,a);if(l<=0)return r[0];if(l>=r.length)return r[r.length-1];var u=(i=o[l-1])!==null&&i!==void 0?i:0,d=(s=o[l])!==null&&s!==void 0?s:0;return Math.abs(a-u)<=Math.abs(a-d)?r[l-1]:r[l]}}}function Yte(e){if(e!=null)return"invert"in e&&typeof e.invert=="function"?e.invert.bind(e):rD(e,void 0)}function Zte(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function oD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Zte(Object(r),!0).forEach(function(o){YNe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Zte(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function YNe(e,t,r){return(t=ZNe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ZNe(e){var t=XNe(e,"string");return typeof t=="symbol"?t:t+""}function XNe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var iV=[0,"auto"],go={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:void 0,height:30,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"bottom",padding:{left:0,right:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"category",unit:void 0,niceTicks:"auto"},sV=(e,t)=>e.cartesianAxis.xAxis[t],Ml=(e,t)=>{var r=sV(e,t);return r??go},ko={allowDataOverflow:!1,allowDecimals:!0,allowDuplicatedCategory:!0,angle:0,dataKey:void 0,domain:iV,hide:!0,id:0,includeHidden:!1,interval:"preserveEnd",minTickGap:5,mirror:!1,name:void 0,orientation:"left",padding:{top:0,bottom:0},reversed:!1,scale:"auto",tick:!0,tickCount:5,tickFormatter:void 0,ticks:void 0,type:"number",unit:void 0,niceTicks:"auto",width:vp},lV=(e,t)=>e.cartesianAxis.yAxis[t],hl=(e,t)=>{var r=lV(e,t);return r??ko},JNe={domain:[0,"auto"],includeHidden:!1,reversed:!1,allowDataOverflow:!1,allowDuplicatedCategory:!1,dataKey:void 0,id:0,name:"",range:[64,64],scale:"auto",type:"number",unit:""},uV=(e,t)=>{var r=e.cartesianAxis.zAxis[t];return r??JNe},eo=(e,t,r)=>{switch(t){case"xAxis":return Ml(e,r);case"yAxis":return hl(e,r);case"zAxis":return uV(e,r);case"angleAxis":return p1(e,r);case"radiusAxis":return m1(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},QNe=(e,t,r)=>{switch(t){case"xAxis":return Ml(e,r);case"yAxis":return hl(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},zp=(e,t,r)=>{switch(t){case"xAxis":return Ml(e,r);case"yAxis":return hl(e,r);case"angleAxis":return p1(e,r);case"radiusAxis":return m1(e,r);default:throw new Error("Unexpected axis type: ".concat(t))}},dV=e=>e.graphicalItems.cartesianItems.some(t=>t.type==="bar")||e.graphicalItems.polarItems.some(t=>t.type==="radialBar");function Xx(e,t){return r=>{switch(e){case"xAxis":return"xAxisId"in r&&r.xAxisId===t;case"yAxis":return"yAxisId"in r&&r.yAxisId===t;case"zAxis":return"zAxisId"in r&&r.zAxisId===t;case"angleAxis":return"angleAxisId"in r&&r.angleAxisId===t;case"radiusAxis":return"radiusAxisId"in r&&r.radiusAxisId===t;default:return!1}}}var ac=e=>e.graphicalItems.cartesianItems,eTe=te([Tr,Dp],Xx),Jx=(e,t,r)=>e.filter(r).filter(o=>t?.includeHidden===!0?!0:!o.hide),fM=te([ac,eo,eTe],Jx,{memoizeOptions:{resultEqualityCheck:Yk}}),Jte=te([fM],e=>e.filter(t=>t.type==="area"||t.type==="bar").filter(Lp)),cV=e=>e.filter(t=>!("stackId"in t)||t.stackId===void 0),tTe=te([fM],cV),Qx=e=>e.map(t=>t.data).filter(Boolean).flat(1),rTe=te([fM],e=>e.some(t=>!t.data)),Qte=te([fM],Qx,{memoizeOptions:{resultEqualityCheck:Yk}}),eb=(e,t)=>{var{chartData:r=[],dataStartIndex:o,dataEndIndex:n}=t;return e.length>0?e:r.slice(o,n+1)},fV=te([Qte,Pp],eb),pV=(e,t,r)=>t?.dataKey!=null?e.map(o=>({value:vt(o,t.dataKey)})):r.length>0?r.map(o=>o.dataKey).flatMap(o=>e.map(n=>({value:vt(n,o)}))):e.map(o=>({value:o})),mV=(e,t,r,o,n,a)=>{var{chartData:i=[],dataStartIndex:s,dataEndIndex:l}=o,u=pV(e,t,r);if(n&&t?.dataKey!=null&&a.length>0){var d=i.slice(s,l+1),c=d.map(f=>({value:vt(f,t.dataKey)})).filter(f=>f.value!=null);return[...c,...u]}return u},tb=te([fV,eo,fM,Pp,rTe,Qte],mV);function cM(e){if(jn(e)||e instanceof Date){var t=Number(e);if(lt(t))return t}}function Xte(e){if(Array.isArray(e)){var t=[cM(e[0]),cM(e[1])];return Wa(t)?t:void 0}var r=cM(e);if(r!=null)return[r,r]}function kl(e){return e.map(cM).filter(un)}function oTe(e,t){var r=cM(e),o=cM(t);return r==null&&o==null?0:r==null?-1:o==null?1:r-o}var nTe=te([tb],e=>e?.map(t=>t.value).sort(oTe));function ere(e,t){switch(e){case"xAxis":return t.direction==="x";case"yAxis":return t.direction==="y";default:return!1}}function aTe(e,t,r){if(!r)return[];if(!r.length)return[];var o;if(typeof t=="number"&&!Yo(t))o=t;else if(Array.isArray(t)){var n=kl(t);n.length>0&&(o=Math.max(...n))}return o==null?[]:kl(r.flatMap(a=>{var i=vt(e,a.dataKey),s,l;if(Array.isArray(i)?[s,l]=i:s=l=i,!(!lt(s)||!lt(l)))return[o-s,o+l]}))}var Mo=e=>{var t=mo(e),r=Qd(e);return zp(e,t,r)},ku=te([Mo],e=>e?.dataKey),iTe=te([Jte,Pp,Mo],M1),gV=(e,t,r,o)=>{var n={},a=t.reduce((i,s)=>{if(s.stackId==null)return i;var l=i[s.stackId];return l==null&&(l=[]),l.push(s),i[s.stackId]=l,i},n);return Object.fromEntries(Object.entries(a).map(i=>{var[s,l]=i,u=o?[...l].reverse():l,d=u.map(Jd);return[s,{stackedData:EJ(e,d,r),graphicalItems:u}]}))},pM=te([iTe,Jte,Zd,u1],gV),kV=(e,t,r,o)=>{var{dataStartIndex:n,dataEndIndex:a}=t;if(o==null&&r!=="zAxis"){var i=FJ(e,n,a);if(!(i!=null&&i[0]===0&&i[1]===0))return i}},sTe=te([eo],e=>e.allowDataOverflow),nD=e=>{var t;if(e==null||!("domain"in e))return iV;if(e.domain!=null)return e.domain;if("ticks"in e&&e.ticks!=null){if(e.type==="number"){var r=kl(e.ticks);return[Math.min(...r),Math.max(...r)]}if(e.type==="category")return e.ticks.map(String)}return(t=e?.domain)!==null&&t!==void 0?t:iV},aD=te([eo],nD),iD=te([aD,sTe],n1),lTe=te([pM,la,Tr,iD],kV,{memoizeOptions:{resultEqualityCheck:$k}}),mM=e=>e.errorBars,uTe=(e,t,r)=>e.flatMap(o=>t[o.id]).filter(Boolean).filter(o=>ere(r,o)),Zx=function(){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];var n=r.filter(Boolean);if(n.length!==0){var a=n.flat(),i=Math.min(...a),s=Math.max(...a);return[i,s]}},rb=function(t,r,o,n,a){var i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:[],s,l;if(o.length>0&&o.forEach(u=>{var d,c=u.data!=null?[...u.data]:i,f=(d=n[u.id])===null||d===void 0?void 0:d.filter(p=>ere(a,p));c.forEach(p=>{var g,m=vt(p,(g=r.dataKey)!==null&&g!==void 0?g:u.dataKey),h=aTe(p,m,f);if(h.length>=2){var k=Math.min(...h),M=Math.max(...h);(s==null||k<s)&&(s=k),(l==null||M>l)&&(l=M)}var v=Xte(m);v!=null&&(s=s==null?v[0]:Math.min(s,v[0]),l=l==null?v[1]:Math.max(l,v[1]))})}),r?.dataKey!=null&&o.length===0&&t.forEach(u=>{var d=Xte(vt(u,r.dataKey));d!=null&&(s=s==null?d[0]:Math.min(s,d[0]),l=l==null?d[1]:Math.max(l,d[1]))}),lt(s)&&lt(l))return[s,l]},dTe=te([fV,eo,tTe,mM,Tr,lee],rb,{memoizeOptions:{resultEqualityCheck:$k}});function cTe(e){var{value:t}=e;if(jn(t)||t instanceof Date)return t}var fTe=(e,t,r)=>{var o=e.map(cTe).filter(n=>n!=null);return r&&(t.dataKey==null||t.allowDuplicatedCategory&&yB(o))?r1(0,e.length):t.allowDuplicatedCategory?o:Array.from(new Set(o))},MV=e=>e.referenceElements.dots,qp=(e,t,r)=>e.filter(o=>o.ifOverflow==="extendDomain").filter(o=>t==="xAxis"?o.xAxisId===r:o.yAxisId===r),pTe=te([MV,Tr,Dp],qp),hV=e=>e.referenceElements.areas,mTe=te([hV,Tr,Dp],qp),vV=e=>e.referenceElements.lines,gTe=te([vV,Tr,Dp],qp),yV=(e,t)=>{if(e!=null){var r=kl(e.map(o=>t==="xAxis"?o.x:o.y));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},kTe=te(pTe,Tr,yV),xV=(e,t)=>{if(e!=null){var r=kl(e.flatMap(o=>[t==="xAxis"?o.x1:o.y1,t==="xAxis"?o.x2:o.y2]));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},MTe=te([mTe,Tr],xV);function hTe(e){var t;if(e.x!=null)return kl([e.x]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(o=>o.x);return r==null||r.length===0?[]:kl(r)}function vTe(e){var t;if(e.y!=null)return kl([e.y]);var r=(t=e.segment)===null||t===void 0?void 0:t.map(o=>o.y);return r==null||r.length===0?[]:kl(r)}var bV=(e,t)=>{if(e!=null){var r=e.flatMap(o=>t==="xAxis"?hTe(o):vTe(o));if(r.length!==0)return[Math.min(...r),Math.max(...r)]}},yTe=te([gTe,Tr],bV),xTe=te(kTe,yTe,MTe,(e,t,r)=>Zx(e,r,t)),ob=(e,t,r,o,n,a,i,s)=>{if(r!=null)return r;var l=i==="vertical"&&s==="xAxis"||i==="horizontal"&&s==="yAxis",u=l?Zx(o,a,n):Zx(a,n);return fee(t,u,e.allowDataOverflow)},bTe=te([eo,aD,iD,lTe,dTe,xTe,mt,Tr],ob,{memoizeOptions:{resultEqualityCheck:$k}}),wTe=[0,1],nb=(e,t,r,o,n,a,i)=>{if(!((e==null||r==null||r.length===0)&&i===void 0)){var{dataKey:s,type:l}=e,u=Sn(t,a);if(u&&s==null){var d;return r1(0,(d=r?.length)!==null&&d!==void 0?d:0)}return l==="category"?fTe(o,e,u):n==="expand"&&!u?wTe:i}},wV=te([eo,mt,fV,tb,Zd,Tr,bTe],nb),Mu=te([eo,dV,Kk],tD),ab=(e,t,r)=>{var{niceTicks:o}=t;if(o!=="none"){var n=nD(t),a=Array.isArray(n)&&(n[0]==="auto"||n[1]==="auto");if((o==="snap125"||o==="adaptive")&&t!=null&&t.tickCount&&Wa(e)){if(a)return i1(e,t.tickCount,t.allowDecimals,o);if(t.type==="number")return s1(e,t.tickCount,t.allowDecimals,o)}if(o==="auto"&&r==="linear"&&t!=null&&t.tickCount){if(a&&Wa(e))return i1(e,t.tickCount,t.allowDecimals,"adaptive");if(t.type==="number"&&Wa(e))return s1(e,t.tickCount,t.allowDecimals,"adaptive")}}},CV=te([wV,zp,Mu],ab),ib=(e,t,r,o)=>{if(o!=="angleAxis"&&e?.type==="number"&&Wa(t)&&Array.isArray(r)&&r.length>0){var n,a,i=t[0],s=(n=r[0])!==null&&n!==void 0?n:0,l=t[1],u=(a=r[r.length-1])!==null&&a!==void 0?a:0;return[Math.min(i,s),Math.max(l,u)]}return t},CTe=te([eo,wV,CV,Tr],ib),STe=te(tb,eo,(e,t)=>{if(!(!t||t.type!=="number")){var r=1/0,o=Array.from(kl(e.map(c=>c.value))).sort((c,f)=>c-f),n=o[0],a=o[o.length-1];if(n==null||a==null)return 1/0;var i=a-n;if(i===0)return 1/0;for(var s=0;s<o.length-1;s++){var l=o[s],u=o[s+1];if(!(l==null||u==null)){var d=u-l;r=Math.min(r,d)}}return r/i}}),tre=te(STe,mt,l1,fr,(e,t,r,o,n)=>n,(e,t,r,o,n)=>{if(!lt(e))return 0;var a=t==="vertical"?o.height:o.width;if(n==="gap")return e*a/2;if(n==="no-gap"){var i=Qr(r,e*a),s=e*a/2;return s-i-(s-i)/a*i}return 0}),PTe=(e,t,r)=>{var o=Ml(e,t);return o==null||typeof o.padding!="string"?0:tre(e,"xAxis",t,r,o.padding)},ATe=(e,t,r)=>{var o=hl(e,t);return o==null||typeof o.padding!="string"?0:tre(e,"yAxis",t,r,o.padding)},ITe=te(Ml,PTe,(e,t)=>{var r,o;if(e==null)return{left:0,right:0};var{padding:n}=e;return typeof n=="string"?{left:t,right:t}:{left:((r=n.left)!==null&&r!==void 0?r:0)+t,right:((o=n.right)!==null&&o!==void 0?o:0)+t}}),DTe=te(hl,ATe,(e,t)=>{var r,o;if(e==null)return{top:0,bottom:0};var{padding:n}=e;return typeof n=="string"?{top:t,bottom:t}:{top:((r=n.top)!==null&&r!==void 0?r:0)+t,bottom:((o=n.bottom)!==null&&o!==void 0?o:0)+t}}),LTe=te([fr,ITe,yp,Wk,(e,t,r)=>r],(e,t,r,o,n)=>{var{padding:a}=o;return n?[a.left,r.width-a.right]:[e.left+t.left,e.left+e.width-t.right]}),RTe=te([fr,mt,DTe,yp,Wk,(e,t,r)=>r],(e,t,r,o,n,a)=>{var{padding:i}=n;return a?[o.height-i.bottom,i.top]:t==="horizontal"?[e.top+e.height-r.bottom,e.top+r.top]:[e.top+r.top,e.top+e.height-r.bottom]}),gM=(e,t,r,o)=>{var n;switch(t){case"xAxis":return LTe(e,r,o);case"yAxis":return RTe(e,r,o);case"zAxis":return(n=uV(e,r))===null||n===void 0?void 0:n.range;case"angleAxis":return C3(e);case"radiusAxis":return S3(e,r);default:return}},rre=te([eo,gM],Ap),NTe=te([Mu,CTe],h1),SV=te([eo,Mu,NTe,rre],Yx),PV=(e,t,r,o)=>{if(!(r==null||r.dataKey==null)){var{type:n,scale:a}=r,i=Sn(e,o);if(i&&(n==="number"||a!=="auto"))return t.map(s=>s.value)}},AV=te([mt,tb,zp,Tr],PV),sD=te([SV],Ax),zCt=te([SV],Yte),qCt=te([SV,nTe],rD),HCt=te([fM,mM,Tr],uTe);function ore(e,t){return e.id<t.id?-1:e.id>t.id?1:0}var lD=(e,t)=>t,uD=(e,t,r)=>r,TTe=te(Bk,lD,uD,(e,t,r)=>e.filter(o=>o.orientation===t).filter(o=>o.mirror===r).sort(ore)),OTe=te(Vk,lD,uD,(e,t,r)=>e.filter(o=>o.orientation===t).filter(o=>o.mirror===r).sort(ore)),nre=(e,t)=>({width:e.width,height:t.height}),ETe=(e,t)=>{var r=typeof t.width=="number"?t.width:vp;return{width:r,height:e.height}},IV=te(fr,Ml,nre),_Te=(e,t,r)=>{switch(t){case"top":return e.top;case"bottom":return r-e.bottom;default:return 0}},FTe=(e,t,r)=>{switch(t){case"left":return e.left;case"right":return r-e.right;default:return 0}},BTe=te(An,fr,TTe,lD,uD,(e,t,r,o,n)=>{var a={},i;return r.forEach(s=>{var l=nre(t,s);i==null&&(i=_Te(t,o,e));var u=o==="top"&&!n||o==="bottom"&&n;a[s.id]=i-Number(u)*l.height,i+=(u?-1:1)*l.height}),a}),VTe=te(Pn,fr,OTe,lD,uD,(e,t,r,o,n)=>{var a={},i;return r.forEach(s=>{var l=ETe(t,s);i==null&&(i=FTe(t,o,e));var u=o==="left"&&!n||o==="right"&&n;a[s.id]=i-Number(u)*l.width,i+=(u?-1:1)*l.width}),a}),UTe=(e,t)=>{var r=Ml(e,t);if(r!=null)return BTe(e,r.orientation,r.mirror)},are=te([fr,Ml,UTe,(e,t)=>t],(e,t,r,o)=>{if(t!=null){var n=r?.[o];return n==null?{x:e.left,y:0}:{x:e.left,y:n}}}),WTe=(e,t)=>{var r=hl(e,t);if(r!=null)return VTe(e,r.orientation,r.mirror)},ire=te([fr,hl,WTe,(e,t)=>t],(e,t,r,o)=>{if(t!=null){var n=r?.[o];return n==null?{x:0,y:e.top}:{x:n,y:e.top}}}),DV=te(fr,hl,(e,t)=>{var r=typeof t.width=="number"?t.width:vp;return{width:r,height:e.height}}),LV=(e,t,r)=>{switch(t){case"xAxis":return IV(e,r).width;case"yAxis":return DV(e,r).height;default:return}},RV=(e,t,r,o)=>{if(r!=null){var{allowDuplicatedCategory:n,type:a,dataKey:i}=r,s=Sn(e,o),l=t.map(d=>d.value),u=l.filter(d=>d!=null);if(i&&s&&a==="category"&&n&&yB(u))return l}},NV=te([mt,tb,eo,Tr],RV),TV=te([mt,QNe,Mu,sD,NV,AV,gM,CV,Tr],(e,t,r,o,n,a,i,s,l)=>{if(t!=null){var u=Sn(e,l);return{angle:t.angle,interval:t.interval,minTickGap:t.minTickGap,orientation:t.orientation,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,axisType:l,categoricalDomain:a,duplicateDomain:n,isCategorical:u,niceTicks:s,range:i,realScaleType:r,scale:o}}}),GTe=(e,t,r,o,n,a,i,s,l)=>{if(!(t==null||o==null)){var u=Sn(e,l),{type:d,ticks:c,tickCount:f}=t,p=r==="scaleBand"&&typeof o.bandwidth=="function"?o.bandwidth()/2:2,g=d==="category"&&o.bandwidth?o.bandwidth()/p:0;g=l==="angleAxis"&&a!=null&&a.length>=2?vr(a[0]-a[1])*2*g:g;var m=c||n;return m?m.map((h,k)=>{var M=i?i.indexOf(h):h,v=o.map(M);return lt(v)?{index:k,coordinate:v+g,value:h,offset:g}:null}).filter(un):u&&s?s.map((h,k)=>{var M=o.map(h);return lt(M)?{coordinate:M+g,value:h,index:k,offset:g}:null}).filter(un):o.ticks?o.ticks(f).map((h,k)=>{var M=o.map(h);return lt(M)?{coordinate:M+g,value:h,index:k,offset:g}:null}).filter(un):o.domain().map((h,k)=>{var M=o.map(h);return lt(M)?{coordinate:M+g,value:i?i[h]:h,index:k,offset:g}:null}).filter(un)}},dD=te([mt,zp,Mu,sD,CV,gM,NV,AV,Tr],GTe),jTe=(e,t,r,o,n,a,i)=>{if(!(t==null||r==null||o==null||o[0]===o[1])){var s=Sn(e,i),{tickCount:l}=t,u=0;return u=i==="angleAxis"&&o?.length>=2?vr(o[0]-o[1])*2*u:u,s&&a?a.map((d,c)=>{var f=r.map(d);return lt(f)?{coordinate:f+u,value:d,index:c,offset:u}:null}).filter(un):r.ticks?r.ticks(l).map((d,c)=>{var f=r.map(d);return lt(f)?{coordinate:f+u,value:d,index:c,offset:u}:null}).filter(un):r.domain().map((d,c)=>{var f=r.map(d);return lt(f)?{coordinate:f+u,value:n?n[d]:d,index:c,offset:u}:null}).filter(un)}},qa=te([mt,zp,sD,gM,NV,AV,Tr],jTe),Ha=te(eo,sD,(e,t)=>{if(!(e==null||t==null))return oD(oD({},e),{},{scale:t})}),zTe=te([eo,Mu,wV,rre],Yx),qTe=te([zTe],Ax),KCt=te((e,t,r)=>uV(e,r),qTe,(e,t)=>{if(!(e==null||t==null))return oD(oD({},e),{},{scale:t})}),sre=te([mt,Bk,Vk],(e,t,r)=>{switch(e){case"horizontal":return t.some(o=>o.reversed)?"right-to-left":"left-to-right";case"vertical":return r.some(o=>o.reversed)?"bottom-to-top":"top-to-bottom";case"centric":case"radial":return"left-to-right";default:return}}),HTe=(e,t,r)=>{var o;return(o=e.renderedTicks[t])===null||o===void 0?void 0:o[r]},$Ct=te([HTe],e=>{if(!(!e||e.length===0))return t=>{var r,o=1/0,n=e[0];for(var a of e){var i=Math.abs(a.coordinate-t);i<o&&(o=i,n=a)}return(r=n)===null||r===void 0?void 0:r.value}});var OV=e=>e.options.defaultTooltipEventType,EV=e=>e.options.validateTooltipEventTypes;function _V(e,t,r){if(e==null)return t;var o=e?"axis":"item";return r==null?t:r.includes(o)?o:t}function ic(e,t){var r=OV(e),o=EV(e);return _V(t,r,o)}function lre(e){return Ve(t=>ic(t,e))}var cD=(e,t)=>{var r,o=Number(t);if(!(Yo(o)||t==null))return o>=0?e==null||(r=e[o])===null||r===void 0?void 0:r.value:void 0};var ure=e=>e.tooltip.settings;var hu={active:!1,index:null,dataKey:void 0,graphicalItemId:void 0,coordinate:void 0},KTe={itemInteraction:{click:hu,hover:hu},axisInteraction:{click:hu,hover:hu},keyboardInteraction:hu,syncInteraction:{active:!1,index:null,dataKey:void 0,label:void 0,coordinate:void 0,sourceViewBox:void 0,graphicalItemId:void 0},tooltipItemPayloads:[],settings:{shared:void 0,trigger:"hover",axisId:0,active:!1,defaultIndex:void 0}},dre=er({name:"tooltip",initialState:KTe,reducers:{addTooltipEntrySettings:{reducer(e,t){e.tooltipItemPayloads.push(t.payload)},prepare:lr()},replaceTooltipEntrySettings:{reducer(e,t){var{prev:r,next:o}=t.payload,n=cn(e).tooltipItemPayloads.indexOf(r);n>-1&&(e.tooltipItemPayloads[n]=o)},prepare:lr()},removeTooltipEntrySettings:{reducer(e,t){var r=cn(e).tooltipItemPayloads.indexOf(t.payload);r>-1&&e.tooltipItemPayloads.splice(r,1)},prepare:lr()},setTooltipSettingsState(e,t){e.settings=t.payload},setActiveMouseOverItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.itemInteraction.hover.active=!0,e.itemInteraction.hover.index=t.payload.activeIndex,e.itemInteraction.hover.dataKey=t.payload.activeDataKey,e.itemInteraction.hover.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.hover.coordinate=t.payload.activeCoordinate},mouseLeaveChart(e){e.itemInteraction.hover.active=!1,e.axisInteraction.hover.active=!1},mouseLeaveItem(e){e.itemInteraction.hover.active=!1},setActiveClickItemIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.itemInteraction.click.active=!0,e.keyboardInteraction.active=!1,e.itemInteraction.click.index=t.payload.activeIndex,e.itemInteraction.click.dataKey=t.payload.activeDataKey,e.itemInteraction.click.graphicalItemId=t.payload.activeGraphicalItemId,e.itemInteraction.click.coordinate=t.payload.activeCoordinate},setMouseOverAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.axisInteraction.hover.active=!0,e.keyboardInteraction.active=!1,e.axisInteraction.hover.index=t.payload.activeIndex,e.axisInteraction.hover.dataKey=t.payload.activeDataKey,e.axisInteraction.hover.coordinate=t.payload.activeCoordinate},setMouseClickAxisIndex(e,t){e.syncInteraction.active=!1,e.syncInteraction.sourceViewBox=void 0,e.keyboardInteraction.active=!1,e.axisInteraction.click.active=!0,e.axisInteraction.click.index=t.payload.activeIndex,e.axisInteraction.click.dataKey=t.payload.activeDataKey,e.axisInteraction.click.coordinate=t.payload.activeCoordinate},setSyncInteraction(e,t){e.syncInteraction=t.payload},setKeyboardInteraction(e,t){e.keyboardInteraction.active=t.payload.active,e.keyboardInteraction.index=t.payload.activeIndex,e.keyboardInteraction.coordinate=t.payload.activeCoordinate}}}),{addTooltipEntrySettings:cre,replaceTooltipEntrySettings:fre,removeTooltipEntrySettings:pre,setTooltipSettingsState:mre,setActiveMouseOverItemIndex:fD,mouseLeaveItem:gre,mouseLeaveChart:pD,setActiveClickItemIndex:kre,setMouseOverAxisIndex:mD,setMouseClickAxisIndex:Mre,setSyncInteraction:kM,setKeyboardInteraction:sb}=dre.actions,hre=dre.reducer;function vre(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function gD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vre(Object(r),!0).forEach(function(o){$Te(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vre(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function $Te(e,t,r){return(t=YTe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function YTe(e){var t=ZTe(e,"string");return typeof t=="symbol"?t:t+""}function ZTe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function XTe(e,t,r){return t==="axis"?r==="click"?e.axisInteraction.click:e.axisInteraction.hover:r==="click"?e.itemInteraction.click:e.itemInteraction.hover}function JTe(e){return e.index!=null}var kD=(e,t,r,o)=>{if(t==null)return hu;var n=XTe(e,t,r);if(n==null)return hu;if(n.active)return n;if(e.keyboardInteraction.active)return e.keyboardInteraction;if(e.syncInteraction.active&&e.syncInteraction.index!=null)return e.syncInteraction;var a=e.settings.active===!0;if(JTe(n)){if(a)return gD(gD({},n),{},{active:!0})}else if(o!=null)return{active:!0,coordinate:void 0,dataKey:void 0,index:o,graphicalItemId:void 0};return gD(gD({},hu),{},{coordinate:n.coordinate})};function QTe(e){if(typeof e=="number")return Number.isFinite(e)?e:void 0;if(e instanceof Date){var t=e.valueOf();return Number.isFinite(t)?t:void 0}var r=Number(e);return Number.isFinite(r)?r:void 0}function e2e(e,t){var r=QTe(e),o=t[0],n=t[1];if(r===void 0)return!1;var a=Math.min(o,n),i=Math.max(o,n);return r>=a&&r<=i}function t2e(e,t,r){if(r==null||t==null)return!0;var o=vt(e,t);return o==null||!Wa(r)?!0:e2e(o,r)}var sc=(e,t,r,o)=>{var n=e?.index;if(n==null)return null;var a=Number(n);if(!lt(a))return n;var i=0,s=1/0;t.length>0&&(s=t.length-1);var l=Math.max(i,Math.min(a,s)),u=t[l];return u==null||t2e(u,r,o)?String(l):null};var MD=(e,t,r,o,n,a,i)=>{if(a!=null){var s=i[0],l=s?.getPosition(a);if(l!=null)return l;var u=n?.[Number(a)];if(u)return r==="horizontal"?{x:u.coordinate,y:(o.top+t)/2}:{x:(o.left+e)/2,y:u.coordinate}}};var hD=(e,t,r,o)=>{if(t==="axis")return e.tooltipItemPayloads;if(e.tooltipItemPayloads.length===0)return[];var n;if(r==="hover"?n=e.itemInteraction.hover.graphicalItemId:n=e.itemInteraction.click.graphicalItemId,e.syncInteraction.active&&n==null)return e.tooltipItemPayloads;if(n==null&&(o!=null||e.keyboardInteraction.active)){var a=e.tooltipItemPayloads[0];return a!=null?[a]:[]}return e.tooltipItemPayloads.filter(i=>{var s;return((s=i.settings)===null||s===void 0?void 0:s.graphicalItemId)===n})};var vD=e=>e.options.tooltipPayloadSearcher;var vu=e=>e.tooltip;function yre(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function xre(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?yre(Object(r),!0).forEach(function(o){r2e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):yre(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function r2e(e,t,r){return(t=o2e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o2e(e){var t=n2e(e,"string");return typeof t=="symbol"?t:t+""}function n2e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function a2e(e){if(typeof e=="string"||typeof e=="number")return e}function i2e(e){if(typeof e=="string"||typeof e=="number"||typeof e=="boolean")return e}function s2e(e){if(typeof e=="string"||typeof e=="number")return e;if(typeof e=="function")return t=>e(t)}function bre(e){if(typeof e=="string")return e}function l2e(e){if(!(e==null||typeof e!="object")){var t="name"in e?a2e(e.name):void 0,r="unit"in e?i2e(e.unit):void 0,o="dataKey"in e?s2e(e.dataKey):void 0,n="payload"in e?e.payload:void 0,a="color"in e?bre(e.color):void 0,i="fill"in e?bre(e.fill):void 0;return{name:t,unit:r,dataKey:o,payload:n,color:a,fill:i}}}function u2e(e,t){return e??t}var yD=(e,t,r,o,n,a,i)=>{if(!(t==null||a==null)){var{chartData:s,computedData:l,dataStartIndex:u,dataEndIndex:d}=r,c=[];return e.reduce((f,p)=>{var g,{dataDefinedOnItem:m,settings:h}=p,k=u2e(m,s),M=Array.isArray(k)?DI(k,u,d):k,v=(g=h?.dataKey)!==null&&g!==void 0?g:o,b=h?.nameKey,w;if(o&&Array.isArray(M)&&!Array.isArray(M[0])&&i==="axis"?w=UA(M,o,n):w=a(M,t,l,b),Array.isArray(w))w.forEach(L=>{var C,F,T=l2e(L),G=T?.name,$=T?.dataKey,oe=T?.payload,se=xre(xre({},h),{},{name:G,unit:T?.unit,color:(C=T?.color)!==null&&C!==void 0?C:h?.color,fill:(F=T?.fill)!==null&&F!==void 0?F:h?.fill});f.push(o3({tooltipEntrySettings:se,dataKey:$,payload:oe,value:vt(oe,$),name:G==null?void 0:String(G)}))});else{var P;f.push(o3({tooltipEntrySettings:h,dataKey:v,payload:w,value:vt(w,v),name:(P=vt(w,b))!==null&&P!==void 0?P:h?.name}))}return f},c)}};var FV=te([Mo,dV,Kk],tD),d2e=te([e=>e.graphicalItems.cartesianItems,e=>e.graphicalItems.polarItems],(e,t)=>[...e,...t]),c2e=te([mo,Qd],Xx),lc=te([d2e,Mo,c2e],Jx,{memoizeOptions:{resultEqualityCheck:Yk}}),f2e=te([lc],e=>e.filter(Lp)),wre=te([lc],Qx,{memoizeOptions:{resultEqualityCheck:Yk}}),p2e=te([lc],e=>e.some(t=>!t.data)),yu=te([wre,la],eb),m2e=te([f2e,la,Mo],M1),BV=te([yu,Mo,lc,la,p2e,wre],mV),Cre=te([Mo],nD),g2e=te([Mo],e=>e.allowDataOverflow),Sre=te([Cre,g2e],n1),k2e=te([lc],e=>e.filter(Lp)),M2e=te([m2e,k2e,Zd,u1],gV),h2e=te([M2e,la,mo,Sre],kV),v2e=te([lc],cV),y2e=te([yu,Mo,v2e,mM,mo,dee],rb,{memoizeOptions:{resultEqualityCheck:$k}}),x2e=te([MV,mo,Qd],qp),b2e=te([x2e,mo],yV),w2e=te([hV,mo,Qd],qp),C2e=te([w2e,mo],xV),S2e=te([vV,mo,Qd],qp),P2e=te([S2e,mo],bV),A2e=te([b2e,P2e,C2e],Zx),I2e=te([Mo,Cre,Sre,h2e,y2e,A2e,mt,mo],ob),uc=te([Mo,mt,yu,BV,Zd,mo,I2e],nb),D2e=te([uc,Mo,FV],ab),L2e=te([Mo,uc,D2e,mo],ib),Pre=e=>{var t=mo(e),r=Qd(e),o=!1;return gM(e,t,r,o)},VV=te([Mo,Pre],Ap),R2e=te([Mo,FV,L2e,VV],Yx),UV=te([R2e],Ax),N2e=te([mt,BV,Mo,mo],RV),T2e=te([mt,BV,Mo,mo],PV),O2e=(e,t,r,o,n,a,i,s)=>{if(t){var{type:l}=t,u=Sn(e,s);if(o){var d=r==="scaleBand"&&o.bandwidth?o.bandwidth()/2:2,c=l==="category"&&o.bandwidth?o.bandwidth()/d:0;return c=s==="angleAxis"&&n!=null&&n?.length>=2?vr(n[0]-n[1])*2*c:c,u&&i?i.map((f,p)=>{var g=o.map(f);return lt(g)?{coordinate:g+c,value:f,index:p,offset:c}:null}).filter(un):o.domain().map((f,p)=>{var g=o.map(f);return lt(g)?{coordinate:g+c,value:a?a[f]:f,index:p,offset:c}:null}).filter(un)}}},da=te([mt,Mo,FV,UV,Pre,N2e,T2e,mo],O2e),WV=te([OV,EV,ure],(e,t,r)=>_V(r.shared,e,t)),Are=e=>e.tooltip.settings.trigger,GV=e=>e.tooltip.settings.defaultIndex,lb=te([vu,WV,Are,GV],kD),Ei=te([lb,yu,ku,uc],sc),xD=te([da,Ei],cD),MM=te([lb],e=>{if(e)return e.dataKey}),bD=te([lb],e=>{if(e)return e.graphicalItemId}),Ire=te([vu,WV,Are,GV],hD),E2e=te([Pn,An,mt,fr,da,GV,Ire],MD),jV=te([lb,E2e],(e,t)=>e!=null&&e.coordinate?e.coordinate:t),zV=te([lb],e=>{var t;return(t=e?.active)!==null&&t!==void 0?t:!1}),_2e=te([Ire,Ei,la,ku,xD,vD,WV],yD),Dre=te([_2e],e=>{if(e!=null){var t=e.map(r=>r.payload).filter(r=>r!=null);return Array.from(new Set(t))}});function Lre(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Rre(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Lre(Object(r),!0).forEach(function(o){F2e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Lre(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function F2e(e,t,r){return(t=B2e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function B2e(e){var t=V2e(e,"string");return typeof t=="symbol"?t:t+""}function V2e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U2e=()=>Ve(Mo),Nre=()=>{var e=U2e(),t=Ve(da),r=Ve(UV);return!e||!r?Ai(void 0,t):Ai(Rre(Rre({},e),{},{scale:r}),t)};function Tre(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function hM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tre(Object(r),!0).forEach(function(o){W2e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tre(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function W2e(e,t,r){return(t=G2e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function G2e(e){var t=j2e(e,"string");return typeof t=="symbol"?t:t+""}function j2e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ore=(e,t,r,o)=>{var n=t.find(a=>a&&a.index===r);if(n){if(e==="horizontal")return{x:n.coordinate,y:o.relativeY};if(e==="vertical")return{x:o.relativeX,y:n.coordinate}}return{x:0,y:0}},Ere=(e,t,r,o)=>{var n=t.find(u=>u&&u.index===r);if(n){if(e==="centric"){var a=n.coordinate,{radius:i}=o;return hM(hM(hM({},o),Ar(o.cx,o.cy,i,a)),{},{angle:a,radius:i})}var s=n.coordinate,{angle:l}=o;return hM(hM(hM({},o),Ar(o.cx,o.cy,s,l)),{},{angle:l,radius:s})}return{angle:0,clockWise:!1,cx:0,cy:0,endAngle:0,innerRadius:0,outerRadius:0,radius:0,startAngle:0,x:0,y:0}};function _re(e,t){var{relativeX:r,relativeY:o}=e;return r>=t.left&&r<=t.left+t.width&&o>=t.top&&o<=t.top+t.height}var qV=(e,t,r,o,n)=>{var a,i=(a=t?.length)!==null&&a!==void 0?a:0;if(i<=1||e==null)return 0;if(o==="angleAxis"&&n!=null&&Math.abs(Math.abs(n[1]-n[0])-360)<=1e-6)for(var s=0;s<i;s++){var l,u,d,c,f,p=s>0?(l=r[s-1])===null||l===void 0?void 0:l.coordinate:(u=r[i-1])===null||u===void 0?void 0:u.coordinate,g=(d=r[s])===null||d===void 0?void 0:d.coordinate,m=s>=i-1?(c=r[0])===null||c===void 0?void 0:c.coordinate:(f=r[s+1])===null||f===void 0?void 0:f.coordinate,h=void 0;if(!(p==null||g==null||m==null))if(vr(g-p)!==vr(m-g)){var k=[];if(vr(m-g)===vr(n[1]-n[0])){h=m;var M=g+n[1]-n[0];k[0]=Math.min(M,(M+p)/2),k[1]=Math.max(M,(M+p)/2)}else{h=p;var v=m+n[1]-n[0];k[0]=Math.min(g,(v+g)/2),k[1]=Math.max(g,(v+g)/2)}var b=[Math.min(g,(h+g)/2),Math.max(g,(h+g)/2)];if(e>b[0]&&e<=b[1]||e>=k[0]&&e<=k[1]){var w;return(w=r[s])===null||w===void 0?void 0:w.index}}else{var P=Math.min(p,m),L=Math.max(p,m);if(e>(P+g)/2&&e<=(L+g)/2){var C;return(C=r[s])===null||C===void 0?void 0:C.index}}}else if(t)for(var F=0;F<i;F++){var T=t[F];if(T!=null){var G=t[F+1],$=t[F-1];if(F===0&&G!=null&&e<=(T.coordinate+G.coordinate)/2||F===i-1&&$!=null&&e>(T.coordinate+$.coordinate)/2||F>0&&F<i-1&&$!=null&&G!=null&&e>(T.coordinate+$.coordinate)/2&&e<=(T.coordinate+G.coordinate)/2)return T.index}}return-1};var wD=()=>Ve(Kk),HV=(e,t)=>t,Fre=(e,t,r)=>r,KV=(e,t,r,o)=>o,Bre=te(da,e=>lu(e,t=>t.coordinate)),$V=te([vu,HV,Fre,KV],kD),YV=te([$V,yu,ku,uc],sc),Vre=(e,t,r)=>{if(t!=null){var o=vu(e);return t==="axis"?r==="hover"?o.axisInteraction.hover.dataKey:o.axisInteraction.click.dataKey:r==="hover"?o.itemInteraction.hover.dataKey:o.itemInteraction.click.dataKey}},Ure=te([vu,HV,Fre,KV],hD),ub=te([Pn,An,mt,fr,da,KV,Ure],MD),Wre=te([$V,ub],(e,t)=>{var r;return(r=e.coordinate)!==null&&r!==void 0?r:t}),ZV=te([da,YV],cD),Gre=te([Ure,YV,la,ku,ZV,vD,HV],yD),jre=te([$V,YV],(e,t)=>({isActive:e.active&&t!=null,activeIndex:t})),z2e=(e,t,r,o,n,a,i)=>{if(!(!e||!r||!o||!n)&&_re(e,i)){var s=BJ(e,t),l=qV(s,a,n,r,o),u=Ore(t,n,l,e);return{activeIndex:String(l),activeCoordinate:u}}},q2e=(e,t,r,o,n,a,i)=>{if(!(!e||!o||!n||!a||!r)){var s=ZQ(e,r);if(s){var l=VJ(s,t),u=qV(l,i,a,o,n),d=Ere(t,a,u,s);return{activeIndex:String(u),activeCoordinate:d}}}},zre=(e,t,r,o,n,a,i,s)=>{if(!(!e||!t||!o||!n||!a))return t==="horizontal"||t==="vertical"?z2e(e,t,o,n,a,i,s):q2e(e,t,r,o,n,a,i)};var vM=z(ie()),eoe=z(xg());var qre=te(e=>e.zIndex.zIndexMap,(e,t)=>t,(e,t,r)=>r,(e,t,r)=>{if(t!=null){var o=e[t];if(o!=null)return r?o.panoramaElement:o.element}}),Hre=te(e=>e.zIndex.zIndexMap,e=>{var t=Object.keys(e).map(o=>parseInt(o,10)).concat(Object.values(Nt)),r=Array.from(new Set(t));return r.sort((o,n)=>o-n)},{memoizeOptions:{resultEqualityCheck:See}});function Kre(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function $re(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Kre(Object(r),!0).forEach(function(o){H2e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Kre(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function H2e(e,t,r){return(t=K2e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function K2e(e){var t=$2e(e,"string");return typeof t=="symbol"?t:t+""}function $2e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Y2e={},Z2e={zIndexMap:Object.values(Nt).reduce((e,t)=>$re($re({},e),{},{[t]:{element:void 0,panoramaElement:void 0,consumers:0}}),Y2e)},X2e=new Set(Object.values(Nt));function J2e(e){return X2e.has(e)}var Yre=er({name:"zIndex",initialState:Z2e,reducers:{registerZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]?e.zIndexMap[r].consumers+=1:e.zIndexMap[r]={consumers:1,element:void 0,panoramaElement:void 0}},prepare:lr()},unregisterZIndexPortal:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(e.zIndexMap[r].consumers-=1,e.zIndexMap[r].consumers<=0&&!J2e(r)&&delete e.zIndexMap[r])},prepare:lr()},registerZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r,element:o,isPanorama:n}=t.payload;e.zIndexMap[r]?n?e.zIndexMap[r].panoramaElement=o:e.zIndexMap[r].element=o:e.zIndexMap[r]={consumers:0,element:n?void 0:o,panoramaElement:n?o:void 0}},prepare:lr()},unregisterZIndexPortalElement:{reducer:(e,t)=>{var{zIndex:r}=t.payload;e.zIndexMap[r]&&(t.payload.isPanorama?e.zIndexMap[r].panoramaElement=void 0:e.zIndexMap[r].element=void 0)},prepare:lr()}}}),{registerZIndexPortal:Zre,unregisterZIndexPortal:CD,registerZIndexPortalElement:Xre,unregisterZIndexPortalElement:Jre}=Yre.actions,Qre=Yre.reducer;function Ir(e){var{zIndex:t,children:r}=e,o=qJ(),n=o&&t!==void 0&&t!==0,a=tr(),i=(0,vM.useRef)(void 0),s=(0,vM.useRef)(new Set),l=Mt(),u=Ve(c=>qre(c,t,a));if((0,vM.useLayoutEffect)(()=>{if(!n){var c=s.current;c.forEach(p=>{l(CD({zIndex:p}))}),c.clear(),i.current=void 0;return}if(s.current.has(t)||(l(Zre({zIndex:t})),s.current.add(t)),u){i.current=u;var f=s.current;f.forEach(p=>{p!==t&&(l(CD({zIndex:p})),f.delete(p))})}},[l,t,n,u]),(0,vM.useLayoutEffect)(()=>{var c=s.current;return()=>{c.forEach(f=>{l(CD({zIndex:f}))}),c.clear()}},[l]),!n)return r;var d=u??i.current;return d?(0,eoe.createPortal)(r,d):null}function XV(){return XV=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},XV.apply(null,arguments)}function toe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function SD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?toe(Object(r),!0).forEach(function(o){Q2e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):toe(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Q2e(e,t,r){return(t=eOe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function eOe(e){var t=tOe(e,"string");return typeof t=="symbol"?t:t+""}function tOe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function rOe(e){var{cursor:t,cursorComp:r,cursorProps:o}=e;return(0,yM.isValidElement)(t)?(0,yM.cloneElement)(t,o):(0,yM.createElement)(r,o)}function oOe(e){var t,{coordinate:r,payload:o,index:n,offset:a,tooltipAxisBandSize:i,layout:s,cursor:l,tooltipEventType:u,chartName:d}=e,c=r,f=o,p=n;if(!l||!c||d!=="ScatterChart"&&u!=="axis")return null;var g,m,h;if(d==="ScatterChart")g=c,m=kQ,h=Nt.cursorLine;else if(d==="BarChart")g=MQ(s,c,a,i),m=ZI,h=Nt.cursorRectangle;else if(s==="radial"&&WA(c)){var{cx:k,cy:M,radius:v,startAngle:b,endAngle:w}=JI(c);g={cx:k,cy:M,startAngle:b,endAngle:w,innerRadius:v,outerRadius:v},m=e1,h=Nt.cursorLine}else g={points:iee(s,c,a)},m=ul,h=Nt.cursorLine;var P=typeof l=="object"&&"className"in l?l.className:void 0,L=SD(SD(SD(SD({stroke:"#ccc",pointerEvents:"none"},a),g),Ea(l)),{},{payload:f,payloadIndex:p,className:et("recharts-tooltip-cursor",P)});return PD.createElement(Ir,{zIndex:(t=e.zIndex)!==null&&t!==void 0?t:h},PD.createElement(rOe,{cursor:l,cursorComp:m,cursorProps:L}))}function roe(e){var t=Nre(),r=FI(),o=sa(),n=wD();return t==null||r==null||o==null||n==null?null:PD.createElement(oOe,XV({},e,{offset:r,layout:o,tooltipAxisBandSize:t,chartName:n}))}var AD=z(ie()),JV=(0,AD.createContext)(null),ooe=()=>(0,AD.useContext)(JV);var cb=z(ie());var ioe=z(aoe(),1);var soe=ioe.default;var xM=new soe;var DD="recharts.syncEvent.tooltip",eU="recharts.syncEvent.brush";var bM=(e,t)=>{if(t&&Array.isArray(e)){var r=Number.parseInt(t,10);if(!Yo(r))return e[r]}},iOe={chartName:"",tooltipPayloadSearcher:()=>{},eventEmitter:void 0,defaultTooltipEventType:"axis"},loe=er({name:"options",initialState:iOe,reducers:{createEventEmitter:e=>{e.eventEmitter==null&&(e.eventEmitter=Symbol("rechartsEventEmitter"))}}}),uoe=loe.reducer,{createEventEmitter:doe}=loe.actions;function coe(e){return e.tooltip.syncInteraction}var sOe={chartData:void 0,computedData:void 0,dataStartIndex:0,dataEndIndex:0},foe=er({name:"chartData",initialState:sOe,reducers:{setChartData(e,t){if(e.chartData=t.payload,t.payload==null){e.dataStartIndex=0,e.dataEndIndex=0;return}t.payload.length>0&&e.dataEndIndex!==t.payload.length-1&&(e.dataEndIndex=t.payload.length-1)},setComputedData(e,t){e.computedData=t.payload},setDataStartEndIndexes(e,t){var{startIndex:r,endIndex:o}=t.payload;r!=null&&(e.dataStartIndex=r),o!=null&&(e.dataEndIndex=o)}}}),{setChartData:tU,setDataStartEndIndexes:poe,setComputedData:lOe}=foe.actions,moe=foe.reducer;var uOe=["x","y"];function goe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function wM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?goe(Object(r),!0).forEach(function(o){dOe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):goe(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function dOe(e,t,r){return(t=cOe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function cOe(e){var t=fOe(e,"string");return typeof t=="symbol"?t:t+""}function fOe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function pOe(e,t){if(e==null)return{};var r,o,n=mOe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function mOe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function gOe(){var e=Ve(d1),t=Ve(c1),r=Mt(),o=Ve(b3),n=Ve(da),a=sa(),i=xp(),s=Ve(l=>l.rootProps.className);(0,cb.useEffect)(()=>{if(e==null)return Fa;var l=(u,d,c)=>{if(t!==c&&e===u){if(d.payload.active===!1){r(kM({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(o==="index"){var f;if(i&&d!==null&&d!==void 0&&(f=d.payload)!==null&&f!==void 0&&f.coordinate&&d.payload.sourceViewBox){var p=d.payload.coordinate,{x:g,y:m}=p,h=pOe(p,uOe),{x:k,y:M,width:v,height:b}=d.payload.sourceViewBox,w=wM(wM({},h),{},{x:i.x+(v?(g-k)/v:0)*i.width,y:i.y+(b?(m-M)/b:0)*i.height});r(wM(wM({},d),{},{payload:wM(wM({},d.payload),{},{coordinate:w})}))}else r(d);return}if(n!=null){var P;if(typeof o=="function"){var L={activeTooltipIndex:d.payload.index==null?void 0:Number(d.payload.index),isTooltipActive:d.payload.active,activeIndex:d.payload.index==null?void 0:Number(d.payload.index),activeLabel:d.payload.label,activeDataKey:d.payload.dataKey,activeCoordinate:d.payload.coordinate},C=o(n,L);P=n[C]}else o==="value"&&(P=n.find(N=>String(N.value)===d.payload.label));var{coordinate:F}=d.payload;if(F==null||i==null){r(kM({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:void 0,graphicalItemId:void 0}));return}if(P==null){r(kM({active:!1,coordinate:void 0,dataKey:void 0,index:null,label:void 0,sourceViewBox:d.payload.sourceViewBox,graphicalItemId:void 0}));return}var{x:T,y:G}=F,$=Math.min(T,i.x+i.width),oe=Math.min(G,i.y+i.height),se={x:a==="horizontal"?P.coordinate:$,y:a==="horizontal"?oe:P.coordinate},pe=kM({active:d.payload.active,coordinate:se,dataKey:d.payload.dataKey,index:String(P.index),label:d.payload.label,sourceViewBox:d.payload.sourceViewBox,graphicalItemId:d.payload.graphicalItemId});r(pe)}}};return xM.on(DD,l),()=>{xM.off(DD,l)}},[s,r,t,e,o,n,a,i])}function kOe(){var e=Ve(d1),t=Ve(c1),r=Mt();(0,cb.useEffect)(()=>{if(e==null)return Fa;var o=(n,a,i)=>{t!==i&&e===n&&r(poe(a))};return xM.on(eU,o),()=>{xM.off(eU,o)}},[r,t,e])}function koe(){var e=Mt();(0,cb.useEffect)(()=>{e(doe())},[e]),gOe(),kOe()}function Moe(e,t,r,o,n,a){var i=Ve(g=>Vre(g,e,t)),s=Ve(bD),l=Ve(c1),u=Ve(d1),d=Ve(b3),c=Ve(coe),f=c?.sourceViewBox!=null,p=xp();(0,cb.useEffect)(()=>{if(!f&&u!=null&&l!=null){var g=kM({active:a,coordinate:r,dataKey:i,index:n,label:typeof o=="number"?String(o):o,sourceViewBox:p,graphicalItemId:s});xM.emit(DD,u,g,l)}},[f,r,i,s,n,o,l,u,d,a,p])}function hoe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function voe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?hoe(Object(r),!0).forEach(function(o){MOe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):hoe(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function MOe(e,t,r){return(t=hOe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function hOe(e){var t=vOe(e,"string");return typeof t=="symbol"?t:t+""}function vOe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function yOe(e){return e.dataKey}function xOe(e,t){return _i.isValidElement(e)?_i.cloneElement(e,t):typeof e=="function"?_i.createElement(e,t):_i.createElement(oQ,t)}var yoe=[],bOe={allowEscapeViewBox:{x:!1,y:!1},animationDuration:400,animationEasing:"ease",axisId:0,contentStyle:{},cursor:!0,filterNull:!0,includeHidden:!1,isAnimationActive:"auto",itemSorter:"name",itemStyle:{},labelStyle:{},offset:10,reverseDirection:{x:!1,y:!1},separator:" : ",trigger:"hover",useTranslate3d:!1,wrapperStyle:{}};function dc(e){var t,r,o=_t(e,bOe),{active:n,allowEscapeViewBox:a,animationDuration:i,animationEasing:s,content:l,filterNull:u,isAnimationActive:d,offset:c,payloadUniqBy:f,position:p,reverseDirection:g,useTranslate3d:m,wrapperStyle:h,cursor:k,shared:M,trigger:v,defaultIndex:b,portal:w,axisId:P}=o,L=Mt(),C=typeof b=="number"?String(b):b;(0,xoe.useEffect)(()=>{L(mre({shared:M,trigger:v,axisId:P,active:n,defaultIndex:C}))},[L,M,v,P,n,C]);var F=xp(),T=GI(),G=lre(M),{activeIndex:$,isActive:oe}=(t=Ve(Ue=>jre(Ue,G,v,C)))!==null&&t!==void 0?t:{},se=Ve(Ue=>Gre(Ue,G,v,C)),pe=Ve(Ue=>ZV(Ue,G,v,C)),N=Ve(Ue=>Wre(Ue,G,v,C)),R=se,U=ooe(),E=(r=n??oe)!==null&&r!==void 0?r:!1,[_,B]=OX([R,E]),j=G==="axis"?pe:void 0;Moe(G,v,N,j,$,E);var re=w??U;if(re==null||F==null||G==null)return null;var W=R??yoe;E||(W=yoe),u&&W.length&&(W=mX(W.filter(Ue=>Ue.value!=null&&(Ue.hide!==!0||o.includeHidden)),f,yOe));var K=W.length>0,Q=voe(voe({},o),{},{payload:W,label:j,active:E,activeIndex:$,coordinate:N,accessibilityLayer:T}),ue=_i.createElement(sQ,{allowEscapeViewBox:a,animationDuration:i,animationEasing:s,isAnimationActive:d,active:E,coordinate:N,hasPayload:K,offset:c,position:p,reverseDirection:g,useTranslate3d:m,viewBox:F,wrapperStyle:h,lastBoundingBox:_,innerRef:B,hasPortalFromProps:!!w},xOe(l,Q));return _i.createElement(_i.Fragment,null,(0,boe.createPortal)(ue,re),E&&_i.createElement(roe,{cursor:k,tooltipEventType:G,coordinate:N,payload:W,index:$}))}var Ka=e=>null;Ka.displayName="Cell";var oU=z(ie()),ND=z(ie());function wOe(e,t,r){return(t=COe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function COe(e){var t=SOe(e,"string");return typeof t=="symbol"?t:t+""}function SOe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LD=class{constructor(t){wOe(this,"cache",new Map),this.maxSize=t}get(t){var r=this.cache.get(t);return r!==void 0&&(this.cache.delete(t),this.cache.set(t,r)),r}set(t,r){if(this.cache.has(t))this.cache.delete(t);else if(this.cache.size>=this.maxSize){var o=this.cache.keys().next().value;o!=null&&this.cache.delete(o)}this.cache.set(t,r)}clear(){this.cache.clear()}size(){return this.cache.size}};function woe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function POe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?woe(Object(r),!0).forEach(function(o){AOe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):woe(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function AOe(e,t,r){return(t=IOe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function IOe(e){var t=DOe(e,"string");return typeof t=="symbol"?t:t+""}function DOe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var LOe={cacheSize:2e3,enableCache:!0},Aoe=POe({},LOe),Coe=new LD(Aoe.cacheSize),ROe={position:"absolute",top:"-20000px",left:0,padding:0,margin:0,border:"none",whiteSpace:"pre"},Soe="recharts_measurement_span";function NOe(e,t){var r=t.fontSize||"",o=t.fontFamily||"",n=t.fontWeight||"",a=t.fontStyle||"",i=t.letterSpacing||"",s=t.textTransform||"";return"".concat(e,"|").concat(r,"|").concat(o,"|").concat(n,"|").concat(a,"|").concat(i,"|").concat(s)}var Poe=(e,t)=>{try{var r=document.getElementById(Soe);r||(r=document.createElement("span"),r.setAttribute("id",Soe),r.setAttribute("aria-hidden","true"),document.body.appendChild(r)),Object.assign(r.style,ROe,t),r.textContent="".concat(e);var o=r.getBoundingClientRect();return{width:o.width,height:o.height}}catch{return{width:0,height:0}}},Hp=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};if(t==null||Di.isSsr)return{width:0,height:0};if(!Aoe.enableCache)return Poe(t,r);var o=NOe(t,r),n=Coe.get(o);if(n)return n;var a=Poe(t,r);return Coe.set(o,a),a};var Roe;function TOe(e,t,r){return(t=OOe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function OOe(e){var t=EOe(e,"string");return typeof t=="symbol"?t:t+""}function EOe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Ioe=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([*/])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,Doe=/(-?\d+(?:\.\d+)?[a-zA-Z%]*)([+-])(-?\d+(?:\.\d+)?[a-zA-Z%]*)/,_Oe=/^(px|cm|vh|vw|em|rem|%|mm|in|pt|pc|ex|ch|vmin|vmax|Q)$/,FOe=/(-?\d+(?:\.\d+)?)([a-zA-Z%]+)?/,BOe={cm:96/2.54,mm:96/25.4,pt:96/72,pc:96/6,in:96,Q:96/(2.54*40),px:1},VOe=["cm","mm","pt","pc","in","Q","px"];function UOe(e){return VOe.includes(e)}var CM="NaN";function WOe(e,t){return e*BOe[t]}var cc=class e{static parse(t){var r,[,o,n]=(r=FOe.exec(t))!==null&&r!==void 0?r:[];return o==null?e.NaN:new e(parseFloat(o),n??"")}constructor(t,r){this.num=t,this.unit=r,this.num=t,this.unit=r,Yo(t)&&(this.unit=""),r!==""&&!_Oe.test(r)&&(this.num=NaN,this.unit=""),UOe(r)&&(this.num=WOe(t,r),this.unit="px")}add(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num+t.num,this.unit)}subtract(t){return this.unit!==t.unit?new e(NaN,""):new e(this.num-t.num,this.unit)}multiply(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new e(NaN,""):new e(this.num*t.num,this.unit||t.unit)}divide(t){return this.unit!==""&&t.unit!==""&&this.unit!==t.unit?new e(NaN,""):new e(this.num/t.num,this.unit||t.unit)}toString(){return"".concat(this.num).concat(this.unit)}isNaN(){return Yo(this.num)}};Roe=cc;TOe(cc,"NaN",new Roe(NaN,""));function Noe(e){if(e==null||e.includes(CM))return CM;for(var t=e;t.includes("*")||t.includes("/");){var r,[,o,n,a]=(r=Ioe.exec(t))!==null&&r!==void 0?r:[],i=cc.parse(o??""),s=cc.parse(a??""),l=n==="*"?i.multiply(s):i.divide(s);if(l.isNaN())return CM;t=t.replace(Ioe,l.toString())}for(;t.includes("+")||/.-\d+(?:\.\d+)?/.test(t);){var u,[,d,c,f]=(u=Doe.exec(t))!==null&&u!==void 0?u:[],p=cc.parse(d??""),g=cc.parse(f??""),m=c==="+"?p.add(g):p.subtract(g);if(m.isNaN())return CM;t=t.replace(Doe,m.toString())}return t}var Loe=/\(([^()]*)\)/;function GOe(e){for(var t=e,r;(r=Loe.exec(t))!=null;){var[,o]=r;t=t.replace(Loe,Noe(o))}return t}function jOe(e){var t=e.replace(/\s+/g,"");return t=GOe(t),t=Noe(t),t}function zOe(e){try{return jOe(e)}catch{return CM}}function RD(e){var t=zOe(e.slice(5,-1));return t===CM?"":t}var qOe=["x","y","lineHeight","capHeight","fill","scaleToFit","textAnchor","verticalAnchor"],HOe=["dx","dy","angle","className","breakAll"];function rU(){return rU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},rU.apply(null,arguments)}function Toe(e,t){if(e==null)return{};var r,o,n=KOe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KOe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var _oe=/[ \f\n\r\t\v\u2028\u2029]+/,Foe=e=>{var{children:t,breakAll:r,style:o}=e;try{var n=[];Rt(t)||(r?n=t.toString().split(""):n=t.toString().split(_oe));var a=n.map(s=>({word:s,width:Hp(s,o).width})),i=r?0:Hp("\xA0",o).width;return{wordsWithComputedWidth:a,spaceWidth:i}}catch{return null}};function TD(e){return e==="start"||e==="middle"||e==="end"||e==="inherit"}function Boe(e){return Rt(e)||typeof e=="string"||typeof e=="number"||typeof e=="boolean"}var Voe=(e,t,r,o)=>e.reduce((n,a)=>{var{word:i,width:s}=a,l=n[n.length-1];if(l&&s!=null&&(t==null||o||l.width+s+r<Number(t)))l.words.push(i),l.width+=s+r;else{var u={words:[i],width:s};n.push(u)}return n},[]),Uoe=e=>e.reduce((t,r)=>t.width>r.width?t:r),$Oe="\u2026",Ooe=(e,t,r,o,n,a,i,s)=>{var l=e.slice(0,t),u=Foe({breakAll:r,style:o,children:l+$Oe});if(!u)return[!1,[]];var d=Voe(u.wordsWithComputedWidth,a,i,s),c=d.length>n||Uoe(d).width>Number(a);return[c,d]},YOe=(e,t,r,o,n)=>{var{maxLines:a,children:i,style:s,breakAll:l}=e,u=Be(a),d=String(i),c=Voe(t,o,r,n);if(!u||n)return c;var f=c.length>a||Uoe(c).width>Number(o);if(!f)return c;for(var p=0,g=d.length-1,m=0,h;p<=g&&m<=d.length-1;){var k=Math.floor((p+g)/2),M=k-1,[v,b]=Ooe(d,M,l,s,a,o,r,n),[w]=Ooe(d,k,l,s,a,o,r,n);if(!v&&!w&&(p=k+1),v&&w&&(g=k-1),!v&&w){h=b;break}m++}return h||c},Eoe=e=>{var t=Rt(e)?[]:e.toString().split(_oe);return[{words:t,width:void 0}]},ZOe=e=>{var{width:t,scaleToFit:r,children:o,style:n,breakAll:a,maxLines:i}=e;if((t||r)&&!Di.isSsr){var s,l,u=Foe({breakAll:a,children:o,style:n});if(u){var{wordsWithComputedWidth:d,spaceWidth:c}=u;s=d,l=c}else return Eoe(o);return YOe({breakAll:a,children:o,maxLines:i,style:n},s,l,t,!!r)}return Eoe(o)},Woe="#808080",XOe={angle:0,breakAll:!1,capHeight:"0.71em",fill:Woe,lineHeight:"1em",scaleToFit:!1,textAnchor:"start",verticalAnchor:"end",x:0,y:0},Kp=(0,ND.forwardRef)((e,t)=>{var r=_t(e,XOe),{x:o,y:n,lineHeight:a,capHeight:i,fill:s,scaleToFit:l,textAnchor:u,verticalAnchor:d}=r,c=Toe(r,qOe),f=(0,ND.useMemo)(()=>ZOe({breakAll:c.breakAll,children:c.children,maxLines:c.maxLines,scaleToFit:l,style:c.style,width:c.width}),[c.breakAll,c.children,c.maxLines,l,c.style,c.width]),{dx:p,dy:g,angle:m,className:h,breakAll:k}=c,M=Toe(c,HOe);if(!jn(o)||!jn(n)||f.length===0)return null;var v=Number(o)+(Be(p)?p:0),b=Number(n)+(Be(g)?g:0);if(!lt(v)||!lt(b))return null;var w;switch(d){case"start":w=RD("calc(".concat(i,")"));break;case"middle":w=RD("calc(".concat((f.length-1)/2," * -").concat(a," + (").concat(i," / 2))"));break;default:w=RD("calc(".concat(f.length-1," * -").concat(a,")"));break}var P=[],L=f[0];if(l&&L!=null){var C=L.width,{width:F}=c;P.push("scale(".concat(Be(F)&&Be(C)?F/C:1,")"))}return m&&P.push("rotate(".concat(m,", ").concat(v,", ").concat(b,")")),P.length&&(M.transform=P.join(" ")),oU.createElement("text",rU({},mr(M),{ref:t,x:v,y:b,className:et("recharts-text",h),textAnchor:u,fill:s.includes("url")?Woe:s}),f.map((T,G)=>{var $=T.words.join(k?"":" ");return oU.createElement("tspan",{x:v,dy:G===0?w:a,key:"".concat($,"-").concat(G)},$)}))});Kp.displayName="Text";var $a=z(ie()),Xo=z(ie());function Goe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function vl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Goe(Object(r),!0).forEach(function(o){JOe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Goe(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function JOe(e,t,r){return(t=QOe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function QOe(e){var t=eEe(e,"string");return typeof t=="symbol"?t:t+""}function eEe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var joe=e=>{var{viewBox:t,position:r,offset:o=0,parentViewBox:n,clamp:a}=e,{x:i,y:s,height:l,upperWidth:u,lowerWidth:d}=yx(t),c=i,f=i+(u-d)/2,p=(c+f)/2,g=(u+d)/2,m=c+u/2,h=l>=0?1:-1,k=h*o,M=h>0?"end":"start",v=h>0?"start":"end",b=u>=0?1:-1,w=b*o,P=b>0?"end":"start",L=b>0?"start":"end",C=n;if(r==="top"){var F={x:c+u/2,y:s-k,horizontalAnchor:"middle",verticalAnchor:M};return a&&C&&(F.height=Math.max(s-C.y,0),F.width=u),F}if(r==="bottom"){var T={x:f+d/2,y:s+l+k,horizontalAnchor:"middle",verticalAnchor:v};return a&&C&&(T.height=Math.max(C.y+C.height-(s+l),0),T.width=d),T}if(r==="left"){var G={x:p-w,y:s+l/2,horizontalAnchor:P,verticalAnchor:"middle"};return a&&C&&(G.width=Math.max(G.x-C.x,0),G.height=l),G}if(r==="right"){var $={x:p+g+w,y:s+l/2,horizontalAnchor:L,verticalAnchor:"middle"};return a&&C&&($.width=Math.max(C.x+C.width-$.x,0),$.height=l),$}var oe=a&&C?{width:g,height:l}:{};return r==="insideLeft"?vl({x:p+w,y:s+l/2,horizontalAnchor:L,verticalAnchor:"middle"},oe):r==="insideRight"?vl({x:p+g-w,y:s+l/2,horizontalAnchor:P,verticalAnchor:"middle"},oe):r==="insideTop"?vl({x:c+u/2,y:s+k,horizontalAnchor:"middle",verticalAnchor:v},oe):r==="insideBottom"?vl({x:f+d/2,y:s+l-k,horizontalAnchor:"middle",verticalAnchor:M},oe):r==="insideTopLeft"?vl({x:c+w,y:s+k,horizontalAnchor:L,verticalAnchor:v},oe):r==="insideTopRight"?vl({x:c+u-w,y:s+k,horizontalAnchor:P,verticalAnchor:v},oe):r==="insideBottomLeft"?vl({x:f+w,y:s+l-k,horizontalAnchor:L,verticalAnchor:M},oe):r==="insideBottomRight"?vl({x:f+d-w,y:s+l-k,horizontalAnchor:P,verticalAnchor:M},oe):r&&typeof r=="object"&&(Be(r.x)||VA(r.x))&&(Be(r.y)||VA(r.y))?vl({x:i+Qr(r.x,g),y:s+Qr(r.y,l),horizontalAnchor:"end",verticalAnchor:"end"},oe):vl({x:m,y:s+l/2,horizontalAnchor:"middle",verticalAnchor:"middle"},oe)};var tEe=["labelRef"],rEe=["content"];function zoe(e,t){if(e==null)return{};var r,o,n=oEe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oEe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function qoe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function fb(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qoe(Object(r),!0).forEach(function(o){nEe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qoe(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function nEe(e,t,r){return(t=aEe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aEe(e){var t=iEe(e,"string");return typeof t=="symbol"?t:t+""}function iEe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function bu(){return bu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},bu.apply(null,arguments)}var Hoe=(0,Xo.createContext)(null),Koe=e=>{var{x:t,y:r,upperWidth:o,lowerWidth:n,width:a,height:i,children:s}=e,l=(0,Xo.useMemo)(()=>({x:t,y:r,upperWidth:o,lowerWidth:n,width:a,height:i}),[t,r,o,n,a,i]);return $a.createElement(Hoe.Provider,{value:l},s)},$oe=()=>{var e=(0,Xo.useContext)(Hoe),t=xp();return e||(t?yx(t):void 0)},sEe=(0,Xo.createContext)(null);var lEe=()=>{var e=(0,Xo.useContext)(sEe),t=Ve(k1);return e||t},uEe=e=>{var{value:t,formatter:r}=e,o=Rt(e.children)?t:e.children;return typeof r=="function"?r(o):o},pb=e=>e!=null&&typeof e=="function",dEe=(e,t)=>{var r=vr(t-e),o=Math.min(Math.abs(t-e),360);return r*o},cEe=(e,t,r,o,n)=>{var{offset:a,className:i}=e,{cx:s,cy:l,innerRadius:u,outerRadius:d,startAngle:c,endAngle:f,clockWise:p}=n,g=(u+d)/2,m=dEe(c,f),h=m>=0?1:-1,k,M;switch(t){case"insideStart":k=c+h*a,M=p;break;case"insideEnd":k=f-h*a,M=!p;break;case"end":k=f+h*a,M=p;break;default:throw new Error("Unsupported position ".concat(t))}M=m<=0?M:!M;var v=Ar(s,l,g,k),b=Ar(s,l,g,k+(M?1:-1)*359),w="M".concat(v.x,",").concat(v.y,`
48
+ A`).concat(g,",").concat(g,",0,1,").concat(M?0:1,`,
49
+ `).concat(b.x,",").concat(b.y),P=Rt(e.id)?iu("recharts-radial-line-"):e.id;return $a.createElement("text",bu({},o,{dominantBaseline:"central",className:et("recharts-radial-bar-label",i)}),$a.createElement("defs",null,$a.createElement("path",{id:P,d:w})),$a.createElement("textPath",{xlinkHref:"#".concat(P)},r))},fEe=(e,t,r)=>{var{cx:o,cy:n,innerRadius:a,outerRadius:i,startAngle:s,endAngle:l}=e,u=(s+l)/2;if(r==="outside"){var{x:d,y:c}=Ar(o,n,i+t,u);return{x:d,y:c,textAnchor:d>=o?"start":"end",verticalAnchor:"middle"}}if(r==="center")return{x:o,y:n,textAnchor:"middle",verticalAnchor:"middle"};if(r==="centerTop")return{x:o,y:n,textAnchor:"middle",verticalAnchor:"start"};if(r==="centerBottom")return{x:o,y:n,textAnchor:"middle",verticalAnchor:"end"};var f=(a+i)/2,{x:p,y:g}=Ar(o,n,f,u);return{x:p,y:g,textAnchor:"middle",verticalAnchor:"middle"}},OD=e=>e!=null&&"cx"in e&&Be(e.cx),pEe={angle:0,offset:5,zIndex:Nt.label,position:"middle",textBreakAll:!1};function mEe(e){if(!OD(e))return e;var{cx:t,cy:r,outerRadius:o}=e,n=o*2;return{x:t-o,y:r-o,width:n,upperWidth:n,lowerWidth:n,height:n}}function xu(e){var t=_t(e,pEe),{viewBox:r,parentViewBox:o,position:n,value:a,children:i,content:s,className:l="",textBreakAll:u,labelRef:d}=t,c=lEe(),f=$oe(),p=n==="center"?f:c??f,g,m,h;r==null?g=p:OD(r)?g=r:g=yx(r);var k=mEe(g);if(!g||Rt(a)&&Rt(i)&&!(0,Xo.isValidElement)(s)&&typeof s!="function")return null;var M=fb(fb({},t),{},{viewBox:g});if((0,Xo.isValidElement)(s)){var{labelRef:v}=M,b=zoe(M,tEe);return(0,Xo.cloneElement)(s,b)}if(typeof s=="function"){var{content:w}=M,P=zoe(M,rEe);if(m=(0,Xo.createElement)(s,P),(0,Xo.isValidElement)(m))return m}else m=uEe(t);var L=mr(t);if(OD(g)){if(n==="insideStart"||n==="insideEnd"||n==="end")return cEe(t,n,m,L,g);h=fEe(g,t.offset,t.position)}else{if(!k)return null;var C=joe({viewBox:k,position:n,offset:t.offset,parentViewBox:OD(o)?void 0:o,clamp:!0});h=fb(fb({x:C.x,y:C.y,textAnchor:C.horizontalAnchor,verticalAnchor:C.verticalAnchor},C.width!==void 0?{width:C.width}:{}),C.height!==void 0?{height:C.height}:{})}return $a.createElement(Ir,{zIndex:t.zIndex},$a.createElement(Kp,bu({ref:d,className:et("recharts-label",l)},L,h,{textAnchor:TD(L.textAnchor)?L.textAnchor:h.textAnchor,breakAll:u}),m))}xu.displayName="Label";var gEe=(e,t,r)=>{if(!e)return null;var o={viewBox:t,labelRef:r};return e===!0?$a.createElement(xu,bu({key:"label-implicit"},o)):jn(e)?$a.createElement(xu,bu({key:"label-implicit",value:e},o)):(0,Xo.isValidElement)(e)?e.type===xu?(0,Xo.cloneElement)(e,fb({key:"label-implicit"},o)):$a.createElement(xu,bu({key:"label-implicit",content:e},o)):pb(e)?$a.createElement(xu,bu({key:"label-implicit",content:e},o)):e&&typeof e=="object"?$a.createElement(xu,bu({},e,{key:"label-implicit"},o)):null};function Yoe(e){var{label:t,labelRef:r}=e,o=$oe();return gEe(t,o,r)||null}var wu=z(ie()),SM=z(ie());var kEe=["valueAccessor"],MEe=["dataKey","clockWise","id","textBreakAll","zIndex"];function ED(){return ED=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ED.apply(null,arguments)}function Zoe(e,t){if(e==null)return{};var r,o,n=hEe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function hEe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var vEe=e=>{var t=Array.isArray(e.value)?e.value[e.value.length-1]:e.value;if(Boe(t))return t},Xoe=(0,SM.createContext)(void 0),PM=Xoe.Provider,Joe=(0,SM.createContext)(void 0),Qoe=Joe.Provider;function yEe(){return(0,SM.useContext)(Xoe)}function xEe(){return(0,SM.useContext)(Joe)}function fc(e){var{valueAccessor:t=vEe}=e,r=Zoe(e,kEe),{dataKey:o,clockWise:n,id:a,textBreakAll:i,zIndex:s}=r,l=Zoe(r,MEe),u=yEe(),d=xEe(),c=u||d;return!c||!c.length?null:wu.createElement(Ir,{zIndex:s??Nt.label},wu.createElement(Jt,{className:"recharts-label-list"},c.map((f,p)=>{var g,m=Rt(o)?t(f,p):vt(f.payload,o),h=Rt(a)?{}:{id:"".concat(a,"-").concat(p)};return wu.createElement(xu,ED({key:"label-".concat(p)},mr(f),l,h,{fill:(g=r.fill)!==null&&g!==void 0?g:f.fill,parentViewBox:f.parentViewBox,value:m,textBreakAll:i,viewBox:f.viewBox,index:p,zIndex:0}))})))}fc.displayName="LabelList";function pc(e){var{label:t}=e;return t?t===!0?wu.createElement(fc,{key:"labelList-implicit"}):wu.isValidElement(t)||pb(t)?wu.createElement(fc,{key:"labelList-implicit",content:t}):typeof t=="object"?wu.createElement(fc,ED({key:"labelList-implicit"},t,{type:String(t.type)})):null:null}var ene=z(ie());function nU(){return nU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},nU.apply(null,arguments)}var _D=e=>{var{cx:t,cy:r,r:o,className:n}=e,a=et("recharts-dot",n);return Be(t)&&Be(r)&&Be(o)?ene.createElement("circle",nU({},Br(e),Lk(e),{className:a,cx:t,cy:r,r:o})):null};var aU=e=>e.graphicalItems.polarItems,bEe=te([Tr,Dp],Xx),FD=te([aU,eo,bEe],Jx),wEe=te([FD],Qx),BD=te([wEe,Sp],eb),CEe=te([BD,eo,FD],pV),VIt=te([BD,eo,FD],(e,t,r)=>r.length>0?e.flatMap(o=>r.flatMap(n=>{var a,i=vt(o,(a=t.dataKey)!==null&&a!==void 0?a:n.dataKey);return{value:i,errorDomain:[]}})).filter(Boolean):t?.dataKey!=null?e.map(o=>({value:vt(o,t.dataKey),errorDomain:[]})):e.map(o=>({value:o,errorDomain:[]}))),tne=()=>{},SEe=te([BD,eo,FD,mM,Tr,uee],rb),PEe=te([eo,aD,iD,tne,SEe,tne,mt,Tr],ob),rne=te([eo,mt,BD,CEe,Zd,Tr,PEe],nb),AEe=te([rne,zp,Mu],ab),IEe=te([eo,rne,AEe,Tr],ib),UIt=te([Mu,IEe],h1);var DEe={radiusAxis:{},angleAxis:{}},one=er({name:"polarAxis",initialState:DEe,reducers:{addRadiusAxis(e,t){e.radiusAxis[t.payload.id]=t.payload},removeRadiusAxis(e,t){delete e.radiusAxis[t.payload.id]},addAngleAxis(e,t){e.angleAxis[t.payload.id]=t.payload},removeAngleAxis(e,t){delete e.angleAxis[t.payload.id]}}}),{addRadiusAxis:jIt,removeRadiusAxis:zIt,addAngleAxis:qIt,removeAngleAxis:HIt}=one.actions,nne=one.reducer;function VD(e){return e&&typeof e=="object"&&"className"in e&&typeof e.className=="string"?e.className:""}var xt=z(ie()),Ps=z(ie());function ane(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function ine(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?ane(Object(r),!0).forEach(function(o){LEe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ane(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function LEe(e,t,r){return(t=REe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function REe(e){var t=NEe(e,"string");return typeof t=="symbol"?t:t+""}function NEe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var TEe=(e,t)=>t,iU=te([aU,TEe],(e,t)=>e.filter(r=>r.type==="pie").find(r=>r.id===t)),OEe=[],sU=(e,t,r)=>r?.length===0?OEe:r,sne=te([Sp,iU,sU],(e,t,r)=>{var{chartData:o}=e;if(t!=null){var n;if(t?.data!=null&&t.data.length>0?n=t.data:n=o,(!n||!n.length)&&r!=null&&(n=r.map(a=>ine(ine({},t.presentationProps),a.props))),n!=null)return n}}),lne=te([sne,iU,sU],(e,t,r)=>{if(!(e==null||t==null))return e.map((o,n)=>{var a,i=vt(o,t.nameKey,t.name),s;return r!=null&&(a=r[n])!==null&&a!==void 0&&(a=a.props)!==null&&a!==void 0&&a.fill?s=r[n].props.fill:typeof o=="object"&&o!=null&&"fill"in o?s=o.fill:s=t.fill,{value:Ua(i,t.dataKey),color:s,payload:o,type:t.legendType}})}),une=te([sne,iU,sU,fr],(e,t,r,o)=>{if(!(t==null||e==null))return dne({offset:o,pieSettings:t,displayedData:e,cells:r})});var kne=z(ie()),Mne=z(pne());var mne=e=>typeof e=="string"?e:e?e.displayName||e.name||"Component":"",gne=null,dU=null,hne=e=>{if(e===gne&&Array.isArray(dU))return dU;var t=[];return kne.Children.forEach(e,r=>{Rt(r)||((0,Mne.isFragment)(r)?t=t.concat(hne(r.props.children)):t.push(r))}),dU=t,gne=e,t};function mb(e,t){var r=[],o=[];return Array.isArray(t)?o=t.map(n=>mne(n)):o=[mne(t)],hne(e).forEach(n=>{var a=$o(n,"type.displayName")||$o(n,"type.name");a&&o.indexOf(a)!==-1&&r.push(n)}),r}var AM=e=>e&&typeof e=="object"&&"clipDot"in e?!!e.clipDot:!0;var yl=z(ie()),Mb=z(ie());function cU(e){if(typeof e!="object"||e==null)return!1;if(Object.getPrototypeOf(e)===null)return!0;if(Object.prototype.toString.call(e)!=="[object Object]"){let r=e[Symbol.toStringTag];return r==null||!Object.getOwnPropertyDescriptor(e,Symbol.toStringTag)?.writable?!1:e.toString()===`[object ${r}]`}let t=e;for(;Object.getPrototypeOf(t)!==null;)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}var kb=z(ie()),Cs=z(ie());var vne,yne,xne,bne,wne;function Cne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Sne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Cne(Object(r),!0).forEach(function(o){FEe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Cne(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function FEe(e,t,r){return(t=BEe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function BEe(e){var t=VEe(e,"string");return typeof t=="symbol"?t:t+""}function VEe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function ZD(){return ZD=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},ZD.apply(null,arguments)}function gb(e,t){return t||(t=e.slice(0)),Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))}var Pne=(e,t,r,o,n)=>{var a=r-o,i;return i=Nr(vne||(vne=gb(["M ",",",""])),e,t),i+=Nr(yne||(yne=gb(["L ",",",""])),e+r,t),i+=Nr(xne||(xne=gb(["L ",",",""])),e+r-a/2,t+n),i+=Nr(bne||(bne=gb(["L ",",",""])),e+r-a/2-o,t+n),i+=Nr(wne||(wne=gb(["L ",","," Z"])),e,t),i},UEe={x:0,y:0,upperWidth:0,lowerWidth:0,height:0,isUpdateAnimationActive:!1,animationBegin:0,animationDuration:1500,animationEasing:"ease"},Ane=e=>{var t=_t(e,UEe),{x:r,y:o,upperWidth:n,lowerWidth:a,height:i,className:s}=t,{animationEasing:l,animationDuration:u,animationBegin:d,isUpdateAnimationActive:c}=t,f=(0,Cs.useRef)(null),[p,g]=(0,Cs.useState)(-1),m=(0,Cs.useRef)(n),h=(0,Cs.useRef)(a),k=(0,Cs.useRef)(i),M=(0,Cs.useRef)(r),v=(0,Cs.useRef)(o),b=Ri(e,"trapezoid-");if((0,Cs.useEffect)(()=>{if(f.current&&f.current.getTotalLength)try{var se=f.current.getTotalLength();se&&g(se)}catch{}},[]),r!==+r||o!==+o||n!==+n||a!==+a||i!==+i||n===0&&a===0||i===0)return null;var w=et("recharts-trapezoid",s);if(!c)return kb.createElement("g",null,kb.createElement("path",ZD({},mr(t),{className:w,d:Pne(r,o,n,a,i)})));var P=m.current,L=h.current,C=k.current,F=M.current,T=v.current,G="0px ".concat(p===-1?1:p,"px"),$="".concat(p,"px ").concat(p,"px"),oe=zI(["strokeDasharray"],u,l);return kb.createElement(Li,{animationId:b,key:b,canBegin:p>0,duration:u,easing:l,isActive:c,begin:d},se=>{var pe=jt(P,n,se),N=jt(L,a,se),R=jt(C,i,se),U=jt(F,r,se),E=jt(T,o,se);f.current&&(m.current=pe,h.current=N,k.current=R,M.current=U,v.current=E);var _=se>0?{transition:oe,strokeDasharray:$}:{strokeDasharray:G};return kb.createElement("path",ZD({},mr(t),{className:w,d:Pne(U,E,pe,N,R),ref:f,style:Sne(Sne({},_),t.style)}))})};var WEe=["option","shapeType","activeClassName","inActiveClassName"];function GEe(e,t){if(e==null)return{};var r,o,n=jEe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function jEe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function Ine(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function XD(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Ine(Object(r),!0).forEach(function(o){zEe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Ine(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function zEe(e,t,r){return(t=qEe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qEe(e){var t=HEe(e,"string");return typeof t=="symbol"?t:t+""}function HEe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function KEe(e,t){return XD(XD({},t),e)}function $Ee(e,t){return e==="symbols"}function Dne(e){var{shapeType:t,elementProps:r}=e;switch(t){case"rectangle":return yl.createElement(ZI,r);case"trapezoid":return yl.createElement(Ane,r);case"sector":return yl.createElement(e1,r);case"symbols":if($Ee(t,r))return yl.createElement(bB,r);break;case"curve":return yl.createElement(ul,r);default:return null}}function YEe(e){return(0,Mb.isValidElement)(e)?e.props:e}function IM(e){var{option:t,shapeType:r,activeClassName:o="recharts-active-shape",inActiveClassName:n="recharts-shape"}=e,a=GEe(e,WEe),i;if((0,Mb.isValidElement)(t))i=(0,Mb.cloneElement)(t,XD(XD({},a),YEe(t)));else if(typeof t=="function")i=t(a,a.index);else if(cU(t)&&typeof t!="boolean"){var s=KEe(t,a);i=yl.createElement(Dne,{shapeType:r,elementProps:s})}else{var l=a;i=yl.createElement(Dne,{shapeType:r,elementProps:l})}return a.isActive?yl.createElement(Jt,{className:o},i):yl.createElement(Jt,{className:n},i)}var hb=(e,t,r)=>{var o=Mt();return(n,a)=>i=>{e?.(n,a,i),o(fD({activeIndex:String(a),activeDataKey:t,activeCoordinate:n.tooltipPosition,activeGraphicalItemId:r}))}},vb=e=>{var t=Mt();return(r,o)=>n=>{e?.(r,o,n),t(gre())}},yb=(e,t,r)=>{var o=Mt();return(n,a)=>i=>{e?.(n,a,i),o(kre({activeIndex:String(a),activeDataKey:t,activeCoordinate:n.tooltipPosition,activeGraphicalItemId:r}))}};var xb=z(ie());function mc(e){var{tooltipEntrySettings:t}=e,r=Mt(),o=tr(),n=(0,xb.useRef)(null);return(0,xb.useLayoutEffect)(()=>{o||(n.current===null?r(cre(t)):n.current!==t&&r(fre({prev:n.current,next:t})),n.current=t)},[t,r,o]),(0,xb.useLayoutEffect)(()=>()=>{n.current&&(r(pre(n.current)),n.current=null)},[r]),null}var gc=z(ie());function DM(e){var{legendPayload:t}=e,r=Mt(),o=tr(),n=(0,gc.useRef)(null);return(0,gc.useLayoutEffect)(()=>{o||(n.current===null?r(i3(t)):n.current!==t&&r(s3({prev:n.current,next:t})),n.current=t)},[r,o,t]),(0,gc.useLayoutEffect)(()=>()=>{n.current&&(r(l3(n.current)),n.current=null)},[r]),null}function Lne(e){var{legendPayload:t}=e,r=Mt(),o=Ve(mt),n=(0,gc.useRef)(null);return(0,gc.useLayoutEffect)(()=>{o!=="centric"&&o!=="radial"||(n.current===null?r(i3(t)):n.current!==t&&r(s3({prev:n.current,next:t})),n.current=t)},[r,o,t]),(0,gc.useLayoutEffect)(()=>()=>{n.current&&(r(l3(n.current)),n.current=null)},[r]),null}var Tne=z(ie()),pU=z(ie());var JD=z(ie());var fU,ZEe=()=>{var[e]=JD.useState(()=>iu("uid-"));return e},Rne=(fU=JD.useId)!==null&&fU!==void 0?fU:ZEe;function Nne(e,t){var r=Rne();return t||(e?"".concat(e,"-").concat(r):r)}var XEe=(0,pU.createContext)(void 0),kc=e=>{var{id:t,type:r,children:o}=e,n=Nne("recharts-".concat(r),t);return Tne.createElement(XEe.Provider,{value:n},o(n))};var Ss=z(ie());var JEe={cartesianItems:[],polarItems:[]},One=er({name:"graphicalItems",initialState:JEe,reducers:{addCartesianGraphicalItem:{reducer(e,t){e.cartesianItems.push(t.payload)},prepare:lr()},replaceCartesianGraphicalItem:{reducer(e,t){var{prev:r,next:o}=t.payload,n=cn(e).cartesianItems.indexOf(r);n>-1&&(e.cartesianItems[n]=o)},prepare:lr()},removeCartesianGraphicalItem:{reducer(e,t){var r=cn(e).cartesianItems.indexOf(t.payload);r>-1&&e.cartesianItems.splice(r,1)},prepare:lr()},addPolarGraphicalItem:{reducer(e,t){e.polarItems.push(t.payload)},prepare:lr()},removePolarGraphicalItem:{reducer(e,t){var r=cn(e).polarItems.indexOf(t.payload);r>-1&&e.polarItems.splice(r,1)},prepare:lr()},replacePolarGraphicalItem:{reducer(e,t){var{prev:r,next:o}=t.payload,n=cn(e).polarItems.indexOf(r);n>-1&&(e.polarItems[n]=o)},prepare:lr()}}}),{addCartesianGraphicalItem:Ene,replaceCartesianGraphicalItem:_ne,removeCartesianGraphicalItem:Fne,addPolarGraphicalItem:Bne,removePolarGraphicalItem:Vne,replacePolarGraphicalItem:Une}=One.actions,Wne=One.reducer;var QEe=e=>{var t=Mt(),r=(0,Ss.useRef)(null);return(0,Ss.useLayoutEffect)(()=>{r.current===null?t(Ene(e)):r.current!==e&&t(_ne({prev:r.current,next:e})),r.current=e},[t,e]),(0,Ss.useLayoutEffect)(()=>()=>{r.current&&(t(Fne(r.current)),r.current=null)},[t]),null},LM=(0,Ss.memo)(QEe),e_e=e=>{var t=Mt(),r=(0,Ss.useRef)(null);return(0,Ss.useLayoutEffect)(()=>{r.current===null?t(Bne(e)):r.current!==e&&t(Une({prev:r.current,next:e})),r.current=e},[t,e]),(0,Ss.useLayoutEffect)(()=>()=>{r.current&&(t(Vne(r.current)),r.current=null)},[t]),null},Gne=(0,Ss.memo)(e_e);var t_e=["key"],r_e=["onMouseEnter","onClick","onMouseLeave"],o_e=["id"],n_e=["id"];function Mc(){return Mc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Mc.apply(null,arguments)}function QD(e,t){if(e==null)return{};var r,o,n=a_e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a_e(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function jne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Ur(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jne(Object(r),!0).forEach(function(o){i_e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jne(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function i_e(e,t,r){return(t=s_e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s_e(e){var t=l_e(e,"string");return typeof t=="symbol"?t:t+""}function l_e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function u_e(e){var t=(0,Ps.useMemo)(()=>mb(e.children,Ka),[e.children]),r=Ve(o=>lne(o,e.id,t));return r==null?null:xt.createElement(Lne,{legendPayload:r})}function d_e(e){if(!(e==null||typeof e=="boolean"||typeof e=="function")){if(xt.isValidElement(e)){var t,r=(t=e.props)===null||t===void 0?void 0:t.fill;return typeof r=="string"?r:void 0}var{fill:o}=e;return typeof o=="string"?o:void 0}}var c_e=xt.memo(e=>{var{dataKey:t,nameKey:r,sectors:o,stroke:n,strokeWidth:a,fill:i,name:s,hide:l,tooltipType:u,id:d,activeShape:c}=e,f=d_e(c),p=o.map(m=>{var h=m.tooltipPayload;return f==null||h==null?h:h.map(k=>Ur(Ur({},k),{},{color:f,fill:f}))}),g={dataDefinedOnItem:p,getPosition:m=>{var h;return(h=o[Number(m)])===null||h===void 0?void 0:h.tooltipPosition},settings:{stroke:n,strokeWidth:a,fill:i,dataKey:t,nameKey:r,name:Ua(s,t),hide:l,type:u,color:i,unit:"",graphicalItemId:d}};return xt.createElement(mc,{tooltipEntrySettings:g})}),f_e=(e,t)=>e>t?"start":e<t?"end":"middle",p_e=(e,t,r)=>typeof t=="function"?Qr(t(e),r,r*.8):Qr(t,r,r*.8),m_e=(e,t,r)=>{var{top:o,left:n,width:a,height:i}=t,s=XI(a,i),l=n+Qr(e.cx,a,a/2),u=o+Qr(e.cy,i,i/2),d=Qr(e.innerRadius,s,0),c=p_e(r,e.outerRadius,s),f=e.maxRadius||Math.sqrt(a*a+i*i)/2;return{cx:l,cy:u,innerRadius:d,outerRadius:c,maxRadius:f}},g_e=(e,t)=>{var r=vr(t-e),o=Math.min(Math.abs(t-e),360);return r*o},k_e=(e,t)=>{if(xt.isValidElement(e))return xt.cloneElement(e,t);if(typeof e=="function")return e(t);var r=et("recharts-pie-label-line",typeof e!="boolean"?e.className:""),{key:o}=t,n=QD(t,t_e);return xt.createElement(ul,Mc({},n,{type:"linear",className:r}))},M_e=(e,t,r)=>{if(xt.isValidElement(e))return xt.cloneElement(e,t);var o=r;if(typeof e=="function"&&(o=e(t),xt.isValidElement(o)))return o;var n=et("recharts-pie-label-text",VD(e));return xt.createElement(Kp,Mc({},t,{alignmentBaseline:"middle",className:n}),o)};function h_e(e){var{sectors:t,props:r,showLabels:o}=e,{label:n,labelLine:a,dataKey:i}=r;if(!o||!n||!t)return null;var s=Br(r),l=Ea(n),u=Ea(a),d=typeof n=="object"&&"offsetRadius"in n&&typeof n.offsetRadius=="number"&&n.offsetRadius||20,c=t.map((f,p)=>{var g=(f.startAngle+f.endAngle)/2,m=Ar(f.cx,f.cy,f.outerRadius+d,g),h=Ur(Ur(Ur(Ur({},s),f),{},{stroke:"none"},l),{},{index:p,textAnchor:f_e(m.x,f.cx)},m),k=Ur(Ur(Ur(Ur({},s),f),{},{fill:"none",stroke:f.fill},u),{},{index:p,points:[Ar(f.cx,f.cy,f.outerRadius,g),m],key:"line"});return xt.createElement(Ir,{zIndex:Nt.label,key:"label-".concat(f.startAngle,"-").concat(f.endAngle,"-").concat(f.midAngle,"-").concat(p)},xt.createElement(Jt,null,a&&k_e(a,k),M_e(n,h,vt(f,i))))});return xt.createElement(Jt,{className:"recharts-pie-labels"},c)}function v_e(e){var{sectors:t,props:r,showLabels:o}=e,{label:n}=r;return typeof n=="object"&&n!=null&&"position"in n?xt.createElement(pc,{label:n}):xt.createElement(h_e,{sectors:t,props:r,showLabels:o})}function y_e(e){var{sectors:t,activeShape:r,inactiveShape:o,allOtherPieProps:n,shape:a,id:i}=e,s=Ve(Ei),l=Ve(MM),u=Ve(bD),{onMouseEnter:d,onClick:c,onMouseLeave:f}=n,p=QD(n,r_e),g=hb(d,n.dataKey,i),m=vb(f),h=yb(c,n.dataKey,i);return t==null||t.length===0?null:xt.createElement(xt.Fragment,null,t.map((k,M)=>{if(k?.startAngle===0&&k?.endAngle===0&&t.length!==1)return null;var v=u==null||u===i,b=String(M)===s&&(l==null||n.dataKey===l)&&v,w=s?o:null,P=r&&b?r:w,L=Ur(Ur({},k),{},{stroke:k.stroke,tabIndex:-1,[NI]:M,[TI]:i});return xt.createElement(Jt,Mc({key:"sector-".concat(k?.startAngle,"-").concat(k?.endAngle,"-").concat(k.midAngle,"-").concat(M),tabIndex:-1,className:"recharts-pie-sector"},kp(p,k,M),{onMouseEnter:g(k,M),onMouseLeave:m(k,M),onClick:h(k,M)}),xt.createElement(IM,Mc({option:a??P,index:M,shapeType:"sector",isActive:b},L)))}))}function dne(e){var t,{pieSettings:r,displayedData:o,cells:n,offset:a}=e,{cornerRadius:i,startAngle:s,endAngle:l,dataKey:u,nameKey:d,tooltipType:c}=r,f=Math.abs(r.minAngle),p=g_e(s,l),g=Math.abs(p),m=o.length<=1?0:(t=r.paddingAngle)!==null&&t!==void 0?t:0,h=o.filter(C=>vt(C,u,0)!==0).length,k=(g>=360?h:h-1)*m,M=o.reduce((C,F)=>{var T=vt(F,u,0);return C+(Be(T)?T:0)},0),v=f>0&&M>0&&o.some(C=>{var F=vt(C,u,0),T=(Be(F)?F:0)/M;return F!==0&&T*g<f}),b=v?f:0,w=g-h*b-k,P;if(M>0){var L;P=o.map((C,F)=>{var T=vt(C,u,0),G=vt(C,d,F),$=m_e(r,a,C),oe=(Be(T)?T:0)/M,se,pe=Ur(Ur({},C),n&&n[F]&&n[F].props),N=pe!=null&&"fill"in pe&&typeof pe.fill=="string"?pe.fill:r.fill;F?se=L.endAngle+vr(p)*m*(T!==0?1:0):se=s;var R=se+vr(p)*((T!==0?b:0)+oe*w),U=(se+R)/2,E=($.innerRadius+$.outerRadius)/2,_=[{name:G,value:T,payload:pe,dataKey:u,type:c,color:N,fill:N,graphicalItemId:r.id}],B=Ar($.cx,$.cy,E,U);return L=Ur(Ur(Ur(Ur({},r.presentationProps),{},{percent:oe,cornerRadius:typeof i=="string"?parseFloat(i):i,name:G,tooltipPayload:_,midAngle:U,middleRadius:E,tooltipPosition:B},pe),$),{},{value:T,dataKey:u,startAngle:se,endAngle:R,payload:pe,paddingAngle:T!==0?vr(p)*m:0}),L})}return P}function x_e(e){var{showLabels:t,sectors:r,children:o}=e,n=(0,Ps.useMemo)(()=>!t||!r?[]:r.map(a=>({value:a.value,payload:a.payload,clockWise:!1,parentViewBox:void 0,viewBox:{cx:a.cx,cy:a.cy,innerRadius:a.innerRadius,outerRadius:a.outerRadius,startAngle:a.startAngle,endAngle:a.endAngle,clockWise:!1},fill:a.fill})),[r,t]);return xt.createElement(Qoe,{value:t?n:void 0},o)}function b_e(e){var{props:t,previousSectorsRef:r,id:o}=e,{sectors:n,isAnimationActive:a,animationBegin:i,animationDuration:s,animationEasing:l,activeShape:u,inactiveShape:d,onAnimationStart:c,onAnimationEnd:f}=t,p=Ri(t,"recharts-pie-"),g=r.current,[m,h]=(0,Ps.useState)(!1),k=(0,Ps.useCallback)(()=>{typeof f=="function"&&f(),h(!1)},[f]),M=(0,Ps.useCallback)(()=>{typeof c=="function"&&c(),h(!0)},[c]);return xt.createElement(x_e,{showLabels:!m,sectors:n},xt.createElement(Li,{animationId:p,begin:i,duration:s,isActive:a,easing:l,onAnimationStart:M,onAnimationEnd:k,key:p},v=>{var b,w=[],P=n&&n[0],L=(b=P?.startAngle)!==null&&b!==void 0?b:0;return n?.forEach((C,F)=>{var T=g&&g[F],G=F>0?$o(C,"paddingAngle",0):0;if(T){var $=jt(T.endAngle-T.startAngle,C.endAngle-C.startAngle,v),oe=Ur(Ur({},C),{},{startAngle:L+G,endAngle:L+$+G});w.push(oe),L=oe.endAngle}else{var{endAngle:se,startAngle:pe}=C,N=jt(0,se-pe,v),R=Ur(Ur({},C),{},{startAngle:L+G,endAngle:L+N+G});w.push(R),L=R.endAngle}}),r.current=w,xt.createElement(Jt,null,xt.createElement(y_e,{sectors:w,activeShape:u,inactiveShape:d,allOtherPieProps:t,shape:t.shape,id:o}))}),xt.createElement(v_e,{showLabels:!m,sectors:n,props:t}),t.children)}var w_e={animationBegin:400,animationDuration:1500,animationEasing:"ease",cx:"50%",cy:"50%",dataKey:"value",endAngle:360,fill:"#808080",hide:!1,innerRadius:0,isAnimationActive:"auto",label:!1,labelLine:!0,legendType:"rect",minAngle:0,nameKey:"name",outerRadius:"80%",paddingAngle:0,rootTabIndex:0,startAngle:0,stroke:"#fff",zIndex:Nt.area};function C_e(e){var{id:t}=e,r=QD(e,o_e),{hide:o,className:n,rootTabIndex:a}=e,i=(0,Ps.useMemo)(()=>mb(e.children,Ka),[e.children]),s=Ve(d=>une(d,t,i)),l=(0,Ps.useRef)(null),u=et("recharts-pie",n);return o||s==null?(l.current=null,xt.createElement(Jt,{tabIndex:a,className:u})):xt.createElement(Ir,{zIndex:e.zIndex},xt.createElement(c_e,{dataKey:e.dataKey,nameKey:e.nameKey,sectors:s,stroke:e.stroke,strokeWidth:e.strokeWidth,fill:e.fill,name:e.name,hide:e.hide,tooltipType:e.tooltipType,id:t,activeShape:e.activeShape}),xt.createElement(Jt,{tabIndex:a,className:u},xt.createElement(b_e,{props:Ur(Ur({},r),{},{sectors:s}),previousSectorsRef:l,id:t})))}function S_e(e){var t=_t(e,w_e),{id:r}=t,o=QD(t,n_e),n=Br(o);return xt.createElement(kc,{id:r,type:"pie"},a=>xt.createElement(xt.Fragment,null,xt.createElement(Gne,{type:"pie",id:a,data:o.data,dataKey:o.dataKey,hide:o.hide,angleAxisId:0,radiusAxisId:0,name:o.name,nameKey:o.nameKey,tooltipType:o.tooltipType,legendType:o.legendType,fill:o.fill,cx:o.cx,cy:o.cy,startAngle:o.startAngle,endAngle:o.endAngle,paddingAngle:o.paddingAngle,minAngle:o.minAngle,innerRadius:o.innerRadius,outerRadius:o.outerRadius,cornerRadius:o.cornerRadius,presentationProps:n,maxRadius:t.maxRadius}),xt.createElement(u_e,Mc({},o,{id:a})),xt.createElement(C_e,Mc({},o,{id:a}))))}var RM=S_e;RM.displayName="Pie";var bb=z(ie()),tL=z(ie());var P_e=["points"];function zne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function mU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zne(Object(r),!0).forEach(function(o){A_e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zne(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function A_e(e,t,r){return(t=I_e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function I_e(e){var t=D_e(e,"string");return typeof t=="symbol"?t:t+""}function D_e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function eL(){return eL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},eL.apply(null,arguments)}function L_e(e,t){if(e==null)return{};var r,o,n=R_e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function R_e(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function N_e(e){var{option:t,dotProps:r,className:o}=e;if((0,tL.isValidElement)(t))return(0,tL.cloneElement)(t,r);if(typeof t=="function")return t(r);var n=et(o,typeof t!="boolean"?t.className:""),a=r??{},{points:i}=a,s=L_e(a,P_e);return bb.createElement(_D,eL({},s,{className:n}))}function T_e(e,t){return e==null?!1:t?!0:e.length===1}function rL(e){var{points:t,dot:r,className:o,dotClassName:n,dataKey:a,baseProps:i,needClip:s,clipPathId:l,zIndex:u=Nt.scatter}=e;if(!T_e(t,r))return null;var d=AM(r),c=iZ(r),f=t.map((g,m)=>{var h,k,M=mU(mU(mU({r:3},i),c),{},{index:m,cx:(h=g.x)!==null&&h!==void 0?h:void 0,cy:(k=g.y)!==null&&k!==void 0?k:void 0,dataKey:a,value:g.value,payload:g.payload,points:t});return bb.createElement(N_e,{key:"dot-".concat(m),option:r,dotProps:M,className:n})}),p={};return s&&l!=null&&(p.clipPath="url(#clipPath-".concat(d?"":"dots-").concat(l,")")),bb.createElement(Ir,{zIndex:u},bb.createElement(Jt,eL({className:o},p),f))}var wb=z(ie()),oL=z(ie());function qne(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Hne(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?qne(Object(r),!0).forEach(function(o){O_e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):qne(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function O_e(e,t,r){return(t=E_e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function E_e(e){var t=__e(e,"string");return typeof t=="symbol"?t:t+""}function __e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var gU=0,F_e={xAxis:{},yAxis:{},zAxis:{}},Kne=er({name:"cartesianAxis",initialState:F_e,reducers:{addXAxis:{reducer(e,t){e.xAxis[t.payload.id]=t.payload},prepare:lr()},replaceXAxis:{reducer(e,t){var{prev:r,next:o}=t.payload;e.xAxis[r.id]!==void 0&&(r.id!==o.id&&delete e.xAxis[r.id],e.xAxis[o.id]=o)},prepare:lr()},removeXAxis:{reducer(e,t){delete e.xAxis[t.payload.id]},prepare:lr()},addYAxis:{reducer(e,t){e.yAxis[t.payload.id]=t.payload},prepare:lr()},replaceYAxis:{reducer(e,t){var{prev:r,next:o}=t.payload;e.yAxis[r.id]!==void 0&&(r.id!==o.id&&delete e.yAxis[r.id],e.yAxis[o.id]=o)},prepare:lr()},removeYAxis:{reducer(e,t){delete e.yAxis[t.payload.id]},prepare:lr()},addZAxis:{reducer(e,t){e.zAxis[t.payload.id]=t.payload},prepare:lr()},replaceZAxis:{reducer(e,t){var{prev:r,next:o}=t.payload;e.zAxis[r.id]!==void 0&&(r.id!==o.id&&delete e.zAxis[r.id],e.zAxis[o.id]=o)},prepare:lr()},removeZAxis:{reducer(e,t){delete e.zAxis[t.payload.id]},prepare:lr()},updateYAxisWidth(e,t){var{id:r,width:o}=t.payload,n=e.yAxis[r];if(n){var a,i=n.widthHistory||[];if(i.length===3&&i[0]===i[2]&&o===i[1]&&o!==n.width&&Math.abs(o-((a=i[0])!==null&&a!==void 0?a:0))<=1)return;var s=[...i,o].slice(-3);e.yAxis[r]=Hne(Hne({},n),{},{width:o,widthHistory:s})}}}}),{addXAxis:$ne,replaceXAxis:Yne,removeXAxis:Zne,addYAxis:Xne,replaceYAxis:Jne,removeYAxis:Qne,addZAxis:EDt,replaceZAxis:_Dt,removeZAxis:FDt,updateYAxisWidth:eae}=Kne.actions,tae=Kne.reducer;var rae=te([fr],e=>({top:e.top,bottom:e.bottom,left:e.left,right:e.right}));var oae=te([rae,Pn,An],(e,t,r)=>{if(!(!e||t==null||r==null))return{x:e.left,y:e.top,width:Math.max(0,t-e.left-e.right),height:Math.max(0,r-e.top-e.bottom)}});var hc=()=>Ve(oae),nae=()=>Ve(Dre);function aae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function kU(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?aae(Object(r),!0).forEach(function(o){B_e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):aae(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function B_e(e,t,r){return(t=V_e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function V_e(e){var t=U_e(e,"string");return typeof t=="symbol"?t:t+""}function U_e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var W_e=e=>{var{point:t,childIndex:r,mainColor:o,activeDot:n,dataKey:a,clipPath:i}=e;if(n===!1||t.x==null||t.y==null)return null;var s={index:r,dataKey:a,cx:t.x,cy:t.y,r:4,fill:o??"none",strokeWidth:2,stroke:"#fff",payload:t.payload,value:t.value},l=kU(kU(kU({},s),Ea(n)),Lk(n)),u;return(0,oL.isValidElement)(n)?u=(0,oL.cloneElement)(n,l):typeof n=="function"?u=n(l):u=wb.createElement(_D,l),wb.createElement(Jt,{className:"recharts-active-dot",clipPath:i},u)};function Cb(e){var{points:t,mainColor:r,activeDot:o,itemDataKey:n,clipPath:a,zIndex:i=Nt.activeDot}=e,s=Ve(Ei),l=nae();if(t==null||l==null)return null;var u=t.find(d=>l.includes(d.payload));return Rt(u)?null:wb.createElement(Ir,{zIndex:i},wb.createElement(W_e,{point:u,childIndex:Number(s),mainColor:r,dataKey:n,activeDot:o,clipPath:a}))}var iae=(e,t,r)=>{var o=r??e;if(!Rt(o))return Qr(o,t,0)},sae=(e,t,r)=>{var o={},n=e.filter(Lp),a=e.filter(u=>u.stackId==null),i=n.reduce((u,d)=>{var c=u[d.stackId];return c==null&&(c=[]),c.push(d),u[d.stackId]=c,u},o),s=Object.entries(i).map(u=>{var d,[c,f]=u,p=f.map(m=>m.dataKey),g=iae(t,r,(d=f[0])===null||d===void 0?void 0:d.barSize);return{stackId:c,dataKeys:p,barSize:g}}),l=a.map(u=>{var d=[u.dataKey].filter(f=>f!=null),c=iae(t,r,u.barSize);return{stackId:void 0,dataKeys:d,barSize:c}});return[...s,...l]};function lae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function nL(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?lae(Object(r),!0).forEach(function(o){G_e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):lae(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function G_e(e,t,r){return(t=j_e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function j_e(e){var t=z_e(e,"string");return typeof t=="symbol"?t:t+""}function z_e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function q_e(e,t,r,o,n){var a,i=o.length;if(!(i<1)){var s=Qr(e,r,0,!0),l,u=[];if(lt((a=o[0])===null||a===void 0?void 0:a.barSize)){var d=!1,c=r/i,f=o.reduce((M,v)=>M+(v.barSize||0),0);f+=(i-1)*s,f>=r&&(f-=(i-1)*s,s=0),f>=r&&c>0&&(d=!0,c*=.9,f=i*c);var p=(r-f)/2>>0,g={offset:p-s,size:0};l=o.reduce((M,v)=>{var b,w={stackId:v.stackId,dataKeys:v.dataKeys,position:{offset:g.offset+g.size+s,size:d?c:(b=v.barSize)!==null&&b!==void 0?b:0}},P=[...M,w];return g=w.position,P},u)}else{var m=Qr(t,r,0,!0);r-2*m-(i-1)*s<=0&&(s=0);var h=(r-2*m-(i-1)*s)/i;h>1&&(h>>=0);var k=lt(n)?Math.min(h,n):h;l=o.reduce((M,v,b)=>[...M,{stackId:v.stackId,dataKeys:v.dataKeys,position:{offset:m+(h+s)*b+(h-k)/2,size:k}}],u)}return l}}var uae=(e,t,r,o,n,a,i)=>{var s=Rt(i)?t:i,l=q_e(r,o,n!==a?n:a,e,s);return n!==a&&l!=null&&(l=l.map(u=>nL(nL({},u),{},{position:nL(nL({},u.position),{},{offset:u.position.offset-n/2})}))),l};var dae=(e,t)=>{var r=Jd(t);if(!(!e||r==null||t==null)){var{stackId:o}=t;if(o!=null){var n=e[o];if(n){var{stackedData:a}=n;if(a)return a.find(i=>i.key===r)}}}};var cae=(e,t)=>{if(!(e==null||t==null)){var r=e.find(o=>o.stackId===t.stackId&&t.dataKey!=null&&o.dataKeys.includes(t.dataKey));if(r!=null)return r.position}};function fae(e,t){return e&&typeof e=="object"&&"zIndex"in e&&typeof e.zIndex=="number"&&lt(e.zIndex)?e.zIndex:t}var pae=z(ie());var aL=e=>{var{chartData:t}=e,r=Mt(),o=tr();return(0,pae.useEffect)(()=>o?()=>{}:(r(tU(t)),()=>{r(tU(void 0))}),[t,r,o]),null};var mae={x:0,y:0,width:0,height:0,padding:{top:0,right:0,bottom:0,left:0}},gae=er({name:"brush",initialState:mae,reducers:{setBrushSettings(e,t){return t.payload==null?mae:t.payload}}}),{setBrushSettings:wLt}=gae.actions,kae=gae.reducer;function H_e(e){return(e%180+180)%180}var Mae=function(t){var{width:r,height:o}=t,n=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,a=H_e(n),i=a*Math.PI/180,s=Math.atan(o/r),l=i>s&&i<Math.PI-s?o/Math.sin(i):r/Math.cos(i);return Math.abs(l)};var K_e={dots:[],areas:[],lines:[]},hae=er({name:"referenceElements",initialState:K_e,reducers:{addDot:(e,t)=>{e.dots.push(t.payload)},removeDot:(e,t)=>{var r=cn(e).dots.findIndex(o=>o===t.payload);r!==-1&&e.dots.splice(r,1)},addArea:(e,t)=>{e.areas.push(t.payload)},removeArea:(e,t)=>{var r=cn(e).areas.findIndex(o=>o===t.payload);r!==-1&&e.areas.splice(r,1)},addLine:(e,t)=>{e.lines.push(t.payload)},removeLine:(e,t)=>{var r=cn(e).lines.findIndex(o=>o===t.payload);r!==-1&&e.lines.splice(r,1)}}}),{addDot:ALt,removeDot:ILt,addArea:DLt,removeArea:LLt,addLine:RLt,removeLine:NLt}=hae.actions,vae=hae.reducer;var Sb=z(ie()),Pb=z(ie());var $_e=(0,Pb.createContext)(void 0),yae=e=>{var{children:t}=e,[r]=(0,Pb.useState)("".concat(iu("recharts"),"-clip")),o=hc();if(o==null)return null;var{x:n,y:a,width:i,height:s}=o;return Sb.createElement($_e.Provider,{value:r},Sb.createElement("defs",null,Sb.createElement("clipPath",{id:r},Sb.createElement("rect",{x:n,y:a,height:s,width:i}))),t)};var Or=z(ie()),ca=z(ie());function iL(e,t){if(t<1)return[];if(t===1)return e;for(var r=[],o=0;o<e.length;o+=t){var n=e[o];n!==void 0&&r.push(n)}return r}function xae(e,t,r){var o={width:e.width+t.width,height:e.height+t.height};return Mae(o,r)}function bae(e,t,r){var o=r==="width",{x:n,y:a,width:i,height:s}=e;return t===1?{start:o?n:a,end:o?n+i:a+s}:{start:o?n+i:a+s,end:o?n:a}}function $p(e,t,r,o,n){if(e*t<e*o||e*t>e*n)return!1;var a=r();return e*(t-e*a/2-o)>=0&&e*(t+e*a/2-n)<=0}function wae(e,t){return iL(e,t+1)}function Cae(e,t,r,o,n){for(var a=(o||[]).slice(),{start:i,end:s}=t,l=0,u=1,d=i,c=function(){var g=o?.[l];if(g===void 0)return{v:iL(o,u)};var m=l,h,k=()=>(h===void 0&&(h=r(g,m)),h),M=g.coordinate,v=l===0||$p(e,M,k,d,s);v||(l=0,d=i,u+=1),v&&(d=M+e*(k()/2+n),l+=u)},f;u<=a.length;)if(f=c(),f)return f.v;return[]}function Sae(e,t,r,o,n){var a=(o||[]).slice(),i=a.length;if(i===0)return[];for(var{start:s,end:l}=t,u=1;u<=i;u++){for(var d=(i-1)%u,c=s,f=!0,p=function(){var b=o[m];if(b==null)return 0;var w=m,P,L=()=>(P===void 0&&(P=r(b,w)),P),C=b.coordinate,F=m===d||$p(e,C,L,c,l);if(!F)return f=!1,1;F&&(c=C+e*(L()/2+n))},g,m=d;m<i&&(g=p(),!(g!==0&&g===1));m+=u);if(f){for(var h=[],k=d;k<i;k+=u){var M=o[k];M!=null&&h.push(M)}return h}}return[]}function Pae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Dn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Pae(Object(r),!0).forEach(function(o){Y_e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Pae(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function Y_e(e,t,r){return(t=Z_e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Z_e(e){var t=X_e(e,"string");return typeof t=="symbol"?t:t+""}function X_e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function J_e(e,t,r,o,n){for(var a=(o||[]).slice(),i=a.length,{start:s}=t,{end:l}=t,u=function(f){var p=a[f];if(p==null)return 1;var g=p,m,h=()=>(m===void 0&&(m=r(p,f)),m);if(f===i-1){var k=e*(g.coordinate+e*h()/2-l);a[f]=g=Dn(Dn({},g),{},{tickCoord:k>0?g.coordinate-k*e:g.coordinate})}else a[f]=g=Dn(Dn({},g),{},{tickCoord:g.coordinate});if(g.tickCoord!=null){var M=$p(e,g.tickCoord,h,s,l);M&&(l=g.tickCoord-e*(h()/2+n),a[f]=Dn(Dn({},g),{},{isShow:!0}))}},d=i-1;d>=0;d--)u(d);return a}function Q_e(e,t,r,o,n,a){var i=(o||[]).slice(),s=i.length,{start:l,end:u}=t;if(a){var d=o[s-1];if(d!=null){var c=r(d,s-1),f=e*(d.coordinate+e*c/2-u);if(i[s-1]=d=Dn(Dn({},d),{},{tickCoord:f>0?d.coordinate-f*e:d.coordinate}),d.tickCoord!=null){var p=$p(e,d.tickCoord,()=>c,l,u);p&&(u=d.tickCoord-e*(c/2+n),i[s-1]=Dn(Dn({},d),{},{isShow:!0}))}}}for(var g=a?s-1:s,m=function(M){var v=i[M];if(v==null)return 1;var b=v,w,P=()=>(w===void 0&&(w=r(v,M)),w);if(M===0){var L=e*(b.coordinate-e*P()/2-l);i[M]=b=Dn(Dn({},b),{},{tickCoord:L<0?b.coordinate-L*e:b.coordinate})}else i[M]=b=Dn(Dn({},b),{},{tickCoord:b.coordinate});if(b.tickCoord!=null){var C=$p(e,b.tickCoord,P,l,u);C&&(l=b.tickCoord+e*(P()/2+n),i[M]=Dn(Dn({},b),{},{isShow:!0}))}},h=0;h<g;h++)m(h);return i}function Ab(e,t,r){var{tick:o,ticks:n,viewBox:a,minTickGap:i,orientation:s,interval:l,tickFormatter:u,unit:d,angle:c}=e;if(!n||!n.length||!o)return[];if(Be(l)||Di.isSsr){var f;return(f=wae(n,Be(l)?l:0))!==null&&f!==void 0?f:[]}var p=[],g=s==="top"||s==="bottom"?"width":"height",m=d&&g==="width"?Hp(d,{fontSize:t,letterSpacing:r}):{width:0,height:0},h=(w,P)=>{var L=typeof u=="function"?u(w.value,P):w.value;return g==="width"?xae(Hp(L,{fontSize:t,letterSpacing:r}),m,c):Hp(L,{fontSize:t,letterSpacing:r})[g]},k=n[0],M=n[1],v=n.length>=2&&k!=null&&M!=null?vr(M.coordinate-k.coordinate):1,b=bae(a,v,g);return l==="equidistantPreserveStart"?Cae(v,b,h,n,i):l==="equidistantPreserveEnd"?Sae(v,b,h,n,i):(l==="preserveStart"||l==="preserveStartEnd"?p=Q_e(v,b,h,n,i,l==="preserveStartEnd"):p=J_e(v,b,h,n,i),p.filter(w=>w.isShow))}var Aae=e=>{var{ticks:t,label:r,labelGapWithTick:o=5,tickSize:n=0,tickMargin:a=0}=e,i=0;if(t){Array.from(t).forEach(d=>{if(d){var c=d.getBoundingClientRect();c.width>i&&(i=c.width)}});var s=r?r.getBoundingClientRect().width:0,l=n+a,u=i+l+s+(r?o:0);return Math.round(u)}return 0};var eFe={xAxis:{},yAxis:{}},Iae=er({name:"renderedTicks",initialState:eFe,reducers:{setRenderedTicks:(e,t)=>{var{axisType:r,axisId:o,ticks:n}=t.payload;e[r][o]=n},removeRenderedTicks:(e,t)=>{var{axisType:r,axisId:o}=t.payload;delete e[r][o]}}}),{setRenderedTicks:Dae,removeRenderedTicks:Lae}=Iae.actions,Rae=Iae.reducer;var tFe=["axisLine","width","height","className","hide","ticks","axisType","axisId"];function rFe(e,t){if(e==null)return{};var r,o,n=oFe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function oFe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function Yp(){return Yp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Yp.apply(null,arguments)}function Nae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function no(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Nae(Object(r),!0).forEach(function(o){nFe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Nae(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function nFe(e,t,r){return(t=aFe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function aFe(e){var t=iFe(e,"string");return typeof t=="symbol"?t:t+""}function iFe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var Bi={x:0,y:0,width:0,height:0,viewBox:{x:0,y:0,width:0,height:0},orientation:"bottom",ticks:[],stroke:"#666",tickLine:!0,axisLine:!0,tick:!0,mirror:!1,minTickGap:5,tickSize:6,tickMargin:2,interval:"preserveEnd",zIndex:Nt.axis};function sFe(e){var{x:t,y:r,width:o,height:n,orientation:a,mirror:i,axisLine:s,otherSvgProps:l}=e;if(!s)return null;var u=no(no(no({},l),Br(s)),{},{fill:"none"});if(a==="top"||a==="bottom"){var d=+(a==="top"&&!i||a==="bottom"&&i);u=no(no({},u),{},{x1:t,y1:r+d*n,x2:t+o,y2:r+d*n})}else{var c=+(a==="left"&&!i||a==="right"&&i);u=no(no({},u),{},{x1:t+c*o,y1:r,x2:t+c*o,y2:r+n})}return Or.createElement("line",Yp({},u,{className:et("recharts-cartesian-axis-line",$o(s,"className"))}))}function lFe(e,t,r,o,n,a,i,s,l){var u,d,c,f,p,g,m=s?-1:1,h=e.tickSize||i,k=Be(e.tickCoord)?e.tickCoord:e.coordinate;switch(a){case"top":u=d=e.coordinate,f=r+ +!s*n,c=f-m*h,g=c-m*l,p=k;break;case"left":c=f=e.coordinate,d=t+ +!s*o,u=d-m*h,p=u-m*l,g=k;break;case"right":c=f=e.coordinate,d=t+ +s*o,u=d+m*h,p=u+m*l,g=k;break;default:u=d=e.coordinate,f=r+ +s*n,c=f+m*h,g=c+m*l,p=k;break}return{line:{x1:u,y1:c,x2:d,y2:f},tick:{x:p,y:g}}}function uFe(e,t){switch(e){case"left":return t?"start":"end";case"right":return t?"end":"start";default:return"middle"}}function dFe(e,t){switch(e){case"left":case"right":return"middle";case"top":return t?"start":"end";default:return t?"end":"start"}}function cFe(e){var{option:t,tickProps:r,value:o}=e,n,a=et(r.className,"recharts-cartesian-axis-tick-value");if(Or.isValidElement(t))n=Or.cloneElement(t,no(no({},r),{},{className:a}));else if(typeof t=="function")n=t(no(no({},r),{},{className:a}));else{var i="recharts-cartesian-axis-tick-value";typeof t!="boolean"&&(i=et(i,VD(t))),n=Or.createElement(Kp,Yp({},r,{className:i}),o)}return n}function fFe(e){var{ticks:t,axisType:r,axisId:o}=e,n=Mt();return(0,ca.useEffect)(()=>{if(o==null||r==null)return Fa;var a=t.map(i=>({value:i.value,coordinate:i.coordinate,offset:i.offset,index:i.index}));return n(Dae({ticks:a,axisId:o,axisType:r})),()=>{n(Lae({axisId:o,axisType:r}))}},[n,t,o,r]),null}var pFe=(0,ca.forwardRef)((e,t)=>{var{ticks:r=[],tick:o,tickLine:n,stroke:a,tickFormatter:i,unit:s,padding:l,tickTextProps:u,orientation:d,mirror:c,x:f,y:p,width:g,height:m,tickSize:h,tickMargin:k,fontSize:M,letterSpacing:v,getTicksConfig:b,events:w,axisType:P,axisId:L}=e,C=Ab(no(no({},b),{},{ticks:r}),M,v),F=Br(b),T=Ea(o),G=TD(F.textAnchor)?F.textAnchor:uFe(d,c),$=dFe(d,c),oe={};typeof n=="object"&&(oe=n);var se=no(no({},F),{},{fill:"none"},oe),pe=C.map(U=>no({entry:U},lFe(U,f,p,g,m,d,h,c,k))),N=pe.map(U=>{var{entry:E,line:_}=U;return Or.createElement(Jt,{className:"recharts-cartesian-axis-tick",key:"tick-".concat(E.value,"-").concat(E.coordinate,"-").concat(E.tickCoord)},n&&Or.createElement("line",Yp({},se,_,{className:et("recharts-cartesian-axis-tick-line",$o(n,"className"))})))}),R=pe.map((U,E)=>{var _,B,{entry:j,tick:re}=U,W=no(no(no(no({verticalAnchor:$},F),{},{textAnchor:G,stroke:"none",fill:a},re),{},{index:E,payload:j,visibleTicksCount:C.length,tickFormatter:i,padding:l},u),{},{angle:(_=(B=u?.angle)!==null&&B!==void 0?B:F.angle)!==null&&_!==void 0?_:0}),K=no(no({},W),T);return Or.createElement(Jt,Yp({className:"recharts-cartesian-axis-tick-label",key:"tick-label-".concat(j.value,"-").concat(j.coordinate,"-").concat(j.tickCoord)},kp(w,j,E)),o&&Or.createElement(cFe,{option:o,tickProps:K,value:"".concat(typeof i=="function"?i(j.value,E):j.value).concat(s||"")}))});return Or.createElement("g",{className:"recharts-cartesian-axis-ticks recharts-".concat(P,"-ticks")},Or.createElement(fFe,{ticks:C,axisId:L,axisType:P}),R.length>0&&Or.createElement(Ir,{zIndex:Nt.label},Or.createElement("g",{className:"recharts-cartesian-axis-tick-labels recharts-".concat(P,"-tick-labels"),ref:t},R)),N.length>0&&Or.createElement("g",{className:"recharts-cartesian-axis-tick-lines recharts-".concat(P,"-tick-lines")},N))}),mFe=(0,ca.forwardRef)((e,t)=>{var{axisLine:r,width:o,height:n,className:a,hide:i,ticks:s,axisType:l,axisId:u}=e,d=rFe(e,tFe),[c,f]=(0,ca.useState)(""),[p,g]=(0,ca.useState)(""),m=(0,ca.useRef)(null);(0,ca.useImperativeHandle)(t,()=>({getCalculatedWidth:()=>{var k;return Aae({ticks:m.current,label:(k=e.labelRef)===null||k===void 0?void 0:k.current,labelGapWithTick:5,tickSize:e.tickSize,tickMargin:e.tickMargin})}}));var h=(0,ca.useCallback)(k=>{if(k){var M=k.getElementsByClassName("recharts-cartesian-axis-tick-value");m.current=M;var v=M[0];if(v){var b=window.getComputedStyle(v),w=b.fontSize,P=b.letterSpacing;(w!==c||P!==p)&&(f(w),g(P))}}},[c,p]);return i||o!=null&&o<=0||n!=null&&n<=0?null:Or.createElement(Ir,{zIndex:e.zIndex},Or.createElement(Jt,{className:et("recharts-cartesian-axis",a)},Or.createElement(sFe,{x:e.x,y:e.y,width:o,height:n,orientation:e.orientation,mirror:e.mirror,axisLine:r,otherSvgProps:Br(e)}),Or.createElement(pFe,{ref:h,axisType:l,events:d,fontSize:c,getTicksConfig:e,height:e.height,letterSpacing:p,mirror:e.mirror,orientation:e.orientation,padding:e.padding,stroke:e.stroke,tick:e.tick,tickFormatter:e.tickFormatter,tickLine:e.tickLine,tickMargin:e.tickMargin,tickSize:e.tickSize,tickTextProps:e.tickTextProps,ticks:s,unit:e.unit,width:e.width,x:e.x,y:e.y,axisId:u}),Or.createElement(Koe,{x:e.x,y:e.y,width:e.width,height:e.height,lowerWidth:e.width,upperWidth:e.width},Or.createElement(Yoe,{label:e.label,labelRef:e.labelRef}),e.children)))}),Ib=Or.forwardRef((e,t)=>{var r=_t(e,Bi);return Or.createElement(mFe,Yp({},r,{ref:t}))});Ib.displayName="CartesianAxis";var ao=z(ie());var gFe=["x1","y1","x2","y2","key"],kFe=["offset"],MFe=["xAxisId","yAxisId"],hFe=["xAxisId","yAxisId"];function Tae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Ln(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Tae(Object(r),!0).forEach(function(o){vFe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Tae(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function vFe(e,t,r){return(t=yFe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function yFe(e){var t=xFe(e,"string");return typeof t=="symbol"?t:t+""}function xFe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Zp(){return Zp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Zp.apply(null,arguments)}function sL(e,t){if(e==null)return{};var r,o,n=bFe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function bFe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var wFe=e=>{var{fill:t}=e;if(!t||t==="none")return null;var{fillOpacity:r,x:o,y:n,width:a,height:i,ry:s}=e;return ao.createElement("rect",{x:o,y:n,ry:s,width:a,height:i,stroke:"none",fill:t,fillOpacity:r,className:"recharts-cartesian-grid-bg"})};function Oae(e){var{option:t,lineItemProps:r}=e,o;if(ao.isValidElement(t))o=ao.cloneElement(t,r);else if(typeof t=="function")o=t(r);else{var n,{x1:a,y1:i,x2:s,y2:l,key:u}=r,d=sL(r,gFe),c=(n=Br(d))!==null&&n!==void 0?n:{},{offset:f}=c,p=sL(c,kFe);o=ao.createElement("line",Zp({},p,{x1:a,y1:i,x2:s,y2:l,fill:"none",key:u}))}return o}function CFe(e){var{x:t,width:r,horizontal:o=!0,horizontalPoints:n}=e;if(!o||!n||!n.length)return null;var{xAxisId:a,yAxisId:i}=e,s=sL(e,MFe),l=n.map((u,d)=>{var c=Ln(Ln({},s),{},{x1:t,y1:u,x2:t+r,y2:u,key:"line-".concat(d),index:d});return ao.createElement(Oae,{key:"line-".concat(d),option:o,lineItemProps:c})});return ao.createElement("g",{className:"recharts-cartesian-grid-horizontal"},l)}function SFe(e){var{y:t,height:r,vertical:o=!0,verticalPoints:n}=e;if(!o||!n||!n.length)return null;var{xAxisId:a,yAxisId:i}=e,s=sL(e,hFe),l=n.map((u,d)=>{var c=Ln(Ln({},s),{},{x1:u,y1:t,x2:u,y2:t+r,key:"line-".concat(d),index:d});return ao.createElement(Oae,{option:o,lineItemProps:c,key:"line-".concat(d)})});return ao.createElement("g",{className:"recharts-cartesian-grid-vertical"},l)}function PFe(e){var{horizontalFill:t,fillOpacity:r,x:o,y:n,width:a,height:i,horizontalPoints:s,horizontal:l=!0}=e;if(!l||!t||!t.length||s==null)return null;var u=s.map(c=>Math.round(c+n-n)).sort((c,f)=>c-f);n!==u[0]&&u.unshift(0);var d=u.map((c,f)=>{var p=u[f+1],g=p==null,m=g?n+i-c:p-c;if(m<=0)return null;var h=f%t.length;return ao.createElement("rect",{key:"react-".concat(f),y:c,x:o,height:m,width:a,stroke:"none",fill:t[h],fillOpacity:r,className:"recharts-cartesian-grid-bg"})});return ao.createElement("g",{className:"recharts-cartesian-gridstripes-horizontal"},d)}function AFe(e){var{vertical:t=!0,verticalFill:r,fillOpacity:o,x:n,y:a,width:i,height:s,verticalPoints:l}=e;if(!t||!r||!r.length)return null;var u=l.map(c=>Math.round(c+n-n)).sort((c,f)=>c-f);n!==u[0]&&u.unshift(0);var d=u.map((c,f)=>{var p=u[f+1],g=p==null,m=g?n+i-c:p-c;if(m<=0)return null;var h=f%r.length;return ao.createElement("rect",{key:"react-".concat(f),x:c,y:a,width:m,height:s,stroke:"none",fill:r[h],fillOpacity:o,className:"recharts-cartesian-grid-bg"})});return ao.createElement("g",{className:"recharts-cartesian-gridstripes-vertical"},d)}var IFe=(e,t)=>{var{xAxis:r,width:o,height:n,offset:a}=e;return JB(Ab(Ln(Ln(Ln({},Bi),r),{},{ticks:QB(r,!0),viewBox:{x:0,y:0,width:o,height:n}})),a.left,a.left+a.width,t)},DFe=(e,t)=>{var{yAxis:r,width:o,height:n,offset:a}=e;return JB(Ab(Ln(Ln(Ln({},Bi),r),{},{ticks:QB(r,!0),viewBox:{x:0,y:0,width:o,height:n}})),a.top,a.top+a.height,t)},LFe={horizontal:!0,vertical:!0,horizontalPoints:[],verticalPoints:[],stroke:"#ccc",fill:"none",verticalFill:[],horizontalFill:[],xAxisId:0,yAxisId:0,syncWithTicks:!1,zIndex:Nt.grid};function Xp(e){var t=BI(),r=VI(),o=FI(),n=Ln(Ln({},_t(e,LFe)),{},{x:Be(e.x)?e.x:o.left,y:Be(e.y)?e.y:o.top,width:Be(e.width)?e.width:o.width,height:Be(e.height)?e.height:o.height}),{xAxisId:a,yAxisId:i,x:s,y:l,width:u,height:d,syncWithTicks:c,horizontalValues:f,verticalValues:p}=n,g=tr(),m=Ve(F=>TV(F,"xAxis",a,g)),h=Ve(F=>TV(F,"yAxis",i,g));if(!cu(u)||!cu(d)||!Be(s)||!Be(l))return null;var k=n.verticalCoordinatesGenerator||IFe,M=n.horizontalCoordinatesGenerator||DFe,{horizontalPoints:v,verticalPoints:b}=n;if((!v||!v.length)&&typeof M=="function"){var w=f&&f.length,P=M({yAxis:h?Ln(Ln({},h),{},{ticks:w?f:h.ticks}):void 0,width:t??u,height:r??d,offset:o},w?!0:c);n3(Array.isArray(P),"horizontalCoordinatesGenerator should return Array but instead it returned [".concat(typeof P,"]")),Array.isArray(P)&&(v=P)}if((!b||!b.length)&&typeof k=="function"){var L=p&&p.length,C=k({xAxis:m?Ln(Ln({},m),{},{ticks:L?p:m.ticks}):void 0,width:t??u,height:r??d,offset:o},L?!0:c);n3(Array.isArray(C),"verticalCoordinatesGenerator should return Array but instead it returned [".concat(typeof C,"]")),Array.isArray(C)&&(b=C)}return ao.createElement(Ir,{zIndex:n.zIndex},ao.createElement("g",{className:"recharts-cartesian-grid"},ao.createElement(wFe,{fill:n.fill,fillOpacity:n.fillOpacity,x:n.x,y:n.y,width:n.width,height:n.height,ry:n.ry}),ao.createElement(PFe,Zp({},n,{horizontalPoints:v})),ao.createElement(AFe,Zp({},n,{verticalPoints:b})),ao.createElement(CFe,Zp({},n,{offset:o,horizontalPoints:v,xAxis:m,yAxis:h})),ao.createElement(SFe,Zp({},n,{offset:o,verticalPoints:b,xAxis:m,yAxis:h}))))}Xp.displayName="CartesianGrid";var qt=z(ie()),$n=z(ie());var Fae=z(ie()),Db=z(ie());var RFe={},Eae=er({name:"errorBars",initialState:RFe,reducers:{addErrorBar:(e,t)=>{var{itemId:r,errorBar:o}=t.payload;e[r]||(e[r]=[]),e[r].push(o)},replaceErrorBar:(e,t)=>{var{itemId:r,prev:o,next:n}=t.payload;e[r]&&(e[r]=e[r].map(a=>a.dataKey===o.dataKey&&a.direction===o.direction?n:a))},removeErrorBar:(e,t)=>{var{itemId:r,errorBar:o}=t.payload;e[r]&&(e[r]=e[r].filter(n=>n.dataKey!==o.dataKey||n.direction!==o.direction))}}}),{addErrorBar:NRt,replaceErrorBar:TRt,removeErrorBar:ORt}=Eae.actions,_ae=Eae.reducer;var NFe=["children"];function TFe(e,t){if(e==null)return{};var r,o,n=OFe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function OFe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var EFe={data:[],xAxisId:"xAxis-0",yAxisId:"yAxis-0",dataPointFormatter:()=>({x:0,y:0,value:0}),errorBarOffset:0},_Fe=(0,Db.createContext)(EFe);function lL(e){var{children:t}=e,r=TFe(e,NFe);return Fae.createElement(_Fe.Provider,{value:r},t)}var MU=z(ie());function Jp(e,t){var r,o,n=Ve(u=>Ml(u,e)),a=Ve(u=>hl(u,t)),i=(r=n?.allowDataOverflow)!==null&&r!==void 0?r:go.allowDataOverflow,s=(o=a?.allowDataOverflow)!==null&&o!==void 0?o:ko.allowDataOverflow,l=i||s;return{needClip:l,needClipX:i,needClipY:s}}function NM(e){var{xAxisId:t,yAxisId:r,clipPathId:o}=e,n=hc(),{needClipX:a,needClipY:i,needClip:s}=Jp(t,r);if(!s||!n)return null;var{x:l,y:u,width:d,height:c}=n;return MU.createElement("clipPath",{id:"clipPath-".concat(o)},MU.createElement("rect",{x:a?l:l-d/2,y:i?u:u-c/2,width:a?d:d*2,height:i?c:c*2}))}var Bae=(e,t,r,o)=>Ha(e,"xAxis",t,o),Vae=(e,t,r,o)=>qa(e,"xAxis",t,o),Uae=(e,t,r,o)=>Ha(e,"yAxis",r,o),Wae=(e,t,r,o)=>qa(e,"yAxis",r,o),FFe=te([mt,Bae,Uae,Vae,Wae],(e,t,r,o,n)=>Sn(e,"xAxis")?Ai(t,o,!1):Ai(r,n,!1)),BFe=(e,t,r,o,n)=>n;function VFe(e){return e.type==="line"}var UFe=te([ac,BFe],(e,t)=>e.filter(VFe).find(r=>r.id===t)),Gae=te([mt,Bae,Uae,Vae,Wae,UFe,FFe,Pp],(e,t,r,o,n,a,i,s)=>{var{chartData:l,dataStartIndex:u,dataEndIndex:d}=s;if(!(a==null||t==null||r==null||o==null||n==null||o.length===0||n.length===0||i==null||e!=="horizontal"&&e!=="vertical")){var{dataKey:c,data:f}=a,p;if(f!=null&&f.length>0?p=f:p=l?.slice(u,d+1),p!=null)return jae({layout:e,xAxis:t,yAxis:r,xAxisTicks:o,yAxisTicks:n,dataKey:c,bandSize:i,displayedData:p})}});function uL(e){var t=Ea(e),r=3,o=2;if(t!=null){var{r:n,strokeWidth:a}=t,i=Number(n),s=Number(a);return(Number.isNaN(i)||i<0)&&(i=r),(Number.isNaN(s)||s<0)&&(s=o),{r:i,strokeWidth:s}}return{r,strokeWidth:o}}var WFe=["id"],GFe=["type","layout","connectNulls","needClip","shape"],jFe=["activeDot","animateNewValues","animationBegin","animationDuration","animationEasing","connectNulls","dot","hide","isAnimationActive","label","legendType","xAxisId","yAxisId","id"];function Lb(){return Lb=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Lb.apply(null,arguments)}function zae(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function xl(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?zae(Object(r),!0).forEach(function(o){zFe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):zae(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function zFe(e,t,r){return(t=qFe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function qFe(e){var t=HFe(e,"string");return typeof t=="symbol"?t:t+""}function HFe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function vU(e,t){if(e==null)return{};var r,o,n=KFe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function KFe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var $Fe=e=>{var{dataKey:t,name:r,stroke:o,legendType:n,hide:a}=e;return[{inactive:a,dataKey:t,type:n,color:o,value:Ua(r,t),payload:e}]},YFe=qt.memo(e=>{var{dataKey:t,data:r,stroke:o,strokeWidth:n,fill:a,name:i,hide:s,unit:l,tooltipType:u,id:d}=e,c={dataDefinedOnItem:r,getPosition:Fa,settings:{stroke:o,strokeWidth:n,fill:a,dataKey:t,nameKey:void 0,name:Ua(i,t),hide:s,type:u,color:o,unit:l,graphicalItemId:d}};return qt.createElement(mc,{tooltipEntrySettings:c})}),Hae=(e,t)=>"".concat(t,"px ").concat(e,"px");function ZFe(e,t){for(var r=e.length%2!==0?[...e,0]:e,o=[],n=0;n<t;++n)o.push(...r);return o}var XFe=(e,t,r)=>{var o=r.reduce((f,p)=>f+p,0);if(!o)return Hae(t,e);for(var n=Math.floor(e/o),a=e%o,i=[],s=0,l=0;s<r.length;l+=(u=r[s])!==null&&u!==void 0?u:0,++s){var u,d=r[s];if(d!=null&&l+d>a){i=[...r.slice(0,s),a-l];break}}var c=i.length%2===0?[0,t]:[t];return[...ZFe(r,n),...i,...c].map(f=>"".concat(f,"px")).join(", ")};function JFe(e){var{clipPathId:t,points:r,props:o}=e,{dot:n,dataKey:a,needClip:i}=o,{id:s}=o,l=vU(o,WFe),u=Br(l);return qt.createElement(rL,{points:r,dot:n,className:"recharts-line-dots",dotClassName:"recharts-line-dot",dataKey:a,baseProps:u,needClip:i,clipPathId:t})}function QFe(e){var{showLabels:t,children:r,points:o}=e,n=(0,$n.useMemo)(()=>o?.map(a=>{var i,s,l={x:(i=a.x)!==null&&i!==void 0?i:0,y:(s=a.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return xl(xl({},l),{},{value:a.value,payload:a.payload,viewBox:l,parentViewBox:void 0,fill:void 0})}),[o]);return qt.createElement(PM,{value:t?n:void 0},r)}function qae(e){var{clipPathId:t,pathRef:r,points:o,strokeDasharray:n,props:a}=e,{type:i,layout:s,connectNulls:l,needClip:u,shape:d}=a,c=vU(a,GFe),f=xl(xl({},mr(c)),{},{fill:"none",className:"recharts-line-curve",clipPath:u?"url(#clipPath-".concat(t,")"):void 0,points:o,type:i,layout:s,connectNulls:l,strokeDasharray:n??a.strokeDasharray});return qt.createElement(qt.Fragment,null,o?.length>1&&qt.createElement(IM,Lb({shapeType:"curve",option:d},f,{pathRef:r})),qt.createElement(JFe,{points:o,clipPathId:t,props:a}))}function eBe(e){try{return e&&e.getTotalLength&&e.getTotalLength()||0}catch{return 0}}function tBe(e){var{clipPathId:t,props:r,pathRef:o,previousPointsRef:n,longestAnimatedLengthRef:a}=e,{points:i,strokeDasharray:s,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:c,animateNewValues:f,width:p,height:g,onAnimationEnd:m,onAnimationStart:h}=r,k=n.current,M=Ri(i,"recharts-line-"),v=(0,$n.useRef)(M),[b,w]=(0,$n.useState)(!1),P=!b,L=(0,$n.useCallback)(()=>{typeof m=="function"&&m(),w(!1)},[m]),C=(0,$n.useCallback)(()=>{typeof h=="function"&&h(),w(!0)},[h]),F=eBe(o.current),T=(0,$n.useRef)(0);v.current!==M&&(T.current=a.current,v.current=M);var G=T.current;return qt.createElement(QFe,{points:i,showLabels:P},r.children,qt.createElement(Li,{animationId:M,begin:u,duration:d,isActive:l,easing:c,onAnimationEnd:L,onAnimationStart:C,key:M},$=>{var oe=jt(G,F+G,$),se=Math.min(oe,F),pe;if(l)if(s){var N="".concat(s).split(/[,\s]+/gim).map(E=>parseFloat(E));pe=XFe(se,F,N)}else pe=Hae(F,se);else pe=s==null?void 0:String(s);if($>0&&F>0&&(n.current=i,a.current=Math.max(a.current,se)),k){var R=k.length/i.length,U=$===1?i:i.map((E,_)=>{var B=Math.floor(_*R);if(k[B]){var j=k[B];return xl(xl({},E),{},{x:jt(j.x,E.x,$),y:jt(j.y,E.y,$)})}return f?xl(xl({},E),{},{x:jt(p*2,E.x,$),y:jt(g/2,E.y,$)}):xl(xl({},E),{},{x:E.x,y:E.y})});return n.current=U,qt.createElement(qae,{props:r,points:U,clipPathId:t,pathRef:o,strokeDasharray:pe})}return qt.createElement(qae,{props:r,points:i,clipPathId:t,pathRef:o,strokeDasharray:pe})}),qt.createElement(pc,{label:r.label}))}function rBe(e){var{clipPathId:t,props:r}=e,o=(0,$n.useRef)(null),n=(0,$n.useRef)(0),a=(0,$n.useRef)(null);return qt.createElement(tBe,{props:r,clipPathId:t,previousPointsRef:o,longestAnimatedLengthRef:n,pathRef:a})}var oBe=(e,t)=>{var r,o;return{x:(r=e.x)!==null&&r!==void 0?r:void 0,y:(o=e.y)!==null&&o!==void 0?o:void 0,value:e.value,errorVal:vt(e.payload,t)}},hU=class extends $n.Component{render(){var{hide:t,dot:r,points:o,className:n,xAxisId:a,yAxisId:i,top:s,left:l,width:u,height:d,id:c,needClip:f,zIndex:p}=this.props;if(t)return null;var g=et("recharts-line",n),m=c,{r:h,strokeWidth:k}=uL(r),M=AM(r),v=h*2+k,b=f?"url(#clipPath-".concat(M?"":"dots-").concat(m,")"):void 0;return qt.createElement(Ir,{zIndex:p},qt.createElement(Jt,{className:g},f&&qt.createElement("defs",null,qt.createElement(NM,{clipPathId:m,xAxisId:a,yAxisId:i}),!M&&qt.createElement("clipPath",{id:"clipPath-dots-".concat(m)},qt.createElement("rect",{x:l-v/2,y:s-v/2,width:u+v,height:d+v}))),qt.createElement(lL,{xAxisId:a,yAxisId:i,data:o,dataPointFormatter:oBe,errorBarOffset:0},qt.createElement(rBe,{props:this.props,clipPathId:m}))),qt.createElement(Cb,{activeDot:this.props.activeDot,points:o,mainColor:this.props.stroke,itemDataKey:this.props.dataKey,clipPath:b}))}},Kae={activeDot:!0,animateNewValues:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!0,fill:"#fff",hide:!1,isAnimationActive:"auto",label:!1,legendType:"line",stroke:"#3182bd",strokeWidth:1,xAxisId:0,yAxisId:0,zIndex:Nt.line,type:"linear"};function nBe(e){var t=_t(e,Kae),{activeDot:r,animateNewValues:o,animationBegin:n,animationDuration:a,animationEasing:i,connectNulls:s,dot:l,hide:u,isAnimationActive:d,label:c,legendType:f,xAxisId:p,yAxisId:g,id:m}=t,h=vU(t,jFe),{needClip:k}=Jp(p,g),M=hc(),v=sa(),b=tr(),w=Ve(T=>Gae(T,p,g,b,m));if(v!=="horizontal"&&v!=="vertical"||w==null||M==null)return null;var{height:P,width:L,x:C,y:F}=M;return qt.createElement(hU,Lb({},h,{id:m,connectNulls:s,dot:l,activeDot:r,animateNewValues:o,animationBegin:n,animationDuration:a,animationEasing:i,isAnimationActive:d,hide:u,label:c,legendType:f,xAxisId:p,yAxisId:g,points:w,layout:v,height:P,width:L,left:C,top:F,needClip:k}))}function jae(e){var{layout:t,xAxis:r,yAxis:o,xAxisTicks:n,yAxisTicks:a,dataKey:i,bandSize:s,displayedData:l}=e;return l.map((u,d)=>{var c=vt(u,i);if(t==="horizontal"){var f=Fk({axis:r,ticks:n,bandSize:s,entry:u,index:d}),p=Rt(c)?null:o.scale.map(c);return{x:f,y:p??null,value:c,payload:u}}var g=Rt(c)?null:r.scale.map(c),m=Fk({axis:o,ticks:a,bandSize:s,entry:u,index:d});return g==null||m==null?null:{x:g,y:m,value:c,payload:u}}).filter(Boolean)}function aBe(e){var t=_t(e,Kae),r=tr();return qt.createElement(kc,{id:t.id,type:"line"},o=>qt.createElement(qt.Fragment,null,qt.createElement(DM,{legendPayload:$Fe(t)}),qt.createElement(YFe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:o}),qt.createElement(LM,{type:"line",id:o,data:t.data,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,hide:t.hide,isPanorama:r}),qt.createElement(nBe,Lb({},t,{id:o}))))}var vc=qt.memo(aBe,Ii);vc.displayName="Line";var pt=z(ie()),Wi=z(ie());function Vi(e,t){var r,o;return(r=(o=e.graphicalItems.cartesianItems.find(n=>n.id===t))===null||o===void 0?void 0:o.xAxisId)!==null&&r!==void 0?r:gU}function Ui(e,t){var r,o;return(r=(o=e.graphicalItems.cartesianItems.find(n=>n.id===t))===null||o===void 0?void 0:o.yAxisId)!==null&&r!==void 0?r:gU}var $ae=(e,t,r)=>Ha(e,"xAxis",Vi(e,t),r),Yae=(e,t,r)=>qa(e,"xAxis",Vi(e,t),r),Zae=(e,t,r)=>Ha(e,"yAxis",Ui(e,t),r),Xae=(e,t,r)=>qa(e,"yAxis",Ui(e,t),r),iBe=te([mt,$ae,Zae,Yae,Xae],(e,t,r,o,n)=>Sn(e,"xAxis")?Ai(t,o,!1):Ai(r,n,!1)),sBe=(e,t)=>t,Jae=te([ac,sBe],(e,t)=>e.filter(r=>r.type==="area").find(r=>r.id===t)),Qae=e=>{var t=mt(e),r=Sn(t,"xAxis");return r?"yAxis":"xAxis"},lBe=(e,t)=>{var r=Qae(e);return r==="yAxis"?Ui(e,t):Vi(e,t)},uBe=(e,t,r)=>pM(e,Qae(e),lBe(e,t),r),dBe=te([Jae,uBe],(e,t)=>{var r;if(!(e==null||t==null)){var{stackId:o}=e,n=Jd(e);if(!(o==null||n==null)){var a=(r=t[o])===null||r===void 0?void 0:r.stackedData,i=a?.find(s=>s.key===n);if(i!=null)return i.map(s=>[s[0],s[1]])}}}),eie=te([mt,$ae,Zae,Yae,Xae,dBe,o1,iBe,Jae,vee],(e,t,r,o,n,a,i,s,l,u)=>{var{chartData:d,dataStartIndex:c,dataEndIndex:f}=i;if(!(l==null||e!=="horizontal"&&e!=="vertical"||t==null||r==null||o==null||n==null||o.length===0||n.length===0||s==null)){var{data:p}=l,g;if(p&&p.length>0?g=p:g=d?.slice(c,f+1),g!=null)return tie({layout:e,xAxis:t,yAxis:r,xAxisTicks:o,yAxisTicks:n,dataStartIndex:c,areaSettings:l,stackedData:a,displayedData:g,chartBaseValue:u,bandSize:s})}});var cBe=["id"],fBe=["activeDot","animationBegin","animationDuration","animationEasing","connectNulls","dot","fill","fillOpacity","hide","isAnimationActive","legendType","stroke","xAxisId","yAxisId"];function Qp(){return Qp=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Qp.apply(null,arguments)}function nie(e,t){if(e==null)return{};var r,o,n=pBe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function pBe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function rie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function TM(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?rie(Object(r),!0).forEach(function(o){mBe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):rie(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function mBe(e,t,r){return(t=gBe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function gBe(e){var t=kBe(e,"string");return typeof t=="symbol"?t:t+""}function kBe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function dL(e,t){return e&&e!=="none"?e:t}var MBe=e=>{var{dataKey:t,name:r,stroke:o,fill:n,legendType:a,hide:i}=e;return[{inactive:i,dataKey:t,type:a,color:dL(o,n),value:Ua(r,t),payload:e}]},hBe=pt.memo(e=>{var{dataKey:t,data:r,stroke:o,strokeWidth:n,fill:a,name:i,hide:s,unit:l,tooltipType:u,id:d}=e,c={dataDefinedOnItem:r,getPosition:Fa,settings:{stroke:o,strokeWidth:n,fill:a,dataKey:t,nameKey:void 0,name:Ua(i,t),hide:s,type:u,color:dL(o,a),unit:l,graphicalItemId:d}};return pt.createElement(mc,{tooltipEntrySettings:c})});function vBe(e){var{clipPathId:t,points:r,props:o}=e,{needClip:n,dot:a,dataKey:i}=o,s=Br(o);return pt.createElement(rL,{points:r,dot:a,className:"recharts-area-dots",dotClassName:"recharts-area-dot",dataKey:i,baseProps:s,needClip:n,clipPathId:t})}function yBe(e){var{showLabels:t,children:r,points:o}=e,n=o.map(a=>{var i,s,l={x:(i=a.x)!==null&&i!==void 0?i:0,y:(s=a.y)!==null&&s!==void 0?s:0,width:0,lowerWidth:0,upperWidth:0,height:0};return TM(TM({},l),{},{value:a.value,payload:a.payload,parentViewBox:void 0,viewBox:l,fill:void 0})});return pt.createElement(PM,{value:t?n:void 0},r)}function oie(e){var{points:t,baseLine:r,needClip:o,clipPathId:n,props:a}=e,{layout:i,type:s,stroke:l,connectNulls:u,isRange:d}=a,{id:c}=a,f=nie(a,cBe),p=Br(f),g=mr(f);return pt.createElement(pt.Fragment,null,t?.length>1&&pt.createElement(Jt,{clipPath:o?"url(#clipPath-".concat(n,")"):void 0},pt.createElement(ul,Qp({},g,{id:c,points:t,connectNulls:u,type:s,baseLine:r,layout:i,stroke:"none",className:"recharts-area-area"})),l!=="none"&&pt.createElement(ul,Qp({},p,{className:"recharts-area-curve",layout:i,type:s,connectNulls:u,fill:"none",points:t})),l!=="none"&&d&&Array.isArray(r)&&pt.createElement(ul,Qp({},p,{className:"recharts-area-curve",layout:i,type:s,connectNulls:u,fill:"none",points:r}))),pt.createElement(vBe,{points:t,props:f,clipPathId:n}))}function xBe(e){var t,r,{alpha:o,baseLine:n,points:a,strokeWidth:i}=e,s=(t=a[0])===null||t===void 0?void 0:t.y,l=(r=a[a.length-1])===null||r===void 0?void 0:r.y;if(!lt(s)||!lt(l))return null;var u=o*Math.abs(s-l),d=Math.max(...a.map(c=>c.x||0));return Be(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(c=>c.x||0),d)),Be(d)?pt.createElement("rect",{x:0,y:s<l?s:s-u,width:d+(i?parseInt("".concat(i),10):1),height:Math.floor(u)}):null}function bBe(e){var t,r,{alpha:o,baseLine:n,points:a,strokeWidth:i}=e,s=(t=a[0])===null||t===void 0?void 0:t.x,l=(r=a[a.length-1])===null||r===void 0?void 0:r.x;if(!lt(s)||!lt(l))return null;var u=o*Math.abs(s-l),d=Math.max(...a.map(c=>c.y||0));return Be(n)?d=Math.max(n,d):n&&Array.isArray(n)&&n.length&&(d=Math.max(...n.map(c=>c.y||0),d)),Be(d)?pt.createElement("rect",{x:s<l?s:s-u,y:0,width:u,height:Math.floor(d+(i?parseInt("".concat(i),10):1))}):null}function wBe(e){var{alpha:t,layout:r,points:o,baseLine:n,strokeWidth:a}=e;return r==="vertical"?pt.createElement(xBe,{alpha:t,points:o,baseLine:n,strokeWidth:a}):pt.createElement(bBe,{alpha:t,points:o,baseLine:n,strokeWidth:a})}function CBe(e){var{needClip:t,clipPathId:r,props:o,previousPointsRef:n,previousBaselineRef:a}=e,{points:i,baseLine:s,isAnimationActive:l,animationBegin:u,animationDuration:d,animationEasing:c,onAnimationStart:f,onAnimationEnd:p}=o,g=(0,Wi.useMemo)(()=>({points:i,baseLine:s}),[i,s]),m=Ri(g,"recharts-area-"),h=Gk(),[k,M]=(0,Wi.useState)(!1),v=!k,b=(0,Wi.useCallback)(()=>{typeof p=="function"&&p(),M(!1)},[p]),w=(0,Wi.useCallback)(()=>{typeof f=="function"&&f(),M(!0)},[f]);if(h==null)return null;var P=n.current,L=a.current;return pt.createElement(yBe,{showLabels:v,points:i},o.children,pt.createElement(Li,{animationId:m,begin:u,duration:d,isActive:l,easing:c,onAnimationEnd:b,onAnimationStart:w,key:m},C=>{if(P){var F=P.length/i.length,T=C===1?i:i.map(($,oe)=>{var se=Math.floor(oe*F);if(P[se]){var pe=P[se];return TM(TM({},$),{},{x:jt(pe.x,$.x,C),y:jt(pe.y,$.y,C)})}return $}),G;return Be(s)?G=jt(L,s,C):Rt(s)||Yo(s)?G=jt(L,0,C):G=s.map(($,oe)=>{var se=Math.floor(oe*F);if(Array.isArray(L)&&L[se]){var pe=L[se];return TM(TM({},$),{},{x:jt(pe.x,$.x,C),y:jt(pe.y,$.y,C)})}return $}),C>0&&(n.current=T,a.current=G),pt.createElement(oie,{points:T,baseLine:G,needClip:t,clipPathId:r,props:o})}return C>0&&(n.current=i,a.current=s),pt.createElement(Jt,null,l&&pt.createElement("defs",null,pt.createElement("clipPath",{id:"animationClipPath-".concat(r)},pt.createElement(wBe,{alpha:C,points:i,baseLine:s,layout:h,strokeWidth:o.strokeWidth}))),pt.createElement(Jt,{clipPath:"url(#animationClipPath-".concat(r,")")},pt.createElement(oie,{points:i,baseLine:s,needClip:t,clipPathId:r,props:o})))}),pt.createElement(pc,{label:o.label}))}function SBe(e){var{needClip:t,clipPathId:r,props:o}=e,n=(0,Wi.useRef)(null),a=(0,Wi.useRef)();return pt.createElement(CBe,{needClip:t,clipPathId:r,props:o,previousPointsRef:n,previousBaselineRef:a})}var yU=class extends Wi.PureComponent{render(){var{hide:t,dot:r,points:o,className:n,top:a,left:i,needClip:s,xAxisId:l,yAxisId:u,width:d,height:c,id:f,baseLine:p,zIndex:g}=this.props;if(t)return null;var m=et("recharts-area",n),h=f,{r:k,strokeWidth:M}=uL(r),v=AM(r),b=k*2+M,w=s?"url(#clipPath-".concat(v?"":"dots-").concat(h,")"):void 0;return pt.createElement(Ir,{zIndex:g},pt.createElement(Jt,{className:m},s&&pt.createElement("defs",null,pt.createElement(NM,{clipPathId:h,xAxisId:l,yAxisId:u}),!v&&pt.createElement("clipPath",{id:"clipPath-dots-".concat(h)},pt.createElement("rect",{x:i-b/2,y:a-b/2,width:d+b,height:c+b}))),pt.createElement(SBe,{needClip:s,clipPathId:h,props:this.props})),pt.createElement(Cb,{points:o,mainColor:dL(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}),this.props.isRange&&Array.isArray(p)&&pt.createElement(Cb,{points:p,mainColor:dL(this.props.stroke,this.props.fill),itemDataKey:this.props.dataKey,activeDot:this.props.activeDot,clipPath:w}))}},PBe={activeDot:!0,animationBegin:0,animationDuration:1500,animationEasing:"ease",connectNulls:!1,dot:!1,fill:"#3182bd",fillOpacity:.6,hide:!1,isAnimationActive:"auto",legendType:"line",stroke:"#3182bd",strokeWidth:1,type:"linear",label:!1,xAxisId:0,yAxisId:0,zIndex:Nt.area};function ABe(e){var t,{activeDot:r,animationBegin:o,animationDuration:n,animationEasing:a,connectNulls:i,dot:s,fill:l,fillOpacity:u,hide:d,isAnimationActive:c,legendType:f,stroke:p,xAxisId:g,yAxisId:m}=e,h=nie(e,fBe),k=sa(),M=wD(),{needClip:v}=Jp(g,m),b=tr(),{points:w,isRange:P,baseLine:L}=(t=Ve(oe=>eie(oe,e.id,b)))!==null&&t!==void 0?t:{},C=hc();if(k!=="horizontal"&&k!=="vertical"||C==null||M!=="AreaChart"&&M!=="ComposedChart")return null;var{height:F,width:T,x:G,y:$}=C;return!w||!w.length?null:pt.createElement(yU,Qp({},h,{activeDot:r,animationBegin:o,animationDuration:n,animationEasing:a,baseLine:L,connectNulls:i,dot:s,fill:l,fillOpacity:u,height:F,hide:d,layout:k,isAnimationActive:c,isRange:P,legendType:f,needClip:v,points:w,stroke:p,width:T,left:G,top:$,xAxisId:g,yAxisId:m}))}var IBe=(e,t,r,o,n)=>{var a=r??t;if(Be(a))return a;var i=e==="horizontal"?n:o,s=i.scale.domain();if(i.type==="number"){var l=Math.max(s[0],s[1]),u=Math.min(s[0],s[1]);return a==="dataMin"?u:a==="dataMax"||l<0?l:Math.max(Math.min(s[0],s[1]),0)}return a==="dataMin"?s[0]:a==="dataMax"?s[1]:s[0]};function tie(e){var{areaSettings:{connectNulls:t,baseValue:r,dataKey:o},stackedData:n,layout:a,chartBaseValue:i,xAxis:s,yAxis:l,displayedData:u,dataStartIndex:d,xAxisTicks:c,yAxisTicks:f,bandSize:p}=e,g=n&&n.length,m=IBe(a,i,r,s,l),h=a==="horizontal",k=!1,M=u.map((b,w)=>{var P,L,C,F;if(g)F=n[d+w];else{var T=vt(b,o);Array.isArray(T)?(F=T,k=!0):F=[m,T]}var G=(P=(L=F)===null||L===void 0?void 0:L[1])!==null&&P!==void 0?P:null,$=G==null||g&&!t&&vt(b,o)==null;if(h){var oe;return{x:Fk({axis:s,ticks:c,bandSize:p,entry:b,index:w}),y:$?null:(oe=l.scale.map(G))!==null&&oe!==void 0?oe:null,value:F,payload:b}}return{x:$?null:(C=s.scale.map(G))!==null&&C!==void 0?C:null,y:Fk({axis:l,ticks:f,bandSize:p,entry:b,index:w}),value:F,payload:b}}),v;return g||k?v=M.map(b=>{var w,P=Array.isArray(b.value)?b.value[0]:null;if(h){var L;return{x:b.x,y:P!=null&&b.y!=null&&(L=l.scale.map(P))!==null&&L!==void 0?L:null,payload:b.payload}}return{x:P!=null&&(w=s.scale.map(P))!==null&&w!==void 0?w:null,y:b.y,payload:b.payload}}):v=h?l.scale.map(m):s.scale.map(m),{points:M,baseLine:v??0,isRange:k}}function DBe(e){var t=_t(e,PBe),r=tr();return pt.createElement(kc,{id:t.id,type:"area"},o=>pt.createElement(pt.Fragment,null,pt.createElement(DM,{legendPayload:MBe(t)}),pt.createElement(hBe,{dataKey:t.dataKey,data:t.data,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:o}),pt.createElement(LM,{type:"area",id:o,data:t.data,dataKey:t.dataKey,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,stackId:LI(t.stackId),hide:t.hide,barSize:void 0,baseValue:t.baseValue,isPanorama:r,connectNulls:t.connectNulls}),pt.createElement(ABe,Qp({},t,{id:o}))))}var em=pt.memo(DBe,Ii);em.displayName="Area";var Ct=z(ie()),fa=z(ie());var iie=z(ie());var LBe=!0,xU="Invariant failed";function aie(e,t){if(!e){if(LBe)throw new Error(xU);var r=typeof t=="function"?t():t,o=r?"".concat(xU,": ").concat(r):xU;throw new Error(o)}}function bU(){return bU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},bU.apply(null,arguments)}function cL(e){return iie.createElement(IM,bU({shapeType:"rectangle",activeClassName:"recharts-active-bar",inActiveClassName:"recharts-inactive-bar"},e))}var sie=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return(o,n)=>{if(Be(t))return t;var a=Be(o)||Rt(o);return a?t(o,n):(a||aie(!1,"minPointSize callback function received a value with type of ".concat(typeof o,". Currently only numbers or null/undefined are supported.")),r)}};var RBe=(e,t,r)=>r,NBe=(e,t)=>t,Rb=te([ac,NBe],(e,t)=>e.filter(r=>r.type==="bar").find(r=>r.id===t)),TBe=te([Rb],e=>e?.maxBarSize),OBe=(e,t,r,o)=>o,EBe=te([mt,ac,Vi,Ui,RBe],(e,t,r,o,n)=>t.filter(a=>e==="horizontal"?a.xAxisId===r:a.yAxisId===o).filter(a=>a.isPanorama===n).filter(a=>a.hide===!1).filter(a=>a.type==="bar")),_Be=(e,t,r)=>{var o=mt(e),n=Vi(e,t),a=Ui(e,t);if(!(n==null||a==null))return o==="horizontal"?pM(e,"yAxis",a,r):pM(e,"xAxis",n,r)},FBe=(e,t)=>{var r=mt(e),o=Vi(e,t),n=Ui(e,t);if(!(o==null||n==null))return r==="horizontal"?LV(e,"xAxis",o):LV(e,"yAxis",n)},BBe=te([EBe,hee,FBe],sae),VBe=(e,t,r)=>{var o,n,a=Rb(e,t);if(a==null)return 0;var i=Vi(e,t),s=Ui(e,t);if(i==null||s==null)return 0;var l=mt(e),u=x3(e),{maxBarSize:d}=a,c=Rt(d)?u:d,f,p;return l==="horizontal"?(f=Ha(e,"xAxis",i,r),p=qa(e,"xAxis",i,r)):(f=Ha(e,"yAxis",s,r),p=qa(e,"yAxis",s,r)),(o=(n=Ai(f,p,!0))!==null&&n!==void 0?n:c)!==null&&o!==void 0?o:0},lie=(e,t,r)=>{var o=mt(e),n=Vi(e,t),a=Ui(e,t);if(!(n==null||a==null)){var i,s;return o==="horizontal"?(i=Ha(e,"xAxis",n,r),s=qa(e,"xAxis",n,r)):(i=Ha(e,"yAxis",a,r),s=qa(e,"yAxis",a,r)),Ai(i,s)}},UBe=te([BBe,x3,Mee,l1,VBe,lie,TBe],uae),WBe=(e,t,r)=>{var o=Vi(e,t);if(o!=null)return Ha(e,"xAxis",o,r)},GBe=(e,t,r)=>{var o=Ui(e,t);if(o!=null)return Ha(e,"yAxis",o,r)},jBe=(e,t,r)=>{var o=Vi(e,t);if(o!=null)return qa(e,"xAxis",o,r)},zBe=(e,t,r)=>{var o=Ui(e,t);if(o!=null)return qa(e,"yAxis",o,r)},qBe=te([UBe,Rb],cae),HBe=te([_Be,Rb],dae),uie=te([fr,Uk,WBe,GBe,jBe,zBe,qBe,mt,o1,lie,HBe,Rb,OBe],(e,t,r,o,n,a,i,s,l,u,d,c,f)=>{var{chartData:p,dataStartIndex:g,dataEndIndex:m}=l;if(!(c==null||i==null||t==null||s!=="horizontal"&&s!=="vertical"||r==null||o==null||n==null||a==null||u==null)){var{data:h}=c,k;if(h!=null&&h.length>0?k=h:k=p?.slice(g,m+1),k!=null)return die({layout:s,barSettings:c,pos:i,parentViewBox:t,bandSize:u,xAxis:r,yAxis:o,xAxisTicks:n,yAxisTicks:a,stackedData:d,displayedData:k,offset:e,cells:f,dataStartIndex:g})}});var CU=z(ie()),OM=z(ie());var KBe=["index"];function wU(){return wU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},wU.apply(null,arguments)}function $Be(e,t){if(e==null)return{};var r,o,n=YBe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function YBe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var cie=(0,OM.createContext)(void 0),fie=e=>{var t=(0,OM.useContext)(cie);if(t!=null)return t.stackId;if(e!=null)return LI(e)};var ZBe=(e,t)=>"recharts-bar-stack-clip-path-".concat(e,"-").concat(t),XBe=e=>{var t=(0,OM.useContext)(cie);if(t!=null){var{stackId:r}=t;return"url(#".concat(ZBe(r,e),")")}},SU=e=>{var{index:t}=e,r=$Be(e,KBe),o=XBe(t);return CU.createElement(Jt,wU({className:"recharts-bar-stack-layer",clipPath:o},r))};var JBe=["onMouseEnter","onMouseLeave","onClick"],QBe=["value","background","tooltipPosition"],e3e=["id"],t3e=["onMouseEnter","onClick","onMouseLeave"];function yc(){return yc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},yc.apply(null,arguments)}function pie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Yn(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?pie(Object(r),!0).forEach(function(o){r3e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):pie(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function r3e(e,t,r){return(t=o3e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o3e(e){var t=n3e(e,"string");return typeof t=="symbol"?t:t+""}function n3e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function fL(e,t){if(e==null)return{};var r,o,n=a3e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function a3e(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var i3e=e=>{var{dataKey:t,name:r,fill:o,legendType:n,hide:a}=e;return[{inactive:a,dataKey:t,type:n,color:o,value:Ua(r,t),payload:e}]},s3e=Ct.memo(e=>{var{dataKey:t,stroke:r,strokeWidth:o,fill:n,name:a,hide:i,unit:s,tooltipType:l,id:u}=e,d={dataDefinedOnItem:void 0,getPosition:Fa,settings:{stroke:r,strokeWidth:o,fill:n,dataKey:t,nameKey:void 0,name:Ua(a,t),hide:i,type:l,color:n,unit:s,graphicalItemId:u}};return Ct.createElement(mc,{tooltipEntrySettings:d})});function l3e(e){var t=Ve(Ei),{data:r,dataKey:o,background:n,allOtherBarProps:a}=e,{onMouseEnter:i,onMouseLeave:s,onClick:l}=a,u=fL(a,JBe),d=hb(i,o,a.id),c=vb(s),f=yb(l,o,a.id);if(!n||r==null)return null;var p=Ea(n);return Ct.createElement(Ir,{zIndex:fae(n,Nt.barBackground)},r.map((g,m)=>{var{value:h,background:k,tooltipPosition:M}=g,v=fL(g,QBe);if(!k)return null;var b=d(g,m),w=c(g,m),P=f(g,m),L=Yn(Yn(Yn(Yn(Yn({option:n,isActive:String(m)===t},v),{},{fill:"#eee"},k),p),kp(u,g,m)),{},{onMouseEnter:b,onMouseLeave:w,onClick:P,dataKey:o,index:m,className:"recharts-bar-background-rectangle"});return Ct.createElement(cL,yc({key:"background-bar-".concat(m)},L))}))}function u3e(e){var{showLabels:t,children:r,rects:o}=e,n=o?.map(a=>{var i={x:a.x,y:a.y,width:a.width,lowerWidth:a.width,upperWidth:a.width,height:a.height};return Yn(Yn({},i),{},{value:a.value,payload:a.payload,parentViewBox:a.parentViewBox,viewBox:i,fill:a.fill})});return Ct.createElement(PM,{value:t?n:void 0},r)}function d3e(e){var{shape:t,activeBar:r,baseProps:o,entry:n,index:a,dataKey:i}=e,s=Ve(Ei),l=Ve(MM),u=r&&String(n.originalDataIndex)===s&&(l==null||i===l),[d,c]=(0,fa.useState)(!1),[f,p]=(0,fa.useState)(!1);(0,fa.useEffect)(()=>{var v;return u?(c(!0),v=requestAnimationFrame(()=>{p(!0)})):p(!1),()=>{cancelAnimationFrame(v)}},[u]);var g=(0,fa.useCallback)(()=>{u||c(!1)},[u]),m=u&&f,h=u||d,k;u?r===!0?k=t:k=r:k=t;var M=Ct.createElement(cL,yc({},o,{name:String(o.name)},n,{isActive:m,option:k,index:a,dataKey:i,onTransitionEnd:g}));return h?Ct.createElement(Ir,{zIndex:Nt.activeBar},Ct.createElement(SU,{index:n.originalDataIndex},M)):M}function c3e(e){var{shape:t,baseProps:r,entry:o,index:n,dataKey:a}=e;return Ct.createElement(cL,yc({},r,{name:String(r.name)},o,{isActive:!1,option:t,index:n,dataKey:a}))}function f3e(e){var t,{data:r,props:o}=e,n=(t=Br(o))!==null&&t!==void 0?t:{},{id:a}=n,i=fL(n,e3e),{shape:s,dataKey:l,activeBar:u}=o,{onMouseEnter:d,onClick:c,onMouseLeave:f}=o,p=fL(o,t3e),g=hb(d,l,a),m=vb(f),h=yb(c,l,a);return r?Ct.createElement(Ct.Fragment,null,r.map((k,M)=>Ct.createElement(SU,yc({index:k.originalDataIndex,key:"rectangle-".concat(k?.x,"-").concat(k?.y,"-").concat(k?.value,"-").concat(M),className:"recharts-bar-rectangle"},kp(p,k,M),{onMouseEnter:g(k,M),onMouseLeave:m(k,M),onClick:h(k,M)}),u?Ct.createElement(d3e,{shape:s,activeBar:u,baseProps:i,entry:k,index:M,dataKey:l}):Ct.createElement(c3e,{shape:s,baseProps:i,entry:k,index:M,dataKey:l})))):null}function p3e(e){var{props:t,previousRectanglesRef:r}=e,{data:o,layout:n,isAnimationActive:a,animationBegin:i,animationDuration:s,animationEasing:l,onAnimationEnd:u,onAnimationStart:d}=t,c=r.current,f=Ri(t,"recharts-bar-"),[p,g]=(0,fa.useState)(!1),m=!p,h=(0,fa.useCallback)(()=>{typeof u=="function"&&u(),g(!1)},[u]),k=(0,fa.useCallback)(()=>{typeof d=="function"&&d(),g(!0)},[d]);return Ct.createElement(u3e,{showLabels:m,rects:o},Ct.createElement(Li,{animationId:f,begin:i,duration:s,isActive:a,easing:l,onAnimationEnd:h,onAnimationStart:k,key:f},M=>{var v=M===1?o:o?.map((b,w)=>{var P=c&&c[w];if(P)return Yn(Yn({},b),{},{x:jt(P.x,b.x,M),y:jt(P.y,b.y,M),width:jt(P.width,b.width,M),height:jt(P.height,b.height,M)});if(n==="horizontal"){var L=jt(0,b.height,M),C=jt(b.stackedBarStart,b.y,M);return Yn(Yn({},b),{},{y:C,height:L})}var F=jt(0,b.width,M),T=jt(b.stackedBarStart,b.x,M);return Yn(Yn({},b),{},{width:F,x:T})});return M>0&&(r.current=v??null),v==null?null:Ct.createElement(Jt,null,Ct.createElement(f3e,{props:t,data:v}))}),Ct.createElement(pc,{label:t.label}),t.children)}function m3e(e){var t=(0,fa.useRef)(null);return Ct.createElement(p3e,{previousRectanglesRef:t,props:e})}var mie=0,g3e=(e,t)=>{var r=Array.isArray(e.value)?e.value[1]:e.value;return{x:e.x,y:e.y,value:r,errorVal:vt(e,t)}},PU=class extends fa.PureComponent{render(){var{hide:t,data:r,dataKey:o,className:n,xAxisId:a,yAxisId:i,needClip:s,background:l,id:u}=this.props;if(t||r==null)return null;var d=et("recharts-bar",n),c=u;return Ct.createElement(Jt,{className:d,id:u},s&&Ct.createElement("defs",null,Ct.createElement(NM,{clipPathId:c,xAxisId:a,yAxisId:i})),Ct.createElement(Jt,{className:"recharts-bar-rectangles",clipPath:s?"url(#clipPath-".concat(c,")"):void 0},Ct.createElement(l3e,{data:r,dataKey:o,background:l,allOtherBarProps:this.props}),Ct.createElement(m3e,this.props)))}},k3e={activeBar:!1,animationBegin:0,animationDuration:400,animationEasing:"ease",background:!1,hide:!1,isAnimationActive:"auto",label:!1,legendType:"rect",minPointSize:mie,xAxisId:0,yAxisId:0,zIndex:Nt.bar};function M3e(e){var{xAxisId:t,yAxisId:r,hide:o,legendType:n,minPointSize:a,activeBar:i,animationBegin:s,animationDuration:l,animationEasing:u,isAnimationActive:d}=e,{needClip:c}=Jp(t,r),f=sa(),p=tr(),g=mb(e.children,Ka),m=Ve(M=>uie(M,e.id,p,g));if(f!=="vertical"&&f!=="horizontal")return null;var h,k=m?.[0];return k==null||k.height==null||k.width==null?h=0:h=f==="vertical"?k.height/2:k.width/2,Ct.createElement(lL,{xAxisId:t,yAxisId:r,data:m,dataPointFormatter:g3e,errorBarOffset:h},Ct.createElement(PU,yc({},e,{layout:f,needClip:c,data:m,xAxisId:t,yAxisId:r,hide:o,legendType:n,minPointSize:a,activeBar:i,animationBegin:s,animationDuration:l,animationEasing:u,isAnimationActive:d})))}function die(e){var{layout:t,barSettings:{dataKey:r,minPointSize:o,hasCustomShape:n},pos:a,bandSize:i,xAxis:s,yAxis:l,xAxisTicks:u,yAxisTicks:d,stackedData:c,displayedData:f,offset:p,cells:g,parentViewBox:m,dataStartIndex:h}=e,k=t==="horizontal"?l:s,M=c?k.scale.domain():null,v=_J({numericAxis:k}),b=k.scale.map(v);return f.map((w,P)=>{var L,C,F,T,G,$;if(c){var oe=c[P+h];if(oe==null)return null;L=OJ(oe,M)}else L=vt(w,r),Array.isArray(L)||(L=[v,L]);var se=sie(o,mie)(L[1],P);if(t==="horizontal"){var pe,N=l.scale.map(L[0]),R=l.scale.map(L[1]);if(N==null||R==null)return null;C=e3({axis:s,ticks:u,bandSize:i,offset:a.offset,entry:w,index:P}),F=(pe=R??N)!==null&&pe!==void 0?pe:void 0,T=a.size;var U=N-R;if(G=Yo(U)?0:U,$={x:C,y:p.top,width:T,height:p.height},Math.abs(se)>0&&Math.abs(G)<Math.abs(se)){var E=vr(G||se)*(Math.abs(se)-Math.abs(G));F-=E,G+=E}}else{var _=s.scale.map(L[0]),B=s.scale.map(L[1]);if(_==null||B==null)return null;if(C=_,F=e3({axis:l,ticks:d,bandSize:i,offset:a.offset,entry:w,index:P}),T=B-_,G=a.size,$={x:p.left,y:F,width:p.width,height:G},Math.abs(se)>0&&Math.abs(T)<Math.abs(se)){var j=vr(T||se)*(Math.abs(se)-Math.abs(T));T+=j}}if(C==null||F==null||T==null||G==null||!n&&(T===0||G===0))return null;var re=Yn(Yn({},w),{},{stackedBarStart:b,x:C,y:F,width:T,height:G,value:c?L:L[1],payload:w,background:$,tooltipPosition:{x:C+T/2,y:F+G/2},parentViewBox:m,originalDataIndex:P},g&&g[P]&&g[P].props);return re}).filter(Boolean)}function h3e(e){var t=_t(e,k3e),r=fie(t.stackId),o=tr();return Ct.createElement(kc,{id:t.id,type:"bar"},n=>Ct.createElement(Ct.Fragment,null,Ct.createElement(DM,{legendPayload:i3e(t)}),Ct.createElement(s3e,{dataKey:t.dataKey,stroke:t.stroke,strokeWidth:t.strokeWidth,fill:t.fill,name:t.name,hide:t.hide,unit:t.unit,tooltipType:t.tooltipType,id:n}),Ct.createElement(LM,{type:"bar",id:n,data:void 0,xAxisId:t.xAxisId,yAxisId:t.yAxisId,zAxisId:0,dataKey:t.dataKey,stackId:r,hide:t.hide,barSize:t.barSize,minPointSize:t.minPointSize,maxBarSize:t.maxBarSize,isPanorama:o,hasCustomShape:t.shape!=null}),Ct.createElement(Ir,{zIndex:t.zIndex},Ct.createElement(M3e,yc({},t,{id:n})))))}var xc=Ct.memo(h3e,Ii);xc.displayName="Bar";var Cu=z(ie()),tm=z(ie());var v3e=["domain","range"],y3e=["domain","range"];function gie(e,t){if(e==null)return{};var r,o,n=x3e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function x3e(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function kie(e,t){return e===t?!0:Array.isArray(e)&&e.length===2&&Array.isArray(t)&&t.length===2?e[0]===t[0]&&e[1]===t[1]:!1}function pL(e,t){if(e===t)return!0;var{domain:r,range:o}=e,n=gie(e,v3e),{domain:a,range:i}=t,s=gie(t,y3e);return!kie(r,a)||!kie(o,i)?!1:Ii(n,s)}var b3e=["type"],w3e=["dangerouslySetInnerHTML","ticks","scale"],C3e=["id","scale"];function AU(){return AU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},AU.apply(null,arguments)}function Mie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function hie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Mie(Object(r),!0).forEach(function(o){S3e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Mie(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function S3e(e,t,r){return(t=P3e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function P3e(e){var t=A3e(e,"string");return typeof t=="symbol"?t:t+""}function A3e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function IU(e,t){if(e==null)return{};var r,o,n=I3e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function I3e(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function D3e(e){var t=Mt(),r=(0,tm.useRef)(null),o=Gk(),{type:n}=e,a=IU(e,b3e),i=Ip(o,"xAxis",n),s=(0,tm.useMemo)(()=>{if(i!=null)return hie(hie({},a),{},{type:i})},[a,i]);return(0,tm.useLayoutEffect)(()=>{s!=null&&(r.current===null?t($ne(s)):r.current!==s&&t(Yne({prev:r.current,next:s})),r.current=s)},[s,t]),(0,tm.useLayoutEffect)(()=>()=>{r.current&&(t(Zne(r.current)),r.current=null)},[t]),null}var L3e=e=>{var{xAxisId:t,className:r}=e,o=Ve(Uk),n=tr(),a="xAxis",i=Ve(k=>dD(k,a,t,n)),s=Ve(k=>IV(k,t)),l=Ve(k=>are(k,t)),u=Ve(k=>sV(k,t));if(s==null||l==null||u==null)return null;var{dangerouslySetInnerHTML:d,ticks:c,scale:f}=e,p=IU(e,w3e),{id:g,scale:m}=u,h=IU(u,C3e);return Cu.createElement(Ib,AU({},p,h,{x:l.x,y:l.y,width:s.width,height:s.height,className:et("recharts-".concat(a," ").concat(a),r),viewBox:o,ticks:i,axisType:a,axisId:t}))},R3e={allowDataOverflow:go.allowDataOverflow,allowDecimals:go.allowDecimals,allowDuplicatedCategory:go.allowDuplicatedCategory,angle:go.angle,axisLine:Bi.axisLine,height:go.height,hide:!1,includeHidden:go.includeHidden,interval:go.interval,label:!1,minTickGap:go.minTickGap,mirror:go.mirror,orientation:go.orientation,padding:go.padding,reversed:go.reversed,scale:go.scale,tick:go.tick,tickCount:go.tickCount,tickLine:Bi.tickLine,tickSize:Bi.tickSize,type:go.type,niceTicks:go.niceTicks,xAxisId:0},N3e=e=>{var t=_t(e,R3e);return Cu.createElement(Cu.Fragment,null,Cu.createElement(D3e,{allowDataOverflow:t.allowDataOverflow,allowDecimals:t.allowDecimals,allowDuplicatedCategory:t.allowDuplicatedCategory,angle:t.angle,dataKey:t.dataKey,domain:t.domain,height:t.height,hide:t.hide,id:t.xAxisId,includeHidden:t.includeHidden,interval:t.interval,minTickGap:t.minTickGap,mirror:t.mirror,name:t.name,orientation:t.orientation,padding:t.padding,reversed:t.reversed,scale:t.scale,tick:t.tick,tickCount:t.tickCount,tickFormatter:t.tickFormatter,ticks:t.ticks,type:t.type,unit:t.unit,niceTicks:t.niceTicks}),Cu.createElement(L3e,t))},rm=Cu.memo(N3e,pL);rm.displayName="XAxis";var Su=z(ie()),Gi=z(ie());var T3e=["type"],O3e=["dangerouslySetInnerHTML","ticks","scale"],E3e=["id","scale"];function DU(){return DU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},DU.apply(null,arguments)}function vie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function yie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?vie(Object(r),!0).forEach(function(o){_3e(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):vie(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function _3e(e,t,r){return(t=F3e(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function F3e(e){var t=B3e(e,"string");return typeof t=="symbol"?t:t+""}function B3e(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function LU(e,t){if(e==null)return{};var r,o,n=V3e(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function V3e(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function U3e(e){var t=Mt(),r=(0,Gi.useRef)(null),o=Gk(),{type:n}=e,a=LU(e,T3e),i=Ip(o,"yAxis",n),s=(0,Gi.useMemo)(()=>{if(i!=null)return yie(yie({},a),{},{type:i})},[i,a]);return(0,Gi.useLayoutEffect)(()=>{s!=null&&(r.current===null?t(Xne(s)):r.current!==s&&t(Jne({prev:r.current,next:s})),r.current=s)},[s,t]),(0,Gi.useLayoutEffect)(()=>()=>{r.current&&(t(Qne(r.current)),r.current=null)},[t]),null}function W3e(e){var{yAxisId:t,className:r,width:o,label:n}=e,a=(0,Gi.useRef)(null),i=(0,Gi.useRef)(null),s=Ve(Uk),l=tr(),u=Mt(),d="yAxis",c=Ve(P=>DV(P,t)),f=Ve(P=>ire(P,t)),p=Ve(P=>dD(P,d,t,l)),g=Ve(P=>lV(P,t));if((0,Gi.useLayoutEffect)(()=>{if(!(o!=="auto"||!c||pb(n)||(0,Gi.isValidElement)(n)||g==null)){var P=a.current;if(P){var L=P.getCalculatedWidth();Math.round(c.width)!==Math.round(L)&&u(eae({id:t,width:L}))}}},[p,c,u,n,t,o,g]),c==null||f==null||g==null)return null;var{dangerouslySetInnerHTML:m,ticks:h,scale:k}=e,M=LU(e,O3e),{id:v,scale:b}=g,w=LU(g,E3e);return Su.createElement(Ib,DU({},M,w,{ref:a,labelRef:i,x:f.x,y:f.y,tickTextProps:o==="auto"?{width:void 0}:{width:o},width:c.width,height:c.height,className:et("recharts-".concat(d," ").concat(d),r),viewBox:s,ticks:p,axisType:d,axisId:t}))}var G3e={allowDataOverflow:ko.allowDataOverflow,allowDecimals:ko.allowDecimals,allowDuplicatedCategory:ko.allowDuplicatedCategory,angle:ko.angle,axisLine:Bi.axisLine,hide:!1,includeHidden:ko.includeHidden,interval:ko.interval,label:!1,minTickGap:ko.minTickGap,mirror:ko.mirror,orientation:ko.orientation,padding:ko.padding,reversed:ko.reversed,scale:ko.scale,tick:ko.tick,tickCount:ko.tickCount,tickLine:Bi.tickLine,tickSize:Bi.tickSize,type:ko.type,niceTicks:ko.niceTicks,width:ko.width,yAxisId:0},j3e=e=>{var t=_t(e,G3e);return Su.createElement(Su.Fragment,null,Su.createElement(U3e,{interval:t.interval,id:t.yAxisId,scale:t.scale,type:t.type,domain:t.domain,allowDataOverflow:t.allowDataOverflow,dataKey:t.dataKey,allowDuplicatedCategory:t.allowDuplicatedCategory,allowDecimals:t.allowDecimals,tickCount:t.tickCount,padding:t.padding,includeHidden:t.includeHidden,reversed:t.reversed,ticks:t.ticks,width:t.width,orientation:t.orientation,mirror:t.mirror,hide:t.hide,unit:t.unit,name:t.name,angle:t.angle,minTickGap:t.minTickGap,tick:t.tick,tickFormatter:t.tickFormatter,niceTicks:t.niceTicks}),Su.createElement(W3e,t))},bc=Su.memo(j3e,pL);bc.displayName="YAxis";var lm=z(ie()),zie=z(ie());var Eie=z(ie()),_ie=z(ie());var z3e=(e,t)=>t,Nb=te([z3e,mt,k1,mo,VV,da,Bre,fr],zre);function q3e(e){return"getBBox"in e.currentTarget&&typeof e.currentTarget.getBBox=="function"}function Tb(e){var t=e.currentTarget.getBoundingClientRect(),r,o;if(q3e(e)){var n=e.currentTarget.getBBox();r=n.width>0?t.width/n.width:1,o=n.height>0?t.height/n.height:1}else{var a=e.currentTarget;r=a.offsetWidth>0?t.width/a.offsetWidth:1,o=a.offsetHeight>0?t.height/a.offsetHeight:1}var i=(s,l)=>({relativeX:Math.round((s-t.left)/r),relativeY:Math.round((l-t.top)/o)});return"touches"in e?Array.from(e.touches).map(s=>i(s.clientX,s.clientY)):i(e.clientX,e.clientY)}var NU=wo("mouseClick"),TU=du();TU.startListening({actionCreator:NU,effect:(e,t)=>{var r=e.payload,o=Nb(t.getState(),Tb(r));o?.activeIndex!=null&&t.dispatch(Mre({activeIndex:o.activeIndex,activeDataKey:void 0,activeCoordinate:o.activeCoordinate}))}});var mL=wo("mouseMove"),OU=du(),EM=null,om=null,RU=null;OU.startListening({actionCreator:mL,effect:(e,t)=>{var r=e.payload,o=t.getState(),{throttleDelay:n,throttledEvents:a}=o.eventSettings,i=a==="all"||a?.includes("mousemove");EM!==null&&(cancelAnimationFrame(EM),EM=null),om!==null&&(typeof n!="number"||!i)&&(clearTimeout(om),om=null),RU=Tb(r);var s=()=>{var l=t.getState(),u=ic(l,l.tooltip.settings.shared);if(!RU){EM=null,om=null;return}if(u==="axis"){var d=Nb(l,RU);d?.activeIndex!=null?t.dispatch(mD({activeIndex:d.activeIndex,activeDataKey:void 0,activeCoordinate:d.activeCoordinate})):t.dispatch(pD())}EM=null,om=null};if(!i){s();return}n==="raf"?EM=requestAnimationFrame(s):typeof n=="number"&&om===null&&(om=setTimeout(s,n))}});function xie(e,t){return t instanceof HTMLElement?"HTMLElement <".concat(t.tagName,' class="').concat(t.className,'">'):t===window?"global.window":e==="children"&&typeof t=="object"&&t!==null?"<<CHILDREN>>":t}var bie={accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,barSize:void 0,className:void 0,maxBarSize:void 0,stackOffset:"none",syncId:void 0,syncMethod:"index",baseValue:void 0,reverseStackOrder:!1},wie=er({name:"rootProps",initialState:bie,reducers:{updateOptions:(e,t)=>{var r;e.accessibilityLayer=t.payload.accessibilityLayer,e.barCategoryGap=t.payload.barCategoryGap,e.barGap=(r=t.payload.barGap)!==null&&r!==void 0?r:bie.barGap,e.barSize=t.payload.barSize,e.maxBarSize=t.payload.maxBarSize,e.stackOffset=t.payload.stackOffset,e.syncId=t.payload.syncId,e.syncMethod=t.payload.syncMethod,e.className=t.payload.className,e.baseValue=t.payload.baseValue,e.reverseStackOrder=t.payload.reverseStackOrder}}}),Cie=wie.reducer,{updateOptions:Sie}=wie.actions;var H3e=null,K3e={updatePolarOptions:(e,t)=>e===null?t.payload:(e.startAngle=t.payload.startAngle,e.endAngle=t.payload.endAngle,e.cx=t.payload.cx,e.cy=t.payload.cy,e.innerRadius=t.payload.innerRadius,e.outerRadius=t.payload.outerRadius,e)},Pie=er({name:"polarOptions",initialState:H3e,reducers:K3e}),{updatePolarOptions:Aie}=Pie.actions,Iie=Pie.reducer;var EU=wo("keyDown"),_U=wo("focus"),FU=wo("blur"),Ob=du(),_M=null,nm=null,gL=null;Ob.startListening({actionCreator:EU,effect:(e,t)=>{gL=e.payload,_M!==null&&(cancelAnimationFrame(_M),_M=null);var r=t.getState(),{throttleDelay:o,throttledEvents:n}=r.eventSettings,a=n==="all"||n.includes("keydown");nm!==null&&(typeof o!="number"||!a)&&(clearTimeout(nm),nm=null);var i=()=>{try{var s=t.getState(),l=s.rootProps.accessibilityLayer!==!1;if(!l)return;var{keyboardInteraction:u}=s.tooltip,d=gL;if(d!=="ArrowRight"&&d!=="ArrowLeft"&&d!=="Enter")return;var c=sc(u,yu(s),ku(s),uc(s)),f=c==null?-1:Number(c),p=!Number.isFinite(f)||f<0,g=da(s),m=yu(s),h=ic(s,s.tooltip.settings.shared);if(d==="Enter"){if(p)return;var k=ub(s,h,"hover",String(u.index));t.dispatch(sb({active:!u.active,activeIndex:u.index,activeCoordinate:k}));return}var M=sre(s),v=M==="left-to-right"?1:-1,b=d==="ArrowRight"?1:-1,w;if(p){var P=ku(s),L=uc(s),C=b*v,F=se=>({active:!1,index:String(se),dataKey:void 0,graphicalItemId:void 0,coordinate:void 0});if(w=-1,C>0){for(var T=0;T<m.length;T++)if(sc(F(T),m,P,L)!=null){w=T;break}}else for(var G=m.length-1;G>=0;G--)if(sc(F(G),m,P,L)!=null){w=G;break}if(w<0)return}else{w=f+b*v;var $=g?.length||m.length;if($===0||w>=$||w<0)return}var oe=ub(s,h,"hover",String(w));t.dispatch(sb({active:!0,activeIndex:w.toString(),activeCoordinate:oe}))}finally{_M=null,nm=null}};if(!a){i();return}o==="raf"?_M=requestAnimationFrame(i):typeof o=="number"&&nm===null&&(i(),gL=null,nm=setTimeout(()=>{gL?i():(nm=null,_M=null)},o))}});Ob.startListening({actionCreator:_U,effect:(e,t)=>{var r=t.getState(),o=r.rootProps.accessibilityLayer!==!1;if(o){var{keyboardInteraction:n}=r.tooltip;if(!n.active&&n.index==null){var a="0",i=ic(r,r.tooltip.settings.shared),s=ub(r,i,"hover",String(a));t.dispatch(sb({active:!0,activeIndex:a,activeCoordinate:s}))}}}});Ob.startListening({actionCreator:FU,effect:(e,t)=>{var r=t.getState(),o=r.rootProps.accessibilityLayer!==!1;if(o){var{keyboardInteraction:n}=r.tooltip;n.active&&t.dispatch(sb({active:!1,activeIndex:n.index,activeCoordinate:n.coordinate}))}}});function kL(e){e.persist();var{currentTarget:t}=e;return new Proxy(e,{get:(r,o)=>{if(o==="currentTarget")return t;var n=Reflect.get(r,o);return typeof n=="function"?n.bind(r):n}})}var Ya=wo("externalEvent"),VU=du(),ML=new Map,Eb=new Map,BU=new Map;VU.startListening({actionCreator:Ya,effect:(e,t)=>{var{handler:r,reactEvent:o}=e.payload;if(r!=null){var n=o.type,a=kL(o);BU.set(n,{handler:r,reactEvent:a});var i=ML.get(n);i!==void 0&&(cancelAnimationFrame(i),ML.delete(n));var s=t.getState(),{throttleDelay:l,throttledEvents:u}=s.eventSettings,d=u,c=d==="all"||d?.includes(n),f=Eb.get(n);f!==void 0&&(typeof l!="number"||!c)&&(clearTimeout(f),Eb.delete(n));var p=()=>{var h=BU.get(n);try{if(!h)return;var{handler:k,reactEvent:M}=h,v=t.getState(),b={activeCoordinate:jV(v),activeDataKey:MM(v),activeIndex:Ei(v),activeLabel:xD(v),activeTooltipIndex:Ei(v),isTooltipActive:zV(v)};k&&k(b,M)}finally{ML.delete(n),Eb.delete(n),BU.delete(n)}};if(!c){p();return}if(l==="raf"){var g=requestAnimationFrame(p);ML.set(n,g)}else if(typeof l=="number"){if(!Eb.has(n)){p();var m=setTimeout(p,l);Eb.set(n,m)}}else p()}}});var $3e=te([vu],e=>e.tooltipItemPayloads),Die=te([$3e,(e,t)=>t,(e,t,r)=>r],(e,t,r)=>{if(t!=null){var o=e.find(a=>a.settings.graphicalItemId===r);if(o!=null){var{getPosition:n}=o;if(n!=null)return n(t)}}});var UU=wo("touchMove"),WU=du(),am=null,wc=null,Lie=null,_b=null;WU.startListening({actionCreator:UU,effect:(e,t)=>{var r=e.payload;if(!(r.touches==null||r.touches.length===0)){_b=kL(r);var o=t.getState(),{throttleDelay:n,throttledEvents:a}=o.eventSettings,i=a==="all"||a.includes("touchmove");am!==null&&(cancelAnimationFrame(am),am=null),wc!==null&&(typeof n!="number"||!i)&&(clearTimeout(wc),wc=null),Lie=Array.from(r.touches).map(l=>Tb({clientX:l.clientX,clientY:l.clientY,currentTarget:r.currentTarget}));var s=()=>{if(_b!=null){var l=t.getState(),u=ic(l,l.tooltip.settings.shared);if(u==="axis"){var d,c=(d=Lie)===null||d===void 0?void 0:d[0];if(c==null){am=null,wc=null;return}var f=Nb(l,c);f?.activeIndex!=null&&t.dispatch(mD({activeIndex:f.activeIndex,activeDataKey:void 0,activeCoordinate:f.activeCoordinate}))}else if(u==="item"){var p,g=_b.touches[0];if(document.elementFromPoint==null||g==null)return;var m=document.elementFromPoint(g.clientX,g.clientY);if(!m||!m.getAttribute)return;var h=m.getAttribute(NI),k=(p=m.getAttribute(TI))!==null&&p!==void 0?p:void 0,M=lc(l).find(w=>w.id===k);if(h==null||M==null||k==null)return;var{dataKey:v}=M,b=Die(l,h,k);t.dispatch(fD({activeDataKey:v,activeIndex:h,activeCoordinate:b,activeGraphicalItemId:k}))}am=null,wc=null}};if(!i){s();return}n==="raf"?am=requestAnimationFrame(s):typeof n=="number"&&wc===null&&(s(),_b=null,wc=setTimeout(()=>{_b?s():(wc=null,am=null)},n))}}});var Fb={throttleDelay:"raf",throttledEvents:["mousemove","touchmove","pointermove","scroll","wheel"]},Rie=er({name:"eventSettings",initialState:Fb,reducers:{setEventSettings:(e,t)=>{t.payload.throttleDelay!=null&&(e.throttleDelay=t.payload.throttleDelay),t.payload.throttledEvents!=null&&(e.throttledEvents=t.payload.throttledEvents)}}}),{setEventSettings:Nie}=Rie.actions,Tie=Rie.reducer;var Y3e=iI({brush:kae,cartesianAxis:tae,chartData:moe,errorBars:_ae,eventSettings:Tie,graphicalItems:Wne,layout:RJ,legend:KJ,options:uoe,polarAxis:nne,polarOptions:Iie,referenceElements:vae,renderedTicks:Rae,rootProps:Cie,tooltip:hre,zIndex:Qre}),Oie=function(t){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"Chart";return pJ({reducer:Y3e,preloadedState:t,middleware:o=>{var n;return o({serializableCheck:!1,immutableCheck:!["commonjs","es6","production"].includes((n="es6")!==null&&n!==void 0?n:"")}).concat([TU.middleware,OU.middleware,Ob.middleware,VU.middleware,WU.middleware])},enhancers:o=>{var n=o;return typeof o=="function"&&(n=o()),n.concat($B({type:"raf"}))},devTools:Di.devToolsEnabled&&{serialize:{replacer:xie},name:"recharts-".concat(r)}})};function hL(e){var{preloadedState:t,children:r,reduxStoreName:o}=e,n=tr(),a=(0,_ie.useRef)(null);if(n)return r;a.current==null&&(a.current=Oie(t,o));var i=cx;return Eie.createElement(tQ,{context:i,store:a.current},r)}var vL=z(ie());function Z3e(e){var{layout:t,margin:r}=e,o=Mt(),n=tr();return(0,vL.useEffect)(()=>{n||(o(IJ(t)),o(XB(r)))},[o,n,t,r]),null}var yL=(0,vL.memo)(Z3e,Ii);var Fie=z(ie());function xL(e){var t=Mt();return(0,Fie.useEffect)(()=>{t(Sie(e))},[t,e]),null}var bL=z(ie());var X3e=e=>{var t=Mt();return(0,bL.useEffect)(()=>{t(Nie(e))},[t,e]),null},wL=(0,bL.memo)(X3e,Ii);var Pu=z(ie()),Gie=z(ie());var sm=z(ie()),jU=z(ie());var im=z(ie()),CL=z(ie());function Bie(e){var{zIndex:t,isPanorama:r}=e,o=(0,CL.useRef)(null),n=Mt();return(0,CL.useLayoutEffect)(()=>(o.current&&n(Xre({zIndex:t,element:o.current,isPanorama:r})),()=>{n(Jre({zIndex:t,isPanorama:r}))}),[n,t,r]),im.createElement("g",{tabIndex:-1,ref:o,className:"recharts-zIndex-layer_".concat(t)})}function GU(e){var{children:t,isPanorama:r}=e,o=Ve(Hre);if(!o||o.length===0)return t;var n=o.filter(i=>i<0),a=o.filter(i=>i>0);return im.createElement(im.Fragment,null,n.map(i=>im.createElement(Bie,{key:i,zIndex:i,isPanorama:r})),t,a.map(i=>im.createElement(Bie,{key:i,zIndex:i,isPanorama:r})))}var J3e=["children"];function Q3e(e,t){if(e==null)return{};var r,o,n=eVe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function eVe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function SL(){return SL=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},SL.apply(null,arguments)}var tVe={width:"100%",height:"100%",display:"block"},rVe=(0,jU.forwardRef)((e,t)=>{var r=BI(),o=VI(),n=GI();if(!cu(r)||!cu(o))return null;var{children:a,otherAttributes:i,title:s,desc:l}=e,u,d;return i!=null&&(typeof i.tabIndex=="number"?u=i.tabIndex:u=n?0:void 0,typeof i.role=="string"?d=i.role:d=n?"application":void 0),sm.createElement(GF,SL({},i,{title:s,desc:l,role:d,tabIndex:u,width:r,height:o,style:tVe,ref:t}),a)}),oVe=e=>{var{children:t}=e,r=Ve(yp);if(!r)return null;var{width:o,height:n,y:a,x:i}=r;return sm.createElement(GF,{width:o,height:n,x:i,y:a},t)},zU=(0,jU.forwardRef)((e,t)=>{var{children:r}=e,o=Q3e(e,J3e),n=tr();return n?sm.createElement(oVe,null,sm.createElement(GU,{isPanorama:!0},r)):sm.createElement(rVe,SL({ref:t},o),sm.createElement(GU,{isPanorama:!1},r))});var Wr=z(ie()),zt=z(ie());var PL=z(ie());function Vie(){var e=Mt(),[t,r]=(0,PL.useState)(null),o=Ve(UJ);return(0,PL.useEffect)(()=>{if(t!=null){var n=t.getBoundingClientRect(),a=n.width/t.offsetWidth;lt(a)&&a!==o&&e(LJ(a))}},[t,e,o]),r}function Uie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function nVe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Uie(Object(r),!0).forEach(function(o){aVe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Uie(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function aVe(e,t,r){return(t=iVe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function iVe(e){var t=sVe(e,"string");return typeof t=="symbol"?t:t+""}function sVe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function Cc(){return Cc=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},Cc.apply(null,arguments)}var lVe=()=>(koe(),null);function AL(e){if(typeof e=="number")return e;if(typeof e=="string"){var t=parseFloat(e);if(!Number.isNaN(t))return t}return 0}var uVe=(0,zt.forwardRef)((e,t)=>{var r,o,n=(0,zt.useRef)(null),[a,i]=(0,zt.useState)({containerWidth:AL((r=e.style)===null||r===void 0?void 0:r.width),containerHeight:AL((o=e.style)===null||o===void 0?void 0:o.height)}),s=(0,zt.useCallback)((u,d)=>{i(c=>{var f=Math.round(u),p=Math.round(d);return c.containerWidth===f&&c.containerHeight===p?c:{containerWidth:f,containerHeight:p}})},[]),l=(0,zt.useCallback)(u=>{if(typeof t=="function"&&t(u),n.current!=null&&(n.current.disconnect(),n.current=null),u!=null&&typeof ResizeObserver<"u"){var{width:d,height:c}=u.getBoundingClientRect();s(d,c);var f=g=>{var m=g[0];if(m!=null){var{width:h,height:k}=m.contentRect;s(h,k)}},p=new ResizeObserver(f);p.observe(u),n.current=p}},[t,s]);return(0,zt.useEffect)(()=>()=>{var u=n.current;u?.disconnect()},[s]),Wr.createElement(Wr.Fragment,null,Wr.createElement(bp,{width:a.containerWidth,height:a.containerHeight}),Wr.createElement("div",Cc({ref:l},e)))}),dVe=(0,zt.forwardRef)((e,t)=>{var{width:r,height:o}=e,[n,a]=(0,zt.useState)({containerWidth:AL(r),containerHeight:AL(o)}),i=(0,zt.useCallback)((l,u)=>{a(d=>{var c=Math.round(l),f=Math.round(u);return d.containerWidth===c&&d.containerHeight===f?d:{containerWidth:c,containerHeight:f}})},[]),s=(0,zt.useCallback)(l=>{if(typeof t=="function"&&t(l),l!=null){var{width:u,height:d}=l.getBoundingClientRect();i(u,d)}},[t,i]);return Wr.createElement(Wr.Fragment,null,Wr.createElement(bp,{width:n.containerWidth,height:n.containerHeight}),Wr.createElement("div",Cc({ref:s},e)))}),cVe=(0,zt.forwardRef)((e,t)=>{var{width:r,height:o}=e;return Wr.createElement(Wr.Fragment,null,Wr.createElement(bp,{width:r,height:o}),Wr.createElement("div",Cc({ref:t},e)))}),fVe=(0,zt.forwardRef)((e,t)=>{var{width:r,height:o}=e;return typeof r=="string"||typeof o=="string"?Wr.createElement(dVe,Cc({},e,{ref:t})):typeof r=="number"&&typeof o=="number"?Wr.createElement(cVe,Cc({},e,{width:r,height:o,ref:t})):Wr.createElement(Wr.Fragment,null,Wr.createElement(bp,{width:r,height:o}),Wr.createElement("div",Cc({ref:t},e)))});function pVe(e){return e?uVe:fVe}var Wie=(0,zt.forwardRef)((e,t)=>{var{children:r,className:o,height:n,onClick:a,onContextMenu:i,onDoubleClick:s,onMouseDown:l,onMouseEnter:u,onMouseLeave:d,onMouseMove:c,onMouseUp:f,onTouchEnd:p,onTouchMove:g,onTouchStart:m,style:h,width:k,responsive:M,dispatchTouchEvents:v=!0}=e,b=(0,zt.useRef)(null),w=Mt(),[P,L]=(0,zt.useState)(null),[C,F]=(0,zt.useState)(null),T=Vie(),G=_I(),$=G?.width>0?G.width:k,oe=G?.height>0?G.height:n,se=(0,zt.useCallback)(Pe=>{T(Pe),typeof t=="function"&&t(Pe),L(Pe),F(Pe),Pe!=null&&(b.current=Pe)},[T,t,L,F]),pe=(0,zt.useCallback)(Pe=>{w(NU(Pe)),w(Ya({handler:a,reactEvent:Pe}))},[w,a]),N=(0,zt.useCallback)(Pe=>{w(mL(Pe)),w(Ya({handler:u,reactEvent:Pe}))},[w,u]),R=(0,zt.useCallback)(Pe=>{w(pD()),w(Ya({handler:d,reactEvent:Pe}))},[w,d]),U=(0,zt.useCallback)(Pe=>{w(mL(Pe)),w(Ya({handler:c,reactEvent:Pe}))},[w,c]),E=(0,zt.useCallback)(()=>{w(_U())},[w]),_=(0,zt.useCallback)(()=>{w(FU())},[w]),B=(0,zt.useCallback)(Pe=>{w(EU(Pe.key))},[w]),j=(0,zt.useCallback)(Pe=>{w(Ya({handler:i,reactEvent:Pe}))},[w,i]),re=(0,zt.useCallback)(Pe=>{w(Ya({handler:s,reactEvent:Pe}))},[w,s]),W=(0,zt.useCallback)(Pe=>{w(Ya({handler:l,reactEvent:Pe}))},[w,l]),K=(0,zt.useCallback)(Pe=>{w(Ya({handler:f,reactEvent:Pe}))},[w,f]),Q=(0,zt.useCallback)(Pe=>{w(Ya({handler:m,reactEvent:Pe}))},[w,m]),ue=(0,zt.useCallback)(Pe=>{v&&w(UU(Pe)),w(Ya({handler:g,reactEvent:Pe}))},[w,v,g]),Ue=(0,zt.useCallback)(Pe=>{w(Ya({handler:p,reactEvent:Pe}))},[w,p]),de=pVe(M);return Wr.createElement(JV.Provider,{value:P},Wr.createElement(lZ.Provider,{value:C},Wr.createElement(de,{width:$??h?.width,height:oe??h?.height,className:et("recharts-wrapper",o),style:nVe({position:"relative",cursor:"default",width:$,height:oe},h),onClick:pe,onContextMenu:j,onDoubleClick:re,onFocus:E,onBlur:_,onKeyDown:B,onMouseDown:W,onMouseEnter:N,onMouseLeave:R,onMouseMove:U,onMouseUp:K,onTouchEnd:Ue,onTouchMove:ue,onTouchStart:Q,ref:se},Wr.createElement(lVe,null),r)))});var mVe=["width","height","responsive","children","className","style","compact","title","desc"];function gVe(e,t){if(e==null)return{};var r,o,n=kVe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function kVe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}var IL=(0,Gie.forwardRef)((e,t)=>{var{width:r,height:o,responsive:n,children:a,className:i,style:s,compact:l,title:u,desc:d}=e,c=gVe(e,mVe),f=Br(c);return l?Pu.createElement(Pu.Fragment,null,Pu.createElement(bp,{width:r,height:o}),Pu.createElement(zU,{otherAttributes:f,title:u,desc:d},a)):Pu.createElement(Wie,{className:i,style:s,width:r,height:o,responsive:n??!1,onClick:e.onClick,onMouseLeave:e.onMouseLeave,onMouseEnter:e.onMouseEnter,onMouseMove:e.onMouseMove,onMouseDown:e.onMouseDown,onMouseUp:e.onMouseUp,onContextMenu:e.onContextMenu,onDoubleClick:e.onDoubleClick,onTouchStart:e.onTouchStart,onTouchMove:e.onTouchMove,onTouchEnd:e.onTouchEnd},Pu.createElement(zU,{otherAttributes:f,title:u,desc:d,ref:t},Pu.createElement(yae,null,a)))});function qU(){return qU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},qU.apply(null,arguments)}function jie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function MVe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?jie(Object(r),!0).forEach(function(o){hVe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):jie(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function hVe(e,t,r){return(t=vVe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function vVe(e){var t=yVe(e,"string");return typeof t=="symbol"?t:t+""}function yVe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var xVe={top:5,right:5,bottom:5,left:5},bVe=MVe({accessibilityLayer:!0,barCategoryGap:"10%",barGap:4,layout:"horizontal",margin:xVe,responsive:!1,reverseStackOrder:!1,stackOffset:"none",syncMethod:"index"},Fb),DL=(0,zie.forwardRef)(function(t,r){var o,n=_t(t.categoricalChartProps,bVe),{chartName:a,defaultTooltipEventType:i,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,categoricalChartProps:u}=t,d={chartName:a,defaultTooltipEventType:i,validateTooltipEventTypes:s,tooltipPayloadSearcher:l,eventEmitter:void 0};return lm.createElement(hL,{preloadedState:{options:d},reduxStoreName:(o=u.id)!==null&&o!==void 0?o:a},lm.createElement(aL,{chartData:u.data}),lm.createElement(yL,{layout:n.layout,margin:n.margin}),lm.createElement(wL,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),lm.createElement(xL,{baseValue:n.baseValue,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),lm.createElement(IL,qU({},n,{ref:r})))});var qie=z(ie()),Hie=z(ie());var wVe=["axis","item"],Bb=(0,Hie.forwardRef)((e,t)=>qie.createElement(DL,{chartName:"BarChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:wVe,tooltipPayloadSearcher:bM,categoricalChartProps:e,ref:t}));var ese=z(ie()),tse=z(ie());var Zie=z(ie()),Sc=z(ie());var Kie=z(ie());function $ie(e){var t=Mt();return(0,Kie.useEffect)(()=>{t(Aie(e))},[t,e]),null}var CVe=["layout"];function HU(){return HU=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var o in r)({}).hasOwnProperty.call(r,o)&&(e[o]=r[o])}return e},HU.apply(null,arguments)}function SVe(e,t){if(e==null)return{};var r,o,n=PVe(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],t.indexOf(r)===-1&&{}.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function PVe(e,t){if(e==null)return{};var r={};for(var o in e)if({}.hasOwnProperty.call(e,o)){if(t.indexOf(o)!==-1)continue;r[o]=e[o]}return r}function Yie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function AVe(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Yie(Object(r),!0).forEach(function(o){IVe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Yie(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function IVe(e,t,r){return(t=DVe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function DVe(e){var t=LVe(e,"string");return typeof t=="symbol"?t:t+""}function LVe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var RVe={top:5,right:5,bottom:5,left:5},KU=AVe({accessibilityLayer:!0,stackOffset:"none",barCategoryGap:"10%",barGap:4,margin:RVe,reverseStackOrder:!1,syncMethod:"index",layout:"radial",responsive:!1,cx:"50%",cy:"50%",innerRadius:0,outerRadius:"80%"},Fb),Xie=(0,Zie.forwardRef)(function(t,r){var o,n=_t(t.categoricalChartProps,KU),{layout:a}=n,i=SVe(n,CVe),{chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:u,tooltipPayloadSearcher:d}=t,c={chartName:s,defaultTooltipEventType:l,validateTooltipEventTypes:u,tooltipPayloadSearcher:d,eventEmitter:void 0};return Sc.createElement(hL,{preloadedState:{options:c},reduxStoreName:(o=n.id)!==null&&o!==void 0?o:s},Sc.createElement(aL,{chartData:n.data}),Sc.createElement(yL,{layout:a,margin:n.margin}),Sc.createElement(wL,{throttleDelay:n.throttleDelay,throttledEvents:n.throttledEvents}),Sc.createElement(xL,{baseValue:void 0,accessibilityLayer:n.accessibilityLayer,barCategoryGap:n.barCategoryGap,maxBarSize:n.maxBarSize,stackOffset:n.stackOffset,barGap:n.barGap,barSize:n.barSize,syncId:n.syncId,syncMethod:n.syncMethod,className:n.className,reverseStackOrder:n.reverseStackOrder}),Sc.createElement($ie,{cx:n.cx,cy:n.cy,startAngle:n.startAngle,endAngle:n.endAngle,innerRadius:n.innerRadius,outerRadius:n.outerRadius}),Sc.createElement(IL,HU({},i,{ref:r})))});function Jie(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable})),r.push.apply(r,o)}return r}function Qie(e){for(var t=1;t<arguments.length;t++){var r=arguments[t]!=null?arguments[t]:{};t%2?Jie(Object(r),!0).forEach(function(o){NVe(e,o,r[o])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):Jie(Object(r)).forEach(function(o){Object.defineProperty(e,o,Object.getOwnPropertyDescriptor(r,o))})}return e}function NVe(e,t,r){return(t=TVe(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function TVe(e){var t=OVe(e,"string");return typeof t=="symbol"?t:t+""}function OVe(e,t){if(typeof e!="object"||!e)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var o=r.call(e,t||"default");if(typeof o!="object")return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var EVe=["item"],_Ve=Qie(Qie({},KU),{},{layout:"centric",startAngle:0,endAngle:360}),Vb=(0,tse.forwardRef)((e,t)=>{var r=_t(e,_Ve);return ese.createElement(Xie,{chartName:"PieChart",defaultTooltipEventType:"item",validateTooltipEventTypes:EVe,tooltipPayloadSearcher:bM,categoricalChartProps:r,ref:t})});var rse=z(ie()),ose=z(ie());var FVe=["axis"],LL=(0,ose.forwardRef)((e,t)=>rse.createElement(DL,{chartName:"ComposedChart",defaultTooltipEventType:"axis",validateTooltipEventTypes:FVe,tooltipPayloadSearcher:bM,categoricalChartProps:e,ref:t}));var Cse=z(ie());var BVe=(e,t)=>{let r=new Array(e.length+t.length);for(let o=0;o<e.length;o++)r[o]=e[o];for(let o=0;o<t.length;o++)r[e.length+o]=t[o];return r},VVe=(e,t)=>({classGroupId:e,validator:t}),use=(e=new Map,t=null,r)=>({nextPart:e,validators:t,classGroupId:r});var nse=[],UVe="arbitrary..",WVe=e=>{let t=jVe(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:o}=e;return{getClassGroupId:i=>{if(i.startsWith("[")&&i.endsWith("]"))return GVe(i);let s=i.split("-"),l=s[0]===""&&s.length>1?1:0;return dse(s,l,t)},getConflictingClassGroupIds:(i,s)=>{if(s){let l=o[i],u=r[i];return l?u?BVe(u,l):l:u||nse}return r[i]||nse}}},dse=(e,t,r)=>{if(e.length-t===0)return r.classGroupId;let n=e[t],a=r.nextPart.get(n);if(a){let u=dse(e,t+1,a);if(u)return u}let i=r.validators;if(i===null)return;let s=t===0?e.join("-"):e.slice(t).join("-"),l=i.length;for(let u=0;u<l;u++){let d=i[u];if(d.validator(s))return d.classGroupId}},GVe=e=>e.slice(1,-1).indexOf(":")===-1?void 0:(()=>{let t=e.slice(1,-1),r=t.indexOf(":"),o=t.slice(0,r);return o?UVe+o:void 0})(),jVe=e=>{let{theme:t,classGroups:r}=e;return zVe(r,t)},zVe=(e,t)=>{let r=use();for(let o in e){let n=e[o];YU(n,r,o,t)}return r},YU=(e,t,r,o)=>{let n=e.length;for(let a=0;a<n;a++){let i=e[a];qVe(i,t,r,o)}},qVe=(e,t,r,o)=>{if(typeof e=="string"){HVe(e,t,r);return}if(typeof e=="function"){KVe(e,t,r,o);return}$Ve(e,t,r,o)},HVe=(e,t,r)=>{let o=e===""?t:cse(t,e);o.classGroupId=r},KVe=(e,t,r,o)=>{if(YVe(e)){YU(e(o),t,r,o);return}t.validators===null&&(t.validators=[]),t.validators.push(VVe(r,e))},$Ve=(e,t,r,o)=>{let n=Object.entries(e),a=n.length;for(let i=0;i<a;i++){let[s,l]=n[i];YU(l,cse(t,s),r,o)}},cse=(e,t)=>{let r=e,o=t.split("-"),n=o.length;for(let a=0;a<n;a++){let i=o[a],s=r.nextPart.get(i);s||(s=use(),r.nextPart.set(i,s)),r=s}return r},YVe=e=>"isThemeGetter"in e&&e.isThemeGetter===!0,ZVe=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=Object.create(null),o=Object.create(null),n=(a,i)=>{r[a]=i,t++,t>e&&(t=0,o=r,r=Object.create(null))};return{get(a){let i=r[a];if(i!==void 0)return i;if((i=o[a])!==void 0)return n(a,i),i},set(a,i){a in r?r[a]=i:n(a,i)}}};var XVe=[],ase=(e,t,r,o,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:r,maybePostfixModifierPosition:o,isExternal:n}),JVe=e=>{let{prefix:t,experimentalParseClassName:r}=e,o=n=>{let a=[],i=0,s=0,l=0,u,d=n.length;for(let m=0;m<d;m++){let h=n[m];if(i===0&&s===0){if(h===":"){a.push(n.slice(l,m)),l=m+1;continue}if(h==="/"){u=m;continue}}h==="["?i++:h==="]"?i--:h==="("?s++:h===")"&&s--}let c=a.length===0?n:n.slice(l),f=c,p=!1;c.endsWith("!")?(f=c.slice(0,-1),p=!0):c.startsWith("!")&&(f=c.slice(1),p=!0);let g=u&&u>l?u-l:void 0;return ase(a,p,f,g)};if(t){let n=t+":",a=o;o=i=>i.startsWith(n)?a(i.slice(n.length)):ase(XVe,!1,i,void 0,!0)}if(r){let n=o;o=a=>r({className:a,parseClassName:n})}return o},QVe=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((r,o)=>{t.set(r,1e6+o)}),r=>{let o=[],n=[];for(let a=0;a<r.length;a++){let i=r[a],s=i[0]==="[",l=t.has(i);s||l?(n.length>0&&(n.sort(),o.push(...n),n=[]),o.push(i)):n.push(i)}return n.length>0&&(n.sort(),o.push(...n)),o}},eUe=e=>({cache:ZVe(e.cacheSize),parseClassName:JVe(e),sortModifiers:QVe(e),postfixLookupClassGroupIds:tUe(e),...WVe(e)}),tUe=e=>{let t=Object.create(null),r=e.postfixLookupClassGroups;if(r)for(let o=0;o<r.length;o++)t[r[o]]=!0;return t},rUe=/\s+/,oUe=(e,t)=>{let{parseClassName:r,getClassGroupId:o,getConflictingClassGroupIds:n,sortModifiers:a,postfixLookupClassGroupIds:i}=t,s=[],l=e.trim().split(rUe),u="";for(let d=l.length-1;d>=0;d-=1){let c=l[d],{isExternal:f,modifiers:p,hasImportantModifier:g,baseClassName:m,maybePostfixModifierPosition:h}=r(c);if(f){u=c+(u.length>0?" "+u:u);continue}let k=!!h,M;if(k){let L=m.substring(0,h);M=o(L);let C=M&&i[M]?o(m):void 0;C&&C!==M&&(M=C,k=!1)}else M=o(m);if(!M){if(!k){u=c+(u.length>0?" "+u:u);continue}if(M=o(m),!M){u=c+(u.length>0?" "+u:u);continue}k=!1}let v=p.length===0?"":p.length===1?p[0]:a(p).join(":"),b=g?v+"!":v,w=b+M;if(s.indexOf(w)>-1)continue;s.push(w);let P=n(M,k);for(let L=0;L<P.length;++L){let C=P[L];s.push(b+C)}u=c+(u.length>0?" "+u:u)}return u},nUe=(...e)=>{let t=0,r,o,n="";for(;t<e.length;)(r=e[t++])&&(o=fse(r))&&(n&&(n+=" "),n+=o);return n},fse=e=>{if(typeof e=="string")return e;let t,r="";for(let o=0;o<e.length;o++)e[o]&&(t=fse(e[o]))&&(r&&(r+=" "),r+=t);return r},aUe=(e,...t)=>{let r,o,n,a,i=l=>{let u=t.reduce((d,c)=>c(d),e());return r=eUe(u),o=r.cache.get,n=r.cache.set,a=s,s(l)},s=l=>{let u=o(l);if(u)return u;let d=oUe(l,r);return n(l,d),d};return a=i,(...l)=>a(nUe(...l))},iUe=[],Eo=e=>{let t=r=>r[e]||iUe;return t.isThemeGetter=!0,t},pse=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,mse=/^\((?:(\w[\w-]*):)?(.+)\)$/i,sUe=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,lUe=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,uUe=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,dUe=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,cUe=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,fUe=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Pc=e=>sUe.test(e),Dt=e=>!!e&&!Number.isNaN(Number(e)),bl=e=>!!e&&Number.isInteger(Number(e)),$U=e=>e.endsWith("%")&&Dt(e.slice(0,-1)),Au=e=>lUe.test(e),gse=()=>!0,pUe=e=>uUe.test(e)&&!dUe.test(e),ZU=()=>!1,mUe=e=>cUe.test(e),gUe=e=>fUe.test(e),kUe=e=>!Ke(e)&&!Ye(e),MUe=e=>e.startsWith("@container")&&(e[10]==="/"&&e[11]!==void 0||e[11]==="s"&&e[16]!==void 0&&e.startsWith("-size/",10)||e[11]==="n"&&e[18]!==void 0&&e.startsWith("-normal/",10)),hUe=e=>Ac(e,hse,ZU),Ke=e=>pse.test(e),um=e=>Ac(e,vse,pUe),ise=e=>Ac(e,PUe,Dt),vUe=e=>Ac(e,xse,gse),yUe=e=>Ac(e,yse,ZU),sse=e=>Ac(e,kse,ZU),xUe=e=>Ac(e,Mse,gUe),RL=e=>Ac(e,bse,mUe),Ye=e=>mse.test(e),Ub=e=>dm(e,vse),bUe=e=>dm(e,yse),lse=e=>dm(e,kse),wUe=e=>dm(e,hse),CUe=e=>dm(e,Mse),NL=e=>dm(e,bse,!0),SUe=e=>dm(e,xse,!0),Ac=(e,t,r)=>{let o=pse.exec(e);return o?o[1]?t(o[1]):r(o[2]):!1},dm=(e,t,r=!1)=>{let o=mse.exec(e);return o?o[1]?t(o[1]):r:!1},kse=e=>e==="position"||e==="percentage",Mse=e=>e==="image"||e==="url",hse=e=>e==="length"||e==="size"||e==="bg-size",vse=e=>e==="length",PUe=e=>e==="number",yse=e=>e==="family-name",xse=e=>e==="number"||e==="weight",bse=e=>e==="shadow";var AUe=()=>{let e=Eo("color"),t=Eo("font"),r=Eo("text"),o=Eo("font-weight"),n=Eo("tracking"),a=Eo("leading"),i=Eo("breakpoint"),s=Eo("container"),l=Eo("spacing"),u=Eo("radius"),d=Eo("shadow"),c=Eo("inset-shadow"),f=Eo("text-shadow"),p=Eo("drop-shadow"),g=Eo("blur"),m=Eo("perspective"),h=Eo("aspect"),k=Eo("ease"),M=Eo("animate"),v=()=>["auto","avoid","all","avoid-page","page","left","right","column"],b=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],w=()=>[...b(),Ye,Ke],P=()=>["auto","hidden","clip","visible","scroll"],L=()=>["auto","contain","none"],C=()=>[Ye,Ke,l],F=()=>[Pc,"full","auto",...C()],T=()=>[bl,"none","subgrid",Ye,Ke],G=()=>["auto",{span:["full",bl,Ye,Ke]},bl,Ye,Ke],$=()=>[bl,"auto",Ye,Ke],oe=()=>["auto","min","max","fr",Ye,Ke],se=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],pe=()=>["start","end","center","stretch","center-safe","end-safe"],N=()=>["auto",...C()],R=()=>[Pc,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...C()],U=()=>[Pc,"screen","full","dvw","lvw","svw","min","max","fit",...C()],E=()=>[Pc,"screen","full","lh","dvh","lvh","svh","min","max","fit",...C()],_=()=>[e,Ye,Ke],B=()=>[...b(),lse,sse,{position:[Ye,Ke]}],j=()=>["no-repeat",{repeat:["","x","y","space","round"]}],re=()=>["auto","cover","contain",wUe,hUe,{size:[Ye,Ke]}],W=()=>[$U,Ub,um],K=()=>["","none","full",u,Ye,Ke],Q=()=>["",Dt,Ub,um],ue=()=>["solid","dashed","dotted","double"],Ue=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],de=()=>[Dt,$U,lse,sse],Pe=()=>["","none",g,Ye,Ke],Oe=()=>["none",Dt,Ye,Ke],Y=()=>["none",Dt,Ye,Ke],Je=()=>[Dt,Ye,Ke],_e=()=>[Pc,"full",...C()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Au],breakpoint:[Au],color:[gse],container:[Au],"drop-shadow":[Au],ease:["in","out","in-out"],font:[kUe],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Au],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Au],shadow:[Au],spacing:["px",Dt],text:[Au],"text-shadow":[Au],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Pc,Ke,Ye,h]}],container:["container"],"container-type":[{"@container":["","normal","size",Ye,Ke]}],"container-named":[MUe],columns:[{columns:[Dt,Ke,Ye,s]}],"break-after":[{"break-after":v()}],"break-before":[{"break-before":v()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:w()}],overflow:[{overflow:P()}],"overflow-x":[{"overflow-x":P()}],"overflow-y":[{"overflow-y":P()}],overscroll:[{overscroll:L()}],"overscroll-x":[{"overscroll-x":L()}],"overscroll-y":[{"overscroll-y":L()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[bl,"auto",Ye,Ke]}],basis:[{basis:[Pc,"full","auto",s,...C()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[Dt,Pc,"auto","initial","none",Ke]}],grow:[{grow:["",Dt,Ye,Ke]}],shrink:[{shrink:["",Dt,Ye,Ke]}],order:[{order:[bl,"first","last","none",Ye,Ke]}],"grid-cols":[{"grid-cols":T()}],"col-start-end":[{col:G()}],"col-start":[{"col-start":$()}],"col-end":[{"col-end":$()}],"grid-rows":[{"grid-rows":T()}],"row-start-end":[{row:G()}],"row-start":[{"row-start":$()}],"row-end":[{"row-end":$()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":oe()}],"auto-rows":[{"auto-rows":oe()}],gap:[{gap:C()}],"gap-x":[{"gap-x":C()}],"gap-y":[{"gap-y":C()}],"justify-content":[{justify:[...se(),"normal"]}],"justify-items":[{"justify-items":[...pe(),"normal"]}],"justify-self":[{"justify-self":["auto",...pe()]}],"align-content":[{content:["normal",...se()]}],"align-items":[{items:[...pe(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...pe(),{baseline:["","last"]}]}],"place-content":[{"place-content":se()}],"place-items":[{"place-items":[...pe(),"baseline"]}],"place-self":[{"place-self":["auto",...pe()]}],p:[{p:C()}],px:[{px:C()}],py:[{py:C()}],ps:[{ps:C()}],pe:[{pe:C()}],pbs:[{pbs:C()}],pbe:[{pbe:C()}],pt:[{pt:C()}],pr:[{pr:C()}],pb:[{pb:C()}],pl:[{pl:C()}],m:[{m:N()}],mx:[{mx:N()}],my:[{my:N()}],ms:[{ms:N()}],me:[{me:N()}],mbs:[{mbs:N()}],mbe:[{mbe:N()}],mt:[{mt:N()}],mr:[{mr:N()}],mb:[{mb:N()}],ml:[{ml:N()}],"space-x":[{"space-x":C()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":C()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],"inline-size":[{inline:["auto",...U()]}],"min-inline-size":[{"min-inline":["auto",...U()]}],"max-inline-size":[{"max-inline":["none",...U()]}],"block-size":[{block:["auto",...E()]}],"min-block-size":[{"min-block":["auto",...E()]}],"max-block-size":[{"max-block":["none",...E()]}],w:[{w:[s,"screen",...R()]}],"min-w":[{"min-w":[s,"screen","none",...R()]}],"max-w":[{"max-w":[s,"screen","none","prose",{screen:[i]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",r,Ub,um]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[o,SUe,vUe]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",$U,Ke]}],"font-family":[{font:[bUe,yUe,t]}],"font-features":[{"font-features":[Ke]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,Ye,Ke]}],"line-clamp":[{"line-clamp":[Dt,"none",Ye,ise]}],leading:[{leading:[a,...C()]}],"list-image":[{"list-image":["none",Ye,Ke]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",Ye,Ke]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:_()}],"text-color":[{text:_()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...ue(),"wavy"]}],"text-decoration-thickness":[{decoration:[Dt,"from-font","auto",Ye,um]}],"text-decoration-color":[{decoration:_()}],"underline-offset":[{"underline-offset":[Dt,"auto",Ye,Ke]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:C()}],"tab-size":[{tab:[bl,Ye,Ke]}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",Ye,Ke]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",Ye,Ke]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:B()}],"bg-repeat":[{bg:j()}],"bg-size":[{bg:re()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},bl,Ye,Ke],radial:["",Ye,Ke],conic:[bl,Ye,Ke]},CUe,xUe]}],"bg-color":[{bg:_()}],"gradient-from-pos":[{from:W()}],"gradient-via-pos":[{via:W()}],"gradient-to-pos":[{to:W()}],"gradient-from":[{from:_()}],"gradient-via":[{via:_()}],"gradient-to":[{to:_()}],rounded:[{rounded:K()}],"rounded-s":[{"rounded-s":K()}],"rounded-e":[{"rounded-e":K()}],"rounded-t":[{"rounded-t":K()}],"rounded-r":[{"rounded-r":K()}],"rounded-b":[{"rounded-b":K()}],"rounded-l":[{"rounded-l":K()}],"rounded-ss":[{"rounded-ss":K()}],"rounded-se":[{"rounded-se":K()}],"rounded-ee":[{"rounded-ee":K()}],"rounded-es":[{"rounded-es":K()}],"rounded-tl":[{"rounded-tl":K()}],"rounded-tr":[{"rounded-tr":K()}],"rounded-br":[{"rounded-br":K()}],"rounded-bl":[{"rounded-bl":K()}],"border-w":[{border:Q()}],"border-w-x":[{"border-x":Q()}],"border-w-y":[{"border-y":Q()}],"border-w-s":[{"border-s":Q()}],"border-w-e":[{"border-e":Q()}],"border-w-bs":[{"border-bs":Q()}],"border-w-be":[{"border-be":Q()}],"border-w-t":[{"border-t":Q()}],"border-w-r":[{"border-r":Q()}],"border-w-b":[{"border-b":Q()}],"border-w-l":[{"border-l":Q()}],"divide-x":[{"divide-x":Q()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Q()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...ue(),"hidden","none"]}],"divide-style":[{divide:[...ue(),"hidden","none"]}],"border-color":[{border:_()}],"border-color-x":[{"border-x":_()}],"border-color-y":[{"border-y":_()}],"border-color-s":[{"border-s":_()}],"border-color-e":[{"border-e":_()}],"border-color-bs":[{"border-bs":_()}],"border-color-be":[{"border-be":_()}],"border-color-t":[{"border-t":_()}],"border-color-r":[{"border-r":_()}],"border-color-b":[{"border-b":_()}],"border-color-l":[{"border-l":_()}],"divide-color":[{divide:_()}],"outline-style":[{outline:[...ue(),"none","hidden"]}],"outline-offset":[{"outline-offset":[Dt,Ye,Ke]}],"outline-w":[{outline:["",Dt,Ub,um]}],"outline-color":[{outline:_()}],shadow:[{shadow:["","none",d,NL,RL]}],"shadow-color":[{shadow:_()}],"inset-shadow":[{"inset-shadow":["none",c,NL,RL]}],"inset-shadow-color":[{"inset-shadow":_()}],"ring-w":[{ring:Q()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:_()}],"ring-offset-w":[{"ring-offset":[Dt,um]}],"ring-offset-color":[{"ring-offset":_()}],"inset-ring-w":[{"inset-ring":Q()}],"inset-ring-color":[{"inset-ring":_()}],"text-shadow":[{"text-shadow":["none",f,NL,RL]}],"text-shadow-color":[{"text-shadow":_()}],opacity:[{opacity:[Dt,Ye,Ke]}],"mix-blend":[{"mix-blend":[...Ue(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":Ue()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[Dt]}],"mask-image-linear-from-pos":[{"mask-linear-from":de()}],"mask-image-linear-to-pos":[{"mask-linear-to":de()}],"mask-image-linear-from-color":[{"mask-linear-from":_()}],"mask-image-linear-to-color":[{"mask-linear-to":_()}],"mask-image-t-from-pos":[{"mask-t-from":de()}],"mask-image-t-to-pos":[{"mask-t-to":de()}],"mask-image-t-from-color":[{"mask-t-from":_()}],"mask-image-t-to-color":[{"mask-t-to":_()}],"mask-image-r-from-pos":[{"mask-r-from":de()}],"mask-image-r-to-pos":[{"mask-r-to":de()}],"mask-image-r-from-color":[{"mask-r-from":_()}],"mask-image-r-to-color":[{"mask-r-to":_()}],"mask-image-b-from-pos":[{"mask-b-from":de()}],"mask-image-b-to-pos":[{"mask-b-to":de()}],"mask-image-b-from-color":[{"mask-b-from":_()}],"mask-image-b-to-color":[{"mask-b-to":_()}],"mask-image-l-from-pos":[{"mask-l-from":de()}],"mask-image-l-to-pos":[{"mask-l-to":de()}],"mask-image-l-from-color":[{"mask-l-from":_()}],"mask-image-l-to-color":[{"mask-l-to":_()}],"mask-image-x-from-pos":[{"mask-x-from":de()}],"mask-image-x-to-pos":[{"mask-x-to":de()}],"mask-image-x-from-color":[{"mask-x-from":_()}],"mask-image-x-to-color":[{"mask-x-to":_()}],"mask-image-y-from-pos":[{"mask-y-from":de()}],"mask-image-y-to-pos":[{"mask-y-to":de()}],"mask-image-y-from-color":[{"mask-y-from":_()}],"mask-image-y-to-color":[{"mask-y-to":_()}],"mask-image-radial":[{"mask-radial":[Ye,Ke]}],"mask-image-radial-from-pos":[{"mask-radial-from":de()}],"mask-image-radial-to-pos":[{"mask-radial-to":de()}],"mask-image-radial-from-color":[{"mask-radial-from":_()}],"mask-image-radial-to-color":[{"mask-radial-to":_()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":b()}],"mask-image-conic-pos":[{"mask-conic":[Dt]}],"mask-image-conic-from-pos":[{"mask-conic-from":de()}],"mask-image-conic-to-pos":[{"mask-conic-to":de()}],"mask-image-conic-from-color":[{"mask-conic-from":_()}],"mask-image-conic-to-color":[{"mask-conic-to":_()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:B()}],"mask-repeat":[{mask:j()}],"mask-size":[{mask:re()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",Ye,Ke]}],filter:[{filter:["","none",Ye,Ke]}],blur:[{blur:Pe()}],brightness:[{brightness:[Dt,Ye,Ke]}],contrast:[{contrast:[Dt,Ye,Ke]}],"drop-shadow":[{"drop-shadow":["","none",p,NL,RL]}],"drop-shadow-color":[{"drop-shadow":_()}],grayscale:[{grayscale:["",Dt,Ye,Ke]}],"hue-rotate":[{"hue-rotate":[Dt,Ye,Ke]}],invert:[{invert:["",Dt,Ye,Ke]}],saturate:[{saturate:[Dt,Ye,Ke]}],sepia:[{sepia:["",Dt,Ye,Ke]}],"backdrop-filter":[{"backdrop-filter":["","none",Ye,Ke]}],"backdrop-blur":[{"backdrop-blur":Pe()}],"backdrop-brightness":[{"backdrop-brightness":[Dt,Ye,Ke]}],"backdrop-contrast":[{"backdrop-contrast":[Dt,Ye,Ke]}],"backdrop-grayscale":[{"backdrop-grayscale":["",Dt,Ye,Ke]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[Dt,Ye,Ke]}],"backdrop-invert":[{"backdrop-invert":["",Dt,Ye,Ke]}],"backdrop-opacity":[{"backdrop-opacity":[Dt,Ye,Ke]}],"backdrop-saturate":[{"backdrop-saturate":[Dt,Ye,Ke]}],"backdrop-sepia":[{"backdrop-sepia":["",Dt,Ye,Ke]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":C()}],"border-spacing-x":[{"border-spacing-x":C()}],"border-spacing-y":[{"border-spacing-y":C()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",Ye,Ke]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[Dt,"initial",Ye,Ke]}],ease:[{ease:["linear","initial",k,Ye,Ke]}],delay:[{delay:[Dt,Ye,Ke]}],animate:[{animate:["none",M,Ye,Ke]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[m,Ye,Ke]}],"perspective-origin":[{"perspective-origin":w()}],rotate:[{rotate:Oe()}],"rotate-x":[{"rotate-x":Oe()}],"rotate-y":[{"rotate-y":Oe()}],"rotate-z":[{"rotate-z":Oe()}],scale:[{scale:Y()}],"scale-x":[{"scale-x":Y()}],"scale-y":[{"scale-y":Y()}],"scale-z":[{"scale-z":Y()}],"scale-3d":["scale-3d"],skew:[{skew:Je()}],"skew-x":[{"skew-x":Je()}],"skew-y":[{"skew-y":Je()}],transform:[{transform:[Ye,Ke,"","none","gpu","cpu"]}],"transform-origin":[{origin:w()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:_e()}],"translate-x":[{"translate-x":_e()}],"translate-y":[{"translate-y":_e()}],"translate-z":[{"translate-z":_e()}],"translate-none":["translate-none"],zoom:[{zoom:[bl,Ye,Ke]}],accent:[{accent:_()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:_()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",Ye,Ke]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scrollbar-thumb-color":[{"scrollbar-thumb":_()}],"scrollbar-track-color":[{"scrollbar-track":_()}],"scrollbar-gutter":[{"scrollbar-gutter":["auto","stable","both"]}],"scrollbar-w":[{scrollbar:["auto","thin","none"]}],"scroll-m":[{"scroll-m":C()}],"scroll-mx":[{"scroll-mx":C()}],"scroll-my":[{"scroll-my":C()}],"scroll-ms":[{"scroll-ms":C()}],"scroll-me":[{"scroll-me":C()}],"scroll-mbs":[{"scroll-mbs":C()}],"scroll-mbe":[{"scroll-mbe":C()}],"scroll-mt":[{"scroll-mt":C()}],"scroll-mr":[{"scroll-mr":C()}],"scroll-mb":[{"scroll-mb":C()}],"scroll-ml":[{"scroll-ml":C()}],"scroll-p":[{"scroll-p":C()}],"scroll-px":[{"scroll-px":C()}],"scroll-py":[{"scroll-py":C()}],"scroll-ps":[{"scroll-ps":C()}],"scroll-pe":[{"scroll-pe":C()}],"scroll-pbs":[{"scroll-pbs":C()}],"scroll-pbe":[{"scroll-pbe":C()}],"scroll-pt":[{"scroll-pt":C()}],"scroll-pr":[{"scroll-pr":C()}],"scroll-pb":[{"scroll-pb":C()}],"scroll-pl":[{"scroll-pl":C()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",Ye,Ke]}],fill:[{fill:["none",..._()]}],"stroke-w":[{stroke:[Dt,Ub,um,ise]}],stroke:[{stroke:["none",..._()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{"container-named":["container-type"],overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},postfixLookupClassGroups:["container-type"],orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}};var wse=aUe(AUe);function J(...e){return wse(et(e))}var Sse=z(ze());function IUe({className:e,variant:t="default"}){return J("inline-flex min-w-0 items-center gap-1 rounded-full border px-2 py-0.5 text-[11px] font-medium leading-4",t==="default"&&"border-transparent bg-primary/10 text-primary",t==="secondary"&&"border-border bg-secondary text-secondary-foreground",t==="success"&&"border-emerald-200 bg-emerald-50 text-emerald-700",t==="warning"&&"border-amber-200 bg-amber-50 text-amber-700",t==="danger"&&"border-red-200 bg-red-50 text-red-700",t==="outline"&&"border-border bg-background text-muted-foreground",e)}var gt=Cse.forwardRef(({className:e,variant:t,...r},o)=>(0,Sse.jsx)("span",{className:IUe({className:e,variant:t}),ref:o,...r}));gt.displayName="Badge";var Pse=z(ie());var XU=z(ze());function DUe({className:e,size:t="default",variant:r="default"}){return J("inline-flex shrink-0 select-none items-center justify-center gap-1.5 whitespace-nowrap rounded-md border text-[12px] font-medium leading-4 outline-none transition-[background-color,border-color,color,box-shadow] duration-150 focus-visible:ring-2 focus-visible:ring-ring/25 disabled:pointer-events-none disabled:opacity-45",r==="default"&&"border-primary/70 bg-primary text-primary-foreground shadow-[0_1px_2px_rgba(15,118,110,0.2),inset_0_1px_0_rgba(255,255,255,0.14)] hover:border-primary hover:bg-primary/90 active:bg-primary/80",r==="secondary"&&"border-border bg-secondary text-secondary-foreground shadow-[0_1px_1px_rgba(0,0,0,.04)] hover:bg-muted",r==="ghost"&&"border-transparent bg-transparent text-muted-foreground hover:bg-muted/70 hover:text-foreground",r==="outline"&&"border-input bg-background text-foreground shadow-[0_1px_1px_rgba(0,0,0,.03)] hover:border-muted-foreground/45 hover:bg-muted/55",r==="destructive"&&"border-destructive/80 bg-destructive text-destructive-foreground hover:bg-destructive/90 active:bg-destructive/80",r==="subtle"&&"border-transparent bg-muted text-muted-foreground hover:bg-muted/80 hover:text-foreground",t==="sm"&&"h-7 px-2 text-[11px]",t==="default"&&"h-8 px-3",t==="icon"&&"h-8 w-8 px-0",t==="iconSm"&&"h-7 w-7 px-0",e)}var ne=Pse.forwardRef(({children:e,className:t,size:r="default",type:o,unstyled:n=!1,variant:a="default",...i},s)=>n?(0,XU.jsx)("button",{className:t,ref:s,type:o??"button",...i,children:e}):(0,XU.jsx)("button",{className:DUe({className:t,size:r,variant:a}),ref:s,type:o??"button",...i,children:e}));ne.displayName="Button";var Wb=z(ie());var Gb=z(ze()),or=Wb.forwardRef(({className:e,style:t,...r},o)=>(0,Gb.jsx)("div",{className:J("overflow-hidden rounded-lg border border-border bg-card text-card-foreground transition-shadow duration-200",e),ref:o,style:{boxShadow:"0 1px 2px rgba(0,0,0,0.04), 0 1px 3px rgba(0,0,0,0.02), inset 0 1px 0 rgba(255,255,255,0.5)",...t},...r}));or.displayName="Card";var Gr=Wb.forwardRef(({className:e,...t},r)=>(0,Gb.jsx)("div",{className:J("flex min-h-12 flex-col justify-center border-b border-border/60 px-4 py-3",e),ref:r,...t}));Gr.displayName="CardHeader";var fn=Wb.forwardRef(({className:e,...t},r)=>(0,Gb.jsx)("h2",{className:J("truncate text-[13px] font-semibold leading-5 tracking-[-0.01em]",e),ref:r,...t}));fn.displayName="CardTitle";var nr=Wb.forwardRef(({className:e,...t},r)=>(0,Gb.jsx)("div",{className:J("p-4",e),ref:r,...t}));nr.displayName="CardContent";var Ase=z(ie());var jb=z(ze()),Ic=Ase.forwardRef(({checked:e=!1,className:t,disabled:r,onChange:o,onCheckedChange:n,...a},i)=>(0,jb.jsxs)("span",{className:J("relative inline-flex h-4 w-4 shrink-0",t),children:[(0,jb.jsx)("input",{"aria-checked":e,checked:e,className:"peer absolute inset-0 z-10 h-full w-full cursor-pointer appearance-none rounded border border-input bg-background outline-none transition-[border-color,background-color,box-shadow] checked:border-primary checked:bg-primary hover:border-muted-foreground/45 focus-visible:ring-2 focus-visible:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-50",disabled:r,onChange:s=>{o?.(s),n?.(s.target.checked)},ref:i,type:"checkbox",...a}),(0,jb.jsx)(yt,{className:"pointer-events-none absolute left-1/2 top-1/2 z-20 h-3 w-3 -translate-x-1/2 -translate-y-1/2 text-primary-foreground opacity-0 transition-opacity peer-checked:opacity-100"})]}));Ic.displayName="Checkbox";var As=z(ie());var Iu=z(ze()),Ise=As.createContext(0);function JU({children:e,depth:t=0}){return(0,Iu.jsx)(Ise.Provider,{value:t,children:e})}function Ft({children:e,className:t,onMouseDown:r,onOpenChange:o,open:n=!0,...a}){let i=ln();return n?(0,Iu.jsx)(Qe.div,{animate:{opacity:1},className:J("fixed inset-0 z-50 flex items-center justify-center overflow-hidden bg-black/28 p-3 sm:p-6",t),exit:{opacity:0},initial:{opacity:0},onMouseDown:s=>{r?.(s),!s.defaultPrevented&&s.target===s.currentTarget&&o?.(!1)},transition:i?{duration:.12,ease:"easeOut"}:{duration:.16,ease:[.22,1,.36,1]},...a,children:e}):null}var Tt=As.forwardRef(({className:e,...t},r)=>{let o=ln(),n=As.useContext(Ise),a=Math.max(.96,1-n*.015);return(0,Iu.jsx)(Qe.section,{animate:o?{opacity:1}:{opacity:1,scale:n>0?a:1,y:0},"aria-hidden":n>0?!0:void 0,"aria-modal":n>0?void 0:!0,className:J("flex max-h-[calc(100dvh-1.5rem)] w-full max-w-[680px] flex-col overflow-hidden rounded-md border border-border bg-card shadow-xl",e),exit:o?{opacity:0}:{opacity:0,scale:.98,y:10},initial:o?{opacity:0}:{opacity:0,scale:.98,y:14},ref:r,role:"dialog",transition:o?{duration:.12,ease:"easeOut"}:{type:"spring",stiffness:520,damping:38,mass:.75},...t})});Tt.displayName="DialogContent";var Bt=As.forwardRef(({className:e,...t},r)=>(0,Iu.jsx)("header",{className:J("flex h-12 shrink-0 items-center justify-between border-b border-border px-4",e),ref:r,...t}));Bt.displayName="DialogHeader";var Ot=As.forwardRef(({className:e,...t},r)=>(0,Iu.jsx)("div",{className:J("min-h-0 flex-1 overflow-auto p-4",e),ref:r,...t}));Ot.displayName="DialogBody";var $t=As.forwardRef(({className:e,...t},r)=>(0,Iu.jsx)("footer",{className:J("flex shrink-0 flex-wrap items-center justify-end gap-2 border-t border-border px-4 py-3",e),ref:r,...t}));$t.displayName="DialogFooter";var Vt=As.forwardRef(({className:e,...t},r)=>(0,Iu.jsx)("h2",{className:J("truncate text-[13px] font-semibold",e),ref:r,...t}));Vt.displayName="DialogTitle";var LUe=As.forwardRef(({className:e,...t},r)=>(0,Iu.jsx)("div",{className:J("mt-0.5 flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-muted-foreground",e),ref:r,...t}));LUe.displayName="DialogDescription";var Dse=z(ie());var Lse=z(ze()),Te=Dse.forwardRef(({className:e,type:t,...r},o)=>(0,Lse.jsx)("input",{className:J("flex h-8 w-full min-w-0 rounded-md border border-input bg-background px-3 text-[12px] leading-4 text-foreground shadow-[inset_0_1px_1px_rgba(0,0,0,0.03)] outline-none transition-[background-color,border-color,box-shadow,color] placeholder:text-muted-foreground/75 hover:border-muted-foreground/45 focus:border-primary/60 focus:ring-2 focus:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-50 read-only:bg-muted/35",e),ref:o,...r,type:t}));Te.displayName="Input";var Rse=z(ie());var Nse=z(ze()),pa=Rse.forwardRef(({className:e,...t},r)=>(0,Nse.jsx)("label",{className:J("block min-w-0 space-y-1 text-[12px] font-medium text-foreground",e),ref:r,...t}));pa.displayName="Label";var Tse=z(ie());var Ose=z(ze()),Is=Tse.forwardRef(({className:e,...t},r)=>(0,Ose.jsx)("div",{className:J("rounded-md border border-border bg-popover text-popover-foreground shadow-card-elevated",e),ref:r,...t}));Is.displayName="PopoverContent";var Ese=z(ie());var QU=z(ze()),Jo=Ese.forwardRef(({children:e,className:t,onChange:r,onValueChange:o,options:n,...a},i)=>(0,QU.jsx)("select",{className:J("h-8 w-full min-w-0 appearance-none rounded-md border border-input bg-background bg-[url('data:image/svg+xml;utf8,<svg xmlns=%22http://www.w3.org/2000/svg%22 width=%2212%22 height=%2212%22 viewBox=%220 0 24 24%22 fill=%22none%22 stroke=%22%239aa5b1%22 stroke-width=%222%22 stroke-linecap=%22round%22 stroke-linejoin=%22round%22><path d=%22m6 9 6 6 6-6%22/></svg>')] bg-[length:16px] bg-[right_8px_center] bg-no-repeat px-3 pr-8 text-[12px] text-foreground shadow-[inset_0_1px_1px_rgba(0,0,0,0.03)] outline-none transition-[background-color,border-color,box-shadow,color] hover:border-muted-foreground/45 focus:border-primary/60 focus:ring-2 focus:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-50",t),onChange:s=>{r?.(s),o?.(s.target.value)},ref:i,...a,children:n?n.map(s=>(0,QU.jsx)("option",{disabled:s.disabled,value:s.value,children:s.label},s.value)):e}));Jo.displayName="Select";var _se=z(ie());var FM=z(ze()),Du=_se.forwardRef(({checked:e=!1,className:t,disabled:r,onChange:o,onCheckedChange:n,title:a,...i},s)=>(0,FM.jsxs)("span",{className:J("relative inline-flex h-[30px] w-[54px] shrink-0",t),title:a,children:[(0,FM.jsx)("input",{"aria-checked":e,checked:e,className:"peer absolute inset-0 z-10 h-full w-full cursor-pointer opacity-0 disabled:cursor-not-allowed",disabled:r,onChange:l=>{o?.(l),n?.(l.target.checked)},ref:s,role:"switch",title:a,type:"checkbox",...i}),(0,FM.jsx)("span",{"aria-hidden":"true",className:J("flex h-full w-full items-center rounded-full px-[3px] transition-all duration-200 peer-focus-visible:ring-2 peer-focus-visible:ring-ring/25 peer-disabled:opacity-50",e?"bg-primary shadow-[0_0_0_1px_rgba(15,118,110,0.2)]":"bg-muted shadow-[inset_0_1px_2px_rgba(0,0,0,0.08)]"),children:(0,FM.jsx)("span",{className:J("h-6 w-6 rounded-full bg-white shadow-[0_1px_3px_rgba(0,0,0,0.15)] transition-transform duration-200",e&&"translate-x-[24px]")})})]}));Du.displayName="Switch";var Fse=z(ie());var Bse=z(ze()),ji=Fse.forwardRef(({className:e,...t},r)=>(0,Bse.jsx)("textarea",{className:J("block min-h-[80px] w-full min-w-0 resize-y rounded-md border border-input bg-background px-3 py-2 text-[12px] leading-5 text-foreground shadow-[inset_0_1px_1px_rgba(0,0,0,0.03)] outline-none transition-[background-color,border-color,box-shadow,color] placeholder:text-muted-foreground/75 hover:border-muted-foreground/45 focus:border-primary/60 focus:ring-2 focus:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-50",e),ref:r,...t}));ji.displayName="Textarea";var eW="../../assets/assets/logo-IPLFWCDN.png";var TL="../../assets/assets/claude-code-WX35JWK4.png";var OL="../../assets/assets/codex-3X2KBXKY.png";var tW="../../assets/assets/mascot-transition-DUBPNIIV.svg";var Vse="../../assets/assets/anthropic-CJYB5ODC.png";var Use="../../assets/assets/bailian-6RH6ASGG.ico";var Wse="../../assets/assets/deepseek-ZIDCDTQF.ico";var Gse="../../assets/assets/gemini-7QB7T63T.svg";var jse="../../assets/assets/mistral-2RFSC6K3.webp";var EL="../../assets/assets/moonshot-FNEXMLNW.ico";var zse="../../assets/assets/openai-2EIP7LI2.png";var qse="../../assets/assets/openrouter-CZIFREDB.ico";var Hse="../../assets/assets/siliconflow-QCZUQAH2.png";var Kse="../../assets/assets/zai-global-coding-OMCES3LL.svg";var $se="../../assets/assets/zai-global-general-OMCES3LL.svg";var Yse="../../assets/assets/zhipu-cn-coding-7BBWPUTC.png";var Zse="../../assets/assets/zhipu-cn-general-7BBWPUTC.png";var Xse="../../assets/assets/tray-cyan-C3U4WBE7.png";var Jse="../../assets/assets/tray-orange-VUJTRHBB.png";var Qse="../../assets/assets/tray-violet-EGMLZ2GB.png";var _L="ccr-fusion-builtins",ma="vision_understand",Za="web_search";var FL="CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY",BL={[FL]:"1"};var io={account:"bar",modelShare:"bars",rings:"rings",stats:"cards",tokenFlow:"line",tokenMix:"bars"},zb=["1:1","2:1","3:1","4:1","1:2","2:2","3:2","4:2","1:3","2:3","3:3","4:3","1:4","2:4","3:4","4:4"],cm=[{enabled:!0,id:"system-status",size:"4:1",type:"system-status",variant:"timeline"},{enabled:!0,id:"account-balance",size:"4:2",type:"account-balance",variant:"cards"},{enabled:!0,id:"metric-requests",metric:"requests",size:"1:1",type:"metric",variant:"card"},{enabled:!0,id:"metric-input-tokens",metric:"input-tokens",size:"1:1",type:"metric",variant:"card"},{enabled:!0,id:"metric-output-tokens",metric:"output-tokens",size:"1:1",type:"metric",variant:"card"},{enabled:!0,id:"metric-cache-tokens",metric:"cache-tokens",size:"1:1",type:"metric",variant:"card"},{enabled:!0,id:"metric-cache-ratio",metric:"cache-ratio",size:"1:1",type:"metric",variant:"card"},{enabled:!0,id:"metric-estimated-cost",metric:"estimated-cost",size:"1:1",type:"metric",variant:"card"},{enabled:!0,id:"usage-trend",size:"3:2",type:"usage-trend",variant:"composed"},{enabled:!0,id:"token-activity",size:"4:2",type:"token-activity",variant:"heatmap"},{enabled:!0,id:"token-mix",size:"1:2",type:"token-mix",variant:"bars"},{enabled:!0,id:"client-analysis",size:"2:2",type:"client-analysis",variant:"table"},{enabled:!0,id:"provider-analysis",size:"2:2",type:"provider-analysis",variant:"table"}],VL=["source-tabs","header","account","token-flow","activity","stats","token-mix","rings","model-share","footer"],rW=["source-tabs","header"],oW=["source-tabs","header"],qb=[...VL],Hb=[{id:"source-tabs",type:"source-tabs"},{id:"header",type:"header"},{id:"account",type:"account",variant:io.account},{id:"token-flow",type:"token-flow",variant:io.tokenFlow},{id:"activity",type:"activity"},{id:"stats",type:"stats",variant:io.stats},{id:"token-mix",type:"token-mix",variant:io.tokenMix},{id:"rings",type:"rings",variant:io.rings},{id:"model-share",type:"model-share",variant:io.modelShare}];function nW(e){return e==="ccr"||e==="custom"?e:"global"}function ele(e){return e.enabled&&nW(e.scope)==="global"}function fm(e,t){let r=new Map,o=typeof t=="number"?t:void 0,n=o!==void 0?e[o]:void 0;return o!==void 0&&n&&ele(n)&&r.set(n.agent,o),e.map((a,i)=>{if(!ele(a))return a;let s=r.get(a.agent);return s===void 0?(r.set(a.agent,i),a):s===i?a:{...a,enabled:!1}})}var zi="custom",pm={connectors:[],enabled:!1},aW={connectors:[{auth:"provider-api-key",type:"standard"}],enabled:!0};function XUe(e){let t=e.trim();if(!t)throw new Error("Base URL is required.");let r=new URL(Xa(t));r.username="",r.password="",r.hash="",r.search="",r.pathname=QUe(r.pathname),r.pathname=tWe(r.pathname);let o=mm(r),n=eWe(o),a=n,i=oWe(a)?tle([a,aWe(a,"anthropic")]):[a],s=o,l=rWe(s)?tle([s,nWe(n,"v1")]):[s];return{anthropicBaseUrl:a,anthropicBaseUrlCandidates:i,geminiBaseUrl:n,normalizedInputBaseUrl:o,openaiBaseUrl:s,openaiBaseUrlCandidates:l,raw:t,rootBaseUrl:n}}function Kb(e,t){let r=e.trim();if(!r)return"";try{let o=XUe(r);return t?JUe(o,t):o.normalizedInputBaseUrl}catch{return iWe(r,t)}}function JUe(e,t){return t==="openai_responses"||t==="openai_chat_completions"?e.openaiBaseUrl:t==="anthropic_messages"?e.anthropicBaseUrl:e.geminiBaseUrl}function Xa(e){return/^[a-z][a-z0-9+.-]*:\/\//i.test(e)?e:/^(localhost|127\.|0\.0\.0\.0|\[::1\])/i.test(e)?`http://${e}`:`https://${e}`}function mm(e){let t=e.toString();return t.endsWith("/")?t.slice(0,-1):t}function QUe(e){let t=e.replace(/\/+$/,"")||"/",r=[[/\/v1\/chat\/completions$/i,"/v1"],[/\/chat\/completions$/i,""],[/\/v1\/responses$/i,"/v1"],[/\/responses$/i,""],[/\/v1\/messages$/i,"/v1"],[/\/messages$/i,""],[/\/v1beta\/models\/[^/]+:(generateContent|streamGenerateContent)$/i,"/v1beta"],[/\/v1\/models\/[^/]+:(generateContent|streamGenerateContent)$/i,"/v1"],[/\/v1beta\/interactions(?:\/[^/]+(?:\/cancel)?)?$/i,"/v1beta"],[/\/v1\/interactions(?:\/[^/]+(?:\/cancel)?)?$/i,"/v1"],[/\/interactions(?:\/[^/]+(?:\/cancel)?)?$/i,""],[/\/v1beta\/models$/i,"/v1beta"],[/\/v1\/models$/i,"/v1"],[/\/models$/i,""]];for(let[o,n]of r)if(o.test(t))return t.replace(o,n)||"/";return t}function eWe(e){let t=new URL(e);return t.pathname=t.pathname.replace(/\/(v1|v1beta)$/i,"")||"/",mm(t)}function tWe(e){return e.replace(/(\/v[0-9][a-z0-9-]*)\/v1$/i,"$1")||"/"}function rWe(e){let r=new URL(e).pathname.replace(/\/+$/,"");return!/\/v[0-9][a-z0-9-]*$/i.test(r)}function oWe(e){return!new URL(e).pathname.split("/").map(o=>o.trim().toLowerCase()).filter(Boolean).includes("anthropic")}function nWe(e,t){let r=new URL(e),o=r.pathname.replace(/\/+$/,"");return new RegExp(`/${t}$`,"i").test(o)||(r.pathname=`${o}/${t}`.replace(/\/{2,}/g,"/")),mm(r)}function aWe(e,t){let r=new URL(e),o=r.pathname.replace(/\/+$/,"");return r.pathname=`${o}/${t}`.replace(/\/{2,}/g,"/"),mm(r)}function tle(e){return e.filter((t,r)=>e.indexOf(t)===r)}function iWe(e,t){let r=e.trim().replace(/[?#].*$/,"").replace(/\/+$/,"");return t==="openai_chat_completions"?r.replace(/\/chat\/completions$/i,"").replace(/\/responses$/i,""):t==="openai_responses"?r.replace(/\/responses$/i,"").replace(/\/chat\/completions$/i,""):t==="anthropic_messages"?r.replace(/\/v1\/messages$/i,"").replace(/\/messages$/i,"").replace(/\/v1$/i,""):t==="gemini_generate_content"||t==="gemini_interactions"?r.replace(/\/v1beta\/models\/[^/]+:(generateContent|streamGenerateContent)$/i,"").replace(/\/v1\/models\/[^/]+:(generateContent|streamGenerateContent)$/i,"").replace(/\/v1beta\/interactions(?:\/[^/]+(?:\/cancel)?)?$/i,"").replace(/\/v1\/interactions(?:\/[^/]+(?:\/cancel)?)?$/i,"").replace(/\/interactions(?:\/[^/]+(?:\/cancel)?)?$/i,"").replace(/\/v1beta\/models$/i,"").replace(/\/v1\/models$/i,"").replace(/\/v1beta$/i,"").replace(/\/v1$/i,""):r}function GL(e,t){if(!(!t||t===zi))return e.find(r=>r.id===t)}function ale(e,t){return e.find(r=>iW(r,t))}function ile(e,t){return lW(e,t)[0]}function jL(e){return e.endpoints[0]}function sW(e,t){if(cle(t.baseUrl))return;let r=GL(e,t.presetId);if(r&&!iW(r,t.baseUrl))return rle(r);let o=lW(e,t.name);if(o.length>0&&!o.some(n=>iW(n,t.baseUrl)))return rle(o[0])}function sle(e,t){let r=t.apiKey?.trim();if(r){let o=ule(e,r);if(o&&!WL(o,t.baseUrl))return UL(o)}return sW(e,t)}function iW(e,t){return e.endpoints.some(r=>sWe(r.baseUrl,t))}function lle(e,t){let r=t.apiKey?.trim();if(!r)return;let o=ule(e,r);if(o&&!WL(o,t.endpoint))return UL(o);let n=GL(e,t.providerPresetId);if(n&&!WL(n,t.endpoint))return UL(n);let a=lW(e,t.providerName);if(a.length>0&&!a.some(i=>WL(i,t.endpoint)))return UL(a[0])}function lW(e,t){let r=nle(t);return r?e.filter(o=>[o.id,o.name,...o.aliases].map(nle).filter(Boolean).some(a=>r===a||a.length>=4&&r.includes(a))):[]}function rle(e){let t=fle(e.endpoints.map(r=>dle(r.baseUrl)).filter(r=>!!r));return{message:`Provider identity looks like ${e.name}, but the Base URL is not an official ${e.name} endpoint (${t.join(", ")}). Use a neutral custom name for third-party gateways and never enter official provider keys into untrusted endpoints.`,preset:e}}function UL(e){let t=fle(e.endpoints.map(r=>dle(r.baseUrl)).filter(r=>!!r));return{message:`The API key looks like an official ${e.name} key, but the target endpoint is not an official ${e.name} endpoint (${t.join(", ")}) or a local loopback endpoint. Official provider keys must not be sent to third-party gateways.`,preset:e}}function ule(e,t){let r=t.trim();return e.find(o=>(o.officialApiKeyPatterns??[]).some(n=>{try{return new RegExp(n.source,n.flags).test(r)}catch{return!1}}))}function WL(e,t){return lWe(e,t)||cle(t)}function sWe(e,t){let r=$b(e),o=$b(t);if(!r||!o||o.protocol!==r.protocol||o.host!==r.host)return!1;let n=ole(r.pathname),a=ole(o.pathname);return n==="/"||a==="/"||a===n||a.startsWith(`${n}/`)||n.startsWith(`${a}/`)}function dle(e){return $b(e)?.host}function lWe(e,t){let r=$b(t);return r?e.endpoints.some(o=>{let n=$b(o.baseUrl);return n?.protocol===r.protocol&&n.host===r.host}):!1}function $b(e){try{return new URL(Xa(e.trim()))}catch{return}}function cle(e){try{let t=new URL(Xa(e.trim())).hostname.toLowerCase();return t==="localhost"||t==="127.0.0.1"||t==="::1"||t==="[::1]"}catch{return!1}}function ole(e){return e.replace(/\/+$/,"")||"/"}function nle(e){return e?.trim().toLowerCase().replace(/[^a-z0-9\u4e00-\u9fff]+/g,"")??""}function fle(e){let t=new Set,r=[];for(let o of e)!o||t.has(o)||(t.add(o),r.push(o));return r}var uWe=[{host:"api.anthropic.com",paths:["/v1/messages","/v1/messages/count_tokens"]},{host:"api.openai.com",paths:["/v1/chat/completions","/v1/responses","/v1/models"]},{host:"generativelanguage.googleapis.com",paths:["/v1beta/models","/v1/models"]},{host:"openrouter.ai",paths:["/api/v1/chat/completions","/api/v1/responses","/api/v1/models"]},{host:"api.deepseek.com",paths:["/chat/completions","/v1/chat/completions","/models","/v1/models"]},{host:"api.mistral.ai",paths:["/v1/chat/completions","/v1/models"]}];function ple(e){let t=e.coreHost??"127.0.0.1";return{APIKEY:"",APIKEYS:[],API_TIMEOUT_MS:6e5,CUSTOM_ROUTER_PATH:"",HOST:"127.0.0.1",PORT:3456,Providers:[],Router:{builtInRules:{"claude-code":{enabled:!0},codex:{enabled:!0}},fallback:{mode:"off",models:[],retryCount:1},rules:[]},agent:{mcpServers:[]},autoStart:!1,botConfigs:[],botGateway:{acknowledgeEvents:!1,args:[],authType:"",autoStartIntegration:!0,command:"",createIntegration:!1,credentials:{},cwd:"",enabled:!1,forwardAllAgentMessages:!0,handoff:{enabled:!1,idleSeconds:30,phoneBluetoothTargets:[],phoneWifiTargets:[],screenLock:!0,userIdle:!0},integrationConfig:{},integrationId:"",platform:"none",pollIntervalMs:2e3,requestTimeoutMs:6e5,sourceDir:"",startupTimeoutMs:1e4,stateDir:"",tenantId:"ccr"},gateway:{coreHost:t,corePort:3457,enabled:!0,generatedConfigFile:e.generatedConfigFile,host:"127.0.0.1",port:3456},launchAtLogin:!1,observability:{agentAnalysis:!1,requestLogs:!1},preferredProvider:"",plugins:[],profile:{claudeCode:{enabled:!0,model:"",settingsFile:"~/.claude/settings.json",smallFastModel:""},codex:{cliMiddleware:!0,codexCliPath:"",codexHome:"",configFormat:"separate_profile_files",configFile:"~/.codex/config.toml",enabled:!0,model:"",providerId:"claude-code-router",providerName:"Claude Code Router",showAllSessions:!1},enabled:!0,profiles:[{agent:"claude-code",enabled:!0,env:{...BL},id:"default-claude-code",model:"",name:"Claude Code",scope:"global",settingsFile:"~/.claude/settings.json",smallFastModel:"",surface:"auto"},{agent:"codex",cliMiddleware:!0,codexCliPath:"",codexHome:"",configFormat:"separate_profile_files",configFile:"~/.codex/config.toml",enabled:!0,env:{},id:"default-codex",model:"",name:"Codex",providerId:"claude-code-router",providerName:"Claude Code Router",showAllSessions:!1,scope:"global",surface:"auto"}]},proxy:{browserMode:!0,captureNetwork:!1,enabled:!1,host:"127.0.0.1",mode:"gateway",port:7890,systemProxy:!1,targets:uWe},providerPlugins:[],overviewWidgets:cm,routerEndpoint:"http://127.0.0.1:3456",theme:"system",trayComponentVariants:io,trayIcon:"random",trayProgressTargetTokens:1e5,trayWidgets:Hb,trayWindowModules:qb,toolHub:{browserAutomation:!1,enabled:!1,llm:{apiKey:"",baseUrl:"https://api.openai.com/v1",model:""},mcpServers:[],maxTools:10,requestTimeoutMs:6e4},virtualModelProfiles:[]}}var zL={appConfigDbFile:"Browser preview",apiKeysDbFile:"Browser preview",configDir:"Browser preview",configFile:"Browser preview",dataDir:"Browser preview",gatewayConfigFile:"Browser preview",launchAtLoginSupported:/^Mac|^Win/i.test(navigator.platform),name:"Claude Code Router",platform:navigator.platform,requestLogsDbFile:"Browser preview",usageDbFile:"Browser preview",version:"0.1.0"},Yb={canCheck:!1,canDownload:!1,canInstall:!1,currentVersion:zL.version,state:"idle",supported:!1},je=ple({generatedConfigFile:"Browser preview"}),uW={coreEndpoint:"http://127.0.0.1:3457",endpoint:"http://127.0.0.1:3456",generatedConfigFile:"Browser preview",networkEndpoints:[],state:"stopped"},dW={caCertFile:"Browser preview",endpoint:"http://127.0.0.1:3456",mode:"gateway",port:3456,state:"stopped",systemProxy:{state:"unsupported"},targetHosts:[]},qL={caCertFile:"Browser preview",canInstall:!1,message:"Certificate detection is available in the Electron app.",platform:navigator.platform,state:"unknown",trusted:!1},BM={capturedAt:new Date().toISOString(),captureEnabled:!1,items:[],maxBodyBytes:256*1024,maxEntries:200};var Lu=z(ie());var dWe={"Account endpoint returned a non-object payload.":"\u8D26\u6237\u7AEF\u70B9\u8FD4\u56DE\u7684\u5185\u5BB9\u4E0D\u662F\u5BF9\u8C61\u3002","Account endpoint returned malformed JSON.":"\u8D26\u6237\u7AEF\u70B9\u8FD4\u56DE\u4E86\u683C\u5F0F\u9519\u8BEF\u7684 JSON\u3002","Base URL is required.":"Base URL \u4E0D\u80FD\u4E3A\u7A7A\u3002","Browser controls are only available from the built-in browser window.":"\u6D4F\u89C8\u5668\u63A7\u5236\u4EC5\u53EF\u5728\u5185\u7F6E\u6D4F\u89C8\u5668\u7A97\u53E3\u4E2D\u4F7F\u7528\u3002","Bot Gateway QR start response missing qrCodeUrl.":"Bot Gateway \u626B\u7801\u767B\u5F55\u542F\u52A8\u54CD\u5E94\u7F3A\u5C11 qrCodeUrl\u3002","Bot Gateway QR start response missing sessionId.":"Bot Gateway \u626B\u7801\u767B\u5F55\u542F\u52A8\u54CD\u5E94\u7F3A\u5C11 sessionId\u3002","Bot Gateway SDK client does not expose request().":"Bot Gateway SDK client \u672A\u66B4\u9732 request()\u3002","CCR gateway did not start.":"CCR \u7F51\u5173\u672A\u80FD\u542F\u52A8\u3002","Claude App opening is available from the CCR desktop app.":"Claude App \u6253\u5F00\u529F\u80FD\u4EC5\u53EF\u5728 CCR \u684C\u9762\u7AEF\u4F7F\u7528\u3002","Claude Code access token was not found.":"\u672A\u627E\u5230 Claude Code access token\u3002","Codex login token was not found.":"\u672A\u627E\u5230 Codex \u767B\u5F55 token\u3002","CONNECT target is missing.":"\u7F3A\u5C11 CONNECT \u76EE\u6807\u3002","Core gateway auth token is not initialized.":"\u6838\u5FC3\u7F51\u5173\u8BA4\u8BC1 token \u5C1A\u672A\u521D\u59CB\u5316\u3002","Failed to start proxy mode.":"\u672A\u80FD\u542F\u52A8\u4EE3\u7406\u6A21\u5F0F\u3002","Gateway plugin service is not configured.":"\u7F51\u5173\u63D2\u4EF6\u670D\u52A1\u5C1A\u672A\u914D\u7F6E\u3002","Local agent account credential was not found. Sign in again, then re-import the local login provider.":"\u672A\u627E\u5230\u672C\u673A Agent \u8D26\u6237\u51ED\u636E\u3002\u8BF7\u91CD\u65B0\u767B\u5F55\uFF0C\u7136\u540E\u91CD\u65B0\u5BFC\u5165\u672C\u673A\u767B\u5F55\u4F9B\u5E94\u5546\u3002","Local agent login is not importable.":"\u672C\u673A Agent \u767B\u5F55\u6001\u4E0D\u53EF\u5BFC\u5165\u3002","Local agent provider was not found.":"\u672A\u627E\u5230\u672C\u673A Agent \u4F9B\u5E94\u5546\u3002","MCP server must be saved before tool discovery.":"\u9700\u8981\u5148\u4FDD\u5B58 MCP \u670D\u52A1\u5668\u540E\u624D\u80FD\u53D1\u73B0\u5DE5\u5177\u3002","MCP server name is required.":"MCP \u670D\u52A1\u5668\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\u3002","Missing vision API key. Set VISION_API_KEY.":"\u7F3A\u5C11\u89C6\u89C9 API Key\u3002\u8BF7\u8BBE\u7F6E VISION_API_KEY\u3002","Model name is too long.":"\u6A21\u578B\u540D\u79F0\u8FC7\u957F\u3002","Network capture MCP is disabled.":"\u7F51\u7EDC\u6355\u83B7 MCP \u5DF2\u7981\u7528\u3002","No available models":"\u6CA1\u6709\u53EF\u7528\u6A21\u578B","No available models. Configure at least one provider with a model before starting CCR Gateway or opening an agent through CCR.":"\u6CA1\u6709\u53EF\u7528\u6A21\u578B\u3002\u8BF7\u5148\u914D\u7F6E\u81F3\u5C11\u4E00\u4E2A\u5305\u542B\u6A21\u578B\u7684\u4F9B\u5E94\u5546\uFF0C\u518D\u542F\u52A8 CCR \u7F51\u5173\u6216\u901A\u8FC7 CCR \u6253\u5F00 Agent\u3002","No Bot Gateway conversationRef is available for inbound bot response.":"\u6CA1\u6709\u53EF\u7528\u4E8E\u5165\u7AD9 Bot \u54CD\u5E94\u7684 Bot Gateway conversationRef\u3002","No Bot Gateway conversationRef is configured and no inbound bot event context is available.":"\u672A\u914D\u7F6E Bot Gateway conversationRef\uFF0C\u4E14\u6CA1\u6709\u53EF\u7528\u7684\u5165\u7AD9 Bot \u4E8B\u4EF6\u4E0A\u4E0B\u6587\u3002","No endpoint candidates available.":"\u6CA1\u6709\u53EF\u7528\u7684\u7AEF\u70B9\u5019\u9009\u9879\u3002","No search provider configured. Set SEARCH_PROVIDER and its API key.":"\u672A\u914D\u7F6E\u641C\u7D22\u4F9B\u5E94\u5546\u3002\u8BF7\u8BBE\u7F6E SEARCH_PROVIDER \u53CA\u5176 API Key\u3002","No Wi-Fi/LAN targets found.":"\u672A\u627E\u5230 Wi-Fi/LAN \u76EE\u6807\u3002","Only http and https QR login URLs can be opened.":"\u53EA\u80FD\u6253\u5F00 http \u6216 https \u7684\u626B\u7801\u767B\u5F55 URL\u3002","Only http and https URLs can be opened.":"\u53EA\u80FD\u6253\u5F00 http \u6216 https URL\u3002","Plugin module must export a function, default plugin, or plugin object.":"\u63D2\u4EF6\u6A21\u5757\u5FC5\u987B\u5BFC\u51FA\u51FD\u6570\u3001\u9ED8\u8BA4\u63D2\u4EF6\u6216\u63D2\u4EF6\u5BF9\u8C61\u3002","Provider Base URL is invalid.":"\u4F9B\u5E94\u5546 Base URL \u65E0\u6548\u3002","Provider Base URL must use http or https.":"\u4F9B\u5E94\u5546 Base URL \u5FC5\u987B\u4F7F\u7528 http \u6216 https\u3002","Provider link is too long.":"\u4F9B\u5E94\u5546\u94FE\u63A5\u8FC7\u957F\u3002","Provider manifest must be a JSON object.":"\u4F9B\u5E94\u5546 manifest \u5FC5\u987B\u662F JSON \u5BF9\u8C61\u3002","Provider manifest URL cannot include credentials.":"\u4F9B\u5E94\u5546 manifest URL \u4E0D\u80FD\u5305\u542B\u51ED\u636E\u3002","Provider manifest URL is invalid.":"\u4F9B\u5E94\u5546 manifest URL \u65E0\u6548\u3002","Provider manifest URL must use https.":"\u4F9B\u5E94\u5546 manifest URL \u5FC5\u987B\u4F7F\u7528 https\u3002","Provider payload must be a JSON object.":"\u4F9B\u5E94\u5546\u8F7D\u8377\u5FC5\u987B\u662F JSON \u5BF9\u8C61\u3002","Proxy mode is not running.":"\u4EE3\u7406\u6A21\u5F0F\u672A\u8FD0\u884C\u3002","Proxy request is missing Host header.":"\u4EE3\u7406\u8BF7\u6C42\u7F3A\u5C11 Host \u5934\u3002","Proxy service failed to start.":"\u4EE3\u7406\u670D\u52A1\u672A\u80FD\u542F\u52A8\u3002","QR window sessionId is required.":"\u4E8C\u7EF4\u7801\u7A97\u53E3 sessionId \u4E0D\u80FD\u4E3A\u7A7A\u3002","Remote provider manifests cannot define sensitive Fetch usage headers.":"\u8FDC\u7A0B\u4F9B\u5E94\u5546 manifest \u4E0D\u80FD\u5B9A\u4E49\u654F\u611F\u7684 Fetch \u7528\u91CF\u8BF7\u6C42\u5934\u3002","Request body must be a JSON object.":"\u8BF7\u6C42\u4F53\u5FC5\u987B\u662F JSON \u5BF9\u8C61\u3002","Service did not start.":"\u670D\u52A1\u672A\u80FD\u542F\u52A8\u3002","Service paused.":"\u670D\u52A1\u5DF2\u6682\u505C\u3002","Service started.":"\u670D\u52A1\u5DF2\u542F\u52A8\u3002","Proxy is stopped.":"\u4EE3\u7406\u5DF2\u505C\u6B62\u3002","Proxy restarted.":"\u4EE3\u7406\u5DF2\u91CD\u542F\u3002","Too many models in provider link.":"\u4F9B\u5E94\u5546\u94FE\u63A5\u4E2D\u7684\u6A21\u578B\u6570\u91CF\u8FC7\u591A\u3002","tools/call params must include a tool name.":"tools/call \u53C2\u6570\u5FC5\u987B\u5305\u542B\u5DE5\u5177\u540D\u79F0\u3002","This app build does not expose API key persistence. Rebuild and restart the Electron app.":"\u5F53\u524D\u5E94\u7528\u6784\u5EFA\u672A\u66B4\u9732 API Key \u6301\u4E45\u5316\u80FD\u529B\u3002\u8BF7\u91CD\u65B0\u6784\u5EFA\u5E76\u91CD\u542F Electron App\u3002","Unable to load @the-next-ai/bot-gateway-sdk.":"\u65E0\u6CD5\u52A0\u8F7D @the-next-ai/bot-gateway-sdk\u3002","Unsupported CCR link target.":"\u4E0D\u652F\u6301\u7684 CCR \u94FE\u63A5\u76EE\u6807\u3002","Unsupported link protocol.":"\u4E0D\u652F\u6301\u7684\u94FE\u63A5\u534F\u8BAE\u3002","Unknown error":"\u672A\u77E5\u9519\u8BEF","ZCode profiles can only open the app; agent arguments are not supported.":"ZCode \u914D\u7F6E\u6863\u6848\u53EA\u80FD\u6253\u5F00 App\uFF0C\u4E0D\u652F\u6301 Agent \u53C2\u6570\u3002","ZCode provider API key was not found in ZCode config.":"\u672A\u5728 ZCode \u914D\u7F6E\u4E2D\u627E\u5230\u4F9B\u5E94\u5546 API Key\u3002"},cWe=[{pattern:/^(.+ App) was not found\. Install \1 or set ([A-Z0-9_]+) to its executable, then try again\.$/,translate:(e,t)=>`${e} \u672A\u627E\u5230\u3002\u8BF7\u5B89\u88C5 ${e}\uFF0C\u6216\u5C06 ${t} \u8BBE\u7F6E\u4E3A\u5B83\u7684\u53EF\u6267\u884C\u6587\u4EF6\u540E\u91CD\u8BD5\u3002`},{pattern:/^Profile launcher was not found: (.+)\. Re-save the profile and try again\.$/,translate:e=>`\u672A\u627E\u5230\u914D\u7F6E\u6863\u6848\u542F\u52A8\u5668\uFF1A${e}\u3002\u8BF7\u91CD\u65B0\u4FDD\u5B58\u914D\u7F6E\u6863\u6848\u540E\u91CD\u8BD5\u3002`},{pattern:/^Profile launcher was not found: (.+)\. Open CCR once or re-save the profile\.$/,translate:e=>`\u672A\u627E\u5230\u914D\u7F6E\u6863\u6848\u542F\u52A8\u5668\uFF1A${e}\u3002\u8BF7\u6253\u5F00\u4E00\u6B21 CCR\uFF0C\u6216\u91CD\u65B0\u4FDD\u5B58\u914D\u7F6E\u6863\u6848\u3002`},{pattern:/^CCR CLI runtime was not found\. Rebuild or reinstall CCR and try again\.$/,translate:()=>"\u672A\u627E\u5230 CCR CLI \u8FD0\u884C\u65F6\u3002\u8BF7\u91CD\u65B0\u6784\u5EFA\u6216\u91CD\u65B0\u5B89\u88C5 CCR \u540E\u91CD\u8BD5\u3002"},{pattern:/^CCR config was not found: (.+)$/,translate:e=>`\u672A\u627E\u5230 CCR \u914D\u7F6E\uFF1A${e}`},{pattern:/^CCR config has no profiles: (.+)$/,translate:e=>`CCR \u914D\u7F6E\u4E2D\u6CA1\u6709\u914D\u7F6E\u6863\u6848\uFF1A${e}`},{pattern:/^Profile "(.+)" is ambiguous\. Use the profile ID instead\.$/,translate:e=>`\u914D\u7F6E\u6863\u6848 "${e}" \u4E0D\u552F\u4E00\u3002\u8BF7\u6539\u7528\u914D\u7F6E\u6863\u6848 ID\u3002`},{pattern:/^Profile "(.+)" was not found or is disabled\.$/,translate:e=>`\u914D\u7F6E\u6863\u6848 "${e}" \u672A\u627E\u5230\u6216\u5DF2\u7981\u7528\u3002`},{pattern:/^(.+) does not support ([A-Z]+) opening\.$/,translate:(e,t)=>`${e} \u4E0D\u652F\u6301\u4EE5 ${t} \u65B9\u5F0F\u6253\u5F00\u3002`},{pattern:/^(.+) does not support stopping ([A-Z]+) from CCR\.$/,translate:(e,t)=>`${e} \u4E0D\u652F\u6301\u4ECE CCR \u505C\u6B62 ${t}\u3002`},{pattern:/^No CCR API key was found for profile "(.+)"\. Re-save the profile and try again\.$/,translate:e=>`\u672A\u627E\u5230\u914D\u7F6E\u6863\u6848 "${e}" \u7684 CCR API Key\u3002\u8BF7\u91CD\u65B0\u4FDD\u5B58\u914D\u7F6E\u6863\u6848\u540E\u91CD\u8BD5\u3002`},{pattern:/^(.+ App) did not open a window for (.+)\. Command: (.+) User data: (.+)$/,translate:(e,t,r,o)=>`${e} \u6CA1\u6709\u4E3A ${t} \u6253\u5F00\u7A97\u53E3\u3002\u547D\u4EE4\uFF1A${r} \u7528\u6237\u6570\u636E\uFF1A${o}`},{pattern:/^(.+ App) is already running with (.+)\.$/,translate:(e,t)=>`${e} \u5DF2\u4F7F\u7528 ${t} \u8FD0\u884C\u3002`},{pattern:/^Opened (.+ App) with (.+)\.$/,translate:(e,t)=>`\u5DF2\u4F7F\u7528 ${t} \u6253\u5F00 ${e}\u3002`},{pattern:/^Opened (.+)\.$/,translate:e=>`\u5DF2\u6253\u5F00 ${e}\u3002`},{pattern:/^CCR gateway did not start for (.+)\.$/,translate:e=>`${e} \u7684 CCR \u7F51\u5173\u672A\u80FD\u542F\u52A8\u3002`},{pattern:/^Core gateway endpoint is already in use: (.+)$/,translate:e=>`\u6838\u5FC3\u7F51\u5173\u7AEF\u70B9\u5DF2\u88AB\u5360\u7528\uFF1A${e}`},{pattern:/^Proxy restarted, but system proxy switching failed: (.+)$/,translate:e=>`\u4EE3\u7406\u5DF2\u91CD\u542F\uFF0C\u4F46\u7CFB\u7EDF\u4EE3\u7406\u5207\u6362\u5931\u8D25\uFF1A${VM("zh",e)}`},{pattern:/^Proxy mode is running at (.+), but HTTPS CONNECT is not available(.*)\.$/,translate:(e,t)=>`\u4EE3\u7406\u6A21\u5F0F\u6B63\u5728 ${e} \u8FD0\u884C\uFF0C\u4F46 HTTPS CONNECT \u4E0D\u53EF\u7528${t}\u3002`},{pattern:/^Failed to start the dedicated proxy endpoint for the built-in browser\.$/,translate:()=>"\u672A\u80FD\u542F\u52A8\u5185\u7F6E\u6D4F\u89C8\u5668\u4E13\u7528\u4EE3\u7406\u7AEF\u70B9\u3002"},{pattern:/^Account endpoint returned HTTP ([0-9]+)(?:: ([\s\S]+))?\.$/,translate:(e,t="")=>`\u8D26\u6237\u7AEF\u70B9\u8FD4\u56DE HTTP ${e}${t?`\uFF1A${t}`:""}\u3002`},{pattern:/^Account endpoint returned non-JSON response(?: \((.+)\))?\.$/,translate:(e="")=>`\u8D26\u6237\u7AEF\u70B9\u8FD4\u56DE\u4E86\u975E JSON \u54CD\u5E94${e?`\uFF08${e}\uFF09`:""}\u3002`},{pattern:/^Account connectors JSON is invalid: ([\s\S]+)$/,translate:e=>`\u8D26\u6237\u8FDE\u63A5\u5668 JSON \u65E0\u6548\uFF1A${e}`},{pattern:/^Usage request body JSON is invalid: ([\s\S]+)$/,translate:e=>`\u7528\u91CF\u8BF7\u6C42\u4F53 JSON \u65E0\u6548\uFF1A${e}`},{pattern:/^Unsupported provider protocol: (.+)$/,translate:e=>`\u4E0D\u652F\u6301\u7684\u4F9B\u5E94\u5546\u534F\u8BAE\uFF1A${e}`},{pattern:/^(.+) is too long\.$/,translate:e=>`${e} \u8FC7\u957F\u3002`},{pattern:/^(.+) from a remote manifest must use https\.$/,translate:e=>`\u8FDC\u7A0B manifest \u4E2D\u7684 ${e} \u5FC5\u987B\u4F7F\u7528 https\u3002`},{pattern:/^(.+) cannot include credentials\.$/,translate:e=>`${e} \u4E0D\u80FD\u5305\u542B\u51ED\u636E\u3002`},{pattern:/^(.+) cannot target a local or internal host\.$/,translate:e=>`${e} \u4E0D\u80FD\u6307\u5411\u672C\u673A\u6216\u5185\u7F51\u4E3B\u673A\u3002`},{pattern:/^(.+) is invalid\.$/,translate:e=>`${e} \u65E0\u6548\u3002`},{pattern:/^Could not resolve host: (.+)$/,translate:e=>`\u65E0\u6CD5\u89E3\u6790\u4E3B\u673A\uFF1A${e}`},{pattern:/^Remote manifest host resolved to a private or reserved address: (.+)$/,translate:e=>`\u8FDC\u7A0B manifest \u4E3B\u673A\u89E3\u6790\u5230\u4E86\u79C1\u6709\u6216\u4FDD\u7559\u5730\u5740\uFF1A${e}`},{pattern:/^Invalid proxy endpoint: (.+)$/,translate:e=>`\u4EE3\u7406\u7AEF\u70B9\u65E0\u6548\uFF1A${e}`},{pattern:/^Failed to start MITM server for (.+)$/,translate:e=>`\u672A\u80FD\u4E3A ${e} \u542F\u52A8 MITM \u670D\u52A1\u3002`},{pattern:/^MCP tools discovery timed out after ([0-9]+) ms\.$/,translate:e=>`MCP \u5DE5\u5177\u53D1\u73B0\u8D85\u65F6\uFF08${e} ms\uFF09\u3002`},{pattern:/^SSE MCP discovery failed with HTTP ([0-9]+)\.$/,translate:e=>`SSE MCP \u53D1\u73B0\u5931\u8D25\uFF0CHTTP ${e}\u3002`},{pattern:/^MCP discovery request failed with HTTP ([0-9]+)(?:: ([\s\S]+))?$/,translate:(e,t="")=>`MCP \u53D1\u73B0\u8BF7\u6C42\u5931\u8D25\uFF0CHTTP ${e}${t?`\uFF1A${t}`:""}`},{pattern:/^Unknown network capture tool: (.+)$/,translate:e=>`\u672A\u77E5\u7684\u7F51\u7EDC\u6355\u83B7\u5DE5\u5177\uFF1A${e}`},{pattern:/^Network capture not found: (.+)$/,translate:e=>`\u672A\u627E\u5230\u7F51\u7EDC\u6355\u83B7\uFF1A${e}`},{pattern:/^network_capture_get requires id\.$/,translate:()=>"network_capture_get \u9700\u8981 id\u3002"},{pattern:/^network_capture_set_enabled requires boolean enabled\.$/,translate:()=>"network_capture_set_enabled \u9700\u8981\u5E03\u5C14\u503C enabled\u3002"},{pattern:/^Unknown fusion tool: (.+)$/,translate:e=>`\u672A\u77E5\u7684 Fusion \u5DE5\u5177\uFF1A${e}`},{pattern:/^(.+) requires prompt\.$/,translate:e=>`${e} \u9700\u8981 prompt\u3002`},{pattern:/^(.+) requires imageUrl, imagePath, imageBase64, or images\.$/,translate:e=>`${e} \u9700\u8981 imageUrl\u3001imagePath\u3001imageBase64 \u6216 images\u3002`},{pattern:/^Missing (.+)\. Set (.+)\.$/,translate:(e,t)=>`\u7F3A\u5C11 ${e}\u3002\u8BF7\u8BBE\u7F6E ${t}\u3002`},{pattern:/^(Vision|Search) request failed \(([0-9]+)\): ([\s\S]+)$/,translate:(e,t,r)=>`${e==="Vision"?"\u89C6\u89C9":"\u641C\u7D22"}\u8BF7\u6C42\u5931\u8D25\uFF08${t}\uFF09\uFF1A${r}`},{pattern:/^Invalid JSON from provider: ([\s\S]+)$/,translate:e=>`\u4F9B\u5E94\u5546\u8FD4\u56DE\u4E86\u65E0\u6548 JSON\uFF1A${e}`},{pattern:/^Local image exceeds ([0-9]+) bytes: (.+)$/,translate:(e,t)=>`\u672C\u5730\u56FE\u7247\u8D85\u8FC7 ${e} \u5B57\u8282\uFF1A${t}`},{pattern:/^Claude App CDP page target was not available on port ([0-9]+)(?:: ([\s\S]+))?\.$/,translate:(e,t="")=>`\u7AEF\u53E3 ${e} \u4E0A\u6CA1\u6709\u53EF\u7528\u7684 Claude App CDP \u9875\u9762\u76EE\u6807${t?`\uFF1A${t}`:""}\u3002`},{pattern:/^CDP (.+) returned HTTP ([0-9]+)$/,translate:(e,t)=>`CDP ${e} \u8FD4\u56DE HTTP ${t}`},{pattern:/^Timed out waiting for Codex App response: (.+)$/,translate:e=>`\u7B49\u5F85 Codex App \u54CD\u5E94\u8D85\u65F6\uFF1A${e}`},{pattern:/^No active turn for thread (.+)$/,translate:e=>`\u7EBF\u7A0B ${e} \u6CA1\u6709\u6D3B\u8DC3\u56DE\u5408\u3002`},{pattern:/^thread not found: (.+)$/,translate:e=>`\u672A\u627E\u5230\u7EBF\u7A0B\uFF1A${e}`},{pattern:/^Backend (.+) failed to start\.$/,translate:e=>`\u540E\u7AEF ${e} \u672A\u80FD\u542F\u52A8\u3002`},{pattern:/^Plugin (.+) registered a gateway route without path or pathPrefix\.$/,translate:e=>`\u63D2\u4EF6 ${e} \u6CE8\u518C\u4E86\u7F3A\u5C11 path \u6216 pathPrefix \u7684\u7F51\u5173\u8DEF\u7531\u3002`},{pattern:/^Plugin (.+) registered a proxy route without host\.$/,translate:e=>`\u63D2\u4EF6 ${e} \u6CE8\u518C\u4E86\u7F3A\u5C11 host \u7684\u4EE3\u7406\u8DEF\u7531\u3002`},{pattern:/^Plugin (.+) registered an invalid provider account connector\.$/,translate:e=>`\u63D2\u4EF6 ${e} \u6CE8\u518C\u4E86\u65E0\u6548\u7684\u4F9B\u5E94\u5546\u8D26\u6237\u8FDE\u63A5\u5668\u3002`},{pattern:/^HTTP ([0-9]+)$/,translate:e=>`HTTP ${e}`}];function VM(e,t){let r=t.trim();if(!r)return t;let o=r.match(/^Error invoking remote method '([^']+)': Error: ([\s\S]+)$/);if(o)return VM(e,o[2]);let n=r.match(/^Error invoking remote method '([^']+)': ([\s\S]+)$/);if(n)return VM(e,n[2]);let a=r.match(/^([\s\S]*?)\s+Checked:\s+([\s\S]+)$/);if(a)return VM(e,a[1]);if(e!=="zh")return r;let i=dWe[r];if(i)return i;for(let s of cWe){let l=r.match(s.pattern);if(l)return s.translate(...l.slice(1))}return t}var Zb="ccr.ui.language",Dc={en:{navigation:{onboarding:"Onboarding","api-keys":"API Keys",extensions:"Extensions",logs:"Logs",networking:"Networking",observability:"Observability",overview:"Overview",profile:"Agent Config",providers:"Providers",models:"Models",routing:"Routing",server:"Server","virtual-models":"Fusion"},settings:{agentAnalysis:"Agent observability",agentAnalysisDescription:"Record request metadata needed for the observability page.",appearance:"Appearance",bots:"Bots",button:"Settings",close:"Close",data:"Data",done:"Done",language:"Language",languageChinese:"Chinese",languageEnglish:"English",languageSystem:"System",launchAtLogin:"Launch at login",launchAtLoginDescription:"Open Claude Code Router automatically when you sign in to this computer.",observability:"Logs & Observability",requestLogs:"Request logs",requestLogsDescription:"Record gateway requests and show the Logs page.",theme:"Theme",themeDark:"Dark",themeLight:"Light",themeSystem:"System",toolHub:"ToolHub",toolHubBrowserAutomation:"Built-in browser automation",toolHubBrowserAutomationDescription:"Expose CCR Desktop's built-in browser automation tools through ToolHub.",toolHubDescription:"Route configured MCP servers through ToolHub, where the model finds the tools needed for each task.",toolHubEnabled:"Enable ToolHub",toolHubEnabledDescription:"Expose a compact ToolHub MCP server instead of all configured MCP tools.",toolHubMaxTools:"Max tools",toolHubModel:"Resolver model",toolHubModelPlaceholder:"Select a configured model",toolHubTimeout:"Timeout ms",tray:"Tray",trayBalanceProgressAccount:"Account",trayBalanceProgressData:"Data",trayBalanceProgressNoData:"No account data is available. Enable account monitoring on a provider first.",trayBalanceProgressRequired:"Choose an account and data to enable balance progress.",trayIcon:"Tray mascot",trayIconCyan:"Auralis",trayIconOrange:"Solara",trayIconProgress:"Balance progress",trayIconRandom:"Random",trayIconViolet:"Vesper",trayComponentAccount:"Account meter",trayComponentArc:"Arc",trayComponentArea:"Area",trayComponentBar:"Bar",trayComponentBars:"Bars",trayComponentCards:"Cards",trayComponentCompact:"Compact",trayComponentDonut:"Donut",trayComponentFlow:"Flow chart",trayComponentGauges:"Gauges",trayComponentLine:"Line",trayComponentList:"List",trayComponentModelShare:"Model share",trayComponentPie:"Pie",trayComponentPills:"Pills",trayComponentRing:"Ring",trayComponentRings:"Rings",trayComponentSparkline:"Sparkline",trayComponentStacked:"Stacked",trayComponentStats:"Stats",trayComponentStyles:"Component styles",trayComponentEnabled:"Enabled",trayComponentProperties:"Component properties",trayComponentStyle:"Style",trayComponents:"Components",trayComponentTokenMix:"Token mix",trayModuleActivity:"Token activity",trayModuleAccount:"Account balance",trayModuleFooter:"Footer actions",trayModuleHeader:"Title and status",trayModuleModelShare:"Model share",trayModuleRings:"Circular metrics",trayModuleSourceTabs:"Provider tabs",trayModuleStats:"Token stats",trayModuleTokenFlow:"Token flow chart",trayModuleTokenMix:"Token mix",trayPreview:"Preview",trayPreviewEmpty:"No tray modules enabled",trayProgressTarget:"Progress target",trayWindowModules:"Tray window modules",title:"Settings"},sidebar:{collapse:"Collapse sidebar",expand:"Expand sidebar",primaryNavigation:"Primary navigation"},text:{\u4E0A\u4E00\u9875:"Previous page",\u4E0B\u4E00\u9875:"Next page",\u5168\u90E8\u72B6\u6001:"All statuses",\u6210\u529F:"Success",\u9519\u8BEF:"Error",\u65F6\u95F4:"Time",\u72B6\u6001:"Status",\u6A21\u578B:"Model",Stream:"Stream",Streaming:"Streaming","Non-streaming":"Non-streaming",\u4EE4\u724C:"Tokens",\u6210\u672C:"Cost",\u6301\u7EED\u65F6\u95F4:"Duration",\u53CD\u9988:"Feedback","Failed requests":"Failed requests",\u8F93\u5165:"Input",\u8F93\u51FA:"Output",\u7F13\u5B58\u8BFB\u53D6:"Cache read",\u7F13\u5B58\u5199\u5165:"Cache write",\u603B\u8BA1:"Total",\u8BF7\u6C42:"Request",\u54CD\u5E94:"Response",\u590D\u5236:"Copy","\u7B5B\u9009\u65E5\u5FD7\u3001\u6A21\u578B\u3001\u8BF7\u6C42\u6216\u54CD\u5E94":"Filter logs, models, requests, or responses",\u5168\u90E8\u4F9B\u5E94\u5546:"All providers",\u5168\u90E8\u6A21\u578B:"All models",\u6B63\u5728\u52A0\u8F7D\u65E5\u5FD7:"Loading logs",\u6682\u65E0\u65E5\u5FD7:"No logs","No request headers":"No request headers","No response headers":"No response headers","\u7B5B\u9009 JSON...":"Filter JSON...",body:"Body",header:"Headers",\u5165:"in",\u51FA:"out","No provider presets found":"No provider presets found","After you enter the API endpoint and key, the system will automatically detect supported protocols and available models.":"After you enter the API endpoint and key, the system will automatically detect supported protocols and available models.",Back:"Back","Available models":"Available models",Check:"Check","Check Connection":"Check Connection","Check results":"Check results","Checking connection":"Checking connection","Click Check Connection to verify connectivity with a real model request.":"Click Check Connection to verify connectivity with a real model request.","Connection verified":"Connection verified","CCR scanned this computer for Claude Code, Codex, and ZCode login states. Click Import to add one as a gateway provider.":"CCR scanned this computer for Claude Code, Codex, and ZCode login states. Click Import to add one as a gateway provider.",Detected:"Detected","Detecting protocols":"Detecting protocols","Enter API endpoint, API key, and at least one model to enable connectivity check.":"Enter API endpoint, API key, and at least one model to enable connectivity check.","Generated output is limited to 1 token for connectivity checks.":"Generated output is limited to 1 token for connectivity checks.","Import local agent login":"Import local agent login","ChatGPT login detected. Click Import to add it as a gateway provider.":"ChatGPT login detected. Click Import to add it as a gateway provider.","Claude Code login detected. Click Import to add it as a gateway provider.":"Claude Code login detected. Click Import to add it as a gateway provider.","Claude Code login was detected, but no usable access token was found.":"Claude Code login was detected, but no usable access token was found.","Codex auth file was found, but no usable token was detected.":"Codex auth file was found, but no usable token was detected.","Claude Code credential file was found, but no usable OAuth token was detected.":"Claude Code credential file was found, but no usable OAuth token was detected.",Locked:"Locked","Local agent login will be connected after saving this provider.":"Local agent login will be connected after saving this provider.","Models to check":"Models to check","No available models":"No available models","No local login state was found for this agent.":"No local login state was found for this agent.","Not found":"Not found","No unavailable models":"No unavailable models","Press Enter to add":"Press Enter to add","Protocols detected":"Protocols detected",Ready:"Ready","Select at least one protocol.":"Select at least one protocol.",Service:"Service","Scanning local agent logins":"Scanning local agent logins",Start:"Start","Start check":"Start check",Stop:"Stop","This check sends real model requests with your provider API key and may consume account balance.":"This check sends real model requests with your provider API key and may consume account balance.","ZCode login detected. Click Import to add it as a gateway provider.":"ZCode login detected. Click Import to add it as a gateway provider.","ZCode login was detected, but its local credential is encrypted and cannot be imported automatically.":"ZCode login was detected, but its local credential is encrypted and cannot be imported automatically.","ZCode login was detected, but no usable provider API key was found in ZCode config.":"ZCode login was detected, but no usable provider API key was found in ZCode config.","ZCode provider API key detected in local ZCode config. Click Import to add it as a gateway provider.":"ZCode provider API key detected in local ZCode config. Click Import to add it as a gateway provider.","Unavailable models":"Unavailable models","Account Balance":"Account Balance","Account component":"Account component","All accounts":"All accounts","All credentials":"All credentials","Last updated":"Last updated","Refresh account":"Refresh account","Refreshing account":"Refreshing account","Add widget":"Add widget","Analysis component":"Analysis component",Arc:"Arc",Area:"Area","Average latency":"Average latency",Bar:"Bar",Bars:"Bars","Breakdown component":"Breakdown component",Card:"Card",Cards:"Cards","Change widget type":"Change widget type","Client Analysis":"Client Analysis","Component properties":"Component properties",Components:"Components","Component category":"Component category",Compact:"Compact",Composed:"Composed","Client or provider":"Client or provider",Data:"Data",Done:"Done",Donut:"Donut","Drag cards to arrange":"Drag cards to arrange","Drag to move":"Drag to move","Edit widgets":"Edit widgets",Full:"Full","Header component":"Header component",Large:"Large",Line:"Line",Medium:"Medium",Metric:"Metric","Metric component":"Metric component","Model Distribution":"Model Distribution","Model distribution":"Model distribution","Move down":"Move down","Move up":"Move up","Nested rings":"Nested rings","No model activity":"No model activity","No widget selected":"No widget selected","No widgets configured":"No widgets configured","Overview layout":"Overview layout",Overview:"Overview",Other:"Other",Pie:"Pie","Provider Analysis":"Provider Analysis","Provider component":"Provider component",Preview:"Preview","Requests, tokens, cost":"Requests, tokens, cost","Remove widget":"Remove widget","Reset layout":"Reset layout","Close fullscreen JSON viewer":"Close fullscreen JSON viewer","Fullscreen JSON viewer":"Fullscreen JSON viewer","Open fullscreen JSON viewer":"Open fullscreen JSON viewer","Resize column width":"Resize column width","Resize widget height":"Resize widget height","Resize widget size":"Resize widget size","Resize widget width":"Resize widget width",Ring:"Ring",Semicircle:"Semicircle",Small:"Small",Stacked:"Stacked","Status component":"Status component","Status timeline":"Status timeline",Style:"Style",Table:"Table",Timeline:"Timeline","Token distribution":"Token distribution","Token or model distribution":"Token or model distribution","Token mix, rings, model share":"Token mix, rings, model share","Token mix component":"Token mix component","Trend component":"Trend component","Usage over time":"Usage over time",Widget:"Widget","Widget size":"Widget size",Wide:"Wide","Share cards":"Share cards","Share card":"Share card","Save social-ready cards as PNG images":"Save social-ready cards as PNG images","Social media PNG cards":"Social media PNG cards","PNG export":"PNG export","Save image":"Save image",Saving:"Saving","Export failed":"Export failed","AI Usage Wrapped":"AI Usage Wrapped","CCR Route Map":"CCR Route Map","Model Leaderboard":"Model Leaderboard","AI Fuel Cockpit":"AI Fuel Cockpit","Token Calendar Poster":"Token Calendar Poster","Spend Receipt":"Spend Receipt","tokens routed through CCR":"tokens routed through CCR","Top model":"Top model","Top provider":"Top provider","No provider activity":"No provider activity","Peak day":"Peak day","Generated by CCR":"Generated by CCR",Range:"Range","Virtual model":"Fusion","Virtual Models":"Fusion","Add Virtual Model":"Add Fusion","Add virtual model":"Add Fusion","Edit Virtual Model":"Edit Fusion","Edit virtual model":"Edit Fusion","Fusion combines a model with another model or tools into a new model.":"Fusion combines a model with another model or tools into a new model.","Fusion example":"Example: GLM 5.2 + GLM 5V Turbo = GLM 5.2V","Vision tool configuration":"Vision tool configuration","Choose a configured gateway model for image understanding.":"Choose a configured gateway model for image understanding.","Vision model":"Vision model","Vision model is required.":"Vision model is required.","Web search configuration":"Web search configuration","Search provider":"Search provider","In-app Browser":"In-app Browser","Provider configuration":"Provider configuration","Search engine":"Search engine","Safe search":"Safe search",Language:"Language",Country:"Country","Advanced variables":"Advanced variables",Default:"Default",Moderate:"Moderate",Strict:"Strict",Off:"Off","Add tool":"Add tool","Add variable":"Add variable","Add custom MCP":"Add custom MCP","Add custom MCP tool":"Add custom MCP tool","Custom MCP tool":"Custom MCP tool","Discover tools":"Discover tools","Import MCP JSON":"Import MCP JSON","MCP JSON":"MCP JSON","MCP tools":"MCP tools","MCP server":"MCP server","MCP server name already exists.":"MCP server name already exists.",Arguments:"Arguments","Working directory":"Working directory","API key env":"API key env","Tool name":"Tool name","Third-party tool environment":"Third-party tool environment","Environment variables":"Environment variables","Tool name is required.":"Tool name is required.","Environment variable keys are required when values are set.":"Environment variable keys are required when values are set.","MCP tool discovery is available in the Electron app.":"MCP tool discovery is available in the Electron app.","No MCP servers found in JSON.":"No MCP servers found in JSON.","No MCP servers configured":"No MCP servers configured","No tools discovered":"No tools discovered","No tools available":"No tools available","Select tool":"Select tool","Tool discovery failed":"Tool discovery failed","Image recognition":"Image recognition","Image recognition and Web Search":"Image recognition and Web Search","Generic image understanding tool for OCR, screenshot analysis, chart reading, UI comparison, error diagnosis, and other multi-image tasks.":"Generic image understanding tool for OCR, screenshot analysis, chart reading, UI comparison, error diagnosis, and other multi-image tasks.","Generic web search tool supporting Brave, Bing, Google CSE, Serper, SerpAPI, Tavily, and Exa.":"Generic web search tool supporting Brave, Bing, Google CSE, Serper, SerpAPI, Tavily, and Exa.","Generic web search tool supporting hidden in-app browser search plus Brave, Bing, Google CSE, Serper, SerpAPI, Tavily, and Exa.":"Generic web search tool supporting hidden in-app browser search plus Brave, Bing, Google CSE, Serper, SerpAPI, Tavily, and Exa.","Web Search":"Web Search","New model":"New model","New model is required.":"New model is required.","Base model is required.":"Base model is required.","Tool is required.":"Tool is required.","No matching virtual models":"No matching Fusion profiles","No virtual models configured":"No Fusion profiles configured","Remove virtual model":"Remove Fusion","Search virtual models":"Search Fusion",Virtual:"Fusion","Virtual models":"Fusion","Header\u4E2D\u672A\u6536\u5230Authorization\u53C2\u6570\uFF0C\u65E0\u6CD5\u8FDB\u884C\u8EAB\u4EFD\u9A8C\u8BC1\u3002":"Missing Authorization header, so authentication could not be performed."}},zh:{navigation:{onboarding:"\u4E0A\u624B\u5F15\u5BFC","api-keys":"API \u5BC6\u94A5",extensions:"\u6269\u5C55",logs:"\u65E5\u5FD7",networking:"\u7F51\u7EDC",observability:"\u89C2\u6D4B",overview:"\u6982\u89C8",profile:"Agent\u914D\u7F6E",providers:"\u4F9B\u5E94\u5546",models:"\u6A21\u578B",routing:"\u8DEF\u7531",server:"\u670D\u52A1","virtual-models":"Fusion"},settings:{agentAnalysis:"Agent \u89C2\u6D4B",agentAnalysisDescription:"\u8BB0\u5F55\u89C2\u6D4B\u9875\u6240\u9700\u7684\u8BF7\u6C42\u5143\u6570\u636E\u3002",appearance:"\u5916\u89C2",bots:"Bot \u7BA1\u7406",button:"\u8BBE\u7F6E",close:"\u5173\u95ED",data:"\u6570\u636E",done:"\u5B8C\u6210",language:"\u8BED\u8A00",languageChinese:"\u4E2D\u6587",languageEnglish:"\u82F1\u6587",languageSystem:"\u8DDF\u968F\u7CFB\u7EDF",launchAtLogin:"\u5F00\u673A\u81EA\u542F",launchAtLoginDescription:"\u767B\u5F55\u7CFB\u7EDF\u540E\u81EA\u52A8\u6253\u5F00 Claude Code Router\u3002",observability:"\u65E5\u5FD7\u4E0E\u89C2\u6D4B",requestLogs:"\u8BF7\u6C42\u65E5\u5FD7",requestLogsDescription:"\u8BB0\u5F55\u7F51\u5173\u8BF7\u6C42\u5E76\u663E\u793A\u65E5\u5FD7\u9875\u3002",theme:"\u4E3B\u9898",themeDark:"\u6697\u8272",themeLight:"\u4EAE\u8272",themeSystem:"\u8DDF\u968F\u7CFB\u7EDF",toolHub:"ToolHub",toolHubBrowserAutomation:"\u5185\u7F6E\u6D4F\u89C8\u5668\u81EA\u52A8\u5316",toolHubBrowserAutomationDescription:"\u901A\u8FC7 ToolHub \u66B4\u9732 CCR Desktop \u7684\u5185\u7F6E\u6D4F\u89C8\u5668\u81EA\u52A8\u5316\u5DE5\u5177\u3002",toolHubDescription:"\u5C06\u5DF2\u914D\u7F6E\u7684 MCP servers \u4EA4\u7ED9 ToolHub\uFF0C\u7531\u6A21\u578B\u8D1F\u8D23\u68C0\u7D22\u9700\u8981\u7684\u5DE5\u5177\u3002",toolHubEnabled:"\u542F\u7528 ToolHub",toolHubEnabledDescription:"\u5411 Agent \u66B4\u9732\u7D27\u51D1\u7684 ToolHub MCP\uFF0C\u800C\u4E0D\u662F\u6240\u6709\u5DF2\u914D\u7F6E MCP \u5DE5\u5177\u3002",toolHubMaxTools:"\u6700\u5927\u5DE5\u5177\u6570",toolHubModel:"\u68C0\u7D22\u6A21\u578B",toolHubModelPlaceholder:"\u9009\u62E9\u5DF2\u914D\u7F6E\u6A21\u578B",toolHubTimeout:"\u8D85\u65F6\u6BEB\u79D2",tray:"Tray",trayBalanceProgressAccount:"\u8D26\u6237",trayBalanceProgressData:"\u6570\u636E",trayBalanceProgressNoData:"\u6682\u65E0\u53EF\u7528\u8D26\u6237\u6570\u636E\uFF0C\u8BF7\u5148\u4E3A\u4F9B\u5E94\u5546\u542F\u7528\u8D26\u6237\u76D1\u63A7\u3002",trayBalanceProgressRequired:"\u8BF7\u9009\u62E9\u8D26\u6237\u548C\u6570\u636E\u540E\u542F\u7528\u4F59\u989D\u8FDB\u5EA6\u6761\u3002",trayIcon:"\u6258\u76D8\u5C0F\u7CBE\u7075",trayIconCyan:"\u6674\u5C9A",trayIconOrange:"\u6696\u9633",trayIconProgress:"\u4F59\u989D\u8FDB\u5EA6\u6761",trayIconRandom:"\u968F\u673A",trayIconViolet:"\u661F\u6F9C",trayComponentAccount:"\u8D26\u6237\u6307\u6807",trayComponentArc:"\u5F27\u5F62",trayComponentArea:"\u9762\u79EF\u56FE",trayComponentBar:"\u67F1\u72B6\u56FE",trayComponentBars:"\u6A2A\u6761",trayComponentCards:"\u5361\u7247",trayComponentCompact:"\u7D27\u51D1",trayComponentDonut:"\u73AF\u5F62\u56FE",trayComponentFlow:"\u8D8B\u52BF\u56FE",trayComponentGauges:"\u4EEA\u8868\u76D8",trayComponentLine:"\u6298\u7EBF\u56FE",trayComponentList:"\u5217\u8868",trayComponentModelShare:"\u6A21\u578B\u5360\u6BD4",trayComponentPie:"\u997C\u56FE",trayComponentPills:"\u80F6\u56CA",trayComponentRing:"\u5706\u73AF",trayComponentRings:"\u5706\u73AF",trayComponentSparkline:"\u8FF7\u4F60\u6298\u7EBF",trayComponentStacked:"\u5806\u53E0",trayComponentStats:"\u6307\u6807",trayComponentStyles:"\u7EC4\u4EF6\u6837\u5F0F",trayComponentEnabled:"\u542F\u7528\u7EC4\u4EF6",trayComponentProperties:"\u7EC4\u4EF6\u5C5E\u6027",trayComponentStyle:"\u6837\u5F0F",trayComponents:"\u7EC4\u4EF6\u533A",trayComponentTokenMix:"Token \u6784\u6210",trayModuleActivity:"Token \u6D3B\u8DC3\u5EA6",trayModuleAccount:"\u8D26\u6237\u4F59\u989D",trayModuleFooter:"\u5E95\u90E8\u64CD\u4F5C",trayModuleHeader:"\u6807\u9898\u548C\u72B6\u6001",trayModuleModelShare:"\u6A21\u578B\u5360\u6BD4",trayModuleRings:"\u73AF\u5F62\u6307\u6807",trayModuleSourceTabs:"\u4F9B\u5E94\u5546\u5207\u6362",trayModuleStats:"Token \u6307\u6807",trayModuleTokenFlow:"Token \u8D8B\u52BF\u56FE",trayModuleTokenMix:"Token \u6784\u6210",trayPreview:"\u9884\u89C8",trayPreviewEmpty:"\u672A\u542F\u7528 Tray \u6A21\u5757",trayProgressTarget:"\u8FDB\u5EA6\u76EE\u6807",trayWindowModules:"Tray \u7A97\u53E3\u6A21\u5757",title:"\u8BBE\u7F6E"},sidebar:{collapse:"\u6536\u8D77\u4FA7\u8FB9\u680F",expand:"\u5C55\u5F00\u4FA7\u8FB9\u680F",primaryNavigation:"\u4E3B\u5BFC\u822A"},text:{"24h":"24 \u5C0F\u65F6","7d":"7 \u5929","30d":"30 \u5929",Agent:"Agent","A provider is required before profiles can route traffic.":"\u9700\u8981\u5148\u914D\u7F6E\u4F9B\u5E94\u5546\uFF0C\u914D\u7F6E\u6863\u6848\u624D\u80FD\u8DEF\u7531\u8BF7\u6C42\u3002","Add or verify a model provider.":"\u6DFB\u52A0\u6216\u786E\u8BA4\u6A21\u578B\u4F9B\u5E94\u5546\u3002","Agent Analysis":"Agent \u5206\u6790","Agent access":"Agent \u63A5\u5165","Agent Mix":"Agent \u5206\u5E03","Agent profiles":"Agent \u914D\u7F6E\u6863\u6848","All agents":"\u5168\u90E8 Agent","All providers":"\u5168\u90E8\u4F9B\u5E94\u5546","API key":"API \u5BC6\u94A5","API key created":"API \u5BC6\u94A5\u5DF2\u521B\u5EFA","API keys database":"API \u5BC6\u94A5\u6570\u636E\u5E93","Copy this key now. It may not be shown again.":"\u8BF7\u73B0\u5728\u590D\u5236\u4FDD\u5B58\u8FD9\u4E2A\u5BC6\u94A5\uFF0C\u4E4B\u540E\u53EF\u80FD\u4E0D\u4F1A\u518D\u6B21\u5B8C\u6574\u663E\u793A\u3002","Only enter an API key issued for this endpoint. Official provider keys must only be used with official endpoints.":"\u53EA\u8F93\u5165\u7531\u5F53\u524D\u7AEF\u70B9\u7B7E\u53D1\u7684 API \u5BC6\u94A5\u3002\u5B98\u65B9\u4F9B\u5E94\u5546\u5BC6\u94A5\u53EA\u80FD\u7528\u4E8E\u5B98\u65B9\u7AEF\u70B9\u3002",Add:"\u6DFB\u52A0","Add env variable":"\u6DFB\u52A0\u73AF\u5883\u53D8\u91CF","Add header":"\u6DFB\u52A0\u8BF7\u6C42\u5934","Add API Key":"\u6DFB\u52A0 API \u5BC6\u94A5","Add API key":"\u6DFB\u52A0 API \u5BC6\u94A5","Add key":"\u6DFB\u52A0 Key","Add limit":"\u6DFB\u52A0\u9650\u5236","Add parameter":"\u6DFB\u52A0\u53C2\u6570","Add Profile":"\u6DFB\u52A0\u914D\u7F6E","Add profile":"\u6DFB\u52A0\u914D\u7F6E","Add Provider":"\u6DFB\u52A0\u4F9B\u5E94\u5546","Add provider":"\u6DFB\u52A0\u4F9B\u5E94\u5546","Add bot":"\u6DFB\u52A0 Bot","Add new bot":"\u6DFB\u52A0\u65B0 Bot","Add Routing Rule":"\u6DFB\u52A0\u8DEF\u7531\u89C4\u5219","Add routing rule":"\u6DFB\u52A0\u8DEF\u7531\u89C4\u5219","Advanced Settings...":"\u9AD8\u7EA7\u8BBE\u7F6E...","Advanced key options":"Key \u9AD8\u7EA7\u9009\u9879","Advanced settings":"\u9AD8\u7EA7\u8BBE\u7F6E",Always:"\u59CB\u7EC8",Alias:"\u522B\u540D","Alias is required.":"\u522B\u540D\u4E0D\u80FD\u4E3A\u7A7A\u3002",Applied:"\u5DF2\u5E94\u7528","App only":"\u4EC5 App",Args:"\u53C2\u6570","API Keys":"API \u5BC6\u94A5","API key included":"\u5DF2\u5305\u542B API \u5BC6\u94A5","API key not included":"\u672A\u5305\u542B API \u5BC6\u94A5","API key persistence is only available in the Electron app.":"API Key \u6301\u4E45\u5316\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Acknowledge events":"\u786E\u8BA4\u4E8B\u4EF6","Auth type":"\u8BA4\u8BC1\u7C7B\u578B","Auth method":"\u8BA4\u8BC1\u65B9\u5F0F","Auto start integration":"\u81EA\u52A8\u542F\u52A8\u96C6\u6210","Base URL":"\u57FA\u7840 URL",Bot:"Bot","Bot name, platform, and required authentication fields are required.":"Bot \u540D\u79F0\u3001\u5E73\u53F0\u548C\u5FC5\u586B\u8BA4\u8BC1\u5B57\u6BB5\u4E0D\u80FD\u4E3A\u7A7A\u3002","Bot gateway path":"Bot \u7F51\u5173\u8DEF\u5F84","Weixin iLink":"\u5FAE\u4FE1",WeCom:"\u4F01\u4E1A\u5FAE\u4FE1",Feishu:"\u98DE\u4E66",DingTalk:"\u9489\u9489","QR Login":"\u626B\u7801\u767B\u5F55","Weixin Login":"\u5FAE\u4FE1\u767B\u5F55","Weixin QR code":"\u5FAE\u4FE1\u4E8C\u7EF4\u7801","QR login is available in the Electron app.":"\u626B\u7801\u767B\u5F55\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","QR window is available in the Electron app.":"\u4E8C\u7EF4\u7801\u7A97\u53E3\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","QR scan timed out.":"\u626B\u7801\u8D85\u65F6\u3002","QR scan observation failed.":"\u626B\u7801\u72B6\u6001\u89C2\u6D4B\u5931\u8D25\u3002","QR scan observation ended unexpectedly.":"\u626B\u7801\u72B6\u6001\u89C2\u6D4B\u5F02\u5E38\u7ED3\u675F\u3002","Preparing Weixin login.":"\u6B63\u5728\u51C6\u5907\u5FAE\u4FE1\u767B\u5F55\u3002","QR login canceled.":"\u626B\u7801\u767B\u5F55\u5DF2\u53D6\u6D88\u3002","Weixin login requires a web login URL.":"\u5FAE\u4FE1\u767B\u5F55\u9700\u8981\u7F51\u9875\u5F62\u5F0F\u7684\u767B\u5F55\u5730\u5740\u3002","Generate QR code":"\u751F\u6210\u4E8C\u7EF4\u7801","Generating QR code":"\u6B63\u5728\u751F\u6210\u4E8C\u7EF4\u7801","Open QR window":"\u6253\u5F00\u4E8C\u7EF4\u7801\u7A97\u53E3","Scan the QR code in Weixin.":"\u8BF7\u4F7F\u7528\u5FAE\u4FE1\u626B\u63CF\u4E8C\u7EF4\u7801\u3002","Scan with Weixin to connect this bot.":"\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801\u8FDE\u63A5\u8FD9\u4E2A Bot\u3002","Scan with Weixin in the opened window.":"\u8BF7\u5728\u6253\u5F00\u7684\u7A97\u53E3\u4E2D\u4F7F\u7528\u5FAE\u4FE1\u626B\u7801\u3002","Weixin login window closed, confirming login status.":"\u5FAE\u4FE1\u767B\u5F55\u7A97\u53E3\u5DF2\u5173\u95ED\uFF0C\u6B63\u5728\u786E\u8BA4\u767B\u5F55\u72B6\u6001\u3002","Waiting for QR code":"\u7B49\u5F85\u751F\u6210\u4E8C\u7EF4\u7801","Waiting for scan":"\u7B49\u5F85\u626B\u7801","Scanned, confirm on phone":"\u5DF2\u626B\u7801\uFF0C\u8BF7\u5728\u624B\u673A\u4E0A\u786E\u8BA4","Verification required":"\u9700\u8981\u9A8C\u8BC1\u7801",Connected:"\u5DF2\u8FDE\u63A5","QR code expired":"\u4E8C\u7EF4\u7801\u5DF2\u8FC7\u671F","Already connected":"\u5DF2\u8FDE\u63A5\u8FC7","QR login failed":"\u626B\u7801\u767B\u5F55\u5931\u8D25",Regenerate:"\u91CD\u65B0\u751F\u6210","Bot Token":"Bot Token","Account ID":"\u8D26\u53F7 ID","User ID":"\u7528\u6237 ID","Corp ID":"\u4F01\u4E1A ID","Agent ID":"Agent ID",Secret:"Secret","Signing Secret":"Signing Secret","App Token":"App Token","OAuth 2.0":"OAuth 2.0","OAuth Bot Token":"OAuth Bot Token","OAuth Access Token":"OAuth Access Token","Application ID":"\u5E94\u7528 ID","Public Key":"\u516C\u94A5","Channel Access Token":"Channel Access Token","Channel Secret":"Channel Secret","App ID":"App ID","App Secret":"App Secret","Verification Token":"Verification Token",Domain:"Domain","App Key":"App Key","Robot Code":"Robot Code",Optional:"\u53EF\u9009",Auto:"\u81EA\u52A8",Back:"\u8FD4\u56DE",Backup:"\u5907\u4EFD",Cache:"\u7F13\u5B58","Cache rate":"\u7F13\u5B58\u7387","Cache ratio":"\u7F13\u5B58\u7387","Cache tokens":"\u7F13\u5B58\u4EE4\u724C","Cache write":"\u7F13\u5B58\u5199\u5165",Cancel:"\u53D6\u6D88",Channel:"\u9891\u9053",Check:"\u68C0\u67E5","Check Connection":"\u68C0\u6D4B\u8FDE\u901A\u6027","Checking connection":"\u6B63\u5728\u68C0\u6D4B\u8FDE\u901A\u6027","Check for updates":"\u68C0\u67E5\u66F4\u65B0","Checking for updates":"\u6B63\u5728\u68C0\u67E5\u66F4\u65B0","Capture network":"\u6355\u83B7\u7F51\u7EDC","Connection verified":"\u8FDE\u901A\u6027\u5DF2\u9A8C\u8BC1",Action:"\u64CD\u4F5C","Check trust":"\u68C0\u67E5\u4FE1\u4EFB","Choose where each agent uses CCR.":"\u9009\u62E9\u6BCF\u4E2A Agent \u5728\u54EA\u91CC\u4F7F\u7528 CCR\u3002","Built-in":"\u5185\u7F6E","Identifies the Claude Code user-agent to provide deep Claude Code integration.":"\u901A\u8FC7\u8BC6\u522B Claude Code \u7684 user-agent\uFF0C\u5B9E\u73B0\u5BF9 Claude Code \u7684\u6DF1\u5EA6\u9002\u914D\u3002","Identifies the Codex user-agent to provide deep Codex integration.":"\u901A\u8FC7\u8BC6\u522B Codex \u7684 user-agent\uFF0C\u5B9E\u73B0\u5BF9 Codex \u7684\u6DF1\u5EA6\u9002\u914D\u3002","Click Check Connection to verify connectivity with a real model request.":"\u70B9\u51FB\u68C0\u6D4B\u8FDE\u901A\u6027\uFF0C\u7528\u4E00\u6B21\u771F\u5B9E\u6A21\u578B\u8BF7\u6C42\u9A8C\u8BC1\u662F\u5426\u53EF\u7528\u3002","Click Add to create one":"\u70B9\u51FB\u6DFB\u52A0\u521B\u5EFA\u4E00\u9879","Click Install to add one":"\u70B9\u51FB\u5B89\u88C5\u6DFB\u52A0\u4E00\u9879",Client:"\u5BA2\u6237\u7AEF","Client Analysis":"\u5BA2\u6237\u7AEF\u5206\u6790","Client Signals":"\u5BA2\u6237\u7AEF\u4FE1\u53F7","Claude Code":"Claude Code",CLI:"CLI",APP:"APP","CLI & APP":"CLI \u548C APP","CLI command":"CLI \u547D\u4EE4",Close:"\u5173\u95ED","Close dialog":"\u5173\u95ED\u5F39\u7A97",Code:"\u4EE3\u7801",Codex:"Codex","Codex model":"Codex \u6A21\u578B","CLI only":"\u4EC5 CLI",Concurrency:"\u5E76\u53D1",Condition:"\u6761\u4EF6","Conversation type":"\u4F1A\u8BDD\u7C7B\u578B",Mode:"\u6A21\u5F0F","Match value":"\u5339\u914D\u503C","Claude Design":"Claude Design","Claude Design model":"Claude Design \u6A21\u578B","Claude Design routes":"Claude Design \u8DEF\u7531",Configure:"\u914D\u7F6E","Configure provider":"\u914D\u7F6E\u4F9B\u5E94\u5546","Configure Extension":"\u914D\u7F6E\u6269\u5C55","Configure extension":"\u914D\u7F6E\u6269\u5C55","Configure plugin":"\u914D\u7F6E\u63D2\u4EF6","Configure plugin route":"\u914D\u7F6E\u63D2\u4EF6\u8DEF\u7531","Configure Routing":"\u914D\u7F6E\u8DEF\u7531","Configure multiple provider API keys for this supplier.":"\u4E3A\u8FD9\u4E2A\u4F9B\u5E94\u5546\u914D\u7F6E\u591A\u4E2A\u4E0A\u6E38 API Key\u3002",Copy:"\u590D\u5236","Create integration":"\u521B\u5EFA\u96C6\u6210",Credential:"\u51ED\u636E","Credential chain":"\u51ED\u636E\u94FE","Credential pool":"\u51ED\u636E\u6C60","Credential saturated":"\u51ED\u636E\u5DF2\u9971\u548C","Credentials JSON":"\u51ED\u636E JSON",Continue:"\u7EE7\u7EED","Custom config path":"\u81EA\u5B9A\u4E49\u914D\u7F6E\u8DEF\u5F84","Core gateway":"\u6838\u5FC3\u7F51\u5173",Cost:"\u6210\u672C","Estimated cost":"\u4F30\u7B97\u6210\u672C","Connect agent":"\u63A5\u5165 Agent","Create a profile for your agent.":"\u4E3A\u4F60\u7684 Agent \u521B\u5EFA\u914D\u7F6E\u6863\u6848\u3002","Cursor model":"Cursor \u6A21\u578B","Cursor Proxy routes":"Cursor Proxy \u8DEF\u7531",Custom:"\u81EA\u5B9A\u4E49",Delete:"\u5220\u9664","Delete bot":"\u5220\u9664 Bot","Delete Extension":"\u5220\u9664\u6269\u5C55","Delete Provider":"\u5220\u9664\u4F9B\u5E94\u5546","Delete Routing Rule":"\u5220\u9664\u8DEF\u7531\u89C4\u5219","Delete this bot?":"\u5220\u9664\u8FD9\u4E2A Bot\uFF1F","Delete this extension from the configuration?":"\u4ECE\u914D\u7F6E\u4E2D\u5220\u9664\u8FD9\u4E2A\u6269\u5C55\uFF1F","Delete this provider from the configuration?":"\u4ECE\u914D\u7F6E\u4E2D\u5220\u9664\u8FD9\u4E2A\u4F9B\u5E94\u5546\uFF1F","Delete this routing rule from the configuration?":"\u4ECE\u914D\u7F6E\u4E2D\u5220\u9664\u8FD9\u6761\u8DEF\u7531\u89C4\u5219\uFF1F",Dependencies:"\u4F9D\u8D56","Default target model":"\u9ED8\u8BA4\u76EE\u6807\u6A21\u578B","Default failure handling":"\u9ED8\u8BA4\u6545\u969C\u5904\u7406","Default on failure":"\u9ED8\u8BA4\u5931\u8D25\u5904\u7406",Description:"\u63CF\u8FF0","CCR scanned this computer for Claude Code, Codex, and ZCode login states. Click Import to add one as a gateway provider.":"CCR \u5DF2\u626B\u63CF\u672C\u673A\u7684 Claude Code\u3001Codex \u548C ZCode \u767B\u5F55\u6001\u3002\u70B9\u51FB\u5BFC\u5165\u5373\u53EF\u6DFB\u52A0\u4E3A\u7F51\u5173\u4F9B\u5E94\u5546\u3002",Detected:"\u5DF2\u68C0\u6D4B","Detecting protocols":"\u6B63\u5728\u63A2\u6D4B\u534F\u8BAE","Enter API endpoint, API key, and at least one model to enable connectivity check.":"\u586B\u5199 API \u5730\u5740\u3001API Key \u548C\u81F3\u5C11\u4E00\u4E2A\u6A21\u578B\u540E\uFF0C\u624D\u53EF\u68C0\u6D4B\u8FDE\u901A\u6027\u3002","Import local agent login":"\u5BFC\u5165\u672C\u673A Agent \u767B\u5F55\u6001","ChatGPT login detected. Click Import to add it as a gateway provider.":"\u5DF2\u68C0\u6D4B\u5230 ChatGPT \u767B\u5F55\u6001\u3002\u70B9\u51FB\u5BFC\u5165\u5373\u53EF\u6DFB\u52A0\u4E3A\u7F51\u5173\u4F9B\u5E94\u5546\u3002","Claude Code login detected. Click Import to add it as a gateway provider.":"\u5DF2\u68C0\u6D4B\u5230 Claude Code \u767B\u5F55\u6001\u3002\u70B9\u51FB\u5BFC\u5165\u5373\u53EF\u6DFB\u52A0\u4E3A\u7F51\u5173\u4F9B\u5E94\u5546\u3002","Claude Code login was detected, but no usable access token was found.":"\u5DF2\u68C0\u6D4B\u5230 Claude Code \u767B\u5F55\u6001\uFF0C\u4F46\u6CA1\u6709\u627E\u5230\u53EF\u7528\u7684 access token\u3002","Codex auth file was found, but no usable token was detected.":"\u5DF2\u627E\u5230 Codex \u8BA4\u8BC1\u6587\u4EF6\uFF0C\u4F46\u6CA1\u6709\u68C0\u6D4B\u5230\u53EF\u7528 token\u3002","Claude Code credential file was found, but no usable OAuth token was detected.":"\u5DF2\u627E\u5230 Claude Code \u51ED\u636E\u6587\u4EF6\uFF0C\u4F46\u6CA1\u6709\u68C0\u6D4B\u5230\u53EF\u7528 OAuth token\u3002",Locked:"\u5DF2\u52A0\u5BC6","Local agent login will be connected after saving this provider.":"\u4FDD\u5B58\u8FD9\u4E2A\u4F9B\u5E94\u5546\u540E\u4F1A\u63A5\u5165\u672C\u673A Agent \u767B\u5F55\u6001\u3002","Display name":"\u663E\u793A\u540D\u79F0","Double click to copy":"\u53CC\u51FB\u590D\u5236",Edit:"\u7F16\u8F91","Edit bot":"\u7F16\u8F91 Bot","Edit API Key":"\u7F16\u8F91 API \u5BC6\u94A5","Edit API key":"\u7F16\u8F91 API \u5BC6\u94A5","Edit Profile":"\u7F16\u8F91\u914D\u7F6E","Edit Provider":"\u7F16\u8F91\u4F9B\u5E94\u5546","Edit provider":"\u7F16\u8F91\u4F9B\u5E94\u5546","Edit Routing Rule":"\u7F16\u8F91\u8DEF\u7531\u89C4\u5219","Edit rule":"\u7F16\u8F91\u89C4\u5219","Effect scope":"\u4F5C\u7528\u8303\u56F4",Enable:"\u542F\u7528",Enabled:"\u542F\u7528",Endpoint:"\u7AEF\u70B9","Entry mode":"\u5165\u53E3\u6A21\u5F0F","Environment variables":"\u73AF\u5883\u53D8\u91CF","Endpoint Health":"\u7AEF\u70B9\u5065\u5EB7","Endpoint information":"\u7AEF\u70B9\u4FE1\u606F","HTTP status":"HTTP \u72B6\u6001\u7801","Expiration is required.":"\u8FC7\u671F\u65F6\u95F4\u4E0D\u80FD\u4E3A\u7A7A\u3002","Let's start":"\u5F00\u59CB\u5427",Error:"\u9519\u8BEF","Error message":"\u9519\u8BEF\u4FE1\u606F",Errors:"\u9519\u8BEF\u6570","Failed requests":"\u5931\u8D25\u8BF7\u6C42","Failed to save profile before copying.":"\u590D\u5236\u524D\u4FDD\u5B58\u914D\u7F6E\u6863\u6848\u5931\u8D25\u3002","Failed to save profile before opening.":"\u6253\u5F00\u524D\u4FDD\u5B58\u914D\u7F6E\u6863\u6848\u5931\u8D25\u3002",Expiration:"\u8FC7\u671F\u65F6\u95F4","Expires at":"\u8FC7\u671F\u4E8E","Exact model":"\u7CBE\u786E\u6A21\u578B",Extensions:"\u6269\u5C55",Fallback:"\u515C\u5E95","Fallback chain":"\u56DE\u9000\u94FE","Fallback model":"\u56DE\u9000\u6A21\u578B","Fallback target":"\u5931\u8D25\u964D\u7EA7\u76EE\u6807","Fallback targets":"\u5931\u8D25\u964D\u7EA7\u76EE\u6807","Failure handling":"\u6545\u969C\u5904\u7406","Forward agent messages":"\u8F6C\u53D1 Agent \u6D88\u606F","Full content":"\u5B8C\u6574\u5185\u5BB9","Full content unavailable":"\u65E0\u6CD5\u8BFB\u53D6\u5B8C\u6574\u5185\u5BB9","Bot only forwards messages when opening the APP from CCR. CLI does not forward messages yet.":"Bot\u4EC5\u5728\u4F7F\u7528CCR\u6253\u5F00APP\u7684\u60C5\u51B5\u4E0B\u624D\u4F1A\u8F6C\u53D1\u6D88\u606F\uFF0Ccli\u76EE\u524D\u4E0D\u4F1A\u8F6C\u53D1\u6D88\u606F","Messages are forwarded only when using the corresponding app.":"\u4EC5\u5728\u4F7F\u7528\u5BF9\u5E94 App \u65F6\u624D\u4F1A\u8F6C\u53D1\u6D88\u606F\u3002","First enabled":"\u9996\u4E2A\u542F\u7528\u89C4\u5219","Least utilized":"\u4F7F\u7528\u7387\u6700\u4F4E","Gateway conversation ID":"\u7F51\u5173\u4F1A\u8BDD ID","Generated config":"\u751F\u6210\u914D\u7F6E","Generated path":"\u751F\u6210\u8DEF\u5F84",Group:"\u7FA4\u7EC4",Handoff:"\u63A5\u529B","Handoff target scan is available in the Electron app.":"\u63A5\u529B\u76EE\u6807\u626B\u63CF\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002",Headers:"\u8BF7\u6C42\u5934","Header rows require keys.":"\u8BF7\u6C42\u5934\u884C\u5FC5\u987B\u586B\u5199 Key\u3002","Fetch usage":"\u83B7\u53D6\u7528\u91CF","Fetch manifest":"\u62C9\u53D6 manifest","Hide advanced settings":"\u6536\u8D77\u9AD8\u7EA7\u8BBE\u7F6E","HTTP JSON request":"HTTP JSON \u8BF7\u6C42",Host:"\u4E3B\u673A",ID:"ID",Import:"\u5BFC\u5165","Import Provider":"\u5BFC\u5165\u4F9B\u5E94\u5546","Import Provider Manifest":"\u5BFC\u5165\u4F9B\u5E94\u5546 Manifest","Import JSON":"\u5BFC\u5165 JSON","Imported provider":"\u5DF2\u5BFC\u5165\u4F9B\u5E94\u5546","Invalid JSON.":"JSON \u65E0\u6548\u3002","Image content":"\u56FE\u50CF\u5185\u5BB9",Images:"\u56FE\u50CF","Idle seconds":"\u7A7A\u95F2\u79D2\u6570",Input:"\u8F93\u5165","Input tokens":"\u8F93\u5165\u4EE4\u724C","Integration ID":"\u96C6\u6210 ID",Install:"\u5B89\u88C5","Install and restart":"\u5B89\u88C5\u5E76\u91CD\u542F",App:"App","Install Extension":"\u5B89\u88C5\u6269\u5C55","Install extension":"\u5B89\u88C5\u6269\u5C55","Install CA":"\u5B89\u88C5 CA",Key:"\u952E",keys:"\u4E2A Key","Keep Claude Code default":"\u4FDD\u6301 Claude Code \u9ED8\u8BA4\u503C","Keep default":"\u4FDD\u6301\u9ED8\u8BA4\u503C","Keep embedded request model":"\u4FDD\u7559\u8BF7\u6C42\u5185\u6A21\u578B",Label:"\u6807\u7B7E","Last apply":"\u4E0A\u6B21\u5E94\u7528","Last checked":"\u4E0A\u6B21\u68C0\u67E5","Last request":"\u6700\u8FD1\u8BF7\u6C42","Last seen":"\u6700\u8FD1\u6D3B\u8DC3","Legacy profile table":"\u65E7\u7248\u914D\u7F6E\u6863\u6848\u8868",Limit:"\u9650\u5236","Limits JSON":"\u9650\u5236 JSON",Limits:"\u9650\u5236",Loading:"\u52A0\u8F7D\u4E2D",Local:"\u672C\u5730",Logs:"\u65E5\u5FD7","Long context":"\u957F\u4E0A\u4E0B\u6587","Long threshold":"\u957F\u4E0A\u4E0B\u6587\u9608\u503C","Max concurrency":"\u6700\u5927\u5E76\u53D1","Max concurrent":"\u6700\u5927\u5E76\u53D1","Manage bots used by agent profiles.":"\u7BA1\u7406 Agent \u914D\u7F6E\u4E2D\u53EF\u9009\u62E9\u7684 Bot\u3002","API key database":"API \u5BC6\u94A5\u6570\u636E\u5E93","Config database":"\u914D\u7F6E\u6570\u636E\u5E93","Configuration is stored in SQLite. The legacy JSON file is only read once for migration.":"\u914D\u7F6E\u5DF2\u5B58\u50A8\u5728 SQLite \u4E2D\uFF0C\u65E7 JSON \u6587\u4EF6\u53EA\u4F1A\u5728\u8FC1\u79FB\u65F6\u8BFB\u53D6\u4E00\u6B21\u3002","Data export is only available in the Electron app.":"\u6570\u636E\u5BFC\u51FA\u4EC5\u5728 Electron \u5E94\u7528\u4E2D\u53EF\u7528\u3002",Export:"\u5BFC\u51FA","Export data":"\u5BFC\u51FA\u6570\u636E","Export current configuration and SQLite data into a single JSON backup file. The export contains API keys and should be stored securely.":"\u5C06\u5F53\u524D\u914D\u7F6E\u548C SQLite \u6570\u636E\u5BFC\u51FA\u4E3A\u5355\u4E2A JSON \u5907\u4EFD\u6587\u4EF6\u3002\u5BFC\u51FA\u5185\u5BB9\u5305\u542B API \u5BC6\u94A5\uFF0C\u8BF7\u59A5\u5584\u4FDD\u5B58\u3002",Exported:"\u5DF2\u5BFC\u51FA",Exporting:"\u6B63\u5728\u5BFC\u51FA","Request log database":"\u8BF7\u6C42\u65E5\u5FD7\u6570\u636E\u5E93",Method:"\u65B9\u6CD5",Model:"\u6A21\u578B","Model descriptions":"\u6A21\u578B\u63CF\u8FF0","Model override":"\u6A21\u578B\u8986\u76D6","Model routing":"\u6A21\u578B\u8DEF\u7531","Model prefix":"\u6A21\u578B\u524D\u7F00",Models:"\u6A21\u578B","Describe model strengths, tradeoffs, and best-fit tasks.":"\u63CF\u8FF0\u6A21\u578B\u4F18\u52BF\u3001\u53D6\u820D\u548C\u6700\u9002\u5408\u7684\u4EFB\u52A1\u3002","Module path":"\u6A21\u5757\u8DEF\u5F84",Name:"\u540D\u79F0",Networking:"\u7F51\u7EDC",Never:"\u6C38\u4E0D","No API keys":"\u6682\u65E0 API \u5BC6\u94A5","No agent activity":"\u6682\u65E0 Agent \u884C\u4E3A\u6570\u636E","No client signals":"\u6682\u65E0\u5BA2\u6237\u7AEF\u4FE1\u53F7","No client usage yet":"\u6682\u65E0\u5BA2\u6237\u7AEF\u7528\u91CF","No endpoint activity":"\u6682\u65E0\u7AEF\u70B9\u6D3B\u52A8","No errors":"\u6682\u65E0\u9519\u8BEF","No provider presets found":"\u6CA1\u6709\u5339\u914D\u7684\u9884\u8BBE\u4F9B\u5E94\u5546","No provider usage yet":"\u6682\u65E0\u4F9B\u5E94\u5546\u7528\u91CF","No provider yet":"\u8FD8\u6CA1\u6709\u4F9B\u5E94\u5546","No requests captured yet":"\u6682\u65E0\u8BF7\u6C42\u8BB0\u5F55","No bots configured":"\u5C1A\u672A\u914D\u7F6E Bot","No data":"\u65E0\u6570\u636E","No route activity":"\u6682\u65E0\u8DEF\u7531\u6D3B\u52A8","No targets found":"\u672A\u53D1\u73B0\u76EE\u6807",No:"\u5426",None:"\u65E0","Not configured":"\u672A\u914D\u7F6E","Not running":"\u672A\u8FD0\u884C","Agent profiles are disabled.":"Agent \u914D\u7F6E\u6863\u6848\u5DF2\u5173\u95ED\u3002",Open:"\u6253\u5F00","Open Agent":"\u6253\u5F00Agent","Open CA":"\u6253\u5F00 CA","Open Profile":"\u6253\u5F00\u914D\u7F6E","Only opened from CCR":"\u4EC5\u4ECE CCR \u6253\u5F00","Open profiles":"\u67E5\u770B\u914D\u7F6E\u6863\u6848","Open providers":"\u67E5\u770B\u4F9B\u5E94\u5546",Output:"\u8F93\u51FA","Output tokens":"\u8F93\u51FA\u4EE4\u724C",Observability:"\u53EF\u89C2\u6D4B",Off:"\u5173\u95ED","On failure":"\u5931\u8D25\u65F6",Onboarding:"\u4E0A\u624B\u5F15\u5BFC",P50:"P50",P95:"P95",P99:"P99",Parameters:"\u53C2\u6570",Path:"\u8DEF\u5F84",Platform:"\u5E73\u53F0","Platform conversation ID":"\u5E73\u53F0\u4F1A\u8BDD ID","Phone Bluetooth target":"\u624B\u673A\u84DD\u7259\u76EE\u6807","Phone Wi-Fi target":"\u624B\u673A Wi-Fi \u76EE\u6807",Plugin:"\u63D2\u4EF6","Profile model unset":"\u672A\u8BBE\u7F6E\u914D\u7F6E\u6863\u6848\u6A21\u578B","Enable a Claude Code profile before enabling this built-in route.":"\u8BF7\u5148\u542F\u7528\u4E00\u4E2A Claude Code \u914D\u7F6E\u6863\u6848\uFF0C\u518D\u542F\u7528\u6B64\u5185\u7F6E\u8DEF\u7531\u3002","Enable a Codex profile before enabling this built-in route.":"\u8BF7\u5148\u542F\u7528\u4E00\u4E2A Codex \u914D\u7F6E\u6863\u6848\uFF0C\u518D\u542F\u7528\u6B64\u5185\u7F6E\u8DEF\u7531\u3002","Set a model on the Claude Code profile before enabling this built-in route.":"\u8BF7\u5148\u4E3A Claude Code \u914D\u7F6E\u6863\u6848\u8BBE\u7F6E\u6A21\u578B\uFF0C\u518D\u542F\u7528\u6B64\u5185\u7F6E\u8DEF\u7531\u3002","Set a model on the Codex profile before enabling this built-in route.":"\u8BF7\u5148\u4E3A Codex \u914D\u7F6E\u6863\u6848\u8BBE\u7F6E\u6A21\u578B\uFF0C\u518D\u542F\u7528\u6B64\u5185\u7F6E\u8DEF\u7531\u3002","Plugin apps must be a JSON array.":"\u63D2\u4EF6 App \u5FC5\u987B\u662F JSON \u6570\u7EC4\u3002","Plugin config JSON":"\u63D2\u4EF6\u914D\u7F6E JSON","Plugin config must be a JSON object.":"\u63D2\u4EF6\u914D\u7F6E\u5FC5\u987B\u662F JSON \u5BF9\u8C61\u3002","Local plugin selection is available in the Electron app.":"\u672C\u5730\u63D2\u4EF6\u9009\u62E9\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Plugin route":"\u63D2\u4EF6\u8DEF\u7531","Plugin Settings":"\u63D2\u4EF6\u8BBE\u7F6E",Port:"\u7AEF\u53E3",Process:"\u8FDB\u7A0B",Protocol:"\u534F\u8BAE","Protocol details":"\u534F\u8BAE\u8BE6\u60C5","Protocol detection details":"\u534F\u8BAE\u68C0\u6D4B\u8BE6\u60C5","Protocols detected":"\u534F\u8BAE\u5DF2\u63A2\u6D4B","External core":"\u5916\u90E8 Core","External provider link":"\u5916\u90E8\u4F9B\u5E94\u5546\u94FE\u63A5",Provider:"\u4F9B\u5E94\u5546","Provider Analysis":"\u4F9B\u5E94\u5546\u5206\u6790","Provider credential JSON did not contain any API keys.":"\u4F9B\u5E94\u5546\u51ED\u636E JSON \u4E2D\u6CA1\u6709\u53EF\u7528 API Key\u3002","Provider credential JSON is invalid.":"\u4F9B\u5E94\u5546\u51ED\u636E JSON \u65E0\u6548\u3002","Provider credential JSON must be an array or object.":"\u4F9B\u5E94\u5546\u51ED\u636E JSON \u5FC5\u987B\u662F\u6570\u7EC4\u6216\u5BF9\u8C61\u3002","Provider credential limits JSON is invalid.":"\u4F9B\u5E94\u5546\u51ED\u636E\u9650\u5236 JSON \u65E0\u6548\u3002","Provider credential limits must be a JSON object.":"\u4F9B\u5E94\u5546\u51ED\u636E\u9650\u5236\u5FC5\u987B\u662F JSON \u5BF9\u8C61\u3002","Provider credential priority must be a positive number.":"\u4F9B\u5E94\u5546\u51ED\u636E\u4F18\u5148\u7EA7\u5FC5\u987B\u662F\u6B63\u6570\u3002","Provider credential rows require API keys.":"\u4F9B\u5E94\u5546\u51ED\u636E\u884C\u5FC5\u987B\u586B\u5199 API Key\u3002","Provider credential rows require names.":"\u4F9B\u5E94\u5546\u51ED\u636E\u884C\u5FC5\u987B\u586B\u5199\u540D\u79F0\u3002","Provider credential weight must be a positive number.":"\u4F9B\u5E94\u5546\u51ED\u636E\u6743\u91CD\u5FC5\u987B\u662F\u6B63\u6570\u3002","Provider ID":"\u4F9B\u5E94\u5546 ID","Provider link failed":"\u4F9B\u5E94\u5546\u94FE\u63A5\u5931\u8D25","Provider middleware":"\u4F9B\u5E94\u5546\u4E2D\u95F4\u4EF6","Provider name":"\u4F9B\u5E94\u5546\u540D\u79F0","Provider name and Base URL are required.":"\u4F9B\u5E94\u5546\u540D\u79F0\u548C\u57FA\u7840 URL \u4E0D\u80FD\u4E3A\u7A7A\u3002","Provider name already exists.":"\u4F9B\u5E94\u5546\u540D\u79F0\u5DF2\u5B58\u5728\u3002","Provider ready":"\u4F9B\u5E94\u5546\u5DF2\u5C31\u7EEA","Provider plugin":"\u4F9B\u5E94\u5546\u63D2\u4EF6","Provider website":"\u4F9B\u5E94\u5546\u7F51\u7AD9","Open provider website":"\u6253\u5F00\u4F9B\u5E94\u5546\u7F51\u7AD9",Providers:"\u4F9B\u5E94\u5546",Proxy:"\u4EE3\u7406","Proxy mode":"\u4EE3\u7406\u6A21\u5F0F","Preset provider":"\u9884\u8BBE\u4F9B\u5E94\u5546",Profile:"\u914D\u7F6E","Profile name":"\u914D\u7F6E\u6863\u6848\u540D\u79F0","Profile name and required target settings are missing.":"\u8BF7\u586B\u5199\u914D\u7F6E\u6863\u6848\u540D\u79F0\u548C\u5FC5\u9700\u7684\u63A5\u5165\u76EE\u6807\u8BBE\u7F6E\u3002","Profile name, required target settings, and environment variable keys are required.":"\u8BF7\u586B\u5199\u914D\u7F6E\u6863\u6848\u540D\u79F0\u3001\u5FC5\u9700\u7684\u63A5\u5165\u76EE\u6807\u8BBE\u7F6E\u548C\u73AF\u5883\u53D8\u91CF Key\u3002","Profile no longer exists.":"\u914D\u7F6E\u6863\u6848\u5DF2\u4E0D\u5B58\u5728\u3002","Profile opening is only available in the Electron app.":"\u914D\u7F6E\u6863\u6848\u6253\u5F00\u529F\u80FD\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Profile stopping is only available in the Electron app.":"\u914D\u7F6E\u6863\u6848\u505C\u6B62\u529F\u80FD\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Profile ready":"\u914D\u7F6E\u6863\u6848\u5DF2\u5C31\u7EEA","Recent Errors":"\u6700\u8FD1\u9519\u8BEF","Recent Requests":"\u6700\u8FD1\u8BF7\u6C42",Refresh:"\u5237\u65B0","Refresh observability":"\u5237\u65B0\u53EF\u89C2\u6D4B","Refresh request logs":"\u5237\u65B0\u8BF7\u6C42\u65E5\u5FD7","Refresh network captures":"\u5237\u65B0\u7F51\u7EDC\u6355\u83B7",Remove:"\u79FB\u9664","Remove API key":"\u79FB\u9664 API \u5BC6\u94A5","Remove extension":"\u79FB\u9664\u6269\u5C55","Remove limit":"\u79FB\u9664\u9650\u5236","Remove provider":"\u79FB\u9664\u4F9B\u5E94\u5546","Remove profile":"\u79FB\u9664\u914D\u7F6E\u6863\u6848","Remove rule":"\u79FB\u9664\u89C4\u5219","Replace existing provider":"\u66FF\u6362\u5DF2\u6709\u4F9B\u5E94\u5546",Request:"\u8BF7\u6C42","Request action":"\u8BF7\u6C42\u52A8\u4F5C","Request ID":"\u8BF7\u6C42 ID","Request logs database":"\u8BF7\u6C42\u65E5\u5FD7\u6570\u636E\u5E93","Request timeout ms":"\u8BF7\u6C42\u8D85\u65F6 ms",Requests:"\u8BF7\u6C42","Rewrite request parameters":"\u6539\u5199\u8BF7\u6C42\u53C2\u6570",Set:"\u8BBE\u7F6E","Append to array":"\u8FFD\u52A0\u5230\u6570\u7EC4","Prepend to array":"\u63D2\u5165\u5230\u6570\u7EC4\u5F00\u5934","Remove from array":"\u4ECE\u6570\u7EC4\u79FB\u9664","Replace in array":"\u66FF\u6362\u6570\u7EC4\u5143\u7D20","starts with":"\u5F00\u5934\u5339\u914D",contains:"\u5305\u542B","contains deep":"\u6DF1\u5EA6\u5305\u542B","not contains":"\u4E0D\u5305\u542B",Attempt:"\u5C1D\u8BD5","Final attempt":"\u6700\u7EC8\u5C1D\u8BD5","Next retry wait":"\u4E0B\u6B21\u91CD\u8BD5\u7B49\u5F85",Retries:"\u91CD\u8BD5\u6B21\u6570",Retry:"\u7EE7\u7EED\u91CD\u8BD5","Retry attempts":"\u91CD\u8BD5\u5C1D\u8BD5","Weighted order":"\u6309\u6743\u91CD\u6392\u5E8F","Ready to route":"\u53EF\u4EE5\u5F00\u59CB\u8DEF\u7531","Restart proxy":"\u91CD\u542F\u4EE3\u7406",Route:"\u8DEF\u7531","Route Observability":"\u8DEF\u7531\u53EF\u89C2\u6D4B",Rules:"\u89C4\u5219",Save:"\u4FDD\u5B58","Screen lock":"\u9501\u5C4F","Search API keys":"\u641C\u7D22 API \u5BC6\u94A5","Search extensions":"\u641C\u7D22\u6269\u5C55","Search models":"\u641C\u7D22\u6A21\u578B","Search network captures":"\u641C\u7D22\u7F51\u7EDC\u6355\u83B7","Search providers":"\u641C\u7D22\u4F9B\u5E94\u5546","Search providers or models":"\u641C\u7D22\u4F9B\u5E94\u5546\u6216\u6A21\u578B","Search request logs":"\u641C\u7D22\u8BF7\u6C42\u65E5\u5FD7","Search routing rules":"\u641C\u7D22\u8DEF\u7531\u89C4\u5219","Select account":"\u9009\u62E9\u8D26\u6237","Select bot":"\u9009\u62E9 Bot","Select data":"\u9009\u62E9\u6570\u636E",Server:"\u670D\u52A1","Startup timeout ms":"\u542F\u52A8\u8D85\u65F6 ms","State directory":"\u72B6\u6001\u76EE\u5F55","Account component":"\u8D26\u6237\u7EC4\u4EF6","All accounts":"\u6240\u6709\u8D26\u6237","All credentials":"\u5168\u90E8\u51ED\u636E","Last updated":"\u4E0A\u6B21\u66F4\u65B0","Refresh account":"\u5237\u65B0\u8D26\u6237","Refreshing account":"\u6B63\u5728\u5237\u65B0\u8D26\u6237","Add widget":"\u6DFB\u52A0\u7EC4\u4EF6","Analysis component":"\u5206\u6790\u7EC4\u4EF6",Arc:"\u5F27\u5F62",Area:"\u9762\u79EF\u56FE","Average latency":"\u5E73\u5747\u5EF6\u8FDF",Bar:"\u67F1\u72B6\u56FE",Bars:"\u6A2A\u6761","Breakdown component":"\u6784\u6210\u7EC4\u4EF6",Card:"\u5361\u7247",Cards:"\u5361\u7247","Change widget type":"\u5207\u6362\u7EC4\u4EF6\u7C7B\u578B","Client or provider":"\u5BA2\u6237\u7AEF\u6216\u4F9B\u5E94\u5546","Component properties":"\u7EC4\u4EF6\u5C5E\u6027",Components:"\u7EC4\u4EF6","Component category":"\u7EC4\u4EF6\u7C7B\u578B",Compact:"\u7D27\u51D1",Composed:"\u7EC4\u5408\u56FE",Data:"\u6570\u636E",Done:"\u5B8C\u6210",Donut:"\u73AF\u5F62\u56FE","Edit widgets":"\u7F16\u8F91\u7EC4\u4EF6",Activity:"\u6D3B\u8DC3\u5EA6","Activity component":"\u6D3B\u8DC3\u5EA6\u7EC4\u4EF6","Avg / day":"\u65E5\u5747","Avg / week":"\u5468\u5747",F:"\u4E94",Full:"\u6574\u884C","Header component":"\u6807\u9898\u7EC4\u4EF6",Heatmap:"\u70ED\u529B\u56FE",Large:"\u5927",Less:"\u5C11",Line:"\u6298\u7EBF\u56FE","Longest streak":"\u6700\u957F\u8FDE\u7EED",M:"\u4E00",Medium:"\u4E2D",Metric:"\u6307\u6807","Metric component":"\u6307\u6807\u7EC4\u4EF6","Model Distribution":"\u6A21\u578B\u5206\u5E03","Model distribution":"\u6A21\u578B\u5206\u5E03","Nested rings":"\u5185\u5916\u5706","No widget selected":"\u672A\u9009\u62E9\u7EC4\u4EF6","No widgets configured":"\u672A\u914D\u7F6E\u7EC4\u4EF6","Overview layout":"\u6982\u89C8\u5E03\u5C40",Overview:"\u6982\u89C8",Other:"\u5176\u4ED6",Pie:"\u997C\u56FE","Provider component":"\u4F9B\u5E94\u5546\u7EC4\u4EF6","Remove widget":"\u79FB\u9664\u7EC4\u4EF6",Preview:"\u9884\u89C8","Requests, tokens, cost":"\u8BF7\u6C42\u3001Token\u3001\u6210\u672C",Result:"\u7ED3\u679C","Reset layout":"\u91CD\u7F6E\u5E03\u5C40","Close fullscreen JSON viewer":"\u5173\u95ED\u5168\u5C4F JSON \u67E5\u770B\u5668","Fullscreen JSON viewer":"\u5168\u5C4F JSON \u67E5\u770B\u5668","Open fullscreen JSON viewer":"\u5168\u5C4F\u67E5\u770B JSON","Resize column width":"\u8C03\u6574\u5217\u5BBD","Resize widget height":"\u8C03\u6574\u7EC4\u4EF6\u9AD8\u5EA6","Resize widget size":"\u8C03\u6574\u7EC4\u4EF6\u5927\u5C0F","Resize widget width":"\u8C03\u6574\u7EC4\u4EF6\u5BBD\u5EA6",Ring:"\u5706\u73AF",Semicircle:"\u534A\u5706",Small:"\u5C0F",Stacked:"\u5806\u53E0","Status component":"\u72B6\u6001\u7EC4\u4EF6","Status timeline":"\u72B6\u6001\u65F6\u95F4\u7EBF",Style:"\u6837\u5F0F",Table:"\u8868\u683C",Timeline:"\u65F6\u95F4\u7EBF","Token activity":"Token \u6D3B\u8DC3\u5EA6","Token activity heatmap":"Token \u6D3B\u8DC3\u5EA6\u70ED\u529B\u56FE","Token distribution":"Token \u5206\u5E03","Token or model distribution":"Token \u6216\u6A21\u578B\u5206\u5E03","Token mix, rings, model share":"Token \u6784\u6210\u3001\u73AF\u5F62\u6307\u6807\u3001\u6A21\u578B\u5360\u6BD4","Token mix component":"Token \u6784\u6210\u7EC4\u4EF6","Trend component":"\u8D8B\u52BF\u7EC4\u4EF6","Usage over time":"\u6309\u65F6\u95F4\u67E5\u770B\u7528\u91CF",Weight:"\u6743\u91CD",Widget:"\u7EC4\u4EF6","Widget size":"\u7EC4\u4EF6\u5927\u5C0F",Wide:"\u5BBD","Share cards":"\u5206\u4EAB\u5361\u7247","Share card":"\u5206\u4EAB\u5361\u7247","Save social-ready cards as PNG images":"\u5C06\u9002\u5408\u793E\u4EA4\u5A92\u4F53\u53D1\u5E03\u7684\u5361\u7247\u4FDD\u5B58\u4E3A PNG \u56FE\u7247","Social media PNG cards":"\u9002\u5408\u793E\u4EA4\u5A92\u4F53\u53D1\u5E03\u7684 PNG \u5361\u7247","PNG export":"PNG \u5BFC\u51FA","Save image":"\u4FDD\u5B58\u56FE\u7247",Saving:"\u6B63\u5728\u4FDD\u5B58","Export failed":"\u5BFC\u51FA\u5931\u8D25","AI Usage Wrapped":"AI \u7528\u91CF\u5E74\u62A5","CCR Route Map":"CCR \u8DEF\u7531\u56FE","Model Leaderboard":"\u6A21\u578B\u6392\u884C\u699C","AI Fuel Cockpit":"AI \u71C3\u6599\u4EEA\u8868","Token Calendar Poster":"Token \u65E5\u5386\u6D77\u62A5","Spend Receipt":"\u6D88\u8D39\u5C0F\u7968","tokens routed through CCR":"\u901A\u8FC7 CCR \u8DEF\u7531\u7684\u4EE4\u724C","Top model":"\u6700\u9AD8\u9891\u6A21\u578B","Top provider":"\u6700\u9AD8\u9891\u4F9B\u5E94\u5546","No provider activity":"\u6682\u65E0\u4F9B\u5E94\u5546\u6D3B\u52A8","Peak day":"\u5CF0\u503C\u65E5\u671F","Generated by CCR":"\u7531 CCR \u751F\u6210",Range:"\u8303\u56F4",W:"\u4E09",Yes:"\u662F","Set as default provider":"\u8BBE\u4E3A\u9ED8\u8BA4\u4F9B\u5E94\u5546","Show credential settings":"\u663E\u793A\u51ED\u636E\u914D\u7F6E","Show full content":"\u67E5\u770B\u5B8C\u6574\u5185\u5BB9",Session:"\u4F1A\u8BDD","Session Detail":"\u4F1A\u8BDD\u8BE6\u60C5","Session Requests":"\u4F1A\u8BDD\u8BF7\u6C42",Sessions:"\u4F1A\u8BDD","Clear session":"\u6E05\u9664\u4F1A\u8BDD","Loading session metrics":"\u6B63\u5728\u52A0\u8F7D\u4F1A\u8BDD\u6307\u6807","Trace Detail":"\u94FE\u8DEF\u8BE6\u60C5","Trace duration":"\u94FE\u8DEF\u8017\u65F6","Trace runs":"\u94FE\u8DEF\u8282\u70B9","Call chain":"\u8C03\u7528\u94FE\u8DEF",Runs:"\u8282\u70B9",Run:"\u8282\u70B9",LLM:"LLM","LLM calls":"LLM \u8C03\u7528","No trace runs":"\u6682\u65E0\u94FE\u8DEF\u8282\u70B9","No model activity":"\u6682\u65E0\u6A21\u578B\u6D3B\u52A8","No session requests":"\u6682\u65E0\u4F1A\u8BDD\u8BF7\u6C42","Show all sessions":"\u663E\u793A\u6240\u6709\u4F1A\u8BDD",Status:"\u72B6\u6001","Status codes":"\u72B6\u6001\u7801",Stream:"\u6D41\u5F0F",Streaming:"\u6D41\u5F0F","Non-streaming":"\u975E\u6D41\u5F0F",Started:"\u5F00\u59CB\u65F6\u95F4","Source truncated":"\u6E90\u6570\u636E\u5DF2\u622A\u65AD",Details:"\u8BE6\u60C5",Subagent:"\u5B50\u4EE3\u7406","Subagent Routing":"Subagent \u8DEF\u7531","Subagent calls":"Subagent \u8C03\u7528",Subagents:"Subagent",Success:"\u6210\u529F","Success rate":"\u6210\u529F\u7387","System proxy":"\u7CFB\u7EDF\u4EE3\u7406","System default":"\u7CFB\u7EDF\u9ED8\u8BA4",Target:"\u76EE\u6807","Tenant ID":"\u79DF\u6237 ID","Target model":"\u76EE\u6807\u6A21\u578B","Target model is required.":"\u76EE\u6807\u6A21\u578B\u4E0D\u80FD\u4E3A\u7A7A\u3002",Thread:"\u7EBF\u7A0B","Thread ID":"\u7EBF\u7A0B ID",Thinking:"\u601D\u8003","Token Mix":"\u4EE4\u724C\u6784\u6210",Total:"\u603B\u8BA1","Total tokens":"\u603B\u4EE4\u724C",Today:"\u4ECA\u5929","Token threshold":"\u4EE4\u724C\u9608\u503C",Truncated:"\u5DF2\u622A\u65AD",Tokens:"\u4EE4\u724C",tokens:"\u4EE4\u724C",day:"\u5929",days:"\u5929",Tool:"\u5DE5\u5177","Tool Usage":"\u5DE5\u5177\u4F7F\u7528","Tool calls":"\u5DE5\u5177\u8C03\u7528",Tools:"\u5DE5\u5177","Top tools":"\u9AD8\u9891\u5DE5\u5177",Routes:"\u8DEF\u7531",Timeout:"\u8D85\u65F6",Type:"\u7C7B\u578B",UA:"UA",Unset:"\u672A\u8BBE\u7F6E",URL:"URL","URL is required.":"URL \u4E0D\u80FD\u4E3A\u7A7A\u3002","Usage mode":"\u7528\u91CF\u6A21\u5F0F","Usage request URL":"\u7528\u91CF\u8BF7\u6C42 URL","Usage request URL is required.":"\u7528\u91CF\u8BF7\u6C42 URL \u4E0D\u80FD\u4E3A\u7A7A\u3002","Usage request URL must use http or https.":"\u7528\u91CF\u8BF7\u6C42 URL \u5FC5\u987B\u4F7F\u7528 http \u6216 https\u3002","Usage database":"\u7528\u91CF\u6570\u636E\u5E93","Usage Trend":"\u7528\u91CF\u8D8B\u52BF","User idle":"\u7528\u6237\u7A7A\u95F2","Insert example":"\u63D2\u5165\u793A\u4F8B","Insert New API user balance":"\u63D2\u5165 New API \u7528\u6237\u4F59\u989D","New API user ID":"New API \u7528\u6237 ID","Virtual model":"Fusion","Virtual Models":"Fusion","Add MCP Server":"\u6DFB\u52A0 MCP \u670D\u52A1","Add MCP server":"\u6DFB\u52A0 MCP \u670D\u52A1","Add Virtual Model":"\u6DFB\u52A0 Fusion","Add virtual model":"\u6DFB\u52A0 Fusion","Append instructions":"\u8FFD\u52A0\u6307\u4EE4","At least one match alias, prefix, or suffix is required.":"\u81F3\u5C11\u9700\u8981\u4E00\u4E2A\u5339\u914D\u522B\u540D\u3001\u524D\u7F00\u6216\u540E\u7F00\u3002","Allow client tools":"\u5141\u8BB8\u5BA2\u6237\u7AEF\u5DE5\u5177","Base model":"\u57FA\u7840\u6A21\u578B","Base model mode":"\u57FA\u7840\u6A21\u578B\u6A21\u5F0F","Client tools":"\u5BA2\u6237\u7AEF\u5DE5\u5177","Client-visible":"\u5BA2\u6237\u7AEF\u53EF\u89C1",Clients:"\u5BA2\u6237\u7AEF",Command:"\u547D\u4EE4","Command is required.":"\u547D\u4EE4\u4E0D\u80FD\u4E3A\u7A7A\u3002","Decorate only":"\u4EC5\u88C5\u9970","Decorate only mode cannot use internal tools.":"\u4EC5\u88C5\u9970\u6A21\u5F0F\u4E0D\u80FD\u4F7F\u7528\u5185\u90E8\u5DE5\u5177\u3002","Description template":"\u63CF\u8FF0\u6A21\u677F","Display name template":"\u663E\u793A\u540D\u79F0\u6A21\u677F","Edit MCP Server":"\u7F16\u8F91 MCP \u670D\u52A1","Edit MCP server":"\u7F16\u8F91 MCP \u670D\u52A1","Edit Virtual Model":"\u7F16\u8F91 Fusion","Edit virtual model":"\u7F16\u8F91 Fusion","Exact aliases":"\u7CBE\u786E\u522B\u540D","Exact aliases require a fixed model or original request model.":"\u7CBE\u786E\u522B\u540D\u9700\u8981\u56FA\u5B9A\u6A21\u578B\u6216\u539F\u59CB\u8BF7\u6C42\u6A21\u578B\u3002","Execution mode":"\u6267\u884C\u6A21\u5F0F","Expose in models":"\u66B4\u9732\u5230\u6A21\u578B\u5217\u8868","Fixed base model":"\u56FA\u5B9A\u57FA\u7840\u6A21\u578B","Fixed base model is required.":"\u5FC5\u987B\u9009\u62E9\u56FA\u5B9A\u57FA\u7840\u6A21\u578B\u3002","Fixed model":"\u56FA\u5B9A\u6A21\u578B","Injected tool names":"\u6CE8\u5165\u5DE5\u5177\u540D","Injected tools":"\u6CE8\u5165\u5DE5\u5177","Input schema JSON":"\u8F93\u5165 schema JSON",Internal:"\u5185\u90E8","Invalid input schema JSON for":"\u8F93\u5165 schema JSON \u65E0\u6548\uFF1A","Invalid tool choice JSON.":"Tool choice JSON \u65E0\u6548\u3002","Key is required.":"Key \u4E0D\u80FD\u4E3A\u7A7A\u3002",Materialize:"\u7269\u5316","MCP servers":"MCP \u670D\u52A1","MCP tools":"MCP \u5DE5\u5177",Match:"\u5339\u914D","Match type":"\u5339\u914D\u65B9\u5F0F","Match multimodal":"\u5339\u914D\u591A\u6A21\u6001","Match web search":"\u5339\u914D\u7F51\u9875\u641C\u7D22","Max tool calls":"\u6700\u5927\u5DE5\u5177\u8C03\u7528","Max tool calls must be greater than zero.":"\u6700\u5927\u5DE5\u5177\u8C03\u7528\u5FC5\u987B\u5927\u4E8E 0\u3002","Max turns":"\u6700\u5927\u8F6E\u6B21","Max turns must be greater than zero.":"\u6700\u5927\u8F6E\u6B21\u5FC5\u987B\u5927\u4E8E 0\u3002","Fusion combines a model with another model or tools into a new model.":"\u5C06\u6A21\u578B\u548C\u6A21\u578B/\u5DE5\u5177\u7EC4\u5408\u8D77\u6765\u6210\u4E3A\u4E00\u4E2A\u65B0\u7684\u6A21\u578B\u3002","Fusion example":"\u4F8B\u5982\uFF1AGLM 5.2 + GLM 5V Turbo = GLM 5.2V","Vision tool configuration":"\u89C6\u89C9\u5DE5\u5177\u914D\u7F6E","Choose a configured gateway model for image understanding.":"\u9009\u62E9\u5DF2\u914D\u7F6E\u7684\u7F51\u5173\u6A21\u578B\u4F5C\u4E3A\u56FE\u7247\u7406\u89E3\u6A21\u578B\u3002","Vision model":"\u89C6\u89C9\u6A21\u578B","Vision model is required.":"\u5FC5\u987B\u9009\u62E9\u89C6\u89C9\u6A21\u578B\u3002","Web search configuration":"Web Search \u914D\u7F6E","Search provider":"\u641C\u7D22\u7C7B\u578B","In-app Browser":"\u5185\u7F6E\u6D4F\u89C8\u5668","Provider configuration":"\u7C7B\u578B\u914D\u7F6E","Search engine":"\u641C\u7D22\u5F15\u64CE","Safe search":"\u5B89\u5168\u641C\u7D22",Language:"\u8BED\u8A00",Country:"\u56FD\u5BB6/\u5730\u533A","Advanced variables":"\u9AD8\u7EA7\u53D8\u91CF",Default:"\u9ED8\u8BA4",Moderate:"\u4E2D\u7B49",Strict:"\u4E25\u683C","Add tool":"\u6DFB\u52A0\u5DE5\u5177","Add variable":"\u6DFB\u52A0\u53D8\u91CF","Add custom MCP":"\u6DFB\u52A0\u81EA\u5B9A\u4E49 MCP","Add custom MCP tool":"\u6DFB\u52A0\u81EA\u5B9A\u4E49 MCP \u5DE5\u5177","Custom MCP tool":"\u81EA\u5B9A\u4E49 MCP \u5DE5\u5177","Discover tools":"\u53D1\u73B0\u5DE5\u5177","Import MCP JSON":"\u5BFC\u5165 MCP JSON","MCP JSON":"MCP JSON","MCP server":"MCP \u670D\u52A1","MCP server name already exists.":"MCP \u670D\u52A1\u540D\u79F0\u5DF2\u5B58\u5728\u3002",Arguments:"\u53C2\u6570","Working directory":"\u5DE5\u4F5C\u76EE\u5F55","API key env":"API Key \u73AF\u5883\u53D8\u91CF","Third-party tool environment":"\u4E09\u65B9\u5DE5\u5177\u73AF\u5883\u53D8\u91CF","Environment variable keys are required when values are set.":"\u8BBE\u7F6E\u53D8\u91CF\u503C\u65F6\u5FC5\u987B\u586B\u5199\u53D8\u91CF\u540D\u3002","MCP tool discovery is available in the Electron app.":"MCP \u5DE5\u5177\u53D1\u73B0\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","No MCP servers found in JSON.":"JSON \u4E2D\u672A\u627E\u5230 MCP \u670D\u52A1\u3002","Image recognition":"\u56FE\u7247\u8BC6\u522B","Image recognition and Web Search":"\u56FE\u7247\u8BC6\u522B\u548C Web Search","Generic image understanding tool for OCR, screenshot analysis, chart reading, UI comparison, error diagnosis, and other multi-image tasks.":"\u901A\u7528\u56FE\u7247\u7406\u89E3\u5DE5\u5177\uFF0C\u652F\u6301 OCR\u3001\u622A\u56FE\u5206\u6790\u3001\u56FE\u8868\u89E3\u8BFB\u3001UI \u5BF9\u6BD4\u3001\u9519\u8BEF\u8BCA\u65AD\u7B49\u591A\u56FE\u4EFB\u52A1\u3002","Generic web search tool supporting Brave, Bing, Google CSE, Serper, SerpAPI, Tavily, and Exa.":"\u901A\u7528\u7F51\u7EDC\u641C\u7D22\u5DE5\u5177\uFF0C\u652F\u6301 Brave\u3001Bing\u3001Google CSE\u3001Serper\u3001SerpAPI\u3001Tavily\u3001Exa\u3002","Generic web search tool supporting hidden in-app browser search plus Brave, Bing, Google CSE, Serper, SerpAPI, Tavily, and Exa.":"\u901A\u7528\u7F51\u7EDC\u641C\u7D22\u5DE5\u5177\uFF0C\u652F\u6301\u9690\u85CF\u5185\u7F6E\u6D4F\u89C8\u5668\u641C\u7D22\uFF0C\u4EE5\u53CA Brave\u3001Bing\u3001Google CSE\u3001Serper\u3001SerpAPI\u3001Tavily\u3001Exa\u3002","Web Search":"\u7F51\u9875\u641C\u7D22","New model":"\u65B0\u6A21\u578B","New model is required.":"\u65B0\u6A21\u578B\u4E0D\u80FD\u4E3A\u7A7A\u3002","Base model is required.":"\u57FA\u7840\u6A21\u578B\u4E0D\u80FD\u4E3A\u7A7A\u3002","Tool is required.":"\u5FC5\u987B\u9009\u62E9\u5DE5\u5177\u3002","No matching virtual models":"\u6CA1\u6709\u5339\u914D\u7684 Fusion","No MCP servers configured":"\u672A\u914D\u7F6E MCP \u670D\u52A1","No tools discovered":"\u672A\u53D1\u73B0\u5DE5\u5177","No tools available":"\u65E0\u53EF\u9009\u5DE5\u5177","No tools configured":"\u672A\u914D\u7F6E\u5DE5\u5177","No virtual models configured":"\u5C1A\u672A\u914D\u7F6E Fusion","Original request model":"\u539F\u59CB\u8BF7\u6C42\u6A21\u578B","Adapt image requests":"\u9002\u914D\u56FE\u50CF\u8BF7\u6C42","Adapt web search":"\u9002\u914D\u7F51\u9875\u641C\u7D22",Prefixes:"\u524D\u7F00",Prefix:"\u524D\u7F00","Prefix is required.":"\u524D\u7F00\u4E0D\u80FD\u4E3A\u7A7A\u3002","Prepend instructions":"\u524D\u7F6E\u6307\u4EE4","Protocol version":"\u534F\u8BAE\u7248\u672C","Remove MCP server":"\u79FB\u9664 MCP \u670D\u52A1","Remove tool":"\u79FB\u9664\u5DE5\u5177","Remove model":"\u79FB\u9664\u6A21\u578B","Remove virtual model":"\u79FB\u9664 Fusion","Replace instructions":"\u66FF\u6362\u6307\u4EE4","Request timeout":"\u8BF7\u6C42\u8D85\u65F6","Request timeout must be at least 100 ms.":"\u8BF7\u6C42\u8D85\u65F6\u81F3\u5C11\u4E3A 100 ms\u3002","Search virtual models":"\u641C\u7D22 Fusion","Select tool":"\u9009\u62E9\u5DE5\u5177","Startup timeout":"\u542F\u52A8\u8D85\u65F6","Startup timeout must be at least 100 ms.":"\u542F\u52A8\u8D85\u65F6\u81F3\u5C11\u4E3A 100 ms\u3002","Stdio message mode":"Stdio \u6D88\u606F\u6A21\u5F0F","Strip alias prefix":"\u79FB\u9664\u522B\u540D\u524D\u7F00","Strip alias suffix":"\u79FB\u9664\u522B\u540D\u540E\u7F00",Suffixes:"\u540E\u7F00",Suffix:"\u540E\u7F00","Suffix is required.":"\u540E\u7F00\u4E0D\u80FD\u4E3A\u7A7A\u3002","Tool choice":"Tool choice","Tool discovery failed":"\u5DE5\u5177\u53D1\u73B0\u5931\u8D25","Tool loop":"\u5DE5\u5177\u5FAA\u73AF","Tool name":"\u5DE5\u5177\u540D\u79F0","Tool name is required.":"\u5DE5\u5177\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\u3002","Tool names must be unique.":"\u5DE5\u5177\u540D\u79F0\u4E0D\u80FD\u91CD\u590D\u3002",Transport:"\u4F20\u8F93",Unavailable:"\u4E0D\u53EF\u7528",Visibility:"\u53EF\u89C1\u6027","WebSocket URL":"WebSocket URL","WebSocket URL is required.":"WebSocket URL \u4E0D\u80FD\u4E3A\u7A7A\u3002","Env must use KEY=VALUE lines or a JSON object.":"Env \u5FC5\u987B\u4F7F\u7528 KEY=VALUE \u884C\u6216 JSON object\u3002","Env rows require keys.":"\u73AF\u5883\u53D8\u91CF\u884C\u5FC5\u987B\u586B\u5199 Key\u3002","Headers must use KEY=VALUE lines or a JSON object.":"Headers \u5FC5\u987B\u4F7F\u7528 KEY=VALUE \u884C\u6216 JSON object\u3002",Value:"\u503C","Web search":"\u7F51\u9875\u641C\u7D22","Browser apps JSON":"\u6D4F\u89C8\u5668 App JSON",Account:"\u8D26\u6237","Account Balance":"\u8D26\u6237\u4F59\u989D","Account balance connectors":"\u8D26\u6237\u4F59\u989D\u8FDE\u63A5\u5668","Add at least one account connector or disable account balance.":"\u8BF7\u81F3\u5C11\u6DFB\u52A0\u4E00\u4E2A\u8D26\u6237\u8FDE\u63A5\u5668\uFF0C\u6216\u5173\u95ED\u8D26\u6237\u4F59\u989D\u3002",Balance:"\u4F59\u989D","Balance field":"\u4F59\u989D\u5B57\u6BB5","Balance remaining field":"\u4F59\u989D\u5269\u4F59\u5B57\u6BB5","Balance rem":"\u4F59\u989D\u5269\u4F59","Balance total":"\u4F59\u989D\u603B\u989D","Balance total field":"\u4F59\u989D\u603B\u989D\u5B57\u6BB5","Balance unit":"\u4F59\u989D\u5355\u4F4D","Balance used":"\u4F59\u989D\u5DF2\u7528","Balance used field":"\u4F59\u989D\u5DF2\u7528\u5B57\u6BB5",Body:"\u8BF7\u6C42\u4F53","Cash balance":"\u73B0\u91D1\u4F59\u989D","Charge balance":"\u5145\u503C\u4F59\u989D","Connectors JSON":"\u8FDE\u63A5\u5668 JSON","Copy provider plugin link":"\u590D\u5236\u4F9B\u5E94\u5546\u63D2\u4EF6\u94FE\u63A5","Credit balance":"\u4FE1\u7528\u4F59\u989D","CCR will fetch this HTTPS manifest with strict safety checks before showing provider details.":"CCR \u4F1A\u5728\u4E25\u683C\u5B89\u5168\u68C0\u67E5\u540E\u62C9\u53D6\u8FD9\u4E2A HTTPS manifest\uFF0C\u518D\u5C55\u793A\u4F9B\u5E94\u5546\u8BE6\u60C5\u3002","Current balance":"\u5F53\u524D\u4F59\u989D","Each plugin app requires name and url.":"\u6BCF\u4E2A\u63D2\u4EF6 App \u90FD\u9700\u8981 name \u548C url\u3002",Wrapper:"\u5305\u88C5\u670D\u52A1","Wrapper runtime":"\u5305\u88C5\u8FD0\u884C\u65F6","Wrapper plugin":"\u5305\u88C5\u63D2\u4EF6","5h quota":"5 \u5C0F\u65F6\u989D\u5EA6","Granted balance":"\u8D60\u9001\u4F59\u989D","Individual limit":"\u4E2A\u4EBA\u989D\u5EA6","Lifetime tokens":"\u7D2F\u8BA1\u4EE4\u724C","Manual resets":"\u4E3B\u52A8\u91CD\u7F6E\u6B21\u6570","Monthly budget":"\u6708\u5EA6\u9884\u7B97","Peak daily tokens":"\u65E5\u5CF0\u503C\u4EE4\u724C","Primary quota":"\u4E3B\u989D\u5EA6","Secondary quota":"\u526F\u989D\u5EA6","Topped-up balance":"\u5145\u503C\u4F59\u989D","Total credits":"\u603B\u989D\u5EA6","Total usage":"\u603B\u7528\u91CF","Voucher balance":"\u4EE3\u91D1\u5238\u4F59\u989D","Weekly quota":"\u5468\u989D\u5EA6",expired:"\u5DF2\u8FC7\u671F","expires in":"\u5269\u4F59",resets:"\u6B21",All:"\u5168\u90E8","API endpoint":"API \u5730\u5740",Active:"\u751F\u6548\u4E2D",Available:"\u53EF\u7528","CA certificate":"CA \u8BC1\u4E66",Capability:"\u80FD\u529B","Checking CA certificate...":"\u6B63\u5728\u68C0\u67E5 CA \u8BC1\u4E66...","Check Trust":"\u68C0\u67E5\u4FE1\u4EFB","Choose folder":"\u9009\u62E9\u76EE\u5F55",Clear:"\u6E05\u9664","Clear network captures":"\u6E05\u9664\u7F51\u7EDC\u6355\u83B7",Collapse:"\u6536\u8D77","Collapse models":"\u6536\u8D77\u6A21\u578B",Copied:"\u5DF2\u590D\u5236","Copied API key":"\u5DF2\u590D\u5236 API \u5BC6\u94A5","Copy API key":"\u590D\u5236 API \u5BC6\u94A5","Custom models":"\u81EA\u5B9A\u4E49\u6A21\u578B","Press Enter to add":"\u6309\u4E0B\u56DE\u8F66\u8FDB\u884C\u6DFB\u52A0","Detected automatically":"\u5DF2\u81EA\u52A8\u68C0\u6D4B","Detected compatibility":"\u68C0\u6D4B\u5230\u7684\u517C\u5BB9\u65B9\u5F0F","Detected endpoint":"\u68C0\u6D4B\u5230\u7684\u5730\u5740","Detecting icon":"\u6B63\u5728\u68C0\u6D4B\u56FE\u6807","Detecting provider":"\u6B63\u5728\u68C0\u6D4B\u4F9B\u5E94\u5546",Disabled:"\u5DF2\u7981\u7528",Docs:"\u6587\u6863","Edit description":"\u7F16\u8F91\u63CF\u8FF0",Effective:"\u751F\u6548",Expand:"\u5C55\u5F00","Expand models":"\u5C55\u5F00\u6A21\u578B",Expired:"\u5DF2\u8FC7\u671F",Expires:"\u8FC7\u671F",Filter:"\u7B5B\u9009","Filter agent":"\u7B5B\u9009 Agent","Filter request log model":"\u7B5B\u9009\u8BF7\u6C42\u65E5\u5FD7\u6A21\u578B","Filter request log provider":"\u7B5B\u9009\u8BF7\u6C42\u65E5\u5FD7\u4F9B\u5E94\u5546","Filter request log status":"\u7B5B\u9009\u8BF7\u6C42\u65E5\u5FD7\u72B6\u6001","Full reset":"\u5B8C\u6574\u91CD\u7F6E",Daily:"\u6BCF\u5929",Monthly:"\u6BCF\u6708",Weekly:"\u6BCF\u5468",Yearly:"\u6BCF\u5E74",hour:"\u5C0F\u65F6",hr:"\u5C0F\u65F6",min:"\u5206\u949F",minute:"\u5206\u949F",month:"\u4E2A\u6708",week:"\u5468",Invalid:"\u65E0\u6548","Manual install":"\u624B\u52A8\u5B89\u88C5","Manual install command":"\u624B\u52A8\u5B89\u88C5\u547D\u4EE4","Manifest URL":"Manifest URL",Marketplace:"\u5E02\u573A","Model name":"\u6A21\u578B\u540D\u79F0","Models are required. Ask the provider to include models=... in the link.":"\u9700\u8981\u6A21\u578B\u5217\u8868\u3002\u8BF7\u8BA9\u4F9B\u5E94\u5546\u5728\u94FE\u63A5\u4E2D\u52A0\u5165 models=...\u3002","Models will be detected automatically.":"\u6A21\u578B\u4F1A\u81EA\u52A8\u63A2\u6D4B\u3002",More:"\u66F4\u591A","Provider models":"\u4F9B\u5E94\u5546\u6A21\u578B","Runtime provider":"\u8FD0\u884C\u65F6\u4F9B\u5E94\u5546","Used in Agent routing prompts":"\u7528\u4E8E Agent \u8DEF\u7531\u63D0\u793A\u8BCD","Read only":"\u53EA\u8BFB","Search all models":"\u641C\u7D22\u5168\u90E8\u6A21\u578B",Source:"\u6765\u6E90",Virtual:"Fusion","Virtual models":"Fusion","No models available":"\u6682\u65E0\u53EF\u7528\u6A21\u578B","No supported account usage endpoint is available for this provider. Configure an HTTP JSON connector or disable account balance.":"\u8BE5\u4F9B\u5E94\u5546\u6682\u65E0\u53EF\u7528\u7684\u8D26\u6237\u7528\u91CF\u7AEF\u70B9\u3002\u8BF7\u914D\u7F6E HTTP JSON \u8FDE\u63A5\u5668\uFF0C\u6216\u5173\u95ED\u8D26\u6237\u4F59\u989D\u8BFB\u53D6\u3002",Direct:"\u76F4\u8FDE","Drag cards to arrange":"\u62D6\u52A8\u5361\u7247\u6392\u5E8F","Drag to move":"\u62D6\u52A8\u6392\u5E8F",Move:"\u79FB\u52A8","Move down":"\u4E0B\u79FB","Move up":"\u4E0A\u79FB","Network capture is paused":"\u7F51\u7EDC\u6355\u83B7\u5DF2\u6682\u505C","No API keys configured":"\u672A\u914D\u7F6E API \u5BC6\u94A5","Available models":"\u53EF\u7528\u6A21\u578B","No body":"\u65E0\u6B63\u6587","No extensions installed":"\u672A\u5B89\u88C5\u6269\u5C55","No limits configured":"\u672A\u914D\u7F6E\u9650\u5236","No matching API keys":"\u6CA1\u6709\u5339\u914D\u7684 API \u5BC6\u94A5","No matching captures":"\u6CA1\u6709\u5339\u914D\u7684\u6355\u83B7","No matching extensions":"\u6CA1\u6709\u5339\u914D\u7684\u6269\u5C55","No matching models":"\u6CA1\u6709\u5339\u914D\u7684\u6A21\u578B","No matching providers":"\u6CA1\u6709\u5339\u914D\u7684\u4F9B\u5E94\u5546","No matching routing rules":"\u6CA1\u6709\u5339\u914D\u7684\u8DEF\u7531\u89C4\u5219","No account balance connectors configured":"\u672A\u914D\u7F6E\u8D26\u6237\u4F59\u989D\u8FDE\u63A5\u5668","No available models":"\u6CA1\u6709\u53EF\u7528\u6A21\u578B","No protocol detection yet":"\u5C1A\u672A\u68C0\u6D4B\u534F\u8BAE","No response fields":"\u6CA1\u6709\u54CD\u5E94\u5B57\u6BB5","No unavailable models":"\u6CA1\u6709\u4E0D\u53EF\u7528\u6A21\u578B","Name is required.":"\u540D\u79F0\u4E0D\u80FD\u4E3A\u7A7A\u3002","No usage data available.":"\u6682\u65E0\u53EF\u7528\u91CF\u6570\u636E\u3002","OpenAI Chat":"OpenAI Chat","OpenAI Responses":"OpenAI Responses","Anthropic Messages":"Anthropic Messages","Gemini Generate":"Gemini \u751F\u6210","Gemini Interactions":"Gemini Interactions","Model required before protocol verification.":"\u9700\u8981\u5148\u586B\u5199\u6A21\u578B\uFF0C\u624D\u80FD\u9A8C\u8BC1\u534F\u8BAE\u3002","No endpoint candidates available.":"\u6CA1\u6709\u53EF\u7528\u7684\u7AEF\u70B9\u5019\u9009\u3002","Request failed.":"\u8BF7\u6C42\u5931\u8D25\u3002","Select or enter at least one model.":"\u8BF7\u9009\u62E9\u6216\u8F93\u5165\u81F3\u5C11\u4E00\u4E2A\u6A21\u578B\u3002","Enter at least one model.":"\u8BF7\u8F93\u5165\u81F3\u5C11\u4E00\u4E2A\u6A21\u578B\u3002","Generated output is limited to 1 token for connectivity checks.":"\u8FDE\u901A\u6027\u68C0\u6D4B\u4F1A\u628A\u751F\u6210\u8F93\u51FA\u9650\u5236\u4E3A 1 \u4E2A token\u3002","Check results":"\u68C0\u6D4B\u7ED3\u679C","Models to check":"\u8981\u68C0\u6D4B\u7684\u6A21\u578B","Raw connector JSON":"\u539F\u59CB\u8FDE\u63A5\u5668 JSON","Remote provider manifest":"\u8FDC\u7A0B\u4F9B\u5E94\u5546 Manifest","Refresh interval ms":"\u5237\u65B0\u95F4\u9694\uFF08\u6BEB\u79D2\uFF09","Response fields":"\u54CD\u5E94\u5B57\u6BB5","Manual reset credit":"\u4E3B\u52A8\u91CD\u7F6E\u6B21\u6570",Reset:"\u91CD\u7F6E","Reset complete":"\u91CD\u7F6E\u5B8C\u6210","Reset is unavailable.":"\u91CD\u7F6E\u4E0D\u53EF\u7528\u3002","Reset manual credit":"\u91CD\u7F6E\u4E3B\u52A8\u6B21\u6570",Resetting:"\u6B63\u5728\u91CD\u7F6E","Usage reset":"\u7528\u91CF\u91CD\u7F6E",Used:"\u5DF2\u4F7F\u7528","Select at least one protocol.":"\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u534F\u8BAE\u3002","Select at least one usage response field.":"\u8BF7\u81F3\u5C11\u9009\u62E9\u4E00\u4E2A\u7528\u91CF\u54CD\u5E94\u5B57\u6BB5\u3002","Showing first response fields only.":"\u4EC5\u663E\u793A\u524D\u9762\u7684\u54CD\u5E94\u5B57\u6BB5\u3002","Standard usage endpoint":"\u6807\u51C6\u7528\u91CF\u7AEF\u70B9","Standard usage endpoint will try provider-hosted CCR account endpoints.":"\u6807\u51C6\u7528\u91CF\u7AEF\u70B9\u4F1A\u5C1D\u8BD5\u4F9B\u5E94\u5546\u6258\u7BA1\u7684 CCR \u8D26\u6237\u7AEF\u70B9\u3002","Sub limit":"\u8BA2\u9605\u4E0A\u9650","Sub rem":"\u8BA2\u9605\u5269\u4F59","Start check":"\u5F00\u59CB\u68C0\u6D4B","Subscription limit field":"\u8BA2\u9605\u4E0A\u9650\u5B57\u6BB5","Subscription remaining field":"\u8BA2\u9605\u5269\u4F59\u5B57\u6BB5","Subscription reset field":"\u8BA2\u9605\u91CD\u7F6E\u5B57\u6BB5","Subscription unit":"\u8BA2\u9605\u5355\u4F4D","Status field":"\u72B6\u6001\u5B57\u6BB5","Message field":"\u6D88\u606F\u5B57\u6BB5","Supports standard, http-json, plugin, and local-estimate connectors.":"\u652F\u6301 standard\u3001http-json\u3001plugin \u548C local-estimate \u8FDE\u63A5\u5668\u3002","Switch to HTTP JSON request to configure method, URL, headers, body, and response fields.":"\u5207\u6362\u5230 HTTP JSON \u8BF7\u6C42\u5373\u53EF\u914D\u7F6E method\u3001URL\u3001header\u3001body \u548C\u54CD\u5E94\u5B57\u6BB5\u3002","Test usage request":"\u6D4B\u8BD5\u7528\u91CF\u8BF7\u6C42","This check sends real model requests with your provider API key and may consume account balance.":"\u672C\u6B21\u68C0\u6D4B\u4F1A\u4F7F\u7528\u4F60\u7684\u4F9B\u5E94\u5546 API Key \u53D1\u8D77\u771F\u5B9E\u6A21\u578B\u8BF7\u6C42\uFF0C\u53EF\u80FD\u6D88\u8017\u8D26\u6237\u4F59\u989D\u3002","Unavailable models":"\u4E0D\u53EF\u7528\u6A21\u578B","No marketplace extensions":"\u5E02\u573A\u6682\u65E0\u6269\u5C55","No fallback models configured":"\u672A\u914D\u7F6E\u56DE\u9000\u6A21\u578B","No fallback targets configured":"\u672A\u914D\u7F6E\u5931\u8D25\u964D\u7EA7\u76EE\u6807","No models configured":"\u672A\u914D\u7F6E\u6A21\u578B","No local login state was found for this agent.":"\u672A\u627E\u5230\u8FD9\u4E2A Agent \u7684\u672C\u673A\u767B\u5F55\u6001\u3002","No provider credentials configured":"\u672A\u914D\u7F6E\u4F9B\u5E94\u5546\u51ED\u636E","No request rewrite":"\u4E0D\u6539\u5199\u8BF7\u6C42","Not found":"\u672A\u627E\u5230","Other / custom API endpoint":"\u5176\u4ED6 / \u81EA\u5B9A\u4E49 API \u5730\u5740",Pending:"\u7B49\u5F85\u4E2D",Priority:"\u4F18\u5148\u7EA7","Priority only":"\u4EC5\u6309\u4F18\u5148\u7EA7","Priority spillover":"\u4F18\u5148\u7EA7\u6EA2\u51FA",Ready:"\u53EF\u5BFC\u5165","Scanning local agent logins":"\u6B63\u5728\u626B\u63CF\u672C\u673A Agent \u767B\u5F55\u6001","Select preset provider":"\u9009\u62E9 \u9884\u8BBE\u4F9B\u5E94\u5546","ZCode login detected. Click Import to add it as a gateway provider.":"\u5DF2\u68C0\u6D4B\u5230 ZCode \u767B\u5F55\u6001\u3002\u70B9\u51FB\u5BFC\u5165\u5373\u53EF\u6DFB\u52A0\u4E3A\u7F51\u5173\u4F9B\u5E94\u5546\u3002","ZCode login was detected, but its local credential is encrypted and cannot be imported automatically.":"\u5DF2\u68C0\u6D4B\u5230 ZCode \u767B\u5F55\u6001\uFF0C\u4F46\u672C\u673A\u51ED\u636E\u5DF2\u52A0\u5BC6\uFF0C\u65E0\u6CD5\u81EA\u52A8\u5BFC\u5165\u3002","ZCode login was detected, but no usable provider API key was found in ZCode config.":"\u5DF2\u68C0\u6D4B\u5230 ZCode \u767B\u5F55\u6001\uFF0C\u4F46 ZCode \u914D\u7F6E\u4E2D\u6CA1\u6709\u627E\u5230\u53EF\u7528\u7684\u4F9B\u5E94\u5546 API key\u3002","ZCode provider API key detected in local ZCode config. Click Import to add it as a gateway provider.":"\u5DF2\u5728\u672C\u673A ZCode \u914D\u7F6E\u4E2D\u68C0\u6D4B\u5230\u4F9B\u5E94\u5546 API key\u3002\u70B9\u51FB\u5BFC\u5165\u5373\u53EF\u6DFB\u52A0\u4E3A\u7F51\u5173\u4F9B\u5E94\u5546\u3002","Kimi API (China)":"Kimi API\uFF08\u56FD\u5185\uFF09","Kimi API (Global)":"Kimi API\uFF08\u6D77\u5916\uFF09","Kimi Code - Coding Plan":"Kimi Code - Coding Plan","Zhipu AI (China)":"\u667A\u8C31 AI (\u56FD\u5185)","Zhipu AI (China) - Coding Plan":"\u667A\u8C31 AI (\u56FD\u5185) - Coding Plan","Zhipu AI (China) - General Endpoint":"\u667A\u8C31 AI (\u56FD\u5185) - \u901A\u7528\u7AEF\u70B9","Z.ai (Global)":"Z.ai (\u56FD\u5916)","Z.ai (Global) - Coding Plan":"Z.ai (\u56FD\u5916) - Coding Plan","Z.ai (Global) - General Endpoint":"Z.ai (\u56FD\u5916) - \u901A\u7528\u7AEF\u70B9","After you enter the API endpoint and key, the system will automatically detect supported protocols and available models.":"\u586B\u5199 API \u5730\u5740\u548C\u5BC6\u94A5\u540E\uFF0C\u7CFB\u7EDF\u4F1A\u81EA\u52A8\u63A2\u6D4B\u652F\u6301\u7684\u534F\u8BAE\u548C\u53EF\u7528\u6A21\u578B\u3002","Enter a model manually if automatic detection does not return a model list.":"\u5982\u679C\u81EA\u52A8\u68C0\u6D4B\u6CA1\u6709\u8FD4\u56DE\u6A21\u578B\u5217\u8868\uFF0C\u53EF\u4EE5\u624B\u52A8\u8F93\u5165\u6A21\u578B\u540D\u79F0\u3002","No network captures":"\u6682\u65E0\u7F51\u7EDC\u6355\u83B7","No plugin routes configured":"\u672A\u914D\u7F6E\u63D2\u4EF6\u8DEF\u7531","No profiles for this agent":"\u5F53\u524D Agent \u672A\u914D\u7F6E\u6863\u6848","No profiles configured":"\u5C1A\u672A\u914D\u7F6E\u6863\u6848","No providers configured":"\u672A\u914D\u7F6E\u4F9B\u5E94\u5546","No query parameters":"\u65E0\u67E5\u8BE2\u53C2\u6570","No request headers":"\u65E0\u8BF7\u6C42\u5934","Next step":"\u4E0B\u4E00\u6B65","No response headers":"\u65E0\u54CD\u5E94\u5934","No recent agent requests":"\u6682\u65E0\u6700\u8FD1 Agent \u8BF7\u6C42","No session activity":"\u6682\u65E0\u4F1A\u8BDD\u6D3B\u52A8","No subagent calls":"\u6682\u65E0 Subagent \u8C03\u7528","No tool calls":"\u6682\u65E0\u5DE5\u5177\u8C03\u7528","No routing rules configured":"\u672A\u914D\u7F6E\u8DEF\u7531\u89C4\u5219","No updates available":"\u5F53\u524D\u5DF2\u662F\u6700\u65B0\u7248\u672C","Not installed":"\u672A\u5B89\u88C5","Not set":"\u672A\u8BBE\u7F6E","Pause capture":"\u6682\u505C\u6355\u83B7","Pause network capture":"\u6682\u505C\u7F51\u7EDC\u6355\u83B7","Pause service":"\u6682\u505C\u670D\u52A1","Previous page":"\u4E0A\u4E00\u9875","Previous step":"\u4E0A\u4E00\u6B65","Proxy not running":"\u4EE3\u7406\u672A\u8FD0\u884C","Proxy status":"\u4EE3\u7406\u72B6\u6001","Proxy CA certificate is trusted.":"Proxy CA \u8BC1\u4E66\u5DF2\u4FE1\u4EFB\u3002","Proxy CA certificate is not trusted.":"Proxy CA \u8BC1\u4E66\u672A\u88AB\u4FE1\u4EFB\u3002","Proxy CA certificate is not trusted:":"Proxy CA \u8BC1\u4E66\u672A\u88AB\u4FE1\u4EFB\uFF1A","Proxy CA certificate is not installed. Install the CA certificate before enabling proxy mode.":"Proxy CA \u8BC1\u4E66\u5C1A\u672A\u5B89\u88C5\u3002\u542F\u7528\u4EE3\u7406\u6A21\u5F0F\u524D\u8BF7\u5148\u5B89\u88C5 CA \u8BC1\u4E66\u3002","Proxy CA certificate and private key do not match. Recreate the proxy CA certificate, trust the new CA, then restart proxy mode.":"Proxy CA \u8BC1\u4E66\u548C\u79C1\u94A5\u4E0D\u5339\u914D\u3002\u8BF7\u91CD\u65B0\u521B\u5EFA Proxy CA \u8BC1\u4E66\uFF0C\u4FE1\u4EFB\u65B0\u7684 CA\uFF0C\u7136\u540E\u91CD\u542F\u4EE3\u7406\u6A21\u5F0F\u3002","Proxy CA certificate is installed in the macOS System keychain.":"Proxy CA \u8BC1\u4E66\u5DF2\u5B89\u88C5\u5230 macOS \u7CFB\u7EDF\u94A5\u5319\u4E32\u3002","Proxy CA certificate is installed only in the login keychain. Install it into the macOS System keychain so Chrome can trust HTTPS proxy certificates.":"Proxy CA \u8BC1\u4E66\u53EA\u5B89\u88C5\u5728\u767B\u5F55\u94A5\u5319\u4E32\u4E2D\u3002\u8BF7\u5B89\u88C5\u5230 macOS \u7CFB\u7EDF\u94A5\u5319\u4E32\uFF0CChrome \u624D\u80FD\u4FE1\u4EFB HTTPS \u4EE3\u7406\u8BC1\u4E66\u3002","Proxy CA certificate is not installed in the macOS System keychain. Install and trust this exact CA certificate before enabling HTTPS proxying.":"Proxy CA \u8BC1\u4E66\u5C1A\u672A\u5B89\u88C5\u5230 macOS \u7CFB\u7EDF\u94A5\u5319\u4E32\u3002\u542F\u7528 HTTPS \u4EE3\u7406\u524D\uFF0C\u8BF7\u5B89\u88C5\u5E76\u4FE1\u4EFB\u8FD9\u4EFD CA \u8BC1\u4E66\u3002","Proxy CA certificate could not be read. Reinstall the CA certificate.":"\u65E0\u6CD5\u8BFB\u53D6 Proxy CA \u8BC1\u4E66\u3002\u8BF7\u91CD\u65B0\u5B89\u88C5 CA \u8BC1\u4E66\u3002","Proxy CA certificate is trusted by the system trust store.":"Proxy CA \u8BC1\u4E66\u5DF2\u88AB\u7CFB\u7EDF\u4FE1\u4EFB\u5B58\u50A8\u4FE1\u4EFB\u3002","Certificate detection is available in the Electron app.":"\u8BC1\u4E66\u68C0\u6D4B\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Certificate install is available in the Electron app.":"\u8BC1\u4E66\u5B89\u88C5\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Proxy certificate detection is available in the Electron app.":"\u4EE3\u7406\u8BC1\u4E66\u68C0\u6D4B\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Install and trust the proxy CA certificate before enabling proxy mode.":"\u542F\u7528\u4EE3\u7406\u6A21\u5F0F\u524D\uFF0C\u8BF7\u5148\u5B89\u88C5\u5E76\u4FE1\u4EFB Proxy CA \u8BC1\u4E66\u3002","Certificate installed and trusted. Proxy mode enabled.":"\u8BC1\u4E66\u5DF2\u5B89\u88C5\u5E76\u4FE1\u4EFB\uFF0C\u4EE3\u7406\u6A21\u5F0F\u5DF2\u542F\u7528\u3002","Certificate installed into the macOS System keychain.":"\u8BC1\u4E66\u5DF2\u5B89\u88C5\u5230 macOS \u7CFB\u7EDF\u94A5\u5319\u4E32\u3002","Certificate installed into the current user's Root store.":"\u8BC1\u4E66\u5DF2\u5B89\u88C5\u5230\u5F53\u524D\u7528\u6237\u7684\u6839\u8BC1\u4E66\u5B58\u50A8\u3002","Automatic certificate install is not supported on this platform. Import the CA file into the system trust store manually.":"\u5F53\u524D\u5E73\u53F0\u4E0D\u652F\u6301\u81EA\u52A8\u5B89\u88C5\u8BC1\u4E66\u3002\u8BF7\u624B\u52A8\u5C06 CA \u6587\u4EF6\u5BFC\u5165\u7CFB\u7EDF\u4FE1\u4EFB\u5B58\u50A8\u3002","Certificate installation was cancelled. Install the CA into the macOS System keychain to use HTTPS proxying.":"\u8BC1\u4E66\u5B89\u88C5\u5DF2\u53D6\u6D88\u3002\u8981\u4F7F\u7528 HTTPS \u4EE3\u7406\uFF0C\u8BF7\u5C06 CA \u5B89\u88C5\u5230 macOS \u7CFB\u7EDF\u94A5\u5319\u4E32\u3002","macOS did not allow CCR to request administrator authorization:":"macOS \u672A\u5141\u8BB8 CCR \u8BF7\u6C42\u7BA1\u7406\u5458\u6388\u6743\uFF1A","Opened Terminal installer:":"\u5DF2\u6253\u5F00\u7EC8\u7AEF\u5B89\u88C5\u5668\uFF1A","Could not open Terminal installer:":"\u65E0\u6CD5\u6253\u5F00\u7EC8\u7AEF\u5B89\u88C5\u5668\uFF1A","Click Install CA and approve the administrator prompt to install it into the System keychain.":"\u70B9\u51FB\u201C\u5B89\u88C5 CA\u201D\uFF0C\u5E76\u5728\u7BA1\u7406\u5458\u63D0\u793A\u4E2D\u6279\u51C6\u5B89\u88C5\u5230\u7CFB\u7EDF\u94A5\u5319\u4E32\u3002","If trust is still not detected, open Keychain Access > System and find the CCR MITM Proxy certificate.":"\u5982\u679C\u4ECD\u672A\u68C0\u6D4B\u5230\u4FE1\u4EFB\uFF0C\u8BF7\u6253\u5F00\u201C\u94A5\u5319\u4E32\u8BBF\u95EE\u201D>\u201C\u7CFB\u7EDF\u201D\uFF0C\u627E\u5230 CCR MITM Proxy \u8BC1\u4E66\u3002","Open Trust, set When using this certificate to Always Trust, then restart the browser or client.":"\u5C55\u5F00\u201C\u4FE1\u4EFB\u201D\uFF0C\u5C06\u201C\u4F7F\u7528\u6B64\u8BC1\u4E66\u65F6\u201D\u8BBE\u4E3A\u201C\u59CB\u7EC8\u4FE1\u4EFB\u201D\uFF0C\u7136\u540E\u91CD\u542F\u6D4F\u89C8\u5668\u6216\u5BA2\u6237\u7AEF\u3002","Return here and click Check Trust.":"\u8FD4\u56DE\u8FD9\u91CC\u5E76\u70B9\u51FB\u201C\u68C0\u67E5\u4FE1\u4EFB\u201D\u3002","Click Install CA, or open the CA file and import it manually.":"\u70B9\u51FB\u201C\u5B89\u88C5 CA\u201D\uFF0C\u6216\u6253\u5F00 CA \u6587\u4EF6\u5E76\u624B\u52A8\u5BFC\u5165\u3002","Place it under Current User > Trusted Root Certification Authorities > Certificates.":"\u5C06\u5B83\u653E\u5230\u201C\u5F53\u524D\u7528\u6237\u201D>\u201C\u53D7\u4FE1\u4EFB\u7684\u6839\u8BC1\u4E66\u9881\u53D1\u673A\u6784\u201D>\u201C\u8BC1\u4E66\u201D\u4E0B\u3002","Restart the browser or client.":"\u91CD\u542F\u6D4F\u89C8\u5668\u6216\u5BA2\u6237\u7AEF\u3002","Open the CA file and import it into your OS or browser trust store.":"\u6253\u5F00 CA \u6587\u4EF6\uFF0C\u5E76\u5C06\u5B83\u5BFC\u5165\u64CD\u4F5C\u7CFB\u7EDF\u6216\u6D4F\u89C8\u5668\u7684\u4FE1\u4EFB\u5B58\u50A8\u3002","For Firefox, Java, Python, Node, or other clients with a private CA store, import the CA there as well.":"\u5BF9\u4E8E Firefox\u3001Java\u3001Python\u3001Node \u6216\u5176\u4ED6\u4F7F\u7528\u72EC\u7ACB CA \u5B58\u50A8\u7684\u5BA2\u6237\u7AEF\uFF0C\u4E5F\u9700\u8981\u5728\u90A3\u91CC\u5BFC\u5165\u8FD9\u4EFD CA\u3002","Resume capture":"\u7EE7\u7EED\u6355\u83B7","Resume network capture":"\u7EE7\u7EED\u7F51\u7EDC\u6355\u83B7","Resize list/detail":"\u8C03\u6574\u5217\u8868/\u8BE6\u60C5","Resize request and response panels":"\u8C03\u6574\u8BF7\u6C42\u548C\u54CD\u5E94\u9762\u677F","Resize request list and detail panels":"\u8C03\u6574\u8BF7\u6C42\u5217\u8868\u548C\u8BE6\u60C5\u9762\u677F","Resize request/response":"\u8C03\u6574\u8BF7\u6C42/\u54CD\u5E94",Response:"\u54CD\u5E94","Refresh targets":"\u5237\u65B0\u76EE\u6807","Restart Proxy":"\u91CD\u542F\u4EE3\u7406","Proxy restart is available in the Electron app.":"\u4EE3\u7406\u91CD\u542F\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Select provider":"\u9009\u62E9\u4F9B\u5E94\u5546","Select a scanned target":"\u9009\u62E9\u626B\u63CF\u5230\u7684\u76EE\u6807",Selected:"\u5DF2\u9009\u62E9",Service:"\u670D\u52A1","Service control is available in the Electron app.":"\u670D\u52A1\u63A7\u5236\u4EC5\u5728 Electron App \u4E2D\u53EF\u7528\u3002","Scanning targets":"\u6B63\u5728\u626B\u63CF\u76EE\u6807","Service status":"\u670D\u52A1\u72B6\u6001",Step:"\u6B65\u9AA4",Start:"\u542F\u52A8","Start service":"\u542F\u52A8\u670D\u52A1",Stop:"\u505C\u6B62","Start using CCR.":"\u5F00\u59CB\u4F7F\u7528 CCR\u3002","API Service":"API \u670D\u52A1 (API Service)",Availability:"\u53EF\u7528\u6027",Current:"\u5F53\u524D","Current version":"\u5F53\u524D\u7248\u672C","Current model":"\u5F53\u524D\u6A21\u578B",Degraded:"\u964D\u7EA7",Gateway:"\u7F51\u5173",Healthy:"\u6B63\u5E38",Idle:"\u672A\u542F\u7528","Network capture":"\u7F51\u7EDC\u6355\u83B7","Proxy Service":"\u4EE3\u7406\u670D\u52A1","System status":"\u7CFB\u7EDF\u72B6\u6001","System Proxy":"\u7CFB\u7EDF\u4EE3\u7406","Available version":"\u53EF\u7528\u7248\u672C","Download update":"\u4E0B\u8F7D\u66F4\u65B0","Downloading update":"\u6B63\u5728\u4E0B\u8F7D\u66F4\u65B0","Feed URL":"\u66F4\u65B0\u6E90","Online updates":"\u5728\u7EBF\u66F4\u65B0","Release notes":"\u66F4\u65B0\u8BF4\u660E","Update available":"\u53D1\u73B0\u65B0\u7248\u672C","Update downloaded":"\u66F4\u65B0\u5DF2\u4E0B\u8F7D","Update downloaded. Restart to finish updating.":"\u66F4\u65B0\u5DF2\u4E0B\u8F7D\uFF0C\u8BF7\u91CD\u542F\u5E94\u7528\u4EE5\u5B8C\u6210\u7248\u672C\u66F4\u65B0\u3002","Update failed":"\u66F4\u65B0\u5931\u8D25","Update ready to install":"\u66F4\u65B0\u5DF2\u51C6\u5907\u5B89\u88C5","Updates are only available in packaged builds.":"\u5728\u7EBF\u66F4\u65B0\u4EC5\u5728\u6253\u5305\u540E\u7684\u5E94\u7528\u4E2D\u53EF\u7528\u3002","After deletion, this bot data cannot be recovered.":"\u5220\u9664\u540E\u6570\u636E\u4E0D\u53EF\u6062\u590D\u3002","This bot is being used by the following agents and cannot be deleted.":"\u5F53\u524D Bot \u6B63\u5728\u88AB\u4EE5\u4E0B Agent \u4F7F\u7528\uFF0C\u4E0D\u80FD\u5220\u9664\u3002","{count} agent profiles use this bot":"{count} \u4E2A Agent \u4F7F\u7528\u4E2D","This provider link came from an external website. Review details before importing.":"\u8FD9\u4E2A\u4F9B\u5E94\u5546\u94FE\u63A5\u6765\u81EA\u5916\u90E8\u7F51\u7AD9\u3002\u5BFC\u5165\u524D\u8BF7\u786E\u8BA4\u4E0B\u9762\u7684\u5185\u5BB9\u3002","Welcome to CCR":"\u6B22\u8FCE\u4F7F\u7528CCR",Trusted:"\u5DF2\u4FE1\u4EFB","Small fast model":"\u5C0F\u6A21\u578B",Unknown:"\u672A\u77E5",Unlimited:"\u65E0\u9650\u5236",Unnamed:"\u672A\u547D\u540D","Unnamed provider":"\u672A\u547D\u540D\u4F9B\u5E94\u5546","Unnamed rule":"\u672A\u547D\u540D\u89C4\u5219",Untrusted:"\u672A\u4FE1\u4EFB",body:"\u6B63\u6587",active:"\u5DF2\u542F\u7528",capturing:"\u6355\u83B7\u4E2D",decoded:"\u5DF2\u89E3\u7801",disabled:"\u5DF2\u7981\u7528",enabled:"\u5DF2\u542F\u7528",header:"\u6807\u5934",inactive:"\u672A\u542F\u7528",models:"\u6A21\u578B",meters:"\u6307\u6807","not running":"\u672A\u8FD0\u884C",ok:"\u6B63\u5E38",paused:"\u5DF2\u6682\u505C",provider:"\u4F9B\u5E94\u5546",query:"\u67E5\u8BE2",raw:"\u539F\u59CB",req:"\u8BF7\u6C42",rule:"\u89C4\u5219",starting:"\u542F\u52A8\u4E2D",stopped:"\u5DF2\u505C\u6B62",summary:"\u6458\u8981",truncated:"\u5DF2\u622A\u65AD",unsupported:"\u4E0D\u652F\u6301",restored:"\u5DF2\u6062\u590D",up:"\u4E0A",down:"\u4E0B","per day":"\u6BCF\u5929","per hour":"\u6BCF\u5C0F\u65F6","per minute":"\u6BCF\u5206\u949F",running:"\u8FD0\u884C\u4E2D"}}},Lc=(0,Lu.createContext)(Dc.en);function ve(){let e=(0,Lu.useContext)(Lc);return(0,Lu.useMemo)(()=>t=>Xb(e,t),[e])}function cW(){return(0,Lu.useContext)(Lc)===Dc.zh?"zh-CN":"en-US"}function Xb(e,t){return e.text[t]??t}function Qo(e,t){return VM(e===Dc.zh?"zh":"en",Xb(e,t))}function UM(e,t){return Qo(e,t instanceof Error?t.message:String(t))}function Rc(){let e=(0,Lu.useContext)(Lc);return(0,Lu.useMemo)(()=>t=>UM(e,t),[e])}function Ht(e,t){return e.map(r=>({...r,label:t(r.label)}))}var Nc=z(ze()),gm=[.22,1,.36,1],ga={duration:.12,ease:"easeOut"},mle={damping:34,mass:.78,stiffness:420,type:"spring"},HL={damping:32,mass:.62,stiffness:500,type:"spring"},WM={damping:36,mass:.7,stiffness:480,type:"spring"};function fW({children:e,view:t}){let r=ln();return(0,Nc.jsx)(Qe.div,{animate:{opacity:1,scale:1,y:0},className:"h-full min-h-0",exit:r?{opacity:0}:{opacity:0,scale:.995,y:-6},initial:r?{opacity:0}:{opacity:0,scale:.995,y:10},transition:r?ga:mle,"data-view":t,children:e})}function ka({children:e,className:t,...r}){let o=ln();return(0,Nc.jsx)(Qe.div,{animate:{opacity:1,y:0},className:t,exit:o?{opacity:0}:{opacity:0,y:-6},initial:o?{opacity:0}:{opacity:0,y:6},layout:"position",transition:o?ga:HL,...r,children:e})}function Ru({children:e,className:t}){let r=ln();return(0,Nc.jsx)(Qe.div,{animate:r?{opacity:1}:{height:"auto",opacity:1},className:J("overflow-hidden",t),exit:r?{opacity:0}:{height:0,opacity:0},initial:r?{opacity:0}:{height:0,opacity:0},transition:r?ga:WM,children:e})}function Nu({children:e,className:t,placement:r="below",...o}){let n=ln(),a=r==="above"?4:-4;return(0,Nc.jsx)(Qe.div,{animate:n?{opacity:1}:{opacity:1,scale:1,y:0},className:t,exit:n?{opacity:0}:{opacity:0,scale:.98,y:a},initial:n?{opacity:0}:{opacity:0,scale:.98,y:a},transition:n?ga:{duration:.12,ease:"easeOut"},...o,children:e})}function br({children:e,className:t,iconKey:r}){let o=ln();return(0,Nc.jsx)("span",{className:J("inline-flex shrink-0 items-center justify-center",t),children:(0,Nc.jsx)(wt,{initial:!1,mode:"wait",children:(0,Nc.jsx)(Qe.span,{animate:o?{opacity:1}:{opacity:1,scale:1},className:"inline-flex items-center justify-center",exit:o?{opacity:0}:{opacity:0,scale:.85},initial:o?{opacity:0}:{opacity:0,scale:.85},transition:o?ga:{duration:.12,ease:"easeOut"},children:e},String(r))})})}function mW(e,t){return t?[e.method,e.url,e.upstreamUrl,e.host,e.client,e.path,e.protocol,e.mode,Mm(e),GM(e),gle(e),Jb(e.requestHeaders),Jb(e.responseHeaders??{}),e.requestBody.text,e.responseBody?.text??"",e.error??""].some(r=>r.toLowerCase().includes(t)):!0}function gW(e,t,r){let o=Number(e.id);return Number.isFinite(o)&&o>0?String(o):String(Math.max(1,r-t))}function Mm(e){return e.state==="pending"?"Active":e.state==="error"?"Error":"Completed"}function GM(e){return e.statusCode===void 0?"-":String(e.statusCode)}function gle(e){return e.statusCode!==void 0?String(e.statusCode):e.state}function Jb(e){return Object.entries(e).map(([t,r])=>`${t}: ${Array.isArray(r)?r.join(", "):r}`).join(`
50
+ `)}function Qb(e){return Object.entries(e).map(([t,r])=>[kle(t),Array.isArray(r)?r.join(", "):r])}function kW(e){try{let t=new URL(e);return Array.from(t.searchParams.entries())}catch{return[]}}function MW(e){return[["URL",e.url],["Upstream",e.upstreamUrl],["Client",e.client],["Protocol",e.protocol.toUpperCase()],["Mode",e.mode],["Method",e.method],["Status",Mm(e)],["Code",GM(e)],["Started",pW(e.startedAt)],["Completed",e.completedAt?pW(e.completedAt):"-"],["Duration",en(e.durationMs)],["Request size",km(e.requestBody.sizeBytes)],["Response size",e.responseBody?km(e.responseBody.sizeBytes):"0 B"]]}function hW(e){let t=Jb(e.requestHeaders);return[`${e.method} ${e.path||"/"} HTTP/1.1`,t,"",e.requestBody.text||""].join(`
51
+ `)}function vW(e){let t=Jb(e.responseHeaders??{});return[`HTTP/1.1 ${GM(e)} ${Mm(e)}`,t,"",e.responseBody?.text||""].join(`
52
+ `)}function kle(e){return e.split("-").map(t=>t&&`${t.charAt(0).toUpperCase()}${t.slice(1)}`).join("-")}function yW(e){let t=e.trim();return t?t.toLowerCase().includes("chrome")?"C":t.toLowerCase().includes("codex")?"CCR":t.slice(0,3).toUpperCase():"CLI"}function pW(e){let t=new Date(e);return Number.isFinite(t.getTime())?t.toLocaleString(void 0,{day:"2-digit",hour:"2-digit",minute:"2-digit",month:"short",second:"2-digit",year:"numeric"}):""}function en(e){return e===void 0?"pending":e<1e3?`${e} ms`:`${(e/1e3).toFixed(e<1e4?1:0)} s`}function km(e){return e<1024?`${e} B`:e<1024*1024?`${(e/1024).toFixed(e<10*1024?1:0)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function Mle(e){let t=Number(e);return Number.isFinite(t)&&t>0?Math.trunc(t):void 0}function t0(e){return{clientModels:[],generatedAt:new Date().toISOString(),models:[],providerModels:[],range:e,recentRequests:[],series:xW(e),totals:e0()}}function Tc(e){return{agents:[],clients:[],concurrency:hle(e),endpoints:[],errors:[],generatedAt:new Date().toISOString(),range:e,recentRequests:[],routes:[],scannedRequestCount:0,sessions:[],subagents:[],tools:[],totals:{...e0(),cacheReadTokens:0,cacheWriteTokens:0,errorCount:0,maxConcurrentRequests:0,maxDurationMs:0,p50DurationMs:0,p95DurationMs:0,p99DurationMs:0,sessionCount:0,subagentCallCount:0,toolCallCount:0}}}function Oc(e={}){let t=Mle(e.pageSize)??25;return{generatedAt:new Date().toISOString(),items:[],options:{credentials:[],models:[],providers:[]},page:Mle(e.page)??1,pageSize:t,total:0,totalPages:1}}function hle(e){return xW(e).map(t=>({bucket:t.bucket,label:t.label,maxConcurrentRequests:0,requestCount:0}))}function xW(e){let t=new Date;if(e==="today"||e==="24h"){let n=new Date(t);n.setMinutes(0,0,0),e==="today"?n.setHours(0):n.setHours(n.getHours()-23);let a=e==="today"?t.getHours()+1:24;return Array.from({length:a},(i,s)=>{let l=new Date(n);return l.setHours(n.getHours()+s),{...e0(),bucket:`${l.getFullYear()}-${l.getMonth()+1}-${l.getDate()} ${l.getHours()}`,label:`${String(l.getHours()).padStart(2,"0")}:00`}})}let r=e==="7d"?7:30,o=new Date(t);return o.setHours(0,0,0,0),o.setDate(o.getDate()-(r-1)),Array.from({length:r},(n,a)=>{let i=new Date(o);return i.setDate(o.getDate()+a),{...e0(),bucket:`${i.getFullYear()}-${i.getMonth()+1}-${i.getDate()}`,label:`${i.getMonth()+1}/${i.getDate()}`}})}function e0(){return{avgDurationMs:0,cacheRatio:0,cacheTokens:0,costUsd:0,errorCount:0,inputTokens:0,outputTokens:0,requestCount:0,successRate:0,totalTokens:0}}function We(e,t){return new Intl.NumberFormat(t,{maximumFractionDigits:e>=1e3?1:0,notation:e>=1e4?"compact":"standard"}).format(e)}function wl(e){let t=Number.isFinite(e)&&e&&e>0?e:0;return t===0?"$0.00":t<.01?`$${t.toFixed(6)}`:new Intl.NumberFormat(void 0,{currency:"USD",maximumFractionDigits:t>=100?0:2,minimumFractionDigits:2,style:"currency"}).format(t)}function r0(e){return We(e)}function pn(e){return`${Math.round(Math.max(0,Math.min(1,e))*100)}%`}function o0(e,t,r){let o=new Set(t);return r&&o.add(r),[{label:e,value:""},...Array.from(o).map(n=>({label:n,value:n}))]}function bW(e){return e==="claude-code"||e==="codex"||e==="zcode"||e==="claude-design"||e==="unknown"?e:"all"}function n0(e){return e==="claude-code"?"Claude Code":e==="claude-design"?"Claude Design":e==="codex"?"Codex":e==="zcode"?"ZCode":"Unknown"}function Ec(e){return e.length<=18?e:`${e.slice(0,8)}...${e.slice(-6)}`}function wW(e){return e?e.length>42?`${e.slice(0,39)}...`:e:"-"}var vle="../../assets/assets/claudeapi-A6VUG2I3.png";var yle="../../assets/assets/code0-XF6QJ6WD.png";var xle="../../assets/assets/runapi-UAX35AOL.jpg";var ble="../../assets/assets/teamorouter-3LCEETRZ.png";var CW=[{label:"Today",value:"today"},{label:"24h",value:"24h"},{label:"7d",value:"7d"},{label:"30d",value:"30d"}],SW=[...zb.map(e=>({label:e,value:e}))],KL=[{label:"Requests",value:"requests"},{label:"Total tokens",value:"total-tokens"},{label:"Input tokens",value:"input-tokens"},{label:"Output tokens",value:"output-tokens"},{label:"Cache tokens",value:"cache-tokens"},{label:"Cache ratio",value:"cache-ratio"},{label:"Estimated cost",value:"estimated-cost"},{label:"Success rate",value:"success-rate"},{label:"Errors",value:"errors"},{label:"Average latency",value:"avg-latency"}],PW=[{label:"24h",value:"24h"},{label:"7d",value:"7d"},{label:"30d",value:"30d"}],AW=[{label:"All agents",value:"all"},{label:"Claude Code",value:"claude-code"},{label:"Codex",value:"codex"},{label:"ZCode",value:"zcode"},{label:"Claude Design",value:"claude-design"},{label:"Unknown",value:"unknown"}],IW=[{label:"Claude Code",value:"claude-code"},{label:"Codex",value:"codex"},{label:"ZCode",value:"zcode"}],DW=[{label:"Only opened from CCR",value:"ccr"},{label:"System default",value:"global"}],$L=[{label:"CLI & APP",value:"auto"},{label:"CLI only",value:"cli"},{label:"App only",value:"app"}],LW=[{label:"\u5168\u90E8\u72B6\u6001",value:"all"},{label:"\u6210\u529F",value:"success"},{label:"\u9519\u8BEF",value:"error"}],RW=[{label:"10 / \u9875",value:"10"},{label:"25 / \u9875",value:"25"},{label:"50 / \u9875",value:"50"},{label:"100 / \u9875",value:"100"}],_c=[{label:"OpenAI Chat",value:"openai_chat_completions"},{label:"OpenAI Responses",value:"openai_responses"},{label:"Anthropic Messages",value:"anthropic_messages"},{label:"Gemini Generate",value:"gemini_generate_content"},{label:"Gemini Interactions",value:"gemini_interactions"}],NW=[{label:"Standard usage endpoint",value:"standard"},{label:"HTTP JSON request",value:"http-json"},{label:"Raw connector JSON",value:"raw"}],TW=[{label:"GET",value:"GET"},{label:"POST",value:"POST"}],YL=[{label:"Never",value:"never"},{label:"7 days",value:"7d"},{label:"30 days",value:"30d"},{label:"90 days",value:"90d"},{label:"Custom",value:"custom"}],OW=[{label:"per minute",value:"minute"},{label:"per hour",value:"hour"},{label:"per day",value:"day"}],EW=[{label:"Requests",value:"requests"},{label:"Tokens",value:"tokens"},{label:"Images",value:"images"}],_W=[{label:"Condition",value:"condition"}],a0=[{label:"request.header",value:"request.header"},{label:"request.body",value:"request.body"}],i0=[{label:"==",value:"=="},{label:"!=",value:"!="},{label:">=",value:">="},{label:">",value:">"},{label:"<=",value:"<="},{label:"<",value:"<"},{label:"starts with",value:"starts-with"},{label:"contains",value:"contains"},{label:"contains deep",value:"contains-deep"},{label:"not contains",value:"not-contains"}],s0=[{label:"Set",value:"set"},{label:"Delete",value:"delete"},{label:"Append to array",value:"array-append"},{label:"Prepend to array",value:"array-prepend"},{label:"Remove from array",value:"array-remove"},{label:"Replace in array",value:"array-replace"}],wle=["model-prefix"],l0=[{label:"Off",value:"off"},{label:"Retry",value:"retry"},{label:"Fallback targets",value:"model-chain"}],FW=new Set(["legacy-subagent","legacy-background","legacy-thinking","legacy-web-search","legacy-image"]),jM=[{label:"Exact model",value:"model"},{label:"Model prefix",value:"model-prefix"},{label:"Always",value:"always"}];var hm=[{description:"Generic image understanding tool for OCR, screenshot analysis, chart reading, UI comparison, error diagnosis, and other multi-image tasks.",label:`${_L} / ${ma}`,value:ma},{description:"Generic web search tool supporting hidden in-app browser search plus Brave, Bing, Google CSE, Serper, SerpAPI, Tavily, and Exa.",label:`${_L} / ${Za}`,value:Za}],Cle="@musistudio/unimcp",Sle="unimcp",zM="custom_mcp_tool",Fc="brave",vm=[{label:"In-app Browser",value:"browser"},{label:"Brave",value:"brave"},{label:"Bing",value:"bing"},{label:"Google CSE",value:"google_cse"},{label:"Serper",value:"serper"},{label:"SerpAPI",value:"serpapi"},{label:"Tavily",value:"tavily"},{label:"Exa",value:"exa"}],BW={bing:["BING_SEARCH_API_KEY","BING_SEARCH_ENDPOINT"],browser:["BROWSER_SEARCH_ENGINE","BROWSER_SEARCH_LANGUAGE","BROWSER_SEARCH_COUNTRY","BROWSER_SEARCH_SAFE_SEARCH"],brave:["BRAVE_SEARCH_API_KEY","BRAVE_SEARCH_ENDPOINT"],exa:["EXA_API_KEY","EXA_SEARCH_ENDPOINT"],google_cse:["GOOGLE_SEARCH_API_KEY","GOOGLE_SEARCH_CX","GOOGLE_SEARCH_ENDPOINT"],serper:["SERPER_API_KEY","SERPER_SEARCH_ENDPOINT"],serpapi:["SERPAPI_API_KEY","SERPAPI_SEARCH_ENDPOINT"],tavily:["TAVILY_API_KEY","TAVILY_SEARCH_ENDPOINT"]};var u0=[{label:"stdio",value:"stdio"},{label:"streamable-http",value:"streamable-http"},{label:"sse",value:"sse"}],d0=[{label:"content-length",value:"content-length"},{label:"newline-json",value:"newline-json"}],c0={anthropic:Vse,bailian:Use,claudeapi:vle,code0:yle,deepseek:Wse,gemini:Gse,"kimi-coding":EL,mistral:jse,moonshot:EL,"moonshot-global":EL,openai:zse,openrouter:qse,runapi:xle,siliconflow:Hse,teamorouter:ble,"zai-global-coding":Kse,"zai-global-general":$se,"zhipu-cn-coding":Yse,"zhipu-cn-general":Zse},ZL={cyan:Xse,orange:Jse,violet:Qse},f0=6e5,VW=[{icon:ps,id:"overview"},{icon:Gn,id:"providers"},{icon:Ms,id:"profile"},{icon:qd,id:"routing"},{icon:fs,id:"virtual-models"},{icon:ms,id:"api-keys"},{icon:Gd,id:"models"},{icon:cs,id:"observability"},{icon:ia,id:"logs"},{icon:hk,id:"server"},{icon:jd,id:"networking"},{icon:Na,id:"extensions"}],Ds=["provider","profile","enter"];function XL(e){return e.Providers.length>0}function JL(e,t={}){return e.profile.profiles.some(o=>o.enabled)&&(!t.requireProfileConfirmation||!!t.profileConfirmed)}function qM(e,t={}){return XL(e)?JL(e,t)?"enter":"profile":"provider"}function UW(e,t,r={}){let o=Ds.indexOf(e);for(let n of Ds.slice(o+1))if(n==="enter"||n===qM(t,r))return n}var Bc=[];function WW(e){Bc=e}function Ple(){return Bc}function Cl(e){return GL(Bc,e)}function p0(e){return ale(Bc,e)}function Ale(e){return ile(Bc,e)}function QL(e){return jL(e)}function eR(e){return sW(Bc,e)}function HM(e){return sle(Bc,e)}function Ile(e){return lle(Bc,e)}var Dle=e=>{let t=k_(e);if(Bf(t,"id"))return t;let o=ZS(e);return Bf(o,"id")?o:ay(e)},Lle=Tc("7d"),Rle=t0("7d"),Nle=Oc(),GW="fusionTool",jW="fusionVision",zW="fusionWebSearch";var Fu=z(ie());function ym(e,t){let r=Array.isArray(e)?e:[],o=new Set,n=[];for(let[a,i]of[...r,t??""].entries()){let s=MWe(i,a),l=s?.key.trim();!s||!l||o.has(l)||(o.add(l),n.push({createdAt:s.createdAt,...s.expiresAt?{expiresAt:s.expiresAt}:{},id:s.id,key:l,...s.limits?{limits:s.limits}:{},...s.name?{name:s.name}:{}}))}return n}function MWe(e,t){if(typeof e=="string")return e.trim()?{createdAt:new Date(0).toISOString(),id:`key-${t+1}`,key:e.trim(),name:`API Key ${t+1}`}:void 0;if(!De(e))return;let r=le(e.key)||le(e.value)||le(e.APIKEY);if(!r)return;let o=HW(e.limits),n=le(e.name);return{createdAt:le(e.createdAt)||new Date(0).toISOString(),...le(e.expiresAt)?{expiresAt:le(e.expiresAt)}:{},id:le(e.id)||`key-${t+1}`,key:r,...o?{limits:o}:{},...n?{name:n}:{}}}function HW(e){if(!De(e))return;let t={};for(let r of["ipd","iph","ipm","maxRequests","maxTokens","quotaWindowMs","rpd","rph","rpm","tpd","tph","tpm","windowMs"]){let o=qi(e[r]);o&&(t[r]=o)}return Object.keys(t).length?t:void 0}function Tle(e){return ym(e.APIKEYS,e.APIKEY).map((t,r)=>({expiresAt:t.expiresAt,index:r,key:t,keyValue:t.key,limits:t.limits,masked:bWe(t.key),name:t.name?.trim()||`API Key ${r+1}`}))}function nR(){return{expirationPreset:"never",expiresAt:tR(oR(new Date,30)),limitRows:[],name:""}}function Ole(e){return{expirationPreset:e.expiresAt?"custom":"never",expiresAt:yWe(e.expiresAt),limitRows:hWe(e.limits),name:e.name??""}}function Ele(e,t){return t?[e.name,e.keyValue,e.masked,e.key.id,aR(e),iR(e.limits)].some(r=>r.toLowerCase().includes(t)):!0}function _le(e){let t=wWe(),r=Ble(e),o=Vle(e);return{createdAt:new Date().toISOString(),...o?{expiresAt:o}:{},id:xWe(),key:t,...r?{limits:r}:{},name:e.name.trim()}}function Fle(e,t){let r=Ble(t),o=Vle(t);return{createdAt:e.createdAt,id:e.id,key:e.key,...e.name?{name:e.name}:{},...o?{expiresAt:o}:{},...r?{limits:r}:{}}}function Ble(e){let t={};for(let r of e.limitRows){let o=qi(r.value);if(!o)continue;let n=vWe(r.metric,r.window);n&&(t[n]=o)}return Object.keys(t).length?t:void 0}function hWe(e){return e?[Ja("requests","minute",e.rpm),Ja("requests","hour",e.rph),Ja("requests","day",e.rpd),Ja("tokens","minute",e.tpm),Ja("tokens","hour",e.tph),Ja("tokens","day",e.tpd),Ja("images","minute",e.ipm),Ja("images","hour",e.iph),Ja("images","day",e.ipd),Ja("requests",rR(e.windowMs,"minute"),e.maxRequests),Ja("tokens",rR(e.quotaWindowMs,"day"),e.maxTokens)].filter(t=>!!t):[]}function Ja(e="requests",t="minute",r){let o=r===void 0||r===""?"":String(r);if(!(r!==void 0&&r!==""&&!qi(r)))return{id:`limit_${KW(6)}`,metric:e,value:o,window:t}}function vWe(e,t){return e==="requests"?t==="minute"?"rpm":t==="hour"?"rph":"rpd":e==="tokens"?t==="minute"?"tpm":t==="hour"?"tph":"tpd":t==="minute"?"ipm":t==="hour"?"iph":"ipd"}function Vle(e){if(e.expirationPreset==="never")return;if(e.expirationPreset==="custom"){let r=new Date(e.expiresAt);return Number.isFinite(r.getTime())?r.toISOString():void 0}let t=e.expirationPreset==="7d"?7:e.expirationPreset==="90d"?90:30;return oR(new Date,t).toISOString()}function aR(e){if(!e.expiresAt)return"Never";let t=new Date(e.expiresAt);return Number.isFinite(t.getTime())?t.toLocaleDateString(void 0,{day:"2-digit",month:"short",year:"numeric"}):"Invalid"}function iR(e){if(!e)return"Unlimited";let t=[...qW("requests",[["minute",e.rpm],["hour",e.rph],["day",e.rpd],[rR(e.windowMs,"minute"),e.maxRequests]]),...qW("tokens",[["minute",e.tpm],["hour",e.tph],["day",e.tpd],[rR(e.quotaWindowMs,"day"),e.maxTokens]]),...qW("images",[["minute",e.ipm],["hour",e.iph],["day",e.ipd]])].filter(Boolean);return t.length?t.join(", "):"Unlimited"}function qW(e,t){let r=new Set,o=[];for(let[n,a]of t)!a||r.has(n)||(r.add(n),o.push(`${a} ${e} per ${n}`));return o}function rR(e,t){return e===6e4?"minute":e===36e5?"hour":e===864e5?"day":t}function qi(e){let t=Number(e);return Number.isFinite(t)&&t>0?Math.trunc(t):void 0}async function Ls(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.left="-9999px",t.style.position="fixed",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}function oR(e,t){let r=new Date(e);return r.setDate(r.getDate()+t),r}function tR(e){let t=e.getTimezoneOffset()*6e4;return new Date(e.getTime()-t).toISOString().slice(0,16)}function yWe(e){if(!e)return tR(oR(new Date,30));let t=new Date(e);return Number.isFinite(t.getTime())?tR(t):tR(oR(new Date,30))}function xWe(){return`key_${KW(9)}`}function bWe(e){let t=e.trim();return t.length<=8?"****":`${t.slice(0,Math.min(18,t.length-4))}***`}function wWe(){return`sk-${KW(24)}`}function KW(e){let t=new Uint8Array(24),o=e===t.length?t:new Uint8Array(e);if(window.crypto?.getRandomValues)window.crypto.getRandomValues(o);else for(let a=0;a<o.length;a+=1)o[a]=Math.floor(Math.random()*256);let n=Array.from(o,a=>String.fromCharCode(a)).join("");return window.btoa(n).replace(/\+/g,"-").replace(/\//g,"_").replace(/=+$/g,"")}function YW(e){return JSON.parse(JSON.stringify(e))}function De(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function le(e){return typeof e=="string"&&e.trim()?e.trim():void 0}function Rn(e){let t=new Set,r=[];for(let o of e){let n=o.trim();!n||t.has(n)||(t.add(n),r.push(n))}return r}function ZW(e){let t=e.toLowerCase();return t==="darwin"||t.includes("mac")}function zle(e){let t=e.toLowerCase();return ZW(t)||t==="win32"||t.includes("windows")}function qle(){try{return JW(window.localStorage.getItem(Zb))}catch{return"system"}}function Hle(e){try{if(e==="system"){window.localStorage.removeItem(Zb);return}window.localStorage.setItem(Zb,e)}catch{}}function XW(){return(navigator.languages?.length?navigator.languages:[navigator.language]).some(t=>t.toLowerCase().startsWith("zh"))?"zh":"en"}function Kle(){return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function JW(e){return e==="en"||e==="zh"||e==="system"?e:"system"}function sR(e){return e==="light"||e==="dark"||e==="system"?e:"system"}function lR(e){return e==="random"||e==="violet"||e==="orange"||e==="cyan"||e==="progress"?e:"random"}function $M(e){if(!De(e))return;let t=typeof e.provider=="string"?e.provider.trim():"",r=typeof e.meterId=="string"?e.meterId.trim():"";return t&&r?{meterId:r,provider:t}:void 0}function $le(e){return Math.min(1e9,Math.max(1e3,qi(e)??1e5))}function QW(e){let t=De(e)?e:{};return{account:KM(t.account,["bar","compact","ring","arc","stacked"],io.account),modelShare:KM(t.modelShare,["bars","list","donut","pie"],io.modelShare),rings:KM(t.rings,["rings","arcs","gauges"],io.rings),stats:KM(t.stats,["cards","compact","pills"],io.stats),tokenFlow:KM(t.tokenFlow,["line","area","bar","sparkline"],io.tokenFlow),tokenMix:KM(t.tokenMix,["bars","stacked","donut","pie"],io.tokenMix)}}function Vc(e,t,r){return Array.isArray(e)?$W(Wle(e.map(uR).filter(o=>!!o))):$W(Wle(PWe(m0(t),QW(r))))}function uR(e){if(!De(e))return;let t=CWe(e.type);if(!t)return;let r=SWe(t,e.variant);return{id:le(e.id)||t,type:t,...r?{variant:r}:{}}}function CWe(e){return typeof e=="string"&&["account","activity","header","model-share","rings","source-tabs","stats","token-flow","token-mix"].includes(e)?e:void 0}function SWe(e,t){let r=e4(e).map(o=>o.value);return typeof t=="string"&&r.includes(t)?t:Qa(e)}function e4(e){return e==="account"?[{label:"Bars",value:"bar"},{label:"Compact",value:"compact"},{label:"Ring",value:"ring"},{label:"Arc",value:"arc"},{label:"Stacked",value:"stacked"}]:e==="token-flow"?[{label:"Line",value:"line"},{label:"Area",value:"area"},{label:"Bar",value:"bar"},{label:"Sparkline",value:"sparkline"}]:e==="stats"?[{label:"Cards",value:"cards"},{label:"Compact",value:"compact"},{label:"Pills",value:"pills"}]:e==="token-mix"?[{label:"Bars",value:"bars"},{label:"Stacked",value:"stacked"},{label:"Donut",value:"donut"},{label:"Pie",value:"pie"}]:e==="rings"?[{label:"Rings",value:"rings"},{label:"Arc",value:"arcs"},{label:"Gauges",value:"gauges"}]:e==="model-share"?[{label:"Bars",value:"bars"},{label:"List",value:"list"},{label:"Donut",value:"donut"},{label:"Pie",value:"pie"}]:[]}function Qa(e){if(e==="account")return io.account;if(e==="model-share")return io.modelShare;if(e==="rings")return io.rings;if(e==="stats")return io.stats;if(e==="token-flow")return io.tokenFlow;if(e==="token-mix")return io.tokenMix}function t4(e){return rW.includes(e)}function Ule(e){return oW.includes(e)}function $W(e){return[...e.filter(t=>Ule(t.type)),...e.filter(t=>!Ule(t.type))]}function Wle(e){let t=new Set;return e.filter(r=>t4(r.type)?t.has(r.type)?!1:(t.add(r.type),!0):!0)}function PWe(e,t){return $W(e.filter(r=>r!=="footer").map(r=>({id:r,type:r,...r==="account"?{variant:t.account}:{},...r==="model-share"?{variant:t.modelShare}:{},...r==="rings"?{variant:t.rings}:{},...r==="stats"?{variant:t.stats}:{},...r==="token-flow"?{variant:t.tokenFlow}:{},...r==="token-mix"?{variant:t.tokenMix}:{}})))}function KM(e,t,r){return typeof e=="string"&&t.includes(e)?e:r}function xm(e){return Array.isArray(e)?e.map(dR).filter(r=>!!r):cm.map(r=>({...r}))}function dR(e){if(!De(e))return;let t=AWe(e.type);if(!t)return;let r=t==="metric"?DWe(e.metric)??"requests":void 0,o=RWe(t,e.variant),n=t==="account-balance"?le(e.accountProvider):void 0,a=r4(IWe(e.size,t)??NWe(t),t,o,n);return{...n?{accountProvider:n}:{},enabled:typeof e.enabled=="boolean"?e.enabled:!0,id:le(e.id)||OWe(t,r),...r?{metric:r}:{},size:a,type:t,variant:o}}function AWe(e){return typeof e=="string"&&["account-balance","client-analysis","metric","model-distribution","provider-analysis","share-fuel-cockpit","share-model-leaderboard","share-route-map","share-spend-receipt","share-token-calendar","share-usage-wrapped","system-status","token-activity","token-mix","usage-trend"].includes(e)?e:void 0}function IWe(e,t){if(typeof e=="string"){if(zb.includes(e))return e;if(e==="small")return"1:1";if(e==="medium"||e==="large")return"2:2";if(e==="wide")return"3:2";if(e==="full")return t==="system-status"?"4:1":"4:2"}}function DWe(e){return typeof e=="string"&&["avg-latency","cache-ratio","cache-tokens","errors","estimated-cost","input-tokens","output-tokens","requests","success-rate","total-tokens"].includes(e)?e:void 0}function LWe(e){return e==="account-balance"?[{label:"Cards",value:"cards"},{label:"Compact",value:"compact"},{label:"Bars",value:"bars"},{label:"Ring",value:"ring"},{label:"Semicircle",value:"semicircle"},{label:"Arc",value:"arc"},{label:"Nested rings",value:"nested-rings"}]:e==="metric"?[{label:"Cards",value:"card"},{label:"Compact",value:"compact"},{label:"Bar",value:"bar"},{label:"Ring",value:"ring"}]:e==="usage-trend"?[{label:"Composed",value:"composed"},{label:"Area",value:"area"},{label:"Line",value:"line"},{label:"Bar",value:"bar"}]:e==="token-activity"?[{label:"Heatmap",value:"heatmap"}]:e==="model-distribution"||e==="token-mix"?[{label:"Bars",value:"bars"},{label:"Stacked",value:"stacked"},{label:"Donut",value:"donut"},{label:"Pie",value:"pie"}]:e==="system-status"?[{label:"Timeline",value:"timeline"},{label:"Compact",value:"compact"}]:cR(e)?[{label:"Card",value:"card"}]:[{label:"Table",value:"table"},{label:"Compact",value:"compact"}]}function RWe(e,t){let r=LWe(e).map(o=>o.value);return typeof t=="string"&&r.includes(t)?t:TWe(e)}function NWe(e){return e==="metric"?"1:1":e==="model-distribution"?"2:2":e==="token-mix"?"1:2":e==="token-activity"?"4:2":e==="client-analysis"||e==="provider-analysis"?"2:2":e==="usage-trend"?"3:2":e==="system-status"?"4:1":cR(e)?"1:4":"4:2"}function TWe(e){return e==="account-balance"?"cards":e==="metric"?"card":e==="model-distribution"?"pie":e==="token-mix"?"bars":e==="token-activity"?"heatmap":e==="usage-trend"?"composed":e==="system-status"?"timeline":cR(e)?"card":"table"}function r4(e,t,r,o){return cR(t)?Gle(e,1,4):t!=="account-balance"||r!=="compact"||o?.trim()?e:Gle(e,2,2)}function cR(e){return e==="share-fuel-cockpit"||e==="share-model-leaderboard"||e==="share-route-map"||e==="share-spend-receipt"||e==="share-token-calendar"||e==="share-usage-wrapped"}function Gle(e,t,r){let[o,n]=e.split(":"),a=jle(o,t),i=jle(n,r);return`${a}:${i}`}function jle(e,t){let r=Number.parseInt(e??"",10),o=Number.isFinite(r)?Math.max(t,Math.min(4,r)):t;return o>=4?4:o>=3?3:o>=2?2:1}function OWe(e,t){return e==="metric"?`metric-${t??"requests"}`:e}function m0(e){if(!Array.isArray(e))return qb;let t=new Set(VL),r=new Set,o=[];for(let n of e){let a=typeof n=="string"?n.trim():"";!t.has(a)||r.has(a)||(r.add(a),o.push(a))}return o}function o4(e,t){return`${e} (${t})`}function Yle(e,t){return e==="dark"?t.settings.themeDark:t.settings.themeLight}function Zle(e,t){return e==="zh"?t.settings.languageChinese:t.settings.languageEnglish}function fR(e){return e==="teal"?"bg-teal-500":e==="blue"?"bg-blue-500":e==="indigo"?"bg-indigo-500":e==="amber"?"bg-amber-500":e==="slate"?"bg-slate-500":"bg-rose-500"}function Xle(e){return e==="teal"?"rgb(20,184,166)":e==="blue"?"rgb(59,130,246)":e==="indigo"?"rgb(99,102,241)":e==="amber"?"rgb(245,158,11)":e==="slate"?"rgb(100,116,139)":"rgb(244,63,94)"}var pR="../../assets/assets/zcode-Z7V7YY2Q.png";function Jle(e){return{auth:"none",endpoint:_We(e),headers:{Authorization:"Bearer <new-api-access-token>","New-Api-User":"<user-id>"},mapping:{meters:[{id:"new_api_user_balance",kind:"balance",label:"User balance",remaining:"$.data.quota",unit:"quota",used:"$.data.used_quota"}]},method:"GET",parser:"new-api-user-self",type:"http-json"}}function _We(e){return`${FWe(e)}/api/user/self`}function FWe(e){try{let t=new URL(Xa(e.trim()));return t.pathname=t.pathname.replace(/\/+(v1|api)$/i,"").replace(/\/+$/,"")||"/",t.search="",t.hash="",mm(t)}catch{return e.trim().replace(/[?#].*$/,"").replace(/\/+$/,"").replace(/\/(v1|api)$/i,"")}}var iue=z(ze());function mR(e,t){let r=e.trim()||"127.0.0.1",o=r==="0.0.0.0"?"127.0.0.1":r;return`http://${o.includes(":")&&!o.startsWith("[")?`[${o}]`:o}:${t}`}function Qle(e){return e.state!=="running"?e.lastError||"Proxy is stopped.":e.systemProxy.state==="error"?`Proxy restarted, but system proxy switching failed: ${e.systemProxy.lastError||"Unknown error"}`:"Proxy restarted."}function eue(e,t){return t?"Service paused.":e.state==="running"?"Service started.":e.lastError||"Service did not start."}function tue({state:e}){let t=ve();return(0,iue.jsx)(gt,{variant:e==="running"?"success":e==="error"?"danger":e==="starting"?"warning":"outline",children:t(e)})}function rue(e){return e.trusted?"Trusted":e.state==="missing"?"Not installed":e.state==="unsupported"?"Manual install":e.state==="untrusted"?"Untrusted":"Unknown"}function oue(e){return e.trusted?"success":e.state==="unsupported"||e.state==="unknown"?"outline":e.state==="untrusted"?"danger":"warning"}function nue(e,t,r){let o=bm(e.message,r)||r(e.message);if(t?.trusted)return o;let n=[o];t?.message&&t.message!==e.message&&n.push(`${r("Status")}: ${bm(t.message,r)}`);let a=n.join(`
53
+
54
+ `);return e.manualCommand?`${a}
55
+
56
+ ${r("Manual install command")}:
57
+ ${e.manualCommand}`:a}function bm(e,t){if(!e)return"";let r="Proxy CA certificate is not trusted: ";if(e.startsWith(r))return`${t("Proxy CA certificate is not trusted:")} ${e.slice(r.length)}`;let o="macOS did not allow CCR to request administrator authorization: ";return e.startsWith(o)?`${t("macOS did not allow CCR to request administrator authorization:")} ${BWe(e.slice(o.length),t)}`:t(e)}function BWe(e,t){return e.replace(" Opened Terminal installer:",` ${t("Opened Terminal installer:")}`).replace(" Could not open Terminal installer:",` ${t("Could not open Terminal installer:")}`)}function aue(e){return e.trusted?[]:e.platform==="darwin"?["Click Install CA and approve the administrator prompt to install it into the System keychain.","If trust is still not detected, open Keychain Access > System and find the CCR MITM Proxy certificate.","Open Trust, set When using this certificate to Always Trust, then restart the browser or client.","Return here and click Check Trust."]:e.platform==="win32"?["Click Install CA, or open the CA file and import it manually.","Place it under Current User > Trusted Root Certification Authorities > Certificates.","For Firefox, Java, Python, Node, or other clients with a private CA store, import the CA there as well.","Restart the browser or client.","Return here and click Check Trust."]:["Open the CA file and import it into your OS or browser trust store.","For Firefox, Java, Python, Node, or other clients with a private CA store, import the CA there as well.","Restart the browser or client.","Return here and click Check Trust."]}function Ma(e,t,r){return Math.min(r,Math.max(t,e))}function due(e){let t={...je.Router,...e||{}},{default:r,...o}=t,n=UWe(e?.rules)??[];return{...o,builtInRules:n4(e?.builtInRules),fallback:Sl(e?.fallback),rules:n}}function n4(e){let t=De(e)?e:{};return{"claude-code":sue(t["claude-code"]??t.claudeCode??t.claude),codex:sue(t.codex)}}function sue(e){if(typeof e=="boolean")return{enabled:e};let t=De(e)?e:{};return{enabled:typeof t.enabled=="boolean"?t.enabled:!0}}function Sl(e){let t=De(e)?e:{},r=VWe(t.mode)??je.Router.fallback.mode,o=Ma(Number(t.retryCount),0,9999),n=Array.isArray(t.models)?Rn(t.models.map(a=>le(a)).filter(a=>!!a)):[];return{mode:r,models:n,retryCount:Number.isFinite(o)?o:je.Router.fallback.retryCount}}function VWe(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();return l0.some(r=>r.value===t)?t:void 0}function UWe(e){if(Array.isArray(e))return e.map((t,r)=>{if(!De(t))return;let o=HWe(t.type);if(!o)return;let n=le(t.name)||d4(o),a=le(t.id)||`rule-${r+1}`;if(FW.has(a))return;let i=le(t.pattern),s=le(t.target),l=Number(t.threshold),u=WWe(t.condition??t)??jWe(o,{pattern:i}),d=zWe(t),c=t.fallback??t.failureFallback??t.fallbackStrategy,f=De(c)?Sl(c):void 0;return{...u?{condition:u}:{},enabled:typeof t.enabled=="boolean"?t.enabled:!0,...f?{fallback:f}:{},id:a,name:n,...i?{pattern:i}:{},...d.length===1?{rewrite:d[0]}:{},...d.length>0?{rewrites:d}:{},...s?{target:s}:{},...Number.isFinite(l)&&l>0?{threshold:Math.trunc(l)}:{},type:u?"condition":o}}).filter(t=>!!t)}function WWe(e){if(!De(e))return;let t=le(e.left)??le(e.path)??le(e.field)??le(e.parameter),r=GWe(e.operator??e.op),o=typeof e.right=="string"?e.right.trim():typeof e.value=="string"?e.value.trim():e.right!==void 0?String(e.right):e.value!==void 0?String(e.value):void 0;return t&&r&&o!==void 0?{left:t,operator:r,right:o}:void 0}function GWe(e){if(typeof e!="string")return;let t=e.trim();return i0.some(r=>r.value===t)?t:void 0}function jWe(e,t){if(e==="model-prefix"&&t.pattern)return{left:"request.body.model",operator:"starts-with",right:t.pattern}}function zWe(e){if(Array.isArray(e.rewrites))return e.rewrites.map(o=>lue(o)).filter(o=>!!o);let t=lue(e.rewrite??e.action),r=le(e.target);return[...t?[t]:[],...r?[{key:"request.body.model",operation:"set",value:r}]:[]]}function lue(e){if(!De(e))return;let t=le(e.key)??le(e.path)??le(e.field)??le(e.parameter),r=qWe(e.operation??e.op??e.type)??"set",o=uue(e.value),n=uue(e.match);if(t)return r==="delete"?{key:t,operation:r}:r==="array-replace"?n!==void 0&&o!==void 0?{key:t,match:n,operation:r,value:o}:void 0:o!==void 0?{key:t,operation:r,value:o}:void 0}function qWe(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();return s0.some(r=>r.value===t)?t:void 0}function uue(e){return typeof e=="string"?e.trim():e!==void 0?String(e):void 0}function HWe(e){if(typeof e!="string")return;let t=e.trim().toLowerCase();return KWe(t)?t:void 0}function KWe(e){return _W.some(t=>t.value===e)||wle.includes(e)}function YM(e){return De(e)?(le(e.id)||le(e.key))==="claude-design":!1}function ZM(e){return De(e)?(le(e.id)||le(e.key))==="cursor-proxy":!1}function a4(e){let t=k0(e);return{defaultTarget:t.defaultTarget,enabled:t.enabled,rules:t.rules.map(r=>({...r}))}}function i4(e){let t=k0(e);return{defaultTarget:t.defaultTarget,enabled:t.enabled,rules:t.rules.map(r=>({...r}))}}function k0(e){let t=De(e)?e:{},r=De(t.routing)?t.routing:{},o=hue(t.targetProvider,t.targetModel)||le(t.targetModel)||"",n=[];if(De(r.modelMap))for(let[a,i]of Object.entries(r.modelMap)){let s=le(a),l=le(i);!s||!l||n.push({enabled:!0,id:`model-${Pl(s)}`,model:s,name:s,pattern:"",target:l,threshold:"200000",type:"model"})}return Array.isArray(r.rules)&&r.rules.forEach((a,i)=>{let s=$We(a,i);s&&n.push(s)}),{defaultTarget:le(r.default)||le(r.defaultTarget)||o,enabled:t.routing===!1?!1:r.enabled!==!1,rules:n}}function $We(e,t){if(!De(e))return;let r=le(e.type),o=t4e(e.type);if(r&&!o)return;let n=o??"model",a=le(e.target)||hue(e.targetProvider,e.targetModel)||le(e.targetModel)||"",i=le(e.id)||`${n}-${t+1}`,s=le(e.model)||le(e.sourceModel)||"",l=le(e.pattern)||(n==="model-prefix"?s:"")||"";return{enabled:e.enabled!==!1,id:i,model:s,name:le(e.name)||i,pattern:l,target:a,threshold:String(qi(e.threshold)||qi(e.tokenThreshold)||2e5),type:n}}function cue(e=[]){return{enabled:!0,id:vue(e),model:"claude-opus-4-8",name:"Claude Design route",pattern:"",target:"",threshold:"200000",type:"model"}}function fue(e=[]){return{enabled:!0,id:vue(e),model:"default",name:"Cursor route",pattern:"",target:"",threshold:"200000",type:"model"}}function pue(e,t,r={model:"claude-opus-4-8",pattern:"claude-"}){let o={type:t};return(!e.name.trim()||e.name.trim()===g0(e.type))&&(o.name=g0(t)),t==="model"&&!e.model.trim()&&(o.model=r.model),t==="model-prefix"&&!e.pattern.trim()&&(o.pattern=r.pattern),o}function s4(e){return e.enabled?e.rules.every(t=>t.enabled?t.target.trim()?t.type==="model"?!!t.model.trim():t.type==="model-prefix"?!!t.pattern.trim():!0:!1:!0):!0}function l4(e){return{enabled:e.enabled,rules:e.rules.map(t=>{let r={enabled:t.enabled,id:t.id.trim()||Pl(t.name)||"route",name:t.name.trim()||g0(t.type),target:t.target.trim(),type:t.type};return t.type==="model"&&(r.model=t.model.trim()),t.type==="model-prefix"&&(r.pattern=t.pattern.trim()),r})}}function mue(e){return[...YWe(e),...e.Router.rules.map((t,r)=>({condition:kR(t),enabled:t.enabled,index:r,key:`router-${t.id}-${r}`,name:t.name||"Unnamed",readonly:!1,ruleCount:e.Router.rules.length,ruleId:t.id,sourceLabel:"Router",target:MR(t),typeLabel:d4(t.type)}))]}function YWe(e){return ZWe.map(t=>{let r=gue(e,t),o=QWe(e,t);return{builtInAgent:t,condition:`request.header.user-agent contains ${e4e(t)}`,enabled:XWe(e,t),key:`builtin-agent-${t}`,name:kue(t),readonly:!1,ruleCount:e.Router.rules.length,ruleId:`builtin-agent-${t}`,sourceLabel:"Built-in",target:r?`set request.body.model = ${r}`:"Profile model unset",toggleDisabled:!!o,toggleDisabledReason:o,typeLabel:"Condition"}})}var ZWe=["claude-code","codex"];function XWe(e,t){return JWe(e,t)&&!!u4(e,t)&&!!gue(e,t)}function JWe(e,t){return e.Router.builtInRules?.[t]?.enabled!==!1}function u4(e,t){if(e.profile.enabled!==!1)return e.profile.profiles.find(r=>r.enabled&&r.agent===t)}function gue(e,t){return u4(e,t)?.model.trim()||""}function QWe(e,t){if(e.profile.enabled===!1)return"Agent profiles are disabled.";let r=kue(t),o=u4(e,t);if(!o)return`Enable a ${r} profile before enabling this built-in route.`;if(!o.model.trim())return`Set a model on the ${r} profile before enabling this built-in route.`}function kue(e){return e==="claude-code"?"Claude Code":"Codex"}function e4e(e){return e==="claude-code"?"claude":"codex"}function t4e(e){let t=le(e);return t&&r4e(t)?t:void 0}function r4e(e){return jM.some(t=>t.value===e)}function Mue(e){return e==="always"}function g0(e){return jM.find(t=>t.value===e)?.label??e}function hue(e,t){let r=le(e),o=le(t);return r&&o?`${r},${o}`:o||r}function vue(e){let t=e.length+1,r=`claude-design-route-${t}`;for(;e.some(o=>o.id===r);)t+=1,r=`claude-design-route-${t}`;return r}function c4(e){return{appsText:hR(e?.apps??[]),configText:hR(o4e(e?.config)),enabled:e?.enabled!==!1,modulePath:e?.module??""}}function o4e(e){if(!De(e))return{};let{routing:t,...r}=e;return r}function bue(e){let t=e.trim();if(!t)return{ok:!0};let r;try{r=JSON.parse(t)}catch{return{ok:!1,message:"Invalid JSON."}}if(!Array.isArray(r))return{ok:!1,message:"Plugin apps must be a JSON array."};let o=[];for(let n of r){if(!De(n))return{ok:!1,message:"Each plugin app requires name and url."};let a=le(n.name),i=le(n.url);if(!a||!i)return{ok:!1,message:"Each plugin app requires name and url."};o.push({...le(n.description)?{description:le(n.description)}:{},...le(n.icon)?{icon:le(n.icon)}:{},...le(n.id)?{id:le(n.id)}:{},name:a,url:i})}return{ok:!0,value:o}}function wue(e){let t=e.trim();if(!t)return{ok:!0};let r;try{r=JSON.parse(t)}catch{return{ok:!1,message:"Invalid JSON."}}if(!De(r))return{ok:!1,message:"Plugin config must be a JSON object."};let{routing:o,...n}=r;return{ok:!0,value:n}}function Cue(e,t){let r=t?{...t}:{};return De(e)&&Object.prototype.hasOwnProperty.call(e,"routing")&&(r.routing=e.routing),Object.keys(r).length>0?r:void 0}function hR(e){return JSON.stringify(e,null,2)}function Pl(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^-+|-+$/g,"").slice(0,80)}function M0(e){return[...(e.plugins??[]).map((t,r)=>Aue("plugins",t,r)),...n4e(e.providerPlugins??[])]}function n4e(e){let t=new Map,r=new Set;return e.forEach((o,n)=>{let a=yue(o);if(a){t.set(a,[...t.get(a)??[],n]);return}let i=xue(o);i&&r.add(i)}),e.flatMap((o,n)=>{let a=yue(o);if(a&&r.has(a))return[];let i=Aue("providerPlugins",o,n),s=xue(o),l=s?t.get(s)??[]:[];if(l.length===0)return[i];let u=i4e([n,...l]),d=u.every(c=>a4e(e[c]));return[{...i,enabled:d,groupIndexes:u,status:d?"enabled":"disabled"}]})}function yue(e){if(!De(e))return;let t=le(e.key);if(!(!t?.startsWith("ccr-local-agent-")||!t.endsWith("-internal")||!(le(e.providerName)||le(e.provider))?.includes("::")))return t.slice(0,-9)||void 0}function a4e(e){return!De(e)||e.enabled!==!1}function i4e(e){return[...new Set(e.filter(t=>Number.isInteger(t)&&t>=0))]}function Sue(e,t,r){let o=new Set(r.map(u=>u.id)),n=new Map(t.map(u=>[u.id,u])),a=new Map,i=new Set,s=new Set;function l(u){if(!(o.has(u.id)||a.has(u.id))&&!s.has(u.id)){s.add(u.id);for(let d of u.dependencies){let c=s4e(d,n);if(!c){o.has(d.id)||i.add(d.id);continue}l(c)}s.delete(u.id),a.set(u.id,u)}}return l(e),{items:[...a.values()],missing:[...i]}}function s4e(e,t){if(e.modulePath)return{dependencies:[],id:e.id,modulePath:e.modulePath,name:e.name};let r=t.get(e.id);if(r)return{apps:r.apps,dependencies:r.dependencies,id:r.id,modulePath:r.modulePath,name:r.name}}function Pue(e){return e.map(t=>t.name||t.id).join(", ")}function Aue(e,t,r){if(!De(t))return{canConfigure:!1,canToggle:!1,capability:"Unsupported format",enabled:!1,groupIndexes:[r],index:r,name:le(t)||`Plugin ${r+1}`,source:e,status:"unsupported",target:"Not available"};if(e==="plugins"){let n=t.enabled!==!1;return{canConfigure:!0,canToggle:!0,capability:l4e(t),enabled:n,groupIndexes:[r],index:r,name:le(t.id)||le(t.key)||`wrapper-plugin-${r+1}`,source:e,status:n?"enabled":"disabled",target:u4e(t)}}let o=t.enabled!==!1;return{canConfigure:!1,canToggle:!0,capability:d4e(t),enabled:o,groupIndexes:[r],index:r,name:le(t.key)||`provider-plugin-${r+1}`,source:e,status:o?"enabled":"disabled",target:le(t.providerName)||le(t.provider)||"All providers"}}function Iue(e,t){return t?[e.name,e.target,e.capability,e.status,e.source].some(r=>r.toLowerCase().includes(t)):!0}function l4e(e){let t=["Wrapper runtime"];le(e.module)&&t.push("Module");let r=Array.isArray(e.apps)?e.apps.length:0;r>0&&t.push(`${r} browser ${r===1?"app":"apps"}`);let o=De(e.proxy)?e.proxy:void 0,n=De(o)&&Array.isArray(o.routes)?o.routes.length:0;n>0&&t.push(`${n} proxy ${n===1?"route":"routes"}`);let a=De(e.coreGateway)?e.coreGateway:void 0,i=De(a)&&Array.isArray(a.providerPlugins)?a.providerPlugins.length:0;i>0&&t.push(`${i} provider ${i===1?"plugin":"plugins"}`);let s=De(a)&&Array.isArray(a.virtualModelProfiles)?a.virtualModelProfiles.length:0;if(s>0&&t.push(`${s} Fusion ${s===1?"profile":"profiles"}`),YM(e)){let u=k0(e.config).rules.length;t.push(u>0?`${u} model ${u===1?"route":"routes"}`:"Configurable routing")}if(ZM(e)){let u=k0(e.config).rules.length;t.push(u>0?`${u} model ${u===1?"route":"routes"}`:"Configurable routing")}return De(a)&&De(a.config)&&t.push("Core gateway config"),t.join(", ")}function u4e(e){let t=le(e.module);if(t)return t;let r=De(e.proxy)?e.proxy:void 0,n=(De(r)&&Array.isArray(r.routes)?r.routes:[]).filter(De).map(a=>le(a.host)).filter(a=>!!a);return n.length?n.join(", "):"Wrapper runtime"}function d4e(e){let t=["Provider middleware"];return(e.deepseekThinking||e.deepSeekThinking)&&t.push("DeepSeek thinking"),e.codexOauth&&t.push("Codex OAuth"),e.auth&&t.push("Auth mutation"),e.request&&t.push("Request mutation"),e.response&&t.push("Response mutation"),t.join(", ")}function f4(){return{dependencies:[],key:"",marketplaceId:"",modulePath:"",selectedName:""}}function xue(e){return De(e)?le(e.key)||le(e.id):void 0}function g4(e){let t=e.virtualModelProfiles??[],r=C4e(t),o=Rs(e.Providers)[0]?.value??"";return{baseModelMode:"fixed",clientToolsPolicy:"allow",customMcpServer:x0(e.agent?.mcpServers??[]),customToolName:zM,description:"",descriptionTemplate:"",displayName:"Fusion",displayNameTemplate:"{profileDisplayName}",enabled:!0,exactAliasesText:r,fixedModel:o,id:p4(t,r),includeInGatewayModels:!0,instructionsAppend:"",instructionsPrepend:"",instructionsReplace:"",key:r,materializationEnabled:!0,matchMultimodal:!0,matchMode:"alias",matchWebSearch:!1,maxToolCalls:"8",maxTurns:"6",prefixesText:"",suffixesText:"",toolChoiceText:"",tools:[],toolsText:ma,visionModel:o,webSearchEnvRows:v0(Fc),webSearchProvider:Fc,executionMode:"tool_loop"}}function Due(e,t){let r=e.match?.exactAliases??[],o=e.match?.prefixes??[],n=e.match?.suffixes??[],a=f4e(e),i=a==="prefix"?o:a==="suffix"?n:r,s=(e.tools??[]).map((v,b)=>c4e(v,b)),l=k4(e),u=M4(e),d=S4e(s,e),c=Cm(d),p=Rs(t?.Providers??[])[0]?.value??"",g=yR(e),m=d.find(v=>!Uc(v))??zM,h=t?.agent?.mcpServers??[],k=g?.mcpServerName?h.find(v=>v.name===g.mcpServerName):void 0,M=k?eh(k):x0(h);return!k&&g?.env&&(M.envRows=Hi(g.env)),{baseModelMode:"fixed",clientToolsPolicy:"allow",customMcpServer:M,customToolName:m,description:e.description??"",descriptionTemplate:e.materialization?.descriptionTemplate??"",displayName:e.displayName??e.key,displayNameTemplate:e.materialization?.displayNameTemplate??"",enabled:e.enabled!==!1,exactAliasesText:i.length?i.join(", "):e.key,fixedModel:e.baseModel?.fixedModel??"",id:e.id,includeInGatewayModels:e.materialization?.includeInGatewayModels!==!1,instructionsAppend:e.instructions?.append??"",instructionsPrepend:e.instructions?.prepend??"",instructionsReplace:e.instructions?.replace??"",key:e.key,materializationEnabled:e.materialization?.enabled!==!1,matchMultimodal:c.matchMultimodal,matchMode:"alias",matchWebSearch:c.matchWebSearch,maxToolCalls:String(e.execution?.maxToolCalls??8),maxTurns:String(e.execution?.maxTurns??6),prefixesText:(e.match?.prefixes??[]).join(", "),suffixesText:(e.match?.suffixes??[]).join(", "),toolChoiceText:b4e(e.toolChoice),tools:s,toolsText:d.join(", "),visionModel:l?.modelSelector??l?.model??p,webSearchEnvRows:v0(u?.provider??Fc,Hi(u?.env??{})),webSearchProvider:u?.provider??Fc,executionMode:"tool_loop"}}function c4e(e,t=0){return{description:e?.description??"",id:`tool-${Date.now()}-${t}-${Math.random().toString(36).slice(2,8)}`,inputSchemaText:e?.inputSchema?JSON.stringify(e.inputSchema,null,2):"",name:e?.name??"",visibility:e?.visibility==="client"?"client":"internal"}}function f4e(e){return e.match?.prefixes?.length?"prefix":e.match?.suffixes?.length?"suffix":"alias"}function Lue(e,t){let r={...e,...t};if(t.matchMode==="alias"?r.baseModelMode="fixed":t.matchMode==="prefix"?r.baseModelMode="strip_prefix":t.matchMode==="suffix"&&(r.baseModelMode="strip_suffix"),t.exactAliasesText!==void 0){let o=y0(t.exactAliasesText)[0];o&&(r.key=Pl(o)||o,r.displayName=m4(o)||o)}return t.key!==void 0&&(!e.displayName.trim()||e.displayName==="Virtual Model"||e.displayName==="Fusion")&&(r.displayName=m4(t.key)||e.displayName),t.key!==void 0&&e.exactAliasesText.trim()===e.key&&(r.exactAliasesText=t.key.trim()),t.executionMode==="decorate_only"&&e.tools.every(o=>o.visibility==="internal")&&(r.tools=e.tools.map(o=>({...o,visibility:"client"}))),r}function k4(e){let t=e.metadata?.[jW];if(!De(t))return;let r={apiKey:le(t.apiKey),baseUrl:le(t.baseUrl),model:le(t.model),modelSelector:le(t.modelSelector),toolName:le(t.toolName)},o=typeof t.timeoutMs=="number"?t.timeoutMs:typeof t.timeoutMs=="string"?ha(t.timeoutMs):0;return o&&(r.timeoutMs=o),r.apiKey||r.baseUrl||r.model||r.modelSelector||r.toolName||r.timeoutMs?r:void 0}function p4e(e,t){if(!Cm(ei(e.toolsText)).matchMultimodal)return;let r=e.visionModel.trim();if(r)return{...r?{modelSelector:r}:{},toolName:m4e(t)}}function m4e(e){return`vision_understand_${Pl(e).replace(/[^a-z0-9_]+/g,"_").replace(/^_+|_+$/g,"")||"fusion"}`}function M4(e){let t=e.metadata?.[zW];if(!De(t))return;let r=h4e(t.provider),o=De(t.env)?wm(t.env):{},n={...Object.keys(o).length?{env:o}:{},...r?{provider:r}:{},toolName:le(t.toolName)},a=typeof t.timeoutMs=="number"?t.timeoutMs:typeof t.timeoutMs=="string"?ha(t.timeoutMs):0;a&&(n.timeoutMs=a);let i=typeof t.resultCount=="number"?t.resultCount:typeof t.resultCount=="string"?ha(t.resultCount):0;return i&&(n.resultCount=i),n.env||n.provider||n.toolName||n.timeoutMs||n.resultCount?n:void 0}function g4e(e,t){if(!Cm(ei(e.toolsText)).matchWebSearch)return;let r=Wc(e.webSearchEnvRows);return{...Object.keys(r).length?{env:r}:{},provider:e.webSearchProvider,toolName:k4e(t)}}function k4e(e){return`${Pl(e).replace(/[^a-z0-9_]+/g,"_").replace(/^_+|_+$/g,"")||"fusion"}_web_search`}function yR(e){let t=e.metadata?.[GW];if(!De(t))return;let r=De(t.env)?wm(t.env):{},o=le(t.mcpServerName);return Object.keys(r).length||o?{...Object.keys(r).length?{env:r}:{},...o?{mcpServerName:o}:{}}:void 0}function M4e(e){if(!ei(e.toolsText).some(o=>!Uc(o)))return;let r=e.customMcpServer.name.trim();return r?{mcpServerName:r}:void 0}function Rue(e,t,r){if(ei(e.toolsText).some(n=>!Uc(n)))return jc(e.customMcpServer,t,r)}function h4e(e){let t=le(e)?.toLowerCase()??"";return vm.some(r=>r.value===t)?t:void 0}function v0(e,t=[]){let r=BW[e]??[],o=new Map(t.map(s=>[s.key.trim(),s.value]).filter(([s])=>!!s)),n=r.map(s=>Tu(s,o.get(s)??"")),a=t.filter(s=>{let l=s.key.trim();return l&&!r.includes(l)}).map(s=>Tu(s.key,s.value)),i=[...n,...a];return i.length?i:[Tu()]}function Nue(e){let t=y0(e.exactAliasesText),r=ei(e.toolsText),o=Cm(r);return t.length===0?"New model is required.":e.fixedModel.trim()?r.length===0?"Tool is required.":o.matchMultimodal&&!e.visionModel.trim()?"Vision model is required.":o.matchWebSearch&&!h0(e.webSearchEnvRows)?"Environment variable keys are required when values are set.":r.some(n=>!Uc(n))?r.some(n=>!Uc(n)&&n.trim())?Gc(e.customMcpServer):"Tool name is required.":"":"Base model is required."}function Tue(e,t,r){let o=y0(e.exactAliasesText),n=o[0]??e.key.trim(),a=Pl(n)||Pl(e.key)||n||e.key.trim(),i=r===void 0?p4(t,a,r):e.id||p4(t,a,r),s=m4(n)||n||e.displayName.trim()||a,l=p4e(e,i),u=g4e(e,i),d=M4e(e),f=ei(e.toolsText).map(M=>l?.toolName&&JM(M)?l.toolName:u?.toolName&&QM(M)?u.toolName:M),p=y4e(e,f),g=ha(e.maxToolCalls),m=ha(e.maxTurns),h=Cm(f),k={...l?{[jW]:l}:{},...u?{[zW]:u}:{},...d?{[GW]:d}:{}};return{baseModel:v4e(e),displayName:s,enabled:e.enabled,execution:{clientToolsPolicy:"allow",...h,maxToolCalls:Ma(g||Math.max(p.length,1),1,50),maxTurns:Ma(m||6,1,50),mode:"tool_loop",streamMode:"optimistic"},id:i,key:a,match:{exactAliases:o,prefixes:[],suffixes:[]},materialization:{displayNameTemplate:"{profileDisplayName}",enabled:!0,includeInGatewayModels:!0},...Object.keys(k).length?{metadata:k}:{},tools:p}}function v4e(e){return{fixedModel:w4e(e.fixedModel),mode:"fixed"}}function y4e(e,t=ei(e.toolsText)){let r=new Map(e.tools.map(o=>[_o(o.name.trim()),o]).filter(([o])=>!!o));return Rn(t.map(_o)).filter(h4).map(o=>{let n=r.get(o)??r.get(v4(o)),a=n?x4e(n.inputSchemaText):void 0,i=n?.description.trim()||I4e(o);return{...i?{description:i}:{},...a?.ok&&a.value?{inputSchema:a.value}:{},name:o,visibility:"internal"}})}function x4e(e){let t=e.trim();if(!t)return{ok:!0};try{let r=JSON.parse(t);return De(r)?{ok:!0,value:r}:{ok:!1}}catch{return{ok:!1}}}function b4e(e){return e===void 0?"":typeof e=="string"?e:JSON.stringify(e)}function y0(e){return Rn(e.split(/\r?\n|,/g).map(t=>t.trim()).filter(Boolean))}function w4e(e){let t=e.trim(),r=t.indexOf(",");if(r>0&&r<t.length-1){let o=t.slice(0,r).trim(),n=t.slice(r+1).trim();return o&&n?`${o}/${n}`:t}return t}function C4e(e){let t=new Set(e.map(r=>r.key));for(let r=e.length+1;r<1e3;r+=1){let o=`fusion-${r}`;if(!t.has(o))return o}return`fusion-${Date.now()}`}function p4(e,t,r){let o=Pl(t)||"fusion",n=new Set(e.filter((a,i)=>i!==r).map(a=>a.id));if(!n.has(o))return o;for(let a=2;a<1e3;a+=1){let i=`${o}-${a}`;if(!n.has(i))return i}return`${o}-${Date.now()}`}function m4(e){return e.trim().split(/[-_\s.]+/g).filter(Boolean).map(r=>r.slice(0,1).toUpperCase()+r.slice(1)).join(" ")}function Oue(e,t){return t?[e.id,e.key,e.displayName,e.description??"",XM(e),xR(e),bR(e),D4e(e)].some(r=>r.toLowerCase().includes(t)):!0}function XM(e){let t=e.match??{exactAliases:[],prefixes:[],suffixes:[]};if(t.exactAliases?.length)return t.exactAliases.join(", ");let r=[...(t.prefixes??[]).map(o=>`${o}*`),...(t.suffixes??[]).map(o=>`*${o}`)];return r.length?r.join(", "):"-"}function xR(e){let t=e.baseModel;return t?t.fixedModel?t.fixedModel:t.mode==="strip_prefix"?"strip prefix":t.mode==="strip_suffix"?"strip suffix":t.mode||"request":"request"}function bR(e){if(!e.tools?.length)return"-";let t=k4(e),r=M4(e),o=yR(e);return e.tools.map(n=>t?.toolName&&n.name===t.toolName?`${vR(ma)}${t.modelSelector||t.model?` (${t.modelSelector||t.model})`:""}`:r?.toolName&&n.name===r.toolName?`${vR(Za)}${r.provider?` (${A4e(r.provider)})`:""}`:o?.mcpServerName?`${o.mcpServerName} / ${vR(n.name)}`:vR(n.name)).join(", ")}function _o(e){let t=e.trim();return t===Cle||t===Sle?ma:t}function h4(e){return!!_o(e)}function Uc(e){let t=_o(e);return JM(t)||QM(t)}function JM(e){let t=_o(e);return t===ma||t.startsWith(`${ma}_`)}function QM(e){let t=_o(e);return t===Za||t.startsWith(`${Za}_`)||t.endsWith(`_${Za}`)||t.includes("search_web")}function ei(e){return Rn(y0(e).map(_o).filter(h4))}function S4e(e,t){let r=k4(t),o=M4(t),n=Rn(e.map(a=>_o(a.name)).filter(h4).map(a=>r?.toolName&&a===r.toolName?ma:o?.toolName&&a===o.toolName?Za:a));return n.length>0?n:t.execution?.matchWebSearch&&!t.execution?.matchMultimodal?[Za]:t.execution?.matchWebSearch&&t.execution?.matchMultimodal?[ma,Za]:[ma]}function P4e(e){let t=_o(e);return{matchMultimodal:JM(t),matchWebSearch:QM(t)}}function Cm(e){let t=e.map(P4e);return{matchMultimodal:t.some(r=>r.matchMultimodal),matchWebSearch:t.some(r=>r.matchWebSearch)}}function A4e(e){return vm.find(t=>t.value===e)?.label??e}function I4e(e){return hm.find(r=>r.value===v4(e))?.description??""}function vR(e){let t=v4(e);return hm.find(o=>o.value===t)?.label??t}function v4(e){let t=_o(e);return JM(t)?ma:QM(t)?Za:t}function D4e(e){let t=e.execution,r=[t?.matchMultimodal?"image":"",t?.matchWebSearch?"web search":""].filter(Boolean);return`${t?.mode||"tool_loop"} \xB7 ${t?.maxTurns??6}/${t?.maxToolCalls??8}${r.length?` \xB7 ${r.join(", ")}`:""}`}function x0(e=[]){return{apiKey:"",apiKeyEnv:"",argsText:"",command:"",cwd:"",envRows:[],headerRows:[],name:_ue(e),protocolVersion:"2024-11-05",requestTimeoutMs:"30000",startupTimeoutMs:String(f0),stdioMessageMode:"content-length",transport:"stdio",url:""}}function eh(e){let t=e.transport!=="stdio";return{apiKey:t?e.apiKey??"":"",apiKeyEnv:t?e.apiKeyEnv??"":"",argsText:e.transport==="stdio"?e.args.join(", "):"",command:e.transport==="stdio"?e.command:"",cwd:e.transport==="stdio"?e.cwd??"":"",envRows:e.transport==="stdio"?Hi(e.env):[],headerRows:t?Hi(e.headers):[],name:e.name,protocolVersion:e.protocolVersion,requestTimeoutMs:String(e.requestTimeoutMs),startupTimeoutMs:String(e.startupTimeoutMs||f0),stdioMessageMode:e.transport==="stdio"?e.stdioMessageMode:"content-length",transport:e.transport,url:t?e.url:""}}function Gc(e){return e.name.trim()?e.transport==="stdio"&&!e.command.trim()?"Command is required.":e.transport!=="stdio"&&!e.url.trim()?"URL is required.":ha(e.requestTimeoutMs)<100?"Request timeout must be at least 100 ms.":ha(e.startupTimeoutMs)<100?"Startup timeout must be at least 100 ms.":e.transport==="stdio"&&!h0(e.envRows)?"Env rows require keys.":e.transport!=="stdio"&&!h0(e.headerRows)?"Header rows require keys.":"":"Name is required."}function jc(e,t,r){let o={name:e.name.trim()||_ue(t,r),protocolVersion:e.protocolVersion.trim()||"2024-11-05",requestTimeoutMs:Ma(ha(e.requestTimeoutMs),100,6e5),startupTimeoutMs:Ma(ha(e.startupTimeoutMs),100,6e5)};return e.transport!=="stdio"?{...o,...e.apiKey.trim()?{apiKey:e.apiKey.trim()}:{},...e.apiKeyEnv.trim()?{apiKeyEnv:e.apiKeyEnv.trim()}:{},headers:Wc(e.headerRows),transport:e.transport,url:e.url.trim()}:{...o,args:y0(e.argsText),command:e.command.trim(),...e.cwd.trim()?{cwd:e.cwd.trim()}:{},env:Wc(e.envRows),stdioMessageMode:e.stdioMessageMode,transport:"stdio"}}function y4(e){return Array.isArray(e)?e.map(t=>{if(!De(t))return;let r=x4(t);return Gc(r)?void 0:jc(r,[],void 0)}).filter(t=>!!t):[]}function x4(e){let t=L4e(e.transport??e.type),r=t!=="stdio";return{apiKey:le(e.apiKey)??"",apiKeyEnv:le(e.apiKeyEnv)??"",argsText:Array.isArray(e.args)?e.args.map(o=>le(o)).filter(Boolean).join(", "):"",command:le(e.command)??"",cwd:le(e.cwd)??"",envRows:t==="stdio"?Hi(De(e.env)?wm(e.env):{}):[],headerRows:r?Hi(De(e.headers)?wm(e.headers):{}):[],name:le(e.name)??"",protocolVersion:le(e.protocolVersion)??"2024-11-05",requestTimeoutMs:String(ha(String(e.requestTimeoutMs??""))||3e4),startupTimeoutMs:String(ha(String(e.startupTimeoutMs??""))||f0),stdioMessageMode:le(e.stdioMessageMode)==="newline-json"?"newline-json":"content-length",transport:t,url:le(e.url)??""}}function b0(e){return e.transport!=="stdio"?e.url:[e.command,...e.args].join(" ")}function L4e(e){let t=le(e)?.toLowerCase().replace(/_/g,"-").replace(/\s+/g,"-");return t==="sse"?"sse":t==="http"||t==="streamable-http"||t==="streamablehttp"||t==="streamble-http"||t==="websocket"?"streamable-http":"stdio"}function Tu(e="",t=""){return{id:`key-value-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,key:e,value:t}}function Hi(e){return Object.entries(e).map(([t,r])=>Tu(t,r))}function h0(e){return e.every(t=>!t.value.trim()||!!t.key.trim())}function Eue(e){return e.every(t=>{let r=t.key.trim();return(!t.value.trim()||!!r)&&(!r||R4e(r))})}function R4e(e){return/^[A-Za-z_][A-Za-z0-9_]*$/.test(e)}function Wc(e){let t={};for(let r of e){let o=r.key.trim();o&&(t[o]=r.value)}return t}function _ue(e,t){let r=new Set(e.filter((o,n)=>n!==t).map(o=>o.name));for(let o=e.length+1;o<1e3;o+=1){let n=`mcp-${o}`;if(!r.has(n))return n}return`mcp-${Date.now()}`}function wm(e){let t={};for(let[r,o]of Object.entries(e)){let n=r.trim();n&&typeof o=="string"&&(t[n]=o)}return t}var Uue={"claude-code":TL,codex:OL,zcode:pR};function Wue(e){let t=[];e.Providers.forEach((o,n)=>{let a=o.name?.trim();if(a)for(let i of ho(o.models)){let s=o.modelDescriptions?.[i]?.trim(),l=o.modelDisplayNames?.[i]?.trim();t.push({...s?{description:s}:{},...l?{displayName:l}:{},key:`provider-model:${n}:${a}:${i}`,model:i,providerIndex:n,providerName:a})}});let r=(e.virtualModelProfiles??[]).filter(Gue).flatMap(N4e);return[...t,...Rn(r).map((o,n)=>({key:`virtual-model:${n}:${o}`,model:o}))]}function Gue(e){return e.enabled!==!1&&e.materialization?.enabled!==!1&&e.materialization?.includeInGatewayModels!==!1}function N4e(e){return que(e).map(T4e)}function jue(e){return Rn(e.filter(Gue).flatMap(que).map(zue).filter(Boolean))}function T4e(e){let t=zue(e);return t?`${RR}/${t}`:""}function zue(e){let t=e.trim(),r=`${RR}/`;return t.toLowerCase().startsWith(r.toLowerCase())?t.slice(r.length).trim():t}function que(e){let t=Rn(e.match?.exactAliases??[]);if(t.length>0)return t;let r=XM(e);return r&&r!=="-"?[r]:[e.key||e.displayName].filter(Boolean)}function Hue(e,t){return t?e.model.toLowerCase().includes(t)||(e.providerName??"").toLowerCase().includes(t)||(e.displayName??"").toLowerCase().includes(t)||(e.description??"").toLowerCase().includes(t):!0}function Rs(e){return e.flatMap(t=>!t.name||!Array.isArray(t.models)?[]:t.models.filter(Boolean).map(r=>({label:`${t.name}, ${D0(t,r)}`,value:`${t.name},${r}`})))}function Kue(e,t){let r=[{label:"Unset",value:""},...e];return t&&!r.some(o=>o.value===t)?[{label:t,value:t},...r]:r}function d4(e){return e==="condition"?"Condition":"Legacy"}function kR(e){let t=$ue(e);return t?`${t.left} ${t.operator} ${t.right}`:"condition unset"}function $ue(e,t){if(e.condition)return e.condition;if(e.type!=="condition"&&e.type==="model-prefix")return{left:"request.body.model",operator:"starts-with",right:e.pattern??""}}function MR(e){let t=Yue(e),r=t.length?t.map(O4e).join("; "):"No request rewrite";return e.fallback?`${r} \xB7 ${E4e(e.fallback)}`:r}function Yue(e){return e.rewrites?.length?e.rewrites:e.rewrite?[e.rewrite]:e.target?[{key:"request.body.model",operation:"set",value:e.target}]:[]}function O4e(e){let t=e.operation??"set";return t==="delete"?`delete ${e.key}`:t==="array-replace"?`array-replace ${e.key}: ${e.match??""} -> ${e.value??""}`:t.startsWith("array-")?`${t} ${e.key}: ${e.value??""}`:`set ${e.key} = ${e.value??""}`}function E4e(e){return e.mode==="off"?"fallback off":e.mode==="retry"?`retry ${e.retryCount}x`:e.models.length?`on failure ${e.models.join(" > ")}`:"fallback targets unset"}function Zue(e,t){return t?[e.condition,e.name,e.ruleId,e.sourceLabel,e.target,e.typeLabel].some(r=>r.toLowerCase().includes(t)):!0}function C4(e){let t=CR();return{conditionField:"",conditionLeft:"request.header.",conditionOperator:"==",conditionRight:"",conditionSource:"request.header",enabled:!0,fallback:Sl(e?.Router.fallback),name:"Condition",pattern:"",rewriteKey:t.key,rewriteValue:t.value,rewrites:[t],target:"",threshold:"200000",type:"condition"}}function Xue(e,t){let r=$ue(e,t),o=_4e(r?.left),n=Yue(e).map(F4e),a=n[0]??CR();return{conditionField:o.field,conditionLeft:r?.left??"request.header.",conditionOperator:r?.operator??"==",conditionRight:r?.right??"",conditionSource:o.source,enabled:e.enabled,fallback:Sl(e.fallback??t?.Router.fallback),name:e.name,pattern:e.pattern??"",rewriteKey:a.key,rewriteValue:a.value,rewrites:n.length?n:[a],target:e.target??"",threshold:String(e.threshold??2e5),type:"condition"}}function Jue(e,t){let r=t.trim().replace(/^\.+/,"");return r?`${e}.${r}`:`${e}.`}function _4e(e){let t=e?.trim()??"",r=a0.find(o=>t===o.value||t.startsWith(`${o.value}.`))?.value??"request.header";return{field:t.startsWith(`${r}.`)?t.slice(r.length+1):"",source:r}}function CR(){return{id:`rewrite-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,key:"request.body.model",match:"",operation:"set",value:""}}function F4e(e){return{id:`rewrite-${Date.now()}-${Math.random().toString(36).slice(2,8)}`,key:e.key,match:e.match??"",operation:e.operation??"set",value:e.value??""}}function Que(e){return e.key.trim()?e.operation==="delete"?!0:e.operation==="array-replace"?!!(e.match.trim()&&e.value.trim()):!!e.value.trim():!1}function ede(e){return{key:e.key.trim(),...e.operation!=="set"?{operation:e.operation}:{operation:"set"},...e.operation==="array-replace"?{match:e.match.trim()}:{},...e.operation!=="delete"?{value:e.value.trim()}:{}}}function tde(e){let t=e.length+1,r=`rule-${t}`;for(;e.some(o=>o.id===r);)t+=1,r=`rule-${t}`;return r}async function rde(e){if(!window.ccr||!pde(e.baseUrl))return;let t=e.apiKey?.trim();try{return await window.ccr.probeProvider({apiKey:t||void 0,baseUrl:e.baseUrl,mode:t?"models":"protocols",models:t?[]:e.models,protocols:e.protocol?[e.protocol]:_c.map(r=>r.value)})}catch{return}}function w0(e){let t=p0(e.baseUrl);if(t)return t;let r=Ale(e.name);return r?eR({baseUrl:e.baseUrl,name:e.name,presetId:r.id})?void 0:r:void 0}function S4(e){let t=w0(e);return(t?c0[t.id]??"":"")||e.icon?.trim()||""}async function ode(e){let t=window.ccr;if(!t?.getProviderCatalogModels)return{models:[]};let r=w0(e);try{let o=await t.getProviderCatalogModels({baseUrl:e.baseUrl,name:e.name,providerPresetId:r?.id});return{modelDisplayNames:rh(o.modelDisplayNames),models:ho(o.models)}}catch{return{models:[]}}}function nde(e){let t=Object.entries(e?.defaultModelDisplayNames??{}).map(([r,o])=>[r.trim(),o.trim()]).filter(([r,o])=>r&&o&&r!==o);return t.length>0?Object.fromEntries(t):void 0}function ade(e,t){let r=e.baseUrl.trim(),o=w0(e),n=o?jL(o):void 0,a=e.protocol??n?.protocols[0]??"openai_chat_completions",i=th(e.account??q4e(r)),s=ho(e.models.length>0?e.models:o?.defaultModels??[]),l=e.name?.trim()||C0(r);return{...i,apiKey:e.apiKey?.trim()||"",baseUrl:r,credentials:[],icon:e.icon?.trim()||"",modelDescriptions:I0(e.modelDescriptions,s),modelDisplayNames:AR(rh(nde(o),e.modelDisplayNames),s),modelSearch:"",modelsText:s.join(`
58
+ `),name:DR(t,l),presetId:o?.id??zi,providerPlugins:[],protocol:a,selectedModels:[],selectedProtocols:Ou(o?.endpoints.flatMap(u=>u.protocols)??[a])}}function C0(e){try{return new URL(Xa(e)).hostname.replace(/^api\./i,"")||"provider"}catch{return"provider"}}function P4(e){return{...S0(),apiKey:"",baseUrl:"",credentials:[],icon:"",modelDescriptions:void 0,modelDisplayNames:void 0,modelSearch:"",modelsText:"",name:DR(e),presetId:"",providerPlugins:[],protocol:"openai_chat_completions",selectedModels:[],selectedProtocols:[]}}function A4(e){let t=oh(e),r=p0(t),o=th(e.account),n=wR(e.type)??wR(e.provider)??"openai_chat_completions";return{...o,apiKey:J4e(e),baseUrl:t,credentials:(e.credentials??[]).map(B4e),icon:e.icon??"",modelDescriptions:I0(e.modelDescriptions,e.models),modelDisplayNames:AR(rh(nde(r),e.modelDisplayNames),e.models),modelSearch:"",modelsText:e.models.join(`
59
+ `),name:e.name,presetId:r?.id??zi,providerPlugins:[],protocol:n,selectedModels:[],selectedProtocols:K4e(e.capabilities,n)}}function ide(e=0){return{apiKey:"",enabled:!0,id:"",limitsText:"",name:`Key ${e+1}`,priority:"",weight:""}}function B4e(e,t){return{apiKey:e.api_key||e.apiKey||e.apikey||"",enabled:e.enabled!==!1,id:e.id??"",limitsText:e.limits?JSON.stringify(e.limits,null,2):"",name:e.name??e.label??`Key ${t+1}`,priority:e.priority!==void 0?String(e.priority):"",weight:e.weight!==void 0?String(e.weight):""}}function sde(e){let t=[];for(let[r,o]of e.credentials.entries()){let n=o.apiKey.trim(),a=o.name.trim()||`Key ${r+1}`;if(!!!(n||o.id.trim()||o.name.trim()||o.priority.trim()||o.weight.trim()||o.limitsText.trim()))continue;if(!n)return"Provider credential rows require API keys.";let s=o.priority.trim()?qi(o.priority):void 0;if(o.priority.trim()&&s===void 0)return"Provider credential priority must be a positive number.";let l=o.weight.trim()?qi(o.weight):void 0;if(o.weight.trim()&&l===void 0)return"Provider credential weight must be a positive number.";let u=U4e(o.limitsText);if(typeof u=="string")return u;t.push({api_key:n,enabled:o.enabled,...o.id.trim()?{id:o.id.trim()}:{},name:a,...u?{limits:u}:{},...s!==void 0?{priority:s}:{},...l!==void 0?{weight:l}:{}})}return t}function lde(e){let t;try{t=JSON.parse(e)}catch{return"Provider credential JSON is invalid."}let r=Array.isArray(t)?{credentials:t}:t;if(!De(r))return"Provider credential JSON must be an array or object.";let n=(Array.isArray(r.credentials)?r.credentials:Array.isArray(r.keys)?r.keys:Array.isArray(r.apiKeys)?r.apiKeys:[]).map((a,i)=>V4e(a,i)).filter(a=>!!a);return n.length===0?"Provider credential JSON did not contain any API keys.":{credentials:n}}function V4e(e,t){if(!De(e))return;let r=le(e.api_key)||le(e.apiKey)||le(e.apikey)||le(e.key)||le(e.token);if(!r)return;let o=le(e.name)||le(e.label)||`Key ${t+1}`;return{apiKey:r,enabled:typeof e.enabled=="boolean"?e.enabled:!0,id:le(e.id)||"",limitsText:De(e.limits)?JSON.stringify(e.limits,null,2):"",name:o,priority:Fue(e.priority),weight:Fue(e.weight)}}function U4e(e){let t=e.trim();if(t)try{let r=JSON.parse(t);return De(r)?HW(r):"Provider credential limits must be a JSON object."}catch{return"Provider credential limits JSON is invalid."}}function Fue(e){return typeof e=="number"&&Number.isFinite(e)?String(e):le(e)||""}function I4(e){let t=qi(e.accountRefreshIntervalMs);if(!e.accountEnabled)return;if(e.accountMode==="standard")return{connectors:z4e(aW.connectors??[]),enabled:!0,refreshIntervalMs:t&&t>0?t:void 0};if(e.accountMode==="http-json"||e.usageRequestUrl.trim()){let o=D4(e);return typeof o=="string"?o:{connectors:[o],enabled:!0,refreshIntervalMs:t&&t>0?t:void 0}}let r;try{r=JSON.parse(e.accountConnectorsText.trim()||"[]")}catch(o){return`Account connectors JSON is invalid: ${o instanceof Error?o.message:String(o)}`}return Array.isArray(r)?r.length===0?"Add at least one account connector or disable account balance.":{connectors:r,enabled:!0,refreshIntervalMs:t&&t>0?t:void 0}:"Account connectors must be a JSON array."}function S0(){return{accountConnectorsText:JSON.stringify(pm.connectors??[],null,2),accountEnabled:pm.enabled!==!1,accountMode:"standard",accountRefreshIntervalMs:"",usageBalanceLimitPath:"",usageBalanceRemainingPath:"",usageBalanceUnit:"USD",usageBalanceUsedPath:"",usageMessagePath:"",usageRequestBodyText:"",usageRequestHeaders:[],usageRequestMethod:"GET",usageRequestUrl:"",usageStatusPath:"",usageSubscriptionLimitPath:"",usageSubscriptionRemainingPath:"",usageSubscriptionResetPath:"",usageSubscriptionUnit:"tokens"}}function th(e){let t=S0();if(!e)return t;let r=e.connectors??[],o=r.length===1&&r[0]?.type==="http-json"?r[0]:void 0;if(!o)return{...t,accountConnectorsText:JSON.stringify(r,null,2),accountEnabled:e.enabled===!0,accountMode:r.length>0&&!j4e(r)?"raw":"standard",accountRefreshIntervalMs:e.refreshIntervalMs?String(e.refreshIntervalMs):""};if(o.parser)return{...t,accountConnectorsText:JSON.stringify(r,null,2),accountEnabled:e.enabled===!0,accountMode:"raw",accountRefreshIntervalMs:e.refreshIntervalMs?String(e.refreshIntervalMs):""};let n=o.mapping.meters.find(i=>i.kind==="balance"||i.id==="balance"),a=o.mapping.meters.find(i=>i.kind==="subscription"||i.id==="subscription"||i.kind==="quota"||i.kind==="tokens"||i.kind==="time_window");return{...t,accountConnectorsText:JSON.stringify(r,null,2),accountEnabled:e.enabled===!0,accountMode:"http-json",accountRefreshIntervalMs:e.refreshIntervalMs?String(e.refreshIntervalMs):"",usageBalanceLimitPath:le(n?.limit)||"",usageBalanceRemainingPath:le(n?.remaining)||"",usageBalanceUnit:le(n?.unit)||"USD",usageBalanceUsedPath:le(n?.used)||"",usageMessagePath:o.mapping.message??"",usageRequestBodyText:o.body===void 0?"":hR(o.body),usageRequestHeaders:Hi(o.headers??{}),usageRequestMethod:o.method==="POST"?"POST":"GET",usageRequestUrl:o.endpoint,usageStatusPath:o.mapping.status??"",usageSubscriptionLimitPath:le(a?.limit)||"",usageSubscriptionRemainingPath:le(a?.remaining)||"",usageSubscriptionResetPath:le(a?.resetAt)||"",usageSubscriptionUnit:le(a?.unit)||"tokens"}}function D4(e,t={requireMeters:!0}){let r=e.usageRequestUrl.trim();if(!r)return"Usage request URL is required.";if(!/^https?:\/\//i.test(r))return"Usage request URL must use http or https.";if(!h0(e.usageRequestHeaders))return"Header rows require keys.";let o;if(e.usageRequestBodyText.trim())try{o=JSON.parse(e.usageRequestBodyText)}catch(l){return`Usage request body JSON is invalid: ${l instanceof Error?l.message:String(l)}`}let n=[],a=e.usageBalanceLimitPath.trim(),i=e.usageBalanceRemainingPath.trim(),s=e.usageBalanceUsedPath.trim();return(a||i||s)&&n.push({id:"balance",kind:"balance",label:"Balance",limit:a||void 0,remaining:i||void 0,used:s||void 0,unit:e.usageBalanceUnit.trim()||"USD"}),(e.usageSubscriptionRemainingPath.trim()||e.usageSubscriptionLimitPath.trim())&&n.push({id:"subscription",kind:"subscription",label:"Subscription",limit:e.usageSubscriptionLimitPath.trim()||void 0,remaining:e.usageSubscriptionRemainingPath.trim()||void 0,resetAt:e.usageSubscriptionResetPath.trim()||void 0,unit:e.usageSubscriptionUnit.trim()||"tokens",window:"monthly"}),t.requireMeters!==!1&&n.length===0?"Select at least one usage response field.":{auth:"provider-api-key",...o!==void 0?{body:o}:{},endpoint:r,headers:Wc(e.usageRequestHeaders),mapping:{...e.usageMessagePath.trim()?{message:e.usageMessagePath.trim()}:{},meters:n,...e.usageStatusPath.trim()?{status:e.usageStatusPath.trim()}:{}},method:e.usageRequestMethod,type:"http-json"}}function L4(e,t){for(let r of e?.connectors??[]){let o=R4(r,t);if(o)return o}}function R4(e,t){if(e.type==="http-json"){let r=e;return(r.auth??"provider-api-key")==="none"?void 0:Bue(r.endpoint,t)}if(e.type==="standard"){let r=e;if((r.auth??"provider-api-key")==="none")return;let o=[r.endpoint,...r.endpoints??[]].filter(n=>!!n?.trim());for(let n of o){let a=Bue(n,t);if(a)return a}}}function Bue(e,t){return Ile({apiKey:t.apiKey?.trim()||"provider-api-key",endpoint:W4e(t.baseUrl,e),providerName:t.providerName,providerPresetId:Cl(t.providerPresetId)?.id??p0(t.baseUrl)?.id})}function W4e(e,t){let r=t.trim();if(/^https?:\/\//i.test(r)||!e.trim())return r;try{let o=new URL(Xa(Kb(e)));return o.pathname=r.startsWith("/")?r:G4e(o.pathname,r),o.search="",o.hash="",o.toString()}catch{return r}}function G4e(e,t){let r=e.replace(/\/+$/,""),o=t.replace(/^\/+/,"");return r?`${r}/${o}`:`/${o}`}function ude(e,t){return e==="balance"?{usageBalanceRemainingPath:t}:e==="balanceLimit"?{usageBalanceLimitPath:t}:e==="balanceUsed"?{usageBalanceUsedPath:t}:e==="message"?{usageMessagePath:t}:e==="status"?{usageStatusPath:t}:e==="subscriptionLimit"?{usageSubscriptionLimitPath:t}:e==="subscriptionRemaining"?{usageSubscriptionRemainingPath:t}:{usageSubscriptionResetPath:t}}function j4e(e){return e.length===1&&e[0]?.type==="standard"}function b4(e){return e?JSON.parse(JSON.stringify(e)):void 0}function z4e(e){return JSON.parse(JSON.stringify(e))}function dde(e){return b4(e==="kimi-coding"?Cl(e)?.account??pm:pm)}function q4e(e){return b4(p0(e)?.account??pm)}function cde(){return JSON.stringify([{type:"standard",auth:"provider-api-key"},{type:"http-json",endpoint:"https://api.vendor.com/account",auth:"provider-api-key",mapping:{meters:[{id:"balance",label:"Balance",kind:"balance",unit:"USD",remaining:"$.balance.remaining"}]}},{type:"plugin",pluginId:"vendor-plugin",connectorId:"account"},{type:"local-estimate",windows:[{id:"weekly",label:"Weekly estimate",unit:"tokens",limit:1e6,window:"weekly"}]}],null,2)}function fde(e,t,r){let o=Jle(t.trim()||"https://new-api.example/v1");o.headers={...o.headers??{},"New-Api-User":r.trim()||"<user-id>"};let n=[];try{let a=JSON.parse(e.trim()||"[]");n=Array.isArray(a)?a:[]}catch{n=[]}return JSON.stringify([...n.filter(a=>!H4e(a)),o],null,2)}function H4e(e){return De(e)&&e.type==="http-json"&&e.parser==="new-api-user-self"}function wR(e){return _c.some(t=>t.value===e)?e:void 0}function pde(e){let t=e.trim();if(!t||/\s/.test(t))return!1;try{let r=/^[a-z][a-z0-9+.-]*:\/\//i.test(t),o=new URL(r?t:Xa(t));return r||o.hostname==="localhost"||o.hostname.includes(".")||o.hostname.includes(":")}catch{return!1}}function mde(e,t=e.baseUrl){let r=t.trim();if(!r)return;let o=HM({apiKey:e.apiKey,baseUrl:r,name:e.name,presetId:e.presetId});if(o)return o;let n=I4(e);if(typeof n!="string")return L4(n,{apiKey:e.apiKey,baseUrl:r,providerName:e.name,providerPresetId:e.presetId})}function SR(e){let t=Cl(e.presetId),r=_c.map(o=>o.value);return t?t.endpoints.map(o=>({...o,protocols:r,source:"preset"})):[{baseUrl:e.baseUrl.trim(),protocols:r,source:"custom"}]}function PR(e){return pde(e.baseUrl)}function gde(e,t,r,o){for(let n of e){let a=HM({apiKey:t,baseUrl:n.baseUrl,name:r,presetId:o});if(a)return a}}function N4(e,t,r){return JSON.stringify([e.map(o=>[o.baseUrl,o.protocols]),t,r])}async function kde(e,t,r,o={}){let n=o.mode??"protocols";return await window.ccr?.probeProviderCandidates({apiKey:n==="connectivity"||n==="models"?t:void 0,candidates:e,mode:n,models:n==="connectivity"?r:[],protocols:o.protocols})}function P0(e,t){return!!e?.protocols.some(r=>r.supported&&(!t||r.protocol===t))}function Mde(e){let t=Cl(e.presetId);return t?t.endpoints.flatMap(r=>r.protocols.map(o=>({baseUrl:r.baseUrl,source:"preset",type:o}))):[]}function A0(e){return e?Ou(e.protocols.filter(t=>t.supported).map(t=>t.protocol)):[]}function K4e(e,t){let r=Ou((e??[]).map(o=>o.type));return r.length>0?r:[t]}function $4e(e,t,r,o){let n=A0(t);if(n.length===0)return[];if(Y4e(e,o))return n;let a=Ou(e).filter(i=>n.includes(i));return a.length>0?a:n}function Y4e(e,t){let r=Cl(t);if(!r)return!1;let o=Ou(e),n=Ou(r.endpoints.flatMap(a=>a.protocols));return n.length>0&&o.length===n.length&&n.every((a,i)=>o[i]===a)}function Ou(e){let t=new Set(_c.map(n=>n.value)),r=new Set,o=[];for(let n of e){if(!n||!t.has(n))continue;let a=n;r.has(a)||(r.add(a),o.push(a))}return _c.map(n=>n.value).filter(n=>r.has(n)&&o.includes(n))}function hde(...e){let t=new Set,r=[];for(let o of e)for(let n of o){let a=n.baseUrl.trim();if(!a)continue;let i=`${n.type}
60
+ ${a}`;t.has(i)||(t.add(i),r.push({...n,baseUrl:a}))}return r}function T4(e,t){let r=t.detectedProtocol??e.protocol,o=$4e(e.selectedProtocols,t,r,e.presetId),n=rh(e.modelDisplayNames,t.modelDisplayNames),a=Z4e(e,t.account);if(t.models.length===0)return{...e,...a,baseUrl:t.normalizedBaseUrl||e.baseUrl,modelDisplayNames:n,protocol:r,selectedModels:ho(e.selectedModels),selectedProtocols:o};let i=new Set(t.models),s=Ki(e.modelsText),l=e.selectedModels.filter(m=>i.has(m)),u=e.selectedModels.filter(m=>!i.has(m)),d=s.filter(m=>i.has(m)),c=s.filter(m=>!i.has(m)),f=ho(l,d),p=ho(u,c),g=f.length>0||p.length>0?f:X4e(t.models,t.detectedProtocol);return{...e,...a,baseUrl:t.normalizedBaseUrl||e.baseUrl,modelDisplayNames:n,protocol:r,modelsText:p.join(`
61
+ `),selectedModels:g,selectedProtocols:o}}function Z4e(e,t){return!t||e.accountEnabled&&e.accountMode!=="standard"?{}:th(t)}function rh(...e){let t={};for(let r of e)for(let[o,n]of Object.entries(r??{})){let a=o.trim(),i=n.trim();!a||!i||a===i||(t[a]=i)}return Object.keys(t).length>0?t:void 0}function AR(e,t){let r=new Set(t),o=Object.entries(e??{}).map(([n,a])=>[n.trim(),a.trim()]).filter(([n,a])=>n&&a&&n!==a&&r.has(n));return o.length>0?Object.fromEntries(o):void 0}function I0(e,t){let r=new Set(t),o=Object.entries(e??{}).map(([n,a])=>[n.trim(),a.trim()]).filter(([n,a])=>n&&a&&r.has(n));return o.length>0?Object.fromEntries(o):void 0}function D0(e,t){return e.modelDisplayNames?.[t]?.trim()||t}function vde(e,t){return D0(e,t)}function X4e(e,t){let r=ho(e);if(r.length===0)return[];let o=r.find(n=>Vue(n,t)===0)??r.map(n=>({model:n,rank:Vue(n,t)})).sort((n,a)=>n.rank-a.rank)[0]?.model;return o?[o]:[r[0]]}function Vue(e,t){let r=e.toLowerCase();if(t==="anthropic_messages"||r.includes("claude")){if(r.includes("sonnet"))return 0;if(r.includes("opus"))return 1;if(r.includes("haiku"))return 2}if(t==="gemini_generate_content"||t==="gemini_interactions"||r.includes("gemini")){if(r.includes("pro"))return 0;if(r.includes("flash"))return 1}return/gpt-4|gpt-5|o3|o4/.test(r)?0:/deepseek-chat|qwen|max|kimi|mistral-large|llama/.test(r)?1:5}function ho(...e){let t=new Set,r=[];for(let o of e)for(let n of o){let a=n.trim();!a||t.has(a)||(t.add(a),r.push(a))}return r}function ha(e){let t=Number(e);return Number.isFinite(t)?Math.trunc(t):0}function Ki(e){return e.split(`
62
+ `).map(t=>t.trim()).filter(Boolean)}function yde(e){return e.split(/[\n,]+/).map(t=>t.trim()).filter(Boolean)}function oh(e){return e.api_base_url||e.baseurl||e.baseUrl||""}function J4e(e){return e.api_key||e.apiKey||e.apikey||""}function IR(e,t=r=>r){let r=e.capabilities??[];return r.length===0?Eu(wR(e.type)??wR(e.provider)??"openai_chat_completions",t):r.map(o=>Eu(o.type,t)).join(", ")}function O4(e,t){return e.id||`${t}:${e.name||"provider"}`}function xde(e,t){return t?[e.name,oh(e),IR(e),...(e.capabilities??[]).map(r=>r.baseUrl),...e.models,...e.models.map(r=>D0(e,r))].filter(Boolean).some(r=>r.toLowerCase().includes(t)):!0}function bde(e){return e==="observability"||e==="api-keys"||e==="profile"||e==="networking"||e==="logs"||e==="providers"||e==="models"||e==="routing"||e==="virtual-models"||e==="extensions"}function DR(e,t="provider"){let r=t.trim();if(r&&r!=="provider"){let n=r,a=2;for(;e.some(i=>w4(i.name,n));)n=`${r} ${a}`,a+=1;return n}let o=e.length+1;for(;e.some(n=>w4(n.name,`provider-${o}`));)o+=1;return`provider-${o}`}function wde(e,t,r){return e.some((o,n)=>n!==r&&w4(o.name,t))}function w4(e,t){return e.trim().toLowerCase()===t.trim().toLowerCase()}function Q4e(e){return _c.find(t=>t.value===e)?.label??String(e)}function Eu(e,t){return t(Q4e(e))}function LR(e,t){let r=e?.trim()??"";if(!r||e5e(r))return"";let o=/^HTTP\s+(\d{3})(?::\s*(.*))?$/i.exec(r);if(!o)return t(r);let n=o[1],a=o[2]?.trim();return a?`HTTP ${n}: ${t(a)}`:`HTTP ${n}`}function e5e(e){let t=e.trim().replace(/[。.\s]+$/g,"").toLowerCase(),o=/^http\s+401\s*:\s*(.*)$/i.exec(t)?.[1]??t;return o.includes("header\u4E2D\u672A\u6536\u5230authorization\u53C2\u6570")&&o.includes("\u65E0\u6CD5\u8FDB\u884C\u8EAB\u4EFD\u9A8C\u8BC1")}function t5e(e){let t=e.Providers.find(r=>r.name===e.preferredProvider)??e.Providers[0];return t?.name&&t.models[0]?`${t.name}/${t.models[0]}`:"gpt-5-codex"}function Ade(e){let t=e?.trim();if(!t)return"";let r=t.indexOf(",");if(r>0&&r<t.length-1){let o=t.slice(0,r).trim(),n=t.slice(r+1).trim();return o&&n?`${o}/${n}`:""}return t}var RR="Fusion";function N0(e,t=[]){let r=e.filter(n=>n.name?.trim()&&Array.isArray(n.models)).map(n=>({modelDisplayNames:r5e(n.modelDisplayNames,n.models),models:Rn(n.models.filter(Boolean)),name:n.name.trim()})).filter(n=>n.models.length>0),o=jue(t);return o.length>0?[...r,{models:o,name:RR}]:r}function NR(e,t,r=[]){let o=Ade(e);if(!o)return{model:"",provider:""};let n=N0(t,r);for(let i of n){let s=`${i.name}/`,l=`${i.name},`;if(o.startsWith(s))return{model:o.slice(s.length).trim(),provider:i.name};if(o.startsWith(l))return{model:o.slice(l.length).trim(),provider:i.name}}let a=o.indexOf("/");return a>0&&a<o.length-1?{model:o.slice(a+1).trim(),provider:o.slice(0,a).trim()}:{model:o,provider:""}}function TR(e,t,r,o,n=[]){if(!e.trim())return o?.trim()||"";let a=Ade(e);if(t.provider&&t.model){let s=N0(r,n).find(l=>l.name===t.provider);return`${t.provider}/${nh(s,t.model)}`}let i=N0(r,n).find(s=>s.models.includes(a));return i?`${i.name}/${nh(i,a)}`:a}function Ide(e,t){let r=t.trim().toLowerCase();return r?e.name.toLowerCase().includes(r)||e.models.some(o=>o.toLowerCase().includes(r)||nh(e,o).toLowerCase().includes(r)):!0}function Dde(e,t,r,o){let n=r.trim().toLowerCase();return n?e.toLowerCase().includes(n)||t.toLowerCase().includes(n)||(o??"").toLowerCase().includes(n):!0}function nh(e,t){return e?.modelDisplayNames?.[t]?.trim()||t}function r5e(e,t){let r=new Set(t),o=Object.entries(e??{}).map(([n,a])=>[n.trim(),a.trim()]).filter(([n,a])=>n&&a&&n!==a&&r.has(n));return o.length>0?Object.fromEntries(o):void 0}var Lde=[{value:"weixin-ilink",label:"Weixin iLink",auth:[{value:"qr_login",label:"QR Login",fields:[]},{value:"bot_token",label:"Bot Token",fields:[{key:"botToken",label:"Bot Token",required:!0,type:"password"},{key:"accountId",label:"Account ID"},{key:"userId",label:"User ID"}]}]},{value:"wecom",label:"WeCom",auth:[{value:"app_secret",label:"App Secret",fields:[{key:"corpId",label:"Corp ID",required:!0},{key:"agentId",label:"Agent ID",required:!0},{key:"secret",label:"Secret",required:!0,type:"password"}]}]},{value:"slack",label:"Slack",auth:[{value:"bot_token",label:"Bot Token",fields:[{key:"botToken",label:"Bot Token",placeholder:"xoxb-...",required:!0,type:"password"},{key:"signingSecret",label:"Signing Secret",type:"password"},{key:"appToken",label:"App Token",placeholder:"xapp-...",type:"password"}]},{value:"oauth2",label:"OAuth 2.0",fields:[{key:"botToken",label:"OAuth Bot Token",placeholder:"xoxb-...",required:!0,type:"password"},{key:"signingSecret",label:"Signing Secret",type:"password"}]}]},{value:"discord",label:"Discord",auth:[{value:"bot_token",label:"Bot Token",fields:[{key:"botToken",label:"Bot Token",required:!0,type:"password"},{key:"applicationId",label:"Application ID"},{key:"publicKey",label:"Public Key"}]},{value:"oauth2",label:"OAuth 2.0",fields:[{key:"botToken",label:"OAuth Access Token",required:!0,type:"password"},{key:"applicationId",label:"Application ID"},{key:"publicKey",label:"Public Key"}]}]},{value:"telegram",label:"Telegram",auth:[{value:"bot_token",label:"Bot Token",fields:[{key:"botToken",label:"Bot Token",required:!0,type:"password"}]}]},{value:"line",label:"LINE",auth:[{value:"bot_token",label:"Bot Token",fields:[{key:"channelAccessToken",label:"Channel Access Token",required:!0,type:"password"},{key:"channelSecret",label:"Channel Secret",type:"password"}]}]},{value:"feishu",label:"Feishu",auth:[{value:"app_secret",label:"App Secret",fields:[{key:"appId",label:"App ID",required:!0},{key:"appSecret",label:"App Secret",required:!0,type:"password"},{key:"verificationToken",label:"Verification Token",type:"password"},{key:"domain",label:"Domain"}]}]},{value:"dingtalk",label:"DingTalk",auth:[{value:"app_secret",label:"App Secret",fields:[{key:"appKey",label:"App Key",required:!0},{key:"appSecret",label:"App Secret",required:!0,type:"password"},{key:"robotCode",label:"Robot Code"}]}]}],OR=Lde.map(({label:e,value:t})=>({label:e,value:t}));function zc(e){let t=qc(e);return t==="none"?"Bot":OR.find(r=>r.value===t)?.label??t}function ih(e){let t=qc(e);return t==="none"?[]:Lde.find(r=>r.value===t)?.auth||[]}function ER(e,t){let r=_u(e,t);return ih(e).find(o=>o.value===r)?.fields||[]}function E4(e){return ih(e)[0]?.value||""}function T0(e,t,r){let o=new Set(ER(t,r).map(a=>a.key));if(o.size===0)return{};let n={};for(let[a,i]of Object.entries(e||{})){let s=a.trim(),l=String(i??"").trim();s&&l&&o.has(s)&&!Bde(s)&&(n[s]=l)}return n}function _4(e){let t=lh(e)??je.botGateway,r=t.platform||"none",o=_u(r,t.authType??"");return{botConfigId:"",botAuthFields:T0({...t.integrationConfig??{},...t.credentials??{}},r,o),botAuthType:o,botConfigured:!!e,botEnabled:!!t.enabled,botForwardAllAgentMessages:t.forwardAllAgentMessages!==!1,botHandoffEnabled:!!t.handoff.enabled,botHandoffIdleSeconds:String(t.handoff.idleSeconds??je.botGateway.handoff.idleSeconds),botHandoffPhoneBluetoothTargets:(t.handoff.phoneBluetoothTargets??[]).join(`
63
+ `),botHandoffPhoneWifiTargets:(t.handoff.phoneWifiTargets??[]).join(`
64
+ `),botPlatform:t.platform||"none"}}function Al(e="claude-code",t){let r=e==="zcode"?"app":"cli";return{agent:e,..._4(),configFile:H4(e),envRows:e==="claude-code"?Hi(FR()):[],model:"",name:t??va(e),providerId:"claude-code-router",providerName:"Claude Code Router",scope:"ccr",settingsFile:"~/.claude/settings.json",showAllSessions:!1,smallFastModel:"",surface:r}}function F4(e,t=[]){let r=_4(e.botGateway),o=e.botConfigId||o5e(e.botGateway,t),n=o?t.find(i=>i.id===o):void 0;if(e.agent==="claude-code"){let i=Pde(e.surface);return{...Al("claude-code",e.name),...r,botConfigId:o,botEnabled:i!=="cli"&&!!(n||e.botGateway?.enabled),envRows:Hi(FR(e.env??{})),model:e.model,scope:Sde(e.scope),settingsFile:e.settingsFile??"~/.claude/settings.json",smallFastModel:e.smallFastModel??"",surface:i}}let a=e.agent==="zcode"?"app":Pde(e.surface);return{...Al(e.agent,e.name),...r,botConfigId:o,botEnabled:a!=="cli"&&!!(n||e.botGateway?.enabled),configFile:e.configFile??H4(e.agent),envRows:Hi(G4(e.env??{})),model:e.model,providerId:e.providerId??"claude-code-router",providerName:e.providerName??"Claude Code Router",scope:Sde(e.scope),showAllSessions:e.agent==="zcode"?!1:!!e.showAllSessions,surface:a}}function B4(e){if(!e.name.trim()||!Eue(e.envRows))return!1;let t=e.surface!=="cli";return t&&e.botEnabled&&!e.botConfigId.trim()||t&&e.botEnabled&&e.botHandoffEnabled&&!m5e(e.botHandoffIdleSeconds,30,86400)?!1:e.agent==="claude-code"?!0:!!e.providerId.trim()&&!!e.providerName.trim()}function o5e(e,t){if(!e?.enabled)return"";let r=e.integrationId?.trim();return t.find(n=>r&&n.botGateway.integrationId===r||n.botGateway.platform===e.platform&&n.botGateway.tenantId===e.tenantId)?.id??""}function V4(e,t,r,o=[]){let n=r?.id??h5e(t,e.name||e.agent),i=e.surface!=="cli"&&e.botEnabled?o.find(l=>l.id===e.botConfigId.trim()):void 0,s=i?{botConfigId:i.id,botGateway:{...i.botGateway,forwardAllAgentMessages:e.botForwardAllAgentMessages,handoff:n5e(e,i.botGateway.handoff)}}:{};return ah({agent:e.agent,...s,configFile:e.configFile,enabled:r?.enabled??!0,env:e.agent==="claude-code"?Wc(e.envRows):G4(Wc(e.envRows)),id:n,model:e.model,name:e.name,providerId:e.providerId,providerName:e.providerName,scope:e.scope,settingsFile:e.settingsFile,showAllSessions:e.agent==="zcode"?!1:e.showAllSessions,smallFastModel:e.smallFastModel,surface:e.surface},t.length)}function n5e(e,t=je.botGateway.handoff){return{...je.botGateway.handoff,...t,enabled:e.botHandoffEnabled,idleSeconds:R0(e.botHandoffIdleSeconds,t.idleSeconds??je.botGateway.handoff.idleSeconds,30,86400),phoneBluetoothTargets:Cde(e.botHandoffPhoneBluetoothTargets).slice(0,1),phoneWifiTargets:Cde(e.botHandoffPhoneWifiTargets).slice(0,1),screenLock:t.screenLock??je.botGateway.handoff.screenLock,userIdle:t.userIdle??je.botGateway.handoff.userIdle}}function Rde(e){let t=_4(e?.botGateway);return{botAuthFields:t.botAuthFields,botAuthType:t.botAuthType,botForwardAllAgentMessages:t.botForwardAllAgentMessages,botHandoffEnabled:t.botHandoffEnabled,botHandoffIdleSeconds:t.botHandoffIdleSeconds,botHandoffPhoneBluetoothTargets:t.botHandoffPhoneBluetoothTargets,botHandoffPhoneWifiTargets:t.botHandoffPhoneWifiTargets,botPlatform:t.botPlatform==="none"?"weixin-ilink":t.botPlatform,name:e?.name??""}}function Nde(e){if(!e.name.trim())return!1;let t=qc(e.botPlatform),r=_u(t,e.botAuthType);return!t||t==="none"?!1:i5e(e.botAuthFields,t,r).length===0}function Tde(e,t,r){let o=r?.id??f5e(t,e.name),n=e.name.trim()||zc(e.botPlatform);return Ede({botGateway:a5e({...e,botEnabled:!0},o,n,r?.botGateway),id:o,name:n,updatedAt:new Date().toISOString()})??{botGateway:je.botGateway,id:o,name:n}}function a5e(e,t,r,o){let n=qc(e.botPlatform),a=_u(n,e.botAuthType),i=s5e(n,a,e.botAuthFields);return{...je.botGateway,acknowledgeEvents:!0,args:[],authType:a,autoStartIntegration:!0,command:"",createIntegration:e.botEnabled!==!1&&n!=="none"&&a!=="qr_login",credentials:i.credentials,cwd:"",enabled:e.botEnabled!==!1,forwardAllAgentMessages:e.botForwardAllAgentMessages,handoff:{...je.botGateway.handoff},integrationConfig:i.integrationConfig,integrationId:o?.integrationId?.trim()||d5e(t),platform:n,pollIntervalMs:je.botGateway.pollIntervalMs,requestTimeoutMs:je.botGateway.requestTimeoutMs,sourceDir:"",startupTimeoutMs:je.botGateway.startupTimeoutMs,stateDir:o?.stateDir?.trim()||c5e(t),tenantId:o?.tenantId?.trim()||Ode(r||t)}}function i5e(e,t,r){return ER(t,r).filter(o=>o.required&&!e[o.key]?.trim())}function s5e(e,t,r){let o=T0(r,e,t),n={},a={};for(let[i,s]of Object.entries(o))l5e(e,i)?a[i]=u5e(i,s):n[i]=s;return{credentials:z4(n),integrationConfig:Fde(e,a)}}function l5e(e,t){return["transport","dryRun","applicationId","publicKey","appId","appKey","corpId","agentId","robotCode"].includes(t)||e==="weixin-ilink"&&["accountId","userId","botAgent","routeTag"].includes(t)||e==="feishu"&&["domain","appType","receiveIdType","tenantKey","tenantAccessToken"].includes(t)}function u5e(e,t){return e==="dryRun"?["1","true","yes","on"].includes(t.trim().toLowerCase()):t}function Ode(e){return e.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^-+|-+$/g,"")||"ccr"}function d5e(e){return p5e(e)?e:globalThis.crypto?.randomUUID?.()??`bot-${Date.now().toString(36)}-${Math.random().toString(36).slice(2,10)}`}function c5e(e){return`~/.claude-code-router/bot-gateway/${e.replace(/[^a-zA-Z0-9_.-]+/g,"-").replace(/^-+|-+$/g,"")||"default"}`}function f5e(e,t){let r=globalThis.crypto?.randomUUID?.();if(r&&!e.some(a=>a.id===r))return r;let o=Ode(t||"bot"),n=new Set(e.map(a=>a.id));if(!n.has(o))return o;for(let a=2;a<1e3;a+=1){let i=`${o}-${a}`;if(!n.has(i))return i}return`${o}-${Date.now()}`}function p5e(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(e.trim())}function _R(e){if(!Array.isArray(e))return[];let t=[];for(let r of e){let o=Ede(r,t.length);!o||t.some(n=>n.id===o.id)||t.push(o)}return t}function Ede(e,t=0){if(!De(e))return;let r=lh(e.botGateway??e.bot_gateway??e.bot??e.config);if(!r?.enabled||!r.platform||r.platform==="none")return;let o=le(e.id)||le(e.savedConfigId)||le(e.saved_config_id)||r.integrationId||`bot-${t+1}`,n=le(e.name)||zc(r.platform),a=le(e.updatedAt)||le(e.updated_at);return{botGateway:r,id:o,name:n,...a?{updatedAt:a}:{}}}function U4(e,t){let r=e.name.trim()||t(zc(e.botGateway.platform)),o=t(zc(e.botGateway.platform));return r===o?r:`${r} / ${o}`}function Cde(e){return Rn(e.split(/\r?\n/).map(t=>t.trim()).filter(Boolean))}function m5e(e,t,r){let o=Number(e.trim());return Number.isFinite(o)&&o>=t&&o<=r}function R0(e,t,r,o){let n=Number(e.trim());return Number.isFinite(n)?Math.min(o,Math.max(r,Math.round(n))):t}function W4(e){return"separate_profile_files"}function sh(e){return nW(e)}function Sde(e){let t=sh(e);return t==="custom"?"ccr":t}function Sm(e){return e==="cli"||e==="app"?e:"auto"}function Pde(e){return Sm(e)}function FR(e={}){return{...BL,...e}}function G4(e){let{[FL]:t,...r}=e;return r}function j4(e,t){return e==="claude-code"?t:t.filter(r=>r.key.trim()!==FL)}function qc(e){let t=typeof e=="string"?e.trim().toLowerCase():"";return!t||t==="off"||t==="disabled"?"none":t==="lark"?"feishu":t==="dingding"?"dingtalk":["wechat","weixin","wx","weixin-ilink","weixin_ilink","ilink"].includes(t)?"weixin-ilink":["wecom","wework","wechat-work","work-weixin","enterprise-wechat"].includes(t)?"wecom":OR.some(r=>r.value===t)?t:"none"}function _u(e,t){let r=typeof t=="string"?t.trim().toLowerCase().replace(/-/g,"_"):"";return!e||e==="none"?"":!r||r==="default"||r==="auto"||r==="webhook"||r==="webhook_secret"||r==="outgoing_webhook"?_de(e):r==="appsecret"?L0(e,"app_secret"):r==="bottoken"||r==="token"?L0(e,"bot_token"):r==="oauth"||r==="oauth_2"?L0(e,"oauth2"):["qr","qr_login","qrcode","qr_code"].includes(r)?L0(e,"qr_login"):L0(e,r)}function _de(e){return E4(e)}function L0(e,t){return ih(e).some(r=>r.value===t)?t:_de(e)}function Fde(e,t){let r=z4(t);delete r.transport,delete r.sendMode;let o=g5e(e);return o?{...r,transport:o}:r}function g5e(e){return!e||e==="none"?"":e==="slack"?"socket":"websocket"}function z4(e){let t={};if(!De(e))return t;for(let[r,o]of Object.entries(e))!r.trim()||Bde(r)||(t[r]=o);return t}function Bde(e){let t=e.trim().toLowerCase().replace(/[_-]+/g,"");return t.includes("webhook")||t==="sendmode"}function lh(e){if(!De(e))return;let t=e,r=De(t.handoff)?t.handoff:{},o=qc(t.platform),n=k5e(t.conversationRef??t.conversation_ref??t.conversation),a={...je.botGateway,...t,acknowledgeEvents:typeof t.acknowledgeEvents=="boolean"?t.acknowledgeEvents:je.botGateway.acknowledgeEvents,args:Array.isArray(t.args)?t.args.filter(i=>typeof i=="string"):je.botGateway.args,authType:_u(o,typeof t.authType=="string"?t.authType:je.botGateway.authType),autoStartIntegration:typeof t.autoStartIntegration=="boolean"?t.autoStartIntegration:je.botGateway.autoStartIntegration,command:typeof t.command=="string"?t.command:je.botGateway.command,createIntegration:typeof t.createIntegration=="boolean"?t.createIntegration:je.botGateway.createIntegration,credentials:z4(De(t.credentials)?t.credentials:{}),cwd:typeof t.cwd=="string"?t.cwd:je.botGateway.cwd,enabled:typeof t.enabled=="boolean"?t.enabled:je.botGateway.enabled,forwardAllAgentMessages:typeof t.forwardAllAgentMessages=="boolean"?t.forwardAllAgentMessages:je.botGateway.forwardAllAgentMessages,handoff:{...je.botGateway.handoff,...r,enabled:typeof r.enabled=="boolean"?r.enabled:je.botGateway.handoff.enabled,idleSeconds:Number.isFinite(Number(r.idleSeconds))?R0(String(r.idleSeconds),je.botGateway.handoff.idleSeconds,30,86400):je.botGateway.handoff.idleSeconds,phoneBluetoothTargets:Array.isArray(r.phoneBluetoothTargets)?r.phoneBluetoothTargets.filter(i=>typeof i=="string").slice(0,1):je.botGateway.handoff.phoneBluetoothTargets,phoneWifiTargets:Array.isArray(r.phoneWifiTargets)?r.phoneWifiTargets.filter(i=>typeof i=="string").slice(0,1):je.botGateway.handoff.phoneWifiTargets,screenLock:typeof r.screenLock=="boolean"?r.screenLock:je.botGateway.handoff.screenLock,userIdle:typeof r.userIdle=="boolean"?r.userIdle:je.botGateway.handoff.userIdle},integrationConfig:Fde(o,De(t.integrationConfig)?t.integrationConfig:{}),integrationId:typeof t.integrationId=="string"?t.integrationId:je.botGateway.integrationId,platform:o,pollIntervalMs:Number.isFinite(Number(t.pollIntervalMs))?R0(String(t.pollIntervalMs),je.botGateway.pollIntervalMs,500,6e4):je.botGateway.pollIntervalMs,requestTimeoutMs:Number.isFinite(Number(t.requestTimeoutMs))?R0(String(t.requestTimeoutMs),je.botGateway.requestTimeoutMs,1e3,36e5):je.botGateway.requestTimeoutMs,sourceDir:typeof t.sourceDir=="string"?t.sourceDir:je.botGateway.sourceDir,startupTimeoutMs:Number.isFinite(Number(t.startupTimeoutMs))?R0(String(t.startupTimeoutMs),je.botGateway.startupTimeoutMs,1e3,12e4):je.botGateway.startupTimeoutMs,stateDir:typeof t.stateDir=="string"?t.stateDir:je.botGateway.stateDir,tenantId:typeof t.tenantId=="string"?t.tenantId:je.botGateway.tenantId};return n?a.conversationRef=n:delete a.conversationRef,a}function k5e(e){if(!De(e))return;let t=typeof e.gatewayConversationId=="string"?e.gatewayConversationId:typeof e.gateway_conversation_id=="string"?e.gateway_conversation_id:"",r=typeof e.platformConversationId=="string"?e.platformConversationId:typeof e.platform_conversation_id=="string"?e.platform_conversation_id:typeof e.conversationId=="string"?e.conversationId:typeof e.chatId=="string"?e.chatId:typeof e.channelId=="string"?e.channelId:"";if(!t.trim()&&!r.trim())return;let o=e.type==="group"||e.type==="channel"||e.type==="thread"?e.type:"dm",n=typeof e.threadId=="string"?e.threadId:typeof e.thread_id=="string"?e.thread_id:"";return{...t.trim()?{gatewayConversationId:t.trim()}:{},...r.trim()?{platformConversationId:r.trim()}:{},...n.trim()?{threadId:n.trim()}:{},type:o}}function Vde(e,t,r){let o=qde(e.agent,e.surface),n=Object.keys(e.env??{}).length,a=n>0?[{label:r("Environment variables"),value:String(n)}]:[],i=e.botConfigId?t.botConfigs.find(c=>c.id===e.botConfigId):void 0,s=i?.botGateway??e.botGateway??t.botGateway,l=o!=="cli"&&s?.enabled&&s.platform!=="none"?[{label:r("Bot"),value:`${r("Enabled")} (${i?U4(i,r):r(zc(s.platform))})`}]:o!=="cli"&&e.botGateway?[{label:r("Bot"),value:r("Disabled")}]:[],u=e.smallFastModel?.trim()||"",d=e.model.trim()?TR(e.model,NR(e.model,t.Providers,t.virtualModelProfiles??[]),t.Providers,void 0,t.virtualModelProfiles??[]):e.agent==="claude-code"?r("Keep Claude Code default"):t5e(t);return e.agent==="claude-code"?[{label:r("Model"),value:d},{label:r("Small fast model"),value:u?TR(u,NR(u,t.Providers,t.virtualModelProfiles??[]),t.Providers,void 0,t.virtualModelProfiles??[]):r("Keep Claude Code default")},...l,...a]:[{label:r("Model"),value:d},{label:r("Provider ID"),value:e.providerId??"claude-code-router"},...e.agent==="zcode"?[]:[{label:r("Show all sessions"),value:e.showAllSessions?r("Enabled"):r("Disabled")}],...l,...a]}function ah(e,t){let r=x5e(e.agent),o=e.name.trim()||va(e.agent),n=e.model.trim(),a=sh(e.scope),i=qde(r,e.surface),s=De(e.env)?wm(e.env):{},l=i!=="cli"?lh(e.botGateway):void 0,u=i!=="cli"?le(e.botConfigId):"";return r==="claude-code"?{agent:"claude-code",...u?{botConfigId:u}:{},...l?{botGateway:l}:{},enabled:e.enabled,env:FR(s),id:e.id||`profile-${t+1}`,model:n,name:o,scope:a,settingsFile:e.settingsFile?.trim()||"~/.claude/settings.json",smallFastModel:e.smallFastModel?.trim()||"",surface:i}:{agent:y5e(r),...u?{botConfigId:u}:{},...l?{botGateway:l}:{},cliMiddleware:!0,codexCliPath:"",codexHome:"",configFormat:"separate_profile_files",configFile:b5e(r,e.configFile),enabled:e.enabled,env:G4(s),id:e.id||`profile-${t+1}`,model:n,name:o,providerId:e.providerId?.trim()||"claude-code-router",providerName:e.providerName?.trim()||"Claude Code Router",scope:a,showAllSessions:r==="zcode"?!1:!!e.showAllSessions,surface:i}}function Ude(e){return Array.isArray(e)?fm(e.map((t,r)=>De(t)?M5e(t,r):void 0).filter(t=>!!t)):je.profile.profiles}function Wde(e){return[ah({agent:"claude-code",enabled:e.claudeCode.enabled,env:FR(),id:"default-claude-code",model:e.claudeCode.model,name:"Claude Code",scope:"global",settingsFile:e.claudeCode.settingsFile,smallFastModel:e.claudeCode.smallFastModel,surface:"auto"},0),ah({agent:"codex",cliMiddleware:e.codex.cliMiddleware,codexCliPath:e.codex.codexCliPath,codexHome:e.codex.codexHome,configFormat:e.codex.configFormat,configFile:e.codex.configFile,enabled:e.codex.enabled,env:{},id:"default-codex",model:e.codex.model,name:"Codex",providerId:e.codex.providerId,providerName:e.codex.providerName,scope:"global",showAllSessions:e.codex.showAllSessions,surface:"auto"},1)]}function M5e(e,t){let r=typeof e.agent=="string"?e.agent.trim().toLowerCase():"",o=r==="claude"||r==="claude-code"||r==="claude code"?"claude-code":r==="codex"?"codex":r==="zcode"||r==="z-code"||r==="z code"?"zcode":void 0;if(o)return ah({agent:o,botConfigId:typeof e.botConfigId=="string"?e.botConfigId:typeof e.bot_config_id=="string"?e.bot_config_id:void 0,botGateway:lh(e.botGateway??e.bot_gateway??e.bot),cliMiddleware:typeof e.cliMiddleware=="boolean"?e.cliMiddleware:void 0,codexCliPath:typeof e.codexCliPath=="string"?e.codexCliPath:void 0,codexHome:typeof e.codexHome=="string"?e.codexHome:void 0,configFormat:typeof e.configFormat=="string"?W4(e.configFormat):void 0,configFile:typeof e.configFile=="string"?e.configFile:void 0,enabled:typeof e.enabled=="boolean"?e.enabled:!0,env:De(e.env)?wm(e.env):{},id:typeof e.id=="string"&&e.id.trim()?e.id.trim():`profile-${t+1}`,model:typeof e.model=="string"?e.model:"",name:typeof e.name=="string"?e.name:va(o),providerId:typeof e.providerId=="string"?e.providerId:void 0,providerName:typeof e.providerName=="string"?e.providerName:void 0,scope:typeof e.scope=="string"?sh(e.scope):"global",settingsFile:typeof e.settingsFile=="string"?e.settingsFile:void 0,showAllSessions:typeof e.showAllSessions=="boolean"?e.showAllSessions:typeof e.show_all_sessions=="boolean"?e.show_all_sessions:void 0,smallFastModel:typeof e.smallFastModel=="string"?e.smallFastModel:void 0,surface:typeof e.surface=="string"?Sm(e.surface):"auto"},t)}function h5e(e,t){let r=t.toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^-+|-+$/g,"")||"profile",o=new Set(e.map(n=>n.id));if(!o.has(r))return r;for(let n=2;n<1e3;n+=1){let a=`${r}-${n}`;if(!o.has(a))return a}return`${r}-${Date.now()}`}function va(e){return e==="claude-code"?"Claude Code":e==="zcode"?"ZCode":"Codex"}function Gde(e){return e==="global"?"System default":e==="custom"?"Custom config path":"Only opened from CCR"}function jde(e){return e==="cli"?"CLI only":e==="app"?"App only":"CLI & APP"}function Hc(e){if(e.agent==="zcode")return["app"];let t=Sm(e.surface);return t==="cli"?["cli"]:t==="app"?["app"]:["cli","app"]}function q4(e,t=e.agent==="zcode"?"app":"cli"){let r=e.name.trim()||e.id;return["ccr",v5e(r),...t==="app"?["app"]:[]].join(" ")}function v5e(e){return/^[A-Za-z0-9_./:-]+$/.test(e)?e:`'${e.replace(/'/g,"'\\''")}'`}function zde(e){return e==="claude-code"?TL:e==="zcode"?pR:OL}function y5e(e){return e==="zcode"?"zcode":"codex"}function x5e(e){return e==="zcode"?"zcode":e==="codex"?"codex":"claude-code"}function qde(e,t){return e==="zcode"?"app":Sm(t)}function H4(e){return e==="zcode"?"~/.zcode/cli/config.json":"~/.codex/config.toml"}function b5e(e,t){let r=t?.trim();return!r||e==="zcode"&&r==="~/.zcode/config.toml"?H4(e):r}var dt=z(ze());function xe({children:e,className:t,label:r}){return(0,dt.jsxs)(pa,{className:J("block min-w-0 space-y-1",t),children:[(0,dt.jsx)("span",{className:"block truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:r}),e]})}function O0({agent:e,className:t}){let r=va(e);return(0,dt.jsx)("span",{className:J("flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-[5px]",t),title:r,children:(0,dt.jsx)("img",{alt:`${r} icon`,className:"h-full w-full rounded-[inherit] object-cover",src:zde(e)})})}function St({className:e,onChange:t,options:r,value:o}){return(0,dt.jsx)(Jo,{className:e,onValueChange:t,options:r,value:o})}function Pm({modelOptions:e,onChange:t,value:r}){let o=ve();if(e.length===0)return(0,dt.jsx)(Te,{onChange:a=>t(a.target.value),value:r});let n=Kue(e,r);return(0,dt.jsx)(St,{onChange:t,options:Ht(n,o),value:r})}function K4({className:e,minHeight:t,onChange:r,value:o}){let n=`min(${t}px, max(132px, calc(100dvh - 220px)))`;return(0,dt.jsx)(ji,{className:J("min-h-0",e),onChange:a=>r(a.target.value),spellCheck:!1,style:{minHeight:n},value:o})}function $i({addLabel:e,onChange:t,rows:r}){let o=ve(),n=r.length>0?r:[Tu()];function a(l,u){let d=[...n];d[l]={...d[l],...u},t(d)}function i(){t([...n,Tu()])}function s(l){t(n.filter((u,d)=>d!==l))}return(0,dt.jsx)("div",{className:"space-y-2",children:n.map((l,u)=>(0,dt.jsxs)("div",{className:"grid grid-cols-[minmax(0,1fr)_minmax(0,1fr)_28px_28px] gap-2",children:[(0,dt.jsx)(Te,{"aria-label":o("Key"),onChange:d=>a(u,{key:d.target.value}),placeholder:o("Key"),value:l.key}),(0,dt.jsx)(Te,{"aria-label":o("Value"),onChange:d=>a(u,{value:d.target.value}),placeholder:o("Value"),value:l.value}),(0,dt.jsx)(ne,{"aria-label":e,onClick:i,size:"iconSm",title:e,type:"button",variant:"outline",children:(0,dt.jsx)(It,{className:"h-3.5 w-3.5"})}),(0,dt.jsx)(ne,{"aria-label":o("Remove"),disabled:n.length===1&&!l.key.trim()&&!l.value.trim(),onClick:()=>s(u),size:"iconSm",title:o("Remove"),type:"button",variant:"ghost",children:(0,dt.jsx)(ft,{className:"h-3.5 w-3.5"})})]},l.id))})}function Co({checked:e,disabled:t=!1,onChange:r,title:o}){return(0,dt.jsx)(Du,{checked:e,disabled:t,onCheckedChange:r,title:o})}function $de({label:e,tone:t,value:r}){return(0,dt.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col overflow-hidden",children:[(0,dt.jsx)("div",{className:J("h-1",fR(t))}),(0,dt.jsx)(nr,{className:"flex min-h-[88px] flex-1 flex-col justify-center",children:(0,dt.jsxs)("div",{className:"min-w-0",children:[(0,dt.jsx)("div",{className:"truncate text-[11px] font-medium text-muted-foreground",children:e}),(0,dt.jsx)("div",{className:"mt-1 truncate text-[20px] font-semibold",children:r})]})})]})}function $4(e){return e.requestCount<=0?"idle":e.successRate>=.995?"ok":e.successRate>=.98?"warn":"error"}function Yde(e,t){if(e.length===0)return t;let r=e[0]?.dateLabel??"",o=e.at(-1)?.dateLabel??r;return r===o?r:`${r} - ${o}`}function Zde(e,t){let r=w5e(e);if(!r)return e;let o=t==="today"||t==="24h"?{day:"2-digit",hour:"2-digit",hour12:!1,month:"2-digit"}:{day:"2-digit",month:"2-digit"};return new Intl.DateTimeFormat(void 0,o).format(r)}function w5e(e){let t=e.match(/^(\d{4})-(\d{1,2})-(\d{1,2})(?:\s+(\d{1,2})(?::00)?)?$/);if(!t)return;let[,r,o,n,a]=t;return new Date(Number(r),Number(o)-1,Number(n),a===void 0?0:Number(a),0,0,0)}function Xde(e,t){return[e.dateLabel,`${t("Requests")}: ${We(e.point.requestCount)}`,`${t("Success rate")}: ${pn(e.point.successRate)}`,`${t("Failed requests")}: ${We(e.point.errorCount)}`,`${t("Duration")}: ${en(e.point.avgDurationMs)}`].join(`
65
+ `)}function Jde(e,t){return e<=1?"left-0":e>=t-2?"right-0":"left-1/2 -translate-x-1/2"}function Y4(e){return e==="ok"?"bg-emerald-500 text-white":e==="warn"?"bg-amber-400 text-amber-950":e==="error"?"bg-rose-500 text-white":"bg-muted text-muted-foreground"}function Qde(e){return e==="ok"?"bg-emerald-500":e==="warn"?"bg-amber-400":e==="error"?"bg-rose-500":"bg-muted-foreground/25"}function ece({busy:e,onClick:t,state:r}){let o=ve(),n=r==="running"||r==="starting",a=o(n?"Pause service":"Start service"),i=n?zd:ks;return(0,dt.jsx)(ne,{"aria-label":a,className:J("app-no-drag app-service-control inline-flex h-8 w-8 items-center justify-center rounded-md border border-transparent bg-transparent p-0 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/25",n&&"text-emerald-700 hover:text-emerald-800"),disabled:e,onMouseDown:s=>s.stopPropagation(),onClick:t,title:a,type:"button",unstyled:!0,children:e?(0,dt.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,dt.jsx)(i,{className:"h-3.5 w-3.5"})})}function tce({config:e,endpoint:t,gatewayStatus:r}){let o=ve(),[n,a]=(0,Fu.useState)(!1),[i,s]=(0,Fu.useState)(""),l=(0,Fu.useRef)(),u=(0,Fu.useRef)(null),d=r.state==="running",c=o(d?"running":"not running"),f=t.trim()||o("Not configured"),p=C5e(f,e),g=Kde(p),m=d?r.networkEndpoints??[]:[];async function h(k,M){await P5e(k),s(M),l.current&&window.clearTimeout(l.current),l.current=window.setTimeout(()=>s(""),1300)}return(0,Fu.useEffect)(()=>{if(!n)return;function k(v){u.current?.contains(v.target)||a(!1)}function M(v){v.key==="Escape"&&a(!1)}return document.addEventListener("mousedown",k),document.addEventListener("keydown",M),()=>{document.removeEventListener("mousedown",k),document.removeEventListener("keydown",M)}},[n]),(0,Fu.useEffect)(()=>()=>{l.current&&window.clearTimeout(l.current)},[]),(0,dt.jsxs)("div",{className:"app-no-drag fixed left-1/2 top-2 z-50 w-[min(560px,56vw,calc(100%_-_48px))] min-w-[220px] -translate-x-1/2 max-[720px]:static max-[720px]:w-full max-[720px]:min-w-0 max-[720px]:translate-x-0",ref:u,title:`${o("Endpoint")} ${f} - ${c}`,children:[(0,dt.jsxs)(ne,{"aria-controls":"endpoint-info-panel","aria-expanded":n,"aria-haspopup":"dialog",className:J("flex h-8 w-full min-w-0 items-center gap-2 rounded-md border border-input bg-card px-3 text-left shadow-sm outline-none transition-colors hover:bg-muted/40 focus-visible:ring-2 focus-visible:ring-ring/25",n&&"border-ring/35 bg-muted/40"),onClick:()=>a(k=>!k),type:"button",unstyled:!0,children:[(0,dt.jsx)("span",{"aria-hidden":"true",className:J("h-2.5 w-2.5 shrink-0 rounded-full",d?"bg-emerald-500 shadow-[0_0_0_3px_rgba(16,185,129,0.16)]":"bg-muted-foreground/45")}),(0,dt.jsx)("span",{className:"shrink-0 text-[11px] font-medium text-muted-foreground",children:o("Endpoint")}),(0,dt.jsx)("span",{className:"h-3 w-px shrink-0 bg-border"}),(0,dt.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] text-foreground",children:f}),(0,dt.jsxs)("span",{className:"sr-only",children:[o("Service status"),": ",c]})]}),(0,dt.jsx)(wt,{initial:!1,children:n?(0,dt.jsx)(Nu,{className:"absolute left-1/2 top-full z-50 mt-2 w-[340px] max-w-[calc(100vw-24px)] -translate-x-1/2",children:(0,dt.jsx)(Is,{"aria-label":o("Endpoint information"),className:"p-3",id:"endpoint-info-panel",role:"dialog",children:(0,dt.jsxs)("div",{className:"space-y-1.5",children:[(0,dt.jsx)(Hde,{copied:i===`loopback:${g}`,label:"Loopback",value:g,onCopy:k=>{h(k,`loopback:${g}`)}}),m.map((k,M)=>{let v=Kde(k.endpoint);return(0,dt.jsx)(Hde,{copied:i===`network:${k.interfaceName}:${k.address}`,label:M===0?"Network":"",meta:k.interfaceName,value:v,onCopy:b=>{h(b,`network:${k.interfaceName}:${k.address}`)}},`${k.interfaceName}-${k.address}`)})]})})}):null})]})}function Hde({copied:e,label:t,meta:r,value:o,onCopy:n}){let a=ve();return(0,dt.jsxs)("div",{className:"grid grid-cols-[76px_minmax(0,1fr)_24px] items-center gap-2 text-[12px]",children:[(0,dt.jsx)("span",{className:"text-right text-muted-foreground",children:t?`${t}:`:null}),(0,dt.jsxs)("span",{className:"min-w-0 truncate font-medium text-foreground",children:[o,r?(0,dt.jsxs)("span",{className:"ml-1 text-[11px] font-normal text-muted-foreground",children:["(",r,")"]}):null]}),(0,dt.jsx)(ne,{"aria-label":a(e?"Copied":"Copy"),className:J("flex h-6 w-6 shrink-0 items-center justify-center rounded-md border outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/25",e?"border-emerald-500/25 bg-emerald-500/10 text-emerald-600":"border-transparent bg-transparent text-muted-foreground hover:bg-muted hover:text-foreground"),title:a(e?"Copied":"Copy"),type:"button",unstyled:!0,onMouseDown:i=>i.stopPropagation(),onClick:i=>{i.stopPropagation(),n(o)},children:(0,dt.jsx)(br,{iconKey:e?"copied":"copy",children:e?(0,dt.jsx)(yt,{className:"h-3.5 w-3.5"}):(0,dt.jsx)(Ta,{className:"h-3.5 w-3.5"})})})]})}function C5e(e,t){try{return`http://127.0.0.1:${new URL(e).port||t.gateway.port}`}catch{return`http://127.0.0.1:${t.gateway.port}`}}function Kde(e){try{let t=new URL(e);return t.pathname=S5e(t.pathname),t.search="",t.hash="",t.toString().replace(/\/$/,"")}catch{return`${e.replace(/\/+$/,"")}/v1`}}function S5e(e){let t=e.replace(/\/+$/,"");return!t||t==="/"?"/v1":t.endsWith("/v1")?t:`${t}/v1`}async function P5e(e){if(navigator.clipboard?.writeText)try{await navigator.clipboard.writeText(e);return}catch{}let t=document.createElement("textarea");t.value=e,t.setAttribute("readonly","true"),t.style.left="-9999px",t.style.position="fixed",document.body.appendChild(t),t.select(),document.execCommand("copy"),t.remove()}function E0(e,t){return rce(t.status)-rce(e.status)||e.provider.localeCompare(t.provider)||uh(e).localeCompare(uh(t))}function Bu(e){return e.credentialId?`${e.provider}::${e.credentialId}`:e.provider}function $c(e){let t=uh(e);return t?`${e.provider} / ${t}`:e.provider}function uh(e){return e.credentialLabel?.trim()||e.credentialId?.trim()||""}function rce(e){return e==="error"?4:e==="critical"?3:e==="warning"?2:e==="ok"?1:0}function dh(e){return[...e.meters].sort((t,r)=>{let o=Kc(t)??1,n=Kc(r)??1;return o-n})[0]}function nce(e,t){let r=e.meters.slice(0,t),o=e.meters.find(UR);return!o||r.includes(o)||r.length<t?r:[...r.slice(0,Math.max(0,t-1)),o]}function Kc(e){if(!(!e.limit||e.limit<=0||e.remaining===void 0))return Math.max(0,Math.min(1,e.remaining/e.limit))}function Z4(e){let t=Kc(e);return t===void 0?void 0:Math.max(3,Math.round(t*100))}function ace(e,t=Date.now()){let r=oce(e.effectiveAt),o=oce(e.expiresAt);if(r===void 0||o===void 0||o<=r)return;if(t<=r)return 100;if(t>=o)return 0;let n=(o-t)/(o-r);return Math.max(3,Math.round(Math.max(0,Math.min(1,n))*100))}function BR(e){if(!e)return"-";let t=new Date(e);if(Number.isNaN(t.getTime()))return e;let r=String(t.getMonth()+1).padStart(2,"0"),o=String(t.getDate()).padStart(2,"0"),n=String(t.getHours()).padStart(2,"0"),a=String(t.getMinutes()).padStart(2,"0");return`${r}-${o} ${n}:${a}`}function oce(e){if(!e)return;let t=new Date(e).getTime();return Number.isFinite(t)?t:void 0}function VR(e){return e==="critical"||e==="error"?"bg-red-500":e==="warning"?"bg-amber-500":"bg-emerald-500"}function Nn(e){let t=e.remaining??e.used??e.limit;if(t===void 0)return"-";let r=e.unit.trim(),o=r.toUpperCase();return o==="USD"?`$${Am(t)}`:o==="CNY"?`\xA5${Am(t)}`:o==="EUR"?`\u20AC${Am(t)}`:r==="%"?`${Am(t)}%`:r==="hours"?`${Am(t)}h`:r==="minutes"?`${Am(t)}m`:e.kind==="balance"?`${Am(t)} ${r}`:`${We(t)} ${r}`}function Am(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:6}).format(e)}function A5e(e,t=r=>r){let r=new Date(e).getTime();if(!Number.isFinite(r))return e;let o=Math.round((r-Date.now())/6e4);if(o<=0)return t("expired");let n=t("expires in");if(o<60)return`${n} ${o}m`;let a=Math.round(o/60);return a<48?`${n} ${a}h`:`${n} ${Math.round(a/24)}d`}function Im(e,t){let r=t(e.label);return e.resetAt?`${r} (${A5e(e.resetAt,t)})`:r}function UR(e){let t=`${e.id} ${e.label} ${e.window??""}`.toLowerCase();return t.includes("manual_reset")||t.includes("manual reset")||t.includes("manual-reset")}function Yc(e){let t=new Date(e);if(!Number.isFinite(t.getTime()))return"";let r=-t.getTimezoneOffset(),o=r/60,n=Number.isInteger(o)?`GMT${o>=0?"+":""}${o}`:`GMT${o>=0?"+":""}${(r/60).toFixed(1)}`,a=t.getFullYear(),i=String(t.getMonth()+1).padStart(2,"0"),s=String(t.getDate()).padStart(2,"0"),l=String(t.getHours()).padStart(2,"0"),u=String(t.getMinutes()).padStart(2,"0"),d=String(t.getSeconds()).padStart(2,"0");return`${a}-${i}-${s} ${l}:${u}:${d} ${n}`}function uce(e,t,r){if(e.totalTokens===0&&e.inputTokens===0&&e.outputTokens===0&&e.reasoningTokens===0&&e.cacheReadTokens===0&&e.cacheWriteTokens===0)return"-";let o=[`${We(e.inputTokens,r)} ${t("\u5165")}`,`${We(e.outputTokens,r)} ${t("\u51FA")}`];return e.cacheReadTokens>0&&o.push(`${We(e.cacheReadTokens,r)} ${t("Cache")}`),e.cacheWriteTokens>0&&o.push(`${We(e.cacheWriteTokens,r)} ${t("Cache write")}`),e.reasoningTokens>0&&o.push(`${We(e.reasoningTokens,r)} ${t("Thinking")}`),o.join(" ")}function dce(e){return fce(e.requestBody)||e.model||"unknown"}function cce(e){return fce(e.responseBody)||e.model||"unknown"}function fce(e){if(!e||e.encoding==="base64"||!e.text.trim())return;let t=ice(GR(e.text));if(t)return t;for(let r of gce(e.text)){let o=ice(r);if(o)return o}}function ice(e){if(!De(e))return;let t=De(e.response)?e.response:e;return le(t.model)||le(e.model)||le(t.modelVersion)||le(e.modelVersion)}function pce(e){if(!e||!e.text&&e.sizeBytes===0)return{text:"No body"};if(e.encoding==="base64")return{text:e.text||"No body"};let t=e.text||"",r=GR(t);if(r!==void 0){let n=D5e(r);return{json:n,text:JSON.stringify(n,null,2)}}let o=gce(t);if(o.length>0){let n=I5e(o);return{json:n,text:JSON.stringify(n,null,2)}}return{text:t||"No body"}}function mce(e,t){let r=t.trim().toLowerCase();if(!r)return e;let n=e.split(/\r?\n/).filter(a=>a.toLowerCase().includes(r));return n.length>0?n.join(`
66
+ `):"No matching lines"}function GR(e){try{return JSON.parse(e)}catch{return}}function gce(e){let t=[];for(let r of e.split(/\r?\n/)){let o=r.trim(),n=o.startsWith("data:")?o.slice(5).trim():o.startsWith("{")||o.startsWith("[")?o:"";if(!n||n==="[DONE]")continue;let a=GR(n);a!==void 0&&t.push(a)}return t}function I5e(e){let t=WR(e);return{...X4(t)??{},streamed_data:e}}function D5e(e){if(Array.isArray(e)){let n=X4(WR(e));return n?{...n,streamed_data:e}:e}if(!De(e)||!Array.isArray(e.streamed_data))return e;let t=X4(WR(e.streamed_data));if(!t)return e;let{streamed_data:r,...o}=e;return{...t,...o,streamed_data:r}}function WR(e){let t=[];for(let r of e)Array.isArray(r)?t.push(...WR(r)):t.push(r);return t}function X4(e){return R5e(e)??j5e(e)??$5e(e)??X5e(e)}var L5e=new Set(["content","output_text","reasoning","reasoning_content","reasoning_text","refusal","text","thinking"]);function R5e(e){let t=new Map,r,o,n,a,i=!1,s,l,u;for(let f of e)De(f)&&(o??=le(f.id),n??=le(f.model),a??=le(f.object),s??=le(f.service_tier),l??=le(f.system_fingerprint),r===void 0&&typeof f.created=="number"&&Number.isFinite(f.created)&&(r=f.created),De(f.usage)&&(u=f.usage),Array.isArray(f.choices)&&(i=!0,f.choices.forEach((p,g)=>N5e(p,t,g))));if(!i)return;let d={};o&&(d.id=o);let c=G5e(a);return c&&(d.object=c),r!==void 0&&(d.created=r),n&&(d.model=n),l&&(d.system_fingerprint=l),s&&(d.service_tier=s),d.choices=Array.from(t.values()).sort((f,p)=>f.order-p.order).map(B5e),u!==void 0&&(d.usage=u),d}function N5e(e,t,r){if(!De(e))return;let o=aGe(e.index)??`position:${r}`,n=T5e(t,o,e.index??r);e.finish_reason!==void 0&&e.finish_reason!==null&&(n.finishReason=e.finish_reason),e.logprobs!==void 0&&e.logprobs!==null&&(n.logprobs=e.logprobs),typeof e.text=="string"&&kce(n,"text",e.text),sce(e.delta,n),sce(e.message,n)}function sce(e,t){if(!De(e))return;let r=le(e.role);r&&(t.role=r);for(let[o,n]of Object.entries(e))if(!(o==="role"||o==="tool_calls"||o==="function_call")){if(typeof n=="string"&&L5e.has(o)){kce(t,o,n);continue}n!=null&&t.deltaValues.set(o,n)}E5e(e.tool_calls,t),O5e(e.function_call,t)}function T5e(e,t,r){let o=e.get(t);if(o)return o;let n={deltaTextParts:new Map,deltaValues:new Map,functionArgumentsParts:[],index:Zc(r)??t,order:e.size,toolCallIndexKeys:new Map,toolCallOrder:[],toolCalls:new Map};return e.set(t,n),n}function kce(e,t,r){let o=e.deltaTextParts.get(t)??[];o.push(r),e.deltaTextParts.set(t,o)}function O5e(e,t){if(!De(e))return;let r=le(e.name);r&&(t.functionName=r);let o=e.arguments??e.parameters??e.input;typeof o=="string"?t.functionArgumentsParts.push(o):o!=null&&(t.functionArgumentsValue=o)}function E5e(e,t){Array.isArray(e)&&e.forEach((r,o)=>{if(!De(r))return;let n=Zc(r.index),a=n===void 0?void 0:`index:${n}`,i=le(r.id)||le(r.call_id)||le(r.tool_call_id),s=a?t.toolCallIndexKeys.get(a):void 0,l=i||s||a||`position:${o}`;i&&a?l=_5e(t,a,i):a&&!s&&t.toolCallIndexKeys.set(a,l);let u=F5e(t,l);i&&(u.id=i),n!==void 0&&(u.index=n);let d=le(r.type);d&&(u.type=d);let c=De(r.function)?r.function:void 0,f=le(c?.name)||le(r.name);f&&(u.functionName=f);let p=c?c.arguments??c.parameters??c.input:void 0;typeof p=="string"?u.functionArgumentsParts.push(p):p!=null&&(u.functionArgumentsValue=p)})}function _5e(e,t,r){let o=e.toolCallIndexKeys.get(t)??t;if(e.toolCallIndexKeys.set(t,r),o===r||!e.toolCalls.has(o))return r;let n=e.toolCalls.get(o);if(n){e.toolCalls.delete(o),e.toolCalls.set(r,n);let a=e.toolCallOrder.indexOf(o);a>=0&&(e.toolCallOrder[a]=r)}return r}function F5e(e,t){let r=e.toolCalls.get(t);if(r)return r;let o={functionArgumentsParts:[],order:e.toolCallOrder.length};return e.toolCalls.set(t,o),e.toolCallOrder.push(t),o}function B5e(e){let t={index:e.index,delta:V5e(e)};return e.logprobs!==void 0&&(t.logprobs=e.logprobs),e.finishReason!==void 0&&(t.finish_reason=e.finishReason),t}function V5e(e){let t={};e.role&&(t.role=e.role);for(let[n,a]of e.deltaTextParts)t[n]=a.join("");for(let[n,a]of e.deltaValues)t[n]===void 0&&(t[n]=a);let r=U5e(e);r.length>0&&(t.tool_calls=r);let o=W5e(e);return o&&(t.function_call=o),t}function U5e(e){return e.toolCallOrder.map(t=>e.toolCalls.get(t)).filter(t=>!!t).sort((t,r)=>t.order-r.order).map(t=>{let r={};t.index!==void 0&&(r.index=t.index),t.id&&(r.id=t.id),t.type&&(r.type=t.type);let o={};return t.functionName&&(o.name=t.functionName),t.functionArgumentsParts.length>0?o.arguments=t.functionArgumentsParts.join(""):t.functionArgumentsValue!==void 0&&(o.arguments=t.functionArgumentsValue),Object.keys(o).length>0&&(r.function=o),r})}function W5e(e){let t={};return e.functionName&&(t.name=e.functionName),e.functionArgumentsParts.length>0?t.arguments=e.functionArgumentsParts.join(""):e.functionArgumentsValue!==void 0&&(t.arguments=e.functionArgumentsValue),Object.keys(t).length>0?t:void 0}function G5e(e){if(e)return e.endsWith(".chunk")?e.slice(0,-6):e}function j5e(e){let t=new Map,r={},o=!1;for(let s of e){if(!De(s))continue;let l=le(s.type),u=De(s.response)?s.response:void 0;if((l?.startsWith("response.")||u)&&(o=!0),u&&(r={...r,...u}),l==="response.output_item.added"||l==="response.output_item.done"){z5e(s.item,t,s.output_index);continue}if(l==="response.content_part.added"||l==="response.content_part.done"){Mce(s.part,t,s.output_index,s.content_index);continue}if(l==="response.output_text.delta"||l==="response.refusal.delta"){let d=_0(t,s.output_index,s.content_index);typeof s.delta=="string"&&(l==="response.refusal.delta"?(d.type="refusal",d.refusalParts.push(s.delta)):(d.type=d.type||"output_text",d.textParts.push(s.delta)));continue}if(l==="response.output_text.done"||l==="response.refusal.done"){let d=_0(t,s.output_index,s.content_index);l==="response.refusal.done"?(d.type="refusal",typeof s.refusal=="string"&&(d.refusalValue=s.refusal)):(d.type=d.type||"output_text",typeof s.text=="string"&&(d.textValue=s.text));continue}if(l==="response.reasoning_text.delta"||l==="response.reasoning_summary_text.delta"){let d=_0(t,s.output_index,s.content_index);typeof s.delta=="string"&&(d.type=l==="response.reasoning_summary_text.delta"?"summary_text":"reasoning_text",d.textParts.push(s.delta));continue}if(l==="response.reasoning_text.done"||l==="response.reasoning_summary_text.done"){let d=_0(t,s.output_index,s.content_index);d.type=l==="response.reasoning_summary_text.done"?"summary_text":"reasoning_text",typeof s.text=="string"&&(d.textValue=s.text);continue}if(l==="response.function_call_arguments.delta"||l==="response.function_call_arguments.done"){let d=J4(t,s.output_index);d.type=d.type||"function_call",typeof s.delta=="string"&&d.argumentsParts.push(s.delta),typeof s.arguments=="string"&&(d.argumentsValue=s.arguments)}}if(!o)return;let n={...r};n.object||(n.object="response");let a=Array.from(t.values()).sort((s,l)=>s.order-l.order).map(q5e);a.length>0&&(n.output=a);let i=K5e(a.length>0?a:n.output);return i&&(n.output_text=i),n}function z5e(e,t,r){if(!De(e))return;let o=J4(t,e.output_index??r);o.id=le(e.id)||o.id,o.callId=le(e.call_id)||o.callId,o.name=le(e.name)||o.name,o.role=le(e.role)||o.role,o.status=le(e.status)||o.status,o.type=le(e.type)||o.type;for(let[n,a]of Object.entries(e))["arguments","call_id","content","id","name","output_index","role","status","type"].includes(n)||a!=null&&(o.extras[n]=a);(typeof e.arguments=="string"||e.arguments!==void 0&&e.arguments!==null)&&(o.argumentsValue=e.arguments),Array.isArray(e.content)&&e.content.forEach((n,a)=>Mce(n,t,o.outputIndex,a))}function Mce(e,t,r,o){if(!De(e))return;let n=_0(t,r,e.content_index??o);n.type=le(e.type)||n.type,typeof e.text=="string"&&(n.textValue=e.text),typeof e.refusal=="string"&&(n.refusalValue=e.refusal),e.annotations!==void 0&&e.annotations!==null&&(n.annotations=e.annotations);for(let[a,i]of Object.entries(e))["annotations","content_index","refusal","text","type"].includes(a)||i!=null&&(n.extras[a]=i)}function J4(e,t){let r=Zc(t)??e.size,o=String(r),n=e.get(o);if(n)return n;let a={argumentsParts:[],content:new Map,extras:{},order:e.size,outputIndex:r};return e.set(o,a),a}function _0(e,t,r){let o=J4(e,t),n=Zc(r)??o.content.size,a=String(n),i=o.content.get(a);if(i)return i;let s={extras:{},index:n,order:o.content.size,refusalParts:[],textParts:[]};return o.content.set(a,s),s}function q5e(e){let t={...e.extras};e.id&&(t.id=e.id),e.type&&(t.type=e.type),e.status&&(t.status=e.status),e.role&&(t.role=e.role),e.callId&&(t.call_id=e.callId),e.name&&(t.name=e.name);let r=Array.from(e.content.values()).sort((o,n)=>o.order-n.order).map(H5e);return r.length>0&&(t.content=r),e.argumentsParts.length>0?t.arguments=e.argumentsParts.join(""):e.argumentsValue!==void 0&&(t.arguments=e.argumentsValue),t}function H5e(e){let t={...e.extras};e.type&&(t.type=e.type);let r=e.textValue??(e.textParts.length>0?e.textParts.join(""):void 0);r!==void 0&&(t.text=r);let o=e.refusalValue??(e.refusalParts.length>0?e.refusalParts.join(""):void 0);return o!==void 0&&(t.refusal=o),e.annotations!==void 0&&(t.annotations=e.annotations),t}function K5e(e){if(!Array.isArray(e))return;let t=[];for(let r of e)if(!(!De(r)||!Array.isArray(r.content)))for(let o of r.content)De(o)&&le(o.type)==="output_text"&&typeof o.text=="string"&&t.push(o.text);return t.join("")}function $5e(e){let t=new Map,r={},o=!1,n;for(let s of e){if(!De(s))continue;let l=le(s.type);if(l&&["content_block_delta","content_block_start","content_block_stop","message_delta","message_start","message_stop","ping"].includes(l)&&(o=!0),l==="message_start"&&De(s.message)){r={...r,...s.message},De(s.message.usage)&&(n={...n??{},...s.message.usage}),Array.isArray(s.message.content)&&s.message.content.forEach((u,d)=>lce(t,u,d));continue}if(l==="content_block_start"){lce(t,s.content_block,s.index);continue}if(l==="content_block_delta"&&De(s.delta)){Y5e(t,s.delta,s.index);continue}l==="message_delta"&&(De(s.delta)&&(r={...r,...s.delta}),De(s.usage)&&(n={...n??{},...s.usage}))}if(!o)return;let a={...r};a.type=le(a.type)||"message",a.role=le(a.role)||"assistant";let i=Array.from(t.values()).sort((s,l)=>s.order-l.order).map(Z5e);return i.length>0&&(a.content=i),n&&(a.usage=n),a}function lce(e,t,r){if(!De(t))return;let o=hce(e,r);o.id=le(t.id)||o.id,o.name=le(t.name)||o.name,o.type=le(t.type)||o.type,typeof t.text=="string"&&o.textParts.push(t.text),typeof t.thinking=="string"&&o.thinkingParts.push(t.thinking),t.input!==void 0&&t.input!==null&&(o.inputValue=t.input);for(let[n,a]of Object.entries(t))["id","input","name","text","thinking","type"].includes(n)||a!=null&&(o.extras[n]=a)}function Y5e(e,t,r){let o=hce(e,r),n=le(t.type);if(n==="text_delta"&&typeof t.text=="string"){o.type=o.type||"text",o.textParts.push(t.text);return}if(n==="thinking_delta"&&typeof t.thinking=="string"){o.type=o.type||"thinking",o.thinkingParts.push(t.thinking);return}if(n==="input_json_delta"&&typeof t.partial_json=="string"){o.inputJsonParts.push(t.partial_json);return}if(n==="signature_delta"&&typeof t.signature=="string"){o.signature=t.signature;return}for(let[a,i]of Object.entries(t))a!=="type"&&i!==void 0&&i!==null&&(o.extras[a]=i)}function hce(e,t){let r=Zc(t)??e.size,o=String(r),n=e.get(o);if(n)return n;let a={extras:{},index:r,inputJsonParts:[],order:e.size,textParts:[],thinkingParts:[]};return e.set(o,a),a}function Z5e(e){let t={...e.extras},r=e.type||(e.inputJsonParts.length>0||e.inputValue!==void 0?"tool_use":"text");return t.type=r,e.id&&(t.id=e.id),e.name&&(t.name=e.name),e.textParts.length>0&&(t.text=e.textParts.join("")),e.thinkingParts.length>0&&(t.thinking=e.thinkingParts.join("")),e.signature&&(t.signature=e.signature),e.inputJsonParts.length>0?t.input=nGe(e.inputJsonParts.join("")):e.inputValue!==void 0&&(t.input=e.inputValue),t}function X5e(e){let t=new Map,r=!1,o,n,a,i;for(let l of e)De(l)&&((Array.isArray(l.candidates)||De(l.usageMetadata))&&(r=!0),o=le(l.modelVersion)||o,a=le(l.responseId)||a,l.promptFeedback!==void 0&&l.promptFeedback!==null&&(n=l.promptFeedback),De(l.usageMetadata)&&(i=l.usageMetadata),Array.isArray(l.candidates)&&l.candidates.forEach((u,d)=>J5e(t,u,d)));if(!r)return;let s={candidates:Array.from(t.values()).sort((l,u)=>l.order-u.order).map(rGe)};return i!==void 0&&(s.usageMetadata=i),o&&(s.modelVersion=o),a&&(s.responseId=a),n!==void 0&&(s.promptFeedback=n),s}function J5e(e,t,r){if(!De(t))return;let o=eGe(e,t.index??r);o.finishReason=le(t.finishReason)||o.finishReason,De(t.content)&&(o.contentRole=le(t.content.role)||o.contentRole,Array.isArray(t.content.parts)&&t.content.parts.forEach((n,a)=>Q5e(o,n,a)));for(let[n,a]of Object.entries(t))["content","finishReason","index"].includes(n)||a!=null&&(o.extras[n]=a)}function Q5e(e,t,r){if(!De(t))return;let o=tGe(e,r);typeof t.text=="string"&&o.textParts.push(t.text);for(let[n,a]of Object.entries(t))n!=="text"&&a!=null&&(o.extras[n]=a)}function eGe(e,t){let r=Zc(t)??e.size,o=String(r),n=e.get(o);if(n)return n;let a={extras:{},index:r,order:e.size,parts:new Map};return e.set(o,a),a}function tGe(e,t){let r=Zc(t)??e.parts.size,o=String(r),n=e.parts.get(o);if(n)return n;let a={extras:{},index:r,order:e.parts.size,textParts:[]};return e.parts.set(o,a),a}function rGe(e){let t={...e.extras,index:e.index},r=Array.from(e.parts.values()).sort((o,n)=>o.order-n.order).map(oGe);return(r.length>0||e.contentRole)&&(t.content={parts:r,...e.contentRole?{role:e.contentRole}:{}}),e.finishReason&&(t.finishReason=e.finishReason),t}function oGe(e){let t={...e.extras};return e.textParts.length>0&&(t.text=e.textParts.join("")),t}function nGe(e){let t=e.trim();return!t||!t.startsWith("{")&&!t.startsWith("[")?e:GR(t)??e}function Zc(e){if(typeof e=="number"&&Number.isFinite(e))return e;if(typeof e=="string"&&e.trim())return e.trim()}function aGe(e){let t=Zc(e);return t===void 0?void 0:String(t)}function Q4(e){return e!==null&&typeof e=="object"}function vce(e,t){return`${e}/${encodeURIComponent(t)}`}function F0(e){let t=due(e.Router),r=ym(e.APIKEYS,e.APIKEY),o=e.profile||je.profile,n=Array.isArray(o.profiles)?Ude(o.profiles):Wde(o),a=$M(e.trayBalanceProgress),i=lR(e.trayIcon);return{...je,...e,APIKEY:r[0]?.key??"",APIKEYS:r,Providers:Array.isArray(e.Providers)?e.Providers:[],Router:t,agent:{...je.agent,...e.agent||{},mcpServers:Array.isArray(e.agent?.mcpServers)?y4(e.agent.mcpServers):je.agent.mcpServers},botConfigs:_R(e.botConfigs),botGateway:lh(e.botGateway)??je.botGateway,gateway:{...je.gateway,...e.gateway||{},coreHost:je.gateway.coreHost},launchAtLogin:!!e.launchAtLogin,observability:e5(e.observability),proxy:{...je.proxy,...e.proxy||{},targets:Array.isArray(e.proxy?.targets)?e.proxy.targets:je.proxy.targets},profile:{...je.profile,...o,claudeCode:{...je.profile.claudeCode,...o.claudeCode||{}},codex:{...je.profile.codex,...o.codex||{},cliMiddleware:!0,configFormat:W4(o.codex?.configFormat),showAllSessions:!!o.codex?.showAllSessions},profiles:n},overviewWidgets:xm(e.overviewWidgets),plugins:Array.isArray(e.plugins)?e.plugins:[],providerPlugins:Array.isArray(e.providerPlugins)?e.providerPlugins:[],theme:sR(e.theme),trayBalanceProgress:a,trayComponentVariants:QW(e.trayComponentVariants),trayIcon:i==="progress"&&!a?"random":i,trayProgressTargetTokens:$le(e.trayProgressTargetTokens),trayWidgets:Vc(e.trayWidgets,e.trayWindowModules,e.trayComponentVariants),trayWindowModules:m0(e.trayWindowModules),toolHub:B0(e.toolHub),virtualModelProfiles:Array.isArray(e.virtualModelProfiles)?e.virtualModelProfiles:[]}}function e5(e){return{...je.observability,...e||{},agentAnalysis:!!e?.agentAnalysis,requestLogs:!!e?.requestLogs}}function B0(e){let t=typeof e?.maxTools=="number"&&Number.isFinite(e.maxTools)?Math.min(Math.max(Math.floor(e.maxTools),1),20):je.toolHub.maxTools,r=typeof e?.requestTimeoutMs=="number"&&Number.isFinite(e.requestTimeoutMs)?Math.min(Math.max(Math.floor(e.requestTimeoutMs),8e3),3e5):je.toolHub.requestTimeoutMs;return{...je.toolHub,...e||{},browserAutomation:!!e?.browserAutomation,enabled:!!e?.enabled,llm:{...je.toolHub.llm,...e?.llm||{},apiKey:typeof e?.llm?.apiKey=="string"?e.llm.apiKey:"",baseUrl:typeof e?.llm?.baseUrl=="string"&&e.llm.baseUrl.trim()?e.llm.baseUrl.trim():je.toolHub.llm.baseUrl,model:typeof e?.llm?.model=="string"?e.llm.model.trim():""},mcpServers:Array.isArray(e?.mcpServers)?y4(e.mcpServers):je.toolHub.mcpServers,maxTools:t,requestTimeoutMs:r}}function Dm(e,t,r={}){let o=!1,n=!1,a=!1,i=()=>{if(o||document.hidden){a=!0;return}if(n){a=!0;return}a=!1,n=!0,Promise.resolve(e()).catch(()=>{}).finally(()=>{n=!1,a&&i()})},s=()=>{document.hidden||i()};r.immediate!==!1&&i();let l=window.setInterval(i,t);return document.addEventListener("visibilitychange",s),()=>{o=!0,window.clearInterval(l),document.removeEventListener("visibilitychange",s)}}var x=z(ze());function r5({accountSnapshots:e,addProvider:t,editProvider:r,notify:o,providers:n,removeProvider:a}){let i=ve(),[s,l]=(0,D.useState)(""),[u,d]=(0,D.useState)(()=>new Set),c=s.trim().toLowerCase(),f=(0,D.useMemo)(()=>n.filter(({provider:h})=>xde(h,c)),[c,n]),p=(0,D.useMemo)(()=>{let h=new Map;for(let k of e){let M=h.get(k.provider)??[];M.push(k),h.set(k.provider,M)}return h},[e]);function g(h,k){let M=O4(h,k);d(v=>{let b=new Set(v);return b.has(M)?b.delete(M):b.add(M),b})}async function m(h){await Ls(h),o(`${i("Copied")} ${h}`)}return(0,x.jsx)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 min-w-0 flex-col",initial:{opacity:0},transition:{duration:.15},children:(0,x.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,x.jsxs)(Gr,{className:"flex-row items-center gap-2",children:[(0,x.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,x.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 z-[1] h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,x.jsx)(Te,{"aria-label":i("Search providers"),className:"pl-8",onChange:h=>l(h.target.value),placeholder:i("Search providers"),value:s})]}),(0,x.jsxs)(ne,{"aria-label":i("Add provider"),onClick:t,title:i("Add provider"),type:"button",children:[(0,x.jsx)(It,{className:"h-4 w-4"}),i("Add")]})]}),(0,x.jsxs)(nr,{className:"min-h-0 flex-1 overflow-auto p-0",children:[n.length===0?(0,x.jsxs)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center",children:[(0,x.jsx)(Gn,{className:"mx-auto mb-2 h-7 w-7 text-muted-foreground/40"}),(0,x.jsx)("div",{className:"text-[12px] text-muted-foreground",children:i("No providers configured")}),(0,x.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground/60",children:i("Click Add to create one")})]}):null,n.length>0&&f.length===0?(0,x.jsx)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center text-[12px] text-muted-foreground",children:i("No matching providers")}):null,f.length>0?(0,x.jsx)("div",{className:"overflow-x-auto",children:(0,x.jsxs)("div",{className:"min-w-[1080px]",children:[(0,x.jsxs)("div",{className:"sticky top-0 z-10 grid h-10 grid-cols-[minmax(160px,0.8fr)_minmax(220px,1fr)_minmax(160px,0.7fr)_minmax(150px,0.65fr)_80px_84px] items-center gap-3 border-b border-border/60 bg-muted/95 px-4 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:[(0,x.jsx)("div",{className:"truncate",children:i("Name")}),(0,x.jsx)("div",{className:"truncate",children:i("Base URL")}),(0,x.jsx)("div",{className:"truncate",children:i("Capability")}),(0,x.jsx)("div",{className:"truncate",children:i("Account")}),(0,x.jsx)("div",{className:"truncate",children:i("Models")}),(0,x.jsx)("div",{"aria-hidden":"true"})]}),(0,x.jsx)("div",{className:"divide-y divide-border/60",children:(0,x.jsx)(wt,{initial:!1,children:f.map(({provider:h,index:k})=>{let M=O4(h,k),v=u.has(M),b=p.get(h.name)??[];return(0,x.jsxs)(ka,{children:[(0,x.jsxs)("div",{className:"grid min-h-[58px] cursor-pointer grid-cols-[minmax(160px,0.8fr)_minmax(220px,1fr)_minmax(160px,0.7fr)_minmax(150px,0.65fr)_80px_84px] items-center gap-3 px-4 py-2.5 transition-colors hover:bg-muted/35",onClick:()=>g(h,k),onKeyDown:w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),g(h,k))},role:"button",tabIndex:0,children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,x.jsx)("button",{"aria-expanded":v,"aria-label":`${i(v?"Collapse":"Expand")} ${h.name||i("provider")} ${i("models")}`,className:"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/30",onClick:w=>{w.stopPropagation(),g(h,k)},title:i(v?"Collapse models":"Expand models"),type:"button",children:v?(0,x.jsx)(po,{className:"h-3.5 w-3.5"}):(0,x.jsx)(qo,{className:"h-3.5 w-3.5"})}),(0,x.jsx)("div",{className:"min-w-0",children:(0,x.jsx)("div",{className:"truncate text-[12px] font-semibold",children:h.name||i("Unnamed")})})]}),(0,x.jsx)("div",{className:"min-w-0 truncate font-mono text-[11px] text-muted-foreground",title:oh(h),children:oh(h)||i("Not set")}),(0,x.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",title:IR(h,i),children:IR(h,i)}),(0,x.jsx)(sGe,{provider:h,snapshots:b}),(0,x.jsx)("div",{className:"min-w-0",children:(0,x.jsx)("button",{"aria-expanded":v,className:"rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onClick:w=>{w.stopPropagation(),g(h,k)},title:i(v?"Collapse models":"Expand models"),type:"button",children:(0,x.jsx)(gt,{variant:h.models.length>0?"outline":"warning",children:h.models.length})})}),(0,x.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,x.jsx)(ne,{"aria-label":`${i("Edit")} ${h.name||i("provider")}`,onClick:w=>{w.stopPropagation(),r(k)},size:"iconSm",title:i("Edit provider"),type:"button",variant:"ghost",children:(0,x.jsx)(No,{className:"h-3.5 w-3.5"})}),(0,x.jsx)(ne,{"aria-label":`${i("Remove")} ${h.name||i("provider")}`,onClick:w=>{w.stopPropagation(),a(k)},size:"iconSm",title:i("Remove provider"),type:"button",variant:"ghost",children:(0,x.jsx)(ar,{className:"h-3.5 w-3.5"})})]})]}),(0,x.jsx)(wt,{initial:!1,children:v?(0,x.jsx)(Ru,{children:(0,x.jsxs)("div",{className:"border-t border-border/50 bg-muted/20 px-4 py-3",children:[h.capabilities?.length?(0,x.jsx)("div",{className:"mb-3 flex flex-wrap gap-2",children:h.capabilities.map(w=>(0,x.jsx)(gt,{variant:"secondary",children:Eu(w.type,i)},`${w.type}:${w.baseUrl}`))}):null,h.models.length===0?(0,x.jsx)("div",{className:"rounded-md border border-dashed border-border bg-background/60 px-3 py-4 text-center text-[12px] text-muted-foreground",children:i("No models configured")}):(0,x.jsx)("div",{className:"flex flex-wrap gap-2",children:h.models.map(w=>{let P=`${M}:${w}`,L=D0(h,w);return(0,x.jsx)("button",{"aria-label":`${i("Double click to copy")} ${L}`,className:"inline-flex max-w-full items-center rounded-full border border-border bg-background px-2.5 py-1 text-[11px] leading-4 text-foreground transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onDoubleClick:()=>{m(w)},title:`${vde(h,w)} \xB7 ${i("Double click to copy")}`,type:"button",children:(0,x.jsx)("span",{className:"min-w-0 truncate",children:L})},P)})})]})},"provider-models"):null})]},M)})})})]})}):null]})]})})}function o5({config:e,updateModelDescription:t}){let r=ve(),[o,n]=(0,D.useState)(""),[a,i]=(0,D.useState)(),[s,l]=(0,D.useState)(""),u=(0,D.useMemo)(()=>Wue(e),[e]),d=s.trim().toLowerCase(),c=(0,D.useMemo)(()=>u.filter(m=>Hue(m,d)),[d,u]);function f(m){if(m.providerIndex===void 0)return;let h=m.description??"";n(h),i({description:h,displayName:m.displayName,model:m.model,providerIndex:m.providerIndex,providerName:m.providerName})}function p(){n(""),i(void 0)}function g(){a&&(t(a.providerIndex,a.model,o),p())}return(0,x.jsxs)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 min-w-0 flex-col",initial:{opacity:0},transition:{duration:.15},children:[(0,x.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,x.jsxs)(Gr,{className:"flex-row flex-wrap items-center gap-2",children:[(0,x.jsx)("div",{className:"min-w-[180px] flex-1",children:(0,x.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:(0,x.jsx)(fn,{className:"min-w-0",children:r("Models")})})}),(0,x.jsxs)("div",{className:"relative w-[320px] max-w-full",children:[(0,x.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 z-[1] h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,x.jsx)(Te,{"aria-label":r("Search all models"),className:"pl-8",onChange:m=>l(m.target.value),placeholder:r("Search all models"),value:s})]})]}),(0,x.jsxs)(nr,{className:"min-h-0 flex-1 overflow-auto p-0",children:[u.length===0?(0,x.jsxs)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center",children:[(0,x.jsx)(Gd,{className:"mx-auto mb-2 h-7 w-7 text-muted-foreground/40"}),(0,x.jsx)("div",{className:"text-[12px] text-muted-foreground",children:r("No models available")})]}):null,u.length>0&&c.length===0?(0,x.jsx)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center text-[12px] text-muted-foreground",children:r("No matching models")}):null,c.length>0?(0,x.jsx)("div",{className:"overflow-x-auto",children:(0,x.jsxs)("div",{className:"min-w-[680px]",children:[(0,x.jsxs)("div",{className:"sticky top-0 z-10 grid h-10 grid-cols-[minmax(0,1fr)_minmax(260px,1.5fr)] items-center gap-3 border-b border-border/60 bg-muted/95 px-4 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:[(0,x.jsx)("div",{className:"truncate",children:r("Model")}),(0,x.jsx)("div",{className:"truncate",children:r("Description")})]}),(0,x.jsx)("div",{className:"divide-y divide-border/60",children:(0,x.jsx)(wt,{initial:!1,children:c.map(m=>(0,x.jsxs)(ka,{className:"grid min-h-[60px] grid-cols-[minmax(0,1fr)_minmax(260px,1.5fr)] items-start gap-3 px-4 py-2.5 transition-colors hover:bg-muted/35",children:[(0,x.jsxs)("div",{className:"min-w-0",children:[(0,x.jsx)("div",{className:"truncate text-[12px] font-semibold text-foreground",title:m.displayName??m.model,children:m.displayName??m.model}),(0,x.jsx)("div",{className:"truncate font-mono text-[11px] text-muted-foreground",title:m.providerName?`${m.providerName}/${m.model}`:m.model,children:m.providerName?`${m.providerName}/${m.model}`:m.model})]}),(0,x.jsx)("div",{className:"min-w-0",children:m.providerIndex!==void 0?(0,x.jsxs)("div",{className:"flex min-w-0 items-start gap-2",children:[(0,x.jsx)("div",{className:"min-w-0 flex-1",children:(0,x.jsx)("div",{className:"line-clamp-2 text-[12px] leading-5 text-muted-foreground",title:m.description??"",children:m.description||"-"})}),(0,x.jsx)(ne,{"aria-label":`${r("Edit description")} ${m.displayName??m.model}`,className:"h-7 w-7 shrink-0 p-0",onClick:()=>f(m),title:r("Edit description"),type:"button",variant:"ghost",children:(0,x.jsx)(No,{className:"h-3.5 w-3.5"})})]}):(0,x.jsx)("div",{className:"line-clamp-2 text-[12px] leading-5 text-muted-foreground",title:m.description??"",children:m.description||"-"})})]},m.key))})})]})}):null]})]}),(0,x.jsx)(iGe,{draft:o,onChange:n,onClose:p,onSave:g,target:a})]})}function iGe({draft:e,onChange:t,onClose:r,onSave:o,target:n}){let a=ve(),i=!!n,s=n?.displayName||n?.model||a("Model"),l=n?.providerName?`${n.providerName}/${n.model}`:n?.model;return(0,x.jsx)(Ft,{open:i,onOpenChange:u=>{u||r()},children:(0,x.jsxs)(Tt,{className:"max-w-[560px]",children:[(0,x.jsx)(Bt,{children:(0,x.jsx)(Vt,{children:a("Edit description")})}),(0,x.jsxs)(Ot,{className:"space-y-3",children:[(0,x.jsxs)("div",{className:"min-w-0",children:[(0,x.jsx)("div",{className:"truncate text-[13px] font-semibold text-foreground",title:s,children:s}),l?(0,x.jsx)("div",{className:"truncate font-mono text-[11px] text-muted-foreground",title:l,children:l}):null]}),(0,x.jsx)(xe,{label:a("Description"),children:(0,x.jsx)(ji,{"aria-label":`${a("Description")} ${s}`,className:"min-h-[160px] resize-y text-[12px]",onChange:u=>t(u.target.value),placeholder:a("Describe model strengths, tradeoffs, and best-fit tasks."),value:e})})]}),(0,x.jsxs)($t,{children:[(0,x.jsx)(ne,{onClick:r,type:"button",variant:"outline",children:a("Cancel")}),(0,x.jsx)(ne,{disabled:e.trim()===(n?.description??"").trim(),onClick:o,type:"button",children:a("Save")})]})]})})}function sGe({provider:e,snapshots:t}){let r=ve(),o=[...t].sort(E0),n=o[0],a=n?dh(n):void 0,i=n?n.message??n.errors?.[0]?.message:void 0;return!e.account?.enabled&&t.length===0?(0,x.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:r("Disabled")}):n?(0,x.jsxs)("div",{className:"min-w-0",children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 text-[11px]",children:[a?(0,x.jsx)("span",{className:"min-w-0 truncate text-[11px] font-medium",children:Nn(a)}):null,o.length>1?(0,x.jsxs)("span",{className:"shrink-0 text-muted-foreground",children:[o.length," ",r("keys")]}):null]}),uh(n)?(0,x.jsx)("div",{className:"mt-0.5 truncate text-[10px] font-semibold text-muted-foreground",title:$c(n),children:uh(n)}):null,!a&&i?(0,x.jsx)("div",{className:"mt-0.5 truncate text-[10px] text-muted-foreground",children:r(i)}):null]}):(0,x.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",children:r("Pending")})}function n5({onClose:e,onConfirm:t,provider:r}){let o=ve(),n=r.name||o("Unnamed provider"),a=oh(r);return(0,x.jsx)(Ft,{onOpenChange:i=>!i&&e(),children:(0,x.jsxs)(Tt,{className:"max-w-[520px]",children:[(0,x.jsxs)(Bt,{children:[(0,x.jsx)("div",{className:"min-w-0",children:(0,x.jsx)(Vt,{children:o("Delete Provider")})}),(0,x.jsx)(ne,{"aria-label":o("Close dialog"),onClick:e,size:"iconSm",title:o("Close"),type:"button",variant:"ghost",children:(0,x.jsx)(ft,{className:"h-4 w-4"})})]}),(0,x.jsx)(Ot,{children:(0,x.jsxs)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2.5",children:[(0,x.jsxs)("div",{className:"flex items-start gap-2 text-[12px] font-medium text-destructive",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:o("Delete this provider from the configuration?")})]}),(0,x.jsxs)("div",{className:"mt-2 space-y-1 text-[11px] text-muted-foreground",children:[(0,x.jsxs)("div",{className:"truncate",children:[(0,x.jsxs)("span",{className:"font-medium text-foreground",children:[o("Name"),":"]})," ",n]}),(0,x.jsxs)("div",{className:"truncate",title:a,children:[(0,x.jsxs)("span",{className:"font-medium text-foreground",children:[o("Base URL"),":"]})," ",a||o("Not set")]}),(0,x.jsx)("div",{children:o("This action is applied immediately to the draft config and will auto-save with other changes.")})]})]})}),(0,x.jsxs)($t,{children:[(0,x.jsx)(ne,{autoFocus:!0,onClick:e,type:"button",variant:"outline",children:o("Cancel")}),(0,x.jsxs)(ne,{onClick:t,type:"button",variant:"destructive",children:[(0,x.jsx)(ar,{className:"h-4 w-4"}),o("Delete")]})]})]})})}function a5({busy:e,error:t,iconLoading:r=!1,modelsLoading:o=!1,onClose:n,onSubmit:a,presetsLoaded:i=!0,request:s}){let l=ve(),u=s.provider,d=s.manifest,c=u?u.name?.trim()||C0(u.baseUrl):"",f=u?w0(u):void 0,p=!!(u&&i&&!f),g=u?S4(u):"",m=u?.models.slice(0,8)??[],h=e||!!(u&&(r||o));return(0,x.jsx)(Ft,{onOpenChange:k=>!k&&n(),children:(0,x.jsxs)(Tt,{className:"max-w-[580px]",children:[(0,x.jsxs)(Bt,{children:[(0,x.jsx)("div",{className:"min-w-0",children:(0,x.jsx)(Vt,{children:l(u?"Import Provider":d?"Import Provider Manifest":"Provider link failed")})}),(0,x.jsx)(ne,{"aria-label":l("Close dialog"),disabled:e,onClick:n,size:"iconSm",title:l("Close"),type:"button",variant:"ghost",children:(0,x.jsx)(ft,{className:"h-4 w-4"})})]}),(0,x.jsxs)(Ot,{children:[u?(0,x.jsxs)("div",{className:"space-y-3",children:[p?(0,x.jsxs)("div",{className:"rounded-md border border-border bg-muted/30 px-3 py-2.5",children:[(0,x.jsxs)("div",{className:"flex items-start gap-2 text-[12px] font-medium text-foreground",children:[(0,x.jsx)(Oa,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:l("External provider link")})]}),(0,x.jsx)("div",{className:"mt-1 text-[11px] leading-4 text-muted-foreground",children:l("This provider link came from an external website. Review details before importing.")})]}):null,p?(0,x.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-border bg-background px-3 py-2 text-[11px] leading-4 text-muted-foreground",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:l("Only enter an API key issued for this endpoint. Official provider keys must only be used with official endpoints.")})]}):null,(0,x.jsxs)("div",{className:"flex min-w-0 items-center gap-3 rounded-md border border-border bg-background px-3 py-2.5",children:[(0,x.jsxs)("div",{className:"relative shrink-0",children:[(0,x.jsx)(jR,{className:"h-10 w-10 rounded-md",iconUrl:g,preset:f}),r?(0,x.jsx)("span",{className:"absolute -right-1 -top-1 flex h-4 w-4 items-center justify-center rounded-full border border-border bg-background",children:(0,x.jsx)(ct,{className:"h-2.5 w-2.5 animate-spin text-muted-foreground"})}):null]}),(0,x.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,x.jsx)("div",{className:"truncate text-[13px] font-semibold text-foreground",children:c}),(0,x.jsx)("div",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",title:u.baseUrl,children:u.baseUrl})]})]}),(0,x.jsxs)("div",{className:"grid grid-cols-1 gap-2 text-[12px] sm:grid-cols-2",children:[(0,x.jsx)(Vu,{label:l("Name"),value:c}),(0,x.jsx)(Vu,{label:l("Protocol"),value:u.protocol?Eu(u.protocol,l):l("Detected automatically")}),(0,x.jsx)(Vu,{className:"sm:col-span-2",label:l("Base URL"),value:u.baseUrl,mono:!0}),d?(0,x.jsx)(Vu,{className:"sm:col-span-2",label:l("Manifest URL"),value:d.url,mono:!0}):null,u.source?(0,x.jsx)(Vu,{className:"sm:col-span-2",label:l("Provider website"),value:u.source,mono:!0}):null,(0,x.jsx)(Vu,{label:l("API key"),value:u.apiKey?l("API key included"):l("API key not included")}),(0,x.jsx)(Vu,{label:l("Fetch usage"),value:u.account?.enabled===!1?l("Disabled"):l("Enabled")}),(0,x.jsx)(Vu,{label:l("Models"),value:u.models.length>0?String(u.models.length):l("Models will be detected automatically.")})]}),m.length>0?(0,x.jsxs)("div",{className:"flex flex-wrap gap-2",children:[m.map(k=>(0,x.jsx)(gt,{variant:"outline",children:(0,x.jsx)("span",{className:"max-w-[210px] truncate",title:u.modelDisplayNames?.[k]??k,children:u.modelDisplayNames?.[k]??k})},k)),u.models.length>m.length?(0,x.jsxs)(gt,{variant:"secondary",children:["+",u.models.length-m.length]}):null]}):null]}):d?(0,x.jsxs)("div",{className:"space-y-3",children:[(0,x.jsxs)("div",{className:"rounded-md border border-border bg-muted/30 px-3 py-2.5",children:[(0,x.jsxs)("div",{className:"flex items-start gap-2 text-[12px] font-medium text-foreground",children:[(0,x.jsx)(Oa,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:l("Remote provider manifest")})]}),(0,x.jsx)("div",{className:"mt-1 text-[11px] leading-4 text-muted-foreground",children:l("CCR will fetch this HTTPS manifest with strict safety checks before showing provider details.")})]}),(0,x.jsx)(Vu,{label:l("Manifest URL"),value:d.url,mono:!0})]}):(0,x.jsx)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2.5",children:(0,x.jsxs)("div",{className:"flex items-start gap-2 text-[12px] font-medium text-destructive",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:s.error||l("Invalid")})]})}),t?(0,x.jsxs)("div",{className:"mt-3 flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:l(t)})]}):null]}),(0,x.jsxs)($t,{children:[(0,x.jsx)(ne,{disabled:e,onClick:n,type:"button",variant:"outline",children:l("Cancel")}),u||d?(0,x.jsxs)(ne,{disabled:h,onClick:()=>{a()},type:"button",children:[(0,x.jsx)(br,{iconKey:h?"busy":"plus",children:h?(0,x.jsx)(ct,{className:"h-4 w-4 animate-spin"}):(0,x.jsx)(It,{className:"h-4 w-4"})}),l(h?"Loading":u?"Import":"Fetch manifest")]}):null]})]})})}function Vu({className:e,label:t,mono:r=!1,value:o}){return(0,x.jsxs)("div",{className:J("min-w-0 rounded-md border border-border bg-background px-3 py-2",e),children:[(0,x.jsx)("div",{className:"truncate text-[10px] font-medium uppercase tracking-wide text-muted-foreground",children:t}),(0,x.jsx)("div",{className:J("mt-1 min-w-0 truncate text-[12px] text-foreground",r&&"font-mono text-[11px]"),title:o,children:o})]})}function lGe({onChange:e,options:t,value:r}){let o=ve(),[n,a]=(0,D.useState)(!1),[i,s]=(0,D.useState)(""),l=(0,D.useRef)(null),u=(0,D.useRef)(null),d=t.find(M=>M.value===r)??t.find(M=>M.value===""),c=i.trim().toLowerCase(),f=c?t.filter(M=>cGe(M,c)):t,p=pGe(d),g=fGe(d,o);(0,D.useEffect)(()=>{if(!n)return;let M=window.setTimeout(()=>u.current?.focus(),0),v=w=>{l.current?.contains(w.target)||a(!1)},b=w=>{w.key==="Escape"&&a(!1)};return document.addEventListener("mousedown",v),document.addEventListener("keydown",b),()=>{window.clearTimeout(M),document.removeEventListener("mousedown",v),document.removeEventListener("keydown",b)}},[n]);function m(M){e(M),s(""),a(!1)}function h(){a(M=>!M)}function k(){p&&wce(p)}return(0,x.jsxs)("div",{className:"relative min-w-0",ref:l,children:[(0,x.jsxs)("div",{"aria-controls":"provider-preset-options","aria-expanded":n,"aria-haspopup":"listbox",className:J("flex min-h-[62px] w-full min-w-0 cursor-pointer items-center gap-3 rounded-md border border-border bg-background px-3 py-2.5 text-left outline-none transition-[background-color,border-color,box-shadow,color] hover:border-muted-foreground/45 hover:bg-muted/20 focus-visible:border-primary/60 focus-visible:ring-2 focus-visible:ring-ring/25",n&&"border-ring/35 bg-muted/30"),onClick:h,onKeyDown:M=>{(M.key==="ArrowDown"||M.key==="Enter"||M.key===" ")&&(M.preventDefault(),a(!0))},role:"button",tabIndex:0,children:[(0,x.jsx)(jR,{className:"h-10 w-10 rounded-md",iconUrl:d?.iconUrl,preset:d?.preset}),(0,x.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,x.jsx)("div",{className:"truncate text-[13px] font-semibold text-foreground",children:d?d.label:o("Select preset provider")}),g?(0,x.jsx)("div",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",title:g,children:g}):null]}),p?(0,x.jsx)(ne,{"aria-label":o("Open provider website"),onKeyDown:M=>{M.stopPropagation()},onClick:M=>{M.stopPropagation(),k()},onMouseDown:M=>{M.stopPropagation()},size:"iconSm",title:o("Open provider website"),type:"button",variant:"ghost",children:(0,x.jsx)(ou,{className:"h-4 w-4"})}):null]}),(0,x.jsx)(wt,{initial:!1,children:n?(0,x.jsx)(Nu,{className:"absolute left-0 right-0 top-full z-50 mt-1",children:(0,x.jsxs)(Is,{className:"overflow-hidden p-1",children:[(0,x.jsxs)("div",{className:"relative mb-1",children:[(0,x.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,x.jsx)(Te,{"aria-label":o("Filter"),className:"h-8 pl-8",onChange:M=>s(M.target.value),onKeyDown:M=>{if(M.key==="Enter"){M.preventDefault();let v=f[0];v&&m(v.value)}},placeholder:o("Filter"),ref:u,value:i})]}),(0,x.jsx)("div",{className:"max-h-[240px] overflow-auto",id:"provider-preset-options",role:"listbox",children:f.length>0?f.map(M=>{let v=M.value===r;return(0,x.jsxs)("button",{"aria-selected":v,className:J("flex h-9 w-full min-w-0 items-center gap-2 rounded-[5px] px-2 text-left text-[12px] font-medium outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/25",v?"bg-primary/10 text-primary":"text-foreground hover:bg-muted"),onClick:()=>m(M.value),role:"option",type:"button",children:[(0,x.jsx)(jR,{className:"h-5 w-5 rounded-[5px]",iconUrl:M.iconUrl,preset:M.preset}),(0,x.jsx)("span",{className:"min-w-0 flex-1 truncate",children:M.label}),v?(0,x.jsx)(yt,{className:"h-3.5 w-3.5 shrink-0"}):null]},M.value)}):(0,x.jsx)("div",{className:"px-2 py-5 text-center text-[12px] text-muted-foreground",children:o("No provider presets found")})})]})}):null})]})}function jR({className:e,iconUrl:t,preset:r}){let[o,n]=(0,D.useState)(!1),a=t||(r?c0[r.id]:""),i=o?"":a,s=r?.name.trim().slice(0,1).toUpperCase()||"";return(0,D.useEffect)(()=>{n(!1)},[r?.id,a]),i?(0,x.jsx)("span",{className:J("flex shrink-0 items-center justify-center overflow-hidden border border-border bg-background",e),children:(0,x.jsx)("img",{alt:"",className:"h-full w-full object-cover",draggable:!1,onError:()=>n(!0),src:i})}):(0,x.jsx)("span",{className:J("flex shrink-0 items-center justify-center border border-border bg-muted text-[10px] font-semibold text-muted-foreground",e),children:s||(0,x.jsx)(nu,{className:"h-3.5 w-3.5"})})}function uGe({draft:e,provider:t,preset:r}){let o=ve(),n=e.baseUrl.trim()||t.baseUrl,a=e.name.trim()||t.name?.trim()||C0(n),i=e.icon.trim()||S4(t),s=dGe(t,n,r);function l(){s&&wce(s)}return(0,x.jsxs)("div",{className:"sm:col-span-2 flex min-w-0 items-center gap-3 rounded-md border border-border bg-background px-3 py-2.5",children:[(0,x.jsx)(jR,{className:"h-10 w-10 rounded-md",iconUrl:i,preset:r}),(0,x.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,x.jsx)("div",{className:"truncate text-[13px] font-semibold text-foreground",children:a}),(0,x.jsx)("div",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",title:n,children:n})]}),s?(0,x.jsx)(ne,{"aria-label":o("Open provider website"),onClick:l,size:"iconSm",title:o("Open provider website"),type:"button",variant:"ghost",children:(0,x.jsx)(ou,{className:"h-4 w-4"})}):null]})}function dGe(e,t,r){return t5(e.source)??mGe(r,t||e.baseUrl)}function wce(e){if(window.ccr?.openExternal){window.ccr.openExternal(e).catch(()=>{});return}window.open(e,"_blank","noopener,noreferrer")}function t5(e){let t=e?.trim();if(t)try{let r=new URL(Xa(t));return["http:","https:"].includes(r.protocol)?r.toString():void 0}catch{return}}function cGe(e,t){let r=e.preset;return[e.label,e.value,r?.id,r?.name,...r?.aliases??[],...r?.endpoints.map(n=>n.baseUrl)??[]].filter(Boolean).join(`
67
+ `).toLowerCase().includes(t)}function fGe(e,t){return e?e.preset?QL(e.preset)?.baseUrl??e.preset.websiteUrl??"":e.value===zi?t("API endpoint"):"":""}function pGe(e){if(e?.preset)return Cce(e.preset,QL(e.preset))}function mGe(e,t){if(!e)return;let r=t.trim(),o=r?e.endpoints.find(n=>n.baseUrl.trim()===r):void 0;return Cce(e,o)}function Cce(e,t){return t5(t?.websiteUrl)??t5(e.websiteUrl)}function gGe(e,t,r){let o=e.trim();return!o||/^provider-\d+$/i.test(o)?!0:t?[t.name,r(t.name)].some(n=>kGe(o,n)):!1}function kGe(e,t){let r=e.trim().toLowerCase(),o=t.trim().toLowerCase();return o?r===o?!0:r.startsWith(`${o} `)?/^\d+$/.test(r.slice(o.length+1)):!1:!1}function MGe({mode:e,onChange:t,providerPlugins:r,providers:o}){let n=ve(),a=Rc(),[i,s]=(0,D.useState)([]),[l,u]=(0,D.useState)(""),[d,c]=(0,D.useState)(!1),[f,p]=(0,D.useState)("");if((0,D.useEffect)(()=>{if(e!=="add"||!window.ccr?.getLocalAgentProviderCandidates)return;let m=!1;return c(!0),u(""),window.ccr.getLocalAgentProviderCandidates().then(h=>{m||s(h.filter(k=>k.status!=="missing"&&!vGe(k,o,r)))}).catch(h=>{m||u(a(h))}).finally(()=>{m||c(!1)}),()=>{m=!0}},[e,r,o]),e!=="add"||i.length===0&&!l)return null;async function g(m){if(!(!window.ccr?.importLocalAgentProvider||!m.importable)){p(m.id),u("");try{let h=await window.ccr.importLocalAgentProvider({id:m.id,providerNames:o.map(v=>v.name)}),k=th(h.provider.account),M=h.provider.protocol??"openai_chat_completions";t({...k,apiKey:h.provider.apiKey??"",baseUrl:h.provider.baseUrl,credentials:[],icon:h.provider.icon??"",modelDescriptions:h.provider.modelDescriptions,modelDisplayNames:h.provider.modelDisplayNames,modelSearch:"",modelsText:h.provider.models.join(`
68
+ `),name:h.provider.name?.trim()||C0(h.provider.baseUrl),presetId:zi,providerPlugins:h.providerPlugins,protocol:M,selectedModels:[],selectedProtocols:[M]},!0)}catch(h){u(a(h))}finally{p("")}}}return(0,x.jsxs)("div",{className:"sm:col-span-2 rounded-md border border-border bg-muted/20 p-3",children:[(0,x.jsxs)("div",{className:"mb-2 flex min-w-0 items-center justify-between gap-2",children:[(0,x.jsxs)("div",{className:"min-w-0",children:[(0,x.jsx)("div",{className:"truncate text-[12px] font-semibold text-foreground",children:n("Import local agent login")}),(0,x.jsx)("div",{className:"mt-0.5 text-[11px] leading-4 text-muted-foreground",children:n("CCR scanned this computer for Claude Code, Codex, and ZCode login states. Click Import to add one as a gateway provider.")})]}),d?(0,x.jsx)(ct,{className:"h-4 w-4 shrink-0 animate-spin text-muted-foreground"}):null]}),i.length>0?(0,x.jsx)("div",{className:"grid grid-cols-1 gap-2",children:i.map(m=>{let h=Uue[m.kind],k=f===m.id;return(0,x.jsxs)("div",{className:"grid min-h-12 grid-cols-[minmax(0,1fr)_auto] items-center gap-2 rounded-md border border-border bg-background px-2.5 py-2",children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,x.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-muted",children:(0,x.jsx)("img",{alt:"",className:"h-full w-full object-cover",draggable:!1,src:h})}),(0,x.jsxs)("div",{className:"min-w-0",children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,x.jsx)("span",{className:"min-w-0 truncate text-[12px] font-semibold",children:m.name}),(0,x.jsx)(gt,{variant:m.importable?"success":m.status==="locked"?"warning":"outline",children:m.importable?n("Ready"):m.status==="locked"?n("Locked"):n("Not found")})]}),(0,x.jsx)("div",{className:"mt-0.5 truncate text-[10px] text-muted-foreground",title:m.sourceFile||m.detail,children:m.detail?n(m.detail):m.sourceFile||n("No local login state was found for this agent.")})]})]}),(0,x.jsxs)(ne,{className:"h-8 px-2",disabled:!m.importable||!!f,onClick:()=>{g(m)},type:"button",variant:m.importable?"default":"outline",children:[(0,x.jsx)(br,{iconKey:k?"importing":"import",children:k?(0,x.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,x.jsx)(It,{className:"h-3.5 w-3.5"})}),n("Import")]})]},m.id)})}):d?(0,x.jsx)("div",{className:"rounded-md border border-dashed border-border bg-background px-3 py-4 text-center text-[12px] text-muted-foreground",children:n("Scanning local agent logins")}):null,l?(0,x.jsxs)("div",{className:"mt-2 flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:n(l)})]}):null]})}var yce="ccr-local-agent-login",hGe={"claude-code":["-claude-code-oauth","-claude-code-oauth-internal"],codex:["-codex-oauth","-codex-oauth-internal"],zcode:["-zcode-api-key","-zcode-api-key-internal"]};function vGe(e,t,r){let o=hGe[e.kind],n=new Set(t.filter(i=>i.api_key===yce).flatMap(i=>[i.name,i.type?`${i.name}::${i.type}`:""]).map(i=>i.trim().toLowerCase()).filter(Boolean));return n.size===0?!1:t.some(i=>i.api_key===yce&&i.name.trim().toLowerCase().startsWith(e.name.toLowerCase()))?!0:r.some(i=>{let s=De(i)&&typeof i.key=="string"?i.key:"",l=De(i)&&typeof i.providerName=="string"?i.providerName:"";return s.startsWith("ccr-local-agent-")&&o.some(u=>s.endsWith(u))&&n.has(l.trim().toLowerCase())})}function zR({draft:e,error:t,connectivityLoading:r=!1,connectivityProbe:o,importProvider:n,mode:a,onCheck:i,onChange:s,onIconDetectingChange:l,probe:u,probeLoading:d,providerPlugins:c=[],providers:f}){let p=ve(),[g,m]=(0,D.useState)(a==="edit"),[h,k]=(0,D.useState)(!1),[M,v]=(0,D.useState)(),b=(0,D.useRef)(0),w=(0,D.useRef)(s),P=!!u?.models.length,L=Cl(e.presetId),C=e.presetId===zi,F=!!n,T=C||a==="edit",G=u?.detectedProtocol??e.protocol,$=u?.normalizedBaseUrl||e.baseUrl,oe=mde(e,$),se=e.providerPlugins.length>0,pe=[{iconUrl:e.icon,label:p("Other / custom API endpoint"),value:zi},{label:p("Select preset provider"),value:""},...Ple().map(j=>({label:p(j.name),preset:j,value:j.id}))],N=A0(u),R=(0,D.useMemo)(()=>yGe(u?.protocols??[]),[u]),U=ho(e.selectedModels,Ki(e.modelsText)),E=!!(!se&&e.baseUrl.trim()&&e.apiKey.trim()&&U.length>0);(0,D.useEffect)(()=>{w.current=s},[s]),(0,D.useEffect)(()=>{v(void 0)},[u]),(0,D.useEffect)(()=>{if(!M)return;let j=()=>v(void 0),re=W=>{W.key==="Escape"&&j()};return document.addEventListener("mousedown",j),document.addEventListener("scroll",j,!0),window.addEventListener("resize",j),window.addEventListener("keydown",re),()=>{document.removeEventListener("mousedown",j),document.removeEventListener("scroll",j,!0),window.removeEventListener("resize",j),window.removeEventListener("keydown",re)}},[M]),(0,D.useEffect)(()=>(l?.(h),()=>{h&&l?.(!1)}),[h,l]),(0,D.useEffect)(()=>{let j=b.current+1;b.current=j,k(!1);let re=e.baseUrl.trim(),W=window.ccr;if(!C||!re||e.icon||!W?.detectProviderIcon)return;let K=window.setTimeout(()=>{k(!0),W.detectProviderIcon({baseUrl:re}).then(Q=>{b.current===j&&Q.icon&&w.current({icon:Q.icon})}).catch(()=>{}).finally(()=>{b.current===j&&k(!1)})},500);return()=>window.clearTimeout(K)},[C,e.baseUrl,e.icon]);function _(j){if(!j){s({...S0(),baseUrl:"",icon:"",modelDescriptions:void 0,modelDisplayNames:void 0,modelSearch:"",presetId:j,providerPlugins:[],selectedModels:[],selectedProtocols:[]},!0);return}if(j===zi){s({...S0(),baseUrl:"",icon:"",modelDescriptions:void 0,modelDisplayNames:void 0,modelSearch:"",presetId:j,providerPlugins:[],selectedModels:[],selectedProtocols:[]},!0);return}let re=Cl(j),W=re?QL(re):void 0,K=Cl(e.presetId),Q=gGe(e.name,K,p),ue=th(dde(j));s({...ue,baseUrl:W?.baseUrl??"",icon:"",modelDescriptions:void 0,modelDisplayNames:re?.defaultModelDisplayNames,modelSearch:"",modelsText:e.modelsText.trim()||re?.defaultModels?.join(`
69
+ `)||"",name:a==="add"&&re&&Q?DR(f,p(re.name)):e.name,presetId:j,providerPlugins:[],protocol:W?.protocols[0]??e.protocol,selectedModels:[],selectedProtocols:Ou(re?.endpoints.flatMap(Ue=>Ue.protocols)??W?.protocols??[])},!0)}function B(j,re,W){let K=W.getBoundingClientRect(),Q=xGe(K);v(ue=>ue?.key===j?void 0:{item:re,key:j,...Q})}return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[n?(0,x.jsx)(uGe,{draft:e,provider:n,preset:L}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(MGe,{mode:a,onChange:s,providerPlugins:[...c,...e.providerPlugins],providers:f}),(0,x.jsxs)("div",{className:"block min-w-0 space-y-1 sm:col-span-2",children:[(0,x.jsx)("span",{className:"block truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:p("Select preset provider")}),(0,x.jsx)(lGe,{value:e.presetId,onChange:_,options:pe})]})]}),(0,x.jsx)(xe,{className:"sm:col-span-2",label:p("Name"),children:(0,x.jsx)(Te,{value:e.name,onChange:j=>s({name:j.target.value})})}),T?(0,x.jsxs)(xe,{className:"sm:col-span-2",label:p("API endpoint"),children:[(0,x.jsx)(Te,{value:e.baseUrl,onChange:j=>s({baseUrl:j.target.value,icon:""},!0)}),C?(0,x.jsxs)("div",{className:"flex min-h-4 items-center gap-1.5 text-[11px] leading-4 text-muted-foreground",children:[h?(0,x.jsx)(ct,{className:"h-3 w-3 shrink-0 animate-spin"}):null,(0,x.jsx)("span",{className:"min-w-0",children:p(h?"Detecting icon":"Enter API endpoint, API key, and at least one model to enable connectivity check.")})]}):null]}):null,(0,x.jsxs)(xe,{className:"sm:col-span-2",label:p("API key"),children:[(0,x.jsx)(Te,{type:"password",value:e.apiKey,onChange:j=>s({apiKey:j.target.value},!0)}),(0,x.jsxs)("div",{className:"flex items-start gap-1.5 text-[11px] leading-4 text-muted-foreground",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3 w-3 shrink-0"}),(0,x.jsx)("span",{children:p("Only enter an API key issued for this endpoint. Official provider keys must only be used with official endpoints.")})]})]}),oe?(0,x.jsxs)("div",{className:"sm:col-span-2 flex items-start gap-2 rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-[12px] leading-5 text-amber-900 dark:text-amber-100",children:[(0,x.jsx)(Oa,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:oe.message})]}):null,L&&!T&&!F?(0,x.jsx)("div",{className:"sm:col-span-2 rounded-md border border-border bg-muted/30 px-3 py-2 text-[12px] text-muted-foreground",children:(0,x.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,x.jsx)(nu,{className:"h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{className:"min-w-0 truncate",title:$,children:$})]})}):null,(0,x.jsxs)(xe,{className:"sm:col-span-2",label:p("Models"),children:[P&&u?(0,x.jsxs)("div",{className:"space-y-2",children:[(0,x.jsx)(LGe,{displayNames:e.modelDisplayNames,models:u.models,onQueryChange:j=>s({modelSearch:j}),onSelectedChange:j=>s({selectedModels:j}),query:e.modelSearch,selected:e.selectedModels}),(0,x.jsxs)("div",{className:"space-y-1.5",children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[(0,x.jsx)("span",{className:"block truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:p("Custom models")}),(0,x.jsx)("span",{className:"shrink-0 text-[11px] font-medium leading-4 text-muted-foreground/75",children:p("Press Enter to add")})]}),(0,x.jsx)(bce,{ariaLabel:p("Custom models"),displayNames:e.modelDisplayNames,onChange:j=>s({modelsText:j.join(`
70
+ `)}),placeholder:p("Model name"),value:Ki(e.modelsText)})]})]}):(0,x.jsx)(bce,{ariaLabel:p("Models"),displayNames:e.modelDisplayNames,onChange:j=>s({modelsText:j.join(`
71
+ `)},!0),placeholder:p("Model name"),value:Ki(e.modelsText)}),(0,x.jsx)(DGe,{descriptions:e.modelDescriptions,displayNames:e.modelDisplayNames,models:U,onChange:j=>s({modelDescriptions:j})})]}),(0,x.jsxs)("div",{className:"sm:col-span-2 flex min-w-0 flex-wrap items-center justify-between gap-2 text-[12px] text-muted-foreground",children:[(0,x.jsx)("div",{className:"min-w-0 flex-1",children:r?(0,x.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,x.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}),p("Checking connection")]}):se?(0,x.jsx)("span",{children:p("Local agent login will be connected after saving this provider.")}):P0(o)?(0,x.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-foreground",children:[(0,x.jsx)(yt,{className:"h-3.5 w-3.5"}),p("Connection verified")]}):d?(0,x.jsxs)("span",{className:"inline-flex items-center gap-1.5",children:[(0,x.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}),p("Detecting protocols")]}):P0(u)?(0,x.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-foreground",children:[(0,x.jsx)(yt,{className:"h-3.5 w-3.5"}),p("Protocols detected")]}):u?.detectedProtocol?(0,x.jsxs)("span",{className:"inline-flex items-center gap-1.5 text-foreground",children:[(0,x.jsx)(yt,{className:"h-3.5 w-3.5"}),p("Detected")]}):E?(0,x.jsx)("span",{children:p("Click Check Connection to verify connectivity with a real model request.")}):e.baseUrl.trim()||e.apiKey.trim()||Ki(e.modelsText).length>0||e.selectedModels.length>0?(0,x.jsx)("span",{children:p("Enter API endpoint, API key, and at least one model to enable connectivity check.")}):null}),(0,x.jsx)("div",{className:"flex shrink-0 flex-wrap justify-end gap-2",children:i&&E?(0,x.jsxs)(ne,{className:"h-8 px-2",disabled:r||d,onClick:()=>{i()},type:"button",variant:"outline",children:[(0,x.jsx)(br,{iconKey:r?"checking":"check",children:r?(0,x.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,x.jsx)(Oa,{className:"h-3.5 w-3.5"})}),p("Check Connection")]}):null})]}),(0,x.jsx)("div",{className:"sm:col-span-2",children:(0,x.jsxs)("button",{"aria-expanded":g,className:"inline-flex min-w-0 items-center gap-2 border-0 bg-transparent p-0 text-[12px] font-semibold text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/25",onClick:()=>m(j=>!j),type:"button",children:[(0,x.jsx)(po,{className:J("h-3.5 w-3.5 transition-transform",g&&"rotate-180")}),(0,x.jsx)("span",{children:p("Advanced settings")})]})}),(0,x.jsx)(wt,{initial:!1,children:g?(0,x.jsx)(Ru,{className:"sm:col-span-2",children:(0,x.jsxs)("div",{className:"grid grid-cols-1 gap-3 rounded-md border border-border bg-muted/20 p-3 sm:grid-cols-2",children:[L&&!C&&a==="add"?(0,x.jsx)(xe,{className:"sm:col-span-2",label:p("API endpoint"),children:(0,x.jsx)(Te,{value:e.baseUrl,onChange:j=>s({baseUrl:j.target.value},!0)})}):null,(0,x.jsx)(xe,{label:p("Detected compatibility"),children:(0,x.jsx)(Te,{readOnly:!0,value:Eu(G,p)})}),(0,x.jsx)(xe,{label:p("Detected endpoint"),children:(0,x.jsx)(Te,{readOnly:!0,value:$})}),(0,x.jsx)(wGe,{draft:e,onChange:s}),(0,x.jsx)(SGe,{customEndpoint:C,draft:e,onChange:s,probe:u}),(0,x.jsx)(xe,{className:"sm:col-span-2",label:p("Protocol details"),children:(0,x.jsx)("div",{className:"max-h-[128px] overflow-auto rounded-md border border-border bg-background p-2",children:R.length?(0,x.jsx)("div",{className:"space-y-1.5",children:R.map(j=>{let re=j.supported&&N.includes(j.protocol),W=re&&e.selectedProtocols.includes(j.protocol),K=`${j.protocol}-${j.endpoint}`;return(0,x.jsxs)("div",{className:"grid grid-cols-[20px_minmax(118px,1fr)_minmax(88px,max-content)] items-center gap-2 text-[11px]",children:[(0,x.jsx)(Ic,{"aria-label":`${p("Add")} ${Eu(j.protocol,p)}`,checked:W,disabled:!re,onCheckedChange:()=>{re&&s({selectedProtocols:W?e.selectedProtocols.filter(Q=>Q!==j.protocol):Ou([...e.selectedProtocols,j.protocol])})}}),(0,x.jsx)("span",{className:"truncate font-medium",children:Eu(j.protocol,p)}),(0,x.jsxs)("span",{className:J("inline-flex min-w-0 items-center justify-end gap-1.5",j.supported?"text-emerald-600 dark:text-emerald-300":"text-muted-foreground"),children:[(0,x.jsx)("span",{className:"truncate",children:j.supported?p("Available"):p("Unavailable")}),(0,x.jsx)("button",{"aria-label":p("Protocol detection details"),"aria-pressed":M?.key===K,className:J("inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/30",M?.key===K&&"bg-muted text-foreground"),onClick:Q=>{Q.stopPropagation(),B(K,j,Q.currentTarget)},onMouseDown:Q=>Q.stopPropagation(),title:p("Protocol detection details"),type:"button",children:(0,x.jsx)(al,{className:"h-3.5 w-3.5","aria-hidden":"true"})})]})]},K)})}):(0,x.jsx)("div",{className:"text-[11px] text-muted-foreground",children:(0,x.jsx)("span",{children:p("No protocol detection yet")})})})})]})},"provider-advanced"):null}),M?(0,x.jsx)(bGe,{item:M.item,left:M.left,top:M.top,t:p}):null]}),t?(0,x.jsxs)("div",{className:"mt-3 flex items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:t})]}):null]})}function yGe(e){let t=new Map;for(let r of e){let o=`${r.protocol}
72
+ ${r.endpoint}`,n=t.get(o);(!n||!n.supported&&r.supported)&&t.set(o,r)}return[...t.values()]}function xGe(e){let n=Math.min(Math.max(12,e.right-260),window.innerWidth-260-12),a=e.bottom+8,i=e.top-160-8,s=a+160>window.innerHeight&&i>12?i:Math.min(a,window.innerHeight-160-12);return{left:n,top:Math.max(12,s)}}function bGe({item:e,left:t,t:r,top:o}){let n=e.status===void 0?"-":`HTTP ${e.status}`,a=LR(e.message,r)||"-";return(0,x.jsxs)("div",{className:"fixed z-[120] w-[260px] rounded-md border border-border bg-popover p-2.5 text-left text-[11px] leading-4 text-popover-foreground shadow-card-elevated",onMouseDown:i=>i.stopPropagation(),role:"tooltip",style:{left:t,top:o},children:[(0,x.jsx)("div",{className:"mb-1.5 font-semibold",children:r("Protocol detection details")}),(0,x.jsxs)("div",{className:"grid grid-cols-[76px_minmax(0,1fr)] gap-x-2 gap-y-1",children:[(0,x.jsx)("span",{className:"text-muted-foreground",children:r("HTTP status")}),(0,x.jsx)("span",{className:"min-w-0 truncate font-mono",children:n}),(0,x.jsx)("span",{className:"text-muted-foreground",children:r("Error message")}),(0,x.jsx)("span",{className:"min-w-0 break-words",children:a})]})]})}function wGe({draft:e,onChange:t}){let r=ve(),o=Rc(),n=(0,D.useRef)(null),[a,i]=(0,D.useState)(!1),[s,l]=(0,D.useState)("");function u(){t({credentials:[...e.credentials,ide(e.credentials.length)]}),l("")}function d(p,g){t({credentials:e.credentials.map((m,h)=>h===p?{...m,...g}:m)})}function c(p){t({credentials:e.credentials.filter((g,m)=>m!==p)})}async function f(p){if(p)try{let g=await p.text(),m=lde(g);if(typeof m=="string"){l(o(new Error(m)));return}t(m),l("")}catch(g){l(o(g))}finally{n.current&&(n.current.value="")}}return(0,x.jsxs)("div",{className:"sm:col-span-2 space-y-3 rounded-md border border-border bg-background/60 p-3",children:[(0,x.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[(0,x.jsxs)("div",{className:"min-w-0",children:[(0,x.jsx)(pa,{className:"text-[12px] font-semibold",children:r("Credential pool")}),(0,x.jsx)("div",{className:"mt-0.5 text-[11px] leading-4 text-muted-foreground",children:r("Configure multiple provider API keys for this supplier.")})]}),(0,x.jsxs)(pa,{className:"flex shrink-0 items-center gap-2 text-[12px] font-medium text-muted-foreground",children:[(0,x.jsx)("span",{children:r("Show credential settings")}),(0,x.jsx)(Du,{"aria-label":r("Show credential settings"),checked:a,onCheckedChange:i})]})]}),a?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)("div",{className:"flex min-w-0 flex-wrap justify-end gap-2",children:[(0,x.jsx)("input",{accept:".json,application/json",className:"hidden",onChange:p=>{f(p.target.files?.[0])},ref:n,type:"file"}),(0,x.jsxs)(ne,{className:"h-8 px-2",onClick:()=>n.current?.click(),type:"button",variant:"outline",children:[(0,x.jsx)(Na,{className:"h-3.5 w-3.5"}),r("Import JSON")]}),(0,x.jsxs)(ne,{className:"h-8 px-2",onClick:u,type:"button",variant:"outline",children:[(0,x.jsx)(It,{className:"h-3.5 w-3.5"}),r("Add key")]})]}),e.credentials.length===0?(0,x.jsx)("div",{className:"rounded-md border border-dashed border-border bg-muted/30 px-3 py-4 text-center text-[12px] text-muted-foreground",children:r("No provider credentials configured")}):(0,x.jsx)("div",{className:"space-y-2",children:e.credentials.map((p,g)=>(0,x.jsx)(CGe,{credential:p,index:g,onChange:m=>d(g,m),onRemove:()=>c(g)},`credential-${g}`))}),s?(0,x.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:r(s)})]}):null]}):null]})}function CGe({credential:e,index:t,onChange:r,onRemove:o}){let n=ve(),a=e.name||`key-${t+1}`,[i,s]=(0,D.useState)(()=>!!(e.limitsText.trim()||e.priority.trim()||e.weight.trim()));return(0,x.jsxs)("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:[(0,x.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[auto_minmax(140px,0.75fr)_minmax(180px,1fr)_auto]",children:[(0,x.jsx)("div",{className:"flex items-end pb-2",children:(0,x.jsx)(Ic,{"aria-label":`${n("Enable")} ${a}`,checked:e.enabled,onCheckedChange:l=>r({enabled:l})})}),(0,x.jsx)(xe,{label:n("Name"),children:(0,x.jsx)(Te,{value:e.name,onChange:l=>r({name:l.target.value})})}),(0,x.jsx)(xe,{label:n("API key"),children:(0,x.jsx)(Te,{type:"password",value:e.apiKey,onChange:l=>r({apiKey:l.target.value})})}),(0,x.jsx)("div",{className:"flex items-end justify-end",children:(0,x.jsx)(ne,{"aria-label":`${n("Remove")} ${a}`,onClick:o,size:"iconSm",title:n("Remove"),type:"button",variant:"ghost",children:(0,x.jsx)(ar,{className:"h-3.5 w-3.5"})})})]}),(0,x.jsxs)(ne,{"aria-expanded":i,className:"mt-3 flex h-8 w-full items-center justify-between gap-3 rounded-md border border-border bg-background px-3 text-left text-[12px] font-medium transition-colors hover:bg-muted/40",onClick:()=>s(l=>!l),type:"button",unstyled:!0,children:[(0,x.jsx)("span",{className:"min-w-0 truncate",children:n("Advanced key options")}),(0,x.jsx)(po,{className:J("h-4 w-4 shrink-0 text-muted-foreground transition-transform",i&&"rotate-180")})]}),(0,x.jsx)(wt,{initial:!1,children:i?(0,x.jsx)(Ru,{children:(0,x.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 border-t border-border/60 pt-3 sm:grid-cols-2",children:[(0,x.jsx)(xe,{label:n("Priority"),children:(0,x.jsx)(Te,{min:1,placeholder:String(t+1),type:"number",value:e.priority,onChange:l=>r({priority:l.target.value})})}),(0,x.jsx)(xe,{label:n("Weight"),children:(0,x.jsx)(Te,{min:1,placeholder:"1",type:"number",value:e.weight,onChange:l=>r({weight:l.target.value})})}),(0,x.jsx)(xe,{className:"sm:col-span-2",label:n("Limits JSON"),children:(0,x.jsx)(ji,{className:"min-h-[76px] font-mono text-[11px]",placeholder:`{
73
+ "rpm": 60,
74
+ "tpm": 100000
75
+ }`,value:e.limitsText,onChange:l=>r({limitsText:l.target.value})})})]})},"credential-row-advanced"):null})]})}function SGe({customEndpoint:e,draft:t,onChange:r,probe:o}){let n=ve(),a=Rc(),[i,s]=(0,D.useState)(!1),[l,u]=(0,D.useState)(),[d,c]=(0,D.useState)(""),[f,p]=(0,D.useState)(""),g=Ht(NW,n),m=o?.detectedProvider==="new-api"||t.accountConnectorsText.includes("new-api-key-usage")||t.accountConnectorsText.includes("new-api-user-self");(0,D.useEffect)(()=>{u(void 0),c("")},[t.accountMode,t.usageRequestUrl,t.usageRequestMethod]);async function h(){if(!window.ccr?.testProviderAccountConnector){c(n("Request failed."));return}let v=D4(t,{requireMeters:!1});if(typeof v=="string"){c(a(new Error(v)));return}let b=R4(v,{apiKey:t.apiKey,baseUrl:(o?.normalizedBaseUrl||t.baseUrl).trim(),providerName:t.name.trim(),providerPresetId:t.presetId});if(b){c(a(new Error(b.message)));return}s(!0),c("");try{let w=await window.ccr.testProviderAccountConnector({apiKey:t.apiKey.trim(),baseUrl:t.baseUrl.trim(),connector:v,providerName:t.name.trim()});u(w)}catch(w){u(void 0),c(a(w))}finally{s(!1)}}function k(v,b){r(ude(v,b))}function M(){r({accountConnectorsText:fde(t.accountConnectorsText,o?.normalizedBaseUrl||t.baseUrl,f)})}return(0,x.jsxs)("div",{className:"sm:col-span-2 space-y-3 rounded-md border border-border bg-background/60 p-3",children:[(0,x.jsx)("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:(0,x.jsxs)(pa,{className:"flex min-w-0 items-center gap-2 text-[12px] font-semibold",children:[(0,x.jsx)(Ic,{checked:t.accountEnabled,onCheckedChange:v=>r({accountEnabled:v})}),(0,x.jsx)("span",{className:"min-w-0 truncate",children:n("Fetch usage")})]})}),t.accountEnabled?(0,x.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,x.jsx)(xe,{label:n("Usage mode"),children:(0,x.jsx)(St,{onChange:v=>r({accountMode:v}),options:g,value:t.accountMode})}),(0,x.jsx)(xe,{label:n("Refresh interval ms"),children:(0,x.jsx)(Te,{min:3e4,placeholder:"300000",type:"number",value:t.accountRefreshIntervalMs,onChange:v=>r({accountRefreshIntervalMs:v.target.value})})}),t.accountMode==="standard"?(0,x.jsxs)("div",{className:"sm:col-span-2 rounded-md border border-border bg-muted/30 px-3 py-2 text-[11px] leading-4 text-muted-foreground",children:[n("Standard usage endpoint will try provider-hosted CCR account endpoints."),e?(0,x.jsxs)("span",{children:[" ",n("Switch to HTTP JSON request to configure method, URL, headers, body, and response fields.")]}):null]}):null,t.accountMode==="http-json"?(0,x.jsxs)("div",{className:"sm:col-span-2 grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,x.jsx)(xe,{label:n("Method"),children:(0,x.jsx)(St,{onChange:v=>r({usageRequestMethod:v}),options:TW,value:t.usageRequestMethod})}),(0,x.jsx)(xe,{label:n("Usage request URL"),children:(0,x.jsx)(Te,{placeholder:"https://api.vendor.com/account",value:t.usageRequestUrl,onChange:v=>r({usageRequestUrl:v.target.value})})}),(0,x.jsx)(xe,{className:"sm:col-span-2",label:n("Headers"),children:(0,x.jsx)($i,{addLabel:n("Add header"),rows:t.usageRequestHeaders,onChange:v=>r({usageRequestHeaders:v})})}),(0,x.jsx)(xe,{className:"sm:col-span-2",label:n("Body"),children:(0,x.jsx)(ji,{className:"min-h-[92px] font-mono text-[11px]",placeholder:`{
76
+ "query": "usage"
77
+ }`,value:t.usageRequestBodyText,onChange:v=>r({usageRequestBodyText:v.target.value})})}),(0,x.jsx)(xe,{label:n("Balance remaining field"),children:(0,x.jsx)(Te,{placeholder:"$.balance.remaining",value:t.usageBalanceRemainingPath,onChange:v=>r({usageBalanceRemainingPath:v.target.value})})}),(0,x.jsx)(xe,{label:n("Balance total field"),children:(0,x.jsx)(Te,{placeholder:"$.totalCredits",value:t.usageBalanceLimitPath,onChange:v=>r({usageBalanceLimitPath:v.target.value})})}),(0,x.jsx)(xe,{label:n("Balance used field"),children:(0,x.jsx)(Te,{placeholder:"$.totalUsage",value:t.usageBalanceUsedPath,onChange:v=>r({usageBalanceUsedPath:v.target.value})})}),(0,x.jsx)(xe,{label:n("Balance unit"),children:(0,x.jsx)(Te,{placeholder:"USD",value:t.usageBalanceUnit,onChange:v=>r({usageBalanceUnit:v.target.value})})}),(0,x.jsx)(xe,{label:n("Subscription remaining field"),children:(0,x.jsx)(Te,{placeholder:"$.subscription.remaining",value:t.usageSubscriptionRemainingPath,onChange:v=>r({usageSubscriptionRemainingPath:v.target.value})})}),(0,x.jsx)(xe,{label:n("Subscription limit field"),children:(0,x.jsx)(Te,{placeholder:"$.subscription.limit",value:t.usageSubscriptionLimitPath,onChange:v=>r({usageSubscriptionLimitPath:v.target.value})})}),(0,x.jsx)(xe,{label:n("Subscription reset field"),children:(0,x.jsx)(Te,{placeholder:"$.subscription.resetAt",value:t.usageSubscriptionResetPath,onChange:v=>r({usageSubscriptionResetPath:v.target.value})})}),(0,x.jsx)(xe,{label:n("Subscription unit"),children:(0,x.jsx)(Te,{placeholder:"tokens",value:t.usageSubscriptionUnit,onChange:v=>r({usageSubscriptionUnit:v.target.value})})}),(0,x.jsx)(xe,{label:n("Status field"),children:(0,x.jsx)(Te,{placeholder:"$.status",value:t.usageStatusPath,onChange:v=>r({usageStatusPath:v.target.value})})}),(0,x.jsx)(xe,{label:n("Message field"),children:(0,x.jsx)(Te,{placeholder:"$.message",value:t.usageMessagePath,onChange:v=>r({usageMessagePath:v.target.value})})}),(0,x.jsxs)("div",{className:"sm:col-span-2 flex flex-wrap items-center gap-2",children:[(0,x.jsxs)(ne,{disabled:i,onClick:()=>{h()},size:"sm",type:"button",variant:"outline",children:[(0,x.jsx)(br,{iconKey:i?"testing":"check",children:i?(0,x.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,x.jsx)(Oa,{className:"h-3.5 w-3.5"})}),n("Test usage request")]}),l?(0,x.jsxs)(gt,{variant:l.meters.length>0?"success":"outline",children:[l.meters.length," ",n("meters")]}):null]}),l?(0,x.jsx)(PGe,{result:l,onSelectPath:k}):null]}):null,t.accountMode==="raw"?(0,x.jsxs)("div",{className:"sm:col-span-2 space-y-2",children:[(0,x.jsxs)(xe,{label:n("Connectors JSON"),children:[(0,x.jsx)(ji,{className:"min-h-[180px] font-mono text-[11px]",value:t.accountConnectorsText,onChange:v=>r({accountConnectorsText:v.target.value})}),(0,x.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 text-[11px] text-muted-foreground",children:[(0,x.jsx)("span",{className:"min-w-0 truncate",children:n("Supports standard, http-json, plugin, and local-estimate connectors.")}),(0,x.jsx)("button",{className:"shrink-0 text-primary hover:underline",type:"button",onClick:()=>r({accountConnectorsText:cde()}),children:n("Insert example")})]})]}),m?(0,x.jsxs)("div",{className:"grid grid-cols-1 items-end gap-2 rounded-md border border-border/60 bg-muted/20 p-2 sm:grid-cols-[minmax(0,1fr)_auto]",children:[(0,x.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,x.jsx)(pa,{className:"text-[11px] font-medium text-muted-foreground",children:n("New API user ID")}),(0,x.jsx)(Te,{placeholder:"<user-id>",value:f,onChange:v=>p(v.target.value)})]}),(0,x.jsx)(ne,{size:"sm",type:"button",variant:"outline",onClick:M,children:n("Insert New API user balance")})]}):null]}):null]}):null,d?(0,x.jsxs)("div",{className:"flex items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:n(d)})]}):null]})}function PGe({onSelectPath:e,result:t}){let r=ve(),o=t.paths.slice(0,120);return(0,x.jsxs)("div",{className:"sm:col-span-2 rounded-md border border-border bg-muted/20",children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 border-b border-border px-3 py-2",children:[(0,x.jsx)("div",{className:"min-w-0 truncate text-[12px] font-semibold",children:r("Response fields")}),(0,x.jsx)(gt,{variant:"outline",children:t.paths.length})]}),o.length===0?(0,x.jsx)("div",{className:"px-3 py-6 text-center text-[12px] text-muted-foreground",children:r("No response fields")}):(0,x.jsxs)("div",{className:"max-h-[260px] overflow-auto p-2",children:[(0,x.jsx)("div",{className:"space-y-1.5",children:o.map(n=>(0,x.jsx)(AGe,{item:n,onSelectPath:e},n.path))}),t.paths.length>o.length?(0,x.jsx)("div",{className:"px-1 py-2 text-[11px] text-muted-foreground",children:r("Showing first response fields only.")}):null]})]})}function AGe({item:e,onSelectPath:t}){let r=ve();return(0,x.jsxs)("div",{className:"grid min-w-0 grid-cols-[minmax(180px,1fr)_minmax(120px,0.6fr)_auto] items-center gap-2 rounded-md border border-border bg-background px-2 py-1.5 text-[11px]",children:[(0,x.jsxs)("div",{className:"min-w-0",children:[(0,x.jsx)("div",{className:"truncate font-mono font-semibold",title:e.path,children:e.path}),(0,x.jsx)("div",{className:"truncate text-muted-foreground",title:e.preview,children:e.preview})]}),(0,x.jsx)(gt,{className:"justify-self-start",variant:"outline",children:e.type}),(0,x.jsxs)("div",{className:"flex flex-wrap justify-end gap-1",children:[(0,x.jsx)(ne,{className:"h-6 px-1.5 text-[10px]",onClick:()=>t("balance",e.path),type:"button",variant:"outline",children:r("Balance rem")}),(0,x.jsx)(ne,{className:"h-6 px-1.5 text-[10px]",onClick:()=>t("balanceLimit",e.path),type:"button",variant:"outline",children:r("Balance total")}),(0,x.jsx)(ne,{className:"h-6 px-1.5 text-[10px]",onClick:()=>t("balanceUsed",e.path),type:"button",variant:"outline",children:r("Balance used")}),(0,x.jsx)(ne,{className:"h-6 px-1.5 text-[10px]",onClick:()=>t("subscriptionRemaining",e.path),type:"button",variant:"outline",children:r("Sub rem")}),(0,x.jsx)(ne,{className:"h-6 px-1.5 text-[10px]",onClick:()=>t("subscriptionLimit",e.path),type:"button",variant:"outline",children:r("Sub limit")}),(0,x.jsx)(ne,{className:"h-6 px-1.5 text-[10px]",onClick:()=>t("subscriptionReset",e.path),type:"button",variant:"outline",children:r("Reset")})]})]})}function i5({canSubmit:e,connectivityLoading:t=!1,connectivityProbe:r,draft:o,error:n,importProvider:a,mode:i,onCheck:s,onChange:l,onClose:u,onSubmit:d,probe:c,probeLoading:f,providerPlugins:p=[],providers:g,submitLabel:m,title:h}){let k=ve(),[M,v]=(0,D.useState)(!1),[b,w]=(0,D.useState)(!1),[P,L]=(0,D.useState)(!1),[C,F]=(0,D.useState)(!1),[T,G]=(0,D.useState)([]),[$,oe]=(0,D.useState)(),se=ho(o.selectedModels,Ki(o.modelsText)),pe=f||t||P||C,N=!e||pe;function R(){G(se),oe(void 0),v(!0)}async function U(){if(s){w(!0);try{oe(await s(T))}finally{w(!1)}}}function E(B){G(j=>j.includes(B)?j.filter(re=>re!==B):ho(j,[B])),oe(void 0)}async function _(){if(!N){F(!0);try{await d()||F(!1)}catch(B){throw F(!1),B}}}return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Ft,{className:"items-start",onOpenChange:B=>!B&&!C&&u(),children:(0,x.jsxs)(Tt,{className:"mt-[clamp(8px,2dvh,20px)] h-[calc(100dvh-1.5rem-clamp(8px,2dvh,20px))] max-w-[820px] origin-top sm:mt-[clamp(8px,3dvh,28px)] sm:h-[min(860px,calc(100dvh-3rem-clamp(8px,3dvh,28px)))]",children:[(0,x.jsxs)(Bt,{children:[(0,x.jsx)("div",{className:"min-w-0",children:(0,x.jsx)(Vt,{children:h??k(i==="edit"?"Edit Provider":"Add Provider")})}),(0,x.jsx)(ne,{"aria-label":k("Close dialog"),disabled:C,onClick:u,size:"iconSm",title:k("Close"),type:"button",variant:"ghost",children:(0,x.jsx)(ft,{className:"h-4 w-4"})})]}),(0,x.jsx)(Ot,{children:(0,x.jsx)(zR,{connectivityLoading:t,connectivityProbe:r,draft:o,error:n,importProvider:a,mode:i,onCheck:s?async()=>R():void 0,onChange:l,onIconDetectingChange:L,probe:c,probeLoading:f,providerPlugins:p,providers:g})}),(0,x.jsxs)($t,{children:[(0,x.jsx)(ne,{disabled:C,onClick:u,type:"button",variant:"outline",children:k("Cancel")}),(0,x.jsxs)(ne,{disabled:N,onClick:()=>{_()},type:"button",children:[(0,x.jsx)(br,{iconKey:pe?"loading":i,children:pe?(0,x.jsx)(ct,{className:"h-4 w-4 animate-spin"}):i==="edit"?(0,x.jsx)(yt,{className:"h-4 w-4"}):(0,x.jsx)(It,{className:"h-4 w-4"})}),pe?k("Loading"):m??k(i==="edit"?"Save":"Add")]})]})]})}),M?(0,x.jsx)(Ft,{className:"z-[60]",onOpenChange:B=>!B&&!b&&v(!1),children:(0,x.jsxs)(Tt,{className:"max-w-[520px]",children:[(0,x.jsxs)(Bt,{children:[(0,x.jsx)("div",{className:"min-w-0",children:(0,x.jsx)(Vt,{children:k("Check Connection")})}),(0,x.jsx)(ne,{"aria-label":k("Close dialog"),disabled:b,onClick:()=>v(!1),size:"iconSm",title:k("Close"),type:"button",variant:"ghost",children:(0,x.jsx)(ft,{className:"h-4 w-4"})})]}),(0,x.jsx)(Ot,{children:(0,x.jsxs)("div",{className:"space-y-3",children:[(0,x.jsxs)("div",{className:"rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2.5",children:[(0,x.jsxs)("div",{className:"flex items-start gap-2 text-[12px] font-medium text-amber-900 dark:text-amber-100",children:[(0,x.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,x.jsx)("span",{children:k("This check sends real model requests with your provider API key and may consume account balance.")})]}),(0,x.jsx)("div",{className:"mt-2 text-[11px] leading-4 text-muted-foreground",children:k("Generated output is limited to 1 token for connectivity checks.")})]}),(0,x.jsxs)("div",{className:"rounded-md border border-border bg-background p-2",children:[(0,x.jsxs)("div",{className:"mb-2 flex min-w-0 flex-wrap items-center justify-between gap-2",children:[(0,x.jsx)("div",{className:"min-w-0 truncate text-[12px] font-semibold",children:k("Models to check")}),(0,x.jsxs)("div",{className:"flex shrink-0 gap-1",children:[(0,x.jsx)(ne,{className:"h-6 px-1.5 text-[10px]",disabled:b||t||se.length===0,onClick:()=>{G(se),oe(void 0)},type:"button",variant:"outline",children:k("All")}),(0,x.jsx)(ne,{className:"h-6 px-1.5 text-[10px]",disabled:b||t||T.length===0,onClick:()=>{G([]),oe(void 0)},type:"button",variant:"outline",children:k("Clear")})]})]}),(0,x.jsx)("div",{className:"max-h-[180px] overflow-auto",children:(0,x.jsx)("div",{className:"grid grid-cols-1 gap-2",children:se.map(B=>{let j=T.includes(B);return(0,x.jsxs)(pa,{className:J("flex min-h-8 min-w-0 cursor-pointer items-center gap-2 rounded-md border border-border bg-background px-2 py-1.5 text-left text-[12px] transition-colors hover:bg-muted",j&&"border-primary bg-accent"),children:[(0,x.jsx)(Ic,{checked:j,disabled:b||t,onCheckedChange:()=>E(B)}),(0,x.jsx)("span",{className:"min-w-0 flex-1 truncate font-mono text-[11px]",title:B,children:B})]},B)})})})]}),$?(0,x.jsx)(IGe,{result:$}):null]})}),(0,x.jsxs)($t,{children:[(0,x.jsx)(ne,{disabled:b,onClick:()=>v(!1),type:"button",variant:"outline",children:k($?"Close":"Cancel")}),(0,x.jsxs)(ne,{disabled:b||t||T.length===0,onClick:()=>{U()},type:"button",children:[(0,x.jsx)(br,{iconKey:b||t?"checking":"start",children:b||t?(0,x.jsx)(ct,{className:"h-4 w-4 animate-spin"}):(0,x.jsx)(Oa,{className:"h-4 w-4"})}),k("Start check")]})]})]})}):null]})}function IGe({result:e}){let t=ve();return(0,x.jsxs)("div",{className:"rounded-md border border-border bg-muted/20",children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 border-b border-border px-3 py-2",children:[(0,x.jsx)("div",{className:"min-w-0 truncate text-[12px] font-semibold",children:t("Check results")}),(0,x.jsxs)("div",{className:"flex shrink-0 gap-1",children:[(0,x.jsxs)(gt,{variant:e.passed.length>0?"success":"outline",children:[e.passed.length," ",t("Available")]}),(0,x.jsxs)(gt,{variant:e.failed.length>0?"warning":"outline",children:[e.failed.length," ",t("Unavailable")]})]})]}),(0,x.jsxs)("div",{className:"max-h-[220px] overflow-auto p-2",children:[(0,x.jsx)(xce,{emptyLabel:t("No available models"),items:e.passed,label:t("Available models"),variant:"success"}),(0,x.jsx)(xce,{className:"mt-2",emptyLabel:t("No unavailable models"),items:e.failed,label:t("Unavailable models"),variant:"warning"})]})]})}function xce({className:e,emptyLabel:t,items:r,label:o,variant:n}){let a=ve();return(0,x.jsxs)("div",{className:e,children:[(0,x.jsx)("div",{className:"mb-1 min-w-0 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:(0,x.jsx)("span",{className:"min-w-0 truncate",children:o})}),r.length===0?(0,x.jsx)("div",{className:"rounded-md border border-dashed border-border bg-background/70 px-2 py-2 text-center text-[11px] text-muted-foreground",children:t}):(0,x.jsx)("div",{className:"space-y-1.5",children:r.map(i=>{let s=i.protocols.filter(l=>l.supported);return(0,x.jsxs)("div",{className:"min-w-0 rounded-md border border-border bg-background px-2 py-1.5 text-[11px]",children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[(0,x.jsx)("span",{className:"min-w-0 truncate font-mono font-semibold",title:i.model,children:i.model}),(0,x.jsx)(gt,{variant:n,children:i.supported?a("Available"):a("Unavailable")})]}),(0,x.jsx)("div",{className:"mt-1 truncate text-muted-foreground",title:LR(i.message,a),children:LR(i.message,a)}),s.length>0?(0,x.jsx)("div",{className:"mt-1 flex flex-wrap gap-1",children:s.map(l=>(0,x.jsx)(gt,{variant:"outline",children:Eu(l.protocol,a)},`${i.model}:${l.protocol}:${l.endpoint}`))}):null]},i.model)})})]})}function bce({ariaLabel:e,displayNames:t,onChange:r,placeholder:o,value:n}){let a=ve(),[i,s]=(0,D.useState)(""),l=ho(n);function u(c=i){let f=yde(c);f.length!==0&&(r(ho(l,f)),s(""))}function d(c){r(l.filter(f=>f!==c))}return(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(Te,{"aria-label":e,onChange:c=>s(c.target.value),onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),u())},placeholder:o,value:i}),l.length>0?(0,x.jsx)("div",{className:"flex max-h-[120px] flex-wrap gap-1.5 overflow-auto",children:l.map(c=>{let f=t?.[c]??c;return(0,x.jsxs)(gt,{className:"max-w-full pr-1",variant:"secondary",children:[(0,x.jsx)("span",{className:"min-w-0 max-w-[260px] truncate",title:f,children:f}),(0,x.jsx)("button",{"aria-label":`${a("Remove model")} ${f}`,className:"inline-flex h-4 w-4 shrink-0 items-center justify-center rounded-full text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/25",onClick:()=>d(c),title:a("Remove model"),type:"button",children:(0,x.jsx)(ft,{className:"h-3 w-3"})})]},c)})}):null]})}function DGe({descriptions:e,displayNames:t,models:r,onChange:o}){let n=ve(),a=ho(r);if(a.length===0)return null;function i(s,l){let u={};for(let d of a){let c=(d===s?l:e?.[d]??"").trim();c&&(u[d]=c)}o(Object.keys(u).length>0?u:void 0)}return(0,x.jsxs)("div",{className:"space-y-2 rounded-md border border-border bg-muted/20 p-2",children:[(0,x.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[(0,x.jsx)("span",{className:"block truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:n("Model descriptions")}),(0,x.jsx)("span",{className:"shrink-0 text-[11px] leading-4 text-muted-foreground/75",children:n("Used in Agent routing prompts")})]}),(0,x.jsx)("div",{className:"grid grid-cols-1 gap-2",children:a.map(s=>{let l=t?.[s]?.trim()||s;return(0,x.jsxs)("div",{className:"grid grid-cols-1 gap-1 sm:grid-cols-[minmax(0,180px)_minmax(0,1fr)] sm:items-start",children:[(0,x.jsx)(pa,{className:"min-h-8 min-w-0 pt-1.5 text-[12px] font-medium text-foreground",title:s,children:(0,x.jsx)("span",{className:"block truncate",children:l})}),(0,x.jsx)(ji,{className:"min-h-[58px] resize-y text-[12px]",onChange:u=>i(s,u.target.value),placeholder:n("Describe model strengths, tradeoffs, and best-fit tasks."),value:e?.[s]??""})]},s)})})]})}function LGe({displayNames:e,models:t,onQueryChange:r,onSelectedChange:o,query:n,selected:a}){let i=ve(),s=n.trim().toLowerCase(),l=s?t.filter(c=>c.toLowerCase().includes(s)||(e?.[c]??"").toLowerCase().includes(s)):t;function u(c){o(a.includes(c)?a.filter(f=>f!==c):[...a,c])}function d(){o(Array.from(new Set([...a,...l])))}return(0,x.jsxs)("div",{className:"rounded-md border border-input bg-card",children:[(0,x.jsxs)("div",{className:"flex flex-wrap items-center gap-2 border-b border-border p-2",children:[(0,x.jsxs)("div",{className:"relative min-w-[180px] flex-1",children:[(0,x.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,x.jsx)(Te,{"aria-label":i("Search models"),className:"pl-8",onChange:c=>r(c.target.value),placeholder:i("Search models"),value:n})]}),(0,x.jsx)(ne,{disabled:l.length===0,onClick:d,size:"sm",type:"button",variant:"outline",children:i("All")}),(0,x.jsx)(ne,{disabled:a.length===0,onClick:()=>o([]),size:"sm",type:"button",variant:"outline",children:i("Clear")})]}),(0,x.jsxs)("div",{className:"max-h-[220px] overflow-auto p-2",children:[l.length===0?(0,x.jsx)("div",{className:"rounded-lg border border-dashed border-border bg-muted/30 px-3 py-6 text-center text-[12px] text-muted-foreground",children:i("No matching models")}):null,(0,x.jsx)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:l.map(c=>{let f=a.includes(c),p=e?.[c];return(0,x.jsxs)(pa,{className:J("flex h-8 min-w-0 cursor-pointer items-center gap-2 rounded-md border border-border bg-background px-2 text-left text-[12px] transition-colors hover:bg-muted",f&&"border-primary bg-accent"),title:p??c,children:[(0,x.jsx)(Ic,{checked:f,onCheckedChange:()=>u(c)}),(0,x.jsx)("span",{className:"min-w-0 flex-1 truncate",children:p??c})]},c)})})]})]})}var ee=z(ze());function u5({addProfile:e,applyError:t,copyProfileCliCommand:r,config:o,editProfile:n,openProfileApp:a,profileActionBusy:i,profileRuntimeStatus:s,removeProfile:l,stopProfileApp:u,updateProfileItem:d}){let c=ve(),f=o.profile.profiles;return(0,ee.jsx)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 min-w-0 flex-col",initial:{opacity:0},transition:{duration:.15},children:(0,ee.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,ee.jsx)(Gr,{children:(0,ee.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center justify-between gap-3",children:[(0,ee.jsxs)("div",{className:"min-w-0",children:[(0,ee.jsx)(fn,{children:c("Agent access")}),(0,ee.jsx)("p",{className:"mt-1 text-[12px] text-muted-foreground",children:c("Choose where each agent uses CCR.")})]}),(0,ee.jsx)("div",{className:"flex shrink-0 items-center gap-2",children:(0,ee.jsxs)(ne,{onClick:()=>e(),size:"sm",type:"button",children:[(0,ee.jsx)(It,{className:"h-3.5 w-3.5"}),c("Add profile")]})})]})}),(0,ee.jsxs)(nr,{className:"min-h-0 flex-1 space-y-4 overflow-auto",children:[(0,ee.jsxs)("div",{className:"space-y-2",children:[f.length===0?(0,ee.jsx)("div",{className:"flex h-32 items-center justify-center rounded-md border border-dashed border-border bg-muted/20 text-[12px] text-muted-foreground",children:c("No profiles configured")}):null,f.map((p,g)=>{let m=sh(p.scope),h=p.agent==="zcode"?"app":Sm(p.surface),k=Hc(p),M=Vde(p,o,c),v=i?.profileId===p.id&&i.surface==="cli",b=i?.profileId===p.id&&i.surface==="app",w=s.profiles.some(G=>G.profileId===p.id&&G.surface==="app"&&G.state==="running"),L=`${c(w?"Stop":"Start")} ${c("App")}`,C=`${c("Copy")} ${c("CLI command")}`,F=p.enabled,T=!!i;return(0,ee.jsx)("div",{className:"rounded-md border border-border bg-muted/20 p-3",children:(0,ee.jsxs)("div",{className:"flex min-w-0 flex-wrap items-start justify-between gap-2",children:[(0,ee.jsxs)("div",{className:"flex min-w-0 flex-1 items-start gap-2",children:[(0,ee.jsx)(O0,{agent:p.agent}),(0,ee.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,ee.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[(0,ee.jsx)("span",{className:"min-w-0 max-w-[180px] truncate text-[13px] font-semibold sm:max-w-[260px] md:max-w-[320px]",children:p.name||c("Unnamed")}),(0,ee.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-1.5",children:[p.enabled?null:(0,ee.jsx)(gt,{variant:"outline",children:c("Disabled")}),(0,ee.jsx)(gt,{variant:"secondary",children:c(va(p.agent))}),(0,ee.jsx)(gt,{variant:m==="ccr"?"success":m==="global"?"warning":"outline",children:c(Gde(m))}),(0,ee.jsx)(gt,{variant:"outline",children:c(jde(h))})]})]}),(0,ee.jsx)("div",{className:"mt-2 min-w-0 space-y-1.5",children:M.map(G=>(0,ee.jsxs)("div",{className:"grid min-w-0 grid-cols-[96px_minmax(0,1fr)] items-baseline gap-2 text-[12px] sm:grid-cols-[128px_minmax(0,1fr)]",children:[(0,ee.jsx)("div",{className:"truncate text-muted-foreground",children:G.label}),(0,ee.jsx)("div",{className:"min-w-0 truncate font-medium text-foreground",title:G.value,children:G.value})]},G.label))})]})]}),(0,ee.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,ee.jsx)(Co,{checked:p.enabled,onChange:G=>d(g,{enabled:G})}),F&&k.includes("cli")?(0,ee.jsx)(Sce,{label:C,children:(0,ee.jsx)(ne,{"aria-label":`${C} ${p.name||c("Profile")}`,disabled:T,onClick:()=>r(g),size:"iconSm",type:"button",variant:"ghost",children:(0,ee.jsx)(br,{iconKey:v?"busy":"terminal",children:v?(0,ee.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,ee.jsx)(vk,{className:"h-3.5 w-3.5"})})})}):null,F&&k.includes("app")?(0,ee.jsx)(Sce,{label:L,children:(0,ee.jsx)(ne,{"aria-label":`${L} ${p.name||c("Profile")}`,disabled:T,onClick:()=>w?u(g):a(g),size:"iconSm",type:"button",variant:w?"outline":"ghost",children:(0,ee.jsx)(br,{iconKey:b?"busy":w?"stop":"play",children:b?(0,ee.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):w?(0,ee.jsx)(il,{className:"h-3.5 w-3.5"}):(0,ee.jsx)(ks,{className:"h-3.5 w-3.5"})})})}):null,(0,ee.jsx)(ne,{"aria-label":`${c("Edit")} ${p.name||c("Profile")}`,onClick:()=>n(g),size:"iconSm",title:c("Edit"),type:"button",variant:"ghost",children:(0,ee.jsx)(No,{className:"h-3.5 w-3.5"})}),(0,ee.jsx)(ne,{"aria-label":c("Remove profile"),onClick:()=>l(g),size:"iconSm",title:c("Remove profile"),type:"button",variant:"ghost",children:(0,ee.jsx)(ar,{className:"h-3.5 w-3.5"})})]})]})},p.id)})]}),t?(0,ee.jsx)("div",{className:"whitespace-pre-wrap rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:c(t)}):null]})]})})}function Rce({appRunning:e=!1,busy:t,command:r,error:o,mode:n,onChooseApp:a,onClose:i,onStopApp:s,profile:l}){let u=ve(),d=Hc(l),c=e?"Stop":"App",[f,p]=(0,D.useState)(!1),g=(0,D.useRef)();(0,D.useEffect)(()=>{p(!1)},[r]),(0,D.useEffect)(()=>()=>{g.current&&window.clearTimeout(g.current)},[]);async function m(){r&&(await Ls(r),p(!0),g.current&&window.clearTimeout(g.current),g.current=window.setTimeout(()=>p(!1),3e3))}return(0,ee.jsx)(Ft,{onOpenChange:h=>!h&&i(),open:!0,children:(0,ee.jsxs)(Tt,{className:"max-w-[560px]",children:[(0,ee.jsx)(Bt,{children:(0,ee.jsx)("div",{className:"min-w-0",children:(0,ee.jsx)(Vt,{children:u("Open Agent")})})}),(0,ee.jsx)(Ot,{children:(0,ee.jsxs)("div",{className:"space-y-3",children:[(0,ee.jsxs)("div",{className:"flex min-w-0 items-center gap-2 rounded-md border border-border bg-muted/20 px-3 py-2",children:[(0,ee.jsx)(O0,{agent:l.agent,className:"h-6 w-6 rounded-[5px]"}),(0,ee.jsx)("div",{className:"min-w-0 flex-1 truncate text-[13px] font-semibold",children:l.name||l.id}),n==="choose"&&d.includes("app")?(0,ee.jsxs)(ne,{className:"shrink-0",disabled:!!t,onClick:e?s:a,size:"sm",type:"button",variant:"outline",children:[(0,ee.jsx)(br,{iconKey:t==="app"?"busy":e?"stop":"play",children:t==="app"?(0,ee.jsx)(ct,{className:"h-4 w-4 animate-spin"}):e?(0,ee.jsx)(il,{className:"h-4 w-4"}):(0,ee.jsx)(ks,{className:"h-4 w-4"})}),u(c)]}):null]}),n==="choose"?(0,ee.jsx)("div",{className:"space-y-3",children:d.includes("cli")?(0,ee.jsx)(Pce,{command:r,copied:f,onCopy:()=>{m()},t:u}):null}):(0,ee.jsx)(Pce,{command:r,copied:f,onCopy:()=>{m()},t:u}),o?(0,ee.jsx)("div",{className:"whitespace-pre-wrap rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:u(o)}):null]})}),(0,ee.jsx)($t,{children:(0,ee.jsx)(ne,{onClick:i,type:"button",variant:"outline",children:u("Close")})})]})})}function Sce({children:e,label:t}){return(0,ee.jsxs)("span",{className:"group relative inline-flex shrink-0",children:[e,(0,ee.jsx)("span",{className:"pointer-events-none absolute bottom-full left-1/2 z-50 mb-1.5 max-w-[180px] -translate-x-1/2 rounded-md border border-border bg-popover px-2 py-1 text-[11px] font-medium leading-4 text-popover-foreground opacity-0 shadow-card transition-opacity duration-150 group-hover:opacity-100 group-focus-within:opacity-100",role:"tooltip",children:(0,ee.jsx)("span",{className:"block truncate whitespace-nowrap",children:t})})]})}function Pce({command:e,copied:t,onCopy:r,t:o}){return(0,ee.jsxs)("div",{className:"space-y-2",children:[(0,ee.jsx)("div",{className:"text-[12px] font-medium text-muted-foreground",children:o("CLI command")}),(0,ee.jsxs)("div",{className:"flex min-w-0 items-center gap-2 rounded-md border border-border bg-muted/20 p-2",children:[(0,ee.jsx)("code",{className:"min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded-[5px] bg-background px-2 py-2 font-mono text-[12px] text-foreground",children:e||o("Loading")}),(0,ee.jsx)(ne,{"aria-label":o(t?"Copied":"Copy"),disabled:!e,onClick:r,size:"iconSm",title:o(t?"Copied":"Copy"),type:"button",variant:t?"default":"outline",children:(0,ee.jsx)(br,{iconKey:t?"copied":"copy",children:t?(0,ee.jsx)(yt,{className:"h-3.5 w-3.5"}):(0,ee.jsx)(Ta,{className:"h-3.5 w-3.5"})})})]})]})}function RGe({onChange:e,value:t}){let r=ve(),[o,n]=(0,D.useState)(!1),a=(0,D.useRef)(null);return(0,D.useEffect)(()=>{if(!o)return;let i=l=>{a.current?.contains(l.target)||n(!1)},s=l=>{l.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",i),document.addEventListener("keydown",s),()=>{document.removeEventListener("mousedown",i),document.removeEventListener("keydown",s)}},[o]),(0,ee.jsxs)("div",{className:"relative min-w-0",ref:a,children:[(0,ee.jsxs)("button",{"aria-controls":"profile-agent-select-options","aria-expanded":o,"aria-haspopup":"listbox",className:J("flex h-8 w-full min-w-0 items-center gap-2 rounded-md border border-input bg-background px-3 text-left text-[12px] font-medium shadow-[inset_0_1px_1px_rgba(0,0,0,0.03)] outline-none transition-[background-color,border-color,box-shadow,color] hover:border-muted-foreground/45 focus-visible:border-primary/60 focus-visible:ring-2 focus-visible:ring-ring/25",o&&"border-ring/35 bg-muted/40"),onClick:()=>n(i=>!i),onKeyDown:i=>{(i.key==="ArrowDown"||i.key==="Enter"||i.key===" ")&&(i.preventDefault(),n(!0))},type:"button",children:[(0,ee.jsx)(O0,{agent:t,className:"h-5 w-5 rounded-[5px]"}),(0,ee.jsx)("span",{className:"min-w-0 flex-1 truncate",children:r(va(t))}),(0,ee.jsx)(po,{className:J("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",o&&"rotate-180")})]}),(0,ee.jsx)(wt,{initial:!1,children:o?(0,ee.jsx)(Nu,{className:"absolute left-0 right-0 top-full z-50 mt-1",children:(0,ee.jsx)(Is,{className:"overflow-hidden p-1",id:"profile-agent-select-options",role:"listbox",children:IW.map(i=>{let s=i.value,l=t===s;return(0,ee.jsxs)("button",{"aria-selected":l,className:J("flex h-9 w-full min-w-0 items-center gap-2 rounded-[5px] px-2 text-left text-[12px] font-medium outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/25",l?"bg-primary/10 text-primary":"text-foreground hover:bg-muted"),onClick:()=>{e(s),n(!1)},role:"option",type:"button",children:[(0,ee.jsx)(O0,{agent:s,className:"h-6 w-6 rounded-[5px]"}),(0,ee.jsx)("span",{className:"min-w-0 flex-1 truncate",children:r(va(s))}),l?(0,ee.jsx)(yt,{className:"h-3.5 w-3.5 shrink-0"}):null]},s)})})}):null})]})}function s5({onChange:e,placeholder:t,providers:r,value:o,virtualModelProfiles:n=[]}){let a=ve(),[i,s]=(0,D.useState)(!1),[l,u]=(0,D.useState)(""),[d,c]=(0,D.useState)(),f=(0,D.useMemo)(()=>NR(o,r,n),[r,o,n]),p=(0,D.useMemo)(()=>N0(r,n),[r,n]),g=(0,D.useMemo)(()=>p.filter(C=>Ide(C,l)),[p,l]),[m,h]=(0,D.useState)(""),k=(0,D.useRef)(null),M=g.find(C=>C.name===m)??g.find(C=>C.name===f.provider)??g[0],v=M?M.models.filter(C=>Dde(M.name,C,l,nh(M,C))):[],b=TR(o,f,r,t,n);(0,D.useLayoutEffect)(()=>{if(!i){c(void 0);return}function C(){let F=k.current;if(!F)return;let T=F.getBoundingClientRect(),G=12,$=6,oe=window.innerWidth,se=window.innerHeight,pe=Math.max(240,oe-G*2),N=Math.min(560,pe),R=Math.min(Math.max(G,T.left),oe-G-N),U=Math.max(0,se-T.bottom-G-$),E=Math.max(0,T.top-G-$),_=U<240&&E>U?"above":"below",B=Math.max(144,_==="above"?E:U),j=Math.min(360,B),re=Math.max(128,Math.min(280,j-58));c({gridHeight:re,left:R,maxHeight:j,offset:_==="above"?se-T.top+$:T.bottom+$,placement:_,width:N})}return C(),window.addEventListener("resize",C),window.addEventListener("scroll",C,!0),()=>{window.removeEventListener("resize",C),window.removeEventListener("scroll",C,!0)}},[i]),(0,D.useEffect)(()=>{if(!i)return;function C(T){k.current?.contains(T.target)||s(!1)}function F(T){T.key==="Escape"&&s(!1)}return document.addEventListener("mousedown",C),document.addEventListener("keydown",F),()=>{document.removeEventListener("mousedown",C),document.removeEventListener("keydown",F)}},[i]),(0,D.useEffect)(()=>{i&&(m&&g.some(C=>C.name===m)||h(f.provider||g[0]?.name||""))},[m,g,i,f.provider]);function w(C,F){e(`${C}/${F}`),s(!1),u(""),h(C)}function P(){s(!0),u(""),h(f.provider||p[0]?.name||"")}function L(C){C.preventDefault(),C.stopPropagation(),e(""),s(!1),u("")}return(0,ee.jsxs)("div",{className:"relative min-w-0",ref:k,children:[(0,ee.jsxs)("div",{className:J("flex h-10 w-full min-w-0 items-center gap-2 rounded-md border border-input bg-background px-3 text-left text-[12px] shadow-[inset_0_1px_1px_rgba(0,0,0,0.03)] outline-none transition-[background-color,border-color,box-shadow,color] hover:border-muted-foreground/45 focus-visible:border-primary/60 focus-visible:ring-2 focus-visible:ring-ring/25",i&&"border-ring/35 bg-muted/40",!o.trim()&&"text-muted-foreground"),children:[(0,ee.jsx)("button",{"aria-expanded":i,"aria-haspopup":"dialog",className:"min-w-0 flex-1 truncate text-left outline-none",onClick:P,type:"button",children:b}),o.trim()?(0,ee.jsx)("button",{"aria-label":a("Clear"),className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[5px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/25",onClick:L,title:a("Clear"),type:"button",children:(0,ee.jsx)(ft,{className:"h-3.5 w-3.5"})}):null,(0,ee.jsx)("button",{"aria-label":a(i?"Collapse":"Expand"),className:"inline-flex h-6 w-6 shrink-0 items-center justify-center rounded-[5px] text-muted-foreground transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/25",onClick:P,title:a(i?"Collapse":"Expand"),type:"button",children:(0,ee.jsx)(po,{className:J("h-3.5 w-3.5 transition-transform",i&&"rotate-180")})})]}),(0,ee.jsx)(wt,{initial:!1,children:i?(0,ee.jsx)(Nu,{className:"fixed z-[70]",placement:d?.placement??"below",style:d?{left:`${d.left}px`,maxHeight:`${d.maxHeight}px`,width:`${d.width}px`,...d.placement==="above"?{bottom:`${d.offset}px`}:{top:`${d.offset}px`}}:void 0,children:(0,ee.jsxs)(Is,{className:"w-full overflow-hidden p-2",children:[(0,ee.jsxs)("div",{className:"relative",children:[(0,ee.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,ee.jsx)(Te,{autoFocus:!0,"aria-label":a("Search models"),className:"h-9 pl-8",onChange:C=>u(C.target.value),placeholder:a("Search providers or models"),value:l})]}),p.length===0?(0,ee.jsx)("div",{className:"mt-2 rounded-md border border-dashed border-border bg-muted/30 px-3 py-8 text-center text-[12px] text-muted-foreground",children:a("No models configured")}):(0,ee.jsxs)("div",{className:"mt-2 grid grid-cols-[minmax(112px,0.38fr)_minmax(0,1fr)] overflow-hidden rounded-md border border-border",style:{height:`${d?.gridHeight??220}px`},children:[(0,ee.jsxs)("div",{className:"min-w-0 overflow-auto border-r border-border bg-muted/30 p-1",children:[g.length===0?(0,ee.jsx)("div",{className:"px-2 py-6 text-center text-[11px] text-muted-foreground",children:a("No matching providers")}):null,g.map(C=>{let F=C.name===M?.name;return(0,ee.jsxs)("button",{className:J("flex h-9 w-full min-w-0 items-center gap-2 rounded-[5px] px-2 text-left text-[12px] outline-none transition-colors hover:bg-background focus-visible:ring-2 focus-visible:ring-ring/25",F&&"bg-background text-primary"),onClick:()=>h(C.name),type:"button",children:[(0,ee.jsx)("span",{className:"min-w-0 flex-1 truncate",children:C.name}),(0,ee.jsx)(gt,{className:"shrink-0",variant:"outline",children:C.models.length})]},C.name)})]}),(0,ee.jsxs)("div",{className:"min-w-0 overflow-auto bg-background p-1",children:[M?null:(0,ee.jsx)("div",{className:"px-2 py-10 text-center text-[12px] text-muted-foreground",children:a("No matching models")}),M&&v.length===0?(0,ee.jsx)("div",{className:"px-2 py-10 text-center text-[12px] text-muted-foreground",children:a("No matching models")}):null,M&&v.map(C=>{let F=f.provider===M.name&&f.model===C,T=nh(M,C);return(0,ee.jsxs)("button",{className:J("flex h-9 w-full min-w-0 items-center gap-2 rounded-[5px] px-2 text-left text-[12px] outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring/25",F&&"bg-primary/10 text-primary"),onClick:()=>w(M.name,C),type:"button",children:[(0,ee.jsx)("span",{className:"min-w-0 flex-1 truncate",title:T,children:T}),F?(0,ee.jsx)(yt,{className:"h-3.5 w-3.5 shrink-0"}):null]},`${M.name}/${C}`)})]})]})]})}):null})]})}function HR({botConfigs:e,draft:t,error:r,onChange:o,onCreateBot:n,providers:a,virtualModelProfiles:i=[]}){let s=ve();return(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,ee.jsx)(xe,{label:s("Agent"),children:(0,ee.jsx)(RGe,{onChange:l=>o({agent:l}),value:t.agent})}),(0,ee.jsx)(xe,{label:s("Profile name"),children:(0,ee.jsx)(Te,{value:t.name,onChange:l=>o({name:l.target.value})})}),(0,ee.jsx)(xe,{label:s("Effect scope"),children:(0,ee.jsx)(St,{onChange:l=>o({scope:sh(l)}),options:Ht(DW,s),value:t.scope})}),(0,ee.jsx)(xe,{label:s("Entry mode"),children:(0,ee.jsx)(St,{onChange:l=>{let u=Sm(l);o(u!=="cli"?{surface:u}:{botConfigId:"",botConfigured:!0,botEnabled:!1,surface:u})},options:Ht(t.agent==="zcode"?$L.filter(l=>l.value==="app"):$L,s),value:t.surface})}),t.agent==="claude-code"?(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(xe,{label:s("Model override"),children:(0,ee.jsx)(s5,{placeholder:s("Keep Claude Code default"),providers:a,value:t.model,virtualModelProfiles:i,onChange:l=>o({model:l})})}),(0,ee.jsx)(xe,{label:s("Small fast model"),children:(0,ee.jsx)(s5,{placeholder:s("Keep Claude Code default"),providers:a,value:t.smallFastModel,virtualModelProfiles:i,onChange:l=>o({smallFastModel:l})})})]}):(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsx)(xe,{label:s("Provider ID"),children:(0,ee.jsx)(Te,{value:t.providerId,onChange:l=>o({providerId:l.target.value})})}),(0,ee.jsx)(xe,{label:s("Provider name"),children:(0,ee.jsx)(Te,{value:t.providerName,onChange:l=>o({providerName:l.target.value})})}),t.agent!=="zcode"?(0,ee.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border bg-muted/20 px-3 py-2",children:[(0,ee.jsx)("span",{className:"text-[12px] font-medium",children:s("Show all sessions")}),(0,ee.jsx)(Co,{checked:t.showAllSessions,onChange:l=>o({showAllSessions:l})})]}):null,(0,ee.jsx)(xe,{className:"sm:col-span-2",label:s(t.agent==="zcode"?"ZCode model":"Codex model"),children:(0,ee.jsx)(s5,{placeholder:a[0]?.models[0]&&a[0]?.name?`${a[0].name}/${a[0].models[0]}`:"",providers:a,value:t.model,virtualModelProfiles:i,onChange:l=>o({model:l})})})]}),t.surface!=="cli"?(0,ee.jsx)("div",{className:"sm:col-span-2",children:(0,ee.jsx)(NGe,{botConfigs:e,draft:t,onChange:o,onCreateBot:n})}):null,(0,ee.jsx)(xe,{className:"sm:col-span-2",label:s("Environment variables"),children:(0,ee.jsx)($i,{addLabel:s("Add env variable"),rows:t.envRows,onChange:l=>o({envRows:l})})})]}),r?(0,ee.jsx)("div",{className:"mt-3 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:s(r)}):null]})}var Ace="__add_bot__",qR="__ccr_handoff_target_none__",l5={error:"",loading:!1,results:[]};function NGe({botConfigs:e,draft:t,onChange:r,onCreateBot:o}){let n=ve(),a=Rc(),i=[{label:n("None"),value:"none"},...e.map(M=>({label:U4(M,n),value:M.id})),{label:n("Add new bot"),value:Ace}],s=t.botEnabled&&t.botConfigId?t.botConfigId:"none",l=t.botEnabled?e.find(M=>M.id===s):void 0,[u,d]=(0,D.useState)(l5),[c,f]=(0,D.useState)(l5),p=(0,D.useRef)(!1),g=(0,D.useCallback)(async M=>{let v=M==="wifi"?d:f,b=M==="wifi"?window.ccr?.scanBotHandoffWifiTargets:window.ccr?.scanBotHandoffBluetoothTargets;if(!b){v({error:n("Handoff target scan is available in the Electron app."),loading:!1,results:[]});return}v({...l5,loading:!0});try{let w=await b();v({error:"",loading:!1,results:w})}catch(w){v({error:a(w),loading:!1,results:[]})}},[a,n]);(0,D.useEffect)(()=>{if(!t.botEnabled||!t.botHandoffEnabled||!l){p.current=!1;return}p.current||(p.current=!0,g("wifi"),g("bluetooth"))},[t.botEnabled,t.botHandoffEnabled,g,l]);function m(M){if(!M){r({botConfigId:"",botConfigured:!0,botEnabled:!1});return}let v=t.botConfigId||e[0]?.id||"",b=e.find(w=>w.id===v);r({botConfigId:v,botConfigured:!0,botEnabled:!0,botForwardAllAgentMessages:b?b.botGateway.forwardAllAgentMessages!==!1:t.botForwardAllAgentMessages})}function h(M){if(M===Ace){o();return}if(M==="none"){r({botConfigId:"",botConfigured:!0,botEnabled:!1});return}let v=e.find(b=>b.id===M);r({botConfigId:M,botConfigured:!0,botEnabled:!0,botForwardAllAgentMessages:v?v.botGateway.forwardAllAgentMessages!==!1:t.botForwardAllAgentMessages})}let k=n("Bot only forwards messages when opening the APP from CCR. CLI does not forward messages yet.");return(0,ee.jsxs)("div",{className:"rounded-md border border-border bg-muted/20 px-3 py-2",children:[(0,ee.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,ee.jsxs)("span",{className:"flex min-w-0 items-center gap-1.5",children:[(0,ee.jsx)("span",{className:"text-[12px] font-medium",children:n("Bot")}),(0,ee.jsxs)("button",{"aria-label":k,className:"group relative inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-[5px] text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:bg-muted focus-visible:text-foreground focus-visible:ring-2 focus-visible:ring-ring/25",type:"button",children:[(0,ee.jsx)(al,{"aria-hidden":"true",className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,ee.jsx)("span",{className:"pointer-events-none invisible absolute left-0 top-full z-[90] mt-1.5 w-[260px] max-w-[calc(100vw-64px)] whitespace-normal rounded-md border border-border bg-popover px-2 py-1.5 text-left text-[11px] font-medium leading-4 text-popover-foreground opacity-0 shadow-card transition-opacity group-hover:visible group-hover:opacity-100 group-focus:visible group-focus:opacity-100 sm:w-[280px]",children:k})]})]}),(0,ee.jsx)(Co,{checked:t.botEnabled,onChange:m})]}),t.botEnabled?(0,ee.jsxs)("div",{className:"mt-3 space-y-3 border-t border-border/70 pt-3",children:[(0,ee.jsx)(xe,{label:n("Select bot"),children:(0,ee.jsx)(St,{onChange:h,options:i,value:s})}),l?(0,ee.jsxs)(ee.Fragment,{children:[(0,ee.jsxs)("div",{className:"flex items-center justify-between gap-3 rounded-md border border-border bg-background px-3 py-2",children:[(0,ee.jsx)("span",{className:"text-[12px] font-medium",children:n("Forward agent messages")}),(0,ee.jsx)(Co,{checked:t.botForwardAllAgentMessages,onChange:M=>r({botForwardAllAgentMessages:M})})]}),(0,ee.jsxs)("div",{className:"rounded-md border border-border bg-background p-3",children:[(0,ee.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,ee.jsx)("span",{className:"text-[12px] font-medium",children:n("Handoff")}),(0,ee.jsx)(Co,{checked:t.botHandoffEnabled,onChange:M=>r({botHandoffEnabled:M})})]}),t.botHandoffEnabled?(0,ee.jsxs)("div",{className:"mt-3 grid grid-cols-1 gap-3 border-t border-border/70 pt-3 sm:grid-cols-2",children:[(0,ee.jsx)(xe,{label:n("Idle seconds"),children:(0,ee.jsx)(Te,{min:30,max:86400,type:"number",value:t.botHandoffIdleSeconds,onChange:M=>r({botHandoffIdleSeconds:M.target.value})})}),(0,ee.jsx)(Ice,{label:n("Phone Wi-Fi target"),scan:u,selectedTarget:Dce(t.botHandoffPhoneWifiTargets),onRefresh:()=>{g("wifi")},onSelect:M=>r({botHandoffPhoneWifiTargets:M})}),(0,ee.jsx)(Ice,{className:"sm:col-span-2",label:n("Phone Bluetooth target"),scan:c,selectedTarget:Dce(t.botHandoffPhoneBluetoothTargets),onRefresh:()=>{g("bluetooth")},onSelect:M=>r({botHandoffPhoneBluetoothTargets:M})})]}):null]})]}):null]}):null]})}function Ice({className:e,label:t,scan:r,selectedTarget:o,onRefresh:n,onSelect:a}){let i=ve(),s=o&&!r.results.some(f=>Lce(f,o))?[{detail:"",id:`selected:${o}`,label:o,source:"selected",target:o},...r.results]:r.results,l=r.loading?i("Scanning targets"):s.length>0?i("Select a scanned target"):i("No targets found"),u=s.find(f=>Lce(f,o)),d=o||qR,c=[...o?[{label:i("None"),value:qR}]:[],...o?[]:[{disabled:!0,label:l,value:qR}],...s.map(f=>({label:Nce(f),value:Tce(f)}))];return(0,ee.jsxs)("div",{className:J("min-w-0 space-y-1",e),children:[(0,ee.jsx)("span",{className:"block truncate text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:t}),(0,ee.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,ee.jsx)(Jo,{className:"min-w-0 flex-1",disabled:r.loading||!o&&s.length===0,onValueChange:f=>a(f===qR?"":f),options:c,value:d}),(0,ee.jsx)(ne,{className:"h-8 w-8 border-0 bg-transparent p-0 shadow-none hover:bg-transparent","aria-label":i("Refresh targets"),disabled:r.loading,onClick:n,title:i("Refresh targets"),type:"button",unstyled:!0,children:(0,ee.jsx)(Ho,{className:J("h-5 w-5 text-muted-foreground hover:text-foreground",r.loading&&"animate-spin")})})]}),u?.detail?(0,ee.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",title:u.detail,children:u.detail}):null,r.error?(0,ee.jsx)("div",{className:"break-words text-[11px] text-destructive",children:r.error}):null]})}function Dce(e){return e.split(/\r?\n/).map(t=>t.trim()).find(Boolean)??""}function Nce(e){if(e.source!=="bluetooth")return e.label;let t=e.label.trim(),r=e.target.trim();return!t||!r||t===r||t.includes(r)?t||r:`${t}(${r})`}function Tce(e){return e.source==="bluetooth"?Nce(e):e.target}function Lce(e,t){return e.target===t||Tce(e)===t}function KR({botConfigs:e,canSubmit:t,draft:r,error:o,mode:n="add",onChange:a,onCreateBot:i,onClose:s,providers:l,submitting:u=!1,virtualModelProfiles:d=[],onSubmit:c}){let f=ve();return(0,ee.jsx)(Ft,{onOpenChange:p=>!p&&!u&&s(),open:!0,children:(0,ee.jsxs)(Tt,{children:[(0,ee.jsx)(Bt,{children:(0,ee.jsx)("div",{children:(0,ee.jsx)(Vt,{children:f(n==="edit"?"Edit Profile":"Add Profile")})})}),(0,ee.jsx)(Ot,{children:(0,ee.jsx)(HR,{botConfigs:e,draft:r,error:o,onChange:a,onCreateBot:i,providers:l,virtualModelProfiles:d})}),(0,ee.jsx)($t,{children:(0,ee.jsxs)("div",{className:"flex justify-end gap-2",children:[(0,ee.jsx)(ne,{disabled:u,onClick:s,type:"button",variant:"outline",children:f("Cancel")}),(0,ee.jsxs)(ne,{disabled:!t||u,onClick:()=>{c()},type:"button",children:[u||n==="add"?(0,ee.jsx)(br,{iconKey:u?"submitting":"add",children:u?(0,ee.jsx)(ct,{className:"h-4 w-4 animate-spin"}):(0,ee.jsx)(It,{className:"h-4 w-4"})}):null,f(n==="edit"?"Save":"Add")]})]})})]})})}var ot=z(ze()),Oce={provider:{description:"Add or verify a model provider.",icon:Gn,title:"Configure provider",tone:"violet"},profile:{description:"Create a profile for your agent.",icon:Ms,title:"Connect agent",tone:"orange"},enter:{description:"Start using CCR.",icon:ps,title:"Let's start",tone:"cyan"}};function c5({activeStep:e,canSubmitProfile:t,canSubmitProvider:r,config:o,endpoint:n,gatewayStatus:a,onCheckProvider:i,onChangeProfile:s,onChangeProvider:l,onComplete:u,onSelectStep:d,onSubmitProfile:c,onSubmitProvider:f,profileDraft:p,profileError:g,providerDraft:m,providerError:h,providerConnectivityLoading:k,providerConnectivityProbe:M,providerProbe:v,providerProbeLoading:b,readiness:w}){let P=ve(),L=ln(),[C,F]=(0,D.useState)(!1),T=XL(o),G=JL(o,w),$=a.state==="running",oe=T&&G,se=Math.max(0,Ds.indexOf(e)),pe=Oce[e],N=Ds[se-1],R=UW(e,o,w),U=e==="provider"&&(b||k||C),E=e==="provider"?U||!(T||r):e==="profile"?!(G||T&&t):!oe;function _(){N&&d(N)}async function B(){if(e==="enter"){oe&&await u();return}if(e==="provider"){if(U||r&&await f())return;T&&R&&d(R);return}if(e==="profile"&&!G){await c();return}R&&d(R)}return(0,ot.jsx)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 w-full flex-col",initial:{opacity:0},transition:{duration:.16},children:(0,ot.jsx)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:(0,ot.jsx)("div",{className:"relative flex min-h-0 flex-1 overflow-hidden bg-card",children:(0,ot.jsxs)(Qe.div,{className:"relative z-10 flex h-full min-h-0 flex-1 flex-col overflow-hidden",layout:!0,style:{transformPerspective:900},transition:L?ga:{duration:.28,ease:gm},children:[(0,ot.jsx)(TGe,{activeIndex:se}),(0,ot.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col p-4 sm:p-5",children:[(0,ot.jsx)("div",{className:"flex h-8 shrink-0 items-center",children:N?(0,ot.jsxs)(ne,{className:"inline-flex h-8 items-center gap-1.5 rounded-md px-1 text-[13px] font-medium text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/25",onClick:_,type:"button",unstyled:!0,children:[(0,ot.jsx)(ol,{className:"h-4 w-4"}),P("Back")]}):null}),(0,ot.jsxs)("div",{className:"flex min-w-0 shrink-0 flex-col items-center gap-2 text-center",children:[(0,ot.jsx)(EGe,{activeStep:e}),(0,ot.jsxs)("div",{className:"min-w-0",children:[(0,ot.jsx)("h2",{className:"text-[20px] font-semibold tracking-normal",children:P(pe.title)}),(0,ot.jsx)("p",{className:"mt-1 text-[12px] leading-5 text-muted-foreground",children:P(pe.description)})]})]}),(0,ot.jsxs)("div",{className:"onboarding-step-panels mt-5 min-h-0 flex-1 overflow-hidden",children:[(0,ot.jsx)("div",{"aria-hidden":e!=="provider",className:J("onboarding-step-panel flex min-w-0 flex-1 flex-col gap-3",e==="provider"&&"onboarding-step-panel-active"),children:(0,ot.jsx)("div",{className:"mx-auto w-full max-w-[780px]",children:(0,ot.jsx)(zR,{connectivityLoading:k,connectivityProbe:M,draft:m,error:h,mode:T?"edit":"add",onCheck:i,onChange:l,onIconDetectingChange:F,probe:v,probeLoading:b,providerPlugins:o.providerPlugins??[],providers:o.Providers})})}),(0,ot.jsx)("div",{"aria-hidden":e!=="profile",className:J("onboarding-step-panel flex min-w-0 flex-1 flex-col gap-3",e==="profile"&&"onboarding-step-panel-active"),children:(0,ot.jsx)("div",{className:"mx-auto w-full max-w-[720px]",children:(0,ot.jsx)(HR,{botConfigs:[],draft:p,error:g,onChange:s,onCreateBot:()=>{},providers:o.Providers,virtualModelProfiles:o.virtualModelProfiles??[]})})}),(0,ot.jsxs)("div",{"aria-hidden":e!=="enter",className:J("onboarding-step-panel flex min-w-0 flex-1 flex-col gap-3",e==="enter"&&"onboarding-step-panel-active"),children:[(0,ot.jsxs)("div",{className:"mx-auto flex w-full max-w-[520px] flex-col overflow-hidden rounded-lg border border-border bg-background/70",children:[(0,ot.jsx)(d5,{label:P("Provider"),ready:T}),(0,ot.jsx)(d5,{label:P("Profile"),ready:G}),(0,ot.jsx)(d5,{label:P("Service"),ready:$}),(0,ot.jsx)(OGe,{label:P("Endpoint"),value:n})]}),(0,ot.jsxs)("div",{className:"mt-auto flex flex-wrap items-center justify-center gap-2",children:[T?null:(0,ot.jsx)(ne,{onClick:()=>d("provider"),type:"button",variant:"outline",children:P("Configure provider")}),T&&!G?(0,ot.jsx)(ne,{onClick:()=>d("profile"),type:"button",variant:"outline",children:P("Connect agent")}):null]})]})]}),(0,ot.jsx)("div",{className:"mt-5 flex shrink-0 items-center justify-end gap-3 border-t border-border/60 pt-4",children:(0,ot.jsxs)(ne,{disabled:E,onClick:()=>{B()},type:"button",children:[U?(0,ot.jsx)(ct,{className:"h-4 w-4 animate-spin"}):e==="enter"?(0,ot.jsx)(yt,{className:"h-4 w-4"}):null,P(U?"Loading":e==="enter"?"Let's start":"Next step"),!U&&e!=="enter"?(0,ot.jsx)(qo,{className:"h-4 w-4"}):null]})})]})]})})})})}function TGe({activeIndex:e}){let t=ve(),r=Ds.length,o=`${(e+1)/r*100}%`;return(0,ot.jsxs)("div",{className:"relative shrink-0 border-b border-border/60 bg-card/95","aria-label":`${t("Step")} ${e+1} / ${r}`,children:[(0,ot.jsx)("div",{className:"mx-auto flex h-11 max-w-[520px] items-center justify-center px-3 text-[13px] font-medium",children:Ds.map((n,a)=>(0,ot.jsxs)("div",{className:"flex min-w-0 items-center",children:[(0,ot.jsx)("span",{className:J("max-w-[136px] truncate",a===e?"text-foreground":"text-muted-foreground"),children:t(Oce[n].title)}),a<r-1?(0,ot.jsx)(qo,{className:"mx-5 h-4 w-4 shrink-0 text-muted-foreground/70 max-[560px]:mx-2"}):null]},n))}),(0,ot.jsx)("div",{className:"absolute inset-x-0 bottom-0 h-[3px] bg-muted",role:"progressbar","aria-valuemin":1,"aria-valuemax":r,"aria-valuenow":e+1,children:(0,ot.jsx)("div",{className:"h-full bg-foreground transition-[width] duration-200",style:{width:o}})})]})}function d5({label:e,ready:t}){return(0,ot.jsxs)("div",{className:"flex min-h-11 min-w-0 items-center justify-between gap-3 border-b border-border/60 px-3 py-2.5 last:border-b-0",children:[(0,ot.jsx)("span",{className:"min-w-0 truncate text-[13px] font-medium text-foreground",children:e}),(0,ot.jsx)("span",{className:J("flex h-6 w-6 shrink-0 items-center justify-center rounded-full",t?"bg-emerald-500/12 text-emerald-600":"bg-destructive/10 text-destructive"),children:t?(0,ot.jsx)(yt,{className:"h-4 w-4"}):(0,ot.jsx)(ft,{className:"h-4 w-4"})})]})}function OGe({label:e,value:t}){return(0,ot.jsxs)("div",{className:"flex min-h-11 min-w-0 items-center justify-between gap-3 border-b border-border/60 px-3 py-2.5 last:border-b-0",children:[(0,ot.jsx)("span",{className:"min-w-0 truncate text-[13px] font-medium text-foreground",children:e}),(0,ot.jsx)("span",{className:"min-w-0 max-w-[68%] truncate text-right font-mono text-[12px] text-muted-foreground",title:t,children:t})]})}function EGe({activeStep:e}){return(0,ot.jsx)("div",{"aria-hidden":!0,className:J("onboarding-mascot-sprite",`onboarding-mascot-sprite-${e}`),style:{backgroundImage:`url(${tW})`}})}var ch=z(ze());function f5({toast:e}){let t=ln();return(0,ch.jsx)(wt,{initial:!1,children:e?(0,ch.jsxs)(Qe.div,{animate:{opacity:1,y:0},className:"pointer-events-none fixed left-1/2 top-5 z-[10000] flex max-w-[calc(100vw-24px)] -translate-x-1/2 items-center gap-2 rounded-full border border-border bg-popover px-3 py-2 text-[12px] font-medium text-popover-foreground shadow-lg",exit:t?{opacity:0}:{opacity:0,y:-8},initial:t?{opacity:0}:{opacity:0,y:-8},role:"status",transition:t?ga:{duration:.16,ease:gm},children:[(0,ch.jsx)(yt,{className:"h-3.5 w-3.5 shrink-0 text-emerald-600"}),(0,ch.jsx)("span",{className:"truncate",children:e.message})]},e.id):null})}var we=z(ze());function p5({addApiKey:e,apiKeys:t,editApiKey:r,error:o,notify:n,removeApiKey:a}){let i=ve(),[s,l]=(0,D.useState)(""),u=s.trim().toLowerCase(),d=(0,D.useMemo)(()=>t.filter(f=>Ele(f,u)),[t,u]);async function c(f){await Ls(f.keyValue),n(i("Copied API key"))}return(0,we.jsx)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 min-w-0 flex-col",initial:{opacity:0},transition:{duration:.15},children:(0,we.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,we.jsxs)(Gr,{className:"flex-row items-center gap-2",children:[(0,we.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,we.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 z-[1] h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,we.jsx)(Te,{"aria-label":i("Search API keys"),className:"pl-8",onChange:f=>l(f.target.value),placeholder:i("Search API keys"),value:s})]}),(0,we.jsxs)(ne,{"aria-label":i("Add API key"),onClick:e,title:i("Add API key"),type:"button",children:[(0,we.jsx)(It,{className:"h-4 w-4"}),i("Add")]})]}),(0,we.jsxs)(nr,{className:"min-h-0 flex-1 overflow-auto p-0",children:[o?(0,we.jsxs)("div",{className:"m-4 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive flex items-start gap-2",children:[(0,we.jsx)(Xt,{className:"h-3.5 w-3.5 shrink-0 mt-0.5"}),(0,we.jsx)("span",{children:o})]}):null,t.length===0?(0,we.jsxs)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center",children:[(0,we.jsx)(ms,{className:"mx-auto mb-2 h-7 w-7 text-muted-foreground/40"}),(0,we.jsx)("div",{className:"text-[12px] text-muted-foreground",children:i("No API keys configured")}),(0,we.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground/60",children:i("Click Add to create one")})]}):null,t.length>0&&d.length===0?(0,we.jsx)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center text-[12px] text-muted-foreground",children:i("No matching API keys")}):null,d.length>0?(0,we.jsx)("div",{className:"overflow-x-auto",children:(0,we.jsxs)("div",{className:"min-w-[980px]",children:[(0,we.jsxs)("div",{className:"sticky top-0 z-10 grid h-10 grid-cols-[minmax(140px,0.7fr)_minmax(390px,1.7fr)_132px_minmax(160px,0.7fr)_76px] items-center gap-3 border-b border-border/60 bg-muted/95 px-4 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:[(0,we.jsx)("div",{className:"truncate",children:i("Name")}),(0,we.jsx)("div",{className:"truncate",children:i("Key")}),(0,we.jsx)("div",{className:"truncate",children:i("Expires")}),(0,we.jsx)("div",{className:"truncate",children:i("Limits")}),(0,we.jsx)("div",{"aria-hidden":"true"})]}),(0,we.jsx)("div",{className:"divide-y divide-border/60",children:(0,we.jsx)(wt,{initial:!1,children:d.map(f=>(0,we.jsxs)(ka,{className:"grid min-h-[58px] grid-cols-[minmax(140px,0.7fr)_minmax(390px,1.7fr)_132px_minmax(160px,0.7fr)_76px] items-center gap-3 px-4 py-2.5 transition-colors hover:bg-muted/35",children:[(0,we.jsx)("div",{className:"min-w-0",children:(0,we.jsx)("div",{className:"truncate text-[12px] font-semibold",title:f.name,children:f.name})}),(0,we.jsx)("div",{className:"min-w-0",children:(0,we.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 text-[12px] font-semibold leading-5",title:f.masked,children:[(0,we.jsx)("span",{className:"min-w-0 truncate font-mono",children:f.masked}),(0,we.jsx)(ne,{className:"shrink-0","aria-label":i("Copy API key"),onClick:()=>{c(f)},size:"iconSm",title:i("Copy API key"),type:"button",variant:"ghost",children:(0,we.jsx)(Ta,{className:"h-3.5 w-3.5"})})]})}),(0,we.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",title:i(aR(f)),children:i(aR(f))}),(0,we.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",title:i(iR(f.limits)),children:i(iR(f.limits))}),(0,we.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,we.jsx)(ne,{"aria-label":i("Edit API key"),onClick:()=>r(f.index),size:"iconSm",title:i("Edit API key"),type:"button",variant:"ghost",children:(0,we.jsx)(No,{className:"h-3.5 w-3.5"})}),(0,we.jsx)(ne,{"aria-label":i("Remove API key"),onClick:()=>a(f.index),size:"iconSm",title:i("Remove API key"),type:"button",variant:"ghost",children:(0,we.jsx)(ar,{className:"h-3.5 w-3.5"})})]})]},`${f.keyValue}-${f.index}`))})})]})}):null]})]})})}function m5({canSubmit:e,draft:t,error:r,onChange:o,onClose:n,onSubmit:a}){let i=ve(),s=Ht(YL,i);return(0,we.jsx)(Ft,{onOpenChange:l=>!l&&n(),children:(0,we.jsxs)(Tt,{children:[(0,we.jsxs)(Bt,{children:[(0,we.jsx)("div",{className:"min-w-0",children:(0,we.jsx)(Vt,{children:i("Add API Key")})}),(0,we.jsx)(ne,{"aria-label":i("Close dialog"),onClick:n,size:"iconSm",title:i("Close"),type:"button",variant:"ghost",children:(0,we.jsx)(ft,{className:"h-4 w-4"})})]}),(0,we.jsxs)(Ot,{children:[(0,we.jsxs)(Qe.div,{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",layout:!0,transition:WM,children:[(0,we.jsx)(xe,{label:i("Name"),children:(0,we.jsx)(Te,{autoFocus:!0,value:t.name,onChange:l=>o({name:l.target.value})})}),(0,we.jsx)(xe,{label:i("Expiration"),children:(0,we.jsx)(St,{value:t.expirationPreset,onChange:l=>o({expirationPreset:l}),options:s})}),t.expirationPreset==="custom"?(0,we.jsx)(xe,{className:"sm:col-span-2",label:i("Expires at"),children:(0,we.jsx)(Te,{type:"datetime-local",value:t.expiresAt,onChange:l=>o({expiresAt:l.target.value})})}):null]}),(0,we.jsx)(_ce,{draft:t,onChange:o}),r?(0,we.jsxs)("div",{className:"mt-3 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive flex items-start gap-2",children:[(0,we.jsx)(Xt,{className:"h-3.5 w-3.5 shrink-0 mt-0.5"}),(0,we.jsx)("span",{children:r})]}):null]}),(0,we.jsxs)($t,{children:[(0,we.jsx)(ne,{onClick:n,type:"button",variant:"outline",children:i("Cancel")}),(0,we.jsxs)(ne,{disabled:!e,onClick:a,type:"button",children:[(0,we.jsx)(It,{className:"h-4 w-4"}),i("Add")]})]})]})})}function Ece({apiKeyName:e,apiKeyValue:t,onClose:r}){let o=ve(),[n,a]=(0,D.useState)(!1);async function i(){await Ls(t),a(!0)}return(0,we.jsx)(Ft,{onOpenChange:s=>!s&&r(),children:(0,we.jsxs)(Tt,{className:"max-w-[560px]",children:[(0,we.jsxs)(Bt,{children:[(0,we.jsx)("div",{className:"min-w-0",children:(0,we.jsx)(Vt,{children:o("API key created")})}),(0,we.jsx)(ne,{"aria-label":o("Close dialog"),onClick:r,size:"iconSm",title:o("Close"),type:"button",variant:"ghost",children:(0,we.jsx)(ft,{className:"h-4 w-4"})})]}),(0,we.jsxs)(Ot,{children:[(0,we.jsxs)("div",{className:"flex items-start gap-3 rounded-md border border-emerald-500/25 bg-emerald-500/10 px-3 py-3 text-[12px] text-emerald-700",children:[(0,we.jsx)("span",{className:"mt-0.5 flex h-5 w-5 shrink-0 items-center justify-center rounded-full bg-emerald-500 text-white",children:(0,we.jsx)(yt,{className:"h-3.5 w-3.5"})}),(0,we.jsxs)("div",{className:"min-w-0",children:[(0,we.jsx)("div",{className:"font-semibold",children:o("API key created")}),(0,we.jsx)("div",{className:"mt-0.5 text-emerald-700/80",children:o("Copy this key now. It may not be shown again.")})]})]}),(0,we.jsxs)("div",{className:"mt-4 space-y-2",children:[(0,we.jsx)("div",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e||o("API key")}),(0,we.jsxs)("div",{className:"flex min-w-0 items-center gap-2 rounded-md border border-border bg-muted/30 p-2",children:[(0,we.jsx)("code",{className:"min-w-0 flex-1 overflow-x-auto whitespace-nowrap rounded bg-background px-2 py-1.5 font-mono text-[12px] text-foreground",children:t}),(0,we.jsxs)(ne,{"aria-label":o(n?"Copied":"Copy API key"),className:"shrink-0",onClick:()=>{i()},title:o(n?"Copied":"Copy API key"),type:"button",variant:n?"secondary":"default",children:[(0,we.jsx)(br,{iconKey:n?"copied":"copy",children:n?(0,we.jsx)(yt,{className:"h-4 w-4"}):(0,we.jsx)(Ta,{className:"h-4 w-4"})}),o(n?"Copied":"Copy")]})]})]})]}),(0,we.jsx)($t,{children:(0,we.jsx)(ne,{onClick:r,type:"button",children:o("Done")})})]})})}function g5({canSubmit:e,draft:t,error:r,onChange:o,onClose:n,onSubmit:a}){let i=ve(),s=Ht(YL,i);return(0,we.jsx)(Ft,{onOpenChange:l=>!l&&n(),children:(0,we.jsxs)(Tt,{children:[(0,we.jsxs)(Bt,{children:[(0,we.jsx)("div",{className:"min-w-0",children:(0,we.jsx)(Vt,{children:i("Edit API Key")})}),(0,we.jsx)(ne,{"aria-label":i("Close dialog"),onClick:n,size:"iconSm",title:i("Close"),type:"button",variant:"ghost",children:(0,we.jsx)(ft,{className:"h-4 w-4"})})]}),(0,we.jsxs)(Ot,{children:[(0,we.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,we.jsx)(xe,{label:i("Expiration"),children:(0,we.jsx)(St,{value:t.expirationPreset,onChange:l=>o({expirationPreset:l}),options:s})}),t.expirationPreset==="custom"?(0,we.jsx)(xe,{label:i("Expires at"),children:(0,we.jsx)(Te,{type:"datetime-local",value:t.expiresAt,onChange:l=>o({expiresAt:l.target.value})})}):null]}),(0,we.jsx)(_ce,{defaultOpen:!0,draft:t,onChange:o}),r?(0,we.jsxs)("div",{className:"mt-3 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive flex items-start gap-2",children:[(0,we.jsx)(Xt,{className:"h-3.5 w-3.5 shrink-0 mt-0.5"}),(0,we.jsx)("span",{children:r})]}):null]}),(0,we.jsxs)($t,{children:[(0,we.jsx)(ne,{onClick:n,type:"button",variant:"outline",children:i("Cancel")}),(0,we.jsxs)(ne,{disabled:!e,onClick:a,type:"button",children:[(0,we.jsx)(yt,{className:"h-4 w-4"}),i("Save")]})]})]})})}function _ce({defaultOpen:e=!1,draft:t,onChange:r}){let o=ve(),n=Ht(EW,o),a=Ht(OW,o),[i,s]=(0,D.useState)(e),l=(c,f)=>{r({limitRows:t.limitRows.map(p=>p.id===c?{...p,...f}:p)})},u=()=>{let c=Ja();c&&r({limitRows:[...t.limitRows,c]})},d=c=>{r({limitRows:t.limitRows.filter(f=>f.id!==c)})};return(0,we.jsxs)("div",{className:"mt-4 overflow-hidden rounded-md border border-border bg-background",children:[(0,we.jsxs)(ne,{"aria-expanded":i,className:"flex h-10 w-full items-center justify-between gap-3 px-3 text-left text-[12px] font-medium transition-colors hover:bg-muted/40",onClick:()=>s(c=>!c),type:"button",unstyled:!0,children:[(0,we.jsx)("span",{className:"min-w-0 truncate",children:o("Advanced settings")}),(0,we.jsx)(po,{className:J("h-4 w-4 shrink-0 text-muted-foreground transition-transform",i&&"rotate-180")})]}),(0,we.jsx)(wt,{initial:!1,children:i?(0,we.jsx)(Ru,{children:(0,we.jsxs)("div",{className:"space-y-2 border-t border-border p-3",children:[t.limitRows.length===0?(0,we.jsx)("div",{className:"rounded-md border border-dashed border-border bg-muted/20 px-3 py-5 text-center text-[12px] text-muted-foreground",children:o("No limits configured")}):null,(0,we.jsx)(wt,{initial:!1,children:t.limitRows.map(c=>(0,we.jsxs)(ka,{className:"grid grid-cols-[minmax(110px,0.9fr)_126px_minmax(0,1fr)_28px] gap-2",children:[(0,we.jsx)(St,{value:c.metric,onChange:f=>l(c.id,{metric:f}),options:n}),(0,we.jsx)(St,{value:c.window,onChange:f=>l(c.id,{window:f}),options:a}),(0,we.jsx)(Te,{type:"number",value:c.value,onChange:f=>l(c.id,{value:f.target.value})}),(0,we.jsx)(ne,{"aria-label":o("Remove limit"),onClick:()=>d(c.id),size:"iconSm",title:o("Remove limit"),type:"button",variant:"ghost",children:(0,we.jsx)(ar,{className:"h-3.5 w-3.5"})})]},c.id))}),(0,we.jsxs)(ne,{onClick:u,size:"sm",type:"button",variant:"outline",children:[(0,we.jsx)(It,{className:"h-3.5 w-3.5"}),o("Add limit")]})]})},"api-key-advanced"):null})]})}var be=z(ze());function k5({configureExtension:e,config:t,installExtension:r,removeExtension:o,setExtensionEnabled:n}){let a=ve(),[i,s]=(0,D.useState)(""),l=i.trim().toLowerCase(),u=(0,D.useMemo)(()=>M0(t),[t.plugins,t.providerPlugins]),d=(0,D.useMemo)(()=>u.filter(c=>Iue(c,l)),[u,l]);return(0,be.jsx)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 min-w-0 flex-col",initial:{opacity:0},transition:{duration:.15},children:(0,be.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,be.jsxs)(Gr,{className:"flex-row items-center gap-2",children:[(0,be.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,be.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 z-[1] h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,be.jsx)(Te,{"aria-label":a("Search extensions"),className:"pl-8",onChange:c=>s(c.target.value),placeholder:a("Search extensions"),value:i})]}),(0,be.jsxs)(ne,{"aria-label":a("Install extension"),onClick:r,title:a("Install extension"),type:"button",children:[(0,be.jsx)(It,{className:"h-4 w-4"}),a("Install")]})]}),(0,be.jsxs)(nr,{className:"min-h-0 flex-1 overflow-auto p-0",children:[u.length===0?(0,be.jsxs)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center",children:[(0,be.jsx)(Na,{className:"mx-auto mb-2 h-7 w-7 text-muted-foreground/40"}),(0,be.jsx)("div",{className:"text-[12px] text-muted-foreground",children:a("No extensions installed")}),(0,be.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground/60",children:a("Click Install to add one")})]}):null,u.length>0&&d.length===0?(0,be.jsx)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center text-[12px] text-muted-foreground",children:a("No matching extensions")}):null,d.length>0?(0,be.jsx)("div",{className:"overflow-x-auto",children:(0,be.jsxs)("div",{className:"min-w-[720px]",children:[(0,be.jsxs)("div",{className:"sticky top-0 z-10 grid h-10 grid-cols-[minmax(180px,0.95fr)_minmax(220px,1.15fr)_minmax(240px,1.2fr)_116px_84px] items-center gap-3 border-b border-border/60 bg-muted/95 px-4 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:[(0,be.jsx)("div",{className:"truncate",children:a("Name")}),(0,be.jsx)("div",{className:"truncate",children:a("Path")}),(0,be.jsx)("div",{className:"truncate",children:a("Capability")}),(0,be.jsx)("div",{className:"truncate",children:a("Status")}),(0,be.jsx)("div",{"aria-hidden":"true"})]}),(0,be.jsx)("div",{className:"divide-y divide-border/60",children:(0,be.jsx)(wt,{initial:!1,children:d.map(c=>(0,be.jsxs)(ka,{className:"grid min-h-[58px] grid-cols-[minmax(180px,0.95fr)_minmax(220px,1.15fr)_minmax(240px,1.2fr)_116px_84px] items-center gap-3 px-4 py-2.5 transition-colors hover:bg-muted/35",children:[(0,be.jsx)("div",{className:"min-w-0",children:(0,be.jsx)("div",{className:"truncate text-[12px] font-semibold",children:c.name})}),(0,be.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",title:c.target,children:c.target}),(0,be.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",title:c.capability,children:c.capability}),(0,be.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:c.canToggle?(0,be.jsx)(Co,{checked:c.enabled,onChange:f=>n(c.source,c.index,f,c.groupIndexes)}):null}),(0,be.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,be.jsx)(ne,{"aria-label":`${a("Configure")} ${c.name}`,disabled:!c.canConfigure,onClick:()=>e(c.source,c.index),size:"iconSm",title:a("Configure plugin"),type:"button",variant:"ghost",children:(0,be.jsx)(Hd,{className:"h-3.5 w-3.5"})}),(0,be.jsx)(ne,{"aria-label":`${a("Remove")} ${c.name}`,onClick:()=>o(c.source,c.index,c.groupIndexes),size:"iconSm",title:a("Remove extension"),type:"button",variant:"ghost",children:(0,be.jsx)(ar,{className:"h-3.5 w-3.5"})})]})]},`${c.source}-${c.index}`))})})]})}):null]})]})})}function M5({extension:e,onClose:t,onConfirm:r}){let o=ve();return(0,be.jsx)(Ft,{onOpenChange:n=>!n&&t(),children:(0,be.jsxs)(Tt,{className:"max-w-[520px]",children:[(0,be.jsxs)(Bt,{children:[(0,be.jsx)("div",{className:"min-w-0",children:(0,be.jsx)(Vt,{children:o("Delete Extension")})}),(0,be.jsx)(ne,{"aria-label":o("Close dialog"),onClick:t,size:"iconSm",title:o("Close"),type:"button",variant:"ghost",children:(0,be.jsx)(ft,{className:"h-4 w-4"})})]}),(0,be.jsx)(Ot,{children:(0,be.jsxs)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2.5",children:[(0,be.jsxs)("div",{className:"flex items-start gap-2 text-[12px] font-medium text-destructive",children:[(0,be.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,be.jsx)("span",{children:o("Delete this extension from the configuration?")})]}),(0,be.jsxs)("div",{className:"mt-2 space-y-1 text-[11px] text-muted-foreground",children:[(0,be.jsxs)("div",{className:"truncate",title:e.name,children:[(0,be.jsxs)("span",{className:"font-medium text-foreground",children:[o("Name"),":"]})," ",e.name]}),(0,be.jsxs)("div",{className:"truncate",title:e.target,children:[(0,be.jsxs)("span",{className:"font-medium text-foreground",children:[o("Path"),":"]})," ",e.target]}),(0,be.jsxs)("div",{className:"truncate",title:e.capability,children:[(0,be.jsxs)("span",{className:"font-medium text-foreground",children:[o("Capability"),":"]})," ",e.capability]}),(0,be.jsx)("div",{children:o("This action is applied immediately to the draft config and will auto-save with other changes.")})]})]})}),(0,be.jsxs)($t,{children:[(0,be.jsx)(ne,{autoFocus:!0,onClick:t,type:"button",variant:"outline",children:o("Cancel")}),(0,be.jsxs)(ne,{onClick:r,type:"button",variant:"destructive",children:[(0,be.jsx)(ar,{className:"h-4 w-4"}),o("Delete")]})]})]})})}function h5({draft:e,error:t,extension:r,onChange:o,onClose:n,onSubmit:a}){let i=ve();return(0,be.jsx)(Ft,{onOpenChange:s=>!s&&n(),children:(0,be.jsxs)(Tt,{className:"max-w-[720px]",children:[(0,be.jsxs)(Bt,{children:[(0,be.jsx)("div",{className:"min-w-0",children:(0,be.jsx)(Vt,{children:i("Plugin Settings")})}),(0,be.jsx)(ne,{"aria-label":i("Close dialog"),onClick:n,size:"iconSm",title:i("Close"),type:"button",variant:"ghost",children:(0,be.jsx)(ft,{className:"h-4 w-4"})})]}),(0,be.jsx)(Ot,{children:(0,be.jsxs)("div",{className:"space-y-4",children:[(0,be.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[160px_1fr]",children:[(0,be.jsx)(xe,{label:i("Enabled"),children:(0,be.jsx)(Co,{checked:e.enabled,onChange:s=>o({enabled:s})})}),(0,be.jsx)(xe,{label:i("Name"),children:(0,be.jsx)(Te,{readOnly:!0,value:r.name})}),(0,be.jsx)(xe,{className:"sm:col-span-2",label:i("Module path"),children:(0,be.jsx)(Te,{value:e.modulePath,onChange:s=>o({modulePath:s.target.value})})})]}),(0,be.jsx)(xe,{label:i("Browser apps JSON"),children:(0,be.jsx)(K4,{minHeight:132,value:e.appsText,onChange:s=>o({appsText:s})})}),(0,be.jsx)(xe,{label:i("Plugin config JSON"),children:(0,be.jsx)(K4,{minHeight:160,value:e.configText,onChange:s=>o({configText:s})})}),t?(0,be.jsx)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:i(t)}):null]})}),(0,be.jsxs)($t,{children:[(0,be.jsx)(ne,{onClick:n,type:"button",variant:"outline",children:i("Cancel")}),(0,be.jsxs)(ne,{onClick:a,type:"button",children:[(0,be.jsx)(yt,{className:"h-4 w-4"}),i("Save")]})]})]})})}function $R({canSubmit:e,draft:t,routesLabel:r="Claude Design routes",sourceModelLabel:o="Claude Design model",sourceModelDefaults:n={model:"claude-opus-4-8",pattern:"claude-"},onAddRule:a,onChange:i,onChangeRule:s,onClose:l,onRemoveRule:u,onSubmit:d,providers:c}){let f=ve(),p=(0,D.useMemo)(()=>Rs(c),[c]),g=Ht(jM,f);return(0,be.jsx)(Ft,{onOpenChange:m=>!m&&l(),children:(0,be.jsxs)(Tt,{className:"max-w-[760px]",children:[(0,be.jsxs)(Bt,{children:[(0,be.jsx)("div",{className:"min-w-0",children:(0,be.jsx)(Vt,{children:f("Configure Routing")})}),(0,be.jsx)(ne,{"aria-label":f("Close dialog"),onClick:l,size:"iconSm",title:f("Close"),type:"button",variant:"ghost",children:(0,be.jsx)(ft,{className:"h-4 w-4"})})]}),(0,be.jsx)(Ot,{children:(0,be.jsxs)("div",{className:"space-y-4",children:[(0,be.jsx)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[160px_1fr]",children:(0,be.jsx)(xe,{label:f("Model routing"),children:(0,be.jsx)(Co,{checked:t.enabled,onChange:m=>i({enabled:m})})})}),(0,be.jsxs)("div",{className:"space-y-2",children:[(0,be.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,be.jsx)("div",{className:"min-w-0 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:f(r)}),(0,be.jsxs)(ne,{onClick:a,size:"sm",type:"button",variant:"outline",children:[(0,be.jsx)(It,{className:"h-3.5 w-3.5"}),f("Add")]})]}),t.rules.length===0?(0,be.jsx)("div",{className:"rounded-md border border-dashed border-border bg-muted/30 px-3 py-8 text-center text-[12px] text-muted-foreground",children:f("No plugin routes configured")}):null,(0,be.jsx)("div",{className:"space-y-2",children:(0,be.jsx)(wt,{initial:!1,children:t.rules.map((m,h)=>(0,be.jsxs)(ka,{className:"rounded-md border border-border bg-card p-3",children:[(0,be.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,be.jsx)(xe,{label:f("Name"),children:(0,be.jsx)(Te,{value:m.name,onChange:k=>s(h,{name:k.target.value})})}),(0,be.jsx)(xe,{label:f("Condition"),children:(0,be.jsx)(St,{value:m.type,onChange:k=>s(h,pue(m,k,n)),options:g})}),m.type==="model"?(0,be.jsx)(xe,{label:f(o),children:(0,be.jsx)(Te,{value:m.model,onChange:k=>s(h,{model:k.target.value})})}):null,m.type==="model-prefix"?(0,be.jsx)(xe,{label:f("Model prefix"),children:(0,be.jsx)(Te,{value:m.pattern,onChange:k=>s(h,{pattern:k.target.value})})}):null,Mue(m.type)?(0,be.jsx)("div",{className:"flex min-h-[58px] items-end rounded-md border border-border/70 bg-muted/25 px-3 py-2 text-[12px] text-muted-foreground",children:f(g0(m.type))}):null,(0,be.jsx)(xe,{label:f("Target model"),children:(0,be.jsx)(Pm,{modelOptions:p,onChange:k=>s(h,{target:k}),value:m.target})})]}),(0,be.jsxs)("div",{className:"mt-3 flex items-center justify-between gap-2 border-t border-border/60 pt-3",children:[(0,be.jsxs)(pa,{className:"flex min-w-0 items-center gap-2 text-[12px] text-muted-foreground",children:[(0,be.jsx)(Co,{checked:m.enabled,onChange:k=>s(h,{enabled:k})}),(0,be.jsx)("span",{children:f("Enabled")})]}),(0,be.jsx)(ne,{"aria-label":`${f("Remove")} ${m.name||f("Plugin route")}`,onClick:()=>u(h),size:"iconSm",title:f("Remove rule"),type:"button",variant:"ghost",children:(0,be.jsx)(ar,{className:"h-3.5 w-3.5"})})]})]},m.id||h))})})]})]})}),(0,be.jsxs)($t,{children:[(0,be.jsx)(ne,{onClick:l,type:"button",variant:"outline",children:f("Cancel")}),(0,be.jsxs)(ne,{disabled:!e,onClick:d,type:"button",children:[(0,be.jsx)(yt,{className:"h-4 w-4"}),f("Save")]})]})]})})}var fe=z(ze());function v5({addRule:e,config:t,editRule:r,moveRule:o,providers:n,removeRule:a,updateBuiltInRule:i,updateFallback:s,updateRule:l}){let u=ve(),[d,c]=(0,D.useState)(""),f=d.trim().toLowerCase(),p=(0,D.useMemo)(()=>mue(t),[t]),g=t.Router.fallback,m=(0,D.useMemo)(()=>p.filter(h=>Zue(h,f)),[p,f]);return(0,fe.jsx)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 min-w-0 flex-col",initial:{opacity:0},transition:{duration:.15},children:(0,fe.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,fe.jsxs)(Gr,{className:"flex-row items-center gap-2",children:[(0,fe.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,fe.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 z-[1] h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,fe.jsx)(Te,{"aria-label":u("Search routing rules"),className:"pl-8",onChange:h=>c(h.target.value),placeholder:u("Search routing rules"),value:d})]}),(0,fe.jsxs)(ne,{"aria-label":u("Add routing rule"),onClick:e,title:u("Add routing rule"),type:"button",children:[(0,fe.jsx)(It,{className:"h-4 w-4"}),u("Add")]})]}),(0,fe.jsxs)(nr,{className:"min-h-0 flex-1 overflow-auto p-0",children:[(0,fe.jsx)("div",{className:"border-b border-border/60 px-4 py-3",children:(0,fe.jsx)(Fce,{fallback:g,label:u("Default on failure"),onChange:s,providers:n})}),p.length===0?(0,fe.jsxs)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center",children:[(0,fe.jsx)(qd,{className:"mx-auto mb-2 h-7 w-7 text-muted-foreground/40"}),(0,fe.jsx)("div",{className:"text-[12px] text-muted-foreground",children:u("No routing rules configured")}),(0,fe.jsx)("div",{className:"mt-1 text-[11px] text-muted-foreground/60",children:u("Click Add to create one")})]}):null,p.length>0&&m.length===0?(0,fe.jsx)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center text-[12px] text-muted-foreground",children:u("No matching routing rules")}):null,m.length>0?(0,fe.jsx)("div",{className:"overflow-x-auto",children:(0,fe.jsxs)("div",{className:"min-w-[940px]",children:[(0,fe.jsxs)("div",{className:"sticky top-0 z-10 grid h-10 grid-cols-[minmax(160px,0.8fr)_minmax(220px,1fr)_minmax(240px,1.15fr)_84px_148px] items-center gap-3 border-b border-border/60 bg-muted/95 px-4 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:[(0,fe.jsx)("div",{className:"truncate",children:u("Name")}),(0,fe.jsx)("div",{className:"truncate",children:u("Condition")}),(0,fe.jsx)("div",{className:"truncate",children:u("Request action")}),(0,fe.jsx)("div",{className:"truncate",children:u("Status")}),(0,fe.jsx)("div",{className:"truncate text-right",children:u("Action")})]}),(0,fe.jsx)("div",{className:"divide-y divide-border/60",children:(0,fe.jsx)(wt,{initial:!1,children:m.map(h=>{let k=h.builtInAgent?u(h.sourceLabel):h.sourceLabel,M=h.target==="Profile model unset"?u(h.target):h.target,v=h.toggleDisabledReason?u(h.toggleDisabledReason):void 0;return(0,fe.jsxs)(ka,{className:"grid min-h-[58px] grid-cols-[minmax(160px,0.8fr)_minmax(220px,1fr)_minmax(240px,1.15fr)_84px_148px] items-center gap-3 px-4 py-2.5 transition-colors hover:bg-muted/35",children:[(0,fe.jsxs)("div",{className:"min-w-0",children:[(0,fe.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,fe.jsx)("div",{className:"truncate text-[12px] font-semibold",children:h.name||u("Unnamed")}),h.builtInAgent?(0,fe.jsx)(_Ge,{agent:h.builtInAgent}):null,h.builtInAgent?(0,fe.jsx)(gt,{variant:"outline",children:u("Built-in")}):h.readonly?(0,fe.jsx)(gt,{variant:"outline",children:u("Plugin")}):null]}),(0,fe.jsxs)("div",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",title:`${k}: ${h.ruleId}`,children:[k,": ",h.ruleId]})]}),(0,fe.jsx)("div",{className:"min-w-0",children:h.builtInAgent?null:(0,fe.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,fe.jsx)(gt,{variant:"outline",children:u(h.typeLabel)}),(0,fe.jsx)("span",{className:"min-w-0 flex-1 truncate text-[11px] text-muted-foreground",title:h.condition,children:h.condition})]})}),(0,fe.jsx)("div",{className:"min-w-0 truncate font-mono text-[11px] text-muted-foreground",title:h.builtInAgent?void 0:M,children:h.builtInAgent?null:M}),(0,fe.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:(0,fe.jsxs)("span",{"aria-label":v,className:"group relative inline-flex rounded-full outline-none focus-visible:ring-2 focus-visible:ring-ring/30",tabIndex:v?0:void 0,children:[(0,fe.jsx)(Co,{checked:h.enabled,disabled:h.readonly||h.toggleDisabled,onChange:b=>{h.builtInAgent?i(h.builtInAgent,{enabled:b}):h.index!==void 0&&l(h.index,{enabled:b})}}),v?(0,fe.jsx)("span",{className:"pointer-events-none absolute right-full top-1/2 z-[80] mr-2 hidden w-[240px] -translate-y-1/2 rounded-md border border-border bg-popover px-2.5 py-2 text-left text-[11px] font-medium leading-4 text-popover-foreground shadow-card group-hover:block group-focus:block group-focus-within:block",children:v}):null]})}),(0,fe.jsx)("div",{className:"flex items-center justify-end gap-1",children:h.builtInAgent?null:(0,fe.jsxs)(fe.Fragment,{children:[(0,fe.jsx)(ne,{"aria-label":`${u("Move")} ${h.name||u("rule")} ${u("up")}`,disabled:h.readonly||h.index===void 0||h.index===0,onClick:()=>h.index!==void 0&&o(h.index,-1),size:"iconSm",title:u("Move up"),type:"button",variant:"ghost",children:(0,fe.jsx)(dp,{className:"h-3.5 w-3.5"})}),(0,fe.jsx)(ne,{"aria-label":`${u("Move")} ${h.name||u("rule")} ${u("down")}`,disabled:h.readonly||h.index===void 0||h.index===h.ruleCount-1,onClick:()=>h.index!==void 0&&o(h.index,1),size:"iconSm",title:u("Move down"),type:"button",variant:"ghost",children:(0,fe.jsx)(up,{className:"h-3.5 w-3.5"})}),(0,fe.jsx)(ne,{"aria-label":`${u("Edit")} ${h.name||u("rule")}`,disabled:h.readonly||h.index===void 0,onClick:()=>{h.index!==void 0&&r(h.index)},size:"iconSm",title:u("Edit rule"),type:"button",variant:"ghost",children:(0,fe.jsx)(No,{className:"h-3.5 w-3.5"})}),(0,fe.jsx)(ne,{"aria-label":`${u("Remove")} ${h.name||u("rule")}`,disabled:h.readonly||h.index===void 0,onClick:()=>h.index!==void 0&&a(h.index),size:"iconSm",title:u("Remove rule"),type:"button",variant:"ghost",children:(0,fe.jsx)(ar,{className:"h-3.5 w-3.5"})})]})})]},h.key)})})})]})}):null]})]})})}function _Ge({agent:e}){let t=ve(),r=(0,D.useContext)(Lc),o=FGe(e,t),n=BGe(e,r===Dc.zh?"zh":"en");return(0,fe.jsxs)("span",{"aria-label":o,className:"group relative inline-flex h-5 w-5 shrink-0 items-center justify-center rounded-full text-muted-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring/30",tabIndex:0,children:[(0,fe.jsx)(al,{className:"h-3.5 w-3.5","aria-hidden":"true"}),(0,fe.jsx)("span",{className:"absolute left-full top-1/2 z-[80] hidden w-[232px] -translate-y-1/2 pl-2 group-hover:block group-focus:block group-focus-within:block",children:(0,fe.jsxs)("span",{className:"block rounded-md border border-border bg-popover px-2.5 py-2 text-left text-[11px] font-medium leading-4 text-popover-foreground shadow-card",children:[(0,fe.jsx)("span",{children:o}),(0,fe.jsxs)("a",{className:"ml-1 inline-flex items-center gap-1 text-primary underline-offset-2 hover:underline focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/30",href:n,onClick:a=>{a.preventDefault(),VGe(n)},rel:"noreferrer",target:"_blank",children:[t("Docs"),(0,fe.jsx)(ou,{className:"h-3 w-3"})]})]})})]})}function FGe(e,t){return t(e==="claude-code"?"Identifies the Claude Code user-agent to provide deep Claude Code integration.":"Identifies the Codex user-agent to provide deep Codex integration.")}function BGe(e,t){return`https://ccrdesk.top${t==="zh"?"/configuration/routing":"/en/configuration/routing"}#${e==="claude-code"?"claude-code":"codex"}`}function VGe(e){if(window.ccr?.openExternal){window.ccr.openExternal(e).catch(()=>{});return}window.open(e,"_blank","noopener,noreferrer")}function Fce({className:e,fallback:t,label:r,onChange:o,providers:n}){let a=ve(),[i,s]=(0,D.useState)(""),l=(0,D.useMemo)(()=>Rs(n),[n]),u=Ht(l0,a);function d(g){o(Sl({...t,...g}))}function c(){let g=i.trim();g&&(d({models:Rn([...t.models,g])}),s(""))}function f(g,m){let h=g+m;if(h<0||h>=t.models.length)return;let k=[...t.models],[M]=k.splice(g,1);k.splice(h,0,M),d({models:k})}function p(g){d({models:t.models.filter((m,h)=>h!==g)})}return(0,fe.jsxs)("div",{className:J("min-w-0",e),children:[(0,fe.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-[minmax(180px,220px)_minmax(120px,160px)_1fr]",children:[(0,fe.jsx)(xe,{label:r,children:(0,fe.jsx)(St,{onChange:g=>d({mode:g}),options:u,value:t.mode})}),t.mode==="retry"?(0,fe.jsx)(xe,{label:a("Retries"),children:(0,fe.jsx)(Te,{max:9999,min:0,onChange:g=>d({retryCount:Ma(Number(g.target.value),0,9999)}),type:"number",value:String(t.retryCount)})}):null,t.mode==="model-chain"?(0,fe.jsxs)("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-end gap-2 sm:col-span-2",children:[(0,fe.jsx)(xe,{label:a("Fallback target"),children:(0,fe.jsx)(Pm,{modelOptions:l,onChange:s,value:i})}),(0,fe.jsxs)(ne,{disabled:!i.trim(),onClick:c,type:"button",children:[(0,fe.jsx)(It,{className:"h-4 w-4"}),a("Add")]})]}):null]}),t.mode==="model-chain"?(0,fe.jsx)("div",{className:"mt-3 flex min-w-0 flex-wrap gap-2",children:t.models.length===0?(0,fe.jsx)("div",{className:"text-[12px] text-muted-foreground",children:a("No fallback targets configured")}):t.models.map((g,m)=>(0,fe.jsxs)("div",{className:"flex max-w-full items-center gap-1 rounded-md border border-border bg-background px-2 py-1",children:[(0,fe.jsx)("span",{className:"min-w-0 truncate font-mono text-[11px]",title:g,children:g}),(0,fe.jsx)(ne,{"aria-label":`${a("Move")} ${g} ${a("up")}`,disabled:m===0,onClick:()=>f(m,-1),size:"iconSm",title:a("Move up"),type:"button",variant:"ghost",children:(0,fe.jsx)(dp,{className:"h-3.5 w-3.5"})}),(0,fe.jsx)(ne,{"aria-label":`${a("Move")} ${g} ${a("down")}`,disabled:m===t.models.length-1,onClick:()=>f(m,1),size:"iconSm",title:a("Move down"),type:"button",variant:"ghost",children:(0,fe.jsx)(up,{className:"h-3.5 w-3.5"})}),(0,fe.jsx)(ne,{"aria-label":`${a("Remove")} ${g}`,onClick:()=>p(m),size:"iconSm",title:a("Remove"),type:"button",variant:"ghost",children:(0,fe.jsx)(ft,{className:"h-3.5 w-3.5"})})]},`${g}-${m}`))}):null]})}function y5({onClose:e,onConfirm:t,rule:r}){let o=ve(),n=r.name||o("Unnamed rule"),a=kR(r),i=MR(r);return(0,fe.jsx)(Ft,{onOpenChange:s=>!s&&e(),children:(0,fe.jsxs)(Tt,{className:"max-w-[520px]",children:[(0,fe.jsxs)(Bt,{children:[(0,fe.jsx)("div",{className:"min-w-0",children:(0,fe.jsx)(Vt,{children:o("Delete Routing Rule")})}),(0,fe.jsx)(ne,{"aria-label":o("Close dialog"),onClick:e,size:"iconSm",title:o("Close"),type:"button",variant:"ghost",children:(0,fe.jsx)(ft,{className:"h-4 w-4"})})]}),(0,fe.jsx)(Ot,{children:(0,fe.jsxs)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2.5",children:[(0,fe.jsxs)("div",{className:"flex items-start gap-2 text-[12px] font-medium text-destructive",children:[(0,fe.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,fe.jsx)("span",{children:o("Delete this routing rule from the configuration?")})]}),(0,fe.jsxs)("div",{className:"mt-2 space-y-1 text-[11px] text-muted-foreground",children:[(0,fe.jsxs)("div",{className:"truncate",title:n,children:[(0,fe.jsxs)("span",{className:"font-medium text-foreground",children:[o("Name"),":"]})," ",n]}),(0,fe.jsxs)("div",{className:"truncate",title:a,children:[(0,fe.jsxs)("span",{className:"font-medium text-foreground",children:[o("Condition"),":"]})," ",a]}),(0,fe.jsxs)("div",{className:"truncate",title:i,children:[(0,fe.jsxs)("span",{className:"font-medium text-foreground",children:[o("Request action"),":"]})," ",i]}),(0,fe.jsx)("div",{children:o("This action is applied immediately to the draft config and will auto-save with other changes.")})]})]})}),(0,fe.jsxs)($t,{children:[(0,fe.jsx)(ne,{autoFocus:!0,onClick:e,type:"button",variant:"outline",children:o("Cancel")}),(0,fe.jsxs)(ne,{onClick:t,type:"button",variant:"destructive",children:[(0,fe.jsx)(ar,{className:"h-4 w-4"}),o("Delete")]})]})]})})}function x5({canSubmit:e,draft:t,mode:r,onChange:o,onClose:n,onSubmit:a,providers:i}){let s=ve(),l=Ht(a0,s),u=Ht(s0,s);function d(){o({rewrites:[...t.rewrites,CR()]})}function c(p,g){o({rewrites:t.rewrites.map((m,h)=>h===p?{...m,...g}:m)})}function f(p){o({rewrites:t.rewrites.filter((g,m)=>m!==p)})}return(0,fe.jsx)(Ft,{onOpenChange:p=>!p&&n(),children:(0,fe.jsxs)(Tt,{children:[(0,fe.jsxs)(Bt,{children:[(0,fe.jsx)("div",{className:"min-w-0",children:(0,fe.jsx)(Vt,{children:s(r==="edit"?"Edit Routing Rule":"Add Routing Rule")})}),(0,fe.jsx)(ne,{"aria-label":s("Close dialog"),onClick:n,size:"iconSm",title:s("Close"),type:"button",variant:"ghost",children:(0,fe.jsx)(ft,{className:"h-4 w-4"})})]}),(0,fe.jsx)(Ot,{children:(0,fe.jsxs)(Qe.div,{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",layout:!0,transition:WM,children:[(0,fe.jsx)(xe,{className:"sm:col-span-2",label:s("Name"),children:(0,fe.jsx)(Te,{value:t.name,onChange:p=>o({name:p.target.value})})}),(0,fe.jsx)(xe,{className:"sm:col-span-2",label:s("Condition"),children:(0,fe.jsx)("div",{className:"rounded-md border border-border bg-muted/20 p-2",children:(0,fe.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-[160px_minmax(0,1fr)_112px_minmax(0,1fr)]",children:[(0,fe.jsx)(St,{onChange:p=>o({conditionSource:p}),options:l,value:t.conditionSource}),(0,fe.jsx)(Te,{className:"font-mono text-[12px]",onChange:p=>o({conditionField:p.target.value}),placeholder:t.conditionSource.endsWith(".header")?"x-api-key":"model",value:t.conditionField}),(0,fe.jsx)(St,{onChange:p=>o({conditionOperator:p}),options:i0,value:t.conditionOperator}),(0,fe.jsx)(Te,{className:"font-mono text-[12px]",onChange:p=>o({conditionRight:p.target.value}),placeholder:s("Value"),value:t.conditionRight})]})})}),(0,fe.jsx)(xe,{className:"sm:col-span-2",label:s("Rewrite request parameters"),children:(0,fe.jsxs)("div",{className:"space-y-2 rounded-md border border-border bg-muted/20 p-2",children:[t.rewrites.map((p,g)=>(0,fe.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-[150px_minmax(0,1fr)_minmax(0,1fr)_32px]",children:[(0,fe.jsx)(St,{onChange:m=>c(g,{operation:m}),options:u,value:p.operation}),(0,fe.jsx)(Te,{className:"font-mono text-[12px]",onChange:m=>c(g,{key:m.target.value}),placeholder:"request.body.model",value:p.key}),p.operation==="delete"?(0,fe.jsx)("div",{className:"h-9 rounded-md border border-dashed border-border bg-background/40"}):p.operation==="array-replace"?(0,fe.jsxs)("div",{className:"grid grid-cols-1 gap-2 sm:grid-cols-2",children:[(0,fe.jsx)(Te,{className:"font-mono text-[12px]",onChange:m=>c(g,{match:m.target.value}),placeholder:s("Match value"),value:p.match}),(0,fe.jsx)(Te,{className:"font-mono text-[12px]",onChange:m=>c(g,{value:m.target.value}),placeholder:s("Value"),value:p.value})]}):(0,fe.jsx)(Te,{className:"font-mono text-[12px]",onChange:m=>c(g,{value:m.target.value}),placeholder:p.operation==="set"?"glm-5.2":s("Value"),value:p.value}),(0,fe.jsx)(ne,{"aria-label":s("Remove"),disabled:t.rewrites.length<=1,onClick:()=>f(g),size:"iconSm",title:s("Remove"),type:"button",variant:"ghost",children:(0,fe.jsx)(ar,{className:"h-3.5 w-3.5"})})]},p.id)),(0,fe.jsxs)(ne,{onClick:d,type:"button",variant:"outline",children:[(0,fe.jsx)(It,{className:"h-4 w-4"}),s("Add parameter")]})]})}),(0,fe.jsx)(xe,{label:s("Enabled"),children:(0,fe.jsx)(Co,{checked:t.enabled,onChange:p=>o({enabled:p})})}),(0,fe.jsx)(Fce,{className:"sm:col-span-2",fallback:t.fallback,label:s("On failure"),onChange:p=>o({fallback:p}),providers:i})]})}),(0,fe.jsxs)($t,{children:[(0,fe.jsx)(ne,{onClick:n,type:"button",variant:"outline",children:s("Cancel")}),(0,fe.jsxs)(ne,{disabled:!e,onClick:a,type:"button",children:[r==="edit"?(0,fe.jsx)(yt,{className:"h-4 w-4"}):(0,fe.jsx)(It,{className:"h-4 w-4"}),s(r==="edit"?"Save":"Add")]})]})]})})}var S=z(ze()),ph="mx-auto w-full max-w-[900px]";function S5({appInfo:e,botAddRequestKey:t,botConfigs:r,copy:o,initialPage:n="appearance",languagePreference:a,launchAtLogin:i,onChangeBotConfigs:s,onChangeLaunchAtLogin:l,onChangeObservability:u,onChangeToolHub:d,onChangeTrayBalanceProgress:c,onChangeLanguage:f,onChangeTheme:p,onChangeTrayIcon:g,onChangeTrayWidgets:m,onClose:h,observability:k,profiles:M,providers:v,providerAccountSnapshots:b,systemLanguage:w,systemTheme:P,themePreference:L,toolHub:C,traySupported:F,trayBalanceProgress:T,trayIconPreference:G,trayWidgets:$}){return(0,S.jsx)(UGe,{copy:o,initialPage:n,onClose:h,renderPage:oe=>oe==="appearance"?(0,S.jsx)(WGe,{copy:o,languagePreference:a,launchAtLogin:i,launchAtLoginSupported:e.launchAtLoginSupported,onChangeLaunchAtLogin:l,onChangeLanguage:f,onChangeTheme:p,systemLanguage:w,systemTheme:P,themePreference:L}):oe==="tray"?(0,S.jsx)(ije,{copy:o,onChangeTrayBalanceProgress:c,onChangeTrayIcon:g,onChangeTrayWidgets:m,providerAccountSnapshots:b,trayBalanceProgress:T,trayIconPreference:G,trayWidgets:$}):oe==="observability"?(0,S.jsx)(GGe,{copy:o,observability:k,onChange:u}):oe==="toolhub"?(0,S.jsx)(jGe,{copy:o,onChange:d,providers:v,toolHub:C}):oe==="bots"?(0,S.jsx)(JGe,{addRequestKey:t,botConfigs:r,copy:o,onChange:s,profiles:M}):oe==="data"?(0,S.jsx)(XGe,{appInfo:e,copy:o}):null,traySupported:F})}function UGe({copy:e,initialPage:t,onClose:r,renderPage:o,traySupported:n}){let[a,i]=(0,D.useState)(t),s=a==="tray"&&!n?"appearance":a;return(0,D.useEffect)(()=>{i(t)},[t]),(0,S.jsx)(Ft,{onOpenChange:l=>!l&&r(),children:(0,S.jsxs)(Tt,{className:"h-[min(700px,calc(100dvh-2rem))] max-w-[1160px]",children:[(0,S.jsxs)(Bt,{children:[(0,S.jsx)("div",{className:"min-w-0",children:(0,S.jsx)(Vt,{children:e.settings.title})}),(0,S.jsx)(ne,{"aria-label":e.settings.close,onClick:r,size:"iconSm",title:e.settings.close,type:"button",variant:"ghost",children:(0,S.jsx)(ft,{className:"h-4 w-4"})})]}),(0,S.jsxs)(Ot,{className:"flex overflow-hidden p-0 max-[640px]:flex-col",children:[(0,S.jsxs)("aside",{className:"flex w-[220px] shrink-0 flex-col border-r border-border/70 bg-muted/20 p-2 max-[640px]:w-full max-[640px]:border-b max-[640px]:border-r-0",children:[(0,S.jsx)(fh,{active:s==="appearance",icon:Mk,label:e.settings.appearance,onClick:()=>i("appearance")}),(0,S.jsx)(fh,{active:s==="observability",className:"mt-1",icon:cs,label:e.settings.observability,onClick:()=>i("observability")}),(0,S.jsx)(fh,{active:s==="toolhub",className:"mt-1",icon:ms,label:e.settings.toolHub,onClick:()=>i("toolhub")}),(0,S.jsx)(fh,{active:s==="bots",className:"mt-1",icon:fs,label:e.settings.bots,onClick:()=>i("bots")}),(0,S.jsx)(fh,{active:s==="data",className:"mt-1",icon:ia,label:e.settings.data,onClick:()=>i("data")}),n?(0,S.jsx)(fh,{active:s==="tray",className:"mt-1",icon:ps,label:e.settings.tray,onClick:()=>i("tray")}):null]}),(0,S.jsx)("section",{className:"min-h-0 flex-1 overflow-auto p-5",children:o(s)})]}),(0,S.jsx)($t,{children:(0,S.jsx)(ne,{onClick:r,type:"button",children:e.settings.done})})]})})}function fh({active:e,className:t,icon:r,label:o,onClick:n}){return(0,S.jsxs)(ne,{className:J("flex h-9 w-full min-w-0 items-center gap-2 rounded-md px-2 text-left text-[12px] font-medium transition-colors",e?"bg-card text-foreground shadow-[0_1px_2px_rgba(0,0,0,0.05)]":"text-muted-foreground hover:bg-muted hover:text-foreground",t),onClick:n,type:"button",unstyled:!0,children:[(0,S.jsx)("span",{className:J("flex h-6 w-6 shrink-0 items-center justify-center rounded-md",e?"bg-primary/10 text-primary":"text-muted-foreground"),children:(0,S.jsx)(r,{className:"h-3.5 w-3.5"})}),(0,S.jsx)("span",{className:"min-w-0 flex-1 truncate",children:o})]})}function WGe({copy:e,languagePreference:t,launchAtLogin:r,launchAtLoginSupported:o,onChangeLaunchAtLogin:n,onChangeLanguage:a,onChangeTheme:i,systemLanguage:s,systemTheme:l,themePreference:u}){let d=[{label:o4(e.settings.themeSystem,Yle(l,e)),value:"system"},{label:e.settings.themeLight,value:"light"},{label:e.settings.themeDark,value:"dark"}],c=[{label:o4(e.settings.languageSystem,Zle(s,e)),value:"system"},{label:e.settings.languageChinese,value:"zh"},{label:e.settings.languageEnglish,value:"en"}];return(0,S.jsxs)("div",{className:J(ph,"grid grid-cols-1 gap-5"),children:[(0,S.jsx)("h3",{className:"text-[15px] font-semibold text-foreground",children:e.settings.appearance}),(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-4",children:[(0,S.jsx)(xe,{label:e.settings.theme,children:(0,S.jsx)(St,{onChange:i,options:d,value:u})}),(0,S.jsx)(xe,{label:e.settings.language,children:(0,S.jsx)(St,{onChange:a,options:c,value:t})}),o?(0,S.jsx)(U0,{checked:r,description:e.settings.launchAtLoginDescription,icon:il,label:e.settings.launchAtLogin,onChange:n}):null]})]})}function GGe({copy:e,observability:t,onChange:r}){return(0,S.jsxs)("div",{className:J(ph,"grid grid-cols-1 gap-5"),children:[(0,S.jsx)("h3",{className:"text-[15px] font-semibold text-foreground",children:e.settings.observability}),(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,S.jsx)(U0,{checked:t.requestLogs,description:e.settings.requestLogsDescription,icon:ia,label:e.settings.requestLogs,onChange:o=>r({requestLogs:o})}),(0,S.jsx)(U0,{checked:t.agentAnalysis,description:e.settings.agentAnalysisDescription,icon:cs,label:e.settings.agentAnalysis,onChange:o=>r({agentAnalysis:o})})]})]})}function jGe({copy:e,onChange:t,providers:r,toolHub:o}){let n=ve(),a=(0,D.useMemo)(()=>Rs(r),[r]),i=(0,D.useMemo)(()=>$Ge(o,r),[r,o]),[s,l]=(0,D.useState)(()=>x0(o.mcpServers)),[u,d]=(0,D.useState)(""),[c,f]=(0,D.useState)(),[p,g]=(0,D.useState)(!1),[m,h]=(0,D.useState)(!1),[k,M]=(0,D.useState)(""),[v,b]=(0,D.useState)(""),w=oe=>{if(!oe)return;let se=YGe(oe);if(!se)return;let pe=r.find(N=>N.name===se.provider);t({llm:{...o.llm,apiKey:ZGe(pe),baseUrl:w5(pe),model:se.model}})},P=(oe,se)=>{let pe=Number(se);Number.isFinite(pe)&&t(B0({...o,[oe]:pe}))},L=()=>{l(x0(o.mcpServers)),d(""),f(void 0),g(!0)},C=()=>{b(""),M(""),h(!0)},F=oe=>{let se=o.mcpServers[oe];se&&(l(eh(se)),d(""),f(oe),g(!0))},T=()=>{let oe=Gc(s);if(oe){d(oe);return}let se=s.name.trim().toLowerCase();if(o.mcpServers.some((R,U)=>U!==c&&R.name.trim().toLowerCase()===se)){d("MCP server name already exists.");return}let pe=[...o.mcpServers],N=jc(s,pe,c);c===void 0?pe.push(N):pe[c]=N,t({mcpServers:pe}),g(!1),d("")},G=oe=>{t({mcpServers:o.mcpServers.filter((se,pe)=>pe!==oe)})},$=()=>{let oe=HGe(v,o.mcpServers);if("error"in oe){M(oe.error);return}t({mcpServers:[...o.mcpServers,...oe.servers]}),h(!1),M(""),b("")};return(0,S.jsxs)("div",{className:J(ph,"grid grid-cols-1 gap-5"),children:[(0,S.jsxs)("div",{className:"grid gap-1",children:[(0,S.jsx)("h3",{className:"text-[15px] font-semibold text-foreground",children:e.settings.toolHub}),(0,S.jsx)("p",{className:"text-[12px] leading-5 text-muted-foreground",children:e.settings.toolHubDescription})]}),(0,S.jsx)("div",{className:"grid grid-cols-1 gap-3",children:(0,S.jsx)(U0,{checked:o.enabled,description:e.settings.toolHubEnabledDescription,icon:ms,label:e.settings.toolHubEnabled,onChange:oe=>t({enabled:oe})})}),o.enabled?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(U0,{checked:o.browserAutomation,description:e.settings.toolHubBrowserAutomationDescription,icon:nu,label:e.settings.toolHubBrowserAutomation,onChange:oe=>t({browserAutomation:oe})}),(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3 rounded-md border border-border/70 bg-card/70 p-3 md:grid-cols-2",children:[(0,S.jsx)(xe,{className:"md:col-span-2",label:e.settings.toolHubModel,children:(0,S.jsx)(St,{onChange:w,options:[{disabled:!0,label:e.settings.toolHubModelPlaceholder,value:""},...a],value:i})}),(0,S.jsx)(xe,{label:e.settings.toolHubMaxTools,children:(0,S.jsx)(Te,{min:1,max:20,onChange:oe=>P("maxTools",oe.target.value),type:"number",value:String(o.maxTools)})}),(0,S.jsx)(xe,{label:e.settings.toolHubTimeout,children:(0,S.jsx)(Te,{min:8e3,max:3e5,onChange:oe=>P("requestTimeoutMs",oe.target.value),step:1e3,type:"number",value:String(o.requestTimeoutMs)})})]}),(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3 rounded-md border border-border/70 bg-card/70 p-3",children:[(0,S.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,S.jsx)("div",{className:"min-w-0",children:(0,S.jsx)("div",{className:"truncate text-[12px] font-semibold text-foreground",children:n("MCP servers")})}),(0,S.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,S.jsx)(ne,{onClick:C,size:"sm",type:"button",variant:"outline",children:n("Import JSON")}),(0,S.jsxs)(ne,{onClick:L,size:"sm",type:"button",variant:"outline",children:[(0,S.jsx)(It,{className:"h-4 w-4"}),n("Add MCP server")]})]})]}),o.mcpServers.length===0?(0,S.jsx)("div",{className:"rounded-md border border-dashed border-border/70 px-3 py-3 text-[12px] text-muted-foreground",children:n("No MCP servers configured")}):(0,S.jsx)("div",{className:"grid grid-cols-1 gap-2",children:o.mcpServers.map((oe,se)=>(0,S.jsxs)("div",{className:"flex min-w-0 items-center gap-2 rounded-md border border-border/70 bg-background/60 px-3 py-2",children:[(0,S.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,S.jsx)("div",{className:"truncate text-[12px] font-semibold text-foreground",title:oe.name,children:oe.name}),(0,S.jsxs)("div",{className:"truncate text-[11px] text-muted-foreground",title:b0(oe),children:[oe.transport," \xB7 ",b0(oe)]})]}),(0,S.jsx)(ne,{"aria-label":n("Edit MCP server"),onClick:()=>F(se),size:"iconSm",title:n("Edit MCP server"),type:"button",variant:"ghost",children:(0,S.jsx)(No,{className:"h-4 w-4"})}),(0,S.jsx)(ne,{"aria-label":n("Remove MCP server"),onClick:()=>G(se),size:"iconSm",title:n("Remove MCP server"),type:"button",variant:"ghost",children:(0,S.jsx)(ar,{className:"h-4 w-4"})})]},`${oe.name}-${se}`))})]}),(0,S.jsx)(zGe,{draft:s,error:u,mode:c===void 0?"add":"edit",onChange:oe=>l(se=>({...se,...oe})),onClose:()=>g(!1),onSubmit:T,open:p}),(0,S.jsx)(qGe,{error:k,onChange:b,onClose:()=>h(!1),onSubmit:$,open:m,value:v})]}):null]})}function zGe({draft:e,error:t,mode:r,onChange:o,onClose:n,onSubmit:a,open:i}){let s=ve(),l=Ht(u0,s),u=Ht(d0,s);return(0,S.jsx)(Ft,{className:"z-[80]",onOpenChange:d=>!d&&n(),open:i,children:(0,S.jsxs)(Tt,{className:"max-w-[760px]",children:[(0,S.jsxs)(Bt,{children:[(0,S.jsx)("div",{className:"min-w-0",children:(0,S.jsx)(Vt,{children:s(r==="add"?"Add MCP server":"Edit MCP server")})}),(0,S.jsx)(ne,{"aria-label":s("Close dialog"),onClick:n,size:"iconSm",title:s("Close"),type:"button",variant:"ghost",children:(0,S.jsx)(ft,{className:"h-4 w-4"})})]}),(0,S.jsx)(Ot,{children:(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,S.jsx)(xe,{label:s("MCP server"),children:(0,S.jsx)(Te,{onChange:d=>o({name:d.target.value}),value:e.name})}),(0,S.jsx)(xe,{label:s("Transport"),children:(0,S.jsx)(St,{onChange:d=>o({transport:d}),options:l,value:e.transport})})]}),e.transport==="stdio"?(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,S.jsx)(xe,{label:s("Command"),children:(0,S.jsx)(Te,{onChange:d=>o({command:d.target.value}),value:e.command})}),(0,S.jsx)(xe,{label:s("Arguments"),children:(0,S.jsx)(Te,{onChange:d=>o({argsText:d.target.value}),value:e.argsText})}),(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,S.jsx)(xe,{label:s("Working directory"),children:(0,S.jsx)(Te,{onChange:d=>o({cwd:d.target.value}),value:e.cwd})}),(0,S.jsx)(xe,{label:s("Stdio message mode"),children:(0,S.jsx)(St,{onChange:d=>o({stdioMessageMode:d}),options:u,value:e.stdioMessageMode})})]}),(0,S.jsx)(xe,{label:s("Environment variables"),children:(0,S.jsx)($i,{addLabel:s("Add variable"),onChange:d=>o({envRows:d}),rows:e.envRows})})]}):(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,S.jsx)(xe,{label:s("URL"),children:(0,S.jsx)(Te,{onChange:d=>o({url:d.target.value}),value:e.url})}),(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,S.jsx)(xe,{label:s("API key"),children:(0,S.jsx)(Te,{autoComplete:"off",onChange:d=>o({apiKey:d.target.value}),type:"password",value:e.apiKey})}),(0,S.jsx)(xe,{label:s("API key env"),children:(0,S.jsx)(Te,{onChange:d=>o({apiKeyEnv:d.target.value}),value:e.apiKeyEnv})})]}),(0,S.jsx)(xe,{label:s("Headers"),children:(0,S.jsx)($i,{addLabel:s("Add variable"),onChange:d=>o({headerRows:d}),rows:e.headerRows})})]}),(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,S.jsx)(xe,{label:s("Request timeout"),children:(0,S.jsx)(Te,{onChange:d=>o({requestTimeoutMs:d.target.value}),type:"number",value:e.requestTimeoutMs})}),(0,S.jsx)(xe,{label:s("Startup timeout"),children:(0,S.jsx)(Te,{onChange:d=>o({startupTimeoutMs:d.target.value}),type:"number",value:e.startupTimeoutMs})})]}),t?(0,S.jsx)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:s(t)}):null]})}),(0,S.jsxs)($t,{children:[(0,S.jsx)(ne,{onClick:n,type:"button",variant:"outline",children:s("Cancel")}),(0,S.jsxs)(ne,{onClick:a,type:"button",children:[(0,S.jsx)(It,{className:"h-4 w-4"}),s(r==="add"?"Add":"Save")]})]})]})})}function qGe({error:e,onChange:t,onClose:r,onSubmit:o,open:n,value:a}){let i=ve();return(0,S.jsx)(Ft,{className:"z-[80]",onOpenChange:s=>!s&&r(),open:n,children:(0,S.jsxs)(Tt,{className:"max-w-[760px]",children:[(0,S.jsxs)(Bt,{children:[(0,S.jsx)("div",{className:"min-w-0",children:(0,S.jsx)(Vt,{children:i("Import MCP JSON")})}),(0,S.jsx)(ne,{"aria-label":i("Close dialog"),onClick:r,size:"iconSm",title:i("Close"),type:"button",variant:"ghost",children:(0,S.jsx)(ft,{className:"h-4 w-4"})})]}),(0,S.jsx)(Ot,{children:(0,S.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,S.jsx)(xe,{label:i("MCP JSON"),children:(0,S.jsx)(ji,{className:"min-h-[260px] font-mono text-[12px]",onChange:s=>t(s.target.value),placeholder:["{",' "mcpServers": {',' "filesystem": {',' "command": "npx",',' "args": ["-y", "@modelcontextprotocol/server-filesystem", "/tmp"]'," }"," }","}"].join(`
78
+ `),value:a})}),e?(0,S.jsx)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:i(e)}):null]})}),(0,S.jsxs)($t,{children:[(0,S.jsx)(ne,{onClick:r,type:"button",variant:"outline",children:i("Cancel")}),(0,S.jsx)(ne,{onClick:o,type:"button",children:i("Import")})]})]})})}function HGe(e,t){let r;try{r=JSON.parse(e)}catch{return{error:"Invalid JSON."}}let o=KGe(r);if(o.length===0)return{error:"No MCP servers found in JSON."};let n=new Set(t.map(i=>i.name.trim().toLowerCase())),a=[];for(let i of o){let s=x4({...i.value,name:typeof i.value.name=="string"&&i.value.name.trim()?i.value.name:i.nameHint??""}),l=Gc(s);if(l)return{error:l};let u=s.name.trim().toLowerCase();if(n.has(u))return{error:"MCP server name already exists."};n.add(u),a.push(jc(s,[...t,...a],void 0))}return{servers:a}}function KGe(e){if(Array.isArray(e))return e.filter(V0).map(r=>({value:r}));if(!V0(e))return[];let t=e.mcpServers??e.mcp_servers;return Array.isArray(t)?t.filter(V0).map(r=>({value:r})):V0(t)?Object.entries(t).filter(([,r])=>V0(r)).map(([r,o])=>({nameHint:r,value:o})):[{value:e}]}function V0(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function $Ge(e,t){let r=e.llm.model.trim();if(!r)return"";let o=e.llm.baseUrl.trim(),n=t.find(a=>a.models?.includes(r)&&(!o||!w5(a)||w5(a)===o))??t.find(a=>a.models?.includes(r));return n?`${n.name},${r}`:""}function YGe(e){let t=e.indexOf(",");if(t<=0||t>=e.length-1)return;let r=e.slice(0,t).trim(),o=e.slice(t+1).trim();return r&&o?{model:o,provider:r}:void 0}function w5(e){return e?.baseUrl||e?.baseurl||e?.api_base_url||""}function ZGe(e){let t=e?.api_key||e?.apiKey||e?.apikey;if(t)return t;let r=e?.credentials?.find(o=>o.enabled!==!1&&(o.api_key||o.apiKey||o.apikey));return r?.api_key||r?.apiKey||r?.apikey||""}function U0({checked:e,description:t,icon:r,label:o,onChange:n}){return(0,S.jsxs)("div",{className:"flex min-w-0 items-center gap-3 rounded-md border border-border bg-muted/20 px-3 py-3",children:[(0,S.jsx)("span",{className:J("flex h-8 w-8 shrink-0 items-center justify-center rounded-md",e?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:(0,S.jsx)(r,{className:"h-4 w-4"})}),(0,S.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,S.jsx)("div",{className:"text-[13px] font-semibold text-foreground",children:o}),(0,S.jsx)("div",{className:"mt-0.5 text-[11px] leading-4 text-muted-foreground",children:t})]}),(0,S.jsx)(Du,{checked:e,onCheckedChange:n})]})}function XGe({appInfo:e,copy:t}){let r=d=>t.text[d]??d,[o,n]=(0,D.useState)(!1),[a,i]=(0,D.useState)(""),[s,l]=(0,D.useState)("");async function u(){if(!o){if(!window.ccr?.exportData){i(r("Data export is only available in the Electron app."));return}n(!0),i(""),l("");try{let d=await window.ccr.exportData();d.canceled||l(d.file||"")}catch(d){i(UM(t,d))}finally{n(!1)}}}return(0,S.jsxs)("div",{className:J(ph,"grid grid-cols-1 gap-5"),children:[(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("h3",{className:"text-[15px] font-semibold text-foreground",children:t.settings.data}),(0,S.jsx)("div",{className:"mt-1 text-[12px] text-muted-foreground",children:r("Configuration is stored in SQLite. The legacy JSON file is only read once for migration.")})]}),(0,S.jsxs)("div",{className:"grid gap-2 rounded-md border border-border bg-background p-3",children:[(0,S.jsx)(YR,{label:r("Config database"),value:e.appConfigDbFile}),(0,S.jsx)(YR,{label:r("API key database"),value:e.apiKeysDbFile}),(0,S.jsx)(YR,{label:r("Request log database"),value:e.requestLogsDbFile}),(0,S.jsx)(YR,{label:r("Usage database"),value:e.usageDbFile})]}),(0,S.jsxs)("div",{className:"rounded-md border border-border bg-muted/20 px-3 py-3",children:[(0,S.jsxs)("div",{className:"flex min-w-0 items-start gap-3",children:[(0,S.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",children:(0,S.jsx)(ia,{className:"h-4 w-4"})}),(0,S.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,S.jsx)("div",{className:"text-[13px] font-semibold text-foreground",children:r("Export data")}),(0,S.jsx)("div",{className:"mt-0.5 text-[11px] leading-4 text-muted-foreground",children:r("Export current configuration and SQLite data into a single JSON backup file. The export contains API keys and should be stored securely.")})]}),(0,S.jsxs)(ne,{disabled:o,onClick:u,size:"sm",type:"button",children:[o?(0,S.jsx)(ct,{className:"h-4 w-4 animate-spin"}):(0,S.jsx)(ia,{className:"h-4 w-4"}),r(o?"Exporting":"Export")]})]}),s?(0,S.jsxs)("div",{className:"mt-3 rounded-md border border-emerald-200 bg-emerald-50 px-3 py-2 text-[11px] text-emerald-800 dark:border-emerald-900/60 dark:bg-emerald-950/30 dark:text-emerald-200",children:[(0,S.jsxs)("span",{className:"font-medium",children:[r("Exported"),":"]})," ",(0,S.jsx)("span",{className:"break-all",children:s})]}):null,a?(0,S.jsx)("div",{className:"mt-3 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[11px] text-destructive",children:a}):null]})]})}function YR({label:e,value:t}){return(0,S.jsxs)("div",{className:"grid min-w-0 gap-1 rounded-md bg-muted/20 px-2 py-2 sm:grid-cols-[160px_minmax(0,1fr)] sm:items-center",children:[(0,S.jsx)("div",{className:"text-[11px] font-medium text-muted-foreground",children:e}),(0,S.jsx)("div",{className:"min-w-0 break-all font-mono text-[11px] text-foreground",children:t})]})}function JGe({addRequestKey:e=0,botConfigs:t,copy:r,onChange:o,profiles:n}){let a=p=>r.text[p]??p,[i,s]=(0,D.useState)(),[l,u]=(0,D.useState)(),d=(0,D.useRef)(0);(0,D.useEffect)(()=>{e!==d.current&&(d.current=e,s({mode:"add"}))},[e]);function c(p){let g=t.some(m=>m.id===p.id);o(g?t.map(m=>m.id===p.id?p:m):[...t,p]),s(void 0)}function f(p){b5(p,n).length>0||(o(t.filter(g=>g.id!==p.id)),u(void 0))}return(0,S.jsxs)("div",{className:J(ph,"grid grid-cols-1 gap-5"),children:[(0,S.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("h3",{className:"text-[15px] font-semibold text-foreground",children:r.settings.bots}),(0,S.jsx)("div",{className:"mt-1 text-[12px] text-muted-foreground",children:a("Manage bots used by agent profiles.")})]}),(0,S.jsx)(ne,{onClick:()=>s({mode:"add"}),size:"sm",type:"button",children:a("Add bot")})]}),(0,S.jsxs)("div",{className:"grid gap-2",children:[t.length===0?(0,S.jsx)("div",{className:"rounded-md border border-dashed border-border bg-muted/20 px-3 py-8 text-center text-[12px] text-muted-foreground",children:a("No bots configured")}):null,t.map(p=>{let g=b5(p,n);return(0,S.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3 rounded-md border border-border bg-background px-3 py-2.5",children:[(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"truncate text-[13px] font-semibold text-foreground",children:p.name}),(0,S.jsxs)("div",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:[a(zc(p.botGateway.platform)),p.botGateway.authType?` / ${a(aje(p.botGateway.platform,p.botGateway.authType))}`:"",g.length>0?` \xB7 ${QGe(g.length,a)}`:""]})]}),(0,S.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[(0,S.jsx)(ne,{onClick:()=>s({config:p,mode:"edit"}),size:"sm",type:"button",variant:"outline",children:a("Edit")}),(0,S.jsx)(ne,{onClick:()=>u(p),size:"sm",type:"button",variant:"outline",children:a("Delete")})]})]},p.id)})]}),i?(0,S.jsx)(tje,{botConfigs:t,config:i.config,copy:r,mode:i.mode,onClose:()=>s(void 0),onSave:c}):null,l?(0,S.jsx)(eje,{config:l,copy:r,onClose:()=>u(void 0),onConfirm:()=>f(l),usedByProfiles:b5(l,n)}):null]})}function b5(e,t){return t.filter(r=>r.botConfigId===e.id)}function Bce(e,t){let r=t(va(e.agent)),o=e.name.trim();return o&&o!==r?`${r} / ${o}`:r}function QGe(e,t){return t("{count} agent profiles use this bot").replace("{count}",String(e))}function eje({config:e,copy:t,onClose:r,onConfirm:o,usedByProfiles:n}){let a=s=>t.text[s]??s,i=n.length>0;return(0,S.jsx)(Ft,{onOpenChange:s=>!s&&r(),open:!0,children:(0,S.jsxs)(Tt,{className:"max-w-[520px]",children:[(0,S.jsxs)(Bt,{children:[(0,S.jsx)("div",{className:"min-w-0",children:(0,S.jsx)(Vt,{children:a("Delete bot")})}),(0,S.jsx)(ne,{"aria-label":t.settings.close,onClick:r,size:"iconSm",title:t.settings.close,type:"button",variant:"ghost",children:(0,S.jsx)(ft,{className:"h-4 w-4"})})]}),(0,S.jsx)(Ot,{children:(0,S.jsxs)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2.5",children:[(0,S.jsxs)("div",{className:"flex items-start gap-2 text-[12px] font-medium text-destructive",children:[(0,S.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,S.jsx)("span",{children:a(i?"This bot is being used by the following agents and cannot be deleted.":"Delete this bot?")})]}),(0,S.jsxs)("div",{className:"mt-2 space-y-1 text-[11px] text-muted-foreground",children:[(0,S.jsxs)("div",{className:"truncate",title:e.name,children:[(0,S.jsxs)("span",{className:"font-medium text-foreground",children:[a("Name"),":"]})," ",e.name]}),(0,S.jsxs)("div",{className:"truncate",children:[(0,S.jsxs)("span",{className:"font-medium text-foreground",children:[a("Platform"),":"]})," ",a(zc(e.botGateway.platform))]}),i?(0,S.jsx)("div",{className:"space-y-1 pt-1",children:n.map(s=>(0,S.jsx)("div",{className:"truncate rounded border border-destructive/20 bg-background/70 px-2 py-1 text-foreground",title:Bce(s,a),children:Bce(s,a)},s.id))}):(0,S.jsx)("div",{children:a("After deletion, this bot data cannot be recovered.")})]})]})}),(0,S.jsx)($t,{children:i?(0,S.jsx)(ne,{autoFocus:!0,onClick:r,type:"button",children:t.settings.close}):(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(ne,{autoFocus:!0,onClick:r,type:"button",variant:"outline",children:a("Cancel")}),(0,S.jsxs)(ne,{onClick:o,type:"button",variant:"destructive",children:[(0,S.jsx)(ar,{className:"h-4 w-4"}),a("Delete")]})]})})]})})}function tje({botConfigs:e,config:t,copy:r,mode:o,onClose:n,onSave:a}){let i=W=>r.text[W]??W,[s,l]=(0,D.useState)(()=>Rde(t)),[u,d]=(0,D.useState)(""),[c,f]=(0,D.useState)(()=>rje()),[p,g]=(0,D.useState)(!1),m=(0,D.useRef)(!1),h=(0,D.useRef)(0),k=(0,D.useRef)(""),M=qc(s.botPlatform),v=_u(M,s.botAuthType),b=ih(M),w=ER(M,v),P=OR.map(W=>({...W,label:i(W.label)})),L=b.map(W=>({label:i(W.label),value:W.value})),C=M==="weixin-ilink"&&v==="qr_login",F=p||c.loading,T=C&&!pe();function G(W){l(K=>({...K,...W})),d("")}function $(W){let K=qc(W),Q=E4(K);G({botAuthFields:T0(s.botAuthFields,K,Q),botAuthType:Q,botPlatform:K})}function oe(W){let K=_u(M,W);G({botAuthFields:T0(s.botAuthFields,M,K),botAuthType:K})}async function se(){if(F)return;if(!Nde(s)){d(i("Bot name, platform, and required authentication fields are required."));return}let W=Tde(s,e,t??c.savedConfig);if(T){await B(W);return}a(N(W,c.start))}function pe(){let W=t?.botGateway;return!!(W&&W.platform===M&&W.authType===v&&W.integrationId?.trim()&&W.stateDir?.trim())}function N(W,K,Q){return!K||W.botGateway.platform!=="weixin-ilink"?W:{...W,botGateway:{...W.botGateway,integrationId:Q?.integrationId||K.integrationId,stateDir:Q?.stateDir||K.stateDir,tenantId:Q?.tenantId||K.tenantId}}}async function R(W=k.current){let K=W.trim();K&&(k.current="",await E(K),await window.ccr?.cancelBotGatewayQrLogin?.({sessionId:K}).catch(()=>{}))}async function U(W){let K=W.trim();K&&(await window.ccr?.closeBotGatewayQrWindow?.({sessionId:K}).catch(()=>{}),await window.ccr?.cancelBotGatewayQrLogin?.({sessionId:K}).catch(()=>{}))}async function E(W=k.current){let K=W.trim();K&&await window.ccr?.closeBotGatewayQrWindow?.({sessionId:K}).catch(()=>{})}async function _(W,K,Q=!1){if(K.kind==="window"){if(!window.ccr?.openBotGatewayQrWindow)throw new Error(i("QR window is available in the Electron app."));return window.ccr.openBotGatewayQrWindow({scanTimeoutMs:300*1e3,sessionId:W.sessionId,title:`${i("Weixin Login")} - ${s.name.trim()||i("Bot")}`,url:K.src,waitForScan:Q})}}async function B(W){let K=h.current+1;h.current=K,g(!0),d("");try{let Q=await j(W,!0,K),ue=Vce(Q.qrCodeUrl);if(ue.kind!=="window")throw new Error(i("Weixin login requires a web login URL."));let Ue=await _(Q,ue,!0);if(!m.current||K!==h.current){await U(Q.sessionId);return}if(Ue?.reason==="timeout")throw new Error(i("QR scan timed out."));if(Ue?.reason==="error")throw new Error(i(Ue.message||"QR scan observation failed."));if(ue.kind==="window"&&Ue&&!Ue.observed)throw new Error(i("QR scan observation failed."));f(Pe=>Pe.start?.sessionId===Q.sessionId?{...Pe,error:"",loading:!0,message:i("Weixin login window closed, confirming login status."),status:"scanned"}:Pe);let de=await re(Q.sessionId,K);k.current="",a(N(W,Q,de))}catch(Q){if(m.current&&K===h.current){let ue=UM(r,Q);d(ue),f(Ue=>({...Ue,error:ue,loading:!1,message:"",status:"failed"})),await R()}}finally{m.current&&K===h.current&&g(!1)}}async function j(W,K,Q){if(!window.ccr?.startBotGatewayQrLogin)throw new Error(i("QR login is available in the Electron app."));if(f(de=>({...de,error:"",loading:!0,message:i("Preparing Weixin login."),savedConfig:W,status:"starting"})),await R(),!m.current||Q!==h.current)throw new Error(i("QR login canceled."));let ue=await window.ccr.startBotGatewayQrLogin({config:W,force:K});if(!m.current||Q!==h.current)throw k.current!==ue.sessionId&&await U(ue.sessionId),new Error(i("QR login canceled."));k.current=ue.sessionId;let Ue=Vce(ue.qrCodeUrl);return f({display:Ue,error:"",loading:!0,message:ue.message||i("Scan with Weixin in the opened window."),savedConfig:W,start:ue,status:"qr_pending"}),ue}async function re(W,K){if(!window.ccr?.waitBotGatewayQrLogin)throw new Error(i("QR login is available in the Electron app."));for(;m.current&&K===h.current;){let Q=await window.ccr.waitBotGatewayQrLogin({sessionId:W,timeoutMs:5e3});if(!m.current||K!==h.current)throw new Error(i("QR login canceled."));if(f(ue=>ue.start?.sessionId===W?{...ue,error:"",loading:!0,message:Q.message||ue.message,status:Q.status,wait:Q}:ue),Q.confirmed||Q.status==="confirmed")return Q;if(oje(Q.status))throw new Error(Q.message||i(nje(Q.status)))}throw new Error(i("QR login canceled."))}return(0,D.useEffect)(()=>(m.current=!0,()=>{m.current=!1,h.current+=1;let W=k.current;W&&(window.ccr?.closeBotGatewayQrWindow?.({sessionId:W}).catch(()=>{}),window.ccr?.cancelBotGatewayQrLogin?.({sessionId:W}).catch(()=>{}))}),[]),(0,S.jsx)(Ft,{onOpenChange:W=>!W&&!F&&n(),open:!0,children:(0,S.jsxs)(Tt,{className:"max-h-[85vh] max-w-2xl overflow-y-auto",children:[(0,S.jsxs)(Bt,{children:[(0,S.jsx)(Vt,{children:i(o==="add"?"Add bot":"Edit bot")}),(0,S.jsx)(ne,{"aria-label":r.settings.close,disabled:F,onClick:n,size:"iconSm",title:r.settings.close,type:"button",variant:"ghost",children:(0,S.jsx)(ft,{className:"h-4 w-4"})})]}),(0,S.jsxs)(Ot,{children:[(0,S.jsxs)("fieldset",{className:"m-0 grid min-w-0 grid-cols-1 gap-3 border-0 p-0 sm:grid-cols-2",disabled:F,children:[(0,S.jsx)(xe,{className:"sm:col-span-2",label:i("Name"),children:(0,S.jsx)(Te,{value:s.name,onChange:W=>G({name:W.target.value})})}),(0,S.jsx)(xe,{label:i("Platform"),children:(0,S.jsx)(St,{onChange:$,options:P,value:M})}),L.length>0?(0,S.jsx)(xe,{label:i("Auth method"),children:(0,S.jsx)(St,{onChange:oe,options:L,value:v})}):null,w.map(W=>(0,S.jsx)(xe,{label:W.required?i(W.label):`${i(W.label)} (${i("Optional")})`,children:(0,S.jsx)(Te,{autoComplete:"off",placeholder:W.placeholder??"",type:W.type==="password"?"password":"text",value:s.botAuthFields[W.key]??"",onChange:K=>G({botAuthFields:{...s.botAuthFields,[W.key]:K.target.value}})})},W.key))]}),u?(0,S.jsx)("div",{className:"mt-3 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:u}):null]}),(0,S.jsxs)($t,{children:[(0,S.jsx)(ne,{disabled:F,onClick:n,type:"button",variant:"outline",children:i("Cancel")}),(0,S.jsxs)(ne,{disabled:F,onClick:()=>{se()},type:"button",children:[F?(0,S.jsx)(ct,{className:"h-4 w-4 animate-spin"}):null,i("Save")]})]})]})})}function rje(){return{display:{kind:"empty",src:""},error:"",loading:!1,message:"",status:"idle"}}function Vce(e){let t=e.trim();return t?t.startsWith("http://")||t.startsWith("https://")?{kind:"window",src:t}:t.startsWith("data:")?{kind:"image",src:t}:t.startsWith("<svg")?{kind:"image",src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(t)}`}:{kind:"image",src:`data:image/png;base64,${t}`}:{kind:"empty",src:""}}function oje(e){return["already_bound","confirmed","expired","failed"].includes(e)}function nje(e){switch(e){case"starting":return"Waiting for QR code";case"qr_pending":case"pending":return"Waiting for scan";case"scanned":return"Scanned, confirm on phone";case"needs_verification":return"Verification required";case"confirmed":return"Connected";case"expired":return"QR code expired";case"already_bound":return"Already connected";case"failed":return"QR login failed";default:return"Waiting for QR code"}}function aje(e,t){let r=_u(e,t);return ih(e).find(o=>o.value===r)?.label??r}function ije({copy:e,onChangeTrayBalanceProgress:t,onChangeTrayIcon:r,onChangeTrayWidgets:o,providerAccountSnapshots:n,trayBalanceProgress:a,trayIconPreference:i,trayWidgets:s}){let l=(0,D.useRef)(null),[u,d]=(0,D.useState)(),[c,f]=(0,D.useState)(),[p,g]=(0,D.useState)(!1),[m,h]=(0,D.useState)(a??{}),k=(0,D.useMemo)(()=>Vc(s),[s]),M=k.find(Y=>Y.id===u)??k[0],v=M?k.findIndex(Y=>Y.id===M.id):-1,b=(0,D.useMemo)(()=>Dje(n),[n]),w=m.provider??"",P=(0,D.useMemo)(()=>Lje(b,w),[b,w]),L=b.some(Y=>Y.provider===w)?w:"",C=P.some(Y=>Y.id===m.meterId)?m.meterId??"":"",T=Rje(m)??a,G=Nje(n,T),$=p?"progress":i,oe=$==="progress",se=[{label:e.settings.trayIconRandom,value:"random"},{label:e.settings.trayIconViolet,value:"violet"},{label:e.settings.trayIconOrange,value:"orange"},{label:e.settings.trayIconCyan,value:"cyan"},{label:e.settings.trayIconProgress,value:"progress"}],pe=sje(e),N=Y=>e.text[Y]??Y,R=M?lje(M.type):"provider-tabs",U=pe.find(Y=>Y.value===R)??pe[0],E=M?e4(M.type):[],_=U.icon,B=ny(Ff(Hl,{activationConstraint:{distance:6}}),Ff(ql,{coordinateGetter:cy}));(0,D.useEffect)(()=>{p||h(a??{})},[p,a?.meterId,a?.provider]);function j(Y){o(Vc(Y))}function re(Y){if(Y==="progress"){g(!0),h(a??{});return}g(!1),r(Y)}function W(Y){g(!0),h(Y?{provider:Y}:{})}function K(Y){let Je=m.provider?.trim();if(!Je||!Y.trim()){h(it=>({...it,meterId:Y}));return}let _e={meterId:Y.trim(),provider:Je};h(_e),g(!1),t(_e)}function Q(Y){let Je=t4(Y.type)?k.find(Lt=>Lt.type===Y.type):void 0;if(Je){d(Je.id);return}let _e=dje(k,Y.id),it=uR({...Y,id:_e});it&&(j([...k,it]),d(_e),f(_e))}function ue(Y,Je){let _e=k.find(it=>it.type===Y.type);if(Je){if(_e){d(_e.id);return}Q(Y);return}_e&&Oe(_e.id)}function Ue(Y,Je){j(k.map(_e=>_e.id===Y?uR({..._e,...Je})??_e:_e))}function de(Y){M&&Ue(M.id,{variant:Y})}function Pe(){!M||v<0||Oe(M.id)}function Oe(Y){let Je=k.findIndex(it=>it.id===Y);if(Je<0)return;let _e=k.filter(it=>it.id!==Y);j(_e),d(it=>it===Y?_e[Math.min(Je,_e.length-1)]?.id:it)}return(0,D.useEffect)(()=>{if(!M||v<0)return;let Y=Je=>{if(Je.defaultPrevented||Je.key!=="Delete"&&Je.key!=="Backspace")return;let _e=Je.target instanceof Element?Je.target:void 0;mje(_e)||_e&&_e!==document.body&&!l.current?.contains(_e)||(Je.preventDefault(),Oe(M.id))};return window.addEventListener("keydown",Y),()=>window.removeEventListener("keydown",Y)},[M,v,k]),(0,S.jsxs)("div",{className:J(ph,"grid min-h-[520px] grid-rows-[auto_auto_auto] gap-4"),ref:l,children:[(0,S.jsx)("h3",{className:"text-[15px] font-semibold text-foreground",children:e.settings.tray}),(0,S.jsxs)("div",{className:"flex flex-wrap items-end gap-3 rounded-md border border-border bg-background p-3",children:[(0,S.jsx)(xe,{className:"min-w-[220px] flex-1",label:e.settings.trayIcon,children:(0,S.jsx)(cje,{onChange:re,options:se,progress:G,value:$})}),oe?b.length>0?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)(xe,{className:"min-w-[180px] flex-1",label:e.settings.trayBalanceProgressAccount,children:(0,S.jsx)(Jo,{onValueChange:W,options:[{disabled:!0,label:N("Select account"),value:""},...b.map(Y=>({label:Y.provider,value:Y.provider}))],value:L})}),(0,S.jsx)(xe,{className:"min-w-[180px] flex-1",label:e.settings.trayBalanceProgressData,children:(0,S.jsx)(Jo,{disabled:!w,onValueChange:K,options:[{disabled:!0,label:N("Select data"),value:""},...P.map(Y=>({label:Oje(Y,N),value:Y.id}))],value:C})}),(0,S.jsx)("div",{className:"basis-full text-[11px] font-medium text-muted-foreground",children:e.settings.trayBalanceProgressRequired})]}):(0,S.jsx)("div",{className:"min-w-[240px] flex-1 rounded-md border border-dashed border-border bg-muted/30 px-3 py-2 text-[12px] text-muted-foreground",children:e.settings.trayBalanceProgressNoData}):null]}),(0,S.jsxs)("div",{className:"grid min-h-0 grid-cols-[220px_minmax(320px,1fr)_260px] gap-4 max-[1140px]:grid-cols-1",children:[(0,S.jsxs)("div",{className:"flex min-h-0 flex-col overflow-hidden rounded-md border border-border bg-background",children:[(0,S.jsx)("div",{className:"shrink-0 border-b border-border/70 px-3 py-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e.settings.trayComponents}),(0,S.jsx)("div",{className:"min-h-0 flex-1 overflow-auto p-2",children:(0,S.jsx)("div",{className:"grid grid-cols-1 gap-1.5",children:pe.map(Y=>{let Je=Y.icon,_e=!Y.repeatable&&k.some(it=>it.type===Y.template.type);return Y.repeatable?(0,S.jsxs)(ne,{className:J("flex min-h-[46px] w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-left text-[12px] font-medium transition-colors","text-muted-foreground hover:bg-muted hover:text-foreground"),onClick:()=>Q(Y.template),type:"button",unstyled:!0,children:[(0,S.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md bg-muted text-muted-foreground",children:(0,S.jsx)(Je,{className:"h-3.5 w-3.5"})}),(0,S.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,S.jsx)("span",{className:"block truncate",children:Y.label}),(0,S.jsx)("span",{className:"block truncate text-[10px] font-normal opacity-70",children:Y.description})]}),(0,S.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md border border-border bg-background text-muted-foreground",children:"+"})]},Y.value):(0,S.jsxs)("div",{className:J("flex min-h-[46px] w-full min-w-0 items-center gap-2 rounded-md px-2 py-1.5 text-left text-[12px] font-medium transition-colors",_e?"bg-primary/5 text-foreground":"text-muted-foreground hover:bg-muted hover:text-foreground"),children:[(0,S.jsx)("span",{className:J("flex h-6 w-6 shrink-0 items-center justify-center rounded-md",_e?"bg-primary/10 text-primary":"bg-muted text-muted-foreground"),children:(0,S.jsx)(Je,{className:"h-3.5 w-3.5"})}),(0,S.jsxs)("button",{className:"min-w-0 flex-1 text-left",onClick:()=>{let it=k.find(Lt=>Lt.type===Y.template.type);if(it){d(it.id);return}ue(Y.template,!0)},type:"button",children:[(0,S.jsx)("span",{className:"block truncate",children:Y.label}),(0,S.jsx)("span",{className:"block truncate text-[10px] font-normal opacity-70",children:Y.description})]}),(0,S.jsx)(Du,{checked:_e,onCheckedChange:it=>ue(Y.template,it)})]},Y.value)})})})]}),(0,S.jsxs)("div",{className:"flex min-h-0 flex-col overflow-hidden rounded-md border border-border bg-muted/15",children:[(0,S.jsx)("div",{className:"shrink-0 border-b border-border/70 px-3 py-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e.settings.trayPreview}),(0,S.jsx)("div",{className:"flex min-h-0 flex-1 justify-center overflow-auto p-3",children:(0,S.jsx)("div",{className:"w-full max-w-[420px]",children:(0,S.jsx)(gje,{copy:e,pendingScrollWidgetId:c,selectedWidgetId:M?.id,widgets:k,onPendingScrollComplete:()=>f(void 0),onSelectWidget:d,onSortWidgets:j,sensors:B})})})]}),(0,S.jsxs)("div",{className:"flex min-h-0 flex-col overflow-hidden rounded-md border border-border bg-background",children:[(0,S.jsx)("div",{className:"shrink-0 border-b border-border/70 px-3 py-2 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:e.settings.trayComponentProperties}),(0,S.jsx)("div",{className:"min-h-0 flex-1 overflow-auto p-3",children:M?(0,S.jsxs)("div",{className:"space-y-3",children:[(0,S.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,S.jsx)("span",{className:"flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-primary/10 text-primary",children:(0,S.jsx)(_,{className:"h-4 w-4"})}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"truncate text-[13px] font-semibold text-foreground",children:U.label}),(0,S.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",children:uje(M.type,e)})]})]}),E.length>0?(0,S.jsx)(xe,{label:e.settings.trayComponentStyle,children:(0,S.jsx)(St,{onChange:Y=>de(Y),options:E.map(Y=>({...Y,label:N(Y.label)})),value:M.variant??Qa(M.type)??""})}):null,(0,S.jsx)(ne,{className:"w-full justify-center",onClick:Pe,size:"sm",type:"button",variant:"outline",children:N("Remove widget")})]}):(0,S.jsx)("div",{className:"rounded-md border border-dashed border-border bg-muted/30 px-3 py-8 text-center text-[12px] text-muted-foreground",children:N("No widget selected")})})]})]})]})}function sje(e){let t=r=>e.text[r]??r;return[{dataOptions:[{label:e.settings.trayModuleSourceTabs,value:"source-tabs"}],description:e.settings.trayModuleSourceTabs,icon:Gn,label:t("Provider component"),repeatable:!1,template:{id:"source-tabs",type:"source-tabs"},value:"provider-tabs"},{dataOptions:[{label:e.settings.trayModuleHeader,value:"header"}],description:e.settings.trayModuleHeader,icon:gs,label:t("Header component"),repeatable:!1,template:{id:"header",type:"header"},value:"header"},{dataOptions:[{label:e.settings.trayModuleAccount,value:"account"}],description:e.settings.trayModuleAccount,icon:ia,label:t("Account component"),repeatable:!0,template:{id:"account",type:"account",variant:Qa("account")},value:"account"},{dataOptions:[{label:e.settings.trayModuleTokenFlow,value:"token-flow"}],description:e.settings.trayModuleTokenFlow,icon:cs,label:t("Trend component"),repeatable:!0,template:{id:"token-flow",type:"token-flow",variant:Qa("token-flow")},value:"trend"},{dataOptions:[{label:e.settings.trayModuleActivity,value:"activity"}],description:e.settings.trayModuleActivity,icon:cs,label:t("Activity component"),repeatable:!0,template:{id:"activity",type:"activity"},value:"activity"},{dataOptions:[{label:e.settings.trayModuleStats,value:"stats"}],description:e.settings.trayModuleStats,icon:ps,label:t("Metric component"),repeatable:!0,template:{id:"stats",type:"stats",variant:Qa("stats")},value:"metrics"},{dataOptions:[{label:e.settings.trayModuleTokenMix,value:"token-mix"},{label:e.settings.trayModuleRings,value:"rings"},{label:e.settings.trayModuleModelShare,value:"model-share"}],description:t("Token mix, rings, model share"),icon:fs,label:t("Breakdown component"),repeatable:!0,template:{id:"token-mix",type:"token-mix",variant:Qa("token-mix")},value:"breakdown"}]}function lje(e){return e==="source-tabs"?"provider-tabs":e==="header"?"header":e==="account"?"account":e==="activity"?"activity":e==="token-flow"?"trend":e==="stats"?"metrics":"breakdown"}function uje(e,t){return e==="account"?t.settings.trayModuleAccount:e==="activity"?t.settings.trayModuleActivity:e==="header"?t.settings.trayModuleHeader:e==="model-share"?t.settings.trayModuleModelShare:e==="rings"?t.settings.trayModuleRings:e==="source-tabs"?t.settings.trayModuleSourceTabs:e==="stats"?t.settings.trayModuleStats:e==="token-flow"?t.settings.trayModuleTokenFlow:t.settings.trayModuleTokenMix}function dje(e,t){let r=new Set(e.map(n=>n.id));if(!r.has(t))return t;let o=2;for(;r.has(`${t}-${o}`);)o+=1;return`${t}-${o}`}function cje({onChange:e,options:t,progress:r,value:o}){return(0,S.jsxs)("div",{className:"relative min-w-0",children:[(0,S.jsx)(fje,{className:"pointer-events-none absolute left-2 top-1/2 z-10 h-5 w-5 -translate-y-1/2 rounded-[5px]",preference:o,progress:r}),(0,S.jsx)(Jo,{className:"pl-10",onValueChange:e,options:t,value:o})]})}function fje({className:e,preference:t,progress:r}){let o=["violet","orange","cyan"];return(0,S.jsxs)("span",{"aria-hidden":"true",className:J("relative flex h-8 w-8 shrink-0 items-center justify-center overflow-hidden rounded-md border border-border bg-background shadow-[inset_0_1px_1px_rgba(255,255,255,0.3)]",e),children:[t==="random"?o.map((n,a)=>(0,S.jsx)("img",{alt:"",className:J("absolute h-[66%] w-[66%] object-contain drop-shadow-sm",a===0&&"left-[9%] top-[22%]",a===1&&"left-[22%] top-[11%]",a===2&&"left-[34%] top-[27%]"),src:ZL[n]},n)):null,Eje(t)?(0,S.jsx)("img",{alt:"",className:"h-[88%] w-[88%] object-contain drop-shadow-sm",src:ZL[t]}):null,t==="progress"?(0,S.jsx)(pje,{progress:r}):null]})}function pje({progress:e=0}){let t=Math.max(0,Math.min(1,e));return(0,S.jsxs)("svg",{"aria-hidden":"true",className:"h-[82%] w-[82%]",viewBox:"0 0 36 36",children:[(0,S.jsx)("rect",{fill:"rgba(15,23,42,.92)",height:"30",rx:"8",width:"30",x:"3",y:"3"}),(0,S.jsx)("rect",{fill:"rgba(148,163,184,.28)",height:"5",rx:"2.5",width:"22",x:"7",y:"22"}),(0,S.jsx)("rect",{fill:"rgb(248,250,252)",height:"5",rx:"2.5",width:Math.max(2,22*t),x:"7",y:"22"}),(0,S.jsx)("rect",{fill:"rgba(248,250,252,.78)",height:"2.5",rx:"1.25",width:"12",x:"7",y:"9"}),(0,S.jsx)("rect",{fill:"rgba(45,212,191,.9)",height:"2.5",rx:"1.25",width:"18",x:"7",y:"15"})]})}function mje(e){return!!e?.closest("input, textarea, select, [contenteditable='true'], [contenteditable='plaintext-only'], [role='textbox']")}function gje({copy:e,pendingScrollWidgetId:t,selectedWidgetId:r,widgets:o,onPendingScrollComplete:n,onSelectWidget:a,onSortWidgets:i,sensors:s}){let l=(0,D.useRef)(null);function u(d){let c=String(d.active.id),f=d.over?String(d.over.id):"";if(!f||c===f)return;let p=o.findIndex(m=>m.id===c),g=o.findIndex(m=>m.id===f);p<0||g<0||p===g||(i?.(Uf(o,p,g)),a?.(c))}return(0,D.useEffect)(()=>{if(!t||!o.some(c=>c.id===t))return;let d=window.requestAnimationFrame(()=>{let c=Mje(l.current,t);c&&(c.scrollIntoView({block:"center",inline:"nearest"}),n?.())});return()=>window.cancelAnimationFrame(d)},[n,t,o]),(0,S.jsxs)("div",{className:"h-[740px] min-w-0 overflow-y-auto overflow-x-hidden rounded-[14px] border border-slate-950/15 bg-slate-950 p-3 text-slate-50 shadow-[0_18px_42px_rgba(15,23,42,.28)]",ref:l,children:[(0,S.jsxs)("div",{className:"mb-3 flex min-w-0 items-center justify-between gap-3 border-b border-white/10 pb-2",children:[(0,S.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,S.jsx)(kje,{}),(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsxs)("div",{className:"truncate text-[12px] font-semibold text-slate-50",children:["88.4k ",mn(e,"tokens","tokens")]}),(0,S.jsx)("div",{className:"truncate text-[10px] font-medium text-slate-400",children:"CCR"})]})]}),(0,S.jsx)("span",{className:"flex h-7 w-7 shrink-0 items-center justify-center rounded-md border border-white/10 bg-white/[.04] text-slate-300","aria-hidden":"true",children:(0,S.jsx)(il,{className:"h-3.5 w-3.5"})})]}),(0,S.jsx)(ly,{collisionDetection:ay,sensors:s,onDragEnd:u,children:(0,S.jsx)(uy,{items:o.map(d=>d.id),strategy:Wf,children:(0,S.jsx)("div",{className:"space-y-2",children:o.map(d=>(0,S.jsx)(hje,{copy:e,selected:d.id===r,widget:d,onSelect:a},d.id))})})}),o.length===0?(0,S.jsx)("div",{className:"flex min-h-[260px] items-center justify-center rounded-[10px] border border-white/10 bg-white/[.03] px-4 text-center text-[12px] font-medium text-slate-400",children:e.settings.trayPreviewEmpty}):null]})}function kje(){return(0,S.jsx)("span",{"aria-hidden":"true",className:"flex h-7 w-7 shrink-0 items-center justify-center overflow-hidden rounded-md border border-white/15 bg-white/10 shadow-[inset_0_1px_1px_rgba(255,255,255,0.12)]",children:(0,S.jsx)("img",{alt:"",className:"h-[72%] w-[72%] object-contain",src:eW})})}function Mje(e,t){if(e)return Array.from(e.querySelectorAll("[data-tray-widget-id]")).find(r=>r.dataset.trayWidgetId===t)}function hje({copy:e,selected:t,widget:r,onSelect:o}){let{attributes:n,isDragging:a,listeners:i,setNodeRef:s,transform:l,transition:u}=dy({id:r.id});return(0,S.jsx)("div",{className:J("cursor-grab touch-none rounded-[10px]",a&&"relative z-20 cursor-grabbing opacity-70"),ref:s,style:{transform:na.Transform.toString(l),transition:u},...n,...i,children:(0,S.jsx)(vje,{copy:e,selected:t,widget:r,onSelect:o})})}function vje({copy:e,selected:t,widget:r,onSelect:o}){let n;return r.type==="source-tabs"?n=(0,S.jsx)(yje,{copy:e}):r.type==="header"?n=(0,S.jsx)(xje,{copy:e}):r.type==="account"?n=(0,S.jsx)(bje,{copy:e,title:e.settings.trayModuleAccount,variant:r.variant??Qa("account")}):r.type==="token-flow"?n=(0,S.jsx)(wje,{copy:e,title:e.settings.trayModuleTokenFlow,variant:r.variant??Qa("token-flow")}):r.type==="activity"?n=(0,S.jsx)(Cje,{copy:e}):r.type==="stats"?n=(0,S.jsx)(Sje,{copy:e,variant:r.variant??Qa("stats")}):r.type==="token-mix"?n=(0,S.jsx)(Pje,{copy:e,variant:r.variant??Qa("token-mix")}):r.type==="rings"?n=(0,S.jsx)(Aje,{title:e.settings.trayModuleRings,variant:r.variant??Qa("rings")}):n=(0,S.jsx)(Ije,{title:e.settings.trayModuleModelShare,variant:r.variant??Qa("model-share")}),o?(0,S.jsx)("button",{className:J("block w-full rounded-[10px] text-left transition",t?"outline outline-2 outline-teal-300/80 outline-offset-2":"outline outline-1 outline-transparent hover:outline-white/18"),"data-tray-widget-id":r.id,onClick:()=>o(r.id),type:"button",children:n}):(0,S.jsx)("div",{"data-tray-widget-id":r.id,children:n})}function yje({copy:e}){return(0,S.jsx)("div",{className:"grid min-w-0 grid-cols-4 gap-1.5",children:["All","OpenAI","Claude","More"].map((t,r)=>(0,S.jsx)("div",{className:J("min-w-0 truncate rounded-md border px-2 py-1 text-center text-[10px] font-semibold",r===0?"border-teal-300/35 bg-teal-300/16 text-teal-50":"border-white/10 bg-white/[.04] text-slate-300"),children:mn(e,t,t)},t))})}function xje({copy:e}){return(0,S.jsxs)("div",{className:"mb-2 flex min-w-0 items-start justify-between gap-2 rounded-[8px] border border-white/10 bg-white/[.04] px-2.5 py-2",children:[(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"truncate text-[13px] font-bold text-slate-50",children:e.settings.trayModuleHeader}),(0,S.jsxs)("div",{className:"mt-0.5 truncate text-[10px] font-medium text-slate-400",children:[mn(e,"Today","Today")," - ",mn(e,"All providers","All providers","\u5168\u90E8\u4F9B\u5E94\u5546")]})]}),(0,S.jsx)("div",{className:"flex shrink-0 rounded-md border border-white/10 bg-slate-900/70 p-0.5",children:["24h","7d","30d"].map(t=>(0,S.jsx)("span",{className:J("h-5 rounded-[5px] px-1.5 text-[10px] font-bold",t==="30d"?"bg-white/14 text-slate-50":"text-slate-400"),children:mn(e,t,t)},t))})]})}function bje({copy:e,title:t,variant:r}){let o=[{label:mn(e,"Weekly quota","Weekly quota"),value:"7.8h",progress:.62,color:"rgb(45,212,191)"},{label:mn(e,"5h quota","5h quota"),value:"3.4h",progress:.74,color:"rgb(129,140,248)"}];return(0,S.jsxs)("div",{className:"mb-2 rounded-[8px] border border-white/10 bg-white/[.04] p-2",children:[(0,S.jsxs)("div",{className:"mb-2 flex min-w-0 items-center justify-between gap-2",children:[(0,S.jsx)("div",{className:"truncate text-[11px] font-bold text-slate-100",children:t}),(0,S.jsx)("span",{className:"shrink-0 rounded-full bg-teal-300/15 px-1.5 py-0.5 text-[9px] font-bold text-teal-100",children:mn(e,"ok","ok")})]}),r==="compact"?(0,S.jsx)("div",{className:"grid grid-cols-2 gap-1.5",children:o.map(n=>(0,S.jsxs)("div",{className:"min-w-0 rounded-md bg-white/[.04] px-2 py-1",children:[(0,S.jsx)("div",{className:"truncate text-[9px] font-medium text-slate-400",children:n.label}),(0,S.jsx)("div",{className:"truncate text-[12px] font-bold text-slate-50",children:n.value})]},n.label))}):null,r==="ring"||r==="arc"?(0,S.jsx)("div",{className:"grid grid-cols-2 gap-2",children:o.map(n=>(0,S.jsx)(Wce,{color:n.color,label:n.value,value:n.progress,variant:r},n.label))}):null,r==="stacked"?(0,S.jsx)("div",{className:"space-y-1.5",children:o.map(n=>(0,S.jsxs)("div",{className:"grid min-w-0 grid-cols-[minmax(0,1fr)_48px] items-center gap-2",children:[(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsx)("div",{className:"truncate text-[10px] font-medium text-slate-400",children:n.label}),(0,S.jsx)("div",{className:"mt-1 h-1.5 overflow-hidden rounded-full bg-white/10",children:(0,S.jsx)("div",{className:"h-full rounded-full",style:{backgroundColor:n.color,width:`${n.progress*100}%`}})})]}),(0,S.jsx)("div",{className:"truncate text-right text-[12px] font-bold text-slate-50",children:n.value})]},n.label))}):null,r==="bar"?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsxs)("div",{className:"flex min-w-0 items-end justify-between gap-2",children:[(0,S.jsx)("div",{className:"min-w-0 truncate text-[10px] font-medium text-slate-400",children:o[0].label}),(0,S.jsx)("div",{className:"shrink-0 text-[13px] font-bold text-slate-50",children:o[0].value})]}),(0,S.jsx)("div",{className:"mt-1 h-1.5 overflow-hidden rounded-full bg-white/10",children:(0,S.jsx)("div",{className:"h-full rounded-full bg-teal-300",style:{width:`${o[0].progress*100}%`}})})]}):null]})}function wje({copy:e,title:t,variant:r}){let o=[24,52,38,66,46,58,72,44,64,50],n="M0 58 C 34 42, 48 50, 74 35 S 119 15, 146 28 S 189 54, 219 22 S 247 18, 260 11",a="M0 62 C 31 55, 55 60, 79 50 S 120 30, 153 38 S 197 65, 260 42";return(0,S.jsxs)("div",{className:"mb-2 rounded-[8px] border border-white/10 bg-white/[.04] p-2",children:[(0,S.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,S.jsx)("div",{className:"truncate text-[11px] font-bold text-slate-100",children:t}),(0,S.jsxs)("div",{className:"shrink-0 text-[10px] font-medium text-slate-400",children:["42 ",mn(e,"Requests","req")]})]}),(0,S.jsxs)("svg",{"aria-hidden":"true",className:"mt-2 h-16 w-full overflow-visible",preserveAspectRatio:"none",viewBox:"0 0 260 72",children:[[20,68,116,164,212].map(i=>(0,S.jsx)("line",{stroke:"rgba(148,163,184,.12)",strokeWidth:"1",x1:i,x2:i,y1:"0",y2:"72"},i)),r==="bar"?o.map((i,s)=>{let u=s*26+4,d=Math.max(4,i*.74);return(0,S.jsx)("rect",{fill:s%2===0?"rgba(45,212,191,.9)":"rgba(167,139,250,.72)",height:d,rx:"4",width:14,x:u,y:64-d},s)}):null,r==="area"?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("path",{d:`${n} L 260 68 L 0 68 Z`,fill:"rgba(45,212,191,.18)"}),(0,S.jsx)("path",{d:`${a} L 260 68 L 0 68 Z`,fill:"rgba(167,139,250,.12)"})]}):null,r!=="bar"?(0,S.jsxs)(S.Fragment,{children:[(0,S.jsx)("path",{d:n,fill:"none",stroke:"rgba(45,212,191,.95)",strokeLinecap:"round",strokeWidth:r==="sparkline"?3:4}),r==="sparkline"?null:(0,S.jsx)("path",{d:a,fill:"none",stroke:"rgba(167,139,250,.72)",strokeLinecap:"round",strokeWidth:"2.5"})]}):null]})]})}function Cje({copy:e}){let t=l=>mn(e,l,l),r=[0,1,0,0,2,0,0,0,0,2,0,3,1,0,1,0,0,4,0,0,0,0,2,0,0,0,3,0,0,0,1,0,4,2,0,2,0,3,4,1,0,0,0,1,0,2,0,0,0,0,0,0,1,3,0,2,1,0,0,0,0,2,0,0,0,1,0,0,0,0],o=[{label:"Apr",weekIndex:0},{label:"May",weekIndex:4},{label:"Jun",weekIndex:8}],n=[t("M"),"",t("W"),"",t("F"),"",""],a=3,i=9,s=14;return(0,S.jsxs)("div",{className:"min-w-0 rounded-[8px] border border-white/10 bg-white/[.04] p-2",children:[(0,S.jsxs)("div",{className:"mb-2 flex items-center justify-between gap-2",children:[(0,S.jsx)("div",{className:"truncate text-[11px] font-bold text-slate-100",children:e.settings.trayModuleActivity}),(0,S.jsx)("div",{className:"shrink-0 text-[10px] font-medium text-slate-400",children:t("Tokens")})]}),(0,S.jsx)("div",{className:"mb-2 grid grid-cols-4 gap-px overflow-hidden rounded-[7px] border border-white/8 bg-white/[.08]",children:[{label:t("Longest streak"),value:"8",unit:t("days")},{label:t("Avg / day"),value:"44K"},{label:t("Avg / week"),value:"309K"},{label:t("Total"),value:"23.1M"}].map(l=>(0,S.jsxs)("div",{className:"min-w-0 bg-slate-950/35 px-1.5 py-1",children:[(0,S.jsx)("div",{className:"truncate text-[8px] font-semibold text-slate-400",children:l.label}),(0,S.jsxs)("div",{className:"flex min-w-0 items-baseline gap-1",children:[(0,S.jsx)("span",{className:"truncate text-[11px] font-bold text-slate-50",children:l.value}),l.unit?(0,S.jsx)("span",{className:"shrink-0 text-[8px] font-medium text-slate-500",children:l.unit}):null]})]},l.label))}),(0,S.jsx)("div",{className:"min-w-0 overflow-x-auto overflow-y-hidden",children:(0,S.jsxs)("div",{className:"w-max",children:[(0,S.jsx)("div",{className:"mb-1 grid text-[8px] font-medium text-slate-500",style:{columnGap:`${a}px`,gridTemplateColumns:`repeat(10, ${i}px)`,marginLeft:`${s+a}px`},children:o.map(l=>(0,S.jsx)("span",{className:"truncate",style:{gridColumn:`${l.weekIndex+1} / span 2`},children:l.label},l.label))}),(0,S.jsxs)("div",{className:"grid",style:{gap:`${a}px`,gridTemplateColumns:`${s}px repeat(10, ${i}px)`,gridTemplateRows:`repeat(7, ${i}px)`},children:[n.map((l,u)=>(0,S.jsx)("span",{className:"self-center truncate text-[8px] font-medium leading-none text-slate-500",style:{gridColumn:1,gridRow:u+1},children:l},`${l}-${u}`)),r.map((l,u)=>(0,S.jsx)("span",{className:"rounded-[3px]",style:{backgroundColor:Uce(l),gridColumn:Math.floor(u/7)+2,gridRow:u%7+1}},u))]})]})}),(0,S.jsxs)("div",{className:"mt-2 flex items-center gap-1.5 text-[10px] font-medium text-slate-400",children:[(0,S.jsx)("span",{children:t("Less")}),[0,1,2,3,4].map(l=>(0,S.jsx)("span",{"aria-hidden":"true",className:"h-2.5 w-2.5 rounded-[3px]",style:{backgroundColor:Uce(l)}},l)),(0,S.jsx)("span",{children:t("More")})]})]})}function Uce(e){return e<=0?"rgba(129,140,248,.14)":e===1?"rgba(129,140,248,.32)":e===2?"rgba(129,140,248,.52)":e===3?"rgba(129,140,248,.72)":"rgba(129,140,248,.94)"}function Sje({copy:e,variant:t}){let r=[{label:mn(e,"Input","Input","\u8F93\u5165"),value:"41k"},{label:mn(e,"Output","Output","\u8F93\u51FA"),value:"19k"},{label:mn(e,"Cache read","Cache read","\u7F13\u5B58\u8BFB\u53D6"),value:"28k"},{label:mn(e,"Success","Success","\u6210\u529F"),value:"99%"}];return t==="compact"?(0,S.jsx)("div",{className:"mb-2 rounded-[8px] border border-white/10 bg-white/[.04] p-2",children:r.map(o=>(0,S.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 py-0.5 text-[10px]",children:[(0,S.jsx)("span",{className:"truncate font-medium text-slate-400",children:o.label}),(0,S.jsx)("span",{className:"shrink-0 font-bold text-slate-50",children:o.value})]},o.label))}):t==="pills"?(0,S.jsx)("div",{className:"mb-2 flex flex-wrap gap-1.5",children:r.map(o=>(0,S.jsxs)("div",{className:"rounded-full border border-white/10 bg-white/[.05] px-2 py-1 text-[10px] font-bold text-slate-100",children:[(0,S.jsx)("span",{className:"text-slate-400",children:o.label})," ",o.value]},o.label))}):(0,S.jsx)("div",{className:"mb-2 grid grid-cols-2 gap-1.5",children:r.map(o=>(0,S.jsxs)("div",{className:"min-w-0 rounded-[7px] border border-white/10 bg-white/[.04] px-2 py-1.5",children:[(0,S.jsx)("div",{className:"truncate text-[10px] font-medium text-slate-400",children:o.label}),(0,S.jsx)("div",{className:"truncate text-[13px] font-bold text-slate-50",children:o.value})]},o.label))})}function Pje({copy:e,variant:t}){let r=[{label:mn(e,"Input","Input","\u8F93\u5165"),percent:.46,value:"46%",className:"bg-blue-400",color:"rgb(96,165,250)"},{label:mn(e,"Output","Output","\u8F93\u51FA"),percent:.28,value:"28%",className:"bg-amber-300",color:"rgb(252,211,77)"},{label:mn(e,"Cache read","Cache read","\u7F13\u5B58\u8BFB\u53D6"),percent:.26,value:"26%",className:"bg-rose-300",color:"rgb(253,164,175)"}];return(0,S.jsxs)("div",{className:"min-w-0 rounded-[8px] border border-white/10 bg-white/[.04] p-2",children:[(0,S.jsx)("div",{className:"mb-2 truncate text-[11px] font-bold text-slate-100",children:e.settings.trayModuleTokenMix}),t==="donut"||t==="pie"?(0,S.jsxs)("div",{className:"grid grid-cols-[54px_minmax(0,1fr)] items-center gap-2",children:[(0,S.jsx)(Gce,{rows:r,variant:t}),(0,S.jsx)(C5,{rows:r})]}):null,t==="stacked"?(0,S.jsxs)("div",{className:"space-y-1.5",children:[(0,S.jsx)("div",{className:"flex h-2 overflow-hidden rounded-full bg-white/10",children:r.map(o=>(0,S.jsx)("div",{className:o.className,style:{width:o.value}},o.label))}),(0,S.jsx)(C5,{rows:r})]}):null,t==="bars"?(0,S.jsx)("div",{className:"space-y-1.5",children:r.map(o=>(0,S.jsxs)("div",{className:"min-w-0",children:[(0,S.jsxs)("div",{className:"mb-1 flex items-center justify-between gap-2 text-[10px] font-medium text-slate-400",children:[(0,S.jsx)("span",{className:"truncate",children:o.label}),(0,S.jsx)("span",{className:"shrink-0",children:o.value})]}),(0,S.jsx)("div",{className:"h-1.5 overflow-hidden rounded-full bg-white/10",children:(0,S.jsx)("div",{className:J("h-full rounded-full",o.className),style:{width:o.value}})})]},o.label))}):null]})}function Aje({title:e,variant:t}){return(0,S.jsxs)("div",{className:"min-w-0 rounded-[8px] border border-white/10 bg-white/[.04] p-2",children:[(0,S.jsx)("div",{className:"mb-2 truncate text-[11px] font-bold text-slate-100",children:e}),(0,S.jsx)("div",{className:"grid grid-cols-2 gap-2",children:[{centerUnit:"requests",centerValue:"38",label:"74%",value:74},{centerUnit:"tokens",centerValue:"9.1K",label:"91%",value:91}].map(r=>(0,S.jsx)("div",{className:"relative aspect-square min-w-0",children:(0,S.jsx)(Wce,{centerUnit:r.centerUnit,centerValue:r.centerValue,color:r.value>80?"rgb(45,212,191)":"rgb(129,140,248)",label:r.label,value:r.value/100,variant:t==="rings"?"ring":t==="arcs"?"arc":"gauge"})},r.centerUnit))})]})}function Ije({title:e,variant:t}){let r=[{label:"claude-sonnet",percent:.48,value:"48%",color:"rgb(45,212,191)",className:"bg-teal-300"},{label:"gpt-4.1",percent:.31,value:"31%",color:"rgb(129,140,248)",className:"bg-indigo-400"},{label:"deepseek-chat",percent:.21,value:"21%",color:"rgb(251,191,36)",className:"bg-amber-300"}];return(0,S.jsxs)("div",{className:"mb-2 min-w-0 rounded-[8px] border border-white/10 bg-white/[.04] p-2",children:[(0,S.jsx)("div",{className:"mb-2 truncate text-[11px] font-bold text-slate-100",children:e}),t==="donut"||t==="pie"?(0,S.jsxs)("div",{className:"grid grid-cols-[54px_minmax(0,1fr)] items-center gap-2",children:[(0,S.jsx)(Gce,{rows:r,variant:t}),(0,S.jsx)(C5,{rows:r})]}):null,t==="list"?(0,S.jsx)("div",{className:"space-y-1",children:r.map((o,n)=>(0,S.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2 text-[10px]",children:[(0,S.jsxs)("span",{className:"min-w-0 truncate font-medium text-slate-300",children:[n+1,". ",o.label]}),(0,S.jsx)("span",{className:"shrink-0 font-semibold text-slate-400",children:o.value})]},o.label))}):null,t==="bars"?r.map(o=>(0,S.jsxs)("div",{className:"mb-1.5 flex min-w-0 items-center gap-2 last:mb-0",children:[(0,S.jsx)("div",{className:"min-w-0 flex-1 truncate text-[10px] font-medium text-slate-300",children:o.label}),(0,S.jsx)("div",{className:"h-1.5 w-14 overflow-hidden rounded-full bg-white/10",children:(0,S.jsx)("div",{className:J("h-full rounded-full",o.className),style:{width:o.value}})}),(0,S.jsx)("div",{className:"w-7 shrink-0 text-right text-[10px] font-semibold text-slate-400",children:o.value})]},o.label)):null]})}function Wce({centerUnit:e,centerValue:t,color:r,label:o,value:n,variant:a}){let s=2*Math.PI*15,l=Math.max(0,Math.min(1,n)),d=s*(a==="ring"?1:a==="arc"?.78:.55),c=a==="ring"?-90:a==="arc"?130:160;return(0,S.jsxs)("div",{className:"relative aspect-square min-w-0",children:[(0,S.jsxs)("svg",{"aria-hidden":"true",className:"h-full w-full",viewBox:"0 0 40 40",children:[(0,S.jsx)("circle",{cx:"20",cy:"20",fill:"none",r:15,stroke:"rgba(148,163,184,.22)",strokeDasharray:`${d} ${s-d}`,strokeLinecap:"round",strokeWidth:"4",transform:`rotate(${c} 20 20)`}),(0,S.jsx)("circle",{cx:"20",cy:"20",fill:"none",r:15,stroke:r,strokeDasharray:`${d*l} ${s-d*l}`,strokeLinecap:"round",strokeWidth:"4",transform:`rotate(${c} 20 20)`})]}),(0,S.jsxs)("div",{className:"absolute inset-0 flex min-w-0 flex-col items-center justify-center px-1 text-center leading-none",children:[(0,S.jsx)("div",{className:"max-w-full truncate text-[11px] font-bold text-slate-100",children:t??o}),e?(0,S.jsx)("div",{className:"mt-0.5 max-w-full truncate text-[8px] font-semibold uppercase text-slate-400",children:e}):null]})]})}function Gce({rows:e,variant:t}){let r=t==="pie"?10:13,o=t==="pie"?20:7,n=2*Math.PI*r,a=e.reduce((l,u)=>l+Math.max(0,u.percent),0)||1,i=0,s=e.map(l=>{let u=n*(Math.max(0,l.percent)/a),d={...l,length:u,offset:i};return i+=u,d});return(0,S.jsxs)("svg",{"aria-hidden":"true",className:"h-[54px] w-[54px]",viewBox:"0 0 40 40",children:[(0,S.jsx)("circle",{cx:"20",cy:"20",fill:"none",r,stroke:"rgba(148,163,184,.16)",strokeWidth:o}),s.map(l=>(0,S.jsx)("circle",{cx:"20",cy:"20",fill:"none",r,stroke:l.color,strokeDasharray:`${l.length} ${n-l.length}`,strokeDashoffset:-l.offset,strokeWidth:o,transform:"rotate(-90 20 20)"},`${l.color}-${l.offset}`)),t==="donut"?(0,S.jsx)("circle",{cx:"20",cy:"20",fill:"rgb(15,23,42)",r:"8"}):null]})}function C5({rows:e}){return(0,S.jsx)("div",{className:"min-w-0 space-y-1",children:e.map(t=>(0,S.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 text-[9px] font-medium text-slate-400",children:[(0,S.jsx)("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full",style:{backgroundColor:t.color}}),(0,S.jsx)("span",{className:"min-w-0 flex-1 truncate",children:t.label}),(0,S.jsx)("span",{className:"shrink-0 text-slate-300",children:t.value})]},t.label))})}function Dje(e){return e.filter(t=>t.meters.length>0).sort((t,r)=>t.provider.localeCompare(r.provider))}function Lje(e,t){let r=e.find(o=>o.provider===t);return r?[...r.meters].sort((o,n)=>o.kind==="balance"&&n.kind!=="balance"?-1:o.kind!=="balance"&&n.kind==="balance"?1:o.label.localeCompare(n.label)):[]}function Rje(e){let t=e.provider?.trim(),r=e.meterId?.trim();return t&&r?{meterId:r,provider:t}:void 0}function Nje(e,t){if(!t)return;let o=e.find(n=>n.provider===t.provider)?.meters.find(n=>n.id===t.meterId);return o?Tje(o):void 0}function Tje(e){if(e.limit&&e.limit>0){if(e.remaining!==void 0)return Math.max(0,Math.min(1,e.remaining/e.limit));if(e.used!==void 0)return Math.max(0,Math.min(1,1-e.used/e.limit))}if(e.unit==="%"){if(e.remaining!==void 0)return Math.max(0,Math.min(1,e.remaining/100));if(e.used!==void 0)return Math.max(0,Math.min(1,1-e.used/100))}return(e.remaining??e.limit??e.used??0)>0?1:0}function Oje(e,t){return`${t(e.label)} - ${Nn(e)}`}function Eje(e){return e==="cyan"||e==="orange"||e==="violet"}function mn(e,t,r,o){return e.text[t]??(o?e.text[o]:void 0)??r}var ut=z(ze());function A5({actionBusy:e,actionError:t,copy:r,onCheck:o,onClose:n,onDownload:a,onInstall:i,status:s}){let l=m=>r.text[m]??m,u=!!e||s.state==="checking"||s.state==="downloading"||s.state==="installing",d=s.canDownload||s.state==="available",c=s.canInstall||s.state==="downloaded",f=Bje(s.progress?.percent),p=t||s.lastError||"",g=e==="install"||s.state==="installing";return(0,ut.jsx)(Ft,{onOpenChange:m=>!m&&!g&&n(),open:!0,children:(0,ut.jsxs)(Tt,{className:"max-w-[560px]",children:[(0,ut.jsxs)(Bt,{children:[(0,ut.jsx)("div",{className:"min-w-0",children:(0,ut.jsx)(Vt,{children:l("Online updates")})}),(0,ut.jsx)(ne,{"aria-label":r.settings.close,disabled:g,onClick:n,size:"iconSm",title:r.settings.close,type:"button",variant:"ghost",children:(0,ut.jsx)(ft,{className:"h-4 w-4"})})]}),(0,ut.jsxs)(Ot,{className:"grid gap-4",children:[(0,ut.jsxs)("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[(0,ut.jsxs)("div",{className:"min-w-0",children:[(0,ut.jsx)("div",{className:"text-[13px] font-semibold text-foreground",children:jce(s,l)}),(0,ut.jsx)("div",{className:"mt-1 text-[12px] leading-5 text-muted-foreground",children:Fje(s,l)})]}),(0,ut.jsx)(_je,{label:jce(s,l),status:s})]}),(0,ut.jsxs)("div",{className:"grid grid-cols-2 gap-2 max-[520px]:grid-cols-1",children:[(0,ut.jsx)(ZR,{label:l("Current version"),value:s.currentVersion}),(0,ut.jsx)(ZR,{label:l("Available version"),value:s.availableVersion||"-"}),(0,ut.jsx)(ZR,{label:l("Last checked"),value:Uje(s.lastCheckedAt)||"-"}),(0,ut.jsx)(ZR,{label:l("Feed URL"),value:s.feedUrl||"-"})]}),s.state==="downloading"?(0,ut.jsxs)("div",{className:"grid gap-2 rounded-md border border-border bg-muted/20 px-3 py-3",children:[(0,ut.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3 text-[11px] font-medium text-muted-foreground",children:[(0,ut.jsx)("span",{children:l("Downloading update")}),(0,ut.jsx)("span",{children:f!==void 0?`${f.toFixed(0)}%`:""})]}),(0,ut.jsx)("div",{"aria-label":l("Downloading update"),"aria-valuemax":100,"aria-valuemin":0,"aria-valuenow":f??0,className:"h-2 overflow-hidden rounded-full bg-muted",role:"progressbar",children:(0,ut.jsx)("div",{className:"h-full rounded-full bg-primary transition-[width] duration-200",style:{width:`${f??0}%`}})}),(0,ut.jsx)("div",{className:"text-[11px] text-muted-foreground",children:Vje(s.progress)})]}):null,c?(0,ut.jsx)("div",{className:"rounded-md border border-primary/20 bg-primary/10 px-3 py-2 text-[12px] text-primary",children:l("Update downloaded. Restart to finish updating.")}):null,s.supported?null:(0,ut.jsx)("div",{className:"rounded-md border border-border bg-muted/30 px-3 py-2 text-[12px] text-muted-foreground",children:l("Updates are only available in packaged builds.")}),p?(0,ut.jsxs)("div",{className:"flex min-w-0 items-start gap-2 rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:[(0,ut.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,ut.jsx)("span",{className:"min-w-0 break-words",children:p})]}):null,s.releaseNotes?(0,ut.jsxs)("div",{className:"grid gap-1 rounded-md border border-border bg-background px-3 py-2",children:[(0,ut.jsx)("div",{className:"text-[11px] font-semibold text-muted-foreground",children:l("Release notes")}),(0,ut.jsx)("div",{className:"max-h-36 overflow-auto whitespace-pre-wrap text-[12px] leading-5 text-foreground",children:s.releaseNotes})]}):null]}),(0,ut.jsxs)($t,{children:[(0,ut.jsx)(ne,{disabled:g,onClick:n,type:"button",variant:"outline",children:l("Close")}),(0,ut.jsxs)(ne,{disabled:u||!s.canCheck,onClick:()=>{o()},type:"button",variant:"outline",children:[e==="check"||s.state==="checking"?(0,ut.jsx)(ct,{className:"h-4 w-4 animate-spin"}):(0,ut.jsx)(Ho,{className:"h-4 w-4"}),l("Check for updates")]}),(0,ut.jsxs)(ne,{disabled:u||!d,onClick:()=>{a()},type:"button",variant:"outline",children:[e==="download"||s.state==="downloading"?(0,ut.jsx)(ct,{className:"h-4 w-4 animate-spin"}):(0,ut.jsx)(nl,{className:"h-4 w-4"}),l("Download update")]}),(0,ut.jsxs)(ne,{disabled:u||!c,onClick:()=>{i()},type:"button",children:[g?(0,ut.jsx)(ct,{className:"h-4 w-4 animate-spin"}):(0,ut.jsx)(yt,{className:"h-4 w-4"}),l("Install and restart")]})]})]})})}function ZR({label:e,value:t}){return(0,ut.jsxs)("div",{className:"min-w-0 rounded-md border border-border/70 bg-muted/20 px-3 py-2",children:[(0,ut.jsx)("div",{className:"text-[10px] font-medium uppercase text-muted-foreground",children:e}),(0,ut.jsx)("div",{className:"mt-1 min-w-0 truncate text-[12px] font-medium text-foreground",title:t,children:t})]})}function _je({label:e,status:t}){return(0,ut.jsx)("span",{className:J("shrink-0 rounded-full border px-2 py-1 text-[11px] font-medium",t.state==="error"?"border-destructive/25 bg-destructive/10 text-destructive":t.state==="available"||t.state==="downloaded"||t.state==="downloading"?"border-primary/25 bg-primary/10 text-primary":"border-border bg-muted/40 text-muted-foreground"),children:e})}function jce(e,t){return e.supported?e.state==="checking"?t("Checking for updates"):e.state==="available"?t("Update available"):e.state==="not-available"?t("No updates available"):e.state==="downloading"?t("Downloading update"):e.state==="downloaded"?t("Update ready to install"):e.state==="installing"?t("Install and restart"):e.state==="error"?t("Update failed"):t("Check for updates"):t("Not configured")}function Fje(e,t){return e.supported?e.state==="available"&&e.availableVersion?`${t("Available version")}: ${e.availableVersion}`:e.state==="downloaded"?t("Update downloaded"):e.state==="not-available"?t("No updates available"):e.state==="downloading"?t("Downloading update"):t("Online updates"):t("Updates are only available in packaged builds.")}function Bje(e){if(!(typeof e!="number"||!Number.isFinite(e)))return Math.max(0,Math.min(100,e))}function Vje(e){if(!e)return"";let t=P5(e.transferred),r=P5(e.total),o=P5(e.bytesPerSecond);return[t&&r?`${t} / ${r}`:t||r,o?`${o}/s`:""].filter(Boolean).join(" | ")}function P5(e){if(typeof e!="number"||!Number.isFinite(e)||e<=0)return"";let t=["B","KB","MB","GB"],r=e,o=0;for(;r>=1024&&o<t.length-1;)r/=1024,o+=1;return`${r>=10||o===0?r.toFixed(0):r.toFixed(1)} ${t[o]}`}function Uje(e){if(!e)return"";let t=new Date(e);return Number.isNaN(t.getTime())?"":t.toLocaleString()}var Z=z(ze()),zce="grid-cols-[minmax(180px,0.9fr)_minmax(220px,1.1fr)_minmax(220px,1.1fr)_minmax(170px,0.85fr)_112px_96px]",Wje="min-w-[1100px]",I5="BROWSER_SEARCH_ENGINE",D5="BROWSER_SEARCH_LANGUAGE",L5="BROWSER_SEARCH_COUNTRY",R5="BROWSER_SEARCH_SAFE_SEARCH",Yce=new Set([I5,D5,L5,R5]),qce=[{label:"Bing",value:"bing"},{label:"Google",value:"google"},{label:"DuckDuckGo",value:"duckduckgo"}],Hce=[{label:"Default",value:"default"},{label:"Moderate",value:"moderate"},{label:"Strict",value:"strict"},{label:"Off",value:"off"}];function Gje(e){let t=new Set,r=[];for(let o of e){let n=_o(o);!n||t.has(n)||(r.push(n),t.add(n))}return r}function Kce(e,t,r){let o=_o(e);return!!o&&(o===t||!r.has(o))}function N5({addVirtualModel:e,editVirtualModel:t,profiles:r,removeVirtualModel:o,setVirtualModelEnabled:n}){let a=ve(),[i,s]=(0,D.useState)(""),l=i.trim().toLowerCase(),u=(0,D.useMemo)(()=>r.map((d,c)=>({index:c,profile:d})).filter(({profile:d})=>Oue(d,l)),[r,l]);return(0,Z.jsx)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 min-w-0 flex-col gap-3",initial:{opacity:0},transition:{duration:.15},children:(0,Z.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,Z.jsxs)(Gr,{className:"flex-row items-center gap-2",children:[(0,Z.jsx)(fn,{className:"min-w-0 shrink-0 truncate",children:a("Virtual Models")}),(0,Z.jsxs)("div",{className:"relative min-w-0 flex-1",children:[(0,Z.jsx)(Jr,{className:"pointer-events-none absolute left-2.5 top-1/2 z-[1] h-3.5 w-3.5 -translate-y-1/2 text-muted-foreground"}),(0,Z.jsx)(Te,{"aria-label":a("Search virtual models"),className:"pl-8",onChange:d=>s(d.target.value),placeholder:a("Search virtual models"),value:i})]}),(0,Z.jsxs)(ne,{"aria-label":a("Add virtual model"),onClick:e,title:a("Add virtual model"),type:"button",children:[(0,Z.jsx)(It,{className:"h-4 w-4"}),a("Add")]})]}),(0,Z.jsxs)(nr,{className:"min-h-0 flex-1 overflow-auto p-0",children:[r.length===0?(0,Z.jsxs)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center",children:[(0,Z.jsx)(fs,{className:"mx-auto mb-2 h-7 w-7 text-muted-foreground/40"}),(0,Z.jsx)("div",{className:"text-[13px] font-semibold text-foreground",children:a("No virtual models configured")}),(0,Z.jsx)("div",{className:"mx-auto mt-1 max-w-[480px] text-[12px] leading-5 text-muted-foreground",children:a("Fusion combines a model with another model or tools into a new model.")}),(0,Z.jsx)("div",{className:"mt-2 font-mono text-[11px] text-muted-foreground/70",children:a("Fusion example")})]}):null,r.length>0&&u.length===0?(0,Z.jsx)("div",{className:"m-4 rounded-lg border border-dashed border-border bg-muted/30 px-3 py-10 text-center text-[12px] text-muted-foreground",children:a("No matching virtual models")}):null,u.length>0?(0,Z.jsx)("div",{className:"overflow-x-auto",children:(0,Z.jsxs)("div",{className:J("w-full",Wje),children:[(0,Z.jsxs)("div",{className:J("sticky top-0 z-10 grid h-10 items-center gap-3 border-b border-border/60 bg-muted/95 px-4 text-[11px] font-medium uppercase tracking-wide text-muted-foreground",zce),children:[(0,Z.jsx)("div",{className:"truncate",children:a("Name")}),(0,Z.jsx)("div",{className:"truncate",children:a("New model")}),(0,Z.jsx)("div",{className:"truncate",children:a("Base model")}),(0,Z.jsx)("div",{className:"truncate",children:a("Tools")}),(0,Z.jsx)("div",{className:"truncate",children:a("Status")}),(0,Z.jsx)("div",{"aria-hidden":"true"})]}),(0,Z.jsx)("div",{className:"divide-y divide-border/60",children:(0,Z.jsx)(wt,{initial:!1,children:u.map(({index:d,profile:c})=>(0,Z.jsxs)(ka,{className:J("grid min-h-[58px] items-center gap-3 px-4 py-2.5 transition-colors hover:bg-muted/35",zce),children:[(0,Z.jsxs)("div",{className:"min-w-0",children:[(0,Z.jsx)("div",{className:"truncate text-[12px] font-semibold",title:c.displayName||c.key,children:c.displayName||c.key}),(0,Z.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",title:c.key,children:c.key})]}),(0,Z.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",title:XM(c),children:XM(c)}),(0,Z.jsx)("div",{className:"min-w-0 truncate text-[11px] text-muted-foreground",title:xR(c),children:xR(c)}),(0,Z.jsx)("div",{className:"min-w-0",children:(0,Z.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",title:bR(c),children:bR(c)})}),(0,Z.jsx)("div",{className:"flex min-w-0 items-center gap-2",children:(0,Z.jsx)(Co,{checked:c.enabled!==!1,onChange:f=>n(d,f)})}),(0,Z.jsxs)("div",{className:"flex items-center justify-end gap-1",children:[(0,Z.jsx)(ne,{"aria-label":`${a("Edit virtual model")} ${c.displayName||c.key}`,onClick:()=>t(d),size:"iconSm",title:a("Edit virtual model"),type:"button",variant:"ghost",children:(0,Z.jsx)(No,{className:"h-3.5 w-3.5"})}),(0,Z.jsx)(ne,{"aria-label":`${a("Remove virtual model")} ${c.displayName||c.key}`,onClick:()=>o(d),size:"iconSm",title:a("Remove virtual model"),type:"button",variant:"ghost",children:(0,Z.jsx)(ar,{className:"h-3.5 w-3.5"})})]})]},`${c.id||c.key}-${d}`))})})]})}):null]})]})})}function T5({canSubmit:e,draft:t,error:r,mcpServers:o,mode:n,onChange:a,onClose:i,onSubmit:s,providers:l}){let u=ve(),d=Rc(),c=(0,D.useMemo)(()=>Rs(l),[l]),f=ei(t.toolsText),[p,g]=(0,D.useState)(!1),[m,h]=(0,D.useState)(t.customMcpServer),[k,M]=(0,D.useState)(""),[v,b]=(0,D.useState)(!1),[w,P]=(0,D.useState)({}),L=(0,D.useMemo)(()=>{if(Gc(t.customMcpServer))return;let R=o.findIndex(U=>U.name===t.customMcpServer.name.trim());return jc(t.customMcpServer,o,R>=0?R:void 0)},[t.customMcpServer,o]),C=(0,D.useMemo)(()=>{let R=[],U=new Set;L&&(R.push(L),U.add(L.name));for(let E of o)U.has(E.name)||(R.push(E),U.add(E.name));return R},[L,o]);(0,D.useEffect)(()=>{p||h(t.customMcpServer)},[p,t.customMcpServer]);function F(R,U,E){let _=t.customMcpServer.name.trim(),B=Gje(U&&_&&_!==U.name?R.filter(W=>Uc(W)||W===E):R),j=Cm(B),re=B.find(W=>!Uc(W));a({...j.matchWebSearch&&t.webSearchEnvRows.length===0?{webSearchEnvRows:v0(t.webSearchProvider)}:{},...re?{...U?{customMcpServer:eh(U)}:{},customToolName:re||t.customToolName||zM}:{},toolsText:B.join(", "),...j})}function T(R,U){let E=_o(R);E&&(F([...ei(t.toolsText),E],U,U?E:void 0),b(!1))}function G(R,U,E){let _=_o(U);if(!_)return;let j=ei(t.toolsText).map((re,W)=>W===R?_:re);F(j,E,E?_:void 0)}function $(R){F(ei(t.toolsText).filter((U,E)=>E!==R))}function oe(){h(t.customMcpServer),M(""),g(!0)}async function se(R,U=!1){if(!window.ccr?.listMcpServerTools){let B="MCP tool discovery is available in the Electron app.";return P(j=>({...j,[R.name]:{error:B,loading:!1,tools:[]}})),[]}let E=o.find(B=>B.name===R.name);if(!E){let B="MCP server must be saved before tool discovery.";return P(j=>({...j,[R.name]:{error:B,loading:!1,tools:j[R.name]?.tools??[]}})),[]}let _=w[R.name];if(!U&&_?.tools)return _.tools;if(!U&&_?.loading)return _.tools??[];P(B=>({...B,[R.name]:{...B[R.name],error:"",loading:!0}}));try{let B=await window.ccr.listMcpServerTools(E.name);return P(j=>({...j,[R.name]:{loading:!1,tools:B}})),B}catch(B){let j=d(B);return P(re=>({...re,[R.name]:{error:j||u("Tool discovery failed"),loading:!1,tools:re[R.name]?.tools??[]}})),[]}}function pe(){for(let R of C)se(R)}async function N(){let R=Gc(m);if(R){M(d(new Error(R)));return}let U=m.transport==="stdio"?m:{...m,apiKey:"",apiKeyEnv:""},E=o.findIndex(re=>re.name===U.name.trim()),_=jc(U,o,E>=0?E:void 0);a({customMcpServer:eh(_)}),g(!1);let B=await se(_,!0),j=_o(B[0]?.name||"");if(j){let re=ei(t.toolsText);F(re.includes(j)?re:[...re,j],_,j),b(!1)}}return(0,Z.jsxs)(Ft,{onOpenChange:R=>!R&&i(),children:[(0,Z.jsxs)(Tt,{className:"max-w-[640px]",children:[(0,Z.jsxs)(Bt,{children:[(0,Z.jsx)("div",{className:"min-w-0",children:(0,Z.jsx)(Vt,{children:u(n==="edit"?"Edit Virtual Model":"Add Virtual Model")})}),(0,Z.jsx)(ne,{"aria-label":u("Close dialog"),onClick:i,size:"iconSm",title:u("Close"),type:"button",variant:"ghost",children:(0,Z.jsx)(ft,{className:"h-4 w-4"})})]}),(0,Z.jsx)(Ot,{children:(0,Z.jsxs)("div",{className:"space-y-4",children:[(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Z.jsx)(xe,{label:u("New model"),children:(0,Z.jsx)(Te,{value:t.exactAliasesText,onChange:R=>a({exactAliasesText:R.target.value})})}),(0,Z.jsx)("div",{className:"flex h-5 items-center justify-center font-mono text-[13px] font-semibold text-muted-foreground",children:"="}),(0,Z.jsx)(xe,{label:u("Base model"),children:(0,Z.jsx)(Pm,{modelOptions:c,onChange:R=>a({fixedModel:R}),value:t.fixedModel})}),(0,Z.jsx)("div",{className:"flex h-5 items-center justify-center font-mono text-[13px] font-semibold text-muted-foreground",children:"+"}),(0,Z.jsx)(xe,{label:u("Tools"),children:(0,Z.jsx)(Xje,{adding:v,draft:t,mcpServers:C,mcpToolStateByServer:w,modelOptions:c,onAddCustomMcpTool:oe,onAddTool:()=>b(!0),onAppendTool:T,onCancelAddTool:()=>b(!1),onChange:a,onChangeTool:G,onDiscoverMcpTools:(R,U)=>{if(R){se(R,U);return}pe()},onRemoveTool:$,selectedMcpServerName:t.customMcpServer.name,values:f})})]}),r?(0,Z.jsx)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:u(r)}):null]})}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(ne,{onClick:i,type:"button",variant:"outline",children:u("Cancel")}),(0,Z.jsxs)(ne,{disabled:!e,onClick:s,type:"button",children:[n==="edit"?(0,Z.jsx)(yt,{className:"h-4 w-4"}):(0,Z.jsx)(It,{className:"h-4 w-4"}),u(n==="edit"?"Save":"Add")]})]})]}),(0,Z.jsx)($je,{draft:m,error:k,onChange:R=>{h(U=>({...U,...R})),M("")},onClose:()=>g(!1),onSubmit:N,open:p})]})}function jje({draft:e,onChange:t}){let r=ve(),o=Ht(vm,r);function n(a){let i=vm.some(s=>s.value===a)?a:Fc;t({webSearchEnvRows:v0(i),webSearchProvider:i})}return(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3 rounded-md border border-border/70 bg-muted/25 p-3",children:[(0,Z.jsx)(xe,{label:r("Search provider"),children:(0,Z.jsx)(St,{onChange:n,options:o,value:e.webSearchProvider})}),e.webSearchProvider==="browser"?(0,Z.jsx)(zje,{onChange:a=>t({webSearchEnvRows:a}),rows:e.webSearchEnvRows}):(0,Z.jsx)(xe,{label:r("Provider configuration"),children:(0,Z.jsx)($i,{addLabel:r("Add variable"),onChange:a=>t({webSearchEnvRows:a}),rows:e.webSearchEnvRows})})]})}function zje({onChange:e,rows:t}){let r=ve(),o=qje(t),n=XR(t,I5)||"bing",a=XR(t,D5),i=XR(t,L5),s=XR(t,R5)||"default";function l(d,c){e(Hje(t,d,c==="default"?"":c))}function u(d){e(Kje(t,d))}return(0,Z.jsxs)("div",{className:"space-y-3",children:[(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3 md:grid-cols-2",children:[(0,Z.jsx)(xe,{label:r("Search engine"),children:(0,Z.jsx)(St,{onChange:d=>l(I5,d),options:qce,value:qce.some(d=>d.value===n)?n:"bing"})}),(0,Z.jsx)(xe,{label:r("Safe search"),children:(0,Z.jsx)(St,{onChange:d=>l(R5,d),options:Ht(Hce,r),value:Hce.some(d=>d.value===s)?s:"default"})}),(0,Z.jsx)(xe,{label:r("Language"),children:(0,Z.jsx)(Te,{onChange:d=>l(D5,d.target.value),placeholder:"en, zh-CN",value:a})}),(0,Z.jsx)(xe,{label:r("Country"),children:(0,Z.jsx)(Te,{onChange:d=>l(L5,d.target.value),placeholder:"US, CN",value:i})})]}),(0,Z.jsx)(xe,{label:r("Advanced variables"),children:(0,Z.jsx)($i,{addLabel:r("Add variable"),onChange:u,rows:o})})]})}function XR(e,t){return e.find(r=>r.key.trim()===t)?.value.trim()??""}function qje(e){return e.filter(t=>{let r=t.key.trim();return r&&!Yce.has(r)})}function Hje(e,t,r){let o=r.trim(),n=e.filter(a=>a.key.trim()!==t);return o?[Tu(t,o),...n]:n}function Kje(e,t){let r=e.filter(n=>Yce.has(n.key.trim())&&n.value.trim()),o=t.filter(n=>n.key.trim()||n.value.trim());return[...r,...o]}function $je({draft:e,error:t,onChange:r,onClose:o,onSubmit:n,open:a}){let i=ve(),s=e,l=Ht(u0,i),u=Ht(d0,i);function d(c){r(c)}return(0,Z.jsx)(Ft,{className:"z-[80]",onOpenChange:c=>!c&&o(),open:a,children:(0,Z.jsxs)(Tt,{className:"max-w-[760px]",children:[(0,Z.jsxs)(Bt,{children:[(0,Z.jsx)("div",{className:"min-w-0",children:(0,Z.jsx)(Vt,{children:i("Add custom MCP")})}),(0,Z.jsx)(ne,{"aria-label":i("Close dialog"),onClick:o,size:"iconSm",title:i("Close"),type:"button",variant:"ghost",children:(0,Z.jsx)(ft,{className:"h-4 w-4"})})]}),(0,Z.jsx)(Ot,{children:(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,Z.jsx)(xe,{label:i("MCP server"),children:(0,Z.jsx)(Te,{onChange:c=>d({name:c.target.value}),value:s.name})}),(0,Z.jsx)(xe,{label:i("Transport"),children:(0,Z.jsx)(St,{onChange:c=>d({transport:c}),options:l,value:s.transport})})]}),s.transport==="stdio"?(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Z.jsx)(xe,{label:i("Command"),children:(0,Z.jsx)(Te,{onChange:c=>d({command:c.target.value}),value:s.command})}),(0,Z.jsx)(xe,{label:i("Arguments"),children:(0,Z.jsx)(Te,{onChange:c=>d({argsText:c.target.value}),value:s.argsText})}),(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,Z.jsx)(xe,{label:i("Working directory"),children:(0,Z.jsx)(Te,{onChange:c=>d({cwd:c.target.value}),value:s.cwd})}),(0,Z.jsx)(xe,{label:i("Stdio message mode"),children:(0,Z.jsx)(St,{onChange:c=>d({stdioMessageMode:c}),options:u,value:s.stdioMessageMode})})]}),(0,Z.jsx)(xe,{label:i("Environment variables"),children:(0,Z.jsx)($i,{addLabel:i("Add variable"),onChange:c=>d({envRows:c}),rows:s.envRows})})]}):(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3",children:[(0,Z.jsx)(xe,{label:i("URL"),children:(0,Z.jsx)(Te,{onChange:c=>d({url:c.target.value}),value:s.url})}),(0,Z.jsx)(xe,{label:i("Headers"),children:(0,Z.jsx)($i,{addLabel:i("Add variable"),onChange:c=>d({headerRows:c}),rows:s.headerRows})})]}),(0,Z.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,Z.jsx)(xe,{label:i("Request timeout"),children:(0,Z.jsx)(Te,{onChange:c=>d({requestTimeoutMs:c.target.value}),type:"number",value:s.requestTimeoutMs})}),(0,Z.jsx)(xe,{label:i("Startup timeout"),children:(0,Z.jsx)(Te,{onChange:c=>d({startupTimeoutMs:c.target.value}),type:"number",value:s.startupTimeoutMs})})]}),t?(0,Z.jsx)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:i(t)}):null]})}),(0,Z.jsxs)($t,{children:[(0,Z.jsx)(ne,{onClick:o,type:"button",variant:"outline",children:i("Cancel")}),(0,Z.jsxs)(ne,{onClick:n,type:"button",children:[(0,Z.jsx)(It,{className:"h-4 w-4"}),i("Add")]})]})]})})}function Yje({draft:e,modelOptions:t,onChange:r,toolName:o}){return JM(o)?(0,Z.jsx)(Zje,{draft:e,modelOptions:t,onChange:r}):QM(o)?(0,Z.jsx)(jje,{draft:e,onChange:r}):null}function Zje({draft:e,modelOptions:t,onChange:r}){let o=ve();return(0,Z.jsx)("div",{className:"grid grid-cols-1 gap-3 rounded-md border border-border/70 bg-muted/25 p-3",children:(0,Z.jsx)(xe,{label:o("Vision model"),children:(0,Z.jsx)(Pm,{modelOptions:t,onChange:n=>r({visionModel:n}),value:e.visionModel})})})}function Xje({adding:e,draft:t,mcpServers:r,mcpToolStateByServer:o,modelOptions:n,onAddCustomMcpTool:a,onAddTool:i,onAppendTool:s,onCancelAddTool:l,onChange:u,onChangeTool:d,onDiscoverMcpTools:c,onRemoveTool:f,selectedMcpServerName:p,values:g}){let m=ve(),h=g.map(_o).filter(Boolean);return(0,Z.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-2",children:[g.map((k,M)=>(0,Z.jsxs)("div",{className:"grid min-w-0 grid-cols-1 gap-2 rounded-md border border-border/70 bg-muted/15 p-2",children:[(0,Z.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,Z.jsx)("div",{className:"min-w-0 flex-1",children:(0,Z.jsx)($ce,{excludedValues:h.filter((v,b)=>b!==M),mcpServers:r,mcpToolStateByServer:o,onAddCustomMcpTool:a,onChange:(v,b)=>d(M,v,b),onDiscoverMcpTools:c,selectedMcpServerName:p,value:k})}),(0,Z.jsx)(ne,{"aria-label":m("Remove tool"),onClick:()=>f(M),size:"iconSm",title:m("Remove tool"),type:"button",variant:"ghost",children:(0,Z.jsx)(ar,{className:"h-3.5 w-3.5"})})]}),(0,Z.jsx)(Yje,{draft:t,modelOptions:n,onChange:u,toolName:k})]},`${k}-${M}`)),e?(0,Z.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,Z.jsx)("div",{className:"min-w-0 flex-1",children:(0,Z.jsx)($ce,{excludedValues:h,mcpServers:r,mcpToolStateByServer:o,onAddCustomMcpTool:a,onChange:s,onDiscoverMcpTools:c,selectedMcpServerName:p,value:""})}),(0,Z.jsx)(ne,{"aria-label":m("Cancel"),onClick:l,size:"iconSm",title:m("Cancel"),type:"button",variant:"ghost",children:(0,Z.jsx)(ft,{className:"h-3.5 w-3.5"})})]}):null,(0,Z.jsxs)(ne,{className:"justify-start",disabled:e,onClick:i,type:"button",variant:"outline",children:[(0,Z.jsx)(It,{className:"h-4 w-4"}),m("Add tool")]})]})}function $ce({excludedValues:e,mcpServers:t,mcpToolStateByServer:r,onAddCustomMcpTool:o,onChange:n,onDiscoverMcpTools:a,selectedMcpServerName:i,value:s}){let l=ve(),[u,d]=(0,D.useState)(!1),[c,f]=(0,D.useState)(),p=(0,D.useRef)(null),g=_o(s),m=new Set((e??[]).map(_o).filter(Boolean)),h=hm.find(v=>v.value===g),k=i?t.find(v=>v.name===i):t.find(v=>r[v.name]?.tools?.some(b=>b.name===g)),M=h?.label??(k&&g?`${k.name} / ${g}`:g||l("Select tool"));return(0,D.useLayoutEffect)(()=>{if(!u){f(void 0);return}function v(){let b=p.current;if(!b)return;let w=b.getBoundingClientRect(),P=12,L=6,C=320,F=window.innerWidth,T=window.innerHeight,G=Math.max(240,F-P*2),$=Math.min(Math.max(w.width,280),G),oe=Math.min(Math.max(P,w.left),F-P-$),se=Math.max(0,T-w.bottom-P-L),pe=Math.max(0,w.top-P-L),N=se<C&&pe>se?"above":"below",R=Math.max(96,N==="above"?pe:se);f({left:oe,maxHeight:Math.min(360,R),offset:N==="above"?T-w.top+L:w.bottom+L,placement:N,width:$})}return v(),window.addEventListener("resize",v),window.addEventListener("scroll",v,!0),()=>{window.removeEventListener("resize",v),window.removeEventListener("scroll",v,!0)}},[u]),(0,D.useEffect)(()=>{u&&a()},[u]),(0,D.useEffect)(()=>{if(!u)return;let v=w=>{p.current?.contains(w.target)||d(!1)},b=w=>{w.key==="Escape"&&d(!1)};return document.addEventListener("mousedown",v),document.addEventListener("keydown",b),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("keydown",b)}},[u]),(0,Z.jsxs)("div",{className:"relative min-w-0",ref:p,children:[(0,Z.jsxs)("button",{"aria-controls":"fusion-tool-select-options","aria-expanded":u,"aria-haspopup":"listbox",className:J("flex h-8 w-full min-w-0 items-center gap-2 rounded-md border border-input bg-background px-3 text-left text-[12px] font-medium shadow-[inset_0_1px_1px_rgba(0,0,0,0.03)] outline-none transition-[background-color,border-color,box-shadow,color] hover:border-muted-foreground/45 focus-visible:border-primary/60 focus-visible:ring-2 focus-visible:ring-ring/25",u&&"border-ring/35 bg-muted/40"),onClick:()=>d(v=>!v),onKeyDown:v=>{(v.key==="ArrowDown"||v.key==="Enter"||v.key===" ")&&(v.preventDefault(),d(!0))},type:"button",children:[(0,Z.jsx)("span",{className:"min-w-0 flex-1 truncate",children:M}),(0,Z.jsx)(po,{className:J("h-3.5 w-3.5 shrink-0 text-muted-foreground transition-transform",u&&"rotate-180")})]}),(0,Z.jsx)(wt,{initial:!1,children:u?(0,Z.jsx)(Nu,{className:"fixed z-[70]",placement:c?.placement??"below",style:c?{left:`${c.left}px`,width:`${c.width}px`,...c.placement==="above"?{bottom:`${c.offset}px`}:{top:`${c.offset}px`}}:void 0,children:(0,Z.jsxs)(Is,{className:"w-full overflow-y-auto p-1",id:"fusion-tool-select-options",role:"listbox",style:{maxHeight:`${c?.maxHeight??360}px`},children:[hm.filter(v=>Kce(v.value,g,m)).map(v=>{let b=v.value===h?.value;return(0,Z.jsxs)("button",{"aria-selected":b,className:J("flex min-h-[58px] w-full min-w-0 items-start gap-2 rounded-[5px] px-2 py-2 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/25",b?"bg-primary/10 text-primary":"text-foreground hover:bg-muted"),onClick:()=>{n(v.value),d(!1)},role:"option",type:"button",children:[(0,Z.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,Z.jsx)("span",{className:"block truncate text-[12px] font-semibold",children:v.label}),(0,Z.jsx)("span",{className:J("mt-0.5 block text-[11px] leading-4",b?"text-primary/80":"text-muted-foreground"),children:l(v.description)})]}),b?(0,Z.jsx)(yt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}):null]},v.value)}),t.length>0?(0,Z.jsx)("div",{className:"my-1 border-t border-border/70"}):null,t.map(v=>{let b=r[v.name],w=(b?.tools??[]).filter(C=>Kce(C.name,g,m)),P=b?.tools??[],L=i===v.name;return(0,Z.jsxs)("div",{className:"rounded-[5px] px-1 py-1",children:[(0,Z.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5 px-1 py-1 text-[11px] font-semibold text-foreground",children:[(0,Z.jsx)(qo,{className:"h-3 w-3 shrink-0 text-muted-foreground"}),(0,Z.jsx)("span",{className:"min-w-0 flex-1 truncate",title:v.name,children:v.name}),(0,Z.jsx)("button",{"aria-label":`${l("Discover tools")} ${v.name}`,className:"rounded-[4px] px-1.5 py-0.5 text-[10px] font-medium text-muted-foreground outline-none transition-colors hover:bg-muted hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/25",onClick:C=>{C.stopPropagation(),a(v,!0)},title:b0(v),type:"button",children:b?.loading?(0,Z.jsx)(ct,{className:"h-3 w-3 animate-spin"}):l("Discover tools")})]}),(0,Z.jsxs)("div",{className:"ml-3 border-l border-border/70 pl-2",children:[w.map(C=>{let F=g===C.name&&(L||!i);return(0,Z.jsxs)("button",{"aria-selected":F,className:J("flex min-h-[44px] w-full min-w-0 items-start gap-2 rounded-[5px] px-2 py-1.5 text-left outline-none transition-colors focus-visible:ring-2 focus-visible:ring-ring/25",F?"bg-primary/10 text-primary":"text-foreground hover:bg-muted"),onClick:()=>{n(C.name,v),d(!1)},role:"option",type:"button",children:[(0,Z.jsxs)("span",{className:"min-w-0 flex-1",children:[(0,Z.jsx)("span",{className:"block truncate text-[12px] font-semibold",children:C.name}),C.description?(0,Z.jsx)("span",{className:J("mt-0.5 line-clamp-2 text-[11px] leading-4",F?"text-primary/80":"text-muted-foreground"),children:C.description}):null]}),F?(0,Z.jsx)(yt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}):null]},`${v.name}:${C.name}`)}),b?.loading&&w.length===0?(0,Z.jsxs)("div",{className:"flex items-center gap-2 px-2 py-2 text-[11px] text-muted-foreground",children:[(0,Z.jsx)(ct,{className:"h-3 w-3 animate-spin"}),(0,Z.jsx)("span",{children:l("Discover tools")})]}):null,!b?.loading&&b?.tools&&P.length>0&&w.length===0&&!b.error?(0,Z.jsx)("div",{className:"px-2 py-2 text-[11px] text-muted-foreground",children:l("No tools available")}):null,!b?.loading&&b?.tools&&P.length===0&&!b.error?(0,Z.jsx)("div",{className:"px-2 py-2 text-[11px] text-muted-foreground",children:l("No tools discovered")}):null,b?.error?(0,Z.jsx)("div",{className:"px-2 py-2 text-[11px] text-destructive",title:b.error,children:l("Tool discovery failed")}):null]})]},v.name)}),(0,Z.jsx)("div",{className:"my-1 border-t border-border/70"}),(0,Z.jsxs)("button",{className:"flex min-h-[36px] w-full min-w-0 items-center gap-2 rounded-[5px] px-2 py-2 text-left text-[12px] font-semibold text-foreground outline-none transition-colors hover:bg-muted focus-visible:ring-2 focus-visible:ring-ring/25",onClick:()=>{d(!1),o()},type:"button",children:[(0,Z.jsx)(It,{className:"h-3.5 w-3.5 shrink-0 text-muted-foreground"}),(0,Z.jsx)("span",{className:"min-w-0 truncate",children:l("Add custom MCP")})]})]})}):null})]})}function O5({canSubmit:e,draft:t,error:r,marketplace:o,onChange:n,onChooseLocal:a,onClose:i,onSubmit:s}){let l=ve();function u(d){n({key:d.id,apps:d.apps,dependencies:d.dependencies,marketplaceId:d.id,modulePath:d.modulePath,selectedName:d.name})}return(0,Z.jsx)(Ft,{onOpenChange:d=>!d&&i(),children:(0,Z.jsxs)(Tt,{children:[(0,Z.jsxs)(Bt,{children:[(0,Z.jsx)("div",{className:"min-w-0",children:(0,Z.jsx)(Vt,{children:l("Install Extension")})}),(0,Z.jsx)(ne,{"aria-label":l("Close dialog"),onClick:i,size:"iconSm",title:l("Close"),type:"button",variant:"ghost",children:(0,Z.jsx)(ft,{className:"h-4 w-4"})})]}),(0,Z.jsx)(Ot,{children:(0,Z.jsxs)("div",{className:"space-y-3",children:[(0,Z.jsx)("div",{className:"space-y-2",children:o.length===0?(0,Z.jsx)("div",{className:"rounded-md border border-dashed border-border bg-muted/30 px-3 py-8 text-center text-[12px] text-muted-foreground",children:l("No marketplace extensions")}):o.map(d=>(0,Z.jsxs)("button",{className:J("flex w-full min-w-0 flex-col gap-1 rounded-md border px-3 py-2 text-left text-[12px] transition-colors",t.marketplaceId===d.id?"border-primary/50 bg-primary/5":"border-border bg-card hover:bg-muted/40"),onClick:()=>u(d),type:"button",children:[(0,Z.jsx)("span",{className:"truncate font-semibold text-foreground",children:d.name}),(0,Z.jsx)("span",{className:"line-clamp-2 text-[11px] text-muted-foreground",children:d.description}),(0,Z.jsx)("span",{className:"truncate text-[10px] text-muted-foreground/80",children:d.capabilities.join(", ")}),d.dependencies.length>0?(0,Z.jsxs)("span",{className:"truncate text-[10px] text-muted-foreground/80",children:[l("Dependencies"),": ",Pue(d.dependencies)]}):null]},d.id))}),r?(0,Z.jsx)("div",{className:"rounded-md border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:r}):null]})}),(0,Z.jsxs)($t,{className:"justify-between",children:[(0,Z.jsxs)(ne,{onClick:a,type:"button",variant:"outline",children:[(0,Z.jsx)(gk,{className:"h-4 w-4"}),l("Choose folder")]}),(0,Z.jsxs)("div",{className:"flex items-center gap-2",children:[(0,Z.jsx)(ne,{onClick:i,type:"button",variant:"outline",children:l("Cancel")}),(0,Z.jsxs)(ne,{disabled:!e,onClick:s,type:"button",children:[(0,Z.jsx)(It,{className:"h-4 w-4"}),l("Install")]})]})]})]})})}var so=z(ze());function E5({apiKeyAdd:e,apiKeyCreated:t,apiKeyEdit:r,claudeDesignConfig:o,cursorProxyConfig:n,extensionDelete:a,extensionInstall:i,extensionSettings:s,profileAdd:l,profileEdit:u,profileOpen:d,providerDeepLink:c,providerDelete:f,providerUpsert:p,routingDelete:g,routingUpsert:m,settings:h,update:k,virtualModelUpsert:M}){let v=[e?{key:"api-key-add",node:(0,so.jsx)(m5,{...e})}:null,t?{key:"api-key-created",node:(0,so.jsx)(Ece,{...t})}:null,l?{key:"profile-add",node:(0,so.jsx)(KR,{...l})}:null,u?{key:"profile-edit",node:(0,so.jsx)(KR,{...u})}:null,d?{key:"profile-open",node:(0,so.jsx)(Rce,{...d})}:null,r?{key:"api-key-edit",node:(0,so.jsx)(g5,{...r})}:null,c?{key:"provider-deep-link",node:(0,so.jsx)(a5,{...c})}:null,p?{key:"provider-upsert",node:(0,so.jsx)(i5,{...p})}:null,f?{key:"provider-delete",node:(0,so.jsx)(n5,{...f})}:null,m?{key:"routing-upsert",node:(0,so.jsx)(x5,{...m})}:null,g?{key:"routing-delete",node:(0,so.jsx)(y5,{...g})}:null,M?{key:"virtual-model-upsert",node:(0,so.jsx)(T5,{...M})}:null,i?{key:"extension-install",node:(0,so.jsx)(O5,{...i})}:null,a?{key:"extension-delete",node:(0,so.jsx)(M5,{...a})}:null,s?{key:"extension-settings",node:(0,so.jsx)(h5,{...s})}:null,o?{key:"extension-config",node:(0,so.jsx)($R,{...o})}:null,n?{key:"cursor-proxy-config",node:(0,so.jsx)($R,{...n})}:null,h?{key:"settings",node:(0,so.jsx)(S5,{...h})}:null,k?{key:"update",node:(0,so.jsx)(A5,{...k})}:null].filter(b=>!!b);return(0,so.jsx)(wt,{initial:!1,children:v.map((b,w)=>(0,so.jsx)(JU,{depth:v.length-w-1,children:b.node},b.key))})}function j0(e,t={}){let r=new Map,o,n;for(let h of e){let k=Lm(new Date(h.bucket));if(!ize(k))continue;let M=G0(k);r.set(M,(r.get(M)??0)+Math.max(0,h.totalTokens)),o=o&&o<=k?o:k,n=n&&n>=k?n:k}let a=Lm(new Date);o=o??a,n=n??a;let i=_5(o),s=nze(n),l=aze(i,s),u=Zce(t.minWeeks),d=Zce(t.maxWeeks);u&&l<u&&(i=W0(i,-(u-l)*7),l=u),d&&l>d&&(i=W0(s,-(d*7-1)),i=_5(i),l=d);let c=Math.max(1,Xce(o,n)+1),f=tze(r,o,n),p=Math.max(...Array.from(r.values()),0),g=[];for(let h=0;h<l;h+=1)for(let k=0;k<7;k+=1){let M=W0(i,h*7+k),v=G0(M),b=r.get(v)??0;g.push({date:M,dateKey:v,dateLabel:Jje(M),dayIndex:k,inObservedRange:M>=o&&M<=n,intensity:eze(b,p),totalTokens:b,weekIndex:h})}return{activeDays:rze(r,o,n,h=>h>0),avgPerDay:f/c,avgPerWeek:f/Math.max(1,c/7),cells:g,dayCount:c,longestStreak:oze(r,o,n),maxTokens:p,months:Qje(g),totalTokens:f,weekCount:l}}function G0(e){let t=e.getFullYear(),r=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${t}-${r}-${o}`}function Jje(e){return new Intl.DateTimeFormat(void 0,{day:"numeric",month:"short"}).format(e)}function Qje(e){let t=[],r=new Set;for(let o of e){let n=`${o.date.getFullYear()}-${o.date.getMonth()}`;r.has(n)||(r.add(n),t.push({label:new Intl.DateTimeFormat(void 0,{month:"short"}).format(o.date),weekIndex:o.weekIndex}))}return t}function eze(e,t){if(e<=0||t<=0)return 0;let r=e/t;return r>=.75?4:r>=.45?3:r>=.2?2:1}function tze(e,t,r){let o=0;return F5(t,r,n=>{o+=e.get(G0(n))??0}),o}function rze(e,t,r,o){let n=0;return F5(t,r,a=>{o(e.get(G0(a))??0)&&(n+=1)}),n}function oze(e,t,r){let o=0,n=0;return F5(t,r,a=>{(e.get(G0(a))??0)>0?(o+=1,n=Math.max(n,o)):o=0}),n}function F5(e,t,r){for(let o=Lm(e);o<=t;o=W0(o,1))r(o)}function Lm(e){let t=new Date(e);return t.setHours(0,0,0,0),t}function _5(e){let t=Lm(e),r=(t.getDay()+6)%7;return t.setDate(t.getDate()-r),t}function nze(e){return W0(_5(e),6)}function W0(e,t){let r=new Date(e);return r.setDate(r.getDate()+t),Lm(r)}function Xce(e,t){return Math.max(0,Math.round((Lm(t).getTime()-Lm(e).getTime())/864e5))}function aze(e,t){return Math.max(1,Math.floor(Xce(e,t)/7)+1)}function ize(e){return Number.isFinite(e.getTime())}function Zce(e){if(!(!Number.isFinite(e)||!e||e<=0))return Math.floor(e)}var he=z(ze()),sze=540,lze=675,uze=1080,dze=1350,JR={amber:{accent:"#f59e0b",background:"linear-gradient(135deg, #fffbeb 0%, #fef3c7 42%, #fff7ed 100%)",border:"border-amber-200",glow:"bg-amber-300/28",muted:"text-amber-900/62",text:"text-amber-950"},blue:{accent:"#2563eb",background:"linear-gradient(135deg, #eff6ff 0%, #dbeafe 44%, #ecfeff 100%)",border:"border-blue-200",glow:"bg-blue-300/30",muted:"text-blue-950/62",text:"text-blue-950"},emerald:{accent:"#059669",background:"linear-gradient(135deg, #ecfdf5 0%, #d1fae5 42%, #f0fdfa 100%)",border:"border-emerald-200",glow:"bg-emerald-300/28",muted:"text-emerald-950/62",text:"text-emerald-950"},indigo:{accent:"#4f46e5",background:"linear-gradient(135deg, #eef2ff 0%, #e0e7ff 46%, #f5f3ff 100%)",border:"border-indigo-200",glow:"bg-indigo-300/30",muted:"text-indigo-950/62",text:"text-indigo-950"},rose:{accent:"#e11d48",background:"linear-gradient(135deg, #fff1f2 0%, #ffe4e6 45%, #fff7ed 100%)",border:"border-rose-200",glow:"bg-rose-300/28",muted:"text-rose-950/62",text:"text-rose-950"},slate:{accent:"#475569",background:"linear-gradient(135deg, #f8fafc 0%, #e2e8f0 48%, #f1f5f9 100%)",border:"border-slate-200",glow:"bg-slate-300/32",muted:"text-slate-700",text:"text-slate-950"},teal:{accent:"#0f766e",background:"linear-gradient(135deg, #f0fdfa 0%, #ccfbf1 42%, #ecfeff 100%)",border:"border-teal-200",glow:"bg-teal-300/30",muted:"text-teal-950/62",text:"text-teal-950"}};function efe({providerAccounts:e,type:t,usageRange:r,usageStats:o}){let n=ve(),a=cze(t);return a?(0,he.jsxs)(fze,{fileName:a.fileName,title:n(a.title),children:[t==="share-usage-wrapped"?(0,he.jsx)(pze,{usageStats:o}):null,t==="share-route-map"?(0,he.jsx)(mze,{usageStats:o}):null,t==="share-model-leaderboard"?(0,he.jsx)(gze,{usageStats:o}):null,t==="share-fuel-cockpit"?(0,he.jsx)(kze,{providerAccounts:e}):null,t==="share-token-calendar"?(0,he.jsx)(Mze,{usageStats:o}):null,t==="share-spend-receipt"?(0,he.jsx)(hze,{usageRange:r,usageStats:o}):null]}):null}function cze(e){if(e==="share-usage-wrapped")return{fileName:"ccr-ai-usage-wrapped.png",title:"AI Usage Wrapped"};if(e==="share-route-map")return{fileName:"ccr-route-map.png",title:"CCR Route Map"};if(e==="share-model-leaderboard")return{fileName:"ccr-model-leaderboard.png",title:"Model Leaderboard"};if(e==="share-fuel-cockpit")return{fileName:"ccr-ai-fuel-cockpit.png",title:"AI Fuel Cockpit"};if(e==="share-token-calendar")return{fileName:"ccr-token-calendar-poster.png",title:"Token Calendar Poster"};if(e==="share-spend-receipt")return{fileName:"ccr-spend-receipt.png",title:"Spend Receipt"}}function fze({children:e,fileName:t,title:r}){let o=ve(),n=(0,D.useRef)(null),a=(0,D.useRef)(null),[i,s]=(0,D.useState)(!1),[l,u]=(0,D.useState)("idle");async function d(){if(l==="saving")return;u("saving");let c;try{if(window.ccr?.prepareImageExportTarget&&(c=await window.ccr.prepareImageExportTarget({fileName:t}),c.canceled)){u("idle");return}s(!0),await W5(),await W5();let f=a.current;if(!f)throw new Error("Export card is unavailable.");await Sze(f,t,{exportId:c?.exportId,output:{height:dze,width:uze}}),u("idle")}catch(f){console.error(f),u("error")}finally{s(!1)}}return(0,he.jsxs)("article",{className:"flex h-full min-h-0 min-w-0 flex-col space-y-2",children:[(0,he.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-2",children:[(0,he.jsx)("div",{className:"min-w-0 truncate text-[12px] font-semibold text-muted-foreground",children:r}),(0,he.jsxs)("div",{className:"flex shrink-0 items-center gap-2",children:[l==="error"?(0,he.jsx)("span",{className:"text-[11px] font-medium text-destructive",children:o("Export failed")}):null,(0,he.jsx)(ne,{"aria-label":o(l==="saving"?"Saving":"Save image"),className:"inline-flex items-center justify-center text-muted-foreground transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/25 disabled:pointer-events-none disabled:opacity-45",disabled:l==="saving",title:o(l==="saving"?"Saving":"Save image"),type:"button",unstyled:!0,onClick:()=>{d()},children:l==="saving"?(0,he.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,he.jsx)(nl,{className:"h-3.5 w-3.5"})})]})]}),(0,he.jsx)("div",{className:"min-h-0 flex-1",ref:n,children:e}),i?(0,he.jsx)("div",{"aria-hidden":"true",className:"pointer-events-none fixed top-0 z-[9999]",ref:a,style:{height:`${lze}px`,left:"-10000px",width:`${sze}px`},children:e}):null]})}function pze({usageStats:e}){let t=ve(),r=e.totals,o=e.models[0],n=e.providerModels[0],a=[...e.series].sort((s,l)=>l.totalTokens-s.totalTokens)[0],i=j0(e.series,{maxWeeks:12,minWeeks:8});return(0,he.jsxs)(mh,{tone:"teal",children:[(0,he.jsx)(gh,{title:t("AI Usage Wrapped"),tone:"teal"}),(0,he.jsxs)("div",{className:"mt-8",children:[(0,he.jsx)("div",{className:"text-[60px] font-black leading-none tracking-normal text-teal-950",children:We(r.totalTokens)}),(0,he.jsx)("div",{className:"mt-2 text-[17px] font-semibold text-teal-950/70",children:t("tokens routed through CCR")})]}),(0,he.jsxs)("div",{className:"mt-8 grid grid-cols-2 gap-3",children:[(0,he.jsx)(Rm,{label:t("Requests"),value:We(r.requestCount)}),(0,he.jsx)(Rm,{label:t("Estimated cost"),value:wl(r.costUsd)}),(0,he.jsx)(Rm,{label:t("Cache ratio"),value:pn(r.cacheRatio)}),(0,he.jsx)(Rm,{label:t("Longest streak"),value:`${We(i.longestStreak)} ${t(i.longestStreak===1?"day":"days")}`})]}),(0,he.jsxs)("div",{className:"mt-8 grid gap-3",children:[(0,he.jsx)(B5,{label:t("Top model"),value:o?.label??t("No model activity")}),(0,he.jsx)(B5,{label:t("Top provider"),value:n?.provider||n?.label||t("No provider activity")}),(0,he.jsx)(B5,{label:t("Peak day"),value:a?`${a.label} / ${We(a.totalTokens)}`:"-"})]}),(0,he.jsx)(kh,{tone:"teal"})]})}function mze({usageStats:e}){let t=ve(),r=yze(e,t),o=r.reduce((n,a)=>n+a.value,0)||1;return(0,he.jsxs)(mh,{tone:"indigo",children:[(0,he.jsx)(gh,{title:t("CCR Route Map"),tone:"indigo"}),(0,he.jsxs)("div",{className:"mt-7 rounded-[22px] border border-indigo-200/80 bg-white/62 p-4 shadow-[0_16px_34px_rgba(79,70,229,0.10)]",children:[(0,he.jsxs)("div",{className:"grid grid-cols-[1fr_64px_1fr] items-center gap-3 text-center text-[10px] font-bold uppercase text-indigo-950/55",children:[(0,he.jsx)("span",{children:t("Client")}),(0,he.jsx)("span",{children:"CCR"}),(0,he.jsx)("span",{children:t("Model")})]}),(0,he.jsx)("div",{className:"mt-4 space-y-3",children:r.length>0?r.slice(0,5).map((n,a)=>{let i=Math.max(8,n.value/o*100);return(0,he.jsxs)("div",{className:"grid grid-cols-[1fr_64px_1fr] items-center gap-3",children:[(0,he.jsx)(Jce,{label:n.client}),(0,he.jsxs)("div",{className:"relative flex h-9 items-center justify-center",children:[(0,he.jsx)("span",{className:"absolute left-0 right-0 top-1/2 h-1 -translate-y-1/2 rounded-full bg-indigo-200"}),(0,he.jsx)("span",{className:"absolute left-0 top-1/2 h-2 -translate-y-1/2 rounded-full bg-indigo-500",style:{width:`${i}%`}}),(0,he.jsx)("span",{className:"relative flex h-9 w-9 items-center justify-center rounded-full bg-indigo-600 text-[10px] font-black text-white shadow-[0_8px_18px_rgba(79,70,229,0.32)]",children:a+1})]}),(0,he.jsx)(Jce,{label:`${n.provider} / ${n.model}`,align:"right"})]},`${n.client}-${n.provider}-${n.model}-${a}`)}):(0,he.jsx)("div",{className:"rounded-[18px] border border-dashed border-indigo-300 bg-indigo-50/60 px-4 py-12 text-center text-[14px] font-semibold text-indigo-950/55",children:t("No route activity")})})]}),(0,he.jsxs)("div",{className:"mt-6 grid grid-cols-3 gap-2",children:[(0,he.jsx)(V5,{label:t("Clients"),value:We(U5(r.map(n=>n.client)))}),(0,he.jsx)(V5,{label:t("Providers"),value:We(U5(r.map(n=>n.provider)))}),(0,he.jsx)(V5,{label:t("Models"),value:We(U5(r.map(n=>n.model)))})]}),(0,he.jsx)(kh,{tone:"indigo"})]})}function gze({usageStats:e}){let t=ve(),r=e.models.filter(n=>n.totalTokens>0).slice(0,5),o=Math.max(...r.map(n=>n.totalTokens),1);return(0,he.jsxs)(mh,{tone:"blue",children:[(0,he.jsx)(gh,{title:t("Model Leaderboard"),tone:"blue"}),(0,he.jsx)("div",{className:"mt-7 space-y-3",children:r.length>0?r.map((n,a)=>(0,he.jsxs)("div",{className:"rounded-[20px] border border-blue-200/80 bg-white/66 p-3 shadow-[0_12px_28px_rgba(37,99,235,0.10)]",children:[(0,he.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,he.jsx)("span",{className:"flex h-10 w-10 shrink-0 items-center justify-center rounded-[14px] bg-blue-600 text-[17px] font-black text-white",children:a+1}),(0,he.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,he.jsx)("div",{className:"truncate text-[15px] font-black text-blue-950",children:n.label}),(0,he.jsx)("div",{className:"mt-0.5 truncate text-[11px] font-semibold text-blue-950/55",children:n.provider??t("All providers")})]}),(0,he.jsxs)("div",{className:"shrink-0 text-right",children:[(0,he.jsx)("div",{className:"text-[16px] font-black text-blue-950",children:pn(n.maxShare)}),(0,he.jsx)("div",{className:"text-[10px] font-semibold text-blue-950/52",children:We(n.totalTokens)})]})]}),(0,he.jsx)("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-blue-100",children:(0,he.jsx)("div",{className:"h-full rounded-full bg-blue-600",style:{width:`${Math.max(4,n.totalTokens/o*100)}%`}})})]},n.key)):(0,he.jsx)(tfe,{label:t("No model activity"),tone:"blue"})}),(0,he.jsx)(kh,{tone:"blue"})]})}function kze({providerAccounts:e}){let t=ve(),r=e.filter(o=>o.meters.length>0).map(o=>({account:o,meter:bze(o)})).filter(o=>!!o.meter).slice(0,3);return(0,he.jsxs)(mh,{tone:"emerald",children:[(0,he.jsx)(gh,{title:t("AI Fuel Cockpit"),tone:"emerald"}),(0,he.jsx)("div",{className:"mt-7 grid gap-4",children:r.length>0?r.map(({account:o,meter:n},a)=>{let i=Kc(n)??(n.kind==="balance"?1:0);return(0,he.jsxs)("div",{className:"grid grid-cols-[112px_minmax(0,1fr)] items-center gap-4 rounded-[22px] border border-emerald-200/80 bg-white/66 p-4 shadow-[0_14px_30px_rgba(5,150,105,0.10)]",children:[(0,he.jsx)(vze,{color:a===0?"#059669":a===1?"#2563eb":"#d97706",ratio:i,value:pn(i)}),(0,he.jsxs)("div",{className:"min-w-0",children:[(0,he.jsx)("div",{className:"truncate text-[16px] font-black text-emerald-950",children:wze(o.provider,t)}),(0,he.jsx)("div",{className:"mt-1 truncate text-[12px] font-semibold text-emerald-950/58",children:Im(n,t)}),(0,he.jsx)("div",{className:"mt-3 text-[26px] font-black leading-none text-emerald-950",children:Nn(n)})]})]},Bu(o))}):(0,he.jsx)(tfe,{label:t("No account balance connectors configured"),tone:"emerald"})}),(0,he.jsx)(kh,{tone:"emerald"})]})}function Mze({usageStats:e}){let t=ve(),r=j0(e.series,{maxWeeks:26,minWeeks:18});return(0,he.jsxs)(mh,{tone:"rose",children:[(0,he.jsx)(gh,{title:t("Token Calendar Poster"),tone:"rose"}),(0,he.jsx)("div",{className:"mt-7 rounded-[22px] border border-rose-200/80 bg-white/66 p-4 shadow-[0_14px_30px_rgba(225,29,72,0.10)]",children:(0,he.jsx)("div",{className:"grid",style:{gap:"5px",gridTemplateColumns:`repeat(${r.weekCount}, minmax(0, 1fr))`,gridTemplateRows:"repeat(7, minmax(0, 1fr))"},children:r.cells.map(o=>(0,he.jsx)("span",{className:"aspect-square rounded-[5px]",style:{backgroundColor:Qce(o.intensity,o.inObservedRange),gridColumn:o.weekIndex+1,gridRow:o.dayIndex+1}},o.dateKey))})}),(0,he.jsxs)("div",{className:"mt-5 grid grid-cols-3 gap-2",children:[(0,he.jsx)(Rm,{label:t("Longest streak"),value:`${We(r.longestStreak)}d`}),(0,he.jsx)(Rm,{label:t("Avg / day"),value:We(Math.round(r.avgPerDay))}),(0,he.jsx)(Rm,{label:t("Total"),value:We(r.totalTokens)})]}),(0,he.jsxs)("div",{className:"mt-5 flex items-center gap-2 text-[12px] font-bold text-rose-950/62",children:[(0,he.jsx)("span",{children:t("Less")}),[0,1,2,3,4].map(o=>(0,he.jsx)("span",{className:"h-4 w-4 rounded-[5px]",style:{backgroundColor:Qce(o,!0)}},o)),(0,he.jsx)("span",{children:t("More")})]}),(0,he.jsx)(kh,{tone:"rose"})]})}function hze({usageRange:e,usageStats:t}){let r=ve(),o=t.totals,n=[{label:r("Range"),value:Cze(e,r)},{label:r("Requests"),value:We(o.requestCount)},{label:r("Input tokens"),value:We(o.inputTokens)},{label:r("Output tokens"),value:We(o.outputTokens)},{label:r("Cache tokens"),value:We(o.cacheTokens)},{label:r("Average latency"),value:en(o.avgDurationMs)},{label:r("Success rate"),value:pn(o.successRate)}];return(0,he.jsxs)(mh,{tone:"slate",children:[(0,he.jsx)(gh,{title:r("Spend Receipt"),tone:"slate"}),(0,he.jsxs)("div",{className:"mt-7 rounded-[22px] border border-slate-300 bg-white/74 p-5 shadow-[0_16px_34px_rgba(71,85,105,0.12)]",children:[(0,he.jsxs)("div",{className:"border-b border-dashed border-slate-300 pb-4 text-center",children:[(0,he.jsx)("div",{className:"text-[40px] font-black leading-none text-slate-950",children:wl(o.costUsd)}),(0,he.jsx)("div",{className:"mt-2 text-[12px] font-bold uppercase text-slate-500",children:r("Estimated cost")})]}),(0,he.jsx)("div",{className:"mt-4 space-y-2 border-b border-dashed border-slate-300 pb-4",children:n.map(a=>(0,he.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-4 text-[13px]",children:[(0,he.jsx)("span",{className:"truncate font-semibold text-slate-500",children:a.label}),(0,he.jsx)("span",{className:"shrink-0 font-black text-slate-950",children:a.value})]},a.label))}),(0,he.jsxs)("div",{className:"mt-4 flex items-center justify-between gap-4",children:[(0,he.jsx)("div",{className:"text-[11px] font-bold uppercase text-slate-500",children:r("Total tokens")}),(0,he.jsx)("div",{className:"text-[30px] font-black leading-none text-slate-950",children:We(o.totalTokens)})]})]}),(0,he.jsx)(kh,{tone:"slate"})]})}function mh({children:e,tone:t}){let r=JR[t];return(0,he.jsxs)("div",{className:J("relative h-full min-h-0 w-full overflow-hidden rounded-[28px] border p-6 shadow-card-elevated",r.border,r.text),style:{background:r.background},children:[(0,he.jsx)("span",{className:J("absolute -right-16 -top-16 h-44 w-44 rounded-full blur-3xl",r.glow)}),(0,he.jsx)("span",{className:J("absolute -bottom-20 left-8 h-44 w-44 rounded-full blur-3xl",r.glow)}),(0,he.jsx)("div",{className:"relative z-10 flex h-full min-h-0 flex-col",children:e})]})}function gh({title:e,tone:t}){let r=JR[t];return(0,he.jsxs)("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[(0,he.jsx)("div",{className:"min-w-0",children:(0,he.jsx)("h4",{className:"text-[30px] font-black leading-[1.02] tracking-normal",children:e})}),(0,he.jsx)("div",{className:"flex h-12 w-12 shrink-0 items-center justify-center rounded-[18px] border border-white/70 bg-white/58 shadow-[0_12px_28px_rgba(15,23,42,0.10)]",children:(0,he.jsx)("span",{className:"text-[16px] font-black",style:{color:r.accent},children:"CCR"})})]})}function kh({tone:e}){let t=ve(),r=JR[e];return(0,he.jsxs)("div",{className:J("mt-auto flex min-w-0 items-center justify-between gap-3 pt-5 text-[11px] font-black uppercase tracking-[0.12em]",r.muted),children:[(0,he.jsx)("span",{children:t("Generated by CCR")}),(0,he.jsx)("span",{children:new Date().getFullYear()})]})}function Rm({label:e,value:t}){return(0,he.jsxs)("div",{className:"min-w-0 rounded-[18px] border border-white/70 bg-white/54 px-3 py-3 shadow-[0_10px_24px_rgba(15,23,42,0.08)]",children:[(0,he.jsx)("div",{className:"truncate text-[11px] font-bold text-slate-600",children:e}),(0,he.jsx)("div",{className:"mt-1 truncate text-[22px] font-black leading-none text-slate-950",children:t})]})}function B5({label:e,value:t}){return(0,he.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3 rounded-[18px] border border-white/70 bg-white/48 px-4 py-3",children:[(0,he.jsx)("span",{className:"truncate text-[12px] font-bold text-slate-600",children:e}),(0,he.jsx)("span",{className:"min-w-0 truncate text-right text-[14px] font-black text-slate-950",children:t})]})}function tfe({label:e,tone:t}){let r=JR[t];return(0,he.jsx)("div",{className:J("rounded-[22px] border border-dashed bg-white/52 px-4 py-16 text-center text-[14px] font-bold",r.border,r.muted),children:e})}function Jce({align:e="left",label:t}){return(0,he.jsx)("div",{className:J("min-w-0 rounded-[16px] border border-indigo-200 bg-white/72 px-3 py-2 shadow-[0_8px_18px_rgba(79,70,229,0.08)]",e==="right"&&"text-right"),children:(0,he.jsx)("div",{className:"truncate text-[12px] font-black text-indigo-950",children:t})})}function V5({label:e,value:t}){return(0,he.jsxs)("div",{className:"rounded-[16px] border border-indigo-200/80 bg-white/58 px-3 py-2 text-center",children:[(0,he.jsx)("div",{className:"text-[20px] font-black leading-none text-indigo-950",children:t}),(0,he.jsx)("div",{className:"mt-1 truncate text-[10px] font-bold uppercase text-indigo-950/50",children:e})]})}function vze({color:e,ratio:t,value:r}){let n=2*Math.PI*41,a=Math.max(0,Math.min(1,t));return(0,he.jsxs)("svg",{className:"h-[112px] w-[112px]",role:"img",viewBox:"0 0 112 112","aria-label":r,children:[(0,he.jsx)("circle",{cx:"56",cy:"56",fill:"rgba(255,255,255,.55)",r:"48"}),(0,he.jsx)("circle",{cx:"56",cy:"56",fill:"none",r:41,stroke:"rgba(15,23,42,.10)",strokeWidth:"10"}),(0,he.jsx)("circle",{cx:"56",cy:"56",fill:"none",r:41,stroke:e,strokeDasharray:n,strokeDashoffset:n*(1-a),strokeLinecap:"round",strokeWidth:"10",transform:"rotate(-90 56 56)"}),(0,he.jsx)("text",{fill:"#064e3b",fontSize:"18",fontWeight:"900",textAnchor:"middle",x:"56",y:"61",children:r})]})}function yze(e,t){let r=e.clientModels.filter(o=>o.totalTokens>0).map(o=>({client:o.client||o.label||t("Agent"),model:o.model||xze(o.label),provider:o.provider||t("Provider"),value:o.totalTokens}));return r.length>0?r.sort((o,n)=>n.value-o.value):e.models.filter(o=>o.totalTokens>0).map(o=>({client:t("Agent"),model:o.model||o.label,provider:o.provider||t("Provider"),value:o.totalTokens})).sort((o,n)=>n.value-o.value)}function xze(e){let t=e.split("/");return t[t.length-1]?.trim()||e}function bze(e){return[...e.meters].filter(t=>Kc(t)!==void 0).sort((t,r)=>(Kc(t)??1)-(Kc(r)??1))[0]??dh(e)}function wze(e,t){return e.trim()||t("Provider")}function U5(e){return new Set(e.filter(Boolean)).size}function Cze(e,t){return t(e==="today"?"Today":e)}function Qce(e,t){return t?e===0?"rgba(225,29,72,.13)":e===1?"rgba(225,29,72,.30)":e===2?"rgba(225,29,72,.50)":e===3?"rgba(225,29,72,.72)":"rgba(225,29,72,.94)":"rgba(225,29,72,.08)"}async function Sze(e,t,r={}){if(window.ccr?.renderHtmlPng){await Pze(e,t,r);return}if(window.ccr?.captureElementPng){await Aze(e,t,r);return}await Ize(e,t)}async function Pze(e,t,r){let o=rfe(e),n=await window.ccr?.renderHtmlPng?.({borderRadius:ofe(e),exportId:r.exportId,fileName:t,html:Dze(e,o.width,o.height),output:r.output,size:o});!n||n.canceled}async function Aze(e,t,r){e.scrollIntoView({block:"nearest",inline:"nearest"}),await W5();let o=e.getBoundingClientRect(),n=await window.ccr?.captureElementPng?.({borderRadius:ofe(e),exportId:r.exportId,fileName:t,output:r.output,rect:{height:o.height,width:o.width,x:o.x,y:o.y}});!n||n.canceled}function rfe(e){let t=e.getBoundingClientRect(),r=Math.ceil(t.width),o=Math.ceil(t.height);if(r<=0||o<=0)throw new Error("Cannot export an empty element.");return{height:o,width:r}}function ofe(e){let t=e.firstElementChild instanceof HTMLElement?e.firstElementChild:e,r=window.getComputedStyle(t),o=[r.borderTopLeftRadius,r.borderTopRightRadius,r.borderBottomRightRadius,r.borderBottomLeftRadius].map(a=>Number.parseFloat(a)).filter(Number.isFinite),n=Math.max(0,...o);return n>0?n:void 0}function W5(){return new Promise(e=>{window.requestAnimationFrame(()=>e())})}async function Ize(e,t){let{height:r,width:o}=rfe(e),n=nfe(e,o,r),a=new XMLSerializer().serializeToString(n),i=[`<svg xmlns="http://www.w3.org/2000/svg" width="${o}" height="${r}" viewBox="0 0 ${o} ${r}">`,`<foreignObject width="100%" height="100%">${a}</foreignObject>`,"</svg>"].join(""),s=URL.createObjectURL(new Blob([i],{type:"image/svg+xml;charset=utf-8"}));try{let l=await Lze(s),u=3,d=document.createElement("canvas");d.width=o*u,d.height=r*u;let c=d.getContext("2d");if(!c)throw new Error("Canvas rendering is unavailable.");c.scale(u,u),c.drawImage(l,0,0,o,r);let f=await Rze(d),p=URL.createObjectURL(f);try{let g=document.createElement("a");g.href=p,g.download=t,document.body.appendChild(g),g.click(),g.remove()}finally{URL.revokeObjectURL(p)}}finally{URL.revokeObjectURL(s)}}function Dze(e,t,r){let o=nfe(e,t,r),n=new XMLSerializer().serializeToString(o);return["<!doctype html>","<html>","<head>",'<meta charset="utf-8">',"<style>",`html,body{margin:0;width:${t}px;height:${r}px;overflow:hidden;background:transparent;}`,"body{display:block;}","*,*::before,*::after{box-sizing:border-box;}","</style>","</head>",`<body>${n}</body>`,"</html>"].join("")}function nfe(e,t,r){let o=e.cloneNode(!0);return o.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),afe(e,o),o.style.bottom="auto",o.style.height=`${r}px`,o.style.left="0",o.style.margin="0",o.style.position="relative",o.style.right="auto",o.style.top="0",o.style.transform="none",o.style.width=`${t}px`,o}function afe(e,t){if(t instanceof HTMLElement||t instanceof SVGElement){let n=window.getComputedStyle(e);for(let a of Array.from(n))t.style.setProperty(a,n.getPropertyValue(a),n.getPropertyPriority(a))}let r=Array.from(e.children),o=Array.from(t.children);r.forEach((n,a)=>{let i=o[a];i&&afe(n,i)})}function Lze(e){return new Promise((t,r)=>{let o=new Image;o.onload=()=>t(o),o.onerror=()=>r(new Error("Failed to render export image.")),o.src=e})}function Rze(e){return new Promise((t,r)=>{e.toBlob(o=>{o?t(o):r(new Error("Failed to encode PNG image."))},"image/png")})}var y=z(ze());function K5({onWidgetsChange:e,overviewWidgets:t,providerAccounts:r,providerAccountRefreshing:o=!1,refreshProviderAccounts:n,setUsageRange:a,usageRange:i,usageStats:s}){let l=ve(),u=(0,D.useRef)(null),[d,c]=(0,D.useState)(),[f,p]=(0,D.useState)(),[g,m]=(0,D.useState)(),[h,k]=(0,D.useState)(),[M,v]=(0,D.useState)(!1),b=ny(Ff(Hl,{activationConstraint:{distance:8}}),Ff(ql,{coordinateGetter:cy})),w=(0,D.useMemo)(()=>xm(t),[t]),P=(0,D.useMemo)(()=>w.filter(W=>W.enabled),[w]),C=(g??w).filter(W=>W.enabled),F=C.find(W=>W.id===d),T=w.find(W=>W.id===f);(0,D.useEffect)(()=>{M||(c(void 0),p(void 0),m(void 0))},[M]),(0,D.useEffect)(()=>{f&&!w.some(W=>W.id===f)&&p(void 0)},[f,w]),(0,D.useEffect)(()=>{M&&!f&&P[0]&&p(P[0].id)},[P,M,f]),(0,D.useEffect)(()=>{if(!M||!h||!w.some(K=>K.enabled&&K.id===h))return;let W=window.requestAnimationFrame(()=>{let K=Oze(u.current,h);K&&(K.scrollIntoView({block:"center",inline:"nearest"}),k(void 0))});return()=>window.cancelAnimationFrame(W)},[M,h,w]);function G(W,K){e(w.map(Q=>Q.id===W?dR({...Q,...K})??Q:Q))}function $(W){let K=String(W.active.id);c(K),p(K),m(w)}function oe(W){let K=String(W.active.id),Q=W.over?String(W.over.id):"";!Q||K===Q||m(ue=>{let Ue=ue??w,de=Ue.findIndex(Oe=>Oe.id===K),Pe=Ue.findIndex(Oe=>Oe.id===Q);return de<0||Pe<0||de===Pe?Ue:Uf(Ue,de,Pe)})}function se(W){let K=W.over?String(W.over.id):"",Q=g??w;c(void 0),m(void 0),!(!K&&M6e(Q,w))&&e(Q)}function pe(){c(void 0),m(void 0)}function N(W){e(w.filter(K=>K.id!==W)),p(K=>K===W?void 0:K)}(0,D.useEffect)(()=>{if(!M||!f||d)return;let W=K=>{if(K.defaultPrevented||K.key!=="Delete"&&K.key!=="Backspace")return;let Q=K.target instanceof Element?K.target:void 0;Tze(Q)||Q&&Q!==document.body&&!u.current?.contains(Q)||(K.preventDefault(),N(f))};return window.addEventListener("keydown",W),()=>window.removeEventListener("keydown",W)},[d,M,f,w]);function R(W){let K=h6e(w,W.id),Q=dR({...W,enabled:!0,id:K});Q&&(e([...w,Q]),p(K),k(K),v(!0))}function U(W,K){let Q=w.find(de=>de.id===W);if(!Q)return;let ue=a6e(K,Q.type),Ue=ue==="metric"?Q.metric??"requests":void 0;G(W,{metric:Ue,type:ue,variant:Mh(ue)[0]?.value??Q.variant})}function E(W,K){let Q=w.find(ue=>ue.id===W);Q&&G(W,{type:K,variant:Mh(K)[0]?.value??Q.variant})}function _(W,K){let Q=w.find(Ue=>Ue.id===W);if(!Q)return;let ue=Mh(K).map(Ue=>Ue.value);G(W,{type:K,variant:ue.includes(Q.variant)?Q.variant:Mh(K)[0]?.value??Q.variant})}function B(W,K){let Q=w.find(ue=>ue.id===W);Q&&G(W,{type:K,variant:Mh(K)[0]?.value??Q.variant})}function j(){e(cm.map(W=>({...W}))),p(void 0)}let re=(0,y.jsxs)(ly,{collisionDetection:Dle,measuring:{droppable:{strategy:Sd.Always}},sensors:b,onDragCancel:pe,onDragEnd:se,onDragOver:oe,onDragStart:$,children:[(0,y.jsx)(uy,{items:C.map(W=>W.id),strategy:Wf,children:(0,y.jsx)(lk,{children:(0,y.jsxs)("section",{className:"grid auto-rows-[132px] grid-cols-1 gap-4 sm:auto-rows-[140px] sm:grid-cols-2 xl:auto-rows-[148px] xl:grid-cols-4","data-overview-widget-grid":!0,children:[C.map(W=>(0,y.jsx)(Fze,{editing:M,widget:W,onSelect:()=>p(W.id),children:(0,y.jsx)(Vze,{editing:M,selected:f===W.id,widget:W,onResize:K=>G(W.id,{size:K}),onSelect:()=>p(W.id),children:(0,y.jsx)(vfe,{providerAccounts:r,providerAccountRefreshing:o,refreshProviderAccounts:n,usageRange:i,usageStats:s,widget:W})})},W.id)),C.length===0?(0,y.jsx)("div",{className:"col-span-1 rounded-lg border border-dashed border-border bg-muted/30 px-4 py-10 text-center text-[12px] text-muted-foreground sm:col-span-2 xl:col-span-4",children:l("No widgets configured")}):null]})})}),(0,y.jsx)(v_,{adjustScale:!1,children:F?(0,y.jsx)(Bze,{providerAccounts:r,providerAccountRefreshing:o,refreshProviderAccounts:n,usageRange:i,usageStats:s,widget:F}):null})]});return(0,y.jsxs)(Qe.div,{animate:{opacity:1},className:"space-y-4",initial:{opacity:0},ref:u,transition:{duration:.15},children:[(0,y.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,y.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center gap-2",children:[(0,y.jsx)("h2",{className:"truncate text-[18px] font-semibold tracking-tight",children:l("Overview")}),(0,y.jsx)(Nze,{range:i,setRange:a})]}),(0,y.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[M?(0,y.jsxs)(ne,{onClick:j,size:"sm",type:"button",variant:"outline",children:[(0,y.jsx)(Ho,{className:"h-3.5 w-3.5"}),l("Reset layout")]}):null,(0,y.jsxs)(ne,{"aria-label":l(M?"Done":"Edit widgets"),onClick:()=>v(W=>!W),size:M?"sm":"iconSm",title:l(M?"Done":"Edit widgets"),type:"button",variant:M?"default":"outline",children:[(0,y.jsx)(No,{className:"h-3.5 w-3.5"}),M?l("Done"):null]})]})]}),M?(0,y.jsxs)("div",{className:"grid min-h-0 grid-cols-1 gap-4 xl:grid-cols-[220px_minmax(0,1fr)_260px]",children:[(0,y.jsxs)("aside",{className:"min-w-0 rounded-lg border border-border bg-card p-3 xl:sticky xl:top-4 xl:self-start",children:[(0,y.jsxs)("div",{className:"mb-3 flex items-center justify-between gap-2",children:[(0,y.jsx)("h3",{className:"truncate text-[12px] font-semibold uppercase tracking-[0.08em] text-muted-foreground",children:l("Components")}),(0,y.jsx)(gt,{variant:"outline",children:bfe().length})]}),(0,y.jsx)(Eze,{onAdd:R})]}),(0,y.jsxs)("main",{className:"min-w-0 space-y-3",children:[(0,y.jsxs)("div",{className:"flex items-center justify-between gap-2",children:[(0,y.jsx)("h3",{className:"truncate text-[12px] font-semibold uppercase tracking-[0.08em] text-muted-foreground",children:l("Preview")}),(0,y.jsx)(gt,{variant:"outline",children:C.length})]}),re]}),(0,y.jsx)("aside",{className:"min-w-0 rounded-lg border border-border bg-card p-3 xl:sticky xl:top-4 xl:self-start",children:(0,y.jsx)(_ze,{providerAccounts:r,widget:T,onChangeAccountProvider:W=>T?G(T.id,{accountProvider:W}):void 0,onChangeAnalysisData:W=>T?E(T.id,W):void 0,onChangeBreakdownData:W=>T?_(T.id,W):void 0,onChangeCategory:W=>T?U(T.id,W):void 0,onChangeMetric:W=>T?G(T.id,{metric:W}):void 0,onChangeShareData:W=>T?B(T.id,W):void 0,onChangeSize:W=>T?G(T.id,{size:W}):void 0,onChangeVariant:W=>T?G(T.id,{variant:W}):void 0,onRemove:()=>T?N(T.id):void 0})})]}):re]})}function Nze({range:e,setRange:t}){let r=ve();return(0,y.jsx)("div",{"aria-label":r("Usage over time"),className:"flex rounded-md border border-input bg-card p-0.5 shadow-sm",role:"group",children:CW.map(o=>(0,y.jsx)(ne,{className:J("h-7 rounded px-2.5 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",e===o.value&&"bg-background text-foreground shadow-sm"),onClick:()=>t(o.value),type:"button",unstyled:!0,children:r(o.label)},o.value))})}function Tze(e){return!!e?.closest("input, textarea, select, [contenteditable='true'], [contenteditable='plaintext-only'], [role='textbox']")}function Oze(e,t){if(e)return Array.from(e.querySelectorAll("[data-overview-widget-id]")).find(r=>r.dataset.overviewWidgetId===t)}function Eze({onAdd:e}){let t=ve(),r=bfe();return(0,y.jsx)("div",{className:"grid grid-cols-1 gap-2",children:r.map(o=>(0,y.jsxs)(ne,{className:"grid h-auto w-full grid-cols-[18px_minmax(0,1fr)] items-center gap-2 rounded-md border border-border bg-background px-2.5 py-2 text-left transition-colors hover:bg-muted/55 focus-visible:ring-2 focus-visible:ring-ring/25",onClick:()=>e(o),type:"button",unstyled:!0,children:[(0,y.jsx)(It,{className:"h-3.5 w-3.5 text-muted-foreground"}),(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"truncate text-[12px] font-semibold text-foreground",children:t(l6e(o))}),(0,y.jsx)("div",{className:"mt-0.5 truncate text-[10px] text-muted-foreground",children:t(u6e(o))})]})]},i6e(o)))})}function _ze({providerAccounts:e,widget:t,onChangeAccountProvider:r,onChangeAnalysisData:o,onChangeBreakdownData:n,onChangeCategory:a,onChangeMetric:i,onChangeShareData:s,onChangeSize:l,onChangeVariant:u,onRemove:d}){let c=ve();if(!t)return(0,y.jsx)("div",{className:"rounded-md border border-dashed border-border bg-muted/30 px-3 py-8 text-center text-[12px] text-muted-foreground",children:c("No widget selected")});let f=Nm(t.type),p=o6e(t,e),g=n6e(t),m=SW.filter(k=>r4(k.value,t.type,t.variant,t.accountProvider)===k.value),h=k=>{f==="account-balance"&&r(k||void 0),f==="metric"&&i(k),f==="analysis"&&o(k),f==="breakdown"&&n(k),f==="share-card"&&s(k)};return(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("h3",{className:"truncate text-[12px] font-semibold uppercase tracking-[0.08em] text-muted-foreground",children:c("Component properties")}),(0,y.jsx)("div",{className:"mt-1 truncate text-[13px] font-semibold text-foreground",children:d6e(t,c)})]}),(0,y.jsx)(xe,{label:c("Component category"),children:(0,y.jsx)(St,{onChange:k=>a(k),options:Ht(Qze(),c),value:Nm(t.type)})}),(0,y.jsx)(xe,{label:c("Data"),children:(0,y.jsx)(St,{onChange:h,options:Ht(p,c),value:g})}),(0,y.jsx)(xe,{label:c("Widget size"),children:(0,y.jsx)(St,{onChange:k=>l(k),options:Ht(m,c),value:t.size})}),(0,y.jsx)(xe,{label:c("Style"),children:(0,y.jsx)(St,{onChange:k=>u(k),options:Ht(Mh(t.type),c),value:t.variant})}),(0,y.jsxs)(ne,{className:"w-full justify-center",onClick:d,size:"sm",type:"button",variant:"outline",children:[(0,y.jsx)(ar,{className:"h-3.5 w-3.5"}),c("Remove widget")]})]})}function Fze({children:e,editing:t,onSelect:r,widget:o}){let{attributes:n,isDragging:a,listeners:i,setNodeRef:s,transform:l,transition:u}=dy({disabled:!t,id:o.id});return(0,y.jsx)(Qe.div,{className:J("min-h-0 min-w-0",c6e(o.size),t&&"cursor-grab touch-none",a&&"relative z-20 cursor-grabbing opacity-70"),"data-overview-widget-id":o.id,layout:!0,onFocus:t?r:void 0,ref:s,style:{transform:na.Transform.toString(l),transition:u},...n,...i,children:e})}function Bze({providerAccounts:e,providerAccountRefreshing:t=!1,refreshProviderAccounts:r,usageRange:o,usageStats:n,widget:a}){return(0,y.jsx)("div",{className:J("pointer-events-none overflow-hidden opacity-95 shadow-2xl",f6e(a.size)),children:(0,y.jsx)(vfe,{providerAccounts:e,providerAccountRefreshing:t,refreshProviderAccounts:r,usageRange:o,usageStats:n,widget:a})})}function Vze({children:e,editing:t,selected:r,widget:o,onResize:n,onSelect:a}){let i=ve(),s=(0,D.useRef)(null),l=()=>{t&&a()};function u(d,c){let f=s.current?.closest("[data-overview-widget-grid]"),p=Uze(f);if(!t||!p)return;c.preventDefault(),c.stopPropagation();let g=uN(o.size),m=Math.min(4,Math.max(g.width,p.columns)),h=c.clientX,k=c.clientY,M=document.body.style.cursor,v=document.body.style.userSelect,b=o.size;document.body.style.cursor=Gze(d),document.body.style.userSelect="none";let w=L=>{let C=d==="height"?0:Math.round((L.clientX-h)/p.columnStep),F=d==="width"?0:Math.round((L.clientY-k)/p.rowStep),T=ife(g.width+C,1,m),G=ife(g.height+F,1,4),$=Wze(T,G);$!==b&&(b=$,n($))},P=()=>{document.body.style.cursor=M,document.body.style.userSelect=v,window.removeEventListener("pointermove",w),window.removeEventListener("pointerup",P),window.removeEventListener("pointercancel",P)};window.addEventListener("pointermove",w),window.addEventListener("pointerup",P),window.addEventListener("pointercancel",P)}return(0,y.jsxs)("div",{"aria-selected":t?r:void 0,className:J("group/overview-widget relative h-full min-h-0 min-w-0 transition-opacity",t&&(r?"rounded-xl outline outline-2 outline-primary outline-offset-2 ring-2 ring-primary/20":"rounded-xl outline outline-2 outline-primary/35 outline-offset-2")),role:t?"group":void 0,onFocus:t?a:void 0,onPointerDownCapture:l,ref:s,children:[e,t?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(G5,{axis:"width",label:i("Resize widget width"),selected:r,onPointerDown:d=>u("width",d)}),(0,y.jsx)(G5,{axis:"height",label:i("Resize widget height"),selected:r,onPointerDown:d=>u("height",d)}),(0,y.jsx)(G5,{axis:"both",label:i("Resize widget size"),selected:r,onPointerDown:d=>u("both",d)})]}):null]})}function G5({axis:e,label:t,selected:r,onPointerDown:o}){return e==="width"?(0,y.jsx)("button",{"aria-label":t,className:"absolute -right-2 bottom-7 top-3 z-30 w-4 touch-none cursor-ew-resize rounded-full bg-transparent p-0 outline-none focus-visible:ring-2 focus-visible:ring-ring/25",onPointerDown:o,title:t,type:"button",children:(0,y.jsx)("span",{"aria-hidden":"true",className:J("absolute left-1/2 top-1/2 h-12 w-1 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/65 opacity-0 transition-opacity group-hover/overview-widget:opacity-100",r&&"opacity-100")})}):e==="height"?(0,y.jsx)("button",{"aria-label":t,className:"absolute -bottom-2 left-3 right-7 z-30 h-4 touch-none cursor-ns-resize rounded-full bg-transparent p-0 outline-none focus-visible:ring-2 focus-visible:ring-ring/25",onPointerDown:o,title:t,type:"button",children:(0,y.jsx)("span",{"aria-hidden":"true",className:J("absolute left-1/2 top-1/2 h-1 w-12 -translate-x-1/2 -translate-y-1/2 rounded-full bg-primary/65 opacity-0 transition-opacity group-hover/overview-widget:opacity-100",r&&"opacity-100")})}):(0,y.jsx)("button",{"aria-label":t,className:J("absolute -bottom-2 -right-2 z-40 h-5 w-5 touch-none cursor-nwse-resize rounded-[6px] border border-primary/70 bg-background p-0 opacity-0 shadow-sm outline-none transition-opacity focus-visible:opacity-100 focus-visible:ring-2 focus-visible:ring-ring/25 group-hover/overview-widget:opacity-100",r&&"opacity-100"),onPointerDown:o,title:t,type:"button",children:(0,y.jsx)("span",{"aria-hidden":"true",className:"absolute bottom-1 right-1 h-2.5 w-2.5 rounded-br-[3px] border-b-2 border-r-2 border-primary/70"})})}function Uze(e){if(!e)return;let t=e.getBoundingClientRect();if(t.width<=0)return;let r=window.getComputedStyle(e),o=r.gridTemplateColumns.split(" ").map(u=>u.trim()).filter(u=>u&&u!=="none"),n=Math.max(1,Math.min(4,o.length||1)),a=j5(r.columnGap),i=j5(r.rowGap),s=j5(r.gridAutoRows)||148,l=(t.width-a*(n-1))/n;return{columns:n,columnStep:Math.max(1,l+a),rowStep:Math.max(1,s+i)}}function j5(e){let t=Number.parseFloat(e);return Number.isFinite(t)?t:0}function ife(e,t,r){let o=Math.max(t,Math.min(r,e));return o>=4?4:o>=3?3:o>=2?2:1}function Wze(e,t){return`${e}:${t}`}function Gze(e){return e==="width"?"ew-resize":e==="height"?"ns-resize":"nwse-resize"}function vfe({providerAccounts:e,providerAccountRefreshing:t=!1,refreshProviderAccounts:r,usageRange:o,usageStats:n,widget:a}){let i=uN(a.size),s;return a.type==="system-status"?s=(0,y.jsx)(C6e,{usageRange:o,usageStats:n,variant:a.variant==="compact"?"compact":"timeline"}):a.type==="account-balance"?s=(0,y.jsx)(S6e,{accountProvider:a.accountProvider,accounts:e,dimensions:i,refreshing:t,variant:v6e(a.variant),onRefresh:r}):a.type==="metric"?s=(0,y.jsx)(jze,{metric:a.metric??"requests",totals:n.totals,variant:y6e(a.variant)}):a.type==="usage-trend"?s=(0,y.jsx)(qze,{dimensions:i,usageRange:o,usageStats:n,variant:x6e(a.variant)}):a.type==="token-activity"?s=(0,y.jsx)(Hze,{dimensions:i,usageStats:n}):a.type==="token-mix"?s=(0,y.jsx)(Zze,{dimensions:i,totals:n.totals,variant:dfe(a.variant)}):a.type==="model-distribution"?s=(0,y.jsx)(Xze,{dimensions:i,rows:n.models,variant:dfe(a.variant)}):a.type==="client-analysis"?s=(0,y.jsx)(lfe,{dimensions:i,kind:"client",rows:n.clientModels,variant:a.variant==="compact"?"compact":"table"}):Tm(a.type)?s=(0,y.jsx)(efe,{providerAccounts:e,type:a.type,usageRange:o,usageStats:n}):s=(0,y.jsx)(lfe,{dimensions:i,kind:"provider",rows:n.providerModels,variant:a.variant==="compact"?"compact":"table"}),(0,y.jsx)("div",{className:"h-full min-h-0 min-w-0 overflow-hidden",children:s})}function jze({metric:e,totals:t,variant:r}){let o=ve(),n=b6e(e,t,o);return r==="compact"?(0,y.jsx)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:(0,y.jsxs)(nr,{className:"flex min-h-0 flex-1 items-center justify-between gap-3 p-3",children:[(0,y.jsx)("div",{className:"min-w-0 truncate text-[12px] font-medium text-muted-foreground",children:n.label}),(0,y.jsx)("div",{className:"shrink-0 text-[18px] font-semibold tracking-tight",children:n.value})]})}):r==="bar"?(0,y.jsx)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:(0,y.jsxs)(nr,{className:"min-h-0 flex-1 p-3",children:[(0,y.jsxs)("div",{className:"flex items-end justify-between gap-3",children:[(0,y.jsx)("div",{className:"min-w-0 truncate text-[12px] font-medium text-muted-foreground",children:n.label}),(0,y.jsx)("div",{className:"shrink-0 text-[18px] font-semibold tracking-tight",children:n.value})]}),(0,y.jsx)("div",{className:"mt-3 h-2 overflow-hidden rounded-full bg-muted",children:(0,y.jsx)("div",{className:J("h-full rounded-full",fR(n.tone)),style:{width:`${Math.max(3,Math.round(n.ratio*100))}%`}})})]})}):r==="ring"?(0,y.jsx)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:(0,y.jsxs)(nr,{className:"grid min-h-0 flex-1 grid-cols-[58px_minmax(0,1fr)] items-center gap-3 p-3",children:[(0,y.jsx)(zze,{ratio:n.ratio,tone:n.tone}),(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"truncate text-[12px] font-medium text-muted-foreground",children:n.label}),(0,y.jsx)("div",{className:"truncate text-[18px] font-semibold tracking-tight",children:n.value})]})]})}):(0,y.jsx)($de,{label:n.label,tone:n.tone,value:n.value})}function zze({ratio:e,tone:t}){let o=2*Math.PI*17,n=Math.max(0,Math.min(1,e));return(0,y.jsxs)("svg",{"aria-hidden":"true",className:"h-[58px] w-[58px]",viewBox:"0 0 48 48",children:[(0,y.jsx)("circle",{cx:"24",cy:"24",fill:"none",r:17,stroke:"hsl(var(--muted))",strokeWidth:"6"}),(0,y.jsx)("circle",{cx:"24",cy:"24",fill:"none",r:17,stroke:Xle(t),strokeDasharray:o,strokeDashoffset:o*(1-n),strokeLinecap:"round",strokeWidth:"6",transform:"rotate(-90 24 24)"})]})}function qze({dimensions:e,usageRange:t,usageStats:r,variant:o}){let n=ve(),a=e.height<=1?{bottom:0,left:0,right:4,top:8}:{bottom:4,left:0,right:8,top:8};return(0,y.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,y.jsx)(Gr,{className:"shrink-0 flex-row items-center justify-between",children:(0,y.jsx)(fn,{children:n("Usage Trend")})}),(0,y.jsx)(nr,{className:"min-h-0 flex-1",children:(0,y.jsx)(q0,{fill:!0,children:({height:i,width:s})=>(0,y.jsxs)(LL,{data:r.series,height:i,margin:a,width:s,children:[(0,y.jsx)(Xp,{stroke:"#dfe3e8",strokeDasharray:"3 3",vertical:!1}),(0,y.jsx)(rm,{axisLine:!1,dataKey:"label",hide:e.height<=1,tick:{fill:"#5f6b7a",fontSize:11},tickLine:!1}),(0,y.jsx)(bc,{axisLine:!1,hide:e.width<=1,tick:{fill:"#5f6b7a",fontSize:11},tickFormatter:r0,tickLine:!1,yAxisId:"tokens"}),(0,y.jsx)(bc,{axisLine:!1,hide:!0,orientation:"right",yAxisId:"requests"}),(0,y.jsx)(dc,{content:(0,y.jsx)(c7e,{})}),o==="composed"?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(em,{dataKey:"totalTokens",fill:"#0f766e",fillOpacity:.14,name:n("Total tokens"),stroke:"#0f766e",strokeWidth:2,type:"monotone",yAxisId:"tokens"}),(0,y.jsx)(xc,{barSize:12,dataKey:"requestCount",fill:"#2563eb",name:n("Requests"),radius:[3,3,0,0],yAxisId:"requests",children:(0,y.jsx)(fc,{content:(0,y.jsx)(d7e,{}),dataKey:"requestCount"})}),(0,y.jsx)(vc,{dataKey:"cacheTokens",dot:!1,name:n("Cache tokens"),stroke:z0,strokeWidth:2,type:"monotone",yAxisId:"tokens"})]}):null,o==="area"?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(em,{dataKey:"totalTokens",fill:"#0f766e",fillOpacity:.18,name:n("Total tokens"),stroke:"#0f766e",strokeWidth:2,type:"monotone",yAxisId:"tokens"}),(0,y.jsx)(em,{dataKey:"cacheTokens",fill:z0,fillOpacity:.12,name:n("Cache tokens"),stroke:z0,strokeWidth:2,type:"monotone",yAxisId:"tokens"})]}):null,o==="line"?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(vc,{dataKey:"totalTokens",dot:!1,name:n("Total tokens"),stroke:"#0f766e",strokeWidth:2.5,type:"monotone",yAxisId:"tokens"}),(0,y.jsx)(vc,{dataKey:"cacheTokens",dot:!1,name:n("Cache tokens"),stroke:z0,strokeWidth:2,type:"monotone",yAxisId:"tokens"})]}):null,o==="bar"?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)(xc,{barSize:14,dataKey:"totalTokens",fill:"#0f766e",name:n("Total tokens"),radius:[4,4,0,0],yAxisId:"tokens"}),(0,y.jsx)(vc,{dataKey:"requestCount",dot:!1,name:n("Requests"),stroke:"#2563eb",strokeWidth:2,type:"monotone",yAxisId:"requests"})]}):null]})})})]})}function Hze({dimensions:e,usageStats:t}){let r=ve(),o=Kze(e),n=j0(t.series,{maxWeeks:o,minWeeks:o}),a=e.height>=2,i=e.height>=2&&e.width>=2;return(0,y.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,y.jsxs)(Gr,{className:"shrink-0 flex-row items-center justify-between",children:[(0,y.jsx)(fn,{children:r("Activity")}),(0,y.jsx)(gt,{variant:"outline",children:r("Tokens")})]}),(0,y.jsxs)(nr,{className:"flex min-h-0 flex-1 flex-col overflow-visible p-3",children:[a?(0,y.jsxs)("div",{className:J("mb-3 grid overflow-hidden rounded-lg border border-border bg-muted/20",e.width>=2?"grid-cols-4":"grid-cols-2"),children:[(0,y.jsx)(QR,{label:r("Longest streak"),value:We(n.longestStreak),unit:r(n.longestStreak===1?"day":"days")}),(0,y.jsx)(QR,{label:r("Avg / day"),value:We(Math.round(n.avgPerDay))}),(0,y.jsx)(QR,{label:r("Avg / week"),value:We(Math.round(n.avgPerWeek))}),(0,y.jsx)(QR,{label:r("Total"),value:We(n.totalTokens)})]}):null,(0,y.jsx)($ze,{activity:n,dimensions:e}),i?(0,y.jsxs)("div",{className:"mt-2 flex shrink-0 items-center gap-1.5 text-[11px] font-medium text-muted-foreground",children:[(0,y.jsx)("span",{children:r("Less")}),[0,1,2,3,4].map(s=>(0,y.jsx)("span",{"aria-hidden":"true",className:"h-3 w-3 rounded-[3px]",style:{backgroundColor:yfe(s,!0)}},s)),(0,y.jsx)("span",{children:r("More")})]}):null]})]})}function Kze(e){return e.height<=1?e.width>=4?72:e.width>=3?56:e.width>=2?42:28:e.width>=4?53:e.width>=3?40:e.width>=2?26:18}function QR({label:e,unit:t,value:r}){return(0,y.jsxs)("div",{className:"min-w-0 border-r border-border bg-card/60 px-3 py-2 last:border-r-0",children:[(0,y.jsx)("div",{className:"truncate text-[11px] font-medium text-muted-foreground",children:e}),(0,y.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-baseline gap-1",children:[(0,y.jsx)("span",{className:"truncate text-[17px] font-semibold tracking-tight text-foreground",children:r}),t?(0,y.jsx)("span",{className:"shrink-0 text-[11px] text-muted-foreground",children:t}):null]})]})}function $ze({activity:e,dimensions:t}){let r=ve(),o=t.width>=2,n=t.height>=2,a=[r("M"),"",r("W"),"",r("F"),"",""],i=t.height<=1?2:t.width>=3?4:3,s=o?20:0;return(0,y.jsx)("div",{className:"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",children:(0,y.jsx)("div",{className:"min-w-0 overflow-visible",children:(0,y.jsxs)("div",{className:"w-full",children:[n?(0,y.jsx)("div",{className:"mb-1 grid text-[10px] font-medium text-muted-foreground",style:{columnGap:`${i}px`,gridTemplateColumns:`repeat(${e.weekCount}, minmax(0, 1fr))`,marginLeft:`${s?s+i:0}px`},children:e.months.map(l=>(0,y.jsx)("span",{className:"truncate",style:{gridColumn:`${l.weekIndex+1} / span ${Math.min(4,e.weekCount-l.weekIndex)}`},children:l.label},`${l.label}-${l.weekIndex}`))}):null,(0,y.jsxs)("div",{className:"grid min-h-[64px]",role:"img","aria-label":`${r("Activity")} ${r("Tokens")}`,style:{gap:`${i}px`,gridTemplateColumns:`${o?`${s}px `:""}repeat(${e.weekCount}, minmax(0, 1fr))`,gridTemplateRows:"repeat(7, auto)"},children:[o?a.map((l,u)=>(0,y.jsx)("span",{className:"self-center truncate text-[10px] font-medium leading-none text-muted-foreground",style:{gridColumn:1,gridRow:u+1},children:l},`${l}-${u}`)):null,e.cells.map(l=>(0,y.jsx)("span",{"aria-label":`${l.dateLabel}: ${sfe(l.totalTokens)} ${r("tokens")}`,className:"group relative aspect-square w-full rounded-[4px]",style:{backgroundColor:yfe(l.intensity,l.inObservedRange),gridColumn:l.weekIndex+(o?2:1),gridRow:l.dayIndex+1},children:(0,y.jsxs)("span",{className:`pointer-events-none absolute z-30 hidden min-w-[112px] rounded-md border border-border/70 bg-popover px-2 py-1.5 text-left text-[11px] text-popover-foreground shadow-card-elevated group-hover:block ${Yze(l,e.weekCount)}`,children:[(0,y.jsx)("span",{className:"block font-semibold",children:l.dateLabel}),(0,y.jsxs)("span",{className:"mt-0.5 block text-muted-foreground",children:[sfe(l.totalTokens)," ",r("tokens")]})]})},l.dateKey))]})]})})})}function sfe(e){return new Intl.NumberFormat(void 0,{maximumFractionDigits:0}).format(Math.round(Math.max(0,e)))}function Yze(e,t){let r=e.dayIndex<=1?"top-full mt-1":"bottom-full mb-1";return e.weekIndex<=1?`${r} left-0`:e.weekIndex>=t-2?`${r} right-0`:`${r} left-1/2 -translate-x-1/2`}function yfe(e,t){return t?e===0?"rgba(99,102,241,.12)":e===1?"rgba(99,102,241,.30)":e===2?"rgba(99,102,241,.50)":e===3?"rgba(99,102,241,.70)":"rgba(99,102,241,.92)":"rgba(99,102,241,.06)"}function Zze({dimensions:e,totals:t,variant:r}){let o=ve(),n=[{color:"#2563eb",name:o("Input"),value:t.inputTokens},{color:"#d97706",name:o("Output"),value:t.outputTokens},{color:z0,name:o("Cache"),value:t.cacheTokens}],a=n.reduce((l,u)=>l+u.value,0),i=e.height>=2&&e.width>=2,s=e.height<=1?{bottom:2,left:0,right:8,top:2}:{bottom:8,left:8,right:12,top:8};return(0,y.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,y.jsxs)(Gr,{className:"shrink-0 flex-row items-center justify-between",children:[(0,y.jsx)(fn,{children:o("Token Mix")}),(0,y.jsx)(gt,{variant:"outline",children:We(t.totalTokens)})]}),(0,y.jsxs)(nr,{className:"min-h-0 flex-1 overflow-hidden",children:[r==="stacked"?(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsx)("div",{className:"flex h-3 overflow-hidden rounded-full bg-muted",children:n.map(l=>(0,y.jsx)("div",{style:{backgroundColor:l.color,width:`${a>0?Math.max(2,l.value/a*100):100/n.length}%`}},l.name))}),i?(0,y.jsx)(q5,{rows:n}):null]}):null,r==="donut"||r==="pie"?(0,y.jsx)(q0,{fill:!0,children:({height:l,width:u})=>(0,y.jsxs)(Vb,{height:l,width:u,children:[(0,y.jsx)(dc,{content:(0,y.jsx)(lN,{})}),(0,y.jsx)(RM,{cx:"50%",cy:"50%",data:n,dataKey:"value",innerRadius:r==="donut"?Math.min(l,u)*.22:0,nameKey:"name",outerRadius:Math.min(l,u)*.34,paddingAngle:r==="donut"?2:0,children:n.map(d=>(0,y.jsx)(Ka,{fill:d.color},d.name))})]})}):null,r==="bars"?(0,y.jsx)(q0,{fill:!0,children:({height:l,width:u})=>(0,y.jsxs)(Bb,{data:n,height:l,layout:"vertical",margin:s,width:u,children:[(0,y.jsx)(Xp,{stroke:"#dfe3e8",strokeDasharray:"3 3",horizontal:!1}),(0,y.jsx)(rm,{axisLine:!1,hide:e.height<=1,tick:{fill:"#5f6b7a",fontSize:11},tickFormatter:r0,tickLine:!1,type:"number"}),(0,y.jsx)(bc,{axisLine:!1,dataKey:"name",tick:{fill:"#5f6b7a",fontSize:11},tickLine:!1,type:"category",width:e.width<=1?42:52}),(0,y.jsx)(dc,{content:(0,y.jsx)(lN,{})}),(0,y.jsx)(xc,{dataKey:"value",radius:[0,4,4,0],children:n.map(d=>(0,y.jsx)(Ka,{fill:d.color},d.name))})]})}):null]})]})}function Xze({dimensions:e,rows:t,variant:r}){let o=ve(),n=Jze(t,o),a=n.reduce((l,u)=>l+u.value,0),i=e.height>=2&&e.width>=2,s=e.height<=1?{bottom:2,left:0,right:8,top:2}:{bottom:8,left:8,right:12,top:8};return(0,y.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,y.jsxs)(Gr,{className:"shrink-0 flex-row items-center justify-between",children:[(0,y.jsx)(fn,{children:o("Model Distribution")}),(0,y.jsx)(gt,{variant:"outline",children:We(a)})]}),(0,y.jsx)(nr,{className:"min-h-0 flex-1 overflow-hidden",children:n.length===0?(0,y.jsx)("div",{className:"flex h-full min-h-0 items-center justify-center rounded-lg border border-dashed border-border bg-muted/30 px-3 py-4 text-center text-[12px] text-muted-foreground",children:o("No model activity")}):r==="stacked"?(0,y.jsxs)("div",{className:"space-y-3",children:[(0,y.jsx)("div",{className:"flex h-3 overflow-hidden rounded-full bg-muted",children:n.map(l=>(0,y.jsx)("div",{style:{backgroundColor:l.color,width:`${a>0?Math.max(2,l.value/a*100):100/n.length}%`}},l.name))}),i?(0,y.jsx)(q5,{rows:n}):null]}):r==="donut"||r==="pie"?(0,y.jsxs)("div",{className:J("grid h-full min-h-0 items-center gap-3",i&&"grid-cols-[minmax(96px,1fr)_minmax(0,1fr)]"),children:[(0,y.jsx)(q0,{fill:!0,children:({height:l,width:u})=>(0,y.jsxs)(Vb,{height:l,width:u,children:[(0,y.jsx)(dc,{content:(0,y.jsx)(lN,{})}),(0,y.jsx)(RM,{cx:"50%",cy:"50%",data:n,dataKey:"value",innerRadius:r==="donut"?Math.min(l,u)*.22:0,nameKey:"name",outerRadius:Math.min(l,u)*.34,paddingAngle:r==="donut"?2:0,children:n.map(d=>(0,y.jsx)(Ka,{fill:d.color},d.name))})]})}),i?(0,y.jsx)(q5,{rows:n}):null]}):(0,y.jsx)(q0,{fill:!0,children:({height:l,width:u})=>(0,y.jsxs)(Bb,{data:n,height:l,layout:"vertical",margin:s,width:u,children:[(0,y.jsx)(Xp,{stroke:"#dfe3e8",strokeDasharray:"3 3",horizontal:!1}),(0,y.jsx)(rm,{axisLine:!1,hide:e.height<=1,tick:{fill:"#5f6b7a",fontSize:11},tickFormatter:r0,tickLine:!1,type:"number"}),(0,y.jsx)(bc,{axisLine:!1,dataKey:"name",tick:{fill:"#5f6b7a",fontSize:11},tickLine:!1,type:"category",width:e.width<=1?58:88}),(0,y.jsx)(dc,{content:(0,y.jsx)(lN,{})}),(0,y.jsx)(xc,{dataKey:"value",radius:[0,4,4,0],children:n.map(d=>(0,y.jsx)(Ka,{fill:d.color},d.name))})]})})})]})}function Jze(e,t){let r=["#2563eb","#0f766e","#d97706","#be123c","#7c3aed","#64748b"],o=e.filter(i=>i.totalTokens>0).sort((i,s)=>s.totalTokens-i.totalTokens),n=o.slice(0,5).map((i,s)=>({color:r[s]??"#64748b",name:i.label,value:i.totalTokens})),a=o.slice(5).reduce((i,s)=>i+s.totalTokens,0);return a>0&&n.push({color:r[5],name:t("Other"),value:a}),n}function q5({rows:e}){return(0,y.jsx)("div",{className:"grid grid-cols-1 gap-2",children:e.map(t=>(0,y.jsxs)("div",{className:"flex min-w-0 items-center gap-2 text-[12px]",children:[(0,y.jsx)("span",{className:"h-2 w-2 shrink-0 rounded-full",style:{backgroundColor:t.color}}),(0,y.jsx)("span",{className:"min-w-0 flex-1 truncate text-muted-foreground",children:t.name}),(0,y.jsx)("span",{className:"shrink-0 font-semibold",children:We(t.value)})]},t.name))})}function lfe({dimensions:e,kind:t,rows:r,variant:o}){let n=ve(),a=n(t==="client"?"Client Analysis":"Provider Analysis"),i=n(t==="client"?"No client usage yet":"No provider usage yet"),s=t==="client"?[{key:"client",label:n("Client")},{key:"model",label:n("Model")},{key:"provider",label:n("Provider")}]:[{key:"provider",label:n("Provider")},{key:"credentialId",label:n("Credential")},{key:"model",label:n("Model")}],l=xfe(e);return o==="compact"||e.width<=2||e.height<=1?(0,y.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,y.jsxs)(Gr,{className:"shrink-0 flex-row items-center justify-between",children:[(0,y.jsx)(fn,{children:a}),(0,y.jsx)(gt,{variant:"outline",children:r.length})]}),(0,y.jsx)(nr,{className:"min-h-0 flex-1 overflow-hidden",children:r.length===0?(0,y.jsx)("div",{className:"rounded-lg border border-dashed border-border bg-muted/30 px-3 py-7 text-center text-[12px] text-muted-foreground",children:i}):(0,y.jsx)("div",{className:"space-y-2",children:r.slice(0,l).map(d=>(0,y.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3 rounded-md border border-border bg-muted/20 px-3 py-2",children:[(0,y.jsx)("span",{className:"min-w-0 truncate text-[12px] font-medium",children:d.label}),(0,y.jsx)("span",{className:"shrink-0 text-[12px] font-semibold",children:We(d.totalTokens)})]},d.key))})})]}):(0,y.jsx)(u7e,{columns:s,dimensions:e,emptyLabel:i,rows:r,title:a})}function xfe(e){return e.height<=1?2:e.height===2?5:e.height===3?8:12}function bfe(){return[{enabled:!0,id:"system-status",size:"4:1",type:"system-status",variant:"timeline"},{enabled:!0,id:"account-balance",size:"4:2",type:"account-balance",variant:"cards"},{enabled:!0,id:"metric-requests",metric:"requests",size:"1:1",type:"metric",variant:"card"},{enabled:!0,id:"usage-trend",size:"3:2",type:"usage-trend",variant:"composed"},{enabled:!0,id:"token-activity",size:"4:2",type:"token-activity",variant:"heatmap"},{enabled:!0,id:"token-mix",size:"1:2",type:"token-mix",variant:"bars"},{enabled:!0,id:"client-analysis",size:"2:2",type:"client-analysis",variant:"table"},{enabled:!0,id:"share-usage-wrapped",size:"1:4",type:"share-usage-wrapped",variant:"card"},{enabled:!0,id:"share-route-map",size:"1:4",type:"share-route-map",variant:"card"},{enabled:!0,id:"share-model-leaderboard",size:"1:4",type:"share-model-leaderboard",variant:"card"},{enabled:!0,id:"share-fuel-cockpit",size:"1:4",type:"share-fuel-cockpit",variant:"card"},{enabled:!0,id:"share-token-calendar",size:"1:4",type:"share-token-calendar",variant:"card"},{enabled:!0,id:"share-spend-receipt",size:"1:4",type:"share-spend-receipt",variant:"card"}]}function Qze(){return["system-status","account-balance","metric","usage-trend","activity","breakdown","analysis","share-card"].map(e=>({label:$5(e),value:e}))}function e6e(){return[{label:"Client Analysis",value:"client-analysis"},{label:"Provider Analysis",value:"provider-analysis"}]}function t6e(){return[{label:"Token distribution",value:"token-mix"},{label:"Model distribution",value:"model-distribution"}]}function r6e(){return[{label:"AI Usage Wrapped",value:"share-usage-wrapped"},{label:"CCR Route Map",value:"share-route-map"},{label:"Model Leaderboard",value:"share-model-leaderboard"},{label:"AI Fuel Cockpit",value:"share-fuel-cockpit"},{label:"Token Calendar Poster",value:"share-token-calendar"},{label:"Spend Receipt",value:"share-spend-receipt"}]}function o6e(e,t){let r=Nm(e.type);if(r==="metric")return KL;if(r==="analysis")return e6e();if(r==="account-balance"){let o=t.filter(n=>n.provider).sort(E0).map(n=>({label:$c(n),value:Bu(n)}));return e.accountProvider&&!o.some(n=>n.value===e.accountProvider)&&o.push({label:e.accountProvider,value:e.accountProvider}),[{label:"All accounts",value:""},...o]}return r==="system-status"?[{label:"System status",value:"system-status"}]:r==="activity"?[{label:"Token activity",value:"token-activity"}]:r==="breakdown"?t6e():r==="share-card"?r6e():[{label:"Usage over time",value:"usage-trend"}]}function n6e(e){let t=Nm(e.type);return t==="metric"?e.metric??"requests":t==="analysis"||t==="breakdown"?e.type:t==="account-balance"?e.accountProvider??"":t==="activity"?"token-activity":t==="share-card"?e.type:t}function Nm(e){return e==="client-analysis"||e==="provider-analysis"?"analysis":e==="model-distribution"||e==="token-mix"?"breakdown":e==="token-activity"?"activity":Tm(e)?"share-card":e}function a6e(e,t){return e==="analysis"?t==="provider-analysis"?"provider-analysis":"client-analysis":e==="breakdown"?t==="model-distribution"?"model-distribution":"token-mix":e==="activity"?"token-activity":e==="share-card"?Tm(t)?t:"share-usage-wrapped":e}function i6e(e){return Tm(e.type)?e.type:Nm(e.type)}function $5(e){return e==="account-balance"?"Account component":e==="analysis"?"Analysis component":e==="activity"?"Activity component":e==="metric"?"Metric component":e==="share-card"?"Share card":e==="system-status"?"Status component":e==="breakdown"?"Breakdown component":"Trend component"}function s6e(e){return e==="account-balance"?"Account Balance":e==="analysis"?"Client or provider":e==="activity"?"Token activity heatmap":e==="metric"?"Requests, tokens, cost":e==="share-card"?"Social media PNG cards":e==="system-status"?"Status timeline":e==="breakdown"?"Token or model distribution":"Usage over time"}function l6e(e){return Tm(e.type)?wfe(e.type):$5(Nm(e.type))}function u6e(e){return Tm(e.type)?$5("share-card"):s6e(Nm(e.type))}function d6e(e,t){return e.type==="metric"?t(w6e(e.metric??"requests")):t(wfe(e.type))}function wfe(e){return e==="account-balance"?"Account Balance":e==="client-analysis"?"Client Analysis":e==="metric"?"Metric":e==="model-distribution"?"Model Distribution":e==="provider-analysis"?"Provider Analysis":e==="share-fuel-cockpit"?"AI Fuel Cockpit":e==="share-model-leaderboard"?"Model Leaderboard":e==="share-route-map"?"CCR Route Map":e==="share-spend-receipt"?"Spend Receipt":e==="share-token-calendar"?"Token Calendar Poster":e==="share-usage-wrapped"?"AI Usage Wrapped":e==="system-status"?"System status":e==="token-activity"?"Activity":e==="token-mix"?"Token Mix":"Usage Trend"}function Mh(e){return e==="account-balance"?[{label:"Cards",value:"cards"},{label:"Compact",value:"compact"},{label:"Bars",value:"bars"},{label:"Ring",value:"ring"},{label:"Semicircle",value:"semicircle"},{label:"Arc",value:"arc"},{label:"Nested rings",value:"nested-rings"}]:e==="metric"?[{label:"Cards",value:"card"},{label:"Compact",value:"compact"},{label:"Bar",value:"bar"},{label:"Ring",value:"ring"}]:e==="usage-trend"?[{label:"Composed",value:"composed"},{label:"Area",value:"area"},{label:"Line",value:"line"},{label:"Bar",value:"bar"}]:e==="token-activity"?[{label:"Heatmap",value:"heatmap"}]:e==="model-distribution"||e==="token-mix"?[{label:"Bars",value:"bars"},{label:"Stacked",value:"stacked"},{label:"Donut",value:"donut"},{label:"Pie",value:"pie"}]:e==="system-status"?[{label:"Timeline",value:"timeline"},{label:"Compact",value:"compact"}]:Tm(e)?[{label:"Card",value:"card"}]:[{label:"Table",value:"table"},{label:"Compact",value:"compact"}]}function Tm(e){return e==="share-fuel-cockpit"||e==="share-model-leaderboard"||e==="share-route-map"||e==="share-spend-receipt"||e==="share-token-calendar"||e==="share-usage-wrapped"}function c6e(e){let{height:t,width:r}=uN(e);return J(p6e(r),m6e(t))}function f6e(e){let{height:t,width:r}=uN(e);return J(g6e(r),k6e(t))}var z0="#6366f1";function uN(e){let[t,r]=e.split(":"),o=ufe(t);return{height:ufe(r),width:o}}function ufe(e){return e==="2"?2:e==="3"?3:e==="4"?4:1}function p6e(e){return e===1?"col-span-1":e===2?"col-span-1 sm:col-span-2":e===3?"col-span-1 sm:col-span-2 xl:col-span-3":"col-span-1 sm:col-span-2 xl:col-span-4"}function m6e(e){return e===1?"row-span-1":e===2?"row-span-2":e===3?"row-span-3":"row-span-4"}function g6e(e){return e===1?"w-[min(260px,calc(100vw-2rem))]":e===2?"w-[min(536px,calc(100vw-2rem))]":e===3?"w-[min(812px,calc(100vw-2rem))]":"w-[min(1088px,calc(100vw-2rem))]"}function k6e(e){return e===1?"h-[148px]":e===2?"h-[312px]":e===3?"h-[476px]":"h-[640px]"}function M6e(e,t){return e.length===t.length&&e.every((r,o)=>r.id===t[o]?.id)}function h6e(e,t){let r=new Set(e.map(n=>n.id));if(!r.has(t))return t;let o=2;for(;r.has(`${t}-${o}`);)o+=1;return`${t}-${o}`}function v6e(e){return e==="arc"||e==="bars"||e==="compact"||e==="nested-rings"||e==="ring"||e==="semicircle"?e:"cards"}function y6e(e){return e==="bar"||e==="compact"||e==="ring"?e:"card"}function x6e(e){return e==="area"||e==="bar"||e==="line"?e:"composed"}function dfe(e){return e==="donut"||e==="pie"||e==="stacked"?e:"bars"}function b6e(e,t,r){return e==="total-tokens"?{label:r("Total tokens"),ratio:t.totalTokens>0?1:0,tone:"teal",value:We(t.totalTokens)}:e==="input-tokens"?{label:r("Input tokens"),ratio:t.totalTokens>0?t.inputTokens/t.totalTokens:0,tone:"blue",value:We(t.inputTokens)}:e==="output-tokens"?{label:r("Output tokens"),ratio:t.totalTokens>0?t.outputTokens/t.totalTokens:0,tone:"amber",value:We(t.outputTokens)}:e==="cache-tokens"?{label:r("Cache tokens"),ratio:t.totalTokens>0?t.cacheTokens/t.totalTokens:0,tone:"indigo",value:We(t.cacheTokens)}:e==="cache-ratio"?{label:r("Cache ratio"),ratio:t.cacheRatio,tone:"indigo",value:pn(t.cacheRatio)}:e==="estimated-cost"?{label:r("Estimated cost"),ratio:Math.min(1,Math.max(0,(t.costUsd??0)/1)),tone:"slate",value:wl(t.costUsd)}:e==="success-rate"?{label:r("Success rate"),ratio:t.successRate,tone:"teal",value:pn(t.successRate)}:e==="errors"?{label:r("Errors"),ratio:t.requestCount>0?t.errorCount/t.requestCount:0,tone:"rose",value:We(t.errorCount)}:e==="avg-latency"?{label:r("Average latency"),ratio:Math.min(1,Math.max(0,t.avgDurationMs/1e4)),tone:"amber",value:en(t.avgDurationMs)}:{label:r("Requests"),ratio:t.requestCount>0?1:0,tone:"teal",value:We(t.requestCount)}}function w6e(e){return KL.find(t=>t.value===e)?.label??"Requests"}function C6e({variant:e="timeline",usageRange:t,usageStats:r}){let o=ve(),n=r.series.map(u=>({dateLabel:Zde(u.bucket,t),point:u,tone:$4(u)})),a=r.totals.requestCount>0?r.totals.successRate:0,i=$4(r.totals),s=i==="ok"?yt:Xt,l=Yde(n,t);return e==="compact"?(0,y.jsx)(or,{className:"flex h-full min-h-0 min-w-0 flex-col border-border/70 bg-card",children:(0,y.jsxs)(nr,{className:"flex min-h-0 min-w-0 flex-1 items-center justify-between gap-3 p-4",children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,y.jsx)("span",{className:J("flex h-5 w-5 shrink-0 items-center justify-center rounded-full",Y4(i)),children:(0,y.jsx)(s,{className:"h-3.5 w-3.5"})}),(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"truncate text-[13px] font-semibold",children:o("API Service")}),(0,y.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",children:l})]})]}),(0,y.jsx)(gt,{variant:i==="ok"?"success":i==="warn"?"warning":i==="error"?"danger":"outline",children:pn(a)})]})}):(0,y.jsx)(or,{className:"flex h-full min-h-0 min-w-0 flex-col border-border/70 bg-card",children:(0,y.jsxs)(nr,{className:"min-h-0 flex-1 space-y-4 overflow-hidden p-4",children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,y.jsx)("h2",{className:"truncate text-[15px] font-semibold tracking-tight",children:o("System status")}),(0,y.jsxs)("div",{className:"flex shrink-0 items-center gap-2 text-[12px] font-medium text-muted-foreground",children:[(0,y.jsx)(ol,{"aria-hidden":"true",className:"h-3.5 w-3.5 opacity-60"}),(0,y.jsx)("span",{children:l}),(0,y.jsx)(qo,{"aria-hidden":"true",className:"h-3.5 w-3.5 opacity-60"})]})]}),(0,y.jsxs)("div",{className:"space-y-2.5",children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-center justify-between gap-3",children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,y.jsx)("span",{className:J("flex h-4 w-4 shrink-0 items-center justify-center rounded-full",Y4(i)),children:(0,y.jsx)(s,{className:"h-3 w-3"})}),(0,y.jsx)("span",{className:"min-w-0 truncate text-[13px] font-semibold",children:o("API Service")})]}),(0,y.jsxs)("div",{className:"shrink-0 text-[12px] font-medium text-muted-foreground",children:[pn(a)," ",o("Availability")]})]}),(0,y.jsx)("div",{className:"flex min-w-0 gap-1","aria-label":o("System status"),children:n.map((u,d)=>(0,y.jsxs)("span",{className:"group relative flex h-5 min-w-[3px] flex-1",children:[(0,y.jsx)("span",{className:J("h-full w-full rounded-[3px]",Qde(u.tone)),"aria-label":Xde(u,o)}),(0,y.jsxs)("span",{className:J("pointer-events-none absolute bottom-full z-50 mb-2 hidden w-[190px] max-w-[calc(100vw-32px)] rounded-md border border-border/70 bg-popover px-3 py-2 text-left text-[11px] text-popover-foreground shadow-card-elevated group-hover:block",Jde(d,n.length)),children:[(0,y.jsx)("span",{className:"block font-semibold",children:u.dateLabel}),(0,y.jsxs)("span",{className:"mt-1 flex justify-between gap-3",children:[(0,y.jsx)("span",{className:"text-muted-foreground",children:o("Requests")}),(0,y.jsx)("span",{className:"font-medium",children:We(u.point.requestCount)})]}),(0,y.jsxs)("span",{className:"flex justify-between gap-3",children:[(0,y.jsx)("span",{className:"text-muted-foreground",children:o("Success rate")}),(0,y.jsx)("span",{className:"font-medium",children:pn(u.point.successRate)})]}),(0,y.jsxs)("span",{className:"flex justify-between gap-3",children:[(0,y.jsx)("span",{className:"text-muted-foreground",children:o("Failed requests")}),(0,y.jsx)("span",{className:"font-medium",children:We(u.point.errorCount)})]}),(0,y.jsxs)("span",{className:"flex justify-between gap-3",children:[(0,y.jsx)("span",{className:"text-muted-foreground",children:o("Duration")}),(0,y.jsx)("span",{className:"font-medium",children:en(u.point.avgDurationMs)})]})]})]},`${u.point.bucket}-${d}`))})]})]})})}function S6e({accountProvider:e,accounts:t,dimensions:r,onRefresh:o,refreshing:n=!1,variant:a="cards"}){let i=ve(),s=e?.trim(),l=[...t].sort(E0),u=s?l.filter(c=>j6e(c,s)).slice(0,1):l.filter(c=>c.meters.length>0||c.status==="error"),d=u.length===1;return(0,y.jsx)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:(0,y.jsx)(nr,{className:J("min-h-0 flex-1 overflow-hidden",$6e(r)),children:u.length===0?(0,y.jsx)("div",{className:"flex h-full min-h-0 items-center justify-center rounded-lg border border-dashed border-border bg-muted/30 px-3 py-4 text-center text-[12px] text-muted-foreground",children:i("No account balance connectors configured")}):d?(0,y.jsx)(P6e,{account:u[0],dimensions:r,refreshing:n,variant:a,onRefresh:o}):a==="compact"?(0,y.jsx)("div",{className:J("grid h-full min-h-0 grid-cols-1 overflow-y-auto pr-1",pfe(r),mfe(r)),children:u.map(c=>{let f=cfe(c);return(0,y.jsxs)("div",{className:"flex min-h-0 min-w-0 items-center justify-between gap-3 overflow-hidden rounded-lg border border-border bg-muted/20 px-3 py-2",children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"truncate text-[12px] font-semibold",children:$c(c)}),gfe(r)&&f?(0,y.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",children:i(f.label)}):null,aN(r)?(0,y.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",children:rN(c,i)}):null]}),(0,y.jsxs)("div",{className:"flex shrink-0 flex-col items-end gap-1 text-right",children:[iN(r)?(0,y.jsx)(tN,{account:c,refreshing:n,onRefresh:o}):null,f?(0,y.jsx)("div",{className:"text-[12px] font-semibold",children:Nn(f)}):null]})]},Bu(c))})}):a==="bars"?(0,y.jsx)("div",{className:J("h-full min-h-0 overflow-y-auto pr-1",nN(r)),children:u.map(c=>{let f=cfe(c),p=f&&cN(f)?Z4(f):void 0;return(0,y.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-end justify-between gap-3",children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"truncate text-[12px] font-semibold",children:$c(c)}),gfe(r)&&f?(0,y.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",children:i(f.label)}):null,aN(r)?(0,y.jsx)("div",{className:"truncate text-[11px] text-muted-foreground",children:rN(c,i)}):null]}),(0,y.jsxs)("div",{className:"flex shrink-0 items-center gap-2 text-[12px] font-semibold",children:[f?(0,y.jsx)("span",{children:Nn(f)}):null,iN(r)?(0,y.jsx)(tN,{account:c,refreshing:n,onRefresh:o}):null]})]}),p!==void 0?(0,y.jsx)("div",{className:"mt-1.5 h-2 overflow-hidden rounded-full bg-muted",children:(0,y.jsx)("div",{className:J("h-full rounded-full",VR(c.status)),style:{width:`${p}%`}})}):null]},Bu(c))})}):(0,y.jsx)("div",{className:J("grid h-full min-h-0 grid-cols-1 overflow-y-auto pr-1",pfe(r),mfe(r)),children:u.map(c=>(0,y.jsx)(A6e,{account:c,dimensions:r,refreshing:n,variant:a,onRefresh:o},Bu(c)))})})})}function P6e({account:e,dimensions:t,onRefresh:r,refreshing:o=!1,variant:n}){let a=ve(),i=dN(e),s=Y5(e),l=Dfe(e,Tfe(t,!0,n)),u=Nfe(n)&&i.length>0;return(0,y.jsxs)("div",{className:J("flex h-full min-h-0 min-w-0 flex-col overflow-hidden",nN(t)),children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:J("truncate font-semibold",t.height<=1?"text-[12px]":"text-[13px]"),children:$c(e)}),aN(t)?(0,y.jsx)("div",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:rN(e,a)}):null]}),iN(t)?(0,y.jsx)(tN,{account:e,refreshing:o,onRefresh:r}):null]}),u?(0,y.jsx)(Ife,{account:e,dimensions:t,meters:i,variant:n}):i.length===0&&s?(0,y.jsx)(Afe,{dimensions:t,meter:s}):l.length>0?(0,y.jsxs)("div",{className:J("min-h-0 overflow-hidden",nN(t)),children:[l.map(d=>(0,y.jsx)(Cfe,{account:e,dimensions:t,meter:d,single:!0,onRefresh:r},d.id)),Ofe(t)&&e.meters.length>l.length?(0,y.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:["+",e.meters.length-l.length]}):null]}):(0,y.jsx)("div",{className:"truncate text-[12px] text-muted-foreground",children:e.message||e.errors?.[0]?.message||a("Unavailable")})]})}function A6e({account:e,dimensions:t,onRefresh:r,refreshing:o=!1,variant:n}){let a=ve(),i=dN(e),s=Y5(e),l=Dfe(e,Tfe(t,!1,n)),u=Nfe(n)&&i.length>0;return(0,y.jsxs)("div",{className:J("min-h-0 min-w-0 overflow-hidden rounded-lg border border-border bg-muted/20",Y6e(t)),children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"truncate text-[13px] font-semibold",children:$c(e)}),aN(t)?(0,y.jsx)("div",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",children:rN(e,a)}):null]}),iN(t)?(0,y.jsx)(tN,{account:e,refreshing:o,onRefresh:r}):null]}),u?(0,y.jsx)("div",{className:"mt-2 min-h-0 overflow-hidden",children:(0,y.jsx)(Ife,{account:e,dimensions:t,meters:i,variant:n})}):i.length===0&&s?(0,y.jsx)("div",{className:"mt-2 min-h-0 overflow-hidden",children:(0,y.jsx)(Afe,{dimensions:t,meter:s,compact:!0})}):l.length>0?(0,y.jsxs)("div",{className:J("mt-2 min-h-0 overflow-hidden",nN(t)),children:[l.map(d=>(0,y.jsx)(Cfe,{account:e,dimensions:t,meter:d,onRefresh:r},d.id)),Ofe(t)&&e.meters.length>l.length?(0,y.jsxs)("div",{className:"truncate text-[10px] text-muted-foreground",children:["+",e.meters.length-l.length]}):null]}):(0,y.jsx)("div",{className:"mt-2 truncate text-[12px] text-muted-foreground",children:e.message||e.errors?.[0]?.message||a("Unavailable")})]})}function tN({account:e,onRefresh:t,refreshing:r=!1}){let o=ve(),n=o(r?"Refreshing account":"Refresh account");return(0,y.jsx)("button",{"aria-label":n,className:"m-0 inline-flex shrink-0 appearance-none items-center justify-center border-0 bg-transparent p-0 text-muted-foreground shadow-none transition-colors hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/25 disabled:cursor-not-allowed disabled:opacity-45",disabled:r||!t,title:`${n} (${e.status})`,type:"button",onClick:a=>{a.stopPropagation(),t?.()},children:r?(0,y.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,y.jsx)(Ho,{className:"h-3.5 w-3.5"})})}function rN(e,t){return`${t("Last updated")}: ${I6e(e.updatedAt)||"-"}`}function I6e(e){let t=new Date(e);if(!Number.isFinite(t.getTime()))return"";let r=t.getFullYear(),o=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),a=String(t.getHours()).padStart(2,"0"),i=String(t.getMinutes()).padStart(2,"0"),s=String(t.getSeconds()).padStart(2,"0");return`${r}-${o}-${n} ${a}:${i}:${s}`}function Cfe({account:e,dimensions:t,meter:r,onRefresh:o,single:n=!1}){let a=ve(),i=cN(r)?Z4(r):void 0,s=t.height>=2&&UR(r)&&(r.details?.length??0)>0,[l,u]=(0,D.useState)(!1),[d,c]=(0,D.useState)(),f=Im(r,a),p=`provider-account-meter-${Bu(e)}-${r.id}-details`.replace(/[^a-zA-Z0-9_-]/g,"-"),g=J("min-w-0 truncate font-medium text-muted-foreground",n&&t.height>=2?"text-[13px]":"text-[12px]"),m=J("shrink-0 font-semibold tracking-tight",n&&t.height>=2?"text-[18px]":"text-[15px]"),h=(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-center gap-1.5",children:[s?(0,y.jsx)(br,{className:"text-muted-foreground transition-colors group-hover:text-foreground",iconKey:l,children:l?(0,y.jsx)(po,{"aria-hidden":"true",className:"h-3.5 w-3.5"}):(0,y.jsx)(qo,{"aria-hidden":"true",className:"h-3.5 w-3.5"})}):null,(0,y.jsx)("div",{className:g,children:f})]}),(0,y.jsx)("div",{className:m,children:Nn(r)})]});return(0,y.jsxs)("div",{className:"min-w-0 overflow-hidden",children:[s?(0,y.jsx)("button",{"aria-controls":p,"aria-expanded":l,"aria-label":`${a(l?"Collapse":"Expand")} ${f}`,className:"group -mx-1 flex w-[calc(100%+8px)] min-w-0 items-end justify-between gap-3 rounded-md px-1 py-0.5 text-left transition-colors hover:bg-muted/45 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring/25",onClick:()=>u(k=>!k),type:"button",children:h}):(0,y.jsx)("div",{className:"flex min-w-0 items-end justify-between gap-3",children:h}),i!==void 0&&Z6e(t)?(0,y.jsx)("div",{className:J("mt-1.5 overflow-hidden rounded-full",n?"bg-muted":"bg-background",t.height<=1?"h-1.5":"h-2"),children:(0,y.jsx)("div",{className:J("h-full rounded-full",VR(e.status)),style:{width:`${i}%`}})}):null,(0,y.jsx)(wt,{initial:!1,children:s&&l?(0,y.jsx)(Ru,{children:(0,y.jsx)(D6e,{account:e,detailsId:p,meter:r,onReset:c})}):null}),(0,y.jsx)(T6e,{account:e,detail:d,open:!!d,onClose:()=>c(void 0),onResetComplete:o})]})}function D6e({account:e,detailsId:t,meter:r,onReset:o}){let n=ve(),a=r.details??[];return(0,y.jsx)("div",{className:"mt-2 max-h-48 space-y-2 overflow-y-auto pr-1",id:t,children:a.map((i,s)=>{let l=ace(i),u=Sfe(i,s,n),d=Pfe(i.status,n);return(0,y.jsxs)("div",{className:"min-w-0 rounded-md border border-border/70 bg-background/70 px-2.5 py-2 text-[10px] leading-tight text-muted-foreground",children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-start justify-between gap-3",children:[(0,y.jsx)("div",{className:"min-w-0",children:(0,y.jsx)("div",{className:"truncate text-[11px] font-medium text-foreground/80",title:u,children:u})}),(0,y.jsxs)("div",{className:"flex shrink-0 items-center gap-1.5",children:[d?(0,y.jsx)("div",{className:"rounded-full bg-muted px-1.5 py-0.5 text-[9px] tracking-wide text-muted-foreground",children:d}):null,i.redeemable?(0,y.jsx)(ne,{"aria-label":`${n("Reset")} ${u}`,className:"h-5 px-1.5 text-[10px]",onClick:c=>{c.stopPropagation(),o(i)},title:`${n("Reset")} ${u}`,type:"button",variant:"outline",children:n("Reset")}):null]})]}),(0,y.jsxs)("div",{className:"mt-1.5 flex min-w-0 items-center justify-between gap-2",children:[(0,y.jsxs)("div",{className:"truncate",children:[n("Effective"),": ",BR(i.effectiveAt)]}),(0,y.jsxs)("div",{className:"truncate text-right",children:[n("Expires"),": ",BR(i.expiresAt)]})]}),l!==void 0?(0,y.jsx)("div",{className:"mt-1.5 h-1.5 overflow-hidden rounded-full bg-muted",children:(0,y.jsx)("div",{className:J("h-full rounded-full",VR(e.status)),style:{width:`${l}%`}})}):null]},i.id??`${r.id}-${s}`)})})}function Sfe(e,t,r){return e.label?L6e(e.label,r):`#${t+1}`}function L6e(e,t){let r=e.trim(),o=/^full reset(?:\s*\(([^)]*)\))?$/i.exec(r);if(o){let n=o[1]?R6e(o[1],t):"";return n?N6e(t)?`${t("Full reset")}\uFF08${n}\uFF09`:`${t("Full reset")} (${n})`:t("Full reset")}return t(r)}function R6e(e,t){return e.replace(/\bweekly\b/gi,t("Weekly")).replace(/\bdaily\b/gi,t("Daily")).replace(/\bmonthly\b/gi,t("Monthly")).replace(/\byearly\b/gi,t("Yearly")).replace(/\bhours?\b/gi,t("hour")).replace(/\bhrs?\b/gi,t("hr")).replace(/\bminutes?\b/gi,t("minute")).replace(/\bmins?\b/gi,t("min")).replace(/\bdays?\b/gi,t("day")).replace(/\bweeks?\b/gi,t("week")).replace(/\bmonths?\b/gi,t("month")).replace(/\s*\+\s*/g," + ").trim()}function N6e(e){return e("Manual reset credit")!=="Manual reset credit"}function Pfe(e,t){let r=e?.trim().toLowerCase();return r?t(r==="available"?"Available":r==="active"?"Active":r==="expired"?"Expired":r==="used"?"Used":e??""):""}function T6e({account:e,detail:t,onClose:r,onResetComplete:o,open:n}){let a=ve(),[i,s]=(0,D.useState)("idle"),[l,u]=(0,D.useState)(""),d=t?Sfe(t,0,a):"",c=Pfe(t?.status,a);(0,D.useEffect)(()=>{n||(s("idle"),u(""))},[n,t?.id]);async function f(){if(i!=="idle"||!t?.id)return;if(!window.ccr?.resetCodexRateLimitCredit){u(a("Reset is unavailable."));return}u(""),s("launching");let p=U6e(2e3);try{await window.ccr.resetCodexRateLimitCredit({credentialId:e.credentialId,creditId:t.id,provider:e.provider}),await p,s("launched"),await o?.(),window.setTimeout(()=>{r(),s("idle")},1800)}catch(g){await p.catch(()=>{}),u(W6e(g)),s("idle")}}return(0,y.jsx)(Ft,{open:n,onOpenChange:p=>{!p&&i!=="launching"&&r()},children:(0,y.jsx)(Tt,{className:"max-w-[560px] overflow-hidden border-slate-700/60 bg-slate-950 p-0 text-white shadow-[0_24px_80px_rgba(2,6,23,0.55)]",children:(0,y.jsxs)(Ot,{className:"relative min-h-[420px] overflow-hidden p-0",children:[(0,y.jsx)("style",{children:V6e}),(0,y.jsxs)("div",{className:"pointer-events-none absolute inset-0",children:[(0,y.jsx)("div",{className:"absolute inset-0 bg-[linear-gradient(180deg,#020617_0%,#030712_48%,#07111f_100%)]"}),(0,y.jsx)("div",{className:"ccr-codex-starfield-slow absolute -inset-12 opacity-80",style:{backgroundImage:O6e,backgroundSize:"180px 180px"}}),(0,y.jsx)("div",{className:"ccr-codex-starfield-deep absolute -inset-16 opacity-55",style:{backgroundImage:E6e,backgroundSize:"320px 320px"}}),(0,y.jsx)("div",{className:"ccr-codex-nebula absolute -inset-24 opacity-75"}),F6e.map(p=>(0,y.jsx)("div",{className:"ccr-codex-space-dust absolute rounded-full bg-cyan-100/60 shadow-[0_0_12px_rgba(125,211,252,0.55)]",style:{animationDelay:`${p.delay}s`,animationDuration:`${p.duration}s`,height:p.size,left:`${p.left}%`,top:`${p.top}%`,width:p.size}},p.id)),_6e.map(p=>(0,y.jsx)("div",{className:"ccr-codex-twinkle-star absolute rounded-full bg-white shadow-[0_0_8px_rgba(255,255,255,0.75)]",style:{animationDelay:`${p.delay}s`,animationDuration:`${p.duration}s`,height:p.size,left:`${p.left}%`,top:`${p.top}%`,width:p.size}},p.id)),B6e.map(p=>(0,y.jsx)("div",{className:"ccr-codex-meteor absolute h-px w-36 rounded-full bg-gradient-to-r from-transparent via-white to-transparent shadow-[0_0_16px_rgba(255,255,255,0.95)]",style:{animationDelay:`${p.delay}s`,animationDuration:`${p.duration}s`,opacity:p.opacity,top:`${p.top}%`}},p.id))]}),(0,y.jsx)(ne,{"aria-label":a("Close"),className:"absolute right-3 top-3 z-20 text-slate-300 hover:bg-white/10 hover:text-white",disabled:i==="launching",onClick:r,size:"iconSm",title:a("Close"),type:"button",variant:"ghost",children:(0,y.jsx)(ft,{className:"h-3.5 w-3.5"})}),(0,y.jsxs)("div",{className:"absolute left-5 right-14 top-5 z-10 min-w-0 text-slate-300",children:[(0,y.jsx)("div",{className:"text-[11px] uppercase tracking-[0.16em] text-slate-500",children:a("Manual reset credit")}),(0,y.jsx)("div",{className:"mt-1 truncate text-[15px] font-semibold text-white",title:d||void 0,children:d||"-"}),(0,y.jsxs)("div",{className:"mt-1 flex min-w-0 flex-wrap items-center gap-2 text-[11px] text-slate-400",children:[(0,y.jsxs)("span",{children:[a("Expires"),": ",BR(t?.expiresAt)]}),c?(0,y.jsx)("span",{className:"rounded-full border border-white/10 px-1.5 py-0.5 text-[10px] text-slate-300",children:c}):null]})]}),(0,y.jsx)("div",{className:"relative z-10 flex min-h-[420px] flex-col items-center justify-center px-4 py-16 font-sans",children:(0,y.jsxs)("div",{className:"flex flex-col items-center",children:[(0,y.jsxs)(Qe.button,{animate:i==="launching"?{x:[-2,2,-3,3,-1,1,0],y:[-1,1,-2,2,-1,1,0]}:{},className:"group relative overflow-hidden rounded-full border border-red-400/50 bg-gradient-to-b from-orange-500 to-red-600 shadow-[0_0_40px_rgba(239,68,68,0.3)] transition-shadow duration-300 hover:shadow-[0_0_60px_rgba(239,68,68,0.6)] disabled:cursor-not-allowed",disabled:i!=="idle",onClick:()=>{f()},transition:i==="launching"?{duration:.3,repeat:1/0}:{},type:"button",whileHover:i==="idle"?{scale:1.05}:{},whileTap:i==="idle"?{scale:.95}:{},children:[(0,y.jsx)("div",{className:"relative z-10 flex w-64 items-center justify-center gap-4 px-10 py-5",children:(0,y.jsxs)(wt,{mode:"wait",children:[i==="idle"?(0,y.jsxs)(Qe.div,{animate:{opacity:1,y:0},className:"flex items-center gap-3 text-xl font-bold uppercase tracking-wider text-white",exit:{opacity:0,y:-10},initial:{opacity:0,y:10},children:[(0,y.jsx)(fp,{className:"h-6 w-6"}),(0,y.jsx)("span",{children:a("Reset")})]},"idle-text"):null,i==="launching"?(0,y.jsxs)(Qe.div,{animate:{opacity:1,y:0},className:"flex items-center gap-3 text-xl font-bold uppercase tracking-wider text-white",exit:{opacity:0,scale:.9},initial:{opacity:0,y:10},children:[(0,y.jsx)(Qe.div,{animate:{y:[0,-3,0]},transition:{duration:.2,repeat:1/0},children:(0,y.jsx)(fp,{className:"h-6 w-6 fill-white"})}),(0,y.jsx)("span",{children:a("Resetting")})]},"launching-text"):null,i==="launched"?(0,y.jsx)(Qe.div,{animate:{opacity:1},className:"flex items-center gap-3 text-xl font-bold uppercase tracking-wider text-white",exit:{opacity:0},initial:{opacity:0},children:(0,y.jsx)("span",{className:"bg-gradient-to-r from-yellow-200 to-white bg-clip-text text-transparent",children:a("Reset complete")})},"launched-text"):null]})}),(0,y.jsx)(wt,{children:i==="launching"||i==="launched"?(0,y.jsx)(Qe.div,{animate:i==="launching"?{bottom:"-20px",height:["40px","70px","50px"],opacity:[.6,1,.6],width:["50px","60px","50px"]}:{bottom:"-100px",height:"250px",opacity:0,width:"100px"},className:"pointer-events-none absolute bottom-0 left-1/2 -translate-x-1/2 translate-y-1/2 rounded-full bg-gradient-to-t from-yellow-300 via-orange-500 to-transparent blur-md",exit:{opacity:0},initial:{height:0,opacity:0,width:"40px"},transition:i==="launching"?{duration:.1,repeat:1/0}:{duration:.8,ease:"easeOut"}}):null}),(0,y.jsx)(wt,{children:i==="launched"?(0,y.jsx)(Qe.div,{animate:{opacity:0,scale:.5,y:-800},className:"pointer-events-none absolute left-1/2 top-1/2 z-20 -translate-x-1/2 -translate-y-1/2",initial:{opacity:1,scale:1.2,y:0},transition:{duration:1.5,ease:"easeIn"},children:(0,y.jsxs)("div",{className:"relative",children:[(0,y.jsx)(fp,{className:"h-10 w-10 fill-white text-white drop-shadow-[0_0_10px_rgba(255,255,255,0.8)]"}),(0,y.jsx)(Qe.div,{animate:{height:["100px","150px","120px"],opacity:[.8,1,.8]},className:"absolute left-1/2 top-full h-32 w-6 -translate-x-1/2 rounded-full bg-gradient-to-b from-yellow-200 via-orange-500 to-transparent blur-sm",transition:{duration:.1,repeat:1/0}})]})}):null})]}),(0,y.jsx)(wt,{children:i!=="idle"?(0,y.jsx)(Qe.div,{animate:i==="launching"?{opacity:1,scale:1,y:0}:{opacity:0,scale:2.5,y:50},className:"pointer-events-none absolute top-full mt-2 flex w-full justify-center",exit:{opacity:0},initial:{opacity:0,scale:.8,y:-20},transition:{duration:i==="launching"?1:1.5},children:(0,y.jsxs)("div",{className:"relative h-24 w-48",children:[(0,y.jsx)(Qe.div,{animate:{x:[-5,5,-5]},className:"absolute left-4 top-0 text-slate-300 drop-shadow-xl",transition:{duration:2,ease:"easeInOut",repeat:1/0},children:(0,y.jsx)(cp,{className:"h-20 w-20 fill-slate-300 opacity-90"})}),(0,y.jsx)(Qe.div,{animate:{x:[5,-5,5]},className:"absolute right-4 top-4 text-slate-400 drop-shadow-xl",transition:{duration:2.5,ease:"easeInOut",repeat:1/0},children:(0,y.jsx)(cp,{className:"h-24 w-24 fill-slate-400 opacity-80"})}),(0,y.jsx)(Qe.div,{animate:{y:[-3,3,-3]},className:"absolute -top-2 left-16 text-slate-200 drop-shadow-xl",transition:{duration:1.5,ease:"easeInOut",repeat:1/0},children:(0,y.jsx)(cp,{className:"h-16 w-16 fill-slate-200 opacity-95"})})]})}):null})]})}),l?(0,y.jsx)("div",{className:"absolute bottom-4 left-5 right-5 z-20 rounded-md border border-red-400/30 bg-red-950/70 px-3 py-2 text-[11px] text-red-100",children:l}):null]})})})}var O6e=["radial-gradient(circle at 12% 18%, rgba(255,255,255,0.75) 0 1px, transparent 1.4px)","radial-gradient(circle at 42% 36%, rgba(186,230,253,0.65) 0 1px, transparent 1.6px)","radial-gradient(circle at 74% 22%, rgba(255,255,255,0.6) 0 1px, transparent 1.5px)","radial-gradient(circle at 18% 72%, rgba(226,232,240,0.55) 0 1px, transparent 1.4px)","radial-gradient(circle at 88% 78%, rgba(147,197,253,0.5) 0 1px, transparent 1.6px)"].join(", "),E6e=["radial-gradient(circle at 18% 28%, rgba(255,255,255,0.5) 0 1.4px, transparent 2px)","radial-gradient(circle at 58% 16%, rgba(219,234,254,0.45) 0 1.2px, transparent 2px)","radial-gradient(circle at 78% 62%, rgba(255,255,255,0.42) 0 1.3px, transparent 2px)","radial-gradient(circle at 34% 82%, rgba(125,211,252,0.35) 0 1.2px, transparent 2px)"].join(", "),_6e=Array.from({length:76},(e,t)=>({delay:t%9*.18,duration:2+t%7*.35,id:t,left:t*37%100,opacity:.45+t%5*.11,size:`${1.2+t%4*.65}px`,top:t*53%100})),F6e=Array.from({length:26},(e,t)=>({delay:t%8*.55,duration:5.5+t%6*.75,id:t,left:t*41%100,size:`${2+t%3}px`,top:t*29%100})),B6e=Array.from({length:5},(e,t)=>({delay:1.4+t*2.8,drop:14+t%3*5,duration:5.8+t*.7,id:t,opacity:.55+t%3*.12,repeatDelay:8+t*1.4,rotate:14+t%2*6,top:12+t*15})),V6e=`
79
+ .ccr-codex-starfield-slow {
80
+ animation: ccr-codex-starfield-slow 9s linear infinite;
81
+ will-change: background-position;
82
+ }
83
+
84
+ .ccr-codex-starfield-deep {
85
+ animation: ccr-codex-starfield-deep 15s linear infinite;
86
+ will-change: background-position;
87
+ }
88
+
89
+ .ccr-codex-nebula {
90
+ background:
91
+ radial-gradient(circle at 24% 52%, rgba(239, 68, 68, 0.2), transparent 32%),
92
+ radial-gradient(circle at 70% 42%, rgba(59, 130, 246, 0.18), transparent 36%),
93
+ radial-gradient(circle at 54% 76%, rgba(20, 184, 166, 0.12), transparent 38%);
94
+ animation: ccr-codex-nebula 6s ease-in-out infinite alternate;
95
+ will-change: opacity, transform;
96
+ }
97
+
98
+ .ccr-codex-twinkle-star {
99
+ animation-name: ccr-codex-twinkle-star;
100
+ animation-timing-function: ease-in-out;
101
+ animation-iteration-count: infinite;
102
+ opacity: 0.24;
103
+ will-change: opacity, transform;
104
+ }
105
+
106
+ .ccr-codex-space-dust {
107
+ animation-name: ccr-codex-space-dust;
108
+ animation-timing-function: ease-in-out;
109
+ animation-iteration-count: infinite;
110
+ opacity: 0;
111
+ will-change: opacity, transform;
112
+ }
113
+
114
+ .ccr-codex-meteor {
115
+ left: -32%;
116
+ opacity: 0;
117
+ transform: translate3d(-160px, -40px, 0) rotate(16deg);
118
+ animation-name: ccr-codex-meteor;
119
+ animation-timing-function: linear;
120
+ animation-iteration-count: infinite;
121
+ will-change: opacity, transform;
122
+ }
123
+
124
+ @keyframes ccr-codex-starfield-slow {
125
+ from { background-position: 0 0; }
126
+ to { background-position: 180px 180px; }
127
+ }
128
+
129
+ @keyframes ccr-codex-starfield-deep {
130
+ from { background-position: 0 0; }
131
+ to { background-position: -320px 320px; }
132
+ }
133
+
134
+ @keyframes ccr-codex-nebula {
135
+ 0% { opacity: 0.42; transform: translate3d(-18px, 10px, 0) scale(1); }
136
+ 100% { opacity: 0.82; transform: translate3d(18px, -14px, 0) scale(1.08); }
137
+ }
138
+
139
+ @keyframes ccr-codex-twinkle-star {
140
+ 0%, 100% { opacity: 0.18; transform: scale(0.65); }
141
+ 45% { opacity: 0.95; transform: scale(1.8); }
142
+ 70% { opacity: 0.36; transform: scale(1.1); }
143
+ }
144
+
145
+ @keyframes ccr-codex-space-dust {
146
+ 0% { opacity: 0; transform: translate3d(-10px, 24px, 0) scale(0.7); }
147
+ 35% { opacity: 0.75; }
148
+ 100% { opacity: 0; transform: translate3d(34px, -44px, 0) scale(1.35); }
149
+ }
150
+
151
+ @keyframes ccr-codex-meteor {
152
+ 0%, 48% { opacity: 0; transform: translate3d(-180px, -72px, 0) rotate(16deg) scaleX(0.75); }
153
+ 54% { opacity: 1; }
154
+ 72% { opacity: 0.85; }
155
+ 100% { opacity: 0; transform: translate3d(860px, 210px, 0) rotate(16deg) scaleX(1.25); }
156
+ }
157
+ `;function U6e(e){return new Promise(t=>window.setTimeout(t,e))}function W6e(e){return e instanceof Error?e.message:String(e)}function Afe({compact:e=!1,dimensions:t,meter:r}){let o=ve(),n=!e&&t.height>=2;return(0,y.jsxs)("div",{className:"flex min-h-0 min-w-0 flex-col justify-center overflow-hidden",children:[(0,y.jsx)("div",{className:J("truncate font-medium text-muted-foreground",n?"text-[12px]":"text-[11px]"),children:Im(r,o)}),(0,y.jsx)("div",{className:J("truncate font-semibold tracking-tight",n?"text-[24px]":"text-[18px]"),children:Nn(r)})]})}function Ife({account:e,dimensions:t,meters:r,variant:o}){let n=ve(),a=q6e(r,o),i=t.width>=2&&t.height>=2;return a[0]?(0,y.jsxs)("div",{className:J("flex min-h-0 min-w-0 items-center overflow-hidden",i?"justify-center gap-4":"justify-center"),children:[(0,y.jsx)(G6e,{account:e,dimensions:t,meters:a,variant:o}),i?(0,y.jsx)("div",{className:"min-w-0 space-y-2",children:a.slice(0,o==="nested-rings"?2:1).map(l=>(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"truncate text-[12px] font-medium text-muted-foreground",children:Im(l,n)}),(0,y.jsx)("div",{className:"truncate text-[17px] font-semibold tracking-tight",children:Nn(l)})]},l.id))}):null]}):null}function G6e({account:e,dimensions:t,meters:r,variant:o}){let n=ve(),a=r[0],i=r[1],s=H5(a)??0,l=i?H5(i)??0:0,u=H6e(e.status),d="#2563eb",f=t.height<=1||t.width<=1?"h-[72px] w-[72px]":t.height>=3?"h-[124px] w-[124px]":"h-[104px] w-[104px]";if(o==="semicircle"||o==="arc"){let m=K6e(60,66,42,o==="semicircle"?270:225,o==="semicircle"?450:495);return(0,y.jsxs)("svg",{"aria-hidden":"true",className:f,viewBox:"0 0 120 120",children:[(0,y.jsx)("path",{d:m,fill:"none",pathLength:100,stroke:"hsl(var(--muted))",strokeLinecap:"round",strokeWidth:"11"}),(0,y.jsx)("path",{d:m,fill:"none",pathLength:100,stroke:u,strokeDasharray:`${Math.round(s*100)} 100`,strokeLinecap:"round",strokeWidth:"11"}),(0,y.jsx)("text",{className:"fill-foreground text-[18px] font-semibold",dy:"0.35em",textAnchor:"middle",x:"60",y:"60",children:Nn(a)})]})}return o==="nested-rings"&&i?(0,y.jsxs)("svg",{"aria-hidden":"true",className:f,viewBox:"0 0 120 120",children:[(0,y.jsx)(z5,{cx:60,cy:60,ratio:s,radius:44,stroke:u,strokeWidth:9}),(0,y.jsx)(z5,{cx:60,cy:60,ratio:l,radius:30,stroke:d,strokeWidth:9}),(0,y.jsx)("text",{className:"fill-foreground text-[17px] font-semibold",dy:"0.35em",textAnchor:"middle",x:"60",y:"55",children:Nn(a)}),(0,y.jsx)("text",{className:"fill-muted-foreground text-[10px] font-medium",dy:"0.35em",textAnchor:"middle",x:"60",y:"72",children:Nn(i)})]}):(0,y.jsxs)("svg",{"aria-hidden":"true",className:f,viewBox:"0 0 120 120",children:[(0,y.jsx)(z5,{cx:60,cy:60,ratio:s,radius:40,stroke:u,strokeWidth:10}),(0,y.jsx)("text",{className:"fill-foreground text-[20px] font-semibold",dy:"0.35em",textAnchor:"middle",x:"60",y:t.height>=2?"57":"60",children:Nn(a)}),t.height>=2?(0,y.jsx)("text",{className:"fill-muted-foreground text-[10px] font-medium",dy:"0.35em",textAnchor:"middle",x:"60",y:"75",children:Im(a,n)}):null]})}function z5({cx:e,cy:t,ratio:r,radius:o,stroke:n,strokeWidth:a}){let i=2*Math.PI*o,s=Math.max(0,Math.min(1,r));return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("circle",{cx:e,cy:t,fill:"none",r:o,stroke:"hsl(var(--muted))",strokeWidth:a}),(0,y.jsx)("circle",{cx:e,cy:t,fill:"none",r:o,stroke:n,strokeDasharray:i,strokeDashoffset:i*(1-s),strokeLinecap:"round",strokeWidth:a,transform:`rotate(-90 ${e} ${t})`})]})}function cfe(e){return dN(e)[0]??Y5(e)??dh(e)}function j6e(e,t){return Bu(e)===t||e.provider===t}function Y5(e){return Lfe(e)[0]}function Dfe(e,t){let r=dN(e),o=e.meters.filter(UR),n=o.length>0?Math.min(r.length,t<=2?1:2):r.length,a=[...r.slice(0,n),...o,...Lfe(e),...r.slice(n)],i=new Set,s=a.filter(l=>{let u=`${l.id}:${l.kind}:${l.window??""}`;return i.has(u)?!1:(i.add(u),!0)});return(s.length>0?s:nce(e,t)).slice(0,t)}function dN(e){return e.meters.filter(cN).sort(Rfe)}function Lfe(e){return e.meters.filter(z6e).sort((t,r)=>t.label.localeCompare(r.label))}function z6e(e){return e.kind==="balance"}function cN(e){return e.kind!=="balance"&&H5(e)!==void 0}function Rfe(e,t){return oN(e)-oN(t)||e.label.localeCompare(t.label)}function oN(e){let t=`${e.window??""} ${e.id} ${e.label}`.toLowerCase();return e.window==="5h"||t.includes("5h")||t.includes("primary")?0:e.window==="weekly"||t.includes("weekly")||t.includes("secondary")?1:e.window==="daily"?2:e.window==="monthly"?3:4}function q6e(e,t){let r=[...e].filter(cN).sort(Rfe);if(t!=="nested-rings")return r.slice(0,1);let o=r.find(i=>oN(i)===0),n=r.find(i=>oN(i)===1);return[o??r[0],n??r.find(i=>i!==(o??r[0]))].filter(i=>!!i).slice(0,2)}function H5(e){if(!(!e.limit||e.limit<=0||e.remaining===void 0))return Math.max(0,Math.min(1,e.remaining/e.limit))}function Nfe(e){return e==="arc"||e==="nested-rings"||e==="ring"||e==="semicircle"}function H6e(e){return e==="critical"||e==="error"?"#ef4444":e==="warning"?"#f59e0b":"#10b981"}function K6e(e,t,r,o,n){let a=ffe(e,t,r,n),i=ffe(e,t,r,o),s=n-o<=180?"0":"1";return`M ${a.x} ${a.y} A ${r} ${r} 0 ${s} 0 ${i.x} ${i.y}`}function ffe(e,t,r,o){let n=(o-90)*Math.PI/180;return{x:e+r*Math.cos(n),y:t+r*Math.sin(n)}}function Tfe(e,t,r){return r==="compact"||r==="bars"||e.height<=1?1:t?e.height>=4?6:e.height>=3?e.width>=2?5:3:e.width>=3?3:2:e.height>=3&&e.width>=3?3:2}function $6e(e){return e.height<=1||e.width<=1?"p-2":"p-3"}function Y6e(e){return e.height<=1||e.width<=1?"p-2":"p-3"}function pfe(e){return e.height<=1||e.width<=1?"gap-2":"gap-3"}function nN(e){return e.height<=1?"space-y-1.5":"space-y-2.5"}function mfe(e){return e.width>=3?"md:grid-cols-2 xl:grid-cols-3":e.width>=2?"md:grid-cols-2":""}function gfe(e){return e.height>=2&&e.width>=2}function aN(e){return e.height>=2&&e.width>=2}function iN(e){return e.width>=2}function Z6e(e){return e.height>=1}function Ofe(e){return e.height>=3}function Z5({agentFilter:e,error:t,loading:r,range:o,refreshAnalysis:n,selectedSession:a,setAgentFilter:i,setRange:s,setSelectedSession:l,snapshot:u}){let d=ve();return(0,y.jsxs)(Qe.div,{animate:{opacity:1},className:"flex h-full min-h-0 min-w-0 flex-col gap-4 pr-1",initial:{opacity:0},transition:{duration:.15},children:[(0,y.jsxs)("div",{className:"flex min-w-0 shrink-0 flex-wrap items-center gap-2",children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"text-[13px] font-semibold",children:d("Sessions")}),(0,y.jsxs)("div",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[We(u.sessions.length)," ",d("Sessions")," / ",We(u.scannedRequestCount)," ",d("Requests")]})]}),(0,y.jsx)("div",{className:"min-w-0 flex-1"}),(0,y.jsx)(Jo,{"aria-label":d("Filter agent"),className:"h-8 w-[160px] bg-[length:14px] px-2 pr-7 text-[12px]",onValueChange:c=>i(bW(c)),options:Ht(AW,d),value:e}),(0,y.jsx)("div",{className:"flex rounded-md border border-border bg-background p-0.5",children:PW.map(c=>(0,y.jsx)(ne,{className:J("h-7 rounded px-2.5 text-[11px] font-medium text-muted-foreground transition-colors hover:text-foreground",o===c.value&&"bg-card text-foreground shadow-sm"),onClick:()=>s(c.value),type:"button",unstyled:!0,children:d(c.label)},c.value))}),(0,y.jsxs)(ne,{"aria-label":d("Refresh observability"),className:"h-8 gap-1.5 px-2.5 text-[12px]",onClick:n,title:d("Refresh observability"),type:"button",variant:"outline",children:[(0,y.jsx)(Ho,{className:J("h-3.5 w-3.5",r&&"animate-spin")}),d("Refresh")]})]}),t?(0,y.jsxs)("div",{className:"flex shrink-0 items-start gap-2 rounded-lg border border-destructive/30 bg-destructive/5 px-3 py-2 text-[12px] text-destructive",children:[(0,y.jsx)(Xt,{className:"mt-0.5 h-3.5 w-3.5 shrink-0"}),(0,y.jsx)("span",{children:t})]}):null,a||u.selectedSession?(0,y.jsx)(X6e,{clearSession:()=>l(void 0),detail:u.selectedSession,selectedSession:a}):null,(0,y.jsx)("section",{className:"min-h-0 flex-1",children:(0,y.jsx)(l7e,{onSelectSession:l,selectedSession:a,sessions:u.sessions})})]})}function X6e({clearSession:e,detail:t,selectedSession:r}){let o=ve(),n=t?.session,a=n?`${o(n0(n.agent))} / ${Ec(n.id)}`:r?`${o(n0(r.agent))} / ${Ec(r.id)}`:o("Session");return(0,y.jsx)(Ft,{className:"items-start",onOpenChange:i=>!i&&e(),open:!0,children:(0,y.jsxs)(Tt,{className:"h-[calc(100dvh-1.5rem)] max-w-[1200px] origin-top sm:h-[min(900px,calc(100dvh-3rem))]",children:[(0,y.jsxs)(Bt,{children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)(Vt,{children:o("Trace Detail")}),(0,y.jsx)("div",{className:"mt-1 truncate font-mono text-[11px] text-muted-foreground",title:n?.id??r?.id,children:a})]}),(0,y.jsx)(ne,{"aria-label":o("Close"),onClick:e,size:"iconSm",title:o("Close"),type:"button",variant:"ghost",children:(0,y.jsx)(ft,{className:"h-3.5 w-3.5"})})]}),(0,y.jsx)(Ot,{children:t?(0,y.jsxs)("div",{className:"space-y-4",children:[(0,y.jsx)(J6e,{trace:t.trace}),(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"mb-2 flex items-center justify-between gap-2",children:(0,y.jsx)("div",{className:"text-[12px] font-semibold",children:o("Session Requests")})}),t.requests.length===0?(0,y.jsx)(sN,{label:o("No session requests")}):(0,y.jsx)("div",{className:J("max-h-[260px]",X5),children:(0,y.jsxs)("table",{className:J("min-w-[980px]",fN),children:[(0,y.jsx)("thead",{className:J5,children:(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Time")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Status")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Route")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Model")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Tools")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Tokens")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Duration")})]})}),(0,y.jsx)("tbody",{className:pN,children:t.requests.map(i=>(0,y.jsxs)("tr",{className:mN(),children:[(0,y.jsx)("td",{className:"px-3 py-2 font-mono",children:Yc(i.createdAt)}),(0,y.jsx)("td",{className:"px-3 py-2 font-semibold",children:i.statusCode||"-"}),(0,y.jsx)("td",{className:"max-w-[140px] px-3 py-2",title:hfe(i.routeReason),children:hfe(i.routeReason)}),(0,y.jsxs)("td",{className:"max-w-[300px] px-3 py-2",title:`${i.provider}/${i.model}`,children:[i.provider,"/",i.model]}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",title:i.tools.join(", "),children:We(i.toolCallCount)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(i.totalTokens)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:en(i.durationMs)})]},i.id))})]})})]})]}):(0,y.jsx)(sN,{label:o("Loading session metrics")})})]})})}var Efe="rounded-md border border-border/70 bg-card/70 shadow-[0_1px_2px_rgba(15,23,42,0.04)]",X5=J("overflow-auto",Efe),fN="w-full border-collapse text-left text-[11px]",J5="sticky top-0 z-10 border-b border-border/70 bg-muted/80 text-muted-foreground backdrop-blur",pN="divide-y divide-border/50";function mN({danger:e,selected:t}={}){return J("bg-card/40 transition-colors hover:bg-muted/30",e&&"bg-rose-500/5 hover:bg-rose-500/10",t&&"bg-teal-500/10 shadow-[inset_2px_0_0_rgba(20,184,166,0.7)] hover:bg-teal-500/15")}function J6e({trace:e}){let t=ve(),r=Math.max(e.durationMs,1),[o,n]=(0,D.useState)();return(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsxs)("div",{className:"mb-2 flex min-w-0 flex-wrap items-center justify-between gap-2",children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"text-[12px] font-semibold",children:t("Call chain")}),(0,y.jsxs)("div",{className:"mt-0.5 truncate font-mono text-[11px] text-muted-foreground",title:e.sessionId,children:[Ec(e.sessionId)," - ",Yc(e.startedAt)," -> ",Yc(e.endedAt)]})]}),(0,y.jsxs)(gt,{variant:"outline",children:[We(e.runCount)," ",t("Runs")]})]}),e.runs.length===0?(0,y.jsx)(sN,{label:t("No trace runs")}):(0,y.jsx)("div",{className:J("max-h-[420px]",X5),children:(0,y.jsxs)("table",{className:J("min-w-[1180px]",fN),children:[(0,y.jsx)("thead",{className:J5,children:(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:t("Run")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:t("Timeline")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:t("Status")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:t("Target")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:t("Tokens")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:t("Cache")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:t("Concurrency")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:t("Duration")})]})}),(0,y.jsx)("tbody",{className:pN,children:e.runs.map(a=>(0,y.jsxs)("tr",{className:mN({danger:a.status==="error"}),children:[(0,y.jsx)("td",{className:"max-w-[360px] px-3 py-2",children:(0,y.jsxs)("div",{className:"flex min-w-0 items-center gap-2",style:{paddingLeft:`${Math.min(a.depth,8)*16}px`},children:[(0,y.jsx)("span",{className:J("h-2 w-2 shrink-0 rounded-full",i7e(a))}),(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)("div",{className:"truncate font-semibold",title:a.name,children:a.name}),(0,y.jsxs)("div",{className:"mt-0.5 flex min-w-0 items-center gap-1.5 text-[10px] text-muted-foreground",children:[(0,y.jsx)("span",{className:"font-mono uppercase",children:t(Q6e(a.kind))}),a.requestId?(0,y.jsx)("span",{className:"truncate font-mono",title:a.requestId,children:Ec(a.requestId)}):null]})]})]})}),(0,y.jsx)("td",{className:"px-3 py-2",children:(0,y.jsx)("div",{className:"relative h-5 min-w-[260px] rounded bg-muted/50",children:(0,y.jsx)("div",{className:J("absolute top-1/2 h-2 -translate-y-1/2 rounded-full",s7e(a)),style:a7e(a,r),title:`${en(a.durationMs)} | +${en(a.offsetMs)}`})})}),(0,y.jsx)("td",{className:"px-3 py-2",children:(0,y.jsx)(gt,{className:J("border",a.status==="error"?"border-rose-200 bg-rose-50 text-rose-700":"border-emerald-200 bg-emerald-50 text-emerald-700"),variant:"outline",children:t(a.status==="error"?"Error":"Success")})}),(0,y.jsx)("td",{className:"max-w-[260px] px-3 py-2",title:eN(a),children:(0,y.jsx)(e7e,{run:a,onOpenTool:()=>n(a)})}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:a.totalTokens>0?We(a.totalTokens):"-"}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:a.cacheReadTokens+a.cacheWriteTokens>0?We(a.cacheReadTokens+a.cacheWriteTokens):"-"}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(a.concurrentRequests)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:en(a.durationMs)})]},a.id))})]})}),o?(0,y.jsx)(t7e,{run:o,onClose:()=>n(void 0)}):null]})}function Q6e(e){return e==="agent"?"Agent":e==="llm"?"LLM":e==="route"?"Route":e==="subagent"?"Subagent":"Tool"}function e7e({onOpenTool:e,run:t}){let r=ve();return t.kind!=="tool"?(0,y.jsx)("span",{children:eN(t)}):(0,y.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,y.jsx)("span",{className:"min-w-0 truncate",title:eN(t),children:eN(t)}),t.tool?(0,y.jsxs)(ne,{className:"h-6 shrink-0 border-border bg-transparent px-2 text-[10px] shadow-none hover:bg-transparent active:bg-transparent",onClick:e,type:"button",variant:"outline",children:[r("Parameters")," / ",r("Result")]}):null]})}function t7e({onClose:e,run:t}){let r=ve(),o=t.tool,n=o&&t.requestLogId?{callId:o.callId,part:"tool-input",requestLogId:t.requestLogId}:void 0,a=o?.resultRequestLogId?{callId:o.callId,part:"tool-result",requestLogId:o.resultRequestLogId}:void 0;return(0,y.jsx)(Ft,{className:"z-[70] items-start",onOpenChange:i=>!i&&e(),open:!0,children:(0,y.jsxs)(Tt,{className:"h-[calc(100dvh-1.5rem)] max-w-[1180px] origin-top sm:h-[min(820px,calc(100dvh-3rem))]",children:[(0,y.jsxs)(Bt,{children:[(0,y.jsxs)("div",{className:"min-w-0",children:[(0,y.jsx)(Vt,{children:t.toolName||t.name}),(0,y.jsx)("div",{className:"mt-1 truncate font-mono text-[11px] text-muted-foreground",title:o?.callId,children:o?.callId?Ec(o.callId):r("Tool")})]}),(0,y.jsx)(ne,{"aria-label":r("Close"),onClick:e,size:"iconSm",title:r("Close"),type:"button",variant:"ghost",children:(0,y.jsx)(ft,{className:"h-3.5 w-3.5"})})]}),(0,y.jsx)(Ot,{className:"overflow-hidden",children:(0,y.jsxs)("div",{className:"grid h-full min-h-0 grid-cols-1 gap-3 xl:grid-cols-2",children:[(0,y.jsx)(kfe,{fallback:o?.input,label:r("Parameters"),request:n}),(0,y.jsx)(kfe,{fallback:o?.result,label:r("Result"),request:a})]})})]})})}function kfe({fallback:e,label:t,request:r}){let o=ve(),n=r?.callId,a=r?.requestLogId,i=r?.part,[s,l]=(0,D.useState)(),[u,d]=(0,D.useState)(!!r),[c,f]=(0,D.useState)(!1);(0,D.useEffect)(()=>{let b=!1;if(l(void 0),f(!1),typeof a!="number"||!i||!window.ccr?.getAgentTracePayload)return d(!1),()=>{b=!0};d(!0);let w={callId:n,part:i,requestLogId:a};return window.ccr.getAgentTracePayload(w).then(P=>{b||(l(P),d(!1))}).catch(()=>{b||(f(!0),d(!1))}),()=>{b=!0}},[n,a,i]);let p=s?.found?s:void 0,g=p?.content??e?.preview??"",m=p?.kind??e?.kind??"empty",h=p?.sizeBytes??e?.sizeBytes??0,k=p?.sourceTruncated??e?.truncated??!1,M=!p&&!!e,v=!u&&!!r&&s!==void 0&&!s.found;return(0,y.jsxs)("section",{className:"flex min-h-0 flex-col overflow-hidden rounded-lg border border-border/60 bg-muted/20",children:[(0,y.jsxs)("div",{className:"flex min-h-11 shrink-0 flex-wrap items-center justify-between gap-2 border-b border-border/60 px-3 py-2",children:[(0,y.jsx)("div",{className:"text-[12px] font-semibold",children:t}),(0,y.jsxs)("div",{className:"flex min-w-0 flex-wrap items-center justify-end gap-1.5 text-[10px] text-muted-foreground",children:[u?(0,y.jsx)(gt,{variant:"outline",children:o("Loading")}):null,h>0?(0,y.jsx)(gt,{variant:"outline",children:km(h)}):null,M&&!u?(0,y.jsx)(gt,{variant:"outline",children:o("Preview")}):null,k?(0,y.jsx)(gt,{className:"border-amber-200 bg-amber-50 text-amber-700",variant:"outline",children:o("Source truncated")}):null,c||v?(0,y.jsx)(gt,{className:"border-rose-200 bg-rose-50 text-rose-700",variant:"outline",children:o("Full content unavailable")}):null]})]}),(0,y.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:u&&!g?(0,y.jsx)("div",{className:"px-3 py-4 text-[11px] text-muted-foreground",children:o("Loading")}):(0,y.jsx)(r7e,{content:g,kind:m})})]})}function r7e({content:e,kind:t}){let r=ve(),o=(0,D.useMemo)(()=>{if(t==="json")try{return{value:JSON.parse(e)}}catch{return}},[e,t]);return!e.trim()||t==="empty"?(0,y.jsx)("div",{className:"px-3 py-4 text-[11px] text-muted-foreground",children:r("No data")}):o?(0,y.jsx)("div",{className:"min-w-max p-3 font-mono text-[11px] leading-5",children:(0,y.jsx)(_fe,{root:!0,value:o.value})}):(0,y.jsx)("pre",{className:"min-h-full whitespace-pre-wrap break-words p-3 font-mono text-[11px] leading-5 text-foreground",children:(0,y.jsx)("code",{children:e})})}function _fe({name:e,root:t,value:r}){return Array.isArray(r)?(0,y.jsx)(Mfe,{closeToken:"]",entries:r.map((o,n)=>[String(n),o]),name:e,openToken:"[",root:t}):n7e(r)?(0,y.jsx)(Mfe,{closeToken:"}",entries:Object.entries(r),name:e,openToken:"{",root:t}):(0,y.jsxs)("div",{className:"flex min-w-0 items-start gap-1",children:[e!==void 0?(0,y.jsx)(Ffe,{name:e}):null,(0,y.jsx)(o7e,{value:r})]})}function Mfe({closeToken:e,entries:t,name:r,openToken:o,root:n}){let a=ve(),[i,s]=(0,D.useState)(!1),l=t.length===0;return(0,y.jsxs)("div",{className:J("min-w-0",!n&&"py-0.5"),children:[(0,y.jsxs)("div",{className:"flex min-w-0 items-center gap-1",children:[l?(0,y.jsx)("span",{className:"h-4 w-4 shrink-0"}):(0,y.jsx)("button",{"aria-label":a(i?"Collapse":"Expand"),className:"flex h-4 w-4 shrink-0 items-center justify-center rounded text-muted-foreground hover:bg-muted hover:text-foreground",onClick:()=>s(u=>!u),type:"button",children:i?(0,y.jsx)(po,{className:"h-3 w-3"}):(0,y.jsx)(qo,{className:"h-3 w-3"})}),r!==void 0?(0,y.jsx)(Ffe,{name:r}):null,(0,y.jsx)("span",{className:"text-muted-foreground",children:o}),i?null:(0,y.jsxs)(y.Fragment,{children:[l?null:(0,y.jsxs)("span",{className:"text-muted-foreground/70",children:[" ... ",t.length]}),(0,y.jsx)("span",{className:"text-muted-foreground",children:e})]})]}),i?(0,y.jsxs)("div",{className:"ml-4 border-l border-border/60 pl-3",children:[t.map(([u,d])=>(0,y.jsx)(_fe,{name:u,value:d},u)),(0,y.jsx)("div",{className:"text-muted-foreground",children:e})]}):null]})}function Ffe({name:e}){let t=/^\d+$/.test(e)?e:JSON.stringify(e);return(0,y.jsxs)(y.Fragment,{children:[(0,y.jsx)("span",{className:J("shrink-0",/^\d+$/.test(e)?"text-slate-500":"text-sky-700"),children:t}),(0,y.jsx)("span",{className:"text-muted-foreground",children:":"})]})}function o7e({value:e}){return e===null?(0,y.jsx)("span",{className:"text-muted-foreground",children:"null"}):typeof e=="string"?(0,y.jsx)("span",{className:"text-emerald-700",children:JSON.stringify(e)}):typeof e=="number"?(0,y.jsx)("span",{className:"text-amber-700",children:String(e)}):typeof e=="boolean"?(0,y.jsx)("span",{className:"text-violet-700",children:String(e)}):(0,y.jsx)("span",{className:"text-muted-foreground",children:String(e)})}function n7e(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}function eN(e){return e.kind==="tool"?e.toolName||e.name:e.provider&&e.model?`${e.provider}/${e.model}`:e.routeReason?e.routeReason:e.path||"-"}function a7e(e,t){let r=Math.max(0,Math.min(99.2,e.offsetMs/t*100)),o=e.durationMs/t*100,n=e.kind==="tool"?.7:1.2,a=Math.max(n,Math.min(100-r,o));return{left:`${r}%`,width:`${a}%`}}function i7e(e){return e.status==="error"?"bg-rose-500":e.kind==="agent"?"bg-teal-500":e.kind==="route"?"bg-cyan-500":e.kind==="subagent"?"bg-amber-500":e.kind==="tool"?"bg-emerald-500":"bg-blue-500"}function s7e(e){return e.status==="error"?"bg-rose-500":e.kind==="agent"?"bg-teal-500":e.kind==="route"?"bg-cyan-500":e.kind==="subagent"?"bg-amber-500":e.kind==="tool"?"bg-emerald-500":"bg-blue-500"}function hfe(e){let t=e?.trim();return t?t.toLowerCase()==="inline-model"?"none":t:"-"}function l7e({onSelectSession:e,selectedSession:t,sessions:r}){let o=ve();return(0,y.jsx)("div",{className:"flex h-full min-h-0 min-w-0 flex-col",children:r.length===0?(0,y.jsx)(sN,{label:o("No session activity")}):(0,y.jsx)("div",{className:J("h-full",X5),children:(0,y.jsxs)("table",{className:J("min-w-[1260px]",fN),children:[(0,y.jsx)("thead",{className:J5,children:(0,y.jsxs)("tr",{children:[(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Session")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Agent")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Client")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Started")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Last seen")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Duration")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Requests")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Tools")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Subagents")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Errors")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Models")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("Providers")}),(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:o("UA")}),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:o("Action")})]})}),(0,y.jsx)("tbody",{className:pN,children:r.map(n=>{let a=t?.agent===n.agent&&t.id===n.id;return(0,y.jsxs)("tr",{className:mN({selected:a}),children:[(0,y.jsx)("td",{className:"max-w-[180px] px-3 py-2",title:n.id,children:(0,y.jsx)("span",{className:"block truncate font-mono font-semibold",children:Ec(n.id)})}),(0,y.jsx)("td",{className:"px-3 py-2",children:o(n0(n.agent))}),(0,y.jsx)("td",{className:"max-w-[150px] px-3 py-2",title:n.client,children:n.client}),(0,y.jsx)("td",{className:"px-3 py-2 font-mono",children:Yc(n.startedAt)}),(0,y.jsx)("td",{className:"px-3 py-2 font-mono",children:Yc(n.lastSeenAt)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:en(n.durationMs)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(n.requestCount)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(n.toolCallCount)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(n.subagentCallCount)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(n.errorCount)}),(0,y.jsx)("td",{className:"max-w-[240px] px-3 py-2",title:n.models.join(", "),children:n.models.join(", ")||"-"}),(0,y.jsx)("td",{className:"max-w-[220px] px-3 py-2",title:n.providers.join(", "),children:n.providers.join(", ")||"-"}),(0,y.jsx)("td",{className:"max-w-[220px] px-3 py-2 font-mono",title:n.userAgent,children:wW(n.userAgent)}),(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:(0,y.jsx)(ne,{className:"h-7 border-border bg-transparent px-2 text-[11px] shadow-none hover:bg-transparent active:bg-transparent",onClick:()=>e({agent:n.agent,id:n.id}),type:"button",variant:"outline",children:o("Details")})})]},`${n.agent}:${n.id}`)})})]})})})}function sN({label:e}){return(0,y.jsx)("div",{className:"rounded-lg border border-dashed border-border bg-muted/30 px-3 py-8 text-center text-[12px] text-muted-foreground",children:e})}function u7e({columns:e,dimensions:t,emptyLabel:r,rows:o,title:n}){let a=ve(),i=t.width>=4?e:e.slice(0,1),s=o.slice(0,xfe(t)),l=t.width>=4,u=t.width>=4&&t.height>=3,d=t.width>=4&&t.height>=3;return(0,y.jsxs)(or,{className:"flex h-full min-h-0 min-w-0 flex-col",children:[(0,y.jsxs)(Gr,{className:"shrink-0 flex-row items-center justify-between",children:[(0,y.jsx)(fn,{children:n}),(0,y.jsx)(gt,{variant:"outline",children:o.length})]}),(0,y.jsx)(nr,{className:"min-h-0 flex-1 overflow-hidden",children:o.length===0?(0,y.jsx)("div",{className:"rounded-lg border border-dashed border-border bg-muted/30 px-3 py-8 text-center text-[12px] text-muted-foreground",children:r}):(0,y.jsx)("div",{className:J("h-full overflow-hidden",Efe),children:(0,y.jsxs)("table",{className:J("table-fixed",fN),children:[(0,y.jsx)("thead",{className:"border-b border-border/70 bg-muted/80 text-muted-foreground",children:(0,y.jsxs)("tr",{children:[i.map(c=>(0,y.jsx)("th",{className:"px-3 py-2 font-semibold",children:c.label},c.key)),(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:a("Tokens")}),l?(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:a("Cost")}):null,(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:a("Requests")}),u?(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:a("Input")}):null,u?(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:a("Output")}):null,u?(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:a("Cache")}):null,d?(0,y.jsx)("th",{className:"px-3 py-2 text-right font-semibold",children:a("Cache rate")}):null]})}),(0,y.jsx)("tbody",{className:pN,children:s.map(c=>(0,y.jsxs)("tr",{className:mN(),children:[i.map(f=>(0,y.jsx)("td",{className:"max-w-[180px] px-3 py-2 font-medium",children:(0,y.jsx)("span",{className:"block truncate",title:c[f.key]||"-",children:c[f.key]||"-"})},f.key)),(0,y.jsx)("td",{className:"px-3 py-2 text-right font-semibold",children:We(c.totalTokens)}),l?(0,y.jsx)("td",{className:"px-3 py-2 text-right font-semibold",children:wl(c.costUsd)}):null,(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(c.requestCount)}),u?(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(c.inputTokens)}):null,u?(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(c.outputTokens)}):null,u?(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:We(c.cacheTokens)}):null,d?(0,y.jsx)("td",{className:"px-3 py-2 text-right",children:pn(c.cacheRatio)}):null]},c.key))})]})})})]})}function d7e({payload:e,value:t,width:r,x:o,y:n}){let a=Number(t??e?.requestCount??0),i=Number(o),s=Number(n),l=Number(r);if(!e||a<=0||!Number.isFinite(i)||!Number.isFinite(s)||!Number.isFinite(l))return null;let u=`${pn(e.successRate)} / ${We(e.errorCount)}`;return(0,y.jsx)("text",{className:"fill-muted-foreground",fontSize:10,fontWeight:600,textAnchor:"middle",x:i+l/2,y:Math.max(12,s-7),children:u})}function c7e({active:e,label:t,payload:r}){let o=ve();if(!e||!r?.length)return null;let n=r.find(a=>a.payload)?.payload;return(0,y.jsxs)("div",{className:"rounded-lg border border-border/60 bg-card/95 glass-surface px-3 py-2.5 text-[11px] shadow-card-elevated",children:[(0,y.jsx)("div",{className:"mb-1 font-semibold",children:t}),(0,y.jsxs)("div",{className:"space-y-1",children:[r.map(a=>(0,y.jsxs)("div",{className:"flex min-w-[150px] items-center justify-between gap-4",children:[(0,y.jsxs)("span",{className:"flex items-center gap-1.5 text-muted-foreground",children:[(0,y.jsx)("span",{className:"h-2 w-2 rounded-full",style:{backgroundColor:a.color||"#0f766e"}}),a.name]}),(0,y.jsx)("span",{className:"font-medium",children:We(Number(a.value)||0)})]},a.name)),n?(0,y.jsxs)(y.Fragment,{children:[(0,y.jsxs)("div",{className:"flex min-w-[150px] items-center justify-between gap-4 border-t border-border/60 pt-1",children:[(0,y.jsx)("span",{className:"text-muted-foreground",children:o("Success rate")}),(0,y.jsx)("span",{className:"font-medium",children:pn(n.successRate)})]}),(0,y.jsxs)("div",{className:"flex min-w-[150px] items-center justify-between gap-4",children:[(0,y.jsx)("span",{className:"text-muted-foreground",children:o("Failed requests")}),(0,y.jsx)("span",{className:"font-medium",children:We(n.errorCount)})]}),(0,y.jsxs)("div",{className:"flex min-w-[150px] items-center justify-between gap-4",children:[(0,y.jsx)("span",{className:"text-muted-foreground",children:o("Cost")}),(0,y.jsx)("span",{className:"font-medium",children:wl(n.costUsd)})]})]}):null]})]})}function q0({children:e,fill:t=!1}){let r=(0,D.useRef)(null),[o,n]=(0,D.useState)({height:0,width:0});return(0,D.useEffect)(()=>{let a=r.current;if(!a)return;let i=(u,d)=>{let c={height:Math.max(0,Math.floor(d)),width:Math.max(0,Math.floor(u))};n(f=>f.height===c.height&&f.width===c.width?f:c)},s=a.getBoundingClientRect();i(s.width,s.height);let l=new ResizeObserver(([u])=>{u&&i(u.contentRect.width,u.contentRect.height)});return l.observe(a),()=>l.disconnect()},[]),(0,y.jsx)("div",{className:J(t?"h-full min-h-[120px]":"h-[260px]","min-w-0"),ref:r,children:o.height>0&&o.width>0?e(o):null})}function lN({active:e,label:t,payload:r}){if(!e||!r?.length)return null;let o=t||r[0]?.name||"";return(0,y.jsxs)("div",{className:"rounded-lg border border-border/60 bg-card/95 glass-surface px-3 py-2.5 text-[11px] shadow-card-elevated",children:[(0,y.jsx)("div",{className:"font-semibold",children:o}),(0,y.jsxs)("div",{className:"mt-1 text-muted-foreground",children:[We(Number(r[0]?.value)||0)," tokens"]})]})}var Wfe=z(ie());var V=z(ze()),f7e=12,Bfe=60,hh=80,p7e=160*1024,Om=new Map,Q5=[{id:"time",minWidth:150},{id:"status",minWidth:116},{id:"stream",minWidth:108},{id:"model",minWidth:180},{id:"tokens",minWidth:140},{id:"duration",minWidth:92}],m7e={id:"credential",minWidth:128};function tG({clearCaptures:e,proxyStatus:t,refreshCaptures:r,setCaptureEnabled:o,snapshot:n}){let a=ve(),[i,s]=(0,D.useState)("header"),[l,u]=(0,D.useState)("body"),[d,c]=(0,D.useState)(""),[f,p]=(0,D.useState)(),[g,m]=(0,D.useState)(48),[h,k]=(0,D.useState)(50),M=(0,D.useRef)(null),v=(0,D.useRef)(null),b=d.trim().toLowerCase(),w=(0,D.useMemo)(()=>n.items.filter(F=>mW(F,b)),[b,n.items]),P=w.find(F=>F.id===f)??w[0];(0,D.useEffect)(()=>{f&&w.some(F=>F.id===f)||p(w[0]?.id)},[w,f]);function L(F){let T=M.current;if(!T)return;F.preventDefault();let G=T.getBoundingClientRect(),$=document.body.style.cursor,oe=document.body.style.userSelect;document.body.style.cursor="row-resize",document.body.style.userSelect="none";let se=N=>{let R=(N.clientY-G.top)/G.height*100;m(Ma(R,22,78))},pe=()=>{document.body.style.cursor=$,document.body.style.userSelect=oe,window.removeEventListener("pointermove",se),window.removeEventListener("pointerup",pe),window.removeEventListener("pointercancel",pe)};window.addEventListener("pointermove",se),window.addEventListener("pointerup",pe),window.addEventListener("pointercancel",pe)}function C(F){let T=v.current;if(!T)return;F.preventDefault();let G=T.getBoundingClientRect(),$=document.body.style.cursor,oe=document.body.style.userSelect;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let se=N=>{let R=(N.clientX-G.left)/G.width*100;k(Ma(R,24,76))},pe=()=>{document.body.style.cursor=$,document.body.style.userSelect=oe,window.removeEventListener("pointermove",se),window.removeEventListener("pointerup",pe),window.removeEventListener("pointercancel",pe)};window.addEventListener("pointermove",se),window.addEventListener("pointerup",pe),window.addEventListener("pointercancel",pe)}return(0,V.jsx)(Qe.div,{animate:{opacity:1},className:"network-view min-w-0",initial:{opacity:0},transition:{duration:.15},children:(0,V.jsxs)("div",{className:"network-shell flex min-h-0 flex-col overflow-hidden rounded-lg border",children:[(0,V.jsxs)("div",{className:"network-toolbar flex h-10 min-w-0 shrink-0 items-center gap-2 border-b px-3",children:[(0,V.jsxs)("div",{className:"relative min-w-[220px] flex-1",children:[(0,V.jsx)(Jr,{className:"network-search-icon pointer-events-none absolute left-2.5 top-1/2 z-[1] h-3.5 w-3.5 -translate-y-1/2"}),(0,V.jsx)("input",{"aria-label":a("Search network captures"),className:"network-filter-input h-7 w-full rounded-md border pl-8 pr-2 text-[12px] font-semibold outline-none",onChange:F=>c(F.target.value),placeholder:a("Filter"),value:d})]}),(0,V.jsx)("span",{className:J("rounded-full px-2 py-0.5 text-[11px] font-semibold uppercase",t.state==="running"?"network-service-running":"network-service-muted"),children:a(t.state)}),(0,V.jsx)("span",{className:J("rounded-full px-2 py-0.5 text-[11px] font-semibold uppercase",n.captureEnabled?"network-service-running":"network-service-paused"),children:n.captureEnabled?a("capturing"):a("paused")}),(0,V.jsx)("span",{className:"network-count rounded-full px-2 py-0.5 text-[11px] font-semibold",children:w.length}),(0,V.jsx)("button",{"aria-label":n.captureEnabled?a("Pause network capture"):a("Resume network capture"),className:"network-control-button flex h-7 w-7 items-center justify-center rounded-md border outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onClick:()=>o(!n.captureEnabled),title:n.captureEnabled?a("Pause capture"):a("Resume capture"),type:"button",children:n.captureEnabled?(0,V.jsx)(zd,{className:"h-3.5 w-3.5"}):(0,V.jsx)(ks,{className:"h-3.5 w-3.5"})}),(0,V.jsx)("button",{"aria-label":a("Refresh network captures"),className:"network-control-button flex h-7 w-7 items-center justify-center rounded-md border outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onClick:r,title:a("Refresh"),type:"button",children:(0,V.jsx)(Ho,{className:"h-3.5 w-3.5"})}),(0,V.jsx)("button",{"aria-label":a("Clear network captures"),className:"network-control-button flex h-7 w-7 items-center justify-center rounded-md border outline-none disabled:cursor-not-allowed disabled:opacity-40 focus-visible:ring-2 focus-visible:ring-ring/30",disabled:n.items.length===0,onClick:e,title:a("Clear"),type:"button",children:(0,V.jsx)(ar,{className:"h-3.5 w-3.5"})})]}),(0,V.jsxs)("div",{className:"network-workspace flex min-h-0 flex-1 flex-col",ref:M,children:[(0,V.jsx)("div",{className:"network-table-scroll min-h-0 overflow-auto border-b",style:{flex:P?`0 0 ${g}%`:"1 1 auto"},children:(0,V.jsxs)("div",{className:"min-w-[1180px]",children:[(0,V.jsxs)("div",{className:"network-table-header sticky top-0 z-10 grid h-9 grid-cols-[34px_64px_minmax(460px,1fr)_220px_104px_116px_88px] items-center border-b text-[12px] font-semibold",children:[(0,V.jsx)(Xc,{label:""}),(0,V.jsx)(Xc,{label:"ID"}),(0,V.jsx)(Xc,{label:"URL"}),(0,V.jsx)(Xc,{label:a("Client")}),(0,V.jsx)(Xc,{label:a("Method")}),(0,V.jsx)(Xc,{label:a("Status")}),(0,V.jsx)(Xc,{label:a("Code")})]}),w.length===0?(0,V.jsxs)("div",{className:"network-empty flex h-[320px] flex-col items-center justify-center gap-2 text-center text-[12px]",children:[(0,V.jsx)(jd,{className:"network-empty-icon h-7 w-7"}),(0,V.jsx)("div",{children:n.items.length===0?n.captureEnabled?a("No network captures"):a("Network capture is paused"):a("No matching captures")}),(0,V.jsx)("div",{className:"network-empty-subtle font-mono text-[11px]",children:t.endpoint||a("Proxy not running")})]}):null,w.map((F,T)=>(0,V.jsxs)("button",{className:J("network-row grid h-9 w-full grid-cols-[34px_64px_minmax(460px,1fr)_220px_104px_116px_88px] items-center border-0 px-0 text-left text-[12px] font-semibold outline-none transition-colors",T%2===0?"network-row-even":"network-row-odd",P?.id===F.id&&"network-row-selected"),onClick:()=>p(F.id),type:"button",children:[(0,V.jsx)("div",{className:"flex justify-center",children:(0,V.jsx)(O7e,{exchange:F})}),(0,V.jsx)("div",{className:"network-row-id truncate px-2 text-right",children:gW(F,T,w.length)}),(0,V.jsx)("div",{className:"truncate px-2",title:F.url,children:F.url}),(0,V.jsx)("div",{className:"min-w-0 px-2",children:(0,V.jsx)(E7e,{client:F.client})}),(0,V.jsx)("div",{className:"network-row-secondary truncate px-2",children:F.method}),(0,V.jsx)("div",{className:"network-row-secondary truncate px-2",children:Mm(F)}),(0,V.jsx)("div",{className:"network-row-secondary truncate px-2",children:GM(F)})]},F.id))]})}),P?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("button",{"aria-label":a("Resize request list and detail panels"),className:"network-resize-handle-y shrink-0",onPointerDown:L,title:a("Resize list/detail"),type:"button"}),(0,V.jsxs)("div",{className:"network-detail flex min-h-0 flex-1 flex-col",children:[(0,V.jsxs)("div",{className:"network-detail-bar flex h-12 min-w-0 shrink-0 items-center gap-2 border-b px-3",children:[(0,V.jsx)("span",{className:"network-method-pill rounded-full px-3 py-1 text-[12px] font-bold",children:P.method}),(0,V.jsx)("span",{className:J("rounded-full px-3 py-1 text-[12px] font-bold uppercase",P.state==="pending"?"network-state-pill-active":P.state==="error"?"network-state-pill-error":"network-state-pill-completed"),children:Mm(P)}),(0,V.jsxs)("span",{className:"min-w-0 flex-1 truncate font-mono text-[13px] font-semibold",title:P.url,children:[(0,V.jsxs)("span",{className:"network-url-scheme",children:[P.protocol,"://"]}),(0,V.jsx)("span",{className:"network-url-host",children:P.host}),(0,V.jsx)("span",{className:"network-url-path",children:P.path})]})]}),(0,V.jsxs)("div",{className:"network-detail-panes flex min-h-0 flex-1",ref:v,children:[(0,V.jsx)("div",{className:"min-w-0",style:{flex:`0 0 ${h}%`},children:(0,V.jsx)(_7e,{exchange:P,selectedTab:i,setSelectedTab:s})}),(0,V.jsx)("button",{"aria-label":a("Resize request and response panels"),className:"network-resize-handle-x shrink-0",onPointerDown:C,title:a("Resize request/response"),type:"button"}),(0,V.jsx)("div",{className:"min-w-0 flex-1",children:(0,V.jsx)(F7e,{exchange:P,selectedTab:l,setSelectedTab:u})})]})]})]}):null]})]})})}function rG({error:e,filter:t,loading:r,page:o,refreshLogs:n,updateFilter:a}){let i=ve(),[s,l]=(0,D.useState)(),[u,d]=(0,D.useState)({}),[c,f]=(0,D.useState)({}),[p,g]=(0,D.useState)(),[m,h]=(0,D.useState)({}),k=(0,D.useRef)(null),M=o.total===0?0:(o.page-1)*o.pageSize+1,v=Math.min(o.total,o.page*o.pageSize),b=!!t.credential||o.options.credentials.length>0||o.items.some(Gfe),w=(0,D.useMemo)(()=>g7e(b),[b]),P=b?"grid-cols-[minmax(0,0.8fr)_minmax(92px,0.38fr)_minmax(98px,0.4fr)_minmax(0,0.78fr)_minmax(120px,0.42fr)_minmax(0,0.68fr)_82px]":"grid-cols-[minmax(0,0.8fr)_minmax(92px,0.38fr)_minmax(98px,0.4fr)_minmax(0,0.9fr)_minmax(0,0.74fr)_82px]",L=(0,D.useMemo)(()=>k7e(w,m),[m,w]),C=(0,D.useCallback)(G=>{u[G]||p===G||!window.ccr?.getRequestLogDetail||(g(G),f($=>({...$,[G]:""})),window.ccr.getRequestLogDetail({id:G}).then($=>{if($){d(oe=>({...oe,[G]:$}));return}f(oe=>({...oe,[G]:i("Request log not found.")}))}).catch($=>{f(oe=>({...oe,[G]:$ instanceof Error?$.message:String($)}))}).finally(()=>{g($=>$===G?void 0:$)}))},[u,p,i]),F=(0,D.useCallback)(G=>{l($=>{let oe=$===G?void 0:G;return oe!==void 0&&C(oe),oe})},[C]);(0,D.useEffect)(()=>{!s||o.items.some(G=>G.id===s)||l(void 0)},[s,o.items]);function T(G,$){let oe=k.current,se=w[G],pe=w[G+1];if(!oe||!se||!pe)return;$.preventDefault(),$.stopPropagation();let N={};w.forEach((Q,ue)=>{let Ue=oe.children[ue]?.getBoundingClientRect().width??Q.minWidth;N[Q.id]=Math.round(Ma(Ue,Q.minWidth,Number.MAX_SAFE_INTEGER))});let R=$.clientX,U=N[se.id]??se.minWidth,E=N[pe.id]??pe.minWidth,_=se.minWidth-U,B=E-pe.minWidth,j=document.body.style.cursor,re=document.body.style.userSelect;document.body.style.cursor="col-resize",document.body.style.userSelect="none";let W=Q=>{let ue=Ma(Q.clientX-R,_,B);h(Ue=>({...Ue,...N,[se.id]:Math.round(U+ue),[pe.id]:Math.round(E-ue)}))},K=()=>{document.body.style.cursor=j,document.body.style.userSelect=re,window.removeEventListener("pointermove",W),window.removeEventListener("pointerup",K),window.removeEventListener("pointercancel",K)};window.addEventListener("pointermove",W),window.addEventListener("pointerup",K),window.addEventListener("pointercancel",K)}return(0,V.jsx)(Qe.div,{animate:{opacity:1},className:"network-view min-w-0",initial:{opacity:0},transition:{duration:.15},children:(0,V.jsxs)("div",{className:"network-shell flex min-h-0 flex-col overflow-hidden rounded-lg border",children:[(0,V.jsxs)("div",{className:"network-toolbar flex min-h-10 min-w-0 shrink-0 flex-wrap items-center gap-2 border-b px-3 py-1.5",children:[(0,V.jsxs)("div",{className:"relative min-w-[220px] flex-1",children:[(0,V.jsx)(Jr,{className:"network-search-icon pointer-events-none absolute left-2.5 top-1/2 z-[1] h-3.5 w-3.5 -translate-y-1/2"}),(0,V.jsx)("input",{"aria-label":i("Search request logs"),className:"network-filter-input h-7 w-full rounded-md border pl-8 pr-2 text-[12px] font-semibold outline-none",onChange:G=>a({query:G.target.value}),placeholder:i("\u7B5B\u9009\u65E5\u5FD7\u3001\u6A21\u578B\u3001\u8BF7\u6C42\u6216\u54CD\u5E94"),value:t.query??""})]}),(0,V.jsx)(Jo,{"aria-label":i("Filter request log status"),className:"h-7 w-[118px] bg-[length:14px] px-2 pr-7 text-[11px]",onValueChange:G=>a({status:G}),options:Ht(LW,i),value:t.status??"all"}),(0,V.jsx)(Jo,{"aria-label":i("Filter request log provider"),className:"h-7 w-[148px] bg-[length:14px] px-2 pr-7 text-[11px]",onValueChange:G=>a({provider:G||void 0}),options:o0(i("\u5168\u90E8\u4F9B\u5E94\u5546"),o.options.providers,t.provider),value:t.provider??""}),(0,V.jsx)(Jo,{"aria-label":i("Filter request log model"),className:"h-7 w-[168px] bg-[length:14px] px-2 pr-7 text-[11px]",onValueChange:G=>a({model:G||void 0}),options:o0(i("\u5168\u90E8\u6A21\u578B"),o.options.models,t.model),value:t.model??""}),b?(0,V.jsx)(Jo,{"aria-label":i("Filter request log credential"),className:"h-7 w-[150px] bg-[length:14px] px-2 pr-7 text-[11px]",onValueChange:G=>a({credential:G||void 0}),options:o0(i("All credentials"),o.options.credentials,t.credential),value:t.credential??""}):null,(0,V.jsx)("span",{className:"network-count rounded-full px-2 py-0.5 text-[11px] font-semibold",children:o.total}),(0,V.jsx)("button",{"aria-label":i("Previous page"),className:"network-control-button flex h-7 w-7 items-center justify-center rounded-md border outline-none disabled:cursor-not-allowed disabled:opacity-40 focus-visible:ring-2 focus-visible:ring-ring/30",disabled:o.page<=1,onClick:()=>a({page:o.page-1},!1),title:i("\u4E0A\u4E00\u9875"),type:"button",children:(0,V.jsx)(ol,{className:"h-3.5 w-3.5"})}),(0,V.jsxs)("span",{className:"network-count min-w-[132px] rounded-full px-2 py-0.5 text-center text-[11px] font-semibold",children:[M,"-",v," / ",o.total]}),(0,V.jsx)("button",{"aria-label":i("Next page"),className:"network-control-button flex h-7 w-7 items-center justify-center rounded-md border outline-none disabled:cursor-not-allowed disabled:opacity-40 focus-visible:ring-2 focus-visible:ring-ring/30",disabled:o.page>=o.totalPages,onClick:()=>a({page:o.page+1},!1),title:i("\u4E0B\u4E00\u9875"),type:"button",children:(0,V.jsx)(qo,{className:"h-3.5 w-3.5"})}),(0,V.jsx)(Jo,{"aria-label":i("Request log page size"),className:"h-7 w-[92px] bg-[length:14px] px-2 pr-7 text-[11px]",onValueChange:G=>a({pageSize:Number(G)}),options:RW,value:String(o.pageSize)}),(0,V.jsx)("button",{"aria-label":i("Refresh request logs"),className:"network-control-button flex h-7 w-7 items-center justify-center rounded-md border outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onClick:n,title:i("Refresh"),type:"button",children:(0,V.jsx)(Ho,{className:J("h-3.5 w-3.5",r&&"animate-spin")})})]}),e?(0,V.jsx)("div",{className:"network-error-box mx-3 mt-3 rounded-md border px-3 py-2 text-[12px]",children:e}):null,(0,V.jsx)("div",{className:"flex min-h-0 flex-1 flex-col",children:(0,V.jsx)("div",{className:"network-table-scroll min-h-0 flex-1 overflow-auto",children:(0,V.jsxs)("div",{className:"w-full min-w-0",children:[(0,V.jsx)("div",{className:J("network-table-header sticky top-0 z-10 grid h-9 items-center border-b text-[12px] font-semibold",P),ref:k,style:L,children:w.map((G,$)=>(0,V.jsx)(Xc,{label:M7e(G.id,i),onResizeStart:$<w.length-1?oe=>T($,oe):void 0,resizeLabel:i("Resize column width")},G.id))}),o.items.length===0?(0,V.jsxs)("div",{className:"network-empty flex h-[240px] flex-col items-center justify-center gap-2 text-center text-[12px]",children:[(0,V.jsx)(ia,{className:"network-empty-icon h-7 w-7"}),(0,V.jsx)("div",{children:i(r?"\u6B63\u5728\u52A0\u8F7D\u65E5\u5FD7":"\u6682\u65E0\u65E5\u5FD7")})]}):null,o.items.map((G,$)=>(0,V.jsx)(h7e,{detailError:c[G.id],detailLoading:p===G.id,expanded:s===G.id,hasCredentialInfo:b,index:$,item:s===G.id?u[G.id]??G:G,logTableGridClass:P,logTableGridStyle:L,onToggle:F},G.id))]})})})]})})}function g7e(e){return e?[...Q5.slice(0,4),m7e,...Q5.slice(4)]:Q5}function k7e(e,t){let r=e.map(o=>t[o.id]);if(!r.some(o=>typeof o!="number"))return{gridTemplateColumns:e.map((o,n)=>{let a=Math.max(o.minWidth,Math.round(r[n]??o.minWidth));return`minmax(${o.minWidth}px, ${a}fr)`}).join(" "),minWidth:`${e.reduce((o,n)=>o+n.minWidth,0)}px`}}function M7e(e,t){switch(e){case"time":return t("\u65F6\u95F4");case"status":return t("\u72B6\u6001");case"stream":return t("Stream");case"model":return t("\u6A21\u578B");case"credential":return t("Credential");case"tokens":return t("\u4EE4\u724C");case"duration":return t("\u6301\u7EED\u65F6\u95F4")}}var h7e=(0,Wfe.memo)(function({detailError:t,detailLoading:r,expanded:o,hasCredentialInfo:n,index:a,item:i,logTableGridClass:s,logTableGridStyle:l,onToggle:u}){let d=ve(),c=cW(),f=(0,D.useMemo)(()=>Yc(i.createdAt),[i.createdAt]),p=(0,D.useMemo)(()=>uce(i,d,c),[i,c,d]);return(0,V.jsxs)("div",{children:[(0,V.jsxs)("button",{"aria-expanded":o,className:J("network-row grid h-10 w-full items-center border-0 px-0 text-left text-[12px] font-semibold outline-none transition-colors",s,a%2===0?"network-row-even":"network-row-odd",o&&"network-row-selected"),onClick:()=>u(i.id),style:l,type:"button",children:[(0,V.jsx)("div",{className:"truncate px-3 font-mono text-[11px]",title:f,children:f}),(0,V.jsxs)("div",{className:"flex min-w-0 items-center gap-2 px-2",children:[(0,V.jsx)(po,{className:J("h-3.5 w-3.5 shrink-0 transition-transform",o&&"rotate-180")}),(0,V.jsx)(C7e,{entry:i}),(0,V.jsx)("span",{className:"network-row-secondary truncate",children:i.statusCode||"-"}),i.retryAttempts.length>0?(0,V.jsxs)("span",{className:"network-service-paused shrink-0 rounded px-1.5 py-0.5 text-[10px] font-bold",title:`${d("Retry attempts")}: ${i.retryAttempts.length}`,children:["R",i.retryAttempts.length]}):null]}),(0,V.jsx)(S7e,{entry:i}),(0,V.jsx)(x7e,{entry:i}),n?(0,V.jsx)(b7e,{entry:i}):null,(0,V.jsx)("div",{className:"network-row-secondary truncate px-2",title:p,children:p}),(0,V.jsx)("div",{className:"network-row-secondary truncate px-2",children:en(i.durationMs)})]}),o?(0,V.jsx)(v7e,{detailError:t,detailLoading:r,entry:i}):null]})});function v7e({detailError:e,detailLoading:t,entry:r}){let o=ve(),n=cW(),a=Gfe(r);return(0,V.jsxs)("div",{className:"network-detail border-b",children:[(0,V.jsxs)("div",{className:"network-detail-bar flex min-h-10 min-w-0 items-center gap-2 border-b px-3 py-1.5",children:[(0,V.jsxs)("span",{className:J("rounded-full px-3 py-1 text-[12px] font-bold uppercase",r.ok?"network-state-pill-completed":"network-state-pill-error"),children:["HTTP ",r.statusCode||"-"]}),(0,V.jsxs)("span",{className:"min-w-0 flex-1 truncate font-mono text-[12px] font-semibold",title:r.url,children:[r.method," ",r.path]})]}),(0,V.jsxs)("div",{className:J("network-body-meta grid grid-cols-2 gap-y-2 border-b px-3 py-2 text-[12px] sm:grid-cols-4",a?"lg:grid-cols-12":"lg:grid-cols-9"),children:[(0,V.jsx)(ti,{label:o("\u6301\u7EED\u65F6\u95F4"),value:en(r.durationMs)}),(0,V.jsx)(ti,{label:o("Stream"),value:r.isStream?o("Streaming"):o("Non-streaming")}),r.credentialId?(0,V.jsx)(ti,{label:o("Credential"),value:r.credentialId}):null,r.credentialChain.length?(0,V.jsx)(ti,{label:o("Credential chain"),value:r.credentialChain.join(" > ")}):null,a?(0,V.jsx)(ti,{label:o("Credential saturated"),value:r.credentialSaturated?o("Yes"):o("No")}):null,r.retryAttempts.length>0?(0,V.jsx)(ti,{label:o("Retry attempts"),value:String(r.retryAttempts.length)}):null,(0,V.jsx)(ti,{label:o("\u8F93\u5165"),value:We(r.inputTokens,n)}),(0,V.jsx)(ti,{label:o("\u8F93\u51FA"),value:We(r.outputTokens,n)}),(0,V.jsx)(ti,{label:o("Thinking"),value:We(r.reasoningTokens,n)}),(0,V.jsx)(ti,{label:o("\u7F13\u5B58\u8BFB\u53D6"),value:We(r.cacheReadTokens,n)}),(0,V.jsx)(ti,{label:o("\u7F13\u5B58\u5199\u5165"),value:We(r.cacheWriteTokens,n)}),(0,V.jsx)(ti,{label:o("\u603B\u8BA1"),value:We(r.totalTokens,n)}),(0,V.jsx)(ti,{label:o("Cost"),value:wl(r.costUsd??0)})]}),r.retryAttempts.length>0?(0,V.jsx)(y7e,{attempts:r.retryAttempts}):null,t||e?(0,V.jsx)("div",{className:J("border-b px-3 py-2 text-[12px] font-semibold",e?"network-error-box":"network-body-meta"),children:e||o("Loading full payload...")}):null,(0,V.jsxs)("div",{className:"network-detail-panes grid h-[440px] min-h-0 grid-cols-1 lg:grid-cols-2",children:[(0,V.jsx)(Vfe,{body:r.requestBody,headerEmptyLabel:"No request headers",headers:r.requestHeaders,title:o("\u8BF7\u6C42")}),(0,V.jsx)(Vfe,{body:r.responseBody,className:"border-t lg:border-l lg:border-t-0",headerEmptyLabel:"No response headers",headers:r.responseHeaders,subtitle:`HTTP ${r.statusCode||"-"}`,title:o("\u54CD\u5E94")})]})]})}function y7e({attempts:e}){let t=ve();return(0,V.jsxs)("div",{className:"network-body-meta border-b px-3 py-2 text-[12px]",children:[(0,V.jsxs)("div",{className:"mb-2 flex min-w-0 items-center justify-between gap-3",children:[(0,V.jsx)("div",{className:"min-w-0 truncate font-semibold",children:t("Retry attempts")}),(0,V.jsx)("div",{className:"network-muted shrink-0 font-mono text-[11px]",children:e.length})]}),(0,V.jsxs)("div",{className:"overflow-x-auto rounded border border-[color:var(--network-border)]",children:[(0,V.jsxs)("div",{className:"network-kv-header grid min-w-[520px] grid-cols-[96px_1fr_140px_120px] border-b text-[11px] font-bold",children:[(0,V.jsx)("div",{className:"border-r border-[color:var(--network-border-strong)] px-3 py-2",children:t("Attempt")}),(0,V.jsx)("div",{className:"border-r border-[color:var(--network-border-strong)] px-3 py-2",children:t("Result")}),(0,V.jsx)("div",{className:"border-r border-[color:var(--network-border-strong)] px-3 py-2",children:t("Next retry wait")}),(0,V.jsx)("div",{className:"px-3 py-2",children:t("Type")})]}),e.map((r,o)=>(0,V.jsxs)("div",{className:J("network-kv-row grid min-w-[520px] grid-cols-[96px_1fr_140px_120px] text-[11px] font-semibold",o%2===0?"network-kv-row-even":"network-kv-row-odd"),children:[(0,V.jsxs)("div",{className:"border-r border-[color:var(--network-border-strong)] px-3 py-2 font-mono",children:["#",r.attempt]}),(0,V.jsx)("div",{className:"border-r border-[color:var(--network-border-strong)] px-3 py-2 font-mono",children:r.status??"-"}),(0,V.jsx)("div",{className:"border-r border-[color:var(--network-border-strong)] px-3 py-2 font-mono",children:r.final?"-":en(r.delayMs)}),(0,V.jsx)("div",{className:"px-3 py-2",children:r.final?t("Final attempt"):t("Retry")})]},`${r.attempt}-${r.final?"final":"retry"}`))]})]})}function ti({label:e,value:t}){return(0,V.jsxs)("div",{className:"min-w-0",children:[(0,V.jsx)("div",{className:"network-muted truncate text-[11px]",children:e}),(0,V.jsx)("div",{className:"truncate font-mono text-[12px] font-semibold",children:t})]})}function x7e({entry:e}){let t=dce(e),r=cce(e),o=`${t} -> ${r}`;return(0,V.jsxs)("div",{className:"flex min-w-0 items-center px-2",title:o,children:[(0,V.jsx)("span",{className:"min-w-0 max-w-[45%] truncate",children:t}),(0,V.jsx)(kk,{className:"mx-1 h-3.5 w-3.5 shrink-0 text-muted-foreground","aria-hidden":"true"}),(0,V.jsx)("span",{className:"min-w-0 max-w-[45%] truncate",children:r})]})}function b7e({entry:e}){let t=w7e(e),r=e.credentialChain.length?e.credentialChain.join(" > "):t;return(0,V.jsx)("div",{className:"network-row-secondary truncate px-2",title:r,children:t})}function Gfe(e){return!!(e.credentialId||e.credentialChain.length>0||e.credentialSaturated)}function w7e(e){return e.credentialId||e.credentialChain[0]||(e.credentialSaturated?"saturated":"-")}function C7e({entry:e}){return(0,V.jsx)("span",{className:J("h-3 w-3 shrink-0 rounded-full",e.ok?"network-dot-completed":"network-dot-error")})}function S7e({entry:e}){let t=ve(),r=e.isStream?t("Streaming"):t("Non-streaming");return(0,V.jsx)("div",{className:"network-row-secondary truncate px-2",title:r,children:r})}function Vfe({body:e,className:t,headerEmptyLabel:r="No values",headers:o,subtitle:n,title:a}){let i=ve(),[s,l]=(0,D.useState)("body"),[u,d]=(0,D.useState)(!1),[c,f]=(0,D.useState)(!1),[p,g]=(0,D.useState)(""),m=A7e(e),h=(0,D.useMemo)(()=>I7e(m,e),[m]),k=h.text,M=(0,D.useMemo)(()=>mce(k,p),[k,p]),v=(0,D.useMemo)(()=>Qb(o??{}),[o]),[b,w]=(0,D.useState)(()=>Ufe(h)),P=h.json!==void 0&&p.trim()===""&&!u;(0,D.useEffect)(()=>{w(Ufe(h)),d(!1)},[m]),(0,D.useEffect)(()=>{if(!c)return;let C=F=>{F.key==="Escape"&&f(!1)};return window.addEventListener("keydown",C),()=>window.removeEventListener("keydown",C)},[c]);function L(C){w(F=>{let T=new Set(F);return T.has(C)?T.delete(C):T.add(C),T})}return(0,V.jsxs)("div",{className:J("network-pane-split flex min-h-0 min-w-0 flex-col",t),children:[(0,V.jsxs)("div",{className:"network-pane-header flex h-10 min-w-0 shrink-0 items-center gap-3 border-b px-3",children:[(0,V.jsx)("span",{className:"network-pane-title shrink-0 text-[14px] font-bold",children:a}),n?(0,V.jsx)("span",{className:"network-muted shrink-0 text-[12px] font-semibold",children:n}):null,(0,V.jsx)("div",{className:"flex min-w-0 items-center gap-3",children:["body","header"].map(C=>(0,V.jsx)("button",{className:J("network-tab border-0 bg-transparent p-0 text-[12px] font-semibold capitalize outline-none",s===C&&"network-tab-active"),onClick:()=>l(C),type:"button",children:i(C)},C))})]}),(0,V.jsx)("div",{className:"network-pane-body flex min-h-0 flex-1 flex-col overflow-hidden",children:s==="body"?(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(jfe,{body:e,bodyView:h,onQueryChange:g,onToggleTextBody:()=>d(C=>!C),preferTextBody:u,query:p,title:a}),(0,V.jsx)(qfe,{copyLabel:`${i("Copy")} ${a} ${i("body")}`,copyText:k,fullscreenLabel:i("Open fullscreen JSON viewer"),onFullscreen:()=>f(!0),children:(0,V.jsx)(zfe,{expandedJsonPaths:b,onToggleJsonPath:L,showJsonTree:P,value:h.json,visible:M})}),c?(0,V.jsx)(P7e,{body:e,bodyView:h,copyLabel:`${i("Copy")} ${a} ${i("body")}`,copyText:k,expandedJsonPaths:b,onClose:()=>f(!1),onQueryChange:g,onToggleJsonPath:L,onToggleTextBody:()=>d(C=>!C),preferTextBody:u,query:p,showJsonTree:P,subtitle:n,title:a,visible:M,value:h.json}):null]}):(0,V.jsx)("div",{className:"min-h-0 flex-1 overflow-auto",children:(0,V.jsx)(H0,{emptyLabel:r,rows:v})})})]})}function jfe({body:e,bodyView:t,onQueryChange:r,onToggleTextBody:o,preferTextBody:n,query:a,title:i}){let s=ve();return(0,V.jsxs)("div",{className:"network-body-meta flex min-h-9 shrink-0 items-center gap-2 border-b px-3 py-1.5",children:[(0,V.jsxs)("div",{className:"relative min-w-[180px] flex-1",children:[(0,V.jsx)(Jr,{className:"network-search-icon pointer-events-none absolute left-2 top-1/2 z-[1] h-3 w-3 -translate-y-1/2"}),(0,V.jsx)("input",{"aria-label":`${s("Filter")} ${i} JSON`,className:"network-filter-input h-6 w-full rounded border pl-7 pr-2 text-[11px] font-semibold outline-none",onChange:l=>r(l.target.value),placeholder:s("\u7B5B\u9009 JSON..."),value:a})]}),t.json!==void 0&&a.trim()===""?(0,V.jsx)("button",{className:"network-tab shrink-0 border-0 bg-transparent p-0 text-[11px] font-semibold outline-none",onClick:o,type:"button",children:n?"JSON":s("Show full content")}):null,e?.contentType?(0,V.jsx)("span",{className:"network-muted hidden shrink-0 text-[11px] font-semibold sm:inline",children:e.contentType}):null,e?.truncated?(0,V.jsx)("span",{className:"network-service-paused rounded-full px-2 py-0.5 text-[11px] font-semibold",children:s("truncated")}):null]})}function zfe({expandedJsonPaths:e,onToggleJsonPath:t,showJsonTree:r,value:o,visible:n}){return r?(0,V.jsx)(N7e,{expandedPaths:e,onToggle:t,value:o}):(0,V.jsx)("pre",{className:"network-code min-h-0 flex-1 overflow-auto whitespace-pre-wrap break-words p-3 pr-20 font-mono text-[11px] leading-5",children:n})}function P7e({body:e,bodyView:t,copyLabel:r,copyText:o,expandedJsonPaths:n,onClose:a,onQueryChange:i,onToggleJsonPath:s,onToggleTextBody:l,preferTextBody:u,query:d,showJsonTree:c,subtitle:f,title:p,value:g,visible:m}){let h=ve();return(0,V.jsx)("div",{"aria-label":`${p} ${h("Fullscreen JSON viewer")}`,"aria-modal":"true",className:"network-json-fullscreen fixed inset-0 z-[100] flex min-h-0",role:"dialog",children:(0,V.jsxs)("div",{className:"network-json-fullscreen-panel flex min-h-0 flex-1 flex-col overflow-hidden border",children:[(0,V.jsxs)("div",{className:"network-json-fullscreen-header flex h-12 min-w-0 shrink-0 items-center gap-3 border-b px-4",children:[(0,V.jsx)("span",{className:"network-pane-title min-w-0 truncate text-[15px] font-bold",children:p}),f?(0,V.jsx)("span",{className:"network-muted shrink-0 text-[12px] font-semibold",children:f}):null,(0,V.jsx)("button",{"aria-label":h("Close fullscreen JSON viewer"),className:"network-control-button ml-auto flex h-7 w-7 items-center justify-center rounded border outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onClick:a,title:h("Close"),type:"button",children:(0,V.jsx)(ft,{className:"h-3.5 w-3.5"})})]}),(0,V.jsx)(jfe,{body:e,bodyView:t,onQueryChange:i,onToggleTextBody:l,preferTextBody:u,query:d,title:p}),(0,V.jsx)("div",{className:"network-json-fullscreen-body flex min-h-0 flex-1",children:(0,V.jsx)(qfe,{copyLabel:r,copyText:o,children:(0,V.jsx)(zfe,{expandedJsonPaths:n,onToggleJsonPath:s,showJsonTree:c,value:g,visible:m})})})]})})}function A7e(e){if(!e)return"missing";let t=e.text??"";return[e.encoding??"",e.contentType??"",e.sizeBytes,e.truncated?"truncated":"complete",t.length,t.slice(0,96),t.slice(-96)].join("")}function I7e(e,t){let r=Om.get(e);if(r)return Om.delete(e),Om.set(e,r),r;let o=pce(t);for(Om.set(e,o);Om.size>f7e;){let n=Om.keys().next().value;if(!n)break;Om.delete(n)}return o}function Ufe(e){return Q4(e.json)?e.text.length>p7e||gN(e.json,Bfe+1)>Bfe?new Set:new Set(["$"]):new Set}function gN(e,t=Number.POSITIVE_INFINITY){if(Array.isArray(e))return e.length;let r=0;for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&(r+=1,r>=t))return r;return r}function D7e(e){if(Array.isArray(e))return e.slice(0,hh).map((r,o)=>[String(o),r]);let t=[];for(let r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&(t.push([r,e[r]]),t.length>=hh))break;return t}function L7e(e){if(Array.isArray(e))return`Array(${e.length})`;let t=gN(e,hh+1);return t>hh?`Object(${hh}+)`:`Object(${t})`}function R7e(e,t){return Array.isArray(e)?`... ${We(Math.max(0,e.length-t))}`:"..."}function qfe({children:e,copyLabel:t,copyText:r,fullscreenLabel:o,onFullscreen:n}){let a=ve(),[i,s]=(0,D.useState)(!1);(0,D.useEffect)(()=>{if(!i)return;let u=window.setTimeout(()=>s(!1),1300);return()=>window.clearTimeout(u)},[i]);async function l(){await Ls(r),s(!0)}return(0,V.jsxs)("div",{className:"relative flex min-h-0 flex-1",children:[(0,V.jsxs)("div",{className:"absolute right-2 top-2 z-10 flex items-center gap-1",children:[n?(0,V.jsx)("button",{"aria-label":o??a("Open fullscreen JSON viewer"),className:"network-control-button flex h-7 w-7 items-center justify-center rounded border outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onClick:n,title:o??a("Open fullscreen JSON viewer"),type:"button",children:(0,V.jsx)(ax,{className:"h-3.5 w-3.5"})}):null,(0,V.jsx)("button",{"aria-label":t,className:J("network-control-button flex h-7 w-7 items-center justify-center rounded border outline-none focus-visible:ring-2 focus-visible:ring-ring/30",i&&"network-json-copy-success"),onClick:()=>{l()},title:a(i?"Copied":"\u590D\u5236"),type:"button",children:(0,V.jsx)(br,{iconKey:i?"copied":"copy",children:i?(0,V.jsx)(yt,{className:"h-3.5 w-3.5"}):(0,V.jsx)(Ta,{className:"h-3.5 w-3.5"})})})]}),e]})}function N7e({expandedPaths:e,onToggle:t,value:r}){return(0,V.jsx)("div",{className:"network-code min-h-0 flex-1 overflow-auto p-3 pr-20 font-mono text-[11px] leading-5",children:(0,V.jsx)(Hfe,{expandedPaths:e,onToggle:t,path:"$",value:r})})}function Hfe({depth:e=0,expandedPaths:t,label:r,labelKind:o="key",onToggle:n,path:a,trailingComma:i=!1,value:s}){let l=ve();if(!Q4(s))return(0,V.jsxs)("div",{className:"min-w-0 whitespace-pre-wrap break-words",style:{paddingLeft:e*16},children:[r!==void 0?(0,V.jsx)(eG,{kind:o,label:r}):null,(0,V.jsx)(T7e,{value:s}),i?(0,V.jsx)("span",{children:","}):null]});let u=t.has(a),d=Array.isArray(s)?"[":"{",c=Array.isArray(s)?"]":"}",f=gN(s,1),p=u?D7e(s):[],g=u&&gN(s,hh+1)>p.length;return f===0?(0,V.jsxs)("div",{className:"min-w-0 whitespace-pre-wrap break-words",style:{paddingLeft:e*16},children:[(0,V.jsx)("span",{className:"inline-block w-4"}),r!==void 0?(0,V.jsx)(eG,{kind:o,label:r}):null,(0,V.jsxs)("span",{children:[d,c]}),i?(0,V.jsx)("span",{children:","}):null]}):(0,V.jsxs)("div",{className:"min-w-0",children:[(0,V.jsxs)("div",{className:"min-w-0 whitespace-pre-wrap break-words",style:{paddingLeft:e*16},children:[(0,V.jsx)("button",{"aria-expanded":u,"aria-label":u?`${l("Collapse")} JSON`:`${l("Expand")} JSON`,className:"network-control-button mr-1 inline-flex h-4 w-4 items-center justify-center rounded border align-[-2px] outline-none focus-visible:ring-2 focus-visible:ring-ring/30",onClick:()=>n(a),title:l(u?"Collapse":"Expand"),type:"button",children:u?(0,V.jsx)(po,{className:"h-3 w-3"}):(0,V.jsx)(qo,{className:"h-3 w-3"})}),r!==void 0?(0,V.jsx)(eG,{kind:o,label:r}):null,(0,V.jsx)("span",{children:d}),u?null:(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)("span",{className:"network-muted",children:[" ",L7e(s)," "]}),(0,V.jsx)("span",{children:c}),i?(0,V.jsx)("span",{children:","}):null]})]}),u?(0,V.jsxs)(V.Fragment,{children:[p.map(([m,h],k)=>(0,V.jsx)(Hfe,{depth:e+1,expandedPaths:t,label:m,labelKind:Array.isArray(s)?"index":"key",onToggle:n,path:vce(a,m),trailingComma:k<p.length-1||g,value:h},`${a}/${m}`)),g?(0,V.jsxs)("div",{className:"network-muted min-w-0 whitespace-pre-wrap break-words",style:{paddingLeft:(e+1)*16},children:[(0,V.jsx)("span",{className:"inline-block w-4"}),(0,V.jsx)("span",{children:R7e(s,p.length)})]}):null,(0,V.jsxs)("div",{className:"min-w-0 whitespace-pre-wrap break-words",style:{paddingLeft:e*16},children:[(0,V.jsx)("span",{className:"inline-block w-4"}),(0,V.jsx)("span",{children:c}),i?(0,V.jsx)("span",{children:","}):null]})]}):null]})}function eG({kind:e,label:t}){return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)("span",{className:e==="index"?"network-muted":"text-[color:var(--network-accent)]",children:e==="index"?t:JSON.stringify(t)}),(0,V.jsx)("span",{children:": "})]})}function T7e({value:e}){return typeof e=="string"?(0,V.jsx)("span",{className:"text-emerald-600 dark:text-emerald-300",children:JSON.stringify(e)}):typeof e=="number"?(0,V.jsx)("span",{className:"text-blue-600 dark:text-blue-300",children:String(e)}):typeof e=="boolean"?(0,V.jsx)("span",{className:"text-purple-600 dark:text-purple-300",children:String(e)}):e===null?(0,V.jsx)("span",{className:"network-muted",children:"null"}):(0,V.jsx)("span",{children:String(e)})}function Xc({label:e,onResizeStart:t,resizeLabel:r}){return(0,V.jsxs)("div",{className:J("network-header-cell relative flex h-full min-w-0 items-center border-l px-2 first:border-l-0",t&&"pr-3"),children:[(0,V.jsx)("span",{className:"min-w-0 truncate",children:e}),t?(0,V.jsx)("button",{"aria-label":r??e,className:"network-column-resize-handle",onPointerDown:t,title:r??e,type:"button"}):null]})}function O7e({exchange:e}){return(0,V.jsx)("span",{className:J("h-3 w-3 rounded-full",e.state==="error"?"network-dot-error":e.state==="pending"?"network-dot-active":(e.statusCode??0)>=400?"network-dot-error":"network-dot-completed")})}function E7e({client:e}){return(0,V.jsxs)("div",{className:"flex min-w-0 items-center gap-2",children:[(0,V.jsx)("span",{className:"network-client-icon flex h-5 w-5 shrink-0 items-center justify-center rounded border text-[8px] font-bold",children:yW(e)}),(0,V.jsx)("span",{className:"min-w-0 truncate",title:e,children:e})]})}function _7e({exchange:e,selectedTab:t,setSelectedTab:r}){let o=ve();return(0,V.jsxs)("div",{className:"network-pane-split flex h-full min-w-0 flex-col",children:[(0,V.jsxs)("div",{className:"network-pane-header flex h-10 min-w-0 shrink-0 items-center gap-3 border-b px-3",children:[(0,V.jsx)("span",{className:"network-pane-title shrink-0 text-[14px] font-bold",children:o("Request")}),(0,V.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[["header","query","body","raw","summary"].map(n=>(0,V.jsx)("button",{className:J("network-tab border-0 bg-transparent p-0 text-[12px] font-semibold capitalize outline-none",t===n&&"network-tab-active"),onClick:()=>r(n),type:"button",children:o(n)},n)),(0,V.jsx)("span",{className:"network-tab-divider h-4 w-px border-l"}),(0,V.jsx)("button",{className:"network-tab border-0 bg-transparent p-0",type:"button",children:"+"})]})]}),(0,V.jsxs)("div",{className:"network-pane-body min-h-0 flex-1 overflow-auto",children:[t==="header"?(0,V.jsx)(H0,{rows:Qb(e.requestHeaders)}):null,t==="query"?(0,V.jsx)(H0,{rows:kW(e.url),emptyLabel:o("No query parameters")}):null,t==="body"?(0,V.jsx)(Kfe,{body:e.requestBody}):null,t==="raw"?(0,V.jsx)(oG,{value:hW(e)}):null,t==="summary"?(0,V.jsx)(H0,{rows:MW(e)}):null]})]})}function F7e({exchange:e,selectedTab:t,setSelectedTab:r}){let o=ve();return(0,V.jsxs)("div",{className:"flex h-full min-w-0 flex-col",children:[(0,V.jsxs)("div",{className:"network-pane-header flex h-10 min-w-0 shrink-0 items-center justify-between gap-3 border-b px-3",children:[(0,V.jsx)("span",{className:"network-pane-title shrink-0 text-[14px] font-bold",children:o("Response")}),(0,V.jsx)("div",{className:"flex items-center gap-3",children:["body","header","raw"].map(n=>(0,V.jsx)("button",{className:J("network-tab border-0 bg-transparent p-0 text-[12px] font-semibold capitalize outline-none",t===n&&"network-tab-active"),onClick:()=>r(n),type:"button",children:o(n)},n))})]}),(0,V.jsxs)("div",{className:"network-pane-body min-h-0 flex-1 overflow-auto",children:[e.error?(0,V.jsx)("div",{className:"network-error-box m-4 rounded-md border px-3 py-2 text-[12px]",children:e.error}):null,t==="body"?(0,V.jsx)(Kfe,{body:e.responseBody}):null,t==="header"?(0,V.jsx)(H0,{rows:Qb(e.responseHeaders??{}),emptyLabel:o("No response headers")}):null,t==="raw"?(0,V.jsx)(oG,{value:vW(e)}):null]})]})}function H0({emptyLabel:e="No values",rows:t}){let r=ve();return t.length===0?(0,V.jsx)("div",{className:"network-kv-empty px-4 py-10 text-center text-[12px] font-semibold",children:r(e)}):(0,V.jsxs)("div",{className:"min-w-[520px]",children:[(0,V.jsxs)("div",{className:"network-kv-header grid h-9 grid-cols-[minmax(180px,0.9fr)_minmax(280px,1.6fr)] items-center border-b text-[12px] font-bold",children:[(0,V.jsx)("div",{className:"network-kv-key-head border-r px-3",children:r("Key")}),(0,V.jsx)("div",{className:"px-3",children:r("Value")})]}),t.map(([o,n],a)=>(0,V.jsxs)("div",{className:J("network-kv-row grid min-h-9 grid-cols-[minmax(180px,0.9fr)_minmax(280px,1.6fr)] items-start text-[12px] font-semibold",a%2===0?"network-kv-row-even":"network-kv-row-odd"),children:[(0,V.jsx)("div",{className:"network-kv-key min-w-0 px-3 py-2",children:o}),(0,V.jsx)("div",{className:"network-kv-value min-w-0 whitespace-pre-wrap break-words px-3 py-2",children:n})]},`${o}-${a}`))]})}function Kfe({body:e}){let t=ve();return!e||!e.text&&e.sizeBytes===0?(0,V.jsx)("div",{className:"px-4 py-10 text-center text-[12px] font-semibold text-[#777d86]",children:t("No body")}):(0,V.jsxs)("div",{className:"min-w-0",children:[(0,V.jsxs)("div",{className:"network-body-meta flex min-h-9 flex-wrap items-center gap-2 border-b px-3 py-1.5 text-[11px] font-semibold",children:[(0,V.jsx)("span",{children:km(e.sizeBytes)}),e.contentType?(0,V.jsx)("span",{children:e.contentType}):null,e.encoding==="base64"?(0,V.jsx)("span",{children:"base64"}):null,e.decodedFrom?(0,V.jsxs)("span",{children:[e.decodedFrom," ",t("decoded")]}):null,e.truncated?(0,V.jsx)("span",{children:t("truncated")}):null]}),e.error?(0,V.jsx)("div",{className:"network-body-warning border-b px-3 py-2 text-[12px]",children:e.error}):null,(0,V.jsx)(oG,{value:e.text||t("No body")})]})}function oG({value:e}){return(0,V.jsx)("pre",{className:"network-code min-h-[240px] overflow-auto whitespace-pre-wrap break-words p-3 font-mono text-[11px] leading-5",children:e})}var rt=z(ze());function nG({actionBusy:e,actionError:t,actionMessage:r,config:o,installProxyCertificate:n,onProxyEnabledChange:a,onProxyNetworkCaptureChange:i,onProxySystemProxyChange:s,proxyCertificateChecking:l,proxyCertificateStatus:u,proxyStatus:d,refreshProxyCertificateStatus:c,restartProxy:f,updateConfig:p}){let g=ve(),m=aue(u),h=bm(u.message,g);return(0,rt.jsx)(Qe.div,{animate:{opacity:1},className:"w-full",initial:{opacity:0},transition:{duration:.15},children:(0,rt.jsxs)(or,{className:"min-w-0",children:[(0,rt.jsx)(Gr,{children:(0,rt.jsx)(fn,{children:g("Server")})}),(0,rt.jsxs)(nr,{className:"space-y-4",children:[(0,rt.jsxs)("div",{className:"grid grid-cols-1 gap-3 sm:grid-cols-2",children:[(0,rt.jsx)(xe,{label:g("Host"),children:(0,rt.jsx)(Te,{value:o.HOST,onChange:k=>p(M=>{let v=k.target.value;return{...M,HOST:v,gateway:{...M.gateway,host:v},routerEndpoint:mR(v,M.PORT)}})})}),(0,rt.jsx)(xe,{label:g("Port"),children:(0,rt.jsx)(Te,{type:"number",value:String(o.PORT),onChange:k=>p(M=>{let v=ha(k.target.value);return{...M,PORT:v,gateway:{...M.gateway,port:v},routerEndpoint:mR(M.HOST,v)}})})}),(0,rt.jsx)(xe,{className:"sm:col-span-2",label:g("Proxy mode"),children:(0,rt.jsxs)("div",{className:"flex h-10 items-center justify-between gap-3 rounded-md border border-input bg-background px-3",children:[(0,rt.jsx)("span",{className:"truncate text-[12px] font-medium text-foreground",children:l?g("Checking CA certificate..."):o.proxy.enabled?g("Enabled"):g("Disabled")}),(0,rt.jsx)(Co,{checked:o.proxy.enabled,disabled:l,onChange:a})]})}),o.proxy.enabled?(0,rt.jsxs)(rt.Fragment,{children:[(0,rt.jsx)(xe,{label:g("System proxy"),children:(0,rt.jsxs)("div",{className:"flex h-10 items-center justify-between gap-3 rounded-md border border-input bg-background px-3",children:[(0,rt.jsx)("span",{className:"truncate text-[12px] font-medium text-foreground",children:o.proxy.systemProxy?g("Enabled"):g("Disabled")}),(0,rt.jsx)(Co,{checked:o.proxy.systemProxy,onChange:s})]})}),(0,rt.jsx)(xe,{label:g("Capture network"),children:(0,rt.jsxs)("div",{className:"flex h-10 items-center justify-between gap-3 rounded-md border border-input bg-background px-3",children:[(0,rt.jsx)("span",{className:"truncate text-[12px] font-medium text-foreground",children:o.proxy.captureNetwork?g("Enabled"):g("Disabled")}),(0,rt.jsx)(Co,{checked:o.proxy.captureNetwork,onChange:i})]})})]}):null]}),o.proxy.enabled||!u.trusted?(0,rt.jsxs)("div",{className:"space-y-3 rounded-md border border-border bg-muted/20 p-3",children:[(0,rt.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,rt.jsx)("span",{className:"min-w-0 truncate text-[12px] font-medium",children:g("CA certificate")}),(0,rt.jsx)(gt,{variant:oue(u),children:g(rue(u))})]}),u.trusted?null:(0,rt.jsxs)("div",{className:"space-y-3 rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-[12px] text-amber-900",children:[(0,rt.jsx)("div",{className:"font-medium",children:h}),(0,rt.jsx)("div",{className:"grid gap-1.5",children:m.map((k,M)=>(0,rt.jsxs)("div",{className:"flex gap-2",children:[(0,rt.jsxs)("span",{className:"shrink-0 font-semibold",children:[M+1,"."]}),(0,rt.jsx)("span",{className:"min-w-0",children:g(k)})]},k))}),(0,rt.jsx)("div",{className:"break-all font-mono text-[11px] text-amber-950/80",children:u.caCertFile})]}),o.proxy.enabled?(0,rt.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,rt.jsx)("span",{className:"min-w-0 truncate text-[12px] font-medium",children:g("Proxy status")}),(0,rt.jsx)(tue,{state:d.state})]}):null,(0,rt.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[(0,rt.jsxs)(ne,{disabled:!!e||!u.canInstall,onClick:n,size:"sm",type:"button",variant:"outline",children:[(0,rt.jsx)(br,{iconKey:e==="cert"?"installing":"cert",children:e==="cert"?(0,rt.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,rt.jsx)(Oa,{className:"h-3.5 w-3.5"})}),g("Install CA")]}),(0,rt.jsxs)(ne,{disabled:!!e||l,onClick:c,size:"sm",type:"button",variant:"outline",children:[(0,rt.jsx)(br,{iconKey:l?"checking":"refresh",children:l?(0,rt.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,rt.jsx)(Ho,{className:"h-3.5 w-3.5"})}),g("Check Trust")]}),o.proxy.enabled?(0,rt.jsxs)(ne,{disabled:!!e,onClick:f,size:"sm",type:"button",variant:"outline",children:[(0,rt.jsx)(br,{iconKey:e==="proxy"?"restarting":"refresh",children:e==="proxy"?(0,rt.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,rt.jsx)(Ho,{className:"h-3.5 w-3.5"})}),g("Restart Proxy")]}):null]})]}):null,t||r?(0,rt.jsx)("div",{className:J("whitespace-pre-wrap rounded-lg border px-3 py-2 text-[12px]",t?"border-destructive/30 bg-destructive/5 text-destructive":"border-border/60 bg-background/80 text-muted-foreground"),children:t||r}):null]})]})})}var nt=z(ze());function aG({loaded:e,onboarding:t}){return(0,nt.jsxs)("main",{className:"relative flex min-h-0 min-w-0 flex-1 overflow-hidden bg-background",children:[(0,nt.jsx)("div",{className:"app-drag absolute inset-x-0 top-0 z-10 h-10"}),e?(0,nt.jsx)(c5,{...t}):null]})}function iG({activeView:e,compactLayout:t,copy:r,gatewayActionBusy:o,gatewayEndpoint:n,gatewayStatus:a,isMac:i,needsTrafficLightSafeArea:s,agentAnalysisEnabled:l,networkCaptureEnabled:u,onDownloadUpdate:d,onOpenSettings:c,onSelectNavigationItem:f,onToggleSidebar:p,shouldReduceMotion:g,sidebarOpen:m,toggleGatewayService:h,updateActionBusy:k,updateStatus:M,viewProps:v,requestLogsEnabled:b,visibleNavigation:w}){let P=i?152:88,L=M.supported&&(M.state==="available"||M.state==="downloading"||M.state==="downloaded"),C=M.state==="downloaded"?r.text["Update ready to install"]??"Update ready to install":M.state==="downloading"?r.text["Downloading update"]??"Downloading update":r.text["Download update"]??"Download update";return(0,nt.jsxs)(nt.Fragment,{children:[(0,nt.jsxs)("div",{className:J("app-no-drag app-window-controls pointer-events-auto absolute top-2 z-[90] flex items-center gap-1",i?"left-[76px]":"left-3"),children:[(0,nt.jsx)(ne,{"aria-controls":"primary-sidebar","aria-expanded":m,"aria-label":m?r.sidebar.collapse:r.sidebar.expand,className:"app-sidebar-toggle inline-flex h-8 w-8 items-center justify-center rounded-md border border-transparent bg-transparent p-0 text-muted-foreground outline-none transition-colors hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring/25",onMouseDown:F=>F.stopPropagation(),onClick:p,title:m?r.sidebar.collapse:r.sidebar.expand,type:"button",unstyled:!0,children:(0,nt.jsx)(br,{iconKey:m?"close":"open",children:m?(0,nt.jsx)(au,{className:"h-4 w-4"}):(0,nt.jsx)(gs,{className:"h-4 w-4"})})}),(0,nt.jsx)(ece,{busy:o,onClick:h,state:a.state}),L?(0,nt.jsx)(ne,{"aria-label":C,className:"app-no-drag inline-flex h-8 w-8 items-center justify-center rounded-md border border-transparent bg-transparent p-0 text-primary outline-none transition-colors hover:bg-primary/10 hover:text-primary focus-visible:ring-2 focus-visible:ring-ring/25",onMouseDown:F=>F.stopPropagation(),onClick:d,title:C,type:"button",unstyled:!0,children:k||M.state==="downloading"?(0,nt.jsx)(ct,{className:"h-3.5 w-3.5 animate-spin"}):(0,nt.jsx)(nl,{className:"h-3.5 w-3.5"})}):null]}),(0,nt.jsx)(Qe.aside,{animate:{width:m?t?"100%":248:0},"aria-hidden":!m,className:J("app-sidebar flex shrink-0 flex-col overflow-hidden bg-sidebar/95 max-[720px]:h-auto",m&&t&&"border-b border-border"),id:"primary-sidebar",initial:!1,style:{pointerEvents:m?"auto":"none"},transition:g?ga:{damping:35,mass:.78,stiffness:430,type:"spring"},children:m?(0,nt.jsxs)(Qe.div,{animate:{opacity:1},className:"flex min-h-0 w-[248px] flex-1 flex-col max-[720px]:w-full",initial:{opacity:0},transition:g?ga:{duration:.14,ease:gm},children:[(0,nt.jsxs)("div",{className:"flex h-14 shrink-0 max-[720px]:h-12",children:[(0,nt.jsx)("div",{className:"app-no-drag shrink-0",style:{width:P}}),(0,nt.jsx)("div",{className:"app-drag min-w-0 flex-1"})]}),(0,nt.jsx)("nav",{className:"flex min-h-0 flex-1 flex-col gap-1 px-2 py-3 max-[720px]:flex-none max-[720px]:flex-row max-[720px]:overflow-x-auto max-[720px]:py-2","aria-label":r.sidebar.primaryNavigation,children:w.map(F=>(0,nt.jsxs)(ne,{className:J("flex h-9 min-w-0 items-center gap-2 rounded-md px-2 text-left text-[12px] font-medium text-muted-foreground transition-all duration-150 max-[720px]:min-w-[118px]",e===F.id?"bg-card text-foreground shadow-[0_1px_3px_rgba(0,0,0,0.06)]":"hover:bg-muted/80 hover:text-foreground"),onClick:()=>f(F.id),type:"button",unstyled:!0,children:[(0,nt.jsx)(Qe.span,{className:J("flex h-6 w-6 shrink-0 items-center justify-center rounded-md transition-colors",e===F.id&&"bg-primary/10 text-primary"),layout:"position",transition:g?ga:HL,children:(0,nt.jsx)(F.icon,{className:"h-3.5 w-3.5"})}),(0,nt.jsx)("span",{className:"min-w-0 flex-1 truncate",children:r.navigation[F.id]})]},F.id))}),(0,nt.jsx)("div",{className:"grid shrink-0 gap-1 border-t border-border/60 p-2 max-[720px]:border-t max-[720px]:pt-2",children:(0,nt.jsxs)(ne,{className:"flex h-9 w-full min-w-0 items-center gap-2 rounded-md px-2 text-left text-[12px] font-medium text-muted-foreground transition-all duration-150 hover:bg-muted/80 hover:text-foreground",onClick:c,title:r.settings.title,type:"button",unstyled:!0,children:[(0,nt.jsx)("span",{className:"flex h-6 w-6 shrink-0 items-center justify-center rounded-md",children:(0,nt.jsx)(Hd,{className:"h-3.5 w-3.5"})}),(0,nt.jsx)("span",{className:"min-w-0 flex-1 truncate",children:r.settings.button})]})}),(0,nt.jsx)("div",{className:"h-3 shrink-0 max-[720px]:hidden"})]}):null}),(0,nt.jsxs)("main",{className:"flex min-h-0 min-w-0 flex-1 flex-col",children:[(0,nt.jsxs)("div",{className:J("app-drag relative flex h-12 shrink-0 items-center bg-background/95 px-5 max-[720px]:h-auto max-[720px]:px-3 max-[720px]:py-2",s&&"pl-[116px] max-[720px]:pl-[116px]"),children:[s||!m?(0,nt.jsx)("div",{className:"app-no-drag absolute left-0 top-0 h-full",style:{width:P}}):null,(0,nt.jsx)(tce,{config:v.server.config,endpoint:n,gatewayStatus:a})]}),(0,nt.jsx)("div",{className:J("min-h-0 flex-1 px-5 pb-5 pt-5 max-[720px]:px-3 max-[720px]:pb-3 max-[720px]:pt-3",bde(e)?"overflow-hidden":"overflow-auto"),children:(0,nt.jsx)(B7e,{activeView:e,agentAnalysisEnabled:l,networkCaptureEnabled:u,requestLogsEnabled:b,viewProps:v})})]})]})}function B7e({activeView:e,agentAnalysisEnabled:t,networkCaptureEnabled:r,requestLogsEnabled:o,viewProps:n}){return(0,nt.jsx)(wt,{initial:!1,mode:"wait",children:(0,nt.jsxs)(fW,{view:e,children:[e==="overview"?(0,nt.jsx)(K5,{...n.overview}):null,e==="observability"&&t?(0,nt.jsx)(Z5,{...n.observability}):null,e==="api-keys"?(0,nt.jsx)(p5,{...n.apiKeys}):null,e==="server"?(0,nt.jsx)(nG,{...n.server}):null,e==="profile"?(0,nt.jsx)(u5,{...n.profile}):null,e==="networking"&&r?(0,nt.jsx)(tG,{...n.networking}):null,e==="logs"&&o?(0,nt.jsx)(rG,{...n.logs}):null,e==="providers"?(0,nt.jsx)(r5,{...n.providers}):null,e==="models"?(0,nt.jsx)(o5,{...n.models}):null,e==="routing"?(0,nt.jsx)(v5,{...n.routing}):null,e==="virtual-models"?(0,nt.jsx)(N5,{...n.virtualModels}):null,e==="extensions"?(0,nt.jsx)(k5,{...n.extensions}):null]},e)})}var Uu=z(ze()),V7e="__CCR_PROVIDER_NAME__",U7e="__CCR_PROVIDER_NAME_SLUG__",W7e="__CCR_PROVIDER_INTERNAL_NAME__",G7e="ccr-local-agent-login";function j7e(e,t,r){if(e.length===0)return[];let o=r?`${t}::${r}`:t,n={[W7e]:o,[V7e]:t,[U7e]:$7e(t)};return e.map(a=>lG(a,n))}function lG(e,t){return typeof e=="string"?Object.entries(t).reduce((r,[o,n])=>r.split(o).join(n),e):Array.isArray(e)?e.map(r=>lG(r,t)):De(e)?Object.fromEntries(Object.entries(e).map(([r,o])=>[r,lG(o,t)])):e}function z7e(e,t){if(t.length===0)return e;let r=new Set(t.map($fe).filter(n=>!!n));return[...(e??[]).filter(n=>{let a=$fe(n);return!a||!r.has(a)}),...t]}function $fe(e){return De(e)&&typeof e.key=="string"&&e.key.trim()?e.key.trim():void 0}function q7e(e,t){if(!t||K7e(t)!==G7e)return e;let r=new Set([t.name,t.type?`${t.name}::${t.type}`:""].map(o=>o.trim().toLowerCase()).filter(Boolean));return(e??[]).filter(o=>!H7e(o,r))}function H7e(e,t){if(!De(e)||!(typeof e.key=="string"?e.key.trim().toLowerCase():"").startsWith("ccr-local-agent-"))return!1;let o=typeof e.providerName=="string"?e.providerName:typeof e.provider=="string"?e.provider:"";return t.has(o.trim().toLowerCase())}function K7e(e){return e.api_key||e.apiKey||e.apikey||""}function $7e(e){return e.trim().toLowerCase().replace(/[^a-z0-9_.-]+/g,"-").replace(/^-+|-+$/g,"")||"provider"}async function Yfe(e=!1){return window.ccr?window.ccr.getProviderAccountSnapshots(void 0,e?{forceRefresh:!0}:void 0):[]}function sG(e,t){let r=t?.length?t:[e];return[...new Set(r.filter(o=>Number.isInteger(o)&&o>=0))]}function Y7e(){let[e,t]=(0,D.useState)("onboarding"),[r,o]=(0,D.useState)(()=>qM(je)),[n,a]=(0,D.useState)(()=>!window.ccr),[i,s]=(0,D.useState)(()=>!window.ccr),[l,u]=(0,D.useState)(zL),[d,c]=(0,D.useState)(je),[f,p]=(0,D.useState)(()=>!window.ccr),[g,m]=(0,D.useState)(()=>!window.ccr),[h,k]=(0,D.useState)(()=>!window.ccr),[M,v]=(0,D.useState)(uW),[b,w]=(0,D.useState)(qL),[P,L]=(0,D.useState)(BM),[C,F]=(0,D.useState)(dW),[T,G]=(0,D.useState)(""),[$,oe]=(0,D.useState)(""),[se,pe]=(0,D.useState)(""),[N,R]=(0,D.useState)(!1),[U,E]=(0,D.useState)(Yb),[_,B]=(0,D.useState)(!1),[j,re]=(0,D.useState)(""),[W,K]=(0,D.useState)(""),[Q,ue]=(0,D.useState)(""),[Ue,de]=(0,D.useState)(!1),[Pe,Oe]=(0,D.useState)("claude-code"),[Y,Je]=(0,D.useState)(()=>Al()),[_e,it]=(0,D.useState)(()=>Al()),[Lt,jr]=(0,D.useState)(),[zr,Yt]=(0,D.useState)(),[vo,Fo]=(0,D.useState)(),[Yi,yo]=(0,D.useState)({profiles:[]}),[ir,Ns]=(0,D.useState)(""),[vh,ri]=(0,D.useState)(!1),[gn,oi]=(0,D.useState)(()=>nR()),[Ts,Tn]=(0,D.useState)(()=>nR()),[Il,Jc]=(0,D.useState)(),[Qc,kn]=(0,D.useState)(""),[Wu,ef]=(0,D.useState)(),[Os,Es]=(0,D.useState)(!1),[Gu,tf]=(0,D.useState)(),[qr,gr]=(0,D.useState)(),[I,q]=(0,D.useState)(()=>P4(je.Providers)),[X,ae]=(0,D.useState)(),[Se,ye]=(0,D.useState)(!1),[Ie,Le]=(0,D.useState)(),[Fe,Ge]=(0,D.useState)(!1),[Xe,qe]=(0,D.useState)(!1),[st,tt]=(0,D.useState)(),[at,kr]=(0,D.useState)(),[ya,Bo]=(0,D.useState)(!1),[Zn,ni]=(0,D.useState)(""),[MN,rf]=(0,D.useState)(!1),[tpe,K0]=(0,D.useState)(!1),[uG,pr]=(0,D.useState)(""),[rpe,hN]=(0,D.useState)(!1),[ju,vN]=(0,D.useState)(()=>f4()),[ope,yh]=(0,D.useState)(""),[Em,yN]=(0,D.useState)(),[xh,dG]=(0,D.useState)(()=>c4()),[npe,bh]=(0,D.useState)(""),[Dl,wh]=(0,D.useState)(),[zu,xN]=(0,D.useState)(),[bN,Ch]=(0,D.useState)(()=>a4()),[wN,Sh]=(0,D.useState)(()=>i4()),[ape,$0]=(0,D.useState)(!1),[_m,CN]=(0,D.useState)(()=>g4(je)),[Fm,Y0]=(0,D.useState)(),[ipe,Ph]=(0,D.useState)(""),[cG,fG]=(0,D.useState)([]),[spe,Z0]=(0,D.useState)(!1),[X0,SN]=(0,D.useState)(),[J0,Q0]=(0,D.useState)(),[On,PN]=(0,D.useState)(()=>C4()),[lpe,upe]=(0,D.useState)(je),[pG,dpe]=(0,D.useState)(!0),[cpe,AN]=(0,D.useState)(!1),[fpe,mG]=(0,D.useState)("appearance"),[ppe,mpe]=(0,D.useState)(0),[gpe,kpe]=(0,D.useState)(()=>window.matchMedia("(max-width: 720px)").matches),[Mpe,gG]=(0,D.useState)(),[IN,hpe]=(0,D.useState)(()=>qle()),[kG,vpe]=(0,D.useState)(()=>XW()),[ype,xpe]=(0,D.useState)(()=>Kle()),[bpe,Bm]=(0,D.useState)(""),[qu,wpe]=(0,D.useState)({page:1,pageSize:25,status:"all"}),[Cpe,Vm]=(0,D.useState)(!1),[Spe,Um]=(0,D.useState)(Nle),[Ppe,Wm]=(0,D.useState)(Lle),[ew,Ape]=(0,D.useState)("all"),[Ipe,Gm]=(0,D.useState)(""),[Dpe,jm]=(0,D.useState)(!1),[Hu,Lpe]=(0,D.useState)("7d"),[of,DN]=(0,D.useState)(),[Ah,Rpe]=(0,D.useState)("7d"),[Npe,MG]=(0,D.useState)(Rle),[LN,Ih]=(0,D.useState)([]),[hG,vG]=(0,D.useState)(!1),Ll=(0,D.useRef)(!1),RN=IN==="system"?kG:IN,wr=Dc[RN],Pt=(0,D.useMemo)(()=>A=>Xb(wr,A),[wr]),Mr=(0,D.useMemo)(()=>A=>UM(wr,A),[wr]);(0,D.useEffect)(()=>{let A=window.matchMedia("(max-width: 720px)"),O=()=>kpe(A.matches);return O(),A.addEventListener("change",O),()=>A.removeEventListener("change",O)},[]),(0,D.useEffect)(()=>{let A=document.documentElement,O=d.theme||"system";if(O==="system"){A.removeAttribute("data-theme");return}A.dataset.theme=O},[d.theme]),(0,D.useEffect)(()=>{document.documentElement.lang=RN==="zh"?"zh-CN":"en"},[RN]),(0,D.useEffect)(()=>{let A=()=>vpe(XW());return window.addEventListener("languagechange",A),()=>window.removeEventListener("languagechange",A)},[]),(0,D.useEffect)(()=>{let A=window.matchMedia("(prefers-color-scheme: dark)"),O=()=>xpe(A.matches?"dark":"light");return O(),A.addEventListener("change",O),()=>A.removeEventListener("change",O)},[]),(0,D.useEffect)(()=>{if(!window.ccr)return;window.ccr.getAppInfo().then(u),window.ccr.getProviderPresets().then(WW).catch(()=>WW([])).finally(()=>k(!0)),window.ccr.getConfig().then(Nh).catch(()=>{}).finally(()=>p(!0)),window.ccr.getOnboardingFinished().then(Ae=>{a(Ae),s(Ae),t(Ae?"overview":"onboarding")}).catch(()=>t("onboarding")).finally(()=>m(!0)),window.ccr.getPluginMarketplace().then(fG).catch(()=>fG([])),window.ccr.getProxyCertificateStatus().then(w);let A=window.ccr.onOpenSettingsRequest(jG),O=window.ccr.onOpenUpdateRequest(qpe),ge=Dm(()=>{window.ccr?.getGatewayStatus().then(v),window.ccr?.getProxyStatus().then(F),Th()},2e3);return()=>{ge(),A(),O()}},[]),(0,D.useEffect)(()=>{if(!window.ccr)return;let A=!1;window.ccr.getUpdateStatus().then(H=>{A||E(H)}).catch(()=>{A||E(Yb)});let O=window.ccr.onUpdateStatusChanged(H=>{A||E(H)});return()=>{A=!0,O()}},[l.version]),(0,D.useEffect)(()=>{if(!window.ccr)return;let A=H=>{tn.current+=1,Zi.current+=1,Es(!1),qe(!1),tt(void 0),gr(void 0),ae(void 0),Le(void 0),pr(""),ye(!1),Ge(!1),kr(H),ni(""),Bo(!1),t("providers")},O=window.ccr.onProviderDeepLink(A);return window.ccr.getPendingProviderDeepLinks().then(H=>{for(let ge of H)A(ge)}).catch(()=>{}),O},[]),(0,D.useEffect)(()=>{let A=at?.provider;!A||!f||!h||BG(A)},[f,at?.id,at?.provider,h]),(0,D.useEffect)(()=>{if(!window.ccr){MG(t0(Ah));return}let A=!1,H=Dm(()=>{let ge=Ah==="today"?{includeProxy:!0}:void 0;window.ccr?.getUsageStats(Ah,ge).then(Ae=>{A||MG(Ae)})},5e3);return()=>{A=!0,H()}},[Ah]),(0,D.useEffect)(()=>{if(!window.ccr){Ih([]);return}let A=!1,H=Dm(()=>{Yfe().then(ge=>{A||Ih(ge)}).catch(()=>{A||Ih([])})},3e4);return()=>{A=!0,H()}},[d.Providers]);async function Tpe(){if(!hG){vG(!0);try{Ih(await Yfe(!0))}catch{Ih([])}finally{vG(!1)}}}let Ku=!!d.observability.requestLogs,$u=!!d.observability.agentAnalysis,Ope=JSON.stringify({agent:ew,range:Hu,sessionAgent:of?.agent,sessionId:of?.id});(0,D.useEffect)(()=>{if(e!=="observability")return;if(!$u){Wm(Tc(Hu)),Gm(""),jm(!1);return}if(!window.ccr){Wm(Tc(Hu));return}let A=!1,O=(ge=!1)=>{ge&&jm(!0),window.ccr?.getAgentAnalysis({agent:ew,range:Hu,sessionAgent:of?.agent,sessionId:of?.id}).then(Ae=>{A||(Wm(Ae),Gm(""))}).catch(Ae=>{A||Gm(Mr(Ae))}).finally(()=>{A||jm(!1)})},H=Dm(()=>O(),5e3,{immediate:!1});return O(!0),()=>{A=!0,H()}},[e,$u,Ope]);let Epe=JSON.stringify(qu);(0,D.useEffect)(()=>{if(e!=="logs")return;if(!Ku){Um(Oc(qu)),Bm(""),Vm(!1);return}if(!window.ccr){Um(Oc(qu));return}let A=!1,O=(ge=!1)=>{ge&&Vm(!0),window.ccr?.getRequestLogs(qu).then(Ae=>{A||(Um(Ae),Bm(""))}).catch(Ae=>{A||Bm(Mr(Ae))}).finally(()=>{A||Vm(!1)})},H=Dm(()=>O(),5e3,{immediate:!1});return O(!0),()=>{A=!0,H()}},[e,Ku,Epe]),(0,D.useEffect)(()=>{if(e!=="networking"||!d.proxy.captureNetwork)return;if(!window.ccr){L(BM);return}let A=!1,H=Dm(()=>{window.ccr?.getProxyNetworkCaptures().then(ge=>{A||L(ge)})},1500);return()=>{A=!0,H()}},[e,d.proxy.captureNetwork]);let yG=d!==lpe,NN=(0,D.useMemo)(()=>Tle(d),[d.APIKEY,d.APIKEYS]),_pe=Il===void 0?void 0:NN.find(A=>A.index===Il),xG=Gu===void 0?void 0:d.Providers[Gu],bG=X0===void 0?void 0:d.Router.rules[X0],wG=(0,D.useMemo)(()=>{if(zu)return M0(d).find(A=>A.source===zu.source&&A.index===zu.index)},[d.plugins,d.providerPlugins,zu]),CG=(0,D.useMemo)(()=>{if(Em)return M0(d).find(A=>A.source==="plugins"&&A.index===Em.index)},[d.plugins,Em]),tw=(0,D.useMemo)(()=>{if(Dl)return d.plugins[Dl.index]},[d.plugins,Dl]),Fpe=(0,D.useMemo)(()=>d.Providers.map((A,O)=>({provider:A,index:O})),[d.Providers]),SG=M.endpoint||d.routerEndpoint,Dh=d.proxy.enabled&&d.proxy.captureNetwork,Bpe=(0,D.useMemo)(()=>VW.filter(A=>(A.id!=="networking"||Dh)&&(A.id!=="logs"||Ku)&&(A.id!=="observability"||$u)),[$u,Dh,Ku]),Lh=(0,D.useRef)(0),TN=(0,D.useRef)(""),tn=(0,D.useRef)(0),Zi=(0,D.useRef)(0),zm=(0,D.useRef)(),Vpe=ln(),PG=ZW(l.platform),Upe=zle(l.platform),Wpe=PG&&!pG,Gpe=Ki(I.modelsText),jpe=ho(I.selectedModels,Gpe),AG=!!(I.name.trim()&&I.baseUrl.trim())&&jpe.length>0,ON=B4(Y)&&Zfe(Y,d.botConfigs),IG=Lt!==void 0&&B4(_e)&&Zfe(_e,d.botConfigs),DG=!!gn.name.trim()&&(gn.expirationPreset!=="custom"||!!gn.expiresAt.trim()),LG=Ts.expirationPreset!=="custom"||!!Ts.expiresAt.trim(),RG=!!On.name.trim()&&On.rewrites.length>0&&On.rewrites.every(Que)&&!!(On.conditionField.trim()&&On.conditionOperator&&On.conditionRight.trim()),NG=s4(bN),TG=s4(wN),Rh=(0,D.useMemo)(()=>Nue(_m),[_m]),OG=(0,D.useMemo)(()=>Rh?Qo(wr,Rh):"",[wr,Rh]),zpe=!Rh,EG=!!(ju.key.trim()&&ju.modulePath.trim()),rw=(0,D.useMemo)(()=>({profileConfirmed:i,requireProfileConfirmation:e==="onboarding"&&!n}),[e,n,i]),EN=e==="onboarding"&&!n&&!i;(0,D.useEffect)(()=>{!Dh&&e==="networking"&&t("server")},[e,Dh]),(0,D.useEffect)(()=>{(e==="logs"&&!Ku||e==="observability"&&!$u)&&t("overview")},[e,$u,Ku]),(0,D.useEffect)(()=>{if(e!=="onboarding"||!f||!g||!h)return;let A=qM(d,rw),O=Ds.indexOf(A);o(H=>{let ge=Ds.indexOf(H);return O>ge?A:H})},[e,f,g,h,d,rw]),(0,D.useEffect)(()=>{if(e!=="onboarding"||r!=="profile"||i||!f)return;let A=d.profile.profiles.findIndex(Ze=>Ze.enabled&&Ze.agent===Y.agent),O=TN.current?-1:d.profile.profiles.findIndex(Ze=>Ze.enabled),H=A>=0?A:O,ge=H>=0?d.profile.profiles[H]:void 0;if(!ge)return;let Ae=`${ge.agent}:${ge.id||ge.name||H}`;TN.current!==Ae&&(TN.current=Ae,Oe(ge.agent),Je(F4(ge,d.botConfigs)),ue(""))},[e,r,i,f,d.profile.profiles,d.botConfigs,Y.agent]),(0,D.useEffect)(()=>{if(e!=="onboarding"||!f||!g||!h||Os)return;let A=d.Providers.findIndex(ge=>ge.name===d.preferredProvider),O=A>=0?A:d.Providers.length>0?0:-1,H=O>=0?d.Providers[O]:void 0;if(!H){gr(void 0);return}gr(O),tn.current+=1,Zi.current+=1,q(A4(H)),ae(void 0),Le(void 0),pr(""),ye(!1),Ge(!1)},[e,f,g,h,d.Providers,d.preferredProvider,Os]),(0,D.useEffect)(()=>()=>{zm.current!==void 0&&window.clearTimeout(zm.current)},[]),(0,D.useEffect)(()=>{if(!window.ccr||!yG)return;let A=Lh.current+1;Lh.current=A;let O=d,H=EN?{applyProfile:!1}:void 0,ge=window.setTimeout(()=>{window.ccr?.saveConfig(O,H).then(Ae=>{Lh.current===A&&(Nh(Ae),K(""))}).catch(Ae=>{Lh.current===A&&K(Mr(Ae))})},400);return()=>window.clearTimeout(ge)},[yG,d,EN]);function Nh(A){let O=F0(A);upe(O),c(O)}function Yu(A){zm.current!==void 0&&window.clearTimeout(zm.current),gG({id:Date.now(),message:A}),zm.current=window.setTimeout(()=>{gG(void 0),zm.current=void 0},1800)}function qpe(){R(!0),pe(""),_G()}function Hpe(){R(!0),pe(""),(U.canDownload||U.state==="available")&&FG()}async function _G(){if(!Ll.current){if(!window.ccr?.updateCheck){E({...Yb,currentVersion:l.version,lastError:Pt("Updates are only available in packaged builds."),state:"error"});return}Ll.current=!0,oe("check"),pe("");try{E(await window.ccr.updateCheck())}catch(A){pe(Mr(A))}finally{Ll.current=!1,oe("")}}}async function FG(){if(!(Ll.current||!window.ccr?.updateDownload)){Ll.current=!0,oe("download"),pe("");try{E(await window.ccr.updateDownload())}catch(A){pe(Mr(A))}finally{Ll.current=!1,oe("")}}}async function Kpe(){if(!(Ll.current||!window.ccr?.updateInstall)){Ll.current=!0,oe("install"),pe("");try{await window.ccr.updateInstall()}catch(A){pe(Mr(A)),Ll.current=!1,oe("")}}}function Qt(A){c(O=>F0(A(YW(O))))}function Zu(A){return F0(A(YW(d)))}function Xu(A){let O=F0(A);return c(O),O}async function Rl(A,O,H){if(Lh.current+=1,!window.ccr)return Nh(A),!0;try{let ge=H??(EN?{applyProfile:!1}:void 0),Ae=await window.ccr.saveConfig(A,ge);return Nh(Ae),O(""),!0}catch(ge){return O(Mr(ge)),!1}}async function _N(A,O){if(!window.ccr)return O(Pt("API key persistence is only available in the Electron app.")),!1;try{if(!window.ccr.saveApiKeys)throw new Error("This app build does not expose API key persistence. Rebuild and restart the Electron app.");let H=await window.ccr.saveApiKeys(A);return Nh(H),O(""),!0}catch(H){return O(Mr(H)),!1}}function $pe(){ef(void 0),oi(nR()),kn(""),ri(!0)}function Ype(A){oi(O=>({...O,...A})),kn("")}function Zpe(A){let O=NN.find(H=>H.index===A);O&&(Jc(A),Tn(Ole(O.key)),kn(""))}function Xpe(A){Tn(O=>({...O,...A})),kn("")}async function Jpe(){if(!gn.name.trim()){kn(Pt("Name is required."));return}if(!DG){kn(Pt("Expiration is required."));return}let A=_le(gn),O=Zu(H=>{let ge=ym([...H.APIKEYS,A],H.APIKEY);return H.APIKEYS=ge,H.APIKEY=ge[0]?.key??"",H});Xu(O),await _N(O.APIKEYS,kn)&&(ri(!1),ef(A))}async function Qpe(){if(Il===void 0)return;if(!LG){kn(Pt("Expiration is required."));return}let A=Zu(O=>{let H=ym(O.APIKEYS,O.APIKEY).map((ge,Ae)=>Ae===Il?Fle(ge,Ts):ge);return O.APIKEYS=H,O.APIKEY=H[0]?.key??"",O});Xu(A),await _N(A.APIKEYS,kn)&&Jc(void 0)}async function eme(A){let O=Zu(H=>{let ge=ym(H.APIKEYS,H.APIKEY).filter((Ae,Ze)=>Ze!==A);return H.APIKEYS=ge,H.APIKEY=ge[0]?.key??"",H});Xu(O),await _N(O.APIKEYS,kn)}function tme(){h&&(tn.current+=1,Zi.current+=1,gr(void 0),qe(!1),tt(void 0),q(P4(d.Providers)),ae(void 0),Le(void 0),pr(""),ye(!1),Ge(!1),Es(!0))}function rme(A){if(!h)return;let O=d.Providers[A];O&&(tn.current+=1,Zi.current+=1,gr(A),qe(!1),tt(void 0),q(A4(O)),ae(void 0),Le(void 0),pr(""),ye(!1),Ge(!1),Es(!0))}async function BG(A){if(!h)return;let O=tn.current+1;tn.current=O,Zi.current+=1,Bo(!0);let H=A,ge,Ae;if(H.models.length===0){let Cr=await ode(H);if(tn.current!==O){Bo(!1);return}ge=Cr.modelDisplayNames,Cr.models.length>0&&(H={...H,models:Cr.models})}if(Ae=await rde(H),tn.current!==O){Bo(!1);return}H.apiKey?.trim()&&Ae?.models.length&&(H={...H,models:Ae.models});let Ze=ade(H,d.Providers),At={...Ze,modelDisplayNames:rh(Ze.modelDisplayNames,ge)};gr(void 0),qe(!0),tt(H),q(Ae?T4(At,Ae):At),ae(Ae),Le(void 0),pr(""),ye(!1),Ge(!1),kr(void 0),ni(""),Bo(!1),Es(!0)}function VG(A,O=!1){let H=O&&(A.baseUrl!==void 0||A.presetId!==void 0||A.protocol!==void 0),ge=O||A.apiKey!==void 0||A.baseUrl!==void 0||A.modelsText!==void 0||A.presetId!==void 0||A.protocol!==void 0||A.selectedModels!==void 0||A.selectedProtocols!==void 0;q(Ae=>{let Ze={...Ae,...A};return!H||A.selectedModels!==void 0?Ze:{...Ze,modelDescriptions:A.modelDescriptions??Ae.modelDescriptions,modelDisplayNames:A.modelDisplayNames,modelsText:ho(Ae.selectedModels,Ki(Ze.modelsText)).join(`
158
+ `),selectedModels:[],selectedProtocols:A.selectedProtocols??Ae.selectedProtocols}}),pr(""),ge&&(Zi.current+=1,Le(void 0),Ge(!1)),H&&(tn.current+=1,ae(void 0),ye(!1))}(0,D.useEffect)(()=>{let A=Os||e==="onboarding"&&r==="provider";if(!window.ccr||!A)return;if(I.providerPlugins.length>0){tn.current+=1,ae(void 0),pr(""),ye(!1);return}tn.current+=1;let O=tn.current,H=SR(I).filter(PR),ge=!!I.apiKey.trim(),Ae=ge?"models":"protocols",Ze=ge?I.apiKey.trim():"",At=N4(H,Ze,[]);if(pr(""),H.length===0){ye(!1);return}ye(!0);let Cr=window.setTimeout(()=>{kde(H,Ze,[],{mode:Ae}).then(Ut=>{if(tn.current===O){if(!Ut){ae(void 0),pr(Pt("Request failed."));return}if(ae(Ut.probe),q(ai=>{let nf=SR(ai).filter(PR),VN=!!ai.apiKey.trim()?ai.apiKey.trim():"";return N4(nf,VN,[])!==At?ai:T4(ai,Ut.probe)}),Ae!=="models"&&!P0(Ut.probe)){let ai=Ut.probe.protocols.find(nf=>nf.message)?.message||"Request failed.";pr(Qo(wr,ai))}}}).catch(Ut=>{tn.current===O&&(ae(void 0),pr(Mr(Ut)))}).finally(()=>{tn.current===O&&ye(!1)})},350);return()=>{window.clearTimeout(Cr),tn.current===O&&(tn.current+=1,ye(!1))}},[e,r,Os,I.apiKey,I.baseUrl,I.presetId,I.protocol,I.providerPlugins]);async function UG(A){let O={failed:[],passed:[],results:[]};Zi.current+=1;let H=Zi.current,ge=I.apiKey.trim(),Ae=ho(A??ho(I.selectedModels,Ki(I.modelsText))),Ze=I.selectedProtocols.length>0?I.selectedProtocols:[I.protocol],At=SR(I).map(Ut=>({...Ut,protocols:Ut.protocols.filter(ai=>Ze.includes(ai))})).filter(Ut=>PR(Ut)&&Ut.protocols.length>0);if(pr(""),!window.ccr)return pr(Pt("Request failed.")),O;if(At.length===0)return pr(Pt("No endpoint candidates available.")),O;if(Ae.length===0)return pr(Pt("Select or enter at least one model.")),O;let Cr=gde(At,ge,I.name,I.presetId);if(Cr)return pr(Qo(wr,Cr.message)),O;Ge(!0);try{let Ut=await window.ccr.checkProviderConnectivity({apiKey:ge,candidates:At,forceRefresh:!0,models:Ae,protocols:Ze});return Zi.current!==H?O:(Le(Ut.probe),Ut.passed.length===0&&pr(Qo(wr,Ut.failed[0]?.message||"Request failed.")),Ut)}catch(Ut){return Zi.current===H&&(Le(void 0),pr(Mr(Ut))),O}finally{Zi.current===H&&Ge(!1)}}async function WG(){if(Se||Fe)return!1;let A=X,O=!!A?.models.length,H=Ki(I.modelsText),ge=ho(I.selectedModels,H);if(ge.length===0)return pr(Pt(O?"Select or enter at least one model.":"Enter at least one model.")),!1;let Ae=I.name.trim();if(wde(d.Providers,Ae,qr))return pr(Pt("Provider name already exists.")),!1;let Ze=I4(I);if(typeof Ze=="string")return pr(Qo(wr,Ze)),!1;let At=sde(I);if(typeof At=="string")return pr(Qo(wr,At)),!1;let Cr=A?.detectedProtocol??I.protocol,Ut=A?.normalizedBaseUrl||I.baseUrl,ai=A0(A),nf=I.selectedProtocols.length>0?I.selectedProtocols.filter(So=>!A||ai.includes(So)):[];if(ai.length>0&&nf.length===0)return pr(Pt("Select at least one protocol.")),!1;let BN=nf.length>0?nf:[Cr],VN=I0(I.modelDescriptions,ge),ZG=AR(I.modelDisplayNames,ge),bge=new Set(BN),ow=hde(Mde(I),A?.capabilities??[],BN.map(So=>({baseUrl:Ut,source:A?.detectedProtocol?"detected":"preset",type:So}))).filter(So=>bge.has(So.type)),XG=ow.find(So=>So.type===Cr)??ow[0],UN=XG?.type??Cr,Oh=XG?.baseUrl??Ut,JG=HM({apiKey:I.apiKey,baseUrl:Oh,name:Ae,presetId:I.presetId});if(JG)return pr(Qo(wr,JG.message)),!1;for(let So of At){let tj=HM({apiKey:So.api_key||So.apiKey||So.apikey,baseUrl:Oh,name:Ae,presetId:I.presetId});if(tj)return pr(Qo(wr,tj.message)),!1}let QG=eR({baseUrl:Oh,name:Ae,presetId:I.presetId});if(QG)return pr(Qo(wr,QG.message)),!1;let ej=L4(Ze,{apiKey:I.apiKey,baseUrl:Oh,providerName:Ae,providerPresetId:I.presetId});if(ej)return pr(Qo(wr,ej.message)),!1;let nw={api_base_url:Kb(Oh,UN),api_key:I.apiKey.trim(),capabilities:ow.length>0?ow:void 0,account:Ze,credentials:At.length>0?At:void 0,icon:I.icon.trim()||void 0,modelDescriptions:VN,modelDisplayNames:ZG,models:ge,name:Ae,type:UN},wge=j7e(I.providerPlugins,Ae,UN),Cge=Xe,WN=Zu(So=>(qr===void 0?So.Providers.push(nw):So.Providers[qr]=nw,So.providerPlugins=z7e(So.providerPlugins,wge),So.preferredProvider||(So.preferredProvider=nw.name),So));return Xu(WN),await Rl(WN,pr)?(gr(void 0),qe(!1),tt(void 0),Es(!1),Cge&&Yu(`${wr.text["Imported provider"]??"Imported provider"} ${nw.name}`.trim()),e==="onboarding"&&o(qM(WN,rw)),!0):!1}async function ome(){let A=at;if(!(!A||ya)){if(A.provider){await BG(A.provider);return}Bo(!0),ni("");try{if(A.manifest){if(!window.ccr?.fetchProviderManifest)throw new Error("Request failed.");let O=await window.ccr.fetchProviderManifest({url:A.manifest.url});kr({...A,provider:O.provider}),Bo(!1);return}Bo(!1)}catch(O){ni(Mr(O)),Bo(!1)}}}async function nme(A){let O=Zu(H=>{let ge=H.Providers[A];return H.Providers.splice(A,1),H.providerPlugins=q7e(H.providerPlugins,ge),H});return Xu(O),Rl(O,K)}function ame(A,O,H){let ge=Zu(Ae=>{let Ze=Ae.Providers[A],At=Ze?ho(Ze.models):[];if(!Ze||!At.includes(O))return Ae;let Cr={...Ze.modelDescriptions??{}},Ut=H.trim();return Ut?Cr[O]=Ut:delete Cr[O],Ze.modelDescriptions=I0(Cr,At),Ae});Xu(ge),Rl(ge,K)}async function ime(){if(Gu===void 0)return;await nme(Gu)&&tf(void 0)}function sme(){Q0(void 0),PN(C4(d)),Z0(!0)}function lme(A){let O=d.Router.rules[A];O&&(Q0(A),PN(Xue(O,d)),Z0(!0))}function ume(A){PN(O=>({...O,...A}))}function dme(){if(!RG)return;let A={condition:{left:Jue(On.conditionSource,On.conditionField),operator:On.conditionOperator,right:On.conditionRight.trim()},enabled:On.enabled,fallback:Sl(On.fallback),id:tde(d.Router.rules),name:On.name.trim(),rewrites:On.rewrites.map(ede),type:"condition"};Qt(O=>(J0===void 0?O.Router.rules=[...O.Router.rules,A]:O.Router.rules[J0]={...A,id:O.Router.rules[J0]?.id??A.id},O)),Q0(void 0),Z0(!1)}function cme(A,O){Qt(H=>(H.Router.rules=H.Router.rules.map((ge,Ae)=>Ae===A?{...ge,...O}:ge),H))}function fme(A,O){Qt(H=>{let ge=A+O;if(ge<0||ge>=H.Router.rules.length)return H;let Ae=[...H.Router.rules],[Ze]=Ae.splice(A,1);return Ae.splice(ge,0,Ze),H.Router.rules=Ae,H})}function pme(A){Qt(O=>(O.Router.rules.splice(A,1),O))}function mme(){X0!==void 0&&(pme(X0),SN(void 0))}function gme(){Y0(void 0),CN(g4(d)),Ph(""),$0(!0)}function kme(A){let O=d.virtualModelProfiles?.[A];O&&(Y0(A),CN(Due(O,d)),Ph(""),$0(!0))}function Mme(A){CN(O=>Lue(O,A)),Ph("")}function hme(){if(Rh){Ph(OG);return}Qt(A=>{let O=[...A.virtualModelProfiles??[]],H=Fm===void 0?void 0:O[Fm],ge=Tue(_m,O,Fm),Ae=H?yR(H)?.mcpServerName:void 0;Fm===void 0?O.push(ge):O[Fm]=ge,A.virtualModelProfiles=O;let Ze=[...A.agent?.mcpServers??[]],At=Ae?Ze.findIndex(Ut=>Ut.name===Ae):Ze.findIndex(Ut=>Ut.name===_m.customMcpServer.name.trim()),Cr=Rue(_m,Ze,At>=0?At:void 0);return Cr?At>=0?Ze[At]=Cr:Ze.push(Cr):Ae&&At>=0&&Ze.splice(At,1),A.agent={...A.agent??{mcpServers:[]},mcpServers:Ze},A}),Y0(void 0),$0(!1),Ph("")}function vme(A,O){Qt(H=>{let ge=[...H.virtualModelProfiles??[]],Ae=ge[A];return Ae&&(ge[A]={...Ae,enabled:O},H.virtualModelProfiles=ge),H})}function yme(A){Qt(O=>(O.virtualModelProfiles=(O.virtualModelProfiles??[]).filter((H,ge)=>ge!==A),O))}function xme(){vN(f4()),yh(""),hN(!0)}function bme(A){yh(""),vN(O=>({...O,...A}))}async function wme(){if(!window.ccr?.selectPluginDirectory){K(Pt("Local plugin selection is available in the Electron app."));return}try{let A=await window.ccr.selectPluginDirectory();if(!A)return;vN(O=>({...O,apps:A.apps,dependencies:A.dependencies,key:A.id,marketplaceId:"",modulePath:A.modulePath,selectedName:A.name||A.id})),yh(""),K("")}catch(A){K(Mr(A))}}function Cme(){if(!EG)return;let A=Sue({apps:ju.apps,dependencies:ju.dependencies,id:ju.key.trim(),modulePath:ju.modulePath.trim(),name:ju.selectedName},cG,d.plugins??[]);if(A.missing.length>0){yh(`Missing plugin dependencies: ${A.missing.join(", ")}`);return}Qt(O=>{let H=new Set((O.plugins??[]).map(Ae=>Ae.id)),ge=A.items.filter(Ae=>!H.has(Ae.id)).map(Ae=>({...Ae.apps?.length?{apps:Ae.apps}:{},enabled:!0,id:Ae.id,module:Ae.modulePath}));return O.plugins=[...O.plugins??[],...ge],O}),K(""),yh(""),hN(!1)}function Sme(A,O,H){let ge=new Set(sG(O,H));Qt(Ae=>(A==="plugins"?Ae.plugins=(Ae.plugins??[]).filter((Ze,At)=>!ge.has(At)):Ae.providerPlugins=(Ae.providerPlugins??[]).filter((Ze,At)=>!ge.has(At)),Ae))}function Pme(){zu&&(Sme(zu.source,zu.index,zu.groupIndexes),xN(void 0))}function Ame(A,O){if(A!=="plugins")return;let H=d.plugins[O];H&&(dG(c4(H)),bh(""),yN({index:O}))}function Ime(A){dG(O=>({...O,...A})),bh("")}function Dme(){if(!Em)return;let A=bue(xh.appsText);if(!A.ok){bh(A.message);return}let O=wue(xh.configText);if(!O.ok){bh(O.message);return}Qt(H=>{let ge=[...H.plugins??[]],Ae=ge[Em.index];if(!Ae)return H;let Ze=Cue(Ae.config,O.value);return ge[Em.index]={...Ae,...A.value&&A.value.length>0?{apps:A.value}:{apps:void 0},config:Ze,enabled:xh.enabled,module:xh.modulePath.trim()},H.plugins=ge,H}),yN(void 0),bh("")}function X7e(A){let O=d.plugins[A];if(O){if(YM(O))Ch(a4(O.config));else if(ZM(O))Sh(i4(O.config));else return;wh({index:A})}}function Lme(A){Ch(O=>({...O,...A}))}function Rme(){Ch(A=>({...A,rules:[...A.rules,cue(A.rules)]}))}function Nme(A,O){Ch(H=>({...H,rules:H.rules.map((ge,Ae)=>Ae===A?{...ge,...O}:ge)}))}function Tme(A){Ch(O=>({...O,rules:O.rules.filter((H,ge)=>ge!==A)}))}function Ome(){!Dl||!NG||(Qt(A=>{let O=[...A.plugins??[]],H=O[Dl.index];if(!H||!YM(H))return A;let ge=De(H.config)?{...H.config}:{};return O[Dl.index]={...H,config:{...ge,routing:l4(bN)}},A.plugins=O,A}),wh(void 0))}function Eme(A){Sh(O=>({...O,...A}))}function _me(){Sh(A=>({...A,rules:[...A.rules,fue(A.rules)]}))}function Fme(A,O){Sh(H=>({...H,rules:H.rules.map((ge,Ae)=>Ae===A?{...ge,...O}:ge)}))}function Bme(A){Sh(O=>({...O,rules:O.rules.filter((H,ge)=>ge!==A)}))}function Vme(){!Dl||!TG||(Qt(A=>{let O=[...A.plugins??[]],H=O[Dl.index];if(!H||!ZM(H))return A;let ge=De(H.config)?{...H.config}:{};return O[Dl.index]={...H,config:{...ge,routing:l4(wN)}},A.plugins=O,A}),wh(void 0))}function Ume(A,O,H,ge){let Ae=new Set(sG(O,ge));Qt(Ze=>{if(A==="plugins"){let At=[...Ze.plugins??[]];for(let Cr of Ae){let Ut=At[Cr];Ut&&(At[Cr]={...Ut,enabled:H})}return Ze.plugins=At,Ze}if(A==="providerPlugins"){let At=[...Ze.providerPlugins??[]];for(let Cr of Ae){let Ut=At[Cr];De(Ut)&&(At[Cr]={...Ut,enabled:H})}return Ze.providerPlugins=At,Ze}return Ze})}function Wme(A){let O=sR(A);Qt(H=>({...H,theme:O}))}function Gme(A){Qt(O=>({...O,launchAtLogin:A}))}function jme(A){let O=lR(A);O==="progress"&&!$M(d.trayBalanceProgress)||Qt(H=>({...H,trayIcon:O}))}function zme(A){let O=$M(A);Qt(H=>({...H,trayBalanceProgress:O,trayIcon:O?"progress":H.trayIcon==="progress"?"random":H.trayIcon}))}function qme(A){let O=Vc(A);Qt(H=>({...H,trayWidgets:O,trayWindowModules:m0([...O.map(ge=>ge.type),"footer"])}))}function Hme(A){let O=_R(A),H=new Set(O.map(ge=>ge.id));Qt(ge=>({...ge,botConfigs:O,profile:{...ge.profile,profiles:ge.profile.profiles.map(Ae=>Ae.botConfigId&&!H.has(Ae.botConfigId)?Z7e(Ae):Ae)}}))}function Kme(A){Qt(O=>({...O,observability:e5({...O.observability,...A})}))}function $me(A){Qt(O=>({...O,toolHub:B0({...O.toolHub,...A,llm:{...O.toolHub.llm,...A.llm??{}}})}))}function GG(){mG("bots"),mpe(A=>A+1),AN(!0)}function jG(){mG("appearance"),AN(!0)}function Yme(A){Qt(O=>({...O,overviewWidgets:xm(A)}))}function Zme(A){let O=JW(A);hpe(O),Hle(O)}async function Xme(){if(!window.ccr){K(Pt("Proxy restart is available in the Electron app."));return}G("proxy"),K(""),re("");try{let A=await window.ccr.restartProxy();F(A),re(Qo(wr,Qle(A)))}catch(A){K(Mr(A))}finally{G("")}}async function Jme(){if(window.ccr)try{await window.ccr.setOnboardingFinished()}catch(A){K(Mr(A));return}a(!0),s(!0),t("overview")}function Qme(A){t(A)}async function FN(){if(!window.ccr){w(qL);return}let A=await window.ccr.getProxyCertificateStatus();return w(A),A}async function ege(){rf(!0),K(""),re("");try{let A=await FN();re(A?.trusted?Pt("Proxy CA certificate is trusted."):bm(A?.message,Pt)||Pt("Proxy CA certificate is not trusted."))}catch(A){K(Mr(A))}finally{rf(!1)}}async function tge(A){if(K(""),re(""),!A){K0(!1),Qt(O=>({...O,proxy:{...O.proxy,enabled:!1}}));return}if(!window.ccr){K(Pt("Proxy certificate detection is available in the Electron app."));return}rf(!0);try{let O=await FN();if(O?.trusted){K0(!1),Qt(H=>({...H,proxy:{...H.proxy,enabled:!0}}));return}K0(!0),re(bm(O?.message,Pt)||Pt("Install and trust the proxy CA certificate before enabling proxy mode."))}catch(O){K(Mr(O))}finally{rf(!1)}}async function rge(){if(!window.ccr){K(Pt("Service control is available in the Electron app."));return}let A=M.state==="running"||M.state==="starting";B(!0),K(""),re("");try{let O=A?await window.ccr.stopGateway():await window.ccr.startGateway();v(O);let H=await window.ccr.getProxyStatus();F(H),re(Qo(wr,eue(O,A)))}catch(O){K(Mr(O))}finally{B(!1)}}async function oge(){if(!window.ccr){K(Pt("Certificate install is available in the Electron app."));return}G("cert"),K(""),re("");try{let A=await window.ccr.installProxyCertificate();w(A.status);let O=A.status.trusted?A.status:await FN();if(tpe&&O?.trusted){Qt(H=>({...H,proxy:{...H.proxy,enabled:!0}})),K0(!1),re(Pt("Certificate installed and trusted. Proxy mode enabled."));return}re(nue(A,O,Pt))}catch(A){K(Mr(A))}finally{G("")}}async function nge(){if(!window.ccr){L(BM);return}L(await window.ccr.getProxyNetworkCaptures())}async function age(){if(!Ku){Um(Oc(qu)),Bm(""),Vm(!1);return}if(!window.ccr){Um(Oc(qu));return}Vm(!0);try{Um(await window.ccr.getRequestLogs(qu)),Bm("")}catch(A){Bm(Mr(A))}finally{Vm(!1)}}async function ige(){if(!$u){Wm(Tc(Hu)),Gm(""),jm(!1);return}if(!window.ccr){Wm(Tc(Hu));return}jm(!0);try{Wm(await window.ccr.getAgentAnalysis({agent:ew,range:Hu,sessionAgent:of?.agent,sessionId:of?.id})),Gm("")}catch(A){Gm(Mr(A))}finally{jm(!1)}}function sge(A,O=!0){wpe(H=>({...H,...A,page:O?1:A.page??H.page}))}function lge(A){Ape(A),DN(void 0)}function uge(A){Lpe(A),DN(void 0)}async function dge(){if(!window.ccr){L(BM);return}L(await window.ccr.clearProxyNetworkCaptures())}async function zG(A){if(Qt(O=>({...O,proxy:{...O.proxy,captureNetwork:A}})),L(O=>({...O,captureEnabled:A})),!A&&e==="networking"&&t("server"),!!window.ccr)try{L(await window.ccr.setProxyNetworkCaptureEnabled(A)),K("")}catch(O){K(Mr(O))}}function cge(A){K(""),re(""),Qt(O=>({...O,proxy:{...O.proxy,systemProxy:A}}))}function fge(A=Pe){Oe(A),Je(Al(A)),ue(""),de(!0)}function pge(A){let O=d.profile.profiles[A];O&&(jr(A),it(F4(O,d.botConfigs)),ue(""))}function J7e(A){let O=d.profile.profiles[A];if(!O?.enabled)return;ue("");let H=Hc(O);if(H.length>1){qG(O,"choose");return}if(H[0]==="app"){HG(O);return}qG(O)}async function mge(A){let O=d.profile.profiles[A];if(!(!O?.enabled||!Hc(O).includes("cli")||vo)){ue(""),Fo({profileId:O.id,surface:"cli"});try{let H="";if(!await Rl(d,Ze=>{H=Ze,ue(Ze)})){H||ue(Pt("Failed to save profile before copying."));return}let Ae=q4(O,"cli");window.ccr?.getProfileOpenCommand&&(Ae=(await window.ccr.getProfileOpenCommand({profileId:O.id,surface:"cli"})).command),await Ls(Ae),ue(""),Yu(Pt("Copied"))}catch(H){ue(Mr(H))}finally{Fo(H=>H?.profileId===O.id&&H.surface==="cli"?void 0:H)}}}async function gge(A){let O=d.profile.profiles[A];if(!(!O?.enabled||!Hc(O).includes("app")||vo)){ue(""),Fo({profileId:O.id,surface:"app"});try{let H="";if(!await Rl(d,Ze=>{H=Ze,ue(Ze)})){H||ue(Pt("Failed to save profile before opening."));return}if(!window.ccr?.openProfile){ue(Pt("Profile opening is only available in the Electron app."));return}let Ae=await window.ccr.openProfile({profileId:O.id,surface:"app"});await Th(),Yu(Qo(wr,Ae.message))}catch(H){ue(Mr(H))}finally{Fo(H=>H?.profileId===O.id&&H.surface==="app"?void 0:H)}}}async function kge(A){let O=d.profile.profiles[A];if(!(!O?.enabled||!Hc(O).includes("app")||vo)){ue(""),Fo({profileId:O.id,surface:"app"});try{if(!window.ccr?.stopProfile){ue(Pt("Profile stopping is only available in the Electron app."));return}let H=await window.ccr.stopProfile({profileId:O.id,surface:"app"});KG(H.profileId,H.surface),await Th(),Yu(Qo(wr,H.message))}catch(H){ue(Mr(H))}finally{Fo(H=>H?.profileId===O.id&&H.surface==="app"?void 0:H)}}}async function qG(A,O="cli"){let H=q4(A,"cli");if(Yt({busy:"cli",command:H,mode:O,profile:A}),!await Rl(d,ue)){Yt(ge=>ge?.profile.id===A.id?{...ge,busy:"",error:Q||Pt("Failed to save profile before opening.")}:ge);return}if(!window.ccr?.getProfileOpenCommand){Yt(ge=>ge?.profile.id===A.id?{...ge,busy:""}:ge);return}try{let ge=await window.ccr.getProfileOpenCommand({profileId:A.id,surface:"cli"});Yt(Ae=>Ae?.profile.id===A.id?{...Ae,busy:"",command:ge.command,error:""}:Ae)}catch(ge){Yt(Ae=>Ae?.profile.id===A.id?{...Ae,busy:"",error:Mr(ge)}:Ae)}}async function HG(A){if(Yt(O=>O?.profile.id===A.id?{...O,busy:"app",error:""}:{busy:"app",mode:"choose",profile:A}),!await Rl(d,ue)){Yt(O=>O?.profile.id===A.id?{...O,busy:"",error:Q||Pt("Failed to save profile before opening.")}:O);return}if(!window.ccr?.openProfile){Yt(O=>O?.profile.id===A.id?{...O,busy:"",error:Pt("Profile opening is only available in the Electron app.")}:O);return}try{let O=await window.ccr.openProfile({profileId:A.id,surface:"app"});await Th(),Yt(void 0),Yu(Qo(wr,O.message))}catch(O){Yt(H=>H?.profile.id===A.id?{...H,busy:"",error:Mr(O)}:H)}}async function Mge(A){if(Yt(O=>O?.profile.id===A.id?{...O,busy:"app",error:""}:O),!window.ccr?.stopProfile){Yt(O=>O?.profile.id===A.id?{...O,busy:"",error:Pt("Profile stopping is only available in the Electron app.")}:O);return}try{let O=await window.ccr.stopProfile({profileId:A.id,surface:"app"});KG(O.profileId,O.surface),await Th(),Yt(void 0),Yu(Qo(wr,O.message))}catch(O){Yt(H=>H?.profile.id===A.id?{...H,busy:"",error:Mr(O)}:H)}}async function Th(){if(!window.ccr?.getProfileRuntimeStatus){yo({profiles:[]});return}try{yo(await window.ccr.getProfileRuntimeStatus())}catch{yo({profiles:[]})}}function KG(A,O){yo(H=>({profiles:H.profiles.filter(ge=>ge.profileId!==A||ge.surface!==O)}))}function $G(A){Je(O=>{let H={...O,...A};if(A.agent&&A.agent!==O.agent){let ge=O.name===va(O.agent)?void 0:H.name;return{...Al(A.agent,ge),envRows:j4(A.agent,O.envRows)}}return H}),ue("")}function hge(A){it(O=>{let H={...O,...A};if(A.agent&&A.agent!==O.agent){let ge=O.name===va(O.agent)?void 0:H.name;return{...Al(A.agent,ge),envRows:j4(A.agent,O.envRows)}}return H}),ue("")}async function YG(){if(ir)return!1;if(!ON)return ue(Pt("Profile name, required target settings, and environment variable keys are required.")),!1;Ns("add");let A=e==="onboarding"?d.profile.profiles.findIndex(Ae=>Ae.enabled&&Ae.agent===Y.agent):-1,O=A>=0?d.profile.profiles[A]:void 0,H=V4(Y,d.profile.profiles,O,d.botConfigs);Oe(H.agent);let ge=Zu(Ae=>({...Ae,profile:{...Ae.profile,enabled:!0,profiles:(()=>{let Ze=[...Ae.profile.profiles],At=A>=0&&Ze[A]?A:Ze.length;return Ze[At]=H,fm(Ze,At)})()}}));Xu(ge);try{return await Rl(ge,ue,{applyProfile:!0})?(de(!1),Je(Al()),ue(""),e==="onboarding"&&(s(!0),o("enter")),!0):!1}finally{Ns("")}}async function vge(){if(ir||Lt===void 0)return!1;if(!IG)return ue(Pt("Profile name, required target settings, and environment variable keys are required.")),!1;Ns("edit");let A=d.profile.profiles[Lt];if(!A)return Ns(""),ue(Pt("Profile no longer exists.")),!1;let O=V4(_e,d.profile.profiles,A,d.botConfigs);Oe(O.agent);let H=Zu(ge=>{let Ae=[...ge.profile.profiles];return Ae[Lt]=O,{...ge,profile:{...ge.profile,profiles:fm(Ae,Lt)}}});Xu(H);try{return await Rl(H,ue)?(jr(void 0),it(Al()),ue(""),!0):!1}finally{Ns("")}}function yge(A,O){Qt(H=>{let ge=[...H.profile.profiles],Ae=ge[A];return Ae?(ge[A]=ah({...Ae,...O},A),{...H,profile:{...H.profile,profiles:fm(ge,A)}}):H})}function xge(A){Qt(O=>({...O,profile:{...O.profile,profiles:O.profile.profiles.filter((H,ge)=>ge!==A)}}))}return(0,Uu.jsx)(Lc.Provider,{value:wr,children:(0,Uu.jsx)(lk,{id:"home-shell",children:(0,Uu.jsxs)("div",{className:"relative flex h-full min-h-0 w-full min-w-0 overflow-hidden bg-background text-foreground max-[720px]:flex-col",children:[e==="onboarding"?(0,Uu.jsx)(aG,{loaded:f&&g&&h,onboarding:{activeStep:r,canSubmitProfile:ON,canSubmitProvider:AG,config:d,endpoint:SG,gatewayStatus:M,onCheckProvider:UG,onComplete:Jme,onChangeProfile:$G,onChangeProvider:VG,onSelectStep:o,onSubmitProfile:YG,onSubmitProvider:WG,profileDraft:Y,profileError:Q,providerDraft:I,providerError:uG,providerConnectivityLoading:Fe,providerConnectivityProbe:Ie,providerProbe:X,providerProbeLoading:Se,readiness:rw}}):(0,Uu.jsx)(iG,{activeView:e,agentAnalysisEnabled:$u,compactLayout:gpe,copy:wr,gatewayActionBusy:_,gatewayEndpoint:SG,gatewayStatus:M,isMac:PG,needsTrafficLightSafeArea:Wpe,networkCaptureEnabled:Dh,onDownloadUpdate:Hpe,onOpenSettings:jG,onSelectNavigationItem:Qme,onToggleSidebar:()=>dpe(A=>!A),requestLogsEnabled:Ku,shouldReduceMotion:Vpe,sidebarOpen:pG,toggleGatewayService:rge,updateActionBusy:!!$,updateStatus:U,visibleNavigation:Bpe,viewProps:{apiKeys:{addApiKey:$pe,apiKeys:NN,editApiKey:Zpe,error:Qc,notify:Yu,removeApiKey:eme},extensions:{configureExtension:Ame,config:d,installExtension:xme,removeExtension:(A,O,H)=>xN({groupIndexes:sG(O,H),index:O,source:A}),setExtensionEnabled:Ume},logs:{error:bpe,filter:qu,loading:Cpe,page:Spe,refreshLogs:()=>{age()},updateFilter:sge},models:{config:d,updateModelDescription:ame},networking:{clearCaptures:()=>{dge()},proxyStatus:C,refreshCaptures:()=>{nge()},setCaptureEnabled:A=>{zG(A)},snapshot:P},observability:{agentFilter:ew,error:Ipe,loading:Dpe,range:Hu,refreshAnalysis:()=>{ige()},selectedSession:of,setAgentFilter:lge,setRange:uge,setSelectedSession:DN,snapshot:Ppe},overview:{onWidgetsChange:Yme,overviewWidgets:xm(d.overviewWidgets),providerAccounts:LN,providerAccountRefreshing:hG,refreshProviderAccounts:()=>{Tpe()},setUsageRange:Rpe,usageRange:Ah,usageStats:Npe},profile:{addProfile:fge,applyError:Q,copyProfileCliCommand:A=>{mge(A)},config:d,editProfile:pge,openProfileApp:A=>{gge(A)},profileActionBusy:vo,profileRuntimeStatus:Yi,removeProfile:xge,stopProfileApp:A=>{kge(A)},updateProfileItem:yge},providers:{accountSnapshots:LN,addProvider:tme,editProvider:rme,notify:Yu,providers:Fpe,removeProvider:tf},routing:{addRule:sme,config:d,editRule:lme,moveRule:fme,providers:d.Providers,removeRule:SN,updateBuiltInRule:(A,O)=>Qt(H=>(H.Router.builtInRules=n4(H.Router.builtInRules),A==="claude-code"?H.Router.builtInRules["claude-code"]={...H.Router.builtInRules["claude-code"],...O}:H.Router.builtInRules.codex={...H.Router.builtInRules.codex,...O},H)),updateFallback:A=>Qt(O=>(O.Router.fallback=Sl(A),O)),updateRule:cme},server:{actionBusy:T,actionError:W,actionMessage:j,config:d,installProxyCertificate:oge,onProxyEnabledChange:A=>{tge(A)},onProxyNetworkCaptureChange:A=>{zG(A)},onProxySystemProxyChange:cge,proxyCertificateChecking:MN,proxyCertificateStatus:b,proxyStatus:C,refreshProxyCertificateStatus:()=>{ege()},restartProxy:Xme,updateConfig:Qt},virtualModels:{addVirtualModel:gme,editVirtualModel:kme,profiles:d.virtualModelProfiles??[],removeVirtualModel:yme,setVirtualModelEnabled:vme}}}),(0,Uu.jsx)(E5,{apiKeyAdd:vh?{canSubmit:DG,draft:gn,error:Qc,onChange:Ype,onClose:()=>ri(!1),onSubmit:Jpe}:void 0,apiKeyCreated:Wu?{apiKeyName:Wu.name?.trim()||Pt("API key"),apiKeyValue:Wu.key,onClose:()=>ef(void 0)}:void 0,apiKeyEdit:_pe?{canSubmit:LG,draft:Ts,error:Qc,onChange:Xpe,onClose:()=>Jc(void 0),onSubmit:Qpe}:void 0,claudeDesignConfig:tw&&YM(tw)?{canSubmit:NG,draft:bN,routesLabel:"Claude Design routes",sourceModelLabel:"Claude Design model",sourceModelDefaults:{model:"claude-opus-4-8",pattern:"claude-"},onAddRule:Rme,onChange:Lme,onChangeRule:Nme,onClose:()=>wh(void 0),onRemoveRule:Tme,onSubmit:Ome,providers:d.Providers}:void 0,cursorProxyConfig:tw&&ZM(tw)?{canSubmit:TG,draft:wN,routesLabel:"Cursor Proxy routes",sourceModelLabel:"Cursor model",sourceModelDefaults:{model:"default",pattern:"cursor-"},onAddRule:_me,onChange:Eme,onChangeRule:Fme,onClose:()=>wh(void 0),onRemoveRule:Bme,onSubmit:Vme,providers:d.Providers}:void 0,extensionDelete:wG?{extension:wG,onClose:()=>xN(void 0),onConfirm:Pme}:void 0,extensionInstall:rpe?{canSubmit:EG,draft:ju,error:ope,marketplace:cG,onChange:bme,onChooseLocal:wme,onClose:()=>hN(!1),onSubmit:Cme}:void 0,extensionSettings:CG?{draft:xh,error:npe,extension:CG,onChange:Ime,onClose:()=>yN(void 0),onSubmit:Dme}:void 0,profileAdd:Ue?{botConfigs:d.botConfigs,canSubmit:ON,draft:Y,error:Q,mode:"add",onChange:$G,onCreateBot:GG,onClose:()=>de(!1),providers:d.Providers,submitting:ir==="add",virtualModelProfiles:d.virtualModelProfiles??[],onSubmit:YG}:void 0,profileEdit:Lt!==void 0?{botConfigs:d.botConfigs,canSubmit:IG,draft:_e,error:Q,mode:"edit",onChange:hge,onCreateBot:GG,onClose:()=>{jr(void 0),ue("")},providers:d.Providers,submitting:ir==="edit",virtualModelProfiles:d.virtualModelProfiles??[],onSubmit:vge}:void 0,profileOpen:zr?{appRunning:Yi.profiles.some(A=>A.profileId===zr.profile.id&&A.surface==="app"&&A.state==="running"),busy:zr.busy,command:zr.command,error:zr.error,mode:zr.mode,onChooseApp:()=>{HG(zr.profile)},onClose:()=>Yt(void 0),onStopApp:()=>{Mge(zr.profile)},profile:zr.profile}:void 0,providerDeepLink:at&&!at.provider?{busy:ya,error:Zn,onClose:()=>{ya||kr(void 0)},onSubmit:ome,presetsLoaded:h,request:at}:void 0,providerDelete:xG?{onClose:()=>tf(void 0),onConfirm:ime,provider:xG}:void 0,providerUpsert:Os?{canSubmit:AG,connectivityLoading:Fe,connectivityProbe:Ie,draft:I,error:uG,importProvider:Xe?st:void 0,onChange:VG,mode:qr===void 0?"add":"edit",onClose:()=>{Es(!1),gr(void 0),qe(!1),tt(void 0)},onCheck:UG,onSubmit:WG,probe:X,probeLoading:Se,providerPlugins:d.providerPlugins??[],providers:d.Providers,submitLabel:Xe?Pt("Import"):void 0,title:Xe?Pt("Import Provider"):void 0}:void 0,routingDelete:bG?{onClose:()=>SN(void 0),onConfirm:mme,rule:bG}:void 0,routingUpsert:spe?{canSubmit:RG,draft:On,mode:J0===void 0?"add":"edit",onChange:ume,onClose:()=>{Z0(!1),Q0(void 0)},onSubmit:dme,providers:d.Providers}:void 0,settings:cpe?{appInfo:l,botAddRequestKey:ppe,botConfigs:d.botConfigs,copy:wr,initialPage:fpe,languagePreference:IN,launchAtLogin:!!d.launchAtLogin,onChangeBotConfigs:Hme,onChangeLaunchAtLogin:Gme,onChangeLanguage:Zme,onChangeObservability:Kme,onChangeTheme:Wme,onChangeToolHub:$me,onChangeTrayBalanceProgress:zme,onChangeTrayIcon:jme,onChangeTrayWidgets:qme,onClose:()=>AN(!1),observability:d.observability,profiles:d.profile.profiles,providers:d.Providers,systemLanguage:kG,systemTheme:ype,themePreference:d.theme||"system",toolHub:d.toolHub,providerAccountSnapshots:LN,trayBalanceProgress:$M(d.trayBalanceProgress),trayIconPreference:d.trayIcon||"random",traySupported:Upe,trayWidgets:Vc(d.trayWidgets??Hb,d.trayWindowModules,d.trayComponentVariants)}:void 0,update:N?{actionBusy:$,actionError:se,copy:wr,onCheck:_G,onClose:()=>{$!=="install"&&(R(!1),pe(""))},onDownload:FG,onInstall:Kpe,status:U}:void 0,virtualModelUpsert:ape?{canSubmit:zpe,draft:_m,error:ipe||OG,mcpServers:d.agent?.mcpServers??[],mode:Fm===void 0?"add":"edit",onChange:Mme,onClose:()=>{$0(!1),Y0(void 0)},onSubmit:hme,providers:d.Providers}:void 0}),(0,Uu.jsx)(f5,{toast:Mpe})]})})})}function Z7e(e){let{botConfigId:t,botGateway:r,...o}=e;return o}function Zfe(e,t){return!e.botEnabled||t.some(r=>r.id===e.botConfigId.trim())}var Xfe=Y7e;var kN=z(ze()),epe=document.getElementById("root");if(!epe)throw new Error("Root element not found");(0,Qfe.createRoot)(epe).render((0,kN.jsx)(Jfe.default.StrictMode,{children:(0,kN.jsx)(jH,{children:(0,kN.jsx)(Xfe,{})})}));