@chosengeneration/light-code 0.80.1 → 0.89.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.cjs +75502 -0
- package/dist/{cli.js → server.cjs} +3856 -2684
- package/package.json +4 -7
- package/dist/client/client.css +0 -227
- package/dist/client/client.js +0 -209
- package/dist/client/guide/appearance-dark.svg +0 -1
- package/dist/client/guide/appearance-light.svg +0 -1
- package/dist/client/guide/approvals-dark.svg +0 -1
- package/dist/client/guide/approvals-light.svg +0 -1
- package/dist/client/guide/chat-dark.svg +0 -1
- package/dist/client/guide/chat-light.svg +0 -1
- package/dist/client/guide/customData-dark.svg +0 -1
- package/dist/client/guide/customData-light.svg +0 -1
- package/dist/client/guide/expert-dark.svg +0 -1
- package/dist/client/guide/expert-light.svg +0 -1
- package/dist/client/guide/mcp-dark.svg +0 -1
- package/dist/client/guide/mcp-light.svg +0 -1
- package/dist/client/guide/network-dark.svg +0 -1
- package/dist/client/guide/network-light.svg +0 -1
- package/dist/client/guide/orientation-dark.svg +0 -1
- package/dist/client/guide/orientation-light.svg +0 -1
- package/dist/client/guide/privacy-dark.svg +0 -1
- package/dist/client/guide/privacy-light.svg +0 -1
- package/dist/client/guide/providers-dark.svg +0 -1
- package/dist/client/guide/providers-light.svg +0 -1
- package/dist/client/guide/python-dark.svg +0 -1
- package/dist/client/guide/python-light.svg +0 -1
- package/dist/client/guide/schedules-dark.svg +0 -1
- package/dist/client/guide/schedules-light.svg +0 -1
- package/dist/client/guide/search-dark.svg +0 -1
- package/dist/client/guide/search-light.svg +0 -1
- package/dist/client/guide/skills-dark.svg +0 -1
- package/dist/client/guide/skills-light.svg +0 -1
- package/dist/client/guide/tools-dark.svg +0 -1
- package/dist/client/guide/tools-light.svg +0 -1
- package/dist/client/index.html +0 -36
- package/dist/server.js +0 -72264
package/dist/client/client.js
DELETED
|
@@ -1,209 +0,0 @@
|
|
|
1
|
-
"use strict";(()=>{var FD=Object.create;var uh=Object.defineProperty;var HD=Object.getOwnPropertyDescriptor;var VD=Object.getOwnPropertyNames;var qD=Object.getPrototypeOf,GD=Object.prototype.hasOwnProperty;var Ei=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports),Xi=(e,t)=>{for(var n in t)uh(e,n,{get:t[n],enumerable:!0})},WD=(e,t,n,r)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of VD(t))!GD.call(e,i)&&i!==n&&uh(e,i,{get:()=>t[i],enumerable:!(r=HD(t,i))||r.enumerable});return e};var U=(e,t,n)=>(n=e!=null?FD(qD(e)):{},WD(t||!e||!e.__esModule?uh(n,"default",{value:e,enumerable:!0}):n,e));var K0=Ei(nu=>{"use strict";var YD=Symbol.for("react.transitional.element"),JD=Symbol.for("react.fragment");function X0(e,t,n){var r=null;if(n!==void 0&&(r=""+n),t.key!==void 0&&(r=""+t.key),"key"in t){n={};for(var i in t)i!=="key"&&(n[i]=t[i])}else n=t;return t=n.ref,{$$typeof:YD,type:e,key:r,ref:t!==void 0?t:null,props:n}}nu.Fragment=JD;nu.jsx=X0;nu.jsxs=X0});var re=Ei((r8,Q0)=>{"use strict";Q0.exports=K0()});var I$=Ei(ke=>{"use strict";var Ub=Symbol.for("react.transitional.element"),IN=Symbol.for("react.portal"),DN=Symbol.for("react.fragment"),AN=Symbol.for("react.strict_mode"),jN=Symbol.for("react.profiler"),ON=Symbol.for("react.consumer"),NN=Symbol.for("react.context"),UN=Symbol.for("react.forward_ref"),RN=Symbol.for("react.suspense"),MN=Symbol.for("react.memo"),_$=Symbol.for("react.lazy"),BN=Symbol.for("react.activity"),x$=Symbol.iterator;function LN(e){return e===null||typeof e!="object"?null:(e=x$&&e[x$]||e["@@iterator"],typeof e=="function"?e:null)}var $$={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},z$=Object.assign,T$={};function Ha(e,t,n){this.props=e,this.context=t,this.refs=T$,this.updater=n||$$}Ha.prototype.isReactComponent={};Ha.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};Ha.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function C$(){}C$.prototype=Ha.prototype;function Rb(e,t,n){this.props=e,this.context=t,this.refs=T$,this.updater=n||$$}var Mb=Rb.prototype=new C$;Mb.constructor=Rb;z$(Mb,Ha.prototype);Mb.isPureReactComponent=!0;var S$=Array.isArray;function Nb(){}var ft={H:null,A:null,T:null,S:null},E$=Object.prototype.hasOwnProperty;function Bb(e,t,n){var r=n.ref;return{$$typeof:Ub,type:e,key:t,ref:r!==void 0?r:null,props:n}}function PN(e,t){return Bb(e.type,t,e.props)}function Lb(e){return typeof e=="object"&&e!==null&&e.$$typeof===Ub}function ZN(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(n){return t[n]})}var k$=/\/+/g;function Ob(e,t){return typeof e=="object"&&e!==null&&e.key!=null?ZN(""+e.key):t.toString(36)}function FN(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(Nb,Nb):(e.status="pending",e.then(function(t){e.status==="pending"&&(e.status="fulfilled",e.value=t)},function(t){e.status==="pending"&&(e.status="rejected",e.reason=t)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function Fa(e,t,n,r,i){var o=typeof e;(o==="undefined"||o==="boolean")&&(e=null);var a=!1;if(e===null)a=!0;else switch(o){case"bigint":case"string":case"number":a=!0;break;case"object":switch(e.$$typeof){case Ub:case IN:a=!0;break;case _$:return a=e._init,Fa(a(e._payload),t,n,r,i)}}if(a)return i=i(e),a=r===""?"."+Ob(e,0):r,S$(i)?(n="",a!=null&&(n=a.replace(k$,"$&/")+"/"),Fa(i,t,n,"",function(u){return u})):i!=null&&(Lb(i)&&(i=PN(i,n+(i.key==null||e&&e.key===i.key?"":(""+i.key).replace(k$,"$&/")+"/")+a)),t.push(i)),1;a=0;var l=r===""?".":r+":";if(S$(e))for(var c=0;c<e.length;c++)r=e[c],o=l+Ob(r,c),a+=Fa(r,t,n,o,i);else if(c=LN(e),typeof c=="function")for(e=c.call(e),c=0;!(r=e.next()).done;)r=r.value,o=l+Ob(r,c++),a+=Fa(r,t,n,o,i);else if(o==="object"){if(typeof e.then=="function")return Fa(FN(e),t,n,r,i);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 a}function Wd(e,t,n){if(e==null)return e;var r=[],i=0;return Fa(e,r,"","",function(o){return t.call(n,o,i++)}),r}function HN(e){if(e._status===-1){var t=e._result;t=t(),t.then(function(n){(e._status===0||e._status===-1)&&(e._status=1,e._result=n)},function(n){(e._status===0||e._status===-1)&&(e._status=2,e._result=n)}),e._status===-1&&(e._status=0,e._result=t)}if(e._status===1)return e._result.default;throw e._result}var w$=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},VN={map:Wd,forEach:function(e,t,n){Wd(e,function(){t.apply(this,arguments)},n)},count:function(e){var t=0;return Wd(e,function(){t++}),t},toArray:function(e){return Wd(e,function(t){return t})||[]},only:function(e){if(!Lb(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};ke.Activity=BN;ke.Children=VN;ke.Component=Ha;ke.Fragment=DN;ke.Profiler=jN;ke.PureComponent=Rb;ke.StrictMode=AN;ke.Suspense=RN;ke.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=ft;ke.__COMPILER_RUNTIME={__proto__:null,c:function(e){return ft.H.useMemoCache(e)}};ke.cache=function(e){return function(){return e.apply(null,arguments)}};ke.cacheSignal=function(){return null};ke.cloneElement=function(e,t,n){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var r=z$({},e.props),i=e.key;if(t!=null)for(o in t.key!==void 0&&(i=""+t.key),t)!E$.call(t,o)||o==="key"||o==="__self"||o==="__source"||o==="ref"&&t.ref===void 0||(r[o]=t[o]);var o=arguments.length-2;if(o===1)r.children=n;else if(1<o){for(var a=Array(o),l=0;l<o;l++)a[l]=arguments[l+2];r.children=a}return Bb(e.type,i,r)};ke.createContext=function(e){return e={$$typeof:NN,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:ON,_context:e},e};ke.createElement=function(e,t,n){var r,i={},o=null;if(t!=null)for(r in t.key!==void 0&&(o=""+t.key),t)E$.call(t,r)&&r!=="key"&&r!=="__self"&&r!=="__source"&&(i[r]=t[r]);var a=arguments.length-2;if(a===1)i.children=n;else if(1<a){for(var l=Array(a),c=0;c<a;c++)l[c]=arguments[c+2];i.children=l}if(e&&e.defaultProps)for(r in a=e.defaultProps,a)i[r]===void 0&&(i[r]=a[r]);return Bb(e,o,i)};ke.createRef=function(){return{current:null}};ke.forwardRef=function(e){return{$$typeof:UN,render:e}};ke.isValidElement=Lb;ke.lazy=function(e){return{$$typeof:_$,_payload:{_status:-1,_result:e},_init:HN}};ke.memo=function(e,t){return{$$typeof:MN,type:e,compare:t===void 0?null:t}};ke.startTransition=function(e){var t=ft.T,n={};ft.T=n;try{var r=e(),i=ft.S;i!==null&&i(n,r),typeof r=="object"&&r!==null&&typeof r.then=="function"&&r.then(Nb,w$)}catch(o){w$(o)}finally{t!==null&&n.types!==null&&(t.types=n.types),ft.T=t}};ke.unstable_useCacheRefresh=function(){return ft.H.useCacheRefresh()};ke.use=function(e){return ft.H.use(e)};ke.useActionState=function(e,t,n){return ft.H.useActionState(e,t,n)};ke.useCallback=function(e,t){return ft.H.useCallback(e,t)};ke.useContext=function(e){return ft.H.useContext(e)};ke.useDebugValue=function(){};ke.useDeferredValue=function(e,t){return ft.H.useDeferredValue(e,t)};ke.useEffect=function(e,t){return ft.H.useEffect(e,t)};ke.useEffectEvent=function(e){return ft.H.useEffectEvent(e)};ke.useId=function(){return ft.H.useId()};ke.useImperativeHandle=function(e,t,n){return ft.H.useImperativeHandle(e,t,n)};ke.useInsertionEffect=function(e,t){return ft.H.useInsertionEffect(e,t)};ke.useLayoutEffect=function(e,t){return ft.H.useLayoutEffect(e,t)};ke.useMemo=function(e,t){return ft.H.useMemo(e,t)};ke.useOptimistic=function(e,t){return ft.H.useOptimistic(e,t)};ke.useReducer=function(e,t,n){return ft.H.useReducer(e,t,n)};ke.useRef=function(e){return ft.H.useRef(e)};ke.useState=function(e){return ft.H.useState(e)};ke.useSyncExternalStore=function(e,t,n){return ft.H.useSyncExternalStore(e,t,n)};ke.useTransition=function(){return ft.H.useTransition()};ke.version="19.2.8"});var pe=Ei((QL,D$)=>{"use strict";D$.exports=I$()});var dz=Ei(gn=>{"use strict";var rU=pe();function uz(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function Zr(){}var pn={d:{f:Zr,r:function(){throw Error(uz(522))},D:Zr,C:Zr,L:Zr,m:Zr,X:Zr,S:Zr,M:Zr},p:0,findDOMNode:null},oU=Symbol.for("react.portal");function aU(e,t,n){var r=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:oU,key:r==null?null:""+r,children:e,containerInfo:t,implementation:n}}var Hs=rU.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function Jd(e,t){if(e==="font")return"";if(typeof t=="string")return t==="use-credentials"?t:""}gn.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=pn;gn.createPortal=function(e,t){var n=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!t||t.nodeType!==1&&t.nodeType!==9&&t.nodeType!==11)throw Error(uz(299));return aU(e,t,null,n)};gn.flushSync=function(e){var t=Hs.T,n=pn.p;try{if(Hs.T=null,pn.p=2,e)return e()}finally{Hs.T=t,pn.p=n,pn.d.f()}};gn.preconnect=function(e,t){typeof e=="string"&&(t?(t=t.crossOrigin,t=typeof t=="string"?t==="use-credentials"?t:"":void 0):t=null,pn.d.C(e,t))};gn.prefetchDNS=function(e){typeof e=="string"&&pn.d.D(e)};gn.preinit=function(e,t){if(typeof e=="string"&&t&&typeof t.as=="string"){var n=t.as,r=Jd(n,t.crossOrigin),i=typeof t.integrity=="string"?t.integrity:void 0,o=typeof t.fetchPriority=="string"?t.fetchPriority:void 0;n==="style"?pn.d.S(e,typeof t.precedence=="string"?t.precedence:void 0,{crossOrigin:r,integrity:i,fetchPriority:o}):n==="script"&&pn.d.X(e,{crossOrigin:r,integrity:i,fetchPriority:o,nonce:typeof t.nonce=="string"?t.nonce:void 0})}};gn.preinitModule=function(e,t){if(typeof e=="string")if(typeof t=="object"&&t!==null){if(t.as==null||t.as==="script"){var n=Jd(t.as,t.crossOrigin);pn.d.M(e,{crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0})}}else t==null&&pn.d.M(e)};gn.preload=function(e,t){if(typeof e=="string"&&typeof t=="object"&&t!==null&&typeof t.as=="string"){var n=t.as,r=Jd(n,t.crossOrigin);pn.d.L(e,n,{crossOrigin:r,integrity:typeof t.integrity=="string"?t.integrity:void 0,nonce:typeof t.nonce=="string"?t.nonce:void 0,type:typeof t.type=="string"?t.type:void 0,fetchPriority:typeof t.fetchPriority=="string"?t.fetchPriority:void 0,referrerPolicy:typeof t.referrerPolicy=="string"?t.referrerPolicy:void 0,imageSrcSet:typeof t.imageSrcSet=="string"?t.imageSrcSet:void 0,imageSizes:typeof t.imageSizes=="string"?t.imageSizes:void 0,media:typeof t.media=="string"?t.media:void 0})}};gn.preloadModule=function(e,t){if(typeof e=="string")if(t){var n=Jd(t.as,t.crossOrigin);pn.d.m(e,{as:typeof t.as=="string"&&t.as!=="script"?t.as:void 0,crossOrigin:n,integrity:typeof t.integrity=="string"?t.integrity:void 0})}else pn.d.m(e)};gn.requestFormReset=function(e){pn.d.r(e)};gn.unstable_batchedUpdates=function(e,t){return e(t)};gn.useFormState=function(e,t,n){return Hs.H.useFormState(e,t,n)};gn.useFormStatus=function(){return Hs.H.useHostTransitionStatus()};gn.version="19.2.8"});var Jb=Ei((pP,mz)=>{"use strict";function fz(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(fz)}catch(e){console.error(e)}}fz(),mz.exports=dz()});var eT=Ei(yt=>{"use strict";function Rx(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(0<Sf(i,t))e[r]=t,e[n]=i,n=r;else break e}}function Fi(e){return e.length===0?null:e[0]}function wf(e){if(e.length===0)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var a=2*(r+1)-1,l=e[a],c=a+1,u=e[c];if(0>Sf(l,n))c<i&&0>Sf(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[a]=n,r=a);else if(c<i&&0>Sf(u,n))e[r]=u,e[c]=n,r=c;else break e}}return t}function Sf(e,t){var n=e.sortIndex-t.sortIndex;return n!==0?n:e.id-t.id}yt.unstable_now=void 0;typeof performance=="object"&&typeof performance.now=="function"?(V2=performance,yt.unstable_now=function(){return V2.now()}):(Ox=Date,q2=Ox.now(),yt.unstable_now=function(){return Ox.now()-q2});var V2,Ox,q2,sr=[],Xr=[],$R=1,oi=null,un=3,Mx=!1,Qs=!1,ec=!1,Bx=!1,Y2=typeof setTimeout=="function"?setTimeout:null,J2=typeof clearTimeout=="function"?clearTimeout:null,G2=typeof setImmediate<"u"?setImmediate:null;function kf(e){for(var t=Fi(Xr);t!==null;){if(t.callback===null)wf(Xr);else if(t.startTime<=e)wf(Xr),t.sortIndex=t.expirationTime,Rx(sr,t);else break;t=Fi(Xr)}}function Lx(e){if(ec=!1,kf(e),!Qs)if(Fi(sr)!==null)Qs=!0,ul||(ul=!0,cl());else{var t=Fi(Xr);t!==null&&Px(Lx,t.startTime-e)}}var ul=!1,tc=-1,X2=5,K2=-1;function Q2(){return Bx?!0:!(yt.unstable_now()-K2<X2)}function Nx(){if(Bx=!1,ul){var e=yt.unstable_now();K2=e;var t=!0;try{e:{Qs=!1,ec&&(ec=!1,J2(tc),tc=-1),Mx=!0;var n=un;try{t:{for(kf(e),oi=Fi(sr);oi!==null&&!(oi.expirationTime>e&&Q2());){var r=oi.callback;if(typeof r=="function"){oi.callback=null,un=oi.priorityLevel;var i=r(oi.expirationTime<=e);if(e=yt.unstable_now(),typeof i=="function"){oi.callback=i,kf(e),t=!0;break t}oi===Fi(sr)&&wf(sr),kf(e)}else wf(sr);oi=Fi(sr)}if(oi!==null)t=!0;else{var o=Fi(Xr);o!==null&&Px(Lx,o.startTime-e),t=!1}}break e}finally{oi=null,un=n,Mx=!1}t=void 0}}finally{t?cl():ul=!1}}}var cl;typeof G2=="function"?cl=function(){G2(Nx)}:typeof MessageChannel<"u"?(Ux=new MessageChannel,W2=Ux.port2,Ux.port1.onmessage=Nx,cl=function(){W2.postMessage(null)}):cl=function(){Y2(Nx,0)};var Ux,W2;function Px(e,t){tc=Y2(function(){e(yt.unstable_now())},t)}yt.unstable_IdlePriority=5;yt.unstable_ImmediatePriority=1;yt.unstable_LowPriority=4;yt.unstable_NormalPriority=3;yt.unstable_Profiling=null;yt.unstable_UserBlockingPriority=2;yt.unstable_cancelCallback=function(e){e.callback=null};yt.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"):X2=0<e?Math.floor(1e3/e):5};yt.unstable_getCurrentPriorityLevel=function(){return un};yt.unstable_next=function(e){switch(un){case 1:case 2:case 3:var t=3;break;default:t=un}var n=un;un=t;try{return e()}finally{un=n}};yt.unstable_requestPaint=function(){Bx=!0};yt.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=un;un=e;try{return t()}finally{un=n}};yt.unstable_scheduleCallback=function(e,t,n){var r=yt.unstable_now();switch(typeof n=="object"&&n!==null?(n=n.delay,n=typeof n=="number"&&0<n?r+n:r):n=r,e){case 1:var i=-1;break;case 2:i=250;break;case 5:i=1073741823;break;case 4:i=1e4;break;default:i=5e3}return i=n+i,e={id:$R++,callback:t,priorityLevel:e,startTime:n,expirationTime:i,sortIndex:-1},n>r?(e.sortIndex=n,Rx(Xr,e),Fi(sr)===null&&e===Fi(Xr)&&(ec?(J2(tc),tc=-1):ec=!0,Px(Lx,n-r))):(e.sortIndex=i,Rx(sr,e),Qs||Mx||(Qs=!0,ul||(ul=!0,cl()))),e};yt.unstable_shouldYield=Q2;yt.unstable_wrapCallback=function(e){var t=un;return function(){var n=un;un=t;try{return e.apply(this,arguments)}finally{un=n}}}});var nT=Ei((gH,tT)=>{"use strict";tT.exports=eT()});var hE=Ei(Wm=>{"use strict";var Bt=nT(),C4=pe(),zR=Jb();function O(e){var t="https://react.dev/errors/"+e;if(1<arguments.length){t+="?args[]="+encodeURIComponent(arguments[1]);for(var n=2;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n])}return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function E4(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function Pc(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do t=e,(t.flags&4098)!==0&&(n=t.return),e=t.return;while(e)}return t.tag===3?n:null}function I4(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 D4(e){if(e.tag===31){var t=e.memoizedState;if(t===null&&(e=e.alternate,e!==null&&(t=e.memoizedState)),t!==null)return t.dehydrated}return null}function iT(e){if(Pc(e)!==e)throw Error(O(188))}function TR(e){var t=e.alternate;if(!t){if(t=Pc(e),t===null)throw Error(O(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(i===null)break;var o=i.alternate;if(o===null){if(r=i.return,r!==null){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return iT(i),e;if(o===r)return iT(i),t;o=o.sibling}throw Error(O(188))}if(n.return!==r.return)n=i,r=o;else{for(var a=!1,l=i.child;l;){if(l===n){a=!0,n=i,r=o;break}if(l===r){a=!0,r=i,n=o;break}l=l.sibling}if(!a){for(l=o.child;l;){if(l===n){a=!0,n=o,r=i;break}if(l===r){a=!0,r=o,n=i;break}l=l.sibling}if(!a)throw Error(O(189))}}if(n.alternate!==r)throw Error(O(190))}if(n.tag!==3)throw Error(O(188));return n.stateNode.current===n?e:t}function A4(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e;for(e=e.child;e!==null;){if(t=A4(e),t!==null)return t;e=e.sibling}return null}var gt=Object.assign,CR=Symbol.for("react.element"),_f=Symbol.for("react.transitional.element"),cc=Symbol.for("react.portal"),gl=Symbol.for("react.fragment"),j4=Symbol.for("react.strict_mode"),S1=Symbol.for("react.profiler"),O4=Symbol.for("react.consumer"),gr=Symbol.for("react.context"),gS=Symbol.for("react.forward_ref"),k1=Symbol.for("react.suspense"),w1=Symbol.for("react.suspense_list"),yS=Symbol.for("react.memo"),Kr=Symbol.for("react.lazy"),_1=Symbol.for("react.activity"),ER=Symbol.for("react.memo_cache_sentinel"),rT=Symbol.iterator;function nc(e){return e===null||typeof e!="object"?null:(e=rT&&e[rT]||e["@@iterator"],typeof e=="function"?e:null)}var IR=Symbol.for("react.client.reference");function $1(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===IR?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case gl:return"Fragment";case S1:return"Profiler";case j4:return"StrictMode";case k1:return"Suspense";case w1:return"SuspenseList";case _1:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case cc:return"Portal";case gr:return e.displayName||"Context";case O4:return(e._context.displayName||"Context")+".Consumer";case gS:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case yS:return t=e.displayName||null,t!==null?t:$1(e.type)||"Memo";case Kr:t=e._payload,e=e._init;try{return $1(e(t))}catch{}}return null}var uc=Array.isArray,be=C4.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Ze=zR.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Wo={pending:!1,data:null,method:null,action:null},z1=[],yl=-1;function Wi(e){return{current:e}}function Vt(e){0>yl||(e.current=z1[yl],z1[yl]=null,yl--)}function dt(e,t){yl++,z1[yl]=e.current,e.current=t}var Gi=Wi(null),Tc=Wi(null),co=Wi(null),im=Wi(null);function rm(e,t){switch(dt(co,t),dt(Tc,e),dt(Gi,null),t.nodeType){case 9:case 11:e=(e=t.documentElement)&&(e=e.namespaceURI)?d4(e):0;break;default:if(e=t.tagName,t=t.namespaceURI)t=d4(t),e=eE(t,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}Vt(Gi),dt(Gi,e)}function Nl(){Vt(Gi),Vt(Tc),Vt(co)}function T1(e){e.memoizedState!==null&&dt(im,e);var t=Gi.current,n=eE(t,e.type);t!==n&&(dt(Tc,e),dt(Gi,n))}function om(e){Tc.current===e&&(Vt(Gi),Vt(Tc)),im.current===e&&(Vt(im),Mc._currentValue=Wo)}var Zx,oT;function Ho(e){if(Zx===void 0)try{throw Error()}catch(n){var t=n.stack.trim().match(/\n( *(at )?)/);Zx=t&&t[1]||"",oT=-1<n.stack.indexOf(`
|
|
2
|
-
at`)?" (<anonymous>)":-1<n.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
3
|
-
`+Zx+e+oT}var Fx=!1;function Hx(e,t){if(!e||Fx)return"";Fx=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(t){var m=function(){throw Error()};if(Object.defineProperty(m.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(m,[])}catch(f){var h=f}Reflect.construct(e,[],m)}else{try{m.call()}catch(f){h=f}e.call(m.prototype)}}else{try{throw Error()}catch(f){h=f}(m=e())&&typeof m.catch=="function"&&m.catch(function(){})}}catch(f){if(f&&h&&typeof f.stack=="string")return[f.stack,h.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var i=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");i&&i.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=r.DetermineComponentFrameRoot(),a=o[0],l=o[1];if(a&&l){var c=a.split(`
|
|
4
|
-
`),u=l.split(`
|
|
5
|
-
`);for(i=r=0;r<c.length&&!c[r].includes("DetermineComponentFrameRoot");)r++;for(;i<u.length&&!u[i].includes("DetermineComponentFrameRoot");)i++;if(r===c.length||i===u.length)for(r=c.length-1,i=u.length-1;1<=r&&0<=i&&c[r]!==u[i];)i--;for(;1<=r&&0<=i;r--,i--)if(c[r]!==u[i]){if(r!==1||i!==1)do if(r--,i--,0>i||c[r]!==u[i]){var d=`
|
|
6
|
-
`+c[r].replace(" at new "," at ");return e.displayName&&d.includes("<anonymous>")&&(d=d.replace("<anonymous>",e.displayName)),d}while(1<=r&&0<=i);break}}}finally{Fx=!1,Error.prepareStackTrace=n}return(n=e?e.displayName||e.name:"")?Ho(n):""}function DR(e,t){switch(e.tag){case 26:case 27:case 5:return Ho(e.type);case 16:return Ho("Lazy");case 13:return e.child!==t&&t!==null?Ho("Suspense Fallback"):Ho("Suspense");case 19:return Ho("SuspenseList");case 0:case 15:return Hx(e.type,!1);case 11:return Hx(e.type.render,!1);case 1:return Hx(e.type,!0);case 31:return Ho("Activity");default:return""}}function aT(e){try{var t="",n=null;do t+=DR(e,n),n=e,e=e.return;while(e);return t}catch(r){return`
|
|
7
|
-
Error generating stack: `+r.message+`
|
|
8
|
-
`+r.stack}}var C1=Object.prototype.hasOwnProperty,vS=Bt.unstable_scheduleCallback,Vx=Bt.unstable_cancelCallback,AR=Bt.unstable_shouldYield,jR=Bt.unstable_requestPaint,Vn=Bt.unstable_now,OR=Bt.unstable_getCurrentPriorityLevel,N4=Bt.unstable_ImmediatePriority,U4=Bt.unstable_UserBlockingPriority,am=Bt.unstable_NormalPriority,NR=Bt.unstable_LowPriority,R4=Bt.unstable_IdlePriority,UR=Bt.log,RR=Bt.unstable_setDisableYieldValue,Zc=null,qn=null;function ro(e){if(typeof UR=="function"&&RR(e),qn&&typeof qn.setStrictMode=="function")try{qn.setStrictMode(Zc,e)}catch{}}var Gn=Math.clz32?Math.clz32:LR,MR=Math.log,BR=Math.LN2;function LR(e){return e>>>=0,e===0?32:31-(MR(e)/BR|0)|0}var $f=256,zf=262144,Tf=4194304;function Vo(e){var t=e&42;if(t!==0)return t;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function Am(e,t,n){var r=e.pendingLanes;if(r===0)return 0;var i=0,o=e.suspendedLanes,a=e.pingedLanes;e=e.warmLanes;var l=r&134217727;return l!==0?(r=l&~o,r!==0?i=Vo(r):(a&=l,a!==0?i=Vo(a):n||(n=l&~e,n!==0&&(i=Vo(n))))):(l=r&~o,l!==0?i=Vo(l):a!==0?i=Vo(a):n||(n=r&~e,n!==0&&(i=Vo(n)))),i===0?0:t!==0&&t!==i&&(t&o)===0&&(o=i&-i,n=t&-t,o>=n||o===32&&(n&4194048)!==0)?t:i}function Fc(e,t){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&t)===0}function PR(e,t){switch(e){case 1:case 2:case 4:case 8:case 64:return t+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function M4(){var e=Tf;return Tf<<=1,(Tf&62914560)===0&&(Tf=4194304),e}function qx(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Hc(e,t){e.pendingLanes|=t,t!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function ZR(e,t,n,r,i,o){var a=e.pendingLanes;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=n,e.entangledLanes&=n,e.errorRecoveryDisabledLanes&=n,e.shellSuspendCounter=0;var l=e.entanglements,c=e.expirationTimes,u=e.hiddenUpdates;for(n=a&~n;0<n;){var d=31-Gn(n),m=1<<d;l[d]=0,c[d]=-1;var h=u[d];if(h!==null)for(u[d]=null,d=0;d<h.length;d++){var f=h[d];f!==null&&(f.lane&=-536870913)}n&=~m}r!==0&&B4(e,r,0),o!==0&&i===0&&e.tag!==0&&(e.suspendedLanes|=o&~(a&~t))}function B4(e,t,n){e.pendingLanes|=t,e.suspendedLanes&=~t;var r=31-Gn(t);e.entangledLanes|=t,e.entanglements[r]=e.entanglements[r]|1073741824|n&261930}function L4(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-Gn(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}function P4(e,t){var n=t&-t;return n=(n&42)!==0?1:bS(n),(n&(e.suspendedLanes|t))!==0?0:n}function bS(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function xS(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Z4(){var e=Ze.p;return e!==0?e:(e=window.event,e===void 0?32:dE(e.type))}function lT(e,t){var n=Ze.p;try{return Ze.p=e,t()}finally{Ze.p=n}}var wo=Math.random().toString(36).slice(2),Qt="__reactFiber$"+wo,On="__reactProps$"+wo,ql="__reactContainer$"+wo,E1="__reactEvents$"+wo,FR="__reactListeners$"+wo,HR="__reactHandles$"+wo,sT="__reactResources$"+wo,Vc="__reactMarker$"+wo;function SS(e){delete e[Qt],delete e[On],delete e[E1],delete e[FR],delete e[HR]}function vl(e){var t=e[Qt];if(t)return t;for(var n=e.parentNode;n;){if(t=n[ql]||n[Qt]){if(n=t.alternate,t.child!==null||n!==null&&n.child!==null)for(e=g4(e);e!==null;){if(n=e[Qt])return n;e=g4(e)}return t}e=n,n=e.parentNode}return null}function Gl(e){if(e=e[Qt]||e[ql]){var t=e.tag;if(t===5||t===6||t===13||t===31||t===26||t===27||t===3)return e}return null}function dc(e){var t=e.tag;if(t===5||t===26||t===27||t===6)return e.stateNode;throw Error(O(33))}function Cl(e){var t=e[sT];return t||(t=e[sT]={hoistableStyles:new Map,hoistableScripts:new Map}),t}function Ht(e){e[Vc]=!0}var F4=new Set,H4={};function ra(e,t){Ul(e,t),Ul(e+"Capture",t)}function Ul(e,t){for(H4[e]=t,e=0;e<t.length;e++)F4.add(t[e])}var VR=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),cT={},uT={};function qR(e){return C1.call(uT,e)?!0:C1.call(cT,e)?!1:VR.test(e)?uT[e]=!0:(cT[e]=!0,!1)}function Zf(e,t,n){if(qR(t))if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":e.removeAttribute(t);return;case"boolean":var r=t.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(t);return}}e.setAttribute(t,""+n)}}function Cf(e,t,n){if(n===null)e.removeAttribute(t);else{switch(typeof n){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(t);return}e.setAttribute(t,""+n)}}function cr(e,t,n,r){if(r===null)e.removeAttribute(n);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(n);return}e.setAttributeNS(t,n,""+r)}}function li(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function V4(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function GR(e,t,n){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,t);if(!e.hasOwnProperty(t)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var i=r.get,o=r.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(a){n=""+a,o.call(this,a)}}),Object.defineProperty(e,t,{enumerable:r.enumerable}),{getValue:function(){return n},setValue:function(a){n=""+a},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function I1(e){if(!e._valueTracker){var t=V4(e)?"checked":"value";e._valueTracker=GR(e,t,""+e[t])}}function q4(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=V4(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function lm(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}}var WR=/[\n"\\]/g;function ui(e){return e.replace(WR,function(t){return"\\"+t.charCodeAt(0).toString(16)+" "})}function D1(e,t,n,r,i,o,a,l){e.name="",a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"?e.type=a:e.removeAttribute("type"),t!=null?a==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+li(t)):e.value!==""+li(t)&&(e.value=""+li(t)):a!=="submit"&&a!=="reset"||e.removeAttribute("value"),t!=null?A1(e,a,li(t)):n!=null?A1(e,a,li(n)):r!=null&&e.removeAttribute("value"),i==null&&o!=null&&(e.defaultChecked=!!o),i!=null&&(e.checked=i&&typeof i!="function"&&typeof i!="symbol"),l!=null&&typeof l!="function"&&typeof l!="symbol"&&typeof l!="boolean"?e.name=""+li(l):e.removeAttribute("name")}function G4(e,t,n,r,i,o,a,l){if(o!=null&&typeof o!="function"&&typeof o!="symbol"&&typeof o!="boolean"&&(e.type=o),t!=null||n!=null){if(!(o!=="submit"&&o!=="reset"||t!=null)){I1(e);return}n=n!=null?""+li(n):"",t=t!=null?""+li(t):n,l||t===e.value||(e.value=t),e.defaultValue=t}r=r??i,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=l?e.checked:!!r,e.defaultChecked=!!r,a!=null&&typeof a!="function"&&typeof a!="symbol"&&typeof a!="boolean"&&(e.name=a),I1(e)}function A1(e,t,n){t==="number"&&lm(e.ownerDocument)===e||e.defaultValue===""+n||(e.defaultValue=""+n)}function El(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+li(n),t=null,i=0;i<e.length;i++){if(e[i].value===n){e[i].selected=!0,r&&(e[i].defaultSelected=!0);return}t!==null||e[i].disabled||(t=e[i])}t!==null&&(t.selected=!0)}}function W4(e,t,n){if(t!=null&&(t=""+li(t),t!==e.value&&(e.value=t),n==null)){e.defaultValue!==t&&(e.defaultValue=t);return}e.defaultValue=n!=null?""+li(n):""}function Y4(e,t,n,r){if(t==null){if(r!=null){if(n!=null)throw Error(O(92));if(uc(r)){if(1<r.length)throw Error(O(93));r=r[0]}n=r}n==null&&(n=""),t=n}n=li(t),e.defaultValue=n,r=e.textContent,r===n&&r!==""&&r!==null&&(e.value=r),I1(e)}function Rl(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var YR=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function dT(e,t,n){var r=t.indexOf("--")===0;n==null||typeof n=="boolean"||n===""?r?e.setProperty(t,""):t==="float"?e.cssFloat="":e[t]="":r?e.setProperty(t,n):typeof n!="number"||n===0||YR.has(t)?t==="float"?e.cssFloat=n:e[t]=(""+n).trim():e[t]=n+"px"}function J4(e,t,n){if(t!=null&&typeof t!="object")throw Error(O(62));if(e=e.style,n!=null){for(var r in n)!n.hasOwnProperty(r)||t!=null&&t.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var i in t)r=t[i],t.hasOwnProperty(i)&&n[i]!==r&&dT(e,i,r)}else for(var o in t)t.hasOwnProperty(o)&&dT(e,o,t[o])}function kS(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var JR=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),XR=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Ff(e){return XR.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function yr(){}var j1=null;function wS(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var bl=null,Il=null;function fT(e){var t=Gl(e);if(t&&(e=t.stateNode)){var n=e[On]||null;e:switch(e=t.stateNode,t.type){case"input":if(D1(e,n.value,n.defaultValue,n.defaultValue,n.checked,n.defaultChecked,n.type,n.name),t=n.name,n.type==="radio"&&t!=null){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll('input[name="'+ui(""+t)+'"][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=r[On]||null;if(!i)throw Error(O(90));D1(r,i.value,i.defaultValue,i.defaultValue,i.checked,i.defaultChecked,i.type,i.name)}}for(t=0;t<n.length;t++)r=n[t],r.form===e.form&&q4(r)}break e;case"textarea":W4(e,n.value,n.defaultValue);break e;case"select":t=n.value,t!=null&&El(e,!!n.multiple,t,!1)}}}var Gx=!1;function X4(e,t,n){if(Gx)return e(t,n);Gx=!0;try{var r=e(t);return r}finally{if(Gx=!1,(bl!==null||Il!==null)&&(Hm(),bl&&(t=bl,e=Il,Il=bl=null,fT(t),e)))for(t=0;t<e.length;t++)fT(e[t])}}function Cc(e,t){var n=e.stateNode;if(n===null)return null;var r=n[On]||null;if(r===null)return null;n=r[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":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(n&&typeof n!="function")throw Error(O(231,t,typeof n));return n}var kr=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),O1=!1;if(kr)try{dl={},Object.defineProperty(dl,"passive",{get:function(){O1=!0}}),window.addEventListener("test",dl,dl),window.removeEventListener("test",dl,dl)}catch{O1=!1}var dl,oo=null,_S=null,Hf=null;function K4(){if(Hf)return Hf;var e,t=_S,n=t.length,r,i="value"in oo?oo.value:oo.textContent,o=i.length;for(e=0;e<n&&t[e]===i[e];e++);var a=n-e;for(r=1;r<=a&&t[n-r]===i[o-r];r++);return Hf=i.slice(e,1<r?1-r:void 0)}function Vf(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 Ef(){return!0}function mT(){return!1}function Nn(e){function t(n,r,i,o,a){this._reactName=n,this._targetInst=i,this.type=r,this.nativeEvent=o,this.target=a,this.currentTarget=null;for(var l in e)e.hasOwnProperty(l)&&(n=e[l],this[l]=n?n(o):o[l]);return this.isDefaultPrevented=(o.defaultPrevented!=null?o.defaultPrevented:o.returnValue===!1)?Ef:mT,this.isPropagationStopped=mT,this}return gt(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var n=this.nativeEvent;n&&(n.preventDefault?n.preventDefault():typeof n.returnValue!="unknown"&&(n.returnValue=!1),this.isDefaultPrevented=Ef)},stopPropagation:function(){var n=this.nativeEvent;n&&(n.stopPropagation?n.stopPropagation():typeof n.cancelBubble!="unknown"&&(n.cancelBubble=!0),this.isPropagationStopped=Ef)},persist:function(){},isPersistent:Ef}),t}var oa={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},jm=Nn(oa),qc=gt({},oa,{view:0,detail:0}),KR=Nn(qc),Wx,Yx,ic,Om=gt({},qc,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:$S,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!==ic&&(ic&&e.type==="mousemove"?(Wx=e.screenX-ic.screenX,Yx=e.screenY-ic.screenY):Yx=Wx=0,ic=e),Wx)},movementY:function(e){return"movementY"in e?e.movementY:Yx}}),hT=Nn(Om),QR=gt({},Om,{dataTransfer:0}),eM=Nn(QR),tM=gt({},qc,{relatedTarget:0}),Jx=Nn(tM),nM=gt({},oa,{animationName:0,elapsedTime:0,pseudoElement:0}),iM=Nn(nM),rM=gt({},oa,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),oM=Nn(rM),aM=gt({},oa,{data:0}),pT=Nn(aM),lM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},sM={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"},cM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uM(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):(e=cM[e])?!!t[e]:!1}function $S(){return uM}var dM=gt({},qc,{key:function(e){if(e.key){var t=lM[e.key]||e.key;if(t!=="Unidentified")return t}return e.type==="keypress"?(e=Vf(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?sM[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:$S,charCode:function(e){return e.type==="keypress"?Vf(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vf(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),fM=Nn(dM),mM=gt({},Om,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),gT=Nn(mM),hM=gt({},qc,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:$S}),pM=Nn(hM),gM=gt({},oa,{propertyName:0,elapsedTime:0,pseudoElement:0}),yM=Nn(gM),vM=gt({},Om,{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}),bM=Nn(vM),xM=gt({},oa,{newState:0,oldState:0}),SM=Nn(xM),kM=[9,13,27,32],zS=kr&&"CompositionEvent"in window,hc=null;kr&&"documentMode"in document&&(hc=document.documentMode);var wM=kr&&"TextEvent"in window&&!hc,Q4=kr&&(!zS||hc&&8<hc&&11>=hc),yT=" ",vT=!1;function eC(e,t){switch(e){case"keyup":return kM.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function tC(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var xl=!1;function _M(e,t){switch(e){case"compositionend":return tC(t);case"keypress":return t.which!==32?null:(vT=!0,yT);case"textInput":return e=t.data,e===yT&&vT?null:e;default:return null}}function $M(e,t){if(xl)return e==="compositionend"||!zS&&eC(e,t)?(e=K4(),Hf=_S=oo=null,xl=!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 Q4&&t.locale!=="ko"?null:t.data;default:return null}}var zM={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 bT(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t==="input"?!!zM[e.type]:t==="textarea"}function nC(e,t,n,r){bl?Il?Il.push(r):Il=[r]:bl=r,t=$m(t,"onChange"),0<t.length&&(n=new jm("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var pc=null,Ec=null;function TM(e){X6(e,0)}function Nm(e){var t=dc(e);if(q4(t))return e}function xT(e,t){if(e==="change")return t}var iC=!1;kr&&(kr?(Df="oninput"in document,Df||(Xx=document.createElement("div"),Xx.setAttribute("oninput","return;"),Df=typeof Xx.oninput=="function"),If=Df):If=!1,iC=If&&(!document.documentMode||9<document.documentMode));var If,Df,Xx;function ST(){pc&&(pc.detachEvent("onpropertychange",rC),Ec=pc=null)}function rC(e){if(e.propertyName==="value"&&Nm(Ec)){var t=[];nC(t,Ec,e,wS(e)),X4(TM,t)}}function CM(e,t,n){e==="focusin"?(ST(),pc=t,Ec=n,pc.attachEvent("onpropertychange",rC)):e==="focusout"&&ST()}function EM(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Nm(Ec)}function IM(e,t){if(e==="click")return Nm(t)}function DM(e,t){if(e==="input"||e==="change")return Nm(t)}function AM(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}var Yn=typeof Object.is=="function"?Object.is:AM;function Ic(e,t){if(Yn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!C1.call(t,i)||!Yn(e[i],t[i]))return!1}return!0}function kT(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function wT(e,t){var n=kT(e);e=0;for(var r;n;){if(n.nodeType===3){if(r=e+n.textContent.length,e<=t&&r>=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=kT(n)}}function oC(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?oC(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function aC(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var t=lm(e.document);t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=lm(e.document)}return t}function TS(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}var jM=kr&&"documentMode"in document&&11>=document.documentMode,Sl=null,N1=null,gc=null,U1=!1;function _T(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;U1||Sl==null||Sl!==lm(r)||(r=Sl,"selectionStart"in r&&TS(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),gc&&Ic(gc,r)||(gc=r,r=$m(N1,"onSelect"),0<r.length&&(t=new jm("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=Sl)))}function Fo(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var kl={animationend:Fo("Animation","AnimationEnd"),animationiteration:Fo("Animation","AnimationIteration"),animationstart:Fo("Animation","AnimationStart"),transitionrun:Fo("Transition","TransitionRun"),transitionstart:Fo("Transition","TransitionStart"),transitioncancel:Fo("Transition","TransitionCancel"),transitionend:Fo("Transition","TransitionEnd")},Kx={},lC={};kr&&(lC=document.createElement("div").style,"AnimationEvent"in window||(delete kl.animationend.animation,delete kl.animationiteration.animation,delete kl.animationstart.animation),"TransitionEvent"in window||delete kl.transitionend.transition);function aa(e){if(Kx[e])return Kx[e];if(!kl[e])return e;var t=kl[e],n;for(n in t)if(t.hasOwnProperty(n)&&n in lC)return Kx[e]=t[n];return e}var sC=aa("animationend"),cC=aa("animationiteration"),uC=aa("animationstart"),OM=aa("transitionrun"),NM=aa("transitionstart"),UM=aa("transitioncancel"),dC=aa("transitionend"),fC=new Map,R1="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");R1.push("scrollEnd");function zi(e,t){fC.set(e,t),ra(t,[e])}var sm=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var t=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(t))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ai=[],wl=0,CS=0;function Um(){for(var e=wl,t=CS=wl=0;t<e;){var n=ai[t];ai[t++]=null;var r=ai[t];ai[t++]=null;var i=ai[t];ai[t++]=null;var o=ai[t];if(ai[t++]=null,r!==null&&i!==null){var a=r.pending;a===null?i.next=i:(i.next=a.next,a.next=i),r.pending=i}o!==0&&mC(n,i,o)}}function Rm(e,t,n,r){ai[wl++]=e,ai[wl++]=t,ai[wl++]=n,ai[wl++]=r,CS|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function ES(e,t,n,r){return Rm(e,t,n,r),cm(e)}function la(e,t){return Rm(e,null,null,t),cm(e)}function mC(e,t,n){e.lanes|=n;var r=e.alternate;r!==null&&(r.lanes|=n);for(var i=!1,o=e.return;o!==null;)o.childLanes|=n,r=o.alternate,r!==null&&(r.childLanes|=n),o.tag===22&&(e=o.stateNode,e===null||e._visibility&1||(i=!0)),e=o,o=o.return;return e.tag===3?(o=e.stateNode,i&&t!==null&&(i=31-Gn(n),e=o.hiddenUpdates,r=e[i],r===null?e[i]=[t]:r.push(t),t.lane=n|536870912),o):null}function cm(e){if(50<$c)throw $c=0,rS=null,Error(O(185));for(var t=e.return;t!==null;)e=t,t=e.return;return e.tag===3?e.stateNode:null}var _l={};function RM(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Fn(e,t,n,r){return new RM(e,t,n,r)}function IS(e){return e=e.prototype,!(!e||!e.isReactComponent)}function br(e,t){var n=e.alternate;return n===null?(n=Fn(e.tag,t,e.key,e.mode),n.elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=e.flags&65011712,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n.refCleanup=e.refCleanup,n}function hC(e,t){e.flags&=65011714;var n=e.alternate;return n===null?(e.childLanes=0,e.lanes=t,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=n.childLanes,e.lanes=n.lanes,e.child=n.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=n.memoizedProps,e.memoizedState=n.memoizedState,e.updateQueue=n.updateQueue,e.type=n.type,t=n.dependencies,e.dependencies=t===null?null:{lanes:t.lanes,firstContext:t.firstContext}),e}function qf(e,t,n,r,i,o){var a=0;if(r=e,typeof e=="function")IS(e)&&(a=1);else if(typeof e=="string")a=L3(e,n,Gi.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case _1:return e=Fn(31,n,t,i),e.elementType=_1,e.lanes=o,e;case gl:return Yo(n.children,i,o,t);case j4:a=8,i|=24;break;case S1:return e=Fn(12,n,t,i|2),e.elementType=S1,e.lanes=o,e;case k1:return e=Fn(13,n,t,i),e.elementType=k1,e.lanes=o,e;case w1:return e=Fn(19,n,t,i),e.elementType=w1,e.lanes=o,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case gr:a=10;break e;case O4:a=9;break e;case gS:a=11;break e;case yS:a=14;break e;case Kr:a=16,r=null;break e}a=29,n=Error(O(130,e===null?"null":typeof e,"")),r=null}return t=Fn(a,n,t,i),t.elementType=e,t.type=r,t.lanes=o,t}function Yo(e,t,n,r){return e=Fn(7,e,r,t),e.lanes=n,e}function Qx(e,t,n){return e=Fn(6,e,null,t),e.lanes=n,e}function pC(e){var t=Fn(18,null,null,0);return t.stateNode=e,t}function e1(e,t,n){return t=Fn(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}var $T=new WeakMap;function di(e,t){if(typeof e=="object"&&e!==null){var n=$T.get(e);return n!==void 0?n:(t={value:e,source:t,stack:aT(t)},$T.set(e,t),t)}return{value:e,source:t,stack:aT(t)}}var $l=[],zl=0,um=null,Dc=0,si=[],ci=0,bo=null,Hi=1,Vi="";function hr(e,t){$l[zl++]=Dc,$l[zl++]=um,um=e,Dc=t}function gC(e,t,n){si[ci++]=Hi,si[ci++]=Vi,si[ci++]=bo,bo=e;var r=Hi;e=Vi;var i=32-Gn(r)-1;r&=~(1<<i),n+=1;var o=32-Gn(t)+i;if(30<o){var a=i-i%5;o=(r&(1<<a)-1).toString(32),r>>=a,i-=a,Hi=1<<32-Gn(t)+i|n<<i|r,Vi=o+e}else Hi=1<<o|n<<i|r,Vi=e}function DS(e){e.return!==null&&(hr(e,1),gC(e,1,0))}function AS(e){for(;e===um;)um=$l[--zl],$l[zl]=null,Dc=$l[--zl],$l[zl]=null;for(;e===bo;)bo=si[--ci],si[ci]=null,Vi=si[--ci],si[ci]=null,Hi=si[--ci],si[ci]=null}function yC(e,t){si[ci++]=Hi,si[ci++]=Vi,si[ci++]=bo,Hi=t.id,Vi=t.overflow,bo=e}var en=null,pt=null,Me=!1,uo=null,fi=!1,M1=Error(O(519));function xo(e){var t=Error(O(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Ac(di(t,e)),M1}function zT(e){var t=e.stateNode,n=e.type,r=e.memoizedProps;switch(t[Qt]=e,t[On]=r,n){case"dialog":Ae("cancel",t),Ae("close",t);break;case"iframe":case"object":case"embed":Ae("load",t);break;case"video":case"audio":for(n=0;n<Uc.length;n++)Ae(Uc[n],t);break;case"source":Ae("error",t);break;case"img":case"image":case"link":Ae("error",t),Ae("load",t);break;case"details":Ae("toggle",t);break;case"input":Ae("invalid",t),G4(t,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":Ae("invalid",t);break;case"textarea":Ae("invalid",t),Y4(t,r.value,r.defaultValue,r.children)}n=r.children,typeof n!="string"&&typeof n!="number"&&typeof n!="bigint"||t.textContent===""+n||r.suppressHydrationWarning===!0||Q6(t.textContent,n)?(r.popover!=null&&(Ae("beforetoggle",t),Ae("toggle",t)),r.onScroll!=null&&Ae("scroll",t),r.onScrollEnd!=null&&Ae("scrollend",t),r.onClick!=null&&(t.onclick=yr),t=!0):t=!1,t||xo(e,!0)}function TT(e){for(en=e.return;en;)switch(en.tag){case 5:case 31:case 13:fi=!1;return;case 27:case 3:fi=!0;return;default:en=en.return}}function fl(e){if(e!==en)return!1;if(!Me)return TT(e),Me=!0,!1;var t=e.tag,n;if((n=t!==3&&t!==27)&&((n=t===5)&&(n=e.type,n=!(n!=="form"&&n!=="button")||cS(e.type,e.memoizedProps)),n=!n),n&&pt&&xo(e),TT(e),t===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));pt=p4(e)}else if(t===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(317));pt=p4(e)}else t===27?(t=pt,_o(e.type)?(e=mS,mS=null,pt=e):pt=t):pt=en?hi(e.stateNode.nextSibling):null;return!0}function Qo(){pt=en=null,Me=!1}function t1(){var e=uo;return e!==null&&(An===null?An=e:An.push.apply(An,e),uo=null),e}function Ac(e){uo===null?uo=[e]:uo.push(e)}var B1=Wi(null),sa=null,vr=null;function eo(e,t,n){dt(B1,t._currentValue),t._currentValue=n}function xr(e){e._currentValue=B1.current,Vt(B1)}function L1(e,t,n){for(;e!==null;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,r!==null&&(r.childLanes|=t)):r!==null&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function P1(e,t,n,r){var i=e.child;for(i!==null&&(i.return=e);i!==null;){var o=i.dependencies;if(o!==null){var a=i.child;o=o.firstContext;e:for(;o!==null;){var l=o;o=i;for(var c=0;c<t.length;c++)if(l.context===t[c]){o.lanes|=n,l=o.alternate,l!==null&&(l.lanes|=n),L1(o.return,n,e),r||(a=null);break e}o=l.next}}else if(i.tag===18){if(a=i.return,a===null)throw Error(O(341));a.lanes|=n,o=a.alternate,o!==null&&(o.lanes|=n),L1(a,n,e),a=null}else a=i.child;if(a!==null)a.return=i;else for(a=i;a!==null;){if(a===e){a=null;break}if(i=a.sibling,i!==null){i.return=a.return,a=i;break}a=a.return}i=a}}function Wl(e,t,n,r){e=null;for(var i=t,o=!1;i!==null;){if(!o){if((i.flags&524288)!==0)o=!0;else if((i.flags&262144)!==0)break}if(i.tag===10){var a=i.alternate;if(a===null)throw Error(O(387));if(a=a.memoizedProps,a!==null){var l=i.type;Yn(i.pendingProps.value,a.value)||(e!==null?e.push(l):e=[l])}}else if(i===im.current){if(a=i.alternate,a===null)throw Error(O(387));a.memoizedState.memoizedState!==i.memoizedState.memoizedState&&(e!==null?e.push(Mc):e=[Mc])}i=i.return}e!==null&&P1(t,e,n,r),t.flags|=262144}function dm(e){for(e=e.firstContext;e!==null;){if(!Yn(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function ea(e){sa=e,vr=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function tn(e){return vC(sa,e)}function Af(e,t){return sa===null&&ea(e),vC(e,t)}function vC(e,t){var n=t._currentValue;if(t={context:t,memoizedValue:n,next:null},vr===null){if(e===null)throw Error(O(308));vr=t,e.dependencies={lanes:0,firstContext:t},e.flags|=524288}else vr=vr.next=t;return n}var MM=typeof AbortController<"u"?AbortController:function(){var e=[],t=this.signal={aborted:!1,addEventListener:function(n,r){e.push(r)}};this.abort=function(){t.aborted=!0,e.forEach(function(n){return n()})}},BM=Bt.unstable_scheduleCallback,LM=Bt.unstable_NormalPriority,Dt={$$typeof:gr,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function jS(){return{controller:new MM,data:new Map,refCount:0}}function Gc(e){e.refCount--,e.refCount===0&&BM(LM,function(){e.controller.abort()})}var yc=null,Z1=0,Ml=0,Dl=null;function PM(e,t){if(yc===null){var n=yc=[];Z1=0,Ml=r0(),Dl={status:"pending",value:void 0,then:function(r){n.push(r)}}}return Z1++,t.then(CT,CT),t}function CT(){if(--Z1===0&&yc!==null){Dl!==null&&(Dl.status="fulfilled");var e=yc;yc=null,Ml=0,Dl=null;for(var t=0;t<e.length;t++)(0,e[t])()}}function ZM(e,t){var n=[],r={status:"pending",value:null,reason:null,then:function(i){n.push(i)}};return e.then(function(){r.status="fulfilled",r.value=t;for(var i=0;i<n.length;i++)(0,n[i])(t)},function(i){for(r.status="rejected",r.reason=i,i=0;i<n.length;i++)(0,n[i])(void 0)}),r}var ET=be.S;be.S=function(e,t){A6=Vn(),typeof t=="object"&&t!==null&&typeof t.then=="function"&&PM(e,t),ET!==null&&ET(e,t)};var Jo=Wi(null);function OS(){var e=Jo.current;return e!==null?e:ot.pooledCache}function Gf(e,t){t===null?dt(Jo,Jo.current):dt(Jo,t.pool)}function bC(){var e=OS();return e===null?null:{parent:Dt._currentValue,pool:e}}var Yl=Error(O(460)),NS=Error(O(474)),Mm=Error(O(542)),fm={then:function(){}};function IT(e){return e=e.status,e==="fulfilled"||e==="rejected"}function xC(e,t,n){switch(n=e[n],n===void 0?e.push(t):n!==t&&(t.then(yr,yr),t=n),t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,AT(e),e;default:if(typeof t.status=="string")t.then(yr,yr);else{if(e=ot,e!==null&&100<e.shellSuspendCounter)throw Error(O(482));e=t,e.status="pending",e.then(function(r){if(t.status==="pending"){var i=t;i.status="fulfilled",i.value=r}},function(r){if(t.status==="pending"){var i=t;i.status="rejected",i.reason=r}})}switch(t.status){case"fulfilled":return t.value;case"rejected":throw e=t.reason,AT(e),e}throw Xo=t,Yl}}function qo(e){try{var t=e._init;return t(e._payload)}catch(n){throw n!==null&&typeof n=="object"&&typeof n.then=="function"?(Xo=n,Yl):n}}var Xo=null;function DT(){if(Xo===null)throw Error(O(459));var e=Xo;return Xo=null,e}function AT(e){if(e===Yl||e===Mm)throw Error(O(483))}var Al=null,jc=0;function jf(e){var t=jc;return jc+=1,Al===null&&(Al=[]),xC(Al,e,t)}function rc(e,t){t=t.props.ref,e.ref=t!==void 0?t:null}function Of(e,t){throw t.$$typeof===CR?Error(O(525)):(e=Object.prototype.toString.call(t),Error(O(31,e==="[object Object]"?"object with keys {"+Object.keys(t).join(", ")+"}":e)))}function SC(e){function t(p,b){if(e){var S=p.deletions;S===null?(p.deletions=[b],p.flags|=16):S.push(b)}}function n(p,b){if(!e)return null;for(;b!==null;)t(p,b),b=b.sibling;return null}function r(p){for(var b=new Map;p!==null;)p.key!==null?b.set(p.key,p):b.set(p.index,p),p=p.sibling;return b}function i(p,b){return p=br(p,b),p.index=0,p.sibling=null,p}function o(p,b,S){return p.index=S,e?(S=p.alternate,S!==null?(S=S.index,S<b?(p.flags|=67108866,b):S):(p.flags|=67108866,b)):(p.flags|=1048576,b)}function a(p){return e&&p.alternate===null&&(p.flags|=67108866),p}function l(p,b,S,y){return b===null||b.tag!==6?(b=Qx(S,p.mode,y),b.return=p,b):(b=i(b,S),b.return=p,b)}function c(p,b,S,y){var T=S.type;return T===gl?d(p,b,S.props.children,y,S.key):b!==null&&(b.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Kr&&qo(T)===b.type)?(b=i(b,S.props),rc(b,S),b.return=p,b):(b=qf(S.type,S.key,S.props,null,p.mode,y),rc(b,S),b.return=p,b)}function u(p,b,S,y){return b===null||b.tag!==4||b.stateNode.containerInfo!==S.containerInfo||b.stateNode.implementation!==S.implementation?(b=e1(S,p.mode,y),b.return=p,b):(b=i(b,S.children||[]),b.return=p,b)}function d(p,b,S,y,T){return b===null||b.tag!==7?(b=Yo(S,p.mode,y,T),b.return=p,b):(b=i(b,S),b.return=p,b)}function m(p,b,S){if(typeof b=="string"&&b!==""||typeof b=="number"||typeof b=="bigint")return b=Qx(""+b,p.mode,S),b.return=p,b;if(typeof b=="object"&&b!==null){switch(b.$$typeof){case _f:return S=qf(b.type,b.key,b.props,null,p.mode,S),rc(S,b),S.return=p,S;case cc:return b=e1(b,p.mode,S),b.return=p,b;case Kr:return b=qo(b),m(p,b,S)}if(uc(b)||nc(b))return b=Yo(b,p.mode,S,null),b.return=p,b;if(typeof b.then=="function")return m(p,jf(b),S);if(b.$$typeof===gr)return m(p,Af(p,b),S);Of(p,b)}return null}function h(p,b,S,y){var T=b!==null?b.key:null;if(typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint")return T!==null?null:l(p,b,""+S,y);if(typeof S=="object"&&S!==null){switch(S.$$typeof){case _f:return S.key===T?c(p,b,S,y):null;case cc:return S.key===T?u(p,b,S,y):null;case Kr:return S=qo(S),h(p,b,S,y)}if(uc(S)||nc(S))return T!==null?null:d(p,b,S,y,null);if(typeof S.then=="function")return h(p,b,jf(S),y);if(S.$$typeof===gr)return h(p,b,Af(p,S),y);Of(p,S)}return null}function f(p,b,S,y,T){if(typeof y=="string"&&y!==""||typeof y=="number"||typeof y=="bigint")return p=p.get(S)||null,l(b,p,""+y,T);if(typeof y=="object"&&y!==null){switch(y.$$typeof){case _f:return p=p.get(y.key===null?S:y.key)||null,c(b,p,y,T);case cc:return p=p.get(y.key===null?S:y.key)||null,u(b,p,y,T);case Kr:return y=qo(y),f(p,b,S,y,T)}if(uc(y)||nc(y))return p=p.get(S)||null,d(b,p,y,T,null);if(typeof y.then=="function")return f(p,b,S,jf(y),T);if(y.$$typeof===gr)return f(p,b,S,Af(b,y),T);Of(b,y)}return null}function v(p,b,S,y){for(var T=null,M=null,A=b,w=b=0,V=null;A!==null&&w<S.length;w++){A.index>w?(V=A,A=null):V=A.sibling;var F=h(p,A,S[w],y);if(F===null){A===null&&(A=V);break}e&&A&&F.alternate===null&&t(p,A),b=o(F,b,w),M===null?T=F:M.sibling=F,M=F,A=V}if(w===S.length)return n(p,A),Me&&hr(p,w),T;if(A===null){for(;w<S.length;w++)A=m(p,S[w],y),A!==null&&(b=o(A,b,w),M===null?T=A:M.sibling=A,M=A);return Me&&hr(p,w),T}for(A=r(A);w<S.length;w++)V=f(A,p,w,S[w],y),V!==null&&(e&&V.alternate!==null&&A.delete(V.key===null?w:V.key),b=o(V,b,w),M===null?T=V:M.sibling=V,M=V);return e&&A.forEach(function(we){return t(p,we)}),Me&&hr(p,w),T}function k(p,b,S,y){if(S==null)throw Error(O(151));for(var T=null,M=null,A=b,w=b=0,V=null,F=S.next();A!==null&&!F.done;w++,F=S.next()){A.index>w?(V=A,A=null):V=A.sibling;var we=h(p,A,F.value,y);if(we===null){A===null&&(A=V);break}e&&A&&we.alternate===null&&t(p,A),b=o(we,b,w),M===null?T=we:M.sibling=we,M=we,A=V}if(F.done)return n(p,A),Me&&hr(p,w),T;if(A===null){for(;!F.done;w++,F=S.next())F=m(p,F.value,y),F!==null&&(b=o(F,b,w),M===null?T=F:M.sibling=F,M=F);return Me&&hr(p,w),T}for(A=r(A);!F.done;w++,F=S.next())F=f(A,p,w,F.value,y),F!==null&&(e&&F.alternate!==null&&A.delete(F.key===null?w:F.key),b=o(F,b,w),M===null?T=F:M.sibling=F,M=F);return e&&A.forEach(function(Xe){return t(p,Xe)}),Me&&hr(p,w),T}function D(p,b,S,y){if(typeof S=="object"&&S!==null&&S.type===gl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case _f:e:{for(var T=S.key;b!==null;){if(b.key===T){if(T=S.type,T===gl){if(b.tag===7){n(p,b.sibling),y=i(b,S.props.children),y.return=p,p=y;break e}}else if(b.elementType===T||typeof T=="object"&&T!==null&&T.$$typeof===Kr&&qo(T)===b.type){n(p,b.sibling),y=i(b,S.props),rc(y,S),y.return=p,p=y;break e}n(p,b);break}else t(p,b);b=b.sibling}S.type===gl?(y=Yo(S.props.children,p.mode,y,S.key),y.return=p,p=y):(y=qf(S.type,S.key,S.props,null,p.mode,y),rc(y,S),y.return=p,p=y)}return a(p);case cc:e:{for(T=S.key;b!==null;){if(b.key===T)if(b.tag===4&&b.stateNode.containerInfo===S.containerInfo&&b.stateNode.implementation===S.implementation){n(p,b.sibling),y=i(b,S.children||[]),y.return=p,p=y;break e}else{n(p,b);break}else t(p,b);b=b.sibling}y=e1(S,p.mode,y),y.return=p,p=y}return a(p);case Kr:return S=qo(S),D(p,b,S,y)}if(uc(S))return v(p,b,S,y);if(nc(S)){if(T=nc(S),typeof T!="function")throw Error(O(150));return S=T.call(S),k(p,b,S,y)}if(typeof S.then=="function")return D(p,b,jf(S),y);if(S.$$typeof===gr)return D(p,b,Af(p,S),y);Of(p,S)}return typeof S=="string"&&S!==""||typeof S=="number"||typeof S=="bigint"?(S=""+S,b!==null&&b.tag===6?(n(p,b.sibling),y=i(b,S),y.return=p,p=y):(n(p,b),y=Qx(S,p.mode,y),y.return=p,p=y),a(p)):n(p,b)}return function(p,b,S,y){try{jc=0;var T=D(p,b,S,y);return Al=null,T}catch(A){if(A===Yl||A===Mm)throw A;var M=Fn(29,A,null,p.mode);return M.lanes=y,M.return=p,M}}}var ta=SC(!0),kC=SC(!1),Qr=!1;function US(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function F1(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function fo(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function mo(e,t,n){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(Pe&2)!==0){var i=r.pending;return i===null?t.next=t:(t.next=i.next,i.next=t),r.pending=t,t=cm(e),mC(e,null,n),t}return Rm(e,r,t,n),cm(e)}function vc(e,t,n){if(t=t.updateQueue,t!==null&&(t=t.shared,(n&4194048)!==0)){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L4(e,n)}}function n1(e,t){var n=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,n===r)){var i=null,o=null;if(n=n.firstBaseUpdate,n!==null){do{var a={lane:n.lane,tag:n.tag,payload:n.payload,callback:null,next:null};o===null?i=o=a:o=o.next=a,n=n.next}while(n!==null);o===null?i=o=t:o=o.next=t}else i=o=t;n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:o,shared:r.shared,callbacks:r.callbacks},e.updateQueue=n;return}e=n.lastBaseUpdate,e===null?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}var H1=!1;function bc(){if(H1){var e=Dl;if(e!==null)throw e}}function xc(e,t,n,r){H1=!1;var i=e.updateQueue;Qr=!1;var o=i.firstBaseUpdate,a=i.lastBaseUpdate,l=i.shared.pending;if(l!==null){i.shared.pending=null;var c=l,u=c.next;c.next=null,a===null?o=u:a.next=u,a=c;var d=e.alternate;d!==null&&(d=d.updateQueue,l=d.lastBaseUpdate,l!==a&&(l===null?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c))}if(o!==null){var m=i.baseState;a=0,d=u=c=null,l=o;do{var h=l.lane&-536870913,f=h!==l.lane;if(f?(Oe&h)===h:(r&h)===h){h!==0&&h===Ml&&(H1=!0),d!==null&&(d=d.next={lane:0,tag:l.tag,payload:l.payload,callback:null,next:null});e:{var v=e,k=l;h=t;var D=n;switch(k.tag){case 1:if(v=k.payload,typeof v=="function"){m=v.call(D,m,h);break e}m=v;break e;case 3:v.flags=v.flags&-65537|128;case 0:if(v=k.payload,h=typeof v=="function"?v.call(D,m,h):v,h==null)break e;m=gt({},m,h);break e;case 2:Qr=!0}}h=l.callback,h!==null&&(e.flags|=64,f&&(e.flags|=8192),f=i.callbacks,f===null?i.callbacks=[h]:f.push(h))}else f={lane:h,tag:l.tag,payload:l.payload,callback:l.callback,next:null},d===null?(u=d=f,c=m):d=d.next=f,a|=h;if(l=l.next,l===null){if(l=i.shared.pending,l===null)break;f=l,l=f.next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}while(!0);d===null&&(c=m),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,o===null&&(i.shared.lanes=0),ko|=a,e.lanes=a,e.memoizedState=m}}function wC(e,t){if(typeof e!="function")throw Error(O(191,e));e.call(t)}function _C(e,t){var n=e.callbacks;if(n!==null)for(e.callbacks=null,e=0;e<n.length;e++)wC(n[e],t)}var Bl=Wi(null),mm=Wi(0);function jT(e,t){e=zr,dt(mm,e),dt(Bl,t),zr=e|t.baseLanes}function V1(){dt(mm,zr),dt(Bl,Bl.current)}function RS(){zr=mm.current,Vt(Bl),Vt(mm)}var Jn=Wi(null),mi=null;function to(e){var t=e.alternate;dt(zt,zt.current&1),dt(Jn,e),mi===null&&(t===null||Bl.current!==null||t.memoizedState!==null)&&(mi=e)}function q1(e){dt(zt,zt.current),dt(Jn,e),mi===null&&(mi=e)}function $C(e){e.tag===22?(dt(zt,zt.current),dt(Jn,e),mi===null&&(mi=e)):no(e)}function no(){dt(zt,zt.current),dt(Jn,Jn.current)}function Zn(e){Vt(Jn),mi===e&&(mi=null),Vt(zt)}var zt=Wi(0);function hm(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||dS(n)||fS(n)))return t}else if(t.tag===19&&(t.memoizedProps.revealOrder==="forwards"||t.memoizedProps.revealOrder==="backwards"||t.memoizedProps.revealOrder==="unstable_legacy-backwards"||t.memoizedProps.revealOrder==="together")){if((t.flags&128)!==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 wr=0,$e=null,tt=null,Et=null,pm=!1,jl=!1,na=!1,gm=0,Oc=0,Ol=null,FM=0;function kt(){throw Error(O(321))}function MS(e,t){if(t===null)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Yn(e[n],t[n]))return!1;return!0}function BS(e,t,n,r,i,o){return wr=o,$e=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,be.H=e===null||e.memoizedState===null?n6:JS,na=!1,o=n(r,i),na=!1,jl&&(o=TC(t,n,r,i)),zC(e),o}function zC(e){be.H=Nc;var t=tt!==null&&tt.next!==null;if(wr=0,Et=tt=$e=null,pm=!1,Oc=0,Ol=null,t)throw Error(O(300));e===null||At||(e=e.dependencies,e!==null&&dm(e)&&(At=!0))}function TC(e,t,n,r){$e=e;var i=0;do{if(jl&&(Ol=null),Oc=0,jl=!1,25<=i)throw Error(O(301));if(i+=1,Et=tt=null,e.updateQueue!=null){var o=e.updateQueue;o.lastEffect=null,o.events=null,o.stores=null,o.memoCache!=null&&(o.memoCache.index=0)}be.H=i6,o=t(n,r)}while(jl);return o}function HM(){var e=be.H,t=e.useState()[0];return t=typeof t.then=="function"?Wc(t):t,e=e.useState()[0],(tt!==null?tt.memoizedState:null)!==e&&($e.flags|=1024),t}function LS(){var e=gm!==0;return gm=0,e}function PS(e,t,n){t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~n}function ZS(e){if(pm){for(e=e.memoizedState;e!==null;){var t=e.queue;t!==null&&(t.pending=null),e=e.next}pm=!1}wr=0,Et=tt=$e=null,jl=!1,Oc=gm=0,Ol=null}function xn(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Et===null?$e.memoizedState=Et=e:Et=Et.next=e,Et}function Tt(){if(tt===null){var e=$e.alternate;e=e!==null?e.memoizedState:null}else e=tt.next;var t=Et===null?$e.memoizedState:Et.next;if(t!==null)Et=t,tt=e;else{if(e===null)throw $e.alternate===null?Error(O(467)):Error(O(310));tt=e,e={memoizedState:tt.memoizedState,baseState:tt.baseState,baseQueue:tt.baseQueue,queue:tt.queue,next:null},Et===null?$e.memoizedState=Et=e:Et=Et.next=e}return Et}function Bm(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Wc(e){var t=Oc;return Oc+=1,Ol===null&&(Ol=[]),e=xC(Ol,e,t),t=$e,(Et===null?t.memoizedState:Et.next)===null&&(t=t.alternate,be.H=t===null||t.memoizedState===null?n6:JS),e}function Lm(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Wc(e);if(e.$$typeof===gr)return tn(e)}throw Error(O(438,String(e)))}function FS(e){var t=null,n=$e.updateQueue;if(n!==null&&(t=n.memoCache),t==null){var r=$e.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(t={data:r.data.map(function(i){return i.slice()}),index:0})))}if(t==null&&(t={data:[],index:0}),n===null&&(n=Bm(),$e.updateQueue=n),n.memoCache=t,n=t.data[t.index],n===void 0)for(n=t.data[t.index]=Array(e),r=0;r<e;r++)n[r]=ER;return t.index++,n}function _r(e,t){return typeof t=="function"?t(e):t}function Wf(e){var t=Tt();return HS(t,tt,e)}function HS(e,t,n){var r=e.queue;if(r===null)throw Error(O(311));r.lastRenderedReducer=n;var i=e.baseQueue,o=r.pending;if(o!==null){if(i!==null){var a=i.next;i.next=o.next,o.next=a}t.baseQueue=i=o,r.pending=null}if(o=e.baseState,i===null)e.memoizedState=o;else{t=i.next;var l=a=null,c=null,u=t,d=!1;do{var m=u.lane&-536870913;if(m!==u.lane?(Oe&m)===m:(wr&m)===m){var h=u.revertLane;if(h===0)c!==null&&(c=c.next={lane:0,revertLane:0,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),m===Ml&&(d=!0);else if((wr&h)===h){u=u.next,h===Ml&&(d=!0);continue}else m={lane:0,revertLane:u.revertLane,gesture:null,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=m,a=o):c=c.next=m,$e.lanes|=h,ko|=h;m=u.action,na&&n(o,m),o=u.hasEagerState?u.eagerState:n(o,m)}else h={lane:m,revertLane:u.revertLane,gesture:u.gesture,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null},c===null?(l=c=h,a=o):c=c.next=h,$e.lanes|=m,ko|=m;u=u.next}while(u!==null&&u!==t);if(c===null?a=o:c.next=l,!Yn(o,e.memoizedState)&&(At=!0,d&&(n=Dl,n!==null)))throw n;e.memoizedState=o,e.baseState=a,e.baseQueue=c,r.lastRenderedState=o}return i===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function i1(e){var t=Tt(),n=t.queue;if(n===null)throw Error(O(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(i!==null){n.pending=null;var a=i=i.next;do o=e(o,a.action),a=a.next;while(a!==i);Yn(o,t.memoizedState)||(At=!0),t.memoizedState=o,t.baseQueue===null&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function CC(e,t,n){var r=$e,i=Tt(),o=Me;if(o){if(n===void 0)throw Error(O(407));n=n()}else n=t();var a=!Yn((tt||i).memoizedState,n);if(a&&(i.memoizedState=n,At=!0),i=i.queue,VS(DC.bind(null,r,i,e),[e]),i.getSnapshot!==t||a||Et!==null&&Et.memoizedState.tag&1){if(r.flags|=2048,Ll(9,{destroy:void 0},IC.bind(null,r,i,n,t),null),ot===null)throw Error(O(349));o||(wr&127)!==0||EC(r,t,n)}return n}function EC(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},t=$e.updateQueue,t===null?(t=Bm(),$e.updateQueue=t,t.stores=[e]):(n=t.stores,n===null?t.stores=[e]:n.push(e))}function IC(e,t,n,r){t.value=n,t.getSnapshot=r,AC(t)&&jC(e)}function DC(e,t,n){return n(function(){AC(t)&&jC(e)})}function AC(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Yn(e,n)}catch{return!0}}function jC(e){var t=la(e,2);t!==null&&jn(t,e,2)}function G1(e){var t=xn();if(typeof e=="function"){var n=e;if(e=n(),na){ro(!0);try{n()}finally{ro(!1)}}}return t.memoizedState=t.baseState=e,t.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:e},t}function OC(e,t,n,r){return e.baseState=n,HS(e,tt,typeof r=="function"?r:_r)}function VM(e,t,n,r,i){if(Zm(e))throw Error(O(485));if(e=t.action,e!==null){var o={payload:i,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(a){o.listeners.push(a)}};be.T!==null?n(!0):o.isTransition=!1,r(o),n=t.pending,n===null?(o.next=t.pending=o,NC(t,o)):(o.next=n.next,t.pending=n.next=o)}}function NC(e,t){var n=t.action,r=t.payload,i=e.state;if(t.isTransition){var o=be.T,a={};be.T=a;try{var l=n(i,r),c=be.S;c!==null&&c(a,l),OT(e,t,l)}catch(u){W1(e,t,u)}finally{o!==null&&a.types!==null&&(o.types=a.types),be.T=o}}else try{o=n(i,r),OT(e,t,o)}catch(u){W1(e,t,u)}}function OT(e,t,n){n!==null&&typeof n=="object"&&typeof n.then=="function"?n.then(function(r){NT(e,t,r)},function(r){return W1(e,t,r)}):NT(e,t,n)}function NT(e,t,n){t.status="fulfilled",t.value=n,UC(t),e.state=n,t=e.pending,t!==null&&(n=t.next,n===t?e.pending=null:(n=n.next,t.next=n,NC(e,n)))}function W1(e,t,n){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do t.status="rejected",t.reason=n,UC(t),t=t.next;while(t!==r)}e.action=null}function UC(e){e=e.listeners;for(var t=0;t<e.length;t++)(0,e[t])()}function RC(e,t){return t}function UT(e,t){if(Me){var n=ot.formState;if(n!==null){e:{var r=$e;if(Me){if(pt){t:{for(var i=pt,o=fi;i.nodeType!==8;){if(!o){i=null;break t}if(i=hi(i.nextSibling),i===null){i=null;break t}}o=i.data,i=o==="F!"||o==="F"?i:null}if(i){pt=hi(i.nextSibling),r=i.data==="F!";break e}}xo(r)}r=!1}r&&(t=n[0])}}return n=xn(),n.memoizedState=n.baseState=t,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:RC,lastRenderedState:t},n.queue=r,n=QC.bind(null,$e,r),r.dispatch=n,r=G1(!1),o=YS.bind(null,$e,!1,r.queue),r=xn(),i={state:t,dispatch:null,action:e,pending:null},r.queue=i,n=VM.bind(null,$e,i,o,n),i.dispatch=n,r.memoizedState=e,[t,n,!1]}function RT(e){var t=Tt();return MC(t,tt,e)}function MC(e,t,n){if(t=HS(e,t,RC)[0],e=Wf(_r)[0],typeof t=="object"&&t!==null&&typeof t.then=="function")try{var r=Wc(t)}catch(a){throw a===Yl?Mm:a}else r=t;t=Tt();var i=t.queue,o=i.dispatch;return n!==t.memoizedState&&($e.flags|=2048,Ll(9,{destroy:void 0},qM.bind(null,i,n),null)),[r,o,e]}function qM(e,t){e.action=t}function MT(e){var t=Tt(),n=tt;if(n!==null)return MC(t,n,e);Tt(),t=t.memoizedState,n=Tt();var r=n.queue.dispatch;return n.memoizedState=e,[t,r,!1]}function Ll(e,t,n,r){return e={tag:e,create:n,deps:r,inst:t,next:null},t=$e.updateQueue,t===null&&(t=Bm(),$e.updateQueue=t),n=t.lastEffect,n===null?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function BC(){return Tt().memoizedState}function Yf(e,t,n,r){var i=xn();$e.flags|=e,i.memoizedState=Ll(1|t,{destroy:void 0},n,r===void 0?null:r)}function Pm(e,t,n,r){var i=Tt();r=r===void 0?null:r;var o=i.memoizedState.inst;tt!==null&&r!==null&&MS(r,tt.memoizedState.deps)?i.memoizedState=Ll(t,o,n,r):($e.flags|=e,i.memoizedState=Ll(1|t,o,n,r))}function BT(e,t){Yf(8390656,8,e,t)}function VS(e,t){Pm(2048,8,e,t)}function GM(e){$e.flags|=4;var t=$e.updateQueue;if(t===null)t=Bm(),$e.updateQueue=t,t.events=[e];else{var n=t.events;n===null?t.events=[e]:n.push(e)}}function LC(e){var t=Tt().memoizedState;return GM({ref:t,nextImpl:e}),function(){if((Pe&2)!==0)throw Error(O(440));return t.impl.apply(void 0,arguments)}}function PC(e,t){return Pm(4,2,e,t)}function ZC(e,t){return Pm(4,4,e,t)}function FC(e,t){if(typeof t=="function"){e=e();var n=t(e);return function(){typeof n=="function"?n():t(null)}}if(t!=null)return e=e(),t.current=e,function(){t.current=null}}function HC(e,t,n){n=n!=null?n.concat([e]):null,Pm(4,4,FC.bind(null,t,e),n)}function qS(){}function VC(e,t){var n=Tt();t=t===void 0?null:t;var r=n.memoizedState;return t!==null&&MS(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qC(e,t){var n=Tt();t=t===void 0?null:t;var r=n.memoizedState;if(t!==null&&MS(t,r[1]))return r[0];if(r=e(),na){ro(!0);try{e()}finally{ro(!1)}}return n.memoizedState=[r,t],r}function GS(e,t,n){return n===void 0||(wr&1073741824)!==0&&(Oe&261930)===0?e.memoizedState=t:(e.memoizedState=n,e=O6(),$e.lanes|=e,ko|=e,n)}function GC(e,t,n,r){return Yn(n,t)?n:Bl.current!==null?(e=GS(e,n,r),Yn(e,t)||(At=!0),e):(wr&42)===0||(wr&1073741824)!==0&&(Oe&261930)===0?(At=!0,e.memoizedState=n):(e=O6(),$e.lanes|=e,ko|=e,t)}function WC(e,t,n,r,i){var o=Ze.p;Ze.p=o!==0&&8>o?o:8;var a=be.T,l={};be.T=l,YS(e,!1,t,n);try{var c=i(),u=be.S;if(u!==null&&u(l,c),c!==null&&typeof c=="object"&&typeof c.then=="function"){var d=ZM(c,r);Sc(e,t,d,Wn(e))}else Sc(e,t,r,Wn(e))}catch(m){Sc(e,t,{then:function(){},status:"rejected",reason:m},Wn())}finally{Ze.p=o,a!==null&&l.types!==null&&(a.types=l.types),be.T=a}}function WM(){}function Y1(e,t,n,r){if(e.tag!==5)throw Error(O(476));var i=YC(e).queue;WC(e,i,t,Wo,n===null?WM:function(){return JC(e),n(r)})}function YC(e){var t=e.memoizedState;if(t!==null)return t;t={memoizedState:Wo,baseState:Wo,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:Wo},next:null};var n={};return t.next={memoizedState:n,baseState:n,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:_r,lastRenderedState:n},next:null},e.memoizedState=t,e=e.alternate,e!==null&&(e.memoizedState=t),t}function JC(e){var t=YC(e);t.next===null&&(t=e.alternate.memoizedState),Sc(e,t.next.queue,{},Wn())}function WS(){return tn(Mc)}function XC(){return Tt().memoizedState}function KC(){return Tt().memoizedState}function YM(e){for(var t=e.return;t!==null;){switch(t.tag){case 24:case 3:var n=Wn();e=fo(n);var r=mo(t,e,n);r!==null&&(jn(r,t,n),vc(r,t,n)),t={cache:jS()},e.payload=t;return}t=t.return}}function JM(e,t,n){var r=Wn();n={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null},Zm(e)?e6(t,n):(n=ES(e,t,n,r),n!==null&&(jn(n,e,r),t6(n,t,r)))}function QC(e,t,n){var r=Wn();Sc(e,t,n,r)}function Sc(e,t,n,r){var i={lane:r,revertLane:0,gesture:null,action:n,hasEagerState:!1,eagerState:null,next:null};if(Zm(e))e6(t,i);else{var o=e.alternate;if(e.lanes===0&&(o===null||o.lanes===0)&&(o=t.lastRenderedReducer,o!==null))try{var a=t.lastRenderedState,l=o(a,n);if(i.hasEagerState=!0,i.eagerState=l,Yn(l,a))return Rm(e,t,i,0),ot===null&&Um(),!1}catch{}if(n=ES(e,t,i,r),n!==null)return jn(n,e,r),t6(n,t,r),!0}return!1}function YS(e,t,n,r){if(r={lane:2,revertLane:r0(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},Zm(e)){if(t)throw Error(O(479))}else t=ES(e,n,r,2),t!==null&&jn(t,e,2)}function Zm(e){var t=e.alternate;return e===$e||t!==null&&t===$e}function e6(e,t){jl=pm=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function t6(e,t,n){if((n&4194048)!==0){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,L4(e,n)}}var Nc={readContext:tn,use:Lm,useCallback:kt,useContext:kt,useEffect:kt,useImperativeHandle:kt,useLayoutEffect:kt,useInsertionEffect:kt,useMemo:kt,useReducer:kt,useRef:kt,useState:kt,useDebugValue:kt,useDeferredValue:kt,useTransition:kt,useSyncExternalStore:kt,useId:kt,useHostTransitionStatus:kt,useFormState:kt,useActionState:kt,useOptimistic:kt,useMemoCache:kt,useCacheRefresh:kt};Nc.useEffectEvent=kt;var n6={readContext:tn,use:Lm,useCallback:function(e,t){return xn().memoizedState=[e,t===void 0?null:t],e},useContext:tn,useEffect:BT,useImperativeHandle:function(e,t,n){n=n!=null?n.concat([e]):null,Yf(4194308,4,FC.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yf(4194308,4,e,t)},useInsertionEffect:function(e,t){Yf(4,2,e,t)},useMemo:function(e,t){var n=xn();t=t===void 0?null:t;var r=e();if(na){ro(!0);try{e()}finally{ro(!1)}}return n.memoizedState=[r,t],r},useReducer:function(e,t,n){var r=xn();if(n!==void 0){var i=n(t);if(na){ro(!0);try{n(t)}finally{ro(!1)}}}else i=t;return r.memoizedState=r.baseState=i,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:i},r.queue=e,e=e.dispatch=JM.bind(null,$e,e),[r.memoizedState,e]},useRef:function(e){var t=xn();return e={current:e},t.memoizedState=e},useState:function(e){e=G1(e);var t=e.queue,n=QC.bind(null,$e,t);return t.dispatch=n,[e.memoizedState,n]},useDebugValue:qS,useDeferredValue:function(e,t){var n=xn();return GS(n,e,t)},useTransition:function(){var e=G1(!1);return e=WC.bind(null,$e,e.queue,!0,!1),xn().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,t,n){var r=$e,i=xn();if(Me){if(n===void 0)throw Error(O(407));n=n()}else{if(n=t(),ot===null)throw Error(O(349));(Oe&127)!==0||EC(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,BT(DC.bind(null,r,o,e),[e]),r.flags|=2048,Ll(9,{destroy:void 0},IC.bind(null,r,o,n,t),null),n},useId:function(){var e=xn(),t=ot.identifierPrefix;if(Me){var n=Vi,r=Hi;n=(r&~(1<<32-Gn(r)-1)).toString(32)+n,t="_"+t+"R_"+n,n=gm++,0<n&&(t+="H"+n.toString(32)),t+="_"}else n=FM++,t="_"+t+"r_"+n.toString(32)+"_";return e.memoizedState=t},useHostTransitionStatus:WS,useFormState:UT,useActionState:UT,useOptimistic:function(e){var t=xn();t.memoizedState=t.baseState=e;var n={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return t.queue=n,t=YS.bind(null,$e,!0,n),n.dispatch=t,[e,t]},useMemoCache:FS,useCacheRefresh:function(){return xn().memoizedState=YM.bind(null,$e)},useEffectEvent:function(e){var t=xn(),n={impl:e};return t.memoizedState=n,function(){if((Pe&2)!==0)throw Error(O(440));return n.impl.apply(void 0,arguments)}}},JS={readContext:tn,use:Lm,useCallback:VC,useContext:tn,useEffect:VS,useImperativeHandle:HC,useInsertionEffect:PC,useLayoutEffect:ZC,useMemo:qC,useReducer:Wf,useRef:BC,useState:function(){return Wf(_r)},useDebugValue:qS,useDeferredValue:function(e,t){var n=Tt();return GC(n,tt.memoizedState,e,t)},useTransition:function(){var e=Wf(_r)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:Wc(e),t]},useSyncExternalStore:CC,useId:XC,useHostTransitionStatus:WS,useFormState:RT,useActionState:RT,useOptimistic:function(e,t){var n=Tt();return OC(n,tt,e,t)},useMemoCache:FS,useCacheRefresh:KC};JS.useEffectEvent=LC;var i6={readContext:tn,use:Lm,useCallback:VC,useContext:tn,useEffect:VS,useImperativeHandle:HC,useInsertionEffect:PC,useLayoutEffect:ZC,useMemo:qC,useReducer:i1,useRef:BC,useState:function(){return i1(_r)},useDebugValue:qS,useDeferredValue:function(e,t){var n=Tt();return tt===null?GS(n,e,t):GC(n,tt.memoizedState,e,t)},useTransition:function(){var e=i1(_r)[0],t=Tt().memoizedState;return[typeof e=="boolean"?e:Wc(e),t]},useSyncExternalStore:CC,useId:XC,useHostTransitionStatus:WS,useFormState:MT,useActionState:MT,useOptimistic:function(e,t){var n=Tt();return tt!==null?OC(n,tt,e,t):(n.baseState=e,[e,n.queue.dispatch])},useMemoCache:FS,useCacheRefresh:KC};i6.useEffectEvent=LC;function r1(e,t,n,r){t=e.memoizedState,n=n(r,t),n=n==null?t:gt({},t,n),e.memoizedState=n,e.lanes===0&&(e.updateQueue.baseState=n)}var J1={enqueueSetState:function(e,t,n){e=e._reactInternals;var r=Wn(),i=fo(r);i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(jn(t,e,r),vc(t,e,r))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=Wn(),i=fo(r);i.tag=1,i.payload=t,n!=null&&(i.callback=n),t=mo(e,i,r),t!==null&&(jn(t,e,r),vc(t,e,r))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=Wn(),r=fo(n);r.tag=2,t!=null&&(r.callback=t),t=mo(e,r,n),t!==null&&(jn(t,e,n),vc(t,e,n))}};function LT(e,t,n,r,i,o,a){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,o,a):t.prototype&&t.prototype.isPureReactComponent?!Ic(n,r)||!Ic(i,o):!0}function PT(e,t,n,r){e=t.state,typeof t.componentWillReceiveProps=="function"&&t.componentWillReceiveProps(n,r),typeof t.UNSAFE_componentWillReceiveProps=="function"&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&J1.enqueueReplaceState(t,t.state,null)}function ia(e,t){var n=t;if("ref"in t){n={};for(var r in t)r!=="ref"&&(n[r]=t[r])}if(e=e.defaultProps){n===t&&(n=gt({},n));for(var i in e)n[i]===void 0&&(n[i]=e[i])}return n}function r6(e){sm(e)}function o6(e){console.error(e)}function a6(e){sm(e)}function ym(e,t){try{var n=e.onUncaughtError;n(t.value,{componentStack:t.stack})}catch(r){setTimeout(function(){throw r})}}function ZT(e,t,n){try{var r=e.onCaughtError;r(n.value,{componentStack:n.stack,errorBoundary:t.tag===1?t.stateNode:null})}catch(i){setTimeout(function(){throw i})}}function X1(e,t,n){return n=fo(n),n.tag=3,n.payload={element:null},n.callback=function(){ym(e,t)},n}function l6(e){return e=fo(e),e.tag=3,e}function s6(e,t,n,r){var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var o=r.value;e.payload=function(){return i(o)},e.callback=function(){ZT(t,n,r)}}var a=n.stateNode;a!==null&&typeof a.componentDidCatch=="function"&&(e.callback=function(){ZT(t,n,r),typeof i!="function"&&(ho===null?ho=new Set([this]):ho.add(this));var l=r.stack;this.componentDidCatch(r.value,{componentStack:l!==null?l:""})})}function XM(e,t,n,r,i){if(n.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(t=n.alternate,t!==null&&Wl(t,n,i,!0),n=Jn.current,n!==null){switch(n.tag){case 31:case 13:return mi===null?km():n.alternate===null&&wt===0&&(wt=3),n.flags&=-257,n.flags|=65536,n.lanes=i,r===fm?n.flags|=16384:(t=n.updateQueue,t===null?n.updateQueue=new Set([r]):t.add(r),p1(e,r,i)),!1;case 22:return n.flags|=65536,r===fm?n.flags|=16384:(t=n.updateQueue,t===null?(t={transitions:null,markerInstances:null,retryQueue:new Set([r])},n.updateQueue=t):(n=t.retryQueue,n===null?t.retryQueue=new Set([r]):n.add(r)),p1(e,r,i)),!1}throw Error(O(435,n.tag))}return p1(e,r,i),km(),!1}if(Me)return t=Jn.current,t!==null?((t.flags&65536)===0&&(t.flags|=256),t.flags|=65536,t.lanes=i,r!==M1&&(e=Error(O(422),{cause:r}),Ac(di(e,n)))):(r!==M1&&(t=Error(O(423),{cause:r}),Ac(di(t,n))),e=e.current.alternate,e.flags|=65536,i&=-i,e.lanes|=i,r=di(r,n),i=X1(e.stateNode,r,i),n1(e,i),wt!==4&&(wt=2)),!1;var o=Error(O(520),{cause:r});if(o=di(o,n),_c===null?_c=[o]:_c.push(o),wt!==4&&(wt=2),t===null)return!0;r=di(r,n),n=t;do{switch(n.tag){case 3:return n.flags|=65536,e=i&-i,n.lanes|=e,e=X1(n.stateNode,r,e),n1(n,e),!1;case 1:if(t=n.type,o=n.stateNode,(n.flags&128)===0&&(typeof t.getDerivedStateFromError=="function"||o!==null&&typeof o.componentDidCatch=="function"&&(ho===null||!ho.has(o))))return n.flags|=65536,i&=-i,n.lanes|=i,i=l6(i),s6(i,e,n,r),n1(n,i),!1}n=n.return}while(n!==null);return!1}var XS=Error(O(461)),At=!1;function Kt(e,t,n,r){t.child=e===null?kC(t,null,n,r):ta(t,e.child,n,r)}function FT(e,t,n,r,i){n=n.render;var o=t.ref;if("ref"in r){var a={};for(var l in r)l!=="ref"&&(a[l]=r[l])}else a=r;return ea(t),r=BS(e,t,n,a,o,i),l=LS(),e!==null&&!At?(PS(e,t,i),$r(e,t,i)):(Me&&l&&DS(t),t.flags|=1,Kt(e,t,r,i),t.child)}function HT(e,t,n,r,i){if(e===null){var o=n.type;return typeof o=="function"&&!IS(o)&&o.defaultProps===void 0&&n.compare===null?(t.tag=15,t.type=o,c6(e,t,o,r,i)):(e=qf(n.type,null,r,t,t.mode,i),e.ref=t.ref,e.return=t,t.child=e)}if(o=e.child,!KS(e,i)){var a=o.memoizedProps;if(n=n.compare,n=n!==null?n:Ic,n(a,r)&&e.ref===t.ref)return $r(e,t,i)}return t.flags|=1,e=br(o,r),e.ref=t.ref,e.return=t,t.child=e}function c6(e,t,n,r,i){if(e!==null){var o=e.memoizedProps;if(Ic(o,r)&&e.ref===t.ref)if(At=!1,t.pendingProps=r=o,KS(e,i))(e.flags&131072)!==0&&(At=!0);else return t.lanes=e.lanes,$r(e,t,i)}return K1(e,t,n,r,i)}function u6(e,t,n,r){var i=r.children,o=e!==null?e.memoizedState:null;if(e===null&&t.stateNode===null&&(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((t.flags&128)!==0){if(o=o!==null?o.baseLanes|n:n,e!==null){for(r=t.child=e.child,i=0;r!==null;)i=i|r.lanes|r.childLanes,r=r.sibling;r=i&~o}else r=0,t.child=null;return VT(e,t,o,n,r)}if((n&536870912)!==0)t.memoizedState={baseLanes:0,cachePool:null},e!==null&&Gf(t,o!==null?o.cachePool:null),o!==null?jT(t,o):V1(),$C(t);else return r=t.lanes=536870912,VT(e,t,o!==null?o.baseLanes|n:n,n,r)}else o!==null?(Gf(t,o.cachePool),jT(t,o),no(t),t.memoizedState=null):(e!==null&&Gf(t,null),V1(),no(t));return Kt(e,t,i,n),t.child}function fc(e,t){return e!==null&&e.tag===22||t.stateNode!==null||(t.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),t.sibling}function VT(e,t,n,r,i){var o=OS();return o=o===null?null:{parent:Dt._currentValue,pool:o},t.memoizedState={baseLanes:n,cachePool:o},e!==null&&Gf(t,null),V1(),$C(t),e!==null&&Wl(e,t,r,!0),t.childLanes=i,null}function Jf(e,t){return t=vm({mode:t.mode,children:t.children},e.mode),t.ref=e.ref,e.child=t,t.return=e,t}function qT(e,t,n){return ta(t,e.child,null,n),e=Jf(t,t.pendingProps),e.flags|=2,Zn(t),t.memoizedState=null,e}function KM(e,t,n){var r=t.pendingProps,i=(t.flags&128)!==0;if(t.flags&=-129,e===null){if(Me){if(r.mode==="hidden")return e=Jf(t,r),t.lanes=536870912,fc(null,e);if(q1(t),(e=pt)?(e=nE(e,fi),e=e!==null&&e.data==="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bo!==null?{id:Hi,overflow:Vi}:null,retryLane:536870912,hydrationErrors:null},n=pC(e),n.return=t,t.child=n,en=t,pt=null)):e=null,e===null)throw xo(t);return t.lanes=536870912,null}return Jf(t,r)}var o=e.memoizedState;if(o!==null){var a=o.dehydrated;if(q1(t),i)if(t.flags&256)t.flags&=-257,t=qT(e,t,n);else if(t.memoizedState!==null)t.child=e.child,t.flags|=128,t=null;else throw Error(O(558));else if(At||Wl(e,t,n,!1),i=(n&e.childLanes)!==0,At||i){if(r=ot,r!==null&&(a=P4(r,n),a!==0&&a!==o.retryLane))throw o.retryLane=a,la(e,a),jn(r,e,a),XS;km(),t=qT(e,t,n)}else e=o.treeContext,pt=hi(a.nextSibling),en=t,Me=!0,uo=null,fi=!1,e!==null&&yC(t,e),t=Jf(t,r),t.flags|=4096;return t}return e=br(e.child,{mode:r.mode,children:r.children}),e.ref=t.ref,t.child=e,e.return=t,e}function Xf(e,t){var n=t.ref;if(n===null)e!==null&&e.ref!==null&&(t.flags|=4194816);else{if(typeof n!="function"&&typeof n!="object")throw Error(O(284));(e===null||e.ref!==n)&&(t.flags|=4194816)}}function K1(e,t,n,r,i){return ea(t),n=BS(e,t,n,r,void 0,i),r=LS(),e!==null&&!At?(PS(e,t,i),$r(e,t,i)):(Me&&r&&DS(t),t.flags|=1,Kt(e,t,n,i),t.child)}function GT(e,t,n,r,i,o){return ea(t),t.updateQueue=null,n=TC(t,r,n,i),zC(e),r=LS(),e!==null&&!At?(PS(e,t,o),$r(e,t,o)):(Me&&r&&DS(t),t.flags|=1,Kt(e,t,n,o),t.child)}function WT(e,t,n,r,i){if(ea(t),t.stateNode===null){var o=_l,a=n.contextType;typeof a=="object"&&a!==null&&(o=tn(a)),o=new n(r,o),t.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=J1,t.stateNode=o,o._reactInternals=t,o=t.stateNode,o.props=r,o.state=t.memoizedState,o.refs={},US(t),a=n.contextType,o.context=typeof a=="object"&&a!==null?tn(a):_l,o.state=t.memoizedState,a=n.getDerivedStateFromProps,typeof a=="function"&&(r1(t,n,a,r),o.state=t.memoizedState),typeof n.getDerivedStateFromProps=="function"||typeof o.getSnapshotBeforeUpdate=="function"||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(a=o.state,typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount(),a!==o.state&&J1.enqueueReplaceState(o,o.state,null),xc(t,r,o,i),bc(),o.state=t.memoizedState),typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!0}else if(e===null){o=t.stateNode;var l=t.memoizedProps,c=ia(n,l);o.props=c;var u=o.context,d=n.contextType;a=_l,typeof d=="object"&&d!==null&&(a=tn(d));var m=n.getDerivedStateFromProps;d=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function",l=t.pendingProps!==l,d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(l||u!==a)&&PT(t,o,r,a),Qr=!1;var h=t.memoizedState;o.state=h,xc(t,r,o,i),bc(),u=t.memoizedState,l||h!==u||Qr?(typeof m=="function"&&(r1(t,n,m,r),u=t.memoizedState),(c=Qr||LT(t,n,c,r,h,u,a))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(t.flags|=4194308)):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=u),o.props=r,o.state=u,o.context=a,r=c):(typeof o.componentDidMount=="function"&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,F1(e,t),a=t.memoizedProps,d=ia(n,a),o.props=d,m=t.pendingProps,h=o.context,u=n.contextType,c=_l,typeof u=="object"&&u!==null&&(c=tn(u)),l=n.getDerivedStateFromProps,(u=typeof l=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==m||h!==c)&&PT(t,o,r,c),Qr=!1,h=t.memoizedState,o.state=h,xc(t,r,o,i),bc();var f=t.memoizedState;a!==m||h!==f||Qr||e!==null&&e.dependencies!==null&&dm(e.dependencies)?(typeof l=="function"&&(r1(t,n,l,r),f=t.memoizedState),(d=Qr||LT(t,n,d,r,h,f,c)||e!==null&&e.dependencies!==null&&dm(e.dependencies))?(u||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(r,f,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(r,f,c)),typeof o.componentDidUpdate=="function"&&(t.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(t.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=f),o.props=r,o.state=f,o.context=c,r=d):(typeof o.componentDidUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return o=r,Xf(e,t),r=(t.flags&128)!==0,o||r?(o=t.stateNode,n=r&&typeof n.getDerivedStateFromError!="function"?null:o.render(),t.flags|=1,e!==null&&r?(t.child=ta(t,e.child,null,i),t.child=ta(t,null,n,i)):Kt(e,t,n,i),t.memoizedState=o.state,e=t.child):e=$r(e,t,i),e}function YT(e,t,n,r){return Qo(),t.flags|=256,Kt(e,t,n,r),t.child}var o1={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function a1(e){return{baseLanes:e,cachePool:bC()}}function l1(e,t,n){return e=e!==null?e.childLanes&~n:0,t&&(e|=Hn),e}function d6(e,t,n){var r=t.pendingProps,i=!1,o=(t.flags&128)!==0,a;if((a=o)||(a=e!==null&&e.memoizedState===null?!1:(zt.current&2)!==0),a&&(i=!0,t.flags&=-129),a=(t.flags&32)!==0,t.flags&=-33,e===null){if(Me){if(i?to(t):no(t),(e=pt)?(e=nE(e,fi),e=e!==null&&e.data!=="&"?e:null,e!==null&&(t.memoizedState={dehydrated:e,treeContext:bo!==null?{id:Hi,overflow:Vi}:null,retryLane:536870912,hydrationErrors:null},n=pC(e),n.return=t,t.child=n,en=t,pt=null)):e=null,e===null)throw xo(t);return fS(e)?t.lanes=32:t.lanes=536870912,null}var l=r.children;return r=r.fallback,i?(no(t),i=t.mode,l=vm({mode:"hidden",children:l},i),r=Yo(r,i,n,null),l.return=t,r.return=t,l.sibling=r,t.child=l,r=t.child,r.memoizedState=a1(n),r.childLanes=l1(e,a,n),t.memoizedState=o1,fc(null,r)):(to(t),Q1(t,l))}var c=e.memoizedState;if(c!==null&&(l=c.dehydrated,l!==null)){if(o)t.flags&256?(to(t),t.flags&=-257,t=s1(e,t,n)):t.memoizedState!==null?(no(t),t.child=e.child,t.flags|=128,t=null):(no(t),l=r.fallback,i=t.mode,r=vm({mode:"visible",children:r.children},i),l=Yo(l,i,n,null),l.flags|=2,r.return=t,l.return=t,r.sibling=l,t.child=r,ta(t,e.child,null,n),r=t.child,r.memoizedState=a1(n),r.childLanes=l1(e,a,n),t.memoizedState=o1,t=fc(null,r));else if(to(t),fS(l)){if(a=l.nextSibling&&l.nextSibling.dataset,a)var u=a.dgst;a=u,r=Error(O(419)),r.stack="",r.digest=a,Ac({value:r,source:null,stack:null}),t=s1(e,t,n)}else if(At||Wl(e,t,n,!1),a=(n&e.childLanes)!==0,At||a){if(a=ot,a!==null&&(r=P4(a,n),r!==0&&r!==c.retryLane))throw c.retryLane=r,la(e,r),jn(a,e,r),XS;dS(l)||km(),t=s1(e,t,n)}else dS(l)?(t.flags|=192,t.child=e.child,t=null):(e=c.treeContext,pt=hi(l.nextSibling),en=t,Me=!0,uo=null,fi=!1,e!==null&&yC(t,e),t=Q1(t,r.children),t.flags|=4096);return t}return i?(no(t),l=r.fallback,i=t.mode,c=e.child,u=c.sibling,r=br(c,{mode:"hidden",children:r.children}),r.subtreeFlags=c.subtreeFlags&65011712,u!==null?l=br(u,l):(l=Yo(l,i,n,null),l.flags|=2),l.return=t,r.return=t,r.sibling=l,t.child=r,fc(null,r),r=t.child,l=e.child.memoizedState,l===null?l=a1(n):(i=l.cachePool,i!==null?(c=Dt._currentValue,i=i.parent!==c?{parent:c,pool:c}:i):i=bC(),l={baseLanes:l.baseLanes|n,cachePool:i}),r.memoizedState=l,r.childLanes=l1(e,a,n),t.memoizedState=o1,fc(e.child,r)):(to(t),n=e.child,e=n.sibling,n=br(n,{mode:"visible",children:r.children}),n.return=t,n.sibling=null,e!==null&&(a=t.deletions,a===null?(t.deletions=[e],t.flags|=16):a.push(e)),t.child=n,t.memoizedState=null,n)}function Q1(e,t){return t=vm({mode:"visible",children:t},e.mode),t.return=e,e.child=t}function vm(e,t){return e=Fn(22,e,null,t),e.lanes=0,e}function s1(e,t,n){return ta(t,e.child,null,n),e=Q1(t,t.pendingProps.children),e.flags|=2,t.memoizedState=null,e}function JT(e,t,n){e.lanes|=t;var r=e.alternate;r!==null&&(r.lanes|=t),L1(e.return,t,n)}function c1(e,t,n,r,i,o){var a=e.memoizedState;a===null?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i,treeForkCount:o}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i,a.treeForkCount=o)}function f6(e,t,n){var r=t.pendingProps,i=r.revealOrder,o=r.tail;r=r.children;var a=zt.current,l=(a&2)!==0;if(l?(a=a&1|2,t.flags|=128):a&=1,dt(zt,a),Kt(e,t,r,n),r=Me?Dc:0,!l&&e!==null&&(e.flags&128)!==0)e:for(e=t.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&JT(e,n,t);else if(e.tag===19)JT(e,n,t);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;e.sibling===null;){if(e.return===null||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(i){case"forwards":for(n=t.child,i=null;n!==null;)e=n.alternate,e!==null&&hm(e)===null&&(i=n),n=n.sibling;n=i,n===null?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),c1(t,!1,i,n,o,r);break;case"backwards":case"unstable_legacy-backwards":for(n=null,i=t.child,t.child=null;i!==null;){if(e=i.alternate,e!==null&&hm(e)===null){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}c1(t,!0,n,null,o,r);break;case"together":c1(t,!1,null,null,void 0,r);break;default:t.memoizedState=null}return t.child}function $r(e,t,n){if(e!==null&&(t.dependencies=e.dependencies),ko|=t.lanes,(n&t.childLanes)===0)if(e!==null){if(Wl(e,t,n,!1),(n&t.childLanes)===0)return null}else return null;if(e!==null&&t.child!==e.child)throw Error(O(153));if(t.child!==null){for(e=t.child,n=br(e,e.pendingProps),t.child=n,n.return=t;e.sibling!==null;)e=e.sibling,n=n.sibling=br(e,e.pendingProps),n.return=t;n.sibling=null}return t.child}function KS(e,t){return(e.lanes&t)!==0?!0:(e=e.dependencies,!!(e!==null&&dm(e)))}function QM(e,t,n){switch(t.tag){case 3:rm(t,t.stateNode.containerInfo),eo(t,Dt,e.memoizedState.cache),Qo();break;case 27:case 5:T1(t);break;case 4:rm(t,t.stateNode.containerInfo);break;case 10:eo(t,t.type,t.memoizedProps.value);break;case 31:if(t.memoizedState!==null)return t.flags|=128,q1(t),null;break;case 13:var r=t.memoizedState;if(r!==null)return r.dehydrated!==null?(to(t),t.flags|=128,null):(n&t.child.childLanes)!==0?d6(e,t,n):(to(t),e=$r(e,t,n),e!==null?e.sibling:null);to(t);break;case 19:var i=(e.flags&128)!==0;if(r=(n&t.childLanes)!==0,r||(Wl(e,t,n,!1),r=(n&t.childLanes)!==0),i){if(r)return f6(e,t,n);t.flags|=128}if(i=t.memoizedState,i!==null&&(i.rendering=null,i.tail=null,i.lastEffect=null),dt(zt,zt.current),r)break;return null;case 22:return t.lanes=0,u6(e,t,n,t.pendingProps);case 24:eo(t,Dt,e.memoizedState.cache)}return $r(e,t,n)}function m6(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps)At=!0;else{if(!KS(e,n)&&(t.flags&128)===0)return At=!1,QM(e,t,n);At=(e.flags&131072)!==0}else At=!1,Me&&(t.flags&1048576)!==0&&gC(t,Dc,t.index);switch(t.lanes=0,t.tag){case 16:e:{var r=t.pendingProps;if(e=qo(t.elementType),t.type=e,typeof e=="function")IS(e)?(r=ia(e,r),t.tag=1,t=WT(null,t,e,r,n)):(t.tag=0,t=K1(null,t,e,r,n));else{if(e!=null){var i=e.$$typeof;if(i===gS){t.tag=11,t=FT(null,t,e,r,n);break e}else if(i===yS){t.tag=14,t=HT(null,t,e,r,n);break e}}throw t=$1(e)||e,Error(O(306,t,""))}}return t;case 0:return K1(e,t,t.type,t.pendingProps,n);case 1:return r=t.type,i=ia(r,t.pendingProps),WT(e,t,r,i,n);case 3:e:{if(rm(t,t.stateNode.containerInfo),e===null)throw Error(O(387));r=t.pendingProps;var o=t.memoizedState;i=o.element,F1(e,t),xc(t,r,null,n);var a=t.memoizedState;if(r=a.cache,eo(t,Dt,r),r!==o.cache&&P1(t,[Dt],n,!0),bc(),r=a.element,o.isDehydrated)if(o={element:r,isDehydrated:!1,cache:a.cache},t.updateQueue.baseState=o,t.memoizedState=o,t.flags&256){t=YT(e,t,r,n);break e}else if(r!==i){i=di(Error(O(424)),t),Ac(i),t=YT(e,t,r,n);break e}else for(e=t.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,pt=hi(e.firstChild),en=t,Me=!0,uo=null,fi=!0,n=kC(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(Qo(),r===i){t=$r(e,t,n);break e}Kt(e,t,r,n)}t=t.child}return t;case 26:return Xf(e,t),e===null?(n=v4(t.type,null,t.pendingProps,null))?t.memoizedState=n:Me||(n=t.type,e=t.pendingProps,r=zm(co.current).createElement(n),r[Qt]=t,r[On]=e,nn(r,n,e),Ht(r),t.stateNode=r):t.memoizedState=v4(t.type,e.memoizedProps,t.pendingProps,e.memoizedState),null;case 27:return T1(t),e===null&&Me&&(r=t.stateNode=iE(t.type,t.pendingProps,co.current),en=t,fi=!0,i=pt,_o(t.type)?(mS=i,pt=hi(r.firstChild)):pt=i),Kt(e,t,t.pendingProps.children,n),Xf(e,t),e===null&&(t.flags|=4194304),t.child;case 5:return e===null&&Me&&((i=r=pt)&&(r=T3(r,t.type,t.pendingProps,fi),r!==null?(t.stateNode=r,en=t,pt=hi(r.firstChild),fi=!1,i=!0):i=!1),i||xo(t)),T1(t),i=t.type,o=t.pendingProps,a=e!==null?e.memoizedProps:null,r=o.children,cS(i,o)?r=null:a!==null&&cS(i,a)&&(t.flags|=32),t.memoizedState!==null&&(i=BS(e,t,HM,null,null,n),Mc._currentValue=i),Xf(e,t),Kt(e,t,r,n),t.child;case 6:return e===null&&Me&&((e=n=pt)&&(n=C3(n,t.pendingProps,fi),n!==null?(t.stateNode=n,en=t,pt=null,e=!0):e=!1),e||xo(t)),null;case 13:return d6(e,t,n);case 4:return rm(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=ta(t,null,r,n):Kt(e,t,r,n),t.child;case 11:return FT(e,t,t.type,t.pendingProps,n);case 7:return Kt(e,t,t.pendingProps,n),t.child;case 8:return Kt(e,t,t.pendingProps.children,n),t.child;case 12:return Kt(e,t,t.pendingProps.children,n),t.child;case 10:return r=t.pendingProps,eo(t,t.type,r.value),Kt(e,t,r.children,n),t.child;case 9:return i=t.type._context,r=t.pendingProps.children,ea(t),i=tn(i),r=r(i),t.flags|=1,Kt(e,t,r,n),t.child;case 14:return HT(e,t,t.type,t.pendingProps,n);case 15:return c6(e,t,t.type,t.pendingProps,n);case 19:return f6(e,t,n);case 31:return KM(e,t,n);case 22:return u6(e,t,n,t.pendingProps);case 24:return ea(t),r=tn(Dt),e===null?(i=OS(),i===null&&(i=ot,o=jS(),i.pooledCache=o,o.refCount++,o!==null&&(i.pooledCacheLanes|=n),i=o),t.memoizedState={parent:r,cache:i},US(t),eo(t,Dt,i)):((e.lanes&n)!==0&&(F1(e,t),xc(t,null,null,n),bc()),i=e.memoizedState,o=t.memoizedState,i.parent!==r?(i={parent:r,cache:r},t.memoizedState=i,t.lanes===0&&(t.memoizedState=t.updateQueue.baseState=i),eo(t,Dt,r)):(r=o.cache,eo(t,Dt,r),r!==i.cache&&P1(t,[Dt],n,!0))),Kt(e,t,t.pendingProps.children,n),t.child;case 29:throw t.pendingProps}throw Error(O(156,t.tag))}function ur(e){e.flags|=4}function u1(e,t,n,r,i){if((t=(e.mode&32)!==0)&&(t=!1),t){if(e.flags|=16777216,(i&335544128)===i)if(e.stateNode.complete)e.flags|=8192;else if(R6())e.flags|=8192;else throw Xo=fm,NS}else e.flags&=-16777217}function XT(e,t){if(t.type!=="stylesheet"||(t.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!aE(t))if(R6())e.flags|=8192;else throw Xo=fm,NS}function Nf(e,t){t!==null&&(e.flags|=4),e.flags&16384&&(t=e.tag!==22?M4():536870912,e.lanes|=t,Pl|=t)}function oc(e,t){if(!Me)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;t!==null;)t.alternate!==null&&(n=t),t=t.sibling;n===null?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;n!==null;)n.alternate!==null&&(r=n),n=n.sibling;r===null?t||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function ht(e){var t=e.alternate!==null&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags&65011712,r|=i.flags&65011712,i.return=e,i=i.sibling;else for(i=e.child;i!==null;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function e3(e,t,n){var r=t.pendingProps;switch(AS(t),t.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ht(t),null;case 1:return ht(t),null;case 3:return n=t.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),t.memoizedState.cache!==r&&(t.flags|=2048),xr(Dt),Nl(),n.pendingContext&&(n.context=n.pendingContext,n.pendingContext=null),(e===null||e.child===null)&&(fl(t)?ur(t):e===null||e.memoizedState.isDehydrated&&(t.flags&256)===0||(t.flags|=1024,t1())),ht(t),null;case 26:var i=t.type,o=t.memoizedState;return e===null?(ur(t),o!==null?(ht(t),XT(t,o)):(ht(t),u1(t,i,null,r,n))):o?o!==e.memoizedState?(ur(t),ht(t),XT(t,o)):(ht(t),t.flags&=-16777217):(e=e.memoizedProps,e!==r&&ur(t),ht(t),u1(t,i,e,r,n)),null;case 27:if(om(t),n=co.current,i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ur(t);else{if(!r){if(t.stateNode===null)throw Error(O(166));return ht(t),null}e=Gi.current,fl(t)?zT(t,e):(e=iE(i,r,n),t.stateNode=e,ur(t))}return ht(t),null;case 5:if(om(t),i=t.type,e!==null&&t.stateNode!=null)e.memoizedProps!==r&&ur(t);else{if(!r){if(t.stateNode===null)throw Error(O(166));return ht(t),null}if(o=Gi.current,fl(t))zT(t,o);else{var a=zm(co.current);switch(o){case 1:o=a.createElementNS("http://www.w3.org/2000/svg",i);break;case 2:o=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;default:switch(i){case"svg":o=a.createElementNS("http://www.w3.org/2000/svg",i);break;case"math":o=a.createElementNS("http://www.w3.org/1998/Math/MathML",i);break;case"script":o=a.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild);break;case"select":o=typeof r.is=="string"?a.createElement("select",{is:r.is}):a.createElement("select"),r.multiple?o.multiple=!0:r.size&&(o.size=r.size);break;default:o=typeof r.is=="string"?a.createElement(i,{is:r.is}):a.createElement(i)}}o[Qt]=t,o[On]=r;e:for(a=t.child;a!==null;){if(a.tag===5||a.tag===6)o.appendChild(a.stateNode);else if(a.tag!==4&&a.tag!==27&&a.child!==null){a.child.return=a,a=a.child;continue}if(a===t)break e;for(;a.sibling===null;){if(a.return===null||a.return===t)break e;a=a.return}a.sibling.return=a.return,a=a.sibling}t.stateNode=o;e:switch(nn(o,i,r),i){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&ur(t)}}return ht(t),u1(t,t.type,e===null?null:e.memoizedProps,t.pendingProps,n),null;case 6:if(e&&t.stateNode!=null)e.memoizedProps!==r&&ur(t);else{if(typeof r!="string"&&t.stateNode===null)throw Error(O(166));if(e=co.current,fl(t)){if(e=t.stateNode,n=t.memoizedProps,r=null,i=en,i!==null)switch(i.tag){case 27:case 5:r=i.memoizedProps}e[Qt]=t,e=!!(e.nodeValue===n||r!==null&&r.suppressHydrationWarning===!0||Q6(e.nodeValue,n)),e||xo(t,!0)}else e=zm(e).createTextNode(r),e[Qt]=t,t.stateNode=e}return ht(t),null;case 31:if(n=t.memoizedState,e===null||e.memoizedState!==null){if(r=fl(t),n!==null){if(e===null){if(!r)throw Error(O(318));if(e=t.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(O(557));e[Qt]=t}else Qo(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),e=!1}else n=t1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=n),e=!0;if(!e)return t.flags&256?(Zn(t),t):(Zn(t),null);if((t.flags&128)!==0)throw Error(O(558))}return ht(t),null;case 13:if(r=t.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(i=fl(t),r!==null&&r.dehydrated!==null){if(e===null){if(!i)throw Error(O(318));if(i=t.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(O(317));i[Qt]=t}else Qo(),(t.flags&128)===0&&(t.memoizedState=null),t.flags|=4;ht(t),i=!1}else i=t1(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=i),i=!0;if(!i)return t.flags&256?(Zn(t),t):(Zn(t),null)}return Zn(t),(t.flags&128)!==0?(t.lanes=n,t):(n=r!==null,e=e!==null&&e.memoizedState!==null,n&&(r=t.child,i=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(i=r.alternate.memoizedState.cachePool.pool),o=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(o=r.memoizedState.cachePool.pool),o!==i&&(r.flags|=2048)),n!==e&&n&&(t.child.flags|=8192),Nf(t,t.updateQueue),ht(t),null);case 4:return Nl(),e===null&&o0(t.stateNode.containerInfo),ht(t),null;case 10:return xr(t.type),ht(t),null;case 19:if(Vt(zt),r=t.memoizedState,r===null)return ht(t),null;if(i=(t.flags&128)!==0,o=r.rendering,o===null)if(i)oc(r,!1);else{if(wt!==0||e!==null&&(e.flags&128)!==0)for(e=t.child;e!==null;){if(o=hm(e),o!==null){for(t.flags|=128,oc(r,!1),e=o.updateQueue,t.updateQueue=e,Nf(t,e),t.subtreeFlags=0,e=n,n=t.child;n!==null;)hC(n,e),n=n.sibling;return dt(zt,zt.current&1|2),Me&&hr(t,r.treeForkCount),t.child}e=e.sibling}r.tail!==null&&Vn()>xm&&(t.flags|=128,i=!0,oc(r,!1),t.lanes=4194304)}else{if(!i)if(e=hm(o),e!==null){if(t.flags|=128,i=!0,e=e.updateQueue,t.updateQueue=e,Nf(t,e),oc(r,!0),r.tail===null&&r.tailMode==="hidden"&&!o.alternate&&!Me)return ht(t),null}else 2*Vn()-r.renderingStartTime>xm&&n!==536870912&&(t.flags|=128,i=!0,oc(r,!1),t.lanes=4194304);r.isBackwards?(o.sibling=t.child,t.child=o):(e=r.last,e!==null?e.sibling=o:t.child=o,r.last=o)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=Vn(),e.sibling=null,n=zt.current,dt(zt,i?n&1|2:n&1),Me&&hr(t,r.treeForkCount),e):(ht(t),null);case 22:case 23:return Zn(t),RS(),r=t.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(t.flags|=8192):r&&(t.flags|=8192),r?(n&536870912)!==0&&(t.flags&128)===0&&(ht(t),t.subtreeFlags&6&&(t.flags|=8192)):ht(t),n=t.updateQueue,n!==null&&Nf(t,n.retryQueue),n=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),r=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(r=t.memoizedState.cachePool.pool),r!==n&&(t.flags|=2048),e!==null&&Vt(Jo),null;case 24:return n=null,e!==null&&(n=e.memoizedState.cache),t.memoizedState.cache!==n&&(t.flags|=2048),xr(Dt),ht(t),null;case 25:return null;case 30:return null}throw Error(O(156,t.tag))}function t3(e,t){switch(AS(t),t.tag){case 1:return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return xr(Dt),Nl(),e=t.flags,(e&65536)!==0&&(e&128)===0?(t.flags=e&-65537|128,t):null;case 26:case 27:case 5:return om(t),null;case 31:if(t.memoizedState!==null){if(Zn(t),t.alternate===null)throw Error(O(340));Qo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 13:if(Zn(t),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(O(340));Qo()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return Vt(zt),null;case 4:return Nl(),null;case 10:return xr(t.type),null;case 22:case 23:return Zn(t),RS(),e!==null&&Vt(Jo),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 24:return xr(Dt),null;case 25:return null;default:return null}}function h6(e,t){switch(AS(t),t.tag){case 3:xr(Dt),Nl();break;case 26:case 27:case 5:om(t);break;case 4:Nl();break;case 31:t.memoizedState!==null&&Zn(t);break;case 13:Zn(t);break;case 19:Vt(zt);break;case 10:xr(t.type);break;case 22:case 23:Zn(t),RS(),e!==null&&Vt(Jo);break;case 24:xr(Dt)}}function Yc(e,t){try{var n=t.updateQueue,r=n!==null?n.lastEffect:null;if(r!==null){var i=r.next;n=i;do{if((n.tag&e)===e){r=void 0;var o=n.create,a=n.inst;r=o(),a.destroy=r}n=n.next}while(n!==i)}}catch(l){Je(t,t.return,l)}}function So(e,t,n){try{var r=t.updateQueue,i=r!==null?r.lastEffect:null;if(i!==null){var o=i.next;r=o;do{if((r.tag&e)===e){var a=r.inst,l=a.destroy;if(l!==void 0){a.destroy=void 0,i=t;var c=n,u=l;try{u()}catch(d){Je(i,c,d)}}}r=r.next}while(r!==o)}}catch(d){Je(t,t.return,d)}}function p6(e){var t=e.updateQueue;if(t!==null){var n=e.stateNode;try{_C(t,n)}catch(r){Je(e,e.return,r)}}}function g6(e,t,n){n.props=ia(e.type,e.memoizedProps),n.state=e.memoizedState;try{n.componentWillUnmount()}catch(r){Je(e,t,r)}}function kc(e,t){try{var n=e.ref;if(n!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof n=="function"?e.refCleanup=n(r):n.current=r}}catch(i){Je(e,t,i)}}function qi(e,t){var n=e.ref,r=e.refCleanup;if(n!==null)if(typeof r=="function")try{r()}catch(i){Je(e,t,i)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof n=="function")try{n(null)}catch(i){Je(e,t,i)}else n.current=null}function y6(e){var t=e.type,n=e.memoizedProps,r=e.stateNode;try{e:switch(t){case"button":case"input":case"select":case"textarea":n.autoFocus&&r.focus();break e;case"img":n.src?r.src=n.src:n.srcSet&&(r.srcset=n.srcSet)}}catch(i){Je(e,e.return,i)}}function d1(e,t,n){try{var r=e.stateNode;S3(r,e.type,n,t),r[On]=t}catch(i){Je(e,e.return,i)}}function v6(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&_o(e.type)||e.tag===4}function f1(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||v6(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&_o(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function eS(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?(n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n).insertBefore(e,t):(t=n.nodeType===9?n.body:n.nodeName==="HTML"?n.ownerDocument.body:n,t.appendChild(e),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=yr));else if(r!==4&&(r===27&&_o(e.type)&&(n=e.stateNode,t=null),e=e.child,e!==null))for(eS(e,t,n),e=e.sibling;e!==null;)eS(e,t,n),e=e.sibling}function bm(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(r===27&&_o(e.type)&&(n=e.stateNode),e=e.child,e!==null))for(bm(e,t,n),e=e.sibling;e!==null;)bm(e,t,n),e=e.sibling}function b6(e){var t=e.stateNode,n=e.memoizedProps;try{for(var r=e.type,i=t.attributes;i.length;)t.removeAttributeNode(i[0]);nn(t,r,n),t[Qt]=e,t[On]=n}catch(o){Je(e,e.return,o)}}var pr=!1,It=!1,m1=!1,KT=typeof WeakSet=="function"?WeakSet:Set,Ft=null;function n3(e,t){if(e=e.containerInfo,lS=Im,e=aC(e),TS(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch{n=null;break e}var a=0,l=-1,c=-1,u=0,d=0,m=e,h=null;t:for(;;){for(var f;m!==n||i!==0&&m.nodeType!==3||(l=a+i),m!==o||r!==0&&m.nodeType!==3||(c=a+r),m.nodeType===3&&(a+=m.nodeValue.length),(f=m.firstChild)!==null;)h=m,m=f;for(;;){if(m===e)break t;if(h===n&&++u===i&&(l=a),h===o&&++d===r&&(c=a),(f=m.nextSibling)!==null)break;m=h,h=m.parentNode}m=f}n=l===-1||c===-1?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(sS={focusedElem:e,selectionRange:n},Im=!1,Ft=t;Ft!==null;)if(t=Ft,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,Ft=e;else for(;Ft!==null;){switch(t=Ft,o=t.alternate,e=t.flags,t.tag){case 0:if((e&4)!==0&&(e=t.updateQueue,e=e!==null?e.events:null,e!==null))for(n=0;n<e.length;n++)i=e[n],i.ref.impl=i.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&o!==null){e=void 0,n=t,i=o.memoizedProps,o=o.memoizedState,r=n.stateNode;try{var v=ia(n.type,i);e=r.getSnapshotBeforeUpdate(v,o),r.__reactInternalSnapshotBeforeUpdate=e}catch(k){Je(n,n.return,k)}}break;case 3:if((e&1024)!==0){if(e=t.stateNode.containerInfo,n=e.nodeType,n===9)uS(e);else if(n===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":uS(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(O(163))}if(e=t.sibling,e!==null){e.return=t.return,Ft=e;break}Ft=t.return}}function x6(e,t,n){var r=n.flags;switch(n.tag){case 0:case 11:case 15:fr(e,n),r&4&&Yc(5,n);break;case 1:if(fr(e,n),r&4)if(e=n.stateNode,t===null)try{e.componentDidMount()}catch(a){Je(n,n.return,a)}else{var i=ia(n.type,t.memoizedProps);t=t.memoizedState;try{e.componentDidUpdate(i,t,e.__reactInternalSnapshotBeforeUpdate)}catch(a){Je(n,n.return,a)}}r&64&&p6(n),r&512&&kc(n,n.return);break;case 3:if(fr(e,n),r&64&&(e=n.updateQueue,e!==null)){if(t=null,n.child!==null)switch(n.child.tag){case 27:case 5:t=n.child.stateNode;break;case 1:t=n.child.stateNode}try{_C(e,t)}catch(a){Je(n,n.return,a)}}break;case 27:t===null&&r&4&&b6(n);case 26:case 5:fr(e,n),t===null&&r&4&&y6(n),r&512&&kc(n,n.return);break;case 12:fr(e,n);break;case 31:fr(e,n),r&4&&w6(e,n);break;case 13:fr(e,n),r&4&&_6(e,n),r&64&&(e=n.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(n=d3.bind(null,n),E3(e,n))));break;case 22:if(r=n.memoizedState!==null||pr,!r){t=t!==null&&t.memoizedState!==null||It,i=pr;var o=It;pr=r,(It=t)&&!o?mr(e,n,(n.subtreeFlags&8772)!==0):fr(e,n),pr=i,It=o}break;case 30:break;default:fr(e,n)}}function S6(e){var t=e.alternate;t!==null&&(e.alternate=null,S6(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&SS(t)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var vt=null,Dn=!1;function dr(e,t,n){for(n=n.child;n!==null;)k6(e,t,n),n=n.sibling}function k6(e,t,n){if(qn&&typeof qn.onCommitFiberUnmount=="function")try{qn.onCommitFiberUnmount(Zc,n)}catch{}switch(n.tag){case 26:It||qi(n,t),dr(e,t,n),n.memoizedState?n.memoizedState.count--:n.stateNode&&(n=n.stateNode,n.parentNode.removeChild(n));break;case 27:It||qi(n,t);var r=vt,i=Dn;_o(n.type)&&(vt=n.stateNode,Dn=!1),dr(e,t,n),zc(n.stateNode),vt=r,Dn=i;break;case 5:It||qi(n,t);case 6:if(r=vt,i=Dn,vt=null,dr(e,t,n),vt=r,Dn=i,vt!==null)if(Dn)try{(vt.nodeType===9?vt.body:vt.nodeName==="HTML"?vt.ownerDocument.body:vt).removeChild(n.stateNode)}catch(o){Je(n,t,o)}else try{vt.removeChild(n.stateNode)}catch(o){Je(n,t,o)}break;case 18:vt!==null&&(Dn?(e=vt,m4(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,n.stateNode),Vl(e)):m4(vt,n.stateNode));break;case 4:r=vt,i=Dn,vt=n.stateNode.containerInfo,Dn=!0,dr(e,t,n),vt=r,Dn=i;break;case 0:case 11:case 14:case 15:So(2,n,t),It||So(4,n,t),dr(e,t,n);break;case 1:It||(qi(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"&&g6(n,t,r)),dr(e,t,n);break;case 21:dr(e,t,n);break;case 22:It=(r=It)||n.memoizedState!==null,dr(e,t,n),It=r;break;default:dr(e,t,n)}}function w6(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Vl(e)}catch(n){Je(t,t.return,n)}}}function _6(e,t){if(t.memoizedState===null&&(e=t.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Vl(e)}catch(n){Je(t,t.return,n)}}function i3(e){switch(e.tag){case 31:case 13:case 19:var t=e.stateNode;return t===null&&(t=e.stateNode=new KT),t;case 22:return e=e.stateNode,t=e._retryCache,t===null&&(t=e._retryCache=new KT),t;default:throw Error(O(435,e.tag))}}function Uf(e,t){var n=i3(e);t.forEach(function(r){if(!n.has(r)){n.add(r);var i=f3.bind(null,e,r);r.then(i,i)}})}function En(e,t){var n=t.deletions;if(n!==null)for(var r=0;r<n.length;r++){var i=n[r],o=e,a=t,l=a;e:for(;l!==null;){switch(l.tag){case 27:if(_o(l.type)){vt=l.stateNode,Dn=!1;break e}break;case 5:vt=l.stateNode,Dn=!1;break e;case 3:case 4:vt=l.stateNode.containerInfo,Dn=!0;break e}l=l.return}if(vt===null)throw Error(O(160));k6(o,a,i),vt=null,Dn=!1,o=i.alternate,o!==null&&(o.return=null),i.return=null}if(t.subtreeFlags&13886)for(t=t.child;t!==null;)$6(t,e),t=t.sibling}var $i=null;function $6(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:En(t,e),In(e),r&4&&(So(3,e,e.return),Yc(3,e),So(5,e,e.return));break;case 1:En(t,e),In(e),r&512&&(It||n===null||qi(n,n.return)),r&64&&pr&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(n=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=n===null?r:n.concat(r))));break;case 26:var i=$i;if(En(t,e),In(e),r&512&&(It||n===null||qi(n,n.return)),r&4){var o=n!==null?n.memoizedState:null;if(r=e.memoizedState,n===null)if(r===null)if(e.stateNode===null){e:{r=e.type,n=e.memoizedProps,i=i.ownerDocument||i;t:switch(r){case"title":o=i.getElementsByTagName("title")[0],(!o||o[Vc]||o[Qt]||o.namespaceURI==="http://www.w3.org/2000/svg"||o.hasAttribute("itemprop"))&&(o=i.createElement(r),i.head.insertBefore(o,i.querySelector("head > title"))),nn(o,r,n),o[Qt]=e,Ht(o),r=o;break e;case"link":var a=x4("link","href",i).get(r+(n.href||""));if(a){for(var l=0;l<a.length;l++)if(o=a[l],o.getAttribute("href")===(n.href==null||n.href===""?null:n.href)&&o.getAttribute("rel")===(n.rel==null?null:n.rel)&&o.getAttribute("title")===(n.title==null?null:n.title)&&o.getAttribute("crossorigin")===(n.crossOrigin==null?null:n.crossOrigin)){a.splice(l,1);break t}}o=i.createElement(r),nn(o,r,n),i.head.appendChild(o);break;case"meta":if(a=x4("meta","content",i).get(r+(n.content||""))){for(l=0;l<a.length;l++)if(o=a[l],o.getAttribute("content")===(n.content==null?null:""+n.content)&&o.getAttribute("name")===(n.name==null?null:n.name)&&o.getAttribute("property")===(n.property==null?null:n.property)&&o.getAttribute("http-equiv")===(n.httpEquiv==null?null:n.httpEquiv)&&o.getAttribute("charset")===(n.charSet==null?null:n.charSet)){a.splice(l,1);break t}}o=i.createElement(r),nn(o,r,n),i.head.appendChild(o);break;default:throw Error(O(468,r))}o[Qt]=e,Ht(o),r=o}e.stateNode=r}else S4(i,e.type,e.stateNode);else e.stateNode=b4(i,r,e.memoizedProps);else o!==r?(o===null?n.stateNode!==null&&(n=n.stateNode,n.parentNode.removeChild(n)):o.count--,r===null?S4(i,e.type,e.stateNode):b4(i,r,e.memoizedProps)):r===null&&e.stateNode!==null&&d1(e,e.memoizedProps,n.memoizedProps)}break;case 27:En(t,e),In(e),r&512&&(It||n===null||qi(n,n.return)),n!==null&&r&4&&d1(e,e.memoizedProps,n.memoizedProps);break;case 5:if(En(t,e),In(e),r&512&&(It||n===null||qi(n,n.return)),e.flags&32){i=e.stateNode;try{Rl(i,"")}catch(v){Je(e,e.return,v)}}r&4&&e.stateNode!=null&&(i=e.memoizedProps,d1(e,i,n!==null?n.memoizedProps:i)),r&1024&&(m1=!0);break;case 6:if(En(t,e),In(e),r&4){if(e.stateNode===null)throw Error(O(162));r=e.memoizedProps,n=e.stateNode;try{n.nodeValue=r}catch(v){Je(e,e.return,v)}}break;case 3:if(em=null,i=$i,$i=Tm(t.containerInfo),En(t,e),$i=i,In(e),r&4&&n!==null&&n.memoizedState.isDehydrated)try{Vl(t.containerInfo)}catch(v){Je(e,e.return,v)}m1&&(m1=!1,z6(e));break;case 4:r=$i,$i=Tm(e.stateNode.containerInfo),En(t,e),In(e),$i=r;break;case 12:En(t,e),In(e);break;case 31:En(t,e),In(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uf(e,r)));break;case 13:En(t,e),In(e),e.child.flags&8192&&e.memoizedState!==null!=(n!==null&&n.memoizedState!==null)&&(Fm=Vn()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uf(e,r)));break;case 22:i=e.memoizedState!==null;var c=n!==null&&n.memoizedState!==null,u=pr,d=It;if(pr=u||i,It=d||c,En(t,e),It=d,pr=u,In(e),r&8192)e:for(t=e.stateNode,t._visibility=i?t._visibility&-2:t._visibility|1,i&&(n===null||c||pr||It||Go(e)),n=null,t=e;;){if(t.tag===5||t.tag===26){if(n===null){c=n=t;try{if(o=c.stateNode,i)a=o.style,typeof a.setProperty=="function"?a.setProperty("display","none","important"):a.display="none";else{l=c.stateNode;var m=c.memoizedProps.style,h=m!=null&&m.hasOwnProperty("display")?m.display:null;l.style.display=h==null||typeof h=="boolean"?"":(""+h).trim()}}catch(v){Je(c,c.return,v)}}}else if(t.tag===6){if(n===null){c=t;try{c.stateNode.nodeValue=i?"":c.memoizedProps}catch(v){Je(c,c.return,v)}}}else if(t.tag===18){if(n===null){c=t;try{var f=c.stateNode;i?h4(f,!0):h4(c.stateNode,!1)}catch(v){Je(c,c.return,v)}}}else if((t.tag!==22&&t.tag!==23||t.memoizedState===null||t===e)&&t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break e;for(;t.sibling===null;){if(t.return===null||t.return===e)break e;n===t&&(n=null),t=t.return}n===t&&(n=null),t.sibling.return=t.return,t=t.sibling}r&4&&(r=e.updateQueue,r!==null&&(n=r.retryQueue,n!==null&&(r.retryQueue=null,Uf(e,n))));break;case 19:En(t,e),In(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,Uf(e,r)));break;case 30:break;case 21:break;default:En(t,e),In(e)}}function In(e){var t=e.flags;if(t&2){try{for(var n,r=e.return;r!==null;){if(v6(r)){n=r;break}r=r.return}if(n==null)throw Error(O(160));switch(n.tag){case 27:var i=n.stateNode,o=f1(e);bm(e,o,i);break;case 5:var a=n.stateNode;n.flags&32&&(Rl(a,""),n.flags&=-33);var l=f1(e);bm(e,l,a);break;case 3:case 4:var c=n.stateNode.containerInfo,u=f1(e);eS(e,u,c);break;default:throw Error(O(161))}}catch(d){Je(e,e.return,d)}e.flags&=-3}t&4096&&(e.flags&=-4097)}function z6(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var t=e;z6(t),t.tag===5&&t.flags&1024&&t.stateNode.reset(),e=e.sibling}}function fr(e,t){if(t.subtreeFlags&8772)for(t=t.child;t!==null;)x6(e,t.alternate,t),t=t.sibling}function Go(e){for(e=e.child;e!==null;){var t=e;switch(t.tag){case 0:case 11:case 14:case 15:So(4,t,t.return),Go(t);break;case 1:qi(t,t.return);var n=t.stateNode;typeof n.componentWillUnmount=="function"&&g6(t,t.return,n),Go(t);break;case 27:zc(t.stateNode);case 26:case 5:qi(t,t.return),Go(t);break;case 22:t.memoizedState===null&&Go(t);break;case 30:Go(t);break;default:Go(t)}e=e.sibling}}function mr(e,t,n){for(n=n&&(t.subtreeFlags&8772)!==0,t=t.child;t!==null;){var r=t.alternate,i=e,o=t,a=o.flags;switch(o.tag){case 0:case 11:case 15:mr(i,o,n),Yc(4,o);break;case 1:if(mr(i,o,n),r=o,i=r.stateNode,typeof i.componentDidMount=="function")try{i.componentDidMount()}catch(u){Je(r,r.return,u)}if(r=o,i=r.updateQueue,i!==null){var l=r.stateNode;try{var c=i.shared.hiddenCallbacks;if(c!==null)for(i.shared.hiddenCallbacks=null,i=0;i<c.length;i++)wC(c[i],l)}catch(u){Je(r,r.return,u)}}n&&a&64&&p6(o),kc(o,o.return);break;case 27:b6(o);case 26:case 5:mr(i,o,n),n&&r===null&&a&4&&y6(o),kc(o,o.return);break;case 12:mr(i,o,n);break;case 31:mr(i,o,n),n&&a&4&&w6(i,o);break;case 13:mr(i,o,n),n&&a&4&&_6(i,o);break;case 22:o.memoizedState===null&&mr(i,o,n),kc(o,o.return);break;case 30:break;default:mr(i,o,n)}t=t.sibling}}function QS(e,t){var n=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(n=e.memoizedState.cachePool.pool),e=null,t.memoizedState!==null&&t.memoizedState.cachePool!==null&&(e=t.memoizedState.cachePool.pool),e!==n&&(e!=null&&e.refCount++,n!=null&&Gc(n))}function e0(e,t){e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gc(e))}function _i(e,t,n,r){if(t.subtreeFlags&10256)for(t=t.child;t!==null;)T6(e,t,n,r),t=t.sibling}function T6(e,t,n,r){var i=t.flags;switch(t.tag){case 0:case 11:case 15:_i(e,t,n,r),i&2048&&Yc(9,t);break;case 1:_i(e,t,n,r);break;case 3:_i(e,t,n,r),i&2048&&(e=null,t.alternate!==null&&(e=t.alternate.memoizedState.cache),t=t.memoizedState.cache,t!==e&&(t.refCount++,e!=null&&Gc(e)));break;case 12:if(i&2048){_i(e,t,n,r),e=t.stateNode;try{var o=t.memoizedProps,a=o.id,l=o.onPostCommit;typeof l=="function"&&l(a,t.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(c){Je(t,t.return,c)}}else _i(e,t,n,r);break;case 31:_i(e,t,n,r);break;case 13:_i(e,t,n,r);break;case 23:break;case 22:o=t.stateNode,a=t.alternate,t.memoizedState!==null?o._visibility&2?_i(e,t,n,r):wc(e,t):o._visibility&2?_i(e,t,n,r):(o._visibility|=2,hl(e,t,n,r,(t.subtreeFlags&10256)!==0||!1)),i&2048&&QS(a,t);break;case 24:_i(e,t,n,r),i&2048&&e0(t.alternate,t);break;default:_i(e,t,n,r)}}function hl(e,t,n,r,i){for(i=i&&((t.subtreeFlags&10256)!==0||!1),t=t.child;t!==null;){var o=e,a=t,l=n,c=r,u=a.flags;switch(a.tag){case 0:case 11:case 15:hl(o,a,l,c,i),Yc(8,a);break;case 23:break;case 22:var d=a.stateNode;a.memoizedState!==null?d._visibility&2?hl(o,a,l,c,i):wc(o,a):(d._visibility|=2,hl(o,a,l,c,i)),i&&u&2048&&QS(a.alternate,a);break;case 24:hl(o,a,l,c,i),i&&u&2048&&e0(a.alternate,a);break;default:hl(o,a,l,c,i)}t=t.sibling}}function wc(e,t){if(t.subtreeFlags&10256)for(t=t.child;t!==null;){var n=e,r=t,i=r.flags;switch(r.tag){case 22:wc(n,r),i&2048&&QS(r.alternate,r);break;case 24:wc(n,r),i&2048&&e0(r.alternate,r);break;default:wc(n,r)}t=t.sibling}}var mc=8192;function ml(e,t,n){if(e.subtreeFlags&mc)for(e=e.child;e!==null;)C6(e,t,n),e=e.sibling}function C6(e,t,n){switch(e.tag){case 26:ml(e,t,n),e.flags&mc&&e.memoizedState!==null&&P3(n,$i,e.memoizedState,e.memoizedProps);break;case 5:ml(e,t,n);break;case 3:case 4:var r=$i;$i=Tm(e.stateNode.containerInfo),ml(e,t,n),$i=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=mc,mc=16777216,ml(e,t,n),mc=r):ml(e,t,n));break;default:ml(e,t,n)}}function E6(e){var t=e.alternate;if(t!==null&&(e=t.child,e!==null)){t.child=null;do t=e.sibling,e.sibling=null,e=t;while(e!==null)}}function ac(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Ft=r,D6(r,e)}E6(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)I6(e),e=e.sibling}function I6(e){switch(e.tag){case 0:case 11:case 15:ac(e),e.flags&2048&&So(9,e,e.return);break;case 3:ac(e);break;case 12:ac(e);break;case 22:var t=e.stateNode;e.memoizedState!==null&&t._visibility&2&&(e.return===null||e.return.tag!==13)?(t._visibility&=-3,Kf(e)):ac(e);break;default:ac(e)}}function Kf(e){var t=e.deletions;if((e.flags&16)!==0){if(t!==null)for(var n=0;n<t.length;n++){var r=t[n];Ft=r,D6(r,e)}E6(e)}for(e=e.child;e!==null;){switch(t=e,t.tag){case 0:case 11:case 15:So(8,t,t.return),Kf(t);break;case 22:n=t.stateNode,n._visibility&2&&(n._visibility&=-3,Kf(t));break;default:Kf(t)}e=e.sibling}}function D6(e,t){for(;Ft!==null;){var n=Ft;switch(n.tag){case 0:case 11:case 15:So(8,n,t);break;case 23:case 22:if(n.memoizedState!==null&&n.memoizedState.cachePool!==null){var r=n.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:Gc(n.memoizedState.cache)}if(r=n.child,r!==null)r.return=n,Ft=r;else e:for(n=e;Ft!==null;){r=Ft;var i=r.sibling,o=r.return;if(S6(r),r===n){Ft=null;break e}if(i!==null){i.return=o,Ft=i;break e}Ft=o}}}var r3={getCacheForType:function(e){var t=tn(Dt),n=t.data.get(e);return n===void 0&&(n=e(),t.data.set(e,n)),n},cacheSignal:function(){return tn(Dt).controller.signal}},o3=typeof WeakMap=="function"?WeakMap:Map,Pe=0,ot=null,je=null,Oe=0,Ye=0,Pn=null,ao=!1,Jl=!1,t0=!1,zr=0,wt=0,ko=0,Ko=0,n0=0,Hn=0,Pl=0,_c=null,An=null,tS=!1,Fm=0,A6=0,xm=1/0,Sm=null,ho=null,Mt=0,po=null,Zl=null,Sr=0,nS=0,iS=null,j6=null,$c=0,rS=null;function Wn(){return(Pe&2)!==0&&Oe!==0?Oe&-Oe:be.T!==null?r0():Z4()}function O6(){if(Hn===0)if((Oe&536870912)===0||Me){var e=zf;zf<<=1,(zf&3932160)===0&&(zf=262144),Hn=e}else Hn=536870912;return e=Jn.current,e!==null&&(e.flags|=32),Hn}function jn(e,t,n){(e===ot&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)&&(Fl(e,0),lo(e,Oe,Hn,!1)),Hc(e,n),((Pe&2)===0||e!==ot)&&(e===ot&&((Pe&2)===0&&(Ko|=n),wt===4&&lo(e,Oe,Hn,!1)),Yi(e))}function N6(e,t,n){if((Pe&6)!==0)throw Error(O(327));var r=!n&&(t&127)===0&&(t&e.expiredLanes)===0||Fc(e,t),i=r?s3(e,t):h1(e,t,!0),o=r;do{if(i===0){Jl&&!r&&lo(e,t,0,!1);break}else{if(n=e.current.alternate,o&&!a3(n)){i=h1(e,t,!1),o=!1;continue}if(i===2){if(o=t,e.errorRecoveryDisabledLanes&o)var a=0;else a=e.pendingLanes&-536870913,a=a!==0?a:a&536870912?536870912:0;if(a!==0){t=a;e:{var l=e;i=_c;var c=l.current.memoizedState.isDehydrated;if(c&&(Fl(l,a).flags|=256),a=h1(l,a,!1),a!==2){if(t0&&!c){l.errorRecoveryDisabledLanes|=o,Ko|=o,i=4;break e}o=An,An=i,o!==null&&(An===null?An=o:An.push.apply(An,o))}i=a}if(o=!1,i!==2)continue}}if(i===1){Fl(e,0),lo(e,t,0,!0);break}e:{switch(r=e,o=i,o){case 0:case 1:throw Error(O(345));case 4:if((t&4194048)!==t)break;case 6:lo(r,t,Hn,!ao);break e;case 2:An=null;break;case 3:case 5:break;default:throw Error(O(329))}if((t&62914560)===t&&(i=Fm+300-Vn(),10<i)){if(lo(r,t,Hn,!ao),Am(r,0,!0)!==0)break e;Sr=t,r.timeoutHandle=tE(QT.bind(null,r,n,An,Sm,tS,t,Hn,Ko,Pl,ao,o,"Throttled",-0,0),i);break e}QT(r,n,An,Sm,tS,t,Hn,Ko,Pl,ao,o,null,-0,0)}}break}while(!0);Yi(e)}function QT(e,t,n,r,i,o,a,l,c,u,d,m,h,f){if(e.timeoutHandle=-1,m=t.subtreeFlags,m&8192||(m&16785408)===16785408){m={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:yr},C6(t,o,m);var v=(o&62914560)===o?Fm-Vn():(o&4194048)===o?A6-Vn():0;if(v=Z3(m,v),v!==null){Sr=o,e.cancelPendingCommit=v(t4.bind(null,e,t,o,n,r,i,a,l,c,d,m,null,h,f)),lo(e,o,a,!u);return}}t4(e,t,o,n,r,i,a,l,c)}function a3(e){for(var t=e;;){var n=t.tag;if((n===0||n===11||n===15)&&t.flags&16384&&(n=t.updateQueue,n!==null&&(n=n.stores,n!==null)))for(var r=0;r<n.length;r++){var i=n[r],o=i.getSnapshot;i=i.value;try{if(!Yn(o(),i))return!1}catch{return!1}}if(n=t.child,t.subtreeFlags&16384&&n!==null)n.return=t,t=n;else{if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}function lo(e,t,n,r){t&=~n0,t&=~Ko,e.suspendedLanes|=t,e.pingedLanes&=~t,r&&(e.warmLanes|=t),r=e.expirationTimes;for(var i=t;0<i;){var o=31-Gn(i),a=1<<o;r[o]=-1,i&=~a}n!==0&&B4(e,n,t)}function Hm(){return(Pe&6)===0?(Jc(0,!1),!1):!0}function i0(){if(je!==null){if(Ye===0)var e=je.return;else e=je,vr=sa=null,ZS(e),Al=null,jc=0,e=je;for(;e!==null;)h6(e.alternate,e),e=e.return;je=null}}function Fl(e,t){var n=e.timeoutHandle;n!==-1&&(e.timeoutHandle=-1,_3(n)),n=e.cancelPendingCommit,n!==null&&(e.cancelPendingCommit=null,n()),Sr=0,i0(),ot=e,je=n=br(e.current,null),Oe=t,Ye=0,Pn=null,ao=!1,Jl=Fc(e,t),t0=!1,Pl=Hn=n0=Ko=ko=wt=0,An=_c=null,tS=!1,(t&8)!==0&&(t|=t&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=t;0<r;){var i=31-Gn(r),o=1<<i;t|=e[i],r&=~o}return zr=t,Um(),n}function U6(e,t){$e=null,be.H=Nc,t===Yl||t===Mm?(t=DT(),Ye=3):t===NS?(t=DT(),Ye=4):Ye=t===XS?8:t!==null&&typeof t=="object"&&typeof t.then=="function"?6:1,Pn=t,je===null&&(wt=1,ym(e,di(t,e.current)))}function R6(){var e=Jn.current;return e===null?!0:(Oe&4194048)===Oe?mi===null:(Oe&62914560)===Oe||(Oe&536870912)!==0?e===mi:!1}function M6(){var e=be.H;return be.H=Nc,e===null?Nc:e}function B6(){var e=be.A;return be.A=r3,e}function km(){wt=4,ao||(Oe&4194048)!==Oe&&Jn.current!==null||(Jl=!0),(ko&134217727)===0&&(Ko&134217727)===0||ot===null||lo(ot,Oe,Hn,!1)}function h1(e,t,n){var r=Pe;Pe|=2;var i=M6(),o=B6();(ot!==e||Oe!==t)&&(Sm=null,Fl(e,t)),t=!1;var a=wt;e:do try{if(Ye!==0&&je!==null){var l=je,c=Pn;switch(Ye){case 8:i0(),a=6;break e;case 3:case 2:case 9:case 6:Jn.current===null&&(t=!0);var u=Ye;if(Ye=0,Pn=null,Tl(e,l,c,u),n&&Jl){a=0;break e}break;default:u=Ye,Ye=0,Pn=null,Tl(e,l,c,u)}}l3(),a=wt;break}catch(d){U6(e,d)}while(!0);return t&&e.shellSuspendCounter++,vr=sa=null,Pe=r,be.H=i,be.A=o,je===null&&(ot=null,Oe=0,Um()),a}function l3(){for(;je!==null;)L6(je)}function s3(e,t){var n=Pe;Pe|=2;var r=M6(),i=B6();ot!==e||Oe!==t?(Sm=null,xm=Vn()+500,Fl(e,t)):Jl=Fc(e,t);e:do try{if(Ye!==0&&je!==null){t=je;var o=Pn;t:switch(Ye){case 1:Ye=0,Pn=null,Tl(e,t,o,1);break;case 2:case 9:if(IT(o)){Ye=0,Pn=null,e4(t);break}t=function(){Ye!==2&&Ye!==9||ot!==e||(Ye=7),Yi(e)},o.then(t,t);break e;case 3:Ye=7;break e;case 4:Ye=5;break e;case 7:IT(o)?(Ye=0,Pn=null,e4(t)):(Ye=0,Pn=null,Tl(e,t,o,7));break;case 5:var a=null;switch(je.tag){case 26:a=je.memoizedState;case 5:case 27:var l=je;if(a?aE(a):l.stateNode.complete){Ye=0,Pn=null;var c=l.sibling;if(c!==null)je=c;else{var u=l.return;u!==null?(je=u,Vm(u)):je=null}break t}}Ye=0,Pn=null,Tl(e,t,o,5);break;case 6:Ye=0,Pn=null,Tl(e,t,o,6);break;case 8:i0(),wt=6;break e;default:throw Error(O(462))}}c3();break}catch(d){U6(e,d)}while(!0);return vr=sa=null,be.H=r,be.A=i,Pe=n,je!==null?0:(ot=null,Oe=0,Um(),wt)}function c3(){for(;je!==null&&!AR();)L6(je)}function L6(e){var t=m6(e.alternate,e,zr);e.memoizedProps=e.pendingProps,t===null?Vm(e):je=t}function e4(e){var t=e,n=t.alternate;switch(t.tag){case 15:case 0:t=GT(n,t,t.pendingProps,t.type,void 0,Oe);break;case 11:t=GT(n,t,t.pendingProps,t.type.render,t.ref,Oe);break;case 5:ZS(t);default:h6(n,t),t=je=hC(t,zr),t=m6(n,t,zr)}e.memoizedProps=e.pendingProps,t===null?Vm(e):je=t}function Tl(e,t,n,r){vr=sa=null,ZS(t),Al=null,jc=0;var i=t.return;try{if(XM(e,i,t,n,Oe)){wt=1,ym(e,di(n,e.current)),je=null;return}}catch(o){if(i!==null)throw je=i,o;wt=1,ym(e,di(n,e.current)),je=null;return}t.flags&32768?(Me||r===1?e=!0:Jl||(Oe&536870912)!==0?e=!1:(ao=e=!0,(r===2||r===9||r===3||r===6)&&(r=Jn.current,r!==null&&r.tag===13&&(r.flags|=16384))),P6(t,e)):Vm(t)}function Vm(e){var t=e;do{if((t.flags&32768)!==0){P6(t,ao);return}e=t.return;var n=e3(t.alternate,t,zr);if(n!==null){je=n;return}if(t=t.sibling,t!==null){je=t;return}je=t=e}while(t!==null);wt===0&&(wt=5)}function P6(e,t){do{var n=t3(e.alternate,e);if(n!==null){n.flags&=32767,je=n;return}if(n=e.return,n!==null&&(n.flags|=32768,n.subtreeFlags=0,n.deletions=null),!t&&(e=e.sibling,e!==null)){je=e;return}je=e=n}while(e!==null);wt=6,je=null}function t4(e,t,n,r,i,o,a,l,c){e.cancelPendingCommit=null;do qm();while(Mt!==0);if((Pe&6)!==0)throw Error(O(327));if(t!==null){if(t===e.current)throw Error(O(177));if(o=t.lanes|t.childLanes,o|=CS,ZR(e,n,o,a,l,c),e===ot&&(je=ot=null,Oe=0),Zl=t,po=e,Sr=n,nS=o,iS=i,j6=r,(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,m3(am,function(){return q6(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(t.flags&13878)!==0,(t.subtreeFlags&13878)!==0||r){r=be.T,be.T=null,i=Ze.p,Ze.p=2,a=Pe,Pe|=4;try{n3(e,t,n)}finally{Pe=a,Ze.p=i,be.T=r}}Mt=1,Z6(),F6(),H6()}}function Z6(){if(Mt===1){Mt=0;var e=po,t=Zl,n=(t.flags&13878)!==0;if((t.subtreeFlags&13878)!==0||n){n=be.T,be.T=null;var r=Ze.p;Ze.p=2;var i=Pe;Pe|=4;try{$6(t,e);var o=sS,a=aC(e.containerInfo),l=o.focusedElem,c=o.selectionRange;if(a!==l&&l&&l.ownerDocument&&oC(l.ownerDocument.documentElement,l)){if(c!==null&&TS(l)){var u=c.start,d=c.end;if(d===void 0&&(d=u),"selectionStart"in l)l.selectionStart=u,l.selectionEnd=Math.min(d,l.value.length);else{var m=l.ownerDocument||document,h=m&&m.defaultView||window;if(h.getSelection){var f=h.getSelection(),v=l.textContent.length,k=Math.min(c.start,v),D=c.end===void 0?k:Math.min(c.end,v);!f.extend&&k>D&&(a=D,D=k,k=a);var p=wT(l,k),b=wT(l,D);if(p&&b&&(f.rangeCount!==1||f.anchorNode!==p.node||f.anchorOffset!==p.offset||f.focusNode!==b.node||f.focusOffset!==b.offset)){var S=m.createRange();S.setStart(p.node,p.offset),f.removeAllRanges(),k>D?(f.addRange(S),f.extend(b.node,b.offset)):(S.setEnd(b.node,b.offset),f.addRange(S))}}}}for(m=[],f=l;f=f.parentNode;)f.nodeType===1&&m.push({element:f,left:f.scrollLeft,top:f.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<m.length;l++){var y=m[l];y.element.scrollLeft=y.left,y.element.scrollTop=y.top}}Im=!!lS,sS=lS=null}finally{Pe=i,Ze.p=r,be.T=n}}e.current=t,Mt=2}}function F6(){if(Mt===2){Mt=0;var e=po,t=Zl,n=(t.flags&8772)!==0;if((t.subtreeFlags&8772)!==0||n){n=be.T,be.T=null;var r=Ze.p;Ze.p=2;var i=Pe;Pe|=4;try{x6(e,t.alternate,t)}finally{Pe=i,Ze.p=r,be.T=n}}Mt=3}}function H6(){if(Mt===4||Mt===3){Mt=0,jR();var e=po,t=Zl,n=Sr,r=j6;(t.subtreeFlags&10256)!==0||(t.flags&10256)!==0?Mt=5:(Mt=0,Zl=po=null,V6(e,e.pendingLanes));var i=e.pendingLanes;if(i===0&&(ho=null),xS(n),t=t.stateNode,qn&&typeof qn.onCommitFiberRoot=="function")try{qn.onCommitFiberRoot(Zc,t,void 0,(t.current.flags&128)===128)}catch{}if(r!==null){t=be.T,i=Ze.p,Ze.p=2,be.T=null;try{for(var o=e.onRecoverableError,a=0;a<r.length;a++){var l=r[a];o(l.value,{componentStack:l.stack})}}finally{be.T=t,Ze.p=i}}(Sr&3)!==0&&qm(),Yi(e),i=e.pendingLanes,(n&261930)!==0&&(i&42)!==0?e===rS?$c++:($c=0,rS=e):$c=0,Jc(0,!1)}}function V6(e,t){(e.pooledCacheLanes&=t)===0&&(t=e.pooledCache,t!=null&&(e.pooledCache=null,Gc(t)))}function qm(){return Z6(),F6(),H6(),q6()}function q6(){if(Mt!==5)return!1;var e=po,t=nS;nS=0;var n=xS(Sr),r=be.T,i=Ze.p;try{Ze.p=32>n?32:n,be.T=null,n=iS,iS=null;var o=po,a=Sr;if(Mt=0,Zl=po=null,Sr=0,(Pe&6)!==0)throw Error(O(331));var l=Pe;if(Pe|=4,I6(o.current),T6(o,o.current,a,n),Pe=l,Jc(0,!1),qn&&typeof qn.onPostCommitFiberRoot=="function")try{qn.onPostCommitFiberRoot(Zc,o)}catch{}return!0}finally{Ze.p=i,be.T=r,V6(e,t)}}function n4(e,t,n){t=di(n,t),t=X1(e.stateNode,t,2),e=mo(e,t,2),e!==null&&(Hc(e,2),Yi(e))}function Je(e,t,n){if(e.tag===3)n4(e,e,n);else for(;t!==null;){if(t.tag===3){n4(t,e,n);break}else if(t.tag===1){var r=t.stateNode;if(typeof t.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(ho===null||!ho.has(r))){e=di(n,e),n=l6(2),r=mo(t,n,2),r!==null&&(s6(n,r,t,e),Hc(r,2),Yi(r));break}}t=t.return}}function p1(e,t,n){var r=e.pingCache;if(r===null){r=e.pingCache=new o3;var i=new Set;r.set(t,i)}else i=r.get(t),i===void 0&&(i=new Set,r.set(t,i));i.has(n)||(t0=!0,i.add(n),e=u3.bind(null,e,t,n),t.then(e,e))}function u3(e,t,n){var r=e.pingCache;r!==null&&r.delete(t),e.pingedLanes|=e.suspendedLanes&n,e.warmLanes&=~n,ot===e&&(Oe&n)===n&&(wt===4||wt===3&&(Oe&62914560)===Oe&&300>Vn()-Fm?(Pe&2)===0&&Fl(e,0):n0|=n,Pl===Oe&&(Pl=0)),Yi(e)}function G6(e,t){t===0&&(t=M4()),e=la(e,t),e!==null&&(Hc(e,t),Yi(e))}function d3(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),G6(e,n)}function f3(e,t){var n=0;switch(e.tag){case 31:case 13:var r=e.stateNode,i=e.memoizedState;i!==null&&(n=i.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(O(314))}r!==null&&r.delete(t),G6(e,n)}function m3(e,t){return vS(e,t)}var wm=null,pl=null,oS=!1,_m=!1,g1=!1,so=0;function Yi(e){e!==pl&&e.next===null&&(pl===null?wm=pl=e:pl=pl.next=e),_m=!0,oS||(oS=!0,p3())}function Jc(e,t){if(!g1&&_m){g1=!0;do for(var n=!1,r=wm;r!==null;){if(!t)if(e!==0){var i=r.pendingLanes;if(i===0)var o=0;else{var a=r.suspendedLanes,l=r.pingedLanes;o=(1<<31-Gn(42|e)+1)-1,o&=i&~(a&~l),o=o&201326741?o&201326741|1:o?o|2:0}o!==0&&(n=!0,i4(r,o))}else o=Oe,o=Am(r,r===ot?o:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(o&3)===0||Fc(r,o)||(n=!0,i4(r,o));r=r.next}while(n);g1=!1}}function h3(){W6()}function W6(){_m=oS=!1;var e=0;so!==0&&w3()&&(e=so);for(var t=Vn(),n=null,r=wm;r!==null;){var i=r.next,o=Y6(r,t);o===0?(r.next=null,n===null?wm=i:n.next=i,i===null&&(pl=n)):(n=r,(e!==0||(o&3)!==0)&&(_m=!0)),r=i}Mt!==0&&Mt!==5||Jc(e,!1),so!==0&&(so=0)}function Y6(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,o=e.pendingLanes&-62914561;0<o;){var a=31-Gn(o),l=1<<a,c=i[a];c===-1?((l&n)===0||(l&r)!==0)&&(i[a]=PR(l,t)):c<=t&&(e.expiredLanes|=l),o&=~l}if(t=ot,n=Oe,n=Am(e,e===t?n:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,n===0||e===t&&(Ye===2||Ye===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&Vx(r),e.callbackNode=null,e.callbackPriority=0;if((n&3)===0||Fc(e,n)){if(t=n&-n,t===e.callbackPriority)return t;switch(r!==null&&Vx(r),xS(n)){case 2:case 8:n=U4;break;case 32:n=am;break;case 268435456:n=R4;break;default:n=am}return r=J6.bind(null,e),n=vS(n,r),e.callbackPriority=t,e.callbackNode=n,t}return r!==null&&r!==null&&Vx(r),e.callbackPriority=2,e.callbackNode=null,2}function J6(e,t){if(Mt!==0&&Mt!==5)return e.callbackNode=null,e.callbackPriority=0,null;var n=e.callbackNode;if(qm()&&e.callbackNode!==n)return null;var r=Oe;return r=Am(e,e===ot?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(N6(e,r,t),Y6(e,Vn()),e.callbackNode!=null&&e.callbackNode===n?J6.bind(null,e):null)}function i4(e,t){if(qm())return null;N6(e,t,!0)}function p3(){$3(function(){(Pe&6)!==0?vS(N4,h3):W6()})}function r0(){if(so===0){var e=Ml;e===0&&(e=$f,$f<<=1,($f&261888)===0&&($f=256)),so=e}return so}function r4(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Ff(""+e)}function o4(e,t){var n=t.ownerDocument.createElement("input");return n.name=t.name,n.value=t.value,e.id&&n.setAttribute("form",e.id),t.parentNode.insertBefore(n,t),e=new FormData(e),n.parentNode.removeChild(n),e}function g3(e,t,n,r,i){if(t==="submit"&&n&&n.stateNode===i){var o=r4((i[On]||null).action),a=r.submitter;a&&(t=(t=a[On]||null)?r4(t.formAction):a.getAttribute("formAction"),t!==null&&(o=t,a=null));var l=new jm("action","action",null,r,i);e.push({event:l,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(so!==0){var c=a?o4(i,a):new FormData(i);Y1(n,{pending:!0,data:c,method:i.method,action:o},null,c)}}else typeof o=="function"&&(l.preventDefault(),c=a?o4(i,a):new FormData(i),Y1(n,{pending:!0,data:c,method:i.method,action:o},o,c))},currentTarget:i}]})}}for(Rf=0;Rf<R1.length;Rf++)Mf=R1[Rf],a4=Mf.toLowerCase(),l4=Mf[0].toUpperCase()+Mf.slice(1),zi(a4,"on"+l4);var Mf,a4,l4,Rf;zi(sC,"onAnimationEnd");zi(cC,"onAnimationIteration");zi(uC,"onAnimationStart");zi("dblclick","onDoubleClick");zi("focusin","onFocus");zi("focusout","onBlur");zi(OM,"onTransitionRun");zi(NM,"onTransitionStart");zi(UM,"onTransitionCancel");zi(dC,"onTransitionEnd");Ul("onMouseEnter",["mouseout","mouseover"]);Ul("onMouseLeave",["mouseout","mouseover"]);Ul("onPointerEnter",["pointerout","pointerover"]);Ul("onPointerLeave",["pointerout","pointerover"]);ra("onChange","change click focusin focusout input keydown keyup selectionchange".split(" "));ra("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" "));ra("onBeforeInput",["compositionend","keypress","textInput","paste"]);ra("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" "));ra("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Uc="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(" "),y3=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(Uc));function X6(e,t){t=(t&4)!==0;for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var o=void 0;if(t)for(var a=r.length-1;0<=a;a--){var l=r[a],c=l.instance,u=l.currentTarget;if(l=l.listener,c!==o&&i.isPropagationStopped())break e;o=l,i.currentTarget=u;try{o(i)}catch(d){sm(d)}i.currentTarget=null,o=c}else for(a=0;a<r.length;a++){if(l=r[a],c=l.instance,u=l.currentTarget,l=l.listener,c!==o&&i.isPropagationStopped())break e;o=l,i.currentTarget=u;try{o(i)}catch(d){sm(d)}i.currentTarget=null,o=c}}}}function Ae(e,t){var n=t[E1];n===void 0&&(n=t[E1]=new Set);var r=e+"__bubble";n.has(r)||(K6(t,e,2,!1),n.add(r))}function y1(e,t,n){var r=0;t&&(r|=4),K6(n,e,r,t)}var Bf="_reactListening"+Math.random().toString(36).slice(2);function o0(e){if(!e[Bf]){e[Bf]=!0,F4.forEach(function(n){n!=="selectionchange"&&(y3.has(n)||y1(n,!1,e),y1(n,!0,e))});var t=e.nodeType===9?e:e.ownerDocument;t===null||t[Bf]||(t[Bf]=!0,y1("selectionchange",!1,t))}}function K6(e,t,n,r){switch(dE(t)){case 2:var i=V3;break;case 8:i=q3;break;default:i=c0}n=i.bind(null,t,n,e),i=void 0,!O1||t!=="touchstart"&&t!=="touchmove"&&t!=="wheel"||(i=!0),r?i!==void 0?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):i!==void 0?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function v1(e,t,n,r,i){var o=r;if((t&1)===0&&(t&2)===0&&r!==null)e:for(;;){if(r===null)return;var a=r.tag;if(a===3||a===4){var l=r.stateNode.containerInfo;if(l===i)break;if(a===4)for(a=r.return;a!==null;){var c=a.tag;if((c===3||c===4)&&a.stateNode.containerInfo===i)return;a=a.return}for(;l!==null;){if(a=vl(l),a===null)return;if(c=a.tag,c===5||c===6||c===26||c===27){r=o=a;continue e}l=l.parentNode}}r=r.return}X4(function(){var u=o,d=wS(n),m=[];e:{var h=fC.get(e);if(h!==void 0){var f=jm,v=e;switch(e){case"keypress":if(Vf(n)===0)break e;case"keydown":case"keyup":f=fM;break;case"focusin":v="focus",f=Jx;break;case"focusout":v="blur",f=Jx;break;case"beforeblur":case"afterblur":f=Jx;break;case"click":if(n.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":f=hT;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":f=eM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":f=pM;break;case sC:case cC:case uC:f=iM;break;case dC:f=yM;break;case"scroll":case"scrollend":f=KR;break;case"wheel":f=bM;break;case"copy":case"cut":case"paste":f=oM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":f=gT;break;case"toggle":case"beforetoggle":f=SM}var k=(t&4)!==0,D=!k&&(e==="scroll"||e==="scrollend"),p=k?h!==null?h+"Capture":null:h;k=[];for(var b=u,S;b!==null;){var y=b;if(S=y.stateNode,y=y.tag,y!==5&&y!==26&&y!==27||S===null||p===null||(y=Cc(b,p),y!=null&&k.push(Rc(b,y,S))),D)break;b=b.return}0<k.length&&(h=new f(h,v,null,n,d),m.push({event:h,listeners:k}))}}if((t&7)===0){e:{if(h=e==="mouseover"||e==="pointerover",f=e==="mouseout"||e==="pointerout",h&&n!==j1&&(v=n.relatedTarget||n.fromElement)&&(vl(v)||v[ql]))break e;if((f||h)&&(h=d.window===d?d:(h=d.ownerDocument)?h.defaultView||h.parentWindow:window,f?(v=n.relatedTarget||n.toElement,f=u,v=v?vl(v):null,v!==null&&(D=Pc(v),k=v.tag,v!==D||k!==5&&k!==27&&k!==6)&&(v=null)):(f=null,v=u),f!==v)){if(k=hT,y="onMouseLeave",p="onMouseEnter",b="mouse",(e==="pointerout"||e==="pointerover")&&(k=gT,y="onPointerLeave",p="onPointerEnter",b="pointer"),D=f==null?h:dc(f),S=v==null?h:dc(v),h=new k(y,b+"leave",f,n,d),h.target=D,h.relatedTarget=S,y=null,vl(d)===u&&(k=new k(p,b+"enter",v,n,d),k.target=S,k.relatedTarget=D,y=k),D=y,f&&v)t:{for(k=v3,p=f,b=v,S=0,y=p;y;y=k(y))S++;y=0;for(var T=b;T;T=k(T))y++;for(;0<S-y;)p=k(p),S--;for(;0<y-S;)b=k(b),y--;for(;S--;){if(p===b||b!==null&&p===b.alternate){k=p;break t}p=k(p),b=k(b)}k=null}else k=null;f!==null&&s4(m,h,f,k,!1),v!==null&&D!==null&&s4(m,D,v,k,!0)}}e:{if(h=u?dc(u):window,f=h.nodeName&&h.nodeName.toLowerCase(),f==="select"||f==="input"&&h.type==="file")var M=xT;else if(bT(h))if(iC)M=DM;else{M=EM;var A=CM}else f=h.nodeName,!f||f.toLowerCase()!=="input"||h.type!=="checkbox"&&h.type!=="radio"?u&&kS(u.elementType)&&(M=xT):M=IM;if(M&&(M=M(e,u))){nC(m,M,n,d);break e}A&&A(e,h,u),e==="focusout"&&u&&h.type==="number"&&u.memoizedProps.value!=null&&A1(h,"number",h.value)}switch(A=u?dc(u):window,e){case"focusin":(bT(A)||A.contentEditable==="true")&&(Sl=A,N1=u,gc=null);break;case"focusout":gc=N1=Sl=null;break;case"mousedown":U1=!0;break;case"contextmenu":case"mouseup":case"dragend":U1=!1,_T(m,n,d);break;case"selectionchange":if(jM)break;case"keydown":case"keyup":_T(m,n,d)}var w;if(zS)e:{switch(e){case"compositionstart":var V="onCompositionStart";break e;case"compositionend":V="onCompositionEnd";break e;case"compositionupdate":V="onCompositionUpdate";break e}V=void 0}else xl?eC(e,n)&&(V="onCompositionEnd"):e==="keydown"&&n.keyCode===229&&(V="onCompositionStart");V&&(Q4&&n.locale!=="ko"&&(xl||V!=="onCompositionStart"?V==="onCompositionEnd"&&xl&&(w=K4()):(oo=d,_S="value"in oo?oo.value:oo.textContent,xl=!0)),A=$m(u,V),0<A.length&&(V=new pT(V,e,null,n,d),m.push({event:V,listeners:A}),w?V.data=w:(w=tC(n),w!==null&&(V.data=w)))),(w=wM?_M(e,n):$M(e,n))&&(V=$m(u,"onBeforeInput"),0<V.length&&(A=new pT("onBeforeInput","beforeinput",null,n,d),m.push({event:A,listeners:V}),A.data=w)),g3(m,e,u,n,d)}X6(m,t)})}function Rc(e,t,n){return{instance:e,listener:t,currentTarget:n}}function $m(e,t){for(var n=t+"Capture",r=[];e!==null;){var i=e,o=i.stateNode;if(i=i.tag,i!==5&&i!==26&&i!==27||o===null||(i=Cc(e,n),i!=null&&r.unshift(Rc(e,i,o)),i=Cc(e,t),i!=null&&r.push(Rc(e,i,o))),e.tag===3)return r;e=e.return}return[]}function v3(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function s4(e,t,n,r,i){for(var o=t._reactName,a=[];n!==null&&n!==r;){var l=n,c=l.alternate,u=l.stateNode;if(l=l.tag,c!==null&&c===r)break;l!==5&&l!==26&&l!==27||u===null||(c=u,i?(u=Cc(n,o),u!=null&&a.unshift(Rc(n,u,c))):i||(u=Cc(n,o),u!=null&&a.push(Rc(n,u,c)))),n=n.return}a.length!==0&&e.push({event:t,listeners:a})}var b3=/\r\n?/g,x3=/\u0000|\uFFFD/g;function c4(e){return(typeof e=="string"?e:""+e).replace(b3,`
|
|
9
|
-
`).replace(x3,"")}function Q6(e,t){return t=c4(t),c4(e)===t}function et(e,t,n,r,i,o){switch(n){case"children":typeof r=="string"?t==="body"||t==="textarea"&&r===""||Rl(e,r):(typeof r=="number"||typeof r=="bigint")&&t!=="body"&&Rl(e,""+r);break;case"className":Cf(e,"class",r);break;case"tabIndex":Cf(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Cf(e,n,r);break;case"style":J4(e,r,o);break;case"data":if(t!=="object"){Cf(e,"data",r);break}case"src":case"href":if(r===""&&(t!=="a"||n!=="href")){e.removeAttribute(n);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Ff(""+r),e.setAttribute(n,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(n,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof o=="function"&&(n==="formAction"?(t!=="input"&&et(e,t,"name",i.name,i,null),et(e,t,"formEncType",i.formEncType,i,null),et(e,t,"formMethod",i.formMethod,i,null),et(e,t,"formTarget",i.formTarget,i,null)):(et(e,t,"encType",i.encType,i,null),et(e,t,"method",i.method,i,null),et(e,t,"target",i.target,i,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(n);break}r=Ff(""+r),e.setAttribute(n,r);break;case"onClick":r!=null&&(e.onclick=yr);break;case"onScroll":r!=null&&Ae("scroll",e);break;case"onScrollEnd":r!=null&&Ae("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(O(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(O(60));e.innerHTML=n}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}n=Ff(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",n);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""+r):e.removeAttribute(n);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,""):e.removeAttribute(n);break;case"capture":case"download":r===!0?e.setAttribute(n,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(n,r):e.removeAttribute(n);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(n,r):e.removeAttribute(n);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(n):e.setAttribute(n,r);break;case"popover":Ae("beforetoggle",e),Ae("toggle",e),Zf(e,"popover",r);break;case"xlinkActuate":cr(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":cr(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":cr(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":cr(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":cr(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":cr(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":cr(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":cr(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":cr(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Zf(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<n.length)||n[0]!=="o"&&n[0]!=="O"||n[1]!=="n"&&n[1]!=="N")&&(n=JR.get(n)||n,Zf(e,n,r))}}function aS(e,t,n,r,i,o){switch(n){case"style":J4(e,r,o);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(O(61));if(n=r.__html,n!=null){if(i.children!=null)throw Error(O(60));e.innerHTML=n}}break;case"children":typeof r=="string"?Rl(e,r):(typeof r=="number"||typeof r=="bigint")&&Rl(e,""+r);break;case"onScroll":r!=null&&Ae("scroll",e);break;case"onScrollEnd":r!=null&&Ae("scrollend",e);break;case"onClick":r!=null&&(e.onclick=yr);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!H4.hasOwnProperty(n))e:{if(n[0]==="o"&&n[1]==="n"&&(i=n.endsWith("Capture"),t=n.slice(2,i?n.length-7:void 0),o=e[On]||null,o=o!=null?o[n]:null,typeof o=="function"&&e.removeEventListener(t,o,i),typeof r=="function")){typeof o!="function"&&o!==null&&(n in e?e[n]=null:e.hasAttribute(n)&&e.removeAttribute(n)),e.addEventListener(t,r,i);break e}n in e?e[n]=r:r===!0?e.setAttribute(n,""):Zf(e,n,r)}}}function nn(e,t,n){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":Ae("error",e),Ae("load",e);var r=!1,i=!1,o;for(o in n)if(n.hasOwnProperty(o)){var a=n[o];if(a!=null)switch(o){case"src":r=!0;break;case"srcSet":i=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(O(137,t));default:et(e,t,o,a,n,null)}}i&&et(e,t,"srcSet",n.srcSet,n,null),r&&et(e,t,"src",n.src,n,null);return;case"input":Ae("invalid",e);var l=o=a=i=null,c=null,u=null;for(r in n)if(n.hasOwnProperty(r)){var d=n[r];if(d!=null)switch(r){case"name":i=d;break;case"type":a=d;break;case"checked":c=d;break;case"defaultChecked":u=d;break;case"value":o=d;break;case"defaultValue":l=d;break;case"children":case"dangerouslySetInnerHTML":if(d!=null)throw Error(O(137,t));break;default:et(e,t,r,d,n,null)}}G4(e,o,l,c,u,a,i,!1);return;case"select":Ae("invalid",e),r=a=o=null;for(i in n)if(n.hasOwnProperty(i)&&(l=n[i],l!=null))switch(i){case"value":o=l;break;case"defaultValue":a=l;break;case"multiple":r=l;default:et(e,t,i,l,n,null)}t=o,n=a,e.multiple=!!r,t!=null?El(e,!!r,t,!1):n!=null&&El(e,!!r,n,!0);return;case"textarea":Ae("invalid",e),o=i=r=null;for(a in n)if(n.hasOwnProperty(a)&&(l=n[a],l!=null))switch(a){case"value":r=l;break;case"defaultValue":i=l;break;case"children":o=l;break;case"dangerouslySetInnerHTML":if(l!=null)throw Error(O(91));break;default:et(e,t,a,l,n,null)}Y4(e,r,i,o);return;case"option":for(c in n)n.hasOwnProperty(c)&&(r=n[c],r!=null)&&(c==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":et(e,t,c,r,n,null));return;case"dialog":Ae("beforetoggle",e),Ae("toggle",e),Ae("cancel",e),Ae("close",e);break;case"iframe":case"object":Ae("load",e);break;case"video":case"audio":for(r=0;r<Uc.length;r++)Ae(Uc[r],e);break;case"image":Ae("error",e),Ae("load",e);break;case"details":Ae("toggle",e);break;case"embed":case"source":case"link":Ae("error",e),Ae("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(u in n)if(n.hasOwnProperty(u)&&(r=n[u],r!=null))switch(u){case"children":case"dangerouslySetInnerHTML":throw Error(O(137,t));default:et(e,t,u,r,n,null)}return;default:if(kS(t)){for(d in n)n.hasOwnProperty(d)&&(r=n[d],r!==void 0&&aS(e,t,d,r,n,void 0));return}}for(l in n)n.hasOwnProperty(l)&&(r=n[l],r!=null&&et(e,t,l,r,n,null))}function S3(e,t,n,r){switch(t){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var i=null,o=null,a=null,l=null,c=null,u=null,d=null;for(f in n){var m=n[f];if(n.hasOwnProperty(f)&&m!=null)switch(f){case"checked":break;case"value":break;case"defaultValue":c=m;default:r.hasOwnProperty(f)||et(e,t,f,null,r,m)}}for(var h in r){var f=r[h];if(m=n[h],r.hasOwnProperty(h)&&(f!=null||m!=null))switch(h){case"type":o=f;break;case"name":i=f;break;case"checked":u=f;break;case"defaultChecked":d=f;break;case"value":a=f;break;case"defaultValue":l=f;break;case"children":case"dangerouslySetInnerHTML":if(f!=null)throw Error(O(137,t));break;default:f!==m&&et(e,t,h,f,r,m)}}D1(e,a,l,c,u,d,o,i);return;case"select":f=a=l=h=null;for(o in n)if(c=n[o],n.hasOwnProperty(o)&&c!=null)switch(o){case"value":break;case"multiple":f=c;default:r.hasOwnProperty(o)||et(e,t,o,null,r,c)}for(i in r)if(o=r[i],c=n[i],r.hasOwnProperty(i)&&(o!=null||c!=null))switch(i){case"value":h=o;break;case"defaultValue":l=o;break;case"multiple":a=o;default:o!==c&&et(e,t,i,o,r,c)}t=l,n=a,r=f,h!=null?El(e,!!n,h,!1):!!r!=!!n&&(t!=null?El(e,!!n,t,!0):El(e,!!n,n?[]:"",!1));return;case"textarea":f=h=null;for(l in n)if(i=n[l],n.hasOwnProperty(l)&&i!=null&&!r.hasOwnProperty(l))switch(l){case"value":break;case"children":break;default:et(e,t,l,null,r,i)}for(a in r)if(i=r[a],o=n[a],r.hasOwnProperty(a)&&(i!=null||o!=null))switch(a){case"value":h=i;break;case"defaultValue":f=i;break;case"children":break;case"dangerouslySetInnerHTML":if(i!=null)throw Error(O(91));break;default:i!==o&&et(e,t,a,i,r,o)}W4(e,h,f);return;case"option":for(var v in n)h=n[v],n.hasOwnProperty(v)&&h!=null&&!r.hasOwnProperty(v)&&(v==="selected"?e.selected=!1:et(e,t,v,null,r,h));for(c in r)h=r[c],f=n[c],r.hasOwnProperty(c)&&h!==f&&(h!=null||f!=null)&&(c==="selected"?e.selected=h&&typeof h!="function"&&typeof h!="symbol":et(e,t,c,h,r,f));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var k in n)h=n[k],n.hasOwnProperty(k)&&h!=null&&!r.hasOwnProperty(k)&&et(e,t,k,null,r,h);for(u in r)if(h=r[u],f=n[u],r.hasOwnProperty(u)&&h!==f&&(h!=null||f!=null))switch(u){case"children":case"dangerouslySetInnerHTML":if(h!=null)throw Error(O(137,t));break;default:et(e,t,u,h,r,f)}return;default:if(kS(t)){for(var D in n)h=n[D],n.hasOwnProperty(D)&&h!==void 0&&!r.hasOwnProperty(D)&&aS(e,t,D,void 0,r,h);for(d in r)h=r[d],f=n[d],!r.hasOwnProperty(d)||h===f||h===void 0&&f===void 0||aS(e,t,d,h,r,f);return}}for(var p in n)h=n[p],n.hasOwnProperty(p)&&h!=null&&!r.hasOwnProperty(p)&&et(e,t,p,null,r,h);for(m in r)h=r[m],f=n[m],!r.hasOwnProperty(m)||h===f||h==null&&f==null||et(e,t,m,h,r,f)}function u4(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function k3(){if(typeof performance.getEntriesByType=="function"){for(var e=0,t=0,n=performance.getEntriesByType("resource"),r=0;r<n.length;r++){var i=n[r],o=i.transferSize,a=i.initiatorType,l=i.duration;if(o&&l&&u4(a)){for(a=0,l=i.responseEnd,r+=1;r<n.length;r++){var c=n[r],u=c.startTime;if(u>l)break;var d=c.transferSize,m=c.initiatorType;d&&u4(m)&&(c=c.responseEnd,a+=d*(c<l?1:(l-u)/(c-u)))}if(--r,t+=8*(o+a)/(i.duration/1e3),e++,10<e)break}}if(0<e)return t/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var lS=null,sS=null;function zm(e){return e.nodeType===9?e:e.ownerDocument}function d4(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function eE(e,t){if(e===0)switch(t){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&t==="foreignObject"?0:e}function cS(e,t){return e==="textarea"||e==="noscript"||typeof t.children=="string"||typeof t.children=="number"||typeof t.children=="bigint"||typeof t.dangerouslySetInnerHTML=="object"&&t.dangerouslySetInnerHTML!==null&&t.dangerouslySetInnerHTML.__html!=null}var b1=null;function w3(){var e=window.event;return e&&e.type==="popstate"?e===b1?!1:(b1=e,!0):(b1=null,!1)}var tE=typeof setTimeout=="function"?setTimeout:void 0,_3=typeof clearTimeout=="function"?clearTimeout:void 0,f4=typeof Promise=="function"?Promise:void 0,$3=typeof queueMicrotask=="function"?queueMicrotask:typeof f4<"u"?function(e){return f4.resolve(null).then(e).catch(z3)}:tE;function z3(e){setTimeout(function(){throw e})}function _o(e){return e==="head"}function m4(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&i.nodeType===8)if(n=i.data,n==="/$"||n==="/&"){if(r===0){e.removeChild(i),Vl(t);return}r--}else if(n==="$"||n==="$?"||n==="$~"||n==="$!"||n==="&")r++;else if(n==="html")zc(e.ownerDocument.documentElement);else if(n==="head"){n=e.ownerDocument.head,zc(n);for(var o=n.firstChild;o;){var a=o.nextSibling,l=o.nodeName;o[Vc]||l==="SCRIPT"||l==="STYLE"||l==="LINK"&&o.rel.toLowerCase()==="stylesheet"||n.removeChild(o),o=a}}else n==="body"&&zc(e.ownerDocument.body);n=i}while(n);Vl(t)}function h4(e,t){var n=e;e=0;do{var r=n.nextSibling;if(n.nodeType===1?t?(n._stashedDisplay=n.style.display,n.style.display="none"):(n.style.display=n._stashedDisplay||"",n.getAttribute("style")===""&&n.removeAttribute("style")):n.nodeType===3&&(t?(n._stashedText=n.nodeValue,n.nodeValue=""):n.nodeValue=n._stashedText||""),r&&r.nodeType===8)if(n=r.data,n==="/$"){if(e===0)break;e--}else n!=="$"&&n!=="$?"&&n!=="$~"&&n!=="$!"||e++;n=r}while(n)}function uS(e){var t=e.firstChild;for(t&&t.nodeType===10&&(t=t.nextSibling);t;){var n=t;switch(t=t.nextSibling,n.nodeName){case"HTML":case"HEAD":case"BODY":uS(n),SS(n);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(n.rel.toLowerCase()==="stylesheet")continue}e.removeChild(n)}}function T3(e,t,n,r){for(;e.nodeType===1;){var i=n;if(e.nodeName.toLowerCase()!==t.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Vc])switch(t){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(o=e.getAttribute("rel"),o==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(o!==i.rel||e.getAttribute("href")!==(i.href==null||i.href===""?null:i.href)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin)||e.getAttribute("title")!==(i.title==null?null:i.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(o=e.getAttribute("src"),(o!==(i.src==null?null:i.src)||e.getAttribute("type")!==(i.type==null?null:i.type)||e.getAttribute("crossorigin")!==(i.crossOrigin==null?null:i.crossOrigin))&&o&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(t==="input"&&e.type==="hidden"){var o=i.name==null?null:""+i.name;if(i.type==="hidden"&&e.getAttribute("name")===o)return e}else return e;if(e=hi(e.nextSibling),e===null)break}return null}function C3(e,t,n){if(t==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!n||(e=hi(e.nextSibling),e===null))return null;return e}function nE(e,t){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!t||(e=hi(e.nextSibling),e===null))return null;return e}function dS(e){return e.data==="$?"||e.data==="$~"}function fS(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function E3(e,t){var n=e.ownerDocument;if(e.data==="$~")e._reactRetry=t;else if(e.data!=="$?"||n.readyState!=="loading")t();else{var r=function(){t(),n.removeEventListener("DOMContentLoaded",r)};n.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function hi(e){for(;e!=null;e=e.nextSibling){var t=e.nodeType;if(t===1||t===3)break;if(t===8){if(t=e.data,t==="$"||t==="$!"||t==="$?"||t==="$~"||t==="&"||t==="F!"||t==="F")break;if(t==="/$"||t==="/&")return null}}return e}var mS=null;function p4(e){e=e.nextSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="/$"||n==="/&"){if(t===0)return hi(e.nextSibling);t--}else n!=="$"&&n!=="$!"&&n!=="$?"&&n!=="$~"&&n!=="&"||t++}e=e.nextSibling}return null}function g4(e){e=e.previousSibling;for(var t=0;e;){if(e.nodeType===8){var n=e.data;if(n==="$"||n==="$!"||n==="$?"||n==="$~"||n==="&"){if(t===0)return e;t--}else n!=="/$"&&n!=="/&"||t++}e=e.previousSibling}return null}function iE(e,t,n){switch(t=zm(n),e){case"html":if(e=t.documentElement,!e)throw Error(O(452));return e;case"head":if(e=t.head,!e)throw Error(O(453));return e;case"body":if(e=t.body,!e)throw Error(O(454));return e;default:throw Error(O(451))}}function zc(e){for(var t=e.attributes;t.length;)e.removeAttributeNode(t[0]);SS(e)}var pi=new Map,y4=new Set;function Tm(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Tr=Ze.d;Ze.d={f:I3,r:D3,D:A3,C:j3,L:O3,m:N3,X:R3,S:U3,M:M3};function I3(){var e=Tr.f(),t=Hm();return e||t}function D3(e){var t=Gl(e);t!==null&&t.tag===5&&t.type==="form"?JC(t):Tr.r(e)}var Xl=typeof document>"u"?null:document;function rE(e,t,n){var r=Xl;if(r&&typeof t=="string"&&t){var i=ui(t);i='link[rel="'+e+'"][href="'+i+'"]',typeof n=="string"&&(i+='[crossorigin="'+n+'"]'),y4.has(i)||(y4.add(i),e={rel:e,crossOrigin:n,href:t},r.querySelector(i)===null&&(t=r.createElement("link"),nn(t,"link",e),Ht(t),r.head.appendChild(t)))}}function A3(e){Tr.D(e),rE("dns-prefetch",e,null)}function j3(e,t){Tr.C(e,t),rE("preconnect",e,t)}function O3(e,t,n){Tr.L(e,t,n);var r=Xl;if(r&&e&&t){var i='link[rel="preload"][as="'+ui(t)+'"]';t==="image"&&n&&n.imageSrcSet?(i+='[imagesrcset="'+ui(n.imageSrcSet)+'"]',typeof n.imageSizes=="string"&&(i+='[imagesizes="'+ui(n.imageSizes)+'"]')):i+='[href="'+ui(e)+'"]';var o=i;switch(t){case"style":o=Hl(e);break;case"script":o=Kl(e)}pi.has(o)||(e=gt({rel:"preload",href:t==="image"&&n&&n.imageSrcSet?void 0:e,as:t},n),pi.set(o,e),r.querySelector(i)!==null||t==="style"&&r.querySelector(Xc(o))||t==="script"&&r.querySelector(Kc(o))||(t=r.createElement("link"),nn(t,"link",e),Ht(t),r.head.appendChild(t)))}}function N3(e,t){Tr.m(e,t);var n=Xl;if(n&&e){var r=t&&typeof t.as=="string"?t.as:"script",i='link[rel="modulepreload"][as="'+ui(r)+'"][href="'+ui(e)+'"]',o=i;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":o=Kl(e)}if(!pi.has(o)&&(e=gt({rel:"modulepreload",href:e},t),pi.set(o,e),n.querySelector(i)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(n.querySelector(Kc(o)))return}r=n.createElement("link"),nn(r,"link",e),Ht(r),n.head.appendChild(r)}}}function U3(e,t,n){Tr.S(e,t,n);var r=Xl;if(r&&e){var i=Cl(r).hoistableStyles,o=Hl(e);t=t||"default";var a=i.get(o);if(!a){var l={loading:0,preload:null};if(a=r.querySelector(Xc(o)))l.loading=5;else{e=gt({rel:"stylesheet",href:e,"data-precedence":t},n),(n=pi.get(o))&&a0(e,n);var c=a=r.createElement("link");Ht(c),nn(c,"link",e),c._p=new Promise(function(u,d){c.onload=u,c.onerror=d}),c.addEventListener("load",function(){l.loading|=1}),c.addEventListener("error",function(){l.loading|=2}),l.loading|=4,Qf(a,t,r)}a={type:"stylesheet",instance:a,count:1,state:l},i.set(o,a)}}}function R3(e,t){Tr.X(e,t);var n=Xl;if(n&&e){var r=Cl(n).hoistableScripts,i=Kl(e),o=r.get(i);o||(o=n.querySelector(Kc(i)),o||(e=gt({src:e,async:!0},t),(t=pi.get(i))&&l0(e,t),o=n.createElement("script"),Ht(o),nn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}function M3(e,t){Tr.M(e,t);var n=Xl;if(n&&e){var r=Cl(n).hoistableScripts,i=Kl(e),o=r.get(i);o||(o=n.querySelector(Kc(i)),o||(e=gt({src:e,async:!0,type:"module"},t),(t=pi.get(i))&&l0(e,t),o=n.createElement("script"),Ht(o),nn(o,"link",e),n.head.appendChild(o)),o={type:"script",instance:o,count:1,state:null},r.set(i,o))}}function v4(e,t,n,r){var i=(i=co.current)?Tm(i):null;if(!i)throw Error(O(446));switch(e){case"meta":case"title":return null;case"style":return typeof n.precedence=="string"&&typeof n.href=="string"?(t=Hl(n.href),n=Cl(i).hoistableStyles,r=n.get(t),r||(r={type:"style",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(n.rel==="stylesheet"&&typeof n.href=="string"&&typeof n.precedence=="string"){e=Hl(n.href);var o=Cl(i).hoistableStyles,a=o.get(e);if(a||(i=i.ownerDocument||i,a={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},o.set(e,a),(o=i.querySelector(Xc(e)))&&!o._p&&(a.instance=o,a.state.loading=5),pi.has(e)||(n={rel:"preload",as:"style",href:n.href,crossOrigin:n.crossOrigin,integrity:n.integrity,media:n.media,hrefLang:n.hrefLang,referrerPolicy:n.referrerPolicy},pi.set(e,n),o||B3(i,e,n,a.state))),t&&r===null)throw Error(O(528,""));return a}if(t&&r!==null)throw Error(O(529,""));return null;case"script":return t=n.async,n=n.src,typeof n=="string"&&t&&typeof t!="function"&&typeof t!="symbol"?(t=Kl(n),n=Cl(i).hoistableScripts,r=n.get(t),r||(r={type:"script",instance:null,count:0,state:null},n.set(t,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(O(444,e))}}function Hl(e){return'href="'+ui(e)+'"'}function Xc(e){return'link[rel="stylesheet"]['+e+"]"}function oE(e){return gt({},e,{"data-precedence":e.precedence,precedence:null})}function B3(e,t,n,r){e.querySelector('link[rel="preload"][as="style"]['+t+"]")?r.loading=1:(t=e.createElement("link"),r.preload=t,t.addEventListener("load",function(){return r.loading|=1}),t.addEventListener("error",function(){return r.loading|=2}),nn(t,"link",n),Ht(t),e.head.appendChild(t))}function Kl(e){return'[src="'+ui(e)+'"]'}function Kc(e){return"script[async]"+e}function b4(e,t,n){if(t.count++,t.instance===null)switch(t.type){case"style":var r=e.querySelector('style[data-href~="'+ui(n.href)+'"]');if(r)return t.instance=r,Ht(r),r;var i=gt({},n,{"data-href":n.href,"data-precedence":n.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),Ht(r),nn(r,"style",i),Qf(r,n.precedence,e),t.instance=r;case"stylesheet":i=Hl(n.href);var o=e.querySelector(Xc(i));if(o)return t.state.loading|=4,t.instance=o,Ht(o),o;r=oE(n),(i=pi.get(i))&&a0(r,i),o=(e.ownerDocument||e).createElement("link"),Ht(o);var a=o;return a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),nn(o,"link",r),t.state.loading|=4,Qf(o,n.precedence,e),t.instance=o;case"script":return o=Kl(n.src),(i=e.querySelector(Kc(o)))?(t.instance=i,Ht(i),i):(r=n,(i=pi.get(o))&&(r=gt({},n),l0(r,i)),e=e.ownerDocument||e,i=e.createElement("script"),Ht(i),nn(i,"link",r),e.head.appendChild(i),t.instance=i);case"void":return null;default:throw Error(O(443,t.type))}else t.type==="stylesheet"&&(t.state.loading&4)===0&&(r=t.instance,t.state.loading|=4,Qf(r,n.precedence,e));return t.instance}function Qf(e,t,n){for(var r=n.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),i=r.length?r[r.length-1]:null,o=i,a=0;a<r.length;a++){var l=r[a];if(l.dataset.precedence===t)o=l;else if(o!==i)break}o?o.parentNode.insertBefore(e,o.nextSibling):(t=n.nodeType===9?n.head:n,t.insertBefore(e,t.firstChild))}function a0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.title==null&&(e.title=t.title)}function l0(e,t){e.crossOrigin==null&&(e.crossOrigin=t.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=t.referrerPolicy),e.integrity==null&&(e.integrity=t.integrity)}var em=null;function x4(e,t,n){if(em===null){var r=new Map,i=em=new Map;i.set(n,r)}else i=em,r=i.get(n),r||(r=new Map,i.set(n,r));if(r.has(e))return r;for(r.set(e,null),n=n.getElementsByTagName(e),i=0;i<n.length;i++){var o=n[i];if(!(o[Vc]||o[Qt]||e==="link"&&o.getAttribute("rel")==="stylesheet")&&o.namespaceURI!=="http://www.w3.org/2000/svg"){var a=o.getAttribute(t)||"";a=e+a;var l=r.get(a);l?l.push(o):r.set(a,[o])}}return r}function S4(e,t,n){e=e.ownerDocument||e,e.head.insertBefore(n,t==="title"?e.querySelector("head > title"):null)}function L3(e,t,n){if(n===1||t.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof t.precedence!="string"||typeof t.href!="string"||t.href==="")break;return!0;case"link":if(typeof t.rel!="string"||typeof t.href!="string"||t.href===""||t.onLoad||t.onError)break;return t.rel==="stylesheet"?(e=t.disabled,typeof t.precedence=="string"&&e==null):!0;case"script":if(t.async&&typeof t.async!="function"&&typeof t.async!="symbol"&&!t.onLoad&&!t.onError&&t.src&&typeof t.src=="string")return!0}return!1}function aE(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function P3(e,t,n,r){if(n.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(n.state.loading&4)===0){if(n.instance===null){var i=Hl(r.href),o=t.querySelector(Xc(i));if(o){t=o._p,t!==null&&typeof t=="object"&&typeof t.then=="function"&&(e.count++,e=Cm.bind(e),t.then(e,e)),n.state.loading|=4,n.instance=o,Ht(o);return}o=t.ownerDocument||t,r=oE(r),(i=pi.get(i))&&a0(r,i),o=o.createElement("link"),Ht(o);var a=o;a._p=new Promise(function(l,c){a.onload=l,a.onerror=c}),nn(o,"link",r),n.instance=o}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(n,t),(t=n.state.preload)&&(n.state.loading&3)===0&&(e.count++,n=Cm.bind(e),t.addEventListener("load",n),t.addEventListener("error",n))}}var x1=0;function Z3(e,t){return e.stylesheets&&e.count===0&&tm(e,e.stylesheets),0<e.count||0<e.imgCount?function(n){var r=setTimeout(function(){if(e.stylesheets&&tm(e,e.stylesheets),e.unsuspend){var o=e.unsuspend;e.unsuspend=null,o()}},6e4+t);0<e.imgBytes&&x1===0&&(x1=62500*k3());var i=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&tm(e,e.stylesheets),e.unsuspend)){var o=e.unsuspend;e.unsuspend=null,o()}},(e.imgBytes>x1?50:800)+t);return e.unsuspend=n,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(i)}}:null}function Cm(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)tm(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Em=null;function tm(e,t){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Em=new Map,t.forEach(F3,e),Em=null,Cm.call(e))}function F3(e,t){if(!(t.state.loading&4)){var n=Em.get(e);if(n)var r=n.get(null);else{n=new Map,Em.set(e,n);for(var i=e.querySelectorAll("link[data-precedence],style[data-precedence]"),o=0;o<i.length;o++){var a=i[o];(a.nodeName==="LINK"||a.getAttribute("media")!=="not all")&&(n.set(a.dataset.precedence,a),r=a)}r&&n.set(null,r)}i=t.instance,a=i.getAttribute("data-precedence"),o=n.get(a)||r,o===r&&n.set(null,i),n.set(a,i),this.count++,r=Cm.bind(this),i.addEventListener("load",r),i.addEventListener("error",r),o?o.parentNode.insertBefore(i,o.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(i,e.firstChild)),t.state.loading|=4}}var Mc={$$typeof:gr,Provider:null,Consumer:null,_currentValue:Wo,_currentValue2:Wo,_threadCount:0};function H3(e,t,n,r,i,o,a,l,c){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=qx(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=qx(0),this.hiddenUpdates=qx(null),this.identifierPrefix=r,this.onUncaughtError=i,this.onCaughtError=o,this.onRecoverableError=a,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=c,this.incompleteTransitions=new Map}function lE(e,t,n,r,i,o,a,l,c,u,d,m){return e=new H3(e,t,n,a,c,u,d,m,l),t=1,o===!0&&(t|=24),o=Fn(3,null,null,t),e.current=o,o.stateNode=e,t=jS(),t.refCount++,e.pooledCache=t,t.refCount++,o.memoizedState={element:r,isDehydrated:n,cache:t},US(o),e}function sE(e){return e?(e=_l,e):_l}function cE(e,t,n,r,i,o){i=sE(i),r.context===null?r.context=i:r.pendingContext=i,r=fo(t),r.payload={element:n},o=o===void 0?null:o,o!==null&&(r.callback=o),n=mo(e,r,t),n!==null&&(jn(n,e,t),vc(n,e,t))}function k4(e,t){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var n=e.retryLane;e.retryLane=n!==0&&n<t?n:t}}function s0(e,t){k4(e,t),(e=e.alternate)&&k4(e,t)}function uE(e){if(e.tag===13||e.tag===31){var t=la(e,67108864);t!==null&&jn(t,e,67108864),s0(e,67108864)}}function w4(e){if(e.tag===13||e.tag===31){var t=Wn();t=bS(t);var n=la(e,t);n!==null&&jn(n,e,t),s0(e,t)}}var Im=!0;function V3(e,t,n,r){var i=be.T;be.T=null;var o=Ze.p;try{Ze.p=2,c0(e,t,n,r)}finally{Ze.p=o,be.T=i}}function q3(e,t,n,r){var i=be.T;be.T=null;var o=Ze.p;try{Ze.p=8,c0(e,t,n,r)}finally{Ze.p=o,be.T=i}}function c0(e,t,n,r){if(Im){var i=hS(r);if(i===null)v1(e,t,r,Dm,n),_4(e,r);else if(W3(i,e,t,n,r))r.stopPropagation();else if(_4(e,r),t&4&&-1<G3.indexOf(e)){for(;i!==null;){var o=Gl(i);if(o!==null)switch(o.tag){case 3:if(o=o.stateNode,o.current.memoizedState.isDehydrated){var a=Vo(o.pendingLanes);if(a!==0){var l=o;for(l.pendingLanes|=2,l.entangledLanes|=2;a;){var c=1<<31-Gn(a);l.entanglements[1]|=c,a&=~c}Yi(o),(Pe&6)===0&&(xm=Vn()+500,Jc(0,!1))}}break;case 31:case 13:l=la(o,2),l!==null&&jn(l,o,2),Hm(),s0(o,2)}if(o=hS(r),o===null&&v1(e,t,r,Dm,n),o===i)break;i=o}i!==null&&r.stopPropagation()}else v1(e,t,r,null,n)}}function hS(e){return e=wS(e),u0(e)}var Dm=null;function u0(e){if(Dm=null,e=vl(e),e!==null){var t=Pc(e);if(t===null)e=null;else{var n=t.tag;if(n===13){if(e=I4(t),e!==null)return e;e=null}else if(n===31){if(e=D4(t),e!==null)return e;e=null}else if(n===3){if(t.stateNode.current.memoizedState.isDehydrated)return t.tag===3?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null)}}return Dm=e,null}function dE(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(OR()){case N4:return 2;case U4:return 8;case am:case NR:return 32;case R4:return 268435456;default:return 32}default:return 32}}var pS=!1,go=null,yo=null,vo=null,Bc=new Map,Lc=new Map,io=[],G3="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function _4(e,t){switch(e){case"focusin":case"focusout":go=null;break;case"dragenter":case"dragleave":yo=null;break;case"mouseover":case"mouseout":vo=null;break;case"pointerover":case"pointerout":Bc.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lc.delete(t.pointerId)}}function lc(e,t,n,r,i,o){return e===null||e.nativeEvent!==o?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:o,targetContainers:[i]},t!==null&&(t=Gl(t),t!==null&&uE(t)),e):(e.eventSystemFlags|=r,t=e.targetContainers,i!==null&&t.indexOf(i)===-1&&t.push(i),e)}function W3(e,t,n,r,i){switch(t){case"focusin":return go=lc(go,e,t,n,r,i),!0;case"dragenter":return yo=lc(yo,e,t,n,r,i),!0;case"mouseover":return vo=lc(vo,e,t,n,r,i),!0;case"pointerover":var o=i.pointerId;return Bc.set(o,lc(Bc.get(o)||null,e,t,n,r,i)),!0;case"gotpointercapture":return o=i.pointerId,Lc.set(o,lc(Lc.get(o)||null,e,t,n,r,i)),!0}return!1}function fE(e){var t=vl(e.target);if(t!==null){var n=Pc(t);if(n!==null){if(t=n.tag,t===13){if(t=I4(n),t!==null){e.blockedOn=t,lT(e.priority,function(){w4(n)});return}}else if(t===31){if(t=D4(n),t!==null){e.blockedOn=t,lT(e.priority,function(){w4(n)});return}}else if(t===3&&n.stateNode.current.memoizedState.isDehydrated){e.blockedOn=n.tag===3?n.stateNode.containerInfo:null;return}}}e.blockedOn=null}function nm(e){if(e.blockedOn!==null)return!1;for(var t=e.targetContainers;0<t.length;){var n=hS(e.nativeEvent);if(n===null){n=e.nativeEvent;var r=new n.constructor(n.type,n);j1=r,n.target.dispatchEvent(r),j1=null}else return t=Gl(n),t!==null&&uE(t),e.blockedOn=n,!1;t.shift()}return!0}function $4(e,t,n){nm(e)&&n.delete(t)}function Y3(){pS=!1,go!==null&&nm(go)&&(go=null),yo!==null&&nm(yo)&&(yo=null),vo!==null&&nm(vo)&&(vo=null),Bc.forEach($4),Lc.forEach($4)}function Lf(e,t){e.blockedOn===t&&(e.blockedOn=null,pS||(pS=!0,Bt.unstable_scheduleCallback(Bt.unstable_NormalPriority,Y3)))}var Pf=null;function z4(e){Pf!==e&&(Pf=e,Bt.unstable_scheduleCallback(Bt.unstable_NormalPriority,function(){Pf===e&&(Pf=null);for(var t=0;t<e.length;t+=3){var n=e[t],r=e[t+1],i=e[t+2];if(typeof r!="function"){if(u0(r||n)===null)continue;break}var o=Gl(n);o!==null&&(e.splice(t,3),t-=3,Y1(o,{pending:!0,data:i,method:n.method,action:r},r,i))}}))}function Vl(e){function t(c){return Lf(c,e)}go!==null&&Lf(go,e),yo!==null&&Lf(yo,e),vo!==null&&Lf(vo,e),Bc.forEach(t),Lc.forEach(t);for(var n=0;n<io.length;n++){var r=io[n];r.blockedOn===e&&(r.blockedOn=null)}for(;0<io.length&&(n=io[0],n.blockedOn===null);)fE(n),n.blockedOn===null&&io.shift();if(n=(e.ownerDocument||e).$$reactFormReplay,n!=null)for(r=0;r<n.length;r+=3){var i=n[r],o=n[r+1],a=i[On]||null;if(typeof o=="function")a||z4(n);else if(a){var l=null;if(o&&o.hasAttribute("formAction")){if(i=o,a=o[On]||null)l=a.formAction;else if(u0(i)!==null)continue}else l=a.action;typeof l=="function"?n[r+1]=l:(n.splice(r,3),r-=3),z4(n)}}}function mE(){function e(o){o.canIntercept&&o.info==="react-transition"&&o.intercept({handler:function(){return new Promise(function(a){return i=a})},focusReset:"manual",scroll:"manual"})}function t(){i!==null&&(i(),i=null),r||setTimeout(n,20)}function n(){if(!r&&!navigation.transition){var o=navigation.currentEntry;o&&o.url!=null&&navigation.navigate(o.url,{state:o.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,i=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",t),navigation.addEventListener("navigateerror",t),setTimeout(n,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",t),navigation.removeEventListener("navigateerror",t),i!==null&&(i(),i=null)}}}function d0(e){this._internalRoot=e}Gm.prototype.render=d0.prototype.render=function(e){var t=this._internalRoot;if(t===null)throw Error(O(409));var n=t.current,r=Wn();cE(n,r,e,t,null,null)};Gm.prototype.unmount=d0.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var t=e.containerInfo;cE(e.current,2,null,e,null,null),Hm(),t[ql]=null}};function Gm(e){this._internalRoot=e}Gm.prototype.unstable_scheduleHydration=function(e){if(e){var t=Z4();e={blockedOn:null,target:e,priority:t};for(var n=0;n<io.length&&t!==0&&t<io[n].priority;n++);io.splice(n,0,e),n===0&&fE(e)}};var T4=C4.version;if(T4!=="19.2.8")throw Error(O(527,T4,"19.2.8"));Ze.findDOMNode=function(e){var t=e._reactInternals;if(t===void 0)throw typeof e.render=="function"?Error(O(188)):(e=Object.keys(e).join(","),Error(O(268,e)));return e=TR(t),e=e!==null?A4(e):null,e=e===null?null:e.stateNode,e};var J3={bundleType:0,version:"19.2.8",rendererPackageName:"react-dom",currentDispatcherRef:be,reconcilerVersion:"19.2.8"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&(sc=__REACT_DEVTOOLS_GLOBAL_HOOK__,!sc.isDisabled&&sc.supportsFiber))try{Zc=sc.inject(J3),qn=sc}catch{}var sc;Wm.createRoot=function(e,t){if(!E4(e))throw Error(O(299));var n=!1,r="",i=r6,o=o6,a=a6;return t!=null&&(t.unstable_strictMode===!0&&(n=!0),t.identifierPrefix!==void 0&&(r=t.identifierPrefix),t.onUncaughtError!==void 0&&(i=t.onUncaughtError),t.onCaughtError!==void 0&&(o=t.onCaughtError),t.onRecoverableError!==void 0&&(a=t.onRecoverableError)),t=lE(e,1,!1,null,null,n,r,null,i,o,a,mE),e[ql]=t.current,o0(e),new d0(t)};Wm.hydrateRoot=function(e,t,n){if(!E4(e))throw Error(O(299));var r=!1,i="",o=r6,a=o6,l=a6,c=null;return n!=null&&(n.unstable_strictMode===!0&&(r=!0),n.identifierPrefix!==void 0&&(i=n.identifierPrefix),n.onUncaughtError!==void 0&&(o=n.onUncaughtError),n.onCaughtError!==void 0&&(a=n.onCaughtError),n.onRecoverableError!==void 0&&(l=n.onRecoverableError),n.formState!==void 0&&(c=n.formState)),t=lE(e,1,!0,t,n??null,r,i,c,o,a,l,mE),t.context=sE(null),n=t.current,r=Wn(),r=bS(r),i=fo(r),i.callback=null,mo(n,i,r),n=r,t.current.lanes=n,Hc(t,n),Yi(t),e[ql]=t.current,o0(e),new Gm(t)};Wm.version="19.2.8"});var yE=Ei((vH,gE)=>{"use strict";function pE(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(pE)}catch(e){console.error(e)}}pE(),gE.exports=hE()});var Ve=U(re(),1);var iu={id:"code",name:"Code",description:"Full access: read, edit, run commands, and use MCP tools.",groups:["read","edit","command","mcp","always"]},ek={id:"ask",name:"Ask",description:"Read-only: inspect the workspace and answer questions. Cannot edit or run commands.",groups:["read","mcp","always"]},tk={id:"agent-team",name:"Agent team",description:"You lead; specialists you assign are consulted as needed. Requires at least one agent.",groups:["read","edit","command","mcp","always"],requiresExpert:!0},ru=[iu,ek,tk],dh=iu.id,XD={junior:tk.id};function fh(e){let t=e!==void 0?XD[e]??e:e;return ru.find(n=>n.id===t)??iu}var $={};Xi($,{$brand:()=>hh,$input:()=>Ng,$output:()=>Og,NEVER:()=>mh,TimePrecision:()=>Bg,ZodAny:()=>Cv,ZodArray:()=>Av,ZodBase64:()=>Dd,ZodBase64URL:()=>Ad,ZodBigInt:()=>Za,ZodBigIntFormat:()=>Nd,ZodBoolean:()=>Pa,ZodCIDRv4:()=>Ed,ZodCIDRv6:()=>Id,ZodCUID:()=>kd,ZodCUID2:()=>wd,ZodCatch:()=>eb,ZodCodec:()=>Ns,ZodCustom:()=>Us,ZodCustomStringFormat:()=>Ba,ZodDate:()=>Is,ZodDefault:()=>Wv,ZodDiscriminatedUnion:()=>Ov,ZodE164:()=>jd,ZodEmail:()=>bd,ZodEmoji:()=>xd,ZodEnum:()=>Ra,ZodError:()=>CO,ZodExactOptional:()=>Vv,ZodFile:()=>Fv,ZodFirstPartyTypeKind:()=>mb,ZodFunction:()=>ub,ZodGUID:()=>$s,ZodIPv4:()=>Td,ZodIPv6:()=>Cd,ZodISODate:()=>md,ZodISODateTime:()=>fd,ZodISODuration:()=>pd,ZodISOTime:()=>hd,ZodIntersection:()=>Nv,ZodIssueCode:()=>IO,ZodJWT:()=>Od,ZodKSUID:()=>zd,ZodLazy:()=>lb,ZodLiteral:()=>Zv,ZodMAC:()=>Sv,ZodMap:()=>Lv,ZodNaN:()=>nb,ZodNanoID:()=>Sd,ZodNever:()=>Iv,ZodNonOptional:()=>Pd,ZodNull:()=>zv,ZodNullable:()=>Gv,ZodNumber:()=>La,ZodNumberFormat:()=>No,ZodObject:()=>As,ZodOptional:()=>Ld,ZodPipe:()=>Os,ZodPrefault:()=>Jv,ZodPreprocess:()=>ib,ZodPromise:()=>cb,ZodReadonly:()=>rb,ZodRealError:()=>wn,ZodRecord:()=>Ua,ZodSet:()=>Pv,ZodString:()=>Ma,ZodStringFormat:()=>Qe,ZodSuccess:()=>Qv,ZodSymbol:()=>_v,ZodTemplateLiteral:()=>ab,ZodTransform:()=>Hv,ZodTuple:()=>Rv,ZodType:()=>_e,ZodULID:()=>_d,ZodURL:()=>Es,ZodUUID:()=>ji,ZodUndefined:()=>$v,ZodUnion:()=>js,ZodUnknown:()=>Ev,ZodVoid:()=>Dv,ZodXID:()=>$d,ZodXor:()=>jv,_ZodString:()=>vd,_default:()=>Yv,_function:()=>F_,any:()=>x_,array:()=>Ds,base64:()=>i_,base64url:()=>r_,bigint:()=>p_,boolean:()=>wv,catch:()=>tb,check:()=>H_,cidrv4:()=>t_,cidrv6:()=>n_,clone:()=>dn,codec:()=>B_,coerce:()=>hb,config:()=>xt,core:()=>er,cuid:()=>Gw,cuid2:()=>Ww,custom:()=>V_,date:()=>k_,decode:()=>hv,decodeAsync:()=>gv,describe:()=>q_,discriminatedUnion:()=>C_,e164:()=>o_,email:()=>Rw,emoji:()=>Vw,encode:()=>mv,encodeAsync:()=>pv,endsWith:()=>za,enum:()=>Md,exactOptional:()=>qv,file:()=>N_,flattenError:()=>ds,float32:()=>d_,float64:()=>f_,formatError:()=>fs,fromJSONSchema:()=>Q_,function:()=>F_,getErrorMap:()=>AO,globalRegistry:()=>Gt,gt:()=>Di,gte:()=>mn,guid:()=>Mw,hash:()=>u_,hex:()=>c_,hostname:()=>s_,httpUrl:()=>Hw,includes:()=>_a,instanceof:()=>W_,int:()=>gd,int32:()=>m_,int64:()=>g_,intersection:()=>Uv,invertCodec:()=>L_,ipv4:()=>Kw,ipv6:()=>e_,iso:()=>Na,json:()=>J_,jwt:()=>a_,keyof:()=>w_,ksuid:()=>Xw,lazy:()=>sb,length:()=>jo,literal:()=>O_,locales:()=>xs,looseObject:()=>z_,looseRecord:()=>I_,lowercase:()=>ka,lt:()=>Ii,lte:()=>Mn,mac:()=>Qw,map:()=>D_,maxLength:()=>Ao,maxSize:()=>Nr,meta:()=>G_,mime:()=>Ta,minLength:()=>Qi,minSize:()=>Ai,multipleOf:()=>Or,nan:()=>M_,nanoid:()=>qw,nativeEnum:()=>j_,negative:()=>nd,never:()=>Ud,nonnegative:()=>rd,nonoptional:()=>Kv,nonpositive:()=>id,normalize:()=>Ca,null:()=>Tv,nullable:()=>Ts,nullish:()=>U_,number:()=>kv,object:()=>__,optional:()=>zs,overwrite:()=>xi,parse:()=>cv,parseAsync:()=>uv,partialRecord:()=>E_,pipe:()=>yd,positive:()=>td,prefault:()=>Xv,preprocess:()=>X_,prettifyError:()=>Th,promise:()=>Z_,property:()=>od,readonly:()=>ob,record:()=>Bv,refine:()=>db,regex:()=>Sa,regexes:()=>Rn,registry:()=>Ou,safeDecode:()=>vv,safeDecodeAsync:()=>xv,safeEncode:()=>yv,safeEncodeAsync:()=>bv,safeParse:()=>dv,safeParseAsync:()=>fv,set:()=>A_,setErrorMap:()=>DO,size:()=>Do,slugify:()=>Aa,startsWith:()=>$a,strictObject:()=>$_,string:()=>_s,stringFormat:()=>l_,stringbool:()=>Y_,success:()=>R_,superRefine:()=>fb,symbol:()=>v_,templateLiteral:()=>P_,toJSONSchema:()=>cd,toLowerCase:()=>Ia,toUpperCase:()=>Da,transform:()=>Bd,treeifyError:()=>zh,trim:()=>Ea,tuple:()=>Mv,uint32:()=>h_,uint64:()=>y_,ulid:()=>Yw,undefined:()=>b_,union:()=>Rd,unknown:()=>Oo,uppercase:()=>wa,url:()=>Fw,util:()=>H,uuid:()=>Bw,uuidv4:()=>Lw,uuidv6:()=>Pw,uuidv7:()=>Zw,void:()=>S_,xid:()=>Jw,xor:()=>T_});var er={};Xi(er,{$ZodAny:()=>ng,$ZodArray:()=>lg,$ZodAsyncError:()=>bi,$ZodBase64:()=>qp,$ZodBase64URL:()=>Gp,$ZodBigInt:()=>zu,$ZodBigIntFormat:()=>Kp,$ZodBoolean:()=>gs,$ZodCIDRv4:()=>Fp,$ZodCIDRv6:()=>Hp,$ZodCUID:()=>Dp,$ZodCUID2:()=>Ap,$ZodCatch:()=>$g,$ZodCheck:()=>it,$ZodCheckBigIntFormat:()=>lp,$ZodCheckEndsWith:()=>bp,$ZodCheckGreaterThan:()=>xu,$ZodCheckIncludes:()=>yp,$ZodCheckLengthEquals:()=>mp,$ZodCheckLessThan:()=>bu,$ZodCheckLowerCase:()=>pp,$ZodCheckMaxLength:()=>dp,$ZodCheckMaxSize:()=>sp,$ZodCheckMimeType:()=>Sp,$ZodCheckMinLength:()=>fp,$ZodCheckMinSize:()=>cp,$ZodCheckMultipleOf:()=>op,$ZodCheckNumberFormat:()=>ap,$ZodCheckOverwrite:()=>kp,$ZodCheckProperty:()=>xp,$ZodCheckRegex:()=>hp,$ZodCheckSizeEquals:()=>up,$ZodCheckStartsWith:()=>vp,$ZodCheckStringFormat:()=>ba,$ZodCheckUpperCase:()=>gp,$ZodCodec:()=>vs,$ZodCustom:()=>jg,$ZodCustomStringFormat:()=>Jp,$ZodDate:()=>ag,$ZodDefault:()=>Sg,$ZodDiscriminatedUnion:()=>ug,$ZodE164:()=>Wp,$ZodEmail:()=>Tp,$ZodEmoji:()=>Ep,$ZodEncodeError:()=>Er,$ZodEnum:()=>pg,$ZodError:()=>us,$ZodExactOptional:()=>bg,$ZodFile:()=>yg,$ZodFunction:()=>Ig,$ZodGUID:()=>$p,$ZodIPv4:()=>Lp,$ZodIPv6:()=>Pp,$ZodISODate:()=>Rp,$ZodISODateTime:()=>Up,$ZodISODuration:()=>Bp,$ZodISOTime:()=>Mp,$ZodIntersection:()=>dg,$ZodJWT:()=>Yp,$ZodKSUID:()=>Np,$ZodLazy:()=>Ag,$ZodLiteral:()=>gg,$ZodMAC:()=>Zp,$ZodMap:()=>mg,$ZodNaN:()=>zg,$ZodNanoID:()=>Ip,$ZodNever:()=>rg,$ZodNonOptional:()=>wg,$ZodNull:()=>tg,$ZodNullable:()=>xg,$ZodNumber:()=>$u,$ZodNumberFormat:()=>Xp,$ZodObject:()=>Ak,$ZodObjectJIT:()=>sg,$ZodOptional:()=>Cu,$ZodPipe:()=>Eu,$ZodPrefault:()=>kg,$ZodPreprocess:()=>Tg,$ZodPromise:()=>Dg,$ZodReadonly:()=>Cg,$ZodRealError:()=>kn,$ZodRecord:()=>fg,$ZodRegistry:()=>ju,$ZodSet:()=>hg,$ZodString:()=>Io,$ZodStringFormat:()=>Ke,$ZodSuccess:()=>_g,$ZodSymbol:()=>Qp,$ZodTemplateLiteral:()=>Eg,$ZodTransform:()=>vg,$ZodTuple:()=>Tu,$ZodType:()=>xe,$ZodULID:()=>jp,$ZodURL:()=>Cp,$ZodUUID:()=>zp,$ZodUndefined:()=>eg,$ZodUnion:()=>ys,$ZodUnknown:()=>ig,$ZodVoid:()=>og,$ZodXID:()=>Op,$ZodXor:()=>cg,$brand:()=>hh,$constructor:()=>z,$input:()=>Ng,$output:()=>Og,Doc:()=>ps,JSONSchema:()=>Ow,JSONSchemaGenerator:()=>ud,NEVER:()=>mh,TimePrecision:()=>Bg,_any:()=>ay,_array:()=>my,_base64:()=>Xu,_base64url:()=>Ku,_bigint:()=>Qg,_boolean:()=>Xg,_catch:()=>xO,_check:()=>jw,_cidrv4:()=>Yu,_cidrv6:()=>Ju,_coercedBigint:()=>ey,_coercedBoolean:()=>Kg,_coercedDate:()=>dy,_coercedNumber:()=>Vg,_coercedString:()=>Rg,_cuid:()=>Zu,_cuid2:()=>Fu,_custom:()=>py,_date:()=>uy,_decode:()=>uu,_decodeAsync:()=>fu,_default:()=>yO,_discriminatedUnion:()=>oO,_e164:()=>Qu,_email:()=>Nu,_emoji:()=>Lu,_encode:()=>cu,_encodeAsync:()=>du,_endsWith:()=>za,_enum:()=>dO,_file:()=>hy,_float32:()=>Gg,_float64:()=>Wg,_gt:()=>Di,_gte:()=>mn,_guid:()=>Ss,_includes:()=>_a,_int:()=>qg,_int32:()=>Yg,_int64:()=>ty,_intersection:()=>aO,_ipv4:()=>Gu,_ipv6:()=>Wu,_isoDate:()=>Pg,_isoDateTime:()=>Lg,_isoDuration:()=>Fg,_isoTime:()=>Zg,_jwt:()=>ed,_ksuid:()=>qu,_lazy:()=>_O,_length:()=>jo,_literal:()=>mO,_lowercase:()=>ka,_lt:()=>Ii,_lte:()=>Mn,_mac:()=>Mg,_map:()=>cO,_max:()=>Mn,_maxLength:()=>Ao,_maxSize:()=>Nr,_mime:()=>Ta,_min:()=>mn,_minLength:()=>Qi,_minSize:()=>Ai,_multipleOf:()=>Or,_nan:()=>fy,_nanoid:()=>Pu,_nativeEnum:()=>fO,_negative:()=>nd,_never:()=>sy,_nonnegative:()=>rd,_nonoptional:()=>vO,_nonpositive:()=>id,_normalize:()=>Ca,_null:()=>oy,_nullable:()=>gO,_number:()=>Hg,_optional:()=>pO,_overwrite:()=>xi,_parse:()=>pa,_parseAsync:()=>ga,_pipe:()=>SO,_positive:()=>td,_promise:()=>$O,_property:()=>od,_readonly:()=>kO,_record:()=>sO,_refine:()=>gy,_regex:()=>Sa,_safeDecode:()=>hu,_safeDecodeAsync:()=>gu,_safeEncode:()=>mu,_safeEncodeAsync:()=>pu,_safeParse:()=>ya,_safeParseAsync:()=>va,_set:()=>uO,_size:()=>Do,_slugify:()=>Aa,_startsWith:()=>$a,_string:()=>Ug,_stringFormat:()=>ja,_stringbool:()=>xy,_success:()=>bO,_superRefine:()=>yy,_symbol:()=>iy,_templateLiteral:()=>wO,_toLowerCase:()=>Ia,_toUpperCase:()=>Da,_transform:()=>hO,_trim:()=>Ea,_tuple:()=>lO,_uint32:()=>Jg,_uint64:()=>ny,_ulid:()=>Hu,_undefined:()=>ry,_union:()=>iO,_unknown:()=>ly,_uppercase:()=>wa,_url:()=>ks,_uuid:()=>Uu,_uuidv4:()=>Ru,_uuidv6:()=>Mu,_uuidv7:()=>Bu,_void:()=>cy,_xid:()=>Vu,_xor:()=>rO,clone:()=>dn,config:()=>xt,createStandardJSONSchemaMethod:()=>Oa,createToJSONSchemaMethod:()=>Sy,decode:()=>$A,decodeAsync:()=>TA,describe:()=>vy,encode:()=>_A,encodeAsync:()=>zA,extractDefs:()=>Rr,finalize:()=>Mr,flattenError:()=>ds,formatError:()=>fs,globalConfig:()=>To,globalRegistry:()=>Gt,initializeContext:()=>Ur,isValidBase64:()=>Vp,isValidBase64URL:()=>Ck,isValidJWT:()=>Ek,locales:()=>xs,meta:()=>by,parse:()=>lu,parseAsync:()=>su,prettifyError:()=>Th,process:()=>Fe,regexes:()=>Rn,registry:()=>Ou,safeDecode:()=>EA,safeDecodeAsync:()=>DA,safeEncode:()=>CA,safeEncodeAsync:()=>IA,safeParse:()=>Ch,safeParseAsync:()=>Eh,toDotPath:()=>lk,toJSONSchema:()=>cd,treeifyError:()=>zh,util:()=>H,version:()=>wp});var nk,mh=Object.freeze({status:"aborted"});function z(e,t,n){function r(l,c){if(l._zod||Object.defineProperty(l,"_zod",{value:{def:c,constr:a,traits:new Set},enumerable:!1}),l._zod.traits.has(e))return;l._zod.traits.add(e),t(l,c);let u=a.prototype,d=Object.keys(u);for(let m=0;m<d.length;m++){let h=d[m];h in l||(l[h]=u[h].bind(l))}}let i=n?.Parent??Object;class o extends i{}Object.defineProperty(o,"name",{value:e});function a(l){var c;let u=n?.Parent?new o:this;r(u,l),(c=u._zod).deferred??(c.deferred=[]);for(let d of u._zod.deferred)d();return u}return Object.defineProperty(a,"init",{value:r}),Object.defineProperty(a,Symbol.hasInstance,{value:l=>n?.Parent&&l instanceof n.Parent?!0:l?._zod?.traits?.has(e)}),Object.defineProperty(a,"name",{value:e}),a}var hh=Symbol("zod_brand"),bi=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},Er=class extends Error{constructor(t){super(`Encountered unidirectional transform during encode: ${t}`),this.name="ZodEncodeError"}};(nk=globalThis).__zod_globalConfig??(nk.__zod_globalConfig={});var To=globalThis.__zod_globalConfig;function xt(e){return e&&Object.assign(To,e),To}var H={};Xi(H,{BIGINT_FORMAT_RANGES:()=>_h,Class:()=>gh,NUMBER_FORMAT_RANGES:()=>wh,aborted:()=>jr,allowsEval:()=>bh,assert:()=>nA,assertEqual:()=>KD,assertIs:()=>eA,assertNever:()=>tA,assertNotEqual:()=>QD,assignProp:()=>Dr,base64ToUint8Array:()=>rk,base64urlToUint8Array:()=>bA,cached:()=>ma,captureStackTrace:()=>au,cleanEnum:()=>vA,cleanRegex:()=>as,clone:()=>dn,cloneDef:()=>rA,createTransparentProxy:()=>uA,defineLazy:()=>Te,esc:()=>ou,escapeRegex:()=>Qn,explicitlyAborted:()=>$h,extend:()=>mA,finalizeIssue:()=>fn,floatSafeRemainder:()=>yh,getElementAtPath:()=>oA,getEnumValues:()=>os,getLengthableOrigin:()=>cs,getParsedType:()=>cA,getSizableOrigin:()=>ss,hexToUint8Array:()=>SA,isObject:()=>Co,isPlainObject:()=>Ar,issue:()=>ha,joinValues:()=>C,jsonStringifyReplacer:()=>fa,merge:()=>pA,mergeDefs:()=>Ki,normalizeParams:()=>Y,nullish:()=>Ir,numKeys:()=>sA,objectClone:()=>iA,omit:()=>fA,optionalKeys:()=>kh,parsedType:()=>P,partial:()=>gA,pick:()=>dA,prefixIssues:()=>Sn,primitiveTypes:()=>Sh,promiseAllObject:()=>aA,propertyKeyTypes:()=>ls,randomString:()=>lA,required:()=>yA,safeExtend:()=>hA,shallowClone:()=>xh,slugify:()=>vh,stringifyPrimitive:()=>L,uint8ArrayToBase64:()=>ok,uint8ArrayToBase64url:()=>xA,uint8ArrayToHex:()=>kA,unwrapMessage:()=>rs});function KD(e){return e}function QD(e){return e}function eA(e){}function tA(e){throw new Error("Unexpected value in exhaustive check")}function nA(e){}function os(e){let t=Object.values(e).filter(r=>typeof r=="number");return Object.entries(e).filter(([r,i])=>t.indexOf(+r)===-1).map(([r,i])=>i)}function C(e,t="|"){return e.map(n=>L(n)).join(t)}function fa(e,t){return typeof t=="bigint"?t.toString():t}function ma(e){return{get value(){{let n=e();return Object.defineProperty(this,"value",{value:n}),n}throw new Error("cached value already set")}}}function Ir(e){return e==null}function as(e){let t=e.startsWith("^")?1:0,n=e.endsWith("$")?e.length-1:e.length;return e.slice(t,n)}function yh(e,t){let n=e/t,r=Math.round(n),i=Number.EPSILON*Math.max(Math.abs(n),1);return Math.abs(n-r)<i?0:n-r}var ik=Symbol("evaluating");function Te(e,t,n){let r;Object.defineProperty(e,t,{get(){if(r!==ik)return r===void 0&&(r=ik,r=n()),r},set(i){Object.defineProperty(e,t,{value:i})},configurable:!0})}function iA(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function Dr(e,t,n){Object.defineProperty(e,t,{value:n,writable:!0,enumerable:!0,configurable:!0})}function Ki(...e){let t={};for(let n of e){let r=Object.getOwnPropertyDescriptors(n);Object.assign(t,r)}return Object.defineProperties({},t)}function rA(e){return Ki(e._zod.def)}function oA(e,t){return t?t.reduce((n,r)=>n?.[r],e):e}function aA(e){let t=Object.keys(e),n=t.map(r=>e[r]);return Promise.all(n).then(r=>{let i={};for(let o=0;o<t.length;o++)i[t[o]]=r[o];return i})}function lA(e=10){let t="abcdefghijklmnopqrstuvwxyz",n="";for(let r=0;r<e;r++)n+=t[Math.floor(Math.random()*t.length)];return n}function ou(e){return JSON.stringify(e)}function vh(e){return e.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}var au="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function Co(e){return typeof e=="object"&&e!==null&&!Array.isArray(e)}var bh=ma(()=>{if(To.jitless||typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{let e=Function;return new e(""),!0}catch{return!1}});function Ar(e){if(Co(e)===!1)return!1;let t=e.constructor;if(t===void 0||typeof t!="function")return!0;let n=t.prototype;return!(Co(n)===!1||Object.prototype.hasOwnProperty.call(n,"isPrototypeOf")===!1)}function xh(e){return Ar(e)?{...e}:Array.isArray(e)?[...e]:e instanceof Map?new Map(e):e instanceof Set?new Set(e):e}function sA(e){let t=0;for(let n in e)Object.prototype.hasOwnProperty.call(e,n)&&t++;return t}var cA=e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw new Error(`Unknown data type: ${t}`)}},ls=new Set(["string","number","symbol"]),Sh=new Set(["string","number","bigint","boolean","symbol","undefined"]);function Qn(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function dn(e,t,n){let r=new e._zod.constr(t??e._zod.def);return(!t||n?.parent)&&(r._zod.parent=e),r}function Y(e){let t=e;if(!t)return{};if(typeof t=="string")return{error:()=>t};if(t?.message!==void 0){if(t?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");t.error=t.message}return delete t.message,typeof t.error=="string"?{...t,error:()=>t.error}:t}function uA(e){let t;return new Proxy({},{get(n,r,i){return t??(t=e()),Reflect.get(t,r,i)},set(n,r,i,o){return t??(t=e()),Reflect.set(t,r,i,o)},has(n,r){return t??(t=e()),Reflect.has(t,r)},deleteProperty(n,r){return t??(t=e()),Reflect.deleteProperty(t,r)},ownKeys(n){return t??(t=e()),Reflect.ownKeys(t)},getOwnPropertyDescriptor(n,r){return t??(t=e()),Reflect.getOwnPropertyDescriptor(t,r)},defineProperty(n,r,i){return t??(t=e()),Reflect.defineProperty(t,r,i)}})}function L(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function kh(e){return Object.keys(e).filter(t=>e[t]._zod.optin==="optional"&&e[t]._zod.optout==="optional")}var wh={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},_h={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function dA(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");let o=Ki(e._zod.def,{get shape(){let a={};for(let l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&(a[l]=n.shape[l])}return Dr(this,"shape",a),a},checks:[]});return dn(e,o)}function fA(e,t){let n=e._zod.def,r=n.checks;if(r&&r.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");let o=Ki(e._zod.def,{get shape(){let a={...e._zod.def.shape};for(let l in t){if(!(l in n.shape))throw new Error(`Unrecognized key: "${l}"`);t[l]&&delete a[l]}return Dr(this,"shape",a),a},checks:[]});return dn(e,o)}function mA(e,t){if(!Ar(t))throw new Error("Invalid input to extend: expected a plain object");let n=e._zod.def.checks;if(n&&n.length>0){let o=e._zod.def.shape;for(let a in t)if(Object.getOwnPropertyDescriptor(o,a)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}let i=Ki(e._zod.def,{get shape(){let o={...e._zod.def.shape,...t};return Dr(this,"shape",o),o}});return dn(e,i)}function hA(e,t){if(!Ar(t))throw new Error("Invalid input to safeExtend: expected a plain object");let n=Ki(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t};return Dr(this,"shape",r),r}});return dn(e,n)}function pA(e,t){if(e._zod.def.checks?.length)throw new Error(".merge() cannot be used on object schemas containing refinements. Use .safeExtend() instead.");let n=Ki(e._zod.def,{get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return Dr(this,"shape",r),r},get catchall(){return t._zod.def.catchall},checks:t._zod.def.checks??[]});return dn(e,n)}function gA(e,t,n){let i=t._zod.def.checks;if(i&&i.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");let a=Ki(t._zod.def,{get shape(){let l=t._zod.def.shape,c={...l};if(n)for(let u in n){if(!(u in l))throw new Error(`Unrecognized key: "${u}"`);n[u]&&(c[u]=e?new e({type:"optional",innerType:l[u]}):l[u])}else for(let u in l)c[u]=e?new e({type:"optional",innerType:l[u]}):l[u];return Dr(this,"shape",c),c},checks:[]});return dn(t,a)}function yA(e,t,n){let r=Ki(t._zod.def,{get shape(){let i=t._zod.def.shape,o={...i};if(n)for(let a in n){if(!(a in o))throw new Error(`Unrecognized key: "${a}"`);n[a]&&(o[a]=new e({type:"nonoptional",innerType:i[a]}))}else for(let a in i)o[a]=new e({type:"nonoptional",innerType:i[a]});return Dr(this,"shape",o),o}});return dn(t,r)}function jr(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue!==!0)return!0;return!1}function $h(e,t=0){if(e.aborted===!0)return!0;for(let n=t;n<e.issues.length;n++)if(e.issues[n]?.continue===!1)return!0;return!1}function Sn(e,t){return t.map(n=>{var r;return(r=n).path??(r.path=[]),n.path.unshift(e),n})}function rs(e){return typeof e=="string"?e:e?.message}function fn(e,t,n){let r=e.message?e.message:rs(e.inst?._zod.def?.error?.(e))??rs(t?.error?.(e))??rs(n.customError?.(e))??rs(n.localeError?.(e))??"Invalid input",{inst:i,continue:o,input:a,...l}=e;return l.path??(l.path=[]),l.message=r,t?.reportInput&&(l.input=a),l}function ss(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function cs(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function P(e){let t=typeof e;switch(t){case"number":return Number.isNaN(e)?"nan":"number";case"object":{if(e===null)return"null";if(Array.isArray(e))return"array";let n=e;if(n&&Object.getPrototypeOf(n)!==Object.prototype&&"constructor"in n&&n.constructor)return n.constructor.name}}return t}function ha(...e){let[t,n,r]=e;return typeof t=="string"?{message:t,code:"custom",input:n,inst:r}:{...t}}function vA(e){return Object.entries(e).filter(([t,n])=>Number.isNaN(Number.parseInt(t,10))).map(t=>t[1])}function rk(e){let t=atob(e),n=new Uint8Array(t.length);for(let r=0;r<t.length;r++)n[r]=t.charCodeAt(r);return n}function ok(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)}function bA(e){let t=e.replace(/-/g,"+").replace(/_/g,"/"),n="=".repeat((4-t.length%4)%4);return rk(t+n)}function xA(e){return ok(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function SA(e){let t=e.replace(/^0x/,"");if(t.length%2!==0)throw new Error("Invalid hex string length");let n=new Uint8Array(t.length/2);for(let r=0;r<t.length;r+=2)n[r/2]=Number.parseInt(t.slice(r,r+2),16);return n}function kA(e){return Array.from(e).map(t=>t.toString(16).padStart(2,"0")).join("")}var gh=class{constructor(...t){}};var ak=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),e.message=JSON.stringify(t,fa,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},us=z("$ZodError",ak),kn=z("$ZodError",ak,{Parent:Error});function ds(e,t=n=>n.message){let n={},r=[];for(let i of e.issues)i.path.length>0?(n[i.path[0]]=n[i.path[0]]||[],n[i.path[0]].push(t(i))):r.push(t(i));return{formErrors:r,fieldErrors:n}}function fs(e,t=n=>n.message){let n={_errors:[]},r=(i,o=[])=>{for(let a of i.issues)if(a.code==="invalid_union"&&a.errors.length)a.errors.map(l=>r({issues:l},[...o,...a.path]));else if(a.code==="invalid_key")r({issues:a.issues},[...o,...a.path]);else if(a.code==="invalid_element")r({issues:a.issues},[...o,...a.path]);else{let l=[...o,...a.path];if(l.length===0)n._errors.push(t(a));else{let c=n,u=0;for(;u<l.length;){let d=l[u];u===l.length-1?(c[d]=c[d]||{_errors:[]},c[d]._errors.push(t(a))):c[d]=c[d]||{_errors:[]},c=c[d],u++}}}};return r(e),n}function zh(e,t=n=>n.message){let n={errors:[]},r=(i,o=[])=>{var a,l;for(let c of i.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(u=>r({issues:u},[...o,...c.path]));else if(c.code==="invalid_key")r({issues:c.issues},[...o,...c.path]);else if(c.code==="invalid_element")r({issues:c.issues},[...o,...c.path]);else{let u=[...o,...c.path];if(u.length===0){n.errors.push(t(c));continue}let d=n,m=0;for(;m<u.length;){let h=u[m],f=m===u.length-1;typeof h=="string"?(d.properties??(d.properties={}),(a=d.properties)[h]??(a[h]={errors:[]}),d=d.properties[h]):(d.items??(d.items=[]),(l=d.items)[h]??(l[h]={errors:[]}),d=d.items[h]),f&&d.errors.push(t(c)),m++}}};return r(e),n}function lk(e){let t=[],n=e.map(r=>typeof r=="object"?r.key:r);for(let r of n)typeof r=="number"?t.push(`[${r}]`):typeof r=="symbol"?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}function Th(e){let t=[],n=[...e.issues].sort((r,i)=>(r.path??[]).length-(i.path??[]).length);for(let r of n)t.push(`\u2716 ${r.message}`),r.path?.length&&t.push(` \u2192 at ${lk(r.path)}`);return t.join(`
|
|
10
|
-
`)}var pa=e=>(t,n,r,i)=>{let o=r?{...r,async:!1}:{async:!1},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise)throw new bi;if(a.issues.length){let l=new(i?.Err??e)(a.issues.map(c=>fn(c,o,xt())));throw au(l,i?.callee),l}return a.value},lu=pa(kn),ga=e=>async(t,n,r,i)=>{let o=r?{...r,async:!0}:{async:!0},a=t._zod.run({value:n,issues:[]},o);if(a instanceof Promise&&(a=await a),a.issues.length){let l=new(i?.Err??e)(a.issues.map(c=>fn(c,o,xt())));throw au(l,i?.callee),l}return a.value},su=ga(kn),ya=e=>(t,n,r)=>{let i=r?{...r,async:!1}:{async:!1},o=t._zod.run({value:n,issues:[]},i);if(o instanceof Promise)throw new bi;return o.issues.length?{success:!1,error:new(e??us)(o.issues.map(a=>fn(a,i,xt())))}:{success:!0,data:o.value}},Ch=ya(kn),va=e=>async(t,n,r)=>{let i=r?{...r,async:!0}:{async:!0},o=t._zod.run({value:n,issues:[]},i);return o instanceof Promise&&(o=await o),o.issues.length?{success:!1,error:new e(o.issues.map(a=>fn(a,i,xt())))}:{success:!0,data:o.value}},Eh=va(kn),cu=e=>(t,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return pa(e)(t,n,i)},_A=cu(kn),uu=e=>(t,n,r)=>pa(e)(t,n,r),$A=uu(kn),du=e=>async(t,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return ga(e)(t,n,i)},zA=du(kn),fu=e=>async(t,n,r)=>ga(e)(t,n,r),TA=fu(kn),mu=e=>(t,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return ya(e)(t,n,i)},CA=mu(kn),hu=e=>(t,n,r)=>ya(e)(t,n,r),EA=hu(kn),pu=e=>async(t,n,r)=>{let i=r?{...r,direction:"backward"}:{direction:"backward"};return va(e)(t,n,i)},IA=pu(kn),gu=e=>async(t,n,r)=>va(e)(t,n,r),DA=gu(kn);var Rn={};Xi(Rn,{base64:()=>Vh,base64url:()=>yu,bigint:()=>Kh,boolean:()=>ep,browserEmail:()=>BA,cidrv4:()=>Fh,cidrv6:()=>Hh,cuid:()=>Ih,cuid2:()=>Dh,date:()=>Wh,datetime:()=>Jh,domain:()=>ZA,duration:()=>Uh,e164:()=>Gh,email:()=>Mh,emoji:()=>Bh,extendedDuration:()=>AA,guid:()=>Rh,hex:()=>FA,hostname:()=>PA,html5Email:()=>UA,httpProtocol:()=>qh,idnEmail:()=>MA,integer:()=>Qh,ipv4:()=>Lh,ipv6:()=>Ph,ksuid:()=>Oh,lowercase:()=>ip,mac:()=>Zh,md5_base64:()=>VA,md5_base64url:()=>qA,md5_hex:()=>HA,nanoid:()=>Nh,null:()=>tp,number:()=>vu,rfc5322Email:()=>RA,sha1_base64:()=>WA,sha1_base64url:()=>YA,sha1_hex:()=>GA,sha256_base64:()=>XA,sha256_base64url:()=>KA,sha256_hex:()=>JA,sha384_base64:()=>ej,sha384_base64url:()=>tj,sha384_hex:()=>QA,sha512_base64:()=>ij,sha512_base64url:()=>rj,sha512_hex:()=>nj,string:()=>Xh,time:()=>Yh,ulid:()=>Ah,undefined:()=>np,unicodeEmail:()=>sk,uppercase:()=>rp,uuid:()=>Eo,uuid4:()=>jA,uuid6:()=>OA,uuid7:()=>NA,xid:()=>jh});var Ih=/^[cC][0-9a-z]{6,}$/,Dh=/^[0-9a-z]+$/,Ah=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,jh=/^[0-9a-vA-V]{20}$/,Oh=/^[A-Za-z0-9]{27}$/,Nh=/^[a-zA-Z0-9_-]{21}$/,Uh=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,AA=/^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/,Rh=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,Eo=e=>e?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,jA=Eo(4),OA=Eo(6),NA=Eo(7),Mh=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,UA=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,RA=/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/,sk=/^[^\s@"]{1,64}@[^\s@]{1,255}$/u,MA=sk,BA=/^[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,LA="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function Bh(){return new RegExp(LA,"u")}var Lh=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,Ph=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,Zh=e=>{let t=Qn(e??":");return new RegExp(`^(?:[0-9A-F]{2}${t}){5}[0-9A-F]{2}$|^(?:[0-9a-f]{2}${t}){5}[0-9a-f]{2}$`)},Fh=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,Hh=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Vh=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,yu=/^[A-Za-z0-9_-]*$/,PA=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,ZA=/^([a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?\.)+[a-zA-Z]{2,}$/,qh=/^https?$/,Gh=/^\+[1-9]\d{6,14}$/,ck="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Wh=new RegExp(`^${ck}$`);function uk(e){let t="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t}`:e.precision===0?`${t}:[0-5]\\d`:`${t}:[0-5]\\d\\.\\d{${e.precision}}`:`${t}(?::[0-5]\\d(?:\\.\\d+)?)?`}function Yh(e){return new RegExp(`^${uk(e)}$`)}function Jh(e){let t=uk({precision:e.precision}),n=["Z"];e.local&&n.push(""),e.offset&&n.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r=`${t}(?:${n.join("|")})`;return new RegExp(`^${ck}T(?:${r})$`)}var Xh=e=>{let t=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${t}$`)},Kh=/^-?\d+n?$/,Qh=/^-?\d+$/,vu=/^-?\d+(?:\.\d+)?$/,ep=/^(?:true|false)$/i,tp=/^null$/i;var np=/^undefined$/i;var ip=/^[^A-Z]*$/,rp=/^[^a-z]*$/,FA=/^[0-9a-fA-F]*$/;function ms(e,t){return new RegExp(`^[A-Za-z0-9+/]{${e}}${t}$`)}function hs(e){return new RegExp(`^[A-Za-z0-9_-]{${e}}$`)}var HA=/^[0-9a-fA-F]{32}$/,VA=ms(22,"=="),qA=hs(22),GA=/^[0-9a-fA-F]{40}$/,WA=ms(27,"="),YA=hs(27),JA=/^[0-9a-fA-F]{64}$/,XA=ms(43,"="),KA=hs(43),QA=/^[0-9a-fA-F]{96}$/,ej=ms(64,""),tj=hs(64),nj=/^[0-9a-fA-F]{128}$/,ij=ms(86,"=="),rj=hs(86);var it=z("$ZodCheck",(e,t)=>{var n;e._zod??(e._zod={}),e._zod.def=t,(n=e._zod).onattach??(n.onattach=[])}),fk={number:"number",bigint:"bigint",object:"date"},bu=z("$ZodCheckLessThan",(e,t)=>{it.init(e,t);let n=fk[typeof t.value];e._zod.onattach.push(r=>{let i=r._zod.bag,o=(t.inclusive?i.maximum:i.exclusiveMaximum)??Number.POSITIVE_INFINITY;t.value<o&&(t.inclusive?i.maximum=t.value:i.exclusiveMaximum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value<=t.value:r.value<t.value)||r.issues.push({origin:n,code:"too_big",maximum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),xu=z("$ZodCheckGreaterThan",(e,t)=>{it.init(e,t);let n=fk[typeof t.value];e._zod.onattach.push(r=>{let i=r._zod.bag,o=(t.inclusive?i.minimum:i.exclusiveMinimum)??Number.NEGATIVE_INFINITY;t.value>o&&(t.inclusive?i.minimum=t.value:i.exclusiveMinimum=t.value)}),e._zod.check=r=>{(t.inclusive?r.value>=t.value:r.value>t.value)||r.issues.push({origin:n,code:"too_small",minimum:typeof t.value=="object"?t.value.getTime():t.value,input:r.value,inclusive:t.inclusive,inst:e,continue:!t.abort})}}),op=z("$ZodCheckMultipleOf",(e,t)=>{it.init(e,t),e._zod.onattach.push(n=>{var r;(r=n._zod.bag).multipleOf??(r.multipleOf=t.value)}),e._zod.check=n=>{if(typeof n.value!=typeof t.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof n.value=="bigint"?n.value%t.value===BigInt(0):yh(n.value,t.value)===0)||n.issues.push({origin:typeof n.value,code:"not_multiple_of",divisor:t.value,input:n.value,inst:e,continue:!t.abort})}}),ap=z("$ZodCheckNumberFormat",(e,t)=>{it.init(e,t),t.format=t.format||"float64";let n=t.format?.includes("int"),r=n?"int":"number",[i,o]=wh[t.format];e._zod.onattach.push(a=>{let l=a._zod.bag;l.format=t.format,l.minimum=i,l.maximum=o,n&&(l.pattern=Qh)}),e._zod.check=a=>{let l=a.value;if(n){if(!Number.isInteger(l)){a.issues.push({expected:r,format:t.format,code:"invalid_type",continue:!1,input:l,inst:e});return}if(!Number.isSafeInteger(l)){l>0?a.issues.push({input:l,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort}):a.issues.push({input:l,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:e,origin:r,inclusive:!0,continue:!t.abort});return}}l<i&&a.issues.push({origin:"number",input:l,code:"too_small",minimum:i,inclusive:!0,inst:e,continue:!t.abort}),l>o&&a.issues.push({origin:"number",input:l,code:"too_big",maximum:o,inclusive:!0,inst:e,continue:!t.abort})}}),lp=z("$ZodCheckBigIntFormat",(e,t)=>{it.init(e,t);let[n,r]=_h[t.format];e._zod.onattach.push(i=>{let o=i._zod.bag;o.format=t.format,o.minimum=n,o.maximum=r}),e._zod.check=i=>{let o=i.value;o<n&&i.issues.push({origin:"bigint",input:o,code:"too_small",minimum:n,inclusive:!0,inst:e,continue:!t.abort}),o>r&&i.issues.push({origin:"bigint",input:o,code:"too_big",maximum:r,inclusive:!0,inst:e,continue:!t.abort})}}),sp=z("$ZodCheckMaxSize",(e,t)=>{var n;it.init(e,t),(n=e._zod.def).when??(n.when=r=>{let i=r.value;return!Ir(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{let i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let i=r.value;i.size<=t.maximum||r.issues.push({origin:ss(i),code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),cp=z("$ZodCheckMinSize",(e,t)=>{var n;it.init(e,t),(n=e._zod.def).when??(n.when=r=>{let i=r.value;return!Ir(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{let i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let i=r.value;i.size>=t.minimum||r.issues.push({origin:ss(i),code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),up=z("$ZodCheckSizeEquals",(e,t)=>{var n;it.init(e,t),(n=e._zod.def).when??(n.when=r=>{let i=r.value;return!Ir(i)&&i.size!==void 0}),e._zod.onattach.push(r=>{let i=r._zod.bag;i.minimum=t.size,i.maximum=t.size,i.size=t.size}),e._zod.check=r=>{let i=r.value,o=i.size;if(o===t.size)return;let a=o>t.size;r.issues.push({origin:ss(i),...a?{code:"too_big",maximum:t.size}:{code:"too_small",minimum:t.size},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),dp=z("$ZodCheckMaxLength",(e,t)=>{var n;it.init(e,t),(n=e._zod.def).when??(n.when=r=>{let i=r.value;return!Ir(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{let i=r._zod.bag.maximum??Number.POSITIVE_INFINITY;t.maximum<i&&(r._zod.bag.maximum=t.maximum)}),e._zod.check=r=>{let i=r.value;if(i.length<=t.maximum)return;let a=cs(i);r.issues.push({origin:a,code:"too_big",maximum:t.maximum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),fp=z("$ZodCheckMinLength",(e,t)=>{var n;it.init(e,t),(n=e._zod.def).when??(n.when=r=>{let i=r.value;return!Ir(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{let i=r._zod.bag.minimum??Number.NEGATIVE_INFINITY;t.minimum>i&&(r._zod.bag.minimum=t.minimum)}),e._zod.check=r=>{let i=r.value;if(i.length>=t.minimum)return;let a=cs(i);r.issues.push({origin:a,code:"too_small",minimum:t.minimum,inclusive:!0,input:i,inst:e,continue:!t.abort})}}),mp=z("$ZodCheckLengthEquals",(e,t)=>{var n;it.init(e,t),(n=e._zod.def).when??(n.when=r=>{let i=r.value;return!Ir(i)&&i.length!==void 0}),e._zod.onattach.push(r=>{let i=r._zod.bag;i.minimum=t.length,i.maximum=t.length,i.length=t.length}),e._zod.check=r=>{let i=r.value,o=i.length;if(o===t.length)return;let a=cs(i),l=o>t.length;r.issues.push({origin:a,...l?{code:"too_big",maximum:t.length}:{code:"too_small",minimum:t.length},inclusive:!0,exact:!0,input:r.value,inst:e,continue:!t.abort})}}),ba=z("$ZodCheckStringFormat",(e,t)=>{var n,r;it.init(e,t),e._zod.onattach.push(i=>{let o=i._zod.bag;o.format=t.format,t.pattern&&(o.patterns??(o.patterns=new Set),o.patterns.add(t.pattern))}),t.pattern?(n=e._zod).check??(n.check=i=>{t.pattern.lastIndex=0,!t.pattern.test(i.value)&&i.issues.push({origin:"string",code:"invalid_format",format:t.format,input:i.value,...t.pattern?{pattern:t.pattern.toString()}:{},inst:e,continue:!t.abort})}):(r=e._zod).check??(r.check=()=>{})}),hp=z("$ZodCheckRegex",(e,t)=>{ba.init(e,t),e._zod.check=n=>{t.pattern.lastIndex=0,!t.pattern.test(n.value)&&n.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n.value,pattern:t.pattern.toString(),inst:e,continue:!t.abort})}}),pp=z("$ZodCheckLowerCase",(e,t)=>{t.pattern??(t.pattern=ip),ba.init(e,t)}),gp=z("$ZodCheckUpperCase",(e,t)=>{t.pattern??(t.pattern=rp),ba.init(e,t)}),yp=z("$ZodCheckIncludes",(e,t)=>{it.init(e,t);let n=Qn(t.includes),r=new RegExp(typeof t.position=="number"?`^.{${t.position}}${n}`:n);t.pattern=r,e._zod.onattach.push(i=>{let o=i._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(r)}),e._zod.check=i=>{i.value.includes(t.includes,t.position)||i.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t.includes,input:i.value,inst:e,continue:!t.abort})}}),vp=z("$ZodCheckStartsWith",(e,t)=>{it.init(e,t);let n=new RegExp(`^${Qn(t.prefix)}.*`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.startsWith(t.prefix)||r.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t.prefix,input:r.value,inst:e,continue:!t.abort})}}),bp=z("$ZodCheckEndsWith",(e,t)=>{it.init(e,t);let n=new RegExp(`.*${Qn(t.suffix)}$`);t.pattern??(t.pattern=n),e._zod.onattach.push(r=>{let i=r._zod.bag;i.patterns??(i.patterns=new Set),i.patterns.add(n)}),e._zod.check=r=>{r.value.endsWith(t.suffix)||r.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t.suffix,input:r.value,inst:e,continue:!t.abort})}});function dk(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues))}var xp=z("$ZodCheckProperty",(e,t)=>{it.init(e,t),e._zod.check=n=>{let r=t.schema._zod.run({value:n.value[t.property],issues:[]},{});if(r instanceof Promise)return r.then(i=>dk(i,n,t.property));dk(r,n,t.property)}}),Sp=z("$ZodCheckMimeType",(e,t)=>{it.init(e,t);let n=new Set(t.mime);e._zod.onattach.push(r=>{r._zod.bag.mime=t.mime}),e._zod.check=r=>{n.has(r.value.type)||r.issues.push({code:"invalid_value",values:t.mime,input:r.value.type,inst:e,continue:!t.abort})}}),kp=z("$ZodCheckOverwrite",(e,t)=>{it.init(e,t),e._zod.check=n=>{n.value=t.tx(n.value)}});var ps=class{constructor(t=[]){this.content=[],this.indent=0,this&&(this.args=t)}indented(t){this.indent+=1,t(this),this.indent-=1}write(t){if(typeof t=="function"){t(this,{execution:"sync"}),t(this,{execution:"async"});return}let r=t.split(`
|
|
11
|
-
`).filter(a=>a),i=Math.min(...r.map(a=>a.length-a.trimStart().length)),o=r.map(a=>a.slice(i)).map(a=>" ".repeat(this.indent*2)+a);for(let a of o)this.content.push(a)}compile(){let t=Function,n=this?.args,i=[...(this?.content??[""]).map(o=>` ${o}`)];return new t(...n,i.join(`
|
|
12
|
-
`))}};var wp={major:4,minor:4,patch:3};var xe=z("$ZodType",(e,t)=>{var n;e??(e={}),e._zod.def=t,e._zod.bag=e._zod.bag||{},e._zod.version=wp;let r=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r.unshift(e);for(let i of r)for(let o of i._zod.onattach)o(e);if(r.length===0)(n=e._zod).deferred??(n.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let i=(a,l,c)=>{let u=jr(a),d;for(let m of l){if(m._zod.def.when){if($h(a)||!m._zod.def.when(a))continue}else if(u)continue;let h=a.issues.length,f=m._zod.check(a);if(f instanceof Promise&&c?.async===!1)throw new bi;if(d||f instanceof Promise)d=(d??Promise.resolve()).then(async()=>{await f,a.issues.length!==h&&(u||(u=jr(a,h)))});else{if(a.issues.length===h)continue;u||(u=jr(a,h))}}return d?d.then(()=>a):a},o=(a,l,c)=>{if(jr(a))return a.aborted=!0,a;let u=i(l,r,c);if(u instanceof Promise){if(c.async===!1)throw new bi;return u.then(d=>e._zod.parse(d,c))}return e._zod.parse(u,c)};e._zod.run=(a,l)=>{if(l.skipChecks)return e._zod.parse(a,l);if(l.direction==="backward"){let u=e._zod.parse({value:a.value,issues:[]},{...l,skipChecks:!0});return u instanceof Promise?u.then(d=>o(d,a,l)):o(u,a,l)}let c=e._zod.parse(a,l);if(c instanceof Promise){if(l.async===!1)throw new bi;return c.then(u=>i(u,r,l))}return i(c,r,l)}}Te(e,"~standard",()=>({validate:i=>{try{let o=Ch(e,i);return o.success?{value:o.data}:{issues:o.error?.issues}}catch{return Eh(e,i).then(a=>a.success?{value:a.data}:{issues:a.error?.issues})}},vendor:"zod",version:1}))}),Io=z("$ZodString",(e,t)=>{xe.init(e,t),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Xh(e._zod.bag),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=String(n.value)}catch{}return typeof n.value=="string"||n.issues.push({expected:"string",code:"invalid_type",input:n.value,inst:e}),n}}),Ke=z("$ZodStringFormat",(e,t)=>{ba.init(e,t),Io.init(e,t)}),$p=z("$ZodGUID",(e,t)=>{t.pattern??(t.pattern=Rh),Ke.init(e,t)}),zp=z("$ZodUUID",(e,t)=>{if(t.version){let r={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t.version];if(r===void 0)throw new Error(`Invalid UUID version: "${t.version}"`);t.pattern??(t.pattern=Eo(r))}else t.pattern??(t.pattern=Eo());Ke.init(e,t)}),Tp=z("$ZodEmail",(e,t)=>{t.pattern??(t.pattern=Mh),Ke.init(e,t)}),Cp=z("$ZodURL",(e,t)=>{Ke.init(e,t),e._zod.check=n=>{try{let r=n.value.trim();if(!t.normalize&&t.protocol?.source===qh.source&&!/^https?:\/\//i.test(r)){n.issues.push({code:"invalid_format",format:"url",note:"Invalid URL format",input:n.value,inst:e,continue:!t.abort});return}let i=new URL(r);t.hostname&&(t.hostname.lastIndex=0,t.hostname.test(i.hostname)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:t.hostname.source,input:n.value,inst:e,continue:!t.abort})),t.protocol&&(t.protocol.lastIndex=0,t.protocol.test(i.protocol.endsWith(":")?i.protocol.slice(0,-1):i.protocol)||n.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t.protocol.source,input:n.value,inst:e,continue:!t.abort})),t.normalize?n.value=i.href:n.value=r;return}catch{n.issues.push({code:"invalid_format",format:"url",input:n.value,inst:e,continue:!t.abort})}}}),Ep=z("$ZodEmoji",(e,t)=>{t.pattern??(t.pattern=Bh()),Ke.init(e,t)}),Ip=z("$ZodNanoID",(e,t)=>{t.pattern??(t.pattern=Nh),Ke.init(e,t)}),Dp=z("$ZodCUID",(e,t)=>{t.pattern??(t.pattern=Ih),Ke.init(e,t)}),Ap=z("$ZodCUID2",(e,t)=>{t.pattern??(t.pattern=Dh),Ke.init(e,t)}),jp=z("$ZodULID",(e,t)=>{t.pattern??(t.pattern=Ah),Ke.init(e,t)}),Op=z("$ZodXID",(e,t)=>{t.pattern??(t.pattern=jh),Ke.init(e,t)}),Np=z("$ZodKSUID",(e,t)=>{t.pattern??(t.pattern=Oh),Ke.init(e,t)}),Up=z("$ZodISODateTime",(e,t)=>{t.pattern??(t.pattern=Jh(t)),Ke.init(e,t)}),Rp=z("$ZodISODate",(e,t)=>{t.pattern??(t.pattern=Wh),Ke.init(e,t)}),Mp=z("$ZodISOTime",(e,t)=>{t.pattern??(t.pattern=Yh(t)),Ke.init(e,t)}),Bp=z("$ZodISODuration",(e,t)=>{t.pattern??(t.pattern=Uh),Ke.init(e,t)}),Lp=z("$ZodIPv4",(e,t)=>{t.pattern??(t.pattern=Lh),Ke.init(e,t),e._zod.bag.format="ipv4"}),Pp=z("$ZodIPv6",(e,t)=>{t.pattern??(t.pattern=Ph),Ke.init(e,t),e._zod.bag.format="ipv6",e._zod.check=n=>{try{new URL(`http://[${n.value}]`)}catch{n.issues.push({code:"invalid_format",format:"ipv6",input:n.value,inst:e,continue:!t.abort})}}}),Zp=z("$ZodMAC",(e,t)=>{t.pattern??(t.pattern=Zh(t.delimiter)),Ke.init(e,t),e._zod.bag.format="mac"}),Fp=z("$ZodCIDRv4",(e,t)=>{t.pattern??(t.pattern=Fh),Ke.init(e,t)}),Hp=z("$ZodCIDRv6",(e,t)=>{t.pattern??(t.pattern=Hh),Ke.init(e,t),e._zod.check=n=>{let r=n.value.split("/");try{if(r.length!==2)throw new Error;let[i,o]=r;if(!o)throw new Error;let a=Number(o);if(`${a}`!==o)throw new Error;if(a<0||a>128)throw new Error;new URL(`http://[${i}]`)}catch{n.issues.push({code:"invalid_format",format:"cidrv6",input:n.value,inst:e,continue:!t.abort})}}});function Vp(e){if(e==="")return!0;if(/\s/.test(e)||e.length%4!==0)return!1;try{return atob(e),!0}catch{return!1}}var qp=z("$ZodBase64",(e,t)=>{t.pattern??(t.pattern=Vh),Ke.init(e,t),e._zod.bag.contentEncoding="base64",e._zod.check=n=>{Vp(n.value)||n.issues.push({code:"invalid_format",format:"base64",input:n.value,inst:e,continue:!t.abort})}});function Ck(e){if(!yu.test(e))return!1;let t=e.replace(/[-_]/g,r=>r==="-"?"+":"/"),n=t.padEnd(Math.ceil(t.length/4)*4,"=");return Vp(n)}var Gp=z("$ZodBase64URL",(e,t)=>{t.pattern??(t.pattern=yu),Ke.init(e,t),e._zod.bag.contentEncoding="base64url",e._zod.check=n=>{Ck(n.value)||n.issues.push({code:"invalid_format",format:"base64url",input:n.value,inst:e,continue:!t.abort})}}),Wp=z("$ZodE164",(e,t)=>{t.pattern??(t.pattern=Gh),Ke.init(e,t)});function Ek(e,t=null){try{let n=e.split(".");if(n.length!==3)return!1;let[r]=n;if(!r)return!1;let i=JSON.parse(atob(r));return!("typ"in i&&i?.typ!=="JWT"||!i.alg||t&&(!("alg"in i)||i.alg!==t))}catch{return!1}}var Yp=z("$ZodJWT",(e,t)=>{Ke.init(e,t),e._zod.check=n=>{Ek(n.value,t.alg)||n.issues.push({code:"invalid_format",format:"jwt",input:n.value,inst:e,continue:!t.abort})}}),Jp=z("$ZodCustomStringFormat",(e,t)=>{Ke.init(e,t),e._zod.check=n=>{t.fn(n.value)||n.issues.push({code:"invalid_format",format:t.format,input:n.value,inst:e,continue:!t.abort})}}),$u=z("$ZodNumber",(e,t)=>{xe.init(e,t),e._zod.pattern=e._zod.bag.pattern??vu,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=Number(n.value)}catch{}let i=n.value;if(typeof i=="number"&&!Number.isNaN(i)&&Number.isFinite(i))return n;let o=typeof i=="number"?Number.isNaN(i)?"NaN":Number.isFinite(i)?void 0:"Infinity":void 0;return n.issues.push({expected:"number",code:"invalid_type",input:i,inst:e,...o?{received:o}:{}}),n}}),Xp=z("$ZodNumberFormat",(e,t)=>{ap.init(e,t),$u.init(e,t)}),gs=z("$ZodBoolean",(e,t)=>{xe.init(e,t),e._zod.pattern=ep,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=!!n.value}catch{}let i=n.value;return typeof i=="boolean"||n.issues.push({expected:"boolean",code:"invalid_type",input:i,inst:e}),n}}),zu=z("$ZodBigInt",(e,t)=>{xe.init(e,t),e._zod.pattern=Kh,e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=BigInt(n.value)}catch{}return typeof n.value=="bigint"||n.issues.push({expected:"bigint",code:"invalid_type",input:n.value,inst:e}),n}}),Kp=z("$ZodBigIntFormat",(e,t)=>{lp.init(e,t),zu.init(e,t)}),Qp=z("$ZodSymbol",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;return typeof i=="symbol"||n.issues.push({expected:"symbol",code:"invalid_type",input:i,inst:e}),n}}),eg=z("$ZodUndefined",(e,t)=>{xe.init(e,t),e._zod.pattern=np,e._zod.values=new Set([void 0]),e._zod.parse=(n,r)=>{let i=n.value;return typeof i>"u"||n.issues.push({expected:"undefined",code:"invalid_type",input:i,inst:e}),n}}),tg=z("$ZodNull",(e,t)=>{xe.init(e,t),e._zod.pattern=tp,e._zod.values=new Set([null]),e._zod.parse=(n,r)=>{let i=n.value;return i===null||n.issues.push({expected:"null",code:"invalid_type",input:i,inst:e}),n}}),ng=z("$ZodAny",(e,t)=>{xe.init(e,t),e._zod.parse=n=>n}),ig=z("$ZodUnknown",(e,t)=>{xe.init(e,t),e._zod.parse=n=>n}),rg=z("$ZodNever",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>(n.issues.push({expected:"never",code:"invalid_type",input:n.value,inst:e}),n)}),og=z("$ZodVoid",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;return typeof i>"u"||n.issues.push({expected:"void",code:"invalid_type",input:i,inst:e}),n}}),ag=z("$ZodDate",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{if(t.coerce)try{n.value=new Date(n.value)}catch{}let i=n.value,o=i instanceof Date;return o&&!Number.isNaN(i.getTime())||n.issues.push({expected:"date",code:"invalid_type",input:i,...o?{received:"Invalid Date"}:{},inst:e}),n}});function hk(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues)),t.value[n]=e.value}var lg=z("$ZodArray",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Array.isArray(i))return n.issues.push({expected:"array",code:"invalid_type",input:i,inst:e}),n;n.value=Array(i.length);let o=[];for(let a=0;a<i.length;a++){let l=i[a],c=t.element._zod.run({value:l,issues:[]},r);c instanceof Promise?o.push(c.then(u=>hk(u,n,a))):hk(c,n,a)}return o.length?Promise.all(o).then(()=>n):n}});function _u(e,t,n,r,i,o){let a=n in r;if(e.issues.length){if(i&&o&&!a)return;t.issues.push(...Sn(n,e.issues))}if(!a&&!i){e.issues.length||t.issues.push({code:"invalid_type",expected:"nonoptional",input:void 0,path:[n]});return}e.value===void 0?a&&(t.value[n]=void 0):t.value[n]=e.value}function Ik(e){let t=Object.keys(e.shape);for(let r of t)if(!e.shape?.[r]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${r}": expected a Zod schema`);let n=kh(e.shape);return{...e,keys:t,keySet:new Set(t),numKeys:t.length,optionalKeys:new Set(n)}}function Dk(e,t,n,r,i,o){let a=[],l=i.keySet,c=i.catchall._zod,u=c.def.type,d=c.optin==="optional",m=c.optout==="optional";for(let h in t){if(h==="__proto__"||l.has(h))continue;if(u==="never"){a.push(h);continue}let f=c.run({value:t[h],issues:[]},r);f instanceof Promise?e.push(f.then(v=>_u(v,n,h,t,d,m))):_u(f,n,h,t,d,m)}return a.length&&n.issues.push({code:"unrecognized_keys",keys:a,input:t,inst:o}),e.length?Promise.all(e).then(()=>n):n}var Ak=z("$ZodObject",(e,t)=>{if(xe.init(e,t),!Object.getOwnPropertyDescriptor(t,"shape")?.get){let l=t.shape;Object.defineProperty(t,"shape",{get:()=>{let c={...l};return Object.defineProperty(t,"shape",{value:c}),c}})}let r=ma(()=>Ik(t));Te(e._zod,"propValues",()=>{let l=t.shape,c={};for(let u in l){let d=l[u]._zod;if(d.values){c[u]??(c[u]=new Set);for(let m of d.values)c[u].add(m)}}return c});let i=Co,o=t.catchall,a;e._zod.parse=(l,c)=>{a??(a=r.value);let u=l.value;if(!i(u))return l.issues.push({expected:"object",code:"invalid_type",input:u,inst:e}),l;l.value={};let d=[],m=a.shape;for(let h of a.keys){let f=m[h],v=f._zod.optin==="optional",k=f._zod.optout==="optional",D=f._zod.run({value:u[h],issues:[]},c);D instanceof Promise?d.push(D.then(p=>_u(p,l,h,u,v,k))):_u(D,l,h,u,v,k)}return o?Dk(d,u,l,c,r.value,e):d.length?Promise.all(d).then(()=>l):l}}),sg=z("$ZodObjectJIT",(e,t)=>{Ak.init(e,t);let n=e._zod.parse,r=ma(()=>Ik(t)),i=h=>{let f=new ps(["shape","payload","ctx"]),v=r.value,k=S=>{let y=ou(S);return`shape[${y}]._zod.run({ value: input[${y}], issues: [] }, ctx)`};f.write("const input = payload.value;");let D=Object.create(null),p=0;for(let S of v.keys)D[S]=`key_${p++}`;f.write("const newResult = {};");for(let S of v.keys){let y=D[S],T=ou(S),M=h[S],A=M?._zod?.optin==="optional",w=M?._zod?.optout==="optional";f.write(`const ${y} = ${k(S)};`),A&&w?f.write(`
|
|
13
|
-
if (${y}.issues.length) {
|
|
14
|
-
if (${T} in input) {
|
|
15
|
-
payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
|
|
16
|
-
...iss,
|
|
17
|
-
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
18
|
-
})));
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (${y}.value === undefined) {
|
|
23
|
-
if (${T} in input) {
|
|
24
|
-
newResult[${T}] = undefined;
|
|
25
|
-
}
|
|
26
|
-
} else {
|
|
27
|
-
newResult[${T}] = ${y}.value;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
`):A?f.write(`
|
|
31
|
-
if (${y}.issues.length) {
|
|
32
|
-
payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
|
|
33
|
-
...iss,
|
|
34
|
-
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
35
|
-
})));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
if (${y}.value === undefined) {
|
|
39
|
-
if (${T} in input) {
|
|
40
|
-
newResult[${T}] = undefined;
|
|
41
|
-
}
|
|
42
|
-
} else {
|
|
43
|
-
newResult[${T}] = ${y}.value;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
`):f.write(`
|
|
47
|
-
const ${y}_present = ${T} in input;
|
|
48
|
-
if (${y}.issues.length) {
|
|
49
|
-
payload.issues = payload.issues.concat(${y}.issues.map(iss => ({
|
|
50
|
-
...iss,
|
|
51
|
-
path: iss.path ? [${T}, ...iss.path] : [${T}]
|
|
52
|
-
})));
|
|
53
|
-
}
|
|
54
|
-
if (!${y}_present && !${y}.issues.length) {
|
|
55
|
-
payload.issues.push({
|
|
56
|
-
code: "invalid_type",
|
|
57
|
-
expected: "nonoptional",
|
|
58
|
-
input: undefined,
|
|
59
|
-
path: [${T}]
|
|
60
|
-
});
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
if (${y}_present) {
|
|
64
|
-
if (${y}.value === undefined) {
|
|
65
|
-
newResult[${T}] = undefined;
|
|
66
|
-
} else {
|
|
67
|
-
newResult[${T}] = ${y}.value;
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
|
|
71
|
-
`)}f.write("payload.value = newResult;"),f.write("return payload;");let b=f.compile();return(S,y)=>b(h,S,y)},o,a=Co,l=!To.jitless,u=l&&bh.value,d=t.catchall,m;e._zod.parse=(h,f)=>{m??(m=r.value);let v=h.value;return a(v)?l&&u&&f?.async===!1&&f.jitless!==!0?(o||(o=i(t.shape)),h=o(h,f),d?Dk([],v,h,f,m,e):h):n(h,f):(h.issues.push({expected:"object",code:"invalid_type",input:v,inst:e}),h)}});function pk(e,t,n,r){for(let o of e)if(o.issues.length===0)return t.value=o.value,t;let i=e.filter(o=>!jr(o));return i.length===1?(t.value=i[0].value,i[0]):(t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>fn(a,r,xt())))}),t)}var ys=z("$ZodUnion",(e,t)=>{xe.init(e,t),Te(e._zod,"optin",()=>t.options.some(r=>r._zod.optin==="optional")?"optional":void 0),Te(e._zod,"optout",()=>t.options.some(r=>r._zod.optout==="optional")?"optional":void 0),Te(e._zod,"values",()=>{if(t.options.every(r=>r._zod.values))return new Set(t.options.flatMap(r=>Array.from(r._zod.values)))}),Te(e._zod,"pattern",()=>{if(t.options.every(r=>r._zod.pattern)){let r=t.options.map(i=>i._zod.pattern);return new RegExp(`^(${r.map(i=>as(i.source)).join("|")})$`)}});let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let l of t.options){let c=l._zod.run({value:r.value,issues:[]},i);if(c instanceof Promise)a.push(c),o=!0;else{if(c.issues.length===0)return c;a.push(c)}}return o?Promise.all(a).then(l=>pk(l,r,e,i)):pk(a,r,e,i)}});function gk(e,t,n,r){let i=e.filter(o=>o.issues.length===0);return i.length===1?(t.value=i[0].value,t):(i.length===0?t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:e.map(o=>o.issues.map(a=>fn(a,r,xt())))}):t.issues.push({code:"invalid_union",input:t.value,inst:n,errors:[],inclusive:!1}),t)}var cg=z("$ZodXor",(e,t)=>{ys.init(e,t),t.inclusive=!1;let n=t.options.length===1?t.options[0]._zod.run:null;e._zod.parse=(r,i)=>{if(n)return n(r,i);let o=!1,a=[];for(let l of t.options){let c=l._zod.run({value:r.value,issues:[]},i);c instanceof Promise?(a.push(c),o=!0):a.push(c)}return o?Promise.all(a).then(l=>gk(l,r,e,i)):gk(a,r,e,i)}}),ug=z("$ZodDiscriminatedUnion",(e,t)=>{t.inclusive=!1,ys.init(e,t);let n=e._zod.parse;Te(e._zod,"propValues",()=>{let i={};for(let o of t.options){let a=o._zod.propValues;if(!a||Object.keys(a).length===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(o)}"`);for(let[l,c]of Object.entries(a)){i[l]||(i[l]=new Set);for(let u of c)i[l].add(u)}}return i});let r=ma(()=>{let i=t.options,o=new Map;for(let a of i){let l=a._zod.propValues?.[t.discriminator];if(!l||l.size===0)throw new Error(`Invalid discriminated union option at index "${t.options.indexOf(a)}"`);for(let c of l){if(o.has(c))throw new Error(`Duplicate discriminator value "${String(c)}"`);o.set(c,a)}}return o});e._zod.parse=(i,o)=>{let a=i.value;if(!Co(a))return i.issues.push({code:"invalid_type",expected:"object",input:a,inst:e}),i;let l=r.value.get(a?.[t.discriminator]);return l?l._zod.run(i,o):t.unionFallback||o.direction==="backward"?n(i,o):(i.issues.push({code:"invalid_union",errors:[],note:"No matching discriminator",discriminator:t.discriminator,options:Array.from(r.value.keys()),input:a,path:[t.discriminator],inst:e}),i)}}),dg=z("$ZodIntersection",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value,o=t.left._zod.run({value:i,issues:[]},r),a=t.right._zod.run({value:i,issues:[]},r);return o instanceof Promise||a instanceof Promise?Promise.all([o,a]).then(([c,u])=>yk(n,c,u)):yk(n,o,a)}});function _p(e,t){if(e===t)return{valid:!0,data:e};if(e instanceof Date&&t instanceof Date&&+e==+t)return{valid:!0,data:e};if(Ar(e)&&Ar(t)){let n=Object.keys(t),r=Object.keys(e).filter(o=>n.indexOf(o)!==-1),i={...e,...t};for(let o of r){let a=_p(e[o],t[o]);if(!a.valid)return{valid:!1,mergeErrorPath:[o,...a.mergeErrorPath]};i[o]=a.data}return{valid:!0,data:i}}if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return{valid:!1,mergeErrorPath:[]};let n=[];for(let r=0;r<e.length;r++){let i=e[r],o=t[r],a=_p(i,o);if(!a.valid)return{valid:!1,mergeErrorPath:[r,...a.mergeErrorPath]};n.push(a.data)}return{valid:!0,data:n}}return{valid:!1,mergeErrorPath:[]}}function yk(e,t,n){let r=new Map,i;for(let l of t.issues)if(l.code==="unrecognized_keys"){i??(i=l);for(let c of l.keys)r.has(c)||r.set(c,{}),r.get(c).l=!0}else e.issues.push(l);for(let l of n.issues)if(l.code==="unrecognized_keys")for(let c of l.keys)r.has(c)||r.set(c,{}),r.get(c).r=!0;else e.issues.push(l);let o=[...r].filter(([,l])=>l.l&&l.r).map(([l])=>l);if(o.length&&i&&e.issues.push({...i,keys:o}),jr(e))return e;let a=_p(t.value,n.value);if(!a.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(a.mergeErrorPath)}`);return e.value=a.data,e}var Tu=z("$ZodTuple",(e,t)=>{xe.init(e,t);let n=t.items;e._zod.parse=(r,i)=>{let o=r.value;if(!Array.isArray(o))return r.issues.push({input:o,inst:e,expected:"tuple",code:"invalid_type"}),r;r.value=[];let a=[],l=vk(n,"optin"),c=vk(n,"optout");if(!t.rest){if(o.length<l)return r.issues.push({code:"too_small",minimum:l,inclusive:!0,input:o,inst:e,origin:"array"}),r;o.length>n.length&&r.issues.push({code:"too_big",maximum:n.length,inclusive:!0,input:o,inst:e,origin:"array"})}let u=new Array(n.length);for(let d=0;d<n.length;d++){let m=n[d]._zod.run({value:o[d],issues:[]},i);m instanceof Promise?a.push(m.then(h=>{u[d]=h})):u[d]=m}if(t.rest){let d=n.length-1,m=o.slice(n.length);for(let h of m){d++;let f=t.rest._zod.run({value:h,issues:[]},i);f instanceof Promise?a.push(f.then(v=>bk(v,r,d))):bk(f,r,d)}}return a.length?Promise.all(a).then(()=>xk(u,r,n,o,c)):xk(u,r,n,o,c)}});function vk(e,t){for(let n=e.length-1;n>=0;n--)if(e[n]._zod[t]!=="optional")return n+1;return 0}function bk(e,t,n){e.issues.length&&t.issues.push(...Sn(n,e.issues)),t.value[n]=e.value}function xk(e,t,n,r,i){for(let o=0;o<n.length;o++){let a=e[o],l=o<r.length;if(a.issues.length){if(!l&&o>=i){t.value.length=o;break}t.issues.push(...Sn(o,a.issues))}t.value[o]=a.value}for(let o=t.value.length-1;o>=r.length&&(n[o]._zod.optout==="optional"&&t.value[o]===void 0);o--)t.value.length=o;return t}var fg=z("$ZodRecord",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!Ar(i))return n.issues.push({expected:"record",code:"invalid_type",input:i,inst:e}),n;let o=[],a=t.keyType._zod.values;if(a){n.value={};let l=new Set;for(let u of a)if(typeof u=="string"||typeof u=="number"||typeof u=="symbol"){l.add(typeof u=="number"?u.toString():u);let d=t.keyType._zod.run({value:u,issues:[]},r);if(d instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(d.issues.length){n.issues.push({code:"invalid_key",origin:"record",issues:d.issues.map(f=>fn(f,r,xt())),input:u,path:[u],inst:e});continue}let m=d.value,h=t.valueType._zod.run({value:i[u],issues:[]},r);h instanceof Promise?o.push(h.then(f=>{f.issues.length&&n.issues.push(...Sn(u,f.issues)),n.value[m]=f.value})):(h.issues.length&&n.issues.push(...Sn(u,h.issues)),n.value[m]=h.value)}let c;for(let u in i)l.has(u)||(c=c??[],c.push(u));c&&c.length>0&&n.issues.push({code:"unrecognized_keys",input:i,inst:e,keys:c})}else{n.value={};for(let l of Reflect.ownKeys(i)){if(l==="__proto__"||!Object.prototype.propertyIsEnumerable.call(i,l))continue;let c=t.keyType._zod.run({value:l,issues:[]},r);if(c instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof l=="string"&&vu.test(l)&&c.issues.length){let m=t.keyType._zod.run({value:Number(l),issues:[]},r);if(m instanceof Promise)throw new Error("Async schemas not supported in object keys currently");m.issues.length===0&&(c=m)}if(c.issues.length){t.mode==="loose"?n.value[l]=i[l]:n.issues.push({code:"invalid_key",origin:"record",issues:c.issues.map(m=>fn(m,r,xt())),input:l,path:[l],inst:e});continue}let d=t.valueType._zod.run({value:i[l],issues:[]},r);d instanceof Promise?o.push(d.then(m=>{m.issues.length&&n.issues.push(...Sn(l,m.issues)),n.value[c.value]=m.value})):(d.issues.length&&n.issues.push(...Sn(l,d.issues)),n.value[c.value]=d.value)}}return o.length?Promise.all(o).then(()=>n):n}}),mg=z("$ZodMap",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Map))return n.issues.push({expected:"map",code:"invalid_type",input:i,inst:e}),n;let o=[];n.value=new Map;for(let[a,l]of i){let c=t.keyType._zod.run({value:a,issues:[]},r),u=t.valueType._zod.run({value:l,issues:[]},r);c instanceof Promise||u instanceof Promise?o.push(Promise.all([c,u]).then(([d,m])=>{Sk(d,m,n,a,i,e,r)})):Sk(c,u,n,a,i,e,r)}return o.length?Promise.all(o).then(()=>n):n}});function Sk(e,t,n,r,i,o,a){e.issues.length&&(ls.has(typeof r)?n.issues.push(...Sn(r,e.issues)):n.issues.push({code:"invalid_key",origin:"map",input:i,inst:o,issues:e.issues.map(l=>fn(l,a,xt()))})),t.issues.length&&(ls.has(typeof r)?n.issues.push(...Sn(r,t.issues)):n.issues.push({origin:"map",code:"invalid_element",input:i,inst:o,key:r,issues:t.issues.map(l=>fn(l,a,xt()))})),n.value.set(e.value,t.value)}var hg=z("$ZodSet",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;if(!(i instanceof Set))return n.issues.push({input:i,inst:e,expected:"set",code:"invalid_type"}),n;let o=[];n.value=new Set;for(let a of i){let l=t.valueType._zod.run({value:a,issues:[]},r);l instanceof Promise?o.push(l.then(c=>kk(c,n))):kk(l,n)}return o.length?Promise.all(o).then(()=>n):n}});function kk(e,t){e.issues.length&&t.issues.push(...e.issues),t.value.add(e.value)}var pg=z("$ZodEnum",(e,t)=>{xe.init(e,t);let n=os(t.entries),r=new Set(n);e._zod.values=r,e._zod.pattern=new RegExp(`^(${n.filter(i=>ls.has(typeof i)).map(i=>typeof i=="string"?Qn(i):i.toString()).join("|")})$`),e._zod.parse=(i,o)=>{let a=i.value;return r.has(a)||i.issues.push({code:"invalid_value",values:n,input:a,inst:e}),i}}),gg=z("$ZodLiteral",(e,t)=>{if(xe.init(e,t),t.values.length===0)throw new Error("Cannot create literal schema with no valid values");let n=new Set(t.values);e._zod.values=n,e._zod.pattern=new RegExp(`^(${t.values.map(r=>typeof r=="string"?Qn(r):r?Qn(r.toString()):String(r)).join("|")})$`),e._zod.parse=(r,i)=>{let o=r.value;return n.has(o)||r.issues.push({code:"invalid_value",values:t.values,input:o,inst:e}),r}}),yg=z("$ZodFile",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{let i=n.value;return i instanceof File||n.issues.push({expected:"file",code:"invalid_type",input:i,inst:e}),n}}),vg=z("$ZodTransform",(e,t)=>{xe.init(e,t),e._zod.optin="optional",e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Er(e.constructor.name);let i=t.transform(n.value,n);if(r.async)return(i instanceof Promise?i:Promise.resolve(i)).then(a=>(n.value=a,n.fallback=!0,n));if(i instanceof Promise)throw new bi;return n.value=i,n.fallback=!0,n}});function wk(e,t){return t===void 0&&(e.issues.length||e.fallback)?{issues:[],value:void 0}:e}var Cu=z("$ZodOptional",(e,t)=>{xe.init(e,t),e._zod.optin="optional",e._zod.optout="optional",Te(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,void 0]):void 0),Te(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${as(n.source)})?$`):void 0}),e._zod.parse=(n,r)=>{if(t.innerType._zod.optin==="optional"){let i=n.value,o=t.innerType._zod.run(n,r);return o instanceof Promise?o.then(a=>wk(a,i)):wk(o,i)}return n.value===void 0?n:t.innerType._zod.run(n,r)}}),bg=z("$ZodExactOptional",(e,t)=>{Cu.init(e,t),Te(e._zod,"values",()=>t.innerType._zod.values),Te(e._zod,"pattern",()=>t.innerType._zod.pattern),e._zod.parse=(n,r)=>t.innerType._zod.run(n,r)}),xg=z("$ZodNullable",(e,t)=>{xe.init(e,t),Te(e._zod,"optin",()=>t.innerType._zod.optin),Te(e._zod,"optout",()=>t.innerType._zod.optout),Te(e._zod,"pattern",()=>{let n=t.innerType._zod.pattern;return n?new RegExp(`^(${as(n.source)}|null)$`):void 0}),Te(e._zod,"values",()=>t.innerType._zod.values?new Set([...t.innerType._zod.values,null]):void 0),e._zod.parse=(n,r)=>n.value===null?n:t.innerType._zod.run(n,r)}),Sg=z("$ZodDefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",Te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);if(n.value===void 0)return n.value=t.defaultValue,n;let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>_k(o,t)):_k(i,t)}});function _k(e,t){return e.value===void 0&&(e.value=t.defaultValue),e}var kg=z("$ZodPrefault",(e,t)=>{xe.init(e,t),e._zod.optin="optional",Te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>(r.direction==="backward"||n.value===void 0&&(n.value=t.defaultValue),t.innerType._zod.run(n,r))}),wg=z("$ZodNonOptional",(e,t)=>{xe.init(e,t),Te(e._zod,"values",()=>{let n=t.innerType._zod.values;return n?new Set([...n].filter(r=>r!==void 0)):void 0}),e._zod.parse=(n,r)=>{let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>$k(o,e)):$k(i,e)}});function $k(e,t){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t}),e}var _g=z("$ZodSuccess",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Er("ZodSuccess");let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.issues.length===0,n)):(n.value=i.issues.length===0,n)}}),$g=z("$ZodCatch",(e,t)=>{xe.init(e,t),e._zod.optin="optional",Te(e._zod,"optout",()=>t.innerType._zod.optout),Te(e._zod,"values",()=>t.innerType._zod.values),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(o=>(n.value=o.value,o.issues.length&&(n.value=t.catchValue({...n,error:{issues:o.issues.map(a=>fn(a,r,xt()))},input:n.value}),n.issues=[],n.fallback=!0),n)):(n.value=i.value,i.issues.length&&(n.value=t.catchValue({...n,error:{issues:i.issues.map(o=>fn(o,r,xt()))},input:n.value}),n.issues=[],n.fallback=!0),n)}}),zg=z("$ZodNaN",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>((typeof n.value!="number"||!Number.isNaN(n.value))&&n.issues.push({input:n.value,inst:e,expected:"nan",code:"invalid_type"}),n)}),Eu=z("$ZodPipe",(e,t)=>{xe.init(e,t),Te(e._zod,"values",()=>t.in._zod.values),Te(e._zod,"optin",()=>t.in._zod.optin),Te(e._zod,"optout",()=>t.out._zod.optout),Te(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if(r.direction==="backward"){let o=t.out._zod.run(n,r);return o instanceof Promise?o.then(a=>Su(a,t.in,r)):Su(o,t.in,r)}let i=t.in._zod.run(n,r);return i instanceof Promise?i.then(o=>Su(o,t.out,r)):Su(i,t.out,r)}});function Su(e,t,n){return e.issues.length?(e.aborted=!0,e):t._zod.run({value:e.value,issues:e.issues,fallback:e.fallback},n)}var vs=z("$ZodCodec",(e,t)=>{xe.init(e,t),Te(e._zod,"values",()=>t.in._zod.values),Te(e._zod,"optin",()=>t.in._zod.optin),Te(e._zod,"optout",()=>t.out._zod.optout),Te(e._zod,"propValues",()=>t.in._zod.propValues),e._zod.parse=(n,r)=>{if((r.direction||"forward")==="forward"){let o=t.in._zod.run(n,r);return o instanceof Promise?o.then(a=>ku(a,t,r)):ku(o,t,r)}else{let o=t.out._zod.run(n,r);return o instanceof Promise?o.then(a=>ku(a,t,r)):ku(o,t,r)}}});function ku(e,t,n){if(e.issues.length)return e.aborted=!0,e;if((n.direction||"forward")==="forward"){let i=t.transform(e.value,e);return i instanceof Promise?i.then(o=>wu(e,o,t.out,n)):wu(e,i,t.out,n)}else{let i=t.reverseTransform(e.value,e);return i instanceof Promise?i.then(o=>wu(e,o,t.in,n)):wu(e,i,t.in,n)}}function wu(e,t,n,r){return e.issues.length?(e.aborted=!0,e):n._zod.run({value:t,issues:e.issues},r)}var Tg=z("$ZodPreprocess",(e,t)=>{Eu.init(e,t)}),Cg=z("$ZodReadonly",(e,t)=>{xe.init(e,t),Te(e._zod,"propValues",()=>t.innerType._zod.propValues),Te(e._zod,"values",()=>t.innerType._zod.values),Te(e._zod,"optin",()=>t.innerType?._zod?.optin),Te(e._zod,"optout",()=>t.innerType?._zod?.optout),e._zod.parse=(n,r)=>{if(r.direction==="backward")return t.innerType._zod.run(n,r);let i=t.innerType._zod.run(n,r);return i instanceof Promise?i.then(zk):zk(i)}});function zk(e){return e.value=Object.freeze(e.value),e}var Eg=z("$ZodTemplateLiteral",(e,t)=>{xe.init(e,t);let n=[];for(let r of t.parts)if(typeof r=="object"&&r!==null){if(!r._zod.pattern)throw new Error(`Invalid template literal part, no pattern found: ${[...r._zod.traits].shift()}`);let i=r._zod.pattern instanceof RegExp?r._zod.pattern.source:r._zod.pattern;if(!i)throw new Error(`Invalid template literal part: ${r._zod.traits}`);let o=i.startsWith("^")?1:0,a=i.endsWith("$")?i.length-1:i.length;n.push(i.slice(o,a))}else if(r===null||Sh.has(typeof r))n.push(Qn(`${r}`));else throw new Error(`Invalid template literal part: ${r}`);e._zod.pattern=new RegExp(`^${n.join("")}$`),e._zod.parse=(r,i)=>typeof r.value!="string"?(r.issues.push({input:r.value,inst:e,expected:"string",code:"invalid_type"}),r):(e._zod.pattern.lastIndex=0,e._zod.pattern.test(r.value)||r.issues.push({input:r.value,inst:e,code:"invalid_format",format:t.format??"template_literal",pattern:e._zod.pattern.source}),r)}),Ig=z("$ZodFunction",(e,t)=>(xe.init(e,t),e._def=t,e._zod.def=t,e.implement=n=>{if(typeof n!="function")throw new Error("implement() must be called with a function");return function(...r){let i=e._def.input?lu(e._def.input,r):r,o=Reflect.apply(n,this,i);return e._def.output?lu(e._def.output,o):o}},e.implementAsync=n=>{if(typeof n!="function")throw new Error("implementAsync() must be called with a function");return async function(...r){let i=e._def.input?await su(e._def.input,r):r,o=await Reflect.apply(n,this,i);return e._def.output?await su(e._def.output,o):o}},e._zod.parse=(n,r)=>typeof n.value!="function"?(n.issues.push({code:"invalid_type",expected:"function",input:n.value,inst:e}),n):(e._def.output&&e._def.output._zod.def.type==="promise"?n.value=e.implementAsync(n.value):n.value=e.implement(n.value),n),e.input=(...n)=>{let r=e.constructor;return Array.isArray(n[0])?new r({type:"function",input:new Tu({type:"tuple",items:n[0],rest:n[1]}),output:e._def.output}):new r({type:"function",input:n[0],output:e._def.output})},e.output=n=>{let r=e.constructor;return new r({type:"function",input:e._def.input,output:n})},e)),Dg=z("$ZodPromise",(e,t)=>{xe.init(e,t),e._zod.parse=(n,r)=>Promise.resolve(n.value).then(i=>t.innerType._zod.run({value:i,issues:[]},r))}),Ag=z("$ZodLazy",(e,t)=>{xe.init(e,t),Te(e._zod,"innerType",()=>{let n=t;return n._cachedInner||(n._cachedInner=t.getter()),n._cachedInner}),Te(e._zod,"pattern",()=>e._zod.innerType?._zod?.pattern),Te(e._zod,"propValues",()=>e._zod.innerType?._zod?.propValues),Te(e._zod,"optin",()=>e._zod.innerType?._zod?.optin??void 0),Te(e._zod,"optout",()=>e._zod.innerType?._zod?.optout??void 0),e._zod.parse=(n,r)=>e._zod.innerType._zod.run(n,r)}),jg=z("$ZodCustom",(e,t)=>{it.init(e,t),xe.init(e,t),e._zod.parse=(n,r)=>n,e._zod.check=n=>{let r=n.value,i=t.fn(r);if(i instanceof Promise)return i.then(o=>Tk(o,n,r,e));Tk(i,n,r,e)}});function Tk(e,t,n,r){if(!e){let i={code:"custom",input:n,inst:r,path:[...r._zod.def.path??[]],continue:!r._zod.def.abort};r._zod.def.params&&(i.params=r._zod.def.params),t.issues.push(ha(i))}}var xs={};Xi(xs,{ar:()=>jk,az:()=>Ok,be:()=>Uk,bg:()=>Rk,ca:()=>Mk,cs:()=>Bk,da:()=>Lk,de:()=>Pk,el:()=>Zk,en:()=>Iu,eo:()=>Fk,es:()=>Hk,fa:()=>Vk,fi:()=>qk,fr:()=>Gk,frCA:()=>Wk,he:()=>Yk,hr:()=>Jk,hu:()=>Xk,hy:()=>Qk,id:()=>ew,is:()=>tw,it:()=>nw,ja:()=>iw,ka:()=>rw,kh:()=>ow,km:()=>Du,ko:()=>aw,lt:()=>sw,mk:()=>cw,ms:()=>uw,nl:()=>dw,no:()=>fw,ota:()=>mw,pl:()=>pw,ps:()=>hw,pt:()=>gw,ro:()=>yw,ru:()=>bw,sl:()=>xw,sv:()=>Sw,ta:()=>kw,th:()=>ww,tr:()=>_w,ua:()=>$w,uk:()=>Au,ur:()=>zw,uz:()=>Tw,vi:()=>Cw,yo:()=>Dw,zhCN:()=>Ew,zhTW:()=>Iw});var aj=()=>{let e={string:{unit:"\u062D\u0631\u0641",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},file:{unit:"\u0628\u0627\u064A\u062A",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},array:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"},set:{unit:"\u0639\u0646\u0635\u0631",verb:"\u0623\u0646 \u064A\u062D\u0648\u064A"}};function t(i){return e[i]??null}let n={regex:"\u0645\u062F\u062E\u0644",email:"\u0628\u0631\u064A\u062F \u0625\u0644\u0643\u062A\u0631\u0648\u0646\u064A",url:"\u0631\u0627\u0628\u0637",emoji:"\u0625\u064A\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u064A\u062E \u0648\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",date:"\u062A\u0627\u0631\u064A\u062E \u0628\u0645\u0639\u064A\u0627\u0631 ISO",time:"\u0648\u0642\u062A \u0628\u0645\u0639\u064A\u0627\u0631 ISO",duration:"\u0645\u062F\u0629 \u0628\u0645\u0639\u064A\u0627\u0631 ISO",ipv4:"\u0639\u0646\u0648\u0627\u0646 IPv4",ipv6:"\u0639\u0646\u0648\u0627\u0646 IPv6",cidrv4:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv4",cidrv6:"\u0645\u062F\u0649 \u0639\u0646\u0627\u0648\u064A\u0646 \u0628\u0635\u064A\u063A\u0629 IPv6",base64:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64-encoded",base64url:"\u0646\u064E\u0635 \u0628\u062A\u0631\u0645\u064A\u0632 base64url-encoded",json_string:"\u0646\u064E\u0635 \u0639\u0644\u0649 \u0647\u064A\u0626\u0629 JSON",e164:"\u0631\u0642\u0645 \u0647\u0627\u062A\u0641 \u0628\u0645\u0639\u064A\u0627\u0631 E.164",jwt:"JWT",template_literal:"\u0645\u062F\u062E\u0644"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 instanceof ${i.expected}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`:`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${o}\u060C \u0648\u0644\u0643\u0646 \u062A\u0645 \u0625\u062F\u062E\u0627\u0644 ${l}`}case"invalid_value":return i.values.length===1?`\u0645\u062F\u062E\u0644\u0627\u062A \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644\u0629: \u064A\u0641\u062A\u0631\u0636 \u0625\u062F\u062E\u0627\u0644 ${L(i.values[0])}`:`\u0627\u062E\u062A\u064A\u0627\u0631 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062A\u0648\u0642\u0639 \u0627\u0646\u062A\u0642\u0627\u0621 \u0623\u062D\u062F \u0647\u0630\u0647 \u0627\u0644\u062E\u064A\u0627\u0631\u0627\u062A: ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?` \u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"}`:`\u0623\u0643\u0628\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0623\u0646 \u062A\u0643\u0648\u0646 ${i.origin??"\u0627\u0644\u0642\u064A\u0645\u0629"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()} ${a.unit}`:`\u0623\u0635\u063A\u0631 \u0645\u0646 \u0627\u0644\u0644\u0627\u0632\u0645: \u064A\u0641\u062A\u0631\u0636 \u0644\u0640 ${i.origin} \u0623\u0646 \u064A\u0643\u0648\u0646 ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0628\u062F\u0623 \u0628\u0640 "${i.prefix}"`:o.format==="ends_with"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0646\u062A\u0647\u064A \u0628\u0640 "${o.suffix}"`:o.format==="includes"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u062A\u0636\u0645\u0651\u064E\u0646 "${o.includes}"`:o.format==="regex"?`\u0646\u064E\u0635 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0637\u0627\u0628\u0642 \u0627\u0644\u0646\u0645\u0637 ${o.pattern}`:`${n[o.format]??i.format} \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644`}case"not_multiple_of":return`\u0631\u0642\u0645 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644: \u064A\u062C\u0628 \u0623\u0646 \u064A\u0643\u0648\u0646 \u0645\u0646 \u0645\u0636\u0627\u0639\u0641\u0627\u062A ${i.divisor}`;case"unrecognized_keys":return`\u0645\u0639\u0631\u0641${i.keys.length>1?"\u0627\u062A":""} \u063A\u0631\u064A\u0628${i.keys.length>1?"\u0629":""}: ${C(i.keys,"\u060C ")}`;case"invalid_key":return`\u0645\u0639\u0631\u0641 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;case"invalid_union":return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644";case"invalid_element":return`\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644 \u0641\u064A ${i.origin}`;default:return"\u0645\u062F\u062E\u0644 \u063A\u064A\u0631 \u0645\u0642\u0628\u0648\u0644"}}};function jk(){return{localeError:aj()}}var lj=()=>{let e={string:{unit:"simvol",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"element",verb:"olmal\u0131d\u0131r"},set:{unit:"element",verb:"olmal\u0131d\u0131r"}};function t(i){return e[i]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n instanceof ${i.expected}, daxil olan ${l}`:`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${o}, daxil olan ${l}`}case"invalid_value":return i.values.length===1?`Yanl\u0131\u015F d\u0259y\u0259r: g\xF6zl\u0259nil\u0259n ${L(i.values[0])}`:`Yanl\u0131\u015F se\xE7im: a\u015Fa\u011F\u0131dak\u0131lardan biri olmal\u0131d\u0131r: ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()} ${a.unit??"element"}`:`\xC7ox b\xF6y\xFCk: g\xF6zl\u0259nil\u0259n ${i.origin??"d\u0259y\u0259r"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\xC7ox ki\xE7ik: g\xF6zl\u0259nil\u0259n ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Yanl\u0131\u015F m\u0259tn: "${o.prefix}" il\u0259 ba\u015Flamal\u0131d\u0131r`:o.format==="ends_with"?`Yanl\u0131\u015F m\u0259tn: "${o.suffix}" il\u0259 bitm\u0259lidir`:o.format==="includes"?`Yanl\u0131\u015F m\u0259tn: "${o.includes}" daxil olmal\u0131d\u0131r`:o.format==="regex"?`Yanl\u0131\u015F m\u0259tn: ${o.pattern} \u015Fablonuna uy\u011Fun olmal\u0131d\u0131r`:`Yanl\u0131\u015F ${n[o.format]??i.format}`}case"not_multiple_of":return`Yanl\u0131\u015F \u0259d\u0259d: ${i.divisor} il\u0259 b\xF6l\xFCn\u0259 bil\u0259n olmal\u0131d\u0131r`;case"unrecognized_keys":return`Tan\u0131nmayan a\xE7ar${i.keys.length>1?"lar":""}: ${C(i.keys,", ")}`;case"invalid_key":return`${i.origin} daxilind\u0259 yanl\u0131\u015F a\xE7ar`;case"invalid_union":return"Yanl\u0131\u015F d\u0259y\u0259r";case"invalid_element":return`${i.origin} daxilind\u0259 yanl\u0131\u015F d\u0259y\u0259r`;default:return"Yanl\u0131\u015F d\u0259y\u0259r"}}};function Ok(){return{localeError:lj()}}function Nk(e,t,n,r){let i=Math.abs(e),o=i%10,a=i%100;return a>=11&&a<=19?r:o===1?t:o>=2&&o<=4?n:r}var sj=()=>{let e={string:{unit:{one:"\u0441\u0456\u043C\u0432\u0430\u043B",few:"\u0441\u0456\u043C\u0432\u0430\u043B\u044B",many:"\u0441\u0456\u043C\u0432\u0430\u043B\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u044B",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u044B",many:"\u0431\u0430\u0439\u0442\u0430\u045E"},verb:"\u043C\u0435\u0446\u044C"}};function t(i){return e[i]??null}let n={regex:"\u0443\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0430\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0456 \u0447\u0430\u0441",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0447\u0430\u0441",duration:"ISO \u043F\u0440\u0430\u0446\u044F\u0433\u043B\u0430\u0441\u0446\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0430\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0430\u0441",cidrv4:"IPv4 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u044B\u044F\u043F\u0430\u0437\u043E\u043D",base64:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64",base64url:"\u0440\u0430\u0434\u043E\u043A \u0443 \u0444\u0430\u0440\u043C\u0430\u0446\u0435 base64url",json_string:"JSON \u0440\u0430\u0434\u043E\u043A",e164:"\u043D\u0443\u043C\u0430\u0440 E.164",jwt:"JWT",template_literal:"\u0443\u0432\u043E\u0434"},r={nan:"NaN",number:"\u043B\u0456\u043A",array:"\u043C\u0430\u0441\u0456\u045E"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F instanceof ${i.expected}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u045E\u0441\u044F ${o}, \u0430\u0442\u0440\u044B\u043C\u0430\u043D\u0430 ${l}`}case"invalid_value":return i.values.length===1?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F ${L(i.values[0])}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0432\u0430\u0440\u044B\u044F\u043D\u0442: \u0447\u0430\u043A\u0430\u045E\u0441\u044F \u0430\u0434\u0437\u0456\u043D \u0437 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);if(a){let l=Number(i.maximum),c=Nk(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${i.maximum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u0432\u044F\u043B\u0456\u043A\u0456: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435"} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);if(a){let l=Number(i.minimum),c=Nk(l,a.unit.one,a.unit.few,a.unit.many);return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 ${a.verb} ${o}${i.minimum.toString()} ${c}`}return`\u0417\u0430\u043D\u0430\u0434\u0442\u0430 \u043C\u0430\u043B\u044B: \u0447\u0430\u043A\u0430\u043B\u0430\u0441\u044F, \u0448\u0442\u043E ${i.origin} \u043F\u0430\u0432\u0456\u043D\u043D\u0430 \u0431\u044B\u0446\u044C ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u043F\u0430\u0447\u044B\u043D\u0430\u0446\u0446\u0430 \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u0430\u043A\u0430\u043D\u0447\u0432\u0430\u0446\u0446\u0430 \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0437\u043C\u044F\u0448\u0447\u0430\u0446\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u0440\u0430\u0434\u043E\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0430\u0434\u043F\u0430\u0432\u044F\u0434\u0430\u0446\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043B\u0456\u043A: \u043F\u0430\u0432\u0456\u043D\u0435\u043D \u0431\u044B\u0446\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u0430\u0437\u043D\u0430\u043D\u044B ${i.keys.length>1?"\u043A\u043B\u044E\u0447\u044B":"\u043A\u043B\u044E\u0447"}: ${C(i.keys,", ")}`;case"invalid_key":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434";case"invalid_element":return`\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u0430\u0435 \u0437\u043D\u0430\u0447\u044D\u043D\u043D\u0435 \u045E ${i.origin}`;default:return"\u041D\u044F\u043F\u0440\u0430\u0432\u0456\u043B\u044C\u043D\u044B \u045E\u0432\u043E\u0434"}}};function Uk(){return{localeError:sj()}}var cj=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},file:{unit:"\u0431\u0430\u0439\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430",verb:"\u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430"}};function t(i){return e[i]??null}let n={regex:"\u0432\u0445\u043E\u0434",email:"\u0438\u043C\u0435\u0439\u043B \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0436\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u043F\u0440\u043E\u0434\u044A\u043B\u0436\u0438\u0442\u0435\u043B\u043D\u043E\u0441\u0442",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"base64-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",base64url:"base64url-\u043A\u043E\u0434\u0438\u0440\u0430\u043D \u043D\u0438\u0437",json_string:"JSON \u043D\u0438\u0437",e164:"E.164 \u043D\u043E\u043C\u0435\u0440",jwt:"JWT",template_literal:"\u0432\u0445\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D ${l}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434: \u043E\u0447\u0430\u043A\u0432\u0430\u043D ${L(i.values[0])}`:`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u043E\u043F\u0446\u0438\u044F: \u043E\u0447\u0430\u043A\u0432\u0430\u043D\u043E \u0435\u0434\u043D\u043E \u043E\u0442 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0430"}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u0433\u043E\u043B\u044F\u043C\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin??"\u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442"} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0441\u044A\u0434\u044A\u0440\u0436\u0430 ${o}${i.minimum.toString()} ${a.unit}`:`\u0422\u0432\u044A\u0440\u0434\u0435 \u043C\u0430\u043B\u043A\u043E: \u043E\u0447\u0430\u043A\u0432\u0430 \u0441\u0435 ${i.origin} \u0434\u0430 \u0431\u044A\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;if(o.format==="starts_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u0432\u0430 \u0441 "${o.prefix}"`;if(o.format==="ends_with")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0437\u0430\u0432\u044A\u0440\u0448\u0432\u0430 \u0441 "${o.suffix}"`;if(o.format==="includes")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0432\u043A\u043B\u044E\u0447\u0432\u0430 "${o.includes}"`;if(o.format==="regex")return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043D\u0438\u0437: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0441\u044A\u0432\u043F\u0430\u0434\u0430 \u0441 ${o.pattern}`;let a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D";return o.format==="emoji"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="datetime"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="date"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),o.format==="time"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E"),o.format==="duration"&&(a="\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430"),`${a} ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u043E \u0447\u0438\u0441\u043B\u043E: \u0442\u0440\u044F\u0431\u0432\u0430 \u0434\u0430 \u0431\u044A\u0434\u0435 \u043A\u0440\u0430\u0442\u043D\u043E \u043D\u0430 ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0437\u043F\u043E\u0437\u043D\u0430\u0442${i.keys.length>1?"\u0438":""} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u043E\u0432\u0435":""}: ${C(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434";case"invalid_element":return`\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u043D\u0430 \u0441\u0442\u043E\u0439\u043D\u043E\u0441\u0442 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0430\u043B\u0438\u0434\u0435\u043D \u0432\u0445\u043E\u0434"}}};function Rk(){return{localeError:cj()}}var uj=()=>{let e={string:{unit:"car\xE0cters",verb:"contenir"},file:{unit:"bytes",verb:"contenir"},array:{unit:"elements",verb:"contenir"},set:{unit:"elements",verb:"contenir"}};function t(i){return e[i]??null}let n={regex:"entrada",email:"adre\xE7a electr\xF2nica",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i hora ISO",date:"data ISO",time:"hora ISO",duration:"durada ISO",ipv4:"adre\xE7a IPv4",ipv6:"adre\xE7a IPv6",cidrv4:"rang IPv4",cidrv6:"rang IPv6",base64:"cadena codificada en base64",base64url:"cadena codificada en base64url",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Tipus inv\xE0lid: s'esperava instanceof ${i.expected}, s'ha rebut ${l}`:`Tipus inv\xE0lid: s'esperava ${o}, s'ha rebut ${l}`}case"invalid_value":return i.values.length===1?`Valor inv\xE0lid: s'esperava ${L(i.values[0])}`:`Opci\xF3 inv\xE0lida: s'esperava una de ${C(i.values," o ")}`;case"too_big":{let o=i.inclusive?"com a m\xE0xim":"menys de",a=t(i.origin);return a?`Massa gran: s'esperava que ${i.origin??"el valor"} contingu\xE9s ${o} ${i.maximum.toString()} ${a.unit??"elements"}`:`Massa gran: s'esperava que ${i.origin??"el valor"} fos ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"com a m\xEDnim":"m\xE9s de",a=t(i.origin);return a?`Massa petit: s'esperava que ${i.origin} contingu\xE9s ${o} ${i.minimum.toString()} ${a.unit}`:`Massa petit: s'esperava que ${i.origin} fos ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Format inv\xE0lid: ha de comen\xE7ar amb "${o.prefix}"`:o.format==="ends_with"?`Format inv\xE0lid: ha d'acabar amb "${o.suffix}"`:o.format==="includes"?`Format inv\xE0lid: ha d'incloure "${o.includes}"`:o.format==="regex"?`Format inv\xE0lid: ha de coincidir amb el patr\xF3 ${o.pattern}`:`Format inv\xE0lid per a ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE0lid: ha de ser m\xFAltiple de ${i.divisor}`;case"unrecognized_keys":return`Clau${i.keys.length>1?"s":""} no reconeguda${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Clau inv\xE0lida a ${i.origin}`;case"invalid_union":return"Entrada inv\xE0lida";case"invalid_element":return`Element inv\xE0lid a ${i.origin}`;default:return"Entrada inv\xE0lida"}}};function Mk(){return{localeError:uj()}}var dj=()=>{let e={string:{unit:"znak\u016F",verb:"m\xEDt"},file:{unit:"bajt\u016F",verb:"m\xEDt"},array:{unit:"prvk\u016F",verb:"m\xEDt"},set:{unit:"prvk\u016F",verb:"m\xEDt"}};function t(i){return e[i]??null}let n={regex:"regul\xE1rn\xED v\xFDraz",email:"e-mailov\xE1 adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"datum a \u010Das ve form\xE1tu ISO",date:"datum ve form\xE1tu ISO",time:"\u010Das ve form\xE1tu ISO",duration:"doba trv\xE1n\xED ISO",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"rozsah IPv4",cidrv6:"rozsah IPv6",base64:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64",base64url:"\u0159et\u011Bzec zak\xF3dovan\xFD ve form\xE1tu base64url",json_string:"\u0159et\u011Bzec ve form\xE1tu JSON",e164:"\u010D\xEDslo E.164",jwt:"JWT",template_literal:"vstup"},r={nan:"NaN",number:"\u010D\xEDslo",string:"\u0159et\u011Bzec",function:"funkce",array:"pole"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no instanceof ${i.expected}, obdr\u017Eeno ${l}`:`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${o}, obdr\u017Eeno ${l}`}case"invalid_value":return i.values.length===1?`Neplatn\xFD vstup: o\u010Dek\xE1v\xE1no ${L(i.values[0])}`:`Neplatn\xE1 mo\u017Enost: o\u010Dek\xE1v\xE1na jedna z hodnot ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.maximum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 velk\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED m\xEDt ${o}${i.minimum.toString()} ${a.unit??"prvk\u016F"}`:`Hodnota je p\u0159\xEDli\u0161 mal\xE1: ${i.origin??"hodnota"} mus\xED b\xFDt ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED za\u010D\xEDnat na "${o.prefix}"`:o.format==="ends_with"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED kon\u010Dit na "${o.suffix}"`:o.format==="includes"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED obsahovat "${o.includes}"`:o.format==="regex"?`Neplatn\xFD \u0159et\u011Bzec: mus\xED odpov\xEDdat vzoru ${o.pattern}`:`Neplatn\xFD form\xE1t ${n[o.format]??i.format}`}case"not_multiple_of":return`Neplatn\xE9 \u010D\xEDslo: mus\xED b\xFDt n\xE1sobkem ${i.divisor}`;case"unrecognized_keys":return`Nezn\xE1m\xE9 kl\xED\u010De: ${C(i.keys,", ")}`;case"invalid_key":return`Neplatn\xFD kl\xED\u010D v ${i.origin}`;case"invalid_union":return"Neplatn\xFD vstup";case"invalid_element":return`Neplatn\xE1 hodnota v ${i.origin}`;default:return"Neplatn\xFD vstup"}}};function Bk(){return{localeError:dj()}}var fj=()=>{let e={string:{unit:"tegn",verb:"havde"},file:{unit:"bytes",verb:"havde"},array:{unit:"elementer",verb:"indeholdt"},set:{unit:"elementer",verb:"indeholdt"}};function t(i){return e[i]??null}let n={regex:"input",email:"e-mailadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkesl\xE6t",date:"ISO-dato",time:"ISO-klokkesl\xE6t",duration:"ISO-varighed",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodet streng",base64url:"base64url-kodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",string:"streng",number:"tal",boolean:"boolean",array:"liste",object:"objekt",set:"s\xE6t",file:"fil"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ugyldigt input: forventede instanceof ${i.expected}, fik ${l}`:`Ugyldigt input: forventede ${o}, fik ${l}`}case"invalid_value":return i.values.length===1?`Ugyldig v\xE6rdi: forventede ${L(i.values[0])}`:`Ugyldigt valg: forventede en af f\xF8lgende ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin),l=r[i.origin]??i.origin;return a?`For stor: forventede ${l??"value"} ${a.verb} ${o} ${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor: forventede ${l??"value"} havde ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin),l=r[i.origin]??i.origin;return a?`For lille: forventede ${l} ${a.verb} ${o} ${i.minimum.toString()} ${a.unit}`:`For lille: forventede ${l} havde ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: skal starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: skal ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: skal indeholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: skal matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldigt tal: skal v\xE6re deleligt med ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukendte n\xF8gler":"Ukendt n\xF8gle"}: ${C(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8gle i ${i.origin}`;case"invalid_union":return"Ugyldigt input: matcher ingen af de tilladte typer";case"invalid_element":return`Ugyldig v\xE6rdi i ${i.origin}`;default:return"Ugyldigt input"}}};function Lk(){return{localeError:fj()}}var mj=()=>{let e={string:{unit:"Zeichen",verb:"zu haben"},file:{unit:"Bytes",verb:"zu haben"},array:{unit:"Elemente",verb:"zu haben"},set:{unit:"Elemente",verb:"zu haben"}};function t(i){return e[i]??null}let n={regex:"Eingabe",email:"E-Mail-Adresse",url:"URL",emoji:"Emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-Datum und -Uhrzeit",date:"ISO-Datum",time:"ISO-Uhrzeit",duration:"ISO-Dauer",ipv4:"IPv4-Adresse",ipv6:"IPv6-Adresse",cidrv4:"IPv4-Bereich",cidrv6:"IPv6-Bereich",base64:"Base64-codierter String",base64url:"Base64-URL-codierter String",json_string:"JSON-String",e164:"E.164-Nummer",jwt:"JWT",template_literal:"Eingabe"},r={nan:"NaN",number:"Zahl",array:"Array"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ung\xFCltige Eingabe: erwartet instanceof ${i.expected}, erhalten ${l}`:`Ung\xFCltige Eingabe: erwartet ${o}, erhalten ${l}`}case"invalid_value":return i.values.length===1?`Ung\xFCltige Eingabe: erwartet ${L(i.values[0])}`:`Ung\xFCltige Option: erwartet eine von ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ${a.unit??"Elemente"} hat`:`Zu gro\xDF: erwartet, dass ${i.origin??"Wert"} ${o}${i.maximum.toString()} ist`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ${a.unit} hat`:`Zu klein: erwartet, dass ${i.origin} ${o}${i.minimum.toString()} ist`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ung\xFCltiger String: muss mit "${o.prefix}" beginnen`:o.format==="ends_with"?`Ung\xFCltiger String: muss mit "${o.suffix}" enden`:o.format==="includes"?`Ung\xFCltiger String: muss "${o.includes}" enthalten`:o.format==="regex"?`Ung\xFCltiger String: muss dem Muster ${o.pattern} entsprechen`:`Ung\xFCltig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ung\xFCltige Zahl: muss ein Vielfaches von ${i.divisor} sein`;case"unrecognized_keys":return`${i.keys.length>1?"Unbekannte Schl\xFCssel":"Unbekannter Schl\xFCssel"}: ${C(i.keys,", ")}`;case"invalid_key":return`Ung\xFCltiger Schl\xFCssel in ${i.origin}`;case"invalid_union":return"Ung\xFCltige Eingabe";case"invalid_element":return`Ung\xFCltiger Wert in ${i.origin}`;default:return"Ung\xFCltige Eingabe"}}};function Pk(){return{localeError:mj()}}var hj=()=>{let e={string:{unit:"\u03C7\u03B1\u03C1\u03B1\u03BA\u03C4\u03AE\u03C1\u03B5\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},file:{unit:"bytes",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},array:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},set:{unit:"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"},map:{unit:"\u03BA\u03B1\u03C4\u03B1\u03C7\u03C9\u03C1\u03AE\u03C3\u03B5\u03B9\u03C2",verb:"\u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9"}};function t(i){return e[i]??null}let n={regex:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2",email:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1 \u03BA\u03B1\u03B9 \u03CE\u03C1\u03B1",date:"ISO \u03B7\u03BC\u03B5\u03C1\u03BF\u03BC\u03B7\u03BD\u03AF\u03B1",time:"ISO \u03CE\u03C1\u03B1",duration:"ISO \u03B4\u03B9\u03AC\u03C1\u03BA\u03B5\u03B9\u03B1",ipv4:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv4",ipv6:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 IPv6",mac:"\u03B4\u03B9\u03B5\u03CD\u03B8\u03C5\u03BD\u03C3\u03B7 MAC",cidrv4:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv4",cidrv6:"\u03B5\u03CD\u03C1\u03BF\u03C2 IPv6",base64:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64",base64url:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC \u03BA\u03C9\u03B4\u03B9\u03BA\u03BF\u03C0\u03BF\u03B9\u03B7\u03BC\u03AD\u03BD\u03B7 \u03C3\u03B5 base64url",json_string:"\u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC JSON",e164:"\u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2 E.164",jwt:"JWT",template_literal:"\u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return typeof i.expected=="string"&&/^[A-Z]/.test(i.expected)?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD instanceof ${i.expected}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${o}, \u03BB\u03AE\u03C6\u03B8\u03B7\u03BA\u03B5 ${l}`}case"invalid_value":return i.values.length===1?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${L(i.values[0])}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03C0\u03B9\u03BB\u03BF\u03B3\u03AE: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD \u03AD\u03BD\u03B1 \u03B1\u03C0\u03CC ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${i.maximum.toString()} ${a.unit??"\u03C3\u03C4\u03BF\u03B9\u03C7\u03B5\u03AF\u03B1"}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B5\u03B3\u03AC\u03BB\u03BF: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin??"\u03C4\u03B9\u03BC\u03AE"} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03AD\u03C7\u03B5\u03B9 ${o}${i.minimum.toString()} ${a.unit}`:`\u03A0\u03BF\u03BB\u03CD \u03BC\u03B9\u03BA\u03C1\u03CC: \u03B1\u03BD\u03B1\u03BC\u03B5\u03BD\u03CC\u03C4\u03B1\u03BD ${i.origin} \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03BE\u03B5\u03BA\u03B9\u03BD\u03AC \u03BC\u03B5 "${o.prefix}"`:o.format==="ends_with"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B5\u03BB\u03B5\u03B9\u03CE\u03BD\u03B5\u03B9 \u03BC\u03B5 "${o.suffix}"`:o.format==="includes"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C0\u03B5\u03C1\u03B9\u03AD\u03C7\u03B5\u03B9 "${o.includes}"`:o.format==="regex"?`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C3\u03C5\u03BC\u03B2\u03BF\u03BB\u03BF\u03C3\u03B5\u03B9\u03C1\u03AC: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03C4\u03B1\u03B9\u03C1\u03B9\u03AC\u03B6\u03B5\u03B9 \u03BC\u03B5 \u03C4\u03BF \u03BC\u03BF\u03C4\u03AF\u03B2\u03BF ${o.pattern}`:`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF: ${n[o.format]??i.format}`}case"not_multiple_of":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF\u03C2 \u03B1\u03C1\u03B9\u03B8\u03BC\u03CC\u03C2: \u03C0\u03C1\u03AD\u03C0\u03B5\u03B9 \u03BD\u03B1 \u03B5\u03AF\u03BD\u03B1\u03B9 \u03C0\u03BF\u03BB\u03BB\u03B1\u03C0\u03BB\u03AC\u03C3\u03B9\u03BF \u03C4\u03BF\u03C5 ${i.divisor}`;case"unrecognized_keys":return`\u0386\u03B3\u03BD\u03C9\u03C3\u03C4${i.keys.length>1?"\u03B1":"\u03BF"} \u03BA\u03BB\u03B5\u03B9\u03B4${i.keys.length>1?"\u03B9\u03AC":"\u03AF"}: ${C(i.keys,", ")}`;case"invalid_key":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03BF \u03BA\u03BB\u03B5\u03B9\u03B4\u03AF \u03C3\u03C4\u03BF ${i.origin}`;case"invalid_union":return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2";case"invalid_element":return`\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03C4\u03B9\u03BC\u03AE \u03C3\u03C4\u03BF ${i.origin}`;default:return"\u039C\u03B7 \u03AD\u03B3\u03BA\u03C5\u03C1\u03B7 \u03B5\u03AF\u03C3\u03BF\u03B4\u03BF\u03C2"}}};function Zk(){return{localeError:hj()}}var pj=()=>{let e={string:{unit:"characters",verb:"to have"},file:{unit:"bytes",verb:"to have"},array:{unit:"items",verb:"to have"},set:{unit:"items",verb:"to have"},map:{unit:"entries",verb:"to have"}};function t(i){return e[i]??null}let n={regex:"input",email:"email address",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datetime",date:"ISO date",time:"ISO time",duration:"ISO duration",ipv4:"IPv4 address",ipv6:"IPv6 address",mac:"MAC address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded string",base64url:"base64url-encoded string",json_string:"JSON string",e164:"E.164 number",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return`Invalid input: expected ${o}, received ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${L(i.values[0])}`:`Invalid option: expected one of ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Too big: expected ${i.origin??"value"} to have ${o}${i.maximum.toString()} ${a.unit??"elements"}`:`Too big: expected ${i.origin??"value"} to be ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Too small: expected ${i.origin} to have ${o}${i.minimum.toString()} ${a.unit}`:`Too small: expected ${i.origin} to be ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Invalid string: must start with "${o.prefix}"`:o.format==="ends_with"?`Invalid string: must end with "${o.suffix}"`:o.format==="includes"?`Invalid string: must include "${o.includes}"`:o.format==="regex"?`Invalid string: must match pattern ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`Invalid number: must be a multiple of ${i.divisor}`;case"unrecognized_keys":return`Unrecognized key${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Invalid key in ${i.origin}`;case"invalid_union":return i.options&&Array.isArray(i.options)&&i.options.length>0?`Invalid discriminator value. Expected ${i.options.map(a=>`'${a}'`).join(" | ")}`:"Invalid input";case"invalid_element":return`Invalid value in ${i.origin}`;default:return"Invalid input"}}};function Iu(){return{localeError:pj()}}var gj=()=>{let e={string:{unit:"karaktrojn",verb:"havi"},file:{unit:"bajtojn",verb:"havi"},array:{unit:"elementojn",verb:"havi"},set:{unit:"elementojn",verb:"havi"}};function t(i){return e[i]??null}let n={regex:"enigo",email:"retadreso",url:"URL",emoji:"emo\u011Dio",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datotempo",date:"ISO-dato",time:"ISO-tempo",duration:"ISO-da\u016Dro",ipv4:"IPv4-adreso",ipv6:"IPv6-adreso",cidrv4:"IPv4-rango",cidrv6:"IPv6-rango",base64:"64-ume kodita karaktraro",base64url:"URL-64-ume kodita karaktraro",json_string:"JSON-karaktraro",e164:"E.164-nombro",jwt:"JWT",template_literal:"enigo"},r={nan:"NaN",number:"nombro",array:"tabelo",null:"senvalora"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Nevalida enigo: atendi\u011Dis instanceof ${i.expected}, ricevi\u011Dis ${l}`:`Nevalida enigo: atendi\u011Dis ${o}, ricevi\u011Dis ${l}`}case"invalid_value":return i.values.length===1?`Nevalida enigo: atendi\u011Dis ${L(i.values[0])}`:`Nevalida opcio: atendi\u011Dis unu el ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()} ${a.unit??"elementojn"}`:`Tro granda: atendi\u011Dis ke ${i.origin??"valoro"} havu ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Tro malgranda: atendi\u011Dis ke ${i.origin} havu ${o}${i.minimum.toString()} ${a.unit}`:`Tro malgranda: atendi\u011Dis ke ${i.origin} estu ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nevalida karaktraro: devas komenci\u011Di per "${o.prefix}"`:o.format==="ends_with"?`Nevalida karaktraro: devas fini\u011Di per "${o.suffix}"`:o.format==="includes"?`Nevalida karaktraro: devas inkluzivi "${o.includes}"`:o.format==="regex"?`Nevalida karaktraro: devas kongrui kun la modelo ${o.pattern}`:`Nevalida ${n[o.format]??i.format}`}case"not_multiple_of":return`Nevalida nombro: devas esti oblo de ${i.divisor}`;case"unrecognized_keys":return`Nekonata${i.keys.length>1?"j":""} \u015Dlosilo${i.keys.length>1?"j":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Nevalida \u015Dlosilo en ${i.origin}`;case"invalid_union":return"Nevalida enigo";case"invalid_element":return`Nevalida valoro en ${i.origin}`;default:return"Nevalida enigo"}}};function Fk(){return{localeError:gj()}}var yj=()=>{let e={string:{unit:"caracteres",verb:"tener"},file:{unit:"bytes",verb:"tener"},array:{unit:"elementos",verb:"tener"},set:{unit:"elementos",verb:"tener"}};function t(i){return e[i]??null}let n={regex:"entrada",email:"direcci\xF3n de correo electr\xF3nico",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"fecha y hora ISO",date:"fecha ISO",time:"hora ISO",duration:"duraci\xF3n ISO",ipv4:"direcci\xF3n IPv4",ipv6:"direcci\xF3n IPv6",cidrv4:"rango IPv4",cidrv6:"rango IPv6",base64:"cadena codificada en base64",base64url:"URL codificada en base64",json_string:"cadena JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",string:"texto",number:"n\xFAmero",boolean:"booleano",array:"arreglo",object:"objeto",set:"conjunto",file:"archivo",date:"fecha",bigint:"n\xFAmero grande",symbol:"s\xEDmbolo",undefined:"indefinido",null:"nulo",function:"funci\xF3n",map:"mapa",record:"registro",tuple:"tupla",enum:"enumeraci\xF3n",union:"uni\xF3n",literal:"literal",promise:"promesa",void:"vac\xEDo",never:"nunca",unknown:"desconocido",any:"cualquiera"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entrada inv\xE1lida: se esperaba instanceof ${i.expected}, recibido ${l}`:`Entrada inv\xE1lida: se esperaba ${o}, recibido ${l}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: se esperaba ${L(i.values[0])}`:`Opci\xF3n inv\xE1lida: se esperaba una de ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin),l=r[i.origin]??i.origin;return a?`Demasiado grande: se esperaba que ${l??"valor"} tuviera ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Demasiado grande: se esperaba que ${l??"valor"} fuera ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin),l=r[i.origin]??i.origin;return a?`Demasiado peque\xF1o: se esperaba que ${l} tuviera ${o}${i.minimum.toString()} ${a.unit}`:`Demasiado peque\xF1o: se esperaba que ${l} fuera ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cadena inv\xE1lida: debe comenzar con "${o.prefix}"`:o.format==="ends_with"?`Cadena inv\xE1lida: debe terminar en "${o.suffix}"`:o.format==="includes"?`Cadena inv\xE1lida: debe incluir "${o.includes}"`:o.format==="regex"?`Cadena inv\xE1lida: debe coincidir con el patr\xF3n ${o.pattern}`:`Inv\xE1lido ${n[o.format]??i.format}`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: debe ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Llave${i.keys.length>1?"s":""} desconocida${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Llave inv\xE1lida en ${r[i.origin]??i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido en ${r[i.origin]??i.origin}`;default:return"Entrada inv\xE1lida"}}};function Hk(){return{localeError:yj()}}var vj=()=>{let e={string:{unit:"\u06A9\u0627\u0631\u0627\u06A9\u062A\u0631",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},file:{unit:"\u0628\u0627\u06CC\u062A",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},array:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"},set:{unit:"\u0622\u06CC\u062A\u0645",verb:"\u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F"}};function t(i){return e[i]??null}let n={regex:"\u0648\u0631\u0648\u062F\u06CC",email:"\u0622\u062F\u0631\u0633 \u0627\u06CC\u0645\u06CC\u0644",url:"URL",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u062A\u0627\u0631\u06CC\u062E \u0648 \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",date:"\u062A\u0627\u0631\u06CC\u062E \u0627\u06CC\u0632\u0648",time:"\u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",duration:"\u0645\u062F\u062A \u0632\u0645\u0627\u0646 \u0627\u06CC\u0632\u0648",ipv4:"IPv4 \u0622\u062F\u0631\u0633",ipv6:"IPv6 \u0622\u062F\u0631\u0633",cidrv4:"IPv4 \u062F\u0627\u0645\u0646\u0647",cidrv6:"IPv6 \u062F\u0627\u0645\u0646\u0647",base64:"base64-encoded \u0631\u0634\u062A\u0647",base64url:"base64url-encoded \u0631\u0634\u062A\u0647",json_string:"JSON \u0631\u0634\u062A\u0647",e164:"E.164 \u0639\u062F\u062F",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u06CC"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0622\u0631\u0627\u06CC\u0647"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A instanceof ${i.expected} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`:`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${o} \u0645\u06CC\u200C\u0628\u0648\u062F\u060C ${l} \u062F\u0631\u06CC\u0627\u0641\u062A \u0634\u062F`}case"invalid_value":return i.values.length===1?`\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A ${L(i.values[0])} \u0645\u06CC\u200C\u0628\u0648\u062F`:`\u06AF\u0632\u06CC\u0646\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0645\u06CC\u200C\u0628\u0627\u06CC\u0633\u062A \u06CC\u06A9\u06CC \u0627\u0632 ${C(i.values,"|")} \u0645\u06CC\u200C\u0628\u0648\u062F`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631"} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u0628\u0632\u0631\u06AF: ${i.origin??"\u0645\u0642\u062F\u0627\u0631"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0628\u0627\u0634\u062F`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${a.unit} \u0628\u0627\u0634\u062F`:`\u062E\u06CC\u0644\u06CC \u06A9\u0648\u0686\u06A9: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0628\u0627\u0634\u062F`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.prefix}" \u0634\u0631\u0648\u0639 \u0634\u0648\u062F`:o.format==="ends_with"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 "${o.suffix}" \u062A\u0645\u0627\u0645 \u0634\u0648\u062F`:o.format==="includes"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0634\u0627\u0645\u0644 "${o.includes}" \u0628\u0627\u0634\u062F`:o.format==="regex"?`\u0631\u0634\u062A\u0647 \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0628\u0627 \u0627\u0644\u06AF\u0648\u06CC ${o.pattern} \u0645\u0637\u0627\u0628\u0642\u062A \u062F\u0627\u0634\u062A\u0647 \u0628\u0627\u0634\u062F`:`${n[o.format]??i.format} \u0646\u0627\u0645\u0639\u062A\u0628\u0631`}case"not_multiple_of":return`\u0639\u062F\u062F \u0646\u0627\u0645\u0639\u062A\u0628\u0631: \u0628\u0627\u06CC\u062F \u0645\u0636\u0631\u0628 ${i.divisor} \u0628\u0627\u0634\u062F`;case"unrecognized_keys":return`\u06A9\u0644\u06CC\u062F${i.keys.length>1?"\u0647\u0627\u06CC":""} \u0646\u0627\u0634\u0646\u0627\u0633: ${C(i.keys,", ")}`;case"invalid_key":return`\u06A9\u0644\u06CC\u062F \u0646\u0627\u0634\u0646\u0627\u0633 \u062F\u0631 ${i.origin}`;case"invalid_union":return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631";case"invalid_element":return`\u0645\u0642\u062F\u0627\u0631 \u0646\u0627\u0645\u0639\u062A\u0628\u0631 \u062F\u0631 ${i.origin}`;default:return"\u0648\u0631\u0648\u062F\u06CC \u0646\u0627\u0645\u0639\u062A\u0628\u0631"}}};function Vk(){return{localeError:vj()}}var bj=()=>{let e={string:{unit:"merkki\xE4",subject:"merkkijonon"},file:{unit:"tavua",subject:"tiedoston"},array:{unit:"alkiota",subject:"listan"},set:{unit:"alkiota",subject:"joukon"},number:{unit:"",subject:"luvun"},bigint:{unit:"",subject:"suuren kokonaisluvun"},int:{unit:"",subject:"kokonaisluvun"},date:{unit:"",subject:"p\xE4iv\xE4m\xE4\xE4r\xE4n"}};function t(i){return e[i]??null}let n={regex:"s\xE4\xE4nn\xF6llinen lauseke",email:"s\xE4hk\xF6postiosoite",url:"URL-osoite",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-aikaleima",date:"ISO-p\xE4iv\xE4m\xE4\xE4r\xE4",time:"ISO-aika",duration:"ISO-kesto",ipv4:"IPv4-osoite",ipv6:"IPv6-osoite",cidrv4:"IPv4-alue",cidrv6:"IPv6-alue",base64:"base64-koodattu merkkijono",base64url:"base64url-koodattu merkkijono",json_string:"JSON-merkkijono",e164:"E.164-luku",jwt:"JWT",template_literal:"templaattimerkkijono"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Virheellinen tyyppi: odotettiin instanceof ${i.expected}, oli ${l}`:`Virheellinen tyyppi: odotettiin ${o}, oli ${l}`}case"invalid_value":return i.values.length===1?`Virheellinen sy\xF6te: t\xE4ytyy olla ${L(i.values[0])}`:`Virheellinen valinta: t\xE4ytyy olla yksi seuraavista: ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Liian suuri: ${a.subject} t\xE4ytyy olla ${o}${i.maximum.toString()} ${a.unit}`.trim():`Liian suuri: arvon t\xE4ytyy olla ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Liian pieni: ${a.subject} t\xE4ytyy olla ${o}${i.minimum.toString()} ${a.unit}`.trim():`Liian pieni: arvon t\xE4ytyy olla ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Virheellinen sy\xF6te: t\xE4ytyy alkaa "${o.prefix}"`:o.format==="ends_with"?`Virheellinen sy\xF6te: t\xE4ytyy loppua "${o.suffix}"`:o.format==="includes"?`Virheellinen sy\xF6te: t\xE4ytyy sis\xE4lt\xE4\xE4 "${o.includes}"`:o.format==="regex"?`Virheellinen sy\xF6te: t\xE4ytyy vastata s\xE4\xE4nn\xF6llist\xE4 lauseketta ${o.pattern}`:`Virheellinen ${n[o.format]??i.format}`}case"not_multiple_of":return`Virheellinen luku: t\xE4ytyy olla luvun ${i.divisor} monikerta`;case"unrecognized_keys":return`${i.keys.length>1?"Tuntemattomat avaimet":"Tuntematon avain"}: ${C(i.keys,", ")}`;case"invalid_key":return"Virheellinen avain tietueessa";case"invalid_union":return"Virheellinen unioni";case"invalid_element":return"Virheellinen arvo joukossa";default:return"Virheellinen sy\xF6te"}}};function qk(){return{localeError:bj()}}var xj=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let n={regex:"entr\xE9e",email:"adresse e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date et heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={string:"cha\xEEne",number:"nombre",int:"entier",boolean:"bool\xE9en",bigint:"grand entier",symbol:"symbole",undefined:"ind\xE9fini",null:"null",never:"jamais",void:"vide",date:"date",array:"tableau",object:"objet",tuple:"tuple",record:"enregistrement",map:"carte",set:"ensemble",file:"fichier",nonoptional:"non-optionnel",nan:"NaN",function:"fonction"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : instanceof ${i.expected} attendu, ${l} re\xE7u`:`Entr\xE9e invalide : ${o} attendu, ${l} re\xE7u`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : ${L(i.values[0])} attendu`:`Option invalide : une valeur parmi ${C(i.values,"|")} attendue`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Trop grand : ${r[i.origin]??"valeur"} doit ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"\xE9l\xE9ment(s)"}`:`Trop grand : ${r[i.origin]??"valeur"} doit \xEAtre ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Trop petit : ${r[i.origin]??"valeur"} doit ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : ${r[i.origin]??"valeur"} doit \xEAtre ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au mod\xE8le ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${C(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function Gk(){return{localeError:xj()}}var Sj=()=>{let e={string:{unit:"caract\xE8res",verb:"avoir"},file:{unit:"octets",verb:"avoir"},array:{unit:"\xE9l\xE9ments",verb:"avoir"},set:{unit:"\xE9l\xE9ments",verb:"avoir"}};function t(i){return e[i]??null}let n={regex:"entr\xE9e",email:"adresse courriel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"date-heure ISO",date:"date ISO",time:"heure ISO",duration:"dur\xE9e ISO",ipv4:"adresse IPv4",ipv6:"adresse IPv6",cidrv4:"plage IPv4",cidrv6:"plage IPv6",base64:"cha\xEEne encod\xE9e en base64",base64url:"cha\xEEne encod\xE9e en base64url",json_string:"cha\xEEne JSON",e164:"num\xE9ro E.164",jwt:"JWT",template_literal:"entr\xE9e"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Entr\xE9e invalide : attendu instanceof ${i.expected}, re\xE7u ${l}`:`Entr\xE9e invalide : attendu ${o}, re\xE7u ${l}`}case"invalid_value":return i.values.length===1?`Entr\xE9e invalide : attendu ${L(i.values[0])}`:`Option invalide : attendu l'une des valeurs suivantes ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u2264":"<",a=t(i.origin);return a?`Trop grand : attendu que ${i.origin??"la valeur"} ait ${o}${i.maximum.toString()} ${a.unit}`:`Trop grand : attendu que ${i.origin??"la valeur"} soit ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u2265":">",a=t(i.origin);return a?`Trop petit : attendu que ${i.origin} ait ${o}${i.minimum.toString()} ${a.unit}`:`Trop petit : attendu que ${i.origin} soit ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Cha\xEEne invalide : doit commencer par "${o.prefix}"`:o.format==="ends_with"?`Cha\xEEne invalide : doit se terminer par "${o.suffix}"`:o.format==="includes"?`Cha\xEEne invalide : doit inclure "${o.includes}"`:o.format==="regex"?`Cha\xEEne invalide : doit correspondre au motif ${o.pattern}`:`${n[o.format]??i.format} invalide`}case"not_multiple_of":return`Nombre invalide : doit \xEAtre un multiple de ${i.divisor}`;case"unrecognized_keys":return`Cl\xE9${i.keys.length>1?"s":""} non reconnue${i.keys.length>1?"s":""} : ${C(i.keys,", ")}`;case"invalid_key":return`Cl\xE9 invalide dans ${i.origin}`;case"invalid_union":return"Entr\xE9e invalide";case"invalid_element":return`Valeur invalide dans ${i.origin}`;default:return"Entr\xE9e invalide"}}};function Wk(){return{localeError:Sj()}}var kj=()=>{let e={string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA",gender:"f"},number:{label:"\u05DE\u05E1\u05E4\u05E8",gender:"m"},boolean:{label:"\u05E2\u05E8\u05DA \u05D1\u05D5\u05DC\u05D9\u05D0\u05E0\u05D9",gender:"m"},bigint:{label:"BigInt",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA",gender:"m"},array:{label:"\u05DE\u05E2\u05E8\u05DA",gender:"m"},object:{label:"\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8",gender:"m"},null:{label:"\u05E2\u05E8\u05DA \u05E8\u05D9\u05E7 (null)",gender:"m"},undefined:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05DE\u05D5\u05D2\u05D3\u05E8 (undefined)",gender:"m"},symbol:{label:"\u05E1\u05D9\u05DE\u05D1\u05D5\u05DC (Symbol)",gender:"m"},function:{label:"\u05E4\u05D5\u05E0\u05E7\u05E6\u05D9\u05D4",gender:"f"},map:{label:"\u05DE\u05E4\u05D4 (Map)",gender:"f"},set:{label:"\u05E7\u05D1\u05D5\u05E6\u05D4 (Set)",gender:"f"},file:{label:"\u05E7\u05D5\u05D1\u05E5",gender:"m"},promise:{label:"Promise",gender:"m"},NaN:{label:"NaN",gender:"m"},unknown:{label:"\u05E2\u05E8\u05DA \u05DC\u05D0 \u05D9\u05D3\u05D5\u05E2",gender:"m"},value:{label:"\u05E2\u05E8\u05DA",gender:"m"}},t={string:{unit:"\u05EA\u05D5\u05D5\u05D9\u05DD",shortLabel:"\u05E7\u05E6\u05E8",longLabel:"\u05D0\u05E8\u05D5\u05DA"},file:{unit:"\u05D1\u05D9\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},array:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},set:{unit:"\u05E4\u05E8\u05D9\u05D8\u05D9\u05DD",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"},number:{unit:"",shortLabel:"\u05E7\u05D8\u05DF",longLabel:"\u05D2\u05D3\u05D5\u05DC"}},n=u=>u?e[u]:void 0,r=u=>{let d=n(u);return d?d.label:u??e.unknown.label},i=u=>`\u05D4${r(u)}`,o=u=>(n(u)?.gender??"m")==="f"?"\u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05D9\u05D5\u05EA":"\u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA",a=u=>u?t[u]??null:null,l={regex:{label:"\u05E7\u05DC\u05D8",gender:"m"},email:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05D0\u05D9\u05DE\u05D9\u05D9\u05DC",gender:"f"},url:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA \u05E8\u05E9\u05EA",gender:"f"},emoji:{label:"\u05D0\u05D9\u05DE\u05D5\u05D2'\u05D9",gender:"m"},uuid:{label:"UUID",gender:"m"},nanoid:{label:"nanoid",gender:"m"},guid:{label:"GUID",gender:"m"},cuid:{label:"cuid",gender:"m"},cuid2:{label:"cuid2",gender:"m"},ulid:{label:"ULID",gender:"m"},xid:{label:"XID",gender:"m"},ksuid:{label:"KSUID",gender:"m"},datetime:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA \u05D5\u05D6\u05DE\u05DF ISO",gender:"m"},date:{label:"\u05EA\u05D0\u05E8\u05D9\u05DA ISO",gender:"m"},time:{label:"\u05D6\u05DE\u05DF ISO",gender:"m"},duration:{label:"\u05DE\u05E9\u05DA \u05D6\u05DE\u05DF ISO",gender:"m"},ipv4:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv4",gender:"f"},ipv6:{label:"\u05DB\u05EA\u05D5\u05D1\u05EA IPv6",gender:"f"},cidrv4:{label:"\u05D8\u05D5\u05D5\u05D7 IPv4",gender:"m"},cidrv6:{label:"\u05D8\u05D5\u05D5\u05D7 IPv6",gender:"m"},base64:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64",gender:"f"},base64url:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D1\u05D1\u05E1\u05D9\u05E1 64 \u05DC\u05DB\u05EA\u05D5\u05D1\u05D5\u05EA \u05E8\u05E9\u05EA",gender:"f"},json_string:{label:"\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA JSON",gender:"f"},e164:{label:"\u05DE\u05E1\u05E4\u05E8 E.164",gender:"m"},jwt:{label:"JWT",gender:"m"},ends_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},includes:{label:"\u05E7\u05DC\u05D8",gender:"m"},lowercase:{label:"\u05E7\u05DC\u05D8",gender:"m"},starts_with:{label:"\u05E7\u05DC\u05D8",gender:"m"},uppercase:{label:"\u05E7\u05DC\u05D8",gender:"m"}},c={nan:"NaN"};return u=>{switch(u.code){case"invalid_type":{let d=u.expected,m=c[d??""]??r(d),h=P(u.input),f=c[h]??e[h]?.label??h;return/^[A-Z]/.test(u.expected)?`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA instanceof ${u.expected}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`:`\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${m}, \u05D4\u05EA\u05E7\u05D1\u05DC ${f}`}case"invalid_value":{if(u.values.length===1)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05E2\u05E8\u05DA \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA ${L(u.values[0])}`;let d=u.values.map(f=>L(f));if(u.values.length===2)return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d[0]} \u05D0\u05D5 ${d[1]}`;let m=d[d.length-1];return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D4\u05D0\u05E4\u05E9\u05E8\u05D5\u05D9\u05D5\u05EA \u05D4\u05DE\u05EA\u05D0\u05D9\u05DE\u05D5\u05EA \u05D4\u05DF ${d.slice(0,-1).join(", ")} \u05D0\u05D5 ${m}`}case"too_big":{let d=a(u.origin),m=i(u.origin??"value");if(u.origin==="string")return`${d?.longLabel??"\u05D0\u05E8\u05D5\u05DA"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.maximum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA":"\u05DC\u05DB\u05DC \u05D4\u05D9\u05D5\u05EA\u05E8"}`.trim();if(u.origin==="number"){let v=u.inclusive?`\u05E7\u05D8\u05DF \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.maximum}`:`\u05E7\u05D8\u05DF \u05DE-${u.maximum}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(u.origin==="array"||u.origin==="set"){let v=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA",k=u.inclusive?`${u.maximum} ${d?.unit??""} \u05D0\u05D5 \u05E4\u05D7\u05D5\u05EA`:`\u05E4\u05D7\u05D5\u05EA \u05DE-${u.maximum} ${d?.unit??""}`;return`\u05D2\u05D3\u05D5\u05DC \u05DE\u05D3\u05D9: ${m} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${k}`.trim()}let h=u.inclusive?"<=":"<",f=o(u.origin??"value");return d?.unit?`${d.longLabel} \u05DE\u05D3\u05D9: ${m} ${f} ${h}${u.maximum.toString()} ${d.unit}`:`${d?.longLabel??"\u05D2\u05D3\u05D5\u05DC"} \u05DE\u05D3\u05D9: ${m} ${f} ${h}${u.maximum.toString()}`}case"too_small":{let d=a(u.origin),m=i(u.origin??"value");if(u.origin==="string")return`${d?.shortLabel??"\u05E7\u05E6\u05E8"} \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DB\u05D4 \u05DC\u05D4\u05DB\u05D9\u05DC ${u.minimum.toString()} ${d?.unit??""} ${u.inclusive?"\u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8":"\u05DC\u05E4\u05D7\u05D5\u05EA"}`.trim();if(u.origin==="number"){let v=u.inclusive?`\u05D2\u05D3\u05D5\u05DC \u05D0\u05D5 \u05E9\u05D5\u05D5\u05D4 \u05DC-${u.minimum}`:`\u05D2\u05D3\u05D5\u05DC \u05DE-${u.minimum}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} \u05E6\u05E8\u05D9\u05DA \u05DC\u05D4\u05D9\u05D5\u05EA ${v}`}if(u.origin==="array"||u.origin==="set"){let v=u.origin==="set"?"\u05E6\u05E8\u05D9\u05DB\u05D4":"\u05E6\u05E8\u05D9\u05DA";if(u.minimum===1&&u.inclusive){let D=(u.origin==="set","\u05DC\u05E4\u05D7\u05D5\u05EA \u05E4\u05E8\u05D9\u05D8 \u05D0\u05D7\u05D3");return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${D}`}let k=u.inclusive?`${u.minimum} ${d?.unit??""} \u05D0\u05D5 \u05D9\u05D5\u05EA\u05E8`:`\u05D9\u05D5\u05EA\u05E8 \u05DE-${u.minimum} ${d?.unit??""}`;return`\u05E7\u05D8\u05DF \u05DE\u05D3\u05D9: ${m} ${v} \u05DC\u05D4\u05DB\u05D9\u05DC ${k}`.trim()}let h=u.inclusive?">=":">",f=o(u.origin??"value");return d?.unit?`${d.shortLabel} \u05DE\u05D3\u05D9: ${m} ${f} ${h}${u.minimum.toString()} ${d.unit}`:`${d?.shortLabel??"\u05E7\u05D8\u05DF"} \u05DE\u05D3\u05D9: ${m} ${f} ${h}${u.minimum.toString()}`}case"invalid_format":{let d=u;if(d.format==="starts_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D7\u05D9\u05DC \u05D1 "${d.prefix}"`;if(d.format==="ends_with")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05E1\u05EA\u05D9\u05D9\u05DD \u05D1 "${d.suffix}"`;if(d.format==="includes")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05DB\u05DC\u05D5\u05DC "${d.includes}"`;if(d.format==="regex")return`\u05D4\u05DE\u05D7\u05E8\u05D5\u05D6\u05EA \u05D7\u05D9\u05D9\u05D1\u05EA \u05DC\u05D4\u05EA\u05D0\u05D9\u05DD \u05DC\u05EA\u05D1\u05E0\u05D9\u05EA ${d.pattern}`;let m=l[d.format],h=m?.label??d.format,v=(m?.gender??"m")==="f"?"\u05EA\u05E7\u05D9\u05E0\u05D4":"\u05EA\u05E7\u05D9\u05DF";return`${h} \u05DC\u05D0 ${v}`}case"not_multiple_of":return`\u05DE\u05E1\u05E4\u05E8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF: \u05D7\u05D9\u05D9\u05D1 \u05DC\u05D4\u05D9\u05D5\u05EA \u05DE\u05DB\u05E4\u05DC\u05D4 \u05E9\u05DC ${u.divisor}`;case"unrecognized_keys":return`\u05DE\u05E4\u05EA\u05D7${u.keys.length>1?"\u05D5\u05EA":""} \u05DC\u05D0 \u05DE\u05D6\u05D5\u05D4${u.keys.length>1?"\u05D9\u05DD":"\u05D4"}: ${C(u.keys,", ")}`;case"invalid_key":return"\u05E9\u05D3\u05D4 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1\u05D0\u05D5\u05D1\u05D9\u05D9\u05E7\u05D8";case"invalid_union":return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF";case"invalid_element":return`\u05E2\u05E8\u05DA \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF \u05D1${i(u.origin??"array")}`;default:return"\u05E7\u05DC\u05D8 \u05DC\u05D0 \u05EA\u05E7\u05D9\u05DF"}}};function Yk(){return{localeError:kj()}}var wj=()=>{let e={string:{unit:"znakova",verb:"imati"},file:{unit:"bajtova",verb:"imati"},array:{unit:"stavki",verb:"imati"},set:{unit:"stavki",verb:"imati"}};function t(i){return e[i]??null}let n={regex:"unos",email:"email adresa",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum i vrijeme",date:"ISO datum",time:"ISO vrijeme",duration:"ISO trajanje",ipv4:"IPv4 adresa",ipv6:"IPv6 adresa",cidrv4:"IPv4 raspon",cidrv6:"IPv6 raspon",base64:"base64 kodirani tekst",base64url:"base64url kodirani tekst",json_string:"JSON tekst",e164:"E.164 broj",jwt:"JWT",template_literal:"unos"},r={nan:"NaN",string:"tekst",number:"broj",boolean:"boolean",array:"niz",object:"objekt",set:"skup",file:"datoteka",date:"datum",bigint:"bigint",symbol:"simbol",undefined:"undefined",null:"null",function:"funkcija",map:"mapa"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neispravan unos: o\u010Dekuje se instanceof ${i.expected}, a primljeno je ${l}`:`Neispravan unos: o\u010Dekuje se ${o}, a primljeno je ${l}`}case"invalid_value":return i.values.length===1?`Neispravna vrijednost: o\u010Dekivano ${L(i.values[0])}`:`Neispravna opcija: o\u010Dekivano jedno od ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin),l=r[i.origin]??i.origin;return a?`Preveliko: o\u010Dekivano da ${l??"vrijednost"} ima ${o}${i.maximum.toString()} ${a.unit??"elemenata"}`:`Preveliko: o\u010Dekivano da ${l??"vrijednost"} bude ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin),l=r[i.origin]??i.origin;return a?`Premalo: o\u010Dekivano da ${l} ima ${o}${i.minimum.toString()} ${a.unit}`:`Premalo: o\u010Dekivano da ${l} bude ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neispravan tekst: mora zapo\u010Dinjati s "${o.prefix}"`:o.format==="ends_with"?`Neispravan tekst: mora zavr\u0161avati s "${o.suffix}"`:o.format==="includes"?`Neispravan tekst: mora sadr\u017Eavati "${o.includes}"`:o.format==="regex"?`Neispravan tekst: mora odgovarati uzorku ${o.pattern}`:`Neispravna ${n[o.format]??i.format}`}case"not_multiple_of":return`Neispravan broj: mora biti vi\u0161ekratnik od ${i.divisor}`;case"unrecognized_keys":return`Neprepoznat${i.keys.length>1?"i klju\u010Devi":" klju\u010D"}: ${C(i.keys,", ")}`;case"invalid_key":return`Neispravan klju\u010D u ${r[i.origin]??i.origin}`;case"invalid_union":return"Neispravan unos";case"invalid_element":return`Neispravna vrijednost u ${r[i.origin]??i.origin}`;default:return"Neispravan unos"}}};function Jk(){return{localeError:wj()}}var _j=()=>{let e={string:{unit:"karakter",verb:"legyen"},file:{unit:"byte",verb:"legyen"},array:{unit:"elem",verb:"legyen"},set:{unit:"elem",verb:"legyen"}};function t(i){return e[i]??null}let n={regex:"bemenet",email:"email c\xEDm",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO id\u0151b\xE9lyeg",date:"ISO d\xE1tum",time:"ISO id\u0151",duration:"ISO id\u0151intervallum",ipv4:"IPv4 c\xEDm",ipv6:"IPv6 c\xEDm",cidrv4:"IPv4 tartom\xE1ny",cidrv6:"IPv6 tartom\xE1ny",base64:"base64-k\xF3dolt string",base64url:"base64url-k\xF3dolt string",json_string:"JSON string",e164:"E.164 sz\xE1m",jwt:"JWT",template_literal:"bemenet"},r={nan:"NaN",number:"sz\xE1m",array:"t\xF6mb"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k instanceof ${i.expected}, a kapott \xE9rt\xE9k ${l}`:`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${o}, a kapott \xE9rt\xE9k ${l}`}case"invalid_value":return i.values.length===1?`\xC9rv\xE9nytelen bemenet: a v\xE1rt \xE9rt\xE9k ${L(i.values[0])}`:`\xC9rv\xE9nytelen opci\xF3: valamelyik \xE9rt\xE9k v\xE1rt ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`T\xFAl nagy: ${i.origin??"\xE9rt\xE9k"} m\xE9rete t\xFAl nagy ${o}${i.maximum.toString()} ${a.unit??"elem"}`:`T\xFAl nagy: a bemeneti \xE9rt\xE9k ${i.origin??"\xE9rt\xE9k"} t\xFAl nagy: ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} m\xE9rete t\xFAl kicsi ${o}${i.minimum.toString()} ${a.unit}`:`T\xFAl kicsi: a bemeneti \xE9rt\xE9k ${i.origin} t\xFAl kicsi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xC9rv\xE9nytelen string: "${o.prefix}" \xE9rt\xE9kkel kell kezd\u0151dnie`:o.format==="ends_with"?`\xC9rv\xE9nytelen string: "${o.suffix}" \xE9rt\xE9kkel kell v\xE9gz\u0151dnie`:o.format==="includes"?`\xC9rv\xE9nytelen string: "${o.includes}" \xE9rt\xE9ket kell tartalmaznia`:o.format==="regex"?`\xC9rv\xE9nytelen string: ${o.pattern} mint\xE1nak kell megfelelnie`:`\xC9rv\xE9nytelen ${n[o.format]??i.format}`}case"not_multiple_of":return`\xC9rv\xE9nytelen sz\xE1m: ${i.divisor} t\xF6bbsz\xF6r\xF6s\xE9nek kell lennie`;case"unrecognized_keys":return`Ismeretlen kulcs${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`\xC9rv\xE9nytelen kulcs ${i.origin}`;case"invalid_union":return"\xC9rv\xE9nytelen bemenet";case"invalid_element":return`\xC9rv\xE9nytelen \xE9rt\xE9k: ${i.origin}`;default:return"\xC9rv\xE9nytelen bemenet"}}};function Xk(){return{localeError:_j()}}function Kk(e,t,n){return Math.abs(e)===1?t:n}function xa(e){if(!e)return"";let t=["\u0561","\u0565","\u0568","\u056B","\u0578","\u0578\u0582","\u0585"],n=e[e.length-1];return e+(t.includes(n)?"\u0576":"\u0568")}var $j=()=>{let e={string:{unit:{one:"\u0576\u0577\u0561\u0576",many:"\u0576\u0577\u0561\u0576\u0576\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},file:{unit:{one:"\u0562\u0561\u0575\u0569",many:"\u0562\u0561\u0575\u0569\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},array:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"},set:{unit:{one:"\u057F\u0561\u0580\u0580",many:"\u057F\u0561\u0580\u0580\u0565\u0580"},verb:"\u0578\u0582\u0576\u0565\u0576\u0561\u056C"}};function t(i){return e[i]??null}let n={regex:"\u0574\u0578\u0582\u057F\u0584",email:"\u0567\u056C. \u0570\u0561\u057D\u0581\u0565",url:"URL",emoji:"\u0567\u0574\u0578\u057B\u056B",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E \u0587 \u056A\u0561\u0574",date:"ISO \u0561\u0574\u057D\u0561\u0569\u056B\u057E",time:"ISO \u056A\u0561\u0574",duration:"ISO \u057F\u0587\u0578\u0572\u0578\u0582\u0569\u0575\u0578\u0582\u0576",ipv4:"IPv4 \u0570\u0561\u057D\u0581\u0565",ipv6:"IPv6 \u0570\u0561\u057D\u0581\u0565",cidrv4:"IPv4 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",cidrv6:"IPv6 \u0574\u056B\u057B\u0561\u056F\u0561\u0575\u0584",base64:"base64 \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",base64url:"base64url \u0571\u0587\u0561\u0579\u0561\u0583\u0578\u057E \u057F\u0578\u0572",json_string:"JSON \u057F\u0578\u0572",e164:"E.164 \u0570\u0561\u0574\u0561\u0580",jwt:"JWT",template_literal:"\u0574\u0578\u0582\u057F\u0584"},r={nan:"NaN",number:"\u0569\u056B\u057E",array:"\u0566\u0561\u0576\u0563\u057E\u0561\u056E"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 instanceof ${i.expected}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`:`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${o}, \u057D\u057F\u0561\u0581\u057E\u0565\u056C \u0567 ${l}`}case"invalid_value":return i.values.length===1?`\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 ${L(i.values[1])}`:`\u054D\u056D\u0561\u056C \u057F\u0561\u0580\u0562\u0565\u0580\u0561\u056F\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567\u0580 \u0570\u0565\u057F\u0587\u0575\u0561\u056C\u0576\u0565\u0580\u056B\u0581 \u0574\u0565\u056F\u0568\u055D ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);if(a){let l=Number(i.maximum),c=Kk(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xa(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.maximum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0574\u0565\u056E \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xa(i.origin??"\u0561\u0580\u056A\u0565\u0584")} \u056C\u056B\u0576\u056B ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);if(a){let l=Number(i.minimum),c=Kk(l,a.unit.one,a.unit.many);return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xa(i.origin)} \u056F\u0578\u0582\u0576\u0565\u0576\u0561 ${o}${i.minimum.toString()} ${c}`}return`\u0549\u0561\u0583\u0561\u0566\u0561\u0576\u0581 \u0583\u0578\u0584\u0580 \u0561\u0580\u056A\u0565\u0584\u2024 \u057D\u057A\u0561\u057D\u057E\u0578\u0582\u0574 \u0567, \u0578\u0580 ${xa(i.origin)} \u056C\u056B\u0576\u056B ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057D\u056F\u057D\u057E\u056B "${o.prefix}"-\u0578\u057E`:o.format==="ends_with"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0561\u057E\u0561\u0580\u057F\u057E\u056B "${o.suffix}"-\u0578\u057E`:o.format==="includes"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u057A\u0561\u0580\u0578\u0582\u0576\u0561\u056F\u056B "${o.includes}"`:o.format==="regex"?`\u054D\u056D\u0561\u056C \u057F\u0578\u0572\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0570\u0561\u0574\u0561\u057A\u0561\u057F\u0561\u057D\u056D\u0561\u0576\u056B ${o.pattern} \u0571\u0587\u0561\u0579\u0561\u0583\u056B\u0576`:`\u054D\u056D\u0561\u056C ${n[o.format]??i.format}`}case"not_multiple_of":return`\u054D\u056D\u0561\u056C \u0569\u056B\u057E\u2024 \u057A\u0565\u057F\u0584 \u0567 \u0562\u0561\u0566\u0574\u0561\u057A\u0561\u057F\u056B\u056F \u056C\u056B\u0576\u056B ${i.divisor}-\u056B`;case"unrecognized_keys":return`\u0549\u0573\u0561\u0576\u0561\u0579\u057E\u0561\u056E \u0562\u0561\u0576\u0561\u056C\u056B${i.keys.length>1?"\u0576\u0565\u0580":""}. ${C(i.keys,", ")}`;case"invalid_key":return`\u054D\u056D\u0561\u056C \u0562\u0561\u0576\u0561\u056C\u056B ${xa(i.origin)}-\u0578\u0582\u0574`;case"invalid_union":return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574";case"invalid_element":return`\u054D\u056D\u0561\u056C \u0561\u0580\u056A\u0565\u0584 ${xa(i.origin)}-\u0578\u0582\u0574`;default:return"\u054D\u056D\u0561\u056C \u0574\u0578\u0582\u057F\u0584\u0561\u0563\u0580\u0578\u0582\u0574"}}};function Qk(){return{localeError:$j()}}var zj=()=>{let e={string:{unit:"karakter",verb:"memiliki"},file:{unit:"byte",verb:"memiliki"},array:{unit:"item",verb:"memiliki"},set:{unit:"item",verb:"memiliki"}};function t(i){return e[i]??null}let n={regex:"input",email:"alamat email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tanggal dan waktu format ISO",date:"tanggal format ISO",time:"jam format ISO",duration:"durasi format ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"rentang alamat IPv4",cidrv6:"rentang alamat IPv6",base64:"string dengan enkode base64",base64url:"string dengan enkode base64url",json_string:"string JSON",e164:"angka E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input tidak valid: diharapkan instanceof ${i.expected}, diterima ${l}`:`Input tidak valid: diharapkan ${o}, diterima ${l}`}case"invalid_value":return i.values.length===1?`Input tidak valid: diharapkan ${L(i.values[0])}`:`Pilihan tidak valid: diharapkan salah satu dari ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Terlalu besar: diharapkan ${i.origin??"value"} memiliki ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: diharapkan ${i.origin??"value"} menjadi ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Terlalu kecil: diharapkan ${i.origin} memiliki ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: diharapkan ${i.origin} menjadi ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak valid: harus dimulai dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak valid: harus berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak valid: harus menyertakan "${o.includes}"`:o.format==="regex"?`String tidak valid: harus sesuai pola ${o.pattern}`:`${n[o.format]??i.format} tidak valid`}case"not_multiple_of":return`Angka tidak valid: harus kelipatan dari ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali ${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Kunci tidak valid di ${i.origin}`;case"invalid_union":return"Input tidak valid";case"invalid_element":return`Nilai tidak valid di ${i.origin}`;default:return"Input tidak valid"}}};function ew(){return{localeError:zj()}}var Tj=()=>{let e={string:{unit:"stafi",verb:"a\xF0 hafa"},file:{unit:"b\xE6ti",verb:"a\xF0 hafa"},array:{unit:"hluti",verb:"a\xF0 hafa"},set:{unit:"hluti",verb:"a\xF0 hafa"}};function t(i){return e[i]??null}let n={regex:"gildi",email:"netfang",url:"vefsl\xF3\xF0",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dagsetning og t\xEDmi",date:"ISO dagsetning",time:"ISO t\xEDmi",duration:"ISO t\xEDmalengd",ipv4:"IPv4 address",ipv6:"IPv6 address",cidrv4:"IPv4 range",cidrv6:"IPv6 range",base64:"base64-encoded strengur",base64url:"base64url-encoded strengur",json_string:"JSON strengur",e164:"E.164 t\xF6lugildi",jwt:"JWT",template_literal:"gildi"},r={nan:"NaN",number:"n\xFAmer",array:"fylki"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera instanceof ${i.expected}`:`Rangt gildi: \xDE\xFA sl\xF3st inn ${l} \xFEar sem \xE1 a\xF0 vera ${o}`}case"invalid_value":return i.values.length===1?`Rangt gildi: gert r\xE1\xF0 fyrir ${L(i.values[0])}`:`\xD3gilt val: m\xE1 vera eitt af eftirfarandi ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} hafi ${o}${i.maximum.toString()} ${a.unit??"hluti"}`:`Of st\xF3rt: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin??"gildi"} s\xE9 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} hafi ${o}${i.minimum.toString()} ${a.unit}`:`Of l\xEDti\xF0: gert er r\xE1\xF0 fyrir a\xF0 ${i.origin} s\xE9 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 byrja \xE1 "${o.prefix}"`:o.format==="ends_with"?`\xD3gildur strengur: ver\xF0ur a\xF0 enda \xE1 "${o.suffix}"`:o.format==="includes"?`\xD3gildur strengur: ver\xF0ur a\xF0 innihalda "${o.includes}"`:o.format==="regex"?`\xD3gildur strengur: ver\xF0ur a\xF0 fylgja mynstri ${o.pattern}`:`Rangt ${n[o.format]??i.format}`}case"not_multiple_of":return`R\xF6ng tala: ver\xF0ur a\xF0 vera margfeldi af ${i.divisor}`;case"unrecognized_keys":return`\xD3\xFEekkt ${i.keys.length>1?"ir lyklar":"ur lykill"}: ${C(i.keys,", ")}`;case"invalid_key":return`Rangur lykill \xED ${i.origin}`;case"invalid_union":return"Rangt gildi";case"invalid_element":return`Rangt gildi \xED ${i.origin}`;default:return"Rangt gildi"}}};function tw(){return{localeError:Tj()}}var Cj=()=>{let e={string:{unit:"caratteri",verb:"avere"},file:{unit:"byte",verb:"avere"},array:{unit:"elementi",verb:"avere"},set:{unit:"elementi",verb:"avere"}};function t(i){return e[i]??null}let n={regex:"input",email:"indirizzo email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e ora ISO",date:"data ISO",time:"ora ISO",duration:"durata ISO",ipv4:"indirizzo IPv4",ipv6:"indirizzo IPv6",cidrv4:"intervallo IPv4",cidrv6:"intervallo IPv6",base64:"stringa codificata in base64",base64url:"URL codificata in base64",json_string:"stringa JSON",e164:"numero E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"numero",array:"vettore"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input non valido: atteso instanceof ${i.expected}, ricevuto ${l}`:`Input non valido: atteso ${o}, ricevuto ${l}`}case"invalid_value":return i.values.length===1?`Input non valido: atteso ${L(i.values[0])}`:`Opzione non valida: atteso uno tra ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Troppo grande: ${i.origin??"valore"} deve avere ${o}${i.maximum.toString()} ${a.unit??"elementi"}`:`Troppo grande: ${i.origin??"valore"} deve essere ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Troppo piccolo: ${i.origin} deve avere ${o}${i.minimum.toString()} ${a.unit}`:`Troppo piccolo: ${i.origin} deve essere ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Stringa non valida: deve iniziare con "${o.prefix}"`:o.format==="ends_with"?`Stringa non valida: deve terminare con "${o.suffix}"`:o.format==="includes"?`Stringa non valida: deve includere "${o.includes}"`:o.format==="regex"?`Stringa non valida: deve corrispondere al pattern ${o.pattern}`:`Input non valido: ${n[o.format]??i.format}`}case"not_multiple_of":return`Numero non valido: deve essere un multiplo di ${i.divisor}`;case"unrecognized_keys":return`Chiav${i.keys.length>1?"i":"e"} non riconosciut${i.keys.length>1?"e":"a"}: ${C(i.keys,", ")}`;case"invalid_key":return`Chiave non valida in ${i.origin}`;case"invalid_union":return"Input non valido";case"invalid_element":return`Valore non valido in ${i.origin}`;default:return"Input non valido"}}};function nw(){return{localeError:Cj()}}var Ej=()=>{let e={string:{unit:"\u6587\u5B57",verb:"\u3067\u3042\u308B"},file:{unit:"\u30D0\u30A4\u30C8",verb:"\u3067\u3042\u308B"},array:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"},set:{unit:"\u8981\u7D20",verb:"\u3067\u3042\u308B"}};function t(i){return e[i]??null}let n={regex:"\u5165\u529B\u5024",email:"\u30E1\u30FC\u30EB\u30A2\u30C9\u30EC\u30B9",url:"URL",emoji:"\u7D75\u6587\u5B57",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u6642",date:"ISO\u65E5\u4ED8",time:"ISO\u6642\u523B",duration:"ISO\u671F\u9593",ipv4:"IPv4\u30A2\u30C9\u30EC\u30B9",ipv6:"IPv6\u30A2\u30C9\u30EC\u30B9",cidrv4:"IPv4\u7BC4\u56F2",cidrv6:"IPv6\u7BC4\u56F2",base64:"base64\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",base64url:"base64url\u30A8\u30F3\u30B3\u30FC\u30C9\u6587\u5B57\u5217",json_string:"JSON\u6587\u5B57\u5217",e164:"E.164\u756A\u53F7",jwt:"JWT",template_literal:"\u5165\u529B\u5024"},r={nan:"NaN",number:"\u6570\u5024",array:"\u914D\u5217"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u7121\u52B9\u306A\u5165\u529B: instanceof ${i.expected}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u5165\u529B: ${o}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F\u304C\u3001${l}\u304C\u5165\u529B\u3055\u308C\u307E\u3057\u305F`}case"invalid_value":return i.values.length===1?`\u7121\u52B9\u306A\u5165\u529B: ${L(i.values[0])}\u304C\u671F\u5F85\u3055\u308C\u307E\u3057\u305F`:`\u7121\u52B9\u306A\u9078\u629E: ${C(i.values,"\u3001")}\u306E\u3044\u305A\u308C\u304B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"too_big":{let o=i.inclusive?"\u4EE5\u4E0B\u3067\u3042\u308B":"\u3088\u308A\u5C0F\u3055\u3044",a=t(i.origin);return a?`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${a.unit??"\u8981\u7D20"}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5927\u304D\u3059\u304E\u308B\u5024: ${i.origin??"\u5024"}\u306F${i.maximum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"too_small":{let o=i.inclusive?"\u4EE5\u4E0A\u3067\u3042\u308B":"\u3088\u308A\u5927\u304D\u3044",a=t(i.origin);return a?`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${a.unit}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u5C0F\u3055\u3059\u304E\u308B\u5024: ${i.origin}\u306F${i.minimum.toString()}${o}\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.prefix}"\u3067\u59CB\u307E\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="ends_with"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.suffix}"\u3067\u7D42\u308F\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="includes"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: "${o.includes}"\u3092\u542B\u3080\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:o.format==="regex"?`\u7121\u52B9\u306A\u6587\u5B57\u5217: \u30D1\u30BF\u30FC\u30F3${o.pattern}\u306B\u4E00\u81F4\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`:`\u7121\u52B9\u306A${n[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u52B9\u306A\u6570\u5024: ${i.divisor}\u306E\u500D\u6570\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059`;case"unrecognized_keys":return`\u8A8D\u8B58\u3055\u308C\u3066\u3044\u306A\u3044\u30AD\u30FC${i.keys.length>1?"\u7FA4":""}: ${C(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u30AD\u30FC`;case"invalid_union":return"\u7121\u52B9\u306A\u5165\u529B";case"invalid_element":return`${i.origin}\u5185\u306E\u7121\u52B9\u306A\u5024`;default:return"\u7121\u52B9\u306A\u5165\u529B"}}};function iw(){return{localeError:Ej()}}var Ij=()=>{let e={string:{unit:"\u10E1\u10D8\u10DB\u10D1\u10DD\u10DA\u10DD",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},file:{unit:"\u10D1\u10D0\u10D8\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},array:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"},set:{unit:"\u10D4\u10DA\u10D4\u10DB\u10D4\u10DC\u10E2\u10D8",verb:"\u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1"}};function t(i){return e[i]??null}let n={regex:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0",email:"\u10D4\u10DA-\u10E4\u10DD\u10E1\u10E2\u10D8\u10E1 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",url:"URL",emoji:"\u10D4\u10DB\u10DD\u10EF\u10D8",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8-\u10D3\u10E0\u10DD",date:"\u10D7\u10D0\u10E0\u10D8\u10E6\u10D8",time:"\u10D3\u10E0\u10DD",duration:"\u10EE\u10D0\u10DC\u10D2\u10E0\u10EB\u10DA\u10D8\u10D5\u10DD\u10D1\u10D0",ipv4:"IPv4 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",ipv6:"IPv6 \u10DB\u10D8\u10E1\u10D0\u10DB\u10D0\u10E0\u10D7\u10D8",cidrv4:"IPv4 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",cidrv6:"IPv6 \u10D3\u10D8\u10D0\u10DE\u10D0\u10D6\u10DD\u10DC\u10D8",base64:"base64-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",base64url:"base64url-\u10D9\u10DD\u10D3\u10D8\u10E0\u10D4\u10D1\u10E3\u10DA\u10D8 \u10D5\u10D4\u10DA\u10D8",json_string:"JSON \u10D5\u10D4\u10DA\u10D8",e164:"E.164 \u10DC\u10DD\u10DB\u10D4\u10E0\u10D8",jwt:"JWT",template_literal:"\u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"},r={nan:"NaN",number:"\u10E0\u10D8\u10EA\u10EE\u10D5\u10D8",string:"\u10D5\u10D4\u10DA\u10D8",boolean:"\u10D1\u10E3\u10DA\u10D4\u10D0\u10DC\u10D8",function:"\u10E4\u10E3\u10DC\u10E5\u10EA\u10D8\u10D0",array:"\u10DB\u10D0\u10E1\u10D8\u10D5\u10D8"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 instanceof ${i.expected}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${o}, \u10DB\u10D8\u10E6\u10D4\u10D1\u10E3\u10DA\u10D8 ${l}`}case"invalid_value":return i.values.length===1?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${L(i.values[0])}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D0\u10E0\u10D8\u10D0\u10DC\u10E2\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8\u10D0 \u10D4\u10E0\u10D7-\u10D4\u10E0\u10D7\u10D8 ${C(i.values,"|")}-\u10D3\u10D0\u10DC`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10D3\u10D8\u10D3\u10D8: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin??"\u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0"} \u10D8\u10E7\u10DD\u10E1 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`\u10D6\u10D4\u10D3\u10DB\u10D4\u10E2\u10D0\u10D3 \u10DE\u10D0\u10E2\u10D0\u10E0\u10D0: \u10DB\u10DD\u10E1\u10D0\u10DA\u10DD\u10D3\u10DC\u10D4\u10DA\u10D8 ${i.origin} \u10D8\u10E7\u10DD\u10E1 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10EC\u10E7\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.prefix}"-\u10D8\u10D7`:o.format==="ends_with"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10DB\u10D7\u10D0\u10D5\u10E0\u10D3\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 "${o.suffix}"-\u10D8\u10D7`:o.format==="includes"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D8\u10EA\u10D0\u10D5\u10D3\u10D4\u10E1 "${o.includes}"-\u10E1`:o.format==="regex"?`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D5\u10D4\u10DA\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10E8\u10D4\u10D4\u10E1\u10D0\u10D1\u10D0\u10DB\u10D4\u10D1\u10DD\u10D3\u10D4\u10E1 \u10E8\u10D0\u10D1\u10DA\u10DD\u10DC\u10E1 ${o.pattern}`:`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E0\u10D8\u10EA\u10EE\u10D5\u10D8: \u10E3\u10DC\u10D3\u10D0 \u10D8\u10E7\u10DD\u10E1 ${i.divisor}-\u10D8\u10E1 \u10EF\u10D4\u10E0\u10D0\u10D3\u10D8`;case"unrecognized_keys":return`\u10E3\u10EA\u10DC\u10DD\u10D1\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1${i.keys.length>1?"\u10D4\u10D1\u10D8":"\u10D8"}: ${C(i.keys,", ")}`;case"invalid_key":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10D2\u10D0\u10E1\u10D0\u10E6\u10D4\u10D1\u10D8 ${i.origin}-\u10E8\u10D8`;case"invalid_union":return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0";case"invalid_element":return`\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10DB\u10DC\u10D8\u10E8\u10D5\u10DC\u10D4\u10DA\u10DD\u10D1\u10D0 ${i.origin}-\u10E8\u10D8`;default:return"\u10D0\u10E0\u10D0\u10E1\u10EC\u10DD\u10E0\u10D8 \u10E8\u10D4\u10E7\u10D5\u10D0\u10DC\u10D0"}}};function rw(){return{localeError:Ij()}}var Dj=()=>{let e={string:{unit:"\u178F\u17BD\u17A2\u1780\u17D2\u179F\u179A",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},file:{unit:"\u1794\u17C3",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},array:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"},set:{unit:"\u1792\u17B6\u178F\u17BB",verb:"\u1782\u17BD\u179A\u1798\u17B6\u1793"}};function t(i){return e[i]??null}let n={regex:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B",email:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793\u17A2\u17CA\u17B8\u1798\u17C2\u179B",url:"URL",emoji:"\u179F\u1789\u17D2\u1789\u17B6\u17A2\u17B6\u179A\u1798\u17D2\u1798\u178E\u17CD",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 \u1793\u17B7\u1784\u1798\u17C9\u17C4\u1784 ISO",date:"\u1780\u17B6\u179B\u1794\u179A\u17B7\u1785\u17D2\u1786\u17C1\u1791 ISO",time:"\u1798\u17C9\u17C4\u1784 ISO",duration:"\u179A\u1799\u17C8\u1796\u17C1\u179B ISO",ipv4:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",ipv6:"\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",cidrv4:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv4",cidrv6:"\u178A\u17C2\u1793\u17A2\u17B6\u179F\u1799\u178A\u17D2\u178B\u17B6\u1793 IPv6",base64:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64",base64url:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u17A2\u17CA\u17B7\u1780\u17BC\u178A base64url",json_string:"\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A JSON",e164:"\u179B\u17C1\u1781 E.164",jwt:"JWT",template_literal:"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B"},r={nan:"NaN",number:"\u179B\u17C1\u1781",array:"\u17A2\u17B6\u179A\u17C1 (Array)",null:"\u1782\u17D2\u1798\u17B6\u1793\u178F\u1798\u17D2\u179B\u17C3 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A instanceof ${i.expected} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`:`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${o} \u1794\u17C9\u17BB\u1793\u17D2\u178F\u17C2\u1791\u1791\u17BD\u179B\u1794\u17B6\u1793 ${l}`}case"invalid_value":return i.values.length===1?`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1794\u1789\u17D2\u1785\u17BC\u179B\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${L(i.values[0])}`:`\u1787\u1798\u17D2\u179A\u17BE\u179F\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1787\u17B6\u1798\u17BD\u1799\u1780\u17D2\u1793\u17BB\u1784\u1785\u17C6\u178E\u17C4\u1798 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()} ${a.unit??"\u1792\u17B6\u178F\u17BB"}`:`\u1792\u17C6\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin??"\u178F\u1798\u17D2\u179B\u17C3"} ${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()} ${a.unit}`:`\u178F\u17BC\u1785\u1796\u17C1\u1780\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1780\u17B6\u179A ${i.origin} ${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1785\u17B6\u1794\u17CB\u1795\u17D2\u178F\u17BE\u1798\u178A\u17C4\u1799 "${o.prefix}"`:o.format==="ends_with"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1794\u1789\u17D2\u1785\u1794\u17CB\u178A\u17C4\u1799 "${o.suffix}"`:o.format==="includes"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u1798\u17B6\u1793 "${o.includes}"`:o.format==="regex"?`\u1781\u17D2\u179F\u17C2\u17A2\u1780\u17D2\u179F\u179A\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1795\u17D2\u1782\u17BC\u1795\u17D2\u1782\u1784\u1793\u17B9\u1784\u1791\u1798\u17D2\u179A\u1784\u17CB\u178A\u17C2\u179B\u1794\u17B6\u1793\u1780\u17C6\u178E\u178F\u17CB ${o.pattern}`:`\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u179B\u17C1\u1781\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u17D6 \u178F\u17D2\u179A\u17BC\u179C\u178F\u17C2\u1787\u17B6\u1796\u17A0\u17BB\u1782\u17BB\u178E\u1793\u17C3 ${i.divisor}`;case"unrecognized_keys":return`\u179A\u1780\u1783\u17BE\u1789\u179F\u17C4\u1798\u17B7\u1793\u179F\u17D2\u1782\u17B6\u179B\u17CB\u17D6 ${C(i.keys,", ")}`;case"invalid_key":return`\u179F\u17C4\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;case"invalid_union":return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C";case"invalid_element":return`\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C\u1793\u17C5\u1780\u17D2\u1793\u17BB\u1784 ${i.origin}`;default:return"\u1791\u17B7\u1793\u17D2\u1793\u1793\u17D0\u1799\u1798\u17B7\u1793\u178F\u17D2\u179A\u17B9\u1798\u178F\u17D2\u179A\u17BC\u179C"}}};function Du(){return{localeError:Dj()}}function ow(){return Du()}var Aj=()=>{let e={string:{unit:"\uBB38\uC790",verb:"to have"},file:{unit:"\uBC14\uC774\uD2B8",verb:"to have"},array:{unit:"\uAC1C",verb:"to have"},set:{unit:"\uAC1C",verb:"to have"}};function t(i){return e[i]??null}let n={regex:"\uC785\uB825",email:"\uC774\uBA54\uC77C \uC8FC\uC18C",url:"URL",emoji:"\uC774\uBAA8\uC9C0",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \uB0A0\uC9DC\uC2DC\uAC04",date:"ISO \uB0A0\uC9DC",time:"ISO \uC2DC\uAC04",duration:"ISO \uAE30\uAC04",ipv4:"IPv4 \uC8FC\uC18C",ipv6:"IPv6 \uC8FC\uC18C",cidrv4:"IPv4 \uBC94\uC704",cidrv6:"IPv6 \uBC94\uC704",base64:"base64 \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",base64url:"base64url \uC778\uCF54\uB529 \uBB38\uC790\uC5F4",json_string:"JSON \uBB38\uC790\uC5F4",e164:"E.164 \uBC88\uD638",jwt:"JWT",template_literal:"\uC785\uB825"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 instanceof ${i.expected}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC785\uB825: \uC608\uC0C1 \uD0C0\uC785\uC740 ${o}, \uBC1B\uC740 \uD0C0\uC785\uC740 ${l}\uC785\uB2C8\uB2E4`}case"invalid_value":return i.values.length===1?`\uC798\uBABB\uB41C \uC785\uB825: \uAC12\uC740 ${L(i.values[0])} \uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C \uC635\uC158: ${C(i.values,"\uB610\uB294 ")} \uC911 \uD558\uB098\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"too_big":{let o=i.inclusive?"\uC774\uD558":"\uBBF8\uB9CC",a=o==="\uBBF8\uB9CC"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(i.origin),c=l?.unit??"\uC694\uC18C";return l?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()}${c} ${o}${a}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uD07D\uB2C8\uB2E4: ${i.maximum.toString()} ${o}${a}`}case"too_small":{let o=i.inclusive?"\uC774\uC0C1":"\uCD08\uACFC",a=o==="\uC774\uC0C1"?"\uC774\uC5B4\uC57C \uD569\uB2C8\uB2E4":"\uC5EC\uC57C \uD569\uB2C8\uB2E4",l=t(i.origin),c=l?.unit??"\uC694\uC18C";return l?`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()}${c} ${o}${a}`:`${i.origin??"\uAC12"}\uC774 \uB108\uBB34 \uC791\uC2B5\uB2C8\uB2E4: ${i.minimum.toString()} ${o}${a}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.prefix}"(\uC73C)\uB85C \uC2DC\uC791\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="ends_with"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.suffix}"(\uC73C)\uB85C \uB05D\uB098\uC57C \uD569\uB2C8\uB2E4`:o.format==="includes"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: "${o.includes}"\uC744(\uB97C) \uD3EC\uD568\uD574\uC57C \uD569\uB2C8\uB2E4`:o.format==="regex"?`\uC798\uBABB\uB41C \uBB38\uC790\uC5F4: \uC815\uADDC\uC2DD ${o.pattern} \uD328\uD134\uACFC \uC77C\uCE58\uD574\uC57C \uD569\uB2C8\uB2E4`:`\uC798\uBABB\uB41C ${n[o.format]??i.format}`}case"not_multiple_of":return`\uC798\uBABB\uB41C \uC22B\uC790: ${i.divisor}\uC758 \uBC30\uC218\uC5EC\uC57C \uD569\uB2C8\uB2E4`;case"unrecognized_keys":return`\uC778\uC2DD\uD560 \uC218 \uC5C6\uB294 \uD0A4: ${C(i.keys,", ")}`;case"invalid_key":return`\uC798\uBABB\uB41C \uD0A4: ${i.origin}`;case"invalid_union":return"\uC798\uBABB\uB41C \uC785\uB825";case"invalid_element":return`\uC798\uBABB\uB41C \uAC12: ${i.origin}`;default:return"\uC798\uBABB\uB41C \uC785\uB825"}}};function aw(){return{localeError:Aj()}}var bs=e=>e.charAt(0).toUpperCase()+e.slice(1);function lw(e){let t=Math.abs(e),n=t%10,r=t%100;return r>=11&&r<=19||n===0?"many":n===1?"one":"few"}var jj=()=>{let e={string:{unit:{one:"simbolis",few:"simboliai",many:"simboli\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne ilgesn\u0117 kaip",notInclusive:"turi b\u016Bti trumpesn\u0117 kaip"},bigger:{inclusive:"turi b\u016Bti ne trumpesn\u0117 kaip",notInclusive:"turi b\u016Bti ilgesn\u0117 kaip"}}},file:{unit:{one:"baitas",few:"baitai",many:"bait\u0173"},verb:{smaller:{inclusive:"turi b\u016Bti ne didesnis kaip",notInclusive:"turi b\u016Bti ma\u017Eesnis kaip"},bigger:{inclusive:"turi b\u016Bti ne ma\u017Eesnis kaip",notInclusive:"turi b\u016Bti didesnis kaip"}}},array:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}},set:{unit:{one:"element\u0105",few:"elementus",many:"element\u0173"},verb:{smaller:{inclusive:"turi tur\u0117ti ne daugiau kaip",notInclusive:"turi tur\u0117ti ma\u017Eiau kaip"},bigger:{inclusive:"turi tur\u0117ti ne ma\u017Eiau kaip",notInclusive:"turi tur\u0117ti daugiau kaip"}}}};function t(i,o,a,l){let c=e[i]??null;return c===null?c:{unit:c.unit[o],verb:c.verb[l][a?"inclusive":"notInclusive"]}}let n={regex:"\u012Fvestis",email:"el. pa\u0161to adresas",url:"URL",emoji:"jaustukas",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO data ir laikas",date:"ISO data",time:"ISO laikas",duration:"ISO trukm\u0117",ipv4:"IPv4 adresas",ipv6:"IPv6 adresas",cidrv4:"IPv4 tinklo prefiksas (CIDR)",cidrv6:"IPv6 tinklo prefiksas (CIDR)",base64:"base64 u\u017Ekoduota eilut\u0117",base64url:"base64url u\u017Ekoduota eilut\u0117",json_string:"JSON eilut\u0117",e164:"E.164 numeris",jwt:"JWT",template_literal:"\u012Fvestis"},r={nan:"NaN",number:"skai\u010Dius",bigint:"sveikasis skai\u010Dius",string:"eilut\u0117",boolean:"login\u0117 reik\u0161m\u0117",undefined:"neapibr\u0117\u017Eta reik\u0161m\u0117",function:"funkcija",symbol:"simbolis",array:"masyvas",object:"objektas",null:"nulin\u0117 reik\u0161m\u0117"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Gautas tipas ${l}, o tik\u0117tasi - instanceof ${i.expected}`:`Gautas tipas ${l}, o tik\u0117tasi - ${o}`}case"invalid_value":return i.values.length===1?`Privalo b\u016Bti ${L(i.values[0])}`:`Privalo b\u016Bti vienas i\u0161 ${C(i.values,"|")} pasirinkim\u0173`;case"too_big":{let o=r[i.origin]??i.origin,a=t(i.origin,lw(Number(i.maximum)),i.inclusive??!1,"smaller");if(a?.verb)return`${bs(o??i.origin??"reik\u0161m\u0117")} ${a.verb} ${i.maximum.toString()} ${a.unit??"element\u0173"}`;let l=i.inclusive?"ne didesnis kaip":"ma\u017Eesnis kaip";return`${bs(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${i.maximum.toString()} ${a?.unit}`}case"too_small":{let o=r[i.origin]??i.origin,a=t(i.origin,lw(Number(i.minimum)),i.inclusive??!1,"bigger");if(a?.verb)return`${bs(o??i.origin??"reik\u0161m\u0117")} ${a.verb} ${i.minimum.toString()} ${a.unit??"element\u0173"}`;let l=i.inclusive?"ne ma\u017Eesnis kaip":"didesnis kaip";return`${bs(o??i.origin??"reik\u0161m\u0117")} turi b\u016Bti ${l} ${i.minimum.toString()} ${a?.unit}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Eilut\u0117 privalo prasid\u0117ti "${o.prefix}"`:o.format==="ends_with"?`Eilut\u0117 privalo pasibaigti "${o.suffix}"`:o.format==="includes"?`Eilut\u0117 privalo \u012Ftraukti "${o.includes}"`:o.format==="regex"?`Eilut\u0117 privalo atitikti ${o.pattern}`:`Neteisingas ${n[o.format]??i.format}`}case"not_multiple_of":return`Skai\u010Dius privalo b\u016Bti ${i.divisor} kartotinis.`;case"unrecognized_keys":return`Neatpa\u017Eint${i.keys.length>1?"i":"as"} rakt${i.keys.length>1?"ai":"as"}: ${C(i.keys,", ")}`;case"invalid_key":return"Rastas klaidingas raktas";case"invalid_union":return"Klaidinga \u012Fvestis";case"invalid_element":{let o=r[i.origin]??i.origin;return`${bs(o??i.origin??"reik\u0161m\u0117")} turi klaiding\u0105 \u012Fvest\u012F`}default:return"Klaidinga \u012Fvestis"}}};function sw(){return{localeError:jj()}}var Oj=()=>{let e={string:{unit:"\u0437\u043D\u0430\u0446\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},file:{unit:"\u0431\u0430\u0458\u0442\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},array:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"},set:{unit:"\u0441\u0442\u0430\u0432\u043A\u0438",verb:"\u0434\u0430 \u0438\u043C\u0430\u0430\u0442"}};function t(i){return e[i]??null}let n={regex:"\u0432\u043D\u0435\u0441",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u043D\u0430 \u0435-\u043F\u043E\u0448\u0442\u0430",url:"URL",emoji:"\u0435\u043C\u043E\u045F\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0443\u043C \u0438 \u0432\u0440\u0435\u043C\u0435",date:"ISO \u0434\u0430\u0442\u0443\u043C",time:"ISO \u0432\u0440\u0435\u043C\u0435",duration:"ISO \u0432\u0440\u0435\u043C\u0435\u0442\u0440\u0430\u0435\u045A\u0435",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441\u0430",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441\u0430",cidrv4:"IPv4 \u043E\u043F\u0441\u0435\u0433",cidrv6:"IPv6 \u043E\u043F\u0441\u0435\u0433",base64:"base64-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",base64url:"base64url-\u0435\u043D\u043A\u043E\u0434\u0438\u0440\u0430\u043D\u0430 \u043D\u0438\u0437\u0430",json_string:"JSON \u043D\u0438\u0437\u0430",e164:"E.164 \u0431\u0440\u043E\u0458",jwt:"JWT",template_literal:"\u0432\u043D\u0435\u0441"},r={nan:"NaN",number:"\u0431\u0440\u043E\u0458",array:"\u043D\u0438\u0437\u0430"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 instanceof ${i.expected}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`:`\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${o}, \u043F\u0440\u0438\u043C\u0435\u043D\u043E ${l}`}case"invalid_value":return i.values.length===1?`Invalid input: expected ${L(i.values[0])}`:`\u0413\u0440\u0435\u0448\u0430\u043D\u0430 \u043E\u043F\u0446\u0438\u0458\u0430: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 \u0435\u0434\u043D\u0430 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0438"}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u0433\u043E\u043B\u0435\u043C: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin??"\u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442\u0430"} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0438\u043C\u0430 ${o}${i.minimum.toString()} ${a.unit}`:`\u041F\u0440\u0435\u043C\u043D\u043E\u0433\u0443 \u043C\u0430\u043B: \u0441\u0435 \u043E\u0447\u0435\u043A\u0443\u0432\u0430 ${i.origin} \u0434\u0430 \u0431\u0438\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u043F\u043E\u0447\u043D\u0443\u0432\u0430 \u0441\u043E "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0437\u0430\u0432\u0440\u0448\u0443\u0432\u0430 \u0441\u043E "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0432\u043A\u043B\u0443\u0447\u0443\u0432\u0430 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0430\u0436\u0435\u0447\u043A\u0430 \u043D\u0438\u0437\u0430: \u043C\u043E\u0440\u0430 \u0434\u0430 \u043E\u0434\u0433\u043E\u0430\u0440\u0430 \u043D\u0430 \u043F\u0430\u0442\u0435\u0440\u043D\u043E\u0442 ${o.pattern}`:`Invalid ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0413\u0440\u0435\u0448\u0435\u043D \u0431\u0440\u043E\u0458: \u043C\u043E\u0440\u0430 \u0434\u0430 \u0431\u0438\u0434\u0435 \u0434\u0435\u043B\u0438\u0432 \u0441\u043E ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D\u0438 \u043A\u043B\u0443\u0447\u0435\u0432\u0438":"\u041D\u0435\u043F\u0440\u0435\u043F\u043E\u0437\u043D\u0430\u0435\u043D \u043A\u043B\u0443\u0447"}: ${C(i.keys,", ")}`;case"invalid_key":return`\u0413\u0440\u0435\u0448\u0435\u043D \u043A\u043B\u0443\u0447 \u0432\u043E ${i.origin}`;case"invalid_union":return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441";case"invalid_element":return`\u0413\u0440\u0435\u0448\u043D\u0430 \u0432\u0440\u0435\u0434\u043D\u043E\u0441\u0442 \u0432\u043E ${i.origin}`;default:return"\u0413\u0440\u0435\u0448\u0435\u043D \u0432\u043D\u0435\u0441"}}};function cw(){return{localeError:Oj()}}var Nj=()=>{let e={string:{unit:"aksara",verb:"mempunyai"},file:{unit:"bait",verb:"mempunyai"},array:{unit:"elemen",verb:"mempunyai"},set:{unit:"elemen",verb:"mempunyai"}};function t(i){return e[i]??null}let n={regex:"input",email:"alamat e-mel",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"tarikh masa ISO",date:"tarikh ISO",time:"masa ISO",duration:"tempoh ISO",ipv4:"alamat IPv4",ipv6:"alamat IPv6",cidrv4:"julat IPv4",cidrv6:"julat IPv6",base64:"string dikodkan base64",base64url:"string dikodkan base64url",json_string:"string JSON",e164:"nombor E.164",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"nombor"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Input tidak sah: dijangka instanceof ${i.expected}, diterima ${l}`:`Input tidak sah: dijangka ${o}, diterima ${l}`}case"invalid_value":return i.values.length===1?`Input tidak sah: dijangka ${L(i.values[0])}`:`Pilihan tidak sah: dijangka salah satu daripada ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Terlalu besar: dijangka ${i.origin??"nilai"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elemen"}`:`Terlalu besar: dijangka ${i.origin??"nilai"} adalah ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Terlalu kecil: dijangka ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Terlalu kecil: dijangka ${i.origin} adalah ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`String tidak sah: mesti bermula dengan "${o.prefix}"`:o.format==="ends_with"?`String tidak sah: mesti berakhir dengan "${o.suffix}"`:o.format==="includes"?`String tidak sah: mesti mengandungi "${o.includes}"`:o.format==="regex"?`String tidak sah: mesti sepadan dengan corak ${o.pattern}`:`${n[o.format]??i.format} tidak sah`}case"not_multiple_of":return`Nombor tidak sah: perlu gandaan ${i.divisor}`;case"unrecognized_keys":return`Kunci tidak dikenali: ${C(i.keys,", ")}`;case"invalid_key":return`Kunci tidak sah dalam ${i.origin}`;case"invalid_union":return"Input tidak sah";case"invalid_element":return`Nilai tidak sah dalam ${i.origin}`;default:return"Input tidak sah"}}};function uw(){return{localeError:Nj()}}var Uj=()=>{let e={string:{unit:"tekens",verb:"heeft"},file:{unit:"bytes",verb:"heeft"},array:{unit:"elementen",verb:"heeft"},set:{unit:"elementen",verb:"heeft"}};function t(i){return e[i]??null}let n={regex:"invoer",email:"emailadres",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum en tijd",date:"ISO datum",time:"ISO tijd",duration:"ISO duur",ipv4:"IPv4-adres",ipv6:"IPv6-adres",cidrv4:"IPv4-bereik",cidrv6:"IPv6-bereik",base64:"base64-gecodeerde tekst",base64url:"base64 URL-gecodeerde tekst",json_string:"JSON string",e164:"E.164-nummer",jwt:"JWT",template_literal:"invoer"},r={nan:"NaN",number:"getal"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ongeldige invoer: verwacht instanceof ${i.expected}, ontving ${l}`:`Ongeldige invoer: verwacht ${o}, ontving ${l}`}case"invalid_value":return i.values.length===1?`Ongeldige invoer: verwacht ${L(i.values[0])}`:`Ongeldige optie: verwacht \xE9\xE9n van ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin),l=i.origin==="date"?"laat":i.origin==="string"?"lang":"groot";return a?`Te ${l}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} ${a.unit??"elementen"} ${a.verb}`:`Te ${l}: verwacht dat ${i.origin??"waarde"} ${o}${i.maximum.toString()} is`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin),l=i.origin==="date"?"vroeg":i.origin==="string"?"kort":"klein";return a?`Te ${l}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} ${a.unit} ${a.verb}`:`Te ${l}: verwacht dat ${i.origin} ${o}${i.minimum.toString()} is`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ongeldige tekst: moet met "${o.prefix}" beginnen`:o.format==="ends_with"?`Ongeldige tekst: moet op "${o.suffix}" eindigen`:o.format==="includes"?`Ongeldige tekst: moet "${o.includes}" bevatten`:o.format==="regex"?`Ongeldige tekst: moet overeenkomen met patroon ${o.pattern}`:`Ongeldig: ${n[o.format]??i.format}`}case"not_multiple_of":return`Ongeldig getal: moet een veelvoud van ${i.divisor} zijn`;case"unrecognized_keys":return`Onbekende key${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Ongeldige key in ${i.origin}`;case"invalid_union":return"Ongeldige invoer";case"invalid_element":return`Ongeldige waarde in ${i.origin}`;default:return"Ongeldige invoer"}}};function dw(){return{localeError:Uj()}}var Rj=()=>{let e={string:{unit:"tegn",verb:"\xE5 ha"},file:{unit:"bytes",verb:"\xE5 ha"},array:{unit:"elementer",verb:"\xE5 inneholde"},set:{unit:"elementer",verb:"\xE5 inneholde"}};function t(i){return e[i]??null}let n={regex:"input",email:"e-postadresse",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO dato- og klokkeslett",date:"ISO-dato",time:"ISO-klokkeslett",duration:"ISO-varighet",ipv4:"IPv4-omr\xE5de",ipv6:"IPv6-omr\xE5de",cidrv4:"IPv4-spekter",cidrv6:"IPv6-spekter",base64:"base64-enkodet streng",base64url:"base64url-enkodet streng",json_string:"JSON-streng",e164:"E.164-nummer",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"tall",array:"liste"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ugyldig input: forventet instanceof ${i.expected}, fikk ${l}`:`Ugyldig input: forventet ${o}, fikk ${l}`}case"invalid_value":return i.values.length===1?`Ugyldig verdi: forventet ${L(i.values[0])}`:`Ugyldig valg: forventet en av ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()} ${a.unit??"elementer"}`:`For stor(t): forventet ${i.origin??"value"} til \xE5 ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()} ${a.unit}`:`For lite(n): forventet ${i.origin} til \xE5 ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ugyldig streng: m\xE5 starte med "${o.prefix}"`:o.format==="ends_with"?`Ugyldig streng: m\xE5 ende med "${o.suffix}"`:o.format==="includes"?`Ugyldig streng: m\xE5 inneholde "${o.includes}"`:o.format==="regex"?`Ugyldig streng: m\xE5 matche m\xF8nsteret ${o.pattern}`:`Ugyldig ${n[o.format]??i.format}`}case"not_multiple_of":return`Ugyldig tall: m\xE5 v\xE6re et multiplum av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ukjente n\xF8kler":"Ukjent n\xF8kkel"}: ${C(i.keys,", ")}`;case"invalid_key":return`Ugyldig n\xF8kkel i ${i.origin}`;case"invalid_union":return"Ugyldig input";case"invalid_element":return`Ugyldig verdi i ${i.origin}`;default:return"Ugyldig input"}}};function fw(){return{localeError:Rj()}}var Mj=()=>{let e={string:{unit:"harf",verb:"olmal\u0131d\u0131r"},file:{unit:"bayt",verb:"olmal\u0131d\u0131r"},array:{unit:"unsur",verb:"olmal\u0131d\u0131r"},set:{unit:"unsur",verb:"olmal\u0131d\u0131r"}};function t(i){return e[i]??null}let n={regex:"giren",email:"epostag\xE2h",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO heng\xE2m\u0131",date:"ISO tarihi",time:"ISO zaman\u0131",duration:"ISO m\xFCddeti",ipv4:"IPv4 ni\u015F\xE2n\u0131",ipv6:"IPv6 ni\u015F\xE2n\u0131",cidrv4:"IPv4 menzili",cidrv6:"IPv6 menzili",base64:"base64-\u015Fifreli metin",base64url:"base64url-\u015Fifreli metin",json_string:"JSON metin",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"giren"},r={nan:"NaN",number:"numara",array:"saf",null:"gayb"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`F\xE2sit giren: umulan instanceof ${i.expected}, al\u0131nan ${l}`:`F\xE2sit giren: umulan ${o}, al\u0131nan ${l}`}case"invalid_value":return i.values.length===1?`F\xE2sit giren: umulan ${L(i.values[0])}`:`F\xE2sit tercih: m\xFBteberler ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} ${a.unit??"elements"} sahip olmal\u0131yd\u0131.`:`Fazla b\xFCy\xFCk: ${i.origin??"value"}, ${o}${i.maximum.toString()} olmal\u0131yd\u0131.`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} ${a.unit} sahip olmal\u0131yd\u0131.`:`Fazla k\xFC\xE7\xFCk: ${i.origin}, ${o}${i.minimum.toString()} olmal\u0131yd\u0131.`}case"invalid_format":{let o=i;return o.format==="starts_with"?`F\xE2sit metin: "${o.prefix}" ile ba\u015Flamal\u0131.`:o.format==="ends_with"?`F\xE2sit metin: "${o.suffix}" ile bitmeli.`:o.format==="includes"?`F\xE2sit metin: "${o.includes}" ihtiv\xE2 etmeli.`:o.format==="regex"?`F\xE2sit metin: ${o.pattern} nak\u015F\u0131na uymal\u0131.`:`F\xE2sit ${n[o.format]??i.format}`}case"not_multiple_of":return`F\xE2sit say\u0131: ${i.divisor} kat\u0131 olmal\u0131yd\u0131.`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar ${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7in tan\u0131nmayan anahtar var.`;case"invalid_union":return"Giren tan\u0131namad\u0131.";case"invalid_element":return`${i.origin} i\xE7in tan\u0131nmayan k\u0131ymet var.`;default:return"K\u0131ymet tan\u0131namad\u0131."}}};function mw(){return{localeError:Mj()}}var Bj=()=>{let e={string:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},file:{unit:"\u0628\u0627\u06CC\u067C\u0633",verb:"\u0648\u0644\u0631\u064A"},array:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"},set:{unit:"\u062A\u0648\u06A9\u064A",verb:"\u0648\u0644\u0631\u064A"}};function t(i){return e[i]??null}let n={regex:"\u0648\u0631\u0648\u062F\u064A",email:"\u0628\u0631\u06CC\u069A\u0646\u0627\u0644\u06CC\u06A9",url:"\u06CC\u0648 \u0622\u0631 \u0627\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u064A",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0646\u06CC\u067C\u0647 \u0627\u0648 \u0648\u062E\u062A",date:"\u0646\u06D0\u067C\u0647",time:"\u0648\u062E\u062A",duration:"\u0645\u0648\u062F\u0647",ipv4:"\u062F IPv4 \u067E\u062A\u0647",ipv6:"\u062F IPv6 \u067E\u062A\u0647",cidrv4:"\u062F IPv4 \u0633\u0627\u062D\u0647",cidrv6:"\u062F IPv6 \u0633\u0627\u062D\u0647",base64:"base64-encoded \u0645\u062A\u0646",base64url:"base64url-encoded \u0645\u062A\u0646",json_string:"JSON \u0645\u062A\u0646",e164:"\u062F E.164 \u0634\u0645\u06D0\u0631\u0647",jwt:"JWT",template_literal:"\u0648\u0631\u0648\u062F\u064A"},r={nan:"NaN",number:"\u0639\u062F\u062F",array:"\u0627\u0631\u06D0"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F instanceof ${i.expected} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`:`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${o} \u0648\u0627\u06CC, \u0645\u06AB\u0631 ${l} \u062A\u0631\u0644\u0627\u0633\u0647 \u0634\u0648`}case"invalid_value":return i.values.length===1?`\u0646\u0627\u0633\u0645 \u0648\u0631\u0648\u062F\u064A: \u0628\u0627\u06CC\u062F ${L(i.values[0])} \u0648\u0627\u06CC`:`\u0646\u0627\u0633\u0645 \u0627\u0646\u062A\u062E\u0627\u0628: \u0628\u0627\u06CC\u062F \u06CC\u0648 \u0644\u0647 ${C(i.values,"|")} \u0685\u062E\u0647 \u0648\u0627\u06CC`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0635\u0631\u0648\u0646\u0647"} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u0644\u0648\u06CC: ${i.origin??"\u0627\u0631\u0632\u069A\u062A"} \u0628\u0627\u06CC\u062F ${o}${i.maximum.toString()} \u0648\u064A`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} ${a.unit} \u0648\u0644\u0631\u064A`:`\u0689\u06CC\u0631 \u06A9\u0648\u0686\u0646\u06CC: ${i.origin} \u0628\u0627\u06CC\u062F ${o}${i.minimum.toString()} \u0648\u064A`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.prefix}" \u0633\u0631\u0647 \u067E\u06CC\u0644 \u0634\u064A`:o.format==="ends_with"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F "${o.suffix}" \u0633\u0631\u0647 \u067E\u0627\u06CC \u062A\u0647 \u0648\u0631\u0633\u064A\u0696\u064A`:o.format==="includes"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F "${o.includes}" \u0648\u0644\u0631\u064A`:o.format==="regex"?`\u0646\u0627\u0633\u0645 \u0645\u062A\u0646: \u0628\u0627\u06CC\u062F \u062F ${o.pattern} \u0633\u0631\u0647 \u0645\u0637\u0627\u0628\u0642\u062A \u0648\u0644\u0631\u064A`:`${n[o.format]??i.format} \u0646\u0627\u0633\u0645 \u062F\u06CC`}case"not_multiple_of":return`\u0646\u0627\u0633\u0645 \u0639\u062F\u062F: \u0628\u0627\u06CC\u062F \u062F ${i.divisor} \u0645\u0636\u0631\u0628 \u0648\u064A`;case"unrecognized_keys":return`\u0646\u0627\u0633\u0645 ${i.keys.length>1?"\u06A9\u0644\u06CC\u0689\u0648\u0646\u0647":"\u06A9\u0644\u06CC\u0689"}: ${C(i.keys,", ")}`;case"invalid_key":return`\u0646\u0627\u0633\u0645 \u06A9\u0644\u06CC\u0689 \u067E\u0647 ${i.origin} \u06A9\u06D0`;case"invalid_union":return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A";case"invalid_element":return`\u0646\u0627\u0633\u0645 \u0639\u0646\u0635\u0631 \u067E\u0647 ${i.origin} \u06A9\u06D0`;default:return"\u0646\u0627\u0633\u0645\u0647 \u0648\u0631\u0648\u062F\u064A"}}};function hw(){return{localeError:Bj()}}var Lj=()=>{let e={string:{unit:"znak\xF3w",verb:"mie\u0107"},file:{unit:"bajt\xF3w",verb:"mie\u0107"},array:{unit:"element\xF3w",verb:"mie\u0107"},set:{unit:"element\xF3w",verb:"mie\u0107"}};function t(i){return e[i]??null}let n={regex:"wyra\u017Cenie",email:"adres email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data i godzina w formacie ISO",date:"data w formacie ISO",time:"godzina w formacie ISO",duration:"czas trwania ISO",ipv4:"adres IPv4",ipv6:"adres IPv6",cidrv4:"zakres IPv4",cidrv6:"zakres IPv6",base64:"ci\u0105g znak\xF3w zakodowany w formacie base64",base64url:"ci\u0105g znak\xF3w zakodowany w formacie base64url",json_string:"ci\u0105g znak\xF3w w formacie JSON",e164:"liczba E.164",jwt:"JWT",template_literal:"wej\u015Bcie"},r={nan:"NaN",number:"liczba",array:"tablica"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano instanceof ${i.expected}, otrzymano ${l}`:`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${o}, otrzymano ${l}`}case"invalid_value":return i.values.length===1?`Nieprawid\u0142owe dane wej\u015Bciowe: oczekiwano ${L(i.values[0])}`:`Nieprawid\u0142owa opcja: oczekiwano jednej z warto\u015Bci ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Za du\u017Ca warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.maximum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt du\u017C(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Za ma\u0142a warto\u015B\u0107: oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie mie\u0107 ${o}${i.minimum.toString()} ${a.unit??"element\xF3w"}`:`Zbyt ma\u0142(y/a/e): oczekiwano, \u017Ce ${i.origin??"warto\u015B\u0107"} b\u0119dzie wynosi\u0107 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zaczyna\u0107 si\u0119 od "${o.prefix}"`:o.format==="ends_with"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi ko\u0144czy\u0107 si\u0119 na "${o.suffix}"`:o.format==="includes"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi zawiera\u0107 "${o.includes}"`:o.format==="regex"?`Nieprawid\u0142owy ci\u0105g znak\xF3w: musi odpowiada\u0107 wzorcowi ${o.pattern}`:`Nieprawid\u0142ow(y/a/e) ${n[o.format]??i.format}`}case"not_multiple_of":return`Nieprawid\u0142owa liczba: musi by\u0107 wielokrotno\u015Bci\u0105 ${i.divisor}`;case"unrecognized_keys":return`Nierozpoznane klucze${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Nieprawid\u0142owy klucz w ${i.origin}`;case"invalid_union":return"Nieprawid\u0142owe dane wej\u015Bciowe";case"invalid_element":return`Nieprawid\u0142owa warto\u015B\u0107 w ${i.origin}`;default:return"Nieprawid\u0142owe dane wej\u015Bciowe"}}};function pw(){return{localeError:Lj()}}var Pj=()=>{let e={string:{unit:"caracteres",verb:"ter"},file:{unit:"bytes",verb:"ter"},array:{unit:"itens",verb:"ter"},set:{unit:"itens",verb:"ter"}};function t(i){return e[i]??null}let n={regex:"padr\xE3o",email:"endere\xE7o de e-mail",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"data e hora ISO",date:"data ISO",time:"hora ISO",duration:"dura\xE7\xE3o ISO",ipv4:"endere\xE7o IPv4",ipv6:"endere\xE7o IPv6",cidrv4:"faixa de IPv4",cidrv6:"faixa de IPv6",base64:"texto codificado em base64",base64url:"URL codificada em base64",json_string:"texto JSON",e164:"n\xFAmero E.164",jwt:"JWT",template_literal:"entrada"},r={nan:"NaN",number:"n\xFAmero",null:"nulo"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Tipo inv\xE1lido: esperado instanceof ${i.expected}, recebido ${l}`:`Tipo inv\xE1lido: esperado ${o}, recebido ${l}`}case"invalid_value":return i.values.length===1?`Entrada inv\xE1lida: esperado ${L(i.values[0])}`:`Op\xE7\xE3o inv\xE1lida: esperada uma das ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Muito grande: esperado que ${i.origin??"valor"} tivesse ${o}${i.maximum.toString()} ${a.unit??"elementos"}`:`Muito grande: esperado que ${i.origin??"valor"} fosse ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Muito pequeno: esperado que ${i.origin} tivesse ${o}${i.minimum.toString()} ${a.unit}`:`Muito pequeno: esperado que ${i.origin} fosse ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Texto inv\xE1lido: deve come\xE7ar com "${o.prefix}"`:o.format==="ends_with"?`Texto inv\xE1lido: deve terminar com "${o.suffix}"`:o.format==="includes"?`Texto inv\xE1lido: deve incluir "${o.includes}"`:o.format==="regex"?`Texto inv\xE1lido: deve corresponder ao padr\xE3o ${o.pattern}`:`${n[o.format]??i.format} inv\xE1lido`}case"not_multiple_of":return`N\xFAmero inv\xE1lido: deve ser m\xFAltiplo de ${i.divisor}`;case"unrecognized_keys":return`Chave${i.keys.length>1?"s":""} desconhecida${i.keys.length>1?"s":""}: ${C(i.keys,", ")}`;case"invalid_key":return`Chave inv\xE1lida em ${i.origin}`;case"invalid_union":return"Entrada inv\xE1lida";case"invalid_element":return`Valor inv\xE1lido em ${i.origin}`;default:return"Campo inv\xE1lido"}}};function gw(){return{localeError:Pj()}}var Zj=()=>{let e={string:{unit:"caractere",verb:"s\u0103 aib\u0103"},file:{unit:"octe\u021Bi",verb:"s\u0103 aib\u0103"},array:{unit:"elemente",verb:"s\u0103 aib\u0103"},set:{unit:"elemente",verb:"s\u0103 aib\u0103"},map:{unit:"intr\u0103ri",verb:"s\u0103 aib\u0103"}};function t(i){return e[i]??null}let n={regex:"intrare",email:"adres\u0103 de email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"dat\u0103 \u0219i or\u0103 ISO",date:"dat\u0103 ISO",time:"or\u0103 ISO",duration:"durat\u0103 ISO",ipv4:"adres\u0103 IPv4",ipv6:"adres\u0103 IPv6",mac:"adres\u0103 MAC",cidrv4:"interval IPv4",cidrv6:"interval IPv6",base64:"\u0219ir codat base64",base64url:"\u0219ir codat base64url",json_string:"\u0219ir JSON",e164:"num\u0103r E.164",jwt:"JWT",template_literal:"intrare"},r={nan:"NaN",string:"\u0219ir",number:"num\u0103r",boolean:"boolean",function:"func\u021Bie",array:"matrice",object:"obiect",undefined:"nedefinit",symbol:"simbol",bigint:"num\u0103r mare",void:"void",never:"never",map:"hart\u0103",set:"set"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return`Intrare invalid\u0103: a\u0219teptat ${o}, primit ${l}`}case"invalid_value":return i.values.length===1?`Intrare invalid\u0103: a\u0219teptat ${L(i.values[0])}`:`Op\u021Biune invalid\u0103: a\u0219teptat una dintre ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"elemente"}`:`Prea mare: a\u0219teptat ca ${i.origin??"valoarea"} s\u0103 fie ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Prea mic: a\u0219teptat ca ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Prea mic: a\u0219teptat ca ${i.origin} s\u0103 fie ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0218ir invalid: trebuie s\u0103 \xEEnceap\u0103 cu "${o.prefix}"`:o.format==="ends_with"?`\u0218ir invalid: trebuie s\u0103 se termine cu "${o.suffix}"`:o.format==="includes"?`\u0218ir invalid: trebuie s\u0103 includ\u0103 "${o.includes}"`:o.format==="regex"?`\u0218ir invalid: trebuie s\u0103 se potriveasc\u0103 cu modelul ${o.pattern}`:`Format invalid: ${n[o.format]??i.format}`}case"not_multiple_of":return`Num\u0103r invalid: trebuie s\u0103 fie multiplu de ${i.divisor}`;case"unrecognized_keys":return`Chei nerecunoscute: ${C(i.keys,", ")}`;case"invalid_key":return`Cheie invalid\u0103 \xEEn ${i.origin}`;case"invalid_union":return"Intrare invalid\u0103";case"invalid_element":return`Valoare invalid\u0103 \xEEn ${i.origin}`;default:return"Intrare invalid\u0103"}}};function yw(){return{localeError:Zj()}}function vw(e,t,n,r){let i=Math.abs(e),o=i%10,a=i%100;return a>=11&&a<=19?r:o===1?t:o>=2&&o<=4?n:r}var Fj=()=>{let e={string:{unit:{one:"\u0441\u0438\u043C\u0432\u043E\u043B",few:"\u0441\u0438\u043C\u0432\u043E\u043B\u0430",many:"\u0441\u0438\u043C\u0432\u043E\u043B\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},file:{unit:{one:"\u0431\u0430\u0439\u0442",few:"\u0431\u0430\u0439\u0442\u0430",many:"\u0431\u0430\u0439\u0442"},verb:"\u0438\u043C\u0435\u0442\u044C"},array:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"},set:{unit:{one:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442",few:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u0430",many:"\u044D\u043B\u0435\u043C\u0435\u043D\u0442\u043E\u0432"},verb:"\u0438\u043C\u0435\u0442\u044C"}};function t(i){return e[i]??null}let n={regex:"\u0432\u0432\u043E\u0434",email:"email \u0430\u0434\u0440\u0435\u0441",url:"URL",emoji:"\u044D\u043C\u043E\u0434\u0437\u0438",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0434\u0430\u0442\u0430 \u0438 \u0432\u0440\u0435\u043C\u044F",date:"ISO \u0434\u0430\u0442\u0430",time:"ISO \u0432\u0440\u0435\u043C\u044F",duration:"ISO \u0434\u043B\u0438\u0442\u0435\u043B\u044C\u043D\u043E\u0441\u0442\u044C",ipv4:"IPv4 \u0430\u0434\u0440\u0435\u0441",ipv6:"IPv6 \u0430\u0434\u0440\u0435\u0441",cidrv4:"IPv4 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",cidrv6:"IPv6 \u0434\u0438\u0430\u043F\u0430\u0437\u043E\u043D",base64:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64",base64url:"\u0441\u0442\u0440\u043E\u043A\u0430 \u0432 \u0444\u043E\u0440\u043C\u0430\u0442\u0435 base64url",json_string:"JSON \u0441\u0442\u0440\u043E\u043A\u0430",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0432\u043E\u0434"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C instanceof ${i.expected}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${o}, \u043F\u043E\u043B\u0443\u0447\u0435\u043D\u043E ${l}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0432\u043E\u0434: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C ${L(i.values[0])}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u0432\u0430\u0440\u0438\u0430\u043D\u0442: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C \u043E\u0434\u043D\u043E \u0438\u0437 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);if(a){let l=Number(i.maximum),c=vw(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.maximum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u0431\u043E\u043B\u044C\u0448\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435"} \u0431\u0443\u0434\u0435\u0442 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);if(a){let l=Number(i.minimum),c=vw(l,a.unit.one,a.unit.few,a.unit.many);return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 \u0438\u043C\u0435\u0442\u044C ${o}${i.minimum.toString()} ${c}`}return`\u0421\u043B\u0438\u0448\u043A\u043E\u043C \u043C\u0430\u043B\u0435\u043D\u044C\u043A\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435: \u043E\u0436\u0438\u0434\u0430\u043B\u043E\u0441\u044C, \u0447\u0442\u043E ${i.origin} \u0431\u0443\u0434\u0435\u0442 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u043D\u0430\u0447\u0438\u043D\u0430\u0442\u044C\u0441\u044F \u0441 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0437\u0430\u043A\u0430\u043D\u0447\u0438\u0432\u0430\u0442\u044C\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u0434\u0435\u0440\u0436\u0430\u0442\u044C "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u0432\u0435\u0440\u043D\u0430\u044F \u0441\u0442\u0440\u043E\u043A\u0430: \u0434\u043E\u043B\u0436\u043D\u0430 \u0441\u043E\u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043E\u0432\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0447\u0438\u0441\u043B\u043E: \u0434\u043E\u043B\u0436\u043D\u043E \u0431\u044B\u0442\u044C \u043A\u0440\u0430\u0442\u043D\u044B\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043D${i.keys.length>1?"\u044B\u0435":"\u044B\u0439"} \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0438":""}: ${C(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043B\u044E\u0447 \u0432 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435";case"invalid_element":return`\u041D\u0435\u0432\u0435\u0440\u043D\u043E\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u0432 ${i.origin}`;default:return"\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}}};function bw(){return{localeError:Fj()}}var Hj=()=>{let e={string:{unit:"znakov",verb:"imeti"},file:{unit:"bajtov",verb:"imeti"},array:{unit:"elementov",verb:"imeti"},set:{unit:"elementov",verb:"imeti"}};function t(i){return e[i]??null}let n={regex:"vnos",email:"e-po\u0161tni naslov",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO datum in \u010Das",date:"ISO datum",time:"ISO \u010Das",duration:"ISO trajanje",ipv4:"IPv4 naslov",ipv6:"IPv6 naslov",cidrv4:"obseg IPv4",cidrv6:"obseg IPv6",base64:"base64 kodiran niz",base64url:"base64url kodiran niz",json_string:"JSON niz",e164:"E.164 \u0161tevilka",jwt:"JWT",template_literal:"vnos"},r={nan:"NaN",number:"\u0161tevilo",array:"tabela"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Neveljaven vnos: pri\u010Dakovano instanceof ${i.expected}, prejeto ${l}`:`Neveljaven vnos: pri\u010Dakovano ${o}, prejeto ${l}`}case"invalid_value":return i.values.length===1?`Neveljaven vnos: pri\u010Dakovano ${L(i.values[0])}`:`Neveljavna mo\u017Enost: pri\u010Dakovano eno izmed ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} imelo ${o}${i.maximum.toString()} ${a.unit??"elementov"}`:`Preveliko: pri\u010Dakovano, da bo ${i.origin??"vrednost"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Premajhno: pri\u010Dakovano, da bo ${i.origin} imelo ${o}${i.minimum.toString()} ${a.unit}`:`Premajhno: pri\u010Dakovano, da bo ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Neveljaven niz: mora se za\u010Deti z "${o.prefix}"`:o.format==="ends_with"?`Neveljaven niz: mora se kon\u010Dati z "${o.suffix}"`:o.format==="includes"?`Neveljaven niz: mora vsebovati "${o.includes}"`:o.format==="regex"?`Neveljaven niz: mora ustrezati vzorcu ${o.pattern}`:`Neveljaven ${n[o.format]??i.format}`}case"not_multiple_of":return`Neveljavno \u0161tevilo: mora biti ve\u010Dkratnik ${i.divisor}`;case"unrecognized_keys":return`Neprepoznan${i.keys.length>1?"i klju\u010Di":" klju\u010D"}: ${C(i.keys,", ")}`;case"invalid_key":return`Neveljaven klju\u010D v ${i.origin}`;case"invalid_union":return"Neveljaven vnos";case"invalid_element":return`Neveljavna vrednost v ${i.origin}`;default:return"Neveljaven vnos"}}};function xw(){return{localeError:Hj()}}var Vj=()=>{let e={string:{unit:"tecken",verb:"att ha"},file:{unit:"bytes",verb:"att ha"},array:{unit:"objekt",verb:"att inneh\xE5lla"},set:{unit:"objekt",verb:"att inneh\xE5lla"}};function t(i){return e[i]??null}let n={regex:"regulj\xE4rt uttryck",email:"e-postadress",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO-datum och tid",date:"ISO-datum",time:"ISO-tid",duration:"ISO-varaktighet",ipv4:"IPv4-intervall",ipv6:"IPv6-intervall",cidrv4:"IPv4-spektrum",cidrv6:"IPv6-spektrum",base64:"base64-kodad str\xE4ng",base64url:"base64url-kodad str\xE4ng",json_string:"JSON-str\xE4ng",e164:"E.164-nummer",jwt:"JWT",template_literal:"mall-literal"},r={nan:"NaN",number:"antal",array:"lista"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ogiltig inmatning: f\xF6rv\xE4ntat instanceof ${i.expected}, fick ${l}`:`Ogiltig inmatning: f\xF6rv\xE4ntat ${o}, fick ${l}`}case"invalid_value":return i.values.length===1?`Ogiltig inmatning: f\xF6rv\xE4ntat ${L(i.values[0])}`:`Ogiltigt val: f\xF6rv\xE4ntade en av ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`F\xF6r stor(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()} ${a.unit??"element"}`:`F\xF6r stor(t): f\xF6rv\xE4ntat ${i.origin??"v\xE4rdet"} att ha ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()} ${a.unit}`:`F\xF6r lite(t): f\xF6rv\xE4ntade ${i.origin??"v\xE4rdet"} att ha ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ogiltig str\xE4ng: m\xE5ste b\xF6rja med "${o.prefix}"`:o.format==="ends_with"?`Ogiltig str\xE4ng: m\xE5ste sluta med "${o.suffix}"`:o.format==="includes"?`Ogiltig str\xE4ng: m\xE5ste inneh\xE5lla "${o.includes}"`:o.format==="regex"?`Ogiltig str\xE4ng: m\xE5ste matcha m\xF6nstret "${o.pattern}"`:`Ogiltig(t) ${n[o.format]??i.format}`}case"not_multiple_of":return`Ogiltigt tal: m\xE5ste vara en multipel av ${i.divisor}`;case"unrecognized_keys":return`${i.keys.length>1?"Ok\xE4nda nycklar":"Ok\xE4nd nyckel"}: ${C(i.keys,", ")}`;case"invalid_key":return`Ogiltig nyckel i ${i.origin??"v\xE4rdet"}`;case"invalid_union":return"Ogiltig input";case"invalid_element":return`Ogiltigt v\xE4rde i ${i.origin??"v\xE4rdet"}`;default:return"Ogiltig input"}}};function Sw(){return{localeError:Vj()}}var qj=()=>{let e={string:{unit:"\u0B8E\u0BB4\u0BC1\u0BA4\u0BCD\u0BA4\u0BC1\u0B95\u0BCD\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},file:{unit:"\u0BAA\u0BC8\u0B9F\u0BCD\u0B9F\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},array:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"},set:{unit:"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD",verb:"\u0B95\u0BCA\u0BA3\u0BCD\u0B9F\u0BBF\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD"}};function t(i){return e[i]??null}let n={regex:"\u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1",email:"\u0BAE\u0BBF\u0BA9\u0BCD\u0BA9\u0B9E\u0BCD\u0B9A\u0BB2\u0BCD \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u0BA4\u0BC7\u0BA4\u0BBF \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",date:"ISO \u0BA4\u0BC7\u0BA4\u0BBF",time:"ISO \u0BA8\u0BC7\u0BB0\u0BAE\u0BCD",duration:"ISO \u0B95\u0BBE\u0BB2 \u0B85\u0BB3\u0BB5\u0BC1",ipv4:"IPv4 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",ipv6:"IPv6 \u0BAE\u0BC1\u0B95\u0BB5\u0BB0\u0BBF",cidrv4:"IPv4 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",cidrv6:"IPv6 \u0BB5\u0BB0\u0BAE\u0BCD\u0BAA\u0BC1",base64:"base64-encoded \u0B9A\u0BB0\u0BAE\u0BCD",base64url:"base64url-encoded \u0B9A\u0BB0\u0BAE\u0BCD",json_string:"JSON \u0B9A\u0BB0\u0BAE\u0BCD",e164:"E.164 \u0B8E\u0BA3\u0BCD",jwt:"JWT",template_literal:"input"},r={nan:"NaN",number:"\u0B8E\u0BA3\u0BCD",array:"\u0B85\u0BA3\u0BBF",null:"\u0BB5\u0BC6\u0BB1\u0BC1\u0BAE\u0BC8"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 instanceof ${i.expected}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${o}, \u0BAA\u0BC6\u0BB1\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${l}`}case"invalid_value":return i.values.length===1?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${L(i.values[0])}`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0BB0\u0BC1\u0BAA\u0BCD\u0BAA\u0BAE\u0BCD: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${C(i.values,"|")} \u0B87\u0BB2\u0BCD \u0B92\u0BA9\u0BCD\u0BB1\u0BC1`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} ${a.unit??"\u0B89\u0BB1\u0BC1\u0BAA\u0BCD\u0BAA\u0BC1\u0B95\u0BB3\u0BCD"} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95 \u0BAA\u0BC6\u0BB0\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin??"\u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1"} ${o}${i.maximum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} ${a.unit} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BAE\u0BBF\u0B95\u0B9A\u0BCD \u0B9A\u0BBF\u0BB1\u0BBF\u0BAF\u0BA4\u0BC1: \u0B8E\u0BA4\u0BBF\u0BB0\u0BCD\u0BAA\u0BBE\u0BB0\u0BCD\u0B95\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0B9F\u0BCD\u0B9F\u0BA4\u0BC1 ${i.origin} ${o}${i.minimum.toString()} \u0B86\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.prefix}" \u0B87\u0BB2\u0BCD \u0BA4\u0BCA\u0B9F\u0B99\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="ends_with"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.suffix}" \u0B87\u0BB2\u0BCD \u0BAE\u0BC1\u0B9F\u0BBF\u0BB5\u0B9F\u0BC8\u0BAF \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="includes"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: "${o.includes}" \u0B90 \u0B89\u0BB3\u0BCD\u0BB3\u0B9F\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:o.format==="regex"?`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B9A\u0BB0\u0BAE\u0BCD: ${o.pattern} \u0BAE\u0BC1\u0BB1\u0BC8\u0BAA\u0BBE\u0B9F\u0BCD\u0B9F\u0BC1\u0B9F\u0BA9\u0BCD \u0BAA\u0BCA\u0BB0\u0BC1\u0BA8\u0BCD\u0BA4 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`:`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B8E\u0BA3\u0BCD: ${i.divisor} \u0B87\u0BA9\u0BCD \u0BAA\u0BB2\u0BAE\u0BBE\u0B95 \u0B87\u0BB0\u0BC1\u0B95\u0BCD\u0B95 \u0BB5\u0BC7\u0BA3\u0BCD\u0B9F\u0BC1\u0BAE\u0BCD`;case"unrecognized_keys":return`\u0B85\u0B9F\u0BC8\u0BAF\u0BBE\u0BB3\u0BAE\u0BCD \u0BA4\u0BC6\u0BB0\u0BBF\u0BAF\u0BBE\u0BA4 \u0BB5\u0BBF\u0B9A\u0BC8${i.keys.length>1?"\u0B95\u0BB3\u0BCD":""}: ${C(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BB5\u0BBF\u0B9A\u0BC8`;case"invalid_union":return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1";case"invalid_element":return`${i.origin} \u0B87\u0BB2\u0BCD \u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0BAE\u0BA4\u0BBF\u0BAA\u0BCD\u0BAA\u0BC1`;default:return"\u0BA4\u0BB5\u0BB1\u0BBE\u0BA9 \u0B89\u0BB3\u0BCD\u0BB3\u0BC0\u0B9F\u0BC1"}}};function kw(){return{localeError:qj()}}var Gj=()=>{let e={string:{unit:"\u0E15\u0E31\u0E27\u0E2D\u0E31\u0E01\u0E29\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},file:{unit:"\u0E44\u0E1A\u0E15\u0E4C",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},array:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"},set:{unit:"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23",verb:"\u0E04\u0E27\u0E23\u0E21\u0E35"}};function t(i){return e[i]??null}let n={regex:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19",email:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48\u0E2D\u0E35\u0E40\u0E21\u0E25",url:"URL",emoji:"\u0E2D\u0E34\u0E42\u0E21\u0E08\u0E34",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",date:"\u0E27\u0E31\u0E19\u0E17\u0E35\u0E48\u0E41\u0E1A\u0E1A ISO",time:"\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",duration:"\u0E0A\u0E48\u0E27\u0E07\u0E40\u0E27\u0E25\u0E32\u0E41\u0E1A\u0E1A ISO",ipv4:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv4",ipv6:"\u0E17\u0E35\u0E48\u0E2D\u0E22\u0E39\u0E48 IPv6",cidrv4:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv4",cidrv6:"\u0E0A\u0E48\u0E27\u0E07 IP \u0E41\u0E1A\u0E1A IPv6",base64:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64",base64url:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A Base64 \u0E2A\u0E33\u0E2B\u0E23\u0E31\u0E1A URL",json_string:"\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E41\u0E1A\u0E1A JSON",e164:"\u0E40\u0E1A\u0E2D\u0E23\u0E4C\u0E42\u0E17\u0E23\u0E28\u0E31\u0E1E\u0E17\u0E4C\u0E23\u0E30\u0E2B\u0E27\u0E48\u0E32\u0E07\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28 (E.164)",jwt:"\u0E42\u0E17\u0E40\u0E04\u0E19 JWT",template_literal:"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E17\u0E35\u0E48\u0E1B\u0E49\u0E2D\u0E19"},r={nan:"NaN",number:"\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02",array:"\u0E2D\u0E32\u0E23\u0E4C\u0E40\u0E23\u0E22\u0E4C (Array)",null:"\u0E44\u0E21\u0E48\u0E21\u0E35\u0E04\u0E48\u0E32 (null)"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 instanceof ${i.expected} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`:`\u0E1B\u0E23\u0E30\u0E40\u0E20\u0E17\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${o} \u0E41\u0E15\u0E48\u0E44\u0E14\u0E49\u0E23\u0E31\u0E1A ${l}`}case"invalid_value":return i.values.length===1?`\u0E04\u0E48\u0E32\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19 ${L(i.values[0])}`:`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E37\u0E2D\u0E01\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E04\u0E27\u0E23\u0E40\u0E1B\u0E47\u0E19\u0E2B\u0E19\u0E36\u0E48\u0E07\u0E43\u0E19 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"\u0E44\u0E21\u0E48\u0E40\u0E01\u0E34\u0E19":"\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32",a=t(i.origin);return a?`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()} ${a.unit??"\u0E23\u0E32\u0E22\u0E01\u0E32\u0E23"}`:`\u0E40\u0E01\u0E34\u0E19\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin??"\u0E04\u0E48\u0E32"} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?"\u0E2D\u0E22\u0E48\u0E32\u0E07\u0E19\u0E49\u0E2D\u0E22":"\u0E21\u0E32\u0E01\u0E01\u0E27\u0E48\u0E32",a=t(i.origin);return a?`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()} ${a.unit}`:`\u0E19\u0E49\u0E2D\u0E22\u0E01\u0E27\u0E48\u0E32\u0E01\u0E33\u0E2B\u0E19\u0E14: ${i.origin} \u0E04\u0E27\u0E23\u0E21\u0E35${o} ${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E02\u0E36\u0E49\u0E19\u0E15\u0E49\u0E19\u0E14\u0E49\u0E27\u0E22 "${o.prefix}"`:o.format==="ends_with"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E25\u0E07\u0E17\u0E49\u0E32\u0E22\u0E14\u0E49\u0E27\u0E22 "${o.suffix}"`:o.format==="includes"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21\u0E15\u0E49\u0E2D\u0E07\u0E21\u0E35 "${o.includes}" \u0E2D\u0E22\u0E39\u0E48\u0E43\u0E19\u0E02\u0E49\u0E2D\u0E04\u0E27\u0E32\u0E21`:o.format==="regex"?`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14 ${o.pattern}`:`\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: ${n[o.format]??i.format}`}case"not_multiple_of":return`\u0E15\u0E31\u0E27\u0E40\u0E25\u0E02\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E15\u0E49\u0E2D\u0E07\u0E40\u0E1B\u0E47\u0E19\u0E08\u0E33\u0E19\u0E27\u0E19\u0E17\u0E35\u0E48\u0E2B\u0E32\u0E23\u0E14\u0E49\u0E27\u0E22 ${i.divisor} \u0E44\u0E14\u0E49\u0E25\u0E07\u0E15\u0E31\u0E27`;case"unrecognized_keys":return`\u0E1E\u0E1A\u0E04\u0E35\u0E22\u0E4C\u0E17\u0E35\u0E48\u0E44\u0E21\u0E48\u0E23\u0E39\u0E49\u0E08\u0E31\u0E01: ${C(i.keys,", ")}`;case"invalid_key":return`\u0E04\u0E35\u0E22\u0E4C\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;case"invalid_union":return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07: \u0E44\u0E21\u0E48\u0E15\u0E23\u0E07\u0E01\u0E31\u0E1A\u0E23\u0E39\u0E1B\u0E41\u0E1A\u0E1A\u0E22\u0E39\u0E40\u0E19\u0E35\u0E22\u0E19\u0E17\u0E35\u0E48\u0E01\u0E33\u0E2B\u0E19\u0E14\u0E44\u0E27\u0E49";case"invalid_element":return`\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07\u0E43\u0E19 ${i.origin}`;default:return"\u0E02\u0E49\u0E2D\u0E21\u0E39\u0E25\u0E44\u0E21\u0E48\u0E16\u0E39\u0E01\u0E15\u0E49\u0E2D\u0E07"}}};function ww(){return{localeError:Gj()}}var Wj=()=>{let e={string:{unit:"karakter",verb:"olmal\u0131"},file:{unit:"bayt",verb:"olmal\u0131"},array:{unit:"\xF6\u011Fe",verb:"olmal\u0131"},set:{unit:"\xF6\u011Fe",verb:"olmal\u0131"}};function t(i){return e[i]??null}let n={regex:"girdi",email:"e-posta adresi",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO tarih ve saat",date:"ISO tarih",time:"ISO saat",duration:"ISO s\xFCre",ipv4:"IPv4 adresi",ipv6:"IPv6 adresi",cidrv4:"IPv4 aral\u0131\u011F\u0131",cidrv6:"IPv6 aral\u0131\u011F\u0131",base64:"base64 ile \u015Fifrelenmi\u015F metin",base64url:"base64url ile \u015Fifrelenmi\u015F metin",json_string:"JSON dizesi",e164:"E.164 say\u0131s\u0131",jwt:"JWT",template_literal:"\u015Eablon dizesi"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Ge\xE7ersiz de\u011Fer: beklenen instanceof ${i.expected}, al\u0131nan ${l}`:`Ge\xE7ersiz de\u011Fer: beklenen ${o}, al\u0131nan ${l}`}case"invalid_value":return i.values.length===1?`Ge\xE7ersiz de\u011Fer: beklenen ${L(i.values[0])}`:`Ge\xE7ersiz se\xE7enek: a\u015Fa\u011F\u0131dakilerden biri olmal\u0131: ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()} ${a.unit??"\xF6\u011Fe"}`:`\xC7ok b\xFCy\xFCk: beklenen ${i.origin??"de\u011Fer"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\xC7ok k\xFC\xE7\xFCk: beklenen ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Ge\xE7ersiz metin: "${o.prefix}" ile ba\u015Flamal\u0131`:o.format==="ends_with"?`Ge\xE7ersiz metin: "${o.suffix}" ile bitmeli`:o.format==="includes"?`Ge\xE7ersiz metin: "${o.includes}" i\xE7ermeli`:o.format==="regex"?`Ge\xE7ersiz metin: ${o.pattern} desenine uymal\u0131`:`Ge\xE7ersiz ${n[o.format]??i.format}`}case"not_multiple_of":return`Ge\xE7ersiz say\u0131: ${i.divisor} ile tam b\xF6l\xFCnebilmeli`;case"unrecognized_keys":return`Tan\u0131nmayan anahtar${i.keys.length>1?"lar":""}: ${C(i.keys,", ")}`;case"invalid_key":return`${i.origin} i\xE7inde ge\xE7ersiz anahtar`;case"invalid_union":return"Ge\xE7ersiz de\u011Fer";case"invalid_element":return`${i.origin} i\xE7inde ge\xE7ersiz de\u011Fer`;default:return"Ge\xE7ersiz de\u011Fer"}}};function _w(){return{localeError:Wj()}}var Yj=()=>{let e={string:{unit:"\u0441\u0438\u043C\u0432\u043E\u043B\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},file:{unit:"\u0431\u0430\u0439\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},array:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"},set:{unit:"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432",verb:"\u043C\u0430\u0442\u0438\u043C\u0435"}};function t(i){return e[i]??null}let n={regex:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456",email:"\u0430\u0434\u0440\u0435\u0441\u0430 \u0435\u043B\u0435\u043A\u0442\u0440\u043E\u043D\u043D\u043E\u0457 \u043F\u043E\u0448\u0442\u0438",url:"URL",emoji:"\u0435\u043C\u043E\u0434\u0437\u0456",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\u0434\u0430\u0442\u0430 \u0442\u0430 \u0447\u0430\u0441 ISO",date:"\u0434\u0430\u0442\u0430 ISO",time:"\u0447\u0430\u0441 ISO",duration:"\u0442\u0440\u0438\u0432\u0430\u043B\u0456\u0441\u0442\u044C ISO",ipv4:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv4",ipv6:"\u0430\u0434\u0440\u0435\u0441\u0430 IPv6",cidrv4:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv4",cidrv6:"\u0434\u0456\u0430\u043F\u0430\u0437\u043E\u043D IPv6",base64:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64",base64url:"\u0440\u044F\u0434\u043E\u043A \u0443 \u043A\u043E\u0434\u0443\u0432\u0430\u043D\u043D\u0456 base64url",json_string:"\u0440\u044F\u0434\u043E\u043A JSON",e164:"\u043D\u043E\u043C\u0435\u0440 E.164",jwt:"JWT",template_literal:"\u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"},r={nan:"NaN",number:"\u0447\u0438\u0441\u043B\u043E",array:"\u043C\u0430\u0441\u0438\u0432"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F instanceof ${i.expected}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${o}, \u043E\u0442\u0440\u0438\u043C\u0430\u043D\u043E ${l}`}case"invalid_value":return i.values.length===1?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F ${L(i.values[0])}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0430 \u043E\u043F\u0446\u0456\u044F: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F \u043E\u0434\u043D\u0435 \u0437 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"\u0435\u043B\u0435\u043C\u0435\u043D\u0442\u0456\u0432"}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u0432\u0435\u043B\u0438\u043A\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin??"\u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F"} \u0431\u0443\u0434\u0435 ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`\u0417\u0430\u043D\u0430\u0434\u0442\u043E \u043C\u0430\u043B\u0435: \u043E\u0447\u0456\u043A\u0443\u0454\u0442\u044C\u0441\u044F, \u0449\u043E ${i.origin} \u0431\u0443\u0434\u0435 ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043F\u043E\u0447\u0438\u043D\u0430\u0442\u0438\u0441\u044F \u0437 "${o.prefix}"`:o.format==="ends_with"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0437\u0430\u043A\u0456\u043D\u0447\u0443\u0432\u0430\u0442\u0438\u0441\u044F \u043D\u0430 "${o.suffix}"`:o.format==="includes"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u043C\u0456\u0441\u0442\u0438\u0442\u0438 "${o.includes}"`:o.format==="regex"?`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u0440\u044F\u0434\u043E\u043A: \u043F\u043E\u0432\u0438\u043D\u0435\u043D \u0432\u0456\u0434\u043F\u043E\u0432\u0456\u0434\u0430\u0442\u0438 \u0448\u0430\u0431\u043B\u043E\u043D\u0443 ${o.pattern}`:`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0447\u0438\u0441\u043B\u043E: \u043F\u043E\u0432\u0438\u043D\u043D\u043E \u0431\u0443\u0442\u0438 \u043A\u0440\u0430\u0442\u043D\u0438\u043C ${i.divisor}`;case"unrecognized_keys":return`\u041D\u0435\u0440\u043E\u0437\u043F\u0456\u0437\u043D\u0430\u043D\u0438\u0439 \u043A\u043B\u044E\u0447${i.keys.length>1?"\u0456":""}: ${C(i.keys,", ")}`;case"invalid_key":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0438\u0439 \u043A\u043B\u044E\u0447 \u0443 ${i.origin}`;case"invalid_union":return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456";case"invalid_element":return`\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0435 \u0437\u043D\u0430\u0447\u0435\u043D\u043D\u044F \u0443 ${i.origin}`;default:return"\u041D\u0435\u043F\u0440\u0430\u0432\u0438\u043B\u044C\u043D\u0456 \u0432\u0445\u0456\u0434\u043D\u0456 \u0434\u0430\u043D\u0456"}}};function Au(){return{localeError:Yj()}}function $w(){return Au()}var Jj=()=>{let e={string:{unit:"\u062D\u0631\u0648\u0641",verb:"\u06C1\u0648\u0646\u0627"},file:{unit:"\u0628\u0627\u0626\u0679\u0633",verb:"\u06C1\u0648\u0646\u0627"},array:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"},set:{unit:"\u0622\u0626\u0679\u0645\u0632",verb:"\u06C1\u0648\u0646\u0627"}};function t(i){return e[i]??null}let n={regex:"\u0627\u0646 \u067E\u0679",email:"\u0627\u06CC \u0645\u06CC\u0644 \u0627\u06CC\u0688\u0631\u06CC\u0633",url:"\u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644",emoji:"\u0627\u06CC\u0645\u0648\u062C\u06CC",uuid:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",uuidv4:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 4",uuidv6:"\u06CC\u0648 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC \u0648\u06CC 6",nanoid:"\u0646\u06CC\u0646\u0648 \u0622\u0626\u06CC \u0688\u06CC",guid:"\u062C\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",cuid2:"\u0633\u06CC \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC 2",ulid:"\u06CC\u0648 \u0627\u06CC\u0644 \u0622\u0626\u06CC \u0688\u06CC",xid:"\u0627\u06CC\u06A9\u0633 \u0622\u0626\u06CC \u0688\u06CC",ksuid:"\u06A9\u06D2 \u0627\u06CC\u0633 \u06CC\u0648 \u0622\u0626\u06CC \u0688\u06CC",datetime:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0688\u06CC\u0679 \u0679\u0627\u0626\u0645",date:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u062A\u0627\u0631\u06CC\u062E",time:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0648\u0642\u062A",duration:"\u0622\u0626\u06CC \u0627\u06CC\u0633 \u0627\u0648 \u0645\u062F\u062A",ipv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0627\u06CC\u0688\u0631\u06CC\u0633",ipv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0627\u06CC\u0688\u0631\u06CC\u0633",cidrv4:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 4 \u0631\u06CC\u0646\u062C",cidrv6:"\u0622\u0626\u06CC \u067E\u06CC \u0648\u06CC 6 \u0631\u06CC\u0646\u062C",base64:"\u0628\u06CC\u0633 64 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",base64url:"\u0628\u06CC\u0633 64 \u06CC\u0648 \u0622\u0631 \u0627\u06CC\u0644 \u0627\u0646 \u06A9\u0648\u0688\u0688 \u0633\u0679\u0631\u0646\u06AF",json_string:"\u062C\u06D2 \u0627\u06CC\u0633 \u0627\u0648 \u0627\u06CC\u0646 \u0633\u0679\u0631\u0646\u06AF",e164:"\u0627\u06CC 164 \u0646\u0645\u0628\u0631",jwt:"\u062C\u06D2 \u0688\u0628\u0644\u06CC\u0648 \u0679\u06CC",template_literal:"\u0627\u0646 \u067E\u0679"},r={nan:"NaN",number:"\u0646\u0645\u0628\u0631",array:"\u0622\u0631\u06D2",null:"\u0646\u0644"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: instanceof ${i.expected} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`:`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${o} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627\u060C ${l} \u0645\u0648\u0635\u0648\u0644 \u06C1\u0648\u0627`}case"invalid_value":return i.values.length===1?`\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679: ${L(i.values[0])} \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`:`\u063A\u0644\u0637 \u0622\u067E\u0634\u0646: ${C(i.values,"|")} \u0645\u06CC\u06BA \u0633\u06D2 \u0627\u06CC\u06A9 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u06D2 ${o}${i.maximum.toString()} ${a.unit??"\u0639\u0646\u0627\u0635\u0631"} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0628\u0691\u0627: ${i.origin??"\u0648\u06CC\u0644\u06CC\u0648"} \u06A9\u0627 ${o}${i.maximum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u06D2 ${o}${i.minimum.toString()} ${a.unit} \u06C1\u0648\u0646\u06D2 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u06D2`:`\u0628\u06C1\u062A \u0686\u06BE\u0648\u0679\u0627: ${i.origin} \u06A9\u0627 ${o}${i.minimum.toString()} \u06C1\u0648\u0646\u0627 \u0645\u062A\u0648\u0642\u0639 \u062A\u06BE\u0627`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.prefix}" \u0633\u06D2 \u0634\u0631\u0648\u0639 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="ends_with"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.suffix}" \u067E\u0631 \u062E\u062A\u0645 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="includes"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: "${o.includes}" \u0634\u0627\u0645\u0644 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:o.format==="regex"?`\u063A\u0644\u0637 \u0633\u0679\u0631\u0646\u06AF: \u067E\u06CC\u0679\u0631\u0646 ${o.pattern} \u0633\u06D2 \u0645\u06CC\u0686 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`:`\u063A\u0644\u0637 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u063A\u0644\u0637 \u0646\u0645\u0628\u0631: ${i.divisor} \u06A9\u0627 \u0645\u0636\u0627\u0639\u0641 \u06C1\u0648\u0646\u0627 \u0686\u0627\u06C1\u06CC\u06D2`;case"unrecognized_keys":return`\u063A\u06CC\u0631 \u062A\u0633\u0644\u06CC\u0645 \u0634\u062F\u06C1 \u06A9\u06CC${i.keys.length>1?"\u0632":""}: ${C(i.keys,"\u060C ")}`;case"invalid_key":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u06A9\u06CC`;case"invalid_union":return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679";case"invalid_element":return`${i.origin} \u0645\u06CC\u06BA \u063A\u0644\u0637 \u0648\u06CC\u0644\u06CC\u0648`;default:return"\u063A\u0644\u0637 \u0627\u0646 \u067E\u0679"}}};function zw(){return{localeError:Jj()}}var Xj=()=>{let e={string:{unit:"belgi",verb:"bo\u2018lishi kerak"},file:{unit:"bayt",verb:"bo\u2018lishi kerak"},array:{unit:"element",verb:"bo\u2018lishi kerak"},set:{unit:"element",verb:"bo\u2018lishi kerak"},map:{unit:"yozuv",verb:"bo\u2018lishi kerak"}};function t(i){return e[i]??null}let n={regex:"kirish",email:"elektron pochta manzili",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO sana va vaqti",date:"ISO sana",time:"ISO vaqt",duration:"ISO davomiylik",ipv4:"IPv4 manzil",ipv6:"IPv6 manzil",mac:"MAC manzil",cidrv4:"IPv4 diapazon",cidrv6:"IPv6 diapazon",base64:"base64 kodlangan satr",base64url:"base64url kodlangan satr",json_string:"JSON satr",e164:"E.164 raqam",jwt:"JWT",template_literal:"kirish"},r={nan:"NaN",number:"raqam",array:"massiv"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`Noto\u2018g\u2018ri kirish: kutilgan instanceof ${i.expected}, qabul qilingan ${l}`:`Noto\u2018g\u2018ri kirish: kutilgan ${o}, qabul qilingan ${l}`}case"invalid_value":return i.values.length===1?`Noto\u2018g\u2018ri kirish: kutilgan ${L(i.values[0])}`:`Noto\u2018g\u2018ri variant: quyidagilardan biri kutilgan ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()} ${a.unit} ${a.verb}`:`Juda katta: kutilgan ${i.origin??"qiymat"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()} ${a.unit} ${a.verb}`:`Juda kichik: kutilgan ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Noto\u2018g\u2018ri satr: "${o.prefix}" bilan boshlanishi kerak`:o.format==="ends_with"?`Noto\u2018g\u2018ri satr: "${o.suffix}" bilan tugashi kerak`:o.format==="includes"?`Noto\u2018g\u2018ri satr: "${o.includes}" ni o\u2018z ichiga olishi kerak`:o.format==="regex"?`Noto\u2018g\u2018ri satr: ${o.pattern} shabloniga mos kelishi kerak`:`Noto\u2018g\u2018ri ${n[o.format]??i.format}`}case"not_multiple_of":return`Noto\u2018g\u2018ri raqam: ${i.divisor} ning karralisi bo\u2018lishi kerak`;case"unrecognized_keys":return`Noma\u2019lum kalit${i.keys.length>1?"lar":""}: ${C(i.keys,", ")}`;case"invalid_key":return`${i.origin} dagi kalit noto\u2018g\u2018ri`;case"invalid_union":return"Noto\u2018g\u2018ri kirish";case"invalid_element":return`${i.origin} da noto\u2018g\u2018ri qiymat`;default:return"Noto\u2018g\u2018ri kirish"}}};function Tw(){return{localeError:Xj()}}var Kj=()=>{let e={string:{unit:"k\xFD t\u1EF1",verb:"c\xF3"},file:{unit:"byte",verb:"c\xF3"},array:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"},set:{unit:"ph\u1EA7n t\u1EED",verb:"c\xF3"}};function t(i){return e[i]??null}let n={regex:"\u0111\u1EA7u v\xE0o",email:"\u0111\u1ECBa ch\u1EC9 email",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ng\xE0y gi\u1EDD ISO",date:"ng\xE0y ISO",time:"gi\u1EDD ISO",duration:"kho\u1EA3ng th\u1EDDi gian ISO",ipv4:"\u0111\u1ECBa ch\u1EC9 IPv4",ipv6:"\u0111\u1ECBa ch\u1EC9 IPv6",cidrv4:"d\u1EA3i IPv4",cidrv6:"d\u1EA3i IPv6",base64:"chu\u1ED7i m\xE3 h\xF3a base64",base64url:"chu\u1ED7i m\xE3 h\xF3a base64url",json_string:"chu\u1ED7i JSON",e164:"s\u1ED1 E.164",jwt:"JWT",template_literal:"\u0111\u1EA7u v\xE0o"},r={nan:"NaN",number:"s\u1ED1",array:"m\u1EA3ng"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i instanceof ${i.expected}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`:`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${o}, nh\u1EADn \u0111\u01B0\u1EE3c ${l}`}case"invalid_value":return i.values.length===1?`\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i ${L(i.values[0])}`:`T\xF9y ch\u1ECDn kh\xF4ng h\u1EE3p l\u1EC7: mong \u0111\u1EE3i m\u1ED9t trong c\xE1c gi\xE1 tr\u1ECB ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${a.verb} ${o}${i.maximum.toString()} ${a.unit??"ph\u1EA7n t\u1EED"}`:`Qu\xE1 l\u1EDBn: mong \u0111\u1EE3i ${i.origin??"gi\xE1 tr\u1ECB"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${a.verb} ${o}${i.minimum.toString()} ${a.unit}`:`Qu\xE1 nh\u1ECF: mong \u0111\u1EE3i ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i b\u1EAFt \u0111\u1EA7u b\u1EB1ng "${o.prefix}"`:o.format==="ends_with"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i k\u1EBFt th\xFAc b\u1EB1ng "${o.suffix}"`:o.format==="includes"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i bao g\u1ED3m "${o.includes}"`:o.format==="regex"?`Chu\u1ED7i kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i kh\u1EDBp v\u1EDBi m\u1EABu ${o.pattern}`:`${n[o.format]??i.format} kh\xF4ng h\u1EE3p l\u1EC7`}case"not_multiple_of":return`S\u1ED1 kh\xF4ng h\u1EE3p l\u1EC7: ph\u1EA3i l\xE0 b\u1ED9i s\u1ED1 c\u1EE7a ${i.divisor}`;case"unrecognized_keys":return`Kh\xF3a kh\xF4ng \u0111\u01B0\u1EE3c nh\u1EADn d\u1EA1ng: ${C(i.keys,", ")}`;case"invalid_key":return`Kh\xF3a kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;case"invalid_union":return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7";case"invalid_element":return`Gi\xE1 tr\u1ECB kh\xF4ng h\u1EE3p l\u1EC7 trong ${i.origin}`;default:return"\u0110\u1EA7u v\xE0o kh\xF4ng h\u1EE3p l\u1EC7"}}};function Cw(){return{localeError:Kj()}}var Qj=()=>{let e={string:{unit:"\u5B57\u7B26",verb:"\u5305\u542B"},file:{unit:"\u5B57\u8282",verb:"\u5305\u542B"},array:{unit:"\u9879",verb:"\u5305\u542B"},set:{unit:"\u9879",verb:"\u5305\u542B"}};function t(i){return e[i]??null}let n={regex:"\u8F93\u5165",email:"\u7535\u5B50\u90AE\u4EF6",url:"URL",emoji:"\u8868\u60C5\u7B26\u53F7",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO\u65E5\u671F\u65F6\u95F4",date:"ISO\u65E5\u671F",time:"ISO\u65F6\u95F4",duration:"ISO\u65F6\u957F",ipv4:"IPv4\u5730\u5740",ipv6:"IPv6\u5730\u5740",cidrv4:"IPv4\u7F51\u6BB5",cidrv6:"IPv6\u7F51\u6BB5",base64:"base64\u7F16\u7801\u5B57\u7B26\u4E32",base64url:"base64url\u7F16\u7801\u5B57\u7B26\u4E32",json_string:"JSON\u5B57\u7B26\u4E32",e164:"E.164\u53F7\u7801",jwt:"JWT",template_literal:"\u8F93\u5165"},r={nan:"NaN",number:"\u6570\u5B57",array:"\u6570\u7EC4",null:"\u7A7A\u503C(null)"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B instanceof ${i.expected}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`:`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${o}\uFF0C\u5B9E\u9645\u63A5\u6536 ${l}`}case"invalid_value":return i.values.length===1?`\u65E0\u6548\u8F93\u5165\uFF1A\u671F\u671B ${L(i.values[0])}`:`\u65E0\u6548\u9009\u9879\uFF1A\u671F\u671B\u4EE5\u4E0B\u4E4B\u4E00 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()} ${a.unit??"\u4E2A\u5143\u7D20"}`:`\u6570\u503C\u8FC7\u5927\uFF1A\u671F\u671B ${i.origin??"\u503C"} ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()} ${a.unit}`:`\u6570\u503C\u8FC7\u5C0F\uFF1A\u671F\u671B ${i.origin} ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.prefix}" \u5F00\u5934`:o.format==="ends_with"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u4EE5 "${o.suffix}" \u7ED3\u5C3E`:o.format==="includes"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u65E0\u6548\u5B57\u7B26\u4E32\uFF1A\u5FC5\u987B\u6EE1\u8DB3\u6B63\u5219\u8868\u8FBE\u5F0F ${o.pattern}`:`\u65E0\u6548${n[o.format]??i.format}`}case"not_multiple_of":return`\u65E0\u6548\u6570\u5B57\uFF1A\u5FC5\u987B\u662F ${i.divisor} \u7684\u500D\u6570`;case"unrecognized_keys":return`\u51FA\u73B0\u672A\u77E5\u7684\u952E(key): ${C(i.keys,", ")}`;case"invalid_key":return`${i.origin} \u4E2D\u7684\u952E(key)\u65E0\u6548`;case"invalid_union":return"\u65E0\u6548\u8F93\u5165";case"invalid_element":return`${i.origin} \u4E2D\u5305\u542B\u65E0\u6548\u503C(value)`;default:return"\u65E0\u6548\u8F93\u5165"}}};function Ew(){return{localeError:Qj()}}var eO=()=>{let e={string:{unit:"\u5B57\u5143",verb:"\u64C1\u6709"},file:{unit:"\u4F4D\u5143\u7D44",verb:"\u64C1\u6709"},array:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"},set:{unit:"\u9805\u76EE",verb:"\u64C1\u6709"}};function t(i){return e[i]??null}let n={regex:"\u8F38\u5165",email:"\u90F5\u4EF6\u5730\u5740",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"ISO \u65E5\u671F\u6642\u9593",date:"ISO \u65E5\u671F",time:"ISO \u6642\u9593",duration:"ISO \u671F\u9593",ipv4:"IPv4 \u4F4D\u5740",ipv6:"IPv6 \u4F4D\u5740",cidrv4:"IPv4 \u7BC4\u570D",cidrv6:"IPv6 \u7BC4\u570D",base64:"base64 \u7DE8\u78BC\u5B57\u4E32",base64url:"base64url \u7DE8\u78BC\u5B57\u4E32",json_string:"JSON \u5B57\u4E32",e164:"E.164 \u6578\u503C",jwt:"JWT",template_literal:"\u8F38\u5165"},r={nan:"NaN"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA instanceof ${i.expected}\uFF0C\u4F46\u6536\u5230 ${l}`:`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${o}\uFF0C\u4F46\u6536\u5230 ${l}`}case"invalid_value":return i.values.length===1?`\u7121\u6548\u7684\u8F38\u5165\u503C\uFF1A\u9810\u671F\u70BA ${L(i.values[0])}`:`\u7121\u6548\u7684\u9078\u9805\uFF1A\u9810\u671F\u70BA\u4EE5\u4E0B\u5176\u4E2D\u4E4B\u4E00 ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()} ${a.unit??"\u500B\u5143\u7D20"}`:`\u6578\u503C\u904E\u5927\uFF1A\u9810\u671F ${i.origin??"\u503C"} \u61C9\u70BA ${o}${i.maximum.toString()}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()} ${a.unit}`:`\u6578\u503C\u904E\u5C0F\uFF1A\u9810\u671F ${i.origin} \u61C9\u70BA ${o}${i.minimum.toString()}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.prefix}" \u958B\u982D`:o.format==="ends_with"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u4EE5 "${o.suffix}" \u7D50\u5C3E`:o.format==="includes"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u5305\u542B "${o.includes}"`:o.format==="regex"?`\u7121\u6548\u7684\u5B57\u4E32\uFF1A\u5FC5\u9808\u7B26\u5408\u683C\u5F0F ${o.pattern}`:`\u7121\u6548\u7684 ${n[o.format]??i.format}`}case"not_multiple_of":return`\u7121\u6548\u7684\u6578\u5B57\uFF1A\u5FC5\u9808\u70BA ${i.divisor} \u7684\u500D\u6578`;case"unrecognized_keys":return`\u7121\u6CD5\u8B58\u5225\u7684\u9375\u503C${i.keys.length>1?"\u5011":""}\uFF1A${C(i.keys,"\u3001")}`;case"invalid_key":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u9375\u503C`;case"invalid_union":return"\u7121\u6548\u7684\u8F38\u5165\u503C";case"invalid_element":return`${i.origin} \u4E2D\u6709\u7121\u6548\u7684\u503C`;default:return"\u7121\u6548\u7684\u8F38\u5165\u503C"}}};function Iw(){return{localeError:eO()}}var tO=()=>{let e={string:{unit:"\xE0mi",verb:"n\xED"},file:{unit:"bytes",verb:"n\xED"},array:{unit:"nkan",verb:"n\xED"},set:{unit:"nkan",verb:"n\xED"}};function t(i){return e[i]??null}let n={regex:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9",email:"\xE0d\xEDr\u1EB9\u0301s\xEC \xECm\u1EB9\u0301l\xEC",url:"URL",emoji:"emoji",uuid:"UUID",uuidv4:"UUIDv4",uuidv6:"UUIDv6",nanoid:"nanoid",guid:"GUID",cuid:"cuid",cuid2:"cuid2",ulid:"ULID",xid:"XID",ksuid:"KSUID",datetime:"\xE0k\xF3k\xF2 ISO",date:"\u1ECDj\u1ECD\u0301 ISO",time:"\xE0k\xF3k\xF2 ISO",duration:"\xE0k\xF3k\xF2 t\xF3 p\xE9 ISO",ipv4:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv4",ipv6:"\xE0d\xEDr\u1EB9\u0301s\xEC IPv6",cidrv4:"\xE0gb\xE8gb\xE8 IPv4",cidrv6:"\xE0gb\xE8gb\xE8 IPv6",base64:"\u1ECD\u0300r\u1ECD\u0300 t\xED a k\u1ECD\u0301 n\xED base64",base64url:"\u1ECD\u0300r\u1ECD\u0300 base64url",json_string:"\u1ECD\u0300r\u1ECD\u0300 JSON",e164:"n\u1ECD\u0301mb\xE0 E.164",jwt:"JWT",template_literal:"\u1EB9\u0300r\u1ECD \xECb\xE1w\u1ECDl\xE9"},r={nan:"NaN",number:"n\u1ECD\u0301mb\xE0",array:"akop\u1ECD"};return i=>{switch(i.code){case"invalid_type":{let o=r[i.expected]??i.expected,a=P(i.input),l=r[a]??a;return/^[A-Z]/.test(i.expected)?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi instanceof ${i.expected}, \xE0m\u1ECD\u0300 a r\xED ${l}`:`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${o}, \xE0m\u1ECD\u0300 a r\xED ${l}`}case"invalid_value":return i.values.length===1?`\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e: a n\xED l\xE1ti fi ${L(i.values[0])}`:`\xC0\u1E63\xE0y\xE0n a\u1E63\xEC\u1E63e: yan \u1ECD\u0300kan l\xE1ra ${C(i.values,"|")}`;case"too_big":{let o=i.inclusive?"<=":"<",a=t(i.origin);return a?`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin??"iye"} ${a.verb} ${o}${i.maximum} ${a.unit}`:`T\xF3 p\u1ECD\u0300 j\xF9: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.maximum}`}case"too_small":{let o=i.inclusive?">=":">",a=t(i.origin);return a?`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 p\xE9 ${i.origin} ${a.verb} ${o}${i.minimum} ${a.unit}`:`K\xE9r\xE9 ju: a n\xED l\xE1ti j\u1EB9\u0301 ${o}${i.minimum}`}case"invalid_format":{let o=i;return o.format==="starts_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\u1EB9\u0300r\u1EB9\u0300 p\u1EB9\u0300l\xFA "${o.prefix}"`:o.format==="ends_with"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 par\xED p\u1EB9\u0300l\xFA "${o.suffix}"`:o.format==="includes"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 n\xED "${o.includes}"`:o.format==="regex"?`\u1ECC\u0300r\u1ECD\u0300 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 b\xE1 \xE0p\u1EB9\u1EB9r\u1EB9 mu ${o.pattern}`:`A\u1E63\xEC\u1E63e: ${n[o.format]??i.format}`}case"not_multiple_of":return`N\u1ECD\u0301mb\xE0 a\u1E63\xEC\u1E63e: gb\u1ECD\u0301d\u1ECD\u0300 j\u1EB9\u0301 \xE8y\xE0 p\xEDp\xEDn ti ${i.divisor}`;case"unrecognized_keys":return`B\u1ECDt\xECn\xEC \xE0\xECm\u1ECD\u0300: ${C(i.keys,", ")}`;case"invalid_key":return`B\u1ECDt\xECn\xEC a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;case"invalid_union":return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e";case"invalid_element":return`Iye a\u1E63\xEC\u1E63e n\xEDn\xFA ${i.origin}`;default:return"\xCCb\xE1w\u1ECDl\xE9 a\u1E63\xEC\u1E63e"}}};function Dw(){return{localeError:tO()}}var Aw,Og=Symbol("ZodOutput"),Ng=Symbol("ZodInput"),ju=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(t,...n){let r=n[0];return this._map.set(t,r),r&&typeof r=="object"&&"id"in r&&this._idmap.set(r.id,t),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(t){let n=this._map.get(t);return n&&typeof n=="object"&&"id"in n&&this._idmap.delete(n.id),this._map.delete(t),this}get(t){let n=t._zod.parent;if(n){let r={...this.get(n)??{}};delete r.id;let i={...r,...this._map.get(t)};return Object.keys(i).length?i:void 0}return this._map.get(t)}has(t){return this._map.has(t)}};function Ou(){return new ju}(Aw=globalThis).__zod_globalRegistry??(Aw.__zod_globalRegistry=Ou());var Gt=globalThis.__zod_globalRegistry;function Ug(e,t){return new e({type:"string",...Y(t)})}function Rg(e,t){return new e({type:"string",coerce:!0,...Y(t)})}function Nu(e,t){return new e({type:"string",format:"email",check:"string_format",abort:!1,...Y(t)})}function Ss(e,t){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...Y(t)})}function Uu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...Y(t)})}function Ru(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...Y(t)})}function Mu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...Y(t)})}function Bu(e,t){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...Y(t)})}function ks(e,t){return new e({type:"string",format:"url",check:"string_format",abort:!1,...Y(t)})}function Lu(e,t){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...Y(t)})}function Pu(e,t){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...Y(t)})}function Zu(e,t){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...Y(t)})}function Fu(e,t){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...Y(t)})}function Hu(e,t){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...Y(t)})}function Vu(e,t){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...Y(t)})}function qu(e,t){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...Y(t)})}function Gu(e,t){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...Y(t)})}function Wu(e,t){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...Y(t)})}function Mg(e,t){return new e({type:"string",format:"mac",check:"string_format",abort:!1,...Y(t)})}function Yu(e,t){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...Y(t)})}function Ju(e,t){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...Y(t)})}function Xu(e,t){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...Y(t)})}function Ku(e,t){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...Y(t)})}function Qu(e,t){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...Y(t)})}function ed(e,t){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...Y(t)})}var Bg={Any:null,Minute:-1,Second:0,Millisecond:3,Microsecond:6};function Lg(e,t){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...Y(t)})}function Pg(e,t){return new e({type:"string",format:"date",check:"string_format",...Y(t)})}function Zg(e,t){return new e({type:"string",format:"time",check:"string_format",precision:null,...Y(t)})}function Fg(e,t){return new e({type:"string",format:"duration",check:"string_format",...Y(t)})}function Hg(e,t){return new e({type:"number",checks:[],...Y(t)})}function Vg(e,t){return new e({type:"number",coerce:!0,checks:[],...Y(t)})}function qg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...Y(t)})}function Gg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float32",...Y(t)})}function Wg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"float64",...Y(t)})}function Yg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"int32",...Y(t)})}function Jg(e,t){return new e({type:"number",check:"number_format",abort:!1,format:"uint32",...Y(t)})}function Xg(e,t){return new e({type:"boolean",...Y(t)})}function Kg(e,t){return new e({type:"boolean",coerce:!0,...Y(t)})}function Qg(e,t){return new e({type:"bigint",...Y(t)})}function ey(e,t){return new e({type:"bigint",coerce:!0,...Y(t)})}function ty(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"int64",...Y(t)})}function ny(e,t){return new e({type:"bigint",check:"bigint_format",abort:!1,format:"uint64",...Y(t)})}function iy(e,t){return new e({type:"symbol",...Y(t)})}function ry(e,t){return new e({type:"undefined",...Y(t)})}function oy(e,t){return new e({type:"null",...Y(t)})}function ay(e){return new e({type:"any"})}function ly(e){return new e({type:"unknown"})}function sy(e,t){return new e({type:"never",...Y(t)})}function cy(e,t){return new e({type:"void",...Y(t)})}function uy(e,t){return new e({type:"date",...Y(t)})}function dy(e,t){return new e({type:"date",coerce:!0,...Y(t)})}function fy(e,t){return new e({type:"nan",...Y(t)})}function Ii(e,t){return new bu({check:"less_than",...Y(t),value:e,inclusive:!1})}function Mn(e,t){return new bu({check:"less_than",...Y(t),value:e,inclusive:!0})}function Di(e,t){return new xu({check:"greater_than",...Y(t),value:e,inclusive:!1})}function mn(e,t){return new xu({check:"greater_than",...Y(t),value:e,inclusive:!0})}function td(e){return Di(0,e)}function nd(e){return Ii(0,e)}function id(e){return Mn(0,e)}function rd(e){return mn(0,e)}function Or(e,t){return new op({check:"multiple_of",...Y(t),value:e})}function Nr(e,t){return new sp({check:"max_size",...Y(t),maximum:e})}function Ai(e,t){return new cp({check:"min_size",...Y(t),minimum:e})}function Do(e,t){return new up({check:"size_equals",...Y(t),size:e})}function Ao(e,t){return new dp({check:"max_length",...Y(t),maximum:e})}function Qi(e,t){return new fp({check:"min_length",...Y(t),minimum:e})}function jo(e,t){return new mp({check:"length_equals",...Y(t),length:e})}function Sa(e,t){return new hp({check:"string_format",format:"regex",...Y(t),pattern:e})}function ka(e){return new pp({check:"string_format",format:"lowercase",...Y(e)})}function wa(e){return new gp({check:"string_format",format:"uppercase",...Y(e)})}function _a(e,t){return new yp({check:"string_format",format:"includes",...Y(t),includes:e})}function $a(e,t){return new vp({check:"string_format",format:"starts_with",...Y(t),prefix:e})}function za(e,t){return new bp({check:"string_format",format:"ends_with",...Y(t),suffix:e})}function od(e,t,n){return new xp({check:"property",property:e,schema:t,...Y(n)})}function Ta(e,t){return new Sp({check:"mime_type",mime:e,...Y(t)})}function xi(e){return new kp({check:"overwrite",tx:e})}function Ca(e){return xi(t=>t.normalize(e))}function Ea(){return xi(e=>e.trim())}function Ia(){return xi(e=>e.toLowerCase())}function Da(){return xi(e=>e.toUpperCase())}function Aa(){return xi(e=>vh(e))}function my(e,t,n){return new e({type:"array",element:t,...Y(n)})}function iO(e,t,n){return new e({type:"union",options:t,...Y(n)})}function rO(e,t,n){return new e({type:"union",options:t,inclusive:!1,...Y(n)})}function oO(e,t,n,r){return new e({type:"union",options:n,discriminator:t,...Y(r)})}function aO(e,t,n){return new e({type:"intersection",left:t,right:n})}function lO(e,t,n,r){let i=n instanceof xe,o=i?r:n,a=i?n:null;return new e({type:"tuple",items:t,rest:a,...Y(o)})}function sO(e,t,n,r){return new e({type:"record",keyType:t,valueType:n,...Y(r)})}function cO(e,t,n,r){return new e({type:"map",keyType:t,valueType:n,...Y(r)})}function uO(e,t,n){return new e({type:"set",valueType:t,...Y(n)})}function dO(e,t,n){let r=Array.isArray(t)?Object.fromEntries(t.map(i=>[i,i])):t;return new e({type:"enum",entries:r,...Y(n)})}function fO(e,t,n){return new e({type:"enum",entries:t,...Y(n)})}function mO(e,t,n){return new e({type:"literal",values:Array.isArray(t)?t:[t],...Y(n)})}function hy(e,t){return new e({type:"file",...Y(t)})}function hO(e,t){return new e({type:"transform",transform:t})}function pO(e,t){return new e({type:"optional",innerType:t})}function gO(e,t){return new e({type:"nullable",innerType:t})}function yO(e,t,n){return new e({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():xh(n)}})}function vO(e,t,n){return new e({type:"nonoptional",innerType:t,...Y(n)})}function bO(e,t){return new e({type:"success",innerType:t})}function xO(e,t,n){return new e({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}function SO(e,t,n){return new e({type:"pipe",in:t,out:n})}function kO(e,t){return new e({type:"readonly",innerType:t})}function wO(e,t,n){return new e({type:"template_literal",parts:t,...Y(n)})}function _O(e,t){return new e({type:"lazy",getter:t})}function $O(e,t){return new e({type:"promise",innerType:t})}function py(e,t,n){let r=Y(n);return r.abort??(r.abort=!0),new e({type:"custom",check:"custom",fn:t,...r})}function gy(e,t,n){return new e({type:"custom",check:"custom",fn:t,...Y(n)})}function yy(e,t){let n=jw(r=>(r.addIssue=i=>{if(typeof i=="string")r.issues.push(ha(i,r.value,n._zod.def));else{let o=i;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=r.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),r.issues.push(ha(o))}},e(r.value,r)),t);return n}function jw(e,t){let n=new it({check:"custom",...Y(t)});return n._zod.check=e,n}function vy(e){let t=new it({check:"describe"});return t._zod.onattach=[n=>{let r=Gt.get(n)??{};Gt.add(n,{...r,description:e})}],t._zod.check=()=>{},t}function by(e){let t=new it({check:"meta"});return t._zod.onattach=[n=>{let r=Gt.get(n)??{};Gt.add(n,{...r,...e})}],t._zod.check=()=>{},t}function xy(e,t){let n=Y(t),r=n.truthy??["true","1","yes","on","y","enabled"],i=n.falsy??["false","0","no","off","n","disabled"];n.case!=="sensitive"&&(r=r.map(f=>typeof f=="string"?f.toLowerCase():f),i=i.map(f=>typeof f=="string"?f.toLowerCase():f));let o=new Set(r),a=new Set(i),l=e.Codec??vs,c=e.Boolean??gs,u=e.String??Io,d=new u({type:"string",error:n.error}),m=new c({type:"boolean",error:n.error}),h=new l({type:"pipe",in:d,out:m,transform:((f,v)=>{let k=f;return n.case!=="sensitive"&&(k=k.toLowerCase()),o.has(k)?!0:a.has(k)?!1:(v.issues.push({code:"invalid_value",expected:"stringbool",values:[...o,...a],input:v.value,inst:h,continue:!1}),{})}),reverseTransform:((f,v)=>f===!0?r[0]||"true":i[0]||"false"),error:n.error});return h}function ja(e,t,n,r={}){let i=Y(r),o={...Y(r),check:"string_format",type:"string",format:t,fn:typeof n=="function"?n:l=>n.test(l),...i};return n instanceof RegExp&&(o.pattern=n),new e(o)}function Ur(e){let t=e?.target??"draft-2020-12";return t==="draft-4"&&(t="draft-04"),t==="draft-7"&&(t="draft-07"),{processors:e.processors??{},metadataRegistry:e?.metadata??Gt,target:t,unrepresentable:e?.unrepresentable??"throw",override:e?.override??(()=>{}),io:e?.io??"output",counter:0,seen:new Map,cycles:e?.cycles??"ref",reused:e?.reused??"inline",external:e?.external??void 0}}function Fe(e,t,n={path:[],schemaPath:[]}){var r;let i=e._zod.def,o=t.seen.get(e);if(o)return o.count++,n.schemaPath.includes(e)&&(o.cycle=n.path),o.schema;let a={schema:{},count:1,cycle:void 0,path:n.path};t.seen.set(e,a);let l=e._zod.toJSONSchema?.();if(l)a.schema=l;else{let d={...n,schemaPath:[...n.schemaPath,e],path:n.path};if(e._zod.processJSONSchema)e._zod.processJSONSchema(t,a.schema,d);else{let h=a.schema,f=t.processors[i.type];if(!f)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${i.type}`);f(e,t,h,d)}let m=e._zod.parent;m&&(a.ref||(a.ref=m),Fe(m,t,d),t.seen.get(m).isParent=!0)}let c=t.metadataRegistry.get(e);return c&&Object.assign(a.schema,c),t.io==="input"&&hn(e)&&(delete a.schema.examples,delete a.schema.default),t.io==="input"&&"_prefault"in a.schema&&((r=a.schema).default??(r.default=a.schema._prefault)),delete a.schema._prefault,t.seen.get(e).schema}function Rr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=new Map;for(let a of e.seen.entries()){let l=e.metadataRegistry.get(a[0])?.id;if(l){let c=r.get(l);if(c&&c!==a[0])throw new Error(`Duplicate schema id "${l}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);r.set(l,a[0])}}let i=a=>{let l=e.target==="draft-2020-12"?"$defs":"definitions";if(e.external){let m=e.external.registry.get(a[0])?.id,h=e.external.uri??(v=>v);if(m)return{ref:h(m)};let f=a[1].defId??a[1].schema.id??`schema${e.counter++}`;return a[1].defId=f,{defId:f,ref:`${h("__shared")}#/${l}/${f}`}}if(a[1]===n)return{ref:"#"};let u=`#/${l}/`,d=a[1].schema.id??`__schema${e.counter++}`;return{defId:d,ref:u+d}},o=a=>{if(a[1].schema.$ref)return;let l=a[1],{ref:c,defId:u}=i(a);l.def={...l.schema},u&&(l.defId=u);let d=l.schema;for(let m in d)delete d[m];d.$ref=c};if(e.cycles==="throw")for(let a of e.seen.entries()){let l=a[1];if(l.cycle)throw new Error(`Cycle detected: #/${l.cycle?.join("/")}/<root>
|
|
72
|
-
|
|
73
|
-
Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(let a of e.seen.entries()){let l=a[1];if(t===a[0]){o(a);continue}if(e.external){let u=e.external.registry.get(a[0])?.id;if(t!==a[0]&&u){o(a);continue}}if(e.metadataRegistry.get(a[0])?.id){o(a);continue}if(l.cycle){o(a);continue}if(l.count>1&&e.reused==="ref"){o(a);continue}}}function Mr(e,t){let n=e.seen.get(t);if(!n)throw new Error("Unprocessed schema. This is a bug in Zod.");let r=l=>{let c=e.seen.get(l);if(c.ref===null)return;let u=c.def??c.schema,d={...u},m=c.ref;if(c.ref=null,m){r(m);let f=e.seen.get(m),v=f.schema;if(v.$ref&&(e.target==="draft-07"||e.target==="draft-04"||e.target==="openapi-3.0")?(u.allOf=u.allOf??[],u.allOf.push(v)):Object.assign(u,v),Object.assign(u,d),l._zod.parent===m)for(let D in u)D==="$ref"||D==="allOf"||D in d||delete u[D];if(v.$ref&&f.def)for(let D in u)D==="$ref"||D==="allOf"||D in f.def&&JSON.stringify(u[D])===JSON.stringify(f.def[D])&&delete u[D]}let h=l._zod.parent;if(h&&h!==m){r(h);let f=e.seen.get(h);if(f?.schema.$ref&&(u.$ref=f.schema.$ref,f.def))for(let v in u)v==="$ref"||v==="allOf"||v in f.def&&JSON.stringify(u[v])===JSON.stringify(f.def[v])&&delete u[v]}e.override({zodSchema:l,jsonSchema:u,path:c.path??[]})};for(let l of[...e.seen.entries()].reverse())r(l[0]);let i={};if(e.target==="draft-2020-12"?i.$schema="https://json-schema.org/draft/2020-12/schema":e.target==="draft-07"?i.$schema="http://json-schema.org/draft-07/schema#":e.target==="draft-04"?i.$schema="http://json-schema.org/draft-04/schema#":e.target,e.external?.uri){let l=e.external.registry.get(t)?.id;if(!l)throw new Error("Schema is missing an `id` property");i.$id=e.external.uri(l)}Object.assign(i,n.def??n.schema);let o=e.metadataRegistry.get(t)?.id;o!==void 0&&i.id===o&&delete i.id;let a=e.external?.defs??{};for(let l of e.seen.entries()){let c=l[1];c.def&&c.defId&&(c.def.id===c.defId&&delete c.def.id,a[c.defId]=c.def)}e.external||Object.keys(a).length>0&&(e.target==="draft-2020-12"?i.$defs=a:i.definitions=a);try{let l=JSON.parse(JSON.stringify(i));return Object.defineProperty(l,"~standard",{value:{...t["~standard"],jsonSchema:{input:Oa(t,"input",e.processors),output:Oa(t,"output",e.processors)}},enumerable:!1,writable:!1}),l}catch{throw new Error("Error converting schema to JSON.")}}function hn(e,t){let n=t??{seen:new Set};if(n.seen.has(e))return!1;n.seen.add(e);let r=e._zod.def;if(r.type==="transform")return!0;if(r.type==="array")return hn(r.element,n);if(r.type==="set")return hn(r.valueType,n);if(r.type==="lazy")return hn(r.getter(),n);if(r.type==="promise"||r.type==="optional"||r.type==="nonoptional"||r.type==="nullable"||r.type==="readonly"||r.type==="default"||r.type==="prefault")return hn(r.innerType,n);if(r.type==="intersection")return hn(r.left,n)||hn(r.right,n);if(r.type==="record"||r.type==="map")return hn(r.keyType,n)||hn(r.valueType,n);if(r.type==="pipe")return e._zod.traits.has("$ZodCodec")?!0:hn(r.in,n)||hn(r.out,n);if(r.type==="object"){for(let i in r.shape)if(hn(r.shape[i],n))return!0;return!1}if(r.type==="union"){for(let i of r.options)if(hn(i,n))return!0;return!1}if(r.type==="tuple"){for(let i of r.items)if(hn(i,n))return!0;return!!(r.rest&&hn(r.rest,n))}return!1}var Sy=(e,t={})=>n=>{let r=Ur({...n,processors:t});return Fe(e,r),Rr(r,e),Mr(r,e)},Oa=(e,t,n={})=>r=>{let{libraryOptions:i,target:o}=r??{},a=Ur({...i??{},target:o,io:t,processors:n});return Fe(e,a),Rr(a,e),Mr(a,e)};var zO={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},ky=(e,t,n,r)=>{let i=n;i.type="string";let{minimum:o,maximum:a,format:l,patterns:c,contentEncoding:u}=e._zod.bag;if(typeof o=="number"&&(i.minLength=o),typeof a=="number"&&(i.maxLength=a),l&&(i.format=zO[l]??l,i.format===""&&delete i.format,l==="time"&&delete i.format),u&&(i.contentEncoding=u),c&&c.size>0){let d=[...c];d.length===1?i.pattern=d[0].source:d.length>1&&(i.allOf=[...d.map(m=>({...t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0"?{type:"string"}:{},pattern:m.source}))])}},wy=(e,t,n,r)=>{let i=n,{minimum:o,maximum:a,format:l,multipleOf:c,exclusiveMaximum:u,exclusiveMinimum:d}=e._zod.bag;typeof l=="string"&&l.includes("int")?i.type="integer":i.type="number";let m=typeof d=="number"&&d>=(o??Number.NEGATIVE_INFINITY),h=typeof u=="number"&&u<=(a??Number.POSITIVE_INFINITY),f=t.target==="draft-04"||t.target==="openapi-3.0";m?f?(i.minimum=d,i.exclusiveMinimum=!0):i.exclusiveMinimum=d:typeof o=="number"&&(i.minimum=o),h?f?(i.maximum=u,i.exclusiveMaximum=!0):i.exclusiveMaximum=u:typeof a=="number"&&(i.maximum=a),typeof c=="number"&&(i.multipleOf=c)},_y=(e,t,n,r)=>{n.type="boolean"},$y=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("BigInt cannot be represented in JSON Schema")},zy=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Symbols cannot be represented in JSON Schema")},Ty=(e,t,n,r)=>{t.target==="openapi-3.0"?(n.type="string",n.nullable=!0,n.enum=[null]):n.type="null"},Cy=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Undefined cannot be represented in JSON Schema")},Ey=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Void cannot be represented in JSON Schema")},Iy=(e,t,n,r)=>{n.not={}},Dy=(e,t,n,r)=>{},Ay=(e,t,n,r)=>{},jy=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Date cannot be represented in JSON Schema")},Oy=(e,t,n,r)=>{let i=e._zod.def,o=os(i.entries);o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),n.enum=o},Ny=(e,t,n,r)=>{let i=e._zod.def,o=[];for(let a of i.values)if(a===void 0){if(t.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof a=="bigint"){if(t.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");o.push(Number(a))}else o.push(a);if(o.length!==0)if(o.length===1){let a=o[0];n.type=a===null?"null":typeof a,t.target==="draft-04"||t.target==="openapi-3.0"?n.enum=[a]:n.const=a}else o.every(a=>typeof a=="number")&&(n.type="number"),o.every(a=>typeof a=="string")&&(n.type="string"),o.every(a=>typeof a=="boolean")&&(n.type="boolean"),o.every(a=>a===null)&&(n.type="null"),n.enum=o},Uy=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("NaN cannot be represented in JSON Schema")},Ry=(e,t,n,r)=>{let i=n,o=e._zod.pattern;if(!o)throw new Error("Pattern not found in template literal");i.type="string",i.pattern=o.source},My=(e,t,n,r)=>{let i=n,o={type:"string",format:"binary",contentEncoding:"binary"},{minimum:a,maximum:l,mime:c}=e._zod.bag;a!==void 0&&(o.minLength=a),l!==void 0&&(o.maxLength=l),c?c.length===1?(o.contentMediaType=c[0],Object.assign(i,o)):(Object.assign(i,o),i.anyOf=c.map(u=>({contentMediaType:u}))):Object.assign(i,o)},By=(e,t,n,r)=>{n.type="boolean"},Ly=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},Py=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Function types cannot be represented in JSON Schema")},Zy=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Fy=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Map cannot be represented in JSON Schema")},Hy=(e,t,n,r)=>{if(t.unrepresentable==="throw")throw new Error("Set cannot be represented in JSON Schema")},Vy=(e,t,n,r)=>{let i=n,o=e._zod.def,{minimum:a,maximum:l}=e._zod.bag;typeof a=="number"&&(i.minItems=a),typeof l=="number"&&(i.maxItems=l),i.type="array",i.items=Fe(o.element,t,{...r,path:[...r.path,"items"]})},qy=(e,t,n,r)=>{let i=n,o=e._zod.def;i.type="object",i.properties={};let a=o.shape;for(let u in a)i.properties[u]=Fe(a[u],t,{...r,path:[...r.path,"properties",u]});let l=new Set(Object.keys(a)),c=new Set([...l].filter(u=>{let d=o.shape[u]._zod;return t.io==="input"?d.optin===void 0:d.optout===void 0}));c.size>0&&(i.required=Array.from(c)),o.catchall?._zod.def.type==="never"?i.additionalProperties=!1:o.catchall?o.catchall&&(i.additionalProperties=Fe(o.catchall,t,{...r,path:[...r.path,"additionalProperties"]})):t.io==="output"&&(i.additionalProperties=!1)},ld=(e,t,n,r)=>{let i=e._zod.def,o=i.inclusive===!1,a=i.options.map((l,c)=>Fe(l,t,{...r,path:[...r.path,o?"oneOf":"anyOf",c]}));o?n.oneOf=a:n.anyOf=a},Gy=(e,t,n,r)=>{let i=e._zod.def,o=Fe(i.left,t,{...r,path:[...r.path,"allOf",0]}),a=Fe(i.right,t,{...r,path:[...r.path,"allOf",1]}),l=u=>"allOf"in u&&Object.keys(u).length===1,c=[...l(o)?o.allOf:[o],...l(a)?a.allOf:[a]];n.allOf=c},Wy=(e,t,n,r)=>{let i=n,o=e._zod.def;i.type="array";let a=t.target==="draft-2020-12"?"prefixItems":"items",l=t.target==="draft-2020-12"||t.target==="openapi-3.0"?"items":"additionalItems",c=o.items.map((h,f)=>Fe(h,t,{...r,path:[...r.path,a,f]})),u=o.rest?Fe(o.rest,t,{...r,path:[...r.path,l,...t.target==="openapi-3.0"?[o.items.length]:[]]}):null;t.target==="draft-2020-12"?(i.prefixItems=c,u&&(i.items=u)):t.target==="openapi-3.0"?(i.items={anyOf:c},u&&i.items.anyOf.push(u),i.minItems=c.length,u||(i.maxItems=c.length)):(i.items=c,u&&(i.additionalItems=u));let{minimum:d,maximum:m}=e._zod.bag;typeof d=="number"&&(i.minItems=d),typeof m=="number"&&(i.maxItems=m)},Yy=(e,t,n,r)=>{let i=n,o=e._zod.def;i.type="object";let a=o.keyType,c=a._zod.bag?.patterns;if(o.mode==="loose"&&c&&c.size>0){let d=Fe(o.valueType,t,{...r,path:[...r.path,"patternProperties","*"]});i.patternProperties={};for(let m of c)i.patternProperties[m.source]=d}else(t.target==="draft-07"||t.target==="draft-2020-12")&&(i.propertyNames=Fe(o.keyType,t,{...r,path:[...r.path,"propertyNames"]})),i.additionalProperties=Fe(o.valueType,t,{...r,path:[...r.path,"additionalProperties"]});let u=a._zod.values;if(u){let d=[...u].filter(m=>typeof m=="string"||typeof m=="number");d.length>0&&(i.required=d)}},Jy=(e,t,n,r)=>{let i=e._zod.def,o=Fe(i.innerType,t,r),a=t.seen.get(e);t.target==="openapi-3.0"?(a.ref=i.innerType,n.nullable=!0):n.anyOf=[o,{type:"null"}]},Xy=(e,t,n,r)=>{let i=e._zod.def;Fe(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType},Ky=(e,t,n,r)=>{let i=e._zod.def;Fe(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType,n.default=JSON.parse(JSON.stringify(i.defaultValue))},Qy=(e,t,n,r)=>{let i=e._zod.def;Fe(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType,t.io==="input"&&(n._prefault=JSON.parse(JSON.stringify(i.defaultValue)))},ev=(e,t,n,r)=>{let i=e._zod.def;Fe(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType;let a;try{a=i.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}n.default=a},tv=(e,t,n,r)=>{let i=e._zod.def,o=i.in._zod.traits.has("$ZodTransform"),a=t.io==="input"?o?i.out:i.in:i.out;Fe(a,t,r);let l=t.seen.get(e);l.ref=a},nv=(e,t,n,r)=>{let i=e._zod.def;Fe(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType,n.readOnly=!0},iv=(e,t,n,r)=>{let i=e._zod.def;Fe(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType},sd=(e,t,n,r)=>{let i=e._zod.def;Fe(i.innerType,t,r);let o=t.seen.get(e);o.ref=i.innerType},rv=(e,t,n,r)=>{let i=e._zod.innerType;Fe(i,t,r);let o=t.seen.get(e);o.ref=i},ad={string:ky,number:wy,boolean:_y,bigint:$y,symbol:zy,null:Ty,undefined:Cy,void:Ey,never:Iy,any:Dy,unknown:Ay,date:jy,enum:Oy,literal:Ny,nan:Uy,template_literal:Ry,file:My,success:By,custom:Ly,function:Py,transform:Zy,map:Fy,set:Hy,array:Vy,object:qy,union:ld,intersection:Gy,tuple:Wy,record:Yy,nullable:Jy,nonoptional:Xy,default:Ky,prefault:Qy,catch:ev,pipe:tv,readonly:nv,promise:iv,optional:sd,lazy:rv};function cd(e,t){if("_idmap"in e){let r=e,i=Ur({...t,processors:ad}),o={};for(let c of r._idmap.entries()){let[u,d]=c;Fe(d,i)}let a={},l={registry:r,uri:t?.uri,defs:o};i.external=l;for(let c of r._idmap.entries()){let[u,d]=c;Rr(i,d),a[u]=Mr(i,d)}if(Object.keys(o).length>0){let c=i.target==="draft-2020-12"?"$defs":"definitions";a.__shared={[c]:o}}return{schemas:a}}let n=Ur({...t,processors:ad});return Fe(e,n),Rr(n,e),Mr(n,e)}var ud=class{get metadataRegistry(){return this.ctx.metadataRegistry}get target(){return this.ctx.target}get unrepresentable(){return this.ctx.unrepresentable}get override(){return this.ctx.override}get io(){return this.ctx.io}get counter(){return this.ctx.counter}set counter(t){this.ctx.counter=t}get seen(){return this.ctx.seen}constructor(t){let n=t?.target??"draft-2020-12";n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),this.ctx=Ur({processors:ad,target:n,...t?.metadata&&{metadata:t.metadata},...t?.unrepresentable&&{unrepresentable:t.unrepresentable},...t?.override&&{override:t.override},...t?.io&&{io:t.io}})}process(t,n={path:[],schemaPath:[]}){return Fe(t,this.ctx,n)}emit(t,n){n&&(n.cycles&&(this.ctx.cycles=n.cycles),n.reused&&(this.ctx.reused=n.reused),n.external&&(this.ctx.external=n.external)),Rr(this.ctx,t);let r=Mr(this.ctx,t),{"~standard":i,...o}=r;return o}};var Ow={};var ws={};Xi(ws,{ZodAny:()=>Cv,ZodArray:()=>Av,ZodBase64:()=>Dd,ZodBase64URL:()=>Ad,ZodBigInt:()=>Za,ZodBigIntFormat:()=>Nd,ZodBoolean:()=>Pa,ZodCIDRv4:()=>Ed,ZodCIDRv6:()=>Id,ZodCUID:()=>kd,ZodCUID2:()=>wd,ZodCatch:()=>eb,ZodCodec:()=>Ns,ZodCustom:()=>Us,ZodCustomStringFormat:()=>Ba,ZodDate:()=>Is,ZodDefault:()=>Wv,ZodDiscriminatedUnion:()=>Ov,ZodE164:()=>jd,ZodEmail:()=>bd,ZodEmoji:()=>xd,ZodEnum:()=>Ra,ZodExactOptional:()=>Vv,ZodFile:()=>Fv,ZodFunction:()=>ub,ZodGUID:()=>$s,ZodIPv4:()=>Td,ZodIPv6:()=>Cd,ZodIntersection:()=>Nv,ZodJWT:()=>Od,ZodKSUID:()=>zd,ZodLazy:()=>lb,ZodLiteral:()=>Zv,ZodMAC:()=>Sv,ZodMap:()=>Lv,ZodNaN:()=>nb,ZodNanoID:()=>Sd,ZodNever:()=>Iv,ZodNonOptional:()=>Pd,ZodNull:()=>zv,ZodNullable:()=>Gv,ZodNumber:()=>La,ZodNumberFormat:()=>No,ZodObject:()=>As,ZodOptional:()=>Ld,ZodPipe:()=>Os,ZodPrefault:()=>Jv,ZodPreprocess:()=>ib,ZodPromise:()=>cb,ZodReadonly:()=>rb,ZodRecord:()=>Ua,ZodSet:()=>Pv,ZodString:()=>Ma,ZodStringFormat:()=>Qe,ZodSuccess:()=>Qv,ZodSymbol:()=>_v,ZodTemplateLiteral:()=>ab,ZodTransform:()=>Hv,ZodTuple:()=>Rv,ZodType:()=>_e,ZodULID:()=>_d,ZodURL:()=>Es,ZodUUID:()=>ji,ZodUndefined:()=>$v,ZodUnion:()=>js,ZodUnknown:()=>Ev,ZodVoid:()=>Dv,ZodXID:()=>$d,ZodXor:()=>jv,_ZodString:()=>vd,_default:()=>Yv,_function:()=>F_,any:()=>x_,array:()=>Ds,base64:()=>i_,base64url:()=>r_,bigint:()=>p_,boolean:()=>wv,catch:()=>tb,check:()=>H_,cidrv4:()=>t_,cidrv6:()=>n_,codec:()=>B_,cuid:()=>Gw,cuid2:()=>Ww,custom:()=>V_,date:()=>k_,describe:()=>q_,discriminatedUnion:()=>C_,e164:()=>o_,email:()=>Rw,emoji:()=>Vw,enum:()=>Md,exactOptional:()=>qv,file:()=>N_,float32:()=>d_,float64:()=>f_,function:()=>F_,guid:()=>Mw,hash:()=>u_,hex:()=>c_,hostname:()=>s_,httpUrl:()=>Hw,instanceof:()=>W_,int:()=>gd,int32:()=>m_,int64:()=>g_,intersection:()=>Uv,invertCodec:()=>L_,ipv4:()=>Kw,ipv6:()=>e_,json:()=>J_,jwt:()=>a_,keyof:()=>w_,ksuid:()=>Xw,lazy:()=>sb,literal:()=>O_,looseObject:()=>z_,looseRecord:()=>I_,mac:()=>Qw,map:()=>D_,meta:()=>G_,nan:()=>M_,nanoid:()=>qw,nativeEnum:()=>j_,never:()=>Ud,nonoptional:()=>Kv,null:()=>Tv,nullable:()=>Ts,nullish:()=>U_,number:()=>kv,object:()=>__,optional:()=>zs,partialRecord:()=>E_,pipe:()=>yd,prefault:()=>Xv,preprocess:()=>X_,promise:()=>Z_,readonly:()=>ob,record:()=>Bv,refine:()=>db,set:()=>A_,strictObject:()=>$_,string:()=>_s,stringFormat:()=>l_,stringbool:()=>Y_,success:()=>R_,superRefine:()=>fb,symbol:()=>v_,templateLiteral:()=>P_,transform:()=>Bd,tuple:()=>Mv,uint32:()=>h_,uint64:()=>y_,ulid:()=>Yw,undefined:()=>b_,union:()=>Rd,unknown:()=>Oo,url:()=>Fw,uuid:()=>Bw,uuidv4:()=>Lw,uuidv6:()=>Pw,uuidv7:()=>Zw,void:()=>S_,xid:()=>Jw,xor:()=>T_});var dd={};Xi(dd,{endsWith:()=>za,gt:()=>Di,gte:()=>mn,includes:()=>_a,length:()=>jo,lowercase:()=>ka,lt:()=>Ii,lte:()=>Mn,maxLength:()=>Ao,maxSize:()=>Nr,mime:()=>Ta,minLength:()=>Qi,minSize:()=>Ai,multipleOf:()=>Or,negative:()=>nd,nonnegative:()=>rd,nonpositive:()=>id,normalize:()=>Ca,overwrite:()=>xi,positive:()=>td,property:()=>od,regex:()=>Sa,size:()=>Do,slugify:()=>Aa,startsWith:()=>$a,toLowerCase:()=>Ia,toUpperCase:()=>Da,trim:()=>Ea,uppercase:()=>wa});var Na={};Xi(Na,{ZodISODate:()=>md,ZodISODateTime:()=>fd,ZodISODuration:()=>pd,ZodISOTime:()=>hd,date:()=>av,datetime:()=>ov,duration:()=>sv,time:()=>lv});var fd=z("ZodISODateTime",(e,t)=>{Up.init(e,t),Qe.init(e,t)});function ov(e){return Lg(fd,e)}var md=z("ZodISODate",(e,t)=>{Rp.init(e,t),Qe.init(e,t)});function av(e){return Pg(md,e)}var hd=z("ZodISOTime",(e,t)=>{Mp.init(e,t),Qe.init(e,t)});function lv(e){return Zg(hd,e)}var pd=z("ZodISODuration",(e,t)=>{Bp.init(e,t),Qe.init(e,t)});function sv(e){return Fg(pd,e)}var Nw=(e,t)=>{us.init(e,t),e.name="ZodError",Object.defineProperties(e,{format:{value:n=>fs(e,n)},flatten:{value:n=>ds(e,n)},addIssue:{value:n=>{e.issues.push(n),e.message=JSON.stringify(e.issues,fa,2)}},addIssues:{value:n=>{e.issues.push(...n),e.message=JSON.stringify(e.issues,fa,2)}},isEmpty:{get(){return e.issues.length===0}}})},CO=z("ZodError",Nw),wn=z("ZodError",Nw,{Parent:Error});var cv=pa(wn),uv=ga(wn),dv=ya(wn),fv=va(wn),mv=cu(wn),hv=uu(wn),pv=du(wn),gv=fu(wn),yv=mu(wn),vv=hu(wn),bv=pu(wn),xv=gu(wn);var Uw=new WeakMap;function Cs(e,t,n){let r=Object.getPrototypeOf(e),i=Uw.get(r);if(i||(i=new Set,Uw.set(r,i)),!i.has(t)){i.add(t);for(let o in n){let a=n[o];Object.defineProperty(r,o,{configurable:!0,enumerable:!1,get(){let l=a.bind(this);return Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:l}),l},set(l){Object.defineProperty(this,o,{configurable:!0,writable:!0,enumerable:!0,value:l})}})}}}var _e=z("ZodType",(e,t)=>(xe.init(e,t),Object.assign(e["~standard"],{jsonSchema:{input:Oa(e,"input"),output:Oa(e,"output")}}),e.toJSONSchema=Sy(e,{}),e.def=t,e.type=t.type,Object.defineProperty(e,"_def",{value:t}),e.parse=(n,r)=>cv(e,n,r,{callee:e.parse}),e.safeParse=(n,r)=>dv(e,n,r),e.parseAsync=async(n,r)=>uv(e,n,r,{callee:e.parseAsync}),e.safeParseAsync=async(n,r)=>fv(e,n,r),e.spa=e.safeParseAsync,e.encode=(n,r)=>mv(e,n,r),e.decode=(n,r)=>hv(e,n,r),e.encodeAsync=async(n,r)=>pv(e,n,r),e.decodeAsync=async(n,r)=>gv(e,n,r),e.safeEncode=(n,r)=>yv(e,n,r),e.safeDecode=(n,r)=>vv(e,n,r),e.safeEncodeAsync=async(n,r)=>bv(e,n,r),e.safeDecodeAsync=async(n,r)=>xv(e,n,r),Cs(e,"ZodType",{check(...n){let r=this.def;return this.clone(H.mergeDefs(r,{checks:[...r.checks??[],...n.map(i=>typeof i=="function"?{_zod:{check:i,def:{check:"custom"},onattach:[]}}:i)]}),{parent:!0})},with(...n){return this.check(...n)},clone(n,r){return dn(this,n,r)},brand(){return this},register(n,r){return n.add(this,r),this},refine(n,r){return this.check(db(n,r))},superRefine(n,r){return this.check(fb(n,r))},overwrite(n){return this.check(xi(n))},optional(){return zs(this)},exactOptional(){return qv(this)},nullable(){return Ts(this)},nullish(){return zs(Ts(this))},nonoptional(n){return Kv(this,n)},array(){return Ds(this)},or(n){return Rd([this,n])},and(n){return Uv(this,n)},transform(n){return yd(this,Bd(n))},default(n){return Yv(this,n)},prefault(n){return Xv(this,n)},catch(n){return tb(this,n)},pipe(n){return yd(this,n)},readonly(){return ob(this)},describe(n){let r=this.clone();return Gt.add(r,{description:n}),r},meta(...n){if(n.length===0)return Gt.get(this);let r=this.clone();return Gt.add(r,n[0]),r},isOptional(){return this.safeParse(void 0).success},isNullable(){return this.safeParse(null).success},apply(n){return n(this)}}),Object.defineProperty(e,"description",{get(){return Gt.get(e)?.description},configurable:!0}),e)),vd=z("_ZodString",(e,t)=>{Io.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,i,o)=>ky(e,r,i,o);let n=e._zod.bag;e.format=n.format??null,e.minLength=n.minimum??null,e.maxLength=n.maximum??null,Cs(e,"_ZodString",{regex(...r){return this.check(Sa(...r))},includes(...r){return this.check(_a(...r))},startsWith(...r){return this.check($a(...r))},endsWith(...r){return this.check(za(...r))},min(...r){return this.check(Qi(...r))},max(...r){return this.check(Ao(...r))},length(...r){return this.check(jo(...r))},nonempty(...r){return this.check(Qi(1,...r))},lowercase(r){return this.check(ka(r))},uppercase(r){return this.check(wa(r))},trim(){return this.check(Ea())},normalize(...r){return this.check(Ca(...r))},toLowerCase(){return this.check(Ia())},toUpperCase(){return this.check(Da())},slugify(){return this.check(Aa())}})}),Ma=z("ZodString",(e,t)=>{Io.init(e,t),vd.init(e,t),e.email=n=>e.check(Nu(bd,n)),e.url=n=>e.check(ks(Es,n)),e.jwt=n=>e.check(ed(Od,n)),e.emoji=n=>e.check(Lu(xd,n)),e.guid=n=>e.check(Ss($s,n)),e.uuid=n=>e.check(Uu(ji,n)),e.uuidv4=n=>e.check(Ru(ji,n)),e.uuidv6=n=>e.check(Mu(ji,n)),e.uuidv7=n=>e.check(Bu(ji,n)),e.nanoid=n=>e.check(Pu(Sd,n)),e.guid=n=>e.check(Ss($s,n)),e.cuid=n=>e.check(Zu(kd,n)),e.cuid2=n=>e.check(Fu(wd,n)),e.ulid=n=>e.check(Hu(_d,n)),e.base64=n=>e.check(Xu(Dd,n)),e.base64url=n=>e.check(Ku(Ad,n)),e.xid=n=>e.check(Vu($d,n)),e.ksuid=n=>e.check(qu(zd,n)),e.ipv4=n=>e.check(Gu(Td,n)),e.ipv6=n=>e.check(Wu(Cd,n)),e.cidrv4=n=>e.check(Yu(Ed,n)),e.cidrv6=n=>e.check(Ju(Id,n)),e.e164=n=>e.check(Qu(jd,n)),e.datetime=n=>e.check(ov(n)),e.date=n=>e.check(av(n)),e.time=n=>e.check(lv(n)),e.duration=n=>e.check(sv(n))});function _s(e){return Ug(Ma,e)}var Qe=z("ZodStringFormat",(e,t)=>{Ke.init(e,t),vd.init(e,t)}),bd=z("ZodEmail",(e,t)=>{Tp.init(e,t),Qe.init(e,t)});function Rw(e){return Nu(bd,e)}var $s=z("ZodGUID",(e,t)=>{$p.init(e,t),Qe.init(e,t)});function Mw(e){return Ss($s,e)}var ji=z("ZodUUID",(e,t)=>{zp.init(e,t),Qe.init(e,t)});function Bw(e){return Uu(ji,e)}function Lw(e){return Ru(ji,e)}function Pw(e){return Mu(ji,e)}function Zw(e){return Bu(ji,e)}var Es=z("ZodURL",(e,t)=>{Cp.init(e,t),Qe.init(e,t)});function Fw(e){return ks(Es,e)}function Hw(e){return ks(Es,{protocol:Rn.httpProtocol,hostname:Rn.domain,...H.normalizeParams(e)})}var xd=z("ZodEmoji",(e,t)=>{Ep.init(e,t),Qe.init(e,t)});function Vw(e){return Lu(xd,e)}var Sd=z("ZodNanoID",(e,t)=>{Ip.init(e,t),Qe.init(e,t)});function qw(e){return Pu(Sd,e)}var kd=z("ZodCUID",(e,t)=>{Dp.init(e,t),Qe.init(e,t)});function Gw(e){return Zu(kd,e)}var wd=z("ZodCUID2",(e,t)=>{Ap.init(e,t),Qe.init(e,t)});function Ww(e){return Fu(wd,e)}var _d=z("ZodULID",(e,t)=>{jp.init(e,t),Qe.init(e,t)});function Yw(e){return Hu(_d,e)}var $d=z("ZodXID",(e,t)=>{Op.init(e,t),Qe.init(e,t)});function Jw(e){return Vu($d,e)}var zd=z("ZodKSUID",(e,t)=>{Np.init(e,t),Qe.init(e,t)});function Xw(e){return qu(zd,e)}var Td=z("ZodIPv4",(e,t)=>{Lp.init(e,t),Qe.init(e,t)});function Kw(e){return Gu(Td,e)}var Sv=z("ZodMAC",(e,t)=>{Zp.init(e,t),Qe.init(e,t)});function Qw(e){return Mg(Sv,e)}var Cd=z("ZodIPv6",(e,t)=>{Pp.init(e,t),Qe.init(e,t)});function e_(e){return Wu(Cd,e)}var Ed=z("ZodCIDRv4",(e,t)=>{Fp.init(e,t),Qe.init(e,t)});function t_(e){return Yu(Ed,e)}var Id=z("ZodCIDRv6",(e,t)=>{Hp.init(e,t),Qe.init(e,t)});function n_(e){return Ju(Id,e)}var Dd=z("ZodBase64",(e,t)=>{qp.init(e,t),Qe.init(e,t)});function i_(e){return Xu(Dd,e)}var Ad=z("ZodBase64URL",(e,t)=>{Gp.init(e,t),Qe.init(e,t)});function r_(e){return Ku(Ad,e)}var jd=z("ZodE164",(e,t)=>{Wp.init(e,t),Qe.init(e,t)});function o_(e){return Qu(jd,e)}var Od=z("ZodJWT",(e,t)=>{Yp.init(e,t),Qe.init(e,t)});function a_(e){return ed(Od,e)}var Ba=z("ZodCustomStringFormat",(e,t)=>{Jp.init(e,t),Qe.init(e,t)});function l_(e,t,n={}){return ja(Ba,e,t,n)}function s_(e){return ja(Ba,"hostname",Rn.hostname,e)}function c_(e){return ja(Ba,"hex",Rn.hex,e)}function u_(e,t){let n=t?.enc??"hex",r=`${e}_${n}`,i=Rn[r];if(!i)throw new Error(`Unrecognized hash format: ${r}`);return ja(Ba,r,i,t)}var La=z("ZodNumber",(e,t)=>{$u.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,i,o)=>wy(e,r,i,o),Cs(e,"ZodNumber",{gt(r,i){return this.check(Di(r,i))},gte(r,i){return this.check(mn(r,i))},min(r,i){return this.check(mn(r,i))},lt(r,i){return this.check(Ii(r,i))},lte(r,i){return this.check(Mn(r,i))},max(r,i){return this.check(Mn(r,i))},int(r){return this.check(gd(r))},safe(r){return this.check(gd(r))},positive(r){return this.check(Di(0,r))},nonnegative(r){return this.check(mn(0,r))},negative(r){return this.check(Ii(0,r))},nonpositive(r){return this.check(Mn(0,r))},multipleOf(r,i){return this.check(Or(r,i))},step(r,i){return this.check(Or(r,i))},finite(){return this}});let n=e._zod.bag;e.minValue=Math.max(n.minimum??Number.NEGATIVE_INFINITY,n.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,e.maxValue=Math.min(n.maximum??Number.POSITIVE_INFINITY,n.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,e.isInt=(n.format??"").includes("int")||Number.isSafeInteger(n.multipleOf??.5),e.isFinite=!0,e.format=n.format??null});function kv(e){return Hg(La,e)}var No=z("ZodNumberFormat",(e,t)=>{Xp.init(e,t),La.init(e,t)});function gd(e){return qg(No,e)}function d_(e){return Gg(No,e)}function f_(e){return Wg(No,e)}function m_(e){return Yg(No,e)}function h_(e){return Jg(No,e)}var Pa=z("ZodBoolean",(e,t)=>{gs.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>_y(e,n,r,i)});function wv(e){return Xg(Pa,e)}var Za=z("ZodBigInt",(e,t)=>{zu.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,i,o)=>$y(e,r,i,o),e.gte=(r,i)=>e.check(mn(r,i)),e.min=(r,i)=>e.check(mn(r,i)),e.gt=(r,i)=>e.check(Di(r,i)),e.gte=(r,i)=>e.check(mn(r,i)),e.min=(r,i)=>e.check(mn(r,i)),e.lt=(r,i)=>e.check(Ii(r,i)),e.lte=(r,i)=>e.check(Mn(r,i)),e.max=(r,i)=>e.check(Mn(r,i)),e.positive=r=>e.check(Di(BigInt(0),r)),e.negative=r=>e.check(Ii(BigInt(0),r)),e.nonpositive=r=>e.check(Mn(BigInt(0),r)),e.nonnegative=r=>e.check(mn(BigInt(0),r)),e.multipleOf=(r,i)=>e.check(Or(r,i));let n=e._zod.bag;e.minValue=n.minimum??null,e.maxValue=n.maximum??null,e.format=n.format??null});function p_(e){return Qg(Za,e)}var Nd=z("ZodBigIntFormat",(e,t)=>{Kp.init(e,t),Za.init(e,t)});function g_(e){return ty(Nd,e)}function y_(e){return ny(Nd,e)}var _v=z("ZodSymbol",(e,t)=>{Qp.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>zy(e,n,r,i)});function v_(e){return iy(_v,e)}var $v=z("ZodUndefined",(e,t)=>{eg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Cy(e,n,r,i)});function b_(e){return ry($v,e)}var zv=z("ZodNull",(e,t)=>{tg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ty(e,n,r,i)});function Tv(e){return oy(zv,e)}var Cv=z("ZodAny",(e,t)=>{ng.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Dy(e,n,r,i)});function x_(){return ay(Cv)}var Ev=z("ZodUnknown",(e,t)=>{ig.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ay(e,n,r,i)});function Oo(){return ly(Ev)}var Iv=z("ZodNever",(e,t)=>{rg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Iy(e,n,r,i)});function Ud(e){return sy(Iv,e)}var Dv=z("ZodVoid",(e,t)=>{og.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ey(e,n,r,i)});function S_(e){return cy(Dv,e)}var Is=z("ZodDate",(e,t)=>{ag.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,i,o)=>jy(e,r,i,o),e.min=(r,i)=>e.check(mn(r,i)),e.max=(r,i)=>e.check(Mn(r,i));let n=e._zod.bag;e.minDate=n.minimum?new Date(n.minimum):null,e.maxDate=n.maximum?new Date(n.maximum):null});function k_(e){return uy(Is,e)}var Av=z("ZodArray",(e,t)=>{lg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Vy(e,n,r,i),e.element=t.element,Cs(e,"ZodArray",{min(n,r){return this.check(Qi(n,r))},nonempty(n){return this.check(Qi(1,n))},max(n,r){return this.check(Ao(n,r))},length(n,r){return this.check(jo(n,r))},unwrap(){return this.element}})});function Ds(e,t){return my(Av,e,t)}function w_(e){let t=e._zod.def.shape;return Md(Object.keys(t))}var As=z("ZodObject",(e,t)=>{sg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>qy(e,n,r,i),H.defineLazy(e,"shape",()=>t.shape),Cs(e,"ZodObject",{keyof(){return Md(Object.keys(this._zod.def.shape))},catchall(n){return this.clone({...this._zod.def,catchall:n})},passthrough(){return this.clone({...this._zod.def,catchall:Oo()})},loose(){return this.clone({...this._zod.def,catchall:Oo()})},strict(){return this.clone({...this._zod.def,catchall:Ud()})},strip(){return this.clone({...this._zod.def,catchall:void 0})},extend(n){return H.extend(this,n)},safeExtend(n){return H.safeExtend(this,n)},merge(n){return H.merge(this,n)},pick(n){return H.pick(this,n)},omit(n){return H.omit(this,n)},partial(...n){return H.partial(Ld,this,n[0])},required(...n){return H.required(Pd,this,n[0])}})});function __(e,t){let n={type:"object",shape:e??{},...H.normalizeParams(t)};return new As(n)}function $_(e,t){return new As({type:"object",shape:e,catchall:Ud(),...H.normalizeParams(t)})}function z_(e,t){return new As({type:"object",shape:e,catchall:Oo(),...H.normalizeParams(t)})}var js=z("ZodUnion",(e,t)=>{ys.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ld(e,n,r,i),e.options=t.options});function Rd(e,t){return new js({type:"union",options:e,...H.normalizeParams(t)})}var jv=z("ZodXor",(e,t)=>{js.init(e,t),cg.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ld(e,n,r,i),e.options=t.options});function T_(e,t){return new jv({type:"union",options:e,inclusive:!1,...H.normalizeParams(t)})}var Ov=z("ZodDiscriminatedUnion",(e,t)=>{js.init(e,t),ug.init(e,t)});function C_(e,t,n){return new Ov({type:"union",options:t,discriminator:e,...H.normalizeParams(n)})}var Nv=z("ZodIntersection",(e,t)=>{dg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Gy(e,n,r,i)});function Uv(e,t){return new Nv({type:"intersection",left:e,right:t})}var Rv=z("ZodTuple",(e,t)=>{Tu.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Wy(e,n,r,i),e.rest=n=>e.clone({...e._zod.def,rest:n})});function Mv(e,t,n){let r=t instanceof xe,i=r?n:t,o=r?t:null;return new Rv({type:"tuple",items:e,rest:o,...H.normalizeParams(i)})}var Ua=z("ZodRecord",(e,t)=>{fg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Yy(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType});function Bv(e,t,n){return!t||!t._zod?new Ua({type:"record",keyType:_s(),valueType:e,...H.normalizeParams(t)}):new Ua({type:"record",keyType:e,valueType:t,...H.normalizeParams(n)})}function E_(e,t,n){let r=dn(e);return r._zod.values=void 0,new Ua({type:"record",keyType:r,valueType:t,...H.normalizeParams(n)})}function I_(e,t,n){return new Ua({type:"record",keyType:e,valueType:t,mode:"loose",...H.normalizeParams(n)})}var Lv=z("ZodMap",(e,t)=>{mg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Fy(e,n,r,i),e.keyType=t.keyType,e.valueType=t.valueType,e.min=(...n)=>e.check(Ai(...n)),e.nonempty=n=>e.check(Ai(1,n)),e.max=(...n)=>e.check(Nr(...n)),e.size=(...n)=>e.check(Do(...n))});function D_(e,t,n){return new Lv({type:"map",keyType:e,valueType:t,...H.normalizeParams(n)})}var Pv=z("ZodSet",(e,t)=>{hg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Hy(e,n,r,i),e.min=(...n)=>e.check(Ai(...n)),e.nonempty=n=>e.check(Ai(1,n)),e.max=(...n)=>e.check(Nr(...n)),e.size=(...n)=>e.check(Do(...n))});function A_(e,t){return new Pv({type:"set",valueType:e,...H.normalizeParams(t)})}var Ra=z("ZodEnum",(e,t)=>{pg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(r,i,o)=>Oy(e,r,i,o),e.enum=t.entries,e.options=Object.values(t.entries);let n=new Set(Object.keys(t.entries));e.extract=(r,i)=>{let o={};for(let a of r)if(n.has(a))o[a]=t.entries[a];else throw new Error(`Key ${a} not found in enum`);return new Ra({...t,checks:[],...H.normalizeParams(i),entries:o})},e.exclude=(r,i)=>{let o={...t.entries};for(let a of r)if(n.has(a))delete o[a];else throw new Error(`Key ${a} not found in enum`);return new Ra({...t,checks:[],...H.normalizeParams(i),entries:o})}});function Md(e,t){let n=Array.isArray(e)?Object.fromEntries(e.map(r=>[r,r])):e;return new Ra({type:"enum",entries:n,...H.normalizeParams(t)})}function j_(e,t){return new Ra({type:"enum",entries:e,...H.normalizeParams(t)})}var Zv=z("ZodLiteral",(e,t)=>{gg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ny(e,n,r,i),e.values=new Set(t.values),Object.defineProperty(e,"value",{get(){if(t.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return t.values[0]}})});function O_(e,t){return new Zv({type:"literal",values:Array.isArray(e)?e:[e],...H.normalizeParams(t)})}var Fv=z("ZodFile",(e,t)=>{yg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>My(e,n,r,i),e.min=(n,r)=>e.check(Ai(n,r)),e.max=(n,r)=>e.check(Nr(n,r)),e.mime=(n,r)=>e.check(Ta(Array.isArray(n)?n:[n],r))});function N_(e){return hy(Fv,e)}var Hv=z("ZodTransform",(e,t)=>{vg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Zy(e,n,r,i),e._zod.parse=(n,r)=>{if(r.direction==="backward")throw new Er(e.constructor.name);n.addIssue=o=>{if(typeof o=="string")n.issues.push(H.issue(o,n.value,t));else{let a=o;a.fatal&&(a.continue=!1),a.code??(a.code="custom"),a.input??(a.input=n.value),a.inst??(a.inst=e),n.issues.push(H.issue(a))}};let i=t.transform(n.value,n);return i instanceof Promise?i.then(o=>(n.value=o,n.fallback=!0,n)):(n.value=i,n.fallback=!0,n)}});function Bd(e){return new Hv({type:"transform",transform:e})}var Ld=z("ZodOptional",(e,t)=>{Cu.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>sd(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function zs(e){return new Ld({type:"optional",innerType:e})}var Vv=z("ZodExactOptional",(e,t)=>{bg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>sd(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function qv(e){return new Vv({type:"optional",innerType:e})}var Gv=z("ZodNullable",(e,t)=>{xg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Jy(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Ts(e){return new Gv({type:"nullable",innerType:e})}function U_(e){return zs(Ts(e))}var Wv=z("ZodDefault",(e,t)=>{Sg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ky(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Yv(e,t){return new Wv({type:"default",innerType:e,get defaultValue(){return typeof t=="function"?t():H.shallowClone(t)}})}var Jv=z("ZodPrefault",(e,t)=>{kg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Qy(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Xv(e,t){return new Jv({type:"prefault",innerType:e,get defaultValue(){return typeof t=="function"?t():H.shallowClone(t)}})}var Pd=z("ZodNonOptional",(e,t)=>{wg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Xy(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Kv(e,t){return new Pd({type:"nonoptional",innerType:e,...H.normalizeParams(t)})}var Qv=z("ZodSuccess",(e,t)=>{_g.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>By(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function R_(e){return new Qv({type:"success",innerType:e})}var eb=z("ZodCatch",(e,t)=>{$g.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>ev(e,n,r,i),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function tb(e,t){return new eb({type:"catch",innerType:e,catchValue:typeof t=="function"?t:()=>t})}var nb=z("ZodNaN",(e,t)=>{zg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Uy(e,n,r,i)});function M_(e){return fy(nb,e)}var Os=z("ZodPipe",(e,t)=>{Eu.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>tv(e,n,r,i),e.in=t.in,e.out=t.out});function yd(e,t){return new Os({type:"pipe",in:e,out:t})}var Ns=z("ZodCodec",(e,t)=>{Os.init(e,t),vs.init(e,t)});function B_(e,t,n){return new Ns({type:"pipe",in:e,out:t,transform:n.decode,reverseTransform:n.encode})}function L_(e){let t=e._zod.def;return new Ns({type:"pipe",in:t.out,out:t.in,transform:t.reverseTransform,reverseTransform:t.transform})}var ib=z("ZodPreprocess",(e,t)=>{Os.init(e,t),Tg.init(e,t)}),rb=z("ZodReadonly",(e,t)=>{Cg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>nv(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function ob(e){return new rb({type:"readonly",innerType:e})}var ab=z("ZodTemplateLiteral",(e,t)=>{Eg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ry(e,n,r,i)});function P_(e,t){return new ab({type:"template_literal",parts:e,...H.normalizeParams(t)})}var lb=z("ZodLazy",(e,t)=>{Ag.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>rv(e,n,r,i),e.unwrap=()=>e._zod.def.getter()});function sb(e){return new lb({type:"lazy",getter:e})}var cb=z("ZodPromise",(e,t)=>{Dg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>iv(e,n,r,i),e.unwrap=()=>e._zod.def.innerType});function Z_(e){return new cb({type:"promise",innerType:e})}var ub=z("ZodFunction",(e,t)=>{Ig.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Py(e,n,r,i)});function F_(e){return new ub({type:"function",input:Array.isArray(e?.input)?Mv(e?.input):e?.input??Ds(Oo()),output:e?.output??Oo()})}var Us=z("ZodCustom",(e,t)=>{jg.init(e,t),_e.init(e,t),e._zod.processJSONSchema=(n,r,i)=>Ly(e,n,r,i)});function H_(e){let t=new it({check:"custom"});return t._zod.check=e,t}function V_(e,t){return py(Us,e??(()=>!0),t)}function db(e,t={}){return gy(Us,e,t)}function fb(e,t){return yy(e,t)}var q_=vy,G_=by;function W_(e,t={}){let n=new Us({type:"custom",check:"custom",fn:r=>r instanceof e,abort:!0,...H.normalizeParams(t)});return n._zod.bag.Class=e,n._zod.check=r=>{r.value instanceof e||r.issues.push({code:"invalid_type",expected:e.name,input:r.value,inst:n,path:[...n._zod.def.path??[]]})},n}var Y_=(...e)=>xy({Codec:Ns,Boolean:Pa,String:Ma},...e);function J_(e){let t=sb(()=>Rd([_s(e),kv(),wv(),Tv(),Ds(t),Bv(_s(),t)]));return t}function X_(e,t){return new ib({type:"pipe",in:Bd(e),out:t})}var IO={invalid_type:"invalid_type",too_big:"too_big",too_small:"too_small",invalid_format:"invalid_format",not_multiple_of:"not_multiple_of",unrecognized_keys:"unrecognized_keys",invalid_union:"invalid_union",invalid_key:"invalid_key",invalid_element:"invalid_element",invalid_value:"invalid_value",custom:"custom"};function DO(e){xt({customError:e})}function AO(){return xt().customError}var mb;mb||(mb={});var ee={...ws,...dd,iso:Na},jO=new Set(["$schema","$ref","$defs","definitions","$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor","type","enum","const","anyOf","oneOf","allOf","not","properties","required","additionalProperties","patternProperties","propertyNames","minProperties","maxProperties","items","prefixItems","additionalItems","minItems","maxItems","uniqueItems","contains","minContains","maxContains","minLength","maxLength","pattern","format","minimum","maximum","exclusiveMinimum","exclusiveMaximum","multipleOf","description","default","contentEncoding","contentMediaType","contentSchema","unevaluatedItems","unevaluatedProperties","if","then","else","dependentSchemas","dependentRequired","nullable","readOnly"]);function OO(e,t){let n=e.$schema;return n==="https://json-schema.org/draft/2020-12/schema"?"draft-2020-12":n==="http://json-schema.org/draft-07/schema#"?"draft-7":n==="http://json-schema.org/draft-04/schema#"?"draft-4":t??"draft-2020-12"}function NO(e,t){if(!e.startsWith("#"))throw new Error("External $ref is not supported, only local refs (#/...) are allowed");let n=e.slice(1).split("/").filter(Boolean);if(n.length===0)return t.rootSchema;let r=t.version==="draft-2020-12"?"$defs":"definitions";if(n[0]===r){let i=n[1];if(!i||!t.defs[i])throw new Error(`Reference not found: ${e}`);return t.defs[i]}throw new Error(`Reference not found: ${e}`)}function K_(e,t){if(e.not!==void 0){if(typeof e.not=="object"&&Object.keys(e.not).length===0)return ee.never();throw new Error("not is not supported in Zod (except { not: {} } for never)")}if(e.unevaluatedItems!==void 0)throw new Error("unevaluatedItems is not supported");if(e.unevaluatedProperties!==void 0)throw new Error("unevaluatedProperties is not supported");if(e.if!==void 0||e.then!==void 0||e.else!==void 0)throw new Error("Conditional schemas (if/then/else) are not supported");if(e.dependentSchemas!==void 0||e.dependentRequired!==void 0)throw new Error("dependentSchemas and dependentRequired are not supported");if(e.$ref){let i=e.$ref;if(t.refs.has(i))return t.refs.get(i);if(t.processing.has(i))return ee.lazy(()=>{if(!t.refs.has(i))throw new Error(`Circular reference not resolved: ${i}`);return t.refs.get(i)});t.processing.add(i);let o=NO(i,t),a=rn(o,t);return t.refs.set(i,a),t.processing.delete(i),a}if(e.enum!==void 0){let i=e.enum;if(t.version==="openapi-3.0"&&e.nullable===!0&&i.length===1&&i[0]===null)return ee.null();if(i.length===0)return ee.never();if(i.length===1)return ee.literal(i[0]);if(i.every(a=>typeof a=="string"))return ee.enum(i);let o=i.map(a=>ee.literal(a));return o.length<2?o[0]:ee.union([o[0],o[1],...o.slice(2)])}if(e.const!==void 0)return ee.literal(e.const);let n=e.type;if(Array.isArray(n)){let i=n.map(o=>{let a={...e,type:o};return K_(a,t)});return i.length===0?ee.never():i.length===1?i[0]:ee.union(i)}if(!n)return ee.any();let r;switch(n){case"string":{let i=ee.string();if(e.format){let o=e.format;o==="email"?i=i.check(ee.email()):o==="uri"||o==="uri-reference"?i=i.check(ee.url()):o==="uuid"||o==="guid"?i=i.check(ee.uuid()):o==="date-time"?i=i.check(ee.iso.datetime()):o==="date"?i=i.check(ee.iso.date()):o==="time"?i=i.check(ee.iso.time()):o==="duration"?i=i.check(ee.iso.duration()):o==="ipv4"?i=i.check(ee.ipv4()):o==="ipv6"?i=i.check(ee.ipv6()):o==="mac"?i=i.check(ee.mac()):o==="cidr"?i=i.check(ee.cidrv4()):o==="cidr-v6"?i=i.check(ee.cidrv6()):o==="base64"?i=i.check(ee.base64()):o==="base64url"?i=i.check(ee.base64url()):o==="e164"?i=i.check(ee.e164()):o==="jwt"?i=i.check(ee.jwt()):o==="emoji"?i=i.check(ee.emoji()):o==="nanoid"?i=i.check(ee.nanoid()):o==="cuid"?i=i.check(ee.cuid()):o==="cuid2"?i=i.check(ee.cuid2()):o==="ulid"?i=i.check(ee.ulid()):o==="xid"?i=i.check(ee.xid()):o==="ksuid"&&(i=i.check(ee.ksuid()))}typeof e.minLength=="number"&&(i=i.min(e.minLength)),typeof e.maxLength=="number"&&(i=i.max(e.maxLength)),e.pattern&&(i=i.regex(new RegExp(e.pattern))),r=i;break}case"number":case"integer":{let i=n==="integer"?ee.number().int():ee.number();typeof e.minimum=="number"&&(i=i.min(e.minimum)),typeof e.maximum=="number"&&(i=i.max(e.maximum)),typeof e.exclusiveMinimum=="number"?i=i.gt(e.exclusiveMinimum):e.exclusiveMinimum===!0&&typeof e.minimum=="number"&&(i=i.gt(e.minimum)),typeof e.exclusiveMaximum=="number"?i=i.lt(e.exclusiveMaximum):e.exclusiveMaximum===!0&&typeof e.maximum=="number"&&(i=i.lt(e.maximum)),typeof e.multipleOf=="number"&&(i=i.multipleOf(e.multipleOf)),r=i;break}case"boolean":{r=ee.boolean();break}case"null":{r=ee.null();break}case"object":{let i={},o=e.properties||{},a=new Set(e.required||[]);for(let[c,u]of Object.entries(o)){let d=rn(u,t);i[c]=a.has(c)?d:d.optional()}if(e.propertyNames){let c=rn(e.propertyNames,t),u=e.additionalProperties&&typeof e.additionalProperties=="object"?rn(e.additionalProperties,t):ee.any();if(Object.keys(i).length===0){r=ee.record(c,u);break}let d=ee.object(i).passthrough(),m=ee.looseRecord(c,u);r=ee.intersection(d,m);break}if(e.patternProperties){let c=e.patternProperties,u=Object.keys(c),d=[];for(let h of u){let f=rn(c[h],t),v=ee.string().regex(new RegExp(h));d.push(ee.looseRecord(v,f))}let m=[];if(Object.keys(i).length>0&&m.push(ee.object(i).passthrough()),m.push(...d),m.length===0)r=ee.object({}).passthrough();else if(m.length===1)r=m[0];else{let h=ee.intersection(m[0],m[1]);for(let f=2;f<m.length;f++)h=ee.intersection(h,m[f]);r=h}break}let l=ee.object(i);e.additionalProperties===!1?r=l.strict():typeof e.additionalProperties=="object"?r=l.catchall(rn(e.additionalProperties,t)):r=l.passthrough();break}case"array":{let i=e.prefixItems,o=e.items;if(i&&Array.isArray(i)){let a=i.map(c=>rn(c,t)),l=o&&typeof o=="object"&&!Array.isArray(o)?rn(o,t):void 0;l?r=ee.tuple(a).rest(l):r=ee.tuple(a),typeof e.minItems=="number"&&(r=r.check(ee.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(ee.maxLength(e.maxItems)))}else if(Array.isArray(o)){let a=o.map(c=>rn(c,t)),l=e.additionalItems&&typeof e.additionalItems=="object"?rn(e.additionalItems,t):void 0;l?r=ee.tuple(a).rest(l):r=ee.tuple(a),typeof e.minItems=="number"&&(r=r.check(ee.minLength(e.minItems))),typeof e.maxItems=="number"&&(r=r.check(ee.maxLength(e.maxItems)))}else if(o!==void 0){let a=rn(o,t),l=ee.array(a);typeof e.minItems=="number"&&(l=l.min(e.minItems)),typeof e.maxItems=="number"&&(l=l.max(e.maxItems)),r=l}else r=ee.array(ee.any());break}default:throw new Error(`Unsupported type: ${n}`)}return r}function rn(e,t){if(typeof e=="boolean")return e?ee.any():ee.never();let n=K_(e,t),r=e.type||e.enum!==void 0||e.const!==void 0;if(e.anyOf&&Array.isArray(e.anyOf)){let l=e.anyOf.map(u=>rn(u,t)),c=ee.union(l);n=r?ee.intersection(n,c):c}if(e.oneOf&&Array.isArray(e.oneOf)){let l=e.oneOf.map(u=>rn(u,t)),c=ee.xor(l);n=r?ee.intersection(n,c):c}if(e.allOf&&Array.isArray(e.allOf))if(e.allOf.length===0)n=r?n:ee.any();else{let l=r?n:rn(e.allOf[0],t),c=r?0:1;for(let u=c;u<e.allOf.length;u++)l=ee.intersection(l,rn(e.allOf[u],t));n=l}e.nullable===!0&&t.version==="openapi-3.0"&&(n=ee.nullable(n)),e.readOnly===!0&&(n=ee.readonly(n)),e.default!==void 0&&(n=n.default(e.default));let i={},o=["$id","id","$comment","$anchor","$vocabulary","$dynamicRef","$dynamicAnchor"];for(let l of o)l in e&&(i[l]=e[l]);let a=["contentEncoding","contentMediaType","contentSchema"];for(let l of a)l in e&&(i[l]=e[l]);for(let l of Object.keys(e))jO.has(l)||(i[l]=e[l]);return Object.keys(i).length>0&&t.registry.add(n,i),e.description&&(n=n.describe(e.description)),n}function Q_(e,t){if(typeof e=="boolean")return e?ee.any():ee.never();let n;try{n=JSON.parse(JSON.stringify(e))}catch{throw new Error("fromJSONSchema input is not valid JSON (possibly cyclic); use $defs/$ref for recursive schemas")}let r=OO(n,t?.defaultTarget),i=n.$defs||n.definitions||{},o={version:r,defs:i,refs:new Map,processing:new Set,rootSchema:n,registry:t?.registry??Gt};return rn(n,o)}var hb={};Xi(hb,{bigint:()=>BO,boolean:()=>MO,date:()=>LO,number:()=>RO,string:()=>UO});function UO(e){return Rg(Ma,e)}function RO(e){return Vg(La,e)}function MO(e){return Kg(Pa,e)}function BO(e){return ey(Za,e)}function LO(e){return dy(Is,e)}xt(Iu());var PO=$.object({command:$.string().min(1),args:$.array($.string()).optional(),env:$.record($.string(),$.string()).optional(),cwd:$.string().optional(),disabled:$.boolean().optional(),disabledTools:$.array($.string()).optional(),timeout:$.number().positive().max(3600).optional(),toolTimeouts:$.record($.string(),$.number().positive().max(3600)).optional()}),ZO=$.object({url:$.string().min(1).url(),type:$.enum(["sse","streamable-http","http"]).optional(),headers:$.record($.string(),$.string()).optional(),disabled:$.boolean().optional(),disabledTools:$.array($.string()).optional(),timeout:$.number().positive().max(3600).optional(),toolTimeouts:$.record($.string(),$.number().positive().max(3600)).optional()}),FO=$.union([PO,ZO]),nL=$.record($.string(),FO);function pb(e){return"command"in e}var Rs={kind:"python",venvDir:"",interpreter:"",script:"",packageName:"",command:"",args:[],url:"",headers:{},env:{},cwd:"",timeout:""};function Zd(e,t){let n=e.replace(/[\\/]+$/,"");return t==="win32"?`${n}\\Scripts\\python.exe`:`${n}/bin/python`}function e$(e){let t=e.split(/[\\/]/);return t[t.length-1]??""}function HO(e){let t=e.split(/[\\/]/);if(t.length<3)return;let n=t[t.length-2]?.toLowerCase();if(n!=="scripts"&&n!=="bin")return;let r=e.includes("\\")?"\\":"/";return t.slice(0,-2).join(r)}function VO(e){return/^python(3(\.\d+)?)?(\.exe)?$/i.test(e$(e))}function qO(e){return/^npx(\.cmd|\.exe)?$/i.test(e$(e))}function gb(e){if(!pb(e))return{...Rs,kind:"http",url:e.url,headers:e.headers??{},timeout:e.timeout===void 0?"":String(e.timeout)};let t={...Rs,timeout:e.timeout===void 0?"":String(e.timeout),kind:"custom",command:e.command,args:e.args??[],env:e.env??{},cwd:e.cwd??""};if(qO(e.command)){let n=[...e.args??[]],r=[];for(;n.length>0&&n[0]?.startsWith("-")===!0;)r.push(n.shift());let i=n.shift();return i!==void 0&&r.every(o=>o==="-y"||o==="--yes")?{...t,kind:"npx",packageName:i,args:n}:t}if(VO(e.command)){let n=[...e.args??[]],r=n.shift();if(r!==void 0)return{...t,kind:"python",interpreter:e.command,venvDir:HO(e.command)??"",script:r,args:n}}return t}function Fd(e,t,n){let r={...n?.disabled!==void 0?{disabled:n.disabled}:{},...n?.disabledTools!==void 0?{disabledTools:n.disabledTools}:{}},i=Number(e.timeout.trim()),o=e.timeout.trim().length>0&&Number.isFinite(i)&&i>0?{timeout:i}:{};if(e.kind==="http")return{url:e.url.trim(),...Object.keys(e.headers).length>0?{headers:e.headers}:{},...n!==void 0&&!pb(n)&&n.type!==void 0?{type:n.type}:{},...o,...r};let a=e.args.filter(u=>u.trim().length>0),l,c;return e.kind==="python"?(l=e.interpreter.trim().length>0?e.interpreter.trim():Zd(e.venvDir.trim(),t),c=[e.script.trim(),...a]):e.kind==="npx"?(l="npx",c=["-y",e.packageName.trim(),...a]):(l=e.command.trim(),c=a),{command:l,...c.length>0?{args:c}:{},...Object.keys(e.env).length>0?{env:e.env}:{},...e.cwd.trim().length>0?{cwd:e.cwd.trim()}:{},...o,...r}}function yb(e,t){let n={};if(t.timeout.trim().length>0){let i=Number(t.timeout.trim());!Number.isFinite(i)||i<=0?n.timeout="Enter a number of seconds, or leave it blank.":i>3600&&(n.timeout="An hour is the most a single call may take.")}let r={};switch(e.trim().length===0?r.name="Give the server a name.":/[^\w.-]/.test(e.trim())&&(r.name="Use letters, numbers, dots, dashes and underscores \u2014 the name prefixes every tool."),t.kind){case"python":t.interpreter.trim().length===0&&t.venvDir.trim().length===0&&(r.venvDir="Point at the virtualenv folder, or set the interpreter directly."),t.script.trim().length===0&&(r.script="Point at the server script.");break;case"npx":t.packageName.trim().length===0&&(r.packageName="Name the npm package.");break;case"custom":t.command.trim().length===0&&(r.command="Name the executable to run.");break;case"http":if(t.url.trim().length===0)r.url="Enter the server URL.";else try{new URL(t.url.trim())}catch{r.url="Must be a valid URL."}break}return{...r,...n}}var Hd=[{id:"openai",label:"OpenAI",wireFormat:"openai",baseUrl:"https://api.openai.com/v1"},{id:"deepseek",label:"DeepSeek",wireFormat:"openai",baseUrl:"https://api.deepseek.com/v1"},{id:"anthropic",label:"Anthropic",wireFormat:"anthropic",baseUrl:"https://api.anthropic.com/v1"},{id:"gemini",label:"Google Gemini",wireFormat:"gemini",baseUrl:"https://generativelanguage.googleapis.com/v1beta"},{id:"custom",label:"Custom (OpenAI-compatible)",wireFormat:"openai",baseUrl:""},{id:"custom-anthropic",label:"Custom (Anthropic-compatible)",wireFormat:"anthropic",baseUrl:""},{id:"custom-gemini",label:"Custom (Gemini-compatible)",wireFormat:"gemini",baseUrl:""}];function bb(e){if(e===void 0)return;if(!e.reportsCost)return"This plan reports no cost per consultation, so only the consultation limit can apply.";let t=e.coldUsd,n=e.resumedUsd;if(t===void 0||n===void 0)return;if(e.resumeWorked===!1)return`Both samples cost about ${vb(t)}, but the second one did not resume the first session \u2014 the CLI returned no session id, so this is two cold starts rather than a comparison. Measure again, or check that the CLI supports --resume.`;let r=n>0?t/n:void 0;return[`A first consultation costs about ${vb(t)} here and a follow-up about ${vb(n)}`,r!==void 0&&r>=2?` \u2014 roughly ${String(Math.round(r))} times cheaper.`:"."].join("")}function vb(e){return e>=.01?`$${e.toFixed(2)}`:`$${e.toFixed(4)}`}var GO=$.object({name:$.string().min(1),value:$.string(),description:$.string().optional()}),cL=$.array(GO),WO=/^[A-Za-z_][A-Za-z0-9_]*$/;function Vd(e){return WO.test(e)}var Br=[{id:"orientation",title:"Where everything is",opensPanel:!0,completionEvents:["onCommand:lightCode.openPanel"],altText:"The VS Code window: the Light Code icon in the activity bar, the chat panel, and the new-task, history, settings and guide buttons in its header.",body:["Light Code lives in one sidebar panel. The chat is the whole product; the gear opens eleven settings tabs, and the question mark reopens this guide whenever you want it.","The numbers in the picture are the four things worth knowing before anything else."]},{id:"providers",title:"Providers - point it at a model",tab:"providers",completionEvents:["onContext:lightCode.hasProvider"],altText:"The Providers tab, showing the profile list and the fields for editing one: preset, label, base URL, authentication, API key, model and Test connection.",body:["Nothing ships configured. There are no default endpoints, so a fresh install contacts nothing until you fill this in.","**Preset** prefills a base URL and wire format - OpenAI-compatible, Anthropic, Gemini, DeepSeek - and every field stays editable for a gateway that fronts one differently. **Authentication** is a separate axis: an API key, or Apigee client-certificate mTLS with a token grant. **Model** is fetched from your gateway and always typeable, because many return nothing. Keep one profile per gateway and switch between them from the chat header.","**Test connection** is the field worth using first: it loads certificates, gets a token, lists models, and tells you which of the three failed."]},{id:"network",title:"Network - certificates, once, for everything",tab:"network",completionEvents:["onStepSelected"],altText:"The Network tab, showing certificate directory, CA certificate, client certificate and key, PFX bundle, passphrase, and the verify-TLS toggle.",body:["If your company intercepts TLS or issues client certificates, this is the only place you set that up. It applies to every connection: the gateway, the token endpoint, MCP over HTTP, the vector store and the embedder.","**CA certificate** is added to the public roots rather than replacing them, so trusting your corporate root does not cost you every other host. **Certificate and key** - or a **PFX bundle**, which is what Windows PKI usually issues - identify you. Any single connection can override either.","**Verify TLS certificates** can be turned off, and the panel says plainly what that costs: an interceptor can read and change the traffic, API key included. Add the CA instead."]},{id:"chat",title:"The chat - ask for something real",opensPanel:!0,completionEvents:["onContext:lightCode.hasChatted"],altText:"The chat header, with the mode selector, the expert budget, and the four header buttons labelled; below it, the composer.",body:["Type a request. It reads files, searches, edits and runs commands, one step at a time, and stops when it is done or when it needs you.","**@** names a file directly. Paste a screenshot, or drop a Word, Excel, PDF or HTML file in. Long output is truncated with a handle it can re-read, so a huge log does not eat the window - the bar above the composer shows what has.","**Mode** picks what it may do: Code edits and runs, Ask is read-only, Junior brings the expert in. **History** keeps every past task, and reopening one restores the whole transcript."]},{id:"approvals",title:"Approvals - nothing happens without you",tab:"approvals",completionEvents:["onStepSelected"],altText:"The Approvals tab, showing four auto-approve toggles all off, the always-allowed command and tool lists, extra readable folders, and the maximum-steps setting.",body:["Every tool call is shown before it runs, as ground truth: the real command, the computed diff, the actual source. Never the model's description of what it means to do. **Deny** is a real answer - it goes back as a result and the turn continues.","This tab is where standing permission is granted and, more importantly, taken back. The four toggles skip the prompt by category and **all ship off**. Below them are the grants you made in the chat: always-allowed commands, always-allowed MCP tools, and folders outside the workspace it may read.","Command matching is **exact, byte for byte**. Allowing `npm test` never allows `npm test && rm -rf /`.","Before its first edit to a task it snapshots the workspace, so you can roll the whole thing back."]},{id:"mcp",title:"MCP - connect the servers you already run",tab:"mcp",completionEvents:["onStepSelected"],altText:"The MCP tab, showing two servers with health, per-tool Always/Ask/Never controls, and the JSON configuration box.",body:["Standard `mcpServers` configuration, so a config from another client pastes in unchanged. stdio or HTTP, inferred from whether you gave a command or a URL.","Servers connect when the panel opens and show health, so a mistyped command is visible immediately rather than the first time something needs it. Every tool is namespaced `server__tool`, and each one has its own **Always / Ask / Never** - one server can expose forty.","Secrets go in as `${secret:NAME}` and are resolved from the OS keychain at spawn time, never written into the file."]},{id:"python",title:"Python - let it write its own tools",tab:"python",completionEvents:["onStepSelected"],altText:"The Python tab, showing the enable toggle, uv path, environment choice, tools folder, package index, timeout, and a created tool with its content-hash approval note.",body:["It can write a Python tool mid-conversation and call it from the next message. Dependencies are declared in the file and installed with `uv`; the schema comes from your type hints, so there is no metadata to keep in step.","**Python environment** prefers your project's own venv, because that is where your internal libraries already are. **Package index** can point at an internal mirror, or refuse the network entirely.","This is the sharpest surface in the product, so it is off by default and creating a tool **always** prompts with the full source - no toggle skips it. Approval pins a hash of exactly what you saw; a file edited outside is refused and reported, and tools live in `.lightcode/tools/` so they land in git and get reviewed."]},{id:"skills",title:"Skills - teach it your conventions",tab:"skills",completionEvents:["onStepSelected"],altText:"The Skills tab, showing two skills, a note that they are found by searching rather than listing, the writable skills folder, extra read-only folders, the problems list, and the approval note.",body:["A skill is a markdown file with a name and a description. The body is never in the prompt - it is read with `read_file` when a task actually calls for it, so a skill can be as long as you like.","By default the summaries are not in the prompt either: the assistant searches for a relevant note with `search_docs`, the same way it finds tools. What stays is a count and an instruction to look, so it still knows notes exist - a description nobody sees is a note nobody reads. Switch it off in **Search** if you would rather every summary sat in the prompt.",'This is the answer to "it does not know about our internal libraries". It offers to write one when you explain something durable, and offers to correct one when something contradicts it - a stale skill is worse than a missing one.',"You get a writable folder plus any number of read-only ones, such as a shared team folder, with PATH-style precedence and shadowing reported rather than silently applied. Writing a skill needs approval too: it is prose that steers every future turn."]},{id:"customData",title:"Custom data - bring your own corpus",tab:"customData",completionEvents:["onStepSelected"],altText:"The Custom data tab, showing a dataset with its collector tool, record count, schedule and last sync, alongside buttons for syncing, rebuilding and clearing it.",body:["The data you most want the assistant to know is rarely on disk. It is in a ticketing system, a wiki, a database, an internal API - reachable, but only through something that knows how your organisation authenticates.","So you point at a tool that returns records, and Light Code does the rest: embedding them, keeping them current, and searching them with `search_data`. The collector is an ordinary Python tool or an MCP tool you already have - one function signature rather than a connector per system.","You do not have to write it. Tell the assistant where the data lives and ask for a collector; it already has the contract and will offer one for you to approve.","Each dataset has its own schedule - including **only when I ask**, which is the right answer for a source that is expensive or that only changes when somebody does something. Clear, rebuild and a retention window are all here, and a progress bar with a Stop for the first sync of something large."]},{id:"search",title:"Search - find things by meaning",tab:"search",completionEvents:["onStepSelected"],altText:"The Search tab, showing the backend choice, connection fields, embedding profile, the index button, the two look-things-up toggles for tools and skills, index copying, and query limits.",body:["Indexing is optional, ships disabled, and is **the largest thing Light Code ever sends anywhere**: it uploads the contents of your workspace to the embedding endpoint you name. It says so, and where to, before the first upload.","**Qdrant** and **Chroma** run locally if you would rather nothing left the machine; **OpenSearch** is usually the one your company already has. Embeddings reuse a provider profile, so there is no second set of credentials. You can **copy an index between backends**, so changing your mind later does not orphan what you indexed.","**Looking things up rather than listing them is the default.** MCP and Python tool schemas, and skill summaries, stay out of the prompt; the assistant finds them with `search_docs` and calls them through `call_tool`. Nothing is registered when there is nothing to hide, so a workspace with no MCP servers and no skills pays nothing for it. The tab shows how many things it is hiding, and either half can be switched off - models do call a tool listed in the prompt slightly more reliably than one named through a dispatcher."]},{id:"tools",title:"Tools - everything it can call",tab:"tools",completionEvents:["onStepSelected"],altText:"The Tools tab, showing the search box and the catalogue grouped into built-in, MCP and Python tools, with the looked-up badge explained.",body:["One read-only list of every tool available right now: the built-in nine, everything your MCP servers expose, and the Python tools it has written. Search matches descriptions as well as names, so you can look for what you want done rather than what it is called.","A **looked up** badge means the tool is kept out of the system prompt to save space - the default for MCP and Python tools. It is still callable: the assistant searches for it and calls it by name. A shorter prompt is not a shorter tool list; withholding a capability is what Approvals and modes are for."]},{id:"expert",title:"Expert - spend less on the hard parts",tab:"expert",completionEvents:["onStepSelected"],altText:"The Expert tab, showing the enable toggle, command and model, the per-task spend and consultation limits, cost estimate, skill assessment, and the read-only tool restriction.",body:["In **Junior mode** a cheap model does the work and consults Claude, through the Claude CLI, on the parts that need it. The expert plans, sets checkpoints, and reviews each one as the junior finishes it.","It is read-only by construction - Read, Grep and Glob, never edit or execute - so a second agent can never act outside the approval gate. It keeps one session per task, which makes the first consultation the expensive one and every later one about nineteen times cheaper.","**Budget per task** caps both spend and number of consultations, and the same control sits in the chat header so you can raise it mid-task. The expert is told what is left and plans to fit, gives you a cost estimate up front, and can assess how your primary model is doing."]},{id:"schedules",title:"Schedules - let it run on its own",tab:"schedules",completionEvents:["onStepSelected"],altText:"The Schedules tab, showing a schedule name, prompt and interval, the file-permission, tool and skill filters for unattended runs, and the run history.",body:["A prompt on a timer. Runs in the background without touching the chat you are in, and keeps running with the panel closed.","Nobody is present to approve anything, so an unattended run does not inherit your auto-approve settings. Permission is granted **per schedule**: files are read-only unless you say otherwise, and you pick exactly which tools it may call. Creating Python tools or skills is never available to a schedule at all - model-authored code with no one watching is the one thing that stays out of reach.","**A schedule names the skills it needs** rather than searching for them, under *What it should know*. Its tool list may not include `search_docs`, and a run that comes up empty has nobody to notice. All skills are included until you narrow it.","Every run is logged with its full transcript, and `notify` raises a toast when a run has something to say."]},{id:"appearance",title:"Appearance - make it yours",tab:"appearance",completionEvents:["onStepSelected"],altText:"The Appearance tab, showing the accent colour swatches, the expert colour swatches, and the reduced-motion toggle.",body:["The panel follows your editor theme. Two colours are yours to set: the **accent**, used for anything actionable, and the **expert** colour, which marks authorship - text in it is Claude's words rather than your primary model's.","Text on either is computed rather than fixed, so it stays readable whatever you pick. Motion follows your OS reduced-motion setting, and can be turned off here regardless."]},{id:"privacy",title:"What it does not do",completionEvents:["onStepSelected"],altText:"A diagram of what leaves the machine: your gateway and MCP servers, plus the vector store and embedder only if Search is enabled; then the four things Light Code never does, and a warning that nothing is sandboxed.",body:["No telemetry. No update checks. No default endpoints - a fresh install contacts nothing. No remote assets in the panel.","The only hosts it ever reaches are the ones you configured: your gateway, your MCP servers, and - only if you turn Search on - your vector store and embedding endpoint.","Two things are stated plainly rather than glossed. **Indexing is the largest egress in the product**: enabling it sends your workspace to the embedder. And **nothing is sandboxed** - commands, Python tools and MCP servers run as you, with your permissions, and Light Code does not protect you from another process running as the same user. Approval is the real boundary, which is why it is per-invocation and why every toggle ships off.","Source, issues and the full security section: [github.com/chosengenerationdev/light-code](https://github.com/chosengenerationdev/light-code)"]}];var YO=$.enum(["openai","anthropic","gemini"]),JO=$.object({caFile:$.string().optional(),certFile:$.string().optional(),keyFile:$.string().optional(),pfxFile:$.string().optional(),passphraseRef:$.string().optional(),rejectUnauthorized:$.boolean().optional(),useGlobalClientCertificate:$.boolean().optional()}),XO=$.object({certDir:$.string().min(1).optional(),certFile:$.string().optional(),keyFile:$.string().optional(),pfxFile:$.string().optional(),caFile:$.string().optional(),passphraseRef:$.string().optional()}),KO=$.object({tokenUrl:$.string().url("Must be a valid URL").optional(),grantType:$.string().optional(),clientId:$.string().optional(),clientSecretRef:$.string().optional(),scope:$.string().optional(),extraTokenParams:$.record($.string(),$.string()).optional(),tokenHeaderName:$.string().optional(),tokenHeaderPrefix:$.string().optional(),tokenPath:$.string().optional(),expiresInPath:$.string().optional(),fallbackExpirySeconds:$.number().int().positive().optional(),refreshSkewSeconds:$.number().int().nonnegative().optional(),extraHeaders:$.record($.string(),$.string()).optional()}),QO=$.object({command:$.array($.string().min(1)).min(1,"Give the program and its arguments").describe("argv. Spawned directly \u2014 nothing is parsed by a shell."),cwd:$.string().optional(),tokenPath:$.string().optional(),expiresInPath:$.string().optional(),fallbackExpirySeconds:$.number().int().positive().optional(),refreshSkewSeconds:$.number().int().nonnegative().optional(),timeoutSeconds:$.number().int().positive().optional(),headerName:$.string().optional(),headerPrefix:$.string().optional(),env:$.record($.string(),$.string()).optional()}),eN=$.discriminatedUnion("type",[$.object({type:$.literal("none")}),$.object({type:$.literal("apiKey"),apiKeyRef:$.string().min(1)}),$.object({type:$.literal("tokenCommand"),tokenCommand:QO}),$.object({type:$.literal("header"),headers:$.array($.object({name:$.string().min(1,"Give the header name"),valueRef:$.string().min(1,"Give the value, or env:NAME"),prefix:$.string().optional()})).min(1,"Add at least one header")}),$.object({type:$.literal("apigeeMtls"),certs:XO,apigee:KO})]),t$=$.object({id:$.string().min(1),label:$.string().min(1,"Label is required"),wireFormat:YO,baseUrl:$.string().min(1,"Base URL is required").url("Must be a valid URL"),model:$.string().min(1,"Model is required"),auth:eN,headers:$.record($.string(),$.string()).optional(),tls:JO.optional(),maxTokens:$.number().int().positive().optional(),temperature:$.number().min(0).max(2).optional(),topP:$.number().min(0).max(1).optional(),thinking:$.object({level:$.enum(["off","low","medium","high"]),style:$.enum(["effort","qwen"]).optional()}).optional(),modelCapabilities:$.object({contextWindow:$.number().int().positive().optional(),supportsVision:$.boolean().optional(),supportsTools:$.boolean().optional()}).optional()});var tN=t$.pick({label:!0,wireFormat:!0,baseUrl:!0,model:!0});function xb(e){let t=tN.safeParse(e);return t.success?[]:t.error.issues.map(n=>({path:n.path.join("."),message:n.message}))}var n$={"gpt-4o-mini":{contextWindow:128e3,supportsVision:!0,supportsTools:!0},"gpt-4o":{contextWindow:128e3,supportsVision:!0,supportsTools:!0},"gpt-4.1-mini":{contextWindow:1047576,supportsVision:!0,supportsTools:!0},"gpt-4.1":{contextWindow:1047576,supportsVision:!0,supportsTools:!0},"gpt-4-turbo":{contextWindow:128e3,supportsVision:!0,supportsTools:!0},"gpt-4":{contextWindow:8192,supportsVision:!1,supportsTools:!0},"gpt-3.5-turbo":{contextWindow:16385,supportsVision:!1,supportsTools:!0},o3:{contextWindow:2e5,supportsVision:!0,supportsTools:!0},"o4-mini":{contextWindow:2e5,supportsVision:!0,supportsTools:!0},"claude-opus-4":{contextWindow:2e5,supportsVision:!0,supportsTools:!0},"claude-sonnet-4":{contextWindow:2e5,supportsVision:!0,supportsTools:!0},"claude-3-7-sonnet":{contextWindow:2e5,supportsVision:!0,supportsTools:!0},"claude-3-5-sonnet":{contextWindow:2e5,supportsVision:!0,supportsTools:!0},"claude-3-5-haiku":{contextWindow:2e5,supportsVision:!0,supportsTools:!0},"gemini-2.5-pro":{contextWindow:1048576,supportsVision:!0,supportsTools:!0},"gemini-2.5-flash":{contextWindow:1048576,supportsVision:!0,supportsTools:!0},"gemini-2.0-flash":{contextWindow:1048576,supportsVision:!0,supportsTools:!0},"deepseek-reasoner":{contextWindow:65536,supportsVision:!1,supportsTools:!1},"deepseek-chat":{contextWindow:65536,supportsVision:!1,supportsTools:!0},"llama-3.3":{contextWindow:128e3,supportsVision:!1,supportsTools:!0},"llama-3.1":{contextWindow:128e3,supportsVision:!1,supportsTools:!0},mistral:{contextWindow:32768,supportsVision:!1,supportsTools:!0},"qwen2.5-coder":{contextWindow:131072,supportsVision:!1,supportsTools:!0},"qwen2.5-vl":{contextWindow:131072,supportsVision:!0,supportsTools:!0},"qwen2.5":{contextWindow:131072,supportsVision:!1,supportsTools:!0},"qwen3-coder":{contextWindow:262144,supportsVision:!1,supportsTools:!0},"qwen3-vl":{contextWindow:262144,supportsVision:!0,supportsTools:!0},qwen3:{contextWindow:131072,supportsVision:!1,supportsTools:!0},"qwen-vl":{contextWindow:131072,supportsVision:!0,supportsTools:!0},"qwen-max":{contextWindow:131072,supportsVision:!1,supportsTools:!0},"qwen-plus":{contextWindow:131072,supportsVision:!1,supportsTools:!0},"qwen-turbo":{contextWindow:1e6,supportsVision:!1,supportsTools:!0},qwq:{contextWindow:131072,supportsVision:!1,supportsTools:!0},qwen:{contextWindow:32768,supportsVision:!1,supportsTools:!0},"gemma-3n":{contextWindow:32768,supportsVision:!0,supportsTools:!0},"gemma-3":{contextWindow:131072,supportsVision:!0,supportsTools:!0},"gemma-2":{contextWindow:8192,supportsVision:!1,supportsTools:!0},gemma:{contextWindow:131072,supportsVision:!0,supportsTools:!0}},nN={contextWindow:32768,supportsVision:!1,supportsTools:!0},iN=Object.keys(n$).sort((e,t)=>t.length-e.length);function i$(e){let t=e.toLowerCase();for(let n of iN)if(t.includes(n))return{...n$[n],known:!0};return{...nN,known:!1}}function Sb(e,t){let n=i$(e);return t===void 0?n:{contextWindow:t.contextWindow??n.contextWindow,supportsVision:t.supportsVision??n.supportsVision,supportsTools:t.supportsTools??n.supportsTools,known:n.known||Object.values(t).some(r=>r!==void 0)}}var rN={regular:7.6,bold:8.2,mono:8,monoBold:8},oN={small:.85,normal:1,large:1.25,xlarge:1.55},aN=6.4,lN=17,sN=14,cN=13,uN=11,dN=15,r$=28,o$=28,a$=64,_n=28,fN=40,l$=26,mN=16,hN=7,s$=22,c$=24,u$=18;function d$(e,t){let n=Math.max(4,t),r=[],i="";for(let o of e.split(/\s+/).filter(a=>a.length>0))for(i.length===0?i=o:i.length+1+o.length<=n?i=`${i} ${o}`:(r.push(i),i=o);i.length>n;)r.push(i.slice(0,n)),i=i.slice(n);return i.length>0&&r.push(i),r.length>0?r:[""]}function pN(e,t,n="regular",r="normal"){let i=oN[r],o=rN[n]*i,a=aN*i,l=lN*i,c=sN*i,u=Math.max(Math.round(e.length*o),t===void 0?0:Math.round(t.length*a)),d=280*i,m=Math.min(d,Math.max(96,u+r$*2)),h=m-r$*2,f=d$(e,Math.floor(h/o)),v=t===void 0?[]:d$(t,Math.floor(h/a)),k=f.length*l+v.length*c;return{width:m,height:Math.max(52*i,k+dN*2),lines:f,noteLines:v,fontSize:cN*i,noteFontSize:uN*i,lineHeight:l,noteLineHeight:c}}function gN(e){let t=new Map;for(let[o,a]of e.edges.entries()){let l=t.get(a.from)??[];l.push({to:a.to,index:o}),t.set(a.from,l)}let n=new Set,r=new Map,i=o=>{r.set(o,"open");for(let a of t.get(o)??[]){let l=r.get(a.to);l==="open"?n.add(a.index):l===void 0&&i(a.to)}r.set(o,"done")};for(let o of e.nodes)r.has(o.id)||i(o.id);return n}function yN(e,t){let n=new Map;for(let a of e.nodes)n.set(a.id,[]);for(let[a,l]of e.edges.entries())t.has(a)||n.get(l.to)?.push(l.from);let r=new Map,i=new Set,o=a=>{let l=r.get(a);if(l!==void 0)return l;if(i.has(a))return 0;i.add(a);let c=n.get(a)??[],u=c.length===0?0:Math.max(...c.map(d=>o(d)+1));return i.delete(a),r.set(a,u),u};for(let a of e.nodes)o(a.id);return r}function vN(e,t,n){let r=[];for(let o of e.nodes){let a=t.get(o.id)??0;for(;r.length<=a;)r.push([]);r[a]?.push(o.id)}let i=new Map;for(let[o,a]of e.edges.entries()){if(n.has(o))continue;let l=i.get(a.to)??[];l.push(a.from),i.set(a.to,l)}for(let o=1;o<r.length;o+=1){let a=r[o-1]??[],l=new Map(a.map((d,m)=>[d,m])),u=(r[o]??[]).map((d,m)=>{let h=(i.get(d)??[]).map(v=>l.get(v)).filter(v=>v!==void 0),f=h.length===0?m:h.reduce((v,k)=>v+k,0)/h.length;return{id:d,barycentre:f,index:m}});u.sort((d,m)=>d.barycentre-m.barycentre||d.index-m.index),r[o]=u.map(d=>d.id)}return r}function kb(e){let t=e.direction==="right",n=gN(e),r=yN(e,n),i=vN(e,r,n),o=new Map(e.nodes.map(y=>[y.id,y])),a=new Map;for(let y of e.nodes){let T=y.emphasis==="bold",A=y.font==="mono"?T?"monoBold":"mono":T?"bold":"regular";a.set(y.id,pN(y.label,y.note,A,y.textSize??e.textSize??"normal"))}let l=i.map(y=>Math.max(...y.map(T=>a.get(T)?.height??52))),c=i.map(y=>y.reduce((T,M)=>T+(a.get(M)?.width??96),0)+o$*Math.max(0,y.length-1)),u=Math.max(...c,1),d=[],m=_n+(e.title===void 0?0:fN);for(let[y,T]of i.entries()){let M=l[y]??52,A=_n+(u-(c[y]??0))/2;for(let w of T){let V=o.get(w),F=a.get(w);V===void 0||F===void 0||(d.push({id:w,lines:F.lines,noteLines:F.noteLines,bold:V.emphasis==="bold",mono:V.font==="mono",fontSize:F.fontSize,noteFontSize:F.noteFontSize,lineHeight:F.lineHeight,noteLineHeight:F.noteLineHeight,shape:V.shape??"box",tone:V.tone??(V.shape==="round"?"accent":"neutral"),icon:V.icon,x:A,y:m+(M-F.height)/2,width:F.width,height:F.height}),A+=F.width+o$)}m+=M+a$}let h={width:u+_n*2,height:m-a$+_n},f=t?d.map(y=>({...y,x:y.y,y:y.x})):d,v=t?{width:h.height,height:h.width}:{width:h.width,height:h.height},k=new Map(f.map(y=>[y.id,y])),D=e.edges.flatMap((y,T)=>{let M=k.get(y.from),A=k.get(y.to);if(M===void 0||A===void 0)return[];let w=t?{x:M.x+M.width,y:M.y+M.height/2}:{x:M.x+M.width/2,y:M.y+M.height},V=t?{x:A.x,y:A.y+A.height/2}:{x:A.x+A.width/2,y:A.y},we=n.has(T)?t?[{x:M.x+M.width/2,y:M.y+M.height},{x:M.x+M.width/2,y:v.height-_n/2},{x:A.x+A.width/2,y:v.height-_n/2},{x:A.x+A.width/2,y:A.y+A.height}]:[{x:M.x+M.width,y:M.y+M.height/2},{x:v.width-_n/2,y:M.y+M.height/2},{x:v.width-_n/2,y:A.y+A.height/2},{x:A.x+A.width,y:A.y+A.height/2}]:[w,V],Xe=we.length===2?0:1,jt=we[Xe]??w,Lt=we[Xe+1]??V;return[{from:y.from,to:y.to,label:y.label,dashed:y.style==="dashed",points:we,labelAt:{x:(jt.x+Lt.x)/2,y:(jt.y+Lt.y)/2}}]}),p=[],b=0,S=v.width;if(e.legend!==void 0&&e.legend.length>0){let y=e.legend.map(V=>l$+hN+Math.round(V.label.length*6.6)),T=Math.max(v.width-_n*2,Math.max(...y)),M=_n,A=v.height+u$,w=1;for(let[V,F]of e.legend.entries()){let we=y[V]??0;M>_n&&M+we-_n>T&&(M=_n,A+=c$,w+=1),p.push({label:F.label,shape:F.shape??"box",tone:F.tone??"neutral",icon:F.icon,x:M,y:A,swatchWidth:l$,swatchHeight:mN}),M+=we+s$,S=Math.max(S,M-s$+_n)}b=u$+w*c$}return{width:S,height:v.height+b,title:e.title,note:e.note,nodes:f,edges:D,legend:p}}var h$={background:"#ffffff",line:"#5b6b7a",surface:"#f6f8fa",text:"#141b22",muted:"#5b6b7a",accent:"#22c55e"},bN={info:"#3b82f6",success:"#22a55e",warning:"#d97706",danger:"#dc2626"};function qd(e,t){if(e==="neutral")return{fill:t.surface,fillOpacity:1,stroke:t.line,text:t.text,icon:t.muted};if(e==="muted")return{fill:t.background,fillOpacity:1,stroke:t.muted,text:t.muted,icon:t.muted};let n=e==="accent"?t.accent:bN[e];return{fill:n,fillOpacity:t.dark===!0?.2:.12,stroke:n,text:t.text,icon:n}}var p$={service:"M2 4h12v3H2z M2 9h12v3H2z M4.5 5.5h.01 M4.5 10.5h.01",database:"M3 4c0-1.1 2.2-2 5-2s5 .9 5 2v8c0 1.1-2.2 2-5 2s-5-.9-5-2z M3 4c0 1.1 2.2 2 5 2s5-.9 5-2",user:"M8 8a2.5 2.5 0 1 0 0-5 2.5 2.5 0 0 0 0 5z M3 14c0-2.5 2.2-4 5-4s5 1.5 5 4",file:"M4 2h5l3 3v9H4z M9 2v3h3",cloud:"M5 12a3 3 0 0 1 .4-6 4 4 0 0 1 7.5 1.4A2.6 2.6 0 0 1 12 12z",lock:"M4 7h8v7H4z M6 7V5a2 2 0 0 1 4 0v2",clock:"M8 14A6 6 0 1 0 8 2a6 6 0 0 0 0 12z M8 5v3.5l2 1.2",queue:"M2 4h3v8H2z M6.5 4h3v8h-3z M11 4h3v8h-3z",code:"M6 4 2.5 8 6 12 M10 4l3.5 4L10 12",mail:"M2 4h12v8H2z M2 4.5 8 9l6-4.5",check:"M3 8.5 6.5 12 13 4.5",cross:"M4 4l8 8 M12 4l-8 8",warning:"M8 2.5 14.5 13.5h-13z M8 6.5v3.2 M8 11.6h.01",gear:"M8 10.2a2.2 2.2 0 1 0 0-4.4 2.2 2.2 0 0 0 0 4.4z M8 1.6v2 M8 12.4v2 M1.6 8h2 M12.4 8h2 M3.5 3.5l1.4 1.4 M11.1 11.1l1.4 1.4 M12.5 3.5l-1.4 1.4 M4.9 11.1l-1.4 1.4"};function xN(e,t){if(e.icon===void 0)return"";let r=15/16,i=e.x+10,o=e.y+9;return`<g transform="translate(${String(i)},${String(o)}) scale(${String(r)})" fill="none" stroke="${t}" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round"><path d="${p$[e.icon]}" /></g>`}function Ms(e){return e.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}function f$(e,t){let{x:n,y:r,width:i,height:o}=e,a=qd(e.tone,t),l=`fill="${a.fill}" fill-opacity="${String(a.fillOpacity)}" stroke="${a.stroke}" stroke-width="1.5"`;if(e.shape==="diamond")return`<polygon points="${[`${String(n+i/2)},${String(r)}`,`${String(n+i)},${String(r+o/2)}`,`${String(n+i/2)},${String(r+o)}`,`${String(n)},${String(r+o/2)}`].join(" ")}" ${l} />`;if(e.shape==="cylinder")return[`<path d="M${String(n)},${String(r+7)} a${String(i/2)},${String(7)} 0 0 1 ${String(i)},0 v${String(o-14)} a${String(i/2)},${String(7)} 0 0 1 ${String(-i)},0 z" ${l} />`,`<path d="M${String(n)},${String(r+7)} a${String(i/2)},${String(7)} 0 0 0 ${String(i)},0" fill="none" stroke="${a.stroke}" stroke-width="1.5" />`].join("");let c=e.shape==="round"?o/2:6;return`<rect x="${String(n)}" y="${String(r)}" width="${String(i)}" height="${String(o)}" rx="${String(c)}" ${l} />`}var SN="system-ui, sans-serif",kN="ui-monospace, SFMono-Regular, Menlo, Consolas, monospace";function m$(e){return Math.round(e*100)/100}function wN(e,t){let n=qd(e.tone,t),r=e.x+e.width/2,i=e.lines.length*e.lineHeight+e.noteLines.length*e.noteLineHeight,o=e.y+(e.height-i)/2+e.lineHeight*.78,a=e.mono?kN:SN,l=e.bold?' font-weight="600"':"",c=[];for(let u of e.lines)c.push(`<text x="${String(r)}" y="${String(o)}" text-anchor="middle" font-family="${a}" font-size="${String(m$(e.fontSize))}"${l} fill="${n.text}">${Ms(u)}</text>`),o+=e.lineHeight;for(let u of e.noteLines)c.push(`<text x="${String(r)}" y="${String(o)}" text-anchor="middle" font-family="${a}" font-size="${String(m$(e.noteFontSize))}" fill="${t.muted}">${Ms(u)}</text>`),o+=e.noteLineHeight;return c.join("")}function wb(e,t=h$){let n=[];n.push(`<svg xmlns="http://www.w3.org/2000/svg" width="${String(e.width)}" height="${String(e.height)}" viewBox="0 0 ${String(e.width)} ${String(e.height)}" role="img">`),n.push(`<defs><marker id="lc-arrow" viewBox="0 0 10 10" refX="9" refY="5" markerWidth="7" markerHeight="7" orient="auto-start-reverse"><path d="M0,0 L10,5 L0,10 z" fill="${t.line}" /></marker></defs>`),n.push(`<rect width="${String(e.width)}" height="${String(e.height)}" fill="${t.background}" />`),e.title!==void 0&&n.push(`<text x="${String(e.width/2)}" y="26" text-anchor="middle" font-family="system-ui, sans-serif" font-size="15" font-weight="600" fill="${t.text}">${Ms(e.title)}</text>`);for(let r of e.edges){let i=r.points.map((o,a)=>`${a===0?"M":"L"}${String(o.x)},${String(o.y)}`).join(" ");if(n.push(`<path d="${i}" fill="none" stroke="${t.line}" stroke-width="1.5"${r.dashed?' stroke-dasharray="5 4"':""} marker-end="url(#lc-arrow)" />`),r.label!==void 0){let o=r.label.length*6.4+10;n.push(`<rect x="${String(r.labelAt.x-o/2)}" y="${String(r.labelAt.y-9)}" width="${String(o)}" height="17" rx="3" fill="${t.background}" />`,`<text x="${String(r.labelAt.x)}" y="${String(r.labelAt.y+4)}" text-anchor="middle" font-family="system-ui, sans-serif" font-size="11" fill="${t.muted}">${Ms(r.label)}</text>`)}}for(let r of e.nodes)n.push(f$(r,t),xN(r,qd(r.tone,t).icon),wN(r,t));for(let r of e.legend){let i={id:"",lines:[],noteLines:[],bold:!1,mono:!1,fontSize:13,noteFontSize:11,lineHeight:17,noteLineHeight:14,shape:r.shape,tone:r.tone,icon:void 0,x:r.x,y:r.y,width:r.swatchWidth,height:r.swatchHeight};if(n.push(f$(i,t)),r.icon!==void 0){let o=qd(r.tone,t),a=11/16;n.push(`<g transform="translate(${String(r.x+r.swatchWidth/2-5.5)},${String(r.y+r.swatchHeight/2-5.5)}) scale(${String(a)})" fill="none" stroke="${o.icon}" stroke-width="1.6" stroke-linecap="round" stroke-linejoin="round"><path d="${p$[r.icon]}" /></g>`)}n.push(`<text x="${String(r.x+r.swatchWidth+7)}" y="${String(r.y+r.swatchHeight-4)}" font-family="system-ui, sans-serif" font-size="11" fill="${t.muted}">${Ms(r.label)}</text>`)}return n.push("</svg>"),n.join("")}function _b(e){return`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`}var zb=["small","medium","large","full"],$b={small:280,medium:440,large:680,full:void 0},g$="full";function Bs(e){return e===void 0?$b[g$]:$b[e]}var y$="How wide to draw it: small (an aside), medium (the ordinary case), large (worth studying), or full (the whole width available). Use a smaller one when the user says it is too big, and small or medium for something beside a paragraph of text rather than the point of the answer.";var _N=$.discriminatedUnion("kind",[$.object({kind:$.literal("interval"),everyMinutes:$.number().int().min(1).max(1440*7)}),$.object({kind:$.literal("daily"),hour:$.number().int().min(0).max(23),minute:$.number().int().min(0).max(59)}),$.object({kind:$.literal("weekly"),days:$.array($.number().int().min(0).max(6)).min(1),hour:$.number().int().min(0).max(23),minute:$.number().int().min(0).max(59)})]),$N=$.object({id:$.string().min(1),name:$.string().min(1),workspaceRoot:$.string().optional(),prompt:$.string().min(1),trigger:_N,enabled:$.boolean(),allowedTools:$.array($.string()),allowedSkills:$.array($.string()).optional(),nextRunAt:$.number().optional(),lastRunAt:$.number().optional(),lastResult:$.enum(["ok","error","cancelled"]).optional(),lastSummary:$.string().optional(),lastTaskId:$.string().optional(),runs:$.array($.object({at:$.number(),result:$.enum(["ok","error","cancelled"]),durationMs:$.number().optional(),summary:$.string().optional(),taskId:$.string().optional(),reportPath:$.string().optional()})).optional()});var SL=$.record($.string(),$N);function Gd(e,t){let n=new Set(t),r=new Set;for(let i of e)n.has(i.name)&&(i.group==="edit"||i.group==="command"||i.group==="mcp")&&r.add(i.group);return[...r].sort()}function v$(e,t){let n=e.trigger;return n.kind==="interval"?t+n.everyMinutes*6e4:zN(n,t)}function zN(e,t){let n=new Date(t);n.setHours(e.hour,e.minute,0,0);let r=e.kind==="weekly"?new Set(e.days):void 0;for(let i=0;i<=8;i++){let o=n.getTime()>t,a=r===void 0||r.has(n.getDay());if(o&&a)return n.getTime();n.setDate(n.getDate()+1),n.setHours(e.hour,e.minute,0,0)}return t+1440*6e4}function Tb(e){if(e.kind==="interval"){if(e.everyMinutes%1440===0){let a=e.everyMinutes/1440;return`Every ${a===1?"day":`${String(a)} days`}`}if(e.everyMinutes%60===0){let a=e.everyMinutes/60;return`Every ${a===1?"hour":`${String(a)} hours`}`}return`Every ${String(e.everyMinutes)} minutes`}let t=`${String(e.hour).padStart(2,"0")}:${String(e.minute).padStart(2,"0")}`;if(e.kind==="daily")return`Every day at ${t}`;let n=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],r=[...e.days].sort((a,l)=>a-l).map(a=>n[a]??"?"),i=[1,2,3,4,5];return`${r.length===5&&i.every(a=>e.days.includes(a))?"Weekdays":r.join(", ")} at ${t}`}function Cb(e,t){if(!e.enabled)return"Paused";let n=e.nextRunAt??v$(e,t),r=Math.round((n-t)/6e4);return r<1?"Due now":r<60?`In ${String(r)} min`:r<1440?`In ${String(Math.round(r/60))} h`:new Date(n).toLocaleString()}var b$=["bar","stackedBar","groupedBar","line","multiLine","pie"],Eb=200,TN=12,CN=$.number().refine(e=>Number.isFinite(e),{message:"must be a finite number"}),EN=$.object({name:$.string().min(1).describe('What this series is, e.g. "Alerts" or "Inbox". Shown in the legend.'),values:$.array(CN).min(1).max(Eb).describe("One number per category, in the same order as `categories`."),detail:$.array($.union([$.array($.string()),$.null()])).max(Eb).optional().describe("Optional. For each value, the rows behind it \u2014 subjects, ids, filenames, whatever the number counted. Same order as `values`; use null where there is nothing to show.")}),zL=$.object({type:$.enum(b$).describe("bar, stackedBar, groupedBar, line, multiLine or pie."),title:$.string().max(200).optional(),categories:$.array($.string()).min(1).max(Eb).describe("The x axis, or the pie slice labels. One per value in every series."),series:$.array(EN).min(1).max(TN),size:$.enum(zb).optional().describe(y$),xLabel:$.string().max(80).optional(),yLabel:$.string().max(80).optional(),note:$.string().max(500).optional().describe("A line under the chart. Say where the numbers came from, and what they exclude.")}).superRefine((e,t)=>{for(let[n,r]of e.series.entries())r.values.length!==e.categories.length&&t.addIssue({code:"custom",path:["series",n,"values"],message:`series "${r.name}" has ${String(r.values.length)} value(s) but there are ${String(e.categories.length)} categories. They must match exactly \u2014 a chart drawn from misaligned data looks correct and is not.`}),r.detail!==void 0&&r.detail.length>r.values.length&&t.addIssue({code:"custom",path:["series",n,"detail"],message:`series "${r.name}" has more detail entries than values.`});e.type==="pie"&&(e.series.length!==1&&t.addIssue({code:"custom",path:["series"],message:"a pie chart takes exactly one series \u2014 use stackedBar or groupedBar for several."}),e.series.some(n=>n.values.some(r=>r<0))&&t.addIssue({code:"custom",path:["series"],message:"a pie chart cannot show negative values."})),e.type==="stackedBar"&&e.series.some(n=>n.values.some(r=>r<0))&&t.addIssue({code:"custom",path:["series"],message:"a stacked bar cannot show negative values \u2014 the segments would overlap rather than stack."})});function Ib(e){let t=e.series.map(n=>({name:n.name,total:n.values.reduce((r,i)=>r+i,0)}));return{series:t,grand:t.reduce((n,r)=>n+r.total,0)}}function Db(e){return jb(e?.embedder?.indexAlias,e?.embedder?.indexAliases)}function Ab(e){return jb(e?.embedder?.skillsAlias,e?.embedder?.skillsAliases)}function jb(e,t){let n=[];for(let r of[e,...t??[]]){let i=r?.trim();i===void 0||i.length===0||n.some(o=>o.toLowerCase()===i.toLowerCase())||n.push(i)}return n}function Uo(e){return(e??[]).join(", ")}function Lr(e){return jb(void 0,e.split(/[,\n]/).map(t=>t.trim()))}var q=U(pe(),1);var an=U(re(),1),rr=U(pe(),1);var St=U(re(),1);var R=U(re(),1);function A$({size:e=16}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:(0,R.jsx)("path",{d:"M1.5 1.5 L14.5 8 L1.5 14.5 L4 8 Z"})})}function j$({size:e=16}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:(0,R.jsx)("rect",{x:"3",y:"3",width:"10",height:"10",rx:"1.5"})})}function O$({size:e=16}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,R.jsx)("path",{d:"M10 3 L5 8 L10 13"})})}function N$({size:e=14}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.3","aria-hidden":"true",children:[(0,R.jsx)("rect",{x:"3",y:"5.5",width:"10",height:"7.5",rx:"2"}),(0,R.jsx)("line",{x1:"8",y1:"2",x2:"8",y2:"5.5"}),(0,R.jsx)("circle",{cx:"8",cy:"1.6",r:"1.1",fill:"currentColor",stroke:"none"}),(0,R.jsx)("circle",{cx:"6",cy:"9",r:"0.9",fill:"currentColor",stroke:"none"}),(0,R.jsx)("circle",{cx:"10",cy:"9",r:"0.9",fill:"currentColor",stroke:"none"})]})}function Yd({size:e=14}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.3","aria-hidden":"true",children:[(0,R.jsx)("circle",{cx:"8",cy:"5",r:"2.6"}),(0,R.jsx)("path",{d:"M2.8 14 a5.2 5.2 0 0 1 10.4 0"})]})}function $n({size:e=14}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.3","aria-hidden":"true",children:(0,R.jsx)("path",{d:"M8 1.6 l1.7 3.6 3.9 .5 -2.9 2.7 .8 3.9 L8 10.4 l-3.5 1.9 .8 -3.9 -2.9 -2.7 3.9 -.5 Z"})})}function Oi({size:e=14}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,R.jsx)("path",{d:"M3 8.5 L6.5 12 L13 4.5"})})}function Va({size:e=14}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round","aria-hidden":"true",children:[(0,R.jsx)("line",{x1:"4",y1:"4",x2:"12",y2:"12"}),(0,R.jsx)("line",{x1:"12",y1:"4",x2:"4",y2:"12"})]})}function U$({size:e=14}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.6","aria-hidden":"true",children:[(0,R.jsx)("circle",{cx:"8",cy:"8",r:"5.5",opacity:"0.25"}),(0,R.jsx)("path",{d:"M8 2.5 a5.5 5.5 0 0 1 5.5 5.5",strokeLinecap:"round"})]})}function Wt({size:e=14}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"M3 4.5 h10"}),(0,R.jsx)("path",{d:"M6.5 4.5 V3 h3 v1.5"}),(0,R.jsx)("path",{d:"M4.3 4.5 l.6 8.2 h6.2 l.6 -8.2"})]})}function Pr({size:e=14}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.3","aria-hidden":"true",children:[(0,R.jsx)("rect",{x:"5.5",y:"5.5",width:"8",height:"8",rx:"1.5"}),(0,R.jsx)("path",{d:"M10.5 5.5 V4 a1.5 1.5 0 0 0 -1.5 -1.5 H4 A1.5 1.5 0 0 0 2.5 4 v5 A1.5 1.5 0 0 0 4 10.5 h1.5"})]})}function R$({size:e=14}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinejoin:"round","aria-hidden":"true",children:(0,R.jsx)("path",{d:"M11.2 2.3 l2.5 2.5 -8 8 -3.2 .7 .7 -3.2 Z"})})}function M$({size:e=16}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,R.jsx)("path",{d:"M9.5 4 L5 8.5 a2.1 2.1 0 0 0 3 3 L12.5 7 a3.5 3.5 0 0 0-5-5 L3.5 6"})})}function B$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"M2.5 8a5.5 5.5 0 1 0 1.7-4"}),(0,R.jsx)("path",{d:"M2 2.5 V5.5 H5"}),(0,R.jsx)("path",{d:"M8 5 V8.4 L10.3 9.8"})]})}function L$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":"true",children:[(0,R.jsx)("line",{x1:"8",y1:"3",x2:"8",y2:"13"}),(0,R.jsx)("line",{x1:"3",y1:"8",x2:"13",y2:"8"})]})}function P$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":"true",children:[(0,R.jsx)("line",{x1:"2",y1:"4",x2:"14",y2:"4"}),(0,R.jsx)("line",{x1:"2",y1:"8",x2:"14",y2:"8"}),(0,R.jsx)("line",{x1:"2",y1:"12",x2:"14",y2:"12"}),(0,R.jsx)("circle",{cx:"6",cy:"4",r:"1.5",fill:"currentColor",stroke:"none"}),(0,R.jsx)("circle",{cx:"10",cy:"8",r:"1.5",fill:"currentColor",stroke:"none"}),(0,R.jsx)("circle",{cx:"6",cy:"12",r:"1.5",fill:"currentColor",stroke:"none"})]})}function Ro({size:e=12}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:(0,R.jsx)("path",{d:"M6 3.5 L10.5 8 L6 12.5"})})}function Z$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.6",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"M3 8a5 5 0 1 1 1.6 3.7"}),(0,R.jsx)("path",{d:"M2.5 4.5 L3 8 L6.5 7.6"})]})}function F$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"M10.2 4.1a2.6 2.6 0 0 0-4.4 1.7c0 2.6 4.4 1.9 4.4 4.5a2.6 2.6 0 0 1-4.4 1.7",strokeLinecap:"round"}),(0,R.jsx)("path",{d:"M8 1.8v12.4",strokeLinecap:"round"})]})}function H$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"M8 1.6a6.4 6.4 0 0 0 0 12.8c1 0 1.4-.7 1.1-1.4-.4-.9.2-1.7 1.2-1.7h1.1A3 3 0 0 0 14.4 8 6.4 6.4 0 0 0 8 1.6Z"}),(0,R.jsx)("circle",{cx:"5.2",cy:"6.4",r:"0.95",fill:"currentColor",stroke:"none"}),(0,R.jsx)("circle",{cx:"8",cy:"4.6",r:"0.95",fill:"currentColor",stroke:"none"}),(0,R.jsx)("circle",{cx:"10.9",cy:"6.2",r:"0.95",fill:"currentColor",stroke:"none"})]})}function V$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"M5 2v3M11 2v3"}),(0,R.jsx)("path",{d:"M3.5 5h9v2.5a4.5 4.5 0 0 1-9 0Z",strokeLinejoin:"round"}),(0,R.jsx)("path",{d:"M8 12v2.5"})]})}function Pb({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"M8 1.8 13 3.6v4.1c0 3-2.1 5.5-5 6.5-2.9-1-5-3.5-5-6.5V3.6Z"}),(0,R.jsx)("path",{d:"M5.8 8 7.4 9.6 10.4 6.4",strokeLinecap:"round"})]})}function q$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("rect",{x:"2.2",y:"2.2",width:"4.6",height:"4.6",rx:"1"}),(0,R.jsx)("rect",{x:"9.2",y:"9.2",width:"4.6",height:"4.6",rx:"1"}),(0,R.jsx)("path",{d:"M6.8 4.5h3.2a1.5 1.5 0 0 1 1.5 1.5v3.2",strokeLinecap:"round"})]})}function G$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round","aria-hidden":"true",children:[(0,R.jsx)("circle",{cx:"7",cy:"7",r:"4.2"}),(0,R.jsx)("path",{d:"M10.2 10.2 14 14"})]})}function W$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.3","aria-hidden":"true",children:[(0,R.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,R.jsx)("path",{d:"M2 8h12M8 2c1.8 2 1.8 10 0 12M8 2c-1.8 2-1.8 10 0 12"})]})}function Y$({size:e=16}){let t="M7.9 1.1c-1 0-1.9.1-2.6.4-.6.2-1 .6-1 1.3v1.6h3.7v.5H2.9c-.8 0-1.5.5-1.8 1.3-.3.9-.3 1.9 0 2.9.3.8.8 1.3 1.5 1.3h1.2V8.6c0-1 .9-1.9 1.9-1.9h3.7c.7 0 1.3-.6 1.3-1.3V2.8c0-.7-.5-1.2-1.3-1.4-.5-.2-1-.3-1.5-.3Zm-2.1 1c.4 0 .7.3.7.7s-.3.7-.7.7-.7-.3-.7-.7.3-.7.7-.7Z";return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:[(0,R.jsx)("path",{d:t}),(0,R.jsx)("path",{d:t,transform:"rotate(180 8 8)"})]})}function J$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("circle",{cx:"8",cy:"8",r:"6.2"}),(0,R.jsx)("path",{d:"M6.2 6.1a1.9 1.9 0 1 1 2.5 1.8c-.5.2-.7.6-.7 1.1v.3"}),(0,R.jsx)("path",{d:"M8 11.6h.01"})]})}function X$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("rect",{x:"1.8",y:"5.4",width:"12.4",height:"7.8",rx:"1.3"}),(0,R.jsx)("path",{d:"M5.8 5.4V4.1c0-.6.5-1.1 1.1-1.1h2.2c.6 0 1.1.5 1.1 1.1v1.3"}),(0,R.jsx)("path",{d:"M1.8 8.6h12.4M6.6 8.6v1.4h2.8V8.6"})]})}function K$({size:e=16}){return(0,R.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:1.4,"aria-hidden":"true",children:[(0,R.jsx)("rect",{x:"1.5",y:"3.5",width:"13",height:"9",rx:"1.5"}),(0,R.jsx)("path",{d:"M2 4.5 8 9l6-4.5"})]})}function Q$({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinejoin:"round","aria-hidden":"true",children:[(0,R.jsx)("path",{d:"M2.5 3.2c1.8-.9 3.7-.9 5.5 0v9.6c-1.8-.9-3.7-.9-5.5 0Z"}),(0,R.jsx)("path",{d:"M13.5 3.2c-1.8-.9-3.7-.9-5.5 0v9.6c1.8-.9 3.7-.9 5.5 0Z"})]})}function ez({size:e=16}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round","aria-hidden":"true",children:[(0,R.jsx)("circle",{cx:"8",cy:"8",r:"6"}),(0,R.jsx)("path",{d:"M8 4.4V8l2.4 1.6"})]})}function Zb({size:e=14}){return(0,R.jsx)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:(0,R.jsx)("path",{d:"M4.5 2.8 13 8l-8.5 5.2Z"})})}function tz({size:e=14}){return(0,R.jsxs)("svg",{viewBox:"0 0 16 16",width:e,height:e,fill:"currentColor","aria-hidden":"true",children:[(0,R.jsx)("rect",{x:"4",y:"3",width:"3",height:"10",rx:"1"}),(0,R.jsx)("rect",{x:"9",y:"3",width:"3",height:"10",rx:"1"})]})}function nz({size:e=16}){return(0,R.jsxs)("svg",{width:e,height:e,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[(0,R.jsx)("ellipse",{cx:"8",cy:"3.5",rx:"5.5",ry:"2.2",stroke:"currentColor",strokeWidth:"1.3"}),(0,R.jsx)("path",{d:"M2.5 3.5v9c0 1.2 2.5 2.2 5.5 2.2s5.5-1 5.5-2.2v-9",stroke:"currentColor",strokeWidth:"1.3"}),(0,R.jsx)("path",{d:"M2.5 8c0 1.2 2.5 2.2 5.5 2.2s5.5-1 5.5-2.2",stroke:"currentColor",strokeWidth:"1.3"})]})}var s={background:"var(--vscode-sideBar-background, var(--vscode-editor-background))",foreground:"var(--vscode-foreground)",muted:"var(--vscode-descriptionForeground)",border:"var(--vscode-widget-border, var(--vscode-panel-border))",inputBackground:"var(--vscode-input-background)",inputForeground:"var(--vscode-input-foreground)",inputBorder:"var(--vscode-input-border, var(--vscode-widget-border))",buttonBackground:"var(--vscode-button-background)",buttonForeground:"var(--vscode-button-foreground)",buttonHoverBackground:"var(--vscode-button-hoverBackground)",secondaryButtonBackground:"var(--vscode-button-secondaryBackground, var(--vscode-input-background))",secondaryButtonForeground:"var(--vscode-button-secondaryForeground, var(--vscode-foreground))",secondaryButtonHoverBackground:"var(--vscode-button-secondaryHoverBackground, var(--vscode-toolbar-hoverBackground))",hoverBackground:"var(--vscode-toolbar-hoverBackground)",error:"var(--vscode-errorForeground)",warning:"var(--vscode-editorWarning-foreground, var(--vscode-list-warningForeground, var(--vscode-errorForeground)))",focusBorder:"var(--vscode-focusBorder)",assistantBubble:"var(--vscode-editor-inactiveSelectionBackground, var(--vscode-input-background))",accent:"var(--lc-accent, #22C55E)",accentDeep:"var(--lc-accent-deep, #157A3A)",accentContrast:"var(--lc-accent-contrast, #12111a)",accentSoft:"var(--lc-accent-a12, rgba(34, 197, 94, 0.12))",accentRing:"var(--lc-accent-a35, rgba(34, 197, 94, 0.35))",accentGradient:"linear-gradient(135deg, var(--lc-accent-deep, #157A3A), var(--lc-accent, #22C55E))",expert:"var(--lc-expert, #D97757)",expertDeep:"var(--lc-expert-deep, #86492F)",expertContrast:"var(--lc-expert-contrast, #ffffff)",expertSoft:"var(--lc-expert-a12, rgba(217, 119, 87, 0.12))",expertRing:"var(--lc-expert-a35, rgba(217, 119, 87, 0.35))",expertGradient:"linear-gradient(135deg, var(--lc-expert-deep, #86492F), var(--lc-expert, #D97757))"},G="var(--vscode-font-family, sans-serif)",iz={button:"lc-btn",accentButton:"lc-btn lc-btn-accent",input:"lc-input",scroll:"lc-scroll",panel:"lc-panel",tab:"lc-tab",swatch:"lc-swatch"};function Mo(e){return e===void 0||e==="unknown"?{edge:s.expert,soft:s.expertSoft,contrast:s.expertContrast,gradient:s.expertGradient}:{edge:`var(--lc-agent-${e}, var(--lc-expert, #D97757))`,soft:`var(--lc-agent-${e}-a12, var(--lc-expert-a12, rgba(217, 119, 87, 0.12)))`,contrast:`var(--lc-agent-${e}-contrast, var(--lc-expert-contrast, #ffffff))`,gradient:`linear-gradient(135deg, var(--lc-agent-${e}-deep, var(--lc-expert-deep, #86492F)), var(--lc-agent-${e}, var(--lc-expert, #D97757)))`}}function oe(e){return{background:e?s.secondaryButtonBackground:s.accentGradient,color:e?s.muted:s.accentContrast,border:"none",borderRadius:6,padding:"5px 14px",cursor:e?"default":"pointer",opacity:e?.6:1,fontFamily:G,fontWeight:500}}function Ce(e,t=!1){let n={display:"inline-flex",alignItems:"center",justifyContent:"center",width:28,height:28,padding:0,borderRadius:8,cursor:t?"default":"pointer",opacity:t?.5:1,flexShrink:0};return e==="primary"?{...n,background:s.accentGradient,color:s.accentContrast,border:"none"}:e==="secondary"?{...n,background:s.secondaryButtonBackground,color:s.secondaryButtonForeground,border:`1px solid ${s.border}`}:{...n,background:"transparent",color:s.foreground,border:"none"}}function E(){return{background:s.inputBackground,color:s.inputForeground,border:`1px solid ${s.inputBorder}`,borderRadius:6,padding:"6px 8px",fontFamily:G,fontSize:13,width:"100%",boxSizing:"border-box"}}function rz(e=!1){return{background:s.inputBackground,color:s.inputForeground,border:`1px solid ${s.inputBorder}`,borderRadius:6,padding:e?"2px 6px":"6px 8px",fontFamily:G,fontSize:e?11:13,cursor:"pointer"}}function I(){return{color:s.muted,fontSize:12,display:"block",marginBottom:4}}function _(){return{background:s.secondaryButtonBackground,color:s.secondaryButtonForeground,border:`1px solid ${s.border}`,borderRadius:6,padding:"4px 10px",cursor:"pointer",fontFamily:G,fontSize:12}}function on(){return{color:s.error,fontSize:11,display:"block",marginTop:2}}function st(e="neutral"){return{display:"inline-block",fontSize:10,padding:"1px 6px",borderRadius:8,border:`1px solid ${s.border}`,color:e==="warning"?s.error:s.muted}}function tr(){return{margin:"0 0 2px",fontSize:11,fontWeight:600,letterSpacing:.6,textTransform:"uppercase",color:s.accent}}var Si="var(--vscode-editor-font-family, monospace)";var Pt=U(re(),1),Gb=U(pe(),1);var nr=["break","case","catch","class","const","continue","default","delete","do","else","enum","export","extends","finally","for","function","if","implements","import","in","instanceof","interface","let","new","null","package","private","protected","public","return","static","super","switch","this","throw","try","typeof","var","void","while","yield","async","await","true","false","type","readonly","satisfies","as","keyof"],Fb=["and","as","assert","async","await","break","class","continue","def","del","elif","else","except","finally","for","from","global","if","import","in","is","lambda","None","nonlocal","not","or","pass","raise","return","True","False","try","while","with","yield","self","match","case"],Hb=["if","then","else","elif","fi","for","in","do","done","while","case","esac","function","return","export","local","echo","cd","set","unset","source"],qN=["select","from","where","insert","into","values","update","set","delete","create","table","drop","alter","join","inner","left","right","outer","on","group","by","order","having","limit","union","distinct","as","and","or","not","null","index"],GN=["fn","func","impl","struct","trait","mut","use","pub","match","end","def","module","require"];function Nt(e,t={}){return{lineComments:["//"],blockComments:[["/*","*/"]],quotes:['"',"'","`"],tripleQuotes:!1,keywords:new Set(e),...t}}var qa={lineComments:["#"],blockComments:[]},oz={javascript:Nt(nr),typescript:Nt(nr),java:Nt(nr),csharp:Nt(nr),cpp:Nt(nr),c:Nt(nr),go:Nt([...nr,"func","defer","chan","go","range","struct","map","nil"]),rust:Nt([...nr,"fn","impl","trait","mut","pub","use","match","crate","Some","None"]),json:Nt(["true","false","null"],{lineComments:[],blockComments:[],quotes:['"']}),python:Nt(Fb,{...qa,tripleQuotes:!0}),shell:Nt(Hb,qa),powershell:Nt([...Hb,"param","begin","process"],qa),yaml:Nt(["true","false","null"],{...qa,quotes:['"',"'"]}),toml:Nt(["true","false"],qa),ruby:Nt([...Fb,"end","do","unless","elsif","nil"],qa),sql:Nt(qN,{lineComments:["--"],blockComments:[["/*","*/"]],quotes:['"',"'"]}),html:Nt([],{lineComments:[],blockComments:[["<!--","-->"]],quotes:['"',"'"]}),css:Nt([],{lineComments:[],blockComments:[["/*","*/"]],quotes:['"',"'"]}),default:Nt([...nr,...Fb,...Hb,...GN],{lineComments:["//","#","--"],blockComments:[["/*","*/"],["<!--","-->"]],tripleQuotes:!0})},WN={js:"javascript",jsx:"javascript",mjs:"javascript",cjs:"javascript",ts:"typescript",tsx:"typescript",py:"python",py3:"python",python3:"python",sh:"shell",bash:"shell",zsh:"shell",console:"shell",ps1:"powershell",pwsh:"powershell",yml:"yaml",rb:"ruby",rs:"rust",golang:"go","c++":"cpp",cs:"csharp",htm:"html",xml:"html",scss:"css",postgres:"sql",psql:"sql"};function YN(e){let t=(e??"").trim().toLowerCase();return oz[WN[t]??t]??oz.default}var JN=/[A-Za-z_$]/,az=/[A-Za-z0-9_$]/,XN=/[{}[\]()<>;,.:?!&|+\-*/%=~^@]/;function Ls(e,t){let n=YN(t),r=[],i="",o=()=>{i.length>0&&(r.push({text:i,kind:"plain"}),i="")},a=(c,u)=>{o(),r.push({text:c,kind:u})},l=0;for(;l<e.length;){let c=e.slice(l),u=n.blockComments.find(f=>c.startsWith(f[0]));if(u!==void 0){let f=e.indexOf(u[1],l+u[0].length),v=f===-1?e.length:f+u[1].length;a(e.slice(l,v),"comment"),l=v;continue}if(n.lineComments.find(f=>c.startsWith(f))!==void 0){let f=e.indexOf(`
|
|
74
|
-
`,l),v=f===-1?e.length:f;a(e.slice(l,v),"comment"),l=v;continue}let m=n.quotes.find(f=>c.startsWith(f));if(m!==void 0){let f=n.tripleQuotes&&c.startsWith(m.repeat(3)),v=f?m.repeat(3):m,k=l+v.length;for(;k<e.length;){if(e[k]==="\\"){k+=2;continue}if(e.startsWith(v,k)){k+=v.length;break}if(!f&&e[k]===`
|
|
75
|
-
`)break;k++}a(e.slice(l,Math.min(k,e.length)),"string"),l=Math.min(k,e.length);continue}let h=e[l];if(/[0-9]/.test(h)&&!az.test(e[l-1]??" ")){let f=l;for(;f<e.length&&/[0-9a-fA-FxXoObB._]/.test(e[f]);)f++;a(e.slice(l,f),"number"),l=f;continue}if(JN.test(h)){let f=l;for(;f<e.length&&az.test(e[f]);)f++;let v=e.slice(l,f);n.keywords.has(v)||n.keywords.has(v.toLowerCase())?a(v,"keyword"):i+=v,l=f;continue}if(XN.test(h)){a(h,"punctuation"),l++;continue}i+=h,l++}return o(),r}var Ps={plain:void 0,comment:"var(--vscode-descriptionForeground)",string:"var(--vscode-debugTokenExpression-string, var(--vscode-charts-orange))",number:"var(--vscode-debugTokenExpression-number, var(--vscode-charts-green))",keyword:"var(--vscode-debugTokenExpression-name, var(--vscode-charts-blue))",punctuation:"var(--vscode-descriptionForeground)"};function KN(e,t){let n=Array.from({length:e.length+1},()=>new Array(t.length+1).fill(0));for(let r=e.length-1;r>=0;r--)for(let i=t.length-1;i>=0;i--){let o=n[r],a=n[r+1];o[i]=e[r]===t[i]?a[i+1]+1:Math.max(a[i],o[i+1])}return n}function lz(e){return e.length===0?[]:e.replace(/\r\n/g,`
|
|
76
|
-
`).split(`
|
|
77
|
-
`)}function Vb(e,t){let n=lz(e),r=lz(t),i=KN(n,r),o=[],a=0,l=0;for(;a<n.length&&l<r.length;)n[a]===r[l]?(o.push({kind:"context",text:n[a],beforeLine:a+1,afterLine:l+1}),a++,l++):(i[a+1]?.[l]??0)>=(i[a]?.[l+1]??0)?(o.push({kind:"removed",text:n[a],beforeLine:a+1}),a++):(o.push({kind:"added",text:r[l],afterLine:l+1}),l++);for(;a<n.length;)o.push({kind:"removed",text:n[a],beforeLine:a+1}),a++;for(;l<r.length;)o.push({kind:"added",text:r[l],afterLine:l+1}),l++;return o}function qb(e,t=3){let n=new Set;e.forEach((o,a)=>{if(o.kind!=="context")for(let l=a-t;l<=a+t;l++)n.add(l)});let r=[],i=0;return e.forEach((o,a)=>{n.has(a)?(i>0&&(r.push({kind:"gap",count:i}),i=0),r.push(o)):i+=1}),i>0&&r.push({kind:"gap",count:i}),r}var sz="var(--vscode-editor-font-family, monospace)",QN={added:"var(--vscode-diffEditor-insertedTextBackground, rgba(0,160,0,0.18))",removed:"var(--vscode-diffEditor-removedTextBackground, rgba(200,0,0,0.18))",context:"transparent"};function eU(e){return/\.([A-Za-z0-9+]+)$/.exec(e)?.[1]??""}function Zs(e){let t=(0,Gb.useMemo)(()=>qb(Vb(e.before,e.after)),[e.before,e.after]),n=e.before.length===0,r=(0,Gb.useMemo)(()=>eU(e.path),[e.path]),i=n?tU(e.after):void 0;return(0,Pt.jsxs)("div",{children:[(0,Pt.jsxs)("div",{style:{color:s.muted,fontSize:11,marginBottom:4,fontFamily:sz},children:[e.path,n&&(0,Pt.jsx)("span",{style:{marginLeft:6},children:"(new file)"})]}),(0,Pt.jsx)("div",{style:{border:`1px solid ${s.border}`,borderRadius:4,maxHeight:320,overflow:"auto",fontFamily:sz,fontSize:12},children:i!==void 0?i.map((o,a)=>(0,Pt.jsxs)("div",{style:{display:"flex",gap:8,padding:"0 8px",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[(0,Pt.jsx)("span",{style:{color:s.muted,minWidth:28,textAlign:"right",userSelect:"none"},children:a+1}),(0,Pt.jsx)("span",{style:{flex:1},children:Ls(o,r).map((l,c)=>{let u=Ps[l.kind];return u===void 0?(0,Pt.jsx)("span",{children:l.text},c):(0,Pt.jsx)("span",{style:{color:u},children:l.text},c)})})]},a)):t.map((o,a)=>o.kind==="gap"?(0,Pt.jsxs)("div",{style:{padding:"2px 8px",color:s.muted,background:"transparent"},children:["\u22EF ",o.count," unchanged line",o.count===1?"":"s"]},a):(0,Pt.jsxs)("div",{style:{display:"flex",gap:8,padding:"0 8px",background:QN[o.kind],whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[(0,Pt.jsx)("span",{style:{color:s.muted,minWidth:28,textAlign:"right",userSelect:"none"},children:o.beforeLine??o.afterLine??""}),(0,Pt.jsx)("span",{"data-diff-marker":!0,style:{color:s.muted,userSelect:"none"},children:o.kind==="added"?"+":o.kind==="removed"?"-":" "}),(0,Pt.jsx)("span",{style:{flex:1},children:Ls(o.text,r).map((l,c)=>{let u=Ps[l.kind];return u===void 0?(0,Pt.jsx)("span",{children:l.text},c):(0,Pt.jsx)("span",{style:{color:u},children:l.text},c)})})]},a))})]})}function tU(e){if(e.length===0)return[];let t=e.replace(/\r\n/g,`
|
|
78
|
-
`).split(`
|
|
79
|
-
`);return t[t.length-1]===""&&t.pop(),t}var Wb="var(--vscode-editor-font-family, monospace)";function nU(e){switch(e){case"edit":return"wants to modify a file";case"command":return"wants to run a command";case"read":return"wants to read from the workspace";case"mcp":return"wants to use an external tool";default:return"wants to act"}}function iU(e){let{preview:t}=e;return t.kind==="diff"?(0,St.jsxs)("div",{children:[t.note!==void 0&&(0,St.jsx)("div",{style:{color:s.muted,fontSize:11,marginBottom:4},children:t.note}),(0,St.jsx)(Zs,{path:t.path,before:t.before,after:t.after})]}):t.kind==="command"?(0,St.jsxs)("div",{children:[(0,St.jsxs)("div",{style:{color:s.muted,fontSize:11,marginBottom:4},children:["in ",t.cwd]}),(0,St.jsx)("pre",{style:{margin:0,padding:"8px 10px",border:`1px solid ${s.border}`,borderRadius:4,fontFamily:Wb,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-all"},children:t.command})]}):(0,St.jsx)("pre",{style:{margin:0,padding:"8px 10px",border:`1px solid ${s.border}`,borderRadius:4,fontFamily:Wb,fontSize:12,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:t.text})}function Yb(e){let{approval:t}=e;return(0,St.jsxs)("div",{className:"lc-fade-up",style:{margin:"6px 10px 6px 40px",padding:10,borderRadius:12,border:`1px solid ${s.accent}`,boxShadow:`0 0 0 3px ${s.accentSoft}`,fontFamily:G},children:[(0,St.jsxs)("div",{style:{marginBottom:8,fontSize:12},children:[(0,St.jsx)("span",{style:{fontFamily:Wb},children:t.toolName})," ",(0,St.jsx)("span",{style:{color:s.muted},children:nU(t.group)})]}),(0,St.jsx)(iU,{preview:t.preview}),(0,St.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10,flexWrap:"wrap"},children:[(0,St.jsx)("button",{type:"button",className:"lc-btn-accent",title:"Approve \u2014 run this once","aria-label":"Approve, run this once",style:{...Ce("primary"),width:34},onClick:()=>e.onDecide(t.id,"approve"),children:(0,St.jsx)(Oi,{size:16})}),(0,St.jsx)("button",{type:"button",title:"Deny \u2014 do not run this","aria-label":"Deny, do not run this",style:{...Ce("secondary"),width:34},onClick:()=>e.onDecide(t.id,"deny"),children:(0,St.jsx)(Va,{size:16})}),t.alwaysScope==="folder"?(0,St.jsx)("button",{type:"button",style:_(),title:"Always allow reads from the folder this file is in. Added to Settings -> Approvals -> Folders, where you can remove it.",onClick:()=>e.onAlwaysAllow(t.id,"folder"),children:"Always allow this folder"}):t.preview.kind==="command"?(0,St.jsx)("button",{type:"button",style:_(),title:"Allow this exact command string in this workspace. Anything appended still prompts.",onClick:()=>e.onAlwaysAllow(t.id,"command"),children:"Always allow this command"}):(0,St.jsxs)("button",{type:"button",style:_(),title:`Always allow ${t.toolName} in this workspace`,onClick:()=>e.onAlwaysAllow(t.id,"tool"),children:["Always allow ",t.toolName]})]})]})}var mt=U(re(),1),Vs=U(pe(),1);var Zt=U(re(),1),Fs=U(pe(),1);function cz(e){let[t,n]=(0,Fs.useState)(""),r=e.filterThreshold??8,i=e.options.length>r,o=(0,Fs.useMemo)(()=>{let d=t.trim().toLowerCase();return d.length===0?e.options:e.options.filter(m=>(m.label??m.value).toLowerCase().includes(d)||m.value.toLowerCase().includes(d)||(m.hint??"").toLowerCase().includes(d))},[e.options,t]),a=(0,Fs.useMemo)(()=>new Set(e.selected),[e.selected]),l=d=>{let m=new Set(a);m.has(d)?m.delete(d):m.add(d),e.onChange(e.options.map(h=>h.value).filter(h=>m.has(h)))},c=d=>{let m=new Set(a);for(let h of o)d?m.add(h.value):m.delete(h.value);e.onChange(e.options.map(h=>h.value).filter(h=>m.has(h)))},u={background:"none",border:"none",color:s.accent,cursor:"pointer",fontSize:11,padding:0};return(0,Zt.jsxs)("div",{role:"group","aria-label":e.ariaLabel,children:[i&&(0,Zt.jsx)("input",{type:"text",value:t,spellCheck:!1,placeholder:`Filter ${String(e.options.length)} options\u2026`,"aria-label":`Filter ${e.ariaLabel}`,onChange:d=>n(d.target.value),style:{...E(),marginBottom:6}}),(0,Zt.jsx)("div",{className:"lc-scroll",style:{maxHeight:220,overflowY:"auto",border:`1px solid ${s.border}`,borderRadius:4,padding:6},children:o.length===0?(0,Zt.jsxs)("span",{style:{color:s.muted,fontSize:12},children:["Nothing matches \u201C",t.trim(),"\u201D."]}):o.map(d=>(0,Zt.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",cursor:"pointer",padding:"3px 2px"},children:[(0,Zt.jsx)("input",{type:"checkbox",checked:a.has(d.value),onChange:()=>l(d.value),style:{marginTop:2}}),(0,Zt.jsxs)("span",{style:{minWidth:0},children:[(0,Zt.jsx)("span",{style:{display:"block",fontSize:12},children:d.label??d.value}),d.hint!==void 0&&(0,Zt.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:d.hint})]})]},d.value))}),(0,Zt.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:4},children:[(0,Zt.jsx)("span",{style:{color:s.muted,fontSize:11},children:a.size===0?"None selected":`${String(a.size)} selected`}),o.length>0&&(0,Zt.jsxs)(Zt.Fragment,{children:[(0,Zt.jsx)("button",{type:"button",style:u,onClick:()=>c(!0),children:t.trim().length>0?`All ${String(o.length)} shown`:"All"}),(0,Zt.jsx)("button",{type:"button",style:u,onClick:()=>c(!1),children:t.trim().length>0?"None shown":"None"})]})]})]})}var yn=U(re(),1),ei=U(pe(),1),pz=U(Jb(),1);var hz=260;function ze(e){let[t,n]=(0,ei.useState)(!1),[r,i]=(0,ei.useState)(0),[o,a]=(0,ei.useState)(void 0),l=(0,ei.useRef)(null),c=(0,ei.useRef)(null),u=e.options.findIndex(p=>p.value===e.value),d=u>=0?e.options[u]:void 0,m=()=>{let p=l.current;if(p===null)return;let b=p.getBoundingClientRect(),S=window.innerHeight-b.bottom,y=S<Math.min(hz,e.options.length*28+8)&&b.top>S;a({left:b.left,top:y?b.top:b.bottom,width:b.width,above:y})};(0,ei.useLayoutEffect)(()=>{t&&m()},[t]),(0,ei.useEffect)(()=>{if(!t)return;let p=()=>n(!1),b=y=>{let T=y.target;T!==null&&(l.current?.contains(T)===!0||c.current?.contains(T)===!0)||p()},S=y=>{let T=y.target;T!==null&&c.current?.contains(T)===!0||p()};return window.addEventListener("scroll",S,!0),window.addEventListener("resize",p),document.addEventListener("pointerdown",b,!0),()=>{window.removeEventListener("scroll",S,!0),window.removeEventListener("resize",p),document.removeEventListener("pointerdown",b,!0)}},[t]),(0,ei.useEffect)(()=>{t&&c.current?.querySelector(`[data-index="${r}"]`)?.scrollIntoView({block:"nearest"})},[r,t]);let h=()=>{i(u>=0?u:0),n(!0)},f=p=>{let b=e.options[p];b===void 0||b.disabled===!0||(e.onChange(b.value),n(!1),l.current?.focus())},v=p=>{if(e.options.length===0)return;let b=r;for(let S=0;S<e.options.length&&(b=(b+p+e.options.length)%e.options.length,e.options[b]?.disabled===!0);S++);i(b)},k=p=>{if(e.disabled!==!0){if(!t){(p.key==="ArrowDown"||p.key==="ArrowUp"||p.key==="Enter"||p.key===" ")&&(p.preventDefault(),h());return}p.key==="ArrowDown"?(p.preventDefault(),v(1)):p.key==="ArrowUp"?(p.preventDefault(),v(-1)):p.key==="Home"?(p.preventDefault(),i(0)):p.key==="End"?(p.preventDefault(),i(e.options.length-1)):p.key==="Enter"||p.key===" "?(p.preventDefault(),f(r)):(p.key==="Escape"||p.key==="Tab")&&n(!1)}},D=d?.label??e.placeholder??"";return(0,yn.jsxs)(yn.Fragment,{children:[(0,yn.jsxs)("button",{ref:l,id:e.id,type:"button",role:"combobox","aria-expanded":t,"aria-haspopup":"listbox","aria-label":e.ariaLabel,title:e.title,disabled:e.disabled,onClick:()=>t?n(!1):h(),onKeyDown:k,style:{...rz(e.compact),display:"inline-flex",alignItems:"center",gap:6,textAlign:"left",cursor:e.disabled===!0?"default":"pointer",opacity:e.disabled===!0?.6:1,...e.style},children:[(0,yn.jsx)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",color:d===void 0?s.muted:s.inputForeground},children:D}),(0,yn.jsx)("span",{"aria-hidden":"true",style:{display:"flex",flexShrink:0,color:s.muted,transform:t?"rotate(-90deg)":"rotate(90deg)",transition:"transform 190ms cubic-bezier(0.22, 0.85, 0.28, 1)"},children:(0,yn.jsx)(Ro,{size:e.compact===!0?10:12})})]}),t&&o!==void 0&&(0,pz.createPortal)((0,yn.jsxs)("div",{ref:c,role:"listbox","aria-label":e.ariaLabel,className:"lc-scroll lc-fade-up",style:{position:"fixed",left:o.left,width:Math.max(o.width,160),...o.above?{bottom:window.innerHeight-o.top+4}:{top:o.top+4},maxHeight:hz,overflowY:"auto",zIndex:1e3,background:s.inputBackground,border:`1px solid ${s.accent}`,borderRadius:8,boxShadow:`0 6px 20px rgba(0, 0, 0, 0.35), 0 0 0 3px ${s.accentSoft}`,padding:3,fontFamily:G},children:[e.options.length===0&&(0,yn.jsx)("div",{style:{padding:"6px 8px",color:s.muted,fontSize:12},children:"Nothing to choose from"}),e.options.map((p,b)=>{let S=p.value===e.value,y=b===r;return(0,yn.jsxs)("div",{role:"option","data-index":b,"aria-selected":S,"aria-disabled":p.disabled===!0,onPointerEnter:()=>p.disabled!==!0&&i(b),onPointerDown:T=>{T.preventDefault(),f(b)},style:{display:"flex",alignItems:"center",gap:8,padding:e.compact===!0?"4px 8px":"6px 8px",borderRadius:6,cursor:p.disabled===!0?"default":"pointer",opacity:p.disabled===!0?.5:1,background:y?s.accent:"transparent",color:y?s.accentContrast:s.inputForeground,fontSize:e.compact===!0?11:13},children:[(0,yn.jsxs)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:[p.label,p.detail!==void 0&&(0,yn.jsx)("span",{style:{marginLeft:6,opacity:.7,color:"inherit"},children:p.detail})]}),S&&(0,yn.jsx)("span",{"aria-hidden":"true",style:{width:5,height:5,borderRadius:"50%",flexShrink:0,background:y?s.accentContrast:s.accent}})]},p.value)})]}),document.body)]})}function gz(e){let[t,n]=(0,Vs.useState)(()=>cU(e.form.fields)),[r,i]=(0,Vs.useState)(!1),o=(0,Vs.useMemo)(()=>uU(e.form.fields,t),[e.form.fields,t]),a=Object.keys(o).length>0,l=(u,d)=>{n(m=>({...m,[u]:d}))},c=()=>{if(a){i(!0);return}e.onSubmit(e.form.id,t)};return(0,mt.jsxs)("div",{style:{margin:"8px 12px 12px",border:`1px solid ${s.border}`,borderRadius:6,padding:12,background:s.inputBackground},children:[(0,mt.jsx)("div",{style:{fontSize:13,fontWeight:600,marginBottom:e.form.description===void 0?10:2},children:e.form.title}),e.form.description!==void 0&&(0,mt.jsx)("div",{style:{color:s.muted,fontSize:12,marginBottom:10},children:e.form.description}),(0,mt.jsx)("div",{style:{display:"flex",flexDirection:"column",gap:10},children:e.form.fields.map(u=>(0,mt.jsx)(lU,{field:u,value:t[u.name]??"",error:r?o[u.name]:void 0,onChange:d=>l(u.name,d)},u.name))}),(0,mt.jsxs)("div",{style:{display:"flex",gap:8,marginTop:12},children:[(0,mt.jsx)("button",{type:"button",style:oe(!1),onClick:c,children:"Submit"}),(0,mt.jsx)("button",{type:"button",style:_(),onClick:()=>e.onDismiss(e.form.id),children:"Skip"})]})]})}function lU(e){let{field:t}=e,n=`lc-form-${t.name}`,r=t.required===!1;return t.type==="boolean"?(0,mt.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",cursor:"pointer"},children:[(0,mt.jsx)("input",{type:"checkbox",checked:e.value===!0,onChange:i=>e.onChange(i.target.checked),style:{marginTop:2}}),(0,mt.jsxs)("span",{children:[(0,mt.jsx)("span",{style:{display:"block",fontSize:13},children:t.label}),t.description!==void 0&&(0,mt.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:t.description})]})]}):(0,mt.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4},children:[(0,mt.jsxs)("label",{htmlFor:n,style:I(),children:[t.label,r&&(0,mt.jsx)("span",{style:{color:s.muted,fontWeight:400},children:" (optional)"})]}),t.description!==void 0&&(0,mt.jsx)("span",{style:{color:s.muted,fontSize:11},children:t.description}),t.type==="multichoice"?(0,mt.jsx)(cz,{options:(t.options??[]).map(i=>({value:i.value,...i.label!==void 0?{label:i.label}:{}})),selected:Array.isArray(e.value)?e.value:[],onChange:e.onChange,ariaLabel:t.label}):t.type==="choice"?(0,mt.jsx)(ze,{id:n,value:String(e.value),options:(t.options??[]).map(i=>({value:i.value,label:i.label??i.value})),placeholder:"Choose one",onChange:e.onChange,ariaLabel:t.label}):t.multiline===!0||t.type==="list"?(0,mt.jsx)("textarea",{id:n,value:String(e.value),rows:t.type==="list"?3:4,placeholder:t.type==="list"?"One per line, or separated by commas":void 0,onChange:i=>e.onChange(i.target.value),style:{...E(),resize:"vertical"}}):(0,mt.jsx)("input",{id:n,inputMode:t.type==="number"?"decimal":"text",value:String(e.value),onChange:i=>e.onChange(i.target.value),style:E()}),t.type==="list"&&e.error===void 0&&(0,mt.jsx)("span",{style:{color:s.muted,fontSize:11},children:sU(String(e.value))}),e.error!==void 0&&(0,mt.jsx)("span",{style:on(),children:e.error})]})}function yz(e){return e.split(/[,\n]/).map(t=>t.trim()).filter(t=>t.length>0)}function sU(e){let t=yz(e).length;return t===0?"No values yet.":t===1?"1 value":`${String(t)} values`}function cU(e){let t={};for(let n of e)n.type==="boolean"?t[n.name]=n.defaultValue===!0:n.defaultValue!==void 0?t[n.name]=String(n.defaultValue):t[n.name]=n.type==="choice"&&n.options?.length===1?n.options[0]?.value??"":"";return t}function uU(e,t){let n={};for(let r of e){if(r.type==="boolean")continue;let i=String(t[r.name]??"").trim();if(i.length===0){r.required!==!1&&(n[r.name]="Required.");continue}r.type==="list"&&yz(i).length===0&&r.required!==!1&&(n[r.name]="Enter at least one value."),r.type==="number"&&!Number.isFinite(Number(i))&&(n[r.name]="Enter a number."),r.type==="choice"&&!(r.options??[]).some(o=>o.value===i)&&(n[r.name]="Choose one of the options.")}return n}var le=U(re(),1),Yt=U(pe(),1);function Xd(e,t){let n=e.slice(0,t),r=n.lastIndexOf("@");if(r===-1)return;let i=n.slice(r+1);if(!/[\s@]/.test(i))return i}function vz(e,t){let n=e.slice(0,t),r=n.lastIndexOf("#");if(r===-1||r>0&&!/\s/.test(n[r-1]??""))return;let i=n.slice(r+1);return/^[a-z0-9-]*$/.test(i)?i:void 0}function dU(e){return e.includes(" ")?`@"${e}"`:`@${e}`}function Kd(e,t,n){let i=e.slice(0,t).lastIndexOf("@");if(i===-1)return;let o=dU(n);return{text:`${e.slice(0,i)}${o} ${e.slice(t)}`,caret:i+o.length+1}}var fU=/@(?:"[^"\n]+"|[^\s@"]+)/g;function bz(e){let t=[],n=0;for(let r of e.matchAll(fU)){let i=r.index;i>n&&t.push({text:e.slice(n,i),isMention:!1}),t.push({text:r[0],isMention:!0}),n=i+r[0].length}return n<e.length&&t.push({text:e.slice(n),isMention:!1}),t}var Be=U(re(),1);var mU={done:"Done",active:"In progress",todo:"Not started"};function hU({status:e}){let t={width:14,height:14,flex:"0 0 auto",marginTop:2};return e==="done"?(0,Be.jsxs)("svg",{...t,viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,Be.jsx)("circle",{cx:"8",cy:"8",r:"7",fill:s.accent}),(0,Be.jsx)("path",{d:"M4.5 8.2l2.3 2.3 4.7-4.7",fill:"none",stroke:s.accentContrast,strokeWidth:"1.8",strokeLinecap:"round",strokeLinejoin:"round"})]}):e==="active"?(0,Be.jsxs)("svg",{...t,viewBox:"0 0 16 16","aria-hidden":"true",children:[(0,Be.jsx)("circle",{cx:"8",cy:"8",r:"6.4",fill:"none",stroke:s.accent,strokeWidth:"1.6"}),(0,Be.jsx)("circle",{cx:"8",cy:"8",r:"3",fill:s.accent})]}):(0,Be.jsx)("svg",{...t,viewBox:"0 0 16 16","aria-hidden":"true",children:(0,Be.jsx)("circle",{cx:"8",cy:"8",r:"6.4",fill:"none",stroke:s.border,strokeWidth:"1.6",strokeDasharray:"2.5 2.5"})})}function xz({role:e,planned:t}){let n=Mo(e);return(0,Be.jsx)("span",{title:t===!0?`The plan says the ${e} should be involved in this step`:`${e} was consulted while this step was being worked`,style:{background:t===!0?"transparent":n.soft,color:n.edge,border:`1px ${t===!0?"dashed":"solid"} ${n.edge}`,opacity:t===!0?.75:1,borderRadius:999,padding:"0 6px",fontSize:10,lineHeight:"15px",whiteSpace:"nowrap"},children:e})}function kz(e){let t=e.checkpoints.filter(n=>n.status==="done");return(0,Be.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:6,background:s.inputBackground,padding:8},children:[(0,Be.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6},children:[(0,Be.jsx)("strong",{style:{fontSize:12},children:"Progress"}),(0,Be.jsx)("span",{style:{color:s.muted,fontSize:11,flex:1},children:e.checkpoints.length>0?`${String(t.length)} of ${String(e.checkpoints.length)} steps complete`:"This plan has no steps to track"}),(0,Be.jsx)("button",{type:"button",style:Sz(),onClick:e.onEdit,children:"Edit plan"}),(0,Be.jsx)("button",{type:"button",style:Sz(),onClick:e.onClose,children:"Close"})]}),e.checkpoints.length>0&&(0,Be.jsx)("div",{style:{height:4,borderRadius:999,background:s.border,overflow:"hidden",marginBottom:8},children:(0,Be.jsx)("div",{style:{width:`${String(Math.round(t.length/e.checkpoints.length*100))}%`,height:"100%",background:s.accentGradient}})}),(0,Be.jsx)("ol",{style:{minWidth:0,listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:6},children:e.checkpoints.map(n=>(0,Be.jsxs)("li",{style:{display:"flex",gap:6,alignItems:"flex-start",fontSize:12},children:[(0,Be.jsx)(hU,{status:n.status}),(0,Be.jsxs)("div",{style:{minWidth:0,flex:1},children:[(0,Be.jsxs)("div",{style:{color:n.status==="todo"?s.muted:s.foreground,textDecoration:n.status==="done"?"line-through":"none",wordBreak:"break-word"},children:[(0,Be.jsxs)("span",{style:{color:s.muted,marginRight:4},children:[n.index,"."]}),n.text]}),(n.roles.length>0||n.plannedRoles.length>0||n.status!=="todo")&&(0,Be.jsxs)("div",{style:{display:"flex",gap:4,marginTop:2,flexWrap:"wrap",alignItems:"center"},children:[(0,Be.jsx)("span",{style:{color:s.muted,fontSize:10},children:mU[n.status]}),n.roles.map(r=>(0,Be.jsx)(xz,{role:r},r)),(()=>{let r=n.plannedRoles.filter(i=>!n.roles.includes(i));return r.length===0?null:(0,Be.jsxs)(Be.Fragment,{children:[(0,Be.jsx)("span",{style:{color:s.muted,fontSize:10},children:"plan:"}),r.map(i=>(0,Be.jsx)(xz,{role:i,planned:!0},`planned-${i}`))]})})()]})]})]},n.id))})]})}function Sz(){return{background:"none",border:"none",color:s.muted,cursor:"pointer",fontSize:11,padding:"0 2px"}}var pU=5*1024*1024,wz=["image/png","image/jpeg","image/webp","image/gif"],gU=512*1024;function yU(e){return e.includes("\0")}async function vU(e){if(e.size>gU)return{error:`${e.name} is too large to attach (${Math.round(e.size/1024)}KB). Put it in the workspace and ask me to read it \u2014 read_file can page through any size.`};let t=await e.text();return yU(t)?{error:`${e.name} is not a text file, so there is nothing readable to attach.`}:{name:e.name||"attachment",text:t}}async function bU(e){if(!wz.includes(e.type)||e.size>pU)return;let t=await e.arrayBuffer(),n="",r=new Uint8Array(t);for(let i=0;i<r.length;i+=8192)n+=String.fromCharCode(...r.subarray(i,i+8192));return{mediaType:e.type,data:btoa(n),name:e.name||"pasted image"}}var xU={padding:"5px 6px",margin:0,fontFamily:G,fontSize:13,lineHeight:1.45,border:"none"};function SU(e){let t=e.split(`
|
|
80
|
-
`).find(n=>n.trim().length>0)?.trim()??"";return t.length>80?`${t.slice(0,79).trimEnd()}\u2026`:t}function Xb(e){let[t,n]=(0,Yt.useState)(""),[r,i]=(0,Yt.useState)(void 0),[o,a]=(0,Yt.useState)(!1),[l,c]=(0,Yt.useState)(!1),[u,d]=(0,Yt.useState)(e.plan),[m,h]=(0,Yt.useState)([]),[f,v]=(0,Yt.useState)([]),[k,D]=(0,Yt.useState)(void 0),[p,b]=(0,Yt.useState)(0),[S,y]=(0,Yt.useState)(void 0),T=(0,Yt.useRef)(null),M=N=>{N.style.height="auto",N.style.height=`${Math.min(N.scrollHeight,200)}px`},A=(0,Yt.useRef)(null),w=k!==void 0&&e.mentionCandidates.length>0,V=r===void 0?[]:e.directRoles.filter(N=>N.role.startsWith(r)||N.name.toLowerCase().startsWith(r)),F=(0,Yt.useRef)(e.onQueryMentions);F.current=e.onQueryMentions,(0,Yt.useEffect)(()=>{if(k===void 0)return;let N=setTimeout(()=>F.current(k),120);return()=>clearTimeout(N)},[k]);let we=(N,me)=>{let bt=vz(N,me);i(bt!==void 0&&e.directRoles.length>0?bt:void 0);let nt=Xd(N,me);D(nt),b(0)},Xe=async N=>{let me=[],bt=[],nt=[];for(let Ot of Array.from(N)){if(wz.includes(Ot.type)){let at=await bU(Ot);at===void 0?nt.push(`${Ot.name} is larger than 5MB.`):me.push(at);continue}let Ti=await vU(Ot);"error"in Ti?nt.push(Ti.error):bt.push(Ti)}me.length>0&&h(Ot=>[...Ot,...me]),bt.length>0&&v(Ot=>[...Ot,...bt]),y(nt.length>0?nt.join(" "):void 0)},jt=N=>{let me=T.current,bt=me?.selectionStart??t.length,nt=t.slice(0,bt).lastIndexOf("#");if(nt===-1)return;let Ot=`${t.slice(0,nt)}#${N} ${t.slice(bt)}`;n(Ot),i(void 0);let Ti=nt+N.length+2;requestAnimationFrame(()=>{me?.focus(),me?.setSelectionRange(Ti,Ti)})},Lt=N=>{let me=T.current,bt=me?.selectionStart??t.length,nt=Kd(t,bt,N);nt!==void 0&&(n(nt.text),D(void 0),requestAnimationFrame(()=>{me?.focus(),me?.setSelectionRange(nt.caret,nt.caret)}))},gi=()=>{let N=t.trim();if(N.length===0&&m.length===0&&f.length===0)return;let me=f.map(nt=>`--- ${nt.name} ---
|
|
81
|
-
\`\`\`
|
|
82
|
-
${nt.text}
|
|
83
|
-
\`\`\``).join(`
|
|
84
|
-
|
|
85
|
-
`),bt=me.length>0?`${me}
|
|
86
|
-
|
|
87
|
-
${N}`:N;e.onSend(bt,m),v([]),n(""),T.current!==null&&(T.current.style.height="auto"),h([]),D(void 0),y(void 0)},Z=t.trim().length>0||m.length>0||f.length>0,fe=bz(t).filter(N=>N.isMention).map(N=>N.text.replace(/^@/,"").replace(/^"|"$/g,"")),qe=N=>{let me=Array.from(N.clipboardData.files);me.length!==0&&(N.preventDefault(),Xe(me))};return(0,le.jsxs)("div",{onDrop:N=>{N.dataTransfer.files.length!==0&&(N.preventDefault(),Xe(N.dataTransfer.files))},onDragOver:N=>{e.supportsVision&&N.preventDefault()},style:{borderTop:`1px solid ${s.border}`,flexShrink:0},children:[r!==void 0&&V.length>0&&(0,le.jsx)("div",{role:"listbox","aria-label":"Specialists",className:"lc-scroll lc-fade-up",style:{maxHeight:160,overflowY:"auto",borderBottom:`1px solid ${s.border}`},children:V.map(N=>(0,le.jsxs)("button",{type:"button",role:"option","aria-selected":!1,onMouseDown:me=>{me.preventDefault(),jt(N.role)},style:{display:"block",width:"100%",textAlign:"left",background:"none",border:"none",padding:"4px 10px",cursor:"pointer",fontFamily:G,fontSize:12,color:s.foreground},children:[(0,le.jsxs)("span",{style:{color:s.accent},children:["#",N.role]})," ",(0,le.jsx)("span",{style:{color:s.muted},children:N.summary})]},N.role))}),w&&(0,le.jsx)("div",{role:"listbox","aria-label":"Workspace files",className:"lc-scroll lc-fade-up",style:{maxHeight:160,overflowY:"auto",borderBottom:`1px solid ${s.border}`},children:e.mentionCandidates.map((N,me)=>(0,le.jsx)("button",{type:"button",role:"option","aria-selected":me===p,onMouseDown:bt=>{bt.preventDefault(),Lt(N)},style:{display:"block",width:"100%",textAlign:"left",padding:"4px 12px",background:me===p?s.accent:"transparent",border:"none",color:me===p?s.accentContrast:s.foreground,cursor:"pointer",fontFamily:G,fontSize:12},children:N},N))}),e.queued.length>0&&(0,le.jsx)("div",{style:{padding:"6px 10px 0",display:"flex",flexDirection:"column",gap:4},children:e.queued.map((N,me)=>(0,le.jsxs)("div",{style:{display:"flex",alignItems:"flex-start",gap:6,fontSize:11,color:s.muted,borderLeft:`2px solid ${s.accent}`,paddingLeft:6},children:[(0,le.jsxs)("span",{style:{flex:1,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:[N.text,N.images!==void 0&&N.images>0&&(0,le.jsxs)("span",{style:{opacity:.8},children:[" ","[",N.images," image",N.images===1?"":"s","]"]})]}),(0,le.jsx)("button",{type:"button",title:"Remove from the queue","aria-label":"Remove from the queue",onClick:()=>e.onUnqueue(me),style:{background:"transparent",border:"none",color:s.muted,cursor:"pointer",padding:0},children:"\xD7"})]},`${me}-${N.text.slice(0,24)}`))}),fe.length>0&&(0,le.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",padding:"6px 8px 0",alignItems:"center"},children:[(0,le.jsx)("span",{style:{color:s.muted,fontSize:11},children:fe.length===1?"Mentions":`Mentions (${String(fe.length)})`}),fe.map((N,me)=>(0,le.jsx)("span",{title:N,style:{padding:"1px 8px",borderRadius:8,fontSize:11,fontFamily:"var(--vscode-editor-font-family, monospace)",color:s.accent,border:`1px solid ${s.accent}`,background:`color-mix(in srgb, ${s.accent} 12%, transparent)`},children:N},`${N}-${me}`))]}),f.length>0&&(0,le.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",padding:"6px 8px 0"},children:f.map((N,me)=>(0,le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"2px 4px 2px 8px",border:`1px solid ${s.border}`,borderRadius:8,fontSize:11,color:s.muted},title:`${N.name} \u2014 ${String(Math.max(1,Math.round(N.text.length/1024)))}KB of text, included in your next message`,children:[(0,le.jsx)("span",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:N.name}),(0,le.jsxs)("span",{children:[Math.max(1,Math.round(N.text.length/1024)),"KB"]}),(0,le.jsx)("button",{type:"button",title:"Remove","aria-label":`Remove ${N.name}`,style:Ce("ghost"),onClick:()=>v(bt=>bt.filter((nt,Ot)=>Ot!==me)),children:(0,le.jsx)(Va,{size:11})})]},`${N.name}-${me}`))}),m.length>0&&(0,le.jsx)("div",{style:{display:"flex",gap:6,flexWrap:"wrap",padding:"6px 8px 0"},children:m.map((N,me)=>(0,le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"2px 6px",border:`1px solid ${s.border}`,borderRadius:3,fontSize:11,color:s.muted},children:[(0,le.jsx)("img",{src:`data:${N.mediaType};base64,${N.data}`,alt:"",style:{width:20,height:20,objectFit:"cover",borderRadius:2}}),(0,le.jsx)("span",{style:{maxWidth:120,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:N.name}),(0,le.jsx)("button",{type:"button","aria-label":`Remove ${N.name}`,onClick:()=>h(bt=>bt.filter((nt,Ot)=>Ot!==me)),style:{background:"transparent",border:"none",color:s.muted,cursor:"pointer",padding:0},children:"\xD7"})]},`${N.name}-${me}`))}),S!==void 0&&(0,le.jsx)("div",{style:{padding:"4px 10px 0",fontSize:11,color:s.error},children:S}),m.length>0&&!e.supportsVision&&(0,le.jsx)("div",{style:{padding:"4px 10px 0",fontSize:11,color:s.error},children:"This model is not known to accept images. If it does, tick \u201CSupports images\u201D in Settings \u2192 Providers \u2192 Edit \u2192 Model capability overrides."}),(0,le.jsxs)("div",{className:"lc-input",style:{display:"flex",gap:4,alignItems:"flex-end",margin:8,padding:4,background:s.inputBackground,border:`1px solid ${s.inputBorder}`,borderRadius:12},children:[(0,le.jsx)("textarea",{ref:T,value:t,rows:2,placeholder:e.isStreaming?"Add a message \u2014 it joins the current turn":"Message Light Code\u2026 @ to attach a file",onChange:N=>{n(N.target.value),we(N.target.value,N.target.selectionStart),M(N.target)},onClick:N=>we(t,N.currentTarget.selectionStart),onBlur:()=>D(void 0),onPaste:qe,onKeyDown:N=>{if(w){if(N.key==="ArrowDown"){N.preventDefault(),b(me=>(me+1)%e.mentionCandidates.length);return}if(N.key==="ArrowUp"){N.preventDefault(),b(me=>(me-1+e.mentionCandidates.length)%e.mentionCandidates.length);return}if(N.key==="Enter"||N.key==="Tab"){let me=e.mentionCandidates[p];if(me!==void 0){N.preventDefault(),Lt(me);return}}if(N.key==="Escape"){N.preventDefault(),D(void 0);return}}N.key==="Enter"&&!N.shiftKey&&(N.preventDefault(),gi())},style:{...xU,flex:1,resize:"none",border:"none",outline:"none",minHeight:44,maxHeight:200,overflowY:"auto",color:s.inputForeground,background:"transparent"}}),(0,le.jsx)("input",{ref:A,type:"file",multiple:!0,hidden:!0,onChange:N=>{N.target.files!==null&&Xe(N.target.files),N.target.value=""}}),(0,le.jsx)("button",{type:"button",title:e.supportsVision?"Attach a file \u2014 text is included in the message, images are sent to the model":"Attach a file. Text is included in the message; this model is not known to accept images","aria-label":"Attach a file",style:Ce("secondary",e.isStreaming),disabled:e.isStreaming,onClick:()=>A.current?.click(),children:(0,le.jsx)(M$,{})}),e.isStreaming?(0,le.jsx)("button",{type:"button",title:"Cancel","aria-label":"Cancel",style:Ce("secondary"),onClick:e.onCancel,children:(0,le.jsx)(j$,{})}):(0,le.jsx)("button",{type:"button",className:"lc-btn-accent",title:"Send","aria-label":"Send",style:Ce("primary",!Z),disabled:!Z,onClick:gi,children:(0,le.jsx)(A$,{})})]}),(0,le.jsx)("div",{style:{padding:"0 10px 6px"},children:o?(0,le.jsxs)("div",{children:[(0,le.jsx)("textarea",{value:u,rows:6,spellCheck:!1,"aria-label":"Plan for this conversation",placeholder:`What this conversation is for.
|
|
88
|
-
|
|
89
|
-
Example:
|
|
90
|
-
1. Fix the retry logic in http.ts
|
|
91
|
-
2. Add a test for the timeout path
|
|
92
|
-
Do not touch anything else.`,onChange:N=>d(N.target.value),style:{...E(),width:"100%",resize:"vertical",fontFamily:G}}),(0,le.jsxs)("div",{style:{display:"flex",gap:6,marginTop:4,alignItems:"center"},children:[(0,le.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{e.onSetPlan(u),a(!1)},children:"Set plan"}),(0,le.jsx)("button",{type:"button",style:_(),onClick:()=>a(!1),children:"Cancel"}),e.plan.length>0&&(0,le.jsx)("button",{type:"button",style:_(),onClick:()=>{d(""),e.onSetPlan(""),a(!1)},children:"Clear"}),(0,le.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Kept in front of the assistant for the whole conversation."})]})]}):l?(0,le.jsx)(kz,{checkpoints:e.planCheckpoints,onClose:()=>c(!1),onEdit:()=>{c(!1),d(e.plan),a(!0)}}):(0,le.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"stretch"},children:[(0,le.jsxs)("button",{type:"button",style:{..._(),flex:1,minWidth:0,textAlign:"left",display:"flex",alignItems:"center",gap:6,...e.plan.length>0?{borderColor:s.accent}:{}},title:e.plan.length>0?e.plan:"Set what this conversation is for",onClick:()=>{d(e.plan),a(!0)},children:[(0,le.jsx)("span",{style:{color:e.plan.length>0?s.accent:s.muted},children:e.plan.length>0?"Plan":"Set a plan"}),(0,le.jsx)("span",{style:{color:s.muted,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",flex:1},children:e.plan.length>0?SU(e.plan):"keeps the assistant on the job"})]}),e.planCheckpoints.length>0&&(0,le.jsx)("button",{type:"button",style:{..._(),whiteSpace:"nowrap"},title:"Which steps of the plan are done, and who was consulted on them",onClick:()=>c(!0),children:(0,le.jsxs)("span",{style:{color:s.muted},children:["Progress"," ",(0,le.jsxs)("span",{style:{color:s.accent},children:[e.planCheckpoints.filter(N=>N.status==="done").length,"/",e.planCheckpoints.length]})]})})]})}),(e.profiles.length>0||e.expertEnabled)&&(0,le.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"0 10px 8px"},children:[e.profiles.length>0&&(0,le.jsx)(ze,{compact:!0,ariaLabel:"Provider profile",title:"Which provider answers the next message",value:e.activeProfileId??"",disabled:e.isStreaming,onChange:e.onSelectProfile,style:{maxWidth:"60%"},options:e.profiles.map(N=>({value:N.id,label:N.label,detail:N.model}))}),e.searchConnections.length>0&&(0,le.jsx)(ze,{compact:!0,ariaLabel:"OpenSearch connection",title:"Which cluster this conversation may search. Change it between messages.",value:e.activeSearchId??"",disabled:e.isStreaming,onChange:N=>e.onSelectSearch(N.length>0?N:void 0),style:{maxWidth:"38%"},options:[{value:"",label:"No search"},...e.searchConnections.map(N=>({value:N.id,label:N.label}))]}),e.expertEnabled&&(0,le.jsxs)("span",{title:"Claude is available as an expert. Ask it directly \u2014 say \u201Cask Claude \u2026\u201D.",style:{...st(),marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:4},children:[(0,le.jsx)($n,{size:11}),"expert"]})]})]})}var ve=U(re(),1);var de=U(re(),1),Bo=U(pe(),1);var _z=560,ef=260,zn={top:18,right:14,bottom:46,left:52},Fr={width:_z-zn.left-zn.right,height:ef-zn.top-zn.bottom};function tf(e,t){let n=t<=1?0:e/t*300,r=e%2===0?0:14;return`hsl(from ${s.accent} calc(h + ${String(n)}) s calc(l + ${String(r)}))`}function kU(e,t){if(e<=0)return 1;let n=e/Math.max(1,t),r=10**Math.floor(Math.log10(n)),i=n/r;return(i<=1?1:i<=2?2:i<=5?5:10)*r}function ir(e){return Number.isInteger(e)?String(e):e.toFixed(Math.abs(e)<1?3:2).replace(/\.?0+$/,"")}function wU(e,t,n,r){let i=0,o=0;if(t)for(let d=0;d<r;d++){let m=n.reduce((h,f)=>h+(f.values[d]??0),0);i=Math.max(i,m)}else i=Math.max(0,...e),o=Math.min(0,...e);i===o&&(i=o+1);let a=kU(i-o,4),l=Math.floor(o/a)*a,c=Math.ceil(i/a)*a,u=[];for(let d=l;d<=c+a/2;d+=a)u.push(Number(d.toFixed(10)));return{min:l,max:c,ticks:u}}function _U(e,t){return e.length<=t?e:`${e.slice(0,Math.max(1,t-1))}\u2026`}function $z(e){let{chart:t}=e,[n,r]=(0,Bo.useState)(void 0),[i,o]=(0,Bo.useState)(!1),a=(0,Bo.useMemo)(()=>Ib(t),[t]),l=t.type==="stackedBar",c=(0,Bo.useMemo)(()=>t.series.flatMap(f=>f.values),[t]),u=(0,Bo.useMemo)(()=>wU(c,l,t.series,t.categories.length),[c,l,t]),d=(f,v)=>{let k=f.values[v]??0,D=f.detail?.[v]??void 0,p=t.categories[v]??"";r(b=>b?.series===f.name&&b.category===p?void 0:{series:f.name,category:p,value:k,detail:D===null?void 0:D})},m=f=>zn.top+Fr.height-(f-u.min)/(u.max-u.min)*Fr.height,h=Bs(t.size);return(0,de.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:6,padding:10,margin:"8px 0",background:s.inputBackground,...h!==void 0?{maxWidth:h}:{}},children:[t.title!==void 0&&(0,de.jsx)("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:t.title}),t.series.length>1&&(0,de.jsx)("div",{style:{display:"flex",gap:10,flexWrap:"wrap",margin:"4px 0 6px"},children:t.series.map((f,v)=>(0,de.jsxs)("span",{style:{display:"flex",alignItems:"center",gap:4,fontSize:11},children:[(0,de.jsx)("span",{style:{width:9,height:9,borderRadius:2,background:tf(v,t.series.length),flex:"0 0 auto"}}),f.name]},f.name))}),(0,de.jsx)("div",{style:{overflowX:"auto"},children:t.type==="pie"?(0,de.jsx)(TU,{chart:t,onPick:d,picked:n}):(0,de.jsxs)("svg",{viewBox:`0 0 ${String(_z)} ${String(ef)}`,style:{width:"100%",...h===void 0||h>320?{minWidth:320}:{},height:"auto",display:"block"},role:"img","aria-label":t.title??`${t.type} chart`,children:[u.ticks.map(f=>(0,de.jsxs)("g",{children:[(0,de.jsx)("line",{x1:zn.left,x2:zn.left+Fr.width,y1:m(f),y2:m(f),stroke:s.border,strokeWidth:f===0?1.2:.6}),(0,de.jsx)("text",{x:zn.left-6,y:m(f)+3.5,textAnchor:"end",fontSize:9,fill:s.muted,children:ir(f)})]},f)),t.type==="line"||t.type==="multiLine"?(0,de.jsx)(zU,{chart:t,y:m,onPick:d,picked:n}):(0,de.jsx)($U,{chart:t,y:m,zero:m(Math.max(u.min,0)),onPick:d,picked:n}),t.categories.map((f,v)=>{let k=Math.ceil(t.categories.length/12);if(v%k!==0)return null;let D=Fr.width/t.categories.length,p=zn.left+D*v+D/2;return(0,de.jsxs)("text",{x:p,y:ef-zn.bottom+14,textAnchor:"middle",fontSize:9,fill:s.muted,children:[(0,de.jsx)("title",{children:f}),_U(f,12)]},f+String(v))}),t.xLabel!==void 0&&(0,de.jsx)("text",{x:zn.left+Fr.width/2,y:ef-6,textAnchor:"middle",fontSize:10,fill:s.muted,children:t.xLabel}),t.yLabel!==void 0&&(0,de.jsx)("text",{x:-(zn.top+Fr.height/2),y:11,transform:"rotate(-90)",textAnchor:"middle",fontSize:10,fill:s.muted,children:t.yLabel})]})}),n!==void 0&&(0,de.jsxs)("div",{style:{marginTop:8,padding:8,border:`1px solid ${s.border}`,borderRadius:4,fontSize:11},children:[(0,de.jsxs)("div",{style:{fontWeight:600},children:[n.category,t.series.length>1?` \u2014 ${n.series}`:"",": ",ir(n.value)]}),n.detail===void 0||n.detail.length===0?(0,de.jsx)("div",{style:{color:s.muted,marginTop:4},children:"No detail was recorded for this point, so what went into it is not known here."}):(0,de.jsxs)("ul",{style:{margin:"4px 0 0",paddingLeft:18,color:s.muted},children:[n.detail.slice(0,50).map((f,v)=>(0,de.jsx)("li",{children:f},String(v)+f)),n.detail.length>50&&(0,de.jsx)("li",{children:`\u2026and ${String(n.detail.length-50)} more`})]})]}),(0,de.jsxs)("div",{style:{display:"flex",gap:10,alignItems:"center",marginTop:6,flexWrap:"wrap"},children:[(0,de.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:()=>o(f=>!f),children:i?"Hide numbers":"Show numbers"}),(0,de.jsx)("span",{style:{color:s.muted,fontSize:11},children:t.series.length===1?`Total ${ir(a.grand)}`:a.series.map(f=>`${f.name} ${ir(f.total)}`).join(" \xB7 ")})]}),i&&(0,de.jsx)("div",{className:"lc-scroll",style:{overflowX:"auto",marginTop:6},children:(0,de.jsxs)("table",{style:{borderCollapse:"collapse",fontSize:11},children:[(0,de.jsx)("thead",{children:(0,de.jsxs)("tr",{children:[(0,de.jsx)("th",{style:Qd(!0),children:t.xLabel??""}),t.series.map(f=>(0,de.jsx)("th",{style:Qd(!0),children:f.name},f.name))]})}),(0,de.jsx)("tbody",{children:t.categories.map((f,v)=>(0,de.jsxs)("tr",{children:[(0,de.jsx)("td",{style:Qd(!1),children:f}),t.series.map(k=>(0,de.jsx)("td",{style:{...Qd(!1),textAlign:"right"},children:ir(k.values[v]??0)},k.name))]},f+String(v)))})]})}),t.note!==void 0&&(0,de.jsx)("div",{style:{color:s.muted,fontSize:11,marginTop:6},children:t.note})]})}function Qd(e){return{border:`1px solid ${s.border}`,padding:"2px 6px",textAlign:"left",color:e?s.foreground:s.muted,whiteSpace:"nowrap"}}function $U(e){let{chart:t}=e,n=Fr.width/t.categories.length,r=n*.72,i=t.type==="groupedBar"&&t.series.length>1,o=i?r/t.series.length:r;return(0,de.jsx)("g",{children:t.categories.map((a,l)=>{let c=zn.left+n*l+(n-r)/2,u=e.zero;return(0,de.jsx)("g",{children:t.series.map((d,m)=>{let h=d.values[l]??0,f=tf(m,t.series.length),v=e.picked?.series===d.name&&e.picked.category===a,k,D,p;if(t.type==="stackedBar")p=Math.abs(e.zero-e.y(h))||0,D=u-p,u=D,k=c;else{k=i?c+o*m:c;let b=e.y(h);D=Math.min(b,e.zero),p=Math.abs(b-e.zero)}return(0,de.jsx)("rect",{x:k,y:D,width:Math.max(1,o-(i?1:0)),height:Math.max(0,p),fill:f,opacity:e.picked===void 0||v?1:.45,style:{cursor:"pointer"},onClick:()=>e.onPick(d,l),children:(0,de.jsx)("title",{children:`${a} \u2014 ${d.name}: ${ir(h)}`})},d.name)})},a+String(l))})})}function zU(e){let{chart:t}=e,n=Fr.width/t.categories.length,r=i=>zn.left+n*i+n/2;return(0,de.jsx)("g",{children:t.series.map((i,o)=>{let a=tf(o,t.series.length),l=i.values.map((c,u)=>`${String(r(u))},${String(e.y(c))}`).join(" ");return(0,de.jsxs)("g",{children:[(0,de.jsx)("polyline",{points:l,fill:"none",stroke:a,strokeWidth:1.8}),i.values.map((c,u)=>{let d=t.categories[u]??"",m=e.picked?.series===i.name&&e.picked.category===d;return(0,de.jsx)("circle",{cx:r(u),cy:e.y(c),r:m?4.5:2.6,fill:a,style:{cursor:"pointer"},onClick:()=>e.onPick(i,u),children:(0,de.jsx)("title",{children:`${d} \u2014 ${i.name}: ${ir(c)}`})},String(u))})]},i.name)})})}function TU(e){let t=e.chart.series[0],n=t?.values??[],r=n.reduce((c,u)=>c+u,0),i=230,o=92,a=i/2,l=i/2;return(0,de.jsx)("svg",{viewBox:`0 0 ${String(i)} ${String(i)}`,style:{width:240,maxWidth:"100%",height:"auto",display:"block"},role:"img","aria-label":e.chart.title??"pie chart",children:r===0?(0,de.jsx)("text",{x:a,y:l,textAnchor:"middle",fontSize:11,fill:s.muted,children:"Every value is zero"}):(()=>{let c=-Math.PI/2;return e.chart.categories.map((u,d)=>{let m=n[d]??0,h=m/r*Math.PI*2,f=tf(d,e.chart.categories.length),v=e.picked?.category===u,k=c;if(c+=h,h>=Math.PI*2-1e-9)return(0,de.jsx)("circle",{cx:a,cy:l,r:o,fill:f,style:{cursor:"pointer"},onClick:()=>t!==void 0&&e.onPick(t,d),children:(0,de.jsx)("title",{children:`${u}: ${ir(m)}`})},u+String(d));let D=a+o*Math.cos(k),p=l+o*Math.sin(k),b=a+o*Math.cos(c),S=l+o*Math.sin(c),y=h>Math.PI?1:0;return(0,de.jsx)("path",{d:`M ${String(a)} ${String(l)} L ${String(D)} ${String(p)} A ${String(o)} ${String(o)} 0 ${String(y)} 1 ${String(b)} ${String(S)} Z`,fill:f,opacity:e.picked===void 0||v?1:.45,style:{cursor:"pointer"},onClick:()=>t!==void 0&&e.onPick(t,d),children:(0,de.jsx)("title",{children:`${u}: ${ir(m)} (${(m/r*100).toFixed(1)}%)`})},u+String(d))})})()})}var Ni=U(re(),1),qs=U(pe(),1);function Cz(e){let[t,n]=(0,qs.useState)(!1),[r,i]=(0,qs.useState)(void 0),o=Bs(e.diagram.size),{svg:a,uri:l,width:c,height:u}=(0,qs.useMemo)(()=>{let d=Ga(s.background,"#1e1e1e"),m={background:d,line:Ga(s.muted,"#8a8a8a"),surface:Ga(s.inputBackground,"#252526"),text:Ga(s.foreground,"#e0e0e0"),muted:Ga(s.muted,"#8a8a8a"),accent:Ga(s.accent,"#22c55e"),dark:IU(d)},h=kb(e.diagram),f=wb(h,m);return{svg:f,uri:_b(f),width:h.width,height:h.height}},[e.diagram]);return(0,Ni.jsxs)("div",{style:{margin:"8px 0"},children:[(0,Ni.jsx)("img",{src:l,alt:e.diagram.title??"Diagram",style:{maxWidth:o===void 0?"100%":`min(100%, ${String(o)}px)`,width:c,height:"auto",display:"block"}}),e.diagram.note!==void 0&&(0,Ni.jsx)("div",{style:{color:s.muted,fontSize:11,marginTop:4,lineHeight:1.5},children:e.diagram.note}),(0,Ni.jsxs)("div",{style:{display:"flex",gap:6,marginTop:6,flexWrap:"wrap"},children:[(0,Ni.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px"},title:"Copy the SVG markup, to paste into a document or an editor",onClick:()=>{navigator.clipboard?.writeText(a).then(()=>{n(!0),setTimeout(()=>n(!1),1500)},()=>n(!1))},children:t?"Copied":"Copy SVG"}),(0,Ni.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px"},title:"Save as SVG \u2014 vector, so it stays sharp at any size",onClick:()=>{zz(`${Tz(e.diagram.title)}.svg`,new Blob([a],{type:"image/svg+xml"}))},children:"Save SVG"}),(0,Ni.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px"},title:"Save as PNG, at twice the drawn size, for somewhere that cannot take an SVG",onClick:()=>{CU(l,c,u).then(d=>zz(`${Tz(e.diagram.title)}.png`,d),()=>i("Could not make a PNG here \u2014 use Save SVG, or copy it."))},children:"Save PNG"})]}),r!==void 0&&(0,Ni.jsx)("div",{style:{color:s.muted,fontSize:11,marginTop:4},children:r})]})}function zz(e,t){let n=URL.createObjectURL(t),r=document.createElement("a");r.href=n,r.download=e,document.body.appendChild(r),r.click(),r.remove(),setTimeout(()=>URL.revokeObjectURL(n),0)}function Tz(e){let t=(e??"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,60);return t.length>0?t:"diagram"}async function CU(e,t,n){let i=new Image;await new Promise((l,c)=>{i.onload=()=>l(),i.onerror=()=>c(new Error("the diagram could not be loaded for rasterising")),i.src=e});let o=document.createElement("canvas");o.width=t*2,o.height=n*2;let a=o.getContext("2d");if(a===null)throw new Error("no 2d canvas in this host");return a.scale(2,2),a.drawImage(i,0,0,t,n),await new Promise((l,c)=>{o.toBlob(u=>{u===null?c(new Error("the canvas produced nothing")):l(u)},"image/png")})}function Ga(e,t){try{let n=document.createElement("span");n.style.color=e,n.style.display="none",document.body.appendChild(n);let r=globalThis.getComputedStyle(n).color;return n.remove(),EU(r)?r:t}catch{return t}}function EU(e){let t=e.trim();return t.length===0||t.includes("var(")?!1:/^#[\da-f]{3,8}$/i.test(t)||/^rgba?\(/i.test(t)}function IU(e){let t=e.trim(),n=/^rgba?\(\s*([\d.]+)[\s,]+([\d.]+)[\s,]+([\d.]+)/i.exec(t),r=/^#?([\da-f]{6})$/i.exec(t),i,o,a;if(n!==null)i=Number(n[1]),o=Number(n[2]),a=Number(n[3]);else if(r!==null){let l=Number.parseInt(r[1]??"ffffff",16);i=l>>16&255,o=l>>8&255,a=l&255}else return!0;return(i*299+o*587+a*114)/1e3<128}var ox=U(pe(),1);var Ne=U(re(),1),jz=U(pe(),1);var DU=/^(https?:|mailto:)/i;function AU(e){let t=e.trim();return/^[a-z][a-z0-9+.-]*:/i.test(t)?DU.test(t):!0}var Kb=/^ {0,3}(`{3,}|~{3,})\s*(\S+)?\s*$/,Ez=/^ {0,3}(#{1,6})\s+(.*)$/,Iz=/^ {0,3}([-*_])(\s*\1){2,}\s*$/,Qb=/^ {0,3}[-*+]\s+(.*)$/,ex=/^ {0,3}\d+[.)]\s+(.*)$/,tx=/^ {0,3}>\s?(.*)$/,nx=/^ {0,3}\|?(.*\|.*?)\|?\s*$/,Dz=/^ {0,3}\|?\s*:?-{1,}:?\s*(\|\s*:?-{1,}:?\s*)*\|?\s*$/;function Az(e){let t=e.replace(/\r\n/g,`
|
|
93
|
-
`).split(`
|
|
94
|
-
`),n=[],r=0;for(;r<t.length;){let i=t[r]??"",o=Kb.exec(i);if(o!==null){let d=o[1]??"```",m=[];for(r+=1;r<t.length;){let h=t[r]??"",f=Kb.exec(h);if(f!==null&&(f[1]??"").length>=d.length&&(f[2]??"")==="")break;m.push(h),r+=1}r+=1,n.push({kind:"code",text:m.join(`
|
|
95
|
-
`),...o[2]!==void 0?{language:o[2]}:{}});continue}if(i.trim().length===0){r+=1;continue}if(Iz.test(i)){n.push({kind:"rule"}),r+=1;continue}let a=Ez.exec(i);if(a!==null){n.push({kind:"heading",level:(a[1]??"#").length,content:Ui(a[2]??"")}),r+=1;continue}let l=t[r+1];if(nx.test(i)&&l!==void 0&&Dz.test(l)){let d=v=>v.trim().replace(/^\|/,"").replace(/\|$/,"").split("|").map(k=>k.trim()),m=d(i).map(v=>Ui(v)),h=d(l).map(v=>{let k=v.startsWith(":"),D=v.endsWith(":");if(k&&D)return"center";if(D)return"right";if(k)return"left"});r+=2;let f=[];for(;r<t.length;){let v=t[r]??"";if(v.trim().length===0||!nx.test(v))break;f.push(d(v).map(k=>Ui(k))),r+=1}n.push({kind:"table",head:m,rows:f,align:h});continue}if(tx.test(i)){let d=[];for(;r<t.length;){let m=tx.exec(t[r]??"");if(m===null)break;d.push(m[1]??""),r+=1}n.push({kind:"quote",content:Ui(d.join(`
|
|
96
|
-
`))});continue}let c=ex.test(i);if(c||Qb.test(i)){let d=[];for(;r<t.length;){let m=t[r]??"",h=(c?ex:Qb).exec(m);if(h===null)break;d.push(Ui(h[1]??"")),r+=1}n.push({kind:"list",ordered:c,items:d});continue}let u=[];for(;r<t.length;){let d=t[r]??"";if(d.trim().length===0||Kb.test(d)||Ez.test(d)||Iz.test(d)||tx.test(d)||Qb.test(d)||ex.test(d)||nx.test(d)&&Dz.test(t[r+1]??""))break;u.push(d),r+=1}n.push({kind:"paragraph",content:Ui(u.join(`
|
|
97
|
-
`))})}return n}var ix=String.raw`\S(?:[\s\S]*?\S)?`,jU=String.raw`[^()\s]*(?:\([^()\s]*\)[^()\s]*)*`,OU=new RegExp([String.raw`(`+"`"+String.raw`+)([\s\S]*?)\1`,String.raw`\[([^\]]*)\]\((`+jU+String.raw`)\)`,String.raw`(\*\*|__)(`+ix+String.raw`)\5`,String.raw`(~~)(`+ix+String.raw`)\7`,String.raw`(\*|_)(`+ix+String.raw`)\9`].join("|"));function Ui(e){let t=[],n=e;for(;n.length>0;){let r=OU.exec(n);if(r===null||r.index===void 0)break;if(r.index>0&&t.push({kind:"text",text:n.slice(0,r.index)}),r[1]!==void 0)t.push({kind:"code",text:(r[2]??"").replace(/^ (.*) $/,"$1")});else if(r[4]!==void 0){let i=r[4],o=Ui(r[3]??"");t.push(AU(i)?{kind:"link",href:i,children:o}:{kind:"text",text:r[0]})}else r[5]!==void 0?t.push({kind:"strong",children:Ui(r[6]??"")}):r[7]!==void 0?t.push({kind:"strike",children:Ui(r[8]??"")}):r[9]!==void 0&&t.push({kind:"em",children:Ui(r[10]??"")});n=n.slice(r.index+r[0].length)}return n.length>0&&t.push({kind:"text",text:n}),t}var Oz="var(--vscode-editor-font-family, monospace)";function Ri(e,t=""){return e.map((n,r)=>{let i=`${t}${String(r)}`;return n.kind==="text"?(0,Ne.jsx)("span",{children:n.text},i):n.kind==="code"?(0,Ne.jsx)("code",{style:{fontFamily:Oz,fontSize:"0.92em",padding:"1px 4px",borderRadius:4,background:s.accentSoft,wordBreak:"break-word"},children:n.text},i):n.kind==="strong"?(0,Ne.jsx)("strong",{children:Ri(n.children,`${i}-`)},i):n.kind==="em"?(0,Ne.jsx)("em",{children:Ri(n.children,`${i}-`)},i):n.kind==="strike"?(0,Ne.jsx)("span",{style:{textDecoration:"line-through",opacity:.75},children:Ri(n.children,`${i}-`)},i):(0,Ne.jsx)("a",{href:n.href,rel:"noopener noreferrer",title:n.href,style:{color:s.accent,textDecoration:"underline"},children:Ri(n.children,`${i}-`)},i)})}function NU(e){let[t,n]=(0,jz.useState)(!1),r=()=>{navigator.clipboard?.writeText(e.text).then(()=>{n(!0),setTimeout(()=>n(!1),1500)})};return(0,Ne.jsxs)("div",{style:{position:"relative",margin:"6px 0",border:`1px solid ${s.border}`,borderRadius:8,background:s.inputBackground},children:[(0,Ne.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 6px 3px 10px",borderBottom:`1px solid ${s.border}`,color:s.muted,fontFamily:G,fontSize:10},children:[(0,Ne.jsx)("span",{children:e.language??"code"}),(0,Ne.jsx)("button",{type:"button",title:t?"Copied":"Copy","aria-label":t?"Copied":"Copy code",onClick:r,style:{marginLeft:"auto",display:"inline-flex",alignItems:"center",gap:4,padding:"2px 6px",border:"none",borderRadius:6,background:"transparent",color:t?s.accent:s.muted,cursor:"pointer",fontSize:10},children:t?(0,Ne.jsx)(Oi,{size:11}):(0,Ne.jsx)(Pr,{size:11})})]}),(0,Ne.jsx)("pre",{className:"lc-scroll",style:{margin:0,padding:"8px 10px",overflowX:"auto",fontFamily:Oz,fontSize:11,lineHeight:1.5},children:Ls(e.text,e.language).map((i,o)=>{let a=Ps[i.kind];return a===void 0?(0,Ne.jsx)("span",{children:i.text},o):(0,Ne.jsx)("span",{style:{color:a},children:i.text},o)})})]})}function UU(e,t){if(e.kind==="code")return(0,Ne.jsx)(NU,{text:e.text,language:e.language},t);if(e.kind==="rule")return(0,Ne.jsx)("hr",{style:{border:"none",borderTop:`1px solid ${s.border}`,margin:"10px 0"}},t);if(e.kind==="heading"){let n=[15,14,13,12.5,12,12][e.level-1]??12;return(0,Ne.jsx)("div",{style:{fontSize:n,fontWeight:600,margin:"10px 0 4px"},children:Ri(e.content,`${t}-`)},t)}if(e.kind==="quote")return(0,Ne.jsx)("div",{style:{margin:"6px 0",paddingLeft:10,borderLeft:`2px solid ${s.accent}`,color:s.muted,whiteSpace:"pre-wrap"},children:Ri(e.content,`${t}-`)},t);if(e.kind==="list"){let n=e.ordered?"ol":"ul";return(0,Ne.jsx)(n,{style:{margin:"6px 0",paddingLeft:20},children:e.items.map((r,i)=>(0,Ne.jsx)("li",{style:{margin:"2px 0"},children:Ri(r,`${t}-${String(i)}-`)},`${t}-${String(i)}`))},t)}if(e.kind==="table"){let n=r=>({textAlign:e.align[r]??"left"});return(0,Ne.jsx)("div",{className:"lc-scroll",style:{overflowX:"auto",margin:"6px 0"},children:(0,Ne.jsxs)("table",{style:{borderCollapse:"collapse",fontSize:11,width:"100%"},children:[(0,Ne.jsx)("thead",{children:(0,Ne.jsx)("tr",{children:e.head.map((r,i)=>(0,Ne.jsx)("th",{style:{...n(i),padding:"4px 8px",borderBottom:`1px solid ${s.accent}`,color:s.foreground,fontWeight:600,whiteSpace:"nowrap"},children:Ri(r,`${t}-h${String(i)}-`)},`${t}-h${String(i)}`))})}),(0,Ne.jsx)("tbody",{children:e.rows.map((r,i)=>(0,Ne.jsx)("tr",{children:r.map((o,a)=>(0,Ne.jsx)("td",{style:{...n(a),padding:"4px 8px",borderBottom:`1px solid ${s.border}`,verticalAlign:"top"},children:Ri(o,`${t}-r${String(i)}c${String(a)}-`)},`${t}-r${String(i)}c${String(a)}`))},`${t}-r${String(i)}`))})]})},t)}return(0,Ne.jsx)("div",{style:{margin:"4px 0",whiteSpace:"pre-wrap"},children:Ri(e.content,`${t}-`)},t)}function nf(e){return(0,Ne.jsx)(Ne.Fragment,{children:Az(e.text).map((t,n)=>UU(t,String(n)))})}function Nz(e){return e===void 0||e==="unknown"?"a specialist":e}function RU(e){let t=e.role==="assistant",n=Mo(e.informedBy),r=(0,ve.jsx)("span",{title:t?"Assistant":"You","aria-label":t?"Assistant":"You",style:{display:"flex",alignItems:"center",justifyContent:"center",width:22,height:22,borderRadius:"50%",flexShrink:0,marginTop:2,background:t?s.accentGradient:s.secondaryButtonBackground,color:t?s.accentContrast:s.muted,border:t?"none":`1px solid ${s.border}`},children:t?(0,ve.jsx)(N$,{size:12}):(0,ve.jsx)(Yd,{size:12})});return(0,ve.jsxs)("div",{className:t?"lc-in-left":"lc-in-right",...e.isLatestPrompt===!0?{"data-lc-latest-prompt":"true"}:{},style:{display:"flex",gap:8,margin:"8px 10px",flexDirection:t?"row":"row-reverse",alignItems:"flex-start"},children:[r,(0,ve.jsxs)("div",{className:"lc-bubble",style:{maxWidth:"85%",padding:"8px 12px",background:t?s.assistantBubble:s.accentGradient,color:t?s.foreground:s.accentContrast,borderRadius:t?"14px 14px 14px 4px":"14px 14px 4px 14px",boxShadow:t?"none":`0 1px 8px ${s.accentRing}`,...t?{}:{whiteSpace:"pre-wrap"},wordBreak:"break-word",fontFamily:G},children:[e.expertInformed===!0&&(0,ve.jsxs)("span",{title:`Written after consulting the ${Nz(e.informedBy)}. These are not that model's words \u2014 expand the consultation above for those.`,style:{display:"inline-flex",alignItems:"center",gap:4,marginBottom:5,fontSize:10,letterSpacing:.2,padding:"1px 6px 1px 4px",borderRadius:8,background:t?n.soft:"rgba(255, 255, 255, 0.18)",color:t?n.edge:s.accentContrast},children:[(0,ve.jsx)($n,{size:11}),"informed by ",Nz(e.informedBy)]}),t?(0,ve.jsx)(nf,{text:e.content}):e.content]})]})}var rx="var(--vscode-editor-font-family, monospace)";function MU(e){let[t,n]=(0,ox.useState)(!1),{toolCall:r}=e,i=r.result===void 0,o=r.consultingRole!==void 0,a=Mo(r.consultingRole),l=r.isError===!0?s.error:o?a.edge:s.border;return(0,ve.jsxs)("div",{className:"lc-in-left",style:{margin:"6px 10px 6px 40px",borderRadius:10,border:`1px solid ${l}`,background:o?a.soft:i?s.accentSoft:"transparent",...o?{boxShadow:`0 0 0 3px ${a.soft}`}:{},overflow:"hidden",transition:"background-color 190ms ease"},children:[(0,ve.jsxs)("button",{type:"button",className:"lc-btn","aria-expanded":t,title:t?"Hide details":"Show details",onClick:()=>n(!t),style:{display:"flex",alignItems:"center",gap:6,width:"100%",padding:"6px 10px",background:"transparent",border:"none",color:s.foreground,cursor:"pointer",fontFamily:G,fontSize:12,textAlign:"left"},children:[(0,ve.jsx)("span",{style:{display:"flex",color:s.muted,transform:t?"rotate(90deg)":"none",transition:"transform 190ms cubic-bezier(0.22, 0.85, 0.28, 1)"},children:(0,ve.jsx)(Ro,{})}),o&&(0,ve.jsx)("span",{title:"Expert consultation \u2014 answered by Claude","aria-label":"Expert consultation, answered by Claude",style:{display:"inline-flex",alignItems:"center",justifyContent:"center",width:18,height:18,borderRadius:"50%",flexShrink:0,background:a.gradient,color:a.contrast},children:(0,ve.jsx)($n,{size:11})}),(0,ve.jsx)("span",{style:{fontFamily:rx,color:o?a.edge:void 0},children:r.name}),r.why!==void 0&&(0,ve.jsx)("span",{title:r.why,style:{color:s.muted,fontFamily:G,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0},children:r.why}),!o&&e.expertInformed===!0&&(0,ve.jsx)("span",{title:"Following expert advice","aria-label":"Following expert advice",style:{display:"flex",color:s.expert},children:(0,ve.jsx)($n,{size:12})}),(0,ve.jsx)("span",{title:i?"Running":r.isError===!0?"Failed":"Done","aria-label":i?"Running":r.isError===!0?"Failed":"Done",style:{display:"flex",marginLeft:"auto",color:r.isError===!0?s.error:i?s.muted:"var(--vscode-testing-iconPassed, #3fb950)"},children:i?(0,ve.jsx)(U$,{}):r.isError===!0?(0,ve.jsx)(Va,{}):(0,ve.jsx)(Oi,{})})]}),t&&(0,ve.jsxs)("div",{style:{padding:"0 10px 8px",fontSize:12,fontFamily:rx},children:[(0,ve.jsx)("div",{style:{color:s.muted,marginBottom:2},children:"Arguments"}),(0,ve.jsx)("pre",{style:{margin:"0 0 8px",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:r.arguments}),r.result!==void 0&&(0,ve.jsxs)(ve.Fragment,{children:[(0,ve.jsx)("div",{style:{color:o?s.expert:s.muted,marginBottom:2},children:o?"Claude's answer":"Result"}),(0,ve.jsx)("pre",{className:o?"lc-scroll":void 0,style:{margin:0,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:300,overflowY:"auto",...o?{borderLeft:`2px solid ${s.expert}`,paddingLeft:8,fontFamily:G,fontSize:12}:{}},children:r.result})]})]})]})}function BU(e){let[t,n]=(0,ox.useState)(!1);return(0,ve.jsxs)("div",{className:"lc-in-left",style:{margin:"4px 10px 4px 40px"},children:[(0,ve.jsxs)("button",{type:"button",className:"lc-btn","aria-expanded":t,title:t?"Hide the reasoning":"Show the reasoning",onClick:()=>n(!t),style:{display:"flex",alignItems:"center",gap:6,background:"transparent",border:"none",borderRadius:6,color:s.muted,cursor:"pointer",padding:"2px 6px 2px 2px",fontFamily:G,fontSize:11,fontStyle:"italic"},children:[(0,ve.jsx)("span",{style:{display:"flex",transform:t?"rotate(90deg)":"none",transition:"transform 190ms cubic-bezier(0.22, 0.85, 0.28, 1)"},children:(0,ve.jsx)(Ro,{})}),(0,ve.jsx)("span",{children:e.pending===!0?"Thinking\u2026":"Thought process"})]}),t&&(0,ve.jsx)("pre",{style:{margin:"2px 0 0 14px",padding:8,borderLeft:`2px solid ${s.border}`,color:s.muted,fontFamily:rx,fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-word",maxHeight:320,overflowY:"auto"},children:e.content})]})}function ax(e){let t=-1;for(let n=e.messages.length-1;n>=0;n--){let r=e.messages[n];if(r?.kind==="text"&&r.role==="user"){t=n;break}}return(0,ve.jsxs)("div",{role:"log","aria-live":"polite",children:[e.messages.map((n,r)=>n.kind==="tool"?(0,ve.jsx)(MU,{toolCall:n.toolCall,expertInformed:n.expertInformed},r):n.kind==="diagram"?(0,ve.jsx)(Cz,{diagram:n.diagram},r):n.kind==="diagramError"?(0,ve.jsxs)("div",{style:{color:s.error,fontSize:11,margin:"8px 0"},children:["The diagram could not be drawn: ",n.message]},r):n.kind==="chart"?(0,ve.jsx)($z,{chart:n.chart},r):n.kind==="chartError"?(0,ve.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:6,padding:10,margin:"8px 0",fontSize:11,color:s.muted},children:[(0,ve.jsx)("strong",{style:{color:s.foreground},children:"Chart not drawn."})," ",n.message]},r):n.kind==="reasoning"?(0,ve.jsx)(BU,{content:n.content,pending:n.pending},r):(0,ve.jsx)(RU,{role:n.role,content:n.content,expertInformed:n.expertInformed,informedBy:n.informedBy,isLatestPrompt:r===t},r)),e.error!==void 0&&(0,ve.jsx)("div",{role:"alert",className:"lc-fade-up",style:{padding:"8px 12px",margin:"6px 10px 6px 40px",borderRadius:10,border:`1px solid ${s.error}`,color:s.error,fontFamily:G,fontSize:12},children:e.error})]})}var Wa=U(re(),1);function Uz(e){return(0,Wa.jsxs)("button",{type:"button",onClick:e.onReveal,title:"Scroll back to this message","aria-label":`Your message: ${e.text}. Scroll back to it.`,className:"lc-fade-up",style:{display:"flex",alignItems:"flex-start",gap:8,width:"100%",textAlign:"left",padding:"6px 10px",border:"none",borderBottom:`1px solid ${s.border}`,background:s.background,color:s.muted,cursor:"pointer",fontFamily:G,fontSize:11,flexShrink:0},children:[(0,Wa.jsx)("span",{"aria-hidden":"true",style:{display:"flex",alignItems:"center",justifyContent:"center",width:16,height:16,borderRadius:"50%",flexShrink:0,marginTop:1,background:s.accentSoft,color:s.accent},children:(0,Wa.jsx)(Yd,{size:10})}),(0,Wa.jsx)("span",{style:{flex:1,minWidth:0,display:"-webkit-box",WebkitLineClamp:2,WebkitBoxOrient:"vertical",overflow:"hidden",whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.text})]})}var Mi=U(re(),1);function Rz(e){if(e.consultations===0)return null;let t=e.consultations===1?"consultation":"consultations",n=e.unpriced>0?` ${String(e.unpriced)} of them reported no cost, so the total is at least this much.`:"",r=e.usage!==void 0&&e.usage>=.8,i=e.exhausted===!0?s.error:r?s.warning:s.expert;return(0,Mi.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,padding:"3px 12px",borderTop:`1px solid ${s.border}`,color:s.muted,fontFamily:G,fontSize:11,flexShrink:0},title:`${String(e.consultations)} expert ${t} in this chat.${n}${e.exhausted===!0?" The budget for this chat has been reached \u2014 raise it from the header, or start a new chat.":""} Starting a new chat resets the spend and any override.`,children:[(0,Mi.jsx)("span",{style:{display:"flex",color:s.expert},children:(0,Mi.jsx)($n,{size:11})}),(0,Mi.jsxs)("span",{children:["Expert:"," ",(0,Mi.jsxs)("span",{style:{color:s.foreground,fontVariantNumeric:"tabular-nums"},children:["$",e.usd.toFixed(4)]})," ","this chat"]}),e.usage!==void 0&&(0,Mi.jsx)("span",{"aria-hidden":!0,style:{width:46,height:3,borderRadius:2,background:s.border,overflow:"hidden",flexShrink:0},children:(0,Mi.jsx)("span",{style:{display:"block",height:"100%",width:`${String(Math.round(e.usage*100))}%`,background:i,transition:"width 240ms ease"}})}),(0,Mi.jsxs)("span",{style:{marginLeft:"auto",color:e.exhausted===!0?s.error:void 0},children:[e.exhausted===!0?"budget reached":`${String(e.consultations)} ${t}`,e.unpriced>0?" *":""]})]})}var Jt=U(re(),1),Bz=U(pe(),1);var Mz=[{key:"system",label:"System prompt",color:"var(--vscode-charts-blue, #4a90d9)"},{key:"toolDefinitions",label:"Tool definitions",color:"var(--vscode-charts-purple, #b180d7)"},{key:"history",label:"Conversation",color:"var(--vscode-charts-green, #89d185)"},{key:"results",label:"Tool results",color:"var(--vscode-charts-orange, #d18616)"}];function rf(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${(e/1e3).toFixed(1)}k`:String(e)}function Lz(e){let[t,n]=(0,Bz.useState)(!1),{usage:r}=e;if(r===void 0||r.total===0)return null;let i=r.contextWindow>0?r.contextWindow:void 0,o=i!==void 0?r.total/i:void 0,a=o!==void 0&&o>.75;return(0,Jt.jsxs)("div",{style:{padding:"4px 12px 6px",borderTop:`1px solid ${s.border}`,fontFamily:G,fontSize:11},children:[(0,Jt.jsxs)("button",{type:"button",onClick:()=>n(!t),style:{display:"flex",alignItems:"center",gap:6,width:"100%",background:"transparent",border:"none",color:s.muted,cursor:"pointer",padding:0,fontFamily:G,fontSize:11,textAlign:"left"},children:[(0,Jt.jsx)("span",{children:t?"\u25BE":"\u25B8"}),(0,Jt.jsxs)("span",{style:{color:a?s.error:s.muted},children:[rf(r.total),i!==void 0?` / ${rf(i)}`:""," tokens",r.estimated?" (est.)":""]}),r.cacheHitRate!==void 0&&(0,Jt.jsxs)("span",{style:{marginLeft:"auto"},children:["cache ",Math.round(r.cacheHitRate*100),"%"]})]}),(0,Jt.jsx)("div",{style:{display:"flex",height:4,borderRadius:2,overflow:"hidden",marginTop:4,background:s.border},children:Mz.map(l=>{let c=r[l.key],u=r.total>0?c/r.total*100:0;return u<=0?null:(0,Jt.jsx)("div",{title:`${l.label}: ${rf(c)}`,style:{width:`${u}%`,background:l.color}},l.key)})}),t&&(0,Jt.jsxs)("div",{style:{marginTop:6,color:s.muted},children:[Mz.map(l=>(0,Jt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,Jt.jsx)("span",{style:{width:8,height:8,borderRadius:2,background:l.color,flexShrink:0}}),(0,Jt.jsx)("span",{children:l.label}),(0,Jt.jsx)("span",{style:{marginLeft:"auto"},children:rf(r[l.key])})]},l.key)),r.supersededCount>0&&(0,Jt.jsxs)("div",{style:{marginTop:4},children:[r.supersededCount," superseded file read",r.supersededCount===1?"":"s"," dropped"]}),r.compactedCount>0&&(0,Jt.jsxs)("div",{children:[r.compactedCount," earlier message",r.compactedCount===1?"":"s"," summarised"]}),r.estimated&&(0,Jt.jsx)("div",{style:{marginTop:4,fontStyle:"italic"},children:"Estimated from text length \u2014 the provider did not report usage."})]})]})}var Lo=U(re(),1),Gs=U(pe(),1);function Pz(e){let[t]=(0,Gs.useState)(()=>Date.now()),[n,r]=(0,Gs.useState)(0);return(0,Gs.useEffect)(()=>{let i=setInterval(()=>r(Math.floor((Date.now()-t)/1e3)),1e3);return()=>clearInterval(i)},[t]),(0,Lo.jsxs)("div",{role:"status","aria-live":"polite","aria-label":e.label??"Working",className:"lc-fade-up",style:{display:"flex",alignItems:"center",gap:8,padding:"2px 12px",margin:"4px 10px 4px 40px",color:s.muted,fontFamily:G,fontSize:12},children:[(0,Lo.jsx)("span",{"aria-hidden":"true",style:{display:"inline-flex",alignItems:"center",gap:3,padding:"6px 9px",borderRadius:"12px 12px 12px 4px",background:s.assistantBubble},children:[0,1,2].map(i=>(0,Lo.jsx)("span",{className:"lc-dot",style:{width:5,height:5,borderRadius:"50%",background:e.variant==="expert"?Mo(e.role).edge:s.accent,display:"block"}},i))}),(0,Lo.jsx)("span",{style:{fontStyle:"italic"},children:e.label??"Thinking"}),n>=3&&(0,Lo.jsxs)("span",{style:{marginLeft:"auto",fontVariantNumeric:"tabular-nums"},children:[n,"s"]})]})}var LU=120;function lx(e){let t=(0,rr.useRef)(null),[n,r]=(0,rr.useState)(!1);(0,rr.useLayoutEffect)(()=>{let d=t.current;d!==null&&d.scrollTo({top:d.scrollHeight,behavior:"auto"})},[e.conversationKey]),(0,rr.useEffect)(()=>{let d=t.current;if(d===null)return;d.scrollHeight-d.scrollTop-d.clientHeight<=LU&&d.scrollTo({top:d.scrollHeight,behavior:"auto"})},[e.messages,e.pendingApproval,e.pendingForm]);let i=(()=>{for(let d=e.messages.length-1;d>=0;d--){let m=e.messages[d];if(m?.kind==="text"&&m.role==="user")return m.content}})();(0,rr.useEffect)(()=>{let d=t.current,m=d?.querySelector("[data-lc-latest-prompt]");if(d===null||m===null||m===void 0){r(!1);return}if(typeof IntersectionObserver>"u")return;let h=new IntersectionObserver(f=>{let v=f[0];v!==void 0&&r(!v.isIntersecting)},{root:d,threshold:0});return h.observe(m),()=>h.disconnect()},[e.messages]);let o=()=>{t.current?.querySelector("[data-lc-latest-prompt]")?.scrollIntoView({block:"start",behavior:"smooth"})},a=e.messages[e.messages.length-1],l=a?.kind==="tool"&&a.toolCall.result===void 0?a.toolCall.consultingRole:void 0,c=l!==void 0,u=(()=>{if(!e.isStreaming||e.pendingApproval!==void 0||e.pendingForm!==void 0)return;let d=e.messages[e.messages.length-1];if(d?.kind==="tool"&&d.toolCall.result===void 0)return c?`Consulting the ${l==="unknown"?"specialist":l}`:`Running ${d.toolCall.name}`;if(!(d?.kind==="text"&&d.role==="assistant"&&d.pending===!0)&&!(d?.kind==="reasoning"&&d.pending===!0))return"Thinking"})();return(0,an.jsxs)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:[n&&i!==void 0&&(0,an.jsx)(Uz,{text:i,onReveal:o}),(0,an.jsxs)("div",{ref:t,className:"lc-scroll",style:{flex:1,minHeight:0,overflowY:"auto",scrollBehavior:"smooth"},children:[(0,an.jsx)(ax,{messages:e.messages,error:e.error}),u!==void 0&&(0,an.jsx)(Pz,{label:u,variant:c?"expert":"default",...l!==void 0?{role:l}:{}}),e.pendingApproval!==void 0&&(0,an.jsx)(Yb,{approval:e.pendingApproval,onDecide:e.onDecideApproval,onAlwaysAllow:e.onAlwaysAllow}),e.pendingForm!==void 0&&(0,an.jsx)(gz,{form:e.pendingForm,onSubmit:e.onSubmitForm,onDismiss:e.onDismissForm})]}),e.canRollback&&(0,an.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:8,padding:"6px 10px",borderTop:`1px solid ${s.border}`,color:s.muted,fontSize:11,flexShrink:0},children:[(0,an.jsx)("span",{children:"Files were changed this task."}),(0,an.jsx)("button",{type:"button",className:iz.button,title:"Undo all changes made during this task","aria-label":"Undo all changes made during this task",style:Ce("secondary"),onClick:e.onRollback,children:(0,an.jsx)(Z$,{size:14})})]}),(0,an.jsx)(Rz,{...e.expertSpend}),(0,an.jsx)(Lz,{usage:e.usage}),(0,an.jsx)(Xb,{plan:e.plan,planCheckpoints:e.planCheckpoints,directRoles:e.directRoles,onSetPlan:e.onSetPlan,isStreaming:e.isStreaming,onSend:e.onSend,onCancel:e.onCancel,supportsVision:e.supportsVision,mentionCandidates:e.mentionCandidates,onQueryMentions:e.onQueryMentions,profiles:e.profiles,activeProfileId:e.activeProfileId,onSelectProfile:e.onSelectProfile,expertEnabled:e.expertEnabled,queued:e.queued,onUnqueue:e.onUnqueue,searchConnections:e.searchConnections,activeSearchId:e.activeSearchId,onSelectSearch:e.onSelectSearch})]})}var rt=U(re(),1),or=U(pe(),1);function Zz(e){let[t,n]=(0,or.useState)(!1),[r,i]=(0,or.useState)(String(e.maxSpendUsd)),[o,a]=(0,or.useState)(String(e.maxConsultations)),l=(0,or.useRef)(null);if((0,or.useEffect)(()=>{i(String(e.maxSpendUsd)),a(String(e.maxConsultations))},[e.maxSpendUsd,e.maxConsultations]),(0,or.useEffect)(()=>{if(!t)return;let v=D=>{l.current?.contains(D.target)!==!0&&n(!1)},k=D=>{D.key==="Escape"&&n(!1)};return document.addEventListener("mousedown",v),document.addEventListener("keydown",k),()=>{document.removeEventListener("mousedown",v),document.removeEventListener("keydown",k)}},[t]),!e.enabled)return null;let c=v=>{let k=Number(v.trim());return Number.isFinite(k)&&k>0?k:0},u=()=>{e.onSetLimits({maxSpendUsd:c(r),maxConsultations:Math.round(c(o))}),n(!1)},d=e.maxSpendUsd>0||e.maxConsultations>0,m=e.exhausted===!0?"Raise budget":d?[e.maxSpendUsd>0?`$${e.maxSpendUsd.toFixed(2)}`:void 0,e.maxConsultations>0?`${String(e.maxConsultations)}\xD7`:void 0].filter(v=>v!==void 0).join(" / "):"Budget",h=e.usage!==void 0&&e.usage>=.8,f=e.exhausted===!0?s.error:h?s.warning:void 0;return(0,rt.jsxs)("div",{ref:l,style:{position:"relative",display:"flex",fontFamily:G},children:[(0,rt.jsxs)("button",{type:"button","aria-haspopup":"dialog","aria-expanded":t,style:{..._(),display:"flex",alignItems:"center",gap:4,fontSize:11,padding:"2px 7px",...f!==void 0?{borderColor:f,color:f}:{}},title:e.exhausted===!0?"The expert budget for this chat is spent. Raise it here and the next consultation goes ahead \u2014 no need to start a new chat.":`Expert budget for this chat${e.overridden?" (overriding Settings)":""}. Spent so far: $${e.usd.toFixed(4)} over ${String(e.consultations)} consultation${e.consultations===1?"":"s"}.`,onClick:()=>n(v=>!v),children:[(0,rt.jsx)("span",{style:{display:"flex",color:f??s.expert},children:(0,rt.jsx)($n,{size:11})}),(0,rt.jsx)("span",{children:m}),e.overridden&&e.exhausted!==!0&&(0,rt.jsx)("span",{"aria-hidden":!0,children:"\u2022"})]}),t&&(0,rt.jsxs)("div",{role:"dialog","aria-label":"Expert budget for this chat",style:{position:"absolute",top:"calc(100% + 4px)",left:0,zIndex:40,width:236,padding:8,borderRadius:4,border:`1px solid ${s.border}`,background:s.inputBackground,boxShadow:"0 4px 14px rgba(0, 0, 0, 0.32)",color:s.foreground,fontSize:11,display:"flex",flexDirection:"column",gap:6},children:[(0,rt.jsx)("strong",{style:{fontSize:11},children:"Expert budget \u2014 this chat"}),(0,rt.jsxs)("span",{style:{color:s.muted},children:["Spent $",e.usd.toFixed(4)," over ",e.consultations," ",e.consultations===1?"consultation":"consultations","."]}),e.estimate!==void 0&&(0,rt.jsxs)("div",{style:{padding:"4px 6px",borderRadius:3,border:`1px solid ${s.border}`,display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,rt.jsx)("span",{style:{color:s.expert},children:"Expert estimates"}),(0,rt.jsx)("span",{style:{color:s.foreground},children:[e.estimate.usd===void 0?void 0:`$${e.estimate.usd.toFixed(2)}`,e.estimate.consultations===void 0?void 0:`${String(e.estimate.consultations)} consultations`].filter(v=>v!==void 0).join(" over ")}),(0,rt.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",marginLeft:"auto"},title:"Fill the fields below with the estimate. A little headroom is added, because an estimate that is exactly right still stops you at the last review.",onClick:()=>{e.estimate?.usd!==void 0&&i((e.estimate.usd*1.25).toFixed(2)),e.estimate?.consultations!==void 0&&a(String(Math.ceil(e.estimate.consultations*1.25)))},children:"Use it"})]}),(0,rt.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,rt.jsx)("span",{style:{width:66,color:s.muted},children:"Stop after"}),(0,rt.jsx)("input",{type:"number",min:"0",step:"0.25",value:r,"aria-label":"Maximum spend for this chat, in dollars",onChange:v=>i(v.target.value),style:{...E(),flex:1,fontSize:11,padding:"2px 4px"}}),(0,rt.jsx)("span",{style:{color:s.muted},children:"dollars"})]}),(0,rt.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6},children:[(0,rt.jsx)("span",{style:{width:66,color:s.muted},children:"or after"}),(0,rt.jsx)("input",{type:"number",min:"0",step:"1",value:o,"aria-label":"Maximum consultations for this chat",onChange:v=>a(v.target.value),style:{...E(),flex:1,fontSize:11,padding:"2px 4px"}}),(0,rt.jsx)("span",{style:{color:s.muted},children:"calls"})]}),(0,rt.jsx)("span",{style:{color:s.muted},children:"0 means no limit. Applies to the next consultation \u2014 a new chat goes back to the default from Settings."}),(0,rt.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,rt.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"2px 8px"},onClick:u,children:"Apply"}),e.overridden&&(0,rt.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"2px 8px"},title:"Go back to the limit configured in Settings \u2192 Expert",onClick:()=>{e.onSetLimits({}),n(!1)},children:"Use the default"})]})]})]})}var ut=U(re(),1);var X=U(re(),1),Ya=U(pe(),1);var Hr=U(re(),1);function ki(e){let t=e.progress;if(t===void 0)return null;let n=t.running&&t.total!==void 0&&t.total>0,r=n?Math.min(1,(t.done??0)/(t.total??1)):0;return(0,Hr.jsxs)("div",{style:{marginTop:8},children:[(0,Hr.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,Hr.jsxs)("span",{style:{fontSize:11,color:s.muted,flex:1,minWidth:0},children:[t.phase,n&&` \u2014 ${String(t.done??0)} of ${String(t.total??0)}`,t.detail!==void 0&&` \xB7 ${t.detail}`]}),t.running&&(0,Hr.jsx)("button",{type:"button",style:_(),onClick:e.onStop,children:"Stop"})]}),t.running&&(0,Hr.jsx)("div",{role:"progressbar","aria-label":t.phase,...n?{"aria-valuenow":Math.round(r*100),"aria-valuemin":0,"aria-valuemax":100}:{},style:{height:3,marginTop:4,borderRadius:2,background:s.border,overflow:"hidden"},children:(0,Hr.jsx)("div",{style:{height:"100%",width:n?`${String(Math.round(r*100))}%`:"35%",background:s.accent,transition:"width 200ms linear",...n?{}:{animation:"lc-indeterminate 1.2s ease-in-out infinite"}}})})]})}var wi=U(re(),1),Fz=U(pe(),1);function Vr(e){let[t,n]=(0,Fz.useState)(""),r=()=>{t.trim().length>0&&e.onProbe(t.trim(),e.target)};return(0,wi.jsxs)("div",{style:{marginTop:10},children:[(0,wi.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center"},children:[(0,wi.jsx)("input",{type:"text",value:t,spellCheck:!1,placeholder:e.label,"aria-label":e.label,onChange:i=>n(i.target.value),onKeyDown:i=>{i.key==="Enter"&&r()},style:{...E(),flex:1}}),(0,wi.jsx)("button",{type:"button",style:_(),disabled:e.running,onClick:r,children:e.running?"Searching\u2026":"Search"}),(e.result!==void 0||t.length>0)&&(0,wi.jsx)("button",{type:"button",style:_(),onClick:()=>{n(""),e.onClear()},children:"Clear"})]}),(0,wi.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:e.hint}),e.result!==void 0&&(0,wi.jsxs)("div",{style:{marginTop:8},children:[e.result.error!==void 0&&(0,wi.jsx)("span",{style:{display:"block",color:s.error,fontSize:11},children:e.result.error}),(0,wi.jsx)("pre",{className:"lc-scroll",style:{margin:0,maxHeight:260,overflow:"auto",whiteSpace:"pre-wrap",overflowWrap:"anywhere",fontSize:11,color:s.foreground,background:s.inputBackground,border:`1px solid ${s.border}`,borderRadius:4,padding:8},children:e.result.text})]})]})}var Bn=U(re(),1),Ws=U(pe(),1);function Hz(e){let[t,n]=(0,Ws.useState)(""),r=e.filterThreshold??8,i=(0,Ws.useMemo)(()=>{let a=t.trim().toLowerCase();return a.length===0?e.options:e.options.filter(l=>l.value===e.value||l.value.toLowerCase().includes(a)||(l.label??"").toLowerCase().includes(a)||(l.hint??"").toLowerCase().includes(a))},[e.options,e.value,t]),o=(0,Ws.useMemo)(()=>{let a=new Map;for(let l of i){let c=l.group??"";a.set(c,[...a.get(c)??[],l])}return[...a.entries()]},[i]);return(0,Bn.jsxs)("div",{children:[e.options.length>r&&(0,Bn.jsx)("input",{type:"text",value:t,spellCheck:!1,placeholder:`Search ${String(e.options.length)} tools\u2026`,"aria-label":`Filter ${e.ariaLabel}`,onChange:a=>n(a.target.value),style:{...E(),marginBottom:6}}),(0,Bn.jsx)("div",{className:"lc-scroll",role:"radiogroup","aria-label":e.ariaLabel,style:{maxHeight:240,overflowY:"auto",border:`1px solid ${s.border}`,borderRadius:4,padding:6},children:i.length===0?(0,Bn.jsx)("span",{style:{color:s.muted,fontSize:11},children:e.emptyText??"Nothing matches."}):o.map(([a,l])=>(0,Bn.jsxs)("div",{children:[a.length>0&&(0,Bn.jsx)("div",{style:{fontSize:10,fontWeight:700,letterSpacing:.4,textTransform:"uppercase",color:s.muted,margin:"6px 0 2px"},children:a}),l.map(c=>(0,Bn.jsxs)("label",{title:c.hint??c.value,style:{display:"flex",gap:6,alignItems:"flex-start",padding:"3px 0",cursor:"pointer"},children:[(0,Bn.jsx)("input",{type:"radio",name:e.ariaLabel,checked:e.value===c.value,onChange:()=>e.onChange(c.value),style:{marginTop:3}}),(0,Bn.jsxs)("span",{style:{minWidth:0},children:[(0,Bn.jsx)("span",{style:{display:"block",fontSize:12,overflowWrap:"anywhere"},children:c.label??c.value}),c.hint!==void 0&&c.hint.length>0&&(0,Bn.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,overflowWrap:"anywhere"},children:c.hint})]})]},c.value))]},a))})]})}var sx=[{value:"minutes",label:"minutes",minutes:1},{value:"hours",label:"hours",minutes:60},{value:"days",label:"days",minutes:1440}];function of(e){for(let t of[...sx].reverse())if(e%t.minutes===0&&e>=t.minutes)return{every:e/t.minutes,unit:t.value};return{every:e,unit:"minutes"}}function Vz(e,t){let n=sx.find(r=>r.value===t);return Math.max(1,Math.round(e))*(n?.minutes??1)}function PU(e){return e<1024?`${String(e)} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function af(e){return(0,X.jsxs)("section",{style:{marginBottom:18},children:[(0,X.jsx)("h3",{style:tr(),children:e.title}),e.hint!==void 0&&(0,X.jsx)("p",{style:{margin:"0 0 8px",color:s.muted,fontSize:11},children:e.hint}),e.children]})}function ZU(){return{id:`ds-${String(Date.now().toString(36))}`,name:"",toolName:"",enabled:!0,syncMinutes:0}}function qz(e){let[t,n]=(0,Ya.useState)(void 0),[r,i]=(0,Ya.useState)(void 0),[o,a]=(0,Ya.useState)(!1);if((0,Ya.useEffect)(()=>{t!==void 0&&e.datasets.some(l=>l.id===t.id&&l.name===t.name)&&n(void 0)},[e.datasets]),t!==void 0){let l=t.name.trim().length>0&&t.toolName.trim().length>0;return(0,X.jsxs)("div",{style:{padding:12,overflowY:"auto",fontSize:13,color:s.foreground},children:[(0,X.jsx)("h2",{style:{margin:"0 0 12px",fontSize:14},children:e.datasets.some(c=>c.id===t.id)?"Edit dataset":"New dataset"}),(0,X.jsx)("label",{htmlFor:"lc-ds-name",style:I(),children:"Name"}),(0,X.jsx)("input",{id:"lc-ds-name",type:"text",value:t.name,spellCheck:!1,placeholder:"tickets",onChange:c=>n({...t,name:c.target.value}),style:E()}),(0,X.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:12},children:["What the assistant will call it. Short and obvious \u2014 you will be saying \u201Ccheck the ",t.name.trim().length>0?t.name:"tickets","\u201D."]}),(0,X.jsxs)("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"baseline"},children:[(0,X.jsx)("label",{htmlFor:"lc-ds-tool",style:I(),children:"Collector tool"}),(0,X.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:e.onRefresh,children:"Refresh the list"})]}),e.tools.length===0?(0,X.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:4,padding:10,fontSize:11,color:s.muted},children:[(0,X.jsx)("span",{style:{display:"block",marginBottom:6},children:"Nothing callable to collect with yet. A collector is a Python tool or an MCP tool that returns records."}),(0,X.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:e.onOpenPython,children:"Open Python to switch on tools"})]}):(0,X.jsx)(Hz,{ariaLabel:"Collector tool",value:t.toolName,emptyText:"No tool matches. Clear the search to see them all.",options:[...e.tools.filter(c=>c.kind==="python").map(c=>({value:c.name,hint:c.description,group:"Python tools"})),...e.tools.filter(c=>c.kind==="mcp").map(c=>({value:c.name,hint:c.description,group:"MCP tools"}))],onChange:c=>n({...t,toolName:c})}),(0,X.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,margin:"4px 0 12px"},children:"It must return a list of records \u2014 see the contract on the previous screen. A tool that returns something else is refused when it runs, naming the shape it should have."}),(0,X.jsx)("label",{htmlFor:"lc-ds-sync",style:I(),children:"Sync"}),(0,X.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"center",cursor:"pointer",marginBottom:8},children:[(0,X.jsx)("input",{type:"checkbox",checked:(t.syncMinutes??0)===0,onChange:c=>n({...t,syncMinutes:c.target.checked?0:60})}),(0,X.jsx)("span",{style:{fontSize:13},children:"Only when I ask"})]}),(t.syncMinutes??0)>0&&(0,X.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,X.jsx)("span",{style:{fontSize:12,color:s.muted},children:"Every"}),(0,X.jsx)("input",{id:"lc-ds-sync",type:"text",inputMode:"numeric","aria-label":"How often to sync",value:of(t.syncMinutes??60).every,onChange:c=>n({...t,syncMinutes:Vz(Number(c.target.value)||1,of(t.syncMinutes??60).unit)}),style:{...E(),width:70}}),(0,X.jsx)("div",{style:{flex:1},children:(0,X.jsx)(ze,{id:"lc-ds-unit",value:of(t.syncMinutes??60).unit,options:sx.map(c=>({value:c.value,label:c.label})),onChange:c=>n({...t,syncMinutes:Vz(of(t.syncMinutes??60).every,c)}),ariaLabel:"Interval unit"})})]}),(0,X.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,margin:"4px 0 12px"},children:(t.syncMinutes??0)===0?"Nothing runs on its own. Use Sync now on the list, or re-run it after changing the collector.":`The collector runs every ${String(t.syncMinutes??0)} minute(s), and is given the time of the last successful sync so it can fetch only what changed. A failed run does not advance that, so nothing is skipped while the source is down.`}),(0,X.jsx)("label",{htmlFor:"lc-ds-store",style:I(),children:"Where the index is stored"}),(0,X.jsx)(ze,{id:"lc-ds-store",value:t.storeId??"",options:[{value:"",label:`Default for custom data (${e.defaultStoreLabel})`},...e.stores.map(c=>({value:c.id,label:c.label}))],onChange:c=>n({...t,storeId:c===""?void 0:c}),ariaLabel:"Vector store for this dataset"}),(0,X.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,margin:"4px 0 12px"},children:"Records are embedded and written here. Changing it on a dataset that already has records leaves the old ones where they were \u2014 clear it first, or rebuild afterwards, so the two copies do not both answer searches."}),(0,X.jsxs)("label",{htmlFor:"lc-ds-retention",style:I(),children:["Keep records for ",(0,X.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(days, blank for ever)"})]}),(0,X.jsx)("input",{id:"lc-ds-retention",type:"text",inputMode:"numeric",value:t.retentionDays??"",onChange:c=>n({...t,retentionDays:Number(c.target.value)||void 0}),style:E()}),(0,X.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:12},children:"Applied on every sync. Only records whose collector gave them a timestamp can be aged out \u2014 one without has no age, so it is kept."}),(0,X.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,X.jsx)("button",{type:"button",style:oe(!l),disabled:!l,onClick:()=>e.onSave({...t,name:t.name.trim(),toolName:t.toolName.trim()}),children:"Save"}),(0,X.jsx)("button",{type:"button",style:_(),onClick:()=>n(void 0),children:"Cancel"})]})]})}return(0,X.jsxs)("div",{style:{padding:12,overflowY:"auto",fontSize:13,color:s.foreground},children:[(0,X.jsx)("h2",{style:{margin:"0 0 4px",fontSize:14},children:"Custom data"}),(0,X.jsxs)("p",{style:{margin:"0 0 14px",color:s.muted,fontSize:11},children:["Corpora you collect yourself. Point at a tool that returns records \u2014 from a ticketing system, a wiki, a database, anything your own code or an MCP server can reach \u2014 and Light Code embeds them, keeps them current, and lets the assistant search them with"," ",(0,X.jsx)("code",{style:{fontFamily:Si},children:"search_data"}),"."]}),(0,X.jsxs)(af,{title:"Datasets",children:[e.datasets.length===0?(0,X.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:"None yet. The assistant can write a collector for you if you ask it \u2014 describe where the data lives and it will offer one."}):e.datasets.map(l=>(0,X.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:6,padding:10,marginBottom:8},children:[(0,X.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"baseline",flexWrap:"wrap"},children:[(0,X.jsx)("strong",{style:{fontSize:13},children:l.name}),(0,X.jsx)("span",{style:{color:s.muted,fontSize:11,fontFamily:Si},children:l.toolName}),l.enabled===!1&&(0,X.jsx)("span",{style:{color:s.muted,fontSize:11},children:"\u2014 paused"})]}),(0,X.jsxs)("div",{style:{color:s.muted,fontSize:11,marginTop:4},children:[l.records===0?"Nothing collected yet.":`${String(l.records)} record(s), ${PU(l.sizeBytes)}${l.newest!==void 0?`, newest ${new Date(l.newest).toLocaleDateString()}`:""}.`," ",(l.syncMinutes??0)===0?"Runs only when asked.":`Every ${String(l.syncMinutes)} minute(s).`,l.lastSyncedAt!==void 0&&` Last synced ${new Date(l.lastSyncedAt).toLocaleString()}.`,` Stored in ${l.storeLabel}.`]}),l.lastResult!==void 0&&(0,X.jsxs)("div",{style:{color:l.lastFailed===!0?s.error:s.muted,fontSize:11,marginTop:4,...l.lastFailed===!0?{border:`1px solid ${s.error}`,borderRadius:4,padding:"4px 6px",overflowWrap:"anywhere"}:{}},children:[l.lastFailed===!0&&(0,X.jsx)("strong",{children:"Last sync failed. "}),l.lastResult,l.lastFailed===!0&&l.lastAttemptAt!==void 0&&(0,X.jsx)("span",{style:{display:"block",marginTop:2},children:`Attempted ${new Date(l.lastAttemptAt).toLocaleString()}. The records below are from before that, so they are no longer being kept current.`})]}),(0,X.jsx)("div",{style:{display:"flex",gap:8,marginTop:8,flexWrap:"wrap"},children:r?.id===l.id?(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)("span",{style:{fontSize:11},children:r.action==="delete"?`Delete "${l.name}" and everything it collected?`:l.records===0?"Nothing is collected. Clear the last result and start again from scratch?":`Throw away all ${String(l.records)} record(s)?`}),(0,X.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{r.action==="delete"?e.onDelete(l.id):e.onClear(l.id,!1),i(void 0)},children:r.action==="delete"?"Delete it":"Clear it"}),(0,X.jsx)("button",{type:"button",style:_(),onClick:()=>i(void 0),children:"Cancel"})]}):(0,X.jsxs)(X.Fragment,{children:[(0,X.jsx)("button",{type:"button",style:_(),disabled:l.busy===!0,onClick:()=>e.onSync(l.id),children:l.busy===!0?"Syncing\u2026":"Sync now"}),(0,X.jsx)("button",{type:"button",style:_(),disabled:l.busy===!0,title:"Throws everything away and runs the collector again from scratch",onClick:()=>e.onClear(l.id,!0),children:"Rebuild"}),(0,X.jsx)("button",{type:"button",style:_(),disabled:l.busy===!0,onClick:()=>i({id:l.id,action:"clear"}),children:"Clear"}),(0,X.jsx)("button",{type:"button",style:_(),onClick:()=>n(l),children:"Edit"}),(0,X.jsx)("button",{type:"button",style:_(),disabled:l.busy===!0,onClick:()=>i({id:l.id,action:"delete"}),children:"Delete"})]})})]},l.id)),(0,X.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,X.jsx)("button",{type:"button",style:oe(!1),onClick:()=>n(ZU()),children:"Add a dataset"}),(0,X.jsx)("button",{type:"button",style:_(),onClick:e.onRefresh,children:"Refresh"})]}),(0,X.jsx)(ki,{progress:e.progress,onStop:e.onStop})]}),(0,X.jsxs)(af,{title:"Where it is stored",hint:"Records are sent to your embedding endpoint, like anything else indexed.",children:[(0,X.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:[`Datasets that name no store of their own go to ${e.defaultStoreLabel}. `,"Each one can be pointed somewhere else when you edit it \u2014 a corpus you collected yourself is often the one you least want on a cluster your team shares."]}),(0,X.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:6},children:e.semantic?"An embedding model is configured, so searches rank by meaning.":"No embedding model is configured. Datasets still sync and are still searchable \u2014 on words rather than meaning, and exact filters like dates and tags work either way."})]}),(0,X.jsx)(af,{title:"Try a search",hint:"Runs the same search the assistant would, against these datasets. The quickest way to tell an empty corpus from a search that is not working.",children:(0,X.jsx)(Vr,{target:"data",label:"Search your datasets",hint:"Each hit shows its dataset, timestamp and id.",running:e.probe.running,result:e.probe.result,onProbe:e.onProbe,onClear:e.onClearProbe})}),(0,X.jsxs)(af,{title:"Writing a collector",children:[(0,X.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:()=>a(l=>!l),children:o?"Hide the contract":"Show the contract a collector must satisfy"}),o&&(0,X.jsx)("pre",{className:"lc-scroll",style:{margin:"8px 0 0",maxHeight:300,overflow:"auto",whiteSpace:"pre-wrap",fontSize:11,fontFamily:Si,color:s.muted,background:s.inputBackground,border:`1px solid ${s.border}`,borderRadius:4,padding:8},children:e.guidance}),(0,X.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"8px 0 0"},children:"You do not have to write it yourself. Tell the assistant where the data lives and ask for a collector \u2014 it knows this contract and will offer one for you to approve."})]})]})}var xf=U(pe(),1);var Se=U(re(),1);var Ja=U(pe(),1);var cx="var(--vscode-editor-font-family, monospace)",FU=[{group:"read",label:"Reading files",description:"read_file, list_files, search_files"},{group:"edit",label:"Editing files",description:"write_to_file, apply_diff"},{group:"command",label:"Running commands",description:"execute_command \u2014 the broadest grant here"},{group:"mcp",label:"MCP tools",description:"Tools provided by external MCP servers"}];function HU(e){return(0,Se.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",marginBottom:10,cursor:"pointer"},children:[(0,Se.jsx)("input",{type:"checkbox",checked:e.checked,onChange:t=>e.onChange(t.target.checked),style:{marginTop:2}}),(0,Se.jsxs)("span",{children:[(0,Se.jsx)("span",{style:{display:"block",fontSize:13},children:e.label}),(0,Se.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:e.description})]})]})}function Gz(e){return(0,Se.jsxs)("div",{style:{marginTop:16},children:[(0,Se.jsx)("label",{style:I(),children:e.title}),e.entries.length===0?(0,Se.jsx)("p",{style:{color:s.muted,fontSize:12,margin:0},children:e.empty}):e.entries.map(t=>(0,Se.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"4px 0",borderBottom:`1px solid ${s.border}`},children:[(0,Se.jsx)("code",{style:{flex:1,fontFamily:cx,fontSize:12,wordBreak:"break-all"},children:t}),(0,Se.jsx)("button",{type:"button",title:"Revoke this permission","aria-label":"Revoke this permission",style:{...Ce("secondary"),color:s.error},onClick:()=>e.onRevoke(t),children:(0,Se.jsx)(Wt,{})})]},t))]})}function ux(e){let t=e.approvals.autoApprove??{},[n,r]=(0,Ja.useState)(String(e.maxIterations));(0,Ja.useEffect)(()=>r(String(e.maxIterations)),[e.maxIterations]);let i=Number.parseInt(n,10),o=Number.isFinite(i)&&i>=1&&i<=500;return(0,Se.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G},children:[(0,Se.jsx)("h3",{style:{margin:"0 0 4px",color:s.foreground},children:"Approvals"}),(0,Se.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:0,marginBottom:12},children:"These apply to this workspace only, and are stored outside it \u2014 a repository cannot grant itself permissions."}),(0,Se.jsxs)("div",{style:{marginBottom:16,paddingBottom:12,borderBottom:`1px solid ${s.border}`},children:[(0,Se.jsx)("label",{htmlFor:"lc-max-steps",style:I(),children:"Maximum steps per message"}),(0,Se.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,Se.jsx)("input",{id:"lc-max-steps",type:"number",min:1,max:500,value:n,onChange:a=>r(a.target.value),style:{...E(),width:110,flex:"none"}}),(0,Se.jsx)("button",{type:"button",style:_(),disabled:!o||i===e.maxIterations,onClick:()=>e.onSetMaxIterations(i),children:"Save"}),!o&&(0,Se.jsx)("span",{style:{fontSize:11,color:s.error},children:"Must be between 1 and 500."})]}),(0,Se.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:"How many tool calls the assistant may make in reply to one message. The limit exists so a model looping on a failing edit stops costing money \u2014 not to cut short real work. Hitting it loses nothing: send another message and it carries on. Raise it for long refactors; lower it if you want to stay closer to what it is doing."})]}),(0,Se.jsx)("label",{style:I(),children:"Skip the prompt for\u2026"}),FU.map(a=>(0,Se.jsx)(HU,{checked:t[a.group]===!0,label:a.label,description:a.description,onChange:l=>e.onSetAutoApprove(a.group,l)},a.group)),(0,Se.jsx)(Gz,{title:"Always-allowed tools",empty:"None. Use \u201CAlways allow\u201D on an approval prompt to add one.",entries:e.approvals.allowedTools??[],onRevoke:e.onRevokeTool}),(0,Se.jsx)(Gz,{title:"Always-allowed commands (exact match)",empty:"None. Use \u201CAlways allow this command\u201D on a command prompt to add one.",entries:e.approvals.allowedCommands??[],onRevoke:e.onRevokeCommand}),(0,Se.jsxs)("p",{style:{color:s.muted,fontSize:11},children:["A command is matched byte-for-byte. Allowing ",(0,Se.jsx)("code",{style:{fontFamily:cx},children:"npm test"})," does not allow ",(0,Se.jsx)("code",{style:{fontFamily:cx},children:"npm test && something-else"}),"."]}),(0,Se.jsx)(VU,{roots:e.readRoots,onSave:e.onSetReadRoots})]})}function VU(e){let[t,n]=(0,Ja.useState)(e.roots);(0,Ja.useEffect)(()=>n(e.roots),[e.roots]);let r=t.join("\0")!==e.roots.join("\0");return(0,Se.jsxs)("section",{style:{marginTop:18,paddingTop:14,borderTop:`1px solid ${s.border}`},children:[(0,Se.jsx)("span",{style:I(),children:"Folders it may read"}),(0,Se.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:["Everything is confined to this workspace by default. Add a folder here to let the assistant read files elsewhere \u2014 a log directory, or a network share such as"," ",(0,Se.jsx)("code",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:String.raw`\server\logs`}),". It can ",(0,Se.jsx)("strong",{children:"read"})," these, never write to them: edits stay in the workspace, where a checkpoint can undo them."]}),t.map((i,o)=>(0,Se.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:6},children:[(0,Se.jsx)("input",{type:"text",value:i,spellCheck:!1,"aria-label":`Readable folder ${o+1}`,placeholder:String.raw`\server\share\logs`,onChange:a=>n(l=>l.map((c,u)=>u===o?a.target.value:c)),style:{...E(),fontFamily:"var(--vscode-editor-font-family, monospace)"}}),(0,Se.jsx)("button",{type:"button",title:"Remove this folder","aria-label":"Remove this folder",style:Ce("secondary"),onClick:()=>n(a=>a.filter((l,c)=>c!==o)),children:(0,Se.jsx)(Wt,{})})]},o)),(0,Se.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,Se.jsx)("button",{type:"button",style:_(),onClick:()=>n(i=>[...i,""]),children:"Add a folder"}),(0,Se.jsx)("button",{type:"button",style:_(),disabled:!r,onClick:()=>e.onSave(t.map(i=>i.trim()).filter(i=>i.length>0)),children:r?"Save folders":"Saved"})]})]})}var ae=U(re(),1);var Ln=U(pe(),1);var se=U(re(),1);var qr=U(pe(),1);var ar=U(re(),1);var qU="var(--vscode-editor-font-family, monospace)";function ln(e){let t=e.browse;return(0,ar.jsxs)("div",{style:{marginBottom:10},children:[(0,ar.jsx)("label",{htmlFor:e.id,style:I(),children:e.label}),(0,ar.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,ar.jsx)("input",{id:e.id,type:"text",value:e.value,spellCheck:!1,placeholder:e.placeholder??"",onChange:n=>e.onChange(n.target.value),style:{...E(),fontFamily:qU,...e.error!==void 0?{borderColor:s.error}:{}}}),t!==void 0&&e.onBrowse!==void 0&&(0,ar.jsx)("button",{type:"button",style:_(),title:t.kind==="folder"?"Choose a folder":"Choose a file",onClick:()=>e.onBrowse?.(t),children:"Browse"}),e.children]}),e.error!==void 0?(0,ar.jsx)("span",{style:on(),children:e.error}):e.hint!==void 0&&(0,ar.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:e.hint})]})}var Ys="var(--vscode-editor-font-family, monospace)",Wz=[{value:"python",label:"Python (venv)",transport:"stdio",blurb:"A script run by the interpreter inside a virtualenv. Light Code starts the process and talks to it over stdio."},{value:"npx",label:"npm package",transport:"stdio",blurb:"Fetched and run through npx. Light Code starts the process and talks to it over stdio."},{value:"custom",label:"Command",transport:"stdio",blurb:"Any executable, with arguments you supply. Light Code starts the process and talks to it over stdio."},{value:"http",label:"HTTP",transport:"Streamable HTTP",blurb:"A server already running somewhere. Light Code connects to it rather than starting it."}];function lf(e){return(0,se.jsxs)("div",{style:{marginBottom:10},children:[(0,se.jsx)("label",{htmlFor:e.id,style:I(),children:e.label}),(0,se.jsx)("input",{id:e.id,type:"text",value:e.value,spellCheck:!1,placeholder:e.placeholder??"",onChange:t=>e.onChange(t.target.value),style:{...E(),...e.mono===!0?{fontFamily:Ys}:{},...e.error!==void 0?{borderColor:s.error}:{}}}),e.error!==void 0?(0,se.jsx)("span",{style:on(),children:e.error}):e.hint!==void 0&&(0,se.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:e.hint})]})}function Yz(e){let[t,n]=(0,qr.useState)(()=>Object.entries(e.pairs)),r=i=>{n(i),e.onChange(Object.fromEntries(i.filter(([o])=>o.trim().length>0)))};return(0,se.jsxs)("div",{style:{marginBottom:10},children:[(0,se.jsx)("label",{style:I(),children:e.label}),t.map(([i,o],a)=>(0,se.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:4},children:[(0,se.jsx)("input",{"aria-label":`${e.label} name ${a+1}`,value:i,spellCheck:!1,placeholder:"NAME",onChange:l=>r(t.map((c,u)=>u===a?[l.target.value,c[1]]:c)),style:{...E(),fontFamily:Ys,flex:1}}),(0,se.jsx)("input",{"aria-label":`${e.label} value ${a+1}`,value:o,spellCheck:!1,placeholder:"value",onChange:l=>r(t.map((c,u)=>u===a?[c[0],l.target.value]:c)),style:{...E(),fontFamily:Ys,flex:2}}),(0,se.jsx)("button",{type:"button","aria-label":`Remove ${i.length>0?i:`row ${a+1}`}`,style:Ce("ghost"),onClick:()=>r(t.filter((l,c)=>c!==a)),children:(0,se.jsx)(Wt,{})})]},a)),(0,se.jsx)("button",{type:"button",style:_(),onClick:()=>n([...t,["",""]]),children:"Add"}),(0,se.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:e.hint})]})}function Jz(e){let[t,n]=(0,qr.useState)(e.initialName),[r,i]=(0,qr.useState)(()=>e.initialConfig!==void 0?gb(e.initialConfig):Rs),[o,a]=(0,qr.useState)(!1);(0,qr.useEffect)(()=>{let k=e.probe?.interpreter;k!==void 0&&i(D=>({...D,interpreter:k,venvDir:e.probe?.venvDir??D.venvDir}))},[e.probe]),(0,qr.useEffect)(()=>{let k=e.pickedPath;if(k===void 0)return;let D={"mcp.script":"script","mcp.venvDir":"venvDir","mcp.interpreter":"interpreter","mcp.cwd":"cwd"}[k.purpose];D!==void 0&&i(p=>({...p,[D]:k.path}))},[e.pickedPath]);let l=yb(t,r),c=t.trim()!==e.initialName&&e.existingNames.includes(t.trim())?"A server with this name already exists.":void 0,u=l.name??c,d=Object.keys(l).length>0||c!==void 0,m=k=>o?l[k]:void 0,h=k=>i({...r,...k}),f=Wz.find(k=>k.value===r.kind),v=(()=>{let k=Fd(r,e.platform);return"url"in k?k.url:[k.command,...k.args??[]].join(" ")})();return(0,se.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G},children:[(0,se.jsx)("h3",{style:{margin:"0 0 12px",color:s.foreground},children:e.initialName.length===0?"Add MCP server":`Edit ${e.initialName}`}),(0,se.jsx)(lf,{id:"lc-mcp-name",label:"Name",value:t,placeholder:"filesystem",hint:"Prefixes every tool this server exposes, e.g. filesystem__read_file.",...o&&u!==void 0?{error:u}:{},onChange:n}),(0,se.jsx)("label",{style:I(),children:"Type"}),(0,se.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:4,marginBottom:4},children:Wz.map(k=>{let D=k.value===r.kind;return(0,se.jsx)("button",{type:"button",title:`${k.blurb} Transport: ${k.transport}.`,onClick:()=>h({kind:k.value}),style:{padding:"3px 10px",fontFamily:G,fontSize:11,borderRadius:3,cursor:"pointer",background:D?s.accent:"transparent",color:D?s.buttonForeground:s.muted,border:`1px solid ${D?s.accent:s.border}`},children:k.label},k.value)})}),(0,se.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 12px"},children:f?.blurb}),r.kind==="python"&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(ln,{id:"lc-mcp-script",label:"Server script",value:r.script,placeholder:e.platform==="win32"?"C:\\work\\my-server\\server.py":"/home/me/my-server/server.py",hint:"Your FastMCP entry point. Pick this first \u2014 the virtualenv beside it is found automatically.",browse:{purpose:"mcp.script",kind:"file",extensions:["py"]},onBrowse:e.onBrowse,...m("script")!==void 0?{error:m("script")}:{},onChange:k=>h({script:k})}),(0,se.jsx)(ln,{id:"lc-mcp-venv",label:"Virtualenv folder",value:r.venvDir,placeholder:e.platform==="win32"?"C:\\work\\my-server\\.venv":"/home/me/my-server/.venv",hint:"Leave blank and press Detect to search beside the script.",browse:{purpose:"mcp.venvDir",kind:"folder"},onBrowse:e.onBrowse,...m("venvDir")!==void 0?{error:m("venvDir")}:{},onChange:k=>h({venvDir:k}),children:(0,se.jsx)("button",{type:"button",style:_(),title:"Look on disk for the interpreter, or for a virtualenv beside the script",onClick:()=>e.onDetect(r.venvDir,r.script),children:"Detect"})}),e.probe!==void 0&&(0,se.jsx)("div",{style:{fontSize:11,marginBottom:8,color:e.probe.interpreter!==void 0?s.muted:s.error},children:e.probe.detail}),(0,se.jsx)(ln,{id:"lc-mcp-interpreter",label:"Python interpreter",value:r.interpreter,placeholder:r.venvDir.trim().length>0?Zd(r.venvDir.trim(),e.platform):e.platform==="win32"?"python.exe":"python3",hint:"Filled in by Detect. Override it for a conda environment, a system Python, or any layout detection does not recognise \u2014 this is the executable that actually runs.",browse:{purpose:"mcp.interpreter",kind:"file"},onBrowse:e.onBrowse,onChange:k=>h({interpreter:k})})]}),r.kind==="npx"&&(0,se.jsx)(lf,{id:"lc-mcp-package",label:"Package",value:r.packageName,mono:!0,placeholder:"@modelcontextprotocol/server-filesystem",hint:"Run with -y so it installs without waiting for a confirmation nobody can answer. It is fetched from the network on first use.",...m("packageName")!==void 0?{error:m("packageName")}:{},onChange:k=>h({packageName:k})}),r.kind==="custom"&&(0,se.jsx)(lf,{id:"lc-mcp-command",label:"Command",value:r.command,mono:!0,placeholder:"docker",hint:"An executable on PATH, or an absolute path to one.",...m("command")!==void 0?{error:m("command")}:{},onChange:k=>h({command:k})}),r.kind==="http"&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsx)(lf,{id:"lc-mcp-url",label:"URL",value:r.url,mono:!0,placeholder:"https://mcp.internal/mcp",...m("url")!==void 0?{error:m("url")}:{},onChange:k=>h({url:k})}),(0,se.jsx)(Yz,{idPrefix:"lc-mcp-header",label:"Headers",hint:"Use ${secret:NAME} for a token \u2014 it is read from secret storage at connect time and never written to the config file.",pairs:r.headers,onChange:k=>h({headers:k})})]}),r.kind!=="http"&&(0,se.jsxs)(se.Fragment,{children:[(0,se.jsxs)("div",{style:{marginBottom:10},children:[(0,se.jsx)("label",{htmlFor:"lc-mcp-args",style:I(),children:"Arguments"}),(0,se.jsx)("textarea",{id:"lc-mcp-args",value:r.args.join(`
|
|
98
|
-
`),spellCheck:!1,rows:3,placeholder:`--root
|
|
99
|
-
/data`,onChange:k=>h({args:k.target.value.split(`
|
|
100
|
-
`)}),style:{width:"100%",boxSizing:"border-box",background:s.inputBackground,color:s.inputForeground,border:`1px solid ${s.inputBorder}`,borderRadius:2,padding:"6px 8px",fontFamily:Ys,fontSize:12,resize:"vertical"}}),(0,se.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:"One per line \u2014 not a command line, so nothing is split on spaces and quoting is never needed. A path containing a space goes on its own line as-is."})]}),(0,se.jsx)(ln,{id:"lc-mcp-cwd",label:"Working directory",value:r.cwd,placeholder:"Optional",hint:"Where the process starts. Set it if your server reads files by relative path.",browse:{purpose:"mcp.cwd",kind:"folder"},onBrowse:e.onBrowse,onChange:k=>h({cwd:k})}),(0,se.jsx)(GU,{value:r.timeout,error:m("timeout"),onChange:k=>h({timeout:k})}),(0,se.jsx)(Yz,{idPrefix:"lc-mcp-env",label:"Environment variables",hint:"Use ${secret:NAME} for a credential \u2014 it is read from secret storage at launch and never written to the config file. Provider API keys are never passed through.",pairs:r.env,onChange:k=>h({env:k})})]}),(0,se.jsxs)("div",{style:{marginBottom:12},children:[(0,se.jsxs)("label",{style:I(),children:[r.kind==="http"?"Connects to":"Will run",(0,se.jsx)("span",{style:{marginLeft:6,fontWeight:"normal",textTransform:"none",opacity:.7},children:f?.transport})]}),(0,se.jsx)("div",{style:{fontFamily:Ys,fontSize:11,color:s.muted,background:s.inputBackground,border:`1px solid ${s.border}`,borderRadius:2,padding:"6px 8px",wordBreak:"break-all"},children:v.trim().length>0?v:"\u2014"})]}),(0,se.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,se.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{a(!0),!d&&e.onSave(t.trim(),e.initialName.length>0?e.initialName:void 0,Fd(r,e.platform,e.initialConfig))},children:"Save"}),(0,se.jsx)("button",{type:"button",style:_(),onClick:e.onCancel,children:"Cancel"}),e.saving&&(0,se.jsx)("span",{style:{fontSize:11,color:s.muted},children:"Saving\u2026"}),o&&d&&(0,se.jsx)("span",{style:{fontSize:11,color:s.error},children:"Fix the fields above."})]})]})}function GU(e){return(0,se.jsxs)("div",{style:{marginBottom:12},children:[(0,se.jsx)("label",{htmlFor:"lc-mcp-timeout",style:I(),children:"Tool call timeout"}),(0,se.jsx)("input",{id:"lc-mcp-timeout",inputMode:"numeric",value:e.value,placeholder:"Seconds \u2014 blank for the default",onChange:t=>e.onChange(t.target.value),style:{...E(),...e.error!==void 0?{borderColor:s.error}:{}}}),(0,se.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:"Applies to each call, not to the session. Raise it for a server that queries something large; a call that exceeds it is cancelled and the error names this number."}),e.error!==void 0&&(0,se.jsx)("span",{style:on(),children:e.error})]})}var Xa="var(--vscode-editor-font-family, monospace)",WU={ready:"var(--vscode-testing-iconPassed, #3fb950)",connecting:"var(--vscode-descriptionForeground)",idle:"var(--vscode-descriptionForeground)",disabled:"var(--vscode-descriptionForeground)",failed:"var(--vscode-errorForeground)"},dx=[{value:"always",label:"Always",title:"Run without asking, in this workspace"},{value:"ask",label:"Ask",title:"Ask for approval every time"},{value:"never",label:"Never",title:"Hide this tool from the model entirely"}];function YU(e){return(0,ae.jsx)("div",{style:{display:"flex",flexShrink:0},children:dx.map((t,n)=>{let r=t.value===e.value;return(0,ae.jsx)("button",{type:"button",title:t.title,onClick:()=>e.onChange(t.value),style:{padding:"1px 7px",fontFamily:G,fontSize:10,cursor:"pointer",background:r?s.accent:"transparent",color:r?s.buttonForeground:s.muted,border:`1px solid ${r?s.accent:s.border}`,borderLeftWidth:n===0?1:0,borderTopLeftRadius:n===0?3:0,borderBottomLeftRadius:n===0?3:0,borderTopRightRadius:n===dx.length-1?3:0,borderBottomRightRadius:n===dx.length-1?3:0},children:t.label},t.value)})})}var JU={ready:"ready",connecting:"starting\u2026",idle:"not started",disabled:"disabled",failed:"failed"};function XU(e){let{server:t}=e,[n,r]=(0,Ln.useState)(!1),[i,o]=(0,Ln.useState)(!1),a=t.status==="ready"||t.status==="connecting";return(0,ae.jsxs)("div",{style:{borderBottom:`1px solid ${s.border}`,padding:"6px 0"},children:[(0,ae.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,ae.jsx)("button",{type:"button",onClick:()=>r(!n),style:{background:"transparent",border:"none",color:s.muted,cursor:"pointer",padding:0,width:14},"aria-label":n?"Collapse":"Expand",children:n?"\u25BE":"\u25B8"}),(0,ae.jsx)("span",{style:{color:WU[t.status],fontSize:10},children:"\u25CF"}),(0,ae.jsx)("strong",{style:{fontFamily:Xa,fontSize:12},children:t.name}),(0,ae.jsxs)("span",{style:{color:s.muted,fontSize:11},children:[e.transport," \xB7 ",JU[t.status],t.status==="ready"&&` \xB7 ${t.tools.length} tool${t.tools.length===1?"":"s"}`]}),(0,ae.jsxs)("label",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:4,fontSize:11,cursor:"pointer"},title:"Disabling removes this server's tools from the model entirely",children:[(0,ae.jsx)("input",{type:"checkbox",checked:t.enabled,onChange:l=>e.onSetServerEnabled(t.name,l.target.checked)}),"Enabled"]}),t.enabled&&!a&&(0,ae.jsx)("button",{type:"button",style:_(),onClick:()=>e.onConnect(t.name),children:"Connect"}),a&&(0,ae.jsx)("button",{type:"button",style:_(),onClick:()=>e.onRestart(t.name),children:"Restart"}),(0,ae.jsx)("button",{type:"button",style:_(),onClick:()=>e.onEdit(t.name),children:"Edit"}),(0,ae.jsx)("button",{type:"button","aria-label":`Duplicate ${t.name}`,title:"Duplicate this server. The copy starts disabled so you can edit it first.",style:Ce("ghost"),onClick:()=>e.onDuplicate(t.name),children:(0,ae.jsx)(Pr,{})}),(0,ae.jsx)("button",{type:"button","aria-label":`Delete ${t.name}`,title:"Remove this server",style:Ce("ghost"),onClick:()=>e.onDelete(t.name),children:(0,ae.jsx)(Wt,{})})]}),t.error!==void 0&&(0,ae.jsx)("div",{style:on(),children:t.error}),e.warnings.map(l=>(0,ae.jsxs)("div",{style:{color:s.muted,fontSize:11,marginTop:4},children:["\u26A0 ",l]},l)),t.logs.length>0&&(0,ae.jsxs)("div",{style:{marginTop:4,paddingLeft:22},children:[(0,ae.jsxs)("button",{type:"button",onClick:()=>o(!i),style:{background:"transparent",border:"none",color:s.muted,cursor:"pointer",padding:0,fontFamily:G,fontSize:11},children:[i?"\u25BE":"\u25B8"," Log (",t.logs.length,")"]}),i&&(0,ae.jsx)("pre",{style:{margin:"4px 0 0",padding:6,maxHeight:160,overflow:"auto",background:s.inputBackground,border:`1px solid ${s.border}`,borderRadius:3,fontFamily:Xa,fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:t.logs.join(`
|
|
101
|
-
`)})]}),n&&(0,ae.jsx)("div",{style:{marginTop:6,paddingLeft:22},children:t.tools.length===0?(0,ae.jsx)("p",{style:{color:s.muted,fontSize:11,margin:0},children:t.enabled?"No tools discovered yet \u2014 press Connect, or they load on first use.":"Enable this server to see its tools."}):t.tools.map(l=>(0,ae.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"3px 0"},children:[(0,ae.jsxs)("span",{style:{flex:1,minWidth:0},children:[(0,ae.jsx)("span",{style:{fontFamily:Xa,fontSize:12},children:l.name}),l.description.length>0&&(0,ae.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:l.description,children:l.description})]}),(0,ae.jsx)(KU,{value:l.timeout,onChange:c=>e.onSetToolTimeout(t.name,l.name,c)}),(0,ae.jsx)(YU,{value:l.permission,onChange:c=>e.onSetToolPermission(t.name,l.name,c)})]},l.name))})]})}function fx(e){let[t,n]=(0,Ln.useState)(e.json),[r,i]=(0,Ln.useState)(!1),[o,a]=(0,Ln.useState)(void 0),[l,c]=(0,Ln.useState)(void 0),[u,d]=(0,Ln.useState)(!1);return(0,Ln.useEffect)(()=>{n(e.json)},[e.json]),(0,Ln.useEffect)(()=>{u&&(d(!1),a(void 0))},[e.savedTick]),o!==void 0?(0,ae.jsx)(Jz,{initialName:o,initialConfig:e.configs[o],existingNames:e.servers.map(m=>m.name),platform:e.platform,saving:u,probe:e.pythonProbe,onDetect:e.onDetectPython,onBrowse:e.onBrowse,pickedPath:e.pickedPath,onSave:(m,h,f)=>{d(!0),e.onSaveServer(m,h,f)},onCancel:()=>a(void 0)}):(0,ae.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G},children:[(0,ae.jsx)("h3",{style:{margin:"0 0 4px",color:s.foreground},children:"MCP Servers"}),(0,ae.jsxs)("p",{style:{color:s.muted,fontSize:11,marginTop:0},children:["Uses the standard ",(0,ae.jsx)("code",{style:{fontFamily:Xa},children:"mcpServers"})," shape, so a config from another MCP client can be pasted in unchanged."]}),e.docsIndex!==void 0&&(0,ae.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",margin:"0 0 12px"},children:[(0,ae.jsx)("button",{type:"button",style:_(),disabled:!e.docsIndex.enabled||e.docsIndex.indexing||!e.docsIndex.ready,title:e.docsIndex.enabled?e.docsIndex.ready?"Reindexes tool documentation so a newly added server is findable now":"Set an embedding model under Search to index by meaning":"Looking tools up on demand is switched off under Search",onClick:e.onIndexDocs,children:e.docsIndex.indexing?"Indexing\u2026":"Index tool documentation"}),(0,ae.jsx)("span",{style:{color:s.muted,fontSize:11},children:e.docsIndex.result??"Runs on its own a few seconds after a server connects. This does it now."})]}),(0,ae.jsx)(ki,{progress:e.indexProgress,onStop:e.onStopIndexing}),e.servers.length===0?(0,ae.jsx)("p",{style:{color:s.muted,fontSize:12},children:"No servers configured yet."}):e.servers.map(m=>(0,ae.jsxs)("div",{children:[(0,ae.jsx)(XU,{server:m,transport:e.configs[m.name]!==void 0&&"url"in e.configs[m.name]?"HTTP":"stdio",warnings:e.warnings[m.name]??[],onRestart:e.onRestart,onConnect:e.onConnect,onSetServerEnabled:e.onSetServerEnabled,onSetToolPermission:e.onSetToolPermission,onSetToolTimeout:e.onSetToolTimeout,onEdit:a,onDelete:c,onDuplicate:e.onDuplicateServer}),l===m.name&&(0,ae.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 0 6px 22px",fontSize:12},children:[(0,ae.jsxs)("span",{children:["Remove ",m.name,"?"]}),(0,ae.jsx)("button",{type:"button",style:_(),onClick:()=>{e.onDeleteServer(m.name),c(void 0)},children:"Remove"}),(0,ae.jsx)("button",{type:"button",style:_(),onClick:()=>c(void 0),children:"Keep"})]})]},m.name)),(0,ae.jsxs)("div",{style:{display:"flex",gap:8,marginTop:16},children:[(0,ae.jsx)("button",{type:"button",style:oe(!1),onClick:()=>a(""),children:"Add server"}),(0,ae.jsx)("button",{type:"button",style:_(),title:"Edit every server as raw JSON \u2014 for pasting a config from another client",onClick:()=>i(!r),children:r?"Hide JSON":"Edit as JSON"})]}),r&&(0,ae.jsxs)("div",{style:{marginTop:10},children:[(0,ae.jsx)("label",{htmlFor:"lc-mcp-json",style:I(),children:"Configuration"}),(0,ae.jsx)("textarea",{id:"lc-mcp-json",value:t,spellCheck:!1,rows:14,onChange:m=>n(m.target.value),style:{width:"100%",boxSizing:"border-box",background:s.inputBackground,color:s.inputForeground,border:`1px solid ${e.saveError!==void 0?s.error:s.inputBorder}`,borderRadius:2,padding:"6px 8px",fontFamily:Xa,fontSize:12,resize:"vertical"}}),e.saveError!==void 0&&(0,ae.jsx)("span",{style:on(),children:e.saveError}),(0,ae.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8},children:[(0,ae.jsx)("button",{type:"button",style:oe(!1),onClick:()=>e.onSave(t),children:"Save"}),(0,ae.jsx)("button",{type:"button",style:_(),onClick:()=>n(e.json),children:"Revert"})]}),(0,ae.jsxs)("p",{style:{color:s.muted,fontSize:11,marginTop:12},children:["Secrets: use ",(0,ae.jsx)("code",{style:{fontFamily:Xa},children:"${secret:NAME}"})," in an env value or header. The value is read from secret storage at launch and never written to the config file."]})]})]})}function KU(e){let[t,n]=(0,Ln.useState)(e.value===void 0?"":String(e.value));return(0,Ln.useEffect)(()=>n(e.value===void 0?"":String(e.value)),[e.value]),(0,ae.jsx)("input",{inputMode:"numeric",value:t,placeholder:"server",title:"Seconds this tool may take. Blank uses the server's timeout. Raise it for one slow tool rather than raising the server's.","aria-label":"Timeout in seconds",onChange:i=>n(i.target.value),onBlur:()=>{let i=t.trim();if(i.length===0){e.onChange();return}let o=Number(i);if(!Number.isFinite(o)||o<=0||o>3600){n(e.value===void 0?"":String(e.value));return}e.onChange(Math.round(o))},onKeyDown:i=>{i.key==="Enter"&&i.currentTarget.blur()},style:{width:62,flexShrink:0,background:s.inputBackground,color:s.inputForeground,border:`1px solid ${s.inputBorder}`,borderRadius:2,padding:"1px 4px",fontFamily:G,fontSize:11,textAlign:"right"}})}var Q=U(re(),1),Li=U(pe(),1);var mx=U(re(),1);function Bi(e){return e.ignored===!0?(0,mx.jsx)("span",{style:st("warning"),children:"Ignored (user-scope only)"}):(0,mx.jsx)("span",{style:st("neutral"),children:e.scope==="user"?"User":"Workspace"})}var Xz="var(--vscode-editor-font-family, monospace)",hx="__none__",px="__cli__";function Qz(e){let[t,n]=(0,Li.useState)(void 0),[r,i]=(0,Li.useState)(""),[o,a]=(0,Li.useState)(void 0),[l,c]=(0,Li.useState)(!1),[u,d]=(0,Li.useState)({id:"",name:"",summary:"",prompt:"",usesTools:!0,canWrite:!1}),m=e.roles.filter(y=>y.custom===!0).length,h=m<e.customRoleLimit,[f,v]=(0,Li.useState)(e.teamGuidance),[k,D]=(0,Li.useState)(!1);(0,Li.useEffect)(()=>{v(e.teamGuidance)},[e.teamGuidance]);let p=e.roles.filter(y=>y.kind!==void 0).length;function b(y){return y.kind==="cli"?px:y.kind==="profile"&&y.profileId!==void 0?y.profileId:hx}function S(){return[{value:hx,label:"Nobody \u2014 this specialist is not offered"},...e.cliAvailable?[{value:px,label:"Claude (command line)"}]:[],...e.profiles.map(y=>({value:y.id,label:y.label}))]}return(0,Q.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G,fontSize:13,color:s.foreground},children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,Q.jsx)("h3",{style:{margin:0},children:"Agents"}),(0,Q.jsx)(Bi,{scope:"user"})]}),(0,Q.jsx)("p",{style:{color:s.muted,fontSize:12,margin:"0 0 12px",lineHeight:1.5},children:"Specialists your assistant can consult while it works \u2014 to plan something hard, review what it just wrote, or say what would break it. Assign a model to a role and it becomes available; leave one as Nobody and it is simply not offered."}),e.cliAvailable?(0,Q.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 12px"},children:"Claude was found on this machine and is the default expert. You can put any model in that seat instead."}):e.cliReason!==void 0&&(0,Q.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 12px"},children:["Claude was not found (",e.cliReason,") \u2014 any configured provider can take these roles."]}),e.profiles.length===0&&(0,Q.jsx)("p",{style:{color:s.error,fontSize:11,margin:"0 0 12px"},children:"No providers are configured yet. Add one in the Providers tab and it can take a role here."}),e.roles.map(y=>(0,Q.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderLeft:`3px solid ${e.colors[y.role]??s.border}`,borderRadius:3,padding:"8px 10px",marginBottom:8,...y.enabled?{}:{opacity:.55}},children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,Q.jsx)("input",{type:"checkbox","aria-label":`${y.name} enabled`,title:y.enabled?`Stop using the ${y.name.toLowerCase()}, keeping its settings`:`Use the ${y.name.toLowerCase()} again`,checked:y.enabled,onChange:T=>e.onSetRoleEnabled(y.role,T.target.checked)}),(0,Q.jsx)("strong",{style:{fontSize:12,...y.enabled?{}:{color:s.muted}},children:y.name}),!y.enabled&&(0,Q.jsx)("span",{style:{color:s.muted,border:`1px solid ${s.border}`,borderRadius:999,padding:"0 6px",fontSize:10,lineHeight:"15px"},children:"off"}),(0,Q.jsxs)("span",{style:{color:s.muted,fontSize:11,flex:1},children:[y.summary,!y.promptIsDefault&&" \xB7 prompt edited"]}),(0,Q.jsx)("button",{type:"button",style:_(),"aria-label":`Edit the ${y.name} prompt`,title:"What this specialist is told it is",onClick:()=>{n(t===y.role?void 0:y.role),i(y.prompt)},children:"Prompt"}),y.custom===!0&&(0,Q.jsx)("button",{type:"button",style:_(),"aria-label":`Delete the ${y.name} role`,title:"Remove this role and its assignment",onClick:()=>{o===y.role?e.onDeleteCustomRole(y.role):a(y.role)},children:o===y.role?"Really delete?":"Delete"})]}),(0,Q.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,Q.jsx)("div",{style:{width:150},children:(0,Q.jsx)(ze,{compact:!0,ariaLabel:`${y.name} thinking`,title:"How hard this specialist should think. Only sent if the profile is set up for it.",value:y.thinking??"",onChange:T=>e.onSetRoleThinking(y.role,T===""?void 0:T),options:[{value:"",label:"Profile default"},{value:"off",label:"Thinking: off"},{value:"low",label:"Thinking: low"},{value:"medium",label:"Thinking: medium"},{value:"high",label:"Thinking: high"}]})}),(0,Q.jsx)("div",{style:{flex:1},children:(0,Q.jsx)(ze,{value:b(y),onChange:T=>e.onAssign(y.role,T===hx?void 0:T===px?{kind:"cli"}:{kind:"profile",profileId:T}),options:S()})})]}),(0,Q.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,marginTop:6,fontSize:11,color:s.muted},children:[(0,Q.jsx)("input",{type:"checkbox","aria-label":`${y.name} can read the workspace`,checked:y.usesTools,onChange:T=>e.onSetRoleTools(y.role,T.target.checked)}),"Can read and search the workspace"]}),(0,Q.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,marginTop:4,fontSize:11,color:s.muted},children:[(0,Q.jsx)("input",{type:"checkbox","aria-label":`${y.name} can change things`,checked:y.canWrite,onChange:T=>e.onSetRoleWrite(y.role,T.target.checked)}),"Can edit files and record skills \u2014 you approve each change"]}),y.kind!==void 0&&!y.available&&(0,Q.jsx)("p",{style:{color:s.error,fontSize:11,margin:"6px 0 0"},children:y.reason??"This specialist cannot be reached."}),t===y.role&&(0,Q.jsxs)("div",{style:{marginTop:8},children:[(0,Q.jsxs)("span",{style:I(),children:["What the ",y.name.toLowerCase()," is told"]}),(0,Q.jsx)("textarea",{value:r,spellCheck:!1,rows:14,onChange:T=>i(T.target.value),style:{...E(),fontFamily:Xz,width:"100%",resize:"vertical"}}),(0,Q.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"4px 0 6px",lineHeight:1.5},children:"A role is mostly its prompt \u2014 the difference between a useful reviewer and a flattering one is a few sentences about what to look for. Edit it to suit this codebase."}),(0,Q.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,Q.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{e.onSetPrompt(y.role,r),n(void 0)},children:"Save prompt"}),(0,Q.jsx)("button",{type:"button",style:_(),disabled:y.promptIsDefault,onClick:()=>{e.onSetPrompt(y.role,void 0),n(void 0)},children:"Reset to default"}),(0,Q.jsx)("button",{type:"button",style:_(),onClick:()=>n(void 0),children:"Cancel"})]})]})]},y.role)),l?(0,Q.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:3,padding:"8px 10px",marginBottom:8},children:[(0,Q.jsx)("span",{style:I(),children:"Name"}),(0,Q.jsx)("input",{value:u.name,placeholder:"Security reviewer",style:{...E(),width:"100%"},onChange:y=>{let T=y.target.value;d(M=>({...M,name:T,id:M.id.length===0||M.id===Kz(M.name)?Kz(T):M.id}))}}),(0,Q.jsx)("span",{style:I(),children:"Id"}),(0,Q.jsx)("input",{value:u.id,placeholder:"security",style:{...E(),width:"100%"},onChange:y=>d(T=>({...T,id:y.target.value}))}),(0,Q.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"2px 0 0"},children:["What the assistant types to reach it (",(0,Q.jsxs)("code",{children:["ask_agent ",u.id||"security"]}),"). Lowercase letters, digits and hyphens. It cannot be changed later."]}),(0,Q.jsx)("span",{style:I(),children:"What it is for"}),(0,Q.jsx)("input",{value:u.summary,placeholder:"Threat model and attack surface",style:{...E(),width:"100%"},onChange:y=>d(T=>({...T,summary:y.target.value}))}),(0,Q.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"2px 0 0"},children:"One line. Every specialist sees it on the roster, and it is what the expert allocates from when it writes a plan."}),(0,Q.jsx)("span",{style:I(),children:"What it is told"}),(0,Q.jsx)("textarea",{value:u.prompt,rows:8,spellCheck:!1,placeholder:"You review changes for security. Look for what the code trusts, where untrusted input reaches a decision, and what an attacker controls...",style:{...E(),width:"100%",resize:"vertical"},onChange:y=>d(T=>({...T,prompt:y.target.value}))}),(0,Q.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"2px 0 0"},children:"Its system prompt. What it may and may not do is added automatically, so it cannot be left out by accident."}),(0,Q.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,marginTop:6,fontSize:11,color:s.muted},children:[(0,Q.jsx)("input",{type:"checkbox",checked:u.usesTools,onChange:y=>d(T=>({...T,usesTools:y.target.checked}))}),"Can read and search the workspace"]}),(0,Q.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,marginTop:4,fontSize:11,color:s.muted},children:[(0,Q.jsx)("input",{type:"checkbox",checked:u.canWrite,onChange:y=>d(T=>({...T,canWrite:y.target.checked}))}),"Can edit files and record skills \u2014 you approve each change"]}),(0,Q.jsxs)("div",{style:{display:"flex",gap:6,marginTop:8,alignItems:"center"},children:[(0,Q.jsx)("button",{type:"button",style:oe(u.name.trim().length===0),disabled:u.name.trim().length===0,onClick:()=>{e.onSaveCustomRole({...u,id:u.id.trim().toLowerCase()}),c(!1),d({id:"",name:"",summary:"",prompt:"",usesTools:!0,canWrite:!1})},children:"Add role"}),(0,Q.jsx)("button",{type:"button",style:_(),onClick:()=>c(!1),children:"Cancel"}),(0,Q.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Assign a model to it once it exists."})]})]}):(0,Q.jsxs)("button",{type:"button",style:_(),disabled:!h,title:h?"Invent a role of your own":`The limit is ${String(e.customRoleLimit)} custom roles.`,onClick:()=>c(!0),children:["Add a role",m>0&&(0,Q.jsxs)("span",{style:{color:s.muted},children:[" ","(",m,"/",e.customRoleLimit,")"]})]}),e.fitPanel,(e.claudeSeated||e.budgetMatters)&&(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,cursor:"pointer",margin:"12px 0"},children:[(0,Q.jsx)("input",{type:"checkbox","aria-label":"What consultations cost is worth managing",checked:e.budgetMatters,onChange:y=>e.onSetBudget(y.target.checked)}),(0,Q.jsx)("span",{style:{fontSize:12},children:"What consultations cost is worth managing"})]}),(0,Q.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"-6px 0 12px",lineHeight:1.5},children:"Only a Claude consultation reports a price. A gateway bills somewhere this cannot see, so with this off there is no budget to show \u2014 a cap over something nobody is counting would look like protection without being any."}),e.budgetMatters&&e.budgetPanel]}),(0,Q.jsxs)("div",{style:{paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,Q.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,Q.jsx)("strong",{style:{fontSize:12},children:"When to consult"}),(0,Q.jsxs)("span",{style:{color:s.muted,fontSize:11,flex:1},children:["Used in Agent team mode",e.teamGuidanceIsDefault?"":" \xB7 edited"]}),(0,Q.jsx)("button",{type:"button",style:_(),onClick:()=>D(!k),children:k?"Hide":"Edit"})]}),(0,Q.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"6px 0 0",lineHeight:1.5},children:"The assistant consults specialists on its own, without being asked. This is the judgement it uses about when that is worth a round trip \u2014 which differs between a prototype and a payments system, so it is yours to change. The list of who exists is added automatically; you are editing the advice, not the roster."}),k&&(0,Q.jsxs)("div",{style:{marginTop:8},children:[(0,Q.jsx)("textarea",{value:f,spellCheck:!1,rows:18,"aria-label":"When to consult",onChange:y=>v(y.target.value),style:{...E(),fontFamily:Xz,width:"100%",resize:"vertical"}}),(0,Q.jsxs)("div",{style:{display:"flex",gap:8,marginTop:6},children:[(0,Q.jsx)("button",{type:"button",style:oe(!1),onClick:()=>e.onSetTeamGuidance(f),children:"Save"}),(0,Q.jsx)("button",{type:"button",style:_(),disabled:e.teamGuidanceIsDefault,onClick:()=>{v(e.defaultTeamGuidance),e.onSetTeamGuidance(void 0)},children:"Reset to default"})]})]})]}),p===0&&(0,Q.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:12,lineHeight:1.5},children:"Nobody is assigned, so Agent team mode has nobody to consult and behaves like Code. Give at least one role a model above."})]})}function Kz(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"").slice(0,24)}var he=U(re(),1),lr=U(pe(),1);var Le=U(re(),1),t2=U(pe(),1);function n2(e){let[t,n]=(0,t2.useState)(!1),r=e.savings;if(r===void 0)return null;let i=r.allTime.consultations===0&&r.allTime.juniorTurns===0;return(0,Le.jsxs)("div",{style:{margin:"16px 0 0",padding:12,borderRadius:6,border:`1px solid ${s.accent}`,background:`color-mix(in srgb, ${s.accent} 10%, transparent)`},children:[(0,Le.jsx)("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:"Junior mode"}),(0,Le.jsx)("div",{style:{color:s.muted,fontSize:11,marginBottom:10},children:i?"Nothing recorded yet. This fills in as you work in Junior mode \u2014 one entry per turn the cheap model handles alone, and one per consultation.":r.measured?"A floor, not an estimate \u2014 every figure below is at least this much.":"Counted, but not yet priced. Measure a consultation above to see this in money."}),(0,Le.jsxs)("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[(0,Le.jsx)(gx,{label:"Today",window:r.today,measured:r.measured}),(0,Le.jsx)(gx,{label:"Last 30 days",window:r.last30Days,measured:r.measured}),(0,Le.jsx)(gx,{label:"All time",window:r.allTime,measured:r.measured})]}),(0,Le.jsx)("button",{type:"button",onClick:()=>n(o=>!o),style:{marginTop:10,padding:0,background:"none",border:"none",color:s.accent,cursor:"pointer",font:"inherit",fontSize:11,textDecoration:"underline"},children:t?"Hide how this is worked out":"How is this worked out?"}),t&&(0,Le.jsx)(QU,{savings:r}),i&&(0,Le.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"8px 0 0"},children:["Switch the mode selector in the chat header to ",(0,Le.jsx)("strong",{children:"Junior"})," to start. Turns taken before this version was installed were never recorded, so the count begins now."]})]})}function gx(e){let{window:t}=e;return(0,Le.jsxs)("div",{style:{flex:"1 1 140px",minWidth:140,padding:"8px 10px",borderRadius:4,background:s.inputBackground,border:`1px solid ${s.border}`},children:[(0,Le.jsx)("div",{style:{color:s.muted,fontSize:11},children:e.label}),(0,Le.jsx)("div",{style:{fontSize:18,fontWeight:600,color:s.accent,lineHeight:1.3},children:e.measured&&t.avoidedUsd!==void 0?`\u2265 ${e2(t.avoidedUsd)}`:"\u2014"}),(0,Le.jsx)("div",{style:{color:s.muted,fontSize:11},children:"avoided"}),(0,Le.jsxs)("div",{style:{color:s.muted,fontSize:11,marginTop:4},children:["Spent ",e2(t.spentUsd),t.unpriced>0&&` + ${String(t.unpriced)} unpriced`]}),(0,Le.jsxs)("div",{style:{color:s.muted,fontSize:11},children:[sf(t.juniorTurns,"junior turn"),", ",sf(t.consultations,"consultation"),t.overheadCalls>0&&` + ${String(t.overheadCalls)} upkeep`]})]})}function QU(e){let t=e.savings.allTime;return(0,Le.jsxs)("div",{style:{color:s.muted,fontSize:11,marginTop:8,lineHeight:1.55},children:[(0,Le.jsx)("p",{style:{margin:"0 0 6px"},children:"Two things are counted, and both are priced from the measurement taken on this machine \u2014 never from published rates."}),(0,Le.jsxs)("ol",{style:{margin:"0 0 6px",paddingLeft:18},children:[(0,Le.jsxs)("li",{children:[(0,Le.jsx)("strong",{children:"Turns the expert never saw."})," Every turn the cheap model handled alone is one the expert would otherwise have taken. Each is priced at the cost of a"," ",(0,Le.jsx)("em",{children:"minimal"})," resumed consultation, which is the cheapest an expert turn can possibly be \u2014 so real work would have cost more. All time: ",sf(t.juniorTurns,"turn"),"."]}),(0,Le.jsxs)("li",{children:[(0,Le.jsx)("strong",{children:"Cold starts avoided."})," A consultation that resumed a live session instead of starting a new one saved the difference between the two measured prices. All time:"," ",sf(t.consultations,"consultation"),", of which the resumed ones count."]})]}),(0,Le.jsxs)("p",{style:{margin:"0 0 6px"},children:[(0,Le.jsx)("strong",{children:"What is deliberately not counted:"})," what the strong model would have charged to do the work itself. Nothing here can know that, so no multiplier is applied \u2014 which is why the total is a floor and says ",(0,Le.jsx)("em",{children:"at least"}),". The real saving is larger by an amount this panel refuses to guess at."]}),(0,Le.jsx)("p",{style:{margin:0},children:"Consultations the plan reported no price for are counted separately rather than as zero, so a total never looks exact while being incomplete. Events older than a year are dropped."})]})}function e2(e){return e===0?"$0":e<.1?`$${e.toFixed(4)}`:`$${e.toFixed(2)}`}function sf(e,t){return`${String(e)} ${t}${e===1?"":"s"}`}var yx="__custom__",vx=[{value:"",label:"The CLI's own default"},{value:"opus",label:"Opus \u2014 strongest, most expensive"},{value:"sonnet",label:"Sonnet \u2014 balanced"},{value:"haiku",label:"Haiku \u2014 fastest and cheapest"}];function i2(e){let[t,n]=(0,lr.useState)(e.expert?.enabled??!1),[r,i]=(0,lr.useState)(e.expert?.path??"claude"),[o,a]=(0,lr.useState)(e.expert?.model??""),[l,c]=(0,lr.useState)(String(e.expert?.maxSpendUsd??0)),[u,d]=(0,lr.useState)(String(e.expert?.maxConsultations??0));(0,lr.useEffect)(()=>{e.expert!==void 0&&(n(e.expert.enabled),i(e.expert.path),a(e.expert.model??""),c(String(e.expert.maxSpendUsd)),d(String(e.expert.maxConsultations)))},[e.expert]),(0,lr.useEffect)(()=>{e.pickedPath?.purpose==="expert.path"&&i(e.pickedPath.path)},[e.pickedPath]);let m=f=>{let v=Number(f.trim());return Number.isFinite(v)&&v>0?v:0},h=e.expert?.available===!0;return(0,he.jsxs)("div",{style:{padding:12,overflowY:"auto"},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,he.jsx)("h3",{style:{margin:0,color:s.foreground},children:"Expert"}),(0,he.jsx)(Bi,{scope:"user"})]}),(0,he.jsx)("p",{style:{color:s.muted,fontSize:12,fontFamily:G,margin:"0 0 12px"},children:"Lets your everyday model consult Claude on hard problems \u2014 planning a change across several files, diagnosing a bug it has already failed to fix, or weighing two designs. It decides when the question is worth it, and each consultation appears in the transcript with what it cost."}),(0,he.jsxs)("div",{style:{padding:8,marginBottom:12,borderRadius:3,border:`1px solid ${h?s.border:s.error}`},children:[(0,he.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,he.jsx)("div",{style:{fontSize:12,color:h?s.foreground:s.error},children:e.expert===void 0?"Checking\u2026":h?`Found: ${e.expert.version??e.expert.path}`:"Claude CLI not found"}),(0,he.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",marginLeft:"auto"},title:"Look for the Claude CLI again",onClick:e.onRecheck,children:"Re-check"})]}),e.expert!==void 0&&!h&&(0,he.jsx)("div",{style:{fontSize:11,color:s.muted,marginTop:4},children:e.expert.reason??"Install it with: npm install -g @anthropic-ai/claude-code"})]}),(0,he.jsxs)("label",{style:{display:"flex",alignItems:"flex-start",gap:6,marginBottom:12,fontSize:12},children:[(0,he.jsx)("input",{type:"checkbox",style:{marginTop:2},checked:t,onChange:f=>n(f.target.checked)}),(0,he.jsxs)("span",{style:{color:s.foreground},children:["Enable Claude as the expert",(0,he.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:2},children:"Consultations are billed to your Claude account at its usual rates. Off by default; nothing runs and nothing is spent until you turn this on."})]})]}),(0,he.jsx)(ln,{id:"lc-expert-path",label:"Command",value:r,placeholder:"claude",hint:"Found on PATH by default. If detection cannot find it, browse to the executable \u2014 on Windows that is usually claude.cmd in %APPDATA%\\npm.",browse:{purpose:"expert.path",kind:"file"},...e.onBrowse!==void 0?{onBrowse:e.onBrowse}:{},onChange:i}),(0,he.jsxs)("div",{style:{marginBottom:16},children:[(0,he.jsx)("label",{htmlFor:"lc-expert-model",style:I(),children:"Model (optional)"}),(0,he.jsx)(ze,{id:"lc-expert-model",value:vx.some(f=>f.value===o)?o:yx,onChange:f=>a(f===yx?"":f),style:{width:"100%",marginBottom:6},options:[...vx.map(f=>({value:f.value,label:f.label})),{value:yx,label:"Something else\u2026"}]}),!vx.some(f=>f.value===o)&&(0,he.jsx)("input",{type:"text",value:o,placeholder:"e.g. claude-sonnet-4-5-20250929",onChange:f=>a(f.target.value),style:E()}),(0,he.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Aliases track the newest release of that tier. A smaller model makes consultations cheaper, at some cost to their quality."})]}),(0,he.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:16},children:[(0,he.jsx)("label",{style:I(),children:"Budget per task"}),(0,he.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,he.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Stop after"}),(0,he.jsx)("input",{type:"number",min:"0",step:"0.25",value:l,onChange:f=>c(f.target.value),"aria-label":"Maximum spend per task in dollars",style:{...E(),width:90}}),(0,he.jsx)("span",{style:{color:s.muted,fontSize:11},children:"dollars, or"}),(0,he.jsx)("input",{type:"number",min:"0",step:"1",value:u,onChange:f=>d(f.target.value),"aria-label":"Maximum consultations per task",style:{...E(),width:70}}),(0,he.jsx)("span",{style:{color:s.muted,fontSize:11},children:"consultations \u2014 whichever comes first."})]}),(0,he.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",marginTop:10},children:[(0,he.jsx)("button",{type:"button",style:_(),disabled:e.expert?.available!==!0||e.expert.measuringStep!==void 0,onClick:e.onMeasureCost,children:e.expert?.measuringStep!==void 0?"Measuring\u2026":"Measure what a consultation costs"}),e.expert?.pricing!==void 0&&(0,he.jsx)("button",{type:"button",style:_(),onClick:e.onClearPricing,children:"Clear"})]}),e.expert?.measuringStep!==void 0&&(0,he.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"6px 0 0"},children:e.expert.measuringStep}),e.expert?.measuringStep===void 0&&e.expert?.pricing===void 0&&(0,he.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"6px 0 0"},children:["This makes ",(0,he.jsx)("strong",{children:"two real consultations"})," \u2014 one cold, one resumed \u2014 and costs what they cost. It is the only way to learn the price here, and the ratio between the two is what the budget advice depends on."]}),e.expert?.pricing!==void 0&&(0,he.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"6px 0 0"},children:[bb(e.expert.pricing)," ",(0,he.jsxs)("span",{style:{opacity:.75},children:["Measured ",new Date(e.expert.pricing.measuredAt).toLocaleDateString(),". The expert is told these numbers so it plans in them."]})]}),(0,he.jsx)(n2,{savings:e.expert?.savings}),(0,he.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",margin:"12px 0 0",cursor:e.expert?.available===!0?"pointer":"not-allowed",opacity:e.expert?.available===!0?1:.55},children:[(0,he.jsx)("input",{type:"checkbox",checked:e.expert?.keepAlive===!0,disabled:e.expert?.available!==!0,onChange:f=>e.onSetKeepAlive(f.target.checked),style:{marginTop:2}}),(0,he.jsxs)("span",{children:[(0,he.jsx)("span",{style:{display:"block",fontSize:13},children:"Keep the session warm during a task"}),(0,he.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:["The expert\u2019s cache lasts an hour, so a long break means the next consultation pays full price again. This sends one trivial consultation every fifty minutes while a task has a session open \u2014 roughly a fiftieth of the cold start it avoids."," ",(0,he.jsx)("strong",{children:"It spends while you are away"}),", so it is counted in the meter like anything else. It never starts a session, and stops when the budget is spent or the task ends."]})]})]}),e.expert?.reportsCost===!1&&(0,he.jsxs)("p",{style:{color:s.error,fontSize:11,margin:"6px 0 0"},children:[(0,he.jsx)("strong",{children:"Your plan does not report a cost per consultation"}),", so the spending limit above can never be reached \u2014 the running total stays at zero. Use the consultation limit instead; it is checked first and works on any plan."]}),e.expert!==void 0&&e.expert.reportsCost===void 0&&(0,he.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"6px 0 0"},children:"Whether the spending limit can apply depends on your plan reporting a cost. That is settled by the first consultation, and this will say so once it has."}),(0,he.jsx)("span",{style:{color:s.muted,fontSize:11},children:"0 means no limit. When a limit is reached the expert stops being offered for that task and the assistant carries on alone; starting a new task resets it. A count limit is worth setting even if you set a spend limit, because the CLI does not always report a price and an unpriced consultation still costs money."})]}),(0,he.jsxs)("div",{style:{padding:8,marginBottom:16,borderRadius:3,border:`1px solid ${s.border}`,color:s.muted,fontSize:11},children:[(0,he.jsx)("strong",{style:{color:s.foreground},children:"What the expert may do:"})," read and search this workspace, so it can gather its own context. It cannot edit files or run commands. Every change still goes through Light Code\u2019s own tools and your approval, so nothing reaches your repository without passing the usual prompt."]}),(0,he.jsx)("button",{type:"button",style:oe(!1),onClick:()=>e.onSave(t,r.trim(),o.trim(),{maxSpendUsd:m(l),maxConsultations:Math.round(m(u))}),children:"Save"})]})}var Ee=U(re(),1),cf=U(pe(),1);var r2="var(--vscode-editor-font-family, monospace)";function o2(e){let[t,n]=(0,cf.useState)(""),[r,i]=(0,cf.useState)(!1),o=e.assessor?.available===!0&&!e.assessing;return(0,Ee.jsxs)("div",{style:{marginBottom:16,border:`1px solid ${s.border}`,borderRadius:3,padding:8},children:[(0,Ee.jsx)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:(0,Ee.jsx)("strong",{style:{fontSize:12,color:s.foreground},children:"Which model suits which seat"})}),(0,Ee.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"6px 0 8px",lineHeight:1.5},children:"A model answers five short probes and whoever is in the expert seat grades the actual answers \u2014 not the model\u2019s name, which would be a recollection rather than a measurement, and which says nothing about the gateway in front of it. Assess several and compare them."}),(0,Ee.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,Ee.jsx)("div",{style:{minWidth:180,flex:1},children:(0,Ee.jsx)(ze,{compact:!0,ariaLabel:"Model to assess",value:t,onChange:n,options:[{value:"",label:"The model in the chat"},...e.profiles.map(a=>({value:a.id,label:a.label}))]})}),(0,Ee.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"2px 8px"},disabled:!o,title:e.assessor?.available===!0?`Puts five short questions to that model, then has ${e.assessor.label} grade the answers.`:"Assign somebody to the expert seat first \u2014 the assessment is its judgement, not ours.",onClick:()=>e.onAssess(t===""?void 0:t),children:"Assess it"})]}),e.assessor!==void 0&&(0,Ee.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"6px 0 0"},children:["Graded by ",(0,Ee.jsx)("strong",{children:e.assessor.label}),e.assessor.available?"":" \u2014 which is not available","."]}),e.assessing&&(0,Ee.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"6px 0 0"},children:e.step??"Working\u2026"}),e.assessments.map(a=>(0,Ee.jsx)(eR,{assessment:a,onClear:()=>e.onClear(a.model,a.profileLabel)},`${a.profileLabel}:${a.model}`)),(0,Ee.jsxs)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",marginTop:10},onClick:()=>i(a=>!a),children:[r?"Hide":"Show"," what each seat needs"]}),r&&(0,Ee.jsxs)("div",{style:{marginTop:8},children:[e.seatFits.map(a=>(0,Ee.jsxs)("div",{style:{marginTop:8,fontSize:11},children:[(0,Ee.jsxs)("div",{style:{color:s.foreground},children:[(0,Ee.jsx)("strong",{children:a.name})," ",(0,Ee.jsxs)("span",{style:{color:s.muted},children:["\xB7 read ",a.probes.join(", ")]})]}),(0,Ee.jsx)("div",{style:{color:s.muted,lineHeight:1.5},children:a.lookFor})]},a.role)),(0,Ee.jsxs)("div",{style:{marginTop:8,fontSize:11},children:[(0,Ee.jsxs)("div",{style:{color:s.foreground},children:[(0,Ee.jsx)("strong",{children:"Expert"})," ",(0,Ee.jsx)("span",{style:{color:s.muted},children:"\xB7 no probe predicts this"})]}),(0,Ee.jsx)("div",{style:{color:s.muted,lineHeight:1.5},children:e.expertGuidance})]}),(0,Ee.jsx)("div",{style:{marginTop:8,fontSize:11,color:s.muted,lineHeight:1.5},children:"Whatever the answers say, do not put the same model in the programmer and reviewer seats. A model reviewing its own work agrees with itself."})]})]})}function eR(e){let[t,n]=(0,cf.useState)(!1),{assessment:r}=e;return(0,Ee.jsxs)("div",{style:{marginTop:10,paddingTop:8,borderTop:`1px solid ${s.border}`},children:[(0,Ee.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap",fontSize:11},children:[(0,Ee.jsx)("span",{style:{fontFamily:r2,color:s.foreground},children:r.model}),(0,Ee.jsxs)("span",{style:{color:s.muted},children:["via ",r.profileLabel," \xB7 ",new Date(r.assessedAt).toLocaleDateString(),r.costUsd!==void 0?` \xB7 $${r.costUsd.toFixed(4)}`:""]}),(0,Ee.jsx)("button",{type:"button","aria-label":`Forget the assessment of ${r.model}`,style:{..._(),fontSize:10,padding:"0 5px",marginLeft:"auto"},onClick:e.onClear,children:"Forget"})]}),(0,Ee.jsx)("div",{style:{whiteSpace:"pre-wrap",fontSize:11,color:s.foreground,marginTop:6,paddingLeft:8,borderLeft:`2px solid ${s.expert}`},children:r.verdict}),(0,Ee.jsxs)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",marginTop:6},onClick:()=>n(i=>!i),children:[t?"Hide":"Show"," what it answered (",r.probes.length,")"]}),t&&r.probes.map(i=>(0,Ee.jsxs)("div",{style:{marginTop:8,fontSize:11},children:[(0,Ee.jsxs)("div",{style:{color:s.foreground},children:[i.measures," ",(0,Ee.jsx)("span",{style:{...st("neutral"),fontSize:9},children:i.id})]}),(0,Ee.jsx)("pre",{style:{margin:"3px 0 0",padding:6,whiteSpace:"pre-wrap",fontFamily:r2,fontSize:10,color:i.error!==void 0?s.error:s.muted,background:s.inputBackground,borderRadius:3},children:i.error!==void 0?`No answer \u2014 ${i.error}`:i.answer.trim()||"(empty)"})]},i.id))]})}var W=U(re(),1),vn=U(pe(),1);var ne=U(re(),1);var Tn=U(pe(),1);var tR=[384,768,1024,1536,3072];function a2(e){let[t,n]=(0,Tn.useState)(""),[r,i]=(0,Tn.useState)(""),[o,a]=(0,Tn.useState)(""),[l,c]=(0,Tn.useState)(""),[u,d]=(0,Tn.useState)(""),[m,h]=(0,Tn.useState)(""),f=Uo(Db({embedder:e.embedder})),[v,k]=(0,Tn.useState)(!1),[D,p]=(0,Tn.useState)(!1),[b,S]=(0,Tn.useState)(!1);(0,Tn.useEffect)(()=>{n(e.embedder?.profileId??""),i(e.embedder?.model??""),a(e.embedder?.dimensions!==void 0?String(e.embedder.dimensions):""),c(e.embedder?.indexNameIsCustom===!0?e.embedder.indexName??"":""),d(e.embedder?.indexPrefix??""),h(f)},[e.embedder]);let y=Uo(Lr(m))!==f;(0,Tn.useEffect)(()=>{t.length>0&&e.onRequestModels(t)},[t]),(0,Tn.useEffect)(()=>{if(e.savedTick===0)return;S(!0);let F=setTimeout(()=>S(!1),3e3);return()=>clearTimeout(F)},[e.savedTick]);let T=e.progress!==void 0&&e.progress.phase!=="done",M=Number.parseInt(o,10),A=t.length>0&&r.trim().length>0&&Number.isFinite(M)&&M>0,w=e.profiles.find(F=>F.id===t),V=A&&e.connectionLabel!==void 0&&e.embedder?.indexName!==void 0;return(0,ne.jsxs)("div",{style:{paddingTop:12,borderTop:`1px solid ${s.border}`,marginTop:12},children:[(0,ne.jsx)("strong",{style:{fontSize:12,color:s.foreground},children:"Codebase indexing"}),(0,ne.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"4px 0 10px"},children:"Lets the model search this workspace by meaning rather than by exact text \u2014 useful when you do not know what something is called. Optional, and off until you index."}),(0,ne.jsxs)("div",{style:{marginBottom:10},children:[(0,ne.jsx)("label",{htmlFor:"lc-emb-profile",style:I(),children:"Embedding provider"}),(0,ne.jsx)(ze,{id:"lc-emb-profile",value:t,onChange:n,style:{width:"100%"},options:[{value:"",label:"Choose a provider profile\u2026"},...e.profiles.map(F=>({value:F.id,label:F.label}))]}),(0,ne.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:["Reuses an existing profile's URL, credentials and certificates \u2014 one place to get mutual TLS right instead of two.",w!==void 0&&` Requests go to ${w.baseUrl}.`]})]}),(0,ne.jsxs)("div",{style:{marginBottom:10},children:[(0,ne.jsx)("label",{htmlFor:"lc-emb-model",style:I(),children:"Embedding model"}),e.models.length>0&&(0,ne.jsx)(ze,{ariaLabel:"Available models",value:e.models.includes(r)?r:"",onChange:F=>{F.length>0&&i(F)},style:{width:"100%",marginBottom:4},options:[{value:"",label:`Choose from ${e.models.length} model(s)\u2026`},...e.models.map(F=>({value:F,label:F}))]}),(0,ne.jsx)("input",{id:"lc-emb-model",type:"text",value:r,spellCheck:!1,placeholder:"text-embedding-3-small",onChange:F=>i(F.target.value),style:E()}),(0,ne.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:[t.length===0?"Choose a provider above to see what it offers.":e.modelsLoading?"Fetching the model list\u2026":e.models.length===0?`No catalogue from this provider${e.modelsWarning!==void 0?` (${e.modelsWarning})`:""} \u2014 type the model name.`:"Pick one, or type a name the list does not include."," ","An embedding model, not a chat model."]})]}),(0,ne.jsxs)("div",{style:{marginBottom:10},children:[(0,ne.jsx)("label",{htmlFor:"lc-emb-dims",style:I(),children:"Vector width"}),(0,ne.jsx)("input",{id:"lc-emb-dims",type:"number",list:"lc-emb-dims-common",value:o,placeholder:"1536",onChange:F=>a(F.target.value),style:{...E(),width:160}}),(0,ne.jsx)("datalist",{id:"lc-emb-dims-common",children:tR.map(F=>(0,ne.jsx)("option",{value:F},F))}),(0,ne.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:"Must match what the model actually returns \u2014 OpenSearch fixes this when the index is created. Getting it wrong fails on the first batch with the real width in the message."})]}),(0,ne.jsxs)("div",{style:{marginBottom:10},children:[(0,ne.jsxs)("label",{htmlFor:"lc-emb-alias",style:I(),children:["Team index alias ",(0,ne.jsx)("span",{style:{color:s.muted,fontWeight:"normal"},children:"(optional)"})]}),(0,ne.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,ne.jsx)("input",{id:"lc-emb-alias",type:"text",value:m,spellCheck:!1,placeholder:"e.g. my-team-code, platform-code",onChange:F=>h(F.target.value),style:{...E(),flex:1}}),(0,ne.jsx)("button",{type:"button",style:_(),disabled:!y,title:y?"Save the alias":"Already saved",onClick:()=>e.onSaveEmbedder(t,r.trim(),M,l.trim(),u.trim(),Lr(m)),children:y?"Save alias":"Saved"})]}),(0,ne.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:["Names pointing at every teammate\u2019s index, so ",(0,ne.jsx)("code",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:"search_codebase"})," ","can be asked to look across the team. Everyone still writes to their own index; set the same alias on each machine. Results from someone else are marked as not being in your workspace, so the assistant does not try to open them. ",(0,ne.jsx)("strong",{children:"OpenSearch only"})," \u2014 Qdrant and Chroma have no equivalent, and team scope is simply unavailable there."]}),m.trim().length>0&&(0,ne.jsxs)("div",{style:{marginTop:6},children:[(0,ne.jsx)("button",{type:"button",style:_(),disabled:y,title:y?"Press Save first \u2014 this attaches the saved alias":void 0,onClick:e.onAttachTeamAlias,children:"Attach alias to my existing index"}),(0,ne.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:y?"Press Save below first. This attaches whatever alias is saved, not what is typed above.":"Use this if you indexed before setting an alias. It adds the alias and labels the existing chunks as yours \u2014 no re-indexing, and nothing is re-embedded. Chunks already labelled with someone else are never touched."}),e.aliasResult?.error!==void 0&&(0,ne.jsx)("span",{style:{display:"block",color:s.error,fontSize:11,marginTop:4},children:e.aliasResult.error}),e.aliasResult?.error===void 0&&e.aliasResult?.alias!==void 0&&(0,ne.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:[`"${e.aliasResult.index??""}" now answers to "${e.aliasResult.alias}". `,e.aliasResult.attributed===0?"Every chunk already had an owner.":`${String(e.aliasResult.attributed??0)} existing chunk(s) labelled as yours.`]})]})]}),(0,ne.jsxs)("div",{style:{marginBottom:10},children:[(0,ne.jsx)("label",{htmlFor:"lc-emb-prefix",style:I(),children:"Index name prefix"}),(0,ne.jsx)("input",{id:"lc-emb-prefix",type:"text",value:u,spellCheck:!1,placeholder:e.embedder?.defaultIndexPrefix??"light-code",onChange:F=>d(F.target.value),style:E()}),(0,ne.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:["Front of both derived names \u2014 the codebase index and the ",(0,ne.jsx)("code",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:"-docs"})," ","one \u2014 so a shared cluster shows at a glance whose collections are whose. Lowercase letters, digits, dot, dash and underscore. Changing it points at ",(0,ne.jsx)("em",{children:"new"}),", empty collections; the old ones keep their data until you delete them in OpenSearch."]})]}),(0,ne.jsxs)("div",{style:{marginBottom:10},children:[(0,ne.jsx)("label",{htmlFor:"lc-emb-index",style:I(),children:"Index name"}),(0,ne.jsx)("input",{id:"lc-emb-index",type:"text",value:l,spellCheck:!1,placeholder:e.embedder?.indexName??"derived from the workspace path",onChange:F=>c(F.target.value),style:E()}),(0,ne.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:"Leave blank and one is derived from this folder's path \u2014 collision-free, but nobody looking at the cluster can tell whose it is. Name it if you share a cluster. Also how you move to a new index after changing the embedding model: a vector field's width is fixed when the index is created, so a different width needs a different index."})]}),(0,ne.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,ne.jsx)("button",{type:"button",style:_(),disabled:!A,onClick:()=>e.onSaveEmbedder(t,r.trim(),M,l.trim(),u.trim(),Lr(m)),children:"Save embedder"}),!A&&(0,ne.jsx)("span",{style:{fontSize:11,color:s.muted},children:t.length===0?"Choose a provider first.":r.trim().length===0?"Enter or pick an embedding model.":"Enter the vector width."}),A&&b&&(0,ne.jsx)("span",{style:{fontSize:11,color:s.muted},children:"Saved."}),e.embedder?.indexedFiles!==void 0&&e.embedder.indexedFiles>0&&(0,ne.jsxs)("span",{style:{fontSize:11,color:s.muted},children:[e.embedder.indexedFiles," file(s) indexed"]})]}),V&&!T&&(0,ne.jsxs)("div",{style:{fontSize:11,color:s.muted,border:`1px solid ${s.border}`,borderRadius:3,padding:"8px 10px",marginBottom:8},children:["Indexing reads every source file in this workspace, sends it to"," ",(0,ne.jsx)("strong",{style:{color:s.foreground},children:w?.baseUrl??"the embedding endpoint"})," to be embedded, and stores the result in"," ",(0,ne.jsx)("strong",{style:{color:s.foreground},children:e.embedder?.indexName})," on"," ",(0,ne.jsx)("strong",{style:{color:s.foreground},children:e.connectionLabel}),". Files that are gitignored, deny-listed or binary are never sent."]}),T?(0,ne.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,ne.jsx)("button",{type:"button",style:_(),onClick:e.onCancelIndexing,children:"Stop"}),(0,ne.jsxs)("span",{style:{fontSize:11,color:s.muted},children:[e.progress?.phase," \u2014 ",e.progress?.filesIndexed," indexed, ",e.progress?.filesSkipped," skipped",e.progress?.current!==void 0&&` \xB7 ${e.progress.current}`]})]}):v?(0,ne.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,ne.jsx)("span",{style:{fontSize:12},children:"Send this workspace to be embedded?"}),(0,ne.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{k(!1),e.onStartIndexing()},children:"Index now"}),(0,ne.jsx)("button",{type:"button",style:_(),onClick:()=>k(!1),children:"Cancel"})]}):(0,ne.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,ne.jsx)("button",{type:"button",style:oe(!V),disabled:!V,onClick:()=>k(!0),children:e.embedder!==void 0&&e.embedder.indexedFiles>0?"Reindex workspace":"Index workspace"}),D?(0,ne.jsxs)(ne.Fragment,{children:[(0,ne.jsx)("span",{style:{fontSize:11},children:"Throw away the whole index?"}),(0,ne.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{p(!1),e.onClearIndex()},children:"Clear it"}),(0,ne.jsx)("button",{type:"button",style:_(),onClick:()=>p(!1),children:"Keep it"})]}):e.embedder!==void 0&&e.embedder.indexedFiles>0&&(0,ne.jsx)("button",{type:"button",style:_(),title:"Removes every chunk and forgets what was indexed, so the next run starts from nothing",onClick:()=>p(!0),children:"Clear index"}),!V&&(0,ne.jsx)("span",{style:{fontSize:11,color:s.muted},children:e.connectionLabel===void 0?"Choose an active connection above first.":e.embedder?.indexName===void 0?"Open a folder to index.":"Save an embedder first."})]}),e.lastResult?.error!==void 0&&(0,ne.jsx)("div",{style:{fontSize:11,color:s.error,marginTop:8},children:e.lastResult.error}),e.lastResult?.result!==void 0&&!T&&(0,ne.jsxs)("div",{style:{fontSize:11,color:s.muted,marginTop:8},children:["Indexed ",e.lastResult.result.filesIndexed," file(s), ",e.lastResult.result.chunksWritten," chunk(s)",e.lastResult.result.filesRemoved>0&&`, removed ${e.lastResult.result.filesRemoved}`,".",Object.keys(e.lastResult.result.skipReasons).length>0&&(0,ne.jsxs)("span",{children:[" ","Skipped:"," ",Object.entries(e.lastResult.result.skipReasons).map(([F,we])=>`${we} ${F}`).join(", "),"."]})]})]})}var De=U(re(),1);function l2(e){let t=e.hiddenTools>=15;return(0,De.jsxs)("section",{style:{marginTop:18,paddingTop:14,borderTop:`1px solid ${s.border}`},children:[(0,De.jsx)("span",{style:I(),children:"Tool documentation index"}),(0,De.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",margin:"6px 0 8px",cursor:"pointer"},children:[(0,De.jsx)("input",{type:"checkbox",checked:e.enabled,onChange:n=>e.onToggle(n.target.checked),style:{marginTop:2}}),(0,De.jsxs)("span",{children:[(0,De.jsx)("span",{style:{display:"block",fontSize:13},children:"Keep tool schemas out of the prompt"}),(0,De.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:["MCP and Python tools stop being listed in every request. The model finds them with"," ",(0,De.jsx)("code",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:"search_docs"})," and runs them through ",(0,De.jsx)("code",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:"call_tool"}),". You still approve everything exactly as before."]})]})]}),(0,De.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 10px"},children:e.hiddenTools===0?(0,De.jsx)(De.Fragment,{children:"No MCP or Python tools to hide, so nothing is registered for this and it costs nothing."}):(0,De.jsxs)(De.Fragment,{children:[e.enabled?"Hiding":"Would hide"," ",(0,De.jsx)("strong",{style:{color:s.foreground},children:e.hiddenTools})," ",e.hiddenTools===1?"tool":"tools","."," ",t?(0,De.jsx)(De.Fragment,{children:"That is enough to be worth it."}):(0,De.jsx)(De.Fragment,{children:"With this few, leaving it off is probably better \u2014 models call a listed tool more reliably than one named through a dispatcher."})]})}),(0,De.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",margin:"0 0 8px",cursor:e.enabled?"pointer":"not-allowed",opacity:e.enabled?1:.55},children:[(0,De.jsx)("input",{type:"checkbox",checked:e.skills&&e.enabled,disabled:!e.enabled,onChange:n=>e.onToggleSkills(n.target.checked),style:{marginTop:2}}),(0,De.jsxs)("span",{children:[(0,De.jsx)("span",{style:{display:"block",fontSize:13},children:"Look up skills the same way"}),(0,De.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:["Skill summaries stop being listed in every request. A count and an instruction to search stay, so the assistant still knows notes exist and looks for one before working on something unfamiliar."," ",e.hiddenSkills===0?"No skills recorded yet, so this changes nothing today.":`${String(e.hiddenSkills)} ${e.hiddenSkills===1?"skill":"skills"} affected.`,!e.enabled&&" Needs the setting above, which is what finds them."]})]})]}),(0,De.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,De.jsx)("button",{type:"button",style:_(),disabled:e.indexing||!e.retrievalReady,title:e.retrievalReady?"Embed the tool and skill documentation so search_docs can match by meaning":"Needs a search connection and an embedding model. Without them search_docs still works, matching names and descriptions.",onClick:()=>e.onIndexDocs(),children:e.indexing?"Indexing\u2026":"Index everything"}),(0,De.jsx)("button",{type:"button",style:_(),disabled:e.indexing||!e.retrievalReady,title:"Reindex tool documentation only, leaving skills untouched",onClick:()=>e.onIndexDocs("tool"),children:"Tools only"}),(0,De.jsx)("button",{type:"button",style:_(),disabled:e.indexing||!e.retrievalReady,title:"Reindex skills only, leaving tool documentation untouched",onClick:()=>e.onIndexDocs("skill"),children:"Skills only"}),(0,De.jsx)("button",{type:"button",style:_(),disabled:e.indexing||!e.retrievalReady,title:"Remove every indexed tool and skill document. search_docs falls back to matching names and descriptions until you index again.",onClick:e.onClearDocsIndex,children:"Clear index"}),e.docsIndex!==void 0&&(0,De.jsx)("span",{style:{color:s.muted,fontSize:11,fontFamily:"var(--vscode-editor-font-family, monospace)"},children:e.docsIndex})]}),!e.retrievalReady&&(0,De.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"8px 0 0"},children:["No embedding model configured, so ",(0,De.jsx)("code",{children:"search_docs"})," matches on names and descriptions instead of by meaning. Tools remain findable either way."]}),e.result?.error!==void 0&&(0,De.jsx)("p",{style:{color:s.error,fontSize:11,margin:"8px 0 0"},children:e.result.error}),e.result?.indexed!==void 0&&e.result.error===void 0&&(0,De.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"8px 0 0",fontFamily:G},children:["Indexed ",e.result.indexed," ",e.result.indexed===1?"entry":"entries",e.result.index!==void 0?` into ${e.result.index}`:"","."]})]})}var Ge=U(re(),1),xx=U(pe(),1);var bx="var(--vscode-editor-font-family, monospace)";function s2(e){let[t,n]=(0,xx.useState)(""),[r,i]=(0,xx.useState)("docs"),o=()=>{t.trim().length>0&&e.onProbe(t.trim(),r)};return(0,Ge.jsxs)("section",{style:{marginTop:18,paddingTop:14,borderTop:`1px solid ${s.border}`},children:[(0,Ge.jsx)("span",{style:I(),children:"Try a query"}),(0,Ge.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:"Runs through the same path the model uses, so what you see here is what it would have been given. Nothing is sent to the model."}),(0,Ge.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:8,flexWrap:"wrap"},children:[(0,Ge.jsx)(ze,{compact:!0,value:r,ariaLabel:"What to search",onChange:a=>i(a),options:[{value:"docs",label:"Tools & skills"},{value:"codebase",label:"Codebase"},{value:"mail",label:"Mail"}]}),(0,Ge.jsx)("input",{type:"text",value:t,spellCheck:!1,"aria-label":"Query",placeholder:"e.g. where do we upload a report",onKeyDown:a=>{a.key==="Enter"&&o()},onChange:a=>n(a.target.value),style:{...E(),flex:1,minWidth:160}}),(0,Ge.jsx)("button",{type:"button",style:_(),disabled:e.probeRunning,onClick:o,children:e.probeRunning?"Searching\u2026":"Search"})]}),e.probe!==void 0&&(0,Ge.jsxs)("div",{style:{marginBottom:12},children:[(0,Ge.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:4},children:[(0,Ge.jsxs)("span",{style:{color:s.muted,fontSize:11},children:["Result for \u201C",e.probe.query,"\u201D"]}),(0,Ge.jsx)("button",{type:"button",style:{..._(),marginLeft:"auto",fontSize:10,padding:"1px 6px"},title:"Dismiss this result. The query stays in the log below.",onClick:e.onClearProbe,children:"Clear result"})]}),e.probe.error!==void 0&&(0,Ge.jsx)("p",{style:{color:s.error,fontSize:11,margin:"0 0 4px"},children:e.probe.error}),e.probe.text.length>0&&(0,Ge.jsx)("pre",{className:"lc-scroll",style:{margin:0,padding:8,maxHeight:260,overflow:"auto",background:s.inputBackground,border:`1px solid ${s.border}`,borderRadius:8,fontFamily:bx,fontSize:11,whiteSpace:"pre-wrap",wordBreak:"break-word"},children:e.probe.text})]}),(0,Ge.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:6},children:[(0,Ge.jsx)("span",{style:I(),children:"Recent searches"}),e.entries.length>0&&(0,Ge.jsx)("button",{type:"button",style:{..._(),marginLeft:"auto",fontSize:11},onClick:e.onClear,children:"Clear"})]}),e.entries.length===0?(0,Ge.jsx)("p",{style:{color:s.muted,fontSize:11,margin:0},children:"Nothing yet. Searches the model runs \u2014 and any you try above \u2014 appear here."}):(0,Ge.jsx)("div",{className:"lc-scroll",style:{maxHeight:280,overflowY:"auto"},children:e.entries.map((a,l)=>(0,Ge.jsxs)("div",{style:{padding:"6px 0",borderBottom:`1px solid ${s.border}`,fontSize:11},children:[(0,Ge.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,Ge.jsx)("span",{style:{fontFamily:bx,color:s.accent},children:a.source}),a.via!==void 0&&(0,Ge.jsx)("span",{style:{...st(a.via==="lexical"?"warning":"neutral"),fontSize:9},title:a.via==="index"?"Matched by meaning, using the vector index":"Matched on names and descriptions \u2014 the index was not used",children:a.via==="index"?"semantic":"lexical"}),(0,Ge.jsxs)("span",{style:{marginLeft:"auto",color:s.muted,fontVariantNumeric:"tabular-nums"},children:[a.hits," ",a.hits===1?"hit":"hits"," \xB7 ",a.elapsedMs,"ms"]})]}),(0,Ge.jsx)("div",{style:{marginTop:2,wordBreak:"break-word"},children:a.query}),a.collection!==void 0&&(0,Ge.jsx)("div",{style:{color:s.muted,fontSize:10,fontFamily:bx},children:a.collection}),a.error!==void 0&&(0,Ge.jsx)("div",{style:{color:s.error,fontSize:10,marginTop:2},children:a.error})]},`${String(a.at)}-${String(l)}`))}),(0,Ge.jsx)("span",{style:{display:"block",color:s.muted,fontSize:10,marginTop:6,fontFamily:G},children:"Kept in memory for this session only \u2014 this is a diagnostic view, not the audit log."})]})}var ti=U(re(),1),c2=U(pe(),1);function Pi(e){let[t,n]=(0,c2.useState)(!e.hasValue);return t?(0,ti.jsxs)("div",{style:{marginBottom:16},children:[(0,ti.jsx)("label",{htmlFor:e.id,style:I(),children:e.label}),(0,ti.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,ti.jsx)("input",{id:e.id,type:"password",value:e.value,placeholder:e.placeholder??"sk-...",onChange:r=>e.onChange(r.target.value),style:E()}),e.hasValue&&(0,ti.jsx)("button",{type:"button",style:_(),onClick:()=>{e.onChange(""),n(!1)},children:"Cancel"})]})]}):(0,ti.jsxs)("div",{style:{marginBottom:16},children:[(0,ti.jsx)("label",{style:I(),children:e.label}),(0,ti.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,ti.jsx)("span",{children:e.envVar===void 0?"Set":`From $${e.envVar}`}),(0,ti.jsx)("button",{type:"button",style:_(),onClick:()=>n(!0),children:"Replace"})]})]})}var u2={id:"",label:"",kind:"qdrant",url:"",hasUsername:!1,hasPassword:!1},Ka=[{kind:"qdrant",label:"Qdrant \u2014 local",url:"http://127.0.0.1:6333",hint:"A single container, nothing leaves your machine. The usual choice for indexing code privately.",run:"docker run -p 6333:6333 qdrant/qdrant"},{kind:"chroma",label:"Chroma \u2014 local",url:"http://127.0.0.1:8000",hint:"Also local. Needs Chroma 1.0 or newer \u2014 the v1 API it replaced is not supported.",run:"docker run -p 8000:8000 chromadb/chroma"},{kind:"opensearch",label:"OpenSearch \u2014 a cluster you already run",url:"https://opensearch.internal:9200",hint:"The only backend that can also query indexes your organisation already has, with raw DSL."}];function Qa(e){let t=e.value!==void 0&&(e.value<e.min||e.max!==void 0&&e.value>e.max);return(0,W.jsxs)("div",{style:{marginBottom:8},title:e.tooltip,children:[(0,W.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,W.jsxs)("label",{htmlFor:e.id,style:{...I(),marginBottom:0,flex:1},children:[e.label,(0,W.jsx)("span",{"aria-hidden":"true",style:{marginLeft:4,opacity:.6,cursor:"help",fontSize:10,border:`1px solid ${s.border}`,borderRadius:"50%",padding:"0 4px"},children:"?"}),(0,W.jsxs)("span",{style:{display:"block",fontSize:10,opacity:.8},children:[e.hint!==void 0?`${e.hint} `:"",e.max!==void 0?`Allowed: ${e.min}\u2013${e.max}.`:`Minimum ${e.min}.`]})]}),(0,W.jsx)("input",{id:e.id,type:"number",min:e.min,...e.max!==void 0?{max:e.max}:{},value:e.value??"",placeholder:e.placeholder,onChange:n=>{let r=Number.parseInt(n.target.value,10);e.onChange(Number.isNaN(r)?void 0:r)},style:{...E(),width:110,flex:"none",...t?{borderColor:"var(--vscode-inputValidation-errorBorder, red)"}:{}}})]}),t&&(0,W.jsx)("div",{style:{fontSize:11,color:"var(--vscode-errorForeground, red)",textAlign:"right"},children:e.max!==void 0?`Must be between ${e.min} and ${e.max}.`:`Must be at least ${e.min}.`})]})}var el={maxHits:{min:1,max:100},timeoutSeconds:{min:1,max:120},terminateAfter:{min:0},maxIndexes:{min:0},defaultLookbackHours:{min:0},maxFieldChars:{min:50,max:2e4}};function d2(e){let[t,n]=(0,vn.useState)(void 0),[r,i]=(0,vn.useState)(""),[o,a]=(0,vn.useState)(""),[l,c]=(0,vn.useState)("qdrant"),[u,d]=(0,vn.useState)(""),[m,h]=(0,vn.useState)(""),[f,v]=(0,vn.useState)(!1),[k,D]=(0,vn.useState)(""),[p,b]=(0,vn.useState)(""),[S,y]=(0,vn.useState)({}),[T,M]=(0,vn.useState)(!1);(0,vn.useEffect)(()=>{T&&(M(!1),n(void 0))},[e.savedTick]),(0,vn.useEffect)(()=>{let w=t??u2;i(w.label),a(w.url),c(w.kind),d(w.defaultIndex??""),h(w.caFile??""),v(w.rejectUnauthorized===!1),D(""),b(""),y(w.limits??{})},[t]);let A=()=>({...t!==void 0&&t.id.length>0?{id:t.id}:{},label:r,url:o,kind:l,defaultIndex:u,caFile:m,...f?{rejectUnauthorized:!1}:{},...k.length>0?{username:k}:{},...p.length>0?{password:p}:{},...Object.keys(S).length>0?{limits:S}:{}});return t!==void 0?(0,W.jsxs)("div",{style:{padding:12,overflowY:"auto"},children:[(0,W.jsx)("h3",{style:{margin:"0 0 12px",color:s.foreground},children:t.id.length===0?"Add a vector store":"Edit connection"}),(0,W.jsxs)("div",{style:{marginBottom:12},children:[(0,W.jsx)("label",{htmlFor:"lc-os-kind",style:I(),children:"Backend"}),(0,W.jsx)(ze,{id:"lc-os-kind",value:l,onChange:w=>{let V=Ka.find(we=>we.kind===w);c(w);let F=Ka.map(we=>we.url);V!==void 0&&(o.trim().length===0||F.includes(o.trim()))&&a(V.url)},options:Ka.map(w=>({value:w.kind,label:w.label}))}),(0,W.jsx)("span",{style:{color:s.muted,fontSize:11},children:Ka.find(w=>w.kind===l)?.hint}),(()=>{let w=Ka.find(V=>V.kind===l)?.run;return w===void 0?null:(0,W.jsxs)("div",{style:{color:s.muted,fontSize:11,marginTop:4},children:["Not running one yet?"," ",(0,W.jsx)("code",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:w})]})})()]}),(0,W.jsxs)("div",{style:{marginBottom:12},children:[(0,W.jsx)("label",{htmlFor:"lc-os-label",style:I(),children:"Name"}),(0,W.jsx)("input",{id:"lc-os-label",type:"text",value:r,placeholder:"Production",onChange:w=>i(w.target.value),style:E()})]}),(0,W.jsxs)("div",{style:{marginBottom:12},children:[(0,W.jsx)("label",{htmlFor:"lc-os-url",style:I(),children:l==="opensearch"?"Cluster URL":"Server URL"}),(0,W.jsx)("input",{id:"lc-os-url",type:"text",value:o,placeholder:Ka.find(w=>w.kind===l)?.url??"",onChange:w=>a(w.target.value),style:E()})]}),(0,W.jsxs)("div",{style:{marginBottom:12},children:[(0,W.jsx)("label",{htmlFor:"lc-os-user",style:I(),children:"Username"}),(0,W.jsx)("input",{id:"lc-os-user",type:"text",value:k,placeholder:t.hasUsername?"Set \u2014 type to replace":"",onChange:w=>D(w.target.value),style:E()})]}),(0,W.jsx)(Pi,{id:"lc-os-password",label:"Password",hasValue:t.hasPassword,value:p,onChange:b,placeholder:"Stored in the OS keychain"}),(0,W.jsxs)("div",{style:{marginBottom:12},children:[(0,W.jsx)("label",{htmlFor:"lc-os-index",style:I(),children:"Default index"}),(0,W.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:6},children:[(0,W.jsx)("input",{id:"lc-os-index",type:"text",value:u,placeholder:"Used when the model names no index",onChange:w=>d(w.target.value),style:E()}),(0,W.jsx)("button",{type:"button",style:_(),onClick:()=>e.onListIndexes(A()),children:"List"})]}),e.indexes.length>0&&(0,W.jsx)(ze,{ariaLabel:"Available indexes",value:e.indexes.some(w=>w.name===u)?u:"",onChange:w=>{w.length>0&&d(w)},style:{width:"100%"},options:[{value:"",label:`Choose from ${e.indexes.length} index(es)\u2026`},...e.indexes.map(w=>({value:w.name,label:w.name,detail:[w.docsCount!==void 0?`${w.docsCount.toLocaleString()} docs`:void 0,w.storeSize].filter(V=>V!==void 0).join(", ")}))]}),e.indexesWarning!==void 0&&e.indexes.length===0&&(0,W.jsxs)("span",{style:{color:s.muted,fontSize:11,display:"block",marginTop:4},children:["Could not list indexes (",e.indexesWarning,"). Type the name instead."]})]}),(0,W.jsx)("div",{style:{paddingTop:12,borderTop:`1px solid ${s.border}`,marginBottom:12},children:(0,W.jsx)("strong",{style:{fontSize:12,color:s.foreground},children:"Connection security"})}),(0,W.jsxs)("div",{style:{marginBottom:10},children:[(0,W.jsx)("label",{htmlFor:"lc-os-ca",style:I(),children:"Additional CA certificate"}),(0,W.jsx)("input",{id:"lc-os-ca",type:"text",value:m,placeholder:"corp-root.pem",onChange:w=>h(w.target.value),style:E()}),(0,W.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Usually blank \u2014 the CA in Settings \u2192 Network already covers this cluster. Anything set here is added to it."})]}),(0,W.jsxs)("label",{style:{display:"flex",alignItems:"flex-start",gap:6,marginBottom:6,fontSize:12},children:[(0,W.jsx)("input",{type:"checkbox",style:{marginTop:2},checked:f,onChange:w=>v(w.target.checked)}),(0,W.jsx)("span",{style:{color:s.foreground},children:"Skip certificate verification"})]}),f&&(0,W.jsx)("p",{style:{color:s.error,fontSize:11,margin:"0 0 12px",paddingLeft:22},children:"Anyone able to intercept this connection can read and modify it, including the password. The CA file above is the safe fix."}),(0,W.jsxs)("div",{style:{paddingTop:12,borderTop:`1px solid ${s.border}`,marginBottom:8},children:[(0,W.jsx)("strong",{style:{fontSize:12,color:s.foreground},children:"Query limits"}),(0,W.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"4px 0 8px"},children:"Guard rails on the queries the model writes. It cannot change anything in the cluster \u2014 but a read can still be expensive, so these keep one bounded. Defaults are chosen to be safe on a large cluster; raise them if you know yours can take it."})]}),(0,W.jsx)(Qa,{id:"lc-os-hits",...el.maxHits,label:"Maximum results",hint:"Documents returned per search.",tooltip:`How many documents one search returns.
|
|
102
|
-
|
|
103
|
-
The tool caps the model here no matter how many it asks for. Every hit spends context, so a high value crowds out the rest of the conversation and can push the result past the overall size cap, after which the model has to re-read it in pieces.
|
|
104
|
-
|
|
105
|
-
Raise it when the model keeps saying it found too few matches to judge. Lower it when replies are slow or the context bar fills up quickly.
|
|
106
|
-
|
|
107
|
-
Default 10.`,placeholder:"10",value:S.maxHits,onChange:w=>y({...S,maxHits:w})}),(0,W.jsx)(Qa,{id:"lc-os-lookback",...el.defaultLookbackHours,label:"Default lookback (hours)",hint:"Time window used when the model asks for none.",tooltip:`A time window applied automatically when the model gives no date range and the index has a date field.
|
|
108
|
-
|
|
109
|
-
This is the single most effective protection for a log index: on years of data, the difference between searching a day and searching everything is the difference between instant and a cluster in trouble. The model is always told the window was applied, so it can ask for a wider one deliberately.
|
|
110
|
-
|
|
111
|
-
Set 0 to allow unbounded scans \u2014 only sensible on a small index.
|
|
112
|
-
|
|
113
|
-
Default 24 hours.`,placeholder:"24",value:S.defaultLookbackHours,onChange:w=>y({...S,defaultLookbackHours:w})}),(0,W.jsx)(Qa,{id:"lc-os-fieldchars",...el.maxFieldChars,label:"Longest field value",hint:"Characters kept from one field of one document.",tooltip:`How much of a single field is kept before it is cut short.
|
|
114
|
-
|
|
115
|
-
This is the limit to raise if the model keeps reporting that log messages are truncated. A stack trace runs to several thousand characters and the default keeps 500 of them.
|
|
116
|
-
|
|
117
|
-
Unlike the overall result cap, this cut cannot be undone \u2014 the text never leaves the tool, so there is nothing to re-read. It is reported in the result rather than hidden, so a clipped trace never reads as a short one.
|
|
118
|
-
|
|
119
|
-
Default 500 characters.`,placeholder:"500",value:S.maxFieldChars,onChange:w=>y({...S,maxFieldChars:w})}),(0,W.jsx)(Qa,{id:"lc-os-timeout",...el.timeoutSeconds,label:"Query timeout (seconds)",hint:"Per-shard time budget sent with the query.",tooltip:`How long each shard may spend on one search, sent to OpenSearch as the query's own timeout.
|
|
120
|
-
|
|
121
|
-
On expiry the cluster returns whatever it has found so far rather than failing, so a slow query degrades into a partial answer instead of hanging the conversation.
|
|
122
|
-
|
|
123
|
-
Raise it for a large or heavily loaded cluster where legitimate searches are genuinely slow.
|
|
124
|
-
|
|
125
|
-
Default 10 seconds.`,placeholder:"10",value:S.timeoutSeconds,onChange:w=>y({...S,timeoutSeconds:w})}),(0,W.jsx)(Qa,{id:"lc-os-terminate",...el.terminateAfter,label:"Documents examined per shard",hint:"Stops a query early instead of walking the whole index.",tooltip:`How many documents each shard may inspect before it stops looking.
|
|
126
|
-
|
|
127
|
-
A timeout limits how long a query runs; this limits how much work it does. It is what stops a badly-targeted search from walking an entire index and evicting everything else from the cluster cache.
|
|
128
|
-
|
|
129
|
-
The trade-off: a rare match sitting past this point will not be found, and the result will honestly say the count is capped rather than claim there were none.
|
|
130
|
-
|
|
131
|
-
Set 0 to disable. Default 10,000.`,placeholder:"10000",value:S.terminateAfter,onChange:w=>y({...S,terminateAfter:w})}),(0,W.jsx)(Qa,{id:"lc-os-maxindexes",...el.maxIndexes,label:"Maximum indexes per query",hint:"Refuses a wildcard that fans out wider than this.",tooltip:`How many indexes one search may span.
|
|
132
|
-
|
|
133
|
-
A pattern like \`logs-*\` can resolve to hundreds of daily indexes, and querying them together is one of the easiest ways to overload a cluster by accident. A pattern matching more than this is refused before it is sent, and the model is told to narrow it.
|
|
134
|
-
|
|
135
|
-
Raise it if you routinely search a wide date range of daily indexes. Set 0 to disable the check.
|
|
136
|
-
|
|
137
|
-
Default 5.`,placeholder:"5",value:S.maxIndexes,onChange:w=>y({...S,maxIndexes:w})}),(0,W.jsxs)("div",{style:{paddingTop:12,borderTop:`1px solid ${s.border}`,marginBottom:12},children:[(0,W.jsx)("button",{type:"button",style:_(),onClick:()=>e.onTest(A()),children:"Test Connection"}),e.testResult!==void 0&&(0,W.jsx)("div",{style:{marginTop:8,fontSize:12,color:e.testResult.ok?"var(--vscode-testing-iconPassed, #3fb950)":s.error},children:e.testResult.detail})]}),(0,W.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,W.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{M(!0),e.onSave(A())},children:"Save"}),(0,W.jsx)("button",{type:"button",style:_(),onClick:()=>n(void 0),children:"Cancel"}),T&&(0,W.jsx)("span",{style:{fontSize:11,color:s.muted},children:"Saving\u2026"})]})]}):(0,W.jsxs)("div",{style:{padding:12,overflowY:"auto"},children:[(0,W.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:8},children:[(0,W.jsx)("h3",{style:{margin:0,color:s.foreground},children:"Search"}),(0,W.jsx)(Bi,{scope:"user"})]}),(0,W.jsx)("p",{style:{color:s.muted,fontSize:12,fontFamily:G,margin:"0 0 12px"},children:"Lets the model search OpenSearch indexes your organisation already runs \u2014 logs, tickets, documentation. It can only read: nothing here can create, change or delete anything in a cluster."}),e.connections.length===0&&(0,W.jsx)("p",{style:{color:s.muted,fontFamily:G},children:"No connections yet."}),e.project.overridden.length>0&&(0,W.jsxs)("div",{style:{padding:10,marginBottom:12,borderRadius:4,border:`1px solid ${s.accent}`,background:`color-mix(in srgb, ${s.accent} 10%, transparent)`},children:[(0,W.jsx)("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:"This project has its own settings"}),(0,W.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:[e.project.overridden.join(", ")," \u2014 set for this folder only. Everything else follows your defaults, and other projects are unaffected."]}),(0,W.jsx)("button",{type:"button",style:_(),onClick:e.onClearProject,children:"Use my defaults here again"})]}),e.activeConnectionId!==void 0&&e.connections.length>1&&(0,W.jsxs)("div",{style:{padding:10,marginBottom:12,borderRadius:4,border:`1px solid ${s.border}`,fontFamily:G,fontSize:12},children:[(0,W.jsx)("strong",{style:{color:s.foreground,fontSize:12},children:"Copy an existing index here"}),(0,W.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"4px 0 8px"},children:"Moves this workspace\u2019s vectors into the active store without re-embedding. Only possible when both were indexed with the same embedding model \u2014 otherwise the copy is refused, because mixing embeddings makes every search quietly wrong rather than visibly broken."}),(0,W.jsx)("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:e.connections.filter(w=>w.id!==e.activeConnectionId).map(w=>(0,W.jsxs)("button",{type:"button",style:_(),disabled:e.sync?.running===!0,title:`Copy this workspace's index from ${w.label} into the active store`,onClick:()=>e.onSyncFrom(w.id),children:["From ",w.label]},w.id))}),e.sync!==void 0&&(0,W.jsx)("p",{style:{color:e.sync.error!==void 0?s.error:s.muted,fontSize:11,margin:"6px 0 0"},children:e.sync.error??(e.sync.running?`Copying from ${e.sync.fromLabel??"the other store"}\u2026 ${String(e.sync.copied??0)} so far.`:`Copied ${String(e.sync.copied??0)} entries from ${e.sync.fromLabel??"the other store"}.`)})]}),e.connections.map(w=>{let V=w.id===e.activeConnectionId;return(0,W.jsxs)("div",{style:{padding:10,marginBottom:8,borderRadius:4,border:`1px solid ${V?s.accent:s.border}`,background:V?s.assistantBubble:"transparent"},children:[(0,W.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,W.jsx)("strong",{children:w.label}),V&&(0,W.jsx)("span",{style:{color:s.muted,fontSize:11},children:"\xB7 active"})]}),(0,W.jsxs)("div",{style:{color:s.muted,fontSize:12,marginBottom:8},children:[w.url,w.defaultIndex!==void 0?` \u2014 ${w.defaultIndex}`:" \u2014 no default index"]}),(0,W.jsxs)("div",{style:{display:"flex",gap:6,flexWrap:"wrap"},children:[(0,W.jsx)("button",{type:"button",style:_(),onClick:()=>e.onSetActive(V?void 0:w.id),children:V?"Turn off":"Use in chat"}),e.project.workspaceOpen&&!V&&(0,W.jsx)("button",{type:"button",style:_(),title:"Use this store in this project only, leaving your default alone",onClick:()=>e.onSetActive(w.id,!0),children:"Use in this project"}),(0,W.jsx)("button",{type:"button",style:_(),onClick:()=>n(w),children:"Edit"}),(0,W.jsx)("button",{type:"button",title:"Delete","aria-label":"Delete",style:{...Ce("secondary"),color:s.error},onClick:()=>e.onDelete(w.id),children:(0,W.jsx)(Wt,{})})]})]},w.id)}),(0,W.jsx)("button",{type:"button",style:oe(!1),onClick:()=>n({...u2}),children:"Add connection"}),(0,W.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:16},children:"Search tools are offered only while a connection is active. Switching starts a fresh prompt, so change it between messages rather than mid-reply."}),(0,W.jsx)(a2,{...e.indexing}),(0,W.jsx)(l2,{...e.dispatcher}),(0,W.jsx)(s2,{...e.activity})]})}var ct=U(re(),1),ni=U(pe(),1);var uf={fontFamily:G,fontSize:11,color:s.muted,marginTop:-12,marginBottom:16,lineHeight:1.5};function Js(e){return(0,ct.jsxs)("div",{style:{marginBottom:e.hint!==void 0?0:16},children:[(0,ct.jsx)(ln,{id:e.id,label:e.label,value:e.value,placeholder:e.placeholder,...e.browse!==void 0?{browse:e.browse}:{},...e.onBrowse!==void 0?{onBrowse:e.onBrowse}:{},onChange:e.onChange}),e.hint!==void 0&&(0,ct.jsx)("div",{style:uf,children:e.hint})]})}function f2(e){let t=e.settings,[n,r]=(0,ni.useState)(""),[i,o]=(0,ni.useState)(""),[a,l]=(0,ni.useState)(""),[c,u]=(0,ni.useState)(""),[d,m]=(0,ni.useState)(""),[h,f]=(0,ni.useState)(""),[v,k]=(0,ni.useState)(!0),[D,p]=(0,ni.useState)(!1);(0,ni.useEffect)(()=>{t!==void 0&&(r(t.certDir??""),o(t.tls.caFile??""),l(t.tls.certFile??""),u(t.tls.keyFile??""),m(t.tls.pfxFile??""),k(t.tls.rejectUnauthorized!==!1),f(""),p(!1))},[t]),(0,ni.useEffect)(()=>{let y=e.pickedPath;if(y===void 0)return;let T={"net.certDir":r,"net.caFile":o,"net.certFile":l,"net.keyFile":u,"net.pfxFile":m}[y.purpose];T?.(y.path)},[e.pickedPath]);let b=d.trim().length>0;function S(){e.onSave({certDir:n,tls:{caFile:i,certFile:b?"":a,keyFile:b?"":c,pfxFile:d,...v?{}:{rejectUnauthorized:!1}},...h.length>0?{passphrase:h}:{}}),p(!0)}return(0,ct.jsxs)("div",{style:{padding:16,fontFamily:G,fontSize:13,color:s.foreground},children:[(0,ct.jsx)("p",{style:{...uf,marginTop:0,marginBottom:20},children:"Applies to every connection Light Code makes. A provider profile or search cluster can still set its own \u2014 an extra CA there is added to this one, and its own client certificate replaces this one for that connection only."}),(0,ct.jsx)(Js,{id:"net-certdir",browse:{purpose:"net.certDir",kind:"folder"},onBrowse:e.onBrowse,label:"Certificate directory",value:n,placeholder:"C:\\Users\\you\\certs",hint:"Filenames below resolve against this. Absolute paths ignore it. Must be outside the workspace, and everything it holds is hidden from file-reading tools.",onChange:r}),(0,ct.jsx)("h3",{style:{...tr(),margin:"24px 0 12px"},children:"Trust"}),(0,ct.jsx)(Js,{id:"net-ca",browse:{purpose:"net.caFile",kind:"file",extensions:["pem","crt","cer","ca-bundle"]},onBrowse:e.onBrowse,label:"CA certificate",value:i,placeholder:"corporate-root.pem",hint:"Added to the built-in roots, not a replacement for them \u2014 public sites keep working.",onChange:o}),(0,ct.jsxs)("label",{style:{display:"flex",alignItems:"flex-start",gap:8,marginBottom:4,cursor:"pointer"},children:[(0,ct.jsx)("input",{type:"checkbox",checked:v,onChange:y=>k(y.target.checked),style:{marginTop:2}}),(0,ct.jsx)("span",{children:"Verify server certificates"})]}),!v&&(0,ct.jsx)("div",{style:{...uf,color:"var(--vscode-editorWarning-foreground, inherit)",marginTop:4},children:"Off means any certificate is accepted, so an interception cannot be distinguished from the real server. Use it to confirm a diagnosis, then add the CA above instead."}),(0,ct.jsx)("h3",{style:{...tr(),margin:"24px 0 12px"},children:"Client certificate"}),(0,ct.jsx)("p",{style:{...uf,marginTop:0},children:"Presented to every connection that does not supply its own. A certificate identifies you, so it goes to each host you have configured \u2014 set it on the individual profile instead if that is not what you want."}),(0,ct.jsx)(Js,{id:"net-pfx",browse:{purpose:"net.pfxFile",kind:"file",extensions:["pfx","p12"]},onBrowse:e.onBrowse,label:"PFX bundle",value:d,placeholder:"client.pfx",hint:"Windows PKI usually issues one of these. Supplied instead of a certificate and key.",onChange:m}),!b&&(0,ct.jsxs)(ct.Fragment,{children:[(0,ct.jsx)(Js,{id:"net-cert",browse:{purpose:"net.certFile",kind:"file",extensions:["crt","pem","cer"]},onBrowse:e.onBrowse,label:"Certificate",value:a,placeholder:"client.crt",onChange:l}),(0,ct.jsx)(Js,{id:"net-key",browse:{purpose:"net.keyFile",kind:"file",extensions:["key","pem"]},onBrowse:e.onBrowse,label:"Private key",value:c,placeholder:"client.key",onChange:u})]}),(0,ct.jsx)(Pi,{id:"net-passphrase",label:"Key passphrase",hasValue:t?.hasPassphrase??!1,value:h,onChange:f,placeholder:"Leave blank if the key is not encrypted"}),(0,ct.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:12},children:[(0,ct.jsx)("button",{type:"button",style:oe(!1),onClick:S,children:"Save"}),D&&(0,ct.jsx)("span",{style:{fontSize:12,color:s.muted},children:"Saved."})]})]})}var J=U(re(),1),bn=U(pe(),1);var K=U(re(),1),Gr=U(pe(),1);var nR={id:void 0,label:"",bucket:"",region:"us-east-1",accessKeyId:"",endpoint:"",prefix:"",pathStyle:!1,readOnly:!1};function df(e){let[t,n]=(0,Gr.useState)(void 0),[r,i]=(0,Gr.useState)(""),[o,a]=(0,Gr.useState)(""),[l,c]=(0,Gr.useState)(void 0),u=JSON.stringify(e.mirrors),[d,m]=(0,Gr.useState)(e.mirrors);(0,Gr.useEffect)(()=>m(JSON.parse(u)),[u]);let h=JSON.stringify(d)!==u,f=(p,b)=>{m(d.map((S,y)=>y===p?{...S,...b}:S))},v=e.kind==="skills"?"skills":"Python tools",k=e.kind==="skills"?".md":".py",D=p=>{i(""),a(""),n(p===void 0?{...nR}:{id:p.id,label:p.label,bucket:p.bucket,region:p.region,accessKeyId:p.accessKeyId,endpoint:p.endpoint??"",prefix:p.prefix??"",pathStyle:p.pathStyle===!0,readOnly:p.readOnly===!0})};return(0,K.jsxs)("div",{style:{marginTop:18,paddingTop:14,borderTop:`1px solid ${s.border}`},children:[(0,K.jsxs)("h4",{style:{margin:"0 0 4px"},children:["Keep ",v," in an S3 bucket"]}),(0,K.jsxs)("p",{style:{margin:"0 0 10px",color:s.muted,fontSize:12,lineHeight:1.5},children:["Files are copied down to this machine and then used exactly as local ones are \u2014 loaded, watched and ",(0,K.jsx)("strong",{children:"indexed as you have already configured"}),". Nothing about indexing changes because the files came from a bucket.",e.kind==="tools"&&(0,K.jsxs)(K.Fragment,{children:[" ","A downloaded tool is ",(0,K.jsx)("strong",{children:"not run until you approve it"})," and see its source, the same as one written here. A bucket is how a tool reaches this machine, not a reason to trust it."]})]}),e.problems.length>0&&(0,K.jsx)("div",{style:{marginBottom:10},children:e.problems.map(p=>(0,K.jsxs)("div",{style:{color:s.error,fontSize:12,marginBottom:4},children:[(0,K.jsxs)("strong",{children:[p.label,":"]})," ",p.problem]},p.label))}),e.manageConnections===!0&&(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)("label",{style:I(),children:"Buckets"}),e.connections.length===0&&(0,K.jsxs)("p",{style:{margin:"0 0 8px",color:s.muted,fontSize:12},children:["None yet. Add one to point ",v," at a folder in it."]}),e.connections.map(p=>(0,K.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"6px 0",borderBottom:`1px solid ${s.border}`},children:[(0,K.jsxs)("div",{style:{flex:1,minWidth:0},children:[(0,K.jsxs)("div",{style:{fontSize:13},children:[p.label,p.readOnly===!0&&(0,K.jsx)("span",{style:{color:s.muted,fontSize:11},children:" \xB7 read-only"})]}),(0,K.jsxs)("div",{style:{color:s.muted,fontSize:11,wordBreak:"break-all"},children:["s3://",p.bucket,"/",p.prefix??""," \xB7 ",p.region,p.hasSecret?"":" \xB7 no key stored"]})]}),(0,K.jsx)("button",{type:"button",style:_(),onClick:()=>D(p),children:"Edit"}),l===p.id?(0,K.jsx)("button",{type:"button",style:_(),onClick:()=>{e.onDeleteConnection(p.id),c(void 0)},children:"Really delete?"}):(0,K.jsx)("button",{type:"button",style:_(),onClick:()=>c(p.id),children:"Delete"})]},p.id)),t===void 0?(0,K.jsx)("button",{type:"button",style:{..._(),marginTop:8},onClick:()=>D(),children:"Add a bucket"}):(0,K.jsxs)("div",{style:{marginTop:10,display:"grid",gap:6},children:[(0,K.jsx)("label",{style:I(),children:"Name"}),(0,K.jsx)("input",{type:"text",value:t.label,placeholder:"e.g. team-docs",onChange:p=>n({...t,label:p.target.value}),style:E()}),(0,K.jsx)("label",{style:I(),children:"Bucket"}),(0,K.jsx)("input",{type:"text",value:t.bucket,onChange:p=>n({...t,bucket:p.target.value}),style:E()}),(0,K.jsx)("label",{style:I(),children:"Region"}),(0,K.jsx)("input",{type:"text",value:t.region,onChange:p=>n({...t,region:p.target.value}),style:E()}),(0,K.jsx)("label",{style:I(),children:"Access key ID"}),(0,K.jsx)("input",{type:"text",value:t.accessKeyId,spellCheck:!1,onChange:p=>n({...t,accessKeyId:p.target.value}),style:E()}),(0,K.jsxs)("label",{style:I(),children:["Secret access key"," ",t.id!==void 0&&e.connections.find(p=>p.id===t.id)?.hasSecret===!0&&(0,K.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"\u2014 stored; leave blank to keep it"})]}),(0,K.jsx)("input",{type:"password",value:r,spellCheck:!1,onChange:p=>i(p.target.value),style:E()}),(0,K.jsxs)("label",{style:I(),children:["Session token ",(0,K.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(only for temporary credentials)"})]}),(0,K.jsx)("input",{type:"password",value:o,spellCheck:!1,onChange:p=>a(p.target.value),style:E()}),(0,K.jsxs)("label",{style:I(),children:["Endpoint ",(0,K.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(optional)"})]}),(0,K.jsx)("input",{type:"text",value:t.endpoint,placeholder:"https://s3.eu-west-1.amazonaws.com",spellCheck:!1,onChange:p=>n({...t,endpoint:p.target.value}),style:E()}),(0,K.jsxs)("label",{style:I(),children:["Limit to prefix ",(0,K.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(optional)"})]}),(0,K.jsx)("input",{type:"text",value:t.prefix,placeholder:"e.g. light-code/",spellCheck:!1,onChange:p=>n({...t,prefix:p.target.value}),style:E()}),(0,K.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Everything this connection can reach is held inside this prefix, including what the assistant asks for. Leave it blank for the whole bucket."}),(0,K.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,K.jsx)("input",{type:"checkbox",checked:t.pathStyle,onChange:p=>n({...t,pathStyle:p.target.checked})}),"Put the bucket in the path \u2014 ",(0,K.jsx)("code",{children:"endpoint/bucket/key"})]}),(0,K.jsx)("span",{style:{color:s.muted,fontSize:11,marginTop:-2},children:"Worked out from the endpoint when you leave this alone: anything that is not AWS uses the path, since an internal address would need wildcard DNS and a wildcard certificate per bucket to do otherwise. Tick it to force either way."}),(0,K.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12},children:[(0,K.jsx)("input",{type:"checkbox",checked:t.readOnly,onChange:p=>n({...t,readOnly:p.target.checked})}),"Read-only \u2014 refuse every upload"]}),(0,K.jsxs)("div",{style:{display:"flex",gap:8,marginTop:4},children:[(0,K.jsx)("button",{type:"button",style:oe(t.label.trim()===""||t.bucket.trim()===""),disabled:t.label.trim()===""||t.bucket.trim()==="",onClick:()=>{e.onSaveConnection({...t.id!==void 0?{id:t.id}:{},label:t.label,bucket:t.bucket,region:t.region,accessKeyId:t.accessKeyId,endpoint:t.endpoint,prefix:t.prefix,pathStyle:t.pathStyle,readOnly:t.readOnly},r,o),n(void 0)},children:"Save bucket"}),(0,K.jsx)("button",{type:"button",style:_(),onClick:()=>n(void 0),children:"Cancel"})]})]})]}),(0,K.jsxs)("div",{style:{marginTop:14},children:[(0,K.jsxs)("label",{style:I(),children:["Folders holding your ",v]}),e.connections.length===0?(0,K.jsxs)("p",{style:{margin:0,color:s.muted,fontSize:12},children:["Add a bucket ",e.manageConnections===!0?"above":"in the Skills tab"," first."]}):(0,K.jsxs)(K.Fragment,{children:[d.length===0&&(0,K.jsxs)("p",{style:{margin:"0 0 6px",color:s.muted,fontSize:12},children:["None yet. Add a folder to read ",v," from it."]}),d.map((p,b)=>(0,K.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap",padding:"4px 0"},children:[(0,K.jsx)(ze,{value:p.connectionId,onChange:S=>f(b,{connectionId:S}),options:e.connections.map(S=>({value:S.id,label:S.label}))}),(0,K.jsx)("input",{type:"text",value:p.prefix??"",placeholder:e.kind==="skills"?"skills/":"tools/",spellCheck:!1,onChange:S=>f(b,{prefix:S.target.value}),style:{...E(),flex:1,minWidth:120}}),(0,K.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12},children:[(0,K.jsx)("input",{type:"checkbox",checked:p.enabled===!0,onChange:S=>f(b,{enabled:S.target.checked})}),"Use"]}),e.kind==="skills"&&(0,K.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:4,fontSize:12},children:[(0,K.jsx)("input",{type:"checkbox",checked:p.publish===!0,onChange:S=>m(d.map((y,T)=>({...y,publish:S.target.checked?T===b:!1})))}),"Save new here"]}),(0,K.jsx)("button",{type:"button",style:_(),onClick:()=>m(d.filter((S,y)=>y!==b)),children:"Remove"})]},b)),(0,K.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8,flexWrap:"wrap"},children:[(0,K.jsx)("button",{type:"button",style:_(),onClick:()=>m([...d,{connectionId:e.connections[0]?.id??"",prefix:"",enabled:!0}]),children:"Add a folder"}),(0,K.jsx)("button",{type:"button",style:oe(!h),disabled:!h,onClick:()=>e.onSaveMirrors(d),children:h?"Save folders":"Saved"}),e.mirrors.some(p=>p.enabled===!0)&&(0,K.jsx)("button",{type:"button",style:_(),onClick:()=>e.onSync(),children:"Sync now"})]}),(0,K.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:["Only ",k," files are copied, and they are read in the order shown. Nothing here is deleted when a file disappears from a bucket, so a failed sync never takes your"," ",v," away."]})]}),e.folders.length>0&&(0,K.jsxs)("div",{style:{marginTop:8,fontSize:11,color:s.muted,wordBreak:"break-all"},children:["Copied to:",e.folders.map(p=>(0,K.jsx)("div",{children:(0,K.jsx)("code",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:p})},p))]}),e.lastSync!==void 0&&(0,K.jsxs)("div",{style:{marginTop:4,fontSize:11,color:s.muted},children:["Last sync: ",e.lastSync]})]})]})}var tl="var(--vscode-editor-font-family, monospace)";function iR(e){return{name:e.name,value:e.secret?"":e.value??"",secret:e.secret,hasValue:e.hasValue===!0}}function m2(e){let t=e.status,[n,r]=(0,bn.useState)(void 0),[i,o]=(0,bn.useState)(""),[a,l]=(0,bn.useState)(""),[c,u]=(0,bn.useState)(!1),[d,m]=(0,bn.useState)(""),[h,f]=(0,bn.useState)(""),[v,k]=(0,bn.useState)("30"),[D,p]=(0,bn.useState)(""),[b,S]=(0,bn.useState)(!1),[y,T]=(0,bn.useState)([]),[M,A]=(0,bn.useState)(!1);return(0,bn.useEffect)(()=>{e.pickedPath?.purpose==="python.uvPath"&&m(e.pickedPath.path),e.pickedPath?.purpose==="python.toolsDir"&&f(e.pickedPath.path),e.pickedPath?.purpose==="python.venvPath"&&o(e.pickedPath.path),e.pickedPath?.purpose==="python.interpreterPath"&&l(e.pickedPath.path)},[e.pickedPath]),(0,bn.useEffect)(()=>{let w=e.settings;w!==void 0&&(u(w.dynamicTools==="on"),m(w.uvPath??""),f(w.toolsDir??""),o(w.venvPath??""),l(w.interpreterPath??""),p(w.indexUrl??""),S(w.offline===!0),T((w.env??[]).map(iR)),k(String(w.timeoutSeconds??30)),A(!1))},[e.settings]),(0,J.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G,fontSize:13,color:s.foreground},children:[(0,J.jsx)("h3",{style:{margin:"0 0 4px"},children:"Python tools"}),(0,J.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:0},children:"Lets the model write small Python tools and call them in the same conversation \u2014 useful for parsing, data wrangling, or anything needing a library that a shell command handles badly."}),(0,J.jsxs)("div",{style:{fontSize:11,color:s.muted,border:`1px solid ${s.border}`,borderRadius:3,padding:"8px 10px",margin:"10px 0",lineHeight:1.5},children:["This is the sharpest feature in Light Code. Elsewhere you approve a tool ",(0,J.jsx)("em",{children:"call"}),"; here you approve a tool's ",(0,J.jsx)("strong",{children:"source code"}),", which then runs whenever the model uses it. Every create and update shows you the full diff first, and a file changed afterwards \u2014 by anything \u2014 is refused rather than loaded. Tools live in your workspace so they land in git and get reviewed like any other code. There is no sandbox: a tool runs with your privileges."]}),(0,J.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12,cursor:"pointer"},children:[(0,J.jsx)("input",{type:"checkbox",checked:c,onChange:w=>u(w.target.checked)}),(0,J.jsx)("span",{children:"Let the model create and run Python tools"})]}),c&&(0,J.jsxs)(J.Fragment,{children:[(0,J.jsx)(ln,{id:"lc-py-uv",label:"Path to uv",value:d,placeholder:t?.uv?.path??"uv (found on PATH)",hint:"Leave blank to use uv from PATH. uv is used because it reads a tool's inline dependency block natively, so the tool file is the only place its dependencies are declared.",browse:{purpose:"python.uvPath",kind:"file"},onBrowse:e.onBrowse,onChange:m}),(0,J.jsx)(ln,{id:"lc-py-tools",label:"Where tools are kept",value:h,placeholder:t?.toolsDir??".lightcode/tools",hint:"Leave blank for .lightcode/tools in the workspace, which is the safer default: a tool is code the model wrote, and keeping it in the repository means every change lands in git and gets reviewed. One folder only \u2014 each tool's approved content hash is recorded alongside it.",browse:{purpose:"python.toolsDir",kind:"folder"},onBrowse:e.onBrowse,onChange:f}),(0,J.jsx)(ln,{id:"lc-py-venv",label:"Python environment",value:i,placeholder:t?.venvPath??"the project's .venv, or one created for you",hint:"Leave blank to prefer the project's own .venv \u2014 that is where its internal libraries already are. Give a venv folder, or a python.exe directly, to override.",browse:{purpose:"python.venvPath",kind:"folder"},onBrowse:e.onBrowse,onChange:o}),(0,J.jsx)(ln,{id:"lc-py-interpreter",label:"Interpreter to use without uv",value:a,placeholder:t?.venvSource==="interpreter"?t.venvPath||"python":"python3, then python, from PATH",hint:"Only used when uv is not installed. Nothing is installed into it \u2014 a tool needing a package it does not already have is refused, naming the package.",browse:{purpose:"python.interpreterPath",kind:"file"},onBrowse:e.onBrowse,onChange:l}),e.programming!==void 0&&e.programming.profiles.length>0&&(0,J.jsxs)("div",{style:{marginBottom:10},children:[(0,J.jsx)("label",{htmlFor:"lc-py-writer",style:I(),children:"Which model writes the code"}),(0,J.jsx)(ze,{id:"lc-py-writer",value:e.programming.selectedId??"",onChange:e.programming.onSelect,options:[{value:"",label:"The model you are chatting with"},...e.programming.profiles.map(w=>({value:w.id,label:w.label}))]}),(0,J.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"4px 0 0"},children:e.programming.selectedId===void 0||e.programming.selectedId===""?(0,J.jsx)(J.Fragment,{children:"The assistant writes the Python itself. Pick a different profile and it will describe the tool instead, leaving the file to a model chosen for code."}):(0,J.jsx)(J.Fragment,{children:"The assistant describes what the tool must do and this profile writes the file. You still approve the source before anything is saved, and the prompt says which model produced it."})})]}),(0,J.jsxs)("div",{style:{marginBottom:10},children:[(0,J.jsx)("label",{htmlFor:"lc-py-index",style:I(),children:"Package index"}),(0,J.jsx)("input",{id:"lc-py-index",type:"text",value:D,spellCheck:!1,placeholder:"https://artifactory.corp/api/pypi/pypi/simple",onChange:w=>p(w.target.value),style:{...E(),fontFamily:tl}}),(0,J.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:"Where a tool's declared dependencies are fetched from. Point this at your internal mirror to make company packages installable \u2014 and to avoid reaching public PyPI at all."})]}),(0,J.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:10,cursor:"pointer"},children:[(0,J.jsx)("input",{type:"checkbox",checked:b,onChange:w=>S(w.target.checked)}),(0,J.jsx)("span",{style:{fontSize:12},children:"Offline \u2014 never fetch a package, use only what is already installed"})]}),(0,J.jsxs)("div",{style:{marginBottom:12},children:[(0,J.jsx)("label",{htmlFor:"lc-py-timeout",style:I(),children:"Timeout per call (seconds)"}),(0,J.jsx)("input",{id:"lc-py-timeout",type:"number",min:1,max:600,value:v,onChange:w=>k(w.target.value),style:{...E(),width:120}}),(0,J.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:"A tool that exceeds this is stopped and its whole process tree killed, so a hang cannot hold up the conversation."})]}),(0,J.jsxs)("div",{style:{marginBottom:12},children:[(0,J.jsx)("span",{style:I(),children:"Environment variables"}),(0,J.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:6},children:"Set for every tool, every time one runs \u2014 the worker, and the commands that build the environment. Use them for the host, account or token a tool needs to reach an internal system, instead of writing those into the tool's source where they get committed and have to be changed in every tool at once."}),y.length===0&&(0,J.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:6},children:"None. Tools run with a minimal environment: no API keys, and nothing inherited that is not needed to start Python."}),y.map((w,V)=>(0,J.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"flex-start",marginBottom:6},children:[(0,J.jsx)("input",{type:"text",value:w.name,spellCheck:!1,placeholder:"API_HOST","aria-label":"Variable name",onChange:F=>T(we=>we.map((Xe,jt)=>jt===V?{...Xe,name:F.target.value}:Xe)),style:{...E(),fontFamily:tl,flex:"0 0 34%"}}),(0,J.jsxs)("div",{style:{flex:1},children:[(0,J.jsx)("input",{type:w.secret?"password":"text",value:w.value,spellCheck:!1,placeholder:w.secret&&w.hasValue?"Set \u2014 type to replace":"Value","aria-label":"Variable value",onChange:F=>T(we=>we.map((Xe,jt)=>jt===V?{...Xe,value:F.target.value}:Xe)),style:{...E(),fontFamily:tl,width:"100%"}}),(0,J.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,cursor:"pointer",marginTop:4},children:[(0,J.jsx)("input",{type:"checkbox",checked:w.secret,onChange:F=>T(we=>we.map((Xe,jt)=>jt===V?{...Xe,secret:F.target.checked,value:"",hasValue:!1}:Xe))}),(0,J.jsx)("span",{style:{fontSize:11,color:s.muted},children:"Secret \u2014 keep the value in secret storage, never in the config file"})]})]}),(0,J.jsx)("button",{type:"button",style:_(),"aria-label":`Remove ${w.name.length>0?w.name:"variable"}`,onClick:()=>T(F=>F.filter((we,Xe)=>Xe!==V)),children:"Remove"})]},V)),(0,J.jsx)("button",{type:"button",style:_(),onClick:()=>T(w=>[...w,{name:"",value:"",secret:!1,hasValue:!1}]),children:"Add variable"}),t!==void 0&&t.missingEnv!==void 0&&t.missingEnv.length>0&&(0,J.jsxs)("p",{style:{color:s.error,fontSize:11,margin:"8px 0 0"},children:["No value is stored for ",t.missingEnv.join(", "),". Tools run without"," ",t.missingEnv.length>1?"those variables":"that variable"," until one is set."]})]})]}),(0,J.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:12},children:[(0,J.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{let w=Number.parseInt(v,10);e.onSave({dynamicTools:c?"on":"off",uvPath:d.trim(),toolsDir:h.trim(),venvPath:i.trim(),interpreterPath:a.trim(),timeoutSeconds:Number.isFinite(w)?w:30,indexUrl:D.trim(),offline:b,env:y.filter(V=>V.name.trim().length>0).map(V=>({name:V.name.trim(),secret:V.secret,...V.secret&&V.value.length===0?{}:{value:V.value}}))}),A(!0)},children:"Save"}),M&&(0,J.jsx)("span",{style:{fontSize:11,color:s.muted},children:"Saved."})]}),t!==void 0&&(0,J.jsxs)("div",{style:{paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,J.jsx)("strong",{style:{fontSize:12},children:"Status"}),(0,J.jsx)("div",{style:{fontSize:11,marginTop:4,color:t.ready?s.muted:t.enabled?s.error:s.muted},children:t.detail}),t.enabled&&(0,J.jsxs)("div",{style:{fontSize:11,color:s.muted,marginTop:6,fontFamily:tl},children:[(0,J.jsxs)("div",{children:["tools: ",t.toolsDir||"\u2014"]}),(0,J.jsxs)("div",{children:["venv: ",t.venvPath||"\u2014"," ",t.venvSource==="workspace"?`(this project's${t.venvIsUvManaged?", uv-managed":""})`:t.venvSource==="configured"?"(configured)":t.venvSource==="created"?"(created by Light Code)":""]})]}),t.issues.length>0&&(0,J.jsxs)("div",{style:{marginTop:10},children:[(0,J.jsx)("strong",{style:{fontSize:12,color:s.error},children:"Not loaded"}),t.issues.map(w=>(0,J.jsxs)("div",{style:{marginTop:4},children:[(0,J.jsxs)("div",{style:{fontSize:11,color:s.error},children:["\u26A0 ",w.detail]}),(0,J.jsxs)("div",{style:{display:"flex",gap:6,marginTop:3},children:[(0,J.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px"},onClick:()=>e.onOpenFile(w.filePath),children:"Open"}),w.recoverable&&(0,J.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px"},title:"Trust this file as it stands now. Read it first \u2014 a change you did not make is exactly what the check is for.",onClick:()=>e.onApproveTool(w.name),children:"Approve this version"}),(0,J.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px"},onClick:()=>r(w.name),children:"Delete"})]})]},w.filePath))]}),(0,J.jsxs)("div",{style:{marginTop:10},children:[(0,J.jsx)("strong",{style:{fontSize:12},children:"Registered tools"}),t.tools.length===0?(0,J.jsx)("p",{style:{fontSize:11,color:s.muted,margin:"4px 0 0"},children:t.ready?"None yet. Ask the model to write one \u2014 it will show you the source before anything is saved.":"None."}):t.tools.map(w=>(0,J.jsxs)("div",{style:{padding:"6px 0",borderBottom:`1px solid ${s.border}`},children:[(0,J.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6},children:[(0,J.jsxs)("span",{style:{fontFamily:tl,fontSize:12},children:["py__",w.name]}),(0,J.jsxs)("span",{style:{marginLeft:"auto",display:"flex",gap:4},children:[(0,J.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px"},title:"Open the source in an editor tab",onClick:()=>e.onOpenFile(w.filePath),children:"Open"}),(0,J.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px"},onClick:()=>r(w.name),children:"Delete"})]})]}),w.description.length>0&&(0,J.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:w.description}),(0,J.jsx)("span",{style:{display:"block",color:s.muted,fontSize:10,fontFamily:tl},children:w.filePath}),n===w.name&&(0,J.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:6,fontSize:12},children:[(0,J.jsx)("span",{children:"Delete this tool and its approval?"}),(0,J.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{e.onDeleteTool(w.name),r(void 0)},children:"Delete"}),(0,J.jsx)("button",{type:"button",style:_(),onClick:()=>r(void 0),children:"Cancel"})]})]},w.name))]})]}),e.s3!==void 0&&(0,J.jsx)(df,{...e.s3,kind:"tools"})]})}var ie=U(re(),1);var ii=U(pe(),1);var Ut=U(re(),1),Po=U(pe(),1);function h2(e){let[t,n]=(0,Po.useState)(""),[r,i]=(0,Po.useState)(void 0),o=(0,Po.useMemo)(()=>new Set(e.selected),[e.selected]),a=f=>{if(e.includeSubfolders){for(let v of e.selected)if(v!==f&&f.startsWith(`${v}\\`))return v}},l=(0,Po.useMemo)(()=>{let f=new Set;for(let v of e.folders){let k=v.path.lastIndexOf("\\");k>0&&f.add(v.path.slice(0,k))}return f},[e.folders]),c=r??l,u=f=>{i(v=>{let k=new Set(v??l);return k.has(f)?k.delete(f):k.add(f),k})},d=(0,Po.useMemo)(()=>{let f=t.trim().toLowerCase();if(f.length===0)return c.size===0?e.folders:e.folders.filter(k=>{for(let D of c)if(k.path.startsWith(`${D}\\`))return!1;return!0});let v=new Set;for(let k of e.folders){if(!k.path.toLowerCase().includes(f))continue;v.add(k.path);let D=k.path.split("\\");for(let p=1;p<D.length;p++)v.add(D.slice(0,p).join("\\"))}return e.folders.filter(k=>v.has(k.path))},[e.folders,t,c,e.selected]),m=f=>e.selected.filter(v=>v!==f&&v.startsWith(`${f}\\`)).length,h=f=>{let v=new Set(o);v.has(f)?v.delete(f):v.add(f),e.onChange(e.folders.map(k=>k.path).filter(k=>v.has(k)))};return e.folders.length===0?(0,Ut.jsx)("span",{style:{color:s.muted,fontSize:11},children:"No folders loaded. Press Refresh, or check Outlook is running."}):(0,Ut.jsxs)("div",{children:[(0,Ut.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:6},children:[(0,Ut.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:()=>i(new Set(l)),children:"Collapse all"}),(0,Ut.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:()=>i(new Set),children:"Expand all"}),(0,Ut.jsx)("span",{style:{color:s.muted,fontSize:11},children:`${String(e.selected.length)} selected of ${String(e.folders.length)}`})]}),e.folders.length>12&&(0,Ut.jsx)("input",{type:"text",value:t,spellCheck:!1,placeholder:`Filter ${String(e.folders.length)} folders\u2026`,"aria-label":"Filter folders",onChange:f=>n(f.target.value),style:{...E(),marginBottom:6}}),(0,Ut.jsx)("div",{className:"lc-scroll",style:{maxHeight:260,overflowY:"auto",border:`1px solid ${s.border}`,borderRadius:4,padding:6},children:d.map(f=>{let v=a(f.path),k=o.has(f.path);return(0,Ut.jsxs)("label",{title:f.path,style:{display:"flex",gap:6,alignItems:"center",padding:"2px 0",paddingLeft:f.depth*14,cursor:v===void 0?"pointer":"default",opacity:v===void 0?1:.65},children:[l.has(f.path)?(0,Ut.jsx)("button",{type:"button","aria-label":c.has(f.path)?`Expand ${f.name}`:`Collapse ${f.name}`,style:{background:"none",border:"none",color:s.muted,cursor:"pointer",padding:0,width:12,fontSize:10,lineHeight:"12px"},onClick:D=>{D.preventDefault(),u(f.path)},children:c.has(f.path)?"\u25B6":"\u25BC"}):(0,Ut.jsx)("span",{style:{width:12}}),(0,Ut.jsx)("input",{type:"checkbox",checked:k||v!==void 0,disabled:v!==void 0,onChange:()=>h(f.path)}),(0,Ut.jsxs)("span",{style:{fontSize:12,minWidth:0,overflowWrap:"anywhere"},children:[f.name,typeof f.unread=="number"&&f.unread>0&&(0,Ut.jsxs)("span",{style:{color:s.muted},children:[" (",String(f.unread)," unread)"]}),c.has(f.path)&&m(f.path)>0&&(0,Ut.jsx)("span",{style:{color:s.accent,fontSize:11},children:` \u2014 ${String(m(f.path))} selected inside`}),v!==void 0&&(0,Ut.jsxs)("span",{style:{color:s.muted,fontSize:11},children:[" \u2014 covered by ",v.split("\\").pop()]})]})]},f.path)})}),(0,Ut.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:o.size===0?"Nothing selected \u2014 nothing will be indexed.":`${String(o.size)} folder(s) selected`})]})}function rR(e){return e<1024?`${String(e)} B`:e<1024*1024?`${(e/1024).toFixed(0)} KB`:`${(e/(1024*1024)).toFixed(1)} MB`}function nl(e){return(0,ie.jsxs)("section",{style:{marginBottom:18},children:[(0,ie.jsx)("h3",{style:tr(),children:e.title}),e.hint!==void 0&&(0,ie.jsx)("p",{style:{margin:"0 0 8px",color:s.muted,fontSize:11},children:e.hint}),e.children]})}function p2(e){let[t,n]=(0,ii.useState)(void 0),[r,i]=(0,ii.useState)("7"),[o,a]=(0,ii.useState)(!1),[l,c]=(0,ii.useState)([]),[u,d]=(0,ii.useState)(!0),[m,h]=(0,ii.useState)("15"),[f,v]=(0,ii.useState)("6"),[k,D]=(0,ii.useState)("");(0,ii.useEffect)(()=>{e.status!==void 0&&(a(e.status.enabled),c(e.status.folders),d(e.status.includeSubfolders!==!1),h(String(e.status.syncMinutes)),v(String(e.status.retentionMonths)),D(e.status.storeId??""))},[e.status]);let p=e.status;(0,ii.useEffect)(()=>{e.status?.available===!0&&e.tree.folders.length===0&&!e.tree.loading&&e.onRefreshFolders()},[e.status?.available]);let b=()=>{e.onSave({enabled:o,folders:l,includeSubfolders:u,syncMinutes:Math.max(5,Math.min(1440,Number(m)||15)),retentionMonths:Math.max(1,Math.min(120,Number(f)||6)),storeId:k})},S=(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("h2",{style:{margin:"0 0 4px",fontSize:14},children:"Outlook"}),(0,ie.jsx)("p",{style:{margin:"0 0 14px",color:s.muted,fontSize:11},children:"Index mail folders so the assistant can answer questions about them \u2014 what arrived in the last few hours, whether an alert keeps repeating, and when it usually lands."})]});return p===void 0?(0,ie.jsxs)("div",{children:[S,(0,ie.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Checking\u2026"})]}):p.available?(0,ie.jsxs)("div",{children:[S,(0,ie.jsx)(nl,{title:"Indexing",children:(0,ie.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",cursor:"pointer"},children:[(0,ie.jsx)("input",{type:"checkbox",checked:o,onChange:y=>a(y.target.checked),style:{marginTop:2}}),(0,ie.jsxs)("span",{children:[(0,ie.jsx)("span",{style:{display:"block",fontSize:13},children:"Keep mail indexed automatically"}),(0,ie.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11},children:"New messages are collected on a timer. Unticking stops it entirely \u2014 nothing is read while it is off."})]})]})}),(0,ie.jsxs)(nl,{title:"Folders",hint:"Tick what to index. Everything here came from Outlook, so nothing can be mistyped.",children:[(0,ie.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginBottom:6},children:[(0,ie.jsx)("button",{type:"button",style:_(),disabled:e.tree.loading,onClick:e.onRefreshFolders,children:e.tree.loading?"Scanning\u2026":"Rescan mailbox"}),e.tree.scannedAt!==void 0&&(0,ie.jsxs)("span",{style:{color:s.muted,fontSize:11},children:["Scanned ",new Date(e.tree.scannedAt).toLocaleString()]}),(0,ie.jsxs)("label",{style:{display:"flex",gap:6,alignItems:"center",cursor:"pointer",fontSize:11},children:[(0,ie.jsx)("input",{type:"checkbox",checked:u,onChange:y=>d(y.target.checked)}),(0,ie.jsx)("span",{children:"Include subfolders"})]})]}),e.tree.error!==void 0&&(0,ie.jsx)("span",{style:{display:"block",color:s.error,fontSize:11,marginBottom:6},children:e.tree.error}),(0,ie.jsx)(h2,{folders:e.tree.folders,selected:l,onChange:c,includeSubfolders:u})]}),(0,ie.jsxs)(nl,{title:"Where it is stored",hint:"Subjects, senders and the opening of each message are sent to your embedding endpoint. Choose a separate connection to keep mail off a shared cluster.",children:[(0,ie.jsx)(ze,{id:"lc-mail-store",value:k,options:[{value:"",label:"The active search connection"},...p.stores.map(y=>({value:y.id,label:y.label}))],onChange:D,ariaLabel:"Vector store for indexed mail"}),!p.semantic&&(0,ie.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:"No embedding model configured, so searching by meaning is off. Time windows, alert filtering and repeat detection all still work."})]}),(0,ie.jsx)(nl,{title:"Schedule and retention",hint:"Retention is the bound on the whole index, not just a cleanup: history is collected back to this limit and no further, and anything older is removed on the next check.",children:(0,ie.jsxs)("div",{style:{display:"flex",gap:10},children:[(0,ie.jsxs)("div",{style:{flex:1},children:[(0,ie.jsx)("label",{htmlFor:"lc-mail-sync",style:I(),children:"Check every (minutes)"}),(0,ie.jsx)("input",{id:"lc-mail-sync",type:"text",inputMode:"numeric",value:m,onChange:y=>h(y.target.value),style:E()})]}),(0,ie.jsxs)("div",{style:{flex:1},children:[(0,ie.jsx)("label",{htmlFor:"lc-mail-retention",style:I(),children:"Keep for (months)"}),(0,ie.jsx)("input",{id:"lc-mail-retention",type:"text",inputMode:"numeric",value:f,onChange:y=>v(y.target.value),style:E()})]})]})}),(0,ie.jsxs)(nl,{title:"Actions",children:[(0,ie.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,ie.jsx)("button",{type:"button",style:oe(!1),onClick:b,children:"Save"}),(0,ie.jsx)("button",{type:"button",style:_(),disabled:p.busy===!0||!o,onClick:e.onSyncNow,children:"Sync now"}),(0,ie.jsxs)("button",{type:"button",style:_(),disabled:p.busy===!0||p.indexed===0,title:`Remove indexed mail older than ${f} months`,onClick:e.onPrune,children:["Remove older than ",f,"m"]})]}),(0,ie.jsx)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",marginTop:8},children:t!==void 0?(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("span",{style:{fontSize:11},children:t==="clear"?`Throw away all ${String(p.indexed)} indexed message(s)?`:`Clear ${String(p.indexed)} message(s) and collect them again from Outlook?`}),(0,ie.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{e.onClear(t==="reindex"),n(void 0)},children:t==="clear"?"Clear it":"Reindex"}),(0,ie.jsx)("button",{type:"button",style:_(),onClick:()=>n(void 0),children:"Cancel"})]}):(0,ie.jsxs)(ie.Fragment,{children:[(0,ie.jsx)("button",{type:"button",style:_(),disabled:p.busy===!0||!o,title:"Clears the index and collects everything again. A large mailbox fills in over several passes.",onClick:()=>n("reindex"),children:"Reindex everything"}),(0,ie.jsx)("button",{type:"button",style:_(),disabled:p.busy===!0||p.indexed===0,title:"Removes every indexed message and its vectors",onClick:()=>n("clear"),children:"Clear index"})]})}),(0,ie.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap",marginTop:8},children:[(0,ie.jsx)("span",{style:{fontSize:11,color:s.muted},children:"Re-read the last"}),(0,ie.jsx)("input",{type:"text",inputMode:"numeric",value:r,"aria-label":"Days of mail to re-read",onChange:y=>i(y.target.value),style:{...E(),width:56}}),(0,ie.jsx)("span",{style:{fontSize:11,color:s.muted},children:"day(s)"}),(0,ie.jsx)("button",{type:"button",style:_(),disabled:p.busy===!0,title:"Fetches this window again and replaces what is stored, even where it is already indexed",onClick:()=>e.onRefreshDays(Math.max(1,Math.min(365,Number(r)||7))),children:"Refresh that window"})]}),(0,ie.jsx)(ki,{progress:e.progress,onStop:e.onStop}),(0,ie.jsxs)("div",{style:{marginTop:8,color:s.muted,fontSize:11},children:[(0,ie.jsx)("span",{style:{display:"block"},children:p.indexed===0?"Nothing indexed yet.":`${String(p.indexed)} message(s), ${rR(p.sizeBytes)} on disk${p.oldest!==void 0?`, oldest ${new Date(p.oldest).toLocaleDateString()}`:""}.`}),p.lastResult!==void 0&&(0,ie.jsx)("span",{style:{display:"block"},children:p.lastResult})]})]}),(0,ie.jsx)(nl,{title:"Try a search",hint:"Runs the same search the assistant would, against this index. The quickest way to tell an empty index from a search that is not working.",children:(0,ie.jsx)(Vr,{target:"mail",label:"Search indexed mail",hint:"Each hit shows when it was received, which folder it came from, and its id.",running:e.probe.running,result:e.probe.result,onProbe:e.onProbe,onClear:e.onClearProbe})})]}):(0,ie.jsxs)("div",{children:[S,(0,ie.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:4,padding:10,fontSize:11,color:s.muted},children:[(0,ie.jsx)("span",{style:{display:"block",marginBottom:6},children:"Outlook access is switched off, so nothing here can run yet. It is Windows only."}),(0,ie.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:e.onOpenTools,children:"Open Tools to enable Outlook"})]})]})}var ce=U(re(),1);var Wr=U(pe(),1);var oR="var(--vscode-editor-font-family, monospace)",aR={"built-in":"Built in",mcp:"MCP servers",python:"Python tools"},lR={read:"reads",edit:"edits",command:"runs commands",mcp:"mcp",always:"always available"};function g2(e){let[t,n]=(0,Wr.useState)(""),r=(0,Wr.useMemo)(()=>{let a=t.trim().toLowerCase();return a.length===0?e.tools:e.tools.filter(l=>l.name.toLowerCase().includes(a)||l.description.toLowerCase().includes(a))},[e.tools,t]),i=(0,Wr.useMemo)(()=>{let a=new Map;for(let l of r){let c=a.get(l.source);c===void 0?a.set(l.source,[l]):c.push(l)}return a},[r]),o=e.tools.filter(a=>!a.advertised).length;return(0,ce.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G,fontSize:13,color:s.foreground},children:[(0,ce.jsx)("h3",{style:{margin:"0 0 4px"},children:"Tools"}),(0,ce.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:0},children:"Everything the assistant can call right now \u2014 built in, from your MCP servers, and your own Python tools. Read-only: each is configured where it comes from."}),e.dispatcher&&(0,ce.jsxs)("p",{style:{color:s.muted,fontSize:11},children:[o," of these are kept out of the system prompt to save space. They are still callable \u2014 the assistant looks them up when it needs one. Turn that off in"," ",(0,ce.jsx)("strong",{children:"Search"})," if you would rather it saw them all."]}),(0,ce.jsx)(cR,{value:e.toolTimeoutSeconds,onSet:e.onSetToolTimeout}),e.docsIndex!==void 0&&(0,ce.jsxs)("section",{style:{marginTop:18,borderTop:`1px solid ${s.border}`,paddingTop:14},children:[(0,ce.jsx)("h3",{style:tr(),children:"Tool documentation index"}),(0,ce.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:["Tool schemas are kept out of every request and looked up on demand, so a tool has to be indexed before it can be found by meaning. That happens on its own a few seconds after anything changes \u2014 this is for when you would rather not wonder."," ",e.docsIndex.enabled?e.docsIndex.retrievalReady?"":"No embedding model is configured, so tools are matched on names and descriptions instead. They stay findable either way. Set one under Search to index by meaning.":"Looking tools up on demand is switched off under Search, so every tool is listed in full in each request and there is nothing to index."]}),(0,ce.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[(0,ce.jsx)("button",{type:"button",style:_(),disabled:!e.docsIndex.enabled||e.docsIndex.indexing||!e.docsIndex.retrievalReady,onClick:e.onIndexDocs,children:e.docsIndex.indexing?"Indexing\u2026":"Reindex tool documentation"}),(0,ce.jsx)("button",{type:"button",style:_(),disabled:!e.docsIndex.enabled||e.docsIndex.indexing,title:"Removes tool entries from the documentation index. Skills are left alone.",onClick:e.onClearDocs,children:"Clear tool entries"}),e.docsIndex.result!==void 0&&(0,ce.jsx)("span",{style:{color:s.muted,fontSize:11},children:e.docsIndex.result})]}),(0,ce.jsx)(ki,{progress:e.progress,onStop:e.onStopIndexing}),(0,ce.jsx)(Vr,{target:"docs",label:"Search indexed tool documentation",hint:"Runs the same lookup the assistant uses to find a tool. Skills share this index.",running:e.probe.running,result:e.probe.result,onProbe:e.onProbe,onClear:e.onClearProbe})]}),(0,ce.jsx)(sR,{office:e.office,onSet:e.onSetOffice}),(0,ce.jsxs)("div",{style:{margin:"10px 0"},children:[(0,ce.jsx)("label",{htmlFor:"lc-tools-search",style:I(),children:"Search"}),(0,ce.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,ce.jsx)("input",{id:"lc-tools-search",type:"search",value:t,placeholder:"e.g. read a spreadsheet",onChange:a=>n(a.target.value),style:{...E(),flex:1}}),(0,ce.jsx)("button",{type:"button",style:_(),title:"Re-ask for the catalogue. It updates on its own when a tool is added \u2014 this is for when you would rather not wonder.",onClick:e.onRefreshTools,children:"Refresh"})]})]}),(0,ce.jsxs)("p",{style:{color:s.muted,fontSize:11},children:[r.length," of ",e.tools.length," ",e.tools.length===1?"tool":"tools"]}),e.tools.length===0&&(0,ce.jsx)("p",{style:{color:s.muted,fontSize:12},children:"Nothing yet. Open a folder and configure a provider \u2014 the built-in tools appear once a session can start."}),[...i.entries()].map(([a,l])=>(0,ce.jsxs)("div",{style:{marginTop:14},children:[(0,ce.jsxs)("strong",{style:{fontSize:12},children:[aR[a]," ",(0,ce.jsxs)("span",{style:{color:s.muted},children:["(",l.length,")"]})]}),l.map(c=>(0,ce.jsxs)("div",{style:{padding:"6px 0",borderBottom:`1px solid ${s.border}`},children:[(0,ce.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,ce.jsx)("span",{style:{fontFamily:oR,fontSize:12},children:c.name}),(0,ce.jsx)("span",{style:{...st(),fontSize:9},children:lR[c.group]??c.group}),c.server!==void 0&&(0,ce.jsx)("span",{style:{...st(),fontSize:9},title:`From the ${c.server} server`,children:c.server}),!c.advertised&&(0,ce.jsx)("span",{style:{...st(),fontSize:9},title:"Registered but kept out of the system prompt. Still callable \u2014 the assistant looks it up first.",children:"looked up"})]}),(0,ce.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:2},children:[(0,ce.jsx)("div",{style:{color:s.muted,fontSize:11,flex:1,minWidth:0},children:c.description}),(0,ce.jsx)("input",{inputMode:"numeric","aria-label":`Timeout for ${c.name}`,title:c.timeoutSeconds===void 0?"Seconds this tool may take. Blank leaves it to whatever runs it.":c.timeoutIsOwn===!0?`${String(c.timeoutSeconds)}s, set on this tool. Clear it to inherit again.`:`${String(c.timeoutSeconds)}s, inherited. Type a number to set one just for this tool.`,defaultValue:c.timeoutIsOwn===!0?String(c.timeoutSeconds):"",placeholder:c.timeoutSeconds===void 0?"s":String(c.timeoutSeconds),onKeyDown:u=>{u.key==="Enter"&&u.currentTarget.blur()},onBlur:u=>{let d=u.target.value.trim();if(d.length===0){c.timeoutIsOwn===!0&&e.onSetToolTimeoutFor(c.name);return}let m=Number(d);if(!Number.isFinite(m)||m<5||m>3600){u.target.value=c.timeoutIsOwn===!0?String(c.timeoutSeconds):"";return}(m!==c.timeoutSeconds||c.timeoutIsOwn!==!0)&&e.onSetToolTimeoutFor(c.name,Math.round(m))},style:{width:54,flexShrink:0,background:s.inputBackground,color:c.timeoutIsOwn===!0?s.accent:s.inputForeground,border:`1px solid ${c.timeoutIsOwn===!0?s.accent:s.inputBorder}`,borderRadius:2,padding:"0 4px",fontFamily:G,fontSize:11,textAlign:"right"}})]})]},c.name))]},a)),e.tools.length>0&&r.length===0&&(0,ce.jsxs)("p",{style:{color:s.muted,fontSize:12,marginTop:12},children:["Nothing matches \u201C",t.trim(),"\u201D."]})]})}function sR(e){let{office:t}=e;return(0,ce.jsxs)("div",{style:{margin:"12px 0",padding:10,border:`1px solid ${s.border}`,borderRadius:6,opacity:t.supported?1:.6},children:[(0,ce.jsx)("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:"Excel and Outlook"}),(0,ce.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:t.supported?"Lets the assistant attach to the Office applications already running here. Off by default: nothing is started and nothing is read until you switch one on.":"Windows only \u2014 this uses COM to attach to a running Office application, which exists nowhere else. The tools are absent on this machine rather than present and failing."}),(0,ce.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",marginBottom:6,cursor:t.supported?"pointer":"not-allowed"},children:[(0,ce.jsx)("input",{type:"checkbox",checked:t.excel,disabled:!t.supported,onChange:n=>e.onSet(n.target.checked,t.outlook),style:{marginTop:2}}),(0,ce.jsxs)("span",{children:[(0,ce.jsx)("span",{style:{display:"block",fontSize:13},children:"Excel"}),(0,ce.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:["Read cells and formulas from open workbooks, trace where a value comes from, and read or replace VBA. ",(0,ce.jsx)("strong",{children:"It can read any workbook you have open"}),", including unsaved ones. Replacing a macro always asks first and shows the code."]})]})]}),(0,ce.jsxs)("label",{style:{display:"flex",gap:8,alignItems:"flex-start",cursor:t.supported?"pointer":"not-allowed"},children:[(0,ce.jsx)("input",{type:"checkbox",checked:t.outlook,disabled:!t.supported,onChange:n=>e.onSet(t.excel,n.target.checked),style:{marginTop:2}}),(0,ce.jsxs)("span",{children:[(0,ce.jsx)("span",{style:{display:"block",fontSize:13},children:"Outlook"}),(0,ce.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:["Search and read mail from the Outlook installed here. ",(0,ce.jsx)("strong",{children:"Read-only"})," \u2014 nothing can send, reply, delete or move a message. Message text becomes part of the conversation, so it goes to your model provider like anything else you paste in."]})]})]})]})}function cR(e){let[t,n]=(0,Wr.useState)(e.value===void 0?"":String(e.value));(0,Wr.useEffect)(()=>n(e.value===void 0?"":String(e.value)),[e.value]);let r=()=>{let i=t.trim();if(i.length===0){e.onSet();return}let o=Number(i);if(!Number.isFinite(o)||o<5||o>3600){n(e.value===void 0?"":String(e.value));return}e.onSet(Math.round(o))};return(0,ce.jsxs)("div",{style:{margin:"12px 0",padding:10,border:`1px solid ${s.border}`,borderRadius:6},children:[(0,ce.jsx)("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:"Tool timeout"}),(0,ce.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:"How long any one tool call may take. Applies to MCP servers, Python tools and the Excel and Outlook tools alike, and to anything added later. Blank leaves each kind at its own default. A timeout set on a particular tool or server still wins over this."}),(0,ce.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center"},children:[(0,ce.jsx)("input",{inputMode:"numeric",value:t,placeholder:"seconds","aria-label":"Tool timeout in seconds",onChange:i=>n(i.target.value),onBlur:r,onKeyDown:i=>{i.key==="Enter"&&i.currentTarget.blur()},style:{...E(),width:110}}),(0,ce.jsx)("span",{style:{color:s.muted,fontSize:11},children:e.value===void 0?"each tool decides":`${String(e.value)}s for everything`})]})]})}var We=U(re(),1),Sx=U(pe(),1);function y2(e){let t=e.items.filter(r=>r.status==="pending"),n=e.items.filter(r=>r.status!=="pending");return(0,We.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G,fontSize:13,color:s.foreground},children:[(0,We.jsx)("h3",{style:{margin:"0 0 4px"},children:"Review queue"}),(0,We.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:0},children:e.canDecide?"Python tools and skills written by other people. Nothing here can run until you approve it.":"What you have submitted. An administrator has to approve it before it can run."}),t.length===0&&(0,We.jsx)("p",{style:{color:s.muted,fontSize:12,marginTop:14},children:"Nothing waiting."}),t.map(r=>(0,We.jsx)(uR,{item:r,canDecide:e.canDecide,onDecide:e.onDecide},r.id)),n.length>0&&(0,We.jsxs)("section",{style:{marginTop:22,paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,We.jsx)("span",{style:I(),children:"Decided"}),n.map(r=>(0,We.jsxs)("div",{style:{padding:"6px 0",borderBottom:`1px solid ${s.border}`,fontSize:12},children:[(0,We.jsx)("span",{style:{...st(),fontSize:9,marginRight:6},children:r.status}),(0,We.jsx)("strong",{children:r.name})," ",(0,We.jsxs)("span",{style:{color:s.muted},children:["by ",r.authorName,r.decidedBy!==void 0?`, decided by ${r.decidedBy}`:""]}),r.reason!==void 0&&(0,We.jsx)("div",{style:{color:s.muted,fontSize:11,marginTop:2},children:r.reason})]},r.id))]})]})}function uR(e){let{item:t}=e,[n,r]=(0,Sx.useState)(!1),[i,o]=(0,Sx.useState)("");return(0,We.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:5,padding:10,marginBottom:10},children:[(0,We.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,flexWrap:"wrap"},children:[(0,We.jsx)("span",{style:{...st(),fontSize:9},children:t.kind==="python-tool"?"tool":"skill"}),(0,We.jsx)("strong",{style:{fontSize:13},children:t.name}),(0,We.jsxs)("span",{style:{color:s.muted,fontSize:11},children:["from ",t.authorName," \xB7 ",new Date(t.submittedAt).toLocaleString()]})]}),t.producedBy!==void 0&&(0,We.jsxs)("div",{style:{color:s.muted,fontSize:11,marginTop:4},children:["Written by ",t.producedBy]}),(0,We.jsx)("button",{type:"button",style:{..._(),fontSize:11,marginTop:8},"aria-expanded":n,onClick:()=>r(!n),children:n?"Hide the source":"Read the source"}),n&&(0,We.jsx)("div",{style:{marginTop:8},children:(0,We.jsx)(Zs,{path:t.name,before:t.existingContent,after:t.content})}),e.canDecide?(0,We.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10,alignItems:"center",flexWrap:"wrap"},children:[(0,We.jsx)("button",{type:"button",style:oe(!n),disabled:!n,title:n?void 0:"Read the source first",onClick:()=>e.onDecide(t.id,!0),children:"Approve"}),(0,We.jsx)("button",{type:"button",style:{..._(),color:s.error},onClick:()=>e.onDecide(t.id,!1,i.trim().length>0?i.trim():void 0),children:"Reject"}),(0,We.jsx)("input",{type:"text","aria-label":"Reason for rejecting",placeholder:"Why? The author sees this.",value:i,onChange:a=>o(a.target.value),style:{...E(),flex:1,minWidth:140}}),!n&&(0,We.jsx)("span",{style:{color:s.muted,fontSize:11,flexBasis:"100%"},children:"Open the source before approving it."})]}):(0,We.jsx)("div",{style:{color:s.muted,fontSize:11,marginTop:8},children:"Waiting for an administrator."})]})}var Ue=U(re(),1);var Yr=U(pe(),1);var Xs="var(--vscode-editor-font-family, monospace)";function b2(e){return(0,Ue.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G,fontSize:13,color:s.foreground},children:[(0,Ue.jsx)("h3",{style:{margin:"0 0 4px"},children:"Variables"}),(0,Ue.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:0},children:"Set as environment variables for everything a session runs \u2014 shell commands and Python tools."}),(0,Ue.jsxs)("p",{style:{color:s.error,fontSize:11,border:`1px solid ${s.error}`,borderRadius:8,padding:8,margin:"0 0 12px"},children:[(0,Ue.jsx)("strong",{children:"Not secret."})," Everything a session runs does so as the server\u2019s own account, so another user can have their assistant read these. Put an API key in"," ",(0,Ue.jsx)("strong",{children:"Providers"}),", which stores it separately and never sends it back to a page."]}),(0,Ue.jsx)(v2,{title:"Yours",hint:"Only your sessions see these.",variables:e.user,resolved:e.resolved,scope:"user",onSave:e.onSaveUser,editable:!0}),(0,Ue.jsx)(v2,{title:"Everyone's",hint:e.canEditAdmin?"Applied to every user, and these win where a name collides with someone\u2019s own.":"Set by an administrator. These win where a name collides with your own.",variables:e.admin,resolved:e.resolved,scope:"admin",onSave:e.onSaveAdmin,editable:e.canEditAdmin}),e.canEditAdmin&&(0,Ue.jsx)(dR,{ids:e.adminIds,onSave:e.onSaveAdminIds})]})}function v2(e){let[t,n]=(0,Yr.useState)(e.variables),[r,i]=(0,Yr.useState)(!1);(0,Yr.useEffect)(()=>{r||n(e.variables)},[e.variables,r]);let o=(c,u)=>{i(!0),n(d=>d.map((m,h)=>h===c?{...m,...u}:m))},a=t.filter(c=>c.name.length>0&&!Vd(c.name)),l=t.some(c=>c.name.trim().length===0);return(0,Ue.jsxs)("section",{style:{marginTop:16,paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,Ue.jsx)("span",{style:I(),children:e.title}),(0,Ue.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:e.hint}),t.length===0&&(0,Ue.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:"None set."}),t.map((c,u)=>{let d=e.resolved.find(f=>f.name===c.name),m=e.scope==="user"&&d!==void 0&&d.scope==="admin",h=c.name.length>0&&!Vd(c.name);return(0,Ue.jsxs)("div",{style:{marginBottom:8},children:[(0,Ue.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[(0,Ue.jsx)("input",{type:"text","aria-label":"Variable name",value:c.name,spellCheck:!1,disabled:!e.editable,placeholder:"NAME",onChange:f=>o(u,{name:f.target.value}),style:{...E(),width:170,fontFamily:Xs,...h?{borderColor:s.error}:{}}}),(0,Ue.jsx)("input",{type:"text","aria-label":"Variable value",value:c.value,spellCheck:!1,disabled:!e.editable,placeholder:"value",onChange:f=>o(u,{value:f.target.value}),style:{...E(),flex:1,minWidth:140,fontFamily:Xs}}),e.editable&&(0,Ue.jsx)("button",{type:"button","aria-label":`Remove ${c.name}`,title:"Remove",style:_(),onClick:()=>{i(!0),n(f=>f.filter((v,k)=>k!==u))},children:(0,Ue.jsx)(Wt,{})})]}),h&&(0,Ue.jsx)("div",{style:{color:s.error,fontSize:10,marginTop:2},children:"Letters, digits and underscore only, not starting with a digit \u2014 anything else cannot be set as an environment variable."}),m&&(0,Ue.jsxs)("div",{style:{color:s.muted,fontSize:10,marginTop:2},children:[(0,Ue.jsx)("span",{style:{...st(),fontSize:9,marginRight:4},children:"overridden"}),"An administrator set ",c.name," for everyone, so sessions use"," ",(0,Ue.jsx)("code",{style:{fontFamily:Xs},children:d.value})," and not yours."]})]},u)}),e.editable&&(0,Ue.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8,alignItems:"center",flexWrap:"wrap"},children:[(0,Ue.jsx)("button",{type:"button",style:_(),onClick:()=>{i(!0),n(c=>[...c,{name:"",value:""}])},children:"Add"}),(0,Ue.jsx)("button",{type:"button",style:oe(!r||a.length>0||l),disabled:!r||a.length>0||l,onClick:()=>{e.onSave(t.map(c=>({...c,name:c.name.trim()}))),i(!1)},children:"Save"}),l&&(0,Ue.jsx)("span",{style:{color:s.muted,fontSize:11},children:"A name is required."})]})]})}function dR(e){let[t,n]=(0,Yr.useState)(e.ids.join(`
|
|
138
|
-
`)),[r,i]=(0,Yr.useState)(!1);return(0,Yr.useEffect)(()=>{r||n(e.ids.join(`
|
|
139
|
-
`))},[e.ids,r]),(0,Ue.jsxs)("section",{style:{marginTop:16,paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,Ue.jsx)("span",{style:I(),children:"Administrators"}),(0,Ue.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:["One identity id per line \u2014 the immutable id your directory issues, not a username, which gets reassigned when someone leaves. Removing yourself is allowed; the way back is"," ",(0,Ue.jsx)("code",{style:{fontFamily:Xs},children:"--admin-id"})," on the command line."]}),(0,Ue.jsx)("textarea",{"aria-label":"Administrator ids",value:t,spellCheck:!1,rows:4,onChange:o=>{i(!0),n(o.target.value)},style:{...E(),width:"100%",fontFamily:Xs,resize:"vertical"}}),(0,Ue.jsx)("button",{type:"button",style:{...oe(!r),marginTop:8},disabled:!r,onClick:()=>{e.onSave(t.split(`
|
|
140
|
-
`).map(o=>o.trim()).filter(o=>o.length>0)),i(!1)},children:"Save"})]})}var te=U(re(),1);var rl=U(pe(),1);var sn=U(re(),1),il=U(pe(),1);var x2="var(--vscode-editor-font-family, monospace)";function S2(e){let[t,n]=(0,il.useState)(e.primary),[r,i]=(0,il.useState)(e.extras);(0,il.useEffect)(()=>n(e.primary),[e.primary]),(0,il.useEffect)(()=>i(e.extras),[e.extras]);let o=t!==e.primary||r.join("\0")!==e.extras.join("\0"),a=(l,c)=>i(u=>u.map((d,m)=>m===l?c:d));return(0,sn.jsxs)("section",{style:{marginTop:16,paddingTop:14,borderTop:`1px solid ${s.border}`},children:[(0,sn.jsx)("label",{style:I(),htmlFor:"lc-folder-primary",children:e.primaryLabel}),(0,sn.jsx)("input",{id:"lc-folder-primary",type:"text",value:t,spellCheck:!1,placeholder:e.primaryPlaceholder,onChange:l=>n(l.target.value),style:{...E(),fontFamily:x2}}),(0,sn.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,margin:"4px 0 12px"},children:e.primaryHint}),(0,sn.jsx)("span",{style:I(),children:e.extrasLabel}),(0,sn.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,margin:"0 0 8px"},children:e.extrasHint}),r.map((l,c)=>(0,sn.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:6},children:[(0,sn.jsx)("input",{type:"text",value:l,spellCheck:!1,"aria-label":`Folder ${c+1}`,onChange:u=>a(c,u.target.value),style:{...E(),fontFamily:x2}}),(0,sn.jsx)("button",{type:"button",title:"Remove this folder","aria-label":"Remove this folder",style:Ce("secondary"),onClick:()=>i(u=>u.filter((d,m)=>m!==c)),children:(0,sn.jsx)(Wt,{})})]},c)),(0,sn.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:8,flexWrap:"wrap"},children:[(0,sn.jsx)("button",{type:"button",style:_(),onClick:()=>i(l=>[...l,""]),children:"Add a folder"}),(0,sn.jsx)("button",{type:"button",style:_(),disabled:!o,onClick:()=>e.onSave(t.trim(),r.map(l=>l.trim()).filter(l=>l.length>0)),children:o?"Save folders":"Saved"}),(0,sn.jsx)("span",{style:{color:s.muted,fontSize:11,fontFamily:G},children:"Relative paths resolve against the workspace."})]})]})}var Zo=U(re(),1),k2=U(pe(),1);function w2(e){let[t,n]=(0,k2.useState)(void 0),r=e.problems.join("\0");return e.problems.length===0?(t!==void 0&&n(void 0),null):t===r?null:(0,Zo.jsxs)("div",{style:{marginTop:12},children:[(0,Zo.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,Zo.jsx)("strong",{style:{fontSize:12,color:s.error},children:e.title}),(0,Zo.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",marginLeft:"auto"},title:"Hide these until something changes. The files themselves are untouched \u2014 fix them and they stop being listed.",onClick:()=>n(r),children:"Dismiss"})]}),e.problems.map(i=>(0,Zo.jsxs)("div",{style:{fontSize:11,color:s.error,marginTop:4},children:["\u26A0 ",i]},i))]})}var ff="var(--vscode-editor-font-family, monospace)";function fR(e){let t=e.aliases??[],n=Uo(t),[r,i]=(0,rl.useState)(n),[o,a]=(0,rl.useState)(!1);(0,rl.useEffect)(()=>i(n),[n]);let l=Uo(Lr(r))!==n;return(0,te.jsxs)("section",{style:{marginTop:18,borderTop:`1px solid ${s.border}`,paddingTop:14},children:[(0,te.jsx)("h3",{style:{margin:"0 0 6px",fontSize:13},children:"Team skills"}),(0,te.jsxs)("p",{style:{margin:"0 0 8px",color:s.muted,fontSize:11},children:["One name covering every teammate\u2019s skills, so the assistant can search what other people have taught theirs. Everyone publishes to their own collection; set the same alias on each machine. Colleagues\u2019 skills are returned in full, because they have no file on your disk to open. ",(0,te.jsx)("strong",{children:"OpenSearch only."})]}),(0,te.jsxs)("label",{htmlFor:"lc-skills-alias",style:I(),children:["Shared skills aliases ",(0,te.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(optional)"})]}),(0,te.jsx)("input",{id:"lc-skills-alias",type:"text",value:r,spellCheck:!1,placeholder:"e.g. my-team-skills, platform-skills",onChange:c=>i(c.target.value),style:E()}),(0,te.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:"Separate several with commas, most specific first \u2014 a squad, a department, everyone. The first is the one a search uses when it is not told which. Up to 8."}),(0,te.jsxs)("div",{style:{display:"flex",gap:8,marginTop:8,alignItems:"center",flexWrap:"wrap"},children:[(0,te.jsx)("button",{type:"button",style:_(),disabled:!l,onClick:()=>e.onSaveAliases(Lr(r)),children:l?"1. Save these names":"1. Names saved"}),(0,te.jsx)("button",{type:"button",style:oe(t.length===0),disabled:t.length===0||e.publishing===!0,title:t.length===0?"Save the name first":"Embeds your skills and writes them to the shared collection",onClick:e.onPublish,children:e.publishing===!0?"Sending\u2026":"2. Send my skills to the team"})]}),(0,te.jsx)("div",{style:{display:"flex",gap:8,marginTop:8,alignItems:"center",flexWrap:"wrap"},children:o?(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("span",{style:{fontSize:11},children:"Remove every skill you have published?"}),(0,te.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{a(!1),e.onClear()},children:"Remove them"}),(0,te.jsx)("button",{type:"button",style:_(),onClick:()=>a(!1),children:"Keep them"})]}):(0,te.jsxs)(te.Fragment,{children:[(0,te.jsx)("button",{type:"button",style:_(),disabled:t.length===0||e.publishing===!0,onClick:()=>a(!0),children:"Remove mine from the pool"}),(0,te.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Only your own copies. Colleagues publish to their own collections, so this cannot reach theirs."})]})}),(0,te.jsx)(ki,{progress:e.progress,onStop:e.onStop}),e.result?.error!==void 0&&(0,te.jsx)("span",{style:{display:"block",color:s.error,fontSize:11,marginTop:6},children:e.result.error}),e.result?.error===void 0&&e.result?.cleared!==void 0&&(0,te.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:6},children:`Removed ${String(e.result.cleared)} published skill(s).`}),e.result?.error===void 0&&e.result?.cleared===void 0&&e.result?.count!==void 0&&(0,te.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:6},children:[`Published ${String(e.result.count)} skill(s) to "${e.result.collection??""}". `,"Sending again replaces your own copies and never touches anyone else\u2019s."]})]})}function _2(e){let[t,n]=(0,rl.useState)(void 0);return(0,te.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G,fontSize:13,color:s.foreground},children:[(0,te.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",marginBottom:12},children:[(0,te.jsx)("button",{type:"button",style:_(),disabled:e.indexing,onClick:e.onReindex,children:e.indexing?"Reindexing\u2026":"Reindex skills"}),(0,te.jsx)("button",{type:"button",style:_(),disabled:e.indexing,title:"Removes skill entries from the documentation index. Tools are left alone.",onClick:e.onClearIndex,children:"Clear skill entries"}),(0,te.jsx)("span",{style:{color:s.muted,fontSize:11},children:e.indexResult??"Reindexed automatically a few seconds after any change. This forces it now, for skills only."})]}),(0,te.jsx)(ki,{progress:e.indexProgress,onStop:e.onStopIndexing}),(0,te.jsx)(Vr,{target:"docs",label:"Search indexed tools and skills",hint:"Runs the same lookup the assistant uses to find a skill. Covers tool documentation too - they share one index.",running:e.probe.running,result:e.probe.result,onProbe:e.onProbe,onClear:e.onClearProbe}),(0,te.jsx)(fR,{...e.team}),(0,te.jsx)("h3",{style:{margin:"0 0 4px"},children:"Skills"}),(0,te.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:0},children:"Notes the assistant keeps about this workspace \u2014 internal libraries, conventions, anything you would otherwise explain again each time. Tell it something durable and it will offer to record one; you approve the text before it is written."}),(0,te.jsxs)("p",{style:{color:s.muted,fontSize:11},children:["Only each ",(0,te.jsx)("strong",{children:"description"})," below is loaded into every conversation. The bodies are read on demand, so a long skill costs nothing until it is relevant.",e.skillsDir!==void 0&&(0,te.jsxs)(te.Fragment,{children:[" ","They are plain markdown in ",(0,te.jsx)("code",{style:{fontFamily:ff},children:e.skillsDir}),", so they land in git and can be reviewed like any other file."]})]}),(0,te.jsxs)("div",{style:{margin:"10px 0",padding:10,border:`1px solid ${s.border}`,borderRadius:6},children:[(0,te.jsx)("div",{style:{fontSize:13,fontWeight:600,marginBottom:2},children:"Standing instructions"}),(()=>{let r=e.skills.find(i=>i.always===!0);return r===void 0?(0,te.jsxs)(te.Fragment,{children:[(0,te.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:["One skill can be included in ",(0,te.jsx)("strong",{children:"every"})," session, in full, rather than offered by name \u2014 for the things you would otherwise repeat at the start of each conversation. It is paid for on every request, so keep it short."]}),(0,te.jsx)("button",{type:"button",style:_(),onClick:e.onOpenStandingSkill,children:"Create standing instructions"})]}):(0,te.jsxs)(te.Fragment,{children:[(0,te.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:[(0,te.jsx)("strong",{children:r.name})," is included in every session, in full. Remove"," ",(0,te.jsx)("code",{style:{fontFamily:ff},children:"always: true"})," from its frontmatter to make it an ordinary skill again."]}),(0,te.jsx)("button",{type:"button",style:_(),onClick:e.onOpenStandingSkill,children:"Edit standing instructions"})]})})()]}),(0,te.jsx)(w2,{title:"Not loaded",problems:e.issues.map(r=>`${r.filePath} \u2014 ${r.detail}`)}),(0,te.jsx)("div",{style:{marginTop:14},children:e.skills.length===0?(0,te.jsx)("p",{style:{color:s.muted,fontSize:12},children:e.skillsDir===void 0?"Open a folder \u2014 skills belong to a workspace.":"None yet. Explain something about this codebase and the assistant will offer to record it."}):e.skills.map(r=>(0,te.jsxs)("div",{style:{padding:"8px 0",borderBottom:`1px solid ${s.border}`},children:[(0,te.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:8},children:[(0,te.jsx)("strong",{style:{fontFamily:ff,fontSize:12},children:r.name}),r.sourceDir!==void 0&&e.skillsDir!==void 0&&r.sourceDir!==e.skillsDir&&(0,te.jsx)("span",{style:{...st(),fontSize:9},title:`Read-only, from ${r.sourceDir}`,children:"shared"}),(0,te.jsxs)("span",{style:{marginLeft:"auto",display:"flex",alignItems:"center",gap:4},children:[(0,te.jsx)("button",{type:"button",style:_(),title:"Open this skill in an editor tab",onClick:()=>e.onOpenFile(r.filePath),children:"Open"}),r.sourceDir===void 0||e.skillsDir===void 0||r.sourceDir===e.skillsDir?(0,te.jsx)("button",{type:"button",style:_(),onClick:()=>n(r.name),children:"Remove"}):(0,te.jsx)("span",{style:{color:s.muted,fontSize:10},children:"read-only"})]})]}),(0,te.jsx)("div",{style:{color:s.muted,fontSize:11,marginTop:2},children:r.description}),(0,te.jsx)("div",{style:{color:s.muted,fontSize:10,fontFamily:ff,marginTop:2},children:r.filePath}),t===r.name&&(0,te.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginTop:6,fontSize:12},children:[(0,te.jsx)("span",{children:"Delete this skill file?"}),(0,te.jsx)("button",{type:"button",style:oe(!1),onClick:()=>{e.onDelete(r.name),n(void 0)},children:"Delete"}),(0,te.jsx)("button",{type:"button",style:_(),onClick:()=>n(void 0),children:"Keep"})]})]},r.name))}),(0,te.jsx)(S2,{primary:e.configuredDir,primaryPlaceholder:e.skillsDir??".lightcode/skills",primaryLabel:"Where new skills are saved",primaryHint:"Leave blank for .lightcode/skills in the workspace. Creating, editing and deleting all happen here.",extras:e.extraDirs,extrasLabel:"Also read skills from",extrasHint:"Shared or reference folders, searched in order after the one above. Never written to, so a folder shared with colleagues stays safe. A name defined twice is taken from the first folder that has it.",onSave:e.onSaveDirs}),e.s3!==void 0&&(0,te.jsx)(df,{...e.s3,kind:"skills",manageConnections:!0})]})}var j=U(re(),1);var cn=U(pe(),1);var ol="var(--vscode-editor-font-family, monospace)",mR={read:"Reading",edit:"Editing files",command:"Running commands",mcp:"MCP servers",always:"Always available"};function hR(){return{id:"",name:"",prompt:"",trigger:{kind:"daily",hour:9,minute:0},enabled:!0,allowedTools:[]}}function $2(e){let[t,n]=(0,cn.useState)(void 0),[r,i]=(0,cn.useState)(Date.now()),[o,a]=(0,cn.useState)(void 0);return(0,cn.useEffect)(()=>{let l=setInterval(()=>i(Date.now()),3e4);return()=>clearInterval(l)},[]),t!==void 0?(0,j.jsx)(pR,{schedule:t,tools:e.tools,skills:e.skills,mentionCandidates:e.mentionCandidates,onQueryMentions:e.onQueryMentions,onCancel:()=>n(void 0),onSave:l=>{e.onSave(l),n(void 0)}}):(0,j.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G,fontSize:13,color:s.foreground},children:[(0,j.jsx)("h3",{style:{margin:"0 0 4px"},children:"Schedules"}),(0,j.jsx)("p",{style:{color:s.muted,fontSize:11,marginTop:0},children:"A prompt that runs on its own and leaves a normal task you can read afterwards. Each one can use only the tools you tick \u2014 nobody is present to approve anything while it runs."}),(0,j.jsx)("p",{style:{color:s.muted,fontSize:11},children:"Schedules only fire while VS Code is open. One that came due while it was closed runs shortly after you next open it, once \u2014 not repeatedly to catch up."}),(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap",padding:"6px 8px",borderRadius:6,fontSize:11,border:`1px solid ${e.scheduler?.running===!1?s.error:s.border}`,color:e.scheduler?.running===!1?s.error:s.muted},children:[(0,j.jsx)("span",{children:e.scheduler?.running===!1?"The scheduler is not running \u2014 nothing will fire.":`Scheduler running${e.scheduler?.lastTickAt===void 0?" \u2014 first check within a minute":`, last checked ${new Date(e.scheduler.lastTickAt).toLocaleTimeString()}`}`}),(0,j.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",marginLeft:"auto"},title:"Stop and start the timer. Safe at any time; a run already in progress is unaffected.",onClick:e.onRestartScheduler,children:"Restart"})]}),e.schedules.length===0?(0,j.jsx)("p",{style:{color:s.muted,fontSize:12,marginTop:14},children:"None yet."}):(0,j.jsx)("div",{style:{marginTop:12},children:e.schedules.map(l=>(0,j.jsxs)("div",{style:{padding:"8px 0",borderBottom:`1px solid ${s.border}`},children:[(0,j.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,flexWrap:"wrap"},children:[(0,j.jsx)("strong",{style:{fontSize:12},children:l.name}),l.allowedTools.length===0?(0,j.jsx)("span",{style:{...st(),fontSize:9},title:"Can answer, but cannot use any tool",children:"no tools"}):(0,j.jsxs)("span",{style:{...st(),fontSize:9},children:[l.allowedTools.length," ",l.allowedTools.length===1?"tool":"tools"]}),Gd(e.tools,l.allowedTools).length>0&&(0,j.jsx)("span",{style:{...st("warning"),fontSize:9},title:"This schedule can change things without anyone watching",children:"can act"}),(0,j.jsxs)("span",{style:{marginLeft:"auto",display:"flex",gap:4},children:[(0,j.jsx)("button",{type:"button",title:e.runningId===l.id?"Running now":"Run now","aria-label":"Run now",disabled:e.runningId===l.id,style:Ce("ghost",e.runningId===l.id),onClick:()=>e.onRunNow(l.id),children:(0,j.jsx)(Zb,{})}),(0,j.jsx)("button",{type:"button",title:l.enabled?"Pause \u2014 keeps its history":"Resume","aria-label":l.enabled?"Pause":"Resume",style:Ce("ghost"),onClick:()=>e.onToggle(l.id,!l.enabled),children:l.enabled?(0,j.jsx)(tz,{}):(0,j.jsx)(Zb,{})}),(0,j.jsx)("button",{type:"button",title:"Edit","aria-label":"Edit",style:_(),onClick:()=>n(l),children:"Edit"}),(0,j.jsx)("button",{type:"button",title:"Duplicate this schedule. The copy is paused so you can edit it first.","aria-label":"Duplicate",style:Ce("ghost"),onClick:()=>e.onDuplicate(l.id),children:(0,j.jsx)(Pr,{})}),(0,j.jsx)("button",{type:"button",title:"Delete this schedule","aria-label":"Delete this schedule",style:Ce("ghost"),onClick:()=>e.onDelete(l.id),children:(0,j.jsx)(Wt,{})})]})]}),(0,j.jsxs)("div",{style:{color:s.muted,fontSize:11,marginTop:2},children:[Tb(l.trigger)," \xB7 ",Cb(l,r)]}),(l.runs??[]).length>0&&(0,j.jsxs)("button",{type:"button",className:"lc-btn","aria-expanded":o===l.id,onClick:()=>a(o===l.id?void 0:l.id),style:{display:"flex",alignItems:"center",gap:5,marginTop:4,padding:"2px 4px 2px 0",background:"transparent",border:"none",borderRadius:6,color:s.muted,cursor:"pointer",fontFamily:G,fontSize:11},children:[(0,j.jsx)("span",{style:{display:"flex",transform:o===l.id?"rotate(90deg)":"none",transition:"transform 190ms cubic-bezier(0.22, 0.85, 0.28, 1)"},children:(0,j.jsx)(Ro,{})}),(l.runs??[]).length," run",(l.runs??[]).length===1?"":"s"]}),o===l.id&&(l.runs??[]).length>0&&(0,j.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",marginLeft:18},title:"Forget this schedule's runs. The transcripts themselves stay in History.",onClick:()=>e.onClearRuns(l.id),children:"Clear these runs"}),o===l.id&&(l.runs??[]).map((c,u)=>(0,j.jsxs)("div",{style:{display:"flex",alignItems:"baseline",gap:6,padding:"3px 0 3px 18px",fontSize:11,color:s.muted},children:[(0,j.jsx)("span",{title:c.result,style:{color:c.result==="error"?s.error:s.accent,flexShrink:0},children:c.result==="error"?"\u2717":"\u2713"}),(0,j.jsx)("span",{style:{flexShrink:0},children:new Date(c.at).toLocaleString()}),c.durationMs!==void 0&&(0,j.jsxs)("span",{style:{flexShrink:0},children:[(c.durationMs/1e3).toFixed(1),"s"]}),c.summary!==void 0&&(0,j.jsx)("span",{style:{flex:1,minWidth:0,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},title:c.summary,children:c.summary}),c.reportPath!==void 0&&(0,j.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",marginLeft:"auto",color:s.accent,borderColor:s.accent},title:`Open the report this run wrote \u2014 ${c.reportPath}`,onClick:()=>e.onOpenReport(c.reportPath),children:"Report"}),c.taskId!==void 0&&(0,j.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",...c.reportPath===void 0?{marginLeft:"auto"}:{}},title:"Open this run's full transcript in an editor tab",onClick:()=>e.onOpenRun(c.taskId,`${l.name} \u2014 ${new Date(c.at).toLocaleString()}`),children:"Log"}),(0,j.jsx)("button",{type:"button",style:{..._(),fontSize:10,padding:"1px 6px",...c.taskId===void 0?{marginLeft:"auto"}:{}},title:"Remove this run from the log","aria-label":"Delete this run",onClick:()=>e.onDeleteRun(l.id,c.at),children:"\u2715"})]},`${String(c.at)}-${String(u)}`))]},l.id))}),(0,j.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",marginTop:14},children:[(0,j.jsx)("button",{type:"button",style:oe(!1),onClick:()=>n(hR()),children:"New schedule"}),e.schedules.some(l=>(l.runs??[]).length>0)&&(0,j.jsx)("button",{type:"button",style:_(),title:"Forget every schedule's run history. The transcripts stay in History and are deleted from there.",onClick:()=>e.onClearRuns(),children:"Clear all run logs"})]})]})}function pR(e){let[t,n]=(0,cn.useState)(e.schedule),[r,i]=(0,cn.useState)(""),[o,a]=(0,cn.useState)(""),[l,c]=(0,cn.useState)(!1),[u,d]=(0,cn.useState)(void 0),[m,h]=(0,cn.useState)(0),f=(0,cn.useRef)(null),v=u!==void 0&&e.mentionCandidates.length>0,k=(0,cn.useRef)(e.onQueryMentions);k.current=e.onQueryMentions,(0,cn.useEffect)(()=>{if(u===void 0)return;let Z=setTimeout(()=>k.current(u),120);return()=>clearTimeout(Z)},[u]);let D=(Z,fe)=>{d(Xd(Z,fe)),h(0)},p=Z=>{let fe=f.current,qe=fe?.selectionStart??t.prompt.length,qt=Kd(t.prompt,qe,Z);qt!==void 0&&(M({prompt:qt.text}),d(void 0),requestAnimationFrame(()=>{fe?.focus(),fe?.setSelectionRange(qt.caret,qt.caret)}))},b=o.trim().toLowerCase(),S=e.skills.filter(Z=>b.length===0||Z.name.toLowerCase().includes(b)||Z.description.toLowerCase().includes(b)),y=()=>t.allowedSkills??e.skills.map(Z=>Z.name),T=y().length,M=Z=>n(fe=>({...fe,...Z})),A=Z=>n(fe=>({...fe,trigger:{...fe.trigger,...Z}})),w=Gd(e.tools,t.allowedTools),V=t.name.trim().length>0&&t.prompt.trim().length>0,F=r.trim().toLowerCase(),we=Z=>{let fe=t.allowedTools.includes(Z.name);if(l&&!fe)return!1;if(F.length===0||fe)return!0;let qe=`${Z.name} ${Z.name.replace(/[_-]+/g," ")} ${Z.description}`.toLowerCase();return F.split(/\s+/).every(qt=>qe.includes(qt))},Xe=new Map;for(let Z of e.tools){if(Z.group==="always"||!we(Z))continue;let fe=Xe.get(Z.group)??[];fe.push(Z),Xe.set(Z.group,fe)}let jt=[...Xe.values()].flat(),Lt=jt.filter(Z=>!t.allowedTools.includes(Z.name)),gi=Z=>M({allowedTools:t.allowedTools.includes(Z)?t.allowedTools.filter(fe=>fe!==Z):[...t.allowedTools,Z]});return(0,j.jsxs)("div",{style:{padding:12,overflowY:"auto",fontFamily:G,fontSize:13,color:s.foreground},children:[(0,j.jsx)("h3",{style:{margin:"0 0 12px"},children:e.schedule.id===""?"New schedule":"Edit schedule"}),(0,j.jsx)("label",{style:I(),htmlFor:"lc-sched-name",children:"Name"}),(0,j.jsx)("input",{id:"lc-sched-name",type:"text",value:t.name,placeholder:"Morning build check",onChange:Z=>M({name:Z.target.value}),style:{...E(),marginBottom:12}}),(0,j.jsx)("label",{style:I(),htmlFor:"lc-sched-prompt",children:"Prompt"}),(0,j.jsx)("textarea",{id:"lc-sched-prompt",ref:f,value:t.prompt,rows:4,placeholder:"Read @src/app.ts and tell me if anything looks wrong.",onChange:Z=>{M({prompt:Z.target.value}),D(Z.target.value,Z.target.selectionStart)},onKeyDown:Z=>{if(v)if(Z.key==="ArrowDown")Z.preventDefault(),h(fe=>(fe+1)%e.mentionCandidates.length);else if(Z.key==="ArrowUp")Z.preventDefault(),h(fe=>(fe-1+e.mentionCandidates.length)%e.mentionCandidates.length);else if(Z.key==="Enter"||Z.key==="Tab"){Z.preventDefault();let fe=e.mentionCandidates[m];fe!==void 0&&p(fe)}else Z.key==="Escape"&&d(void 0)},style:{...E(),marginBottom:4,resize:"vertical",fontFamily:G}}),v&&(0,j.jsx)("div",{role:"listbox","aria-label":"Workspace files",className:"lc-scroll",style:{maxHeight:150,overflowY:"auto",border:`1px solid ${s.accent}`,borderRadius:8,marginBottom:6},children:e.mentionCandidates.map((Z,fe)=>(0,j.jsx)("button",{type:"button",role:"option","aria-selected":fe===m,onMouseDown:qe=>{qe.preventDefault(),p(Z)},style:{display:"block",width:"100%",textAlign:"left",padding:"4px 10px",background:fe===m?s.accent:"transparent",border:"none",color:fe===m?s.accentContrast:s.foreground,cursor:"pointer",fontFamily:ol,fontSize:11},children:Z},Z))}),(0,j.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:12},children:["Sent exactly as if you had typed it, including ",(0,j.jsx)("code",{style:{fontFamily:ol},children:"@"})," file mentions \u2014 their contents are attached when the schedule runs, not now. Nobody can answer a follow-up question, so ask for something it can finish alone."]}),(0,j.jsx)("span",{style:I(),children:"When"}),(0,j.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:12,flexWrap:"wrap"},children:[(0,j.jsx)(ze,{compact:!0,value:t.trigger.kind,ariaLabel:"How often",onChange:Z=>M({trigger:Z==="interval"?{kind:"interval",everyMinutes:60}:Z==="daily"?{kind:"daily",hour:9,minute:0}:{kind:"weekly",days:[1,2,3,4,5],hour:9,minute:0}}),options:[{value:"interval",label:"Every\u2026"},{value:"daily",label:"Daily at\u2026"},{value:"weekly",label:"On days\u2026"}]}),t.trigger.kind==="interval"?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("input",{type:"number",min:1,value:t.trigger.everyMinutes,"aria-label":"Minutes between runs",onChange:Z=>A({everyMinutes:Math.max(1,Number(Z.target.value)||1)}),style:{...E(),width:80}}),(0,j.jsx)("span",{style:{color:s.muted,fontSize:11},children:"minutes"})]}):(0,j.jsx)("input",{type:"time","aria-label":"Time of day",value:`${String(t.trigger.hour).padStart(2,"0")}:${String(t.trigger.minute).padStart(2,"0")}`,onChange:Z=>{let[fe,qe]=Z.target.value.split(":").map(Number);A({hour:fe??9,minute:qe??0})},style:{...E(),width:110}})]}),t.trigger.kind==="weekly"&&(0,j.jsx)("div",{style:{display:"flex",gap:4,marginBottom:12,flexWrap:"wrap"},children:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"].map((Z,fe)=>{let qe=t.trigger.kind==="weekly"&&t.trigger.days.includes(fe);return(0,j.jsx)("button",{type:"button","aria-pressed":qe,onClick:()=>{if(t.trigger.kind!=="weekly")return;let qt=qe?t.trigger.days.filter(N=>N!==fe):[...t.trigger.days,fe];qt.length>0&&A({days:qt})},style:{..._(),fontSize:11,padding:"3px 8px",background:qe?s.accent:s.secondaryButtonBackground,color:qe?s.accentContrast:s.secondaryButtonForeground},children:Z},Z)})}),(0,j.jsx)("span",{style:I(),children:"What it may use"}),(0,j.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:"Nothing is ticked to begin with. A tool you do not tick is not offered to the run at all, so a server added later never widens an existing schedule."}),(0,j.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:8,flexWrap:"wrap"},children:[(0,j.jsx)("input",{type:"text",value:r,spellCheck:!1,"aria-label":"Filter tools",placeholder:"Filter by name or description\u2026",onChange:Z=>i(Z.target.value),style:{...E(),flex:1,minWidth:140}}),(0,j.jsxs)("button",{type:"button","aria-pressed":l,title:"Show only what this schedule may use",onClick:()=>c(!l),style:{..._(),fontSize:11,background:l?s.accent:s.secondaryButtonBackground,color:l?s.accentContrast:s.secondaryButtonForeground},children:[t.allowedTools.length," selected"]})]}),F.length>0&&Lt.length>0&&(0,j.jsxs)("button",{type:"button",style:{..._(),fontSize:11,marginBottom:8},onClick:()=>M({allowedTools:[...t.allowedTools,...Lt.map(Z=>Z.name)]}),children:["Select the ",Lt.length," shown"]}),(0,j.jsxs)("div",{style:{marginBottom:10},children:[(0,j.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:4},children:"Always available"}),e.tools.filter(Z=>Z.group==="always").map(Z=>(0,j.jsxs)("label",{title:"Always available to every schedule \u2014 it performs no work on the workspace.",style:{display:"flex",gap:6,alignItems:"flex-start",marginBottom:4,opacity:.75},children:[(0,j.jsx)("input",{type:"checkbox",checked:!0,disabled:!0,style:{marginTop:3}}),(0,j.jsxs)("span",{children:[(0,j.jsx)("span",{style:{display:"block",fontFamily:ol,fontSize:11},children:Z.name}),(0,j.jsx)("span",{style:{display:"block",color:s.muted,fontSize:10},children:Z.description})]})]},Z.name))]}),jt.length===0&&(0,j.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 10px"},children:l?"Nothing selected yet.":`No tool matches "${r.trim()}".`}),[...Xe.entries()].map(([Z,fe])=>(0,j.jsxs)("div",{style:{marginBottom:10},children:[(0,j.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:4},children:mR[Z]??Z}),fe.map(qe=>(0,j.jsxs)("label",{style:{display:"flex",gap:6,alignItems:"flex-start",marginBottom:4,cursor:"pointer"},children:[(0,j.jsx)("input",{type:"checkbox",checked:t.allowedTools.includes(qe.name),onChange:()=>gi(qe.name),style:{marginTop:3}}),(0,j.jsxs)("span",{children:[(0,j.jsx)("span",{style:{display:"block",fontFamily:ol,fontSize:11},children:qe.name}),(0,j.jsx)("span",{style:{display:"block",color:s.muted,fontSize:10},children:qe.description})]})]},qe.name))]},Z)),(0,j.jsxs)("div",{style:{marginBottom:12},children:[(0,j.jsx)("span",{style:I(),children:"What it should know"}),e.skills.length===0?(0,j.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:["No skills recorded yet. Once there are some \u2014 markdown notes in"," ",(0,j.jsx)("code",{style:{fontFamily:ol},children:".lightcode/skills/"}),", written from the chat or by hand \u2014 you can pick which of them this run is told about."]}):(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:t.allowedSkills===void 0?(0,j.jsxs)(j.Fragment,{children:["All ",e.skills.length," ",e.skills.length===1?"skill is":"skills are"," ","included. Tick a few to narrow it \u2014 useful when a run only touches one area and the rest is prompt it pays for every time."]}):(0,j.jsxs)(j.Fragment,{children:["Only the ticked skills are put in this run\u2019s prompt. Unlike the chat, a schedule does not search for them \u2014 it may not have ",(0,j.jsx)("code",{children:"search_docs"}),", and nobody is watching if it comes up empty."]})}),(0,j.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",marginBottom:8,flexWrap:"wrap"},children:[(0,j.jsx)("input",{type:"search",value:o,spellCheck:!1,"aria-label":"Filter skills",placeholder:"Filter by name or description\u2026",onChange:Z=>a(Z.target.value),style:{...E(),flex:1,minWidth:140}}),(0,j.jsxs)("span",{style:{color:s.muted,fontSize:11},children:[T," of ",e.skills.length," selected"]})]}),(0,j.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:8,flexWrap:"wrap"},children:[t.allowedSkills!==void 0&&(0,j.jsx)("button",{type:"button",style:{..._(),fontSize:11},onClick:()=>{let Z={...t};delete Z.allowedSkills,n(Z)},children:"Include all of them again"}),b.length>0&&S.length>0&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)("button",{type:"button",style:{..._(),fontSize:11},onClick:()=>M({allowedSkills:[...new Set([...y(),...S.map(Z=>Z.name)])]}),children:["Tick the ",S.length," shown"]}),(0,j.jsxs)("button",{type:"button",style:{..._(),fontSize:11},onClick:()=>{let Z=new Set(S.map(fe=>fe.name));M({allowedSkills:y().filter(fe=>!Z.has(fe))})},children:["Untick the ",S.length," shown"]})]})]}),S.length===0&&(0,j.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:["No skill matches \u201C",o.trim(),"\u201D."]}),S.map(Z=>{let fe=t.allowedSkills===void 0||t.allowedSkills.includes(Z.name);return(0,j.jsxs)("label",{style:{display:"flex",gap:6,alignItems:"flex-start",marginBottom:4,cursor:"pointer"},children:[(0,j.jsx)("input",{type:"checkbox","data-skill":Z.name,checked:fe,onChange:()=>{let qe=y();M({allowedSkills:fe?qe.filter(qt=>qt!==Z.name):[...qe,Z.name]})},style:{marginTop:3}}),(0,j.jsxs)("span",{children:[(0,j.jsx)("span",{style:{display:"block",fontFamily:ol,fontSize:11},children:Z.name}),(0,j.jsx)("span",{style:{display:"block",color:s.muted,fontSize:10},children:Z.description})]})]},Z.name)})]})]}),w.length>0&&(0,j.jsxs)("p",{style:{color:s.error,fontSize:11,border:`1px solid ${s.error}`,borderRadius:8,padding:8,margin:"4px 0 12px"},children:["This schedule can act on its own \u2014 you have allowed ",w.join(" and "),". If anything it reads contains instructions, it may follow them with nobody watching. Grant this only for content you trust."]}),(0,j.jsxs)("div",{style:{display:"flex",gap:8,marginTop:10},children:[(0,j.jsx)("button",{type:"button",style:oe(!V),disabled:!V,onClick:()=>e.onSave({...t,name:t.name.trim(),prompt:t.prompt.trim()}),children:"Save"}),(0,j.jsx)("button",{type:"button",style:_(),onClick:e.onCancel,children:"Cancel"})]})]})}var He=U(re(),1),O2=U(pe(),1);var Re=U(re(),1);var Ct=U(re(),1);function z2(e){let t=(n,r)=>{e.onChange(e.headers.map((i,o)=>o===n?{...i,...r}:i))};return(0,Ct.jsxs)("div",{style:{marginBottom:16},children:[(0,Ct.jsxs)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 10px"},children:["For a gateway that authenticates on a header it expects rather than on an API key. Each value is stored in secure storage and the profile keeps only a pointer \u2014 or write"," ",(0,Ct.jsx)("code",{style:{fontFamily:Si},children:"env:API_TOKEN"})," to read it from the environment on every request, without storing it at all."]}),e.headers.map((n,r)=>(0,Ct.jsxs)("div",{style:{border:`1px solid ${s.border}`,borderRadius:4,padding:8,marginBottom:8},children:[(0,Ct.jsx)("label",{htmlFor:`lc-hdr-name-${String(r)}`,style:I(),children:"Header"}),(0,Ct.jsx)("input",{id:`lc-hdr-name-${String(r)}`,type:"text",value:n.name,spellCheck:!1,placeholder:"X-Gateway-Key",onChange:i=>t(r,{name:i.target.value}),style:{...E(),fontFamily:Si}}),(0,Ct.jsx)("label",{htmlFor:`lc-hdr-value-${String(r)}`,style:I(),children:"Value"}),(0,Ct.jsx)("input",{id:`lc-hdr-value-${String(r)}`,type:n.valueRef.startsWith("env:")||n.valueRef.startsWith("profile:")?"text":"password",value:n.valueRef,spellCheck:!1,placeholder:"the value, or env:API_TOKEN",onChange:i=>t(r,{valueRef:i.target.value}),style:{...E(),fontFamily:Si}}),n.valueRef.startsWith("profile:")&&(0,Ct.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:-10,marginBottom:10},children:"Stored securely. Replace this to change it \u2014 the value itself never comes back to this panel."}),n.valueRef.startsWith("env:")&&(0,Ct.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:-10,marginBottom:10},children:"Read from that environment variable on every request. It must be exported before Light Code starts."}),(0,Ct.jsxs)("label",{htmlFor:`lc-hdr-prefix-${String(r)}`,style:I(),children:["Prefix ",(0,Ct.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(optional)"})]}),(0,Ct.jsx)("input",{id:`lc-hdr-prefix-${String(r)}`,type:"text",value:n.prefix??"",spellCheck:!1,placeholder:"Bearer ",onChange:i=>t(r,{prefix:i.target.value.length===0?void 0:i.target.value}),style:{...E(),fontFamily:Si}}),(0,Ct.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:-10,marginBottom:10},children:["Put in front of the value. Include the trailing space if there should be one \u2014",(0,Ct.jsx)("code",{style:{fontFamily:Si},children:"\u201CBearer \u201D"}),", not"," ",(0,Ct.jsx)("code",{style:{fontFamily:Si},children:"\u201CBearer\u201D"}),"."]}),e.headers.length>1&&(0,Ct.jsx)("button",{type:"button",style:_(),onClick:()=>e.onChange(e.headers.filter((i,o)=>o!==r)),children:"Remove this header"})]},r)),(0,Ct.jsx)("button",{type:"button",style:_(),onClick:()=>e.onChange([...e.headers,{name:"",valueRef:""}]),children:"Add another header"})]})}var ue=U(re(),1),Ks=U(pe(),1);var ri="var(--vscode-editor-font-family, monospace)",T2="tokenScript";function C2(e){let t=e.value.command,n=(0,Ks.useMemo)(()=>t.length>=2&&(t[1]??"").trim().toLowerCase().endsWith(".py"),[t]),[r,i]=(0,Ks.useState)(!n&&t.length>0),[o,a]=(0,Ks.useState)(!1),l=!r&&(n||t.length===0),c=l?t[0]??"python":"",u=l?t[1]??"":"",d=l?t.slice(2):[],m=e.pickedPath?.purpose===T2?e.pickedPath.path:u,h=v=>{e.onChange({...e.value,command:[v.interpreter??c,v.script??m,...v.args??d].filter((k,D)=>D<2||k.trim().length>0)})},f=(v,k)=>{e.onChange({...e.value,[v]:k})};return(0,ue.jsxs)("div",{style:{marginBottom:16},children:[(0,ue.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 10px"},children:"Light Code runs this and uses what it prints as the token, fetching a new one before the old one expires. Useful when something else already does your gateway\u2019s authentication \u2014 the credential logic stays where it is, and Light Code never learns how it works."}),l?(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsx)(ln,{id:"lc-token-script",label:"Python script",value:m,placeholder:"C:\\path\\to\\get_token.py",hint:"It must print the token and nothing else, then exit 0. Send any logging to stderr \u2014 output with a space or a newline in it is refused rather than sent as a bearer token, because a stray log line becomes a 401 that looks like a bad credential.",browse:{purpose:T2,kind:"file",extensions:["py"]},...e.onBrowse===void 0?{}:{onBrowse:e.onBrowse},onChange:v=>h({script:v})}),(0,ue.jsx)("label",{htmlFor:"lc-token-interpreter",style:I(),children:"Interpreter"}),(0,ue.jsx)("input",{id:"lc-token-interpreter",type:"text",value:c,spellCheck:!1,placeholder:"python",onChange:v=>h({interpreter:v.target.value}),style:{...E(),fontFamily:ri}}),(0,ue.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:12},children:["Resolved on the PATH Light Code was started with. Give a full path if the one holding your library is not the first on it \u2014 in Python, ",(0,ue.jsx)("code",{style:{fontFamily:ri},children:"sys.executable"})," ","is that path."]}),(0,ue.jsxs)("label",{htmlFor:"lc-token-args",style:I(),children:["Arguments ",(0,ue.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(optional, one per line)"})]}),(0,ue.jsx)("textarea",{id:"lc-token-args",value:d.join(`
|
|
141
|
-
`),spellCheck:!1,rows:2,onChange:v=>h({args:v.target.value.split(`
|
|
142
|
-
`)}),style:{...E(),fontFamily:ri,resize:"vertical"}}),(0,ue.jsx)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:12},children:"One per line, because nothing is parsed by a shell \u2014 an argument containing a space stays one argument."})]}):(0,ue.jsxs)(ue.Fragment,{children:[(0,ue.jsxs)("label",{htmlFor:"lc-token-raw",style:I(),children:["Command ",(0,ue.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(one argument per line)"})]}),(0,ue.jsx)("textarea",{id:"lc-token-raw",value:t.join(`
|
|
143
|
-
`),spellCheck:!1,rows:4,onChange:v=>f("command",v.target.value.split(`
|
|
144
|
-
`)),style:{...E(),fontFamily:ri,resize:"vertical"}}),(0,ue.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginBottom:12},children:["The program first, then each argument on its own line. Spawned directly, so there are no pipes, no redirection and no ",(0,ue.jsx)("code",{style:{fontFamily:ri},children:"&&"})," ","\u2014 put shell logic in a script instead."]})]}),(0,ue.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:()=>i(v=>!v),children:l?"Enter a command instead":"It is a Python script"}),(0,ue.jsx)("div",{style:{marginTop:10},children:(0,ue.jsx)("button",{type:"button",style:{background:"none",border:"none",color:s.accent,cursor:"pointer",padding:0,fontSize:11},onClick:()=>a(v=>!v),children:o?"Hide advanced":"Advanced \u2014 JSON output, expiry, headers"})}),o&&(0,ue.jsxs)("div",{style:{marginTop:10,paddingLeft:10,borderLeft:`2px solid ${s.border}`},children:[(0,ue.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 10px"},children:"Leave these empty if the script prints a bare token. Fill the two paths in if it prints the gateway\u2019s JSON instead \u2014 then it refreshes on the real expiry rather than an assumed hour."}),(0,ue.jsx)("label",{htmlFor:"lc-token-path",style:I(),children:"Token field"}),(0,ue.jsx)("input",{id:"lc-token-path",type:"text",value:e.value.tokenPath??"",spellCheck:!1,placeholder:"access_token",onChange:v=>f("tokenPath",v.target.value.trim()===""?void 0:v.target.value),style:{...E(),fontFamily:ri}}),(0,ue.jsxs)("label",{htmlFor:"lc-expires-path",style:I(),children:["Expiry field ",(0,ue.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(seconds)"})]}),(0,ue.jsx)("input",{id:"lc-expires-path",type:"text",value:e.value.expiresInPath??"",spellCheck:!1,placeholder:"expires_in",onChange:v=>f("expiresInPath",v.target.value.trim()===""?void 0:v.target.value),style:{...E(),fontFamily:ri}}),(0,ue.jsxs)("div",{style:{display:"flex",gap:10},children:[(0,ue.jsxs)("div",{style:{flex:1},children:[(0,ue.jsx)("label",{htmlFor:"lc-token-expiry",style:I(),children:"Assume it lasts (s)"}),(0,ue.jsx)("input",{id:"lc-token-expiry",type:"text",inputMode:"numeric",value:e.value.fallbackExpirySeconds??"",placeholder:"3600",onChange:v=>f("fallbackExpirySeconds",Number(v.target.value)||void 0),style:E()})]}),(0,ue.jsxs)("div",{style:{flex:1},children:[(0,ue.jsx)("label",{htmlFor:"lc-token-skew",style:I(),children:"Refresh this early (s)"}),(0,ue.jsx)("input",{id:"lc-token-skew",type:"text",inputMode:"numeric",value:e.value.refreshSkewSeconds??"",placeholder:"60",onChange:v=>f("refreshSkewSeconds",Number(v.target.value)||void 0),style:E()})]}),(0,ue.jsxs)("div",{style:{flex:1},children:[(0,ue.jsx)("label",{htmlFor:"lc-token-timeout",style:I(),children:"Give up after (s)"}),(0,ue.jsx)("input",{id:"lc-token-timeout",type:"text",inputMode:"numeric",value:e.value.timeoutSeconds??"",placeholder:"30",onChange:v=>f("timeoutSeconds",Number(v.target.value)||void 0),style:E()})]})]}),(0,ue.jsxs)("label",{htmlFor:"lc-token-cwd",style:I(),children:["Run it in ",(0,ue.jsx)("span",{style:{color:s.muted,fontWeight:400},children:"(optional folder)"})]}),(0,ue.jsx)("input",{id:"lc-token-cwd",type:"text",value:e.value.cwd??"",spellCheck:!1,onChange:v=>f("cwd",v.target.value.trim()===""?void 0:v.target.value),style:{...E(),fontFamily:ri}}),(0,ue.jsxs)("div",{style:{display:"flex",gap:10},children:[(0,ue.jsxs)("div",{style:{flex:1},children:[(0,ue.jsx)("label",{htmlFor:"lc-token-header",style:I(),children:"Header name"}),(0,ue.jsx)("input",{id:"lc-token-header",type:"text",value:e.value.headerName??"",spellCheck:!1,placeholder:"Authorization",onChange:v=>f("headerName",v.target.value.trim()===""?void 0:v.target.value),style:{...E(),fontFamily:ri}})]}),(0,ue.jsxs)("div",{style:{flex:1},children:[(0,ue.jsx)("label",{htmlFor:"lc-token-prefix",style:I(),children:"Header prefix"}),(0,ue.jsx)("input",{id:"lc-token-prefix",type:"text",value:e.value.headerPrefix??"",spellCheck:!1,placeholder:"Bearer ",onChange:v=>f("headerPrefix",v.target.value===""?void 0:v.target.value),style:{...E(),fontFamily:ri}})]})]}),(0,ue.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:4},children:["Left empty, these follow the wire format \u2014 ",(0,ue.jsx)("code",{style:{fontFamily:ri},children:"Authorization: Bearer"})," ","for OpenAI, ",(0,ue.jsx)("code",{style:{fontFamily:ri},children:"x-api-key"})," for Anthropic."]})]})]})}var Rt=U(pe(),1);var ge=U(re(),1),I2=U(pe(),1);function Cn(e){return(0,ge.jsxs)("div",{style:{marginBottom:10},children:[(0,ge.jsx)("label",{htmlFor:e.id,style:I(),children:e.label}),(0,ge.jsx)("input",{id:e.id,type:"text",value:e.value??"",placeholder:e.placeholder,onChange:t=>e.onChange(t.target.value),style:E()}),e.hint!==void 0&&(0,ge.jsx)("span",{style:{color:s.muted,fontSize:11,display:"block",marginTop:2},children:e.hint})]})}function E2(e){return(0,ge.jsxs)("div",{style:{marginBottom:10},children:[(0,ge.jsx)("label",{htmlFor:e.id,style:I(),children:e.label}),(0,ge.jsx)("input",{id:e.id,type:"number",value:e.value??"",placeholder:e.placeholder,onChange:t=>{let n=Number.parseInt(t.target.value,10);e.onChange(Number.isNaN(n)?void 0:n)},style:E()})]})}function gR(e){let[t,n]=(0,I2.useState)(!1);return(0,ge.jsxs)("div",{style:{marginBottom:12},children:[(0,ge.jsxs)("button",{type:"button",onClick:()=>n(!t),style:{background:"transparent",border:"none",color:s.foreground,fontFamily:G,fontSize:12,padding:0,cursor:"pointer"},children:[t?"\u25BE":"\u25B8"," ",e.title]}),t&&(0,ge.jsx)("div",{style:{marginTop:8,paddingLeft:12},children:e.children})]})}function D2(e){let t=r=>e.onApigeeChange({...e.apigee,...r}),n=r=>e.onCertsChange({...e.certs,...r});return(0,ge.jsxs)("div",{style:{paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,ge.jsxs)("div",{style:{marginBottom:12},children:[(0,ge.jsx)("label",{htmlFor:"lc-auth-type",style:I(),children:"Authentication"}),(0,ge.jsx)(ze,{id:"lc-auth-type",value:e.authType,onChange:r=>e.onAuthTypeChange(r),style:{width:"100%"},options:[{value:"apiKey",label:"API key"},{value:"header",label:"A header the gateway expects"},{value:"tokenCommand",label:"Token from a script"},{value:"apigeeMtls",label:"Mutual TLS + OAuth (Apigee)"},{value:"none",label:"None"}]})]}),e.authType==="apigeeMtls"&&(0,ge.jsxs)(ge.Fragment,{children:[(0,ge.jsxs)("div",{style:{marginBottom:12},children:[(0,ge.jsx)("strong",{style:{fontSize:12,color:s.foreground},children:"Client certificate"}),(0,ge.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"4px 0 8px"},children:"Must live outside the workspace \u2014 a repository must not be able to read or replace your key material. Filenames resolve against the directory; absolute paths override it."})]}),(0,ge.jsx)(Cn,{id:"lc-cert-dir",label:"Certificate directory",value:e.certs.certDir,placeholder:"C:\\\\Users\\\\you\\\\certs",hint:"Leave blank to use the global certDir from config.",onChange:r=>n({certDir:r})}),(0,ge.jsx)(Cn,{id:"lc-cert-file",label:"Certificate file",value:e.certs.certFile,placeholder:"client.crt",onChange:r=>n({certFile:r})}),(0,ge.jsx)(Cn,{id:"lc-key-file",label:"Private key file",value:e.certs.keyFile,placeholder:"client.key",onChange:r=>n({keyFile:r})}),(0,ge.jsx)(Cn,{id:"lc-pfx-file",label:"PFX bundle (instead of certificate + key)",value:e.certs.pfxFile,placeholder:"client.pfx",hint:"Corporate Windows PKI usually issues a .pfx.",onChange:r=>n({pfxFile:r})}),(0,ge.jsx)(Cn,{id:"lc-ca-file",label:"Extra CA bundle",value:e.certs.caFile,placeholder:"corp-root.pem",hint:"Needed when your network intercepts TLS. NODE_EXTRA_CA_CERTS also works.",onChange:r=>n({caFile:r})}),(0,ge.jsx)(Pi,{id:"lc-cert-passphrase",label:"Key / PFX passphrase",hasValue:e.hasCertPassphrase,value:e.certPassphrase,onChange:e.onCertPassphraseChange,placeholder:"Leave blank if the key is not encrypted"}),(0,ge.jsx)("div",{style:{marginBottom:12},children:(0,ge.jsx)("strong",{style:{fontSize:12,color:s.foreground},children:"Token endpoint"})}),(0,ge.jsx)(Cn,{id:"lc-token-url",label:"Token URL",value:e.apigee.tokenUrl,placeholder:"https://gateway.example.com/oauth/token",hint:"Defaults to the base URL's origin + /oauth/token.",onChange:r=>t({tokenUrl:r})}),(0,ge.jsx)(Cn,{id:"lc-client-id",label:"Client ID",value:e.apigee.clientId,onChange:r=>t({clientId:r})}),(0,ge.jsx)(Pi,{id:"lc-client-secret",label:"Client secret",hasValue:e.hasClientSecret,value:e.clientSecret,onChange:e.onClientSecretChange,placeholder:"Stored in the OS keychain"}),(0,ge.jsx)(Cn,{id:"lc-scope",label:"Scope",value:e.apigee.scope,placeholder:"(optional)",onChange:r=>t({scope:r})}),(0,ge.jsxs)(gR,{title:"Token response and header mapping",children:[(0,ge.jsx)(Cn,{id:"lc-grant-type",label:"Grant type",value:e.apigee.grantType,placeholder:"client_credentials",onChange:r=>t({grantType:r})}),(0,ge.jsx)(Cn,{id:"lc-token-path",label:"Token path in response",value:e.apigee.tokenPath,placeholder:"access_token",hint:"Dotted path, e.g. data.jwt if your gateway nests it.",onChange:r=>t({tokenPath:r})}),(0,ge.jsx)(Cn,{id:"lc-expires-path",label:"Expiry path in response",value:e.apigee.expiresInPath,placeholder:"expires_in",onChange:r=>t({expiresInPath:r})}),(0,ge.jsx)(Cn,{id:"lc-token-header",label:"Header name",value:e.apigee.tokenHeaderName,placeholder:"Authorization",onChange:r=>t({tokenHeaderName:r})}),(0,ge.jsx)(Cn,{id:"lc-token-prefix",label:"Header prefix",value:e.apigee.tokenHeaderPrefix,placeholder:"Bearer ",onChange:r=>t({tokenHeaderPrefix:r})}),(0,ge.jsx)(E2,{id:"lc-fallback-expiry",label:"Fallback expiry (seconds)",value:e.apigee.fallbackExpirySeconds,placeholder:"3600",onChange:r=>t({...r!==void 0?{fallbackExpirySeconds:r}:{}})}),(0,ge.jsx)(E2,{id:"lc-refresh-skew",label:"Refresh skew (seconds)",value:e.apigee.refreshSkewSeconds,placeholder:"60",onChange:r=>t({...r!==void 0?{refreshSkewSeconds:r}:{}})})]})]}),(0,ge.jsxs)("div",{style:{marginBottom:12,paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,ge.jsx)("strong",{style:{fontSize:12,color:s.foreground},children:"Connection security"}),(0,ge.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"4px 0 8px"},children:"Needed when your network intercepts TLS, which is common on a corporate gateway. This is separate from the client certificate above: it decides whether you trust the server, not how the server identifies you."})]}),(0,ge.jsx)(Cn,{id:"lc-connection-ca",label:"Additional CA certificate",value:e.connectionTls.caFile,placeholder:"C:\\\\certs\\\\corp-root.pem",hint:"Only needed if this gateway uses a different root from the one in Settings \u2192 Network. Added to that one and to the built-in roots, never replacing either.",onChange:r=>e.onConnectionTlsChange({...e.connectionTls,caFile:r})}),(0,ge.jsxs)("label",{style:{display:"flex",alignItems:"flex-start",gap:6,marginBottom:6,fontSize:12},children:[(0,ge.jsx)("input",{type:"checkbox",style:{marginTop:2},checked:e.connectionTls.rejectUnauthorized===!1,onChange:r=>e.onConnectionTlsChange({...e.connectionTls,...r.target.checked?{rejectUnauthorized:!1}:{rejectUnauthorized:void 0}})}),(0,ge.jsx)("span",{style:{color:s.foreground},children:"Skip certificate verification for this profile"})]}),e.connectionTls.rejectUnauthorized===!1&&(0,ge.jsx)("p",{style:{color:s.error,fontSize:11,margin:"0 0 12px",paddingLeft:22},children:"Anyone able to intercept this connection can now read and modify it, including your API key, and nothing will detect it. Supplying the CA file above is the safe fix and solves the same problem."})]})}var _t=U(re(),1);function A2(e){let t=e.value.trim(),n=t.length>0?Sb(t,e.capabilities):void 0,r=o=>e.onCapabilitiesChange({...e.capabilities,...o}),i=()=>{let o={...e.capabilities};delete o.contextWindow,e.onCapabilitiesChange(o)};return(0,_t.jsxs)("div",{style:{marginBottom:12},children:[(0,_t.jsx)("label",{htmlFor:"lc-model",style:I(),children:"Model"}),(0,_t.jsxs)("div",{style:{display:"flex",gap:6,marginBottom:6},children:[(0,_t.jsx)("input",{id:"lc-model",type:"text",value:e.value,placeholder:"gpt-4o-mini",onChange:o=>e.onChange(o.target.value),style:E()}),(0,_t.jsx)("button",{type:"button",style:_(),onClick:e.onRefresh,disabled:e.loading,children:e.loading?"Loading\u2026":"Refresh"})]}),e.models.length>0&&(0,_t.jsx)(ze,{ariaLabel:"Choose from the gateway's catalogue",value:e.models.includes(e.value)?e.value:"",onChange:o=>{o.length>0&&e.onChange(o)},style:{width:"100%"},options:[{value:"",label:`Choose from ${e.models.length} available model(s)\u2026`},...e.models.map(o=>({value:o,label:o}))]}),e.warning!==void 0&&e.models.length===0&&(0,_t.jsx)("span",{style:{...on(),color:s.muted},children:e.warning}),e.error!==void 0&&(0,_t.jsx)("span",{style:on(),children:e.error}),n!==void 0&&(0,_t.jsxs)("div",{style:{marginTop:6,padding:8,border:`1px solid ${s.border}`,borderRadius:3},children:[(0,_t.jsx)("div",{style:{color:s.muted,fontSize:11,marginBottom:6},children:n.known?"Capabilities for this model. Edit any of them if your deployment differs.":"Unrecognised model id \u2014 these are conservative guesses. Correct them here."}),(0,_t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:6},children:[(0,_t.jsx)("label",{htmlFor:"lc-context-window",style:{...I(),marginBottom:0,flex:1},children:"Context window (tokens)"}),(0,_t.jsx)("input",{id:"lc-context-window",type:"number",min:1,value:e.capabilities.contextWindow??n.contextWindow,onChange:o=>{let a=Number.parseInt(o.target.value,10);Number.isNaN(a)||a<=0?i():r({contextWindow:a})},style:{...E(),width:130,flex:"none"}}),e.capabilities.contextWindow!==void 0&&(0,_t.jsx)("button",{type:"button",style:_(),onClick:i,title:"Use the built-in value",children:"Reset"})]}),(0,_t.jsxs)("div",{style:{display:"flex",gap:16},children:[(0,_t.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:s.foreground},children:[(0,_t.jsx)("input",{type:"checkbox",checked:n.supportsVision,onChange:o=>r({supportsVision:o.target.checked})}),"Accepts images"]}),(0,_t.jsxs)("label",{style:{display:"flex",alignItems:"center",gap:6,fontSize:12,color:s.foreground},children:[(0,_t.jsx)("input",{type:"checkbox",checked:n.supportsTools,onChange:o=>r({supportsTools:o.target.checked})}),"Supports tool calling"]})]})]})]})}var Zi=U(re(),1);var yR={certificates:"Load certificates",token:"Acquire credential",models:"List models"};function vR(e){return e==="ok"?{glyph:"\u2713",color:"var(--vscode-testing-iconPassed, #3fb950)"}:e==="failed"?{glyph:"\u2715",color:s.error}:e==="note"?{glyph:"\u2139",color:s.muted}:{glyph:"\u2013",color:s.muted}}function j2(e){return(0,Zi.jsxs)("div",{style:{marginBottom:16,paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,Zi.jsx)("button",{type:"button",style:_(),onClick:e.onRun,disabled:e.running,children:e.running?"Testing\u2026":"Test Connection"}),e.result!==void 0&&(0,Zi.jsx)("div",{style:{marginTop:8,fontFamily:G,fontSize:12},children:e.result.steps.map(t=>{let n=vR(t.status);return(0,Zi.jsxs)("div",{style:{display:"flex",gap:8,marginBottom:4},children:[(0,Zi.jsx)("span",{style:{color:n.color,width:12,flexShrink:0},children:n.glyph}),(0,Zi.jsxs)("div",{children:[(0,Zi.jsx)("div",{style:{color:s.foreground},children:yR[t.step]}),(0,Zi.jsx)("div",{style:{color:t.status==="failed"?s.error:s.muted,fontSize:11},children:t.detail})]})]},t.step)})})]})}function kx(e){let[t,n]=(0,Rt.useState)(e.initial.label),[r,i]=(0,Rt.useState)(e.initial.wireFormat),[o,a]=(0,Rt.useState)(e.initial.baseUrl),[l,c]=(0,Rt.useState)(e.initial.model),[u,d]=(0,Rt.useState)(""),[m,h]=(0,Rt.useState)(e.initial.authHeaders??[{name:"",valueRef:""}]),[f,v]=(0,Rt.useState)(e.initial.tokenCommand??{command:["python",""]}),[k,D]=(0,Rt.useState)(e.initial.authType),[p,b]=(0,Rt.useState)(e.initial.apigee??{}),[S,y]=(0,Rt.useState)(""),[T,M]=(0,Rt.useState)(e.initial.certs??{}),[A,w]=(0,Rt.useState)(""),[V,F]=(0,Rt.useState)(e.initial.modelCapabilities??{}),[we,Xe]=(0,Rt.useState)(e.initial.thinking?.level??""),[jt,Lt]=(0,Rt.useState)(e.initial.thinking?.style??"effort"),[gi,Z]=(0,Rt.useState)(e.initial.connectionTls??{}),[fe,qe]=(0,Rt.useState)([]),[qt,N]=(0,Rt.useState)(void 0),me=at=>fe.find(Ji=>Ji.path===at)?.message,bt=at=>{let Ji=Hd.find(yi=>yi.id===at);Ji!==void 0&&(i(Ji.wireFormat),a(Ji.baseUrl),t.trim().length===0&&n(Ji.label))},nt=()=>({...e.initial.id!==void 0?{id:e.initial.id}:{},label:t,wireFormat:r,baseUrl:o,model:l,authType:k,apiKey:u,...k==="tokenCommand"?{tokenCommand:f}:{},...k==="header"?{authHeaders:m}:{},...k==="apigeeMtls"?{apigee:p,clientSecret:S,certs:T,certPassphrase:A}:{},...Object.keys(V).length>0?{modelCapabilities:V}:{},...we===""?{}:{thinking:{level:we,...r==="openai"?{style:jt}:{}}},...gi.caFile!==void 0||gi.rejectUnauthorized!==void 0?{connectionTls:gi}:{}}),Ot=()=>{let at=o.trim();if(at===qt||at.length===0)return;try{let yi=new URL(at);if(yi.protocol!=="https:"&&yi.protocol!=="http:")return}catch{return}(k==="none"||u.trim().length>0||e.initial.hasApiKey||k==="apigeeMtls"||k==="header"&&m.some(yi=>yi.name.trim().length>0&&yi.valueRef.trim().length>0)||k==="tokenCommand"&&f.command.filter(yi=>yi.trim().length>0).length>0)&&(N(at),e.onRequestModels(nt()))},Ti=()=>{let at=xb({label:t,wireFormat:r,baseUrl:o,model:l});qe(at),!(at.length>0)&&e.onSave(nt())};return(0,Re.jsxs)("div",{style:{padding:12,overflowY:"auto"},children:[(0,Re.jsx)("h3",{style:{margin:"0 0 12px",color:s.foreground},children:e.initial.id===void 0?"Add Provider":"Edit Provider"}),(0,Re.jsxs)("div",{style:{marginBottom:12},children:[(0,Re.jsx)("label",{htmlFor:"lc-preset",style:I(),children:"Preset"}),(0,Re.jsx)(ze,{id:"lc-preset",value:"",placeholder:"Choose a preset\u2026",onChange:bt,style:{width:"100%"},options:Hd.map(at=>({value:at.id,label:at.label}))})]}),(0,Re.jsxs)("div",{style:{marginBottom:12},children:[(0,Re.jsx)("label",{htmlFor:"lc-label",style:I(),children:"Label"}),(0,Re.jsx)("input",{id:"lc-label",type:"text",value:t,onChange:at=>n(at.target.value),style:E()}),me("label")!==void 0&&(0,Re.jsx)("span",{style:on(),children:me("label")})]}),(0,Re.jsxs)("div",{style:{marginBottom:12},children:[(0,Re.jsx)("label",{htmlFor:"lc-base-url",style:I(),children:"Base URL"}),(0,Re.jsx)("input",{id:"lc-base-url",type:"text",value:o,placeholder:"https://api.openai.com/v1",onChange:at=>a(at.target.value),onBlur:Ot,style:E()}),me("baseUrl")!==void 0&&(0,Re.jsx)("span",{style:on(),children:me("baseUrl")})]}),(0,Re.jsx)(A2,{value:l,onChange:c,models:e.models,...e.modelsWarning!==void 0?{warning:e.modelsWarning}:{},loading:e.modelsLoading,onRefresh:()=>e.onRequestModels(nt()),...me("model")!==void 0?{error:me("model")}:{},capabilities:V,onCapabilitiesChange:F}),(0,Re.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:4,marginBottom:12},children:[(0,Re.jsx)("label",{style:I(),children:"Thinking"}),(0,Re.jsxs)("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[(0,Re.jsx)("div",{style:{minWidth:150,flex:1},children:(0,Re.jsx)(ze,{compact:!0,ariaLabel:"Thinking level",value:we,onChange:Xe,options:[{value:"",label:"Send nothing (default)"},{value:"off",label:"Off"},{value:"low",label:"Low"},{value:"medium",label:"Medium"},{value:"high",label:"High"}]})}),r==="openai"&&we!==""&&(0,Re.jsx)("div",{style:{minWidth:210,flex:1},children:(0,Re.jsx)(ze,{compact:!0,ariaLabel:"Thinking parameter",value:jt,onChange:at=>Lt(at),options:[{value:"effort",label:"as reasoning_effort"},{value:"qwen",label:"as enable_thinking (Qwen)"}]})})]}),(0,Re.jsx)("span",{style:{color:s.muted,fontSize:11,lineHeight:1.5},children:we===""?"Nothing is sent, which is how every profile behaved before this existed. Set it only against a gateway you know accepts it.":r!=="openai"?"This wire format spells thinking one way, so there is nothing to choose.":jt==="effort"?"Sends reasoning_effort. Right for OpenAI and most gateways fronting a reasoning model.":"Sends chat_template_kwargs.enable_thinking, which vLLM and SGLang expose for Qwen3 and its relatives. On or off only \u2014 the level is not a depth dial here."})]}),k==="header"&&(0,Re.jsx)(z2,{headers:m,onChange:h}),k==="tokenCommand"&&(0,Re.jsx)(C2,{value:f,onChange:v,...e.onBrowse===void 0?{}:{onBrowse:e.onBrowse},...e.pickedPath===void 0?{}:{pickedPath:e.pickedPath}}),k==="apiKey"&&(0,Re.jsxs)("div",{onBlur:Ot,children:[(0,Re.jsx)(Pi,{id:"lc-api-key",label:"API key",hasValue:e.initial.hasApiKey,value:u,onChange:d,...e.initial.apiKeyEnvVar===void 0?{}:{envVar:e.initial.apiKeyEnvVar}}),(0,Re.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11,marginTop:-10,marginBottom:16},children:["Enter ",(0,Re.jsx)("code",{style:{fontFamily:"var(--vscode-editor-font-family, monospace)"},children:"env:API_TOKEN"})," to read the key from that environment variable instead of storing it. It is read fresh on every request, and must be exported before Light Code starts \u2014 a child process cannot see a variable its parent set afterwards."]})]}),(0,Re.jsx)(D2,{authType:k,onAuthTypeChange:D,apigee:p,onApigeeChange:b,clientSecret:S,onClientSecretChange:y,hasClientSecret:e.initial.hasClientSecret,certs:T,onCertsChange:M,certPassphrase:A,onCertPassphraseChange:w,hasCertPassphrase:e.initial.hasCertPassphrase,connectionTls:gi,onConnectionTlsChange:Z}),(0,Re.jsx)(j2,{running:e.testRunning,...e.testResult!==void 0?{result:e.testResult}:{result:void 0},onRun:()=>e.onTestConnection(nt())}),(0,Re.jsxs)("div",{style:{display:"flex",gap:8},children:[(0,Re.jsx)("button",{type:"button",style:oe(!1),onClick:Ti,children:"Save"}),(0,Re.jsx)("button",{type:"button",style:_(),onClick:e.onCancel,children:"Cancel"})]})]})}function wx(e){let[t,n]=(0,O2.useState)({mode:"closed"}),r=i=>{e.onEditingChange(),n(i)};if(t.mode!=="closed"){let i=t.mode==="edit"?{id:t.profile.id,label:t.profile.label,wireFormat:t.profile.wireFormat,baseUrl:t.profile.baseUrl,model:t.profile.model,authType:t.profile.authType,hasApiKey:t.profile.hasApiKey,...t.profile.authHeaders===void 0?{}:{authHeaders:t.profile.authHeaders},...t.profile.tokenCommand===void 0?{}:{tokenCommand:t.profile.tokenCommand},...t.profile.apiKeyEnvVar===void 0?{}:{apiKeyEnvVar:t.profile.apiKeyEnvVar},hasClientSecret:t.profile.hasClientSecret,hasCertPassphrase:t.profile.hasCertPassphrase,...t.profile.apigee!==void 0?{apigee:t.profile.apigee}:{},...t.profile.certs!==void 0?{certs:t.profile.certs}:{},...t.profile.modelCapabilities!==void 0?{modelCapabilities:t.profile.modelCapabilities}:{},...t.profile.connectionTls!==void 0?{connectionTls:t.profile.connectionTls}:{}}:{label:"",wireFormat:"openai",baseUrl:"",model:"",authType:"apiKey",hasApiKey:!1,hasClientSecret:!1,hasCertPassphrase:!1};return(0,He.jsx)(kx,{onBrowse:e.onBrowse,...e.pickedPath===void 0?{}:{pickedPath:e.pickedPath},initial:i,onSave:o=>{e.onSave(o),n({mode:"closed"})},onCancel:()=>n({mode:"closed"}),onRequestModels:e.onRequestModels,onTestConnection:e.onTestConnection,models:e.models,...e.modelsWarning!==void 0?{modelsWarning:e.modelsWarning}:{},modelsLoading:e.modelsLoading,testRunning:e.testRunning,...e.testResult!==void 0?{testResult:e.testResult}:{}})}return(0,He.jsxs)("div",{style:{padding:12,overflowY:"auto"},children:[(0,He.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[(0,He.jsx)("h3",{style:{margin:0,color:s.foreground},children:"Providers"}),(0,He.jsx)(Bi,{scope:"user"})]}),e.profiles.length===0&&(0,He.jsx)("p",{style:{color:s.muted,fontFamily:G},children:"No providers configured yet. Add one to start chatting."}),e.profiles.map(i=>{let o=i.id===e.activeProfileId,a=e.sharedProfileIds?.includes(i.id)===!0;return(0,He.jsxs)("div",{"data-profile":i.id,style:{padding:10,marginBottom:8,borderRadius:4,border:`1px solid ${s.border}`,background:o?s.assistantBubble:"transparent"},children:[(0,He.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:6,marginBottom:4},children:[(0,He.jsx)("strong",{children:i.label}),o&&(0,He.jsx)(Bi,{scope:"user"})]}),(0,He.jsxs)("div",{style:{color:s.muted,fontSize:12,marginBottom:8},children:[i.baseUrl," \u2014 ",i.model]}),a&&(0,He.jsxs)("div",{style:{color:s.muted,fontSize:10,marginBottom:6},children:[(0,He.jsx)("span",{style:{...st(),fontSize:9,marginRight:5},children:"provided"}),"Set up by an administrator for everyone. Duplicate it to make a copy you can edit with your own key."]}),(0,He.jsxs)("div",{style:{display:"flex",gap:4,flexWrap:"wrap"},children:[!o&&(0,He.jsx)("button",{type:"button",title:"Use this profile","aria-label":"Use this profile",style:Ce("secondary"),onClick:()=>e.onSetActive(i.id),children:(0,He.jsx)(Oi,{})}),!a&&(0,He.jsx)("button",{type:"button",title:"Edit","aria-label":"Edit",style:Ce("secondary"),onClick:()=>r({mode:"edit",profile:i}),children:(0,He.jsx)(R$,{})}),(0,He.jsx)("button",{type:"button",title:a?"Copy this into a profile of your own":"Duplicate","aria-label":"Duplicate",style:Ce("secondary"),onClick:()=>e.onDuplicate(i.id),children:(0,He.jsx)(Pr,{})}),!a&&(0,He.jsx)("button",{type:"button",title:"Delete","aria-label":"Delete",style:{...Ce("secondary"),color:s.error},onClick:()=>e.onDelete(i.id),children:(0,He.jsx)(Wt,{})})]})]},i.id)}),(0,He.jsx)("button",{type:"button",style:oe(!1),onClick:()=>r({mode:"create"}),children:"Add Provider"}),(0,He.jsxs)("div",{style:{marginTop:20,paddingTop:12,borderTop:`1px solid ${s.border}`},children:[(0,He.jsx)("label",{style:I(),children:"Config file"}),(0,He.jsxs)("div",{style:{display:"flex",gap:6},children:[(0,He.jsx)("button",{type:"button",style:_(),onClick:e.onExport,children:"Export"}),(0,He.jsx)("button",{type:"button",style:_(),onClick:e.onImport,children:"Import"})]})]})]})}var Ie=U(re(),1),bf=U(pe(),1);var al="#22C55E",U2=[{id:"green",label:"Green",value:al},{id:"purple",label:"Purple",value:"#A855F7"},{id:"indigo",label:"Indigo",value:"#6366F1"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"graphite",label:"Graphite",value:"#64748B"}],Jr="#D97757",hf=[{id:"coral",label:"Coral",value:Jr},{id:"orange",label:"Orange",value:"#F97316"},{id:"amber",label:"Amber",value:"#F59E0B"},{id:"rose",label:"Rose",value:"#F43F5E"},{id:"purple",label:"Purple",value:"#A855F7"},{id:"blue",label:"Blue",value:"#3B82F6"},{id:"teal",label:"Teal",value:"#14B8A6"},{id:"graphite",label:"Graphite",value:"#64748B"}];function mf(e){let t=e.trim().replace(/^#/,""),n=t.length===3?t.replace(/./g,r=>r+r):t;if(/^[0-9a-fA-F]{6}$/.test(n))return{r:Number.parseInt(n.slice(0,2),16),g:Number.parseInt(n.slice(2,4),16),b:Number.parseInt(n.slice(4,6),16)}}function pf(e){return mf(e)!==void 0}function _x({r:e,g:t,b:n}){let r=i=>Math.max(0,Math.min(255,Math.round(i))).toString(16).padStart(2,"0");return`#${r(e)}${r(t)}${r(n)}`}function N2(e,t){return t<=1?{r:e.r*t,g:e.g*t,b:e.b*t}:{r:e.r+(255-e.r)*(t-1),g:e.g+(255-e.g)*(t-1),b:e.b+(255-e.b)*(t-1)}}function bR({r:e,g:t,b:n}){let r=i=>{let o=i/255;return o<=.03928?o/12.92:((o+.055)/1.055)**2.4};return .2126*r(e)+.7152*r(t)+.0722*r(n)}function gf(e){let t=mf(e);return t===void 0?"#ffffff":bR(t)>.35?"#12111a":"#ffffff"}function $x(e,t,n){let r=mf(t)??mf(n);if(r===void 0)return;let i=document.documentElement.style,o=_x(r);i.setProperty(`--lc-${e}`,o),i.setProperty(`--lc-${e}-deep`,_x(N2(r,.62))),i.setProperty(`--lc-${e}-bright`,_x(N2(r,1.22))),i.setProperty(`--lc-${e}-contrast`,gf(o)),i.setProperty(`--lc-${e}-a12`,`rgba(${r.r}, ${r.g}, ${r.b}, 0.12)`),i.setProperty(`--lc-${e}-a20`,`rgba(${r.r}, ${r.g}, ${r.b}, 0.20)`),i.setProperty(`--lc-${e}-a35`,`rgba(${r.r}, ${r.g}, ${r.b}, 0.35)`)}function zx(e){$x("accent",e,al)}function Tx(e){$x("expert",e,Jr)}var Cx={expert:Jr,claude:"#C96442",programmer:"#8B7FD4",reviewer:"#3B9EDB",tester:"#D4A72C",librarian:"#59B89C"};function Ex(e,t){$x(`agent-${e}`,t,Cx[e]??Jr)}function R2(e,t=[]){let n=new Set([...Object.keys(Cx),...t,...Object.keys(e??{})]);for(let r of n)Ex(r,e?.[r]??ll(r))}function ll(e){return Cx[e]??xR(e)}function xR(e){let t=2166136261;for(let n=0;n<e.length;n+=1)t^=e.charCodeAt(n),t=Math.imul(t,16777619)>>>0;return t^=t>>>16,t=Math.imul(t,2146121005)>>>0,t^=t>>>15,t=Math.imul(t,2221713035)>>>0,t^=t>>>16,SR((t>>>0)%12*30,.52,.58)}function SR(e,t,n){let r=(1-Math.abs(2*n-1))*t,i=r*(1-Math.abs(e/60%2-1)),o=n-r/2,[a,l,c]=e<60?[r,i,0]:e<120?[i,r,0]:e<180?[0,r,i]:e<240?[0,i,r]:e<300?[i,0,r]:[r,0,i],u=d=>Math.round((d+o)*255).toString(16).padStart(2,"0");return`#${u(a)}${u(l)}${u(c)}`}function yf(e){let[t,n]=(0,bf.useState)(e.value);(0,bf.useEffect)(()=>n(e.value),[e.value]);let r=o=>{n(o),pf(o)&&e.onChange(o)},i=e.value.toLowerCase();return(0,Ie.jsxs)("div",{style:{marginBottom:22},children:[(0,Ie.jsx)("span",{style:I(),children:e.label}),(0,Ie.jsx)("p",{style:{color:s.muted,fontSize:11,margin:"0 0 8px"},children:e.description}),(0,Ie.jsx)("div",{style:{display:"flex",flexWrap:"wrap",gap:8,marginBottom:10},children:e.presets.map(o=>{let a=o.value.toLowerCase()===i;return(0,Ie.jsx)("button",{type:"button",className:"lc-swatch",title:o.label,"aria-label":o.label,"aria-pressed":a,onClick:()=>r(o.value),style:{width:26,height:26,borderRadius:"50%",border:"none",cursor:"pointer",padding:0,display:"inline-flex",alignItems:"center",justifyContent:"center",background:o.value,color:gf(o.value)},children:a&&(0,Ie.jsx)(Oi,{size:13})},o.id)})}),(0,Ie.jsx)("label",{style:{...I(),marginBottom:4},htmlFor:e.inputId,children:"Or a custom hex colour"}),(0,Ie.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,Ie.jsx)("input",{id:e.inputId,type:"text",value:t,spellCheck:!1,placeholder:e.fallback,onChange:o=>r(o.target.value),style:{...E(),width:130,fontFamily:"var(--vscode-editor-font-family, monospace)"}}),(0,Ie.jsx)("span",{"aria-hidden":"true",style:{width:26,height:26,borderRadius:8,flexShrink:0,background:pf(t)?t:"transparent",border:`1px solid ${s.border}`}}),!pf(t)&&(0,Ie.jsxs)("span",{style:{color:s.error,fontSize:11,fontFamily:G},children:["Needs a hex colour, e.g. ",e.fallback]})]})]})}function vf(e){return(0,Ie.jsx)("h4",{style:{margin:e.first===!0?"0 0 8px":"20px 0 8px",paddingTop:e.first===!0?0:14,borderTop:e.first===!0?"none":`1px solid ${s.border}`,fontSize:11,fontWeight:600,letterSpacing:"0.06em",textTransform:"uppercase",color:s.muted},children:e.children})}function M2(e){let t=e.accentColor.toLowerCase()===e.expertColor.toLowerCase();return(0,Ie.jsxs)("section",{children:[e.onChangeTheme!==void 0&&(0,Ie.jsx)(vf,{first:!0,children:"Theme"}),e.onChangeTheme!==void 0&&(0,Ie.jsxs)("div",{style:{marginBottom:16},children:[(0,Ie.jsx)("div",{style:{display:"flex",gap:6,marginBottom:4},children:["system","light","dark"].map(n=>{let r=(e.theme??"system")===n;return(0,Ie.jsx)("button",{type:"button",onClick:()=>e.onChangeTheme?.(n),style:{...E(),width:"auto",cursor:"pointer",textTransform:"capitalize",...r?{borderColor:s.accent,color:s.accent,fontWeight:600}:{}},children:n},n)})}),(0,Ie.jsxs)("span",{style:{display:"block",color:s.muted,fontSize:11},children:[(0,Ie.jsx)("strong",{children:"System"})," follows your browser\u2019s appearance setting \u2014 which is the browser\u2019s own, not Windows\u2019. If your browser is pinned to light by policy, choose Dark here instead."]})]}),(0,Ie.jsx)(vf,{first:e.onChangeTheme===void 0,children:"Colours"}),(0,Ie.jsx)(yf,{label:"Accent colour",description:"Buttons, your messages, selections and focus rings.",value:e.accentColor,presets:U2,fallback:al,inputId:"lc-accent-hex",onChange:e.onChangeAccent}),(0,Ie.jsx)(yf,{label:"Expert colour",description:"Marks answers from whatever holds the expert seat. Kept separate from the accent so the two are told apart at a glance.",value:e.expertColor,presets:hf,fallback:Jr,inputId:"lc-expert-hex",onChange:e.onChangeExpert}),(0,Ie.jsx)(yf,{label:"Claude colour",description:"Marks answers from the Claude command line specifically, so they are told apart from an expert seat held by a configured model.",value:e.agentColors.claude??ll("claude"),presets:hf,fallback:ll("claude"),inputId:"lc-agent-claude-hex",onChange:n=>e.onChangeAgentColor("claude",n)}),e.agentRoles.filter(n=>n.role!=="expert").length>0&&(0,Ie.jsx)(vf,{children:"Specialists"}),e.agentRoles.length>0&&(0,Ie.jsx)("div",{style:{marginTop:4},children:e.agentRoles.filter(n=>n.role!=="expert").map(n=>(0,Ie.jsx)(yf,{label:`${n.name} colour`,description:`Marks answers from the ${n.name.toLowerCase()}.`,value:e.agentColors[n.role]??ll(n.role),presets:hf,fallback:ll(n.role),inputId:`lc-agent-${n.role}-hex`,onChange:r=>e.onChangeAgentColor(n.role,r)},n.role))}),t&&(0,Ie.jsx)("p",{style:{color:s.error,fontSize:11,margin:"0 0 14px"},children:"These are the same colour, so expert answers will not stand out. Only the expert mark will tell them apart."}),(0,Ie.jsxs)("div",{children:[(0,Ie.jsx)(vf,{children:"Preview"}),(0,Ie.jsxs)("div",{style:{display:"flex",flexDirection:"column",gap:8,marginTop:6},children:[(0,Ie.jsx)("div",{style:{display:"flex",justifyContent:"flex-end"},children:(0,Ie.jsx)("span",{style:{padding:"7px 12px",borderRadius:"14px 14px 4px 14px",background:`linear-gradient(135deg, ${e.accentColor}, ${e.accentColor})`,color:gf(e.accentColor),fontSize:12,fontFamily:G},children:"Your message"})}),(0,Ie.jsx)("div",{style:{display:"flex"},children:(0,Ie.jsx)("span",{style:{padding:"7px 12px",borderRadius:"14px 14px 14px 4px",background:s.assistantBubble,color:s.foreground,fontSize:12,fontFamily:G},children:"The assistant's reply"})}),(0,Ie.jsxs)("div",{style:{display:"inline-flex",alignItems:"center",gap:6,alignSelf:"flex-start",padding:"6px 10px",borderRadius:10,border:`1px solid ${e.expertColor}`,background:s.expertSoft,color:e.expertColor,fontSize:12,fontFamily:G},children:[(0,Ie.jsx)($n,{size:12}),"Answered by the expert"]})]})]})]})}function Ix(e){if(e===void 0)return;if(e.error!==void 0)return`Failed: ${e.error}`;let t=e.indexed??0;return`Indexed ${String(t)} ${t===1?"entry":"entries"}.`}var kR={expert:"agents"},B2=[{id:"providers",label:"Providers",Icon:V$},{id:"approvals",label:"Approvals",Icon:Pb},{id:"mcp",label:"MCP",Icon:q$},{id:"search",label:"Search",Icon:G$},{id:"agents",label:"Agents",Icon:$n},{id:"schedules",label:"Schedules",Icon:ez},{id:"python",label:"Python",Icon:Y$},{id:"tools",label:"Tools",Icon:X$},{id:"outlook",label:"Outlook",Icon:K$},{id:"customData",label:"Custom data",Icon:nz},{id:"skills",label:"Skills",Icon:Q$},{id:"network",label:"Network",Icon:W$},{id:"reviews",label:"Review",Icon:Pb},{id:"variables",label:"Variables",Icon:F$},{id:"appearance",label:"Appearance",Icon:H$}];function Dx(e){let[t,n]=(0,xf.useState)("providers"),r={variables:e.variables!==void 0,reviews:e.reviews!==void 0,outlook:e.offersOffice!==!1},i=B2.filter(l=>r[l.id]??!0),o=i.some(l=>l.id===t)?t:"providers",a=e.requestedTab;return(0,xf.useEffect)(()=>{if(a===void 0)return;let l=kR[a.tab]??a.tab;B2.some(c=>c.id===l)&&n(l)},[a]),(0,ut.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%"},children:[(0,ut.jsx)("div",{role:"tablist",className:"lc-scroll",style:{display:"flex",borderBottom:`1px solid ${s.border}`,flexShrink:0,overflowX:"auto"},children:i.map(l=>{let c=o===l.id;return(0,ut.jsxs)("button",{type:"button",role:"tab","aria-selected":c,className:"lc-tab",title:l.label,"aria-label":l.label,onClick:()=>n(l.id),style:{display:"inline-flex",alignItems:"center",gap:5,padding:c?"8px 10px":"8px 8px",fontFamily:G,fontSize:12,background:"transparent",color:c?s.accent:s.muted,border:"none",cursor:"pointer",whiteSpace:"nowrap",flexShrink:0},children:[(0,ut.jsx)(l.Icon,{size:15}),c&&(0,ut.jsx)("span",{children:l.label})]},l.id)})}),(0,ut.jsx)("div",{className:"lc-scroll lc-panel",style:{flex:1,minHeight:0,overflowY:"auto"},children:o==="reviews"&&e.reviews!==void 0?(0,ut.jsx)(y2,{...e.reviews}):o==="variables"&&e.variables!==void 0?(0,ut.jsx)(b2,{...e.variables}):o==="appearance"?(0,ut.jsx)("div",{style:{padding:12},children:(0,ut.jsx)(M2,{accentColor:e.accentColor,onChangeAccent:e.onSetAccentColor,expertColor:e.expertColor,onChangeExpert:e.onSetExpertColor,agentRoles:e.agents.roles.map(l=>({role:l.role,name:l.name})),agentColors:e.agents.colors,onChangeAgentColor:e.onSetAgentColor,...e.theme===void 0?{}:{theme:e.theme},...e.choosesTheme===!0&&e.onSetTheme!==void 0?{onChangeTheme:e.onSetTheme}:{}})}):o==="providers"?(0,ut.jsx)(wx,{onBrowse:e.onBrowse,...e.pickedPath===void 0?{}:{pickedPath:e.pickedPath},...e.sharedProfileIds!==void 0?{sharedProfileIds:e.sharedProfileIds}:{},profiles:e.profiles,activeProfileId:e.activeProfileId,onSave:e.onSave,onDuplicate:e.onDuplicate,onDelete:e.onDelete,onSetActive:e.onSetActive,onExport:e.onExport,onImport:e.onImport,onRequestModels:e.onRequestModels,onTestConnection:e.onTestConnection,onEditingChange:e.onEditingChange,models:e.models,...e.modelsWarning!==void 0?{modelsWarning:e.modelsWarning}:{},modelsLoading:e.modelsLoading,testRunning:e.testRunning,...e.testResult!==void 0?{testResult:e.testResult}:{}}):o==="approvals"?(0,ut.jsx)(ux,{approvals:e.approvals,onSetAutoApprove:e.onSetAutoApprove,onRevokeTool:e.onRevokeTool,onRevokeCommand:e.onRevokeCommand,maxIterations:e.maxIterations,onSetMaxIterations:e.onSetMaxIterations,readRoots:e.readRoots,onSetReadRoots:e.onSetReadRoots}):o==="search"?(0,ut.jsx)(d2,{...e.search}):o==="schedules"?(0,ut.jsx)($2,{...e.schedules}):o==="skills"?(0,ut.jsx)(_2,{...e.skills}):o==="tools"?(0,ut.jsx)(g2,{...e.tools}):o==="outlook"?(0,ut.jsx)(p2,{...e.outlook,onOpenTools:()=>n("tools")}):o==="customData"?(0,ut.jsx)(qz,{...e.customData,onOpenPython:()=>n("python")}):o==="python"?(0,ut.jsx)(m2,{...e.python}):o==="network"?(0,ut.jsx)(f2,{...e.network,onBrowse:e.onBrowse,pickedPath:e.pickedPath}):o==="agents"?(0,ut.jsx)(Qz,{...e.agents,budgetPanel:(0,ut.jsx)(i2,{expert:e.expert,onSave:e.onSaveExpert,onRecheck:e.onRecheckExpert,onMeasureCost:e.onMeasureCost,onClearPricing:e.onClearPricing,onSetKeepAlive:e.onSetKeepAlive,onBrowse:e.onBrowse,pickedPath:e.pickedPath}),fitPanel:(0,ut.jsx)(o2,{assessments:e.expert?.assessments??[],seatFits:e.expert?.seatFits??[],expertGuidance:e.expert?.expertGuidance??"",assessor:e.expert?.assessor,profiles:e.agents.profiles,assessing:e.expert?.assessing===!0,step:e.expert?.assessmentStep,onAssess:e.onAssessJunior,onClear:e.onClearAssessment})}):(0,ut.jsx)(fx,{servers:e.mcpServers,json:e.mcpJson,warnings:e.mcpWarnings,saveError:e.mcpSaveError,configs:e.mcpConfigs,platform:e.mcpPlatform,savedTick:e.mcpSavedTick,pythonProbe:e.mcpPythonProbe,onDetectPython:e.onDetectPython,onBrowse:e.onBrowse,pickedPath:e.pickedPath,onSaveServer:e.onSaveMcpServer,onDeleteServer:e.onDeleteMcpServer,onDuplicateServer:e.onDuplicateMcpServer,onSave:e.onSaveMcp,onRestart:e.onRestartMcp,onSetServerEnabled:e.onSetMcpServerEnabled,onSetToolPermission:e.onSetMcpToolPermission,onSetToolTimeout:e.onSetMcpToolTimeout,onConnect:e.onConnectMcp,docsIndex:{enabled:e.search.dispatcher.enabled,ready:e.search.dispatcher.retrievalReady,indexing:e.search.dispatcher.indexing,result:Ix(e.search.dispatcher.result)},onIndexDocs:()=>e.search.dispatcher.onIndexDocs("tool"),indexProgress:e.tools.progress,onStopIndexing:e.tools.onStopIndexing})},o)]})}var L2=U(re(),1);function Ax(e){let t=fh(e.modeId);return(0,L2.jsx)(ze,{compact:!0,value:t.id,disabled:e.disabled,title:t.description,ariaLabel:"Mode",onChange:e.onChange,options:ru.map(n=>({value:n.id,label:n.name,...n.requiresExpert===!0&&!e.expertAvailable?{disabled:!0,detail:"needs the expert"}:{}}))})}var $t=U(re(),1);var P2=U(pe(),1);function Z2(e){let[t,n]=(0,P2.useState)(0),r=Br[t]??Br[0],i=t===0,o=t===Br.length-1;return(0,$t.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100%",minHeight:0,fontFamily:G,fontSize:13,color:s.foreground},children:[(0,$t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderBottom:`1px solid ${s.border}`,flexShrink:0},children:[(0,$t.jsx)("strong",{style:{fontSize:13},children:r.title}),(0,$t.jsxs)("span",{style:{marginLeft:"auto",color:s.muted,fontSize:11},children:[t+1," of ",Br.length]}),(0,$t.jsx)("button",{type:"button",style:{..._(),fontSize:11},onClick:e.onClose,children:"Close"})]}),(0,$t.jsxs)("div",{className:"lc-scroll",style:{flex:1,minHeight:0,overflowY:"auto",padding:12},children:[e.mediaBase!==void 0&&(0,$t.jsxs)("picture",{children:[(0,$t.jsx)("source",{media:"(prefers-color-scheme: dark)",srcSet:`${e.mediaBase}/${r.id}-dark.svg`}),(0,$t.jsx)("img",{src:`${e.mediaBase}/${r.id}-light.svg`,alt:r.altText,style:{display:"block",width:"100%",maxWidth:"100%",height:"auto",borderRadius:6,border:`1px solid ${s.border}`,marginBottom:12}})]}),r.body.map((a,l)=>(0,$t.jsx)("div",{style:{marginBottom:10,lineHeight:1.5},children:(0,$t.jsx)(nf,{text:a})},l)),r.tab!==void 0&&(0,$t.jsxs)("button",{type:"button",style:{...oe(!1),marginTop:4},onClick:()=>e.onOpenTab(r.tab),children:["Open the ",r.tab[0]?.toUpperCase(),r.tab.slice(1)," tab"]}),r.tab===void 0&&r.opensPanel===!0&&(0,$t.jsx)("button",{type:"button",style:{..._(),marginTop:4},onClick:e.onClose,children:"Back to the chat"})]}),(0,$t.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,padding:"10px 12px",borderTop:`1px solid ${s.border}`,flexShrink:0},children:[(0,$t.jsx)("button",{type:"button",style:_(),disabled:i,onClick:()=>n(a=>Math.max(0,a-1)),children:"Back"}),(0,$t.jsx)("div",{style:{display:"flex",gap:4,flex:1,justifyContent:"center",flexWrap:"wrap"},children:Br.map((a,l)=>(0,$t.jsx)("button",{type:"button","aria-label":a.title,title:a.title,onClick:()=>n(l),style:{width:7,height:7,padding:0,borderRadius:"50%",border:"none",cursor:"pointer",background:l===t?s.accent:s.border}},a.id))}),o?(0,$t.jsx)("button",{type:"button",style:oe(!1),onClick:e.onClose,children:"Done"}):(0,$t.jsx)("button",{type:"button",style:oe(!1),onClick:()=>n(a=>Math.min(Br.length-1,a+1)),children:"Next"})]})]})}var Xt=U(re(),1),F2=U(pe(),1);function wR(e,t=Date.now()){let n=Math.max(0,Math.round((t-e)/1e3));if(n<60)return"just now";let r=Math.round(n/60);if(r<60)return`${r}m ago`;let i=Math.round(r/60);if(i<24)return`${i}h ago`;let o=Math.round(i/24);return o<=7?`${o}d ago`:new Date(e).toLocaleDateString()}function H2(e){let[t,n]=(0,F2.useState)(void 0);return(0,Xt.jsxs)("div",{style:{padding:12,overflowY:"auto"},children:[(0,Xt.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8,marginBottom:12},children:[(0,Xt.jsx)("h3",{style:{margin:0,color:s.foreground},children:"History"}),(0,Xt.jsx)("button",{type:"button",style:{...oe(!1),marginLeft:"auto"},onClick:e.onNew,children:"New task"})]}),e.tasks.length===0&&(0,Xt.jsx)("p",{style:{color:s.muted,fontFamily:G},children:"No past tasks in this workspace yet. Conversations are saved automatically as you go."}),e.tasks.map(r=>{let i=r.id===e.activeTaskId,o=r.id===t;return(0,Xt.jsxs)("div",{style:{padding:10,marginBottom:8,borderRadius:4,border:`1px solid ${i?s.accent:s.border}`,background:i?s.assistantBubble:"transparent"},children:[(0,Xt.jsx)("div",{style:{color:s.foreground,marginBottom:4,wordBreak:"break-word"},children:r.title}),(0,Xt.jsxs)("div",{style:{color:s.muted,fontSize:11,marginBottom:8},children:[wR(r.updatedAt)," \xB7 ",r.messageCount," message",r.messageCount===1?"":"s",i?" \xB7 current":""]}),o?(0,Xt.jsxs)("div",{style:{display:"flex",gap:6,alignItems:"center",flexWrap:"wrap"},children:[(0,Xt.jsx)("span",{style:{color:s.muted,fontSize:11},children:"Delete this task and its saved output?"}),(0,Xt.jsx)("button",{type:"button",style:{..._(),color:s.error},onClick:()=>{n(void 0),e.onDelete(r.id)},children:"Delete"}),(0,Xt.jsx)("button",{type:"button",style:_(),onClick:()=>n(void 0),children:"Cancel"})]}):(0,Xt.jsxs)("div",{style:{display:"flex",gap:6},children:[!i&&(0,Xt.jsx)("button",{type:"button",style:_(),onClick:()=>e.onOpen(r.id),children:"Open"}),(0,Xt.jsx)("button",{type:"button",style:_(),onClick:()=>n(r.id),children:"Delete"})]})]},r.id)})]})}function sl(e){let t=e.map(r=>r.kind==="reasoning"&&r.pending===!0?{kind:"reasoning",content:r.content}:r),n=t[t.length-1];return n===void 0||n.kind!=="text"||!n.pending?t:[...t.slice(0,-1),{kind:"text",role:n.role,content:n.content,...n.expertInformed===!0?{expertInformed:!0}:{},...n.informedBy!==void 0?{informedBy:n.informedBy}:{}}]}function jx(e){let[t,n]=(0,q.useState)("chat"),[r,i]=(0,q.useState)(),[o,a]=(0,q.useState)({native:!0}),[l,c]=(0,q.useState)(),[u,d]=(0,q.useState)(),[m,h]=(0,q.useState)(),[f,v]=(0,q.useState)(!1),[k,D]=(0,q.useState)(),[p,b]=(0,q.useState)([]),[S,y]=(0,q.useState)(!1),[T,M]=(0,q.useState)(void 0),[A,w]=(0,q.useState)([]),[V,F]=(0,q.useState)(void 0),[we,Xe]=(0,q.useState)(!1),[jt,Lt]=(0,q.useState)(void 0),[gi,Z]=(0,q.useState)(void 0),[fe,qe]=(0,q.useState)(!1),[qt,N]=(0,q.useState)(dh),[me,bt]=(0,q.useState)({}),[nt,Ot]=(0,q.useState)(25),[Ti,at]=(0,q.useState)(al),[Ji,yi]=(0,q.useState)([]),[CE,h0]=(0,q.useState)(Jr),[Qm,p0]=(0,q.useState)({type:"agents",roles:[],profiles:[],cliAvailable:!1,budgetMatters:!1,claudeSeated:!1,teamGuidance:"",defaultTeamGuidance:"",teamGuidanceIsDefault:!0,colors:{}}),[Xn,EE]=(0,q.useState)({usd:0,consultations:0,unpriced:0,maxSpendUsd:0,maxConsultations:0,overridden:!1}),[$o,eh]=(0,q.useState)({enabled:!0,hiddenTools:0,skills:!0,hiddenSkills:0}),[th,Qc]=(0,q.useState)(!1),[IE,DE]=(0,q.useState)([]),[es,g0]=(0,q.useState)({}),[ts,ca]=(0,q.useState)({}),Ci=x=>g0(B=>{let g={...B};return delete g[x],g}),[zo,ua]=(0,q.useState)(void 0),[AE,jE]=(0,q.useState)([]),[OE,NE]=(0,q.useState)(`{
|
|
145
|
-
"mcpServers": {}
|
|
146
|
-
}`),[UE,RE]=(0,q.useState)({}),[ME,y0]=(0,q.useState)(void 0),[BE,LE]=(0,q.useState)({}),[PE,ZE]=(0,q.useState)("posix"),[FE,HE]=(0,q.useState)(0),[v0,b0]=(0,q.useState)(void 0),[VE,qE]=(0,q.useState)(void 0),[GE,x0]=(0,q.useState)([]),[S0,nh]=(0,q.useState)(void 0),[WE,ih]=(0,q.useState)(!1),[YE,rh]=(0,q.useState)(!1),[k0,oh]=(0,q.useState)(void 0),[JE,XE]=(0,q.useState)([]),[w0,_0]=(0,q.useState)(void 0),[KE,QE]=(0,q.useState)(void 0),[eI,tI]=(0,q.useState)(!1),[ah,nI]=(0,q.useState)(!1),[iI,$0]=(0,q.useState)(void 0),[z0,rI]=(0,q.useState)(void 0),[T0,oI]=(0,q.useState)([]),[aI,lI]=(0,q.useState)([]),[lh,sI]=(0,q.useState)([]),[ns,cI]=(0,q.useState)(void 0),[uI,dI]=(0,q.useState)([]),[C0,fI]=(0,q.useState)(void 0),[E0,I0]=(0,q.useState)(void 0),[mI,hI]=(0,q.useState)(0),[D0,A0]=(0,q.useState)(void 0),[eu,pI]=(0,q.useState)(void 0),[gI,j0]=(0,q.useState)(void 0),[yI,O0]=(0,q.useState)(void 0),[vI,N0]=(0,q.useState)(void 0),[bI,xI]=(0,q.useState)(void 0),[da,SI]=(0,q.useState)({datasets:[],tools:[],stores:[],defaultStoreLabel:"none",semantic:!1,guidance:""}),[U0,R0]=(0,q.useState)({folders:[],loading:!1}),[Kn,kI]=(0,q.useState)(void 0),[wI,sh]=(0,q.useState)(void 0),[_I,M0]=(0,q.useState)([]),[$I,B0]=(0,q.useState)(void 0),[zI,L0]=(0,q.useState)(!1),[TI,CI]=(0,q.useState)(0),[EI,II]=(0,q.useState)(void 0),[Un,DI]=(0,q.useState)(void 0),[AI,jI]=(0,q.useState)(void 0),[OI,NI]=(0,q.useState)([]),[UI,RI]=(0,q.useState)([]),[MI,BI]=(0,q.useState)(void 0),[LI,PI]=(0,q.useState)([]),[ZI,FI]=(0,q.useState)([]),[HI,VI]=(0,q.useState)([]),[ch,P0]=(0,q.useState)({choosesTheme:!1}),[qI,Z0]=(0,q.useState)(""),[GI,WI]=(0,q.useState)([]),[YI,JI]=(0,q.useState)(!0),[F0,XI]=(0,q.useState)(void 0),[KI,QI]=(0,q.useState)({workspaceOpen:!1,overridden:[]}),[eD,H0]=(0,q.useState)({tools:[],dispatcher:!1,office:{supported:!1,excel:!1,outlook:!1}}),[tD,nD]=(0,q.useState)(void 0),[iD,rD]=(0,q.useState)(void 0),[oD,aD]=(0,q.useState)([]),[lD,sD]=(0,q.useState)("");(0,q.useEffect)(()=>{let x=e.transport.onMessage(B=>{let g=B;if(g.type==="textChunk")b(ye=>{let lt=ye[ye.length-1],vi={kind:"text",role:"assistant",content:g.text,pending:!0,...g.expertInformed===!0?{expertInformed:!0}:{},...g.informedBy!==void 0?{informedBy:g.informedBy}:{}};return lt?.kind==="text"&<.role==="assistant"&<.pending?[...ye.slice(0,-1),vi]:[...ye,vi]});else if(g.type==="reasoningChunk")b(ye=>{let lt=ye.findIndex(is=>is.kind==="reasoning"&&is.pending===!0),vi={kind:"reasoning",content:g.text,pending:!0};return lt===-1?[...ye,vi]:[...ye.slice(0,lt),vi,...ye.slice(lt+1)]});else if(g.type==="toolCall")b(ye=>[...sl(ye),{kind:"tool",toolCall:g.toolCall,...g.expertInformed===!0?{expertInformed:!0}:{},...g.informedBy!==void 0?{informedBy:g.informedBy}:{}}]);else if(g.type==="toolResult")b(ye=>{let lt={kind:"tool",toolCall:g.toolCall,...g.expertInformed===!0?{expertInformed:!0}:{},...g.informedBy!==void 0?{informedBy:g.informedBy}:{}},vi=ye.findIndex(is=>is.kind==="tool"&&is.toolCall.id===g.toolCall.id);return vi===-1?[...ye,lt]:[...ye.slice(0,vi),lt,...ye.slice(vi+1)]});else if(g.type==="formRequest")b(sl),Z(g);else if(g.type==="approvalRequest")b(sl),Lt({id:g.id,toolName:g.toolName,group:g.group,preview:g.preview,...g.alwaysScope===void 0?{}:{alwaysScope:g.alwaysScope}});else if(g.type==="openSettings")e.transport.post({type:"requestProfiles"}),i({tab:g.tab,nonce:Date.now()}),n("settings");else if(g.type==="hostRole")D({role:g.role,shared:g.shared,displayName:g.displayName,sharedProfileIds:g.sharedProfileIds});else if(g.type==="reviews")d({items:g.items,canDecide:g.canDecide});else if(g.type==="variables")c({user:g.user,admin:g.admin,resolved:g.resolved,adminIds:g.adminIds,canEditAdmin:g.canEditAdmin});else if(g.type==="settings")N(g.modeId),h(g.programmingProfileId),v(g.allowProgrammingProfile),JI(g.offersOffice!==!1),P0({choosesTheme:g.choosesTheme===!0,...g.theme===void 0?{}:{theme:g.theme}}),XI(g.toolTimeoutSeconds),a({native:g.nativeGuide,...g.guideMediaBase!==void 0?{mediaBase:g.guideMediaBase}:{}}),bt(g.approvals),Ot(g.maxIterations),at(g.accentColor),yi(g.readRoots),h0(g.expertColor),zx(g.accentColor),Tx(g.expertColor);else if(g.type==="mcp")jE(g.servers),NE(g.json),RE(g.warnings),LE(g.configs),ZE(g.platform),y0(void 0);else if(g.type==="mcpSaveError")y0(g.message);else if(g.type==="checkpointAvailable")qe(!0);else if(g.type==="rolledBack")qe(!1);else if(g.type==="done")b(sl),Lt(void 0),y(!1);else if(g.type==="error")b(sl),Lt(void 0),M(g.message),y(!1);else if(g.type==="profiles")w(g.profiles),F(g.activeProfileId),Xe(!0);else if(g.type==="profileSaved")n("chat");else if(g.type==="models")x0(g.models),nh(g.warning),ih(!1);else if(g.type==="testConnectionResult")oh({ok:g.ok,steps:g.steps}),rh(!1);else if(g.type==="contextUsage")QE(g.usage);else if(g.type==="compacted")b(ye=>[...ye,{kind:"text",role:"assistant",content:`[${g.summarisedCount} earlier messages were summarised to stay within the context window. The full transcript is still saved.]`}]);else if(g.type==="search")sI(g.connections),cI(g.activeConnectionId);else if(g.type==="searchIndexes")dI(g.indexes),fI(g.warning);else if(g.type==="searchTestResult")I0({ok:g.ok,detail:g.detail});else if(g.type==="queued")lI(g.messages);else if(g.type==="queuedMessageConsumed")b(ye=>[...sl(ye),{kind:"text",role:"user",content:g.text}]);else if(g.type==="mentionCandidates")oI(g.paths);else if(g.type==="capabilities")tI(g.supportsVision);else if(g.type==="pathPicked")b0({purpose:g.purpose,path:g.path});else if(g.type==="pythonEnvProbe")qE({...g.interpreter!==void 0?{interpreter:g.interpreter}:{},...g.venvDir!==void 0?{venvDir:g.venvDir}:{},detail:g.detail});else if(g.type==="tools")H0(g);else if(g.type==="schedules")VI(g.skills),PI(g.schedules),FI(g.tools),rD(g.runningId),nD(g.scheduler);else if(g.type==="searchLog")DE(g.entries);else if(g.type==="chart")b(ye=>[...ye.filter(lt=>!(lt.kind==="text"&<.role==="assistant"&<.pending===!0&<.content.length===0)),{kind:"chart",chart:g.chart,...g.expertInformed===!0?{expertInformed:!0}:{},...g.informedBy!==void 0?{informedBy:g.informedBy}:{}}]);else if(g.type==="chartError")b(ye=>[...ye,{kind:"chartError",message:g.message}]);else if(g.type==="diagram")b(ye=>[...ye.filter(lt=>!(lt.kind==="text"&<.role==="assistant"&<.pending===!0&<.content.length===0)),{kind:"diagram",diagram:g.diagram,...g.expertInformed===!0?{expertInformed:!0}:{},...g.informedBy!==void 0?{informedBy:g.informedBy}:{}}]);else if(g.type==="diagramError")b(ye=>[...ye,{kind:"diagramError",message:g.message}]);else if(g.type==="searchProbe")g0(ye=>({...ye,[g.target]:{query:g.query,text:g.text,...g.error!==void 0?{error:g.error}:{}}})),ca(ye=>({...ye,[g.target]:!1}));else if(g.type==="dispatcher")eh({enabled:g.enabled,hiddenTools:g.hiddenTools,skills:g.skills,hiddenSkills:g.hiddenSkills,...g.docsIndex!==void 0?{docsIndex:g.docsIndex}:{}});else if(g.type==="projectSettings")QI(g);else if(g.type==="docsIndexed")Qc(!1),ua({...g.indexed!==void 0?{indexed:g.indexed}:{},...g.index!==void 0?{index:g.index}:{},...g.error!==void 0?{error:g.error}:{}});else if(g.type==="expertSpend")EE({usd:g.usd,consultations:g.consultations,unpriced:g.unpriced,...g.usage!==void 0?{usage:g.usage}:{},...g.exhausted!==void 0?{exhausted:g.exhausted}:{},maxSpendUsd:g.maxSpendUsd,maxConsultations:g.maxConsultations,overridden:g.overridden,...g.estimate!==void 0?{estimate:g.estimate}:{}});else if(g.type==="mcpServerSaved")HE(ye=>ye+1);else if(g.type==="embedder"){let{type:ye,...lt}=g;pI(lt)}else g.type==="skills"?(NI(g.skills),RI(g.issues),BI(g.skillsDir),aD(g.extraDirs)):g.type==="s3"?DI(g):g.type==="python"?(II(g.status),jI(g.settings)):g.type==="embedderModels"?(M0(g.models),B0(g.warning),L0(!1)):g.type==="embedderSaved"?CI(ye=>ye+1):g.type==="indexProgress"?j0(g.progress):g.type==="outlookFolders"?R0({folders:g.folders??[],loading:!1,...g.error!==void 0?{error:g.error}:{}}):g.type==="indexingProgress"?kI({kind:g.kind,phase:g.phase,running:g.running,...g.done!==void 0?{done:g.done}:{},...g.total!==void 0?{total:g.total}:{},...g.detail!==void 0?{detail:g.detail}:{}}):g.type==="datasetStatus"?SI({datasets:g.datasets,tools:g.tools,stores:g.stores,defaultStoreLabel:g.defaultStoreLabel,semantic:g.semantic,guidance:g.guidance}):g.type==="mailStatus"?xI({enabled:g.enabled,available:g.available,folders:g.folders,syncMinutes:g.syncMinutes,retentionMonths:g.retentionMonths,indexed:g.indexed,...g.oldest!==void 0?{oldest:g.oldest}:{},...g.newest!==void 0?{newest:g.newest}:{},sizeBytes:g.sizeBytes,semantic:g.semantic,...g.storeId!==void 0?{storeId:g.storeId}:{},stores:g.stores,...g.busy!==void 0?{busy:g.busy}:{},...g.lastResult!==void 0?{lastResult:g.lastResult}:{}}):g.type==="teamSkillsPublished"?sh({...g.count!==void 0?{count:g.count}:{},...g.collection!==void 0?{collection:g.collection}:{},...g.error!==void 0?{error:g.error}:{}}):g.type==="teamAliasAttached"?N0({...g.alias!==void 0?{alias:g.alias}:{},...g.index!==void 0?{index:g.index}:{},...g.attributed!==void 0?{attributed:g.attributed}:{},...g.error!==void 0?{error:g.error}:{}}):g.type==="indexResult"?(j0(void 0),O0({...g.result!==void 0?{result:g.result}:{},...g.error!==void 0?{error:g.error}:{}})):g.type==="storeSync"?A0({running:g.running,...g.copied!==void 0?{copied:g.copied}:{},...g.error!==void 0?{error:g.error}:{},...g.fromLabel!==void 0?{fromLabel:g.fromLabel}:{}}):g.type==="searchConnectionSaved"?hI(ye=>ye+1):g.type==="network"?rI(g.settings):g.type==="plan"?Z0(g.plan):g.type==="planProgress"?WI(g.checkpoints):g.type==="agents"?(p0(g),R2(g.colors,g.roles.map(ye=>ye.role))):g.type==="expert"?($0(g),nI(g.enabled&&g.available)):g.type==="tasks"?(XE(g.tasks),_0(g.activeTaskId)):g.type==="taskRestored"&&(b(g.entries),_0(g.taskId),M(void 0),Lt(void 0),y(!1),qe(!1))});return e.transport.post({type:"requestProfiles"}),e.transport.post({type:"requestSettings"}),e.transport.post({type:"requestMcp"}),e.transport.post({type:"requestExpert"}),e.transport.post({type:"requestAgents"}),e.transport.post({type:"requestPlan"}),e.transport.post({type:"requestSearch"}),e.transport.post({type:"requestMailStatus"}),e.transport.post({type:"requestDatasetStatus"}),e.transport.post({type:"requestProjectSettings"}),e.transport.post({type:"requestNetwork"}),e.transport.post({type:"requestPython"}),e.transport.post({type:"requestSkills"}),e.transport.post({type:"requestS3"}),e.transport.post({type:"requestSchedules"}),e.transport.post({type:"requestTools"}),e.transport.post({type:"requestVariables"}),e.transport.post({type:"requestReviews"}),x},[e.transport]);let V0=()=>{let x={type:"requestProfiles"};e.transport.post(x),n("settings")},cD=(x,B)=>{if(S){e.transport.post({type:"queueMessage",text:x,...B.length>0?{images:B}:{}});return}M(void 0);let g=B.length>0?`${x}${x.length>0?`
|
|
147
|
-
`:""}[${B.length} image(s) attached]`:x;b(lt=>[...lt,{kind:"text",role:"user",content:g}]),y(!0);let ye=B.length>0?{type:"sendMessage",text:x,images:B}:{type:"sendMessage",text:x};e.transport.post(ye)},uD=x=>{e.transport.post({type:"unqueueMessage",index:x})},q0=x=>{e.transport.post({type:"requestMentionCandidates",query:x})},dD=()=>{let x={type:"cancel"};e.transport.post(x)},fD=(x,B)=>{Lt(void 0),e.transport.post({type:"approvalResponse",id:x,decision:B})},mD=(x,B)=>{Lt(void 0),e.transport.post({type:"approvalResponseAlways",id:x,scope:B})},hD=x=>{N(x),e.transport.post({type:"setMode",modeId:x})},pD=(x,B)=>{e.transport.post({type:"setAutoApprove",group:x,enabled:B})},gD=x=>{e.transport.post({type:"revokeAllowedTool",toolName:x})},yD=x=>{e.transport.post({type:"revokeAllowedCommand",command:x})},vD=()=>{e.transport.post({type:"requestTasks"}),n("history")},bD=x=>{e.transport.post({type:"openTask",id:x}),n("chat")},G0=()=>{e.transport.post({type:"newTask"}),n("chat")},xD=x=>{e.transport.post({type:"deleteTask",id:x})},SD=x=>{ih(!0),nh(void 0),e.transport.post({type:"requestModels",profile:x})},kD=x=>{rh(!0),oh(void 0),e.transport.post({type:"testConnection",profile:x})},wD=()=>{x0([]),nh(void 0),ih(!1),oh(void 0),rh(!1)},tu=Un===void 0?void 0:{connections:Un.connections,problems:Un.problems,onSaveConnection:(x,B,g)=>e.transport.post({type:"saveS3Connection",connection:x,...B.trim().length>0?{secret:B}:{},...g.trim().length>0?{sessionToken:g}:{}}),onDeleteConnection:x=>e.transport.post({type:"deleteS3Connection",id:x})},_D=tu===void 0||Un===void 0?void 0:{...tu,mirrors:Un.skills,folders:Un.skillsFolders,...Un.lastSkillsSync!==void 0?{lastSync:Un.lastSkillsSync}:{},onSaveMirrors:x=>e.transport.post({type:"saveS3Mirrors",kind:"skills",mirrors:x}),onSync:()=>e.transport.post({type:"syncS3",kind:"skills"})},$D=tu===void 0||Un===void 0?void 0:{...tu,mirrors:Un.tools,folders:Un.toolsFolders,...Un.lastToolsSync!==void 0?{lastSync:Un.lastToolsSync}:{},onSaveMirrors:x=>e.transport.post({type:"saveS3Mirrors",kind:"tools",mirrors:x}),onSync:()=>e.transport.post({type:"syncS3",kind:"tools"})},zD={connections:lh,activeConnectionId:ns,indexes:uI,...C0!==void 0?{indexesWarning:C0}:{},...E0!==void 0?{testResult:E0}:{},savedTick:mI,onSave:x=>{M(void 0),e.transport.post({type:"saveSearchConnection",connection:x})},onDelete:x=>e.transport.post({type:"deleteSearchConnection",id:x}),onSyncFrom:x=>{A0({running:!0}),e.transport.post({type:"syncVectorStore",fromId:x})},...D0!==void 0?{sync:D0}:{},onSetActive:(x,B)=>e.transport.post({type:"setActiveSearchConnection",id:x,...B===!0?{forProject:!0}:{}}),project:KI,onClearProject:()=>e.transport.post({type:"clearProjectSettings"}),onListIndexes:x=>e.transport.post({type:"requestSearchIndexes",connection:x}),onTest:x=>{I0(void 0),e.transport.post({type:"testSearchConnection",connection:x})},indexing:{embedder:eu,profiles:A,connectionLabel:lh.find(x=>x.id===ns)?.label,progress:gI,lastResult:yI,models:_I,modelsWarning:$I,modelsLoading:zI,savedTick:TI,onRequestModels:x=>{M0([]),B0(void 0),L0(!0),e.transport.post({type:"requestEmbedderModels",profileId:x})},onSaveEmbedder:(x,B,g,ye,lt,vi)=>{M(void 0),e.transport.post({type:"saveEmbedder",profileId:x,model:B,dimensions:g,indexName:ye,indexPrefix:lt,indexAliases:vi})},onAttachTeamAlias:()=>{N0(void 0),e.transport.post({type:"attachTeamAlias"})},aliasResult:vI,onStartIndexing:()=>{O0(void 0),e.transport.post({type:"startIndexing"})},onClearIndex:()=>e.transport.post({type:"clearCodebaseIndex"}),onCancelIndexing:()=>e.transport.post({type:"cancelIndexing"})},dispatcher:{enabled:$o.enabled,hiddenTools:$o.hiddenTools,skills:$o.skills,hiddenSkills:$o.hiddenSkills,...$o.docsIndex!==void 0?{docsIndex:$o.docsIndex}:{},indexing:th,...zo!==void 0?{result:zo}:{},retrievalReady:ns!==void 0&&eu?.model!==void 0,onToggle:x=>{eh(B=>({...B,enabled:x})),e.transport.post({type:"setDispatcher",enabled:x})},onToggleSkills:x=>{eh(B=>({...B,skills:x})),e.transport.post({type:"setSkillRetrieval",enabled:x})},onIndexDocs:x=>{ua(void 0),Qc(!0),e.transport.post({type:"indexDocs",...x===void 0?{}:{kind:x}})},onClearDocsIndex:()=>{ua(void 0),Qc(!0),e.transport.post({type:"clearDocsIndex"})}},activity:{entries:IE,probe:es.docs,probeRunning:ts.docs===!0,onProbe:(x,B)=>{Ci(B),ca(g=>({...g,[B]:!0})),e.transport.post({type:"runSearchProbe",query:x,target:B})},onClear:()=>e.transport.post({type:"clearSearchLog"}),onClearProbe:()=>Ci("docs")}},TD=(x,B,g,ye)=>{e.transport.post({type:"setExpert",enabled:x,...B.length>0?{path:B}:{},...g.length>0?{model:g}:{},maxSpendUsd:ye.maxSpendUsd,maxConsultations:ye.maxConsultations})},CD=(x,B,g)=>{M(void 0),e.transport.post({type:"saveMcpServer",name:x,...B!==void 0?{previousName:B}:{},config:g})},W0=x=>{e.transport.post({type:"openManagedFile",path:x})},Y0=x=>{b0(void 0),e.transport.post({type:"browseForPath",...x})},ED=(x,B)=>{e.transport.post({type:"probePythonEnv",venvDir:x,script:B})},ID=x=>{e.transport.post({type:"deleteMcpServer",name:x})},DD=x=>{e.transport.post({type:"saveMcpServers",json:x})},AD=x=>{e.transport.post({type:"restartMcpServer",name:x})},jD=(x,B)=>{e.transport.post({type:"setMcpServerEnabled",name:x,enabled:B})},OD=x=>{e.transport.post({type:"connectMcpServer",name:x})},ND=(x,B,g)=>{e.transport.post({type:"setMcpToolPermission",server:x,tool:B,permission:g})},UD=()=>{e.transport.post({type:"rollback"})},RD=x=>{e.transport.post({type:"saveProfile",profile:x})},MD=x=>{e.transport.post({type:"duplicateProfile",id:x})},BD=x=>{e.transport.post({type:"deleteProfile",id:x})},J0=x=>{e.transport.post({type:"setActiveProfile",id:x})},LD=()=>{e.transport.post({type:"exportConfig"})},PD=()=>{e.transport.post({type:"importConfig"})},ZD=we&&A.length===0;return(0,Ve.jsxs)("div",{style:{display:"flex",flexDirection:"column",height:"100vh",boxSizing:"border-box",background:s.background,color:s.foreground,fontFamily:G,fontSize:13},children:[(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"8px 12px",borderBottom:`1px solid ${s.border}`,flexShrink:0},children:[(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,Ve.jsx)("strong",{children:"Light Code"}),t==="chat"&&(0,Ve.jsx)(Ax,{modeId:qt,disabled:S,onChange:hD,expertAvailable:ah}),t==="chat"&&Qm.budgetMatters&&(0,Ve.jsx)(Zz,{enabled:ah,modeId:qt,usd:Xn.usd,consultations:Xn.consultations,maxSpendUsd:Xn.maxSpendUsd,maxConsultations:Xn.maxConsultations,overridden:Xn.overridden,...Xn.estimate!==void 0?{estimate:Xn.estimate}:{},...Xn.usage!==void 0?{usage:Xn.usage}:{},...Xn.exhausted!==void 0?{exhausted:Xn.exhausted}:{},onSetLimits:x=>e.transport.post({type:"setTaskExpertLimits",...x})})]}),t==="chat"?(0,Ve.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:2},children:[(0,Ve.jsx)("button",{type:"button","aria-label":"New task",title:"New task",style:Ce("ghost",S),disabled:S,onClick:G0,children:(0,Ve.jsx)(L$,{})}),(0,Ve.jsx)("button",{type:"button","aria-label":"History",title:"History",style:Ce("ghost"),onClick:vD,children:(0,Ve.jsx)(B$,{})}),(0,Ve.jsx)("button",{type:"button","aria-label":"Settings",title:"Settings",style:Ce("ghost"),onClick:V0,children:(0,Ve.jsx)(P$,{})}),(0,Ve.jsx)("button",{type:"button","aria-label":"Guide",title:"Open the guide",style:Ce("ghost"),onClick:()=>{if(o.native){e.transport.post({type:"openWalkthrough"});return}n("guide")},children:(0,Ve.jsx)(J$,{})})]}):(0,Ve.jsx)("button",{type:"button","aria-label":"Back",title:"Back",style:Ce("ghost"),onClick:()=>n("chat"),children:(0,Ve.jsx)(O$,{})})]}),T!==void 0&&t!=="chat"&&(0,Ve.jsxs)("div",{role:"alert",style:{margin:"8px 12px 0",padding:"8px 10px",fontSize:12,borderRadius:4,display:"flex",alignItems:"flex-start",gap:8,color:"var(--vscode-inputValidation-errorForeground, var(--vscode-foreground))",background:"var(--vscode-inputValidation-errorBackground, transparent)",border:"1px solid var(--vscode-inputValidation-errorBorder, var(--vscode-errorForeground))"},children:[(0,Ve.jsx)("span",{style:{flex:1},children:T}),(0,Ve.jsx)("button",{type:"button","aria-label":"Dismiss",onClick:()=>M(void 0),style:{background:"transparent",border:"none",color:"inherit",cursor:"pointer",padding:0},children:"\u2715"})]}),(0,Ve.jsx)("div",{style:{flex:1,minHeight:0,display:"flex",flexDirection:"column"},children:t==="guide"?(0,Ve.jsx)(Z2,{...o.mediaBase!==void 0?{mediaBase:o.mediaBase}:{},onClose:()=>n("chat"),onOpenTab:x=>{e.transport.post({type:"requestProfiles"}),i({tab:x,nonce:Date.now()}),n("settings")}}):t==="settings"?(0,Ve.jsx)(Dx,{...r!==void 0?{requestedTab:r}:{},profiles:A,activeProfileId:V,onSave:RD,onDuplicate:MD,onDelete:BD,onSetActive:J0,onExport:LD,onImport:PD,...k!==void 0?{sharedProfileIds:k.sharedProfileIds}:{},onRequestModels:SD,onTestConnection:kD,onEditingChange:wD,models:GE,...S0!==void 0?{modelsWarning:S0}:{},modelsLoading:WE,testRunning:YE,...k0!==void 0?{testResult:k0}:{},approvals:me,onSetAutoApprove:pD,onRevokeTool:gD,onRevokeCommand:yD,maxIterations:nt,readRoots:Ji,onSetReadRoots:x=>e.transport.post({type:"setReadRoots",roots:x}),accentColor:Ti,onSetAccentColor:x=>{at(x),zx(x),e.transport.post({type:"setAccentColor",value:x})},agents:{...Qm,onAssign:(x,B)=>e.transport.post({type:"setAgentRole",role:x,...B!==void 0?{assignment:B}:{}}),onSetPrompt:(x,B)=>e.transport.post({type:"setAgentPrompt",role:x,...B!==void 0?{prompt:B}:{}}),onSetBudget:x=>e.transport.post({type:"setAgentBudget",matters:x}),onSetTeamGuidance:x=>e.transport.post({type:"setTeamGuidance",...x!==void 0?{guidance:x}:{}}),onSaveCustomRole:x=>e.transport.post({type:"saveCustomRole",...x}),onDeleteCustomRole:x=>e.transport.post({type:"deleteCustomRole",id:x}),onSetRoleTools:(x,B)=>e.transport.post({type:"setRoleTools",role:x,usesTools:B}),onSetRoleWrite:(x,B)=>e.transport.post({type:"setRoleWrite",role:x,canWrite:B}),onSetRoleEnabled:(x,B)=>e.transport.post({type:"setRoleEnabled",role:x,enabled:B}),onSetRoleThinking:(x,B)=>e.transport.post({type:"setRoleThinking",role:x,...B!==void 0?{level:B}:{}}),customRoleLimit:5},onSetAgentColor:(x,B)=>{p0(g=>({...g,colors:{...g.colors,[x]:B}})),Ex(x,B),e.transport.post({type:"setAgentColor",role:x,color:B})},expertColor:CE,onSetExpertColor:x=>{h0(x),Tx(x),e.transport.post({type:"setExpertColor",value:x})},offersOffice:YI,...ch.choosesTheme?{choosesTheme:!0}:{},...ch.theme===void 0?{}:{theme:ch.theme},onSetTheme:x=>{P0(B=>({...B,theme:x})),e.transport.post({type:"setTheme",theme:x})},onSetMaxIterations:x=>e.transport.post({type:"setMaxIterations",value:x}),mcpServers:AE,mcpJson:OE,mcpWarnings:UE,mcpSaveError:ME,mcpConfigs:BE,mcpPlatform:PE,mcpSavedTick:FE,mcpPythonProbe:VE,onDetectPython:ED,onBrowse:Y0,pickedPath:v0,onSaveMcpServer:CD,onDeleteMcpServer:ID,onDuplicateMcpServer:x=>e.transport.post({type:"duplicateMcpServer",name:x}),onSaveMcp:DD,onRestartMcp:AD,onSetMcpServerEnabled:jD,onSetMcpToolPermission:ND,onSetMcpToolTimeout:(x,B,g)=>e.transport.post({type:"setMcpToolTimeout",server:x,tool:B,...g===void 0?{}:{seconds:g}}),onConnectMcp:OD,expert:iI,onSaveExpert:TD,onAssessJunior:x=>e.transport.post({type:"assessJunior",...x!==void 0?{profileId:x}:{}}),onMeasureCost:()=>e.transport.post({type:"measureExpertCost"}),onClearPricing:()=>e.transport.post({type:"clearExpertPricing"}),onSetKeepAlive:x=>e.transport.post({type:"setExpertKeepAlive",enabled:x}),onClearAssessment:(x,B)=>e.transport.post({type:"clearAssessment",...x!==void 0&&B!==void 0?{model:x,profileLabel:B}:{}}),onRecheckExpert:()=>{$0(void 0),e.transport.post({type:"requestExpert"})},search:zD,skills:{s3:_D,team:{aliases:Ab({embedder:eu}),onSaveAliases:x=>e.transport.post({type:"saveSkillsAlias",aliases:x}),onPublish:()=>{sh(void 0),e.transport.post({type:"publishTeamSkills"})},onClear:()=>{sh(void 0),e.transport.post({type:"clearTeamSkills"})},onStop:()=>e.transport.post({type:"cancelIndexing",kind:"teamSkills"}),publishing:Kn?.kind==="teamSkills"&&Kn.running,progress:Kn?.kind==="teamSkills"?Kn:void 0,result:wI},skills:OI,issues:UI,skillsDir:MI,extraDirs:oD,configuredDir:lD,onOpenFile:W0,onOpenStandingSkill:()=>e.transport.post({type:"openStandingSkill"}),onReindex:()=>{ua(void 0),Qc(!0),e.transport.post({type:"indexDocs",kind:"skill"})},probe:{running:ts.docs===!0,result:es.docs},onProbe:(x,B)=>{Ci(B),ca(g=>({...g,[B]:!0})),e.transport.post({type:"runSearchProbe",query:x,target:B})},onClearProbe:()=>Ci("docs"),onClearIndex:()=>{ua(void 0),e.transport.post({type:"clearDocsIndex",kind:"skill"})},indexProgress:Kn?.kind==="skills"?Kn:void 0,onStopIndexing:()=>e.transport.post({type:"cancelIndexing",kind:"skills"}),indexing:th,indexResult:zo===void 0?void 0:zo.error!==void 0?`Failed: ${zo.error}`:`Indexed ${String(zo.indexed??0)} entries.`,onDelete:x=>e.transport.post({type:"deleteSkillFile",name:x}),onSaveDirs:(x,B)=>{sD(x),e.transport.post({type:"saveSkillDirs",dir:x,paths:B})}},schedules:{schedules:LI,tools:ZI,skills:HI,runningId:iD,onSave:x=>e.transport.post({type:"saveSchedule",schedule:x}),onDelete:x=>e.transport.post({type:"deleteSchedule",id:x}),onDuplicate:x=>e.transport.post({type:"duplicateSchedule",id:x}),onToggle:(x,B)=>e.transport.post({type:"setScheduleEnabled",id:x,enabled:B}),onRunNow:x=>e.transport.post({type:"runScheduleNow",id:x}),mentionCandidates:T0,onQueryMentions:q0,onOpenReport:x=>e.transport.post({type:"openManagedFile",path:x}),onOpenRun:(x,B)=>e.transport.post({type:"openScheduleRun",taskId:x,title:B}),scheduler:tD,onRestartScheduler:()=>e.transport.post({type:"restartScheduler"}),onDeleteRun:(x,B)=>e.transport.post({type:"deleteScheduleRun",id:x,at:B}),onClearRuns:x=>e.transport.post({type:"clearScheduleRuns",...x===void 0?{}:{id:x}})},customData:{datasets:da.datasets,tools:da.tools,stores:da.stores,defaultStoreLabel:da.defaultStoreLabel,semantic:da.semantic,guidance:da.guidance,progress:Kn?.kind==="dataset"?Kn:void 0,probe:{running:ts.data===!0,result:es.data},onProbe:(x,B)=>{Ci(B),ca(g=>({...g,[B]:!0})),e.transport.post({type:"runSearchProbe",query:x,target:B})},onClearProbe:()=>Ci("data"),onRefresh:()=>{e.transport.post({type:"requestTools"}),e.transport.post({type:"requestDatasetStatus"})},onSave:x=>e.transport.post({type:"saveDataset",dataset:x}),onDelete:x=>e.transport.post({type:"deleteDataset",id:x}),onSync:x=>e.transport.post({type:"syncDataset",id:x}),onClear:(x,B)=>e.transport.post({type:"clearDataset",id:x,resync:B}),onStop:()=>e.transport.post({type:"cancelIndexing"})},outlook:{status:bI,onSave:x=>e.transport.post({type:"saveMailSettings",...x}),onSyncNow:()=>e.transport.post({type:"syncMail"}),onPrune:()=>e.transport.post({type:"pruneMail"}),tree:U0,progress:Kn?.kind==="mail"?Kn:void 0,onRefreshFolders:()=>{R0(x=>({...x,loading:!0})),e.transport.post({type:"requestOutlookFolders",force:U0.folders.length>0})},onClear:x=>e.transport.post({type:"clearMailIndex",resync:x}),probe:{running:ts.mail===!0,result:es.mail},onProbe:(x,B)=>{Ci(B),ca(g=>({...g,[B]:!0})),e.transport.post({type:"runSearchProbe",query:x,target:B})},onClearProbe:()=>Ci("mail"),onRefreshDays:x=>e.transport.post({type:"refreshMail",days:x}),onStop:()=>e.transport.post({type:"cancelIndexing",kind:"mail"})},tools:{...eD,docsIndex:{enabled:$o.enabled,retrievalReady:ns!==void 0&&eu?.model!==void 0,indexing:th,result:Ix(zo)},onIndexDocs:()=>e.transport.post({type:"indexDocs",kind:"tool"}),probe:{running:ts.docs===!0,result:es.docs},onProbe:(x,B)=>{Ci(B),ca(g=>({...g,[B]:!0})),e.transport.post({type:"runSearchProbe",query:x,target:B})},onClearProbe:()=>Ci("docs"),onRefreshTools:()=>e.transport.post({type:"requestTools"}),onClearDocs:()=>{ua(void 0),e.transport.post({type:"clearDocsIndex",kind:"tool"})},progress:Kn?.kind==="tools"?Kn:void 0,onStopIndexing:()=>e.transport.post({type:"cancelIndexing",kind:"tools"}),...F0===void 0?{}:{toolTimeoutSeconds:F0},onSetToolTimeoutFor:(x,B)=>e.transport.post({type:"setToolTimeoutFor",name:x,...B===void 0?{}:{seconds:B}}),onSetToolTimeout:x=>e.transport.post({type:"setToolTimeout",...x===void 0?{}:{seconds:x}}),onSetOffice:(x,B)=>{H0(g=>({...g,office:{...g.office,excel:x,outlook:B}})),e.transport.post({type:"setOffice",excel:x,outlook:B})}},...u!==void 0?{reviews:{...u,onDecide:(x,B,g)=>e.transport.post({type:"decideReview",id:x,approved:B,...g!==void 0?{reason:g}:{}})}}:{},...l!==void 0?{variables:{...l,onSaveUser:x=>e.transport.post({type:"saveUserVariables",variables:x}),onSaveAdmin:x=>e.transport.post({type:"saveAdminVariables",variables:x}),onSaveAdminIds:x=>e.transport.post({type:"saveAdminIds",ids:x})}}:{},python:{s3:$D,...f?{programming:{profiles:A.map(x=>({id:x.id,label:x.label})),selectedId:m,onSelect:x=>e.transport.post({type:"setProgrammingProfile",id:x})}}:{},status:EI,settings:AI,onBrowse:Y0,pickedPath:v0,onOpenFile:W0,onDeleteTool:x=>e.transport.post({type:"deletePythonTool",name:x}),onApproveTool:x=>e.transport.post({type:"approvePythonTool",name:x}),onSave:x=>e.transport.post({type:"setPython",dynamicTools:x.dynamicTools,uvPath:x.uvPath,toolsDir:x.toolsDir,venvPath:x.venvPath,interpreterPath:x.interpreterPath,timeoutSeconds:x.timeoutSeconds,indexUrl:x.indexUrl,offline:x.offline,env:x.env})},network:{...z0!==void 0?{settings:z0}:{settings:void 0},onSave:x=>e.transport.post({type:"saveNetwork",settings:x})}}):t==="history"?(0,Ve.jsx)(H2,{tasks:JE,activeTaskId:w0,onOpen:bD,onDelete:xD,onNew:G0}):ZD?(0,Ve.jsxs)("div",{style:{padding:20,textAlign:"center"},children:[(0,Ve.jsx)("p",{style:{color:s.muted},children:"No provider configured yet."}),(0,Ve.jsx)("button",{type:"button",style:oe(!1),onClick:V0,children:"Configure a Provider"})]}):(0,Ve.jsx)(lx,{plan:qI,planCheckpoints:GI,directRoles:Qm.roles.filter(x=>x.available&&x.enabled).map(x=>({role:x.role,name:x.name,summary:x.summary})),onSetPlan:x=>{Z0(x),e.transport.post({type:"setPlan",plan:x})},conversationKey:w0??"new",messages:p,isStreaming:S,error:T,pendingApproval:jt,pendingForm:gi,onSubmitForm:(x,B)=>{Z(void 0),e.transport.post({type:"formResponse",id:x,submitted:!0,values:B})},onDismissForm:x=>{Z(void 0),e.transport.post({type:"formResponse",id:x,submitted:!1,values:{}})},canRollback:fe,onSend:cD,onCancel:dD,onDecideApproval:fD,onAlwaysAllow:mD,onRollback:UD,usage:KE,expertSpend:Xn,supportsVision:eI,mentionCandidates:T0,onQueryMentions:q0,profiles:A,activeProfileId:V,onSelectProfile:J0,expertEnabled:ah,queued:aI,onUnqueue:uD,searchConnections:lh.map(x=>({id:x.id,label:x.label})),activeSearchId:ns,onSelectSearch:x=>e.transport.post({type:"setActiveSearchConnection",id:x})})})]})}var kE=U(yE(),1);var Cr=(e,t)=>{console.info(`[light-code] ${e}`,t??"")};function X3(){try{return new URL(".",document.baseURI).pathname}catch{return"/"}}var Ql=X3(),vE=3,bE=700,xE=500,Ym=class{constructor(t){this.onStatus=t}onStatus;listeners=new Set;token;streamOpen=!1;queued=[];polling=!1;pollTimer;patienceTimer;pollFailures=0;pollReported=!1;lastActivity=Date.now();shortStreams=0;async connect(){let t=new URLSearchParams(window.location.hash.slice(1)).get("t");if(t!==null){window.history.replaceState(null,"",window.location.pathname);let n=await fetch(`${Ql}api/session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({handoff:t})});if(!n.ok)throw new Error(await n.text());this.token=(await n.json()).token,sessionStorage.setItem("lightCodeToken",this.token)}else this.token=sessionStorage.getItem("lightCodeToken")??void 0;if(this.token===void 0)try{let n=await fetch(`${Ql}api/session`,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})});n.ok&&(this.token=(await n.json()).token,sessionStorage.setItem("lightCodeToken",this.token))}catch{}if(this.token===void 0)throw new Error("No session. Restart light-code and open the printed URL.");this.awaitStream(),this.listen()}async listen(){for(;;){let t=Date.now();try{let n=window.location.pathname.startsWith("/admin")?"?view=admin":"";Cr("opening event stream",{url:`${Ql}api/events${n}`}),t=Date.now();let r=await fetch(`${Ql}api/events${n}`,{headers:{Authorization:`Bearer ${this.token??""}`}});if(!r.ok||r.body===null)throw Cr("event stream refused",{status:r.status,note:r.status===599?"a proxy in front gave up on the request":void 0}),new Error(`stream failed: ${r.status}`);Cr("event stream open",{afterMs:Date.now()-t}),this.onStatus("connected","ok"),this.openStream();let i=r.body.getReader(),o=new TextDecoder,a="";for(;;){let{done:l,value:c}=await i.read();if(l)break;a+=o.decode(c,{stream:!0});let u=a.indexOf(`
|
|
148
|
-
|
|
149
|
-
`);for(;u!==-1;){let d=a.slice(0,u);if(a=a.slice(u+2),d.startsWith("data: ")){let m=JSON.parse(d.slice(6));for(let h of this.listeners)h(m)}u=a.indexOf(`
|
|
150
|
-
|
|
151
|
-
`)}}Cr("event stream ended cleanly",{afterMs:Date.now()-t})}catch(n){Cr("event stream dropped",{afterMs:Date.now()-t,reason:n instanceof Error?n.message:String(n)}),this.polling||this.onStatus(`disconnected \u2014 retrying (${n instanceof Error?n.message:String(n)})`,"error")}if(this.streamOpen&&(this.shortStreams=K3(Date.now()-t,this.shortStreams),Cr("stream closed",{lifeMs:Date.now()-t,shortStreams:this.shortStreams}),Q3(this.shortStreams)&&!this.polling)){this.streamOpen=!1,this.startPolling();return}if(this.polling)return;this.streamOpen=!1,await new Promise(n=>setTimeout(n,1e3))}}post(t){if(!this.streamOpen){if(this.queued.length>=xE){this.onStatus(`still not connected, and ${String(xE)} messages are already waiting \u2014 this one was dropped. Reload the page.`,"error");return}this.queued.push(t),Cr("held \u2014 no stream yet",{type:SE(t),waiting:this.queued.length});return}this.lastActivity=Date.now(),this.polling&&this.schedulePoll(),this.send(t,0)}awaitStream(){this.patienceTimer!==void 0||this.polling||(this.patienceTimer=setTimeout(()=>{this.patienceTimer=void 0,!(this.streamOpen||this.polling)&&this.startPolling()},8e3))}startPolling(){this.polling=!0,Cr("falling back to polling",{why:this.shortStreams>0?"the stream kept dropping":"the stream never opened",shortStreams:this.shortStreams}),this.onStatus("Replies are being fetched rather than streamed \u2014 something between this page and the server does not pass streaming responses through. Everything works; text may arrive in small bursts rather than as it is typed.","notice"),this.poll().finally(()=>{this.openStream(),this.schedulePoll()})}schedulePoll(){if(!this.polling)return;this.pollTimer!==void 0&&clearTimeout(this.pollTimer);let t=Date.now()-this.lastActivity<4e3;this.pollTimer=setTimeout(()=>{this.poll().finally(()=>this.schedulePoll())},t?300:2e3)}async poll(){try{let t=await fetch(`${Ql}api/poll`,{headers:{Authorization:`Bearer ${this.token??""}`}});if(!t.ok){this.notePollFailure();return}let n=await t.json();this.pollFailures=0,this.pollReported&&(this.pollReported=!1,this.onStatus("connected","ok"));let r=n.messages??[];r.length>0&&(this.lastActivity=Date.now());for(let i of r)for(let o of this.listeners)o(i)}catch{this.notePollFailure()}}notePollFailure(){this.pollFailures+=1,!(this.pollFailures<5||this.pollReported)&&(this.pollReported=!0,this.onStatus("cannot reach the server \u2014 the event stream did not open and fetching replies is failing too, so nothing is being saved. Check that the address in the browser reaches the server light-code printed.","error"))}openStream(){this.streamOpen=!0,this.patienceTimer!==void 0&&(clearTimeout(this.patienceTimer),this.patienceTimer=void 0);let t=this.queued;this.queued=[];for(let n of t)this.send(n,0)}async send(t,n){try{let r=await fetch(`${Ql}api/message`,{method:"POST",headers:{"Content-Type":"application/json",Authorization:`Bearer ${this.token??""}`},body:JSON.stringify(t)});if(r.ok)return;if(Cr("sent",{type:SE(t),status:r.status,attempt:n}),r.status===409&&n<vE){await new Promise(o=>setTimeout(o,bE)),await this.send(t,n+1);return}let i=(await r.text().catch(()=>"")).trim();this.onStatus(`the server refused that (${String(r.status)})${i.length>0?`: ${i}`:""}`,"error")}catch(r){if(n<vE){await new Promise(i=>setTimeout(i,bE)),await this.send(t,n+1);return}this.onStatus(`could not reach the server: ${r instanceof Error?r.message:String(r)}`,"error")}}onMessage(t){return this.listeners.add(t),()=>this.listeners.delete(t)}};function SE(e){let t=e?.type;return typeof t=="string"?t:"unknown"}function K3(e,t){return e<2e4?t+1:0}function Q3(e){return e>=2}var TE=U(re(),1),wE=document.getElementById("root");if(wE===null)throw new Error("Light Code: no #root element to mount into.");var Jm=document.getElementById("status"),_E=(e,t="error")=>{Jm!==null&&(Jm.textContent=t==="ok"?"":e,Jm.style.display=t==="ok"?"none":"block",Jm.className=t)},$E=e=>{let t=document.documentElement;if(e==="light"||e==="dark"){t.dataset.theme=e;try{localStorage.setItem("lightcode.theme",e)}catch{}}else{delete t.dataset.theme;try{localStorage.removeItem("lightcode.theme")}catch{}}};try{$E(localStorage.getItem("lightcode.theme")??void 0)}catch{}var e8=document.getElementById("booting"),Km=document.getElementById("booting-detail"),m0=()=>e8?.classList.add("done"),t8=1e4,zE=setTimeout(m0,t8),Xm=new Set(["settings","profiles"]),f0=new Ym((e,t)=>{_E(e,t),Km!==null&&t!=="ok"&&(Km.textContent=e)});f0.onMessage(e=>{let t=e;t.type==="settings"&&$E(t.theme),!(t.type===void 0||!Xm.delete(t.type))&&(Km!==null&&Xm.size>0&&(Km.textContent=`waiting for ${[...Xm].join(", ")}`),Xm.size===0&&(clearTimeout(zE),m0()))});f0.connect().then(()=>(0,kE.createRoot)(wE).render((0,TE.jsx)(jx,{transport:f0}))).catch(e=>{clearTimeout(zE),m0(),_E(e instanceof Error?e.message:String(e),"error")});})();
|
|
152
|
-
/*! Bundled license information:
|
|
153
|
-
|
|
154
|
-
react/cjs/react-jsx-runtime.production.js:
|
|
155
|
-
(**
|
|
156
|
-
* @license React
|
|
157
|
-
* react-jsx-runtime.production.js
|
|
158
|
-
*
|
|
159
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
160
|
-
*
|
|
161
|
-
* This source code is licensed under the MIT license found in the
|
|
162
|
-
* LICENSE file in the root directory of this source tree.
|
|
163
|
-
*)
|
|
164
|
-
|
|
165
|
-
react/cjs/react.production.js:
|
|
166
|
-
(**
|
|
167
|
-
* @license React
|
|
168
|
-
* react.production.js
|
|
169
|
-
*
|
|
170
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
171
|
-
*
|
|
172
|
-
* This source code is licensed under the MIT license found in the
|
|
173
|
-
* LICENSE file in the root directory of this source tree.
|
|
174
|
-
*)
|
|
175
|
-
|
|
176
|
-
react-dom/cjs/react-dom.production.js:
|
|
177
|
-
(**
|
|
178
|
-
* @license React
|
|
179
|
-
* react-dom.production.js
|
|
180
|
-
*
|
|
181
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
182
|
-
*
|
|
183
|
-
* This source code is licensed under the MIT license found in the
|
|
184
|
-
* LICENSE file in the root directory of this source tree.
|
|
185
|
-
*)
|
|
186
|
-
|
|
187
|
-
scheduler/cjs/scheduler.production.js:
|
|
188
|
-
(**
|
|
189
|
-
* @license React
|
|
190
|
-
* scheduler.production.js
|
|
191
|
-
*
|
|
192
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
193
|
-
*
|
|
194
|
-
* This source code is licensed under the MIT license found in the
|
|
195
|
-
* LICENSE file in the root directory of this source tree.
|
|
196
|
-
*)
|
|
197
|
-
|
|
198
|
-
react-dom/cjs/react-dom-client.production.js:
|
|
199
|
-
(**
|
|
200
|
-
* @license React
|
|
201
|
-
* react-dom-client.production.js
|
|
202
|
-
*
|
|
203
|
-
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
204
|
-
*
|
|
205
|
-
* This source code is licensed under the MIT license found in the
|
|
206
|
-
* LICENSE file in the root directory of this source tree.
|
|
207
|
-
*)
|
|
208
|
-
*/
|
|
209
|
-
//# sourceMappingURL=client.js.map
|