@mastra/deployer-cloud 1.2.0-alpha.1 → 1.2.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/CHANGELOG.md +8 -0
- package/dist/studio/assets/{chunk-REDZDNFN-BIB5AOku.js → chunk-REDZDNFN-Cr7xlPG_.js} +1 -1
- package/dist/studio/assets/{chunk-REDZDNFN-KUvJSx-S-Du_yEQ2A.js → chunk-REDZDNFN-KUvJSx-S-BG-LxUq_.js} +1 -1
- package/dist/studio/assets/{index-C0y3DYum.js → index--riPlyqE.js} +1 -1
- package/dist/studio/assets/{index-CL7MFM3T.js → index-B1Qtw4Lj.js} +1 -1
- package/dist/studio/assets/{index-CaKBhxiM.js → index-BW4-uLEI.js} +1 -1
- package/dist/studio/assets/{index-2qdSQpiz.js → index-BceWItRu.js} +1 -1
- package/dist/studio/assets/{index-Bmp-WDVD.js → index-Bv0RkQNw.js} +1 -1
- package/dist/studio/assets/{index-8MG4r6cz.js → index-C0AURa5c.js} +1 -1
- package/dist/studio/assets/{index-aqZjQKW7.js → index-C69KpY5X.js} +1 -1
- package/dist/studio/assets/{index-BrS8VKnS.js → index-C9ZwK38q.js} +1 -1
- package/dist/studio/assets/{index-Cy_qLZpv.js → index-CQEYP2RS.js} +1 -1
- package/dist/studio/assets/{index-BKR4AleT.js → index-CQPrZsle.js} +1 -1
- package/dist/studio/assets/{index-DvImktti.js → index-CikqFwBO.js} +1 -1
- package/dist/studio/assets/{index-BdK7a_DT.js → index-DKp3jcP0.js} +1 -1
- package/dist/studio/assets/{index-CVrfkaNJ.js → index-DOqGjpNO.js} +1 -1
- package/dist/studio/assets/{index-BEgjYn3X.js → index-DPafMKjV.js} +1 -1
- package/dist/studio/assets/{index-CA8CeUf8.js → index-DcT1YIno.js} +1 -1
- package/dist/studio/assets/{index-B-bj7NWS.js → index-eexUQSlS.js} +1 -1
- package/dist/studio/assets/{index-fmrue1DI.js → index-jRz9XLMK.js} +1 -1
- package/dist/studio/assets/{index-CDq94W76.js → index-tVehqBsq.js} +1 -1
- package/dist/studio/assets/{main-B2CceGn6.js → main-Sp1WAZ1t.js} +7 -7
- package/dist/studio/assets/{token-6GSAFR2W-XRCSVUPZ-CDj_xl7O-DebwFlmz.js → token-6GSAFR2W-XRCSVUPZ-CDj_xl7O-VTKn_yTk.js} +1 -1
- package/dist/studio/assets/{token-6GSAFR2W-XRCSVUPZ-B-9rMbT9.js → token-6GSAFR2W-XRCSVUPZ-k3nryV4h.js} +1 -1
- package/dist/studio/assets/token-util-NEHG7TUY-U7CX7GS4-DFtrw2uQ.js +1 -0
- package/dist/studio/assets/token-util-NEHG7TUY-U7CX7GS4-OABXDW2K-BH3AU3Ec.js +1 -0
- package/dist/studio/index.html +1 -1
- package/package.json +7 -7
- package/versions.json +1 -1
- package/dist/studio/assets/token-util-NEHG7TUY-U7CX7GS4-DQzJqVHl.js +0 -1
- package/dist/studio/assets/token-util-NEHG7TUY-U7CX7GS4-OABXDW2K-DfcMD4TX.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-
|
|
2
|
-
import{_ as Fe}from"./index-C0y3DYum.js";function U3e(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(n,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var jM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H8={exports:{}},lk={};var Zge;function Yyt(){if(Zge)return lk;Zge=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var o in a)o!=="key"&&(s[o]=a[o])}else s=a;return a=s.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:s}}return lk.Fragment=t,lk.jsx=r,lk.jsxs=r,lk}var Hge;function Kyt(){return Hge||(Hge=1,H8.exports=Yyt()),H8.exports}var p=Kyt(),G8={exports:{}},on={},Gge;function Jyt(){if(Gge)return on;Gge=1;var e={env:{}};var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;function g(q){return q===null||typeof q!="object"?null:(q=h&&q[h]||q["@@iterator"],typeof q=="function"?q:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function x(q,I,Z){this.props=q,this.context=I,this.refs=w,this.updater=Z||y}x.prototype.isReactComponent={},x.prototype.setState=function(q,I){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,I,"setState")},x.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function S(){}S.prototype=x.prototype;function E(q,I,Z){this.props=q,this.context=I,this.refs=w,this.updater=Z||y}var C=E.prototype=new S;C.constructor=E,b(C,x.prototype),C.isPureReactComponent=!0;var k=Array.isArray;function A(){}var D={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function P(q,I,Z){var G=Z.ref;return{$$typeof:t,type:q,key:I,ref:G!==void 0?G:null,props:Z}}function j(q,I){return P(q.type,I,q.props)}function z(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function U(q){var I={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(Z){return I[Z]})}var $=/\/+/g;function F(q,I){return typeof q=="object"&&q!==null&&q.key!=null?U(""+q.key):I.toString(36)}function V(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(A,A):(q.status="pending",q.then(function(I){q.status==="pending"&&(q.status="fulfilled",q.value=I)},function(I){q.status==="pending"&&(q.status="rejected",q.reason=I)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function H(q,I,Z,G,J){var K=typeof q;(K==="undefined"||K==="boolean")&&(q=null);var ae=!1;if(q===null)ae=!0;else switch(K){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(q.$$typeof){case t:case r:ae=!0;break;case d:return ae=q._init,H(ae(q._payload),I,Z,G,J)}}if(ae)return J=J(q),ae=G===""?"."+F(q,0):G,k(J)?(Z="",ae!=null&&(Z=ae.replace($,"$&/")+"/"),H(J,I,Z,"",function(Te){return Te})):J!=null&&(z(J)&&(J=j(J,Z+(J.key==null||q&&q.key===J.key?"":(""+J.key).replace($,"$&/")+"/")+ae)),I.push(J)),1;ae=0;var le=G===""?".":G+":";if(k(q))for(var ce=0;ce<q.length;ce++)G=q[ce],K=le+F(G,ce),ae+=H(G,I,Z,K,J);else if(ce=g(q),typeof ce=="function")for(q=ce.call(q),ce=0;!(G=q.next()).done;)G=G.value,K=le+F(G,ce++),ae+=H(G,I,Z,K,J);else if(K==="object"){if(typeof q.then=="function")return H(V(q),I,Z,G,J);throw I=String(q),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ae}function B(q,I,Z){if(q==null)return q;var G=[],J=0;return H(q,G,"","",function(K){return I.call(Z,K,J++)}),G}function Q(q){if(q._status===-1){var I=q._result;I=I(),I.then(function(Z){(q._status===0||q._status===-1)&&(q._status=1,q._result=Z)},function(Z){(q._status===0||q._status===-1)&&(q._status=2,q._result=Z)}),q._status===-1&&(q._status=0,q._result=I)}if(q._status===1)return q._result.default;throw q._result}var M=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(I))return}else if(typeof e=="object"&&typeof e.emit=="function"){e.emit("uncaughtException",q);return}console.error(q)},W={map:B,forEach:function(q,I,Z){B(q,function(){I.apply(this,arguments)},Z)},count:function(q){var I=0;return B(q,function(){I++}),I},toArray:function(q){return B(q,function(I){return I})||[]},only:function(q){if(!z(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return on.Activity=f,on.Children=W,on.Component=x,on.Fragment=n,on.Profiler=s,on.PureComponent=E,on.StrictMode=a,on.Suspense=c,on.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,on.__COMPILER_RUNTIME={__proto__:null,c:function(q){return D.H.useMemoCache(q)}},on.cache=function(q){return function(){return q.apply(null,arguments)}},on.cacheSignal=function(){return null},on.cloneElement=function(q,I,Z){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var G=b({},q.props),J=q.key;if(I!=null)for(K in I.key!==void 0&&(J=""+I.key),I)!N.call(I,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&I.ref===void 0||(G[K]=I[K]);var K=arguments.length-2;if(K===1)G.children=Z;else if(1<K){for(var ae=Array(K),le=0;le<K;le++)ae[le]=arguments[le+2];G.children=ae}return P(q.type,J,G)},on.createContext=function(q){return q={$$typeof:o,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:i,_context:q},q},on.createElement=function(q,I,Z){var G,J={},K=null;if(I!=null)for(G in I.key!==void 0&&(K=""+I.key),I)N.call(I,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(J[G]=I[G]);var ae=arguments.length-2;if(ae===1)J.children=Z;else if(1<ae){for(var le=Array(ae),ce=0;ce<ae;ce++)le[ce]=arguments[ce+2];J.children=le}if(q&&q.defaultProps)for(G in ae=q.defaultProps,ae)J[G]===void 0&&(J[G]=ae[G]);return P(q,K,J)},on.createRef=function(){return{current:null}},on.forwardRef=function(q){return{$$typeof:l,render:q}},on.isValidElement=z,on.lazy=function(q){return{$$typeof:d,_payload:{_status:-1,_result:q},_init:Q}},on.memo=function(q,I){return{$$typeof:u,type:q,compare:I===void 0?null:I}},on.startTransition=function(q){var I=D.T,Z={};D.T=Z;try{var G=q(),J=D.S;J!==null&&J(Z,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(A,M)}catch(K){M(K)}finally{I!==null&&Z.types!==null&&(I.types=Z.types),D.T=I}},on.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},on.use=function(q){return D.H.use(q)},on.useActionState=function(q,I,Z){return D.H.useActionState(q,I,Z)},on.useCallback=function(q,I){return D.H.useCallback(q,I)},on.useContext=function(q){return D.H.useContext(q)},on.useDebugValue=function(){},on.useDeferredValue=function(q,I){return D.H.useDeferredValue(q,I)},on.useEffect=function(q,I){return D.H.useEffect(q,I)},on.useEffectEvent=function(q){return D.H.useEffectEvent(q)},on.useId=function(){return D.H.useId()},on.useImperativeHandle=function(q,I,Z){return D.H.useImperativeHandle(q,I,Z)},on.useInsertionEffect=function(q,I){return D.H.useInsertionEffect(q,I)},on.useLayoutEffect=function(q,I){return D.H.useLayoutEffect(q,I)},on.useMemo=function(q,I){return D.H.useMemo(q,I)},on.useOptimistic=function(q,I){return D.H.useOptimistic(q,I)},on.useReducer=function(q,I,Z){return D.H.useReducer(q,I,Z)},on.useRef=function(q){return D.H.useRef(q)},on.useState=function(q){return D.H.useState(q)},on.useSyncExternalStore=function(q,I,Z){return D.H.useSyncExternalStore(q,I,Z)},on.useTransition=function(){return D.H.useTransition()},on.version="19.2.3",on}var Qge;function fO(){return Qge||(Qge=1,G8.exports=Jyt()),G8.exports}var _=fO();const we=xf(_),hI=U3e({__proto__:null,default:we},[_]);var Q8={exports:{}},ck={},W8={exports:{}},X8={};var Wge;function ebt(){return Wge||(Wge=1,(function(e){function t(V,H){var B=V.length;V.push(H);e:for(;0<B;){var Q=B-1>>>1,M=V[Q];if(0<a(M,H))V[Q]=H,V[B]=M,B=Q;else break e}}function r(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var H=V[0],B=V.pop();if(B!==H){V[0]=B;e:for(var Q=0,M=V.length,W=M>>>1;Q<W;){var q=2*(Q+1)-1,I=V[q],Z=q+1,G=V[Z];if(0>a(I,B))Z<M&&0>a(G,I)?(V[Q]=G,V[Z]=B,Q=Z):(V[Q]=I,V[q]=B,Q=q);else if(Z<M&&0>a(G,B))V[Q]=G,V[Z]=B,Q=Z;else break e}}return H}function a(V,H){var B=V.sortIndex-H.sortIndex;return B!==0?B:V.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var l=[],c=[],u=1,d=null,f=3,h=!1,g=!1,y=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function E(V){for(var H=r(c);H!==null;){if(H.callback===null)n(c);else if(H.startTime<=V)n(c),H.sortIndex=H.expirationTime,t(l,H);else break;H=r(c)}}function C(V){if(y=!1,E(V),!g)if(r(l)!==null)g=!0,k||(k=!0,z());else{var H=r(c);H!==null&&F(C,H.startTime-V)}}var k=!1,A=-1,D=5,N=-1;function P(){return b?!0:!(e.unstable_now()-N<D)}function j(){if(b=!1,k){var V=e.unstable_now();N=V;var H=!0;try{e:{g=!1,y&&(y=!1,x(A),A=-1),h=!0;var B=f;try{t:{for(E(V),d=r(l);d!==null&&!(d.expirationTime>V&&P());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,f=d.priorityLevel;var M=Q(d.expirationTime<=V);if(V=e.unstable_now(),typeof M=="function"){d.callback=M,E(V),H=!0;break t}d===r(l)&&n(l),E(V)}else n(l);d=r(l)}if(d!==null)H=!0;else{var W=r(c);W!==null&&F(C,W.startTime-V),H=!1}}break e}finally{d=null,f=B,h=!1}H=void 0}}finally{H?z():k=!1}}}var z;if(typeof S=="function")z=function(){S(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,$=U.port2;U.port1.onmessage=j,z=function(){$.postMessage(null)}}else z=function(){w(j,0)};function F(V,H){A=w(function(){V(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(V){switch(f){case 1:case 2:case 3:var H=3;break;default:H=f}var B=f;f=H;try{return V()}finally{f=B}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(V,H){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var B=f;f=V;try{return H()}finally{f=B}},e.unstable_scheduleCallback=function(V,H,B){var Q=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Q+B:Q):B=Q,V){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=B+M,V={id:u++,callback:H,priorityLevel:V,startTime:B,expirationTime:M,sortIndex:-1},B>Q?(V.sortIndex=B,t(c,V),r(l)===null&&V===r(c)&&(y?(x(A),A=-1):y=!0,F(C,B-Q))):(V.sortIndex=M,t(l,V),g||h||(g=!0,k||(k=!0,z()))),V},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(V){var H=f;return function(){var B=f;f=H;try{return V.apply(this,arguments)}finally{f=B}}}})(X8)),X8}var Xge;function tbt(){return Xge||(Xge=1,W8.exports=ebt()),W8.exports}var Y8={exports:{}},nl={};var Yge;function rbt(){if(Yge)return nl;Yge=1;var e=fO();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)c+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(l,c,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:d==null?null:""+d,children:l,containerInfo:c,implementation:u}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return nl.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,nl.createPortal=function(l,c){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return s(l,c,null,u)},nl.flushSync=function(l){var c=i.T,u=n.p;try{if(i.T=null,n.p=2,l)return l()}finally{i.T=c,n.p=u,n.d.f()}},nl.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,n.d.C(l,c))},nl.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},nl.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var u=c.as,d=o(u,c.crossOrigin),f=typeof c.integrity=="string"?c.integrity:void 0,h=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;u==="style"?n.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:d,integrity:f,fetchPriority:h}):u==="script"&&n.d.X(l,{crossOrigin:d,integrity:f,fetchPriority:h,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},nl.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var u=o(c.as,c.crossOrigin);n.d.M(l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&n.d.M(l)},nl.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var u=c.as,d=o(u,c.crossOrigin);n.d.L(l,u,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},nl.preloadModule=function(l,c){if(typeof l=="string")if(c){var u=o(c.as,c.crossOrigin);n.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else n.d.m(l)},nl.requestFormReset=function(l){n.d.r(l)},nl.unstable_batchedUpdates=function(l,c){return l(c)},nl.useFormState=function(l,c,u){return i.H.useFormState(l,c,u)},nl.useFormStatus=function(){return i.H.useHostTransitionStatus()},nl.version="19.2.3",nl}var Kge;function V3e(){if(Kge)return Y8.exports;Kge=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Y8.exports=rbt(),Y8.exports}var Jge;function nbt(){if(Jge)return ck;Jge=1;var e={env:{}};var t=tbt(),r=fO(),n=V3e();function a(m){var v="https://react.dev/errors/"+m;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var O=2;O<arguments.length;O++)v+="&args[]="+encodeURIComponent(arguments[O])}return"Minified React error #"+m+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(m){return!(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)}function i(m){var v=m,O=m;if(m.alternate)for(;v.return;)v=v.return;else{m=v;do v=m,(v.flags&4098)!==0&&(O=v.return),m=v.return;while(m)}return v.tag===3?O:null}function o(m){if(m.tag===13){var v=m.memoizedState;if(v===null&&(m=m.alternate,m!==null&&(v=m.memoizedState)),v!==null)return v.dehydrated}return null}function l(m){if(m.tag===31){var v=m.memoizedState;if(v===null&&(m=m.alternate,m!==null&&(v=m.memoizedState)),v!==null)return v.dehydrated}return null}function c(m){if(i(m)!==m)throw Error(a(188))}function u(m){var v=m.alternate;if(!v){if(v=i(m),v===null)throw Error(a(188));return v!==m?null:m}for(var O=m,T=v;;){var R=O.return;if(R===null)break;var L=R.alternate;if(L===null){if(T=R.return,T!==null){O=T;continue}break}if(R.child===L.child){for(L=R.child;L;){if(L===O)return c(R),m;if(L===T)return c(R),v;L=L.sibling}throw Error(a(188))}if(O.return!==T.return)O=R,T=L;else{for(var Y=!1,re=R.child;re;){if(re===O){Y=!0,O=R,T=L;break}if(re===T){Y=!0,T=R,O=L;break}re=re.sibling}if(!Y){for(re=L.child;re;){if(re===O){Y=!0,O=L,T=R;break}if(re===T){Y=!0,T=L,O=R;break}re=re.sibling}if(!Y)throw Error(a(189))}}if(O.alternate!==T)throw Error(a(190))}if(O.tag!==3)throw Error(a(188));return O.stateNode.current===O?m:v}function d(m){var v=m.tag;if(v===5||v===26||v===27||v===6)return m;for(m=m.child;m!==null;){if(v=d(m),v!==null)return v;m=m.sibling}return null}var f=Object.assign,h=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),E=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function U(m){return m===null||typeof m!="object"?null:(m=z&&m[z]||m["@@iterator"],typeof m=="function"?m:null)}var $=Symbol.for("react.client.reference");function F(m){if(m==null)return null;if(typeof m=="function")return m.$$typeof===$?null:m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case b:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case k:return"Suspense";case A:return"SuspenseList";case P:return"Activity"}if(typeof m=="object")switch(m.$$typeof){case y:return"Portal";case E:return m.displayName||"Context";case S:return(m._context.displayName||"Context")+".Consumer";case C:var v=m.render;return m=m.displayName,m||(m=v.displayName||v.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case D:return v=m.displayName||null,v!==null?v:F(m.type)||"Memo";case N:v=m._payload,m=m._init;try{return F(m(v))}catch{}}return null}var V=Array.isArray,H=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},M=[],W=-1;function q(m){return{current:m}}function I(m){0>W||(m.current=M[W],M[W]=null,W--)}function Z(m,v){W++,M[W]=m.current,m.current=v}var G=q(null),J=q(null),K=q(null),ae=q(null);function le(m,v){switch(Z(K,v),Z(J,m),Z(G,null),v.nodeType){case 9:case 11:m=(m=v.documentElement)&&(m=m.namespaceURI)?hge(m):0;break;default:if(m=v.tagName,v=v.namespaceURI)v=hge(v),m=mge(v,m);else switch(m){case"svg":m=1;break;case"math":m=2;break;default:m=0}}I(G),Z(G,m)}function ce(){I(G),I(J),I(K)}function Te(m){m.memoizedState!==null&&Z(ae,m);var v=G.current,O=mge(v,m.type);v!==O&&(Z(J,m),Z(G,O))}function X(m){J.current===m&&(I(G),I(J)),ae.current===m&&(I(ae),ak._currentValue=Q)}var se,te;function ve(m){if(se===void 0)try{throw Error()}catch(O){var v=O.stack.trim().match(/\n( *(at )?)/);se=v&&v[1]||"",te=-1<O.stack.indexOf(`
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-B1Qtw4Lj.js","./index--riPlyqE.js","./index-BceWItRu.js","./index-DcT1YIno.js","./index-CikqFwBO.js","./index-C69KpY5X.js","./index-DPafMKjV.js","./index-C9ZwK38q.js","./index-Bv0RkQNw.js","./index-CQPrZsle.js","./index-CQEYP2RS.js","./index-eexUQSlS.js","./index-DKp3jcP0.js","./index-jRz9XLMK.js","./index-DOqGjpNO.js","./dockerfile-BKs6k2Af.js","./simple-mode-GW_nhZxv.js","./factor-kuTfRLto.js","./nsis-LdVXkNf5.js","./pug-DeIclll2.js","./javascript-iXu5QeM3.js","./index-BW4-uLEI.js","./index-tVehqBsq.js","./token-util-NEHG7TUY-U7CX7GS4-OABXDW2K-BH3AU3Ec.js","./chunk-REDZDNFN-KUvJSx-S-BG-LxUq_.js","./token-6GSAFR2W-XRCSVUPZ-CDj_xl7O-VTKn_yTk.js","./token-util-NEHG7TUY-U7CX7GS4-DFtrw2uQ.js","./chunk-REDZDNFN-Cr7xlPG_.js","./token-6GSAFR2W-XRCSVUPZ-k3nryV4h.js","./index-C0AURa5c.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as Fe}from"./index--riPlyqE.js";function U3e(e,t){for(var r=0;r<t.length;r++){const n=t[r];if(typeof n!="string"&&!Array.isArray(n)){for(const a in n)if(a!=="default"&&!(a in e)){const s=Object.getOwnPropertyDescriptor(n,a);s&&Object.defineProperty(e,a,s.get?s:{enumerable:!0,get:()=>n[a]})}}}return Object.freeze(Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}))}var jM=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function xf(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var H8={exports:{}},lk={};var Zge;function Yyt(){if(Zge)return lk;Zge=1;var e=Symbol.for("react.transitional.element"),t=Symbol.for("react.fragment");function r(n,a,s){var i=null;if(s!==void 0&&(i=""+s),a.key!==void 0&&(i=""+a.key),"key"in a){s={};for(var o in a)o!=="key"&&(s[o]=a[o])}else s=a;return a=s.ref,{$$typeof:e,type:n,key:i,ref:a!==void 0?a:null,props:s}}return lk.Fragment=t,lk.jsx=r,lk.jsxs=r,lk}var Hge;function Kyt(){return Hge||(Hge=1,H8.exports=Yyt()),H8.exports}var p=Kyt(),G8={exports:{}},on={},Gge;function Jyt(){if(Gge)return on;Gge=1;var e={env:{}};var t=Symbol.for("react.transitional.element"),r=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),i=Symbol.for("react.consumer"),o=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.for("react.activity"),h=Symbol.iterator;function g(q){return q===null||typeof q!="object"?null:(q=h&&q[h]||q["@@iterator"],typeof q=="function"?q:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},b=Object.assign,w={};function x(q,I,Z){this.props=q,this.context=I,this.refs=w,this.updater=Z||y}x.prototype.isReactComponent={},x.prototype.setState=function(q,I){if(typeof q!="object"&&typeof q!="function"&&q!=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,q,I,"setState")},x.prototype.forceUpdate=function(q){this.updater.enqueueForceUpdate(this,q,"forceUpdate")};function S(){}S.prototype=x.prototype;function E(q,I,Z){this.props=q,this.context=I,this.refs=w,this.updater=Z||y}var C=E.prototype=new S;C.constructor=E,b(C,x.prototype),C.isPureReactComponent=!0;var k=Array.isArray;function A(){}var D={H:null,A:null,T:null,S:null},N=Object.prototype.hasOwnProperty;function P(q,I,Z){var G=Z.ref;return{$$typeof:t,type:q,key:I,ref:G!==void 0?G:null,props:Z}}function j(q,I){return P(q.type,I,q.props)}function z(q){return typeof q=="object"&&q!==null&&q.$$typeof===t}function U(q){var I={"=":"=0",":":"=2"};return"$"+q.replace(/[=:]/g,function(Z){return I[Z]})}var $=/\/+/g;function F(q,I){return typeof q=="object"&&q!==null&&q.key!=null?U(""+q.key):I.toString(36)}function V(q){switch(q.status){case"fulfilled":return q.value;case"rejected":throw q.reason;default:switch(typeof q.status=="string"?q.then(A,A):(q.status="pending",q.then(function(I){q.status==="pending"&&(q.status="fulfilled",q.value=I)},function(I){q.status==="pending"&&(q.status="rejected",q.reason=I)})),q.status){case"fulfilled":return q.value;case"rejected":throw q.reason}}throw q}function H(q,I,Z,G,J){var K=typeof q;(K==="undefined"||K==="boolean")&&(q=null);var ae=!1;if(q===null)ae=!0;else switch(K){case"bigint":case"string":case"number":ae=!0;break;case"object":switch(q.$$typeof){case t:case r:ae=!0;break;case d:return ae=q._init,H(ae(q._payload),I,Z,G,J)}}if(ae)return J=J(q),ae=G===""?"."+F(q,0):G,k(J)?(Z="",ae!=null&&(Z=ae.replace($,"$&/")+"/"),H(J,I,Z,"",function(Te){return Te})):J!=null&&(z(J)&&(J=j(J,Z+(J.key==null||q&&q.key===J.key?"":(""+J.key).replace($,"$&/")+"/")+ae)),I.push(J)),1;ae=0;var le=G===""?".":G+":";if(k(q))for(var ce=0;ce<q.length;ce++)G=q[ce],K=le+F(G,ce),ae+=H(G,I,Z,K,J);else if(ce=g(q),typeof ce=="function")for(q=ce.call(q),ce=0;!(G=q.next()).done;)G=G.value,K=le+F(G,ce++),ae+=H(G,I,Z,K,J);else if(K==="object"){if(typeof q.then=="function")return H(V(q),I,Z,G,J);throw I=String(q),Error("Objects are not valid as a React child (found: "+(I==="[object Object]"?"object with keys {"+Object.keys(q).join(", ")+"}":I)+"). If you meant to render a collection of children, use an array instead.")}return ae}function B(q,I,Z){if(q==null)return q;var G=[],J=0;return H(q,G,"","",function(K){return I.call(Z,K,J++)}),G}function Q(q){if(q._status===-1){var I=q._result;I=I(),I.then(function(Z){(q._status===0||q._status===-1)&&(q._status=1,q._result=Z)},function(Z){(q._status===0||q._status===-1)&&(q._status=2,q._result=Z)}),q._status===-1&&(q._status=0,q._result=I)}if(q._status===1)return q._result.default;throw q._result}var M=typeof reportError=="function"?reportError:function(q){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var I=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof q=="object"&&q!==null&&typeof q.message=="string"?String(q.message):String(q),error:q});if(!window.dispatchEvent(I))return}else if(typeof e=="object"&&typeof e.emit=="function"){e.emit("uncaughtException",q);return}console.error(q)},W={map:B,forEach:function(q,I,Z){B(q,function(){I.apply(this,arguments)},Z)},count:function(q){var I=0;return B(q,function(){I++}),I},toArray:function(q){return B(q,function(I){return I})||[]},only:function(q){if(!z(q))throw Error("React.Children.only expected to receive a single React element child.");return q}};return on.Activity=f,on.Children=W,on.Component=x,on.Fragment=n,on.Profiler=s,on.PureComponent=E,on.StrictMode=a,on.Suspense=c,on.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=D,on.__COMPILER_RUNTIME={__proto__:null,c:function(q){return D.H.useMemoCache(q)}},on.cache=function(q){return function(){return q.apply(null,arguments)}},on.cacheSignal=function(){return null},on.cloneElement=function(q,I,Z){if(q==null)throw Error("The argument must be a React element, but you passed "+q+".");var G=b({},q.props),J=q.key;if(I!=null)for(K in I.key!==void 0&&(J=""+I.key),I)!N.call(I,K)||K==="key"||K==="__self"||K==="__source"||K==="ref"&&I.ref===void 0||(G[K]=I[K]);var K=arguments.length-2;if(K===1)G.children=Z;else if(1<K){for(var ae=Array(K),le=0;le<K;le++)ae[le]=arguments[le+2];G.children=ae}return P(q.type,J,G)},on.createContext=function(q){return q={$$typeof:o,_currentValue:q,_currentValue2:q,_threadCount:0,Provider:null,Consumer:null},q.Provider=q,q.Consumer={$$typeof:i,_context:q},q},on.createElement=function(q,I,Z){var G,J={},K=null;if(I!=null)for(G in I.key!==void 0&&(K=""+I.key),I)N.call(I,G)&&G!=="key"&&G!=="__self"&&G!=="__source"&&(J[G]=I[G]);var ae=arguments.length-2;if(ae===1)J.children=Z;else if(1<ae){for(var le=Array(ae),ce=0;ce<ae;ce++)le[ce]=arguments[ce+2];J.children=le}if(q&&q.defaultProps)for(G in ae=q.defaultProps,ae)J[G]===void 0&&(J[G]=ae[G]);return P(q,K,J)},on.createRef=function(){return{current:null}},on.forwardRef=function(q){return{$$typeof:l,render:q}},on.isValidElement=z,on.lazy=function(q){return{$$typeof:d,_payload:{_status:-1,_result:q},_init:Q}},on.memo=function(q,I){return{$$typeof:u,type:q,compare:I===void 0?null:I}},on.startTransition=function(q){var I=D.T,Z={};D.T=Z;try{var G=q(),J=D.S;J!==null&&J(Z,G),typeof G=="object"&&G!==null&&typeof G.then=="function"&&G.then(A,M)}catch(K){M(K)}finally{I!==null&&Z.types!==null&&(I.types=Z.types),D.T=I}},on.unstable_useCacheRefresh=function(){return D.H.useCacheRefresh()},on.use=function(q){return D.H.use(q)},on.useActionState=function(q,I,Z){return D.H.useActionState(q,I,Z)},on.useCallback=function(q,I){return D.H.useCallback(q,I)},on.useContext=function(q){return D.H.useContext(q)},on.useDebugValue=function(){},on.useDeferredValue=function(q,I){return D.H.useDeferredValue(q,I)},on.useEffect=function(q,I){return D.H.useEffect(q,I)},on.useEffectEvent=function(q){return D.H.useEffectEvent(q)},on.useId=function(){return D.H.useId()},on.useImperativeHandle=function(q,I,Z){return D.H.useImperativeHandle(q,I,Z)},on.useInsertionEffect=function(q,I){return D.H.useInsertionEffect(q,I)},on.useLayoutEffect=function(q,I){return D.H.useLayoutEffect(q,I)},on.useMemo=function(q,I){return D.H.useMemo(q,I)},on.useOptimistic=function(q,I){return D.H.useOptimistic(q,I)},on.useReducer=function(q,I,Z){return D.H.useReducer(q,I,Z)},on.useRef=function(q){return D.H.useRef(q)},on.useState=function(q){return D.H.useState(q)},on.useSyncExternalStore=function(q,I,Z){return D.H.useSyncExternalStore(q,I,Z)},on.useTransition=function(){return D.H.useTransition()},on.version="19.2.3",on}var Qge;function fO(){return Qge||(Qge=1,G8.exports=Jyt()),G8.exports}var _=fO();const we=xf(_),hI=U3e({__proto__:null,default:we},[_]);var Q8={exports:{}},ck={},W8={exports:{}},X8={};var Wge;function ebt(){return Wge||(Wge=1,(function(e){function t(V,H){var B=V.length;V.push(H);e:for(;0<B;){var Q=B-1>>>1,M=V[Q];if(0<a(M,H))V[Q]=H,V[B]=M,B=Q;else break e}}function r(V){return V.length===0?null:V[0]}function n(V){if(V.length===0)return null;var H=V[0],B=V.pop();if(B!==H){V[0]=B;e:for(var Q=0,M=V.length,W=M>>>1;Q<W;){var q=2*(Q+1)-1,I=V[q],Z=q+1,G=V[Z];if(0>a(I,B))Z<M&&0>a(G,I)?(V[Q]=G,V[Z]=B,Q=Z):(V[Q]=I,V[q]=B,Q=q);else if(Z<M&&0>a(G,B))V[Q]=G,V[Z]=B,Q=Z;else break e}}return H}function a(V,H){var B=V.sortIndex-H.sortIndex;return B!==0?B:V.id-H.id}if(e.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var i=Date,o=i.now();e.unstable_now=function(){return i.now()-o}}var l=[],c=[],u=1,d=null,f=3,h=!1,g=!1,y=!1,b=!1,w=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;function E(V){for(var H=r(c);H!==null;){if(H.callback===null)n(c);else if(H.startTime<=V)n(c),H.sortIndex=H.expirationTime,t(l,H);else break;H=r(c)}}function C(V){if(y=!1,E(V),!g)if(r(l)!==null)g=!0,k||(k=!0,z());else{var H=r(c);H!==null&&F(C,H.startTime-V)}}var k=!1,A=-1,D=5,N=-1;function P(){return b?!0:!(e.unstable_now()-N<D)}function j(){if(b=!1,k){var V=e.unstable_now();N=V;var H=!0;try{e:{g=!1,y&&(y=!1,x(A),A=-1),h=!0;var B=f;try{t:{for(E(V),d=r(l);d!==null&&!(d.expirationTime>V&&P());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,f=d.priorityLevel;var M=Q(d.expirationTime<=V);if(V=e.unstable_now(),typeof M=="function"){d.callback=M,E(V),H=!0;break t}d===r(l)&&n(l),E(V)}else n(l);d=r(l)}if(d!==null)H=!0;else{var W=r(c);W!==null&&F(C,W.startTime-V),H=!1}}break e}finally{d=null,f=B,h=!1}H=void 0}}finally{H?z():k=!1}}}var z;if(typeof S=="function")z=function(){S(j)};else if(typeof MessageChannel<"u"){var U=new MessageChannel,$=U.port2;U.port1.onmessage=j,z=function(){$.postMessage(null)}}else z=function(){w(j,0)};function F(V,H){A=w(function(){V(e.unstable_now())},H)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(V){V.callback=null},e.unstable_forceFrameRate=function(V){0>V||125<V?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):D=0<V?Math.floor(1e3/V):5},e.unstable_getCurrentPriorityLevel=function(){return f},e.unstable_next=function(V){switch(f){case 1:case 2:case 3:var H=3;break;default:H=f}var B=f;f=H;try{return V()}finally{f=B}},e.unstable_requestPaint=function(){b=!0},e.unstable_runWithPriority=function(V,H){switch(V){case 1:case 2:case 3:case 4:case 5:break;default:V=3}var B=f;f=V;try{return H()}finally{f=B}},e.unstable_scheduleCallback=function(V,H,B){var Q=e.unstable_now();switch(typeof B=="object"&&B!==null?(B=B.delay,B=typeof B=="number"&&0<B?Q+B:Q):B=Q,V){case 1:var M=-1;break;case 2:M=250;break;case 5:M=1073741823;break;case 4:M=1e4;break;default:M=5e3}return M=B+M,V={id:u++,callback:H,priorityLevel:V,startTime:B,expirationTime:M,sortIndex:-1},B>Q?(V.sortIndex=B,t(c,V),r(l)===null&&V===r(c)&&(y?(x(A),A=-1):y=!0,F(C,B-Q))):(V.sortIndex=M,t(l,V),g||h||(g=!0,k||(k=!0,z()))),V},e.unstable_shouldYield=P,e.unstable_wrapCallback=function(V){var H=f;return function(){var B=f;f=H;try{return V.apply(this,arguments)}finally{f=B}}}})(X8)),X8}var Xge;function tbt(){return Xge||(Xge=1,W8.exports=ebt()),W8.exports}var Y8={exports:{}},nl={};var Yge;function rbt(){if(Yge)return nl;Yge=1;var e=fO();function t(l){var c="https://react.dev/errors/"+l;if(1<arguments.length){c+="?args[]="+encodeURIComponent(arguments[1]);for(var u=2;u<arguments.length;u++)c+="&args[]="+encodeURIComponent(arguments[u])}return"Minified React error #"+l+"; visit "+c+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function r(){}var n={d:{f:r,r:function(){throw Error(t(522))},D:r,C:r,L:r,m:r,X:r,S:r,M:r},p:0,findDOMNode:null},a=Symbol.for("react.portal");function s(l,c,u){var d=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:a,key:d==null?null:""+d,children:l,containerInfo:c,implementation:u}}var i=e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function o(l,c){if(l==="font")return"";if(typeof c=="string")return c==="use-credentials"?c:""}return nl.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=n,nl.createPortal=function(l,c){var u=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!c||c.nodeType!==1&&c.nodeType!==9&&c.nodeType!==11)throw Error(t(299));return s(l,c,null,u)},nl.flushSync=function(l){var c=i.T,u=n.p;try{if(i.T=null,n.p=2,l)return l()}finally{i.T=c,n.p=u,n.d.f()}},nl.preconnect=function(l,c){typeof l=="string"&&(c?(c=c.crossOrigin,c=typeof c=="string"?c==="use-credentials"?c:"":void 0):c=null,n.d.C(l,c))},nl.prefetchDNS=function(l){typeof l=="string"&&n.d.D(l)},nl.preinit=function(l,c){if(typeof l=="string"&&c&&typeof c.as=="string"){var u=c.as,d=o(u,c.crossOrigin),f=typeof c.integrity=="string"?c.integrity:void 0,h=typeof c.fetchPriority=="string"?c.fetchPriority:void 0;u==="style"?n.d.S(l,typeof c.precedence=="string"?c.precedence:void 0,{crossOrigin:d,integrity:f,fetchPriority:h}):u==="script"&&n.d.X(l,{crossOrigin:d,integrity:f,fetchPriority:h,nonce:typeof c.nonce=="string"?c.nonce:void 0})}},nl.preinitModule=function(l,c){if(typeof l=="string")if(typeof c=="object"&&c!==null){if(c.as==null||c.as==="script"){var u=o(c.as,c.crossOrigin);n.d.M(l,{crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0})}}else c==null&&n.d.M(l)},nl.preload=function(l,c){if(typeof l=="string"&&typeof c=="object"&&c!==null&&typeof c.as=="string"){var u=c.as,d=o(u,c.crossOrigin);n.d.L(l,u,{crossOrigin:d,integrity:typeof c.integrity=="string"?c.integrity:void 0,nonce:typeof c.nonce=="string"?c.nonce:void 0,type:typeof c.type=="string"?c.type:void 0,fetchPriority:typeof c.fetchPriority=="string"?c.fetchPriority:void 0,referrerPolicy:typeof c.referrerPolicy=="string"?c.referrerPolicy:void 0,imageSrcSet:typeof c.imageSrcSet=="string"?c.imageSrcSet:void 0,imageSizes:typeof c.imageSizes=="string"?c.imageSizes:void 0,media:typeof c.media=="string"?c.media:void 0})}},nl.preloadModule=function(l,c){if(typeof l=="string")if(c){var u=o(c.as,c.crossOrigin);n.d.m(l,{as:typeof c.as=="string"&&c.as!=="script"?c.as:void 0,crossOrigin:u,integrity:typeof c.integrity=="string"?c.integrity:void 0})}else n.d.m(l)},nl.requestFormReset=function(l){n.d.r(l)},nl.unstable_batchedUpdates=function(l,c){return l(c)},nl.useFormState=function(l,c,u){return i.H.useFormState(l,c,u)},nl.useFormStatus=function(){return i.H.useHostTransitionStatus()},nl.version="19.2.3",nl}var Kge;function V3e(){if(Kge)return Y8.exports;Kge=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Y8.exports=rbt(),Y8.exports}var Jge;function nbt(){if(Jge)return ck;Jge=1;var e={env:{}};var t=tbt(),r=fO(),n=V3e();function a(m){var v="https://react.dev/errors/"+m;if(1<arguments.length){v+="?args[]="+encodeURIComponent(arguments[1]);for(var O=2;O<arguments.length;O++)v+="&args[]="+encodeURIComponent(arguments[O])}return"Minified React error #"+m+"; visit "+v+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function s(m){return!(!m||m.nodeType!==1&&m.nodeType!==9&&m.nodeType!==11)}function i(m){var v=m,O=m;if(m.alternate)for(;v.return;)v=v.return;else{m=v;do v=m,(v.flags&4098)!==0&&(O=v.return),m=v.return;while(m)}return v.tag===3?O:null}function o(m){if(m.tag===13){var v=m.memoizedState;if(v===null&&(m=m.alternate,m!==null&&(v=m.memoizedState)),v!==null)return v.dehydrated}return null}function l(m){if(m.tag===31){var v=m.memoizedState;if(v===null&&(m=m.alternate,m!==null&&(v=m.memoizedState)),v!==null)return v.dehydrated}return null}function c(m){if(i(m)!==m)throw Error(a(188))}function u(m){var v=m.alternate;if(!v){if(v=i(m),v===null)throw Error(a(188));return v!==m?null:m}for(var O=m,T=v;;){var R=O.return;if(R===null)break;var L=R.alternate;if(L===null){if(T=R.return,T!==null){O=T;continue}break}if(R.child===L.child){for(L=R.child;L;){if(L===O)return c(R),m;if(L===T)return c(R),v;L=L.sibling}throw Error(a(188))}if(O.return!==T.return)O=R,T=L;else{for(var Y=!1,re=R.child;re;){if(re===O){Y=!0,O=R,T=L;break}if(re===T){Y=!0,T=R,O=L;break}re=re.sibling}if(!Y){for(re=L.child;re;){if(re===O){Y=!0,O=L,T=R;break}if(re===T){Y=!0,T=L,O=R;break}re=re.sibling}if(!Y)throw Error(a(189))}}if(O.alternate!==T)throw Error(a(190))}if(O.tag!==3)throw Error(a(188));return O.stateNode.current===O?m:v}function d(m){var v=m.tag;if(v===5||v===26||v===27||v===6)return m;for(m=m.child;m!==null;){if(v=d(m),v!==null)return v;m=m.sibling}return null}var f=Object.assign,h=Symbol.for("react.element"),g=Symbol.for("react.transitional.element"),y=Symbol.for("react.portal"),b=Symbol.for("react.fragment"),w=Symbol.for("react.strict_mode"),x=Symbol.for("react.profiler"),S=Symbol.for("react.consumer"),E=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),k=Symbol.for("react.suspense"),A=Symbol.for("react.suspense_list"),D=Symbol.for("react.memo"),N=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),j=Symbol.for("react.memo_cache_sentinel"),z=Symbol.iterator;function U(m){return m===null||typeof m!="object"?null:(m=z&&m[z]||m["@@iterator"],typeof m=="function"?m:null)}var $=Symbol.for("react.client.reference");function F(m){if(m==null)return null;if(typeof m=="function")return m.$$typeof===$?null:m.displayName||m.name||null;if(typeof m=="string")return m;switch(m){case b:return"Fragment";case x:return"Profiler";case w:return"StrictMode";case k:return"Suspense";case A:return"SuspenseList";case P:return"Activity"}if(typeof m=="object")switch(m.$$typeof){case y:return"Portal";case E:return m.displayName||"Context";case S:return(m._context.displayName||"Context")+".Consumer";case C:var v=m.render;return m=m.displayName,m||(m=v.displayName||v.name||"",m=m!==""?"ForwardRef("+m+")":"ForwardRef"),m;case D:return v=m.displayName||null,v!==null?v:F(m.type)||"Memo";case N:v=m._payload,m=m._init;try{return F(m(v))}catch{}}return null}var V=Array.isArray,H=r.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,B=n.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,Q={pending:!1,data:null,method:null,action:null},M=[],W=-1;function q(m){return{current:m}}function I(m){0>W||(m.current=M[W],M[W]=null,W--)}function Z(m,v){W++,M[W]=m.current,m.current=v}var G=q(null),J=q(null),K=q(null),ae=q(null);function le(m,v){switch(Z(K,v),Z(J,m),Z(G,null),v.nodeType){case 9:case 11:m=(m=v.documentElement)&&(m=m.namespaceURI)?hge(m):0;break;default:if(m=v.tagName,v=v.namespaceURI)v=hge(v),m=mge(v,m);else switch(m){case"svg":m=1;break;case"math":m=2;break;default:m=0}}I(G),Z(G,m)}function ce(){I(G),I(J),I(K)}function Te(m){m.memoizedState!==null&&Z(ae,m);var v=G.current,O=mge(v,m.type);v!==O&&(Z(J,m),Z(G,O))}function X(m){J.current===m&&(I(G),I(J)),ae.current===m&&(I(ae),ak._currentValue=Q)}var se,te;function ve(m){if(se===void 0)try{throw Error()}catch(O){var v=O.stack.trim().match(/\n( *(at )?)/);se=v&&v[1]||"",te=-1<O.stack.indexOf(`
|
|
3
3
|
at`)?" (<anonymous>)":-1<O.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
4
4
|
`+se+m+te}var ue=!1;function ye(m,v){if(!m||ue)return"";ue=!0;var O=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var T={DetermineComponentFrameRoot:function(){try{if(v){var nt=function(){throw Error()};if(Object.defineProperty(nt.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(nt,[])}catch(Ue){var je=Ue}Reflect.construct(m,[],nt)}else{try{nt.call()}catch(Ue){je=Ue}m.call(nt.prototype)}}else{try{throw Error()}catch(Ue){je=Ue}(nt=m())&&typeof nt.catch=="function"&&nt.catch(function(){})}}catch(Ue){if(Ue&&je&&typeof Ue.stack=="string")return[Ue.stack,je.stack]}return[null,null]}};T.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var R=Object.getOwnPropertyDescriptor(T.DetermineComponentFrameRoot,"name");R&&R.configurable&&Object.defineProperty(T.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var L=T.DetermineComponentFrameRoot(),Y=L[0],re=L[1];if(Y&&re){var be=Y.split(`
|
|
5
5
|
`),Pe=re.split(`
|
|
@@ -160,7 +160,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
160
160
|
constructor(\${params}) {
|
|
161
161
|
\${}
|
|
162
162
|
}
|
|
163
|
-
}`,{label:"class",detail:"definition",type:"keyword"}),pc('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),pc('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],zqe=boe.concat([pc("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),pc("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),pc("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Ske=new Lze,Uqe=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function _k(e){return(t,r)=>{let n=t.node.getChild("VariableDefinition");return n&&r(n,e),!0}}const VGt=["FunctionDeclaration"],qGt={FunctionDeclaration:_k("function"),ClassDeclaration:_k("class"),ClassExpression:()=>!0,EnumDeclaration:_k("constant"),TypeAliasDeclaration:_k("type"),NamespaceDeclaration:_k("namespace"),VariableDefinition(e,t){e.matchContext(VGt)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function Vqe(e,t){let r=Ske.get(t);if(r)return r;let n=[],a=!0;function s(i,o){let l=e.sliceString(i.from,i.to);n.push({label:l,type:o})}return t.cursor(ms.IncludeAnonymous).iterate(i=>{if(a)a=!1;else if(i.name){let o=qGt[i.name];if(o&&o(i,s)||Uqe.has(i.name))return!1}else if(i.to-i.from>8192){for(let o of Vqe(e,i.node))n.push(o);return!1}}),Ske.set(t,n),n}const A3=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,voe=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function qqe(e){let t=Ja(e.state).resolveInner(e.pos,-1);if(voe.indexOf(t.name)>-1)return null;let r=t.name=="VariableName"||t.to-t.from<20&&A3.test(e.state.sliceDoc(t.from,t.to));if(!r&&!e.explicit)return null;let n=[];for(let a=t;a;a=a.parent)Uqe.has(a.name)&&(n=n.concat(Vqe(e.state.doc,a)));return{options:n,from:r?t.from:e.pos,validFor:A3}}function UH(e,t,r){var n;let a=[];for(;;){let s=t.firstChild,i;if(s?.name=="VariableName")return a.push(e(s)),{path:a.reverse(),name:r};if(s?.name=="MemberExpression"&&((n=i=s.lastChild)===null||n===void 0?void 0:n.name)=="PropertyName")a.push(e(i)),t=s;else return null}}function Zqe(e){let t=n=>e.state.doc.sliceString(n.from,n.to),r=Ja(e.state).resolveInner(e.pos,-1);return r.name=="PropertyName"?UH(t,r.parent,t(r)):(r.name=="."||r.name=="?.")&&r.parent.name=="MemberExpression"?UH(t,r.parent,""):voe.indexOf(r.name)>-1?null:r.name=="VariableName"||r.to-r.from<20&&A3.test(t(r))?{path:[],name:t(r)}:r.name=="MemberExpression"?UH(t,r,""):e.explicit?{path:[],name:""}:null}function ZGt(e,t){let r=[],n=new Set;for(let a=0;;a++){for(let i of(Object.getOwnPropertyNames||Object.keys)(e)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(i)||n.has(i))continue;n.add(i);let o;try{o=e[i]}catch{continue}r.push({label:i,type:typeof o=="function"?/^[A-Z]/.test(i)?"class":t?"function":"method":t?"variable":"property",boost:-a})}let s=Object.getPrototypeOf(e);if(!s)return r;e=s}}function HGt(e){let t=new Map;return r=>{let n=Zqe(r);if(!n)return null;let a=e;for(let i of n.path)if(a=a[i],!a)return null;let s=t.get(a);return s||t.set(a,s=ZGt(a,!n.path.length)),{from:r.pos-n.name.length,options:s,validFor:A3}}}const Bd=dx.define({name:"javascript",parser:UGt.configure({props:[a1.add({IfStatement:CS({except:/^\s*({|else\b)/}),TryStatement:CS({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:UVt,SwitchBody:e=>{let t=e.textAfter,r=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(r?0:n?1:2)*e.unit},Block:zVt({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":CS({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),s1.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Jie,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Hqe={test:e=>/^JSX/.test(e.name),facet:DL({commentTokens:{block:{open:"{/*",close:"*/}"}}})},xoe=Bd.configure({dialect:"ts"},"typescript"),woe=Bd.configure({dialect:"jsx",props:[Xie.add(e=>e.isTop?[Hqe]:void 0)]}),Soe=Bd.configure({dialect:"jsx ts",props:[Xie.add(e=>e.isTop?[Hqe]:void 0)]},"typescript");let Gqe=e=>({label:e,type:"keyword"});const Qqe="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Gqe),GGt=Qqe.concat(["declare","implements","private","protected","public"].map(Gqe));function D3(e={}){let t=e.jsx?e.typescript?Soe:woe:e.typescript?xoe:Bd,r=e.typescript?zqe.concat(GGt):boe.concat(Qqe);return new fx(t,[Bd.data.of({autocomplete:Cqt(voe,UVe(r))}),Bd.data.of({autocomplete:qqe}),e.jsx?Wqe:[]])}function QGt(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function Eke(e,t,r=e.length){for(let n=t?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return e.sliceString(n.from,Math.min(n.to,r));return""}const WGt=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Wqe=bt.inputHandler.of((e,t,r,n,a)=>{if((WGt?e.composing:e.compositionStarted)||e.state.readOnly||t!=r||n!=">"&&n!="/"||!Bd.isActiveAt(e.state,t,-1))return!1;let s=a(),{state:i}=s,o=i.changeByRange(l=>{var c;let{head:u}=l,d=Ja(i).resolveInner(u-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(i.doc.sliceString(u-1,u)!=n||d.name=="JSXAttributeValue"&&d.to>u)){if(n==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(n=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,g=h.parent;if(g&&h.from==u-2&&((f=Eke(i.doc,g.firstChild,u))||((c=g.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let y=`${f}>`;return{range:We.cursor(u+y.length,-1),changes:{from:u,insert:y}}}}else if(n==">"){let h=QGt(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(i.doc.sliceString(u,u+2))&&(f=Eke(i.doc,h,u)))return{range:l,changes:{from:u,insert:`</${f}>`}}}}return{range:l}});return o.changes.empty?!1:(e.dispatch([s,i.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function XGt(e,t){return t||(t={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},e.getRules().forEach((r,n)=>{var a;!((a=r.meta.docs)===null||a===void 0)&&a.recommended&&(t.rules[n]=2)})),r=>{let{state:n}=r,a=[];for(let{from:s,to:i}of Bd.findRegions(n)){let o=n.doc.lineAt(s),l={line:o.number-1,col:s-o.from,pos:s};for(let c of e.verify(n.sliceDoc(s,i),t))a.push(YGt(c,n.doc,l))}return a}}function Oke(e,t,r,n){return r.line(e+n.line).from+t+(e==1?n.col-1:-1)}function YGt(e,t,r){let n=Oke(e.line,e.column,t,r),a={from:n,to:e.endLine!=null&&e.endColumn!=1?Oke(e.endLine,e.endColumn,t,r):n,message:e.message,source:e.ruleId?"eslint:"+e.ruleId:"eslint",severity:e.severity==1?"warning":"error"};if(e.fix){let{range:s,text:i}=e.fix,o=s[0]+r.pos-n,l=s[1]+r.pos-n;a.actions=[{name:"fix",apply(c,u){c.dispatch({changes:{from:u+o,to:u+l,insert:i},scrollIntoView:!0})}}]}return a}const i2=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:Wqe,completionPath:Zqe,esLint:XGt,javascript:D3,javascriptLanguage:Bd,jsxLanguage:woe,localCompletionSource:qqe,scopeCompletionSource:HGt,snippets:boe,tsxLanguage:Soe,typescriptLanguage:xoe,typescriptSnippets:zqe},Symbol.toStringTag,{value:"Module"})),kk=["_blank","_self","_top","_parent"],VH=["ascii","utf-8","utf-16","latin1","latin1"],qH=["get","post","put","delete"],ZH=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],hu=["true","false"],br={},KGt={a:{attrs:{href:null,ping:null,type:null,media:null,target:kk,hreflang:null}},abbr:br,address:br,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:br,aside:br,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:br,base:{attrs:{href:null,target:kk}},bdi:br,bdo:br,blockquote:{attrs:{cite:null}},body:br,br,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:ZH,formmethod:qH,formnovalidate:["novalidate"],formtarget:kk,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:br,center:br,cite:br,code:br,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:br,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:br,div:br,dl:br,dt:br,em:br,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:br,figure:br,footer:br,form:{attrs:{action:null,name:null,"accept-charset":VH,autocomplete:["on","off"],enctype:ZH,method:qH,novalidate:["novalidate"],target:kk}},h1:br,h2:br,h3:br,h4:br,h5:br,h6:br,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:br,hgroup:br,hr:br,html:{attrs:{manifest:null}},i:br,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:ZH,formmethod:qH,formnovalidate:["novalidate"],formtarget:kk,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:br,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:br,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:br,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:VH,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:br,noscript:br,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:br,param:{attrs:{name:null,value:null}},pre:br,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:br,rt:br,ruby:br,samp:br,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:VH}},section:br,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:br,source:{attrs:{src:null,type:null,media:null}},span:br,strong:br,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:br,summary:br,sup:br,table:br,tbody:br,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:br,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:br,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:br,time:{attrs:{datetime:null}},title:br,tr:br,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:br,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:br},Xqe={accesskey:null,class:null,contenteditable:hu,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:hu,autocorrect:hu,autocapitalize:hu,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":hu,"aria-autocomplete":["inline","list","both","none"],"aria-busy":hu,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":hu,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":hu,"aria-hidden":hu,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":hu,"aria-multiselectable":hu,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":hu,"aria-relevant":null,"aria-required":hu,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Yqe="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of Yqe)Xqe[e]=null;let SA=class{constructor(t,r){this.tags={...KGt,...t},this.globalAttrs={...Xqe,...r},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};SA.default=new SA;function pE(e,t,r=e.length){if(!t)return"";let n=t.firstChild,a=n&&n.getChild("TagName");return a?e.sliceString(a.from,Math.min(a.to,r)):""}function fE(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function Kqe(e,t,r){let n=r.tags[pE(e,fE(t))];return n?.children||r.allTags}function Eoe(e,t){let r=[];for(let n=fE(t);n&&!n.type.isTop;n=fE(n.parent)){let a=pE(e,n);if(a&&n.lastChild.name=="CloseTag")break;a&&r.indexOf(a)<0&&(t.name=="EndTag"||t.from>=n.firstChild.to)&&r.push(a)}return r}const Jqe=/^[:\-\.\w\u00b7-\uffff]*$/;function _ke(e,t,r,n,a){let s=/\s*>/.test(e.sliceDoc(a,a+5))?"":">",i=fE(r,r.name=="StartTag"||r.name=="TagName");return{from:n,to:a,options:Kqe(e.doc,i,t).map(o=>({label:o,type:"type"})).concat(Eoe(e.doc,r).map((o,l)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function kke(e,t,r,n){let a=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:Eoe(e.doc,t).map((s,i)=>({label:s,apply:s+a,type:"type",boost:99-i})),validFor:Jqe}}function JGt(e,t,r,n){let a=[],s=0;for(let i of Kqe(e.doc,r,t))a.push({label:"<"+i,type:"type"});for(let i of Eoe(e.doc,r))a.push({label:"</"+i+">",type:"type",boost:99-s++});return{from:n,to:n,options:a,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function eQt(e,t,r,n,a){let s=fE(r),i=s?t.tags[pE(e.doc,s)]:null,o=i&&i.attrs?Object.keys(i.attrs):[],l=i&&i.globalAttrs===!1?o:o.length?o.concat(t.globalAttrNames):t.globalAttrNames;return{from:n,to:a,options:l.map(c=>({label:c,type:"property"})),validFor:Jqe}}function tQt(e,t,r,n,a){var s;let i=(s=r.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],l;if(i){let c=e.sliceDoc(i.from,i.to),u=t.globalAttrs[c];if(!u){let d=fE(r),f=d?t.tags[pE(e.doc,d)]:null;u=f?.attrs&&f.attrs[c]}if(u){let d=e.sliceDoc(n,a).toLowerCase(),f='"',h='"';/^['"]/.test(d)?(l=d[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",h=e.sliceDoc(a,a+1)==d[0]?"":d[0],d=d.slice(1),n++):l=/^[^\s<>='"]*$/;for(let g of u)o.push({label:g,apply:f+g+h,type:"constant"})}}return{from:n,to:a,options:o,validFor:l}}function eZe(e,t){let{state:r,pos:n}=t,a=Ja(r).resolveInner(n,-1),s=a.resolve(n);for(let i=n,o;s==a&&(o=a.childBefore(i));){let l=o.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=a=o,i=l.from}return a.name=="TagName"?a.parent&&/CloseTag$/.test(a.parent.name)?kke(r,a,a.from,n):_ke(r,e,a,a.from,n):a.name=="StartTag"||a.name=="IncompleteTag"?_ke(r,e,a,n,n):a.name=="StartCloseTag"||a.name=="IncompleteCloseTag"?kke(r,a,n,n):a.name=="OpenTag"||a.name=="SelfClosingTag"||a.name=="AttributeName"?eQt(r,e,a,a.name=="AttributeName"?a.from:n,n):a.name=="Is"||a.name=="AttributeValue"||a.name=="UnquotedAttributeValue"?tQt(r,e,a,a.name=="Is"?n:a.from,n):t.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?JGt(r,e,a,n):null}function tZe(e){return eZe(SA.default,e)}function rZe(e){let{extraTags:t,extraGlobalAttributes:r}=e,n=r||t?new SA(t,r):SA.default;return a=>eZe(n,a)}const rQt=Bd.parser.configure({top:"SingleExpression"}),nZe=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:xoe.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:woe.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:Soe.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:rQt},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Bd.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:wA.parser}],aZe=[{name:"style",parser:wA.parser.configure({top:"Styles"})}].concat(Yqe.map(e=>({name:e,parser:Bd.parser}))),sZe=dx.define({name:"html",parser:IHt.configure({props:[a1.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,r;for(let n=e.node;;){let a=n.lastChild;if(!a||a.name!="Element"||a.to!=n.to)break;t=n=a}return t&&!((r=t.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?e.lineIndent(t.from)+e.unit:null}}),s1.add({Element(e){let t=e.firstChild,r=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:r.name=="CloseTag"?r.from:e.to}}}),PVe.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),tT=sZe.configure({wrap:Iqe(nZe,aZe)});function iZe(e={}){let t="",r;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(r=Iqe((e.nestedLanguages||[]).concat(nZe),(e.nestedAttributes||[]).concat(aZe)));let n=r?sZe.configure({wrap:r,dialect:t}):t?tT.configure({dialect:t}):tT;return new fx(n,[tT.data.of({autocomplete:rZe(e)}),e.autoCloseTags!==!1?oZe:[],D3().support,Fqe().support])}const Cke=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),oZe=bt.inputHandler.of((e,t,r,n,a)=>{if(e.composing||e.state.readOnly||t!=r||n!=">"&&n!="/"||!tT.isActiveAt(e.state,t,-1))return!1;let s=a(),{state:i}=s,o=i.changeByRange(l=>{var c,u,d;let f=i.doc.sliceString(l.from-1,l.to)==n,{head:h}=l,g=Ja(i).resolveInner(h,-1),y;if(f&&n==">"&&g.name=="EndTag"){let b=g.parent;if(((u=(c=b.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(y=pE(i.doc,b.parent,h))&&!Cke.has(y)){let w=h+(i.doc.sliceString(h,h+1)===">"?1:0),x=`</${y}>`;return{range:l,changes:{from:h,to:w,insert:x}}}}else if(f&&n=="/"&&g.name=="IncompleteCloseTag"){let b=g.parent;if(g.from==h-2&&((d=b.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(y=pE(i.doc,b,h))&&!Cke.has(y)){let w=h+(i.doc.sliceString(h,h+1)===">"?1:0),x=`${y}>`;return{range:We.cursor(h+x.length,-1),changes:{from:h,to:w,insert:x}}}}return{range:l}});return o.changes.empty?!1:(e.dispatch([s,i.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),nQt=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:oZe,html:iZe,htmlCompletionSource:tZe,htmlCompletionSourceWith:rZe,htmlLanguage:tT},Symbol.toStringTag,{value:"Module"})),lZe=DL({commentTokens:{block:{open:"<!--",close:"-->"}}}),cZe=new Xr,uZe=RZt.configure({props:[s1.add(e=>!e.is("Block")||e.is("Document")||NJ(e)!=null||aQt(e)?void 0:(t,r)=>({from:r.doc.lineAt(t.from).to,to:t.to})),cZe.add(NJ),a1.add({Document:()=>null}),rb.add({Document:lZe})]});function NJ(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function aQt(e){return e.name=="OrderedList"||e.name=="BulletList"}function sQt(e,t){let r=e;for(;;){let n=r.nextSibling,a;if(!n||(a=NJ(n.type))!=null&&a<=t)break;r=n}return r.to}const iQt=SVe.of((e,t,r)=>{for(let n=Ja(e).resolveInner(r,-1);n&&!(n.from<t);n=n.parent){let a=n.type.prop(cZe);if(a==null)continue;let s=sQt(n,a);if(s>r)return{from:r,to:s}}return null});function Ooe(e){return new Nu(lZe,e,[],"markdown")}const dZe=Ooe(uZe),oQt=uZe.configure([qZt,HZt,ZZt,GZt,{props:[s1.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),gx=Ooe(oQt);function lQt(e,t){return r=>{if(r&&e){let n=null;if(r=/\S*/.exec(r)[0],typeof e=="function"?n=e(r):n=Le.matchLanguageName(e,r,!0),n instanceof Le)return n.support?n.support.language.parser:px.getSkippingParser(n.load());if(n)return n.parser}return t?t.parser:null}}class HH{constructor(t,r,n,a,s,i,o){this.node=t,this.from=r,this.to=n,this.spaceBefore=a,this.spaceAfter=s,this.type=i,this.item=o}blank(t,r=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){for(;n.length<t;)n+=" ";return n}else{for(let a=this.to-this.from-n.length-this.spaceAfter.length;a>0;a--)n+=" ";return n+(r?this.spaceAfter:"")}}marker(t,r){let n=this.node.name=="OrderedList"?String(+fZe(this.item,t)[2]+r):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function pZe(e,t){let r=[],n=[];for(let a=e;a;a=a.parent){if(a.name=="FencedCode")return n;(a.name=="ListItem"||a.name=="Blockquote")&&r.push(a)}for(let a=r.length-1;a>=0;a--){let s=r[a],i,o=t.lineAt(s.from),l=s.from-o.from;if(s.name=="Blockquote"&&(i=/^ *>( ?)/.exec(o.text.slice(l))))n.push(new HH(s,l,l+i[0].length,"",i[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(i=/^( *)\d+([.)])( *)/.exec(o.text.slice(l)))){let c=i[3],u=i[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),n.push(new HH(s.parent,l,l+u,i[1],c,i[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(i=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(l)))){let c=i[4],u=i[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let d=i[2];i[3]&&(d+=i[3].replace(/[xX]/," ")),n.push(new HH(s.parent,l,l+u,i[1],c,d,s))}}return n}function fZe(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function GH(e,t,r,n=0){for(let a=-1,s=e;;){if(s.name=="ListItem"){let o=fZe(s,t),l=+o[2];if(a>=0){if(l!=a+1)return;r.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(a+2+n)})}a=l}let i=s.nextSibling;if(!i)break;s=i}}function _oe(e,t){let r=/^[ \t]*/.exec(e)[0].length;if(!r||t.facet(TO)!=" ")return e;let n=lf(e,4,r),a="";for(let s=n;s>0;)s>=4?(a+=" ",s-=4):(a+=" ",s--);return a+e.slice(r)}const hZe=(e={})=>({state:t,dispatch:r})=>{let n=Ja(t),{doc:a}=t,s=null,i=t.changeByRange(o=>{if(!o.empty||!gx.isActiveAt(t,o.from,-1)&&!gx.isActiveAt(t,o.from,1))return s={range:o};let l=o.from,c=a.lineAt(l),u=pZe(n.resolveInner(l,-1),a);for(;u.length&&u[u.length-1].from>l-c.from;)u.pop();if(!u.length)return s={range:o};let d=u[u.length-1];if(d.to-d.spaceAfter.length>l-c.from)return s={range:o};let f=l>=d.to-d.spaceAfter.length&&!/\S/.test(c.text.slice(d.to));if(d.item&&f){let w=d.node.firstChild,x=d.node.getChild("ListItem","ListItem");if(w.to>=l||x&&x.to<l||c.from>0&&!/[^\s>]/.test(a.lineAt(c.from-1).text)||e.nonTightLists===!1){let S=u.length>1?u[u.length-2]:null,E,C="";S&&S.item?(E=c.from+S.from,C=S.marker(a,1)):E=c.from+(S?S.to:0);let k=[{from:E,to:l,insert:C}];return d.node.name=="OrderedList"&&GH(d.item,a,k,-2),S&&S.node.name=="OrderedList"&&GH(S.item,a,k),{range:We.cursor(E+C.length),changes:k}}else{let S=Ake(u,t,c);return{range:We.cursor(l+S.length+1),changes:{from:c.from,insert:S+t.lineBreak}}}}if(d.node.name=="Blockquote"&&f&&c.from){let w=a.lineAt(c.from-1),x=/>\s*$/.exec(w.text);if(x&&x.index==d.from){let S=t.changes([{from:w.from+x.index,to:w.to},{from:c.from+d.from,to:c.to}]);return{range:o.map(S),changes:S}}}let h=[];d.node.name=="OrderedList"&&GH(d.item,a,h);let g=d.item&&d.item.from<c.from,y="";if(!g||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=d.to)for(let w=0,x=u.length-1;w<=x;w++)y+=w==x&&!g?u[w].marker(a,1):u[w].blank(w<x?lf(c.text,4,u[w+1].from)-y.length:null);let b=l;for(;b>c.from&&/\s/.test(c.text.charAt(b-c.from-1));)b--;return y=_oe(y,t),cQt(d.node,t.doc)&&(y=Ake(u,t,c)+t.lineBreak+y),h.push({from:b,to:l,insert:t.lineBreak+y}),{range:We.cursor(b+y.length+1),changes:h}});return s?!1:(r(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0)},mZe=hZe();function Tke(e){return e.name=="QuoteMark"||e.name=="ListMark"}function cQt(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let r=e.firstChild,n=e.getChild("ListItem","ListItem");if(!n)return!1;let a=t.lineAt(r.to),s=t.lineAt(n.from),i=/^[\s>]*$/.test(a.text);return a.number+(i?0:1)<s.number}function Ake(e,t,r){let n="";for(let a=0,s=e.length-2;a<=s;a++)n+=e[a].blank(a<s?lf(r.text,4,e[a+1].from)-n.length:null,a<s);return _oe(n,t)}function uQt(e,t){let r=e.resolveInner(t,-1),n=t;Tke(r)&&(n=r.from,r=r.parent);for(let a;a=r.childBefore(n);)if(Tke(a))n=a.from;else if(a.name=="OrderedList"||a.name=="BulletList")r=a.lastChild,n=r.to;else break;return r}const gZe=({state:e,dispatch:t})=>{let r=Ja(e),n=null,a=e.changeByRange(s=>{let i=s.from,{doc:o}=e;if(s.empty&&gx.isActiveAt(e,s.from)){let l=o.lineAt(i),c=pZe(uQt(r,i),o);if(c.length){let u=c[c.length-1],d=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(i-l.from>d&&!/\S/.test(l.text.slice(d,i-l.from)))return{range:We.cursor(l.from+d),changes:{from:l.from+d,to:i}};if(i-l.from==d&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let f=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let h=u.blank(lf(l.text,4,u.to)-lf(l.text,4,u.from));return f==l.from&&(h=_oe(h,e)),{range:We.cursor(f+h.length),changes:{from:f,to:l.from+u.to,insert:h}}}if(f<i)return{range:We.cursor(f),changes:{from:f,to:i}}}}}return n={range:s}});return n?!1:(t(e.update(a,{scrollIntoView:!0,userEvent:"delete"})),!0)},yZe=[{key:"Enter",run:mZe},{key:"Backspace",run:gZe}],bZe=iZe({matchClosingTags:!1});function koe(e={}){let{codeLanguages:t,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:a}=dZe,completeHTMLTags:s=!0,pasteURLAsLink:i=!0,htmlTagLanguage:o=bZe}=e;if(!(a instanceof $L))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],c=[o.support,iQt],u;i&&c.push(vZe),r instanceof fx?(c.push(r.support),u=r.language):r&&(u=r);let d=t||u?lQt(t,u):void 0;l.push($Zt({codeParser:d,htmlParser:o.language.parser})),n&&c.push(Dg.high(CO.of(yZe)));let f=Ooe(a.configure(l));return s&&c.push(f.data.of({autocomplete:dQt})),new fx(f,c)}function dQt(e){let{state:t,pos:r}=e,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(r-25,r));if(!n)return null;let a=Ja(t).resolveInner(r,-1);for(;a&&!a.type.isTop;){if(a.name=="CodeBlock"||a.name=="FencedCode"||a.name=="ProcessingInstructionBlock"||a.name=="CommentBlock"||a.name=="Link"||a.name=="Image")return null;a=a.parent}return{from:r-n[0].length,to:r,options:pQt(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let QH=null;function pQt(){if(QH)return QH;let e=tZe(new noe(Zn.create({extensions:bZe}),0,!0));return QH=e?e.options:[]}const fQt=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,vZe=bt.domEventHandlers({paste:(e,t)=>{var r;let{main:n}=t.state.selection;if(n.empty)return!1;let a=(r=e.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!a||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(a)||(/^www\./.test(a)&&(a="https://"+a),!gx.isActiveAt(t.state,n.from,1)))return!1;let s=Ja(t.state),i=!1;return s.iterate({from:n.from,to:n.to,enter:o=>{(o.from>n.from||fQt.test(o.name))&&(i=!0)},leave:o=>{o.to<n.to&&(i=!0)}}),i?!1:(t.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${a})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),hQt=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:dZe,deleteMarkupBackward:gZe,insertNewlineContinueMarkup:mZe,insertNewlineContinueMarkupCommand:hZe,markdown:koe,markdownKeymap:yZe,markdownLanguage:gx,pasteURLAsLink:vZe},Symbol.toStringTag,{value:"Module"}));function ct(e){return new fx(eoe.define(e))}function Sy(e){return Fe(()=>import("./index-CL7MFM3T.js"),__vite__mapDeps([0,1]),import.meta.url).then(t=>t.sql({dialect:t[e]}))}const xZe=[Le.of({name:"C",extensions:["c","h","ino"],load(){return Fe(()=>import("./index-2qdSQpiz.js"),__vite__mapDeps([2,1]),import.meta.url).then(e=>e.cpp())}}),Le.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return Fe(()=>import("./index-2qdSQpiz.js"),__vite__mapDeps([2,1]),import.meta.url).then(e=>e.cpp())}}),Le.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Sy("Cassandra")}}),Le.of({name:"CSS",extensions:["css"],load(){return Fe(()=>Promise.resolve().then(()=>dGt),void 0,import.meta.url).then(e=>e.css())}}),Le.of({name:"Go",extensions:["go"],load(){return Fe(()=>import("./index-CA8CeUf8.js"),__vite__mapDeps([3,1]),import.meta.url).then(e=>e.go())}}),Le.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return Fe(()=>Promise.resolve().then(()=>nQt),void 0,import.meta.url).then(e=>e.html())}}),Le.of({name:"Java",extensions:["java"],load(){return Fe(()=>import("./index-DvImktti.js"),__vite__mapDeps([4,1]),import.meta.url).then(e=>e.java())}}),Le.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return Fe(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url).then(e=>e.javascript())}}),Le.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return Fe(()=>import("./index-aqZjQKW7.js"),__vite__mapDeps([5,1]),import.meta.url).then(e=>e.jinja())}}),Le.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return Fe(()=>Promise.resolve().then(()=>_qt),void 0,import.meta.url).then(e=>e.json())}}),Le.of({name:"JSX",extensions:["jsx"],load(){return Fe(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url).then(e=>e.javascript({jsx:!0}))}}),Le.of({name:"LESS",extensions:["less"],load(){return Fe(()=>import("./index-BEgjYn3X.js"),__vite__mapDeps([6,1]),import.meta.url).then(e=>e.less())}}),Le.of({name:"Liquid",extensions:["liquid"],load(){return Fe(()=>import("./index-BrS8VKnS.js"),__vite__mapDeps([7,1]),import.meta.url).then(e=>e.liquid())}}),Le.of({name:"MariaDB SQL",load(){return Sy("MariaSQL")}}),Le.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return Fe(()=>Promise.resolve().then(()=>hQt),void 0,import.meta.url).then(e=>e.markdown())}}),Le.of({name:"MS SQL",load(){return Sy("MSSQL")}}),Le.of({name:"MySQL",load(){return Sy("MySQL")}}),Le.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return Fe(()=>import("./index-Bmp-WDVD.js"),__vite__mapDeps([8,1]),import.meta.url).then(e=>e.php())}}),Le.of({name:"PLSQL",extensions:["pls"],load(){return Sy("PLSQL")}}),Le.of({name:"PostgreSQL",load(){return Sy("PostgreSQL")}}),Le.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return Fe(()=>import("./index-BKR4AleT.js"),__vite__mapDeps([9,1]),import.meta.url).then(e=>e.python())}}),Le.of({name:"Rust",extensions:["rs"],load(){return Fe(()=>import("./index-Cy_qLZpv.js"),__vite__mapDeps([10,1]),import.meta.url).then(e=>e.rust())}}),Le.of({name:"Sass",extensions:["sass"],load(){return Fe(()=>import("./index-B-bj7NWS.js"),__vite__mapDeps([11,1]),import.meta.url).then(e=>e.sass({indented:!0}))}}),Le.of({name:"SCSS",extensions:["scss"],load(){return Fe(()=>import("./index-B-bj7NWS.js"),__vite__mapDeps([11,1]),import.meta.url).then(e=>e.sass())}}),Le.of({name:"SQL",extensions:["sql"],load(){return Sy("StandardSQL")}}),Le.of({name:"SQLite",load(){return Sy("SQLite")}}),Le.of({name:"TSX",extensions:["tsx"],load(){return Fe(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),Le.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return Fe(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url).then(e=>e.javascript({typescript:!0}))}}),Le.of({name:"WebAssembly",extensions:["wat","wast"],load(){return Fe(()=>import("./index-BdK7a_DT.js"),__vite__mapDeps([12,1]),import.meta.url).then(e=>e.wast())}}),Le.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return Fe(()=>import("./index-fmrue1DI.js"),__vite__mapDeps([13,1]),import.meta.url).then(e=>e.xml())}}),Le.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return Fe(()=>import("./index-CVrfkaNJ.js"),__vite__mapDeps([14,1]),import.meta.url).then(e=>e.yaml())}}),Le.of({name:"APL",extensions:["dyalog","apl"],load(){return Fe(()=>import("./apl-B4CMkyY2.js"),[],import.meta.url).then(e=>ct(e.apl))}}),Le.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return Fe(()=>import("./asciiarmor-Df11BRmG.js"),[],import.meta.url).then(e=>ct(e.asciiArmor))}}),Le.of({name:"ASN.1",extensions:["asn","asn1"],load(){return Fe(()=>import("./asn1-EdZsLKOL.js"),[],import.meta.url).then(e=>ct(e.asn1({})))}}),Le.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return Fe(()=>import("./asterisk-B-8jnY81.js"),[],import.meta.url).then(e=>ct(e.asterisk))}}),Le.of({name:"Brainfuck",extensions:["b","bf"],load(){return Fe(()=>import("./brainfuck-C4LP7Hcl.js"),[],import.meta.url).then(e=>ct(e.brainfuck))}}),Le.of({name:"Cobol",extensions:["cob","cpy"],load(){return Fe(()=>import("./cobol-CWcv1MsR.js"),[],import.meta.url).then(e=>ct(e.cobol))}}),Le.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.csharp))}}),Le.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return Fe(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>ct(e.clojure))}}),Le.of({name:"ClojureScript",extensions:["cljs"],load(){return Fe(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>ct(e.clojure))}}),Le.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return Fe(()=>import("./css-BnMrqG3P.js"),[],import.meta.url).then(e=>ct(e.gss))}}),Le.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return Fe(()=>import("./cmake-BQqOBYOt.js"),[],import.meta.url).then(e=>ct(e.cmake))}}),Le.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return Fe(()=>import("./coffeescript-S37ZYGWr.js"),[],import.meta.url).then(e=>ct(e.coffeeScript))}}),Le.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return Fe(()=>import("./commonlisp-DBKNyK5s.js"),[],import.meta.url).then(e=>ct(e.commonLisp))}}),Le.of({name:"Cypher",extensions:["cyp","cypher"],load(){return Fe(()=>import("./cypher-C_CwsFkJ.js"),[],import.meta.url).then(e=>ct(e.cypher))}}),Le.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return Fe(()=>import("./python-BuPzkPfP.js"),[],import.meta.url).then(e=>ct(e.cython))}}),Le.of({name:"Crystal",extensions:["cr"],load(){return Fe(()=>import("./crystal-SjHAIU92.js"),[],import.meta.url).then(e=>ct(e.crystal))}}),Le.of({name:"D",extensions:["d"],load(){return Fe(()=>import("./d-pRatUO7H.js"),[],import.meta.url).then(e=>ct(e.d))}}),Le.of({name:"Dart",extensions:["dart"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.dart))}}),Le.of({name:"diff",extensions:["diff","patch"],load(){return Fe(()=>import("./diff-DbItnlRl.js"),[],import.meta.url).then(e=>ct(e.diff))}}),Le.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return Fe(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([15,16]),import.meta.url).then(e=>ct(e.dockerFile))}}),Le.of({name:"DTD",extensions:["dtd"],load(){return Fe(()=>import("./dtd-DF_7sFjM.js"),[],import.meta.url).then(e=>ct(e.dtd))}}),Le.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return Fe(()=>import("./dylan-DwRh75JA.js"),[],import.meta.url).then(e=>ct(e.dylan))}}),Le.of({name:"EBNF",load(){return Fe(()=>import("./ebnf-CDyGwa7X.js"),[],import.meta.url).then(e=>ct(e.ebnf))}}),Le.of({name:"ECL",extensions:["ecl"],load(){return Fe(()=>import("./ecl-Cabwm37j.js"),[],import.meta.url).then(e=>ct(e.ecl))}}),Le.of({name:"edn",extensions:["edn"],load(){return Fe(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>ct(e.clojure))}}),Le.of({name:"Eiffel",extensions:["e"],load(){return Fe(()=>import("./eiffel-CnydiIhH.js"),[],import.meta.url).then(e=>ct(e.eiffel))}}),Le.of({name:"Elm",extensions:["elm"],load(){return Fe(()=>import("./elm-vLlmbW-K.js"),[],import.meta.url).then(e=>ct(e.elm))}}),Le.of({name:"Erlang",extensions:["erl"],load(){return Fe(()=>import("./erlang-BNw1qcRV.js"),[],import.meta.url).then(e=>ct(e.erlang))}}),Le.of({name:"Esper",load(){return Fe(()=>import("./sql-D0XecflT.js"),[],import.meta.url).then(e=>ct(e.esper))}}),Le.of({name:"Factor",extensions:["factor"],load(){return Fe(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([17,16]),import.meta.url).then(e=>ct(e.factor))}}),Le.of({name:"FCL",load(){return Fe(()=>import("./fcl-Kvtd6kyn.js"),[],import.meta.url).then(e=>ct(e.fcl))}}),Le.of({name:"Forth",extensions:["forth","fth","4th"],load(){return Fe(()=>import("./forth-Ffai-XNe.js"),[],import.meta.url).then(e=>ct(e.forth))}}),Le.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return Fe(()=>import("./fortran-DYz_wnZ1.js"),[],import.meta.url).then(e=>ct(e.fortran))}}),Le.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return Fe(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>ct(e.fSharp))}}),Le.of({name:"Gas",extensions:["s"],load(){return Fe(()=>import("./gas-Bneqetm1.js"),[],import.meta.url).then(e=>ct(e.gas))}}),Le.of({name:"Gherkin",extensions:["feature"],load(){return Fe(()=>import("./gherkin-heZmZLOM.js"),[],import.meta.url).then(e=>ct(e.gherkin))}}),Le.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return Fe(()=>import("./groovy-D9Dt4D0W.js"),[],import.meta.url).then(e=>ct(e.groovy))}}),Le.of({name:"Haskell",extensions:["hs"],load(){return Fe(()=>import("./haskell-Cw1EW3IL.js"),[],import.meta.url).then(e=>ct(e.haskell))}}),Le.of({name:"Haxe",extensions:["hx"],load(){return Fe(()=>import("./haxe-H-WmDvRZ.js"),[],import.meta.url).then(e=>ct(e.haxe))}}),Le.of({name:"HXML",extensions:["hxml"],load(){return Fe(()=>import("./haxe-H-WmDvRZ.js"),[],import.meta.url).then(e=>ct(e.hxml))}}),Le.of({name:"HTTP",load(){return Fe(()=>import("./http-DBlCnlav.js"),[],import.meta.url).then(e=>ct(e.http))}}),Le.of({name:"IDL",extensions:["pro"],load(){return Fe(()=>import("./idl-BEugSyMb.js"),[],import.meta.url).then(e=>ct(e.idl))}}),Le.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return Fe(()=>import("./javascript-iXu5QeM3.js"),[],import.meta.url).then(e=>ct(e.jsonld))}}),Le.of({name:"Julia",extensions:["jl"],load(){return Fe(()=>import("./julia-DuME0IfC.js"),[],import.meta.url).then(e=>ct(e.julia))}}),Le.of({name:"Kotlin",extensions:["kt","kts"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.kotlin))}}),Le.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return Fe(()=>import("./livescript-BwQOo05w.js"),[],import.meta.url).then(e=>ct(e.liveScript))}}),Le.of({name:"Lua",extensions:["lua"],load(){return Fe(()=>import("./lua-BgMRiT3U.js"),[],import.meta.url).then(e=>ct(e.lua))}}),Le.of({name:"mIRC",extensions:["mrc"],load(){return Fe(()=>import("./mirc-CjQqDB4T.js"),[],import.meta.url).then(e=>ct(e.mirc))}}),Le.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return Fe(()=>import("./mathematica-DTrFuWx2.js"),[],import.meta.url).then(e=>ct(e.mathematica))}}),Le.of({name:"Modelica",extensions:["mo"],load(){return Fe(()=>import("./modelica-Dc1JOy9r.js"),[],import.meta.url).then(e=>ct(e.modelica))}}),Le.of({name:"MUMPS",extensions:["mps"],load(){return Fe(()=>import("./mumps-BT43cFF4.js"),[],import.meta.url).then(e=>ct(e.mumps))}}),Le.of({name:"Mbox",extensions:["mbox"],load(){return Fe(()=>import("./mbox-CNhZ1qSd.js"),[],import.meta.url).then(e=>ct(e.mbox))}}),Le.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return Fe(()=>import("./nginx-DdIZxoE0.js"),[],import.meta.url).then(e=>ct(e.nginx))}}),Le.of({name:"NSIS",extensions:["nsh","nsi"],load(){return Fe(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([18,16]),import.meta.url).then(e=>ct(e.nsis))}}),Le.of({name:"NTriples",extensions:["nt","nq"],load(){return Fe(()=>import("./ntriples-BfvgReVJ.js"),[],import.meta.url).then(e=>ct(e.ntriples))}}),Le.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.objectiveC))}}),Le.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.objectiveCpp))}}),Le.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return Fe(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>ct(e.oCaml))}}),Le.of({name:"Octave",extensions:["m"],load(){return Fe(()=>import("./octave-Ck1zUtKM.js"),[],import.meta.url).then(e=>ct(e.octave))}}),Le.of({name:"Oz",extensions:["oz"],load(){return Fe(()=>import("./oz-BzwKVEFT.js"),[],import.meta.url).then(e=>ct(e.oz))}}),Le.of({name:"Pascal",extensions:["p","pas"],load(){return Fe(()=>import("./pascal--L3eBynH.js"),[],import.meta.url).then(e=>ct(e.pascal))}}),Le.of({name:"Perl",extensions:["pl","pm"],load(){return Fe(()=>import("./perl-CdXCOZ3F.js"),[],import.meta.url).then(e=>ct(e.perl))}}),Le.of({name:"Pig",extensions:["pig"],load(){return Fe(()=>import("./pig-CevX1Tat.js"),[],import.meta.url).then(e=>ct(e.pig))}}),Le.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return Fe(()=>import("./powershell-CaxLzxiJ.js"),[],import.meta.url).then(e=>ct(e.powerShell))}}),Le.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return Fe(()=>import("./properties-C78fOPTZ.js"),[],import.meta.url).then(e=>ct(e.properties))}}),Le.of({name:"ProtoBuf",extensions:["proto"],load(){return Fe(()=>import("./protobuf-ChK-085T.js"),[],import.meta.url).then(e=>ct(e.protobuf))}}),Le.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return Fe(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([19,20]),import.meta.url).then(e=>ct(e.pug))}}),Le.of({name:"Puppet",extensions:["pp"],load(){return Fe(()=>import("./puppet-DMA9R1ak.js"),[],import.meta.url).then(e=>ct(e.puppet))}}),Le.of({name:"Q",extensions:["q"],load(){return Fe(()=>import("./q-pXgVlZs6.js"),[],import.meta.url).then(e=>ct(e.q))}}),Le.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return Fe(()=>import("./r-B6wPVr8A.js"),[],import.meta.url).then(e=>ct(e.r))}}),Le.of({name:"RPM Changes",load(){return Fe(()=>import("./rpm-CTu-6PCP.js"),[],import.meta.url).then(e=>ct(e.rpmChanges))}}),Le.of({name:"RPM Spec",extensions:["spec"],load(){return Fe(()=>import("./rpm-CTu-6PCP.js"),[],import.meta.url).then(e=>ct(e.rpmSpec))}}),Le.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return Fe(()=>import("./ruby-B2Rjki9n.js"),[],import.meta.url).then(e=>ct(e.ruby))}}),Le.of({name:"SAS",extensions:["sas"],load(){return Fe(()=>import("./sas-B4kiWyti.js"),[],import.meta.url).then(e=>ct(e.sas))}}),Le.of({name:"Scala",extensions:["scala"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.scala))}}),Le.of({name:"Scheme",extensions:["scm","ss"],load(){return Fe(()=>import("./scheme-C41bIUwD.js"),[],import.meta.url).then(e=>ct(e.scheme))}}),Le.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return Fe(()=>import("./shell-CjFT_Tl9.js"),[],import.meta.url).then(e=>ct(e.shell))}}),Le.of({name:"Sieve",extensions:["siv","sieve"],load(){return Fe(()=>import("./sieve-C3Gn_uJK.js"),[],import.meta.url).then(e=>ct(e.sieve))}}),Le.of({name:"Smalltalk",extensions:["st"],load(){return Fe(()=>import("./smalltalk-CnHTOXQT.js"),[],import.meta.url).then(e=>ct(e.smalltalk))}}),Le.of({name:"Solr",load(){return Fe(()=>import("./solr-DehyRSwq.js"),[],import.meta.url).then(e=>ct(e.solr))}}),Le.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return Fe(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>ct(e.sml))}}),Le.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return Fe(()=>import("./sparql-DkYu6x3z.js"),[],import.meta.url).then(e=>ct(e.sparql))}}),Le.of({name:"Spreadsheet",alias:["excel","formula"],load(){return Fe(()=>import("./spreadsheet-BCZA_wO0.js"),[],import.meta.url).then(e=>ct(e.spreadsheet))}}),Le.of({name:"Squirrel",extensions:["nut"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.squirrel))}}),Le.of({name:"Stylus",extensions:["styl"],load(){return Fe(()=>import("./stylus-B533Al4x.js"),[],import.meta.url).then(e=>ct(e.stylus))}}),Le.of({name:"Swift",extensions:["swift"],load(){return Fe(()=>import("./swift-BzpIVaGY.js"),[],import.meta.url).then(e=>ct(e.swift))}}),Le.of({name:"sTeX",load(){return Fe(()=>import("./stex-C3f8Ysf7.js"),[],import.meta.url).then(e=>ct(e.stex))}}),Le.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return Fe(()=>import("./stex-C3f8Ysf7.js"),[],import.meta.url).then(e=>ct(e.stex))}}),Le.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return Fe(()=>import("./verilog-C6RDOZhf.js"),[],import.meta.url).then(e=>ct(e.verilog))}}),Le.of({name:"Tcl",extensions:["tcl"],load(){return Fe(()=>import("./tcl-DVfN8rqt.js"),[],import.meta.url).then(e=>ct(e.tcl))}}),Le.of({name:"Textile",extensions:["textile"],load(){return Fe(()=>import("./textile-CnDTJFAw.js"),[],import.meta.url).then(e=>ct(e.textile))}}),Le.of({name:"TiddlyWiki",load(){return Fe(()=>import("./tiddlywiki-DO-Gjzrf.js"),[],import.meta.url).then(e=>ct(e.tiddlyWiki))}}),Le.of({name:"Tiki wiki",load(){return Fe(()=>import("./tiki-DGYXhP31.js"),[],import.meta.url).then(e=>ct(e.tiki))}}),Le.of({name:"TOML",extensions:["toml"],load(){return Fe(()=>import("./toml-Bm5Em-hy.js"),[],import.meta.url).then(e=>ct(e.toml))}}),Le.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return Fe(()=>import("./troff-wAsdV37c.js"),[],import.meta.url).then(e=>ct(e.troff))}}),Le.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return Fe(()=>import("./ttcn-CfJYG6tj.js"),[],import.meta.url).then(e=>ct(e.ttcn))}}),Le.of({name:"TTCN_CFG",extensions:["cfg"],load(){return Fe(()=>import("./ttcn-cfg-B9xdYoR4.js"),[],import.meta.url).then(e=>ct(e.ttcnCfg))}}),Le.of({name:"Turtle",extensions:["ttl"],load(){return Fe(()=>import("./turtle-B1tBg_DP.js"),[],import.meta.url).then(e=>ct(e.turtle))}}),Le.of({name:"Web IDL",extensions:["webidl"],load(){return Fe(()=>import("./webidl-ZXfAyPTL.js"),[],import.meta.url).then(e=>ct(e.webIDL))}}),Le.of({name:"VB.NET",extensions:["vb"],load(){return Fe(()=>import("./vb-CmGdzxic.js"),[],import.meta.url).then(e=>ct(e.vb))}}),Le.of({name:"VBScript",extensions:["vbs"],load(){return Fe(()=>import("./vbscript-BuJXcnF6.js"),[],import.meta.url).then(e=>ct(e.vbScript))}}),Le.of({name:"Velocity",extensions:["vtl"],load(){return Fe(()=>import("./velocity-D8B20fx6.js"),[],import.meta.url).then(e=>ct(e.velocity))}}),Le.of({name:"Verilog",extensions:["v"],load(){return Fe(()=>import("./verilog-C6RDOZhf.js"),[],import.meta.url).then(e=>ct(e.verilog))}}),Le.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return Fe(()=>import("./vhdl-lSbBsy5d.js"),[],import.meta.url).then(e=>ct(e.vhdl))}}),Le.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return Fe(()=>import("./xquery-DzFWVndE.js"),[],import.meta.url).then(e=>ct(e.xQuery))}}),Le.of({name:"Yacas",extensions:["ys"],load(){return Fe(()=>import("./yacas-BJ4BC0dw.js"),[],import.meta.url).then(e=>ct(e.yacas))}}),Le.of({name:"Z80",extensions:["z80"],load(){return Fe(()=>import("./z80-Hz9HOZM7.js"),[],import.meta.url).then(e=>ct(e.z80))}}),Le.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return Fe(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>ct(e.mscgen))}}),Le.of({name:"Xù",extensions:["xu"],load(){return Fe(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>ct(e.xu))}}),Le.of({name:"MsGenny",extensions:["msgenny"],load(){return Fe(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>ct(e.msgenny))}}),Le.of({name:"Vue",extensions:["vue"],load(){return Fe(()=>import("./index-CaKBhxiM.js"),__vite__mapDeps([21,1]),import.meta.url).then(e=>e.vue())}}),Le.of({name:"Angular Template",load(){return Fe(()=>import("./index-CDq94W76.js"),__vite__mapDeps([22,1]),import.meta.url).then(e=>e.angular())}})];var mQt=e=>{var{theme:t,settings:r={},styles:n=[]}=e,a={".cm-gutters":{}},s={};r.background&&(s.backgroundColor=r.background),r.backgroundImage&&(s.backgroundImage=r.backgroundImage),r.foreground&&(s.color=r.foreground),r.fontSize&&(s.fontSize=r.fontSize),(r.background||r.foreground)&&(a["&"]=s),r.fontFamily&&(a["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(a[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(a[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(a[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(a[".cm-content"]={caretColor:r.caret},a[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var i={};r.gutterActiveForeground&&(i.color=r.gutterActiveForeground),r.lineHighlight&&(a[".cm-activeLine"]={backgroundColor:r.lineHighlight},i.backgroundColor=r.lineHighlight),a[".cm-activeLineGutter"]=i,r.selection&&(a["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(a["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch});var o=bt.theme(a,{dark:t==="dark"}),l=i1.define(n),c=[o,RL(l)];return c},gQt={background:"#282a36",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"#282a36",gutterForeground:"#6D8A88",gutterBorder:"transparent",lineHighlight:"rgba(255, 255, 255, 0.1)"},yQt=[{tag:ee.comment,color:"#6272a4"},{tag:ee.string,color:"#f1fa8c"},{tag:ee.atom,color:"#bd93f9"},{tag:ee.meta,color:"#f8f8f2"},{tag:[ee.keyword,ee.operator,ee.tagName],color:"#ff79c6"},{tag:[ee.function(ee.propertyName),ee.propertyName],color:"#66d9ef"},{tag:[ee.definition(ee.variableName),ee.function(ee.variableName),ee.className,ee.attributeName],color:"#50fa7b"},{tag:ee.atom,color:"#bd93f9"}],Coe=e=>{var{theme:t="dark",settings:r={},styles:n=[]}=e||{};return mQt({theme:t,settings:Th({},gQt,r),styles:[...yQt,...n]})};Coe();const bQt=e=>{let{state:t}=e,r=t.doc.lineAt(t.selection.main.from),n=Aoe(e.state,r.from);return n.line?vQt(e):n.block?wQt(e):!1};function Toe(e,t){return({state:r,dispatch:n})=>{if(r.readOnly)return!1;let a=e(t,r);return a?(n(r.update(a)),!0):!1}}const vQt=Toe(OQt,0),xQt=Toe(wZe,0),wQt=Toe((e,t)=>wZe(e,t,EQt(t)),0);function Aoe(e,t){let r=e.languageDataAt("commentTokens",t,1);return r.length?r[0]:{}}const Ck=50;function SQt(e,{open:t,close:r},n,a){let s=e.sliceDoc(n-Ck,n),i=e.sliceDoc(a,a+Ck),o=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(i)[0].length,c=s.length-o;if(s.slice(c-t.length,c)==t&&i.slice(l,l+r.length)==r)return{open:{pos:n-o,margin:o&&1},close:{pos:a+l,margin:l&&1}};let u,d;a-n<=2*Ck?u=d=e.sliceDoc(n,a):(u=e.sliceDoc(n,n+Ck),d=e.sliceDoc(a-Ck,a));let f=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(d)[0].length,g=d.length-h-r.length;return u.slice(f,f+t.length)==t&&d.slice(g,g+r.length)==r?{open:{pos:n+f+t.length,margin:/\s/.test(u.charAt(f+t.length))?1:0},close:{pos:a-h-r.length,margin:/\s/.test(d.charAt(g-1))?1:0}}:null}function EQt(e){let t=[];for(let r of e.selection.ranges){let n=e.doc.lineAt(r.from),a=r.to<=n.to?n:e.doc.lineAt(r.to);a.from>n.from&&a.from==r.to&&(a=r.to==n.to+1?n:e.doc.lineAt(r.to-1));let s=t.length-1;s>=0&&t[s].to>n.from?t[s].to=a.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:a.to})}return t}function wZe(e,t,r=t.selection.ranges){let n=r.map(s=>Aoe(t,s.from).block);if(!n.every(s=>s))return null;let a=r.map((s,i)=>SQt(t,n[i],s.from,s.to));if(e!=2&&!a.every(s=>s))return{changes:t.changes(r.map((s,i)=>a[i]?[]:[{from:s.from,insert:n[i].open+" "},{from:s.to,insert:" "+n[i].close}]))};if(e!=1&&a.some(s=>s)){let s=[];for(let i=0,o;i<a.length;i++)if(o=a[i]){let l=n[i],{open:c,close:u}=o;s.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:s}}return null}function OQt(e,t,r=t.selection.ranges){let n=[],a=-1;for(let{from:s,to:i}of r){let o=n.length,l=1e9,c=Aoe(t,s).line;if(c){for(let u=s;u<=i;){let d=t.doc.lineAt(u);if(d.from>a&&(s==i||i>d.from)){a=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,g=d.text.slice(f,f+c.length)==c?f:-1;f<d.text.length&&f<l&&(l=f),n.push({line:d,comment:g,token:c,indent:f,empty:h,single:!1})}u=d.to+1}if(l<1e9)for(let u=o;u<n.length;u++)n[u].indent<n[u].line.text.length&&(n[u].indent=l);n.length==o+1&&(n[o].single=!0)}}if(e!=2&&n.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:o,token:l,indent:c,empty:u,single:d}of n)(d||!u)&&s.push({from:o.from+c,insert:l+" "});let i=t.changes(s);return{changes:i,selection:t.selection.map(i,1)}}else if(e!=1&&n.some(s=>s.comment>=0)){let s=[];for(let{line:i,comment:o,token:l}of n)if(o>=0){let c=i.from+o,u=c+l.length;i.text[u-i.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const RJ=Zh.define(),_Qt=Zh.define(),kQt=Xt.define(),SZe=Xt.define({combine(e){return Hh(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,r)=>r},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,r)=>(n,a)=>t(n,a)||r(n,a)})}}),EZe=$o.define({create(){return ch.empty},update(e,t){let r=t.state.facet(SZe),n=t.annotation(RJ);if(n){let l=Ac.fromTransaction(t,n.selection),c=n.side,u=c==0?e.undone:e.done;return l?u=I3(u,u.length,r.minDepth,l):u=kZe(u,t.startState.selection),new ch(c==0?n.rest:u,c==0?u:n.rest)}let a=t.annotation(_Qt);if((a=="full"||a=="before")&&(e=e.isolate()),t.annotation(Zi.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let s=Ac.fromTransaction(t),i=t.annotation(Zi.time),o=t.annotation(Zi.userEvent);return s?e=e.addChanges(s,i,o,r,t):t.selection&&(e=e.addSelection(t.startState.selection,i,o,r.newGroupDelay)),(a=="full"||a=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new ch(e.done.map(Ac.fromJSON),e.undone.map(Ac.fromJSON))}});function CQt(e={}){return[EZe,SZe.of(e),bt.domEventHandlers({beforeinput(t,r){let n=t.inputType=="historyUndo"?OZe:t.inputType=="historyRedo"?PJ:null;return n?(t.preventDefault(),n(r)):!1}})]}function ML(e,t){return function({state:r,dispatch:n}){if(!t&&r.readOnly)return!1;let a=r.field(EZe,!1);if(!a)return!1;let s=a.pop(e,r,t);return s?(n(s),!0):!1}}const OZe=ML(0,!1),PJ=ML(1,!1),TQt=ML(0,!0),AQt=ML(1,!0);class Ac{constructor(t,r,n,a,s){this.changes=t,this.effects=r,this.mapped=n,this.startSelection=a,this.selectionsAfter=s}setSelAfter(t){return new Ac(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,r,n;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(r=this.mapped)===null||r===void 0?void 0:r.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(a=>a.toJSON())}}static fromJSON(t){return new Ac(t.changes&&uo.fromJSON(t.changes),[],t.mapped&&vh.fromJSON(t.mapped),t.startSelection&&We.fromJSON(t.startSelection),t.selectionsAfter.map(We.fromJSON))}static fromTransaction(t,r){let n=Md;for(let a of t.startState.facet(kQt)){let s=a(t);s.length&&(n=n.concat(s))}return!n.length&&t.changes.empty?null:new Ac(t.changes.invert(t.startState.doc),n,void 0,r||t.startState.selection,Md)}static selection(t){return new Ac(void 0,Md,void 0,void 0,t)}}function I3(e,t,r,n){let a=t+1>r+20?t-r-1:0,s=e.slice(a,t);return s.push(n),s}function DQt(e,t){let r=[],n=!1;return e.iterChangedRanges((a,s)=>r.push(a,s)),t.iterChangedRanges((a,s,i,o)=>{for(let l=0;l<r.length;){let c=r[l++],u=r[l++];o>=c&&i<=u&&(n=!0)}}),n}function IQt(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((r,n)=>r.empty!=t.ranges[n].empty).length===0}function _Ze(e,t){return e.length?t.length?e.concat(t):e:t}const Md=[],NQt=200;function kZe(e,t){if(e.length){let r=e[e.length-1],n=r.selectionsAfter.slice(Math.max(0,r.selectionsAfter.length-NQt));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),I3(e,e.length-1,1e9,r.setSelAfter(n)))}else return[Ac.selection([t])]}function RQt(e){let t=e[e.length-1],r=e.slice();return r[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),r}function WH(e,t){if(!e.length)return e;let r=e.length,n=Md;for(;r;){let a=PQt(e[r-1],t,n);if(a.changes&&!a.changes.empty||a.effects.length){let s=e.slice(0,r);return s[r-1]=a,s}else t=a.mapped,r--,n=a.selectionsAfter}return n.length?[Ac.selection(n)]:Md}function PQt(e,t,r){let n=_Ze(e.selectionsAfter.length?e.selectionsAfter.map(o=>o.map(t)):Md,r);if(!e.changes)return Ac.selection(n);let a=e.changes.map(t),s=t.mapDesc(e.changes,!0),i=e.mapped?e.mapped.composeDesc(s):s;return new Ac(a,nn.mapEffects(e.effects,t),i,e.startSelection.map(s),n)}const $Qt=/^(input\.type|delete)($|\.)/;class ch{constructor(t,r,n=0,a=void 0){this.done=t,this.undone=r,this.prevTime=n,this.prevUserEvent=a}isolate(){return this.prevTime?new ch(this.done,this.undone):this}addChanges(t,r,n,a,s){let i=this.done,o=i[i.length-1];return o&&o.changes&&!o.changes.empty&&t.changes&&(!n||$Qt.test(n))&&(!o.selectionsAfter.length&&r-this.prevTime<a.newGroupDelay&&a.joinToEvent(s,DQt(o.changes,t.changes))||n=="input.type.compose")?i=I3(i,i.length-1,a.minDepth,new Ac(t.changes.compose(o.changes),_Ze(nn.mapEffects(t.effects,o.changes),o.effects),o.mapped,o.startSelection,Md)):i=I3(i,i.length,a.minDepth,t),new ch(i,Md,r,n)}addSelection(t,r,n,a){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Md;return s.length>0&&r-this.prevTime<a&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&IQt(s[s.length-1],t)?this:new ch(kZe(this.done,t),this.undone,r,n)}addMapping(t){return new ch(WH(this.done,t),WH(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,r,n){let a=t==0?this.done:this.undone;if(a.length==0)return null;let s=a[a.length-1],i=s.selectionsAfter[0]||r.selection;if(n&&s.selectionsAfter.length)return r.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:RJ.of({side:t,rest:RQt(a),selection:i}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let o=a.length==1?Md:a.slice(0,a.length-1);return s.mapped&&(o=WH(o,s.mapped)),r.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:RJ.of({side:t,rest:o,selection:i}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}}ch.empty=new ch(Md,Md);const MQt=[{key:"Mod-z",run:OZe,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:PJ,preventDefault:!0},{linux:"Ctrl-Shift-z",run:PJ,preventDefault:!0},{key:"Mod-u",run:TQt,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:AQt,preventDefault:!0}];function DO(e,t){return We.create(e.ranges.map(t),e.mainIndex)}function _f(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function kf({state:e,dispatch:t},r){let n=DO(e.selection,r);return n.eq(e.selection,!0)?!1:(t(_f(e,n)),!0)}function jL(e,t){return We.cursor(t?e.to:e.from)}function CZe(e,t){return kf(e,r=>r.empty?e.moveByChar(r,t):jL(r,t))}function bl(e){return e.textDirectionAt(e.state.selection.main.head)==As.LTR}const TZe=e=>CZe(e,!bl(e)),AZe=e=>CZe(e,bl(e));function DZe(e,t){return kf(e,r=>r.empty?e.moveByGroup(r,t):jL(r,t))}const jQt=e=>DZe(e,!bl(e)),LQt=e=>DZe(e,bl(e));function FQt(e,t,r){if(t.type.prop(r))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function LL(e,t,r){let n=Ja(e).resolveInner(t.head),a=r?Xr.closedBy:Xr.openedBy;for(let l=t.head;;){let c=r?n.childAfter(l):n.childBefore(l);if(!c)break;FQt(e,c,a)?n=c:l=r?c.to:c.from}let s=n.type.prop(a),i,o;return s&&(i=r?lh(e,n.from,1):lh(e,n.to,-1))&&i.matched?o=r?i.end.to:i.end.from:o=r?n.to:n.from,We.cursor(o,r?-1:1)}const BQt=e=>kf(e,t=>LL(e.state,t,!bl(e))),zQt=e=>kf(e,t=>LL(e.state,t,bl(e)));function IZe(e,t){return kf(e,r=>{if(!r.empty)return jL(r,t);let n=e.moveVertically(r,t);return n.head!=r.head?n:e.moveToLineBoundary(r,t)})}const NZe=e=>IZe(e,!1),RZe=e=>IZe(e,!0);function PZe(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,n=0,a;if(t){for(let s of e.state.facet(bt.scrollMargins)){let i=s(e);i?.top&&(r=Math.max(i?.top,r)),i?.bottom&&(n=Math.max(i?.bottom,n))}a=e.scrollDOM.clientHeight-r-n}else a=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:n,selfScroll:t,height:Math.max(e.defaultLineHeight,a-5)}}function $Ze(e,t){let r=PZe(e),{state:n}=e,a=DO(n.selection,i=>i.empty?e.moveVertically(i,t,r.height):jL(i,t));if(a.eq(n.selection))return!1;let s;if(r.selfScroll){let i=e.coordsAtPos(n.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),l=o.top+r.marginTop,c=o.bottom-r.marginBottom;i&&i.top>l&&i.bottom<c&&(s=bt.scrollIntoView(a.main.head,{y:"start",yMargin:i.top-l}))}return e.dispatch(_f(n,a),{effects:s}),!0}const Dke=e=>$Ze(e,!1),$J=e=>$Ze(e,!0);function bv(e,t,r){let n=e.lineBlockAt(t.head),a=e.moveToLineBoundary(t,r);if(a.head==t.head&&a.head!=(r?n.to:n.from)&&(a=e.moveToLineBoundary(t,r,!1)),!r&&a.head==n.from&&n.length){let s=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;s&&t.head!=n.from+s&&(a=We.cursor(n.from+s))}return a}const UQt=e=>kf(e,t=>bv(e,t,!0)),VQt=e=>kf(e,t=>bv(e,t,!1)),qQt=e=>kf(e,t=>bv(e,t,!bl(e))),ZQt=e=>kf(e,t=>bv(e,t,bl(e))),HQt=e=>kf(e,t=>We.cursor(e.lineBlockAt(t.head).from,1)),GQt=e=>kf(e,t=>We.cursor(e.lineBlockAt(t.head).to,-1));function QQt(e,t,r){let n=!1,a=DO(e.selection,s=>{let i=lh(e,s.head,-1)||lh(e,s.head,1)||s.head>0&&lh(e,s.head-1,1)||s.head<e.doc.length&&lh(e,s.head+1,-1);if(!i||!i.end)return s;n=!0;let o=i.start.from==s.head?i.end.to:i.end.from;return We.cursor(o)});return n?(t(_f(e,a)),!0):!1}const WQt=({state:e,dispatch:t})=>QQt(e,t);function lp(e,t){let r=DO(e.state.selection,n=>{let a=t(n);return We.range(n.anchor,a.head,a.goalColumn,a.bidiLevel||void 0)});return r.eq(e.state.selection)?!1:(e.dispatch(_f(e.state,r)),!0)}function MZe(e,t){return lp(e,r=>e.moveByChar(r,t))}const jZe=e=>MZe(e,!bl(e)),LZe=e=>MZe(e,bl(e));function FZe(e,t){return lp(e,r=>e.moveByGroup(r,t))}const XQt=e=>FZe(e,!bl(e)),YQt=e=>FZe(e,bl(e)),KQt=e=>lp(e,t=>LL(e.state,t,!bl(e))),JQt=e=>lp(e,t=>LL(e.state,t,bl(e)));function BZe(e,t){return lp(e,r=>e.moveVertically(r,t))}const zZe=e=>BZe(e,!1),UZe=e=>BZe(e,!0);function VZe(e,t){return lp(e,r=>e.moveVertically(r,t,PZe(e).height))}const Ike=e=>VZe(e,!1),Nke=e=>VZe(e,!0),eWt=e=>lp(e,t=>bv(e,t,!0)),tWt=e=>lp(e,t=>bv(e,t,!1)),rWt=e=>lp(e,t=>bv(e,t,!bl(e))),nWt=e=>lp(e,t=>bv(e,t,bl(e))),aWt=e=>lp(e,t=>We.cursor(e.lineBlockAt(t.head).from)),sWt=e=>lp(e,t=>We.cursor(e.lineBlockAt(t.head).to)),Rke=({state:e,dispatch:t})=>(t(_f(e,{anchor:0})),!0),Pke=({state:e,dispatch:t})=>(t(_f(e,{anchor:e.doc.length})),!0),$ke=({state:e,dispatch:t})=>(t(_f(e,{anchor:e.selection.main.anchor,head:0})),!0),Mke=({state:e,dispatch:t})=>(t(_f(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),iWt=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),oWt=({state:e,dispatch:t})=>{let r=FL(e).map(({from:n,to:a})=>We.range(n,Math.min(a+1,e.doc.length)));return t(e.update({selection:We.create(r),userEvent:"select"})),!0},lWt=({state:e,dispatch:t})=>{let r=DO(e.selection,n=>{let a=Ja(e),s=a.resolveStack(n.from,1);if(n.empty){let i=a.resolveStack(n.from,-1);i.node.from>=s.node.from&&i.node.to<=s.node.to&&(s=i)}for(let i=s;i;i=i.next){let{node:o}=i;if((o.from<n.from&&o.to>=n.to||o.to>n.to&&o.from<=n.from)&&i.next)return We.range(o.to,o.from)}return n});return r.eq(e.selection)?!1:(t(_f(e,r)),!0)};function qZe(e,t){let{state:r}=e,n=r.selection,a=r.selection.ranges.slice();for(let s of r.selection.ranges){let i=r.doc.lineAt(s.head);if(t?i.to<e.state.doc.length:i.from>0)for(let o=s;;){let l=e.moveVertically(o,t);if(l.head<i.from||l.head>i.to){a.some(c=>c.head==l.head)||a.push(l);break}else{if(l.head==o.head)break;o=l}}}return a.length==n.ranges.length?!1:(e.dispatch(_f(r,We.create(a,a.length-1))),!0)}const cWt=e=>qZe(e,!1),uWt=e=>qZe(e,!0),dWt=({state:e,dispatch:t})=>{let r=e.selection,n=null;return r.ranges.length>1?n=We.create([r.main]):r.main.empty||(n=We.create([We.cursor(r.main.head)])),n?(t(_f(e,n)),!0):!1};function rN(e,t){if(e.state.readOnly)return!1;let r="delete.selection",{state:n}=e,a=n.changeByRange(s=>{let{from:i,to:o}=s;if(i==o){let l=t(s);l<i?(r="delete.backward",l=o2(e,l,!1)):l>i&&(r="delete.forward",l=o2(e,l,!0)),i=Math.min(i,l),o=Math.max(o,l)}else i=o2(e,i,!1),o=o2(e,o,!0);return i==o?{range:s}:{changes:{from:i,to:o},range:We.cursor(i,i<s.head?-1:1)}});return a.changes.empty?!1:(e.dispatch(n.update(a,{scrollIntoView:!0,userEvent:r,effects:r=="delete.selection"?bt.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function o2(e,t,r){if(e instanceof bt)for(let n of e.state.facet(bt.atomicRanges).map(a=>a(e)))n.between(t,t,(a,s)=>{a<t&&s>t&&(t=r?s:a)});return t}const ZZe=(e,t,r)=>rN(e,n=>{let a=n.from,{state:s}=e,i=s.doc.lineAt(a),o,l;if(r&&!t&&a>i.from&&a<i.from+200&&!/[^ \t]/.test(o=i.text.slice(0,a-i.from))){if(o[o.length-1]==" ")return a-1;let c=lf(o,s.tabSize),u=c%hx(s)||hx(s);for(let d=0;d<u&&o[o.length-1-d]==" ";d++)a--;l=a}else l=Ho(i.text,a-i.from,t,t)+i.from,l==a&&i.number!=(t?s.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(i.text.slice(l-i.from,a-i.from))&&(l=Ho(i.text,l-i.from,!1,!1)+i.from);return l}),MJ=e=>ZZe(e,!1,!0),HZe=e=>ZZe(e,!0,!1),GZe=(e,t)=>rN(e,r=>{let n=r.head,{state:a}=e,s=a.doc.lineAt(n),i=a.charCategorizer(n);for(let o=null;;){if(n==(t?s.to:s.from)){n==r.head&&s.number!=(t?a.doc.lines:1)&&(n+=t?1:-1);break}let l=Ho(s.text,n-s.from,t)+s.from,c=s.text.slice(Math.min(n,l)-s.from,Math.max(n,l)-s.from),u=i(c);if(o!=null&&u!=o)break;(c!=" "||n!=r.head)&&(o=u),n=l}return n}),QZe=e=>GZe(e,!1),pWt=e=>GZe(e,!0),fWt=e=>rN(e,t=>{let r=e.lineBlockAt(t.head).to;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}),hWt=e=>rN(e,t=>{let r=e.moveToLineBoundary(t,!1).head;return t.head>r?r:Math.max(0,t.head-1)}),mWt=e=>rN(e,t=>{let r=e.moveToLineBoundary(t,!0).head;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}),gWt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:Kn.of(["",""])},range:We.cursor(n.from)}));return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0},yWt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(n=>{if(!n.empty||n.from==0||n.from==e.doc.length)return{range:n};let a=n.from,s=e.doc.lineAt(a),i=a==s.from?a-1:Ho(s.text,a-s.from,!1)+s.from,o=a==s.to?a+1:Ho(s.text,a-s.from,!0)+s.from;return{changes:{from:i,to:o,insert:e.doc.slice(a,o).append(e.doc.slice(i,a))},range:We.cursor(o)}});return r.changes.empty?!1:(t(e.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function FL(e){let t=[],r=-1;for(let n of e.selection.ranges){let a=e.doc.lineAt(n.from),s=e.doc.lineAt(n.to);if(!n.empty&&n.to==s.from&&(s=e.doc.lineAt(n.to-1)),r>=a.number){let i=t[t.length-1];i.to=s.to,i.ranges.push(n)}else t.push({from:a.from,to:s.to,ranges:[n]});r=s.number+1}return t}function WZe(e,t,r){if(e.readOnly)return!1;let n=[],a=[];for(let s of FL(e)){if(r?s.to==e.doc.length:s.from==0)continue;let i=e.doc.lineAt(r?s.to+1:s.from-1),o=i.length+1;if(r){n.push({from:s.to,to:i.to},{from:s.from,insert:i.text+e.lineBreak});for(let l of s.ranges)a.push(We.range(Math.min(e.doc.length,l.anchor+o),Math.min(e.doc.length,l.head+o)))}else{n.push({from:i.from,to:s.from},{from:s.to,insert:e.lineBreak+i.text});for(let l of s.ranges)a.push(We.range(l.anchor-o,l.head-o))}}return n.length?(t(e.update({changes:n,scrollIntoView:!0,selection:We.create(a,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}const bWt=({state:e,dispatch:t})=>WZe(e,t,!1),vWt=({state:e,dispatch:t})=>WZe(e,t,!0);function XZe(e,t,r){if(e.readOnly)return!1;let n=[];for(let a of FL(e))r?n.push({from:a.from,insert:e.doc.slice(a.from,a.to)+e.lineBreak}):n.push({from:a.to,insert:e.lineBreak+e.doc.slice(a.from,a.to)});return t(e.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const xWt=({state:e,dispatch:t})=>XZe(e,t,!1),wWt=({state:e,dispatch:t})=>XZe(e,t,!0),SWt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,r=t.changes(FL(t).map(({from:a,to:s})=>(a>0?a--:s<t.doc.length&&s++,{from:a,to:s}))),n=DO(t.selection,a=>{let s;if(e.lineWrapping){let i=e.lineBlockAt(a.head),o=e.coordsAtPos(a.head,a.assoc||1);o&&(s=i.bottom+e.documentTop-o.bottom+e.defaultLineHeight/2)}return e.moveVertically(a,!0,s)}).map(r);return e.dispatch({changes:r,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function EWt(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let r=Ja(e).resolveInner(t),n=r.childBefore(t),a=r.childAfter(t),s;return n&&a&&n.to<=t&&a.from>=t&&(s=n.type.prop(Xr.closedBy))&&s.indexOf(a.name)>-1&&e.doc.lineAt(n.to).from==e.doc.lineAt(a.from).from&&!/\S/.test(e.sliceDoc(n.to,a.from))?{from:n.to,to:a.from}:null}const jke=YZe(!1),OWt=YZe(!0);function YZe(e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let n=t.changeByRange(a=>{let{from:s,to:i}=a,o=t.doc.lineAt(s),l=!e&&s==i&&EWt(t,s);e&&(s=i=(i<=o.to?o:t.doc.lineAt(i)).to);let c=new IL(t,{simulateBreak:s,simulateDoubleBreak:!!l}),u=Yie(c,s);for(u==null&&(u=lf(/^\s*/.exec(t.doc.lineAt(s).text)[0],t.tabSize));i<o.to&&/\s/.test(o.text[i-o.from]);)i++;l?{from:s,to:i}=l:s>o.from&&s<o.from+100&&!/\S/.test(o.text.slice(0,s))&&(s=o.from);let d=["",fA(t,u)];return l&&d.push(fA(t,c.lineIndent(o.from,-1))),{changes:{from:s,to:i,insert:Kn.of(d)},range:We.cursor(s+1+d[1].length)}});return r(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function Doe(e,t){let r=-1;return e.changeByRange(n=>{let a=[];for(let i=n.from;i<=n.to;){let o=e.doc.lineAt(i);o.number>r&&(n.empty||n.to>o.from)&&(t(o,a,n),r=o.number),i=o.to+1}let s=e.changes(a);return{changes:a,range:We.range(s.mapPos(n.anchor,1),s.mapPos(n.head,1))}})}const _Wt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=Object.create(null),n=new IL(e,{overrideIndentation:s=>{let i=r[s];return i??-1}}),a=Doe(e,(s,i,o)=>{let l=Yie(n,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=fA(e,l);(c!=u||o.from<s.from+c.length)&&(r[s.from]=l,i.push({from:s.from,to:s.from+c.length,insert:u}))});return a.changes.empty||t(e.update(a,{userEvent:"indent"})),!0},KZe=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(Doe(e,(r,n)=>{n.push({from:r.from,insert:e.facet(TO)})}),{userEvent:"input.indent"})),!0),JZe=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(Doe(e,(r,n)=>{let a=/^\s*/.exec(r.text)[0];if(!a)return;let s=lf(a,e.tabSize),i=0,o=fA(e,Math.max(0,s-hx(e)));for(;i<a.length&&i<o.length&&a.charCodeAt(i)==o.charCodeAt(i);)i++;n.push({from:r.from+i,to:r.from+a.length,insert:o.slice(i)})}),{userEvent:"delete.dedent"})),!0),kWt=e=>(e.setTabFocusMode(),!0),CWt=[{key:"Ctrl-b",run:TZe,shift:jZe,preventDefault:!0},{key:"Ctrl-f",run:AZe,shift:LZe},{key:"Ctrl-p",run:NZe,shift:zZe},{key:"Ctrl-n",run:RZe,shift:UZe},{key:"Ctrl-a",run:HQt,shift:aWt},{key:"Ctrl-e",run:GQt,shift:sWt},{key:"Ctrl-d",run:HZe},{key:"Ctrl-h",run:MJ},{key:"Ctrl-k",run:fWt},{key:"Ctrl-Alt-h",run:QZe},{key:"Ctrl-o",run:gWt},{key:"Ctrl-t",run:yWt},{key:"Ctrl-v",run:$J}],TWt=[{key:"ArrowLeft",run:TZe,shift:jZe,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:jQt,shift:XQt,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:qQt,shift:rWt,preventDefault:!0},{key:"ArrowRight",run:AZe,shift:LZe,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:LQt,shift:YQt,preventDefault:!0},{mac:"Cmd-ArrowRight",run:ZQt,shift:nWt,preventDefault:!0},{key:"ArrowUp",run:NZe,shift:zZe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Rke,shift:$ke},{mac:"Ctrl-ArrowUp",run:Dke,shift:Ike},{key:"ArrowDown",run:RZe,shift:UZe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Pke,shift:Mke},{mac:"Ctrl-ArrowDown",run:$J,shift:Nke},{key:"PageUp",run:Dke,shift:Ike},{key:"PageDown",run:$J,shift:Nke},{key:"Home",run:VQt,shift:tWt,preventDefault:!0},{key:"Mod-Home",run:Rke,shift:$ke},{key:"End",run:UQt,shift:eWt,preventDefault:!0},{key:"Mod-End",run:Pke,shift:Mke},{key:"Enter",run:jke,shift:jke},{key:"Mod-a",run:iWt},{key:"Backspace",run:MJ,shift:MJ,preventDefault:!0},{key:"Delete",run:HZe,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:QZe,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:pWt,preventDefault:!0},{mac:"Mod-Backspace",run:hWt,preventDefault:!0},{mac:"Mod-Delete",run:mWt,preventDefault:!0}].concat(CWt.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),AWt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:BQt,shift:KQt},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:zQt,shift:JQt},{key:"Alt-ArrowUp",run:bWt},{key:"Shift-Alt-ArrowUp",run:xWt},{key:"Alt-ArrowDown",run:vWt},{key:"Shift-Alt-ArrowDown",run:wWt},{key:"Mod-Alt-ArrowUp",run:cWt},{key:"Mod-Alt-ArrowDown",run:uWt},{key:"Escape",run:dWt},{key:"Mod-Enter",run:OWt},{key:"Alt-l",mac:"Ctrl-l",run:oWt},{key:"Mod-i",run:lWt,preventDefault:!0},{key:"Mod-[",run:JZe},{key:"Mod-]",run:KZe},{key:"Mod-Alt-\\",run:_Wt},{key:"Shift-Mod-k",run:SWt},{key:"Shift-Mod-\\",run:WQt},{key:"Mod-/",run:bQt},{key:"Alt-A",run:xQt},{key:"Ctrl-m",mac:"Shift-Alt-m",run:kWt}].concat(TWt),DWt={key:"Tab",run:KZe,shift:JZe},Lke=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e;class hE{constructor(t,r,n=0,a=t.length,s,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(n,a),this.bufferStart=n,this.normalize=s?o=>s(Lke(o)):Lke,this.query=this.normalize(r)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return xc(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let r=$ie(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=th(t);let a=this.normalize(r);if(a.length)for(let s=0,i=n;;s++){let o=a.charCodeAt(s),l=this.match(o,i,this.bufferPos+this.bufferStart);if(s==a.length-1){if(l)return this.value=l,this;break}i==n&&s<r.length&&r.charCodeAt(s)==o&&i++}}}match(t,r,n){let a=null;for(let s=0;s<this.matches.length;s+=2){let i=this.matches[s],o=!1;this.query.charCodeAt(i)==t&&(i==this.query.length-1?a={from:this.matches[s+1],to:n}:(this.matches[s]++,o=!0)),o||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==t&&(this.query.length==1?a={from:r,to:n}:this.matches.push(1,r)),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}}typeof Symbol<"u"&&(hE.prototype[Symbol.iterator]=function(){return this});const eHe={from:-1,to:-1,match:/.*/.exec("")},Ioe="gm"+(/x/.unicode==null?"":"u");class tHe{constructor(t,r,n,a=0,s=t.length){if(this.text=t,this.to=s,this.curLine="",this.done=!1,this.value=eHe,/\\[sWDnr]|\n|\r|\[\^/.test(r))return new rHe(t,r,n,a,s);this.re=new RegExp(r,Ioe+(n?.ignoreCase?"i":"")),this.test=n?.test,this.iter=t.iter();let i=t.lineAt(a);this.curLineStart=i.from,this.matchPos=N3(t,a),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let r=this.matchPos<=this.to&&this.re.exec(this.curLine);if(r){let n=this.curLineStart+r.index,a=n+r[0].length;if(this.matchPos=N3(this.text,a+(n==a?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<a||n>this.value.to)&&(!this.test||this.test(n,a,r)))return this.value={from:n,to:a,match:r},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),t=0;else return this.done=!0,this}}}const XH=new WeakMap;class AS{constructor(t,r){this.from=t,this.text=r}get to(){return this.from+this.text.length}static get(t,r,n){let a=XH.get(t);if(!a||a.from>=n||a.to<=r){let o=new AS(r,t.sliceString(r,n));return XH.set(t,o),o}if(a.from==r&&a.to==n)return a;let{text:s,from:i}=a;return i>r&&(s=t.sliceString(r,i)+s,i=r),a.to<n&&(s+=t.sliceString(a.to,n)),XH.set(t,new AS(i,s)),new AS(r,s.slice(r-i,n-i))}}class rHe{constructor(t,r,n,a,s){this.text=t,this.to=s,this.done=!1,this.value=eHe,this.matchPos=N3(t,a),this.re=new RegExp(r,Ioe+(n?.ignoreCase?"i":"")),this.test=n?.test,this.flat=AS.get(t,a,this.chunkEnd(a+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,r=this.re.exec(this.flat.text);if(r&&!r[0]&&r.index==t&&(this.re.lastIndex=t+1,r=this.re.exec(this.flat.text)),r){let n=this.flat.from+r.index,a=n+r[0].length;if((this.flat.to>=this.to||r.index+r[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,a,r)))return this.value={from:n,to:a,match:r},this.matchPos=N3(this.text,a+(n==a?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=AS.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(tHe.prototype[Symbol.iterator]=rHe.prototype[Symbol.iterator]=function(){return this});function IWt(e){try{return new RegExp(e,Ioe),!0}catch{return!1}}function N3(e,t){if(t>=e.length)return t;let r=e.lineAt(t),n;for(;t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}function jJ(e){let t=String(e.state.doc.lineAt(e.state.selection.main.head).number),r=rs("input",{class:"cm-textfield",name:"line",value:t}),n=rs("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),e.dispatch({effects:rT.of(!1)}),e.focus()):s.keyCode==13&&(s.preventDefault(),a())},onsubmit:s=>{s.preventDefault(),a()}},rs("label",e.state.phrase("Go to line"),": ",r)," ",rs("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),rs("button",{name:"close",onclick:()=>{e.dispatch({effects:rT.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["×"]));function a(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value);if(!s)return;let{state:i}=e,o=i.doc.lineAt(i.selection.main.head),[,l,c,u,d]=s,f=u?+u.slice(1):0,h=c?+c:o.number;if(c&&d){let b=h/100;l&&(b=b*(l=="-"?-1:1)+o.number/i.doc.lines),h=Math.round(i.doc.lines*b)}else c&&l&&(h=h*(l=="-"?-1:1)+o.number);let g=i.doc.line(Math.max(1,Math.min(i.doc.lines,h))),y=We.cursor(g.from+Math.max(0,Math.min(f,g.length)));e.dispatch({effects:[rT.of(!1),bt.scrollIntoView(y.from,{y:"center"})],selection:y}),e.focus()}return{dom:n}}const rT=nn.define(),Fke=$o.define({create(){return!0},update(e,t){for(let r of t.effects)r.is(rT)&&(e=r.value);return e},provide:e=>pA.from(e,t=>t?jJ:null)}),NWt=e=>{let t=dA(e,jJ);if(!t){let r=[rT.of(!0)];e.state.field(Fke,!1)==null&&r.push(nn.appendConfig.of([Fke,RWt])),e.dispatch({effects:r}),t=dA(e,jJ)}return t&&t.dom.querySelector("input").select(),!0},RWt=bt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),PWt={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},$Wt=Xt.define({combine(e){return Hh(e,PWt,{highlightWordAroundCursor:(t,r)=>t||r,minSelectionLength:Math.min,maxMatches:Math.min})}});function MWt(e){return[zWt,BWt]}const jWt=Er.mark({class:"cm-selectionMatch"}),LWt=Er.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Bke(e,t,r,n){return(r==0||e(t.sliceDoc(r-1,r))!=Ms.Word)&&(n==t.doc.length||e(t.sliceDoc(n,n+1))!=Ms.Word)}function FWt(e,t,r,n){return e(t.sliceDoc(r,r+1))==Ms.Word&&e(t.sliceDoc(n-1,n))==Ms.Word}const BWt=fi.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet($Wt),{state:r}=e,n=r.selection;if(n.ranges.length>1)return Er.none;let a=n.main,s,i=null;if(a.empty){if(!t.highlightWordAroundCursor)return Er.none;let l=r.wordAt(a.head);if(!l)return Er.none;i=r.charCategorizer(a.head),s=r.sliceDoc(l.from,l.to)}else{let l=a.to-a.from;if(l<t.minSelectionLength||l>200)return Er.none;if(t.wholeWords){if(s=r.sliceDoc(a.from,a.to),i=r.charCategorizer(a.head),!(Bke(i,r,a.from,a.to)&&FWt(i,r,a.from,a.to)))return Er.none}else if(s=r.sliceDoc(a.from,a.to),!s)return Er.none}let o=[];for(let l of e.visibleRanges){let c=new hE(r.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:d}=c.value;if((!i||Bke(i,r,u,d))&&(a.empty&&u<=a.from&&d>=a.to?o.push(LWt.range(u,d)):(u>=a.to||d<=a.from)&&o.push(jWt.range(u,d)),o.length>t.maxMatches))return Er.none}}return Er.set(o)}},{decorations:e=>e.decorations}),zWt=bt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),UWt=({state:e,dispatch:t})=>{let{selection:r}=e,n=We.create(r.ranges.map(a=>e.wordAt(a.head)||We.cursor(a.head)),r.mainIndex);return n.eq(r)?!1:(t(e.update({selection:n})),!0)};function VWt(e,t){let{main:r,ranges:n}=e.selection,a=e.wordAt(r.head),s=a&&a.from==r.from&&a.to==r.to;for(let i=!1,o=new hE(e.doc,t,n[n.length-1].to);;)if(o.next(),o.done){if(i)return null;o=new hE(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),i=!0}else{if(i&&n.some(l=>l.from==o.value.from))continue;if(s){let l=e.wordAt(o.value.from);if(!l||l.from!=o.value.from||l.to!=o.value.to)continue}return o.value}}const qWt=({state:e,dispatch:t})=>{let{ranges:r}=e.selection;if(r.some(s=>s.from===s.to))return UWt({state:e,dispatch:t});let n=e.sliceDoc(r[0].from,r[0].to);if(e.selection.ranges.some(s=>e.sliceDoc(s.from,s.to)!=n))return!1;let a=VWt(e,n);return a?(t(e.update({selection:e.selection.addRange(We.range(a.from,a.to),!1),effects:bt.scrollIntoView(a.to)})),!0):!1},IO=Xt.define({combine(e){return Hh(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new rXt(t),scrollToMatch:t=>bt.scrollIntoView(t)})}});class nHe{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||IWt(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(r,n)=>n=="n"?`
|
|
163
|
+
}`,{label:"class",detail:"definition",type:"keyword"}),pc('import {${names}} from "${module}"\n${}',{label:"import",detail:"named",type:"keyword"}),pc('import ${name} from "${module}"\n${}',{label:"import",detail:"default",type:"keyword"})],zqe=boe.concat([pc("interface ${name} {\n ${}\n}",{label:"interface",detail:"definition",type:"keyword"}),pc("type ${name} = ${type}",{label:"type",detail:"definition",type:"keyword"}),pc("enum ${name} {\n ${}\n}",{label:"enum",detail:"definition",type:"keyword"})]),Ske=new Lze,Uqe=new Set(["Script","Block","FunctionExpression","FunctionDeclaration","ArrowFunction","MethodDeclaration","ForStatement"]);function _k(e){return(t,r)=>{let n=t.node.getChild("VariableDefinition");return n&&r(n,e),!0}}const VGt=["FunctionDeclaration"],qGt={FunctionDeclaration:_k("function"),ClassDeclaration:_k("class"),ClassExpression:()=>!0,EnumDeclaration:_k("constant"),TypeAliasDeclaration:_k("type"),NamespaceDeclaration:_k("namespace"),VariableDefinition(e,t){e.matchContext(VGt)||t(e,"variable")},TypeDefinition(e,t){t(e,"type")},__proto__:null};function Vqe(e,t){let r=Ske.get(t);if(r)return r;let n=[],a=!0;function s(i,o){let l=e.sliceString(i.from,i.to);n.push({label:l,type:o})}return t.cursor(ms.IncludeAnonymous).iterate(i=>{if(a)a=!1;else if(i.name){let o=qGt[i.name];if(o&&o(i,s)||Uqe.has(i.name))return!1}else if(i.to-i.from>8192){for(let o of Vqe(e,i.node))n.push(o);return!1}}),Ske.set(t,n),n}const A3=/^[\w$\xa1-\uffff][\w$\d\xa1-\uffff]*$/,voe=["TemplateString","String","RegExp","LineComment","BlockComment","VariableDefinition","TypeDefinition","Label","PropertyDefinition","PropertyName","PrivatePropertyDefinition","PrivatePropertyName","JSXText","JSXAttributeValue","JSXOpenTag","JSXCloseTag","JSXSelfClosingTag",".","?."];function qqe(e){let t=Ja(e.state).resolveInner(e.pos,-1);if(voe.indexOf(t.name)>-1)return null;let r=t.name=="VariableName"||t.to-t.from<20&&A3.test(e.state.sliceDoc(t.from,t.to));if(!r&&!e.explicit)return null;let n=[];for(let a=t;a;a=a.parent)Uqe.has(a.name)&&(n=n.concat(Vqe(e.state.doc,a)));return{options:n,from:r?t.from:e.pos,validFor:A3}}function UH(e,t,r){var n;let a=[];for(;;){let s=t.firstChild,i;if(s?.name=="VariableName")return a.push(e(s)),{path:a.reverse(),name:r};if(s?.name=="MemberExpression"&&((n=i=s.lastChild)===null||n===void 0?void 0:n.name)=="PropertyName")a.push(e(i)),t=s;else return null}}function Zqe(e){let t=n=>e.state.doc.sliceString(n.from,n.to),r=Ja(e.state).resolveInner(e.pos,-1);return r.name=="PropertyName"?UH(t,r.parent,t(r)):(r.name=="."||r.name=="?.")&&r.parent.name=="MemberExpression"?UH(t,r.parent,""):voe.indexOf(r.name)>-1?null:r.name=="VariableName"||r.to-r.from<20&&A3.test(t(r))?{path:[],name:t(r)}:r.name=="MemberExpression"?UH(t,r,""):e.explicit?{path:[],name:""}:null}function ZGt(e,t){let r=[],n=new Set;for(let a=0;;a++){for(let i of(Object.getOwnPropertyNames||Object.keys)(e)){if(!/^[a-zA-Z_$\xaa-\uffdc][\w$\xaa-\uffdc]*$/.test(i)||n.has(i))continue;n.add(i);let o;try{o=e[i]}catch{continue}r.push({label:i,type:typeof o=="function"?/^[A-Z]/.test(i)?"class":t?"function":"method":t?"variable":"property",boost:-a})}let s=Object.getPrototypeOf(e);if(!s)return r;e=s}}function HGt(e){let t=new Map;return r=>{let n=Zqe(r);if(!n)return null;let a=e;for(let i of n.path)if(a=a[i],!a)return null;let s=t.get(a);return s||t.set(a,s=ZGt(a,!n.path.length)),{from:r.pos-n.name.length,options:s,validFor:A3}}}const Bd=dx.define({name:"javascript",parser:UGt.configure({props:[a1.add({IfStatement:CS({except:/^\s*({|else\b)/}),TryStatement:CS({except:/^\s*({|catch\b|finally\b)/}),LabeledStatement:UVt,SwitchBody:e=>{let t=e.textAfter,r=/^\s*\}/.test(t),n=/^\s*(case|default)\b/.test(t);return e.baseIndent+(r?0:n?1:2)*e.unit},Block:zVt({closing:"}"}),ArrowFunction:e=>e.baseIndent+e.unit,"TemplateString BlockComment":()=>null,"Statement Property":CS({except:/^\s*{/}),JSXElement(e){let t=/^\s*<\//.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},JSXEscape(e){let t=/\s*\}/.test(e.textAfter);return e.lineIndent(e.node.from)+(t?0:e.unit)},"JSXOpenTag JSXSelfClosingTag"(e){return e.column(e.node.from)+e.unit}}),s1.add({"Block ClassBody SwitchBody EnumBody ObjectExpression ArrayExpression ObjectType":Jie,BlockComment(e){return{from:e.from+2,to:e.to-2}}})]}),languageData:{closeBrackets:{brackets:["(","[","{","'",'"',"`"]},commentTokens:{line:"//",block:{open:"/*",close:"*/"}},indentOnInput:/^\s*(?:case |default:|\{|\}|<\/)$/,wordChars:"$"}}),Hqe={test:e=>/^JSX/.test(e.name),facet:DL({commentTokens:{block:{open:"{/*",close:"*/}"}}})},xoe=Bd.configure({dialect:"ts"},"typescript"),woe=Bd.configure({dialect:"jsx",props:[Xie.add(e=>e.isTop?[Hqe]:void 0)]}),Soe=Bd.configure({dialect:"jsx ts",props:[Xie.add(e=>e.isTop?[Hqe]:void 0)]},"typescript");let Gqe=e=>({label:e,type:"keyword"});const Qqe="break case const continue default delete export extends false finally in instanceof let new return static super switch this throw true typeof var yield".split(" ").map(Gqe),GGt=Qqe.concat(["declare","implements","private","protected","public"].map(Gqe));function D3(e={}){let t=e.jsx?e.typescript?Soe:woe:e.typescript?xoe:Bd,r=e.typescript?zqe.concat(GGt):boe.concat(Qqe);return new fx(t,[Bd.data.of({autocomplete:Cqt(voe,UVe(r))}),Bd.data.of({autocomplete:qqe}),e.jsx?Wqe:[]])}function QGt(e){for(;;){if(e.name=="JSXOpenTag"||e.name=="JSXSelfClosingTag"||e.name=="JSXFragmentTag")return e;if(e.name=="JSXEscape"||!e.parent)return null;e=e.parent}}function Eke(e,t,r=e.length){for(let n=t?.firstChild;n;n=n.nextSibling)if(n.name=="JSXIdentifier"||n.name=="JSXBuiltin"||n.name=="JSXNamespacedName"||n.name=="JSXMemberExpression")return e.sliceString(n.from,Math.min(n.to,r));return""}const WGt=typeof navigator=="object"&&/Android\b/.test(navigator.userAgent),Wqe=bt.inputHandler.of((e,t,r,n,a)=>{if((WGt?e.composing:e.compositionStarted)||e.state.readOnly||t!=r||n!=">"&&n!="/"||!Bd.isActiveAt(e.state,t,-1))return!1;let s=a(),{state:i}=s,o=i.changeByRange(l=>{var c;let{head:u}=l,d=Ja(i).resolveInner(u-1,-1),f;if(d.name=="JSXStartTag"&&(d=d.parent),!(i.doc.sliceString(u-1,u)!=n||d.name=="JSXAttributeValue"&&d.to>u)){if(n==">"&&d.name=="JSXFragmentTag")return{range:l,changes:{from:u,insert:"</>"}};if(n=="/"&&d.name=="JSXStartCloseTag"){let h=d.parent,g=h.parent;if(g&&h.from==u-2&&((f=Eke(i.doc,g.firstChild,u))||((c=g.firstChild)===null||c===void 0?void 0:c.name)=="JSXFragmentTag")){let y=`${f}>`;return{range:We.cursor(u+y.length,-1),changes:{from:u,insert:y}}}}else if(n==">"){let h=QGt(d);if(h&&h.name=="JSXOpenTag"&&!/^\/?>|^<\//.test(i.doc.sliceString(u,u+2))&&(f=Eke(i.doc,h,u)))return{range:l,changes:{from:u,insert:`</${f}>`}}}}return{range:l}});return o.changes.empty?!1:(e.dispatch([s,i.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)});function XGt(e,t){return t||(t={parserOptions:{ecmaVersion:2019,sourceType:"module"},env:{browser:!0,node:!0,es6:!0,es2015:!0,es2017:!0,es2020:!0},rules:{}},e.getRules().forEach((r,n)=>{var a;!((a=r.meta.docs)===null||a===void 0)&&a.recommended&&(t.rules[n]=2)})),r=>{let{state:n}=r,a=[];for(let{from:s,to:i}of Bd.findRegions(n)){let o=n.doc.lineAt(s),l={line:o.number-1,col:s-o.from,pos:s};for(let c of e.verify(n.sliceDoc(s,i),t))a.push(YGt(c,n.doc,l))}return a}}function Oke(e,t,r,n){return r.line(e+n.line).from+t+(e==1?n.col-1:-1)}function YGt(e,t,r){let n=Oke(e.line,e.column,t,r),a={from:n,to:e.endLine!=null&&e.endColumn!=1?Oke(e.endLine,e.endColumn,t,r):n,message:e.message,source:e.ruleId?"eslint:"+e.ruleId:"eslint",severity:e.severity==1?"warning":"error"};if(e.fix){let{range:s,text:i}=e.fix,o=s[0]+r.pos-n,l=s[1]+r.pos-n;a.actions=[{name:"fix",apply(c,u){c.dispatch({changes:{from:u+o,to:u+l,insert:i},scrollIntoView:!0})}}]}return a}const i2=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:Wqe,completionPath:Zqe,esLint:XGt,javascript:D3,javascriptLanguage:Bd,jsxLanguage:woe,localCompletionSource:qqe,scopeCompletionSource:HGt,snippets:boe,tsxLanguage:Soe,typescriptLanguage:xoe,typescriptSnippets:zqe},Symbol.toStringTag,{value:"Module"})),kk=["_blank","_self","_top","_parent"],VH=["ascii","utf-8","utf-16","latin1","latin1"],qH=["get","post","put","delete"],ZH=["application/x-www-form-urlencoded","multipart/form-data","text/plain"],hu=["true","false"],br={},KGt={a:{attrs:{href:null,ping:null,type:null,media:null,target:kk,hreflang:null}},abbr:br,address:br,area:{attrs:{alt:null,coords:null,href:null,target:null,ping:null,media:null,hreflang:null,type:null,shape:["default","rect","circle","poly"]}},article:br,aside:br,audio:{attrs:{src:null,mediagroup:null,crossorigin:["anonymous","use-credentials"],preload:["none","metadata","auto"],autoplay:["autoplay"],loop:["loop"],controls:["controls"]}},b:br,base:{attrs:{href:null,target:kk}},bdi:br,bdo:br,blockquote:{attrs:{cite:null}},body:br,br,button:{attrs:{form:null,formaction:null,name:null,value:null,autofocus:["autofocus"],disabled:["autofocus"],formenctype:ZH,formmethod:qH,formnovalidate:["novalidate"],formtarget:kk,type:["submit","reset","button"]}},canvas:{attrs:{width:null,height:null}},caption:br,center:br,cite:br,code:br,col:{attrs:{span:null}},colgroup:{attrs:{span:null}},command:{attrs:{type:["command","checkbox","radio"],label:null,icon:null,radiogroup:null,command:null,title:null,disabled:["disabled"],checked:["checked"]}},data:{attrs:{value:null}},datagrid:{attrs:{disabled:["disabled"],multiple:["multiple"]}},datalist:{attrs:{data:null}},dd:br,del:{attrs:{cite:null,datetime:null}},details:{attrs:{open:["open"]}},dfn:br,div:br,dl:br,dt:br,em:br,embed:{attrs:{src:null,type:null,width:null,height:null}},eventsource:{attrs:{src:null}},fieldset:{attrs:{disabled:["disabled"],form:null,name:null}},figcaption:br,figure:br,footer:br,form:{attrs:{action:null,name:null,"accept-charset":VH,autocomplete:["on","off"],enctype:ZH,method:qH,novalidate:["novalidate"],target:kk}},h1:br,h2:br,h3:br,h4:br,h5:br,h6:br,head:{children:["title","base","link","style","meta","script","noscript","command"]},header:br,hgroup:br,hr:br,html:{attrs:{manifest:null}},i:br,iframe:{attrs:{src:null,srcdoc:null,name:null,width:null,height:null,sandbox:["allow-top-navigation","allow-same-origin","allow-forms","allow-scripts"],seamless:["seamless"]}},img:{attrs:{alt:null,src:null,ismap:null,usemap:null,width:null,height:null,crossorigin:["anonymous","use-credentials"]}},input:{attrs:{alt:null,dirname:null,form:null,formaction:null,height:null,list:null,max:null,maxlength:null,min:null,name:null,pattern:null,placeholder:null,size:null,src:null,step:null,value:null,width:null,accept:["audio/*","video/*","image/*"],autocomplete:["on","off"],autofocus:["autofocus"],checked:["checked"],disabled:["disabled"],formenctype:ZH,formmethod:qH,formnovalidate:["novalidate"],formtarget:kk,multiple:["multiple"],readonly:["readonly"],required:["required"],type:["hidden","text","search","tel","url","email","password","datetime","date","month","week","time","datetime-local","number","range","color","checkbox","radio","file","submit","image","reset","button"]}},ins:{attrs:{cite:null,datetime:null}},kbd:br,keygen:{attrs:{challenge:null,form:null,name:null,autofocus:["autofocus"],disabled:["disabled"],keytype:["RSA"]}},label:{attrs:{for:null,form:null}},legend:br,li:{attrs:{value:null}},link:{attrs:{href:null,type:null,hreflang:null,media:null,sizes:["all","16x16","16x16 32x32","16x16 32x32 64x64"]}},map:{attrs:{name:null}},mark:br,menu:{attrs:{label:null,type:["list","context","toolbar"]}},meta:{attrs:{content:null,charset:VH,name:["viewport","application-name","author","description","generator","keywords"],"http-equiv":["content-language","content-type","default-style","refresh"]}},meter:{attrs:{value:null,min:null,low:null,high:null,max:null,optimum:null}},nav:br,noscript:br,object:{attrs:{data:null,type:null,name:null,usemap:null,form:null,width:null,height:null,typemustmatch:["typemustmatch"]}},ol:{attrs:{reversed:["reversed"],start:null,type:["1","a","A","i","I"]},children:["li","script","template","ul","ol"]},optgroup:{attrs:{disabled:["disabled"],label:null}},option:{attrs:{disabled:["disabled"],label:null,selected:["selected"],value:null}},output:{attrs:{for:null,form:null,name:null}},p:br,param:{attrs:{name:null,value:null}},pre:br,progress:{attrs:{value:null,max:null}},q:{attrs:{cite:null}},rp:br,rt:br,ruby:br,samp:br,script:{attrs:{type:["text/javascript"],src:null,async:["async"],defer:["defer"],charset:VH}},section:br,select:{attrs:{form:null,name:null,size:null,autofocus:["autofocus"],disabled:["disabled"],multiple:["multiple"]}},slot:{attrs:{name:null}},small:br,source:{attrs:{src:null,type:null,media:null}},span:br,strong:br,style:{attrs:{type:["text/css"],media:null,scoped:null}},sub:br,summary:br,sup:br,table:br,tbody:br,td:{attrs:{colspan:null,rowspan:null,headers:null}},template:br,textarea:{attrs:{dirname:null,form:null,maxlength:null,name:null,placeholder:null,rows:null,cols:null,autofocus:["autofocus"],disabled:["disabled"],readonly:["readonly"],required:["required"],wrap:["soft","hard"]}},tfoot:br,th:{attrs:{colspan:null,rowspan:null,headers:null,scope:["row","col","rowgroup","colgroup"]}},thead:br,time:{attrs:{datetime:null}},title:br,tr:br,track:{attrs:{src:null,label:null,default:null,kind:["subtitles","captions","descriptions","chapters","metadata"],srclang:null}},ul:{children:["li","script","template","ul","ol"]},var:br,video:{attrs:{src:null,poster:null,width:null,height:null,crossorigin:["anonymous","use-credentials"],preload:["auto","metadata","none"],autoplay:["autoplay"],mediagroup:["movie"],muted:["muted"],controls:["controls"]}},wbr:br},Xqe={accesskey:null,class:null,contenteditable:hu,contextmenu:null,dir:["ltr","rtl","auto"],draggable:["true","false","auto"],dropzone:["copy","move","link","string:","file:"],hidden:["hidden"],id:null,inert:["inert"],itemid:null,itemprop:null,itemref:null,itemscope:["itemscope"],itemtype:null,lang:["ar","bn","de","en-GB","en-US","es","fr","hi","id","ja","pa","pt","ru","tr","zh"],spellcheck:hu,autocorrect:hu,autocapitalize:hu,style:null,tabindex:null,title:null,translate:["yes","no"],rel:["stylesheet","alternate","author","bookmark","help","license","next","nofollow","noreferrer","prefetch","prev","search","tag"],role:"alert application article banner button cell checkbox complementary contentinfo dialog document feed figure form grid gridcell heading img list listbox listitem main navigation region row rowgroup search switch tab table tabpanel textbox timer".split(" "),"aria-activedescendant":null,"aria-atomic":hu,"aria-autocomplete":["inline","list","both","none"],"aria-busy":hu,"aria-checked":["true","false","mixed","undefined"],"aria-controls":null,"aria-describedby":null,"aria-disabled":hu,"aria-dropeffect":null,"aria-expanded":["true","false","undefined"],"aria-flowto":null,"aria-grabbed":["true","false","undefined"],"aria-haspopup":hu,"aria-hidden":hu,"aria-invalid":["true","false","grammar","spelling"],"aria-label":null,"aria-labelledby":null,"aria-level":null,"aria-live":["off","polite","assertive"],"aria-multiline":hu,"aria-multiselectable":hu,"aria-owns":null,"aria-posinset":null,"aria-pressed":["true","false","mixed","undefined"],"aria-readonly":hu,"aria-relevant":null,"aria-required":hu,"aria-selected":["true","false","undefined"],"aria-setsize":null,"aria-sort":["ascending","descending","none","other"],"aria-valuemax":null,"aria-valuemin":null,"aria-valuenow":null,"aria-valuetext":null},Yqe="beforeunload copy cut dragstart dragover dragleave dragenter dragend drag paste focus blur change click load mousedown mouseenter mouseleave mouseup keydown keyup resize scroll unload".split(" ").map(e=>"on"+e);for(let e of Yqe)Xqe[e]=null;let SA=class{constructor(t,r){this.tags={...KGt,...t},this.globalAttrs={...Xqe,...r},this.allTags=Object.keys(this.tags),this.globalAttrNames=Object.keys(this.globalAttrs)}};SA.default=new SA;function pE(e,t,r=e.length){if(!t)return"";let n=t.firstChild,a=n&&n.getChild("TagName");return a?e.sliceString(a.from,Math.min(a.to,r)):""}function fE(e,t=!1){for(;e;e=e.parent)if(e.name=="Element")if(t)t=!1;else return e;return null}function Kqe(e,t,r){let n=r.tags[pE(e,fE(t))];return n?.children||r.allTags}function Eoe(e,t){let r=[];for(let n=fE(t);n&&!n.type.isTop;n=fE(n.parent)){let a=pE(e,n);if(a&&n.lastChild.name=="CloseTag")break;a&&r.indexOf(a)<0&&(t.name=="EndTag"||t.from>=n.firstChild.to)&&r.push(a)}return r}const Jqe=/^[:\-\.\w\u00b7-\uffff]*$/;function _ke(e,t,r,n,a){let s=/\s*>/.test(e.sliceDoc(a,a+5))?"":">",i=fE(r,r.name=="StartTag"||r.name=="TagName");return{from:n,to:a,options:Kqe(e.doc,i,t).map(o=>({label:o,type:"type"})).concat(Eoe(e.doc,r).map((o,l)=>({label:"/"+o,apply:"/"+o+s,type:"type",boost:99-l}))),validFor:/^\/?[:\-\.\w\u00b7-\uffff]*$/}}function kke(e,t,r,n){let a=/\s*>/.test(e.sliceDoc(n,n+5))?"":">";return{from:r,to:n,options:Eoe(e.doc,t).map((s,i)=>({label:s,apply:s+a,type:"type",boost:99-i})),validFor:Jqe}}function JGt(e,t,r,n){let a=[],s=0;for(let i of Kqe(e.doc,r,t))a.push({label:"<"+i,type:"type"});for(let i of Eoe(e.doc,r))a.push({label:"</"+i+">",type:"type",boost:99-s++});return{from:n,to:n,options:a,validFor:/^<\/?[:\-\.\w\u00b7-\uffff]*$/}}function eQt(e,t,r,n,a){let s=fE(r),i=s?t.tags[pE(e.doc,s)]:null,o=i&&i.attrs?Object.keys(i.attrs):[],l=i&&i.globalAttrs===!1?o:o.length?o.concat(t.globalAttrNames):t.globalAttrNames;return{from:n,to:a,options:l.map(c=>({label:c,type:"property"})),validFor:Jqe}}function tQt(e,t,r,n,a){var s;let i=(s=r.parent)===null||s===void 0?void 0:s.getChild("AttributeName"),o=[],l;if(i){let c=e.sliceDoc(i.from,i.to),u=t.globalAttrs[c];if(!u){let d=fE(r),f=d?t.tags[pE(e.doc,d)]:null;u=f?.attrs&&f.attrs[c]}if(u){let d=e.sliceDoc(n,a).toLowerCase(),f='"',h='"';/^['"]/.test(d)?(l=d[0]=='"'?/^[^"]*$/:/^[^']*$/,f="",h=e.sliceDoc(a,a+1)==d[0]?"":d[0],d=d.slice(1),n++):l=/^[^\s<>='"]*$/;for(let g of u)o.push({label:g,apply:f+g+h,type:"constant"})}}return{from:n,to:a,options:o,validFor:l}}function eZe(e,t){let{state:r,pos:n}=t,a=Ja(r).resolveInner(n,-1),s=a.resolve(n);for(let i=n,o;s==a&&(o=a.childBefore(i));){let l=o.lastChild;if(!l||!l.type.isError||l.from<l.to)break;s=a=o,i=l.from}return a.name=="TagName"?a.parent&&/CloseTag$/.test(a.parent.name)?kke(r,a,a.from,n):_ke(r,e,a,a.from,n):a.name=="StartTag"||a.name=="IncompleteTag"?_ke(r,e,a,n,n):a.name=="StartCloseTag"||a.name=="IncompleteCloseTag"?kke(r,a,n,n):a.name=="OpenTag"||a.name=="SelfClosingTag"||a.name=="AttributeName"?eQt(r,e,a,a.name=="AttributeName"?a.from:n,n):a.name=="Is"||a.name=="AttributeValue"||a.name=="UnquotedAttributeValue"?tQt(r,e,a,a.name=="Is"?n:a.from,n):t.explicit&&(s.name=="Element"||s.name=="Text"||s.name=="Document")?JGt(r,e,a,n):null}function tZe(e){return eZe(SA.default,e)}function rZe(e){let{extraTags:t,extraGlobalAttributes:r}=e,n=r||t?new SA(t,r):SA.default;return a=>eZe(n,a)}const rQt=Bd.parser.configure({top:"SingleExpression"}),nZe=[{tag:"script",attrs:e=>e.type=="text/typescript"||e.lang=="ts",parser:xoe.parser},{tag:"script",attrs:e=>e.type=="text/babel"||e.type=="text/jsx",parser:woe.parser},{tag:"script",attrs:e=>e.type=="text/typescript-jsx",parser:Soe.parser},{tag:"script",attrs(e){return/^(importmap|speculationrules|application\/(.+\+)?json)$/i.test(e.type)},parser:rQt},{tag:"script",attrs(e){return!e.type||/^(?:text|application)\/(?:x-)?(?:java|ecma)script$|^module$|^$/i.test(e.type)},parser:Bd.parser},{tag:"style",attrs(e){return(!e.lang||e.lang=="css")&&(!e.type||/^(text\/)?(x-)?(stylesheet|css)$/i.test(e.type))},parser:wA.parser}],aZe=[{name:"style",parser:wA.parser.configure({top:"Styles"})}].concat(Yqe.map(e=>({name:e,parser:Bd.parser}))),sZe=dx.define({name:"html",parser:IHt.configure({props:[a1.add({Element(e){let t=/^(\s*)(<\/)?/.exec(e.textAfter);return e.node.to<=e.pos+t[0].length?e.continue():e.lineIndent(e.node.from)+(t[2]?0:e.unit)},"OpenTag CloseTag SelfClosingTag"(e){return e.column(e.node.from)+e.unit},Document(e){if(e.pos+/\s*/.exec(e.textAfter)[0].length<e.node.to)return e.continue();let t=null,r;for(let n=e.node;;){let a=n.lastChild;if(!a||a.name!="Element"||a.to!=n.to)break;t=n=a}return t&&!((r=t.lastChild)&&(r.name=="CloseTag"||r.name=="SelfClosingTag"))?e.lineIndent(t.from)+e.unit:null}}),s1.add({Element(e){let t=e.firstChild,r=e.lastChild;return!t||t.name!="OpenTag"?null:{from:t.to,to:r.name=="CloseTag"?r.from:e.to}}}),PVe.add({"OpenTag CloseTag":e=>e.getChild("TagName")})]}),languageData:{commentTokens:{block:{open:"<!--",close:"-->"}},indentOnInput:/^\s*<\/\w+\W$/,wordChars:"-_"}}),tT=sZe.configure({wrap:Iqe(nZe,aZe)});function iZe(e={}){let t="",r;e.matchClosingTags===!1&&(t="noMatch"),e.selfClosingTags===!0&&(t=(t?t+" ":"")+"selfClosing"),(e.nestedLanguages&&e.nestedLanguages.length||e.nestedAttributes&&e.nestedAttributes.length)&&(r=Iqe((e.nestedLanguages||[]).concat(nZe),(e.nestedAttributes||[]).concat(aZe)));let n=r?sZe.configure({wrap:r,dialect:t}):t?tT.configure({dialect:t}):tT;return new fx(n,[tT.data.of({autocomplete:rZe(e)}),e.autoCloseTags!==!1?oZe:[],D3().support,Fqe().support])}const Cke=new Set("area base br col command embed frame hr img input keygen link meta param source track wbr menuitem".split(" ")),oZe=bt.inputHandler.of((e,t,r,n,a)=>{if(e.composing||e.state.readOnly||t!=r||n!=">"&&n!="/"||!tT.isActiveAt(e.state,t,-1))return!1;let s=a(),{state:i}=s,o=i.changeByRange(l=>{var c,u,d;let f=i.doc.sliceString(l.from-1,l.to)==n,{head:h}=l,g=Ja(i).resolveInner(h,-1),y;if(f&&n==">"&&g.name=="EndTag"){let b=g.parent;if(((u=(c=b.parent)===null||c===void 0?void 0:c.lastChild)===null||u===void 0?void 0:u.name)!="CloseTag"&&(y=pE(i.doc,b.parent,h))&&!Cke.has(y)){let w=h+(i.doc.sliceString(h,h+1)===">"?1:0),x=`</${y}>`;return{range:l,changes:{from:h,to:w,insert:x}}}}else if(f&&n=="/"&&g.name=="IncompleteCloseTag"){let b=g.parent;if(g.from==h-2&&((d=b.lastChild)===null||d===void 0?void 0:d.name)!="CloseTag"&&(y=pE(i.doc,b,h))&&!Cke.has(y)){let w=h+(i.doc.sliceString(h,h+1)===">"?1:0),x=`${y}>`;return{range:We.cursor(h+x.length,-1),changes:{from:h,to:w,insert:x}}}}return{range:l}});return o.changes.empty?!1:(e.dispatch([s,i.update(o,{userEvent:"input.complete",scrollIntoView:!0})]),!0)}),nQt=Object.freeze(Object.defineProperty({__proto__:null,autoCloseTags:oZe,html:iZe,htmlCompletionSource:tZe,htmlCompletionSourceWith:rZe,htmlLanguage:tT},Symbol.toStringTag,{value:"Module"})),lZe=DL({commentTokens:{block:{open:"<!--",close:"-->"}}}),cZe=new Xr,uZe=RZt.configure({props:[s1.add(e=>!e.is("Block")||e.is("Document")||NJ(e)!=null||aQt(e)?void 0:(t,r)=>({from:r.doc.lineAt(t.from).to,to:t.to})),cZe.add(NJ),a1.add({Document:()=>null}),rb.add({Document:lZe})]});function NJ(e){let t=/^(?:ATX|Setext)Heading(\d)$/.exec(e.name);return t?+t[1]:void 0}function aQt(e){return e.name=="OrderedList"||e.name=="BulletList"}function sQt(e,t){let r=e;for(;;){let n=r.nextSibling,a;if(!n||(a=NJ(n.type))!=null&&a<=t)break;r=n}return r.to}const iQt=SVe.of((e,t,r)=>{for(let n=Ja(e).resolveInner(r,-1);n&&!(n.from<t);n=n.parent){let a=n.type.prop(cZe);if(a==null)continue;let s=sQt(n,a);if(s>r)return{from:r,to:s}}return null});function Ooe(e){return new Nu(lZe,e,[],"markdown")}const dZe=Ooe(uZe),oQt=uZe.configure([qZt,HZt,ZZt,GZt,{props:[s1.add({Table:(e,t)=>({from:t.doc.lineAt(e.from).to,to:e.to})})]}]),gx=Ooe(oQt);function lQt(e,t){return r=>{if(r&&e){let n=null;if(r=/\S*/.exec(r)[0],typeof e=="function"?n=e(r):n=Le.matchLanguageName(e,r,!0),n instanceof Le)return n.support?n.support.language.parser:px.getSkippingParser(n.load());if(n)return n.parser}return t?t.parser:null}}class HH{constructor(t,r,n,a,s,i,o){this.node=t,this.from=r,this.to=n,this.spaceBefore=a,this.spaceAfter=s,this.type=i,this.item=o}blank(t,r=!0){let n=this.spaceBefore+(this.node.name=="Blockquote"?">":"");if(t!=null){for(;n.length<t;)n+=" ";return n}else{for(let a=this.to-this.from-n.length-this.spaceAfter.length;a>0;a--)n+=" ";return n+(r?this.spaceAfter:"")}}marker(t,r){let n=this.node.name=="OrderedList"?String(+fZe(this.item,t)[2]+r):"";return this.spaceBefore+n+this.type+this.spaceAfter}}function pZe(e,t){let r=[],n=[];for(let a=e;a;a=a.parent){if(a.name=="FencedCode")return n;(a.name=="ListItem"||a.name=="Blockquote")&&r.push(a)}for(let a=r.length-1;a>=0;a--){let s=r[a],i,o=t.lineAt(s.from),l=s.from-o.from;if(s.name=="Blockquote"&&(i=/^ *>( ?)/.exec(o.text.slice(l))))n.push(new HH(s,l,l+i[0].length,"",i[1],">",null));else if(s.name=="ListItem"&&s.parent.name=="OrderedList"&&(i=/^( *)\d+([.)])( *)/.exec(o.text.slice(l)))){let c=i[3],u=i[0].length;c.length>=4&&(c=c.slice(0,c.length-4),u-=4),n.push(new HH(s.parent,l,l+u,i[1],c,i[2],s))}else if(s.name=="ListItem"&&s.parent.name=="BulletList"&&(i=/^( *)([-+*])( {1,4}\[[ xX]\])?( +)/.exec(o.text.slice(l)))){let c=i[4],u=i[0].length;c.length>4&&(c=c.slice(0,c.length-4),u-=4);let d=i[2];i[3]&&(d+=i[3].replace(/[xX]/," ")),n.push(new HH(s.parent,l,l+u,i[1],c,d,s))}}return n}function fZe(e,t){return/^(\s*)(\d+)(?=[.)])/.exec(t.sliceString(e.from,e.from+10))}function GH(e,t,r,n=0){for(let a=-1,s=e;;){if(s.name=="ListItem"){let o=fZe(s,t),l=+o[2];if(a>=0){if(l!=a+1)return;r.push({from:s.from+o[1].length,to:s.from+o[0].length,insert:String(a+2+n)})}a=l}let i=s.nextSibling;if(!i)break;s=i}}function _oe(e,t){let r=/^[ \t]*/.exec(e)[0].length;if(!r||t.facet(TO)!=" ")return e;let n=lf(e,4,r),a="";for(let s=n;s>0;)s>=4?(a+=" ",s-=4):(a+=" ",s--);return a+e.slice(r)}const hZe=(e={})=>({state:t,dispatch:r})=>{let n=Ja(t),{doc:a}=t,s=null,i=t.changeByRange(o=>{if(!o.empty||!gx.isActiveAt(t,o.from,-1)&&!gx.isActiveAt(t,o.from,1))return s={range:o};let l=o.from,c=a.lineAt(l),u=pZe(n.resolveInner(l,-1),a);for(;u.length&&u[u.length-1].from>l-c.from;)u.pop();if(!u.length)return s={range:o};let d=u[u.length-1];if(d.to-d.spaceAfter.length>l-c.from)return s={range:o};let f=l>=d.to-d.spaceAfter.length&&!/\S/.test(c.text.slice(d.to));if(d.item&&f){let w=d.node.firstChild,x=d.node.getChild("ListItem","ListItem");if(w.to>=l||x&&x.to<l||c.from>0&&!/[^\s>]/.test(a.lineAt(c.from-1).text)||e.nonTightLists===!1){let S=u.length>1?u[u.length-2]:null,E,C="";S&&S.item?(E=c.from+S.from,C=S.marker(a,1)):E=c.from+(S?S.to:0);let k=[{from:E,to:l,insert:C}];return d.node.name=="OrderedList"&&GH(d.item,a,k,-2),S&&S.node.name=="OrderedList"&&GH(S.item,a,k),{range:We.cursor(E+C.length),changes:k}}else{let S=Ake(u,t,c);return{range:We.cursor(l+S.length+1),changes:{from:c.from,insert:S+t.lineBreak}}}}if(d.node.name=="Blockquote"&&f&&c.from){let w=a.lineAt(c.from-1),x=/>\s*$/.exec(w.text);if(x&&x.index==d.from){let S=t.changes([{from:w.from+x.index,to:w.to},{from:c.from+d.from,to:c.to}]);return{range:o.map(S),changes:S}}}let h=[];d.node.name=="OrderedList"&&GH(d.item,a,h);let g=d.item&&d.item.from<c.from,y="";if(!g||/^[\s\d.)\-+*>]*/.exec(c.text)[0].length>=d.to)for(let w=0,x=u.length-1;w<=x;w++)y+=w==x&&!g?u[w].marker(a,1):u[w].blank(w<x?lf(c.text,4,u[w+1].from)-y.length:null);let b=l;for(;b>c.from&&/\s/.test(c.text.charAt(b-c.from-1));)b--;return y=_oe(y,t),cQt(d.node,t.doc)&&(y=Ake(u,t,c)+t.lineBreak+y),h.push({from:b,to:l,insert:t.lineBreak+y}),{range:We.cursor(b+y.length+1),changes:h}});return s?!1:(r(t.update(i,{scrollIntoView:!0,userEvent:"input"})),!0)},mZe=hZe();function Tke(e){return e.name=="QuoteMark"||e.name=="ListMark"}function cQt(e,t){if(e.name!="OrderedList"&&e.name!="BulletList")return!1;let r=e.firstChild,n=e.getChild("ListItem","ListItem");if(!n)return!1;let a=t.lineAt(r.to),s=t.lineAt(n.from),i=/^[\s>]*$/.test(a.text);return a.number+(i?0:1)<s.number}function Ake(e,t,r){let n="";for(let a=0,s=e.length-2;a<=s;a++)n+=e[a].blank(a<s?lf(r.text,4,e[a+1].from)-n.length:null,a<s);return _oe(n,t)}function uQt(e,t){let r=e.resolveInner(t,-1),n=t;Tke(r)&&(n=r.from,r=r.parent);for(let a;a=r.childBefore(n);)if(Tke(a))n=a.from;else if(a.name=="OrderedList"||a.name=="BulletList")r=a.lastChild,n=r.to;else break;return r}const gZe=({state:e,dispatch:t})=>{let r=Ja(e),n=null,a=e.changeByRange(s=>{let i=s.from,{doc:o}=e;if(s.empty&&gx.isActiveAt(e,s.from)){let l=o.lineAt(i),c=pZe(uQt(r,i),o);if(c.length){let u=c[c.length-1],d=u.to-u.spaceAfter.length+(u.spaceAfter?1:0);if(i-l.from>d&&!/\S/.test(l.text.slice(d,i-l.from)))return{range:We.cursor(l.from+d),changes:{from:l.from+d,to:i}};if(i-l.from==d&&(!u.item||l.from<=u.item.from||!/\S/.test(l.text.slice(0,u.to)))){let f=l.from+u.from;if(u.item&&u.node.from<u.item.from&&/\S/.test(l.text.slice(u.from,u.to))){let h=u.blank(lf(l.text,4,u.to)-lf(l.text,4,u.from));return f==l.from&&(h=_oe(h,e)),{range:We.cursor(f+h.length),changes:{from:f,to:l.from+u.to,insert:h}}}if(f<i)return{range:We.cursor(f),changes:{from:f,to:i}}}}}return n={range:s}});return n?!1:(t(e.update(a,{scrollIntoView:!0,userEvent:"delete"})),!0)},yZe=[{key:"Enter",run:mZe},{key:"Backspace",run:gZe}],bZe=iZe({matchClosingTags:!1});function koe(e={}){let{codeLanguages:t,defaultCodeLanguage:r,addKeymap:n=!0,base:{parser:a}=dZe,completeHTMLTags:s=!0,pasteURLAsLink:i=!0,htmlTagLanguage:o=bZe}=e;if(!(a instanceof $L))throw new RangeError("Base parser provided to `markdown` should be a Markdown parser");let l=e.extensions?[e.extensions]:[],c=[o.support,iQt],u;i&&c.push(vZe),r instanceof fx?(c.push(r.support),u=r.language):r&&(u=r);let d=t||u?lQt(t,u):void 0;l.push($Zt({codeParser:d,htmlParser:o.language.parser})),n&&c.push(Dg.high(CO.of(yZe)));let f=Ooe(a.configure(l));return s&&c.push(f.data.of({autocomplete:dQt})),new fx(f,c)}function dQt(e){let{state:t,pos:r}=e,n=/<[:\-\.\w\u00b7-\uffff]*$/.exec(t.sliceDoc(r-25,r));if(!n)return null;let a=Ja(t).resolveInner(r,-1);for(;a&&!a.type.isTop;){if(a.name=="CodeBlock"||a.name=="FencedCode"||a.name=="ProcessingInstructionBlock"||a.name=="CommentBlock"||a.name=="Link"||a.name=="Image")return null;a=a.parent}return{from:r-n[0].length,to:r,options:pQt(),validFor:/^<[:\-\.\w\u00b7-\uffff]*$/}}let QH=null;function pQt(){if(QH)return QH;let e=tZe(new noe(Zn.create({extensions:bZe}),0,!0));return QH=e?e.options:[]}const fQt=/code|horizontalrule|html|link|comment|processing|escape|entity|image|mark|url/i,vZe=bt.domEventHandlers({paste:(e,t)=>{var r;let{main:n}=t.state.selection;if(n.empty)return!1;let a=(r=e.clipboardData)===null||r===void 0?void 0:r.getData("text/plain");if(!a||!/^(https?:\/\/|mailto:|xmpp:|www\.)/.test(a)||(/^www\./.test(a)&&(a="https://"+a),!gx.isActiveAt(t.state,n.from,1)))return!1;let s=Ja(t.state),i=!1;return s.iterate({from:n.from,to:n.to,enter:o=>{(o.from>n.from||fQt.test(o.name))&&(i=!0)},leave:o=>{o.to<n.to&&(i=!0)}}),i?!1:(t.dispatch({changes:[{from:n.from,insert:"["},{from:n.to,insert:`](${a})`}],userEvent:"input.paste",scrollIntoView:!0}),!0)}}),hQt=Object.freeze(Object.defineProperty({__proto__:null,commonmarkLanguage:dZe,deleteMarkupBackward:gZe,insertNewlineContinueMarkup:mZe,insertNewlineContinueMarkupCommand:hZe,markdown:koe,markdownKeymap:yZe,markdownLanguage:gx,pasteURLAsLink:vZe},Symbol.toStringTag,{value:"Module"}));function ct(e){return new fx(eoe.define(e))}function Sy(e){return Fe(()=>import("./index-B1Qtw4Lj.js"),__vite__mapDeps([0,1]),import.meta.url).then(t=>t.sql({dialect:t[e]}))}const xZe=[Le.of({name:"C",extensions:["c","h","ino"],load(){return Fe(()=>import("./index-BceWItRu.js"),__vite__mapDeps([2,1]),import.meta.url).then(e=>e.cpp())}}),Le.of({name:"C++",alias:["cpp"],extensions:["cpp","c++","cc","cxx","hpp","h++","hh","hxx"],load(){return Fe(()=>import("./index-BceWItRu.js"),__vite__mapDeps([2,1]),import.meta.url).then(e=>e.cpp())}}),Le.of({name:"CQL",alias:["cassandra"],extensions:["cql"],load(){return Sy("Cassandra")}}),Le.of({name:"CSS",extensions:["css"],load(){return Fe(()=>Promise.resolve().then(()=>dGt),void 0,import.meta.url).then(e=>e.css())}}),Le.of({name:"Go",extensions:["go"],load(){return Fe(()=>import("./index-DcT1YIno.js"),__vite__mapDeps([3,1]),import.meta.url).then(e=>e.go())}}),Le.of({name:"HTML",alias:["xhtml"],extensions:["html","htm","handlebars","hbs"],load(){return Fe(()=>Promise.resolve().then(()=>nQt),void 0,import.meta.url).then(e=>e.html())}}),Le.of({name:"Java",extensions:["java"],load(){return Fe(()=>import("./index-CikqFwBO.js"),__vite__mapDeps([4,1]),import.meta.url).then(e=>e.java())}}),Le.of({name:"JavaScript",alias:["ecmascript","js","node"],extensions:["js","mjs","cjs"],load(){return Fe(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url).then(e=>e.javascript())}}),Le.of({name:"Jinja",extensions:["j2","jinja","jinja2"],load(){return Fe(()=>import("./index-C69KpY5X.js"),__vite__mapDeps([5,1]),import.meta.url).then(e=>e.jinja())}}),Le.of({name:"JSON",alias:["json5"],extensions:["json","map"],load(){return Fe(()=>Promise.resolve().then(()=>_qt),void 0,import.meta.url).then(e=>e.json())}}),Le.of({name:"JSX",extensions:["jsx"],load(){return Fe(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url).then(e=>e.javascript({jsx:!0}))}}),Le.of({name:"LESS",extensions:["less"],load(){return Fe(()=>import("./index-DPafMKjV.js"),__vite__mapDeps([6,1]),import.meta.url).then(e=>e.less())}}),Le.of({name:"Liquid",extensions:["liquid"],load(){return Fe(()=>import("./index-C9ZwK38q.js"),__vite__mapDeps([7,1]),import.meta.url).then(e=>e.liquid())}}),Le.of({name:"MariaDB SQL",load(){return Sy("MariaSQL")}}),Le.of({name:"Markdown",extensions:["md","markdown","mkd"],load(){return Fe(()=>Promise.resolve().then(()=>hQt),void 0,import.meta.url).then(e=>e.markdown())}}),Le.of({name:"MS SQL",load(){return Sy("MSSQL")}}),Le.of({name:"MySQL",load(){return Sy("MySQL")}}),Le.of({name:"PHP",extensions:["php","php3","php4","php5","php7","phtml"],load(){return Fe(()=>import("./index-Bv0RkQNw.js"),__vite__mapDeps([8,1]),import.meta.url).then(e=>e.php())}}),Le.of({name:"PLSQL",extensions:["pls"],load(){return Sy("PLSQL")}}),Le.of({name:"PostgreSQL",load(){return Sy("PostgreSQL")}}),Le.of({name:"Python",extensions:["BUILD","bzl","py","pyw"],filename:/^(BUCK|BUILD)$/,load(){return Fe(()=>import("./index-CQPrZsle.js"),__vite__mapDeps([9,1]),import.meta.url).then(e=>e.python())}}),Le.of({name:"Rust",extensions:["rs"],load(){return Fe(()=>import("./index-CQEYP2RS.js"),__vite__mapDeps([10,1]),import.meta.url).then(e=>e.rust())}}),Le.of({name:"Sass",extensions:["sass"],load(){return Fe(()=>import("./index-eexUQSlS.js"),__vite__mapDeps([11,1]),import.meta.url).then(e=>e.sass({indented:!0}))}}),Le.of({name:"SCSS",extensions:["scss"],load(){return Fe(()=>import("./index-eexUQSlS.js"),__vite__mapDeps([11,1]),import.meta.url).then(e=>e.sass())}}),Le.of({name:"SQL",extensions:["sql"],load(){return Sy("StandardSQL")}}),Le.of({name:"SQLite",load(){return Sy("SQLite")}}),Le.of({name:"TSX",extensions:["tsx"],load(){return Fe(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url).then(e=>e.javascript({jsx:!0,typescript:!0}))}}),Le.of({name:"TypeScript",alias:["ts"],extensions:["ts","mts","cts"],load(){return Fe(()=>Promise.resolve().then(()=>i2),void 0,import.meta.url).then(e=>e.javascript({typescript:!0}))}}),Le.of({name:"WebAssembly",extensions:["wat","wast"],load(){return Fe(()=>import("./index-DKp3jcP0.js"),__vite__mapDeps([12,1]),import.meta.url).then(e=>e.wast())}}),Le.of({name:"XML",alias:["rss","wsdl","xsd"],extensions:["xml","xsl","xsd","svg"],load(){return Fe(()=>import("./index-jRz9XLMK.js"),__vite__mapDeps([13,1]),import.meta.url).then(e=>e.xml())}}),Le.of({name:"YAML",alias:["yml"],extensions:["yaml","yml"],load(){return Fe(()=>import("./index-DOqGjpNO.js"),__vite__mapDeps([14,1]),import.meta.url).then(e=>e.yaml())}}),Le.of({name:"APL",extensions:["dyalog","apl"],load(){return Fe(()=>import("./apl-B4CMkyY2.js"),[],import.meta.url).then(e=>ct(e.apl))}}),Le.of({name:"PGP",alias:["asciiarmor"],extensions:["asc","pgp","sig"],load(){return Fe(()=>import("./asciiarmor-Df11BRmG.js"),[],import.meta.url).then(e=>ct(e.asciiArmor))}}),Le.of({name:"ASN.1",extensions:["asn","asn1"],load(){return Fe(()=>import("./asn1-EdZsLKOL.js"),[],import.meta.url).then(e=>ct(e.asn1({})))}}),Le.of({name:"Asterisk",filename:/^extensions\.conf$/i,load(){return Fe(()=>import("./asterisk-B-8jnY81.js"),[],import.meta.url).then(e=>ct(e.asterisk))}}),Le.of({name:"Brainfuck",extensions:["b","bf"],load(){return Fe(()=>import("./brainfuck-C4LP7Hcl.js"),[],import.meta.url).then(e=>ct(e.brainfuck))}}),Le.of({name:"Cobol",extensions:["cob","cpy"],load(){return Fe(()=>import("./cobol-CWcv1MsR.js"),[],import.meta.url).then(e=>ct(e.cobol))}}),Le.of({name:"C#",alias:["csharp","cs"],extensions:["cs"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.csharp))}}),Le.of({name:"Clojure",extensions:["clj","cljc","cljx"],load(){return Fe(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>ct(e.clojure))}}),Le.of({name:"ClojureScript",extensions:["cljs"],load(){return Fe(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>ct(e.clojure))}}),Le.of({name:"Closure Stylesheets (GSS)",extensions:["gss"],load(){return Fe(()=>import("./css-BnMrqG3P.js"),[],import.meta.url).then(e=>ct(e.gss))}}),Le.of({name:"CMake",extensions:["cmake","cmake.in"],filename:/^CMakeLists\.txt$/,load(){return Fe(()=>import("./cmake-BQqOBYOt.js"),[],import.meta.url).then(e=>ct(e.cmake))}}),Le.of({name:"CoffeeScript",alias:["coffee","coffee-script"],extensions:["coffee"],load(){return Fe(()=>import("./coffeescript-S37ZYGWr.js"),[],import.meta.url).then(e=>ct(e.coffeeScript))}}),Le.of({name:"Common Lisp",alias:["lisp"],extensions:["cl","lisp","el"],load(){return Fe(()=>import("./commonlisp-DBKNyK5s.js"),[],import.meta.url).then(e=>ct(e.commonLisp))}}),Le.of({name:"Cypher",extensions:["cyp","cypher"],load(){return Fe(()=>import("./cypher-C_CwsFkJ.js"),[],import.meta.url).then(e=>ct(e.cypher))}}),Le.of({name:"Cython",extensions:["pyx","pxd","pxi"],load(){return Fe(()=>import("./python-BuPzkPfP.js"),[],import.meta.url).then(e=>ct(e.cython))}}),Le.of({name:"Crystal",extensions:["cr"],load(){return Fe(()=>import("./crystal-SjHAIU92.js"),[],import.meta.url).then(e=>ct(e.crystal))}}),Le.of({name:"D",extensions:["d"],load(){return Fe(()=>import("./d-pRatUO7H.js"),[],import.meta.url).then(e=>ct(e.d))}}),Le.of({name:"Dart",extensions:["dart"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.dart))}}),Le.of({name:"diff",extensions:["diff","patch"],load(){return Fe(()=>import("./diff-DbItnlRl.js"),[],import.meta.url).then(e=>ct(e.diff))}}),Le.of({name:"Dockerfile",filename:/^Dockerfile$/,load(){return Fe(()=>import("./dockerfile-BKs6k2Af.js"),__vite__mapDeps([15,16]),import.meta.url).then(e=>ct(e.dockerFile))}}),Le.of({name:"DTD",extensions:["dtd"],load(){return Fe(()=>import("./dtd-DF_7sFjM.js"),[],import.meta.url).then(e=>ct(e.dtd))}}),Le.of({name:"Dylan",extensions:["dylan","dyl","intr"],load(){return Fe(()=>import("./dylan-DwRh75JA.js"),[],import.meta.url).then(e=>ct(e.dylan))}}),Le.of({name:"EBNF",load(){return Fe(()=>import("./ebnf-CDyGwa7X.js"),[],import.meta.url).then(e=>ct(e.ebnf))}}),Le.of({name:"ECL",extensions:["ecl"],load(){return Fe(()=>import("./ecl-Cabwm37j.js"),[],import.meta.url).then(e=>ct(e.ecl))}}),Le.of({name:"edn",extensions:["edn"],load(){return Fe(()=>import("./clojure-BMjYHr_A.js"),[],import.meta.url).then(e=>ct(e.clojure))}}),Le.of({name:"Eiffel",extensions:["e"],load(){return Fe(()=>import("./eiffel-CnydiIhH.js"),[],import.meta.url).then(e=>ct(e.eiffel))}}),Le.of({name:"Elm",extensions:["elm"],load(){return Fe(()=>import("./elm-vLlmbW-K.js"),[],import.meta.url).then(e=>ct(e.elm))}}),Le.of({name:"Erlang",extensions:["erl"],load(){return Fe(()=>import("./erlang-BNw1qcRV.js"),[],import.meta.url).then(e=>ct(e.erlang))}}),Le.of({name:"Esper",load(){return Fe(()=>import("./sql-D0XecflT.js"),[],import.meta.url).then(e=>ct(e.esper))}}),Le.of({name:"Factor",extensions:["factor"],load(){return Fe(()=>import("./factor-kuTfRLto.js"),__vite__mapDeps([17,16]),import.meta.url).then(e=>ct(e.factor))}}),Le.of({name:"FCL",load(){return Fe(()=>import("./fcl-Kvtd6kyn.js"),[],import.meta.url).then(e=>ct(e.fcl))}}),Le.of({name:"Forth",extensions:["forth","fth","4th"],load(){return Fe(()=>import("./forth-Ffai-XNe.js"),[],import.meta.url).then(e=>ct(e.forth))}}),Le.of({name:"Fortran",extensions:["f","for","f77","f90","f95"],load(){return Fe(()=>import("./fortran-DYz_wnZ1.js"),[],import.meta.url).then(e=>ct(e.fortran))}}),Le.of({name:"F#",alias:["fsharp"],extensions:["fs"],load(){return Fe(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>ct(e.fSharp))}}),Le.of({name:"Gas",extensions:["s"],load(){return Fe(()=>import("./gas-Bneqetm1.js"),[],import.meta.url).then(e=>ct(e.gas))}}),Le.of({name:"Gherkin",extensions:["feature"],load(){return Fe(()=>import("./gherkin-heZmZLOM.js"),[],import.meta.url).then(e=>ct(e.gherkin))}}),Le.of({name:"Groovy",extensions:["groovy","gradle"],filename:/^Jenkinsfile$/,load(){return Fe(()=>import("./groovy-D9Dt4D0W.js"),[],import.meta.url).then(e=>ct(e.groovy))}}),Le.of({name:"Haskell",extensions:["hs"],load(){return Fe(()=>import("./haskell-Cw1EW3IL.js"),[],import.meta.url).then(e=>ct(e.haskell))}}),Le.of({name:"Haxe",extensions:["hx"],load(){return Fe(()=>import("./haxe-H-WmDvRZ.js"),[],import.meta.url).then(e=>ct(e.haxe))}}),Le.of({name:"HXML",extensions:["hxml"],load(){return Fe(()=>import("./haxe-H-WmDvRZ.js"),[],import.meta.url).then(e=>ct(e.hxml))}}),Le.of({name:"HTTP",load(){return Fe(()=>import("./http-DBlCnlav.js"),[],import.meta.url).then(e=>ct(e.http))}}),Le.of({name:"IDL",extensions:["pro"],load(){return Fe(()=>import("./idl-BEugSyMb.js"),[],import.meta.url).then(e=>ct(e.idl))}}),Le.of({name:"JSON-LD",alias:["jsonld"],extensions:["jsonld"],load(){return Fe(()=>import("./javascript-iXu5QeM3.js"),[],import.meta.url).then(e=>ct(e.jsonld))}}),Le.of({name:"Julia",extensions:["jl"],load(){return Fe(()=>import("./julia-DuME0IfC.js"),[],import.meta.url).then(e=>ct(e.julia))}}),Le.of({name:"Kotlin",extensions:["kt","kts"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.kotlin))}}),Le.of({name:"LiveScript",alias:["ls"],extensions:["ls"],load(){return Fe(()=>import("./livescript-BwQOo05w.js"),[],import.meta.url).then(e=>ct(e.liveScript))}}),Le.of({name:"Lua",extensions:["lua"],load(){return Fe(()=>import("./lua-BgMRiT3U.js"),[],import.meta.url).then(e=>ct(e.lua))}}),Le.of({name:"mIRC",extensions:["mrc"],load(){return Fe(()=>import("./mirc-CjQqDB4T.js"),[],import.meta.url).then(e=>ct(e.mirc))}}),Le.of({name:"Mathematica",extensions:["m","nb","wl","wls"],load(){return Fe(()=>import("./mathematica-DTrFuWx2.js"),[],import.meta.url).then(e=>ct(e.mathematica))}}),Le.of({name:"Modelica",extensions:["mo"],load(){return Fe(()=>import("./modelica-Dc1JOy9r.js"),[],import.meta.url).then(e=>ct(e.modelica))}}),Le.of({name:"MUMPS",extensions:["mps"],load(){return Fe(()=>import("./mumps-BT43cFF4.js"),[],import.meta.url).then(e=>ct(e.mumps))}}),Le.of({name:"Mbox",extensions:["mbox"],load(){return Fe(()=>import("./mbox-CNhZ1qSd.js"),[],import.meta.url).then(e=>ct(e.mbox))}}),Le.of({name:"Nginx",filename:/nginx.*\.conf$/i,load(){return Fe(()=>import("./nginx-DdIZxoE0.js"),[],import.meta.url).then(e=>ct(e.nginx))}}),Le.of({name:"NSIS",extensions:["nsh","nsi"],load(){return Fe(()=>import("./nsis-LdVXkNf5.js"),__vite__mapDeps([18,16]),import.meta.url).then(e=>ct(e.nsis))}}),Le.of({name:"NTriples",extensions:["nt","nq"],load(){return Fe(()=>import("./ntriples-BfvgReVJ.js"),[],import.meta.url).then(e=>ct(e.ntriples))}}),Le.of({name:"Objective-C",alias:["objective-c","objc"],extensions:["m"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.objectiveC))}}),Le.of({name:"Objective-C++",alias:["objective-c++","objc++"],extensions:["mm"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.objectiveCpp))}}),Le.of({name:"OCaml",extensions:["ml","mli","mll","mly"],load(){return Fe(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>ct(e.oCaml))}}),Le.of({name:"Octave",extensions:["m"],load(){return Fe(()=>import("./octave-Ck1zUtKM.js"),[],import.meta.url).then(e=>ct(e.octave))}}),Le.of({name:"Oz",extensions:["oz"],load(){return Fe(()=>import("./oz-BzwKVEFT.js"),[],import.meta.url).then(e=>ct(e.oz))}}),Le.of({name:"Pascal",extensions:["p","pas"],load(){return Fe(()=>import("./pascal--L3eBynH.js"),[],import.meta.url).then(e=>ct(e.pascal))}}),Le.of({name:"Perl",extensions:["pl","pm"],load(){return Fe(()=>import("./perl-CdXCOZ3F.js"),[],import.meta.url).then(e=>ct(e.perl))}}),Le.of({name:"Pig",extensions:["pig"],load(){return Fe(()=>import("./pig-CevX1Tat.js"),[],import.meta.url).then(e=>ct(e.pig))}}),Le.of({name:"PowerShell",extensions:["ps1","psd1","psm1"],load(){return Fe(()=>import("./powershell-CaxLzxiJ.js"),[],import.meta.url).then(e=>ct(e.powerShell))}}),Le.of({name:"Properties files",alias:["ini","properties"],extensions:["properties","ini","in"],load(){return Fe(()=>import("./properties-C78fOPTZ.js"),[],import.meta.url).then(e=>ct(e.properties))}}),Le.of({name:"ProtoBuf",extensions:["proto"],load(){return Fe(()=>import("./protobuf-ChK-085T.js"),[],import.meta.url).then(e=>ct(e.protobuf))}}),Le.of({name:"Pug",alias:["jade"],extensions:["pug","jade"],load(){return Fe(()=>import("./pug-DeIclll2.js"),__vite__mapDeps([19,20]),import.meta.url).then(e=>ct(e.pug))}}),Le.of({name:"Puppet",extensions:["pp"],load(){return Fe(()=>import("./puppet-DMA9R1ak.js"),[],import.meta.url).then(e=>ct(e.puppet))}}),Le.of({name:"Q",extensions:["q"],load(){return Fe(()=>import("./q-pXgVlZs6.js"),[],import.meta.url).then(e=>ct(e.q))}}),Le.of({name:"R",alias:["rscript"],extensions:["r","R"],load(){return Fe(()=>import("./r-B6wPVr8A.js"),[],import.meta.url).then(e=>ct(e.r))}}),Le.of({name:"RPM Changes",load(){return Fe(()=>import("./rpm-CTu-6PCP.js"),[],import.meta.url).then(e=>ct(e.rpmChanges))}}),Le.of({name:"RPM Spec",extensions:["spec"],load(){return Fe(()=>import("./rpm-CTu-6PCP.js"),[],import.meta.url).then(e=>ct(e.rpmSpec))}}),Le.of({name:"Ruby",alias:["jruby","macruby","rake","rb","rbx"],extensions:["rb"],filename:/^(Gemfile|Rakefile)$/,load(){return Fe(()=>import("./ruby-B2Rjki9n.js"),[],import.meta.url).then(e=>ct(e.ruby))}}),Le.of({name:"SAS",extensions:["sas"],load(){return Fe(()=>import("./sas-B4kiWyti.js"),[],import.meta.url).then(e=>ct(e.sas))}}),Le.of({name:"Scala",extensions:["scala"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.scala))}}),Le.of({name:"Scheme",extensions:["scm","ss"],load(){return Fe(()=>import("./scheme-C41bIUwD.js"),[],import.meta.url).then(e=>ct(e.scheme))}}),Le.of({name:"Shell",alias:["bash","sh","zsh"],extensions:["sh","ksh","bash"],filename:/^PKGBUILD$/,load(){return Fe(()=>import("./shell-CjFT_Tl9.js"),[],import.meta.url).then(e=>ct(e.shell))}}),Le.of({name:"Sieve",extensions:["siv","sieve"],load(){return Fe(()=>import("./sieve-C3Gn_uJK.js"),[],import.meta.url).then(e=>ct(e.sieve))}}),Le.of({name:"Smalltalk",extensions:["st"],load(){return Fe(()=>import("./smalltalk-CnHTOXQT.js"),[],import.meta.url).then(e=>ct(e.smalltalk))}}),Le.of({name:"Solr",load(){return Fe(()=>import("./solr-DehyRSwq.js"),[],import.meta.url).then(e=>ct(e.solr))}}),Le.of({name:"SML",extensions:["sml","sig","fun","smackspec"],load(){return Fe(()=>import("./mllike-BO34x3tv.js"),[],import.meta.url).then(e=>ct(e.sml))}}),Le.of({name:"SPARQL",alias:["sparul"],extensions:["rq","sparql"],load(){return Fe(()=>import("./sparql-DkYu6x3z.js"),[],import.meta.url).then(e=>ct(e.sparql))}}),Le.of({name:"Spreadsheet",alias:["excel","formula"],load(){return Fe(()=>import("./spreadsheet-BCZA_wO0.js"),[],import.meta.url).then(e=>ct(e.spreadsheet))}}),Le.of({name:"Squirrel",extensions:["nut"],load(){return Fe(()=>import("./clike-B9uivgTg.js"),[],import.meta.url).then(e=>ct(e.squirrel))}}),Le.of({name:"Stylus",extensions:["styl"],load(){return Fe(()=>import("./stylus-B533Al4x.js"),[],import.meta.url).then(e=>ct(e.stylus))}}),Le.of({name:"Swift",extensions:["swift"],load(){return Fe(()=>import("./swift-BzpIVaGY.js"),[],import.meta.url).then(e=>ct(e.swift))}}),Le.of({name:"sTeX",load(){return Fe(()=>import("./stex-C3f8Ysf7.js"),[],import.meta.url).then(e=>ct(e.stex))}}),Le.of({name:"LaTeX",alias:["tex"],extensions:["text","ltx","tex"],load(){return Fe(()=>import("./stex-C3f8Ysf7.js"),[],import.meta.url).then(e=>ct(e.stex))}}),Le.of({name:"SystemVerilog",extensions:["v","sv","svh"],load(){return Fe(()=>import("./verilog-C6RDOZhf.js"),[],import.meta.url).then(e=>ct(e.verilog))}}),Le.of({name:"Tcl",extensions:["tcl"],load(){return Fe(()=>import("./tcl-DVfN8rqt.js"),[],import.meta.url).then(e=>ct(e.tcl))}}),Le.of({name:"Textile",extensions:["textile"],load(){return Fe(()=>import("./textile-CnDTJFAw.js"),[],import.meta.url).then(e=>ct(e.textile))}}),Le.of({name:"TiddlyWiki",load(){return Fe(()=>import("./tiddlywiki-DO-Gjzrf.js"),[],import.meta.url).then(e=>ct(e.tiddlyWiki))}}),Le.of({name:"Tiki wiki",load(){return Fe(()=>import("./tiki-DGYXhP31.js"),[],import.meta.url).then(e=>ct(e.tiki))}}),Le.of({name:"TOML",extensions:["toml"],load(){return Fe(()=>import("./toml-Bm5Em-hy.js"),[],import.meta.url).then(e=>ct(e.toml))}}),Le.of({name:"Troff",extensions:["1","2","3","4","5","6","7","8","9"],load(){return Fe(()=>import("./troff-wAsdV37c.js"),[],import.meta.url).then(e=>ct(e.troff))}}),Le.of({name:"TTCN",extensions:["ttcn","ttcn3","ttcnpp"],load(){return Fe(()=>import("./ttcn-CfJYG6tj.js"),[],import.meta.url).then(e=>ct(e.ttcn))}}),Le.of({name:"TTCN_CFG",extensions:["cfg"],load(){return Fe(()=>import("./ttcn-cfg-B9xdYoR4.js"),[],import.meta.url).then(e=>ct(e.ttcnCfg))}}),Le.of({name:"Turtle",extensions:["ttl"],load(){return Fe(()=>import("./turtle-B1tBg_DP.js"),[],import.meta.url).then(e=>ct(e.turtle))}}),Le.of({name:"Web IDL",extensions:["webidl"],load(){return Fe(()=>import("./webidl-ZXfAyPTL.js"),[],import.meta.url).then(e=>ct(e.webIDL))}}),Le.of({name:"VB.NET",extensions:["vb"],load(){return Fe(()=>import("./vb-CmGdzxic.js"),[],import.meta.url).then(e=>ct(e.vb))}}),Le.of({name:"VBScript",extensions:["vbs"],load(){return Fe(()=>import("./vbscript-BuJXcnF6.js"),[],import.meta.url).then(e=>ct(e.vbScript))}}),Le.of({name:"Velocity",extensions:["vtl"],load(){return Fe(()=>import("./velocity-D8B20fx6.js"),[],import.meta.url).then(e=>ct(e.velocity))}}),Le.of({name:"Verilog",extensions:["v"],load(){return Fe(()=>import("./verilog-C6RDOZhf.js"),[],import.meta.url).then(e=>ct(e.verilog))}}),Le.of({name:"VHDL",extensions:["vhd","vhdl"],load(){return Fe(()=>import("./vhdl-lSbBsy5d.js"),[],import.meta.url).then(e=>ct(e.vhdl))}}),Le.of({name:"XQuery",extensions:["xy","xquery","xq","xqm","xqy"],load(){return Fe(()=>import("./xquery-DzFWVndE.js"),[],import.meta.url).then(e=>ct(e.xQuery))}}),Le.of({name:"Yacas",extensions:["ys"],load(){return Fe(()=>import("./yacas-BJ4BC0dw.js"),[],import.meta.url).then(e=>ct(e.yacas))}}),Le.of({name:"Z80",extensions:["z80"],load(){return Fe(()=>import("./z80-Hz9HOZM7.js"),[],import.meta.url).then(e=>ct(e.z80))}}),Le.of({name:"MscGen",extensions:["mscgen","mscin","msc"],load(){return Fe(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>ct(e.mscgen))}}),Le.of({name:"Xù",extensions:["xu"],load(){return Fe(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>ct(e.xu))}}),Le.of({name:"MsGenny",extensions:["msgenny"],load(){return Fe(()=>import("./mscgen-BA5vi2Kp.js"),[],import.meta.url).then(e=>ct(e.msgenny))}}),Le.of({name:"Vue",extensions:["vue"],load(){return Fe(()=>import("./index-BW4-uLEI.js"),__vite__mapDeps([21,1]),import.meta.url).then(e=>e.vue())}}),Le.of({name:"Angular Template",load(){return Fe(()=>import("./index-tVehqBsq.js"),__vite__mapDeps([22,1]),import.meta.url).then(e=>e.angular())}})];var mQt=e=>{var{theme:t,settings:r={},styles:n=[]}=e,a={".cm-gutters":{}},s={};r.background&&(s.backgroundColor=r.background),r.backgroundImage&&(s.backgroundImage=r.backgroundImage),r.foreground&&(s.color=r.foreground),r.fontSize&&(s.fontSize=r.fontSize),(r.background||r.foreground)&&(a["&"]=s),r.fontFamily&&(a["&.cm-editor .cm-scroller"]={fontFamily:r.fontFamily}),r.gutterBackground&&(a[".cm-gutters"].backgroundColor=r.gutterBackground),r.gutterForeground&&(a[".cm-gutters"].color=r.gutterForeground),r.gutterBorder&&(a[".cm-gutters"].borderRightColor=r.gutterBorder),r.caret&&(a[".cm-content"]={caretColor:r.caret},a[".cm-cursor, .cm-dropCursor"]={borderLeftColor:r.caret});var i={};r.gutterActiveForeground&&(i.color=r.gutterActiveForeground),r.lineHighlight&&(a[".cm-activeLine"]={backgroundColor:r.lineHighlight},i.backgroundColor=r.lineHighlight),a[".cm-activeLineGutter"]=i,r.selection&&(a["&.cm-focused .cm-selectionBackground, & .cm-line::selection, & .cm-selectionLayer .cm-selectionBackground, .cm-content ::selection"]={background:r.selection+" !important"}),r.selectionMatch&&(a["& .cm-selectionMatch"]={backgroundColor:r.selectionMatch});var o=bt.theme(a,{dark:t==="dark"}),l=i1.define(n),c=[o,RL(l)];return c},gQt={background:"#282a36",foreground:"#f8f8f2",caret:"#f8f8f0",selection:"rgba(255, 255, 255, 0.1)",selectionMatch:"rgba(255, 255, 255, 0.2)",gutterBackground:"#282a36",gutterForeground:"#6D8A88",gutterBorder:"transparent",lineHighlight:"rgba(255, 255, 255, 0.1)"},yQt=[{tag:ee.comment,color:"#6272a4"},{tag:ee.string,color:"#f1fa8c"},{tag:ee.atom,color:"#bd93f9"},{tag:ee.meta,color:"#f8f8f2"},{tag:[ee.keyword,ee.operator,ee.tagName],color:"#ff79c6"},{tag:[ee.function(ee.propertyName),ee.propertyName],color:"#66d9ef"},{tag:[ee.definition(ee.variableName),ee.function(ee.variableName),ee.className,ee.attributeName],color:"#50fa7b"},{tag:ee.atom,color:"#bd93f9"}],Coe=e=>{var{theme:t="dark",settings:r={},styles:n=[]}=e||{};return mQt({theme:t,settings:Th({},gQt,r),styles:[...yQt,...n]})};Coe();const bQt=e=>{let{state:t}=e,r=t.doc.lineAt(t.selection.main.from),n=Aoe(e.state,r.from);return n.line?vQt(e):n.block?wQt(e):!1};function Toe(e,t){return({state:r,dispatch:n})=>{if(r.readOnly)return!1;let a=e(t,r);return a?(n(r.update(a)),!0):!1}}const vQt=Toe(OQt,0),xQt=Toe(wZe,0),wQt=Toe((e,t)=>wZe(e,t,EQt(t)),0);function Aoe(e,t){let r=e.languageDataAt("commentTokens",t,1);return r.length?r[0]:{}}const Ck=50;function SQt(e,{open:t,close:r},n,a){let s=e.sliceDoc(n-Ck,n),i=e.sliceDoc(a,a+Ck),o=/\s*$/.exec(s)[0].length,l=/^\s*/.exec(i)[0].length,c=s.length-o;if(s.slice(c-t.length,c)==t&&i.slice(l,l+r.length)==r)return{open:{pos:n-o,margin:o&&1},close:{pos:a+l,margin:l&&1}};let u,d;a-n<=2*Ck?u=d=e.sliceDoc(n,a):(u=e.sliceDoc(n,n+Ck),d=e.sliceDoc(a-Ck,a));let f=/^\s*/.exec(u)[0].length,h=/\s*$/.exec(d)[0].length,g=d.length-h-r.length;return u.slice(f,f+t.length)==t&&d.slice(g,g+r.length)==r?{open:{pos:n+f+t.length,margin:/\s/.test(u.charAt(f+t.length))?1:0},close:{pos:a-h-r.length,margin:/\s/.test(d.charAt(g-1))?1:0}}:null}function EQt(e){let t=[];for(let r of e.selection.ranges){let n=e.doc.lineAt(r.from),a=r.to<=n.to?n:e.doc.lineAt(r.to);a.from>n.from&&a.from==r.to&&(a=r.to==n.to+1?n:e.doc.lineAt(r.to-1));let s=t.length-1;s>=0&&t[s].to>n.from?t[s].to=a.to:t.push({from:n.from+/^\s*/.exec(n.text)[0].length,to:a.to})}return t}function wZe(e,t,r=t.selection.ranges){let n=r.map(s=>Aoe(t,s.from).block);if(!n.every(s=>s))return null;let a=r.map((s,i)=>SQt(t,n[i],s.from,s.to));if(e!=2&&!a.every(s=>s))return{changes:t.changes(r.map((s,i)=>a[i]?[]:[{from:s.from,insert:n[i].open+" "},{from:s.to,insert:" "+n[i].close}]))};if(e!=1&&a.some(s=>s)){let s=[];for(let i=0,o;i<a.length;i++)if(o=a[i]){let l=n[i],{open:c,close:u}=o;s.push({from:c.pos-l.open.length,to:c.pos+c.margin},{from:u.pos-u.margin,to:u.pos+l.close.length})}return{changes:s}}return null}function OQt(e,t,r=t.selection.ranges){let n=[],a=-1;for(let{from:s,to:i}of r){let o=n.length,l=1e9,c=Aoe(t,s).line;if(c){for(let u=s;u<=i;){let d=t.doc.lineAt(u);if(d.from>a&&(s==i||i>d.from)){a=d.from;let f=/^\s*/.exec(d.text)[0].length,h=f==d.length,g=d.text.slice(f,f+c.length)==c?f:-1;f<d.text.length&&f<l&&(l=f),n.push({line:d,comment:g,token:c,indent:f,empty:h,single:!1})}u=d.to+1}if(l<1e9)for(let u=o;u<n.length;u++)n[u].indent<n[u].line.text.length&&(n[u].indent=l);n.length==o+1&&(n[o].single=!0)}}if(e!=2&&n.some(s=>s.comment<0&&(!s.empty||s.single))){let s=[];for(let{line:o,token:l,indent:c,empty:u,single:d}of n)(d||!u)&&s.push({from:o.from+c,insert:l+" "});let i=t.changes(s);return{changes:i,selection:t.selection.map(i,1)}}else if(e!=1&&n.some(s=>s.comment>=0)){let s=[];for(let{line:i,comment:o,token:l}of n)if(o>=0){let c=i.from+o,u=c+l.length;i.text[u-i.from]==" "&&u++,s.push({from:c,to:u})}return{changes:s}}return null}const RJ=Zh.define(),_Qt=Zh.define(),kQt=Xt.define(),SZe=Xt.define({combine(e){return Hh(e,{minDepth:100,newGroupDelay:500,joinToEvent:(t,r)=>r},{minDepth:Math.max,newGroupDelay:Math.min,joinToEvent:(t,r)=>(n,a)=>t(n,a)||r(n,a)})}}),EZe=$o.define({create(){return ch.empty},update(e,t){let r=t.state.facet(SZe),n=t.annotation(RJ);if(n){let l=Ac.fromTransaction(t,n.selection),c=n.side,u=c==0?e.undone:e.done;return l?u=I3(u,u.length,r.minDepth,l):u=kZe(u,t.startState.selection),new ch(c==0?n.rest:u,c==0?u:n.rest)}let a=t.annotation(_Qt);if((a=="full"||a=="before")&&(e=e.isolate()),t.annotation(Zi.addToHistory)===!1)return t.changes.empty?e:e.addMapping(t.changes.desc);let s=Ac.fromTransaction(t),i=t.annotation(Zi.time),o=t.annotation(Zi.userEvent);return s?e=e.addChanges(s,i,o,r,t):t.selection&&(e=e.addSelection(t.startState.selection,i,o,r.newGroupDelay)),(a=="full"||a=="after")&&(e=e.isolate()),e},toJSON(e){return{done:e.done.map(t=>t.toJSON()),undone:e.undone.map(t=>t.toJSON())}},fromJSON(e){return new ch(e.done.map(Ac.fromJSON),e.undone.map(Ac.fromJSON))}});function CQt(e={}){return[EZe,SZe.of(e),bt.domEventHandlers({beforeinput(t,r){let n=t.inputType=="historyUndo"?OZe:t.inputType=="historyRedo"?PJ:null;return n?(t.preventDefault(),n(r)):!1}})]}function ML(e,t){return function({state:r,dispatch:n}){if(!t&&r.readOnly)return!1;let a=r.field(EZe,!1);if(!a)return!1;let s=a.pop(e,r,t);return s?(n(s),!0):!1}}const OZe=ML(0,!1),PJ=ML(1,!1),TQt=ML(0,!0),AQt=ML(1,!0);class Ac{constructor(t,r,n,a,s){this.changes=t,this.effects=r,this.mapped=n,this.startSelection=a,this.selectionsAfter=s}setSelAfter(t){return new Ac(this.changes,this.effects,this.mapped,this.startSelection,t)}toJSON(){var t,r,n;return{changes:(t=this.changes)===null||t===void 0?void 0:t.toJSON(),mapped:(r=this.mapped)===null||r===void 0?void 0:r.toJSON(),startSelection:(n=this.startSelection)===null||n===void 0?void 0:n.toJSON(),selectionsAfter:this.selectionsAfter.map(a=>a.toJSON())}}static fromJSON(t){return new Ac(t.changes&&uo.fromJSON(t.changes),[],t.mapped&&vh.fromJSON(t.mapped),t.startSelection&&We.fromJSON(t.startSelection),t.selectionsAfter.map(We.fromJSON))}static fromTransaction(t,r){let n=Md;for(let a of t.startState.facet(kQt)){let s=a(t);s.length&&(n=n.concat(s))}return!n.length&&t.changes.empty?null:new Ac(t.changes.invert(t.startState.doc),n,void 0,r||t.startState.selection,Md)}static selection(t){return new Ac(void 0,Md,void 0,void 0,t)}}function I3(e,t,r,n){let a=t+1>r+20?t-r-1:0,s=e.slice(a,t);return s.push(n),s}function DQt(e,t){let r=[],n=!1;return e.iterChangedRanges((a,s)=>r.push(a,s)),t.iterChangedRanges((a,s,i,o)=>{for(let l=0;l<r.length;){let c=r[l++],u=r[l++];o>=c&&i<=u&&(n=!0)}}),n}function IQt(e,t){return e.ranges.length==t.ranges.length&&e.ranges.filter((r,n)=>r.empty!=t.ranges[n].empty).length===0}function _Ze(e,t){return e.length?t.length?e.concat(t):e:t}const Md=[],NQt=200;function kZe(e,t){if(e.length){let r=e[e.length-1],n=r.selectionsAfter.slice(Math.max(0,r.selectionsAfter.length-NQt));return n.length&&n[n.length-1].eq(t)?e:(n.push(t),I3(e,e.length-1,1e9,r.setSelAfter(n)))}else return[Ac.selection([t])]}function RQt(e){let t=e[e.length-1],r=e.slice();return r[e.length-1]=t.setSelAfter(t.selectionsAfter.slice(0,t.selectionsAfter.length-1)),r}function WH(e,t){if(!e.length)return e;let r=e.length,n=Md;for(;r;){let a=PQt(e[r-1],t,n);if(a.changes&&!a.changes.empty||a.effects.length){let s=e.slice(0,r);return s[r-1]=a,s}else t=a.mapped,r--,n=a.selectionsAfter}return n.length?[Ac.selection(n)]:Md}function PQt(e,t,r){let n=_Ze(e.selectionsAfter.length?e.selectionsAfter.map(o=>o.map(t)):Md,r);if(!e.changes)return Ac.selection(n);let a=e.changes.map(t),s=t.mapDesc(e.changes,!0),i=e.mapped?e.mapped.composeDesc(s):s;return new Ac(a,nn.mapEffects(e.effects,t),i,e.startSelection.map(s),n)}const $Qt=/^(input\.type|delete)($|\.)/;class ch{constructor(t,r,n=0,a=void 0){this.done=t,this.undone=r,this.prevTime=n,this.prevUserEvent=a}isolate(){return this.prevTime?new ch(this.done,this.undone):this}addChanges(t,r,n,a,s){let i=this.done,o=i[i.length-1];return o&&o.changes&&!o.changes.empty&&t.changes&&(!n||$Qt.test(n))&&(!o.selectionsAfter.length&&r-this.prevTime<a.newGroupDelay&&a.joinToEvent(s,DQt(o.changes,t.changes))||n=="input.type.compose")?i=I3(i,i.length-1,a.minDepth,new Ac(t.changes.compose(o.changes),_Ze(nn.mapEffects(t.effects,o.changes),o.effects),o.mapped,o.startSelection,Md)):i=I3(i,i.length,a.minDepth,t),new ch(i,Md,r,n)}addSelection(t,r,n,a){let s=this.done.length?this.done[this.done.length-1].selectionsAfter:Md;return s.length>0&&r-this.prevTime<a&&n==this.prevUserEvent&&n&&/^select($|\.)/.test(n)&&IQt(s[s.length-1],t)?this:new ch(kZe(this.done,t),this.undone,r,n)}addMapping(t){return new ch(WH(this.done,t),WH(this.undone,t),this.prevTime,this.prevUserEvent)}pop(t,r,n){let a=t==0?this.done:this.undone;if(a.length==0)return null;let s=a[a.length-1],i=s.selectionsAfter[0]||r.selection;if(n&&s.selectionsAfter.length)return r.update({selection:s.selectionsAfter[s.selectionsAfter.length-1],annotations:RJ.of({side:t,rest:RQt(a),selection:i}),userEvent:t==0?"select.undo":"select.redo",scrollIntoView:!0});if(s.changes){let o=a.length==1?Md:a.slice(0,a.length-1);return s.mapped&&(o=WH(o,s.mapped)),r.update({changes:s.changes,selection:s.startSelection,effects:s.effects,annotations:RJ.of({side:t,rest:o,selection:i}),filter:!1,userEvent:t==0?"undo":"redo",scrollIntoView:!0})}else return null}}ch.empty=new ch(Md,Md);const MQt=[{key:"Mod-z",run:OZe,preventDefault:!0},{key:"Mod-y",mac:"Mod-Shift-z",run:PJ,preventDefault:!0},{linux:"Ctrl-Shift-z",run:PJ,preventDefault:!0},{key:"Mod-u",run:TQt,preventDefault:!0},{key:"Alt-u",mac:"Mod-Shift-u",run:AQt,preventDefault:!0}];function DO(e,t){return We.create(e.ranges.map(t),e.mainIndex)}function _f(e,t){return e.update({selection:t,scrollIntoView:!0,userEvent:"select"})}function kf({state:e,dispatch:t},r){let n=DO(e.selection,r);return n.eq(e.selection,!0)?!1:(t(_f(e,n)),!0)}function jL(e,t){return We.cursor(t?e.to:e.from)}function CZe(e,t){return kf(e,r=>r.empty?e.moveByChar(r,t):jL(r,t))}function bl(e){return e.textDirectionAt(e.state.selection.main.head)==As.LTR}const TZe=e=>CZe(e,!bl(e)),AZe=e=>CZe(e,bl(e));function DZe(e,t){return kf(e,r=>r.empty?e.moveByGroup(r,t):jL(r,t))}const jQt=e=>DZe(e,!bl(e)),LQt=e=>DZe(e,bl(e));function FQt(e,t,r){if(t.type.prop(r))return!0;let n=t.to-t.from;return n&&(n>2||/[^\s,.;:]/.test(e.sliceDoc(t.from,t.to)))||t.firstChild}function LL(e,t,r){let n=Ja(e).resolveInner(t.head),a=r?Xr.closedBy:Xr.openedBy;for(let l=t.head;;){let c=r?n.childAfter(l):n.childBefore(l);if(!c)break;FQt(e,c,a)?n=c:l=r?c.to:c.from}let s=n.type.prop(a),i,o;return s&&(i=r?lh(e,n.from,1):lh(e,n.to,-1))&&i.matched?o=r?i.end.to:i.end.from:o=r?n.to:n.from,We.cursor(o,r?-1:1)}const BQt=e=>kf(e,t=>LL(e.state,t,!bl(e))),zQt=e=>kf(e,t=>LL(e.state,t,bl(e)));function IZe(e,t){return kf(e,r=>{if(!r.empty)return jL(r,t);let n=e.moveVertically(r,t);return n.head!=r.head?n:e.moveToLineBoundary(r,t)})}const NZe=e=>IZe(e,!1),RZe=e=>IZe(e,!0);function PZe(e){let t=e.scrollDOM.clientHeight<e.scrollDOM.scrollHeight-2,r=0,n=0,a;if(t){for(let s of e.state.facet(bt.scrollMargins)){let i=s(e);i?.top&&(r=Math.max(i?.top,r)),i?.bottom&&(n=Math.max(i?.bottom,n))}a=e.scrollDOM.clientHeight-r-n}else a=(e.dom.ownerDocument.defaultView||window).innerHeight;return{marginTop:r,marginBottom:n,selfScroll:t,height:Math.max(e.defaultLineHeight,a-5)}}function $Ze(e,t){let r=PZe(e),{state:n}=e,a=DO(n.selection,i=>i.empty?e.moveVertically(i,t,r.height):jL(i,t));if(a.eq(n.selection))return!1;let s;if(r.selfScroll){let i=e.coordsAtPos(n.selection.main.head),o=e.scrollDOM.getBoundingClientRect(),l=o.top+r.marginTop,c=o.bottom-r.marginBottom;i&&i.top>l&&i.bottom<c&&(s=bt.scrollIntoView(a.main.head,{y:"start",yMargin:i.top-l}))}return e.dispatch(_f(n,a),{effects:s}),!0}const Dke=e=>$Ze(e,!1),$J=e=>$Ze(e,!0);function bv(e,t,r){let n=e.lineBlockAt(t.head),a=e.moveToLineBoundary(t,r);if(a.head==t.head&&a.head!=(r?n.to:n.from)&&(a=e.moveToLineBoundary(t,r,!1)),!r&&a.head==n.from&&n.length){let s=/^\s*/.exec(e.state.sliceDoc(n.from,Math.min(n.from+100,n.to)))[0].length;s&&t.head!=n.from+s&&(a=We.cursor(n.from+s))}return a}const UQt=e=>kf(e,t=>bv(e,t,!0)),VQt=e=>kf(e,t=>bv(e,t,!1)),qQt=e=>kf(e,t=>bv(e,t,!bl(e))),ZQt=e=>kf(e,t=>bv(e,t,bl(e))),HQt=e=>kf(e,t=>We.cursor(e.lineBlockAt(t.head).from,1)),GQt=e=>kf(e,t=>We.cursor(e.lineBlockAt(t.head).to,-1));function QQt(e,t,r){let n=!1,a=DO(e.selection,s=>{let i=lh(e,s.head,-1)||lh(e,s.head,1)||s.head>0&&lh(e,s.head-1,1)||s.head<e.doc.length&&lh(e,s.head+1,-1);if(!i||!i.end)return s;n=!0;let o=i.start.from==s.head?i.end.to:i.end.from;return We.cursor(o)});return n?(t(_f(e,a)),!0):!1}const WQt=({state:e,dispatch:t})=>QQt(e,t);function lp(e,t){let r=DO(e.state.selection,n=>{let a=t(n);return We.range(n.anchor,a.head,a.goalColumn,a.bidiLevel||void 0)});return r.eq(e.state.selection)?!1:(e.dispatch(_f(e.state,r)),!0)}function MZe(e,t){return lp(e,r=>e.moveByChar(r,t))}const jZe=e=>MZe(e,!bl(e)),LZe=e=>MZe(e,bl(e));function FZe(e,t){return lp(e,r=>e.moveByGroup(r,t))}const XQt=e=>FZe(e,!bl(e)),YQt=e=>FZe(e,bl(e)),KQt=e=>lp(e,t=>LL(e.state,t,!bl(e))),JQt=e=>lp(e,t=>LL(e.state,t,bl(e)));function BZe(e,t){return lp(e,r=>e.moveVertically(r,t))}const zZe=e=>BZe(e,!1),UZe=e=>BZe(e,!0);function VZe(e,t){return lp(e,r=>e.moveVertically(r,t,PZe(e).height))}const Ike=e=>VZe(e,!1),Nke=e=>VZe(e,!0),eWt=e=>lp(e,t=>bv(e,t,!0)),tWt=e=>lp(e,t=>bv(e,t,!1)),rWt=e=>lp(e,t=>bv(e,t,!bl(e))),nWt=e=>lp(e,t=>bv(e,t,bl(e))),aWt=e=>lp(e,t=>We.cursor(e.lineBlockAt(t.head).from)),sWt=e=>lp(e,t=>We.cursor(e.lineBlockAt(t.head).to)),Rke=({state:e,dispatch:t})=>(t(_f(e,{anchor:0})),!0),Pke=({state:e,dispatch:t})=>(t(_f(e,{anchor:e.doc.length})),!0),$ke=({state:e,dispatch:t})=>(t(_f(e,{anchor:e.selection.main.anchor,head:0})),!0),Mke=({state:e,dispatch:t})=>(t(_f(e,{anchor:e.selection.main.anchor,head:e.doc.length})),!0),iWt=({state:e,dispatch:t})=>(t(e.update({selection:{anchor:0,head:e.doc.length},userEvent:"select"})),!0),oWt=({state:e,dispatch:t})=>{let r=FL(e).map(({from:n,to:a})=>We.range(n,Math.min(a+1,e.doc.length)));return t(e.update({selection:We.create(r),userEvent:"select"})),!0},lWt=({state:e,dispatch:t})=>{let r=DO(e.selection,n=>{let a=Ja(e),s=a.resolveStack(n.from,1);if(n.empty){let i=a.resolveStack(n.from,-1);i.node.from>=s.node.from&&i.node.to<=s.node.to&&(s=i)}for(let i=s;i;i=i.next){let{node:o}=i;if((o.from<n.from&&o.to>=n.to||o.to>n.to&&o.from<=n.from)&&i.next)return We.range(o.to,o.from)}return n});return r.eq(e.selection)?!1:(t(_f(e,r)),!0)};function qZe(e,t){let{state:r}=e,n=r.selection,a=r.selection.ranges.slice();for(let s of r.selection.ranges){let i=r.doc.lineAt(s.head);if(t?i.to<e.state.doc.length:i.from>0)for(let o=s;;){let l=e.moveVertically(o,t);if(l.head<i.from||l.head>i.to){a.some(c=>c.head==l.head)||a.push(l);break}else{if(l.head==o.head)break;o=l}}}return a.length==n.ranges.length?!1:(e.dispatch(_f(r,We.create(a,a.length-1))),!0)}const cWt=e=>qZe(e,!1),uWt=e=>qZe(e,!0),dWt=({state:e,dispatch:t})=>{let r=e.selection,n=null;return r.ranges.length>1?n=We.create([r.main]):r.main.empty||(n=We.create([We.cursor(r.main.head)])),n?(t(_f(e,n)),!0):!1};function rN(e,t){if(e.state.readOnly)return!1;let r="delete.selection",{state:n}=e,a=n.changeByRange(s=>{let{from:i,to:o}=s;if(i==o){let l=t(s);l<i?(r="delete.backward",l=o2(e,l,!1)):l>i&&(r="delete.forward",l=o2(e,l,!0)),i=Math.min(i,l),o=Math.max(o,l)}else i=o2(e,i,!1),o=o2(e,o,!0);return i==o?{range:s}:{changes:{from:i,to:o},range:We.cursor(i,i<s.head?-1:1)}});return a.changes.empty?!1:(e.dispatch(n.update(a,{scrollIntoView:!0,userEvent:r,effects:r=="delete.selection"?bt.announce.of(n.phrase("Selection deleted")):void 0})),!0)}function o2(e,t,r){if(e instanceof bt)for(let n of e.state.facet(bt.atomicRanges).map(a=>a(e)))n.between(t,t,(a,s)=>{a<t&&s>t&&(t=r?s:a)});return t}const ZZe=(e,t,r)=>rN(e,n=>{let a=n.from,{state:s}=e,i=s.doc.lineAt(a),o,l;if(r&&!t&&a>i.from&&a<i.from+200&&!/[^ \t]/.test(o=i.text.slice(0,a-i.from))){if(o[o.length-1]==" ")return a-1;let c=lf(o,s.tabSize),u=c%hx(s)||hx(s);for(let d=0;d<u&&o[o.length-1-d]==" ";d++)a--;l=a}else l=Ho(i.text,a-i.from,t,t)+i.from,l==a&&i.number!=(t?s.doc.lines:1)?l+=t?1:-1:!t&&/[\ufe00-\ufe0f]/.test(i.text.slice(l-i.from,a-i.from))&&(l=Ho(i.text,l-i.from,!1,!1)+i.from);return l}),MJ=e=>ZZe(e,!1,!0),HZe=e=>ZZe(e,!0,!1),GZe=(e,t)=>rN(e,r=>{let n=r.head,{state:a}=e,s=a.doc.lineAt(n),i=a.charCategorizer(n);for(let o=null;;){if(n==(t?s.to:s.from)){n==r.head&&s.number!=(t?a.doc.lines:1)&&(n+=t?1:-1);break}let l=Ho(s.text,n-s.from,t)+s.from,c=s.text.slice(Math.min(n,l)-s.from,Math.max(n,l)-s.from),u=i(c);if(o!=null&&u!=o)break;(c!=" "||n!=r.head)&&(o=u),n=l}return n}),QZe=e=>GZe(e,!1),pWt=e=>GZe(e,!0),fWt=e=>rN(e,t=>{let r=e.lineBlockAt(t.head).to;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}),hWt=e=>rN(e,t=>{let r=e.moveToLineBoundary(t,!1).head;return t.head>r?r:Math.max(0,t.head-1)}),mWt=e=>rN(e,t=>{let r=e.moveToLineBoundary(t,!0).head;return t.head<r?r:Math.min(e.state.doc.length,t.head+1)}),gWt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(n=>({changes:{from:n.from,to:n.to,insert:Kn.of(["",""])},range:We.cursor(n.from)}));return t(e.update(r,{scrollIntoView:!0,userEvent:"input"})),!0},yWt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=e.changeByRange(n=>{if(!n.empty||n.from==0||n.from==e.doc.length)return{range:n};let a=n.from,s=e.doc.lineAt(a),i=a==s.from?a-1:Ho(s.text,a-s.from,!1)+s.from,o=a==s.to?a+1:Ho(s.text,a-s.from,!0)+s.from;return{changes:{from:i,to:o,insert:e.doc.slice(a,o).append(e.doc.slice(i,a))},range:We.cursor(o)}});return r.changes.empty?!1:(t(e.update(r,{scrollIntoView:!0,userEvent:"move.character"})),!0)};function FL(e){let t=[],r=-1;for(let n of e.selection.ranges){let a=e.doc.lineAt(n.from),s=e.doc.lineAt(n.to);if(!n.empty&&n.to==s.from&&(s=e.doc.lineAt(n.to-1)),r>=a.number){let i=t[t.length-1];i.to=s.to,i.ranges.push(n)}else t.push({from:a.from,to:s.to,ranges:[n]});r=s.number+1}return t}function WZe(e,t,r){if(e.readOnly)return!1;let n=[],a=[];for(let s of FL(e)){if(r?s.to==e.doc.length:s.from==0)continue;let i=e.doc.lineAt(r?s.to+1:s.from-1),o=i.length+1;if(r){n.push({from:s.to,to:i.to},{from:s.from,insert:i.text+e.lineBreak});for(let l of s.ranges)a.push(We.range(Math.min(e.doc.length,l.anchor+o),Math.min(e.doc.length,l.head+o)))}else{n.push({from:i.from,to:s.from},{from:s.to,insert:e.lineBreak+i.text});for(let l of s.ranges)a.push(We.range(l.anchor-o,l.head-o))}}return n.length?(t(e.update({changes:n,scrollIntoView:!0,selection:We.create(a,e.selection.mainIndex),userEvent:"move.line"})),!0):!1}const bWt=({state:e,dispatch:t})=>WZe(e,t,!1),vWt=({state:e,dispatch:t})=>WZe(e,t,!0);function XZe(e,t,r){if(e.readOnly)return!1;let n=[];for(let a of FL(e))r?n.push({from:a.from,insert:e.doc.slice(a.from,a.to)+e.lineBreak}):n.push({from:a.to,insert:e.lineBreak+e.doc.slice(a.from,a.to)});return t(e.update({changes:n,scrollIntoView:!0,userEvent:"input.copyline"})),!0}const xWt=({state:e,dispatch:t})=>XZe(e,t,!1),wWt=({state:e,dispatch:t})=>XZe(e,t,!0),SWt=e=>{if(e.state.readOnly)return!1;let{state:t}=e,r=t.changes(FL(t).map(({from:a,to:s})=>(a>0?a--:s<t.doc.length&&s++,{from:a,to:s}))),n=DO(t.selection,a=>{let s;if(e.lineWrapping){let i=e.lineBlockAt(a.head),o=e.coordsAtPos(a.head,a.assoc||1);o&&(s=i.bottom+e.documentTop-o.bottom+e.defaultLineHeight/2)}return e.moveVertically(a,!0,s)}).map(r);return e.dispatch({changes:r,selection:n,scrollIntoView:!0,userEvent:"delete.line"}),!0};function EWt(e,t){if(/\(\)|\[\]|\{\}/.test(e.sliceDoc(t-1,t+1)))return{from:t,to:t};let r=Ja(e).resolveInner(t),n=r.childBefore(t),a=r.childAfter(t),s;return n&&a&&n.to<=t&&a.from>=t&&(s=n.type.prop(Xr.closedBy))&&s.indexOf(a.name)>-1&&e.doc.lineAt(n.to).from==e.doc.lineAt(a.from).from&&!/\S/.test(e.sliceDoc(n.to,a.from))?{from:n.to,to:a.from}:null}const jke=YZe(!1),OWt=YZe(!0);function YZe(e){return({state:t,dispatch:r})=>{if(t.readOnly)return!1;let n=t.changeByRange(a=>{let{from:s,to:i}=a,o=t.doc.lineAt(s),l=!e&&s==i&&EWt(t,s);e&&(s=i=(i<=o.to?o:t.doc.lineAt(i)).to);let c=new IL(t,{simulateBreak:s,simulateDoubleBreak:!!l}),u=Yie(c,s);for(u==null&&(u=lf(/^\s*/.exec(t.doc.lineAt(s).text)[0],t.tabSize));i<o.to&&/\s/.test(o.text[i-o.from]);)i++;l?{from:s,to:i}=l:s>o.from&&s<o.from+100&&!/\S/.test(o.text.slice(0,s))&&(s=o.from);let d=["",fA(t,u)];return l&&d.push(fA(t,c.lineIndent(o.from,-1))),{changes:{from:s,to:i,insert:Kn.of(d)},range:We.cursor(s+1+d[1].length)}});return r(t.update(n,{scrollIntoView:!0,userEvent:"input"})),!0}}function Doe(e,t){let r=-1;return e.changeByRange(n=>{let a=[];for(let i=n.from;i<=n.to;){let o=e.doc.lineAt(i);o.number>r&&(n.empty||n.to>o.from)&&(t(o,a,n),r=o.number),i=o.to+1}let s=e.changes(a);return{changes:a,range:We.range(s.mapPos(n.anchor,1),s.mapPos(n.head,1))}})}const _Wt=({state:e,dispatch:t})=>{if(e.readOnly)return!1;let r=Object.create(null),n=new IL(e,{overrideIndentation:s=>{let i=r[s];return i??-1}}),a=Doe(e,(s,i,o)=>{let l=Yie(n,s.from);if(l==null)return;/\S/.test(s.text)||(l=0);let c=/^\s*/.exec(s.text)[0],u=fA(e,l);(c!=u||o.from<s.from+c.length)&&(r[s.from]=l,i.push({from:s.from,to:s.from+c.length,insert:u}))});return a.changes.empty||t(e.update(a,{userEvent:"indent"})),!0},KZe=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(Doe(e,(r,n)=>{n.push({from:r.from,insert:e.facet(TO)})}),{userEvent:"input.indent"})),!0),JZe=({state:e,dispatch:t})=>e.readOnly?!1:(t(e.update(Doe(e,(r,n)=>{let a=/^\s*/.exec(r.text)[0];if(!a)return;let s=lf(a,e.tabSize),i=0,o=fA(e,Math.max(0,s-hx(e)));for(;i<a.length&&i<o.length&&a.charCodeAt(i)==o.charCodeAt(i);)i++;n.push({from:r.from+i,to:r.from+a.length,insert:o.slice(i)})}),{userEvent:"delete.dedent"})),!0),kWt=e=>(e.setTabFocusMode(),!0),CWt=[{key:"Ctrl-b",run:TZe,shift:jZe,preventDefault:!0},{key:"Ctrl-f",run:AZe,shift:LZe},{key:"Ctrl-p",run:NZe,shift:zZe},{key:"Ctrl-n",run:RZe,shift:UZe},{key:"Ctrl-a",run:HQt,shift:aWt},{key:"Ctrl-e",run:GQt,shift:sWt},{key:"Ctrl-d",run:HZe},{key:"Ctrl-h",run:MJ},{key:"Ctrl-k",run:fWt},{key:"Ctrl-Alt-h",run:QZe},{key:"Ctrl-o",run:gWt},{key:"Ctrl-t",run:yWt},{key:"Ctrl-v",run:$J}],TWt=[{key:"ArrowLeft",run:TZe,shift:jZe,preventDefault:!0},{key:"Mod-ArrowLeft",mac:"Alt-ArrowLeft",run:jQt,shift:XQt,preventDefault:!0},{mac:"Cmd-ArrowLeft",run:qQt,shift:rWt,preventDefault:!0},{key:"ArrowRight",run:AZe,shift:LZe,preventDefault:!0},{key:"Mod-ArrowRight",mac:"Alt-ArrowRight",run:LQt,shift:YQt,preventDefault:!0},{mac:"Cmd-ArrowRight",run:ZQt,shift:nWt,preventDefault:!0},{key:"ArrowUp",run:NZe,shift:zZe,preventDefault:!0},{mac:"Cmd-ArrowUp",run:Rke,shift:$ke},{mac:"Ctrl-ArrowUp",run:Dke,shift:Ike},{key:"ArrowDown",run:RZe,shift:UZe,preventDefault:!0},{mac:"Cmd-ArrowDown",run:Pke,shift:Mke},{mac:"Ctrl-ArrowDown",run:$J,shift:Nke},{key:"PageUp",run:Dke,shift:Ike},{key:"PageDown",run:$J,shift:Nke},{key:"Home",run:VQt,shift:tWt,preventDefault:!0},{key:"Mod-Home",run:Rke,shift:$ke},{key:"End",run:UQt,shift:eWt,preventDefault:!0},{key:"Mod-End",run:Pke,shift:Mke},{key:"Enter",run:jke,shift:jke},{key:"Mod-a",run:iWt},{key:"Backspace",run:MJ,shift:MJ,preventDefault:!0},{key:"Delete",run:HZe,preventDefault:!0},{key:"Mod-Backspace",mac:"Alt-Backspace",run:QZe,preventDefault:!0},{key:"Mod-Delete",mac:"Alt-Delete",run:pWt,preventDefault:!0},{mac:"Mod-Backspace",run:hWt,preventDefault:!0},{mac:"Mod-Delete",run:mWt,preventDefault:!0}].concat(CWt.map(e=>({mac:e.key,run:e.run,shift:e.shift}))),AWt=[{key:"Alt-ArrowLeft",mac:"Ctrl-ArrowLeft",run:BQt,shift:KQt},{key:"Alt-ArrowRight",mac:"Ctrl-ArrowRight",run:zQt,shift:JQt},{key:"Alt-ArrowUp",run:bWt},{key:"Shift-Alt-ArrowUp",run:xWt},{key:"Alt-ArrowDown",run:vWt},{key:"Shift-Alt-ArrowDown",run:wWt},{key:"Mod-Alt-ArrowUp",run:cWt},{key:"Mod-Alt-ArrowDown",run:uWt},{key:"Escape",run:dWt},{key:"Mod-Enter",run:OWt},{key:"Alt-l",mac:"Ctrl-l",run:oWt},{key:"Mod-i",run:lWt,preventDefault:!0},{key:"Mod-[",run:JZe},{key:"Mod-]",run:KZe},{key:"Mod-Alt-\\",run:_Wt},{key:"Shift-Mod-k",run:SWt},{key:"Shift-Mod-\\",run:WQt},{key:"Mod-/",run:bQt},{key:"Alt-A",run:xQt},{key:"Ctrl-m",mac:"Shift-Alt-m",run:kWt}].concat(TWt),DWt={key:"Tab",run:KZe,shift:JZe},Lke=typeof String.prototype.normalize=="function"?e=>e.normalize("NFKD"):e=>e;class hE{constructor(t,r,n=0,a=t.length,s,i){this.test=i,this.value={from:0,to:0},this.done=!1,this.matches=[],this.buffer="",this.bufferPos=0,this.iter=t.iterRange(n,a),this.bufferStart=n,this.normalize=s?o=>s(Lke(o)):Lke,this.query=this.normalize(r)}peek(){if(this.bufferPos==this.buffer.length){if(this.bufferStart+=this.buffer.length,this.iter.next(),this.iter.done)return-1;this.bufferPos=0,this.buffer=this.iter.value}return xc(this.buffer,this.bufferPos)}next(){for(;this.matches.length;)this.matches.pop();return this.nextOverlapping()}nextOverlapping(){for(;;){let t=this.peek();if(t<0)return this.done=!0,this;let r=$ie(t),n=this.bufferStart+this.bufferPos;this.bufferPos+=th(t);let a=this.normalize(r);if(a.length)for(let s=0,i=n;;s++){let o=a.charCodeAt(s),l=this.match(o,i,this.bufferPos+this.bufferStart);if(s==a.length-1){if(l)return this.value=l,this;break}i==n&&s<r.length&&r.charCodeAt(s)==o&&i++}}}match(t,r,n){let a=null;for(let s=0;s<this.matches.length;s+=2){let i=this.matches[s],o=!1;this.query.charCodeAt(i)==t&&(i==this.query.length-1?a={from:this.matches[s+1],to:n}:(this.matches[s]++,o=!0)),o||(this.matches.splice(s,2),s-=2)}return this.query.charCodeAt(0)==t&&(this.query.length==1?a={from:r,to:n}:this.matches.push(1,r)),a&&this.test&&!this.test(a.from,a.to,this.buffer,this.bufferStart)&&(a=null),a}}typeof Symbol<"u"&&(hE.prototype[Symbol.iterator]=function(){return this});const eHe={from:-1,to:-1,match:/.*/.exec("")},Ioe="gm"+(/x/.unicode==null?"":"u");class tHe{constructor(t,r,n,a=0,s=t.length){if(this.text=t,this.to=s,this.curLine="",this.done=!1,this.value=eHe,/\\[sWDnr]|\n|\r|\[\^/.test(r))return new rHe(t,r,n,a,s);this.re=new RegExp(r,Ioe+(n?.ignoreCase?"i":"")),this.test=n?.test,this.iter=t.iter();let i=t.lineAt(a);this.curLineStart=i.from,this.matchPos=N3(t,a),this.getLine(this.curLineStart)}getLine(t){this.iter.next(t),this.iter.lineBreak?this.curLine="":(this.curLine=this.iter.value,this.curLineStart+this.curLine.length>this.to&&(this.curLine=this.curLine.slice(0,this.to-this.curLineStart)),this.iter.next())}nextLine(){this.curLineStart=this.curLineStart+this.curLine.length+1,this.curLineStart>this.to?this.curLine="":this.getLine(0)}next(){for(let t=this.matchPos-this.curLineStart;;){this.re.lastIndex=t;let r=this.matchPos<=this.to&&this.re.exec(this.curLine);if(r){let n=this.curLineStart+r.index,a=n+r[0].length;if(this.matchPos=N3(this.text,a+(n==a?1:0)),n==this.curLineStart+this.curLine.length&&this.nextLine(),(n<a||n>this.value.to)&&(!this.test||this.test(n,a,r)))return this.value={from:n,to:a,match:r},this;t=this.matchPos-this.curLineStart}else if(this.curLineStart+this.curLine.length<this.to)this.nextLine(),t=0;else return this.done=!0,this}}}const XH=new WeakMap;class AS{constructor(t,r){this.from=t,this.text=r}get to(){return this.from+this.text.length}static get(t,r,n){let a=XH.get(t);if(!a||a.from>=n||a.to<=r){let o=new AS(r,t.sliceString(r,n));return XH.set(t,o),o}if(a.from==r&&a.to==n)return a;let{text:s,from:i}=a;return i>r&&(s=t.sliceString(r,i)+s,i=r),a.to<n&&(s+=t.sliceString(a.to,n)),XH.set(t,new AS(i,s)),new AS(r,s.slice(r-i,n-i))}}class rHe{constructor(t,r,n,a,s){this.text=t,this.to=s,this.done=!1,this.value=eHe,this.matchPos=N3(t,a),this.re=new RegExp(r,Ioe+(n?.ignoreCase?"i":"")),this.test=n?.test,this.flat=AS.get(t,a,this.chunkEnd(a+5e3))}chunkEnd(t){return t>=this.to?this.to:this.text.lineAt(t).to}next(){for(;;){let t=this.re.lastIndex=this.matchPos-this.flat.from,r=this.re.exec(this.flat.text);if(r&&!r[0]&&r.index==t&&(this.re.lastIndex=t+1,r=this.re.exec(this.flat.text)),r){let n=this.flat.from+r.index,a=n+r[0].length;if((this.flat.to>=this.to||r.index+r[0].length<=this.flat.text.length-10)&&(!this.test||this.test(n,a,r)))return this.value={from:n,to:a,match:r},this.matchPos=N3(this.text,a+(n==a?1:0)),this}if(this.flat.to==this.to)return this.done=!0,this;this.flat=AS.get(this.text,this.flat.from,this.chunkEnd(this.flat.from+this.flat.text.length*2))}}}typeof Symbol<"u"&&(tHe.prototype[Symbol.iterator]=rHe.prototype[Symbol.iterator]=function(){return this});function IWt(e){try{return new RegExp(e,Ioe),!0}catch{return!1}}function N3(e,t){if(t>=e.length)return t;let r=e.lineAt(t),n;for(;t<r.to&&(n=r.text.charCodeAt(t-r.from))>=56320&&n<57344;)t++;return t}function jJ(e){let t=String(e.state.doc.lineAt(e.state.selection.main.head).number),r=rs("input",{class:"cm-textfield",name:"line",value:t}),n=rs("form",{class:"cm-gotoLine",onkeydown:s=>{s.keyCode==27?(s.preventDefault(),e.dispatch({effects:rT.of(!1)}),e.focus()):s.keyCode==13&&(s.preventDefault(),a())},onsubmit:s=>{s.preventDefault(),a()}},rs("label",e.state.phrase("Go to line"),": ",r)," ",rs("button",{class:"cm-button",type:"submit"},e.state.phrase("go")),rs("button",{name:"close",onclick:()=>{e.dispatch({effects:rT.of(!1)}),e.focus()},"aria-label":e.state.phrase("close"),type:"button"},["×"]));function a(){let s=/^([+-])?(\d+)?(:\d+)?(%)?$/.exec(r.value);if(!s)return;let{state:i}=e,o=i.doc.lineAt(i.selection.main.head),[,l,c,u,d]=s,f=u?+u.slice(1):0,h=c?+c:o.number;if(c&&d){let b=h/100;l&&(b=b*(l=="-"?-1:1)+o.number/i.doc.lines),h=Math.round(i.doc.lines*b)}else c&&l&&(h=h*(l=="-"?-1:1)+o.number);let g=i.doc.line(Math.max(1,Math.min(i.doc.lines,h))),y=We.cursor(g.from+Math.max(0,Math.min(f,g.length)));e.dispatch({effects:[rT.of(!1),bt.scrollIntoView(y.from,{y:"center"})],selection:y}),e.focus()}return{dom:n}}const rT=nn.define(),Fke=$o.define({create(){return!0},update(e,t){for(let r of t.effects)r.is(rT)&&(e=r.value);return e},provide:e=>pA.from(e,t=>t?jJ:null)}),NWt=e=>{let t=dA(e,jJ);if(!t){let r=[rT.of(!0)];e.state.field(Fke,!1)==null&&r.push(nn.appendConfig.of([Fke,RWt])),e.dispatch({effects:r}),t=dA(e,jJ)}return t&&t.dom.querySelector("input").select(),!0},RWt=bt.baseTheme({".cm-panel.cm-gotoLine":{padding:"2px 6px 4px",position:"relative","& label":{fontSize:"80%"},"& [name=close]":{position:"absolute",top:"0",bottom:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:"0"}}}),PWt={highlightWordAroundCursor:!1,minSelectionLength:1,maxMatches:100,wholeWords:!1},$Wt=Xt.define({combine(e){return Hh(e,PWt,{highlightWordAroundCursor:(t,r)=>t||r,minSelectionLength:Math.min,maxMatches:Math.min})}});function MWt(e){return[zWt,BWt]}const jWt=Er.mark({class:"cm-selectionMatch"}),LWt=Er.mark({class:"cm-selectionMatch cm-selectionMatch-main"});function Bke(e,t,r,n){return(r==0||e(t.sliceDoc(r-1,r))!=Ms.Word)&&(n==t.doc.length||e(t.sliceDoc(n,n+1))!=Ms.Word)}function FWt(e,t,r,n){return e(t.sliceDoc(r,r+1))==Ms.Word&&e(t.sliceDoc(n-1,n))==Ms.Word}const BWt=fi.fromClass(class{constructor(e){this.decorations=this.getDeco(e)}update(e){(e.selectionSet||e.docChanged||e.viewportChanged)&&(this.decorations=this.getDeco(e.view))}getDeco(e){let t=e.state.facet($Wt),{state:r}=e,n=r.selection;if(n.ranges.length>1)return Er.none;let a=n.main,s,i=null;if(a.empty){if(!t.highlightWordAroundCursor)return Er.none;let l=r.wordAt(a.head);if(!l)return Er.none;i=r.charCategorizer(a.head),s=r.sliceDoc(l.from,l.to)}else{let l=a.to-a.from;if(l<t.minSelectionLength||l>200)return Er.none;if(t.wholeWords){if(s=r.sliceDoc(a.from,a.to),i=r.charCategorizer(a.head),!(Bke(i,r,a.from,a.to)&&FWt(i,r,a.from,a.to)))return Er.none}else if(s=r.sliceDoc(a.from,a.to),!s)return Er.none}let o=[];for(let l of e.visibleRanges){let c=new hE(r.doc,s,l.from,l.to);for(;!c.next().done;){let{from:u,to:d}=c.value;if((!i||Bke(i,r,u,d))&&(a.empty&&u<=a.from&&d>=a.to?o.push(LWt.range(u,d)):(u>=a.to||d<=a.from)&&o.push(jWt.range(u,d)),o.length>t.maxMatches))return Er.none}}return Er.set(o)}},{decorations:e=>e.decorations}),zWt=bt.baseTheme({".cm-selectionMatch":{backgroundColor:"#99ff7780"},".cm-searchMatch .cm-selectionMatch":{backgroundColor:"transparent"}}),UWt=({state:e,dispatch:t})=>{let{selection:r}=e,n=We.create(r.ranges.map(a=>e.wordAt(a.head)||We.cursor(a.head)),r.mainIndex);return n.eq(r)?!1:(t(e.update({selection:n})),!0)};function VWt(e,t){let{main:r,ranges:n}=e.selection,a=e.wordAt(r.head),s=a&&a.from==r.from&&a.to==r.to;for(let i=!1,o=new hE(e.doc,t,n[n.length-1].to);;)if(o.next(),o.done){if(i)return null;o=new hE(e.doc,t,0,Math.max(0,n[n.length-1].from-1)),i=!0}else{if(i&&n.some(l=>l.from==o.value.from))continue;if(s){let l=e.wordAt(o.value.from);if(!l||l.from!=o.value.from||l.to!=o.value.to)continue}return o.value}}const qWt=({state:e,dispatch:t})=>{let{ranges:r}=e.selection;if(r.some(s=>s.from===s.to))return UWt({state:e,dispatch:t});let n=e.sliceDoc(r[0].from,r[0].to);if(e.selection.ranges.some(s=>e.sliceDoc(s.from,s.to)!=n))return!1;let a=VWt(e,n);return a?(t(e.update({selection:e.selection.addRange(We.range(a.from,a.to),!1),effects:bt.scrollIntoView(a.to)})),!0):!1},IO=Xt.define({combine(e){return Hh(e,{top:!1,caseSensitive:!1,literal:!1,regexp:!1,wholeWord:!1,createPanel:t=>new rXt(t),scrollToMatch:t=>bt.scrollIntoView(t)})}});class nHe{constructor(t){this.search=t.search,this.caseSensitive=!!t.caseSensitive,this.literal=!!t.literal,this.regexp=!!t.regexp,this.replace=t.replace||"",this.valid=!!this.search&&(!this.regexp||IWt(this.search)),this.unquoted=this.unquote(this.search),this.wholeWord=!!t.wholeWord}unquote(t){return this.literal?t:t.replace(/\\([nrt\\])/g,(r,n)=>n=="n"?`
|
|
164
164
|
`:n=="r"?"\r":n=="t"?" ":"\\")}eq(t){return this.search==t.search&&this.replace==t.replace&&this.caseSensitive==t.caseSensitive&&this.regexp==t.regexp&&this.wholeWord==t.wholeWord}create(){return this.regexp?new QWt(this):new HWt(this)}getCursor(t,r=0,n){let a=t.doc?t:Zn.create({doc:t});return n==null&&(n=a.doc.length),this.regexp?Lw(this,a,r,n):jw(this,a,r,n)}}class aHe{constructor(t){this.spec=t}}function jw(e,t,r,n){return new hE(t.doc,e.unquoted,r,n,e.caseSensitive?void 0:a=>a.toLowerCase(),e.wholeWord?ZWt(t.doc,t.charCategorizer(t.selection.main.head)):void 0)}function ZWt(e,t){return(r,n,a,s)=>((s>r||s+a.length<n)&&(s=Math.max(0,r-2),a=e.sliceString(s,Math.min(e.length,n+2))),(t(R3(a,r-s))!=Ms.Word||t(P3(a,r-s))!=Ms.Word)&&(t(P3(a,n-s))!=Ms.Word||t(R3(a,n-s))!=Ms.Word))}class HWt extends aHe{constructor(t){super(t)}nextMatch(t,r,n){let a=jw(this.spec,t,n,t.doc.length).nextOverlapping();if(a.done){let s=Math.min(t.doc.length,r+this.spec.unquoted.length);a=jw(this.spec,t,0,s).nextOverlapping()}return a.done||a.value.from==r&&a.value.to==n?null:a.value}prevMatchInRange(t,r,n){for(let a=n;;){let s=Math.max(r,a-1e4-this.spec.unquoted.length),i=jw(this.spec,t,s,a),o=null;for(;!i.nextOverlapping().done;)o=i.value;if(o)return o;if(s==r)return null;a-=1e4}}prevMatch(t,r,n){let a=this.prevMatchInRange(t,0,r);return a||(a=this.prevMatchInRange(t,Math.max(0,n-this.spec.unquoted.length),t.doc.length)),a&&(a.from!=r||a.to!=n)?a:null}getReplacement(t){return this.spec.unquote(this.spec.replace)}matchAll(t,r){let n=jw(this.spec,t,0,t.doc.length),a=[];for(;!n.next().done;){if(a.length>=r)return null;a.push(n.value)}return a}highlight(t,r,n,a){let s=jw(this.spec,t,Math.max(0,r-this.spec.unquoted.length),Math.min(n+this.spec.unquoted.length,t.doc.length));for(;!s.next().done;)a(s.value.from,s.value.to)}}function Lw(e,t,r,n){return new tHe(t.doc,e.search,{ignoreCase:!e.caseSensitive,test:e.wholeWord?GWt(t.charCategorizer(t.selection.main.head)):void 0},r,n)}function R3(e,t){return e.slice(Ho(e,t,!1),t)}function P3(e,t){return e.slice(t,Ho(e,t))}function GWt(e){return(t,r,n)=>!n[0].length||(e(R3(n.input,n.index))!=Ms.Word||e(P3(n.input,n.index))!=Ms.Word)&&(e(P3(n.input,n.index+n[0].length))!=Ms.Word||e(R3(n.input,n.index+n[0].length))!=Ms.Word)}class QWt extends aHe{nextMatch(t,r,n){let a=Lw(this.spec,t,n,t.doc.length).next();return a.done&&(a=Lw(this.spec,t,0,r).next()),a.done?null:a.value}prevMatchInRange(t,r,n){for(let a=1;;a++){let s=Math.max(r,n-a*1e4),i=Lw(this.spec,t,s,n),o=null;for(;!i.next().done;)o=i.value;if(o&&(s==r||o.from>s+10))return o;if(s==r)return null}}prevMatch(t,r,n){return this.prevMatchInRange(t,0,r)||this.prevMatchInRange(t,n,t.doc.length)}getReplacement(t){return this.spec.unquote(this.spec.replace).replace(/\$([$&]|\d+)/g,(r,n)=>{if(n=="&")return t.match[0];if(n=="$")return"$";for(let a=n.length;a>0;a--){let s=+n.slice(0,a);if(s>0&&s<t.match.length)return t.match[s]+n.slice(a)}return r})}matchAll(t,r){let n=Lw(this.spec,t,0,t.doc.length),a=[];for(;!n.next().done;){if(a.length>=r)return null;a.push(n.value)}return a}highlight(t,r,n,a){let s=Lw(this.spec,t,Math.max(0,r-250),Math.min(n+250,t.doc.length));for(;!s.next().done;)a(s.value.from,s.value.to)}}const EA=nn.define(),Noe=nn.define(),ub=$o.define({create(e){return new YH(LJ(e).create(),null)},update(e,t){for(let r of t.effects)r.is(EA)?e=new YH(r.value.create(),e.panel):r.is(Noe)&&(e=new YH(e.query,r.value?Roe:null));return e},provide:e=>pA.from(e,t=>t.panel)});class YH{constructor(t,r){this.query=t,this.panel=r}}const WWt=Er.mark({class:"cm-searchMatch"}),XWt=Er.mark({class:"cm-searchMatch cm-searchMatch-selected"}),YWt=fi.fromClass(class{constructor(e){this.view=e,this.decorations=this.highlight(e.state.field(ub))}update(e){let t=e.state.field(ub);(t!=e.startState.field(ub)||e.docChanged||e.selectionSet||e.viewportChanged)&&(this.decorations=this.highlight(t))}highlight({query:e,panel:t}){if(!t||!e.spec.valid)return Er.none;let{view:r}=this,n=new pg;for(let a=0,s=r.visibleRanges,i=s.length;a<i;a++){let{from:o,to:l}=s[a];for(;a<i-1&&l>s[a+1].from-500;)l=s[++a].to;e.highlight(r.state,o,l,(c,u)=>{let d=r.state.selection.ranges.some(f=>f.from==c&&f.to==u);n.add(c,u,d?XWt:WWt)})}return n.finish()}},{decorations:e=>e.decorations});function nN(e){return t=>{let r=t.state.field(ub,!1);return r&&r.query.spec.valid?e(t,r):oHe(t)}}const $3=nN((e,{query:t})=>{let{to:r}=e.state.selection.main,n=t.nextMatch(e.state,r,r);if(!n)return!1;let a=We.single(n.from,n.to),s=e.state.facet(IO);return e.dispatch({selection:a,effects:[Poe(e,n),s.scrollToMatch(a.main,e)],userEvent:"select.search"}),iHe(e),!0}),M3=nN((e,{query:t})=>{let{state:r}=e,{from:n}=r.selection.main,a=t.prevMatch(r,n,n);if(!a)return!1;let s=We.single(a.from,a.to),i=e.state.facet(IO);return e.dispatch({selection:s,effects:[Poe(e,a),i.scrollToMatch(s.main,e)],userEvent:"select.search"}),iHe(e),!0}),KWt=nN((e,{query:t})=>{let r=t.matchAll(e.state,1e3);return!r||!r.length?!1:(e.dispatch({selection:We.create(r.map(n=>We.range(n.from,n.to))),userEvent:"select.search.matches"}),!0)}),JWt=({state:e,dispatch:t})=>{let r=e.selection;if(r.ranges.length>1||r.main.empty)return!1;let{from:n,to:a}=r.main,s=[],i=0;for(let o=new hE(e.doc,e.sliceDoc(n,a));!o.next().done;){if(s.length>1e3)return!1;o.value.from==n&&(i=s.length),s.push(We.range(o.value.from,o.value.to))}return t(e.update({selection:We.create(s,i),userEvent:"select.search.matches"})),!0},zke=nN((e,{query:t})=>{let{state:r}=e,{from:n,to:a}=r.selection.main;if(r.readOnly)return!1;let s=t.nextMatch(r,n,n);if(!s)return!1;let i=s,o=[],l,c,u=[];i.from==n&&i.to==a&&(c=r.toText(t.getReplacement(i)),o.push({from:i.from,to:i.to,insert:c}),i=t.nextMatch(r,i.from,i.to),u.push(bt.announce.of(r.phrase("replaced match on line $",r.doc.lineAt(n).number)+".")));let d=e.state.changes(o);return i&&(l=We.single(i.from,i.to).map(d),u.push(Poe(e,i)),u.push(r.facet(IO).scrollToMatch(l.main,e))),e.dispatch({changes:d,selection:l,effects:u,userEvent:"input.replace"}),!0}),eXt=nN((e,{query:t})=>{if(e.state.readOnly)return!1;let r=t.matchAll(e.state,1e9).map(a=>{let{from:s,to:i}=a;return{from:s,to:i,insert:t.getReplacement(a)}});if(!r.length)return!1;let n=e.state.phrase("replaced $ matches",r.length)+".";return e.dispatch({changes:r,effects:bt.announce.of(n),userEvent:"input.replace.all"}),!0});function Roe(e){return e.state.facet(IO).createPanel(e)}function LJ(e,t){var r,n,a,s,i;let o=e.selection.main,l=o.empty||o.to>o.from+100?"":e.sliceDoc(o.from,o.to);if(t&&!l)return t;let c=e.facet(IO);return new nHe({search:((r=t?.literal)!==null&&r!==void 0?r:c.literal)?l:l.replace(/\n/g,"\\n"),caseSensitive:(n=t?.caseSensitive)!==null&&n!==void 0?n:c.caseSensitive,literal:(a=t?.literal)!==null&&a!==void 0?a:c.literal,regexp:(s=t?.regexp)!==null&&s!==void 0?s:c.regexp,wholeWord:(i=t?.wholeWord)!==null&&i!==void 0?i:c.wholeWord})}function sHe(e){let t=dA(e,Roe);return t&&t.dom.querySelector("[main-field]")}function iHe(e){let t=sHe(e);t&&t==e.root.activeElement&&t.select()}const oHe=e=>{let t=e.state.field(ub,!1);if(t&&t.panel){let r=sHe(e);if(r&&r!=e.root.activeElement){let n=LJ(e.state,t.query.spec);n.valid&&e.dispatch({effects:EA.of(n)}),r.focus(),r.select()}}else e.dispatch({effects:[Noe.of(!0),t?EA.of(LJ(e.state,t.query.spec)):nn.appendConfig.of(aXt)]});return!0},lHe=e=>{let t=e.state.field(ub,!1);if(!t||!t.panel)return!1;let r=dA(e,Roe);return r&&r.dom.contains(e.root.activeElement)&&e.focus(),e.dispatch({effects:Noe.of(!1)}),!0},tXt=[{key:"Mod-f",run:oHe,scope:"editor search-panel"},{key:"F3",run:$3,shift:M3,scope:"editor search-panel",preventDefault:!0},{key:"Mod-g",run:$3,shift:M3,scope:"editor search-panel",preventDefault:!0},{key:"Escape",run:lHe,scope:"editor search-panel"},{key:"Mod-Shift-l",run:JWt},{key:"Mod-Alt-g",run:NWt},{key:"Mod-d",run:qWt,preventDefault:!0}];class rXt{constructor(t){this.view=t;let r=this.query=t.state.field(ub).query.spec;this.commit=this.commit.bind(this),this.searchField=rs("input",{value:r.search,placeholder:mu(t,"Find"),"aria-label":mu(t,"Find"),class:"cm-textfield",name:"search",form:"","main-field":"true",onchange:this.commit,onkeyup:this.commit}),this.replaceField=rs("input",{value:r.replace,placeholder:mu(t,"Replace"),"aria-label":mu(t,"Replace"),class:"cm-textfield",name:"replace",form:"",onchange:this.commit,onkeyup:this.commit}),this.caseField=rs("input",{type:"checkbox",name:"case",form:"",checked:r.caseSensitive,onchange:this.commit}),this.reField=rs("input",{type:"checkbox",name:"re",form:"",checked:r.regexp,onchange:this.commit}),this.wordField=rs("input",{type:"checkbox",name:"word",form:"",checked:r.wholeWord,onchange:this.commit});function n(a,s,i){return rs("button",{class:"cm-button",name:a,onclick:s,type:"button"},i)}this.dom=rs("div",{onkeydown:a=>this.keydown(a),class:"cm-search"},[this.searchField,n("next",()=>$3(t),[mu(t,"next")]),n("prev",()=>M3(t),[mu(t,"previous")]),n("select",()=>KWt(t),[mu(t,"all")]),rs("label",null,[this.caseField,mu(t,"match case")]),rs("label",null,[this.reField,mu(t,"regexp")]),rs("label",null,[this.wordField,mu(t,"by word")]),...t.state.readOnly?[]:[rs("br"),this.replaceField,n("replace",()=>zke(t),[mu(t,"replace")]),n("replaceAll",()=>eXt(t),[mu(t,"replace all")])],rs("button",{name:"close",onclick:()=>lHe(t),"aria-label":mu(t,"close"),type:"button"},["×"])])}commit(){let t=new nHe({search:this.searchField.value,caseSensitive:this.caseField.checked,regexp:this.reField.checked,wholeWord:this.wordField.checked,replace:this.replaceField.value});t.eq(this.query)||(this.query=t,this.view.dispatch({effects:EA.of(t)}))}keydown(t){DUt(this.view,t,"search-panel")?t.preventDefault():t.keyCode==13&&t.target==this.searchField?(t.preventDefault(),(t.shiftKey?M3:$3)(this.view)):t.keyCode==13&&t.target==this.replaceField&&(t.preventDefault(),zke(this.view))}update(t){for(let r of t.transactions)for(let n of r.effects)n.is(EA)&&!n.value.eq(this.query)&&this.setQuery(n.value)}setQuery(t){this.query=t,this.searchField.value=t.search,this.replaceField.value=t.replace,this.caseField.checked=t.caseSensitive,this.reField.checked=t.regexp,this.wordField.checked=t.wholeWord}mount(){this.searchField.select()}get pos(){return 80}get top(){return this.view.state.facet(IO).top}}function mu(e,t){return e.state.phrase(t)}const l2=30,c2=/[\s\.,:;?!]/;function Poe(e,{from:t,to:r}){let n=e.state.doc.lineAt(t),a=e.state.doc.lineAt(r).to,s=Math.max(n.from,t-l2),i=Math.min(a,r+l2),o=e.state.sliceDoc(s,i);if(s!=n.from){for(let l=0;l<l2;l++)if(!c2.test(o[l+1])&&c2.test(o[l])){o=o.slice(l);break}}if(i!=a){for(let l=o.length-1;l>o.length-l2;l--)if(!c2.test(o[l-1])&&c2.test(o[l])){o=o.slice(0,l);break}}return bt.announce.of(`${e.state.phrase("current match")}. ${o} ${e.state.phrase("on line")} ${n.number}.`)}const nXt=bt.baseTheme({".cm-panel.cm-search":{padding:"2px 6px 4px",position:"relative","& [name=close]":{position:"absolute",top:"0",right:"4px",backgroundColor:"inherit",border:"none",font:"inherit",padding:0,margin:0},"& input, & button, & label":{margin:".2em .6em .2em 0"},"& input[type=checkbox]":{marginRight:".2em"},"& label":{fontSize:"80%",whiteSpace:"pre"}},"&light .cm-searchMatch":{backgroundColor:"#ffff0054"},"&dark .cm-searchMatch":{backgroundColor:"#00ffff8a"},"&light .cm-searchMatch-selected":{backgroundColor:"#ff6a0054"},"&dark .cm-searchMatch-selected":{backgroundColor:"#ff00ff8a"}}),aXt=[ub,Dg.low(YWt),nXt];class Uke{constructor(t,r,n){this.from=t,this.to=r,this.diagnostic=n}}class w0{constructor(t,r,n){this.diagnostics=t,this.panel=r,this.selected=n}static init(t,r,n){let a=n.facet(OA).markerFilter;a&&(t=a(t,n));let s=t.slice().sort((u,d)=>u.from-d.from||u.to-d.to),i=new pg,o=[],l=0;for(let u=0;;){let d=u==s.length?null:s[u];if(!d&&!o.length)break;let f,h;for(o.length?(f=l,h=o.reduce((y,b)=>Math.min(y,b.to),d&&d.from>f?d.from:1e8)):(f=d.from,h=d.to,o.push(d),u++);u<s.length;){let y=s[u];if(y.from==f&&(y.to>y.from||y.to==f))o.push(y),u++,h=Math.min(y.to,h);else{h=Math.min(y.from,h);break}}let g=yXt(o);if(o.some(y=>y.from==y.to||y.from==y.to-1&&n.doc.lineAt(y.from).to==y.from))i.add(f,f,Er.widget({widget:new fXt(g),diagnostics:o.slice()}));else{let y=o.reduce((b,w)=>w.markClass?b+" "+w.markClass:b,"");i.add(f,h,Er.mark({class:"cm-lintRange cm-lintRange-"+g+y,diagnostics:o.slice(),inclusiveEnd:o.some(b=>b.to>h)}))}l=h;for(let y=0;y<o.length;y++)o[y].to<=l&&o.splice(y--,1)}let c=i.finish();return new w0(c,r,mE(c))}}function mE(e,t=null,r=0){let n=null;return e.between(r,1e9,(a,s,{spec:i})=>{if(!(t&&i.diagnostics.indexOf(t)<0))if(!n)n=new Uke(a,s,t||i.diagnostics[0]);else{if(i.diagnostics.indexOf(n.diagnostic)<0)return!1;n=new Uke(n.from,s,n.diagnostic)}}),n}function sXt(e,t){let r=t.pos,n=t.end||r,a=e.state.facet(OA).hideOn(e,r,n);if(a!=null)return a;let s=e.startState.doc.lineAt(t.pos);return!!(e.effects.some(i=>i.is(cHe))||e.changes.touchesRange(s.from,Math.max(s.to,n)))}function iXt(e,t){return e.field(Ru,!1)?t:t.concat(nn.appendConfig.of(bXt))}const cHe=nn.define(),$oe=nn.define(),uHe=nn.define(),Ru=$o.define({create(){return new w0(Er.none,null,null)},update(e,t){if(t.docChanged&&e.diagnostics.size){let r=e.diagnostics.map(t.changes),n=null,a=e.panel;if(e.selected){let s=t.changes.mapPos(e.selected.from,1);n=mE(r,e.selected.diagnostic,s)||mE(r,null,s)}!r.size&&a&&t.state.facet(OA).autoPanel&&(a=null),e=new w0(r,a,n)}for(let r of t.effects)if(r.is(cHe)){let n=t.state.facet(OA).autoPanel?r.value.length?_A.open:null:e.panel;e=w0.init(r.value,n,t.state)}else r.is($oe)?e=new w0(e.diagnostics,r.value?_A.open:null,e.selected):r.is(uHe)&&(e=new w0(e.diagnostics,e.panel,r.value));return e},provide:e=>[pA.from(e,t=>t.panel),bt.decorations.from(e,t=>t.diagnostics)]}),oXt=Er.mark({class:"cm-lintRange cm-lintRange-active"});function lXt(e,t,r){let{diagnostics:n}=e.state.field(Ru),a,s=-1,i=-1;n.between(t-(r<0?1:0),t+(r>0?1:0),(l,c,{spec:u})=>{if(t>=l&&t<=c&&(l==c||(t>l||r>0)&&(t<c||r<0)))return a=u.diagnostics,s=l,i=c,!1});let o=e.state.facet(OA).tooltipFilter;return a&&o&&(a=o(a,e.state)),a?{pos:s,end:i,above:e.state.doc.lineAt(s).to<i,create(){return{dom:cXt(e,a)}}}:null}function cXt(e,t){return rs("ul",{class:"cm-tooltip-lint"},t.map(r=>pHe(e,r,!1)))}const uXt=e=>{let t=e.state.field(Ru,!1);(!t||!t.panel)&&e.dispatch({effects:iXt(e.state,[$oe.of(!0)])});let r=dA(e,_A.open);return r&&r.dom.querySelector(".cm-panel-lint ul").focus(),!0},Vke=e=>{let t=e.state.field(Ru,!1);return!t||!t.panel?!1:(e.dispatch({effects:$oe.of(!1)}),!0)},dXt=e=>{let t=e.state.field(Ru,!1);if(!t)return!1;let r=e.state.selection.main,n=t.diagnostics.iter(r.to+1);return!n.value&&(n=t.diagnostics.iter(0),!n.value||n.from==r.from&&n.to==r.to)?!1:(e.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0}),!0)},pXt=[{key:"Mod-Shift-m",run:uXt,preventDefault:!0},{key:"F8",run:dXt}],OA=Xt.define({combine(e){return{sources:e.map(t=>t.source).filter(t=>t!=null),...Hh(e.map(t=>t.config),{delay:750,markerFilter:null,tooltipFilter:null,needsRefresh:null,hideOn:()=>null},{delay:Math.max,markerFilter:qke,tooltipFilter:qke,needsRefresh:(t,r)=>t?r?n=>t(n)||r(n):t:r,hideOn:(t,r)=>t?r?(n,a,s)=>t(n,a,s)||r(n,a,s):t:r,autoPanel:(t,r)=>t||r})}}});function qke(e,t){return e?t?(r,n)=>t(e(r,n),n):e:t}function dHe(e){let t=[];if(e)e:for(let{name:r}of e){for(let n=0;n<r.length;n++){let a=r[n];if(/[a-zA-Z]/.test(a)&&!t.some(s=>s.toLowerCase()==a.toLowerCase())){t.push(a);continue e}}t.push("")}return t}function pHe(e,t,r){var n;let a=r?dHe(t.actions):[];return rs("li",{class:"cm-diagnostic cm-diagnostic-"+t.severity},rs("span",{class:"cm-diagnosticText"},t.renderMessage?t.renderMessage(e):t.message),(n=t.actions)===null||n===void 0?void 0:n.map((s,i)=>{let o=!1,l=h=>{if(h.preventDefault(),o)return;o=!0;let g=mE(e.state.field(Ru).diagnostics,t);g&&s.apply(e,g.from,g.to)},{name:c}=s,u=a[i]?c.indexOf(a[i]):-1,d=u<0?c:[c.slice(0,u),rs("u",c.slice(u,u+1)),c.slice(u+1)],f=s.markClass?" "+s.markClass:"";return rs("button",{type:"button",class:"cm-diagnosticAction"+f,onclick:l,onmousedown:l,"aria-label":` Action: ${c}${u<0?"":` (access key "${a[i]})"`}.`},d)}),t.source&&rs("div",{class:"cm-diagnosticSource"},t.source))}class fXt extends Gh{constructor(t){super(),this.sev=t}eq(t){return t.sev==this.sev}toDOM(){return rs("span",{class:"cm-lintPoint cm-lintPoint-"+this.sev})}}class Zke{constructor(t,r){this.diagnostic=r,this.id="item_"+Math.floor(Math.random()*4294967295).toString(16),this.dom=pHe(t,r,!0),this.dom.id=this.id,this.dom.setAttribute("role","option")}}class _A{constructor(t){this.view=t,this.items=[];let r=a=>{if(a.keyCode==27)Vke(this.view),this.view.focus();else if(a.keyCode==38||a.keyCode==33)this.moveSelection((this.selectedIndex-1+this.items.length)%this.items.length);else if(a.keyCode==40||a.keyCode==34)this.moveSelection((this.selectedIndex+1)%this.items.length);else if(a.keyCode==36)this.moveSelection(0);else if(a.keyCode==35)this.moveSelection(this.items.length-1);else if(a.keyCode==13)this.view.focus();else if(a.keyCode>=65&&a.keyCode<=90&&this.selectedIndex>=0){let{diagnostic:s}=this.items[this.selectedIndex],i=dHe(s.actions);for(let o=0;o<i.length;o++)if(i[o].toUpperCase().charCodeAt(0)==a.keyCode){let l=mE(this.view.state.field(Ru).diagnostics,s);l&&s.actions[o].apply(t,l.from,l.to)}}else return;a.preventDefault()},n=a=>{for(let s=0;s<this.items.length;s++)this.items[s].dom.contains(a.target)&&this.moveSelection(s)};this.list=rs("ul",{tabIndex:0,role:"listbox","aria-label":this.view.state.phrase("Diagnostics"),onkeydown:r,onclick:n}),this.dom=rs("div",{class:"cm-panel-lint"},this.list,rs("button",{type:"button",name:"close","aria-label":this.view.state.phrase("close"),onclick:()=>Vke(this.view)},"×")),this.update()}get selectedIndex(){let t=this.view.state.field(Ru).selected;if(!t)return-1;for(let r=0;r<this.items.length;r++)if(this.items[r].diagnostic==t.diagnostic)return r;return-1}update(){let{diagnostics:t,selected:r}=this.view.state.field(Ru),n=0,a=!1,s=null,i=new Set;for(t.between(0,this.view.state.doc.length,(o,l,{spec:c})=>{for(let u of c.diagnostics){if(i.has(u))continue;i.add(u);let d=-1,f;for(let h=n;h<this.items.length;h++)if(this.items[h].diagnostic==u){d=h;break}d<0?(f=new Zke(this.view,u),this.items.splice(n,0,f),a=!0):(f=this.items[d],d>n&&(this.items.splice(n,d-n),a=!0)),r&&f.diagnostic==r.diagnostic?f.dom.hasAttribute("aria-selected")||(f.dom.setAttribute("aria-selected","true"),s=f):f.dom.hasAttribute("aria-selected")&&f.dom.removeAttribute("aria-selected"),n++}});n<this.items.length&&!(this.items.length==1&&this.items[0].diagnostic.from<0);)a=!0,this.items.pop();this.items.length==0&&(this.items.push(new Zke(this.view,{from:-1,to:-1,severity:"info",message:this.view.state.phrase("No diagnostics")})),a=!0),s?(this.list.setAttribute("aria-activedescendant",s.id),this.view.requestMeasure({key:this,read:()=>({sel:s.dom.getBoundingClientRect(),panel:this.list.getBoundingClientRect()}),write:({sel:o,panel:l})=>{let c=l.height/this.list.offsetHeight;o.top<l.top?this.list.scrollTop-=(l.top-o.top)/c:o.bottom>l.bottom&&(this.list.scrollTop+=(o.bottom-l.bottom)/c)}})):this.selectedIndex<0&&this.list.removeAttribute("aria-activedescendant"),a&&this.sync()}sync(){let t=this.list.firstChild;function r(){let n=t;t=n.nextSibling,n.remove()}for(let n of this.items)if(n.dom.parentNode==this.list){for(;t!=n.dom;)r();t=n.dom.nextSibling}else this.list.insertBefore(n.dom,t);for(;t;)r()}moveSelection(t){if(this.selectedIndex<0)return;let r=this.view.state.field(Ru),n=mE(r.diagnostics,this.items[t].diagnostic);n&&this.view.dispatch({selection:{anchor:n.from,head:n.to},scrollIntoView:!0,effects:uHe.of(n)})}static open(t){return new _A(t)}}function hXt(e,t='viewBox="0 0 40 40"'){return`url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" ${t}>${encodeURIComponent(e)}</svg>')`}function u2(e){return hXt(`<path d="m0 2.5 l2 -1.5 l1 0 l2 1.5 l1 0" stroke="${e}" fill="none" stroke-width=".7"/>`,'width="6" height="3"')}const mXt=bt.baseTheme({".cm-diagnostic":{padding:"3px 6px 3px 8px",marginLeft:"-1px",display:"block",whiteSpace:"pre-wrap"},".cm-diagnostic-error":{borderLeft:"5px solid #d11"},".cm-diagnostic-warning":{borderLeft:"5px solid orange"},".cm-diagnostic-info":{borderLeft:"5px solid #999"},".cm-diagnostic-hint":{borderLeft:"5px solid #66d"},".cm-diagnosticAction":{font:"inherit",border:"none",padding:"2px 4px",backgroundColor:"#444",color:"white",borderRadius:"3px",marginLeft:"8px",cursor:"pointer"},".cm-diagnosticSource":{fontSize:"70%",opacity:.7},".cm-lintRange":{backgroundPosition:"left bottom",backgroundRepeat:"repeat-x",paddingBottom:"0.7px"},".cm-lintRange-error":{backgroundImage:u2("#d11")},".cm-lintRange-warning":{backgroundImage:u2("orange")},".cm-lintRange-info":{backgroundImage:u2("#999")},".cm-lintRange-hint":{backgroundImage:u2("#66d")},".cm-lintRange-active":{backgroundColor:"#ffdd9980"},".cm-tooltip-lint":{padding:0,margin:0},".cm-lintPoint":{position:"relative","&:after":{content:'""',position:"absolute",bottom:0,left:"-2px",borderLeft:"3px solid transparent",borderRight:"3px solid transparent",borderBottom:"4px solid #d11"}},".cm-lintPoint-warning":{"&:after":{borderBottomColor:"orange"}},".cm-lintPoint-info":{"&:after":{borderBottomColor:"#999"}},".cm-lintPoint-hint":{"&:after":{borderBottomColor:"#66d"}},".cm-panel.cm-panel-lint":{position:"relative","& ul":{maxHeight:"100px",overflowY:"auto","& [aria-selected]":{backgroundColor:"#ddd","& u":{textDecoration:"underline"}},"&:focus [aria-selected]":{background_fallback:"#bdf",backgroundColor:"Highlight",color_fallback:"white",color:"HighlightText"},"& u":{textDecoration:"none"},padding:0,margin:0},"& [name=close]":{position:"absolute",top:"0",right:"2px",background:"inherit",border:"none",font:"inherit",padding:0,margin:0}}});function gXt(e){return e=="error"?4:e=="warning"?3:e=="info"?2:1}function yXt(e){let t="hint",r=1;for(let n of e){let a=gXt(n.severity);a>r&&(r=a,t=n.severity)}return t}const bXt=[Ru,bt.decorations.compute([Ru],e=>{let{selected:t,panel:r}=e.field(Ru);return!t||!r||t.from==t.to?Er.none:Er.set([oXt.range(t.from,t.to)])}),yVt(lXt,{hideOn:sXt}),mXt];var Hke=function(t){t===void 0&&(t={});var{crosshairCursor:r=!1}=t,n=[];t.closeBracketsKeymap!==!1&&(n=n.concat(fZt)),t.defaultKeymap!==!1&&(n=n.concat(AWt)),t.searchKeymap!==!1&&(n=n.concat(tXt)),t.historyKeymap!==!1&&(n=n.concat(MQt)),t.foldKeymap!==!1&&(n=n.concat(KVt)),t.completionKeymap!==!1&&(n=n.concat(JVe)),t.lintKeymap!==!1&&(n=n.concat(pXt));var a=[];return t.lineNumbers!==!1&&a.push(TVt()),t.highlightActiveLineGutter!==!1&&a.push(IVt()),t.highlightSpecialChars!==!1&&a.push(HUt()),t.history!==!1&&a.push(CQt()),t.foldGutter!==!1&&a.push(rqt()),t.drawSelection!==!1&&a.push(MUt()),t.dropCursor!==!1&&a.push(zUt()),t.allowMultipleSelections!==!1&&a.push(Zn.allowMultipleSelections.of(!0)),t.indentOnInput!==!1&&a.push(qVt()),t.syntaxHighlighting!==!1&&a.push(RL(iqt,{fallback:!0})),t.bracketMatching!==!1&&a.push(fqt()),t.closeBrackets!==!1&&a.push(cZt()),t.autocompletion!==!1&&a.push(KVe()),t.rectangularSelection!==!1&&a.push(iVt()),r!==!1&&a.push(cVt()),t.highlightActiveLine!==!1&&a.push(KUt()),t.highlightSelectionMatches!==!1&&a.push(MWt()),t.tabSize&&typeof t.tabSize=="number"&&a.push(TO.of(" ".repeat(t.tabSize))),a.concat([CO.of(n.flat())]).filter(Boolean)};const vXt="#e5c07b",Gke="#e06c75",xXt="#56b6c2",wXt="#ffffff",nM="#abb2bf",FJ="#7d8799",SXt="#61afef",EXt="#98c379",Qke="#d19a66",OXt="#c678dd",_Xt="#21252b",Wke="#2c313a",Xke="#282c34",KH="#353a42",kXt="#3E4451",Yke="#528bff",CXt=bt.theme({"&":{color:nM,backgroundColor:Xke},".cm-content":{caretColor:Yke},".cm-cursor, .cm-dropCursor":{borderLeftColor:Yke},"&.cm-focused > .cm-scroller > .cm-selectionLayer .cm-selectionBackground, .cm-selectionBackground, .cm-content ::selection":{backgroundColor:kXt},".cm-panels":{backgroundColor:_Xt,color:nM},".cm-panels.cm-panels-top":{borderBottom:"2px solid black"},".cm-panels.cm-panels-bottom":{borderTop:"2px solid black"},".cm-searchMatch":{backgroundColor:"#72a1ff59",outline:"1px solid #457dff"},".cm-searchMatch.cm-searchMatch-selected":{backgroundColor:"#6199ff2f"},".cm-activeLine":{backgroundColor:"#6699ff0b"},".cm-selectionMatch":{backgroundColor:"#aafe661a"},"&.cm-focused .cm-matchingBracket, &.cm-focused .cm-nonmatchingBracket":{backgroundColor:"#bad0f847"},".cm-gutters":{backgroundColor:Xke,color:FJ,border:"none"},".cm-activeLineGutter":{backgroundColor:Wke},".cm-foldPlaceholder":{backgroundColor:"transparent",border:"none",color:"#ddd"},".cm-tooltip":{border:"none",backgroundColor:KH},".cm-tooltip .cm-tooltip-arrow:before":{borderTopColor:"transparent",borderBottomColor:"transparent"},".cm-tooltip .cm-tooltip-arrow:after":{borderTopColor:KH,borderBottomColor:KH},".cm-tooltip-autocomplete":{"& > ul > li[aria-selected]":{backgroundColor:Wke,color:nM}}},{dark:!0}),TXt=i1.define([{tag:ee.keyword,color:OXt},{tag:[ee.name,ee.deleted,ee.character,ee.propertyName,ee.macroName],color:Gke},{tag:[ee.function(ee.variableName),ee.labelName],color:SXt},{tag:[ee.color,ee.constant(ee.name),ee.standard(ee.name)],color:Qke},{tag:[ee.definition(ee.name),ee.separator],color:nM},{tag:[ee.typeName,ee.className,ee.number,ee.changed,ee.annotation,ee.modifier,ee.self,ee.namespace],color:vXt},{tag:[ee.operator,ee.operatorKeyword,ee.url,ee.escape,ee.regexp,ee.link,ee.special(ee.string)],color:xXt},{tag:[ee.meta,ee.comment],color:FJ},{tag:ee.strong,fontWeight:"bold"},{tag:ee.emphasis,fontStyle:"italic"},{tag:ee.strikethrough,textDecoration:"line-through"},{tag:ee.link,color:FJ,textDecoration:"underline"},{tag:ee.heading,fontWeight:"bold",color:Gke},{tag:[ee.atom,ee.bool,ee.special(ee.variableName)],color:Qke},{tag:[ee.processingInstruction,ee.string,ee.inserted],color:EXt},{tag:ee.invalid,color:wXt}]),AXt=[CXt,RL(TXt)];var DXt=bt.theme({"&":{backgroundColor:"#fff"}},{dark:!1}),IXt=function(t){t===void 0&&(t={});var{indentWithTab:r=!0,editable:n=!0,readOnly:a=!1,theme:s="light",placeholder:i="",basicSetup:o=!0}=t,l=[];switch(r&&l.unshift(CO.of([DWt])),o&&(typeof o=="boolean"?l.unshift(Hke()):l.unshift(Hke(o))),i&&l.unshift(rVt(i)),s){case"light":l.push(DXt);break;case"dark":l.push(AXt);break;case"none":break;default:l.push(s);break}return n===!1&&l.push(bt.editable.of(!1)),a&&l.push(Zn.readOnly.of(!0)),[...l]},NXt=e=>({line:e.state.doc.lineAt(e.state.selection.main.from),lineCount:e.state.doc.lines,lineBreak:e.state.lineBreak,length:e.state.doc.length,readOnly:e.state.readOnly,tabSize:e.state.tabSize,selection:e.state.selection,selectionAsSingle:e.state.selection.asSingle().main,ranges:e.state.selection.ranges,selectionCode:e.state.sliceDoc(e.state.selection.main.from,e.state.selection.main.to),selections:e.state.selection.ranges.map(t=>e.state.sliceDoc(t.from,t.to)),selectedText:e.state.selection.ranges.some(t=>!t.empty)});class RXt{constructor(t,r){this.timeLeftMS=void 0,this.timeoutMS=void 0,this.isCancelled=!1,this.isTimeExhausted=!1,this.callbacks=[],this.timeLeftMS=r,this.timeoutMS=r,this.callbacks.push(t)}tick(){if(!this.isCancelled&&!this.isTimeExhausted&&(this.timeLeftMS--,this.timeLeftMS<=0)){this.isTimeExhausted=!0;var t=this.callbacks.slice();this.callbacks.length=0,t.forEach(r=>{try{r()}catch(n){console.error("TimeoutLatch callback error:",n)}})}}cancel(){this.isCancelled=!0,this.callbacks.length=0}reset(){this.timeLeftMS=this.timeoutMS,this.isCancelled=!1,this.isTimeExhausted=!1}get isDone(){return this.isCancelled||this.isTimeExhausted}}let Kke=class{constructor(){this.interval=null,this.latches=new Set}add(t){this.latches.add(t),this.start()}remove(t){this.latches.delete(t),this.latches.size===0&&this.stop()}start(){this.interval===null&&(this.interval=setInterval(()=>{this.latches.forEach(t=>{t.tick(),t.isDone&&this.remove(t)})},1))}stop(){this.interval!==null&&(clearInterval(this.interval),this.interval=null)}};var JH=null,PXt=()=>typeof window>"u"?new Kke:(JH||(JH=new Kke),JH),Jke=Zh.define(),$Xt=200,MXt=[];function jXt(e){var{value:t,selection:r,onChange:n,onStatistics:a,onCreateEditor:s,onUpdate:i,extensions:o=MXt,autoFocus:l,theme:c="light",height:u=null,minHeight:d=null,maxHeight:f=null,width:h=null,minWidth:g=null,maxWidth:y=null,placeholder:b="",editable:w=!0,readOnly:x=!1,indentWithTab:S=!0,basicSetup:E=!0,root:C,initialState:k}=e,[A,D]=_.useState(),[N,P]=_.useState(),[j,z]=_.useState(),U=_.useState(()=>({current:null}))[0],$=_.useState(()=>({current:null}))[0],F=bt.theme({"&":{height:u,minHeight:d,maxHeight:f,width:h,minWidth:g,maxWidth:y},"& .cm-scroller":{height:"100% !important"}}),V=bt.updateListener.of(Q=>{if(Q.docChanged&&typeof n=="function"&&!Q.transactions.some(q=>q.annotation(Jke))){U.current?U.current.reset():(U.current=new RXt(()=>{if($.current){var q=$.current;$.current=null,q()}U.current=null},$Xt),PXt().add(U.current));var M=Q.state.doc,W=M.toString();n(W,Q)}a&&a(NXt(Q))}),H=IXt({theme:c,editable:w,readOnly:x,placeholder:b,indentWithTab:S,basicSetup:E}),B=[V,F,...H];return i&&typeof i=="function"&&B.push(bt.updateListener.of(i)),B=B.concat(o),_.useLayoutEffect(()=>{if(A&&!j){var Q={doc:t,selection:r,extensions:B},M=k?Zn.fromJSON(k.json,Q,k.fields):Zn.create(Q);if(z(M),!N){var W=new bt({state:M,parent:A,root:C});P(W),s&&s(W,M)}}return()=>{N&&(z(void 0),P(void 0))}},[A,j]),_.useEffect(()=>{e.container&&D(e.container)},[e.container]),_.useEffect(()=>()=>{N&&(N.destroy(),P(void 0)),U.current&&(U.current.cancel(),U.current=null)},[N]),_.useEffect(()=>{l&&N&&N.focus()},[l,N]),_.useEffect(()=>{N&&N.dispatch({effects:nn.reconfigure.of(B)})},[c,o,u,d,f,h,g,y,b,w,x,S,E,n,i]),_.useEffect(()=>{if(t!==void 0){var Q=N?N.state.doc.toString():"";if(N&&t!==Q){var M=U.current&&!U.current.isDone,W=()=>{N&&t!==N.state.doc.toString()&&N.dispatch({changes:{from:0,to:N.state.doc.toString().length,insert:t||""},annotations:[Jke.of(!0)]})};M?$.current=W:W()}}},[t,N]),{state:j,setState:z,view:N,setView:P,container:A,setContainer:D}}var LXt=["className","value","selection","extensions","onChange","onStatistics","onCreateEditor","onUpdate","autoFocus","theme","height","minHeight","maxHeight","width","minWidth","maxWidth","basicSetup","placeholder","indentWithTab","editable","readOnly","root","initialState"],Qu=_.forwardRef((e,t)=>{var{className:r,value:n="",selection:a,extensions:s=[],onChange:i,onStatistics:o,onCreateEditor:l,onUpdate:c,autoFocus:u,theme:d="light",height:f,minHeight:h,maxHeight:g,width:y,minWidth:b,maxWidth:w,basicSetup:x,placeholder:S,indentWithTab:E,editable:C,readOnly:k,root:A,initialState:D}=e,N=Use(e,LXt),P=_.useRef(null),{state:j,view:z,container:U,setContainer:$}=jXt({root:A,value:n,autoFocus:u,theme:d,height:f,minHeight:h,maxHeight:g,width:y,minWidth:b,maxWidth:w,basicSetup:x,placeholder:S,indentWithTab:E,editable:C,readOnly:k,selection:a,onChange:i,onStatistics:o,onCreateEditor:l,onUpdate:c,extensions:s,initialState:D});_.useImperativeHandle(t,()=>({editor:P.current,state:j,view:z}),[P,U,j,z]);var F=_.useCallback(H=>{P.current=H,$(H)},[$]);if(typeof n!="string")throw new Error("value must be typeof string but got "+typeof n);var V=typeof d=="string"?"cm-theme-"+d:"cm-theme";return p.jsx("div",Th({ref:F,className:""+V+(r?" "+r:"")},N))});Qu.displayName="CodeMirror";function FXt(e){if(typeof document>"u")return;let t=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");r.type="text/css",t.appendChild(r),r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e))}const BXt=e=>{switch(e){case"success":return VXt;case"info":return ZXt;case"warning":return qXt;case"error":return HXt;default:return null}},zXt=Array(12).fill(0),UXt=({visible:e,className:t})=>we.createElement("div",{className:["sonner-loading-wrapper",t].filter(Boolean).join(" "),"data-visible":e},we.createElement("div",{className:"sonner-spinner"},zXt.map((r,n)=>we.createElement("div",{className:"sonner-loading-bar",key:`spinner-bar-${n}`})))),VXt=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},we.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z",clipRule:"evenodd"})),qXt=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor",height:"20",width:"20"},we.createElement("path",{fillRule:"evenodd",d:"M9.401 3.003c1.155-2 4.043-2 5.197 0l7.355 12.748c1.154 2-.29 4.5-2.599 4.5H4.645c-2.309 0-3.752-2.5-2.598-4.5L9.4 3.003zM12 8.25a.75.75 0 01.75.75v3.75a.75.75 0 01-1.5 0V9a.75.75 0 01.75-.75zm0 8.25a.75.75 0 100-1.5.75.75 0 000 1.5z",clipRule:"evenodd"})),ZXt=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},we.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a.75.75 0 000 1.5h.253a.25.25 0 01.244.304l-.459 2.066A1.75 1.75 0 0010.747 15H11a.75.75 0 000-1.5h-.253a.25.25 0 01-.244-.304l.459-2.066A1.75 1.75 0 009.253 9H9z",clipRule:"evenodd"})),HXt=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor",height:"20",width:"20"},we.createElement("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-8-5a.75.75 0 01.75.75v4.5a.75.75 0 01-1.5 0v-4.5A.75.75 0 0110 5zm0 10a1 1 0 100-2 1 1 0 000 2z",clipRule:"evenodd"})),GXt=we.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"},we.createElement("line",{x1:"18",y1:"6",x2:"6",y2:"18"}),we.createElement("line",{x1:"6",y1:"6",x2:"18",y2:"18"})),QXt=()=>{const[e,t]=we.useState(document.hidden);return we.useEffect(()=>{const r=()=>{t(document.hidden)};return document.addEventListener("visibilitychange",r),()=>window.removeEventListener("visibilitychange",r)},[]),e};let BJ=1;class WXt{constructor(){this.subscribe=t=>(this.subscribers.push(t),()=>{const r=this.subscribers.indexOf(t);this.subscribers.splice(r,1)}),this.publish=t=>{this.subscribers.forEach(r=>r(t))},this.addToast=t=>{this.publish(t),this.toasts=[...this.toasts,t]},this.create=t=>{var r;const{message:n,...a}=t,s=typeof t?.id=="number"||((r=t.id)==null?void 0:r.length)>0?t.id:BJ++,i=this.toasts.find(l=>l.id===s),o=t.dismissible===void 0?!0:t.dismissible;return this.dismissedToasts.has(s)&&this.dismissedToasts.delete(s),i?this.toasts=this.toasts.map(l=>l.id===s?(this.publish({...l,...t,id:s,title:n}),{...l,...t,id:s,dismissible:o,title:n}):l):this.addToast({title:n,...a,dismissible:o,id:s}),s},this.dismiss=t=>(t?(this.dismissedToasts.add(t),requestAnimationFrame(()=>this.subscribers.forEach(r=>r({id:t,dismiss:!0})))):this.toasts.forEach(r=>{this.subscribers.forEach(n=>n({id:r.id,dismiss:!0}))}),t),this.message=(t,r)=>this.create({...r,message:t}),this.error=(t,r)=>this.create({...r,message:t,type:"error"}),this.success=(t,r)=>this.create({...r,type:"success",message:t}),this.info=(t,r)=>this.create({...r,type:"info",message:t}),this.warning=(t,r)=>this.create({...r,type:"warning",message:t}),this.loading=(t,r)=>this.create({...r,type:"loading",message:t}),this.promise=(t,r)=>{if(!r)return;let n;r.loading!==void 0&&(n=this.create({...r,promise:t,type:"loading",message:r.loading,description:typeof r.description!="function"?r.description:void 0}));const a=Promise.resolve(t instanceof Function?t():t);let s=n!==void 0,i;const o=a.then(async c=>{if(i=["resolve",c],we.isValidElement(c))s=!1,this.create({id:n,type:"default",message:c});else if(YXt(c)&&!c.ok){s=!1;const d=typeof r.error=="function"?await r.error(`HTTP error! status: ${c.status}`):r.error,f=typeof r.description=="function"?await r.description(`HTTP error! status: ${c.status}`):r.description,g=typeof d=="object"&&!we.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:f,...g})}else if(c instanceof Error){s=!1;const d=typeof r.error=="function"?await r.error(c):r.error,f=typeof r.description=="function"?await r.description(c):r.description,g=typeof d=="object"&&!we.isValidElement(d)?d:{message:d};this.create({id:n,type:"error",description:f,...g})}else if(r.success!==void 0){s=!1;const d=typeof r.success=="function"?await r.success(c):r.success,f=typeof r.description=="function"?await r.description(c):r.description,g=typeof d=="object"&&!we.isValidElement(d)?d:{message:d};this.create({id:n,type:"success",description:f,...g})}}).catch(async c=>{if(i=["reject",c],r.error!==void 0){s=!1;const u=typeof r.error=="function"?await r.error(c):r.error,d=typeof r.description=="function"?await r.description(c):r.description,h=typeof u=="object"&&!we.isValidElement(u)?u:{message:u};this.create({id:n,type:"error",description:d,...h})}}).finally(()=>{s&&(this.dismiss(n),n=void 0),r.finally==null||r.finally.call(r)}),l=()=>new Promise((c,u)=>o.then(()=>i[0]==="reject"?u(i[1]):c(i[1])).catch(u));return typeof n!="string"&&typeof n!="number"?{unwrap:l}:Object.assign(n,{unwrap:l})},this.custom=(t,r)=>{const n=r?.id||BJ++;return this.create({jsx:t(n),id:n,...r}),n},this.getActiveToasts=()=>this.toasts.filter(t=>!this.dismissedToasts.has(t.id)),this.subscribers=[],this.toasts=[],this.dismissedToasts=new Set}}const mc=new WXt,XXt=(e,t)=>{const r=t?.id||BJ++;return mc.addToast({title:e,...t,id:r}),r},YXt=e=>e&&typeof e=="object"&&"ok"in e&&typeof e.ok=="boolean"&&"status"in e&&typeof e.status=="number",KXt=XXt,JXt=()=>mc.toasts,eYt=()=>mc.getActiveToasts(),$c=Object.assign(KXt,{success:mc.success,info:mc.info,warning:mc.warning,error:mc.error,custom:mc.custom,message:mc.message,promise:mc.promise,dismiss:mc.dismiss,loading:mc.loading},{getHistory:JXt,getToasts:eYt});FXt("[data-sonner-toaster][dir=ltr],html[dir=ltr]{--toast-icon-margin-start:-3px;--toast-icon-margin-end:4px;--toast-svg-margin-start:-1px;--toast-svg-margin-end:0px;--toast-button-margin-start:auto;--toast-button-margin-end:0;--toast-close-button-start:0;--toast-close-button-end:unset;--toast-close-button-transform:translate(-35%, -35%)}[data-sonner-toaster][dir=rtl],html[dir=rtl]{--toast-icon-margin-start:4px;--toast-icon-margin-end:-3px;--toast-svg-margin-start:0px;--toast-svg-margin-end:-1px;--toast-button-margin-start:0;--toast-button-margin-end:auto;--toast-close-button-start:unset;--toast-close-button-end:0;--toast-close-button-transform:translate(35%, -35%)}[data-sonner-toaster]{position:fixed;width:var(--width);font-family:ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Helvetica Neue,Arial,Noto Sans,sans-serif,Apple Color Emoji,Segoe UI Emoji,Segoe UI Symbol,Noto Color Emoji;--gray1:hsl(0, 0%, 99%);--gray2:hsl(0, 0%, 97.3%);--gray3:hsl(0, 0%, 95.1%);--gray4:hsl(0, 0%, 93%);--gray5:hsl(0, 0%, 90.9%);--gray6:hsl(0, 0%, 88.7%);--gray7:hsl(0, 0%, 85.8%);--gray8:hsl(0, 0%, 78%);--gray9:hsl(0, 0%, 56.1%);--gray10:hsl(0, 0%, 52.3%);--gray11:hsl(0, 0%, 43.5%);--gray12:hsl(0, 0%, 9%);--border-radius:8px;box-sizing:border-box;padding:0;margin:0;list-style:none;outline:0;z-index:999999999;transition:transform .4s ease}@media (hover:none) and (pointer:coarse){[data-sonner-toaster][data-lifted=true]{transform:none}}[data-sonner-toaster][data-x-position=right]{right:var(--offset-right)}[data-sonner-toaster][data-x-position=left]{left:var(--offset-left)}[data-sonner-toaster][data-x-position=center]{left:50%;transform:translateX(-50%)}[data-sonner-toaster][data-y-position=top]{top:var(--offset-top)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--offset-bottom)}[data-sonner-toast]{--y:translateY(100%);--lift-amount:calc(var(--lift) * var(--gap));z-index:var(--z-index);position:absolute;opacity:0;transform:var(--y);touch-action:none;transition:transform .4s,opacity .4s,height .4s,box-shadow .2s;box-sizing:border-box;outline:0;overflow-wrap:anywhere}[data-sonner-toast][data-styled=true]{padding:16px;background:var(--normal-bg);border:1px solid var(--normal-border);color:var(--normal-text);border-radius:var(--border-radius);box-shadow:0 4px 12px rgba(0,0,0,.1);width:var(--width);font-size:13px;display:flex;align-items:center;gap:6px}[data-sonner-toast]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-y-position=top]{top:0;--y:translateY(-100%);--lift:1;--lift-amount:calc(1 * var(--gap))}[data-sonner-toast][data-y-position=bottom]{bottom:0;--y:translateY(100%);--lift:-1;--lift-amount:calc(var(--lift) * var(--gap))}[data-sonner-toast][data-styled=true] [data-description]{font-weight:400;line-height:1.4;color:#3f3f3f}[data-rich-colors=true][data-sonner-toast][data-styled=true] [data-description]{color:inherit}[data-sonner-toaster][data-sonner-theme=dark] [data-description]{color:#e8e8e8}[data-sonner-toast][data-styled=true] [data-title]{font-weight:500;line-height:1.5;color:inherit}[data-sonner-toast][data-styled=true] [data-icon]{display:flex;height:16px;width:16px;position:relative;justify-content:flex-start;align-items:center;flex-shrink:0;margin-left:var(--toast-icon-margin-start);margin-right:var(--toast-icon-margin-end)}[data-sonner-toast][data-promise=true] [data-icon]>svg{opacity:0;transform:scale(.8);transform-origin:center;animation:sonner-fade-in .3s ease forwards}[data-sonner-toast][data-styled=true] [data-icon]>*{flex-shrink:0}[data-sonner-toast][data-styled=true] [data-icon] svg{margin-left:var(--toast-svg-margin-start);margin-right:var(--toast-svg-margin-end)}[data-sonner-toast][data-styled=true] [data-content]{display:flex;flex-direction:column;gap:2px}[data-sonner-toast][data-styled=true] [data-button]{border-radius:4px;padding-left:8px;padding-right:8px;height:24px;font-size:12px;color:var(--normal-bg);background:var(--normal-text);margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end);border:none;font-weight:500;cursor:pointer;outline:0;display:flex;align-items:center;flex-shrink:0;transition:opacity .4s,box-shadow .2s}[data-sonner-toast][data-styled=true] [data-button]:focus-visible{box-shadow:0 0 0 2px rgba(0,0,0,.4)}[data-sonner-toast][data-styled=true] [data-button]:first-of-type{margin-left:var(--toast-button-margin-start);margin-right:var(--toast-button-margin-end)}[data-sonner-toast][data-styled=true] [data-cancel]{color:var(--normal-text);background:rgba(0,0,0,.08)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-styled=true] [data-cancel]{background:rgba(255,255,255,.3)}[data-sonner-toast][data-styled=true] [data-close-button]{position:absolute;left:var(--toast-close-button-start);right:var(--toast-close-button-end);top:0;height:20px;width:20px;display:flex;justify-content:center;align-items:center;padding:0;color:var(--gray12);background:var(--normal-bg);border:1px solid var(--gray4);transform:var(--toast-close-button-transform);border-radius:50%;cursor:pointer;z-index:1;transition:opacity .1s,background .2s,border-color .2s}[data-sonner-toast][data-styled=true] [data-close-button]:focus-visible{box-shadow:0 4px 12px rgba(0,0,0,.1),0 0 0 2px rgba(0,0,0,.2)}[data-sonner-toast][data-styled=true] [data-disabled=true]{cursor:not-allowed}[data-sonner-toast][data-styled=true]:hover [data-close-button]:hover{background:var(--gray2);border-color:var(--gray5)}[data-sonner-toast][data-swiping=true]::before{content:'';position:absolute;left:-100%;right:-100%;height:100%;z-index:-1}[data-sonner-toast][data-y-position=top][data-swiping=true]::before{bottom:50%;transform:scaleY(3) translateY(50%)}[data-sonner-toast][data-y-position=bottom][data-swiping=true]::before{top:50%;transform:scaleY(3) translateY(-50%)}[data-sonner-toast][data-swiping=false][data-removed=true]::before{content:'';position:absolute;inset:0;transform:scaleY(2)}[data-sonner-toast][data-expanded=true]::after{content:'';position:absolute;left:0;height:calc(var(--gap) + 1px);bottom:100%;width:100%}[data-sonner-toast][data-mounted=true]{--y:translateY(0);opacity:1}[data-sonner-toast][data-expanded=false][data-front=false]{--scale:var(--toasts-before) * 0.05 + 1;--y:translateY(calc(var(--lift-amount) * var(--toasts-before))) scale(calc(-1 * var(--scale)));height:var(--front-toast-height)}[data-sonner-toast]>*{transition:opacity .4s}[data-sonner-toast][data-x-position=right]{right:0}[data-sonner-toast][data-x-position=left]{left:0}[data-sonner-toast][data-expanded=false][data-front=false][data-styled=true]>*{opacity:0}[data-sonner-toast][data-visible=false]{opacity:0;pointer-events:none}[data-sonner-toast][data-mounted=true][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset)));height:var(--initial-height)}[data-sonner-toast][data-removed=true][data-front=true][data-swipe-out=false]{--y:translateY(calc(var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=true]{--y:translateY(calc(var(--lift) * var(--offset) + var(--lift) * -100%));opacity:0}[data-sonner-toast][data-removed=true][data-front=false][data-swipe-out=false][data-expanded=false]{--y:translateY(40%);opacity:0;transition:transform .5s,opacity .2s}[data-sonner-toast][data-removed=true][data-front=false]::before{height:calc(var(--initial-height) + 20%)}[data-sonner-toast][data-swiping=true]{transform:var(--y) translateY(var(--swipe-amount-y,0)) translateX(var(--swipe-amount-x,0));transition:none}[data-sonner-toast][data-swiped=true]{user-select:none}[data-sonner-toast][data-swipe-out=true][data-y-position=bottom],[data-sonner-toast][data-swipe-out=true][data-y-position=top]{animation-duration:.2s;animation-timing-function:ease-out;animation-fill-mode:forwards}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=left]{animation-name:swipe-out-left}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=right]{animation-name:swipe-out-right}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=up]{animation-name:swipe-out-up}[data-sonner-toast][data-swipe-out=true][data-swipe-direction=down]{animation-name:swipe-out-down}@keyframes swipe-out-left{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) - 100%));opacity:0}}@keyframes swipe-out-right{from{transform:var(--y) translateX(var(--swipe-amount-x));opacity:1}to{transform:var(--y) translateX(calc(var(--swipe-amount-x) + 100%));opacity:0}}@keyframes swipe-out-up{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) - 100%));opacity:0}}@keyframes swipe-out-down{from{transform:var(--y) translateY(var(--swipe-amount-y));opacity:1}to{transform:var(--y) translateY(calc(var(--swipe-amount-y) + 100%));opacity:0}}@media (max-width:600px){[data-sonner-toaster]{position:fixed;right:var(--mobile-offset-right);left:var(--mobile-offset-left);width:100%}[data-sonner-toaster][dir=rtl]{left:calc(var(--mobile-offset-left) * -1)}[data-sonner-toaster] [data-sonner-toast]{left:0;right:0;width:calc(100% - var(--mobile-offset-left) * 2)}[data-sonner-toaster][data-x-position=left]{left:var(--mobile-offset-left)}[data-sonner-toaster][data-y-position=bottom]{bottom:var(--mobile-offset-bottom)}[data-sonner-toaster][data-y-position=top]{top:var(--mobile-offset-top)}[data-sonner-toaster][data-x-position=center]{left:var(--mobile-offset-left);right:var(--mobile-offset-right);transform:none}}[data-sonner-toaster][data-sonner-theme=light]{--normal-bg:#fff;--normal-border:var(--gray4);--normal-text:var(--gray12);--success-bg:hsl(143, 85%, 96%);--success-border:hsl(145, 92%, 87%);--success-text:hsl(140, 100%, 27%);--info-bg:hsl(208, 100%, 97%);--info-border:hsl(221, 91%, 93%);--info-text:hsl(210, 92%, 45%);--warning-bg:hsl(49, 100%, 97%);--warning-border:hsl(49, 91%, 84%);--warning-text:hsl(31, 92%, 45%);--error-bg:hsl(359, 100%, 97%);--error-border:hsl(359, 100%, 94%);--error-text:hsl(360, 100%, 45%)}[data-sonner-toaster][data-sonner-theme=light] [data-sonner-toast][data-invert=true]{--normal-bg:#000;--normal-border:hsl(0, 0%, 20%);--normal-text:var(--gray1)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast][data-invert=true]{--normal-bg:#fff;--normal-border:var(--gray3);--normal-text:var(--gray12)}[data-sonner-toaster][data-sonner-theme=dark]{--normal-bg:#000;--normal-bg-hover:hsl(0, 0%, 12%);--normal-border:hsl(0, 0%, 20%);--normal-border-hover:hsl(0, 0%, 25%);--normal-text:var(--gray1);--success-bg:hsl(150, 100%, 6%);--success-border:hsl(147, 100%, 12%);--success-text:hsl(150, 86%, 65%);--info-bg:hsl(215, 100%, 6%);--info-border:hsl(223, 43%, 17%);--info-text:hsl(216, 87%, 65%);--warning-bg:hsl(64, 100%, 6%);--warning-border:hsl(60, 100%, 9%);--warning-text:hsl(46, 87%, 65%);--error-bg:hsl(358, 76%, 10%);--error-border:hsl(357, 89%, 16%);--error-text:hsl(358, 100%, 81%)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]{background:var(--normal-bg);border-color:var(--normal-border);color:var(--normal-text)}[data-sonner-toaster][data-sonner-theme=dark] [data-sonner-toast] [data-close-button]:hover{background:var(--normal-bg-hover);border-color:var(--normal-border-hover)}[data-rich-colors=true][data-sonner-toast][data-type=success]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=success] [data-close-button]{background:var(--success-bg);border-color:var(--success-border);color:var(--success-text)}[data-rich-colors=true][data-sonner-toast][data-type=info]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=info] [data-close-button]{background:var(--info-bg);border-color:var(--info-border);color:var(--info-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=warning] [data-close-button]{background:var(--warning-bg);border-color:var(--warning-border);color:var(--warning-text)}[data-rich-colors=true][data-sonner-toast][data-type=error]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}[data-rich-colors=true][data-sonner-toast][data-type=error] [data-close-button]{background:var(--error-bg);border-color:var(--error-border);color:var(--error-text)}.sonner-loading-wrapper{--size:16px;height:var(--size);width:var(--size);position:absolute;inset:0;z-index:10}.sonner-loading-wrapper[data-visible=false]{transform-origin:center;animation:sonner-fade-out .2s ease forwards}.sonner-spinner{position:relative;top:50%;left:50%;height:var(--size);width:var(--size)}.sonner-loading-bar{animation:sonner-spin 1.2s linear infinite;background:var(--gray11);border-radius:6px;height:8%;left:-10%;position:absolute;top:-3.9%;width:24%}.sonner-loading-bar:first-child{animation-delay:-1.2s;transform:rotate(.0001deg) translate(146%)}.sonner-loading-bar:nth-child(2){animation-delay:-1.1s;transform:rotate(30deg) translate(146%)}.sonner-loading-bar:nth-child(3){animation-delay:-1s;transform:rotate(60deg) translate(146%)}.sonner-loading-bar:nth-child(4){animation-delay:-.9s;transform:rotate(90deg) translate(146%)}.sonner-loading-bar:nth-child(5){animation-delay:-.8s;transform:rotate(120deg) translate(146%)}.sonner-loading-bar:nth-child(6){animation-delay:-.7s;transform:rotate(150deg) translate(146%)}.sonner-loading-bar:nth-child(7){animation-delay:-.6s;transform:rotate(180deg) translate(146%)}.sonner-loading-bar:nth-child(8){animation-delay:-.5s;transform:rotate(210deg) translate(146%)}.sonner-loading-bar:nth-child(9){animation-delay:-.4s;transform:rotate(240deg) translate(146%)}.sonner-loading-bar:nth-child(10){animation-delay:-.3s;transform:rotate(270deg) translate(146%)}.sonner-loading-bar:nth-child(11){animation-delay:-.2s;transform:rotate(300deg) translate(146%)}.sonner-loading-bar:nth-child(12){animation-delay:-.1s;transform:rotate(330deg) translate(146%)}@keyframes sonner-fade-in{0%{opacity:0;transform:scale(.8)}100%{opacity:1;transform:scale(1)}}@keyframes sonner-fade-out{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(.8)}}@keyframes sonner-spin{0%{opacity:1}100%{opacity:.15}}@media (prefers-reduced-motion){.sonner-loading-bar,[data-sonner-toast],[data-sonner-toast]>*{transition:none!important;animation:none!important}}.sonner-loader{position:absolute;top:50%;left:50%;transform:translate(-50%,-50%);transform-origin:center;transition:opacity .2s,transform .2s}.sonner-loader[data-visible=false]{opacity:0;transform:scale(.8) translate(-50%,-50%)}");function d2(e){return e.label!==void 0}const tYt=3,rYt="24px",nYt="16px",eCe=4e3,aYt=356,sYt=14,iYt=45,oYt=200;function Uf(...e){return e.filter(Boolean).join(" ")}function lYt(e){const[t,r]=e.split("-"),n=[];return t&&n.push(t),r&&n.push(r),n}const cYt=e=>{var t,r,n,a,s,i,o,l,c;const{invert:u,toast:d,unstyled:f,interacting:h,setHeights:g,visibleToasts:y,heights:b,index:w,toasts:x,expanded:S,removeToast:E,defaultRichColors:C,closeButton:k,style:A,cancelButtonStyle:D,actionButtonStyle:N,className:P="",descriptionClassName:j="",duration:z,position:U,gap:$,expandByDefault:F,classNames:V,icons:H,closeButtonAriaLabel:B="Close toast"}=e,[Q,M]=we.useState(null),[W,q]=we.useState(null),[I,Z]=we.useState(!1),[G,J]=we.useState(!1),[K,ae]=we.useState(!1),[le,ce]=we.useState(!1),[Te,X]=we.useState(!1),[se,te]=we.useState(0),[ve,ue]=we.useState(0),ye=we.useRef(d.duration||z||eCe),Ge=we.useRef(null),Ae=we.useRef(null),ie=w===0,de=w+1<=y,fe=d.type,ke=d.dismissible!==!1,Ie=d.className||"",Se=d.descriptionClassName||"",pe=we.useMemo(()=>b.findIndex(tt=>tt.toastId===d.id)||0,[b,d.id]),_e=we.useMemo(()=>{var tt;return(tt=d.closeButton)!=null?tt:k},[d.closeButton,k]),Be=we.useMemo(()=>d.duration||z||eCe,[d.duration,z]),Ze=we.useRef(0),ze=we.useRef(0),ft=we.useRef(0),vt=we.useRef(null),[yr,zr]=U.split("-"),Jt=we.useMemo(()=>b.reduce((tt,Kr,wr)=>wr>=pe?tt:tt+Kr.height,0),[b,pe]),ht=QXt(),_t=d.invert||u,ut=fe==="loading";ze.current=we.useMemo(()=>pe*$+Jt,[pe,Jt]),we.useEffect(()=>{ye.current=Be},[Be]),we.useEffect(()=>{Z(!0)},[]),we.useEffect(()=>{const tt=Ae.current;if(tt){const Kr=tt.getBoundingClientRect().height;return ue(Kr),g(wr=>[{toastId:d.id,height:Kr,position:d.position},...wr]),()=>g(wr=>wr.filter(sn=>sn.toastId!==d.id))}},[g,d.id]),we.useLayoutEffect(()=>{if(!I)return;const tt=Ae.current,Kr=tt.style.height;tt.style.height="auto";const wr=tt.getBoundingClientRect().height;tt.style.height=Kr,ue(wr),g(sn=>sn.find(ge=>ge.toastId===d.id)?sn.map(ge=>ge.toastId===d.id?{...ge,height:wr}:ge):[{toastId:d.id,height:wr,position:d.position},...sn])},[I,d.title,d.description,g,d.id,d.jsx,d.action,d.cancel]);const Ir=we.useCallback(()=>{J(!0),te(ze.current),g(tt=>tt.filter(Kr=>Kr.toastId!==d.id)),setTimeout(()=>{E(d)},oYt)},[d,E,g,ze]);we.useEffect(()=>{if(d.promise&&fe==="loading"||d.duration===1/0||d.type==="loading")return;let tt;return S||h||ht?(()=>{if(ft.current<Ze.current){const sn=new Date().getTime()-Ze.current;ye.current=ye.current-sn}ft.current=new Date().getTime()})():ye.current!==1/0&&(Ze.current=new Date().getTime(),tt=setTimeout(()=>{d.onAutoClose==null||d.onAutoClose.call(d,d),Ir()},ye.current)),()=>clearTimeout(tt)},[S,h,d,fe,ht,Ir]),we.useEffect(()=>{d.delete&&(Ir(),d.onDismiss==null||d.onDismiss.call(d,d))},[Ir,d.delete]);function dr(){var tt;if(H?.loading){var Kr;return we.createElement("div",{className:Uf(V?.loader,d==null||(Kr=d.classNames)==null?void 0:Kr.loader,"sonner-loader"),"data-visible":fe==="loading"},H.loading)}return we.createElement(UXt,{className:Uf(V?.loader,d==null||(tt=d.classNames)==null?void 0:tt.loader),visible:fe==="loading"})}const dn=d.icon||H?.[fe]||BXt(fe);var $t,Yr;return we.createElement("li",{tabIndex:0,ref:Ae,className:Uf(P,Ie,V?.toast,d==null||(t=d.classNames)==null?void 0:t.toast,V?.default,V?.[fe],d==null||(r=d.classNames)==null?void 0:r[fe]),"data-sonner-toast":"","data-rich-colors":($t=d.richColors)!=null?$t:C,"data-styled":!(d.jsx||d.unstyled||f),"data-mounted":I,"data-promise":!!d.promise,"data-swiped":Te,"data-removed":G,"data-visible":de,"data-y-position":yr,"data-x-position":zr,"data-index":w,"data-front":ie,"data-swiping":K,"data-dismissible":ke,"data-type":fe,"data-invert":_t,"data-swipe-out":le,"data-swipe-direction":W,"data-expanded":!!(S||F&&I),"data-testid":d.testId,style:{"--index":w,"--toasts-before":w,"--z-index":x.length-w,"--offset":`${G?se:ze.current}px`,"--initial-height":F?"auto":`${ve}px`,...A,...d.style},onDragEnd:()=>{ae(!1),M(null),vt.current=null},onPointerDown:tt=>{tt.button!==2&&(ut||!ke||(Ge.current=new Date,te(ze.current),tt.target.setPointerCapture(tt.pointerId),tt.target.tagName!=="BUTTON"&&(ae(!0),vt.current={x:tt.clientX,y:tt.clientY})))},onPointerUp:()=>{var tt,Kr,wr;if(le||!ke)return;vt.current=null;const sn=Number(((tt=Ae.current)==null?void 0:tt.style.getPropertyValue("--swipe-amount-x").replace("px",""))||0),qs=Number(((Kr=Ae.current)==null?void 0:Kr.style.getPropertyValue("--swipe-amount-y").replace("px",""))||0),ge=new Date().getTime()-((wr=Ge.current)==null?void 0:wr.getTime()),Oe=Q==="x"?sn:qs,Me=Math.abs(Oe)/ge;if(Math.abs(Oe)>=iYt||Me>.11){te(ze.current),d.onDismiss==null||d.onDismiss.call(d,d),q(Q==="x"?sn>0?"right":"left":qs>0?"down":"up"),Ir(),ce(!0);return}else{var Je,pt;(Je=Ae.current)==null||Je.style.setProperty("--swipe-amount-x","0px"),(pt=Ae.current)==null||pt.style.setProperty("--swipe-amount-y","0px")}X(!1),ae(!1),M(null)},onPointerMove:tt=>{var Kr,wr,sn;if(!vt.current||!ke||((Kr=window.getSelection())==null?void 0:Kr.toString().length)>0)return;const ge=tt.clientY-vt.current.y,Oe=tt.clientX-vt.current.x;var Me;const Je=(Me=e.swipeDirections)!=null?Me:lYt(U);!Q&&(Math.abs(Oe)>1||Math.abs(ge)>1)&&M(Math.abs(Oe)>Math.abs(ge)?"x":"y");let pt={x:0,y:0};const kt=ot=>1/(1.5+Math.abs(ot)/20);if(Q==="y"){if(Je.includes("top")||Je.includes("bottom"))if(Je.includes("top")&&ge<0||Je.includes("bottom")&&ge>0)pt.y=ge;else{const ot=ge*kt(ge);pt.y=Math.abs(ot)<Math.abs(ge)?ot:ge}}else if(Q==="x"&&(Je.includes("left")||Je.includes("right")))if(Je.includes("left")&&Oe<0||Je.includes("right")&&Oe>0)pt.x=Oe;else{const ot=Oe*kt(Oe);pt.x=Math.abs(ot)<Math.abs(Oe)?ot:Oe}(Math.abs(pt.x)>0||Math.abs(pt.y)>0)&&X(!0),(wr=Ae.current)==null||wr.style.setProperty("--swipe-amount-x",`${pt.x}px`),(sn=Ae.current)==null||sn.style.setProperty("--swipe-amount-y",`${pt.y}px`)}},_e&&!d.jsx&&fe!=="loading"?we.createElement("button",{"aria-label":B,"data-disabled":ut,"data-close-button":!0,onClick:ut||!ke?()=>{}:()=>{Ir(),d.onDismiss==null||d.onDismiss.call(d,d)},className:Uf(V?.closeButton,d==null||(n=d.classNames)==null?void 0:n.closeButton)},(Yr=H?.close)!=null?Yr:GXt):null,(fe||d.icon||d.promise)&&d.icon!==null&&(H?.[fe]!==null||d.icon)?we.createElement("div",{"data-icon":"",className:Uf(V?.icon,d==null||(a=d.classNames)==null?void 0:a.icon)},d.promise||d.type==="loading"&&!d.icon?d.icon||dr():null,d.type!=="loading"?dn:null):null,we.createElement("div",{"data-content":"",className:Uf(V?.content,d==null||(s=d.classNames)==null?void 0:s.content)},we.createElement("div",{"data-title":"",className:Uf(V?.title,d==null||(i=d.classNames)==null?void 0:i.title)},d.jsx?d.jsx:typeof d.title=="function"?d.title():d.title),d.description?we.createElement("div",{"data-description":"",className:Uf(j,Se,V?.description,d==null||(o=d.classNames)==null?void 0:o.description)},typeof d.description=="function"?d.description():d.description):null),we.isValidElement(d.cancel)?d.cancel:d.cancel&&d2(d.cancel)?we.createElement("button",{"data-button":!0,"data-cancel":!0,style:d.cancelButtonStyle||D,onClick:tt=>{d2(d.cancel)&&ke&&(d.cancel.onClick==null||d.cancel.onClick.call(d.cancel,tt),Ir())},className:Uf(V?.cancelButton,d==null||(l=d.classNames)==null?void 0:l.cancelButton)},d.cancel.label):null,we.isValidElement(d.action)?d.action:d.action&&d2(d.action)?we.createElement("button",{"data-button":!0,"data-action":!0,style:d.actionButtonStyle||N,onClick:tt=>{d2(d.action)&&(d.action.onClick==null||d.action.onClick.call(d.action,tt),!tt.defaultPrevented&&Ir())},className:Uf(V?.actionButton,d==null||(c=d.classNames)==null?void 0:c.actionButton)},d.action.label):null)};function tCe(){if(typeof window>"u"||typeof document>"u")return"ltr";const e=document.documentElement.getAttribute("dir");return e==="auto"||!e?window.getComputedStyle(document.documentElement).direction:e}function uYt(e,t){const r={};return[e,t].forEach((n,a)=>{const s=a===1,i=s?"--mobile-offset":"--offset",o=s?nYt:rYt;function l(c){["top","right","bottom","left"].forEach(u=>{r[`${i}-${u}`]=typeof c=="number"?`${c}px`:c})}typeof n=="number"||typeof n=="string"?l(n):typeof n=="object"?["top","right","bottom","left"].forEach(c=>{n[c]===void 0?r[`${i}-${c}`]=o:r[`${i}-${c}`]=typeof n[c]=="number"?`${n[c]}px`:n[c]}):l(o)}),r}const dYt=we.forwardRef(function(t,r){const{id:n,invert:a,position:s="bottom-right",hotkey:i=["altKey","KeyT"],expand:o,closeButton:l,className:c,offset:u,mobileOffset:d,theme:f="light",richColors:h,duration:g,style:y,visibleToasts:b=tYt,toastOptions:w,dir:x=tCe(),gap:S=sYt,icons:E,containerAriaLabel:C="Notifications"}=t,[k,A]=we.useState([]),D=we.useMemo(()=>n?k.filter(I=>I.toasterId===n):k.filter(I=>!I.toasterId),[k,n]),N=we.useMemo(()=>Array.from(new Set([s].concat(D.filter(I=>I.position).map(I=>I.position)))),[D,s]),[P,j]=we.useState([]),[z,U]=we.useState(!1),[$,F]=we.useState(!1),[V,H]=we.useState(f!=="system"?f:typeof window<"u"&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"),B=we.useRef(null),Q=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),M=we.useRef(null),W=we.useRef(!1),q=we.useCallback(I=>{A(Z=>{var G;return(G=Z.find(J=>J.id===I.id))!=null&&G.delete||mc.dismiss(I.id),Z.filter(({id:J})=>J!==I.id)})},[]);return we.useEffect(()=>mc.subscribe(I=>{if(I.dismiss){requestAnimationFrame(()=>{A(Z=>Z.map(G=>G.id===I.id?{...G,delete:!0}:G))});return}setTimeout(()=>{kne.flushSync(()=>{A(Z=>{const G=Z.findIndex(J=>J.id===I.id);return G!==-1?[...Z.slice(0,G),{...Z[G],...I},...Z.slice(G+1)]:[I,...Z]})})})}),[k]),we.useEffect(()=>{if(f!=="system"){H(f);return}if(f==="system"&&(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?H("dark"):H("light")),typeof window>"u")return;const I=window.matchMedia("(prefers-color-scheme: dark)");try{I.addEventListener("change",({matches:Z})=>{H(Z?"dark":"light")})}catch{I.addListener(({matches:G})=>{try{H(G?"dark":"light")}catch(J){console.error(J)}})}},[f]),we.useEffect(()=>{k.length<=1&&U(!1)},[k]),we.useEffect(()=>{const I=Z=>{var G;if(i.every(ae=>Z[ae]||Z.code===ae)){var K;U(!0),(K=B.current)==null||K.focus()}Z.code==="Escape"&&(document.activeElement===B.current||(G=B.current)!=null&&G.contains(document.activeElement))&&U(!1)};return document.addEventListener("keydown",I),()=>document.removeEventListener("keydown",I)},[i]),we.useEffect(()=>{if(B.current)return()=>{M.current&&(M.current.focus({preventScroll:!0}),M.current=null,W.current=!1)}},[B.current]),we.createElement("section",{ref:r,"aria-label":`${C} ${Q}`,tabIndex:-1,"aria-live":"polite","aria-relevant":"additions text","aria-atomic":"false",suppressHydrationWarning:!0},N.map((I,Z)=>{var G;const[J,K]=I.split("-");return D.length?we.createElement("ol",{key:I,dir:x==="auto"?tCe():x,tabIndex:-1,ref:B,className:c,"data-sonner-toaster":!0,"data-sonner-theme":V,"data-y-position":J,"data-x-position":K,style:{"--front-toast-height":`${((G=P[0])==null?void 0:G.height)||0}px`,"--width":`${aYt}px`,"--gap":`${S}px`,...y,...uYt(u,d)},onBlur:ae=>{W.current&&!ae.currentTarget.contains(ae.relatedTarget)&&(W.current=!1,M.current&&(M.current.focus({preventScroll:!0}),M.current=null))},onFocus:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||W.current||(W.current=!0,M.current=ae.relatedTarget)},onMouseEnter:()=>U(!0),onMouseMove:()=>U(!0),onMouseLeave:()=>{$||U(!1)},onDragEnd:()=>U(!1),onPointerDown:ae=>{ae.target instanceof HTMLElement&&ae.target.dataset.dismissible==="false"||F(!0)},onPointerUp:()=>F(!1)},D.filter(ae=>!ae.position&&Z===0||ae.position===I).map((ae,le)=>{var ce,Te;return we.createElement(cYt,{key:ae.id,icons:E,index:le,toast:ae,defaultRichColors:h,duration:(ce=w?.duration)!=null?ce:g,className:w?.className,descriptionClassName:w?.descriptionClassName,invert:a,visibleToasts:b,closeButton:(Te=w?.closeButton)!=null?Te:l,interacting:$,position:I,style:w?.style,unstyled:w?.unstyled,classNames:w?.classNames,cancelButtonStyle:w?.cancelButtonStyle,actionButtonStyle:w?.actionButtonStyle,closeButtonAriaLabel:w?.closeButtonAriaLabel,removeToast:q,toasts:D.filter(X=>X.position==ae.position),heights:P.filter(X=>X.position==ae.position),setHeights:j,expandByDefault:o,gap:S,expanded:z,swipeDirections:t.swipeDirections})})):null}))});var BL="Dialog",[fHe,hHe]=tl(BL),[pYt,Cf]=fHe(BL),mHe=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:a,onOpenChange:s,modal:i=!0}=e,o=_.useRef(null),l=_.useRef(null),[c,u]=Gu({prop:n,defaultProp:a??!1,onChange:s,caller:BL});return p.jsx(pYt,{scope:t,triggerRef:o,contentRef:l,contentId:Wo(),titleId:Wo(),descriptionId:Wo(),open:c,onOpenChange:u,onOpenToggle:_.useCallback(()=>u(d=>!d),[u]),modal:i,children:r})};mHe.displayName=BL;var gHe="DialogTrigger",yHe=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Cf(gHe,r),s=Mr(t,a.triggerRef);return p.jsx(xr.button,{type:"button","aria-haspopup":"dialog","aria-expanded":a.open,"aria-controls":a.contentId,"data-state":Loe(a.open),...n,ref:s,onClick:Tt(e.onClick,a.onOpenToggle)})});yHe.displayName=gHe;var Moe="DialogPortal",[fYt,bHe]=fHe(Moe,{forceMount:void 0}),vHe=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:a}=e,s=Cf(Moe,t);return p.jsx(fYt,{scope:t,forceMount:r,children:_.Children.map(n,i=>p.jsx(Po,{present:r||s.open,children:p.jsx(SO,{asChild:!0,container:a,children:i})}))})};vHe.displayName=Moe;var j3="DialogOverlay",xHe=_.forwardRef((e,t)=>{const r=bHe(j3,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=Cf(j3,e.__scopeDialog);return s.modal?p.jsx(Po,{present:n||s.open,children:p.jsx(mYt,{...a,ref:t})}):null});xHe.displayName=j3;var hYt=eE("DialogOverlay.RemoveScroll"),mYt=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Cf(j3,r);return p.jsx(iL,{as:hYt,allowPinchZoom:!0,shards:[a.contentRef],children:p.jsx(xr.div,{"data-state":Loe(a.open),...n,ref:t,style:{pointerEvents:"auto",...n.style}})})}),yx="DialogContent",wHe=_.forwardRef((e,t)=>{const r=bHe(yx,e.__scopeDialog),{forceMount:n=r.forceMount,...a}=e,s=Cf(yx,e.__scopeDialog);return p.jsx(Po,{present:n||s.open,children:s.modal?p.jsx(gYt,{...a,ref:t}):p.jsx(yYt,{...a,ref:t})})});wHe.displayName=yx;var gYt=_.forwardRef((e,t)=>{const r=Cf(yx,e.__scopeDialog),n=_.useRef(null),a=Mr(t,r.contentRef,n);return _.useEffect(()=>{const s=n.current;if(s)return jse(s)},[]),p.jsx(SHe,{...e,ref:a,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Tt(e.onCloseAutoFocus,s=>{s.preventDefault(),r.triggerRef.current?.focus()}),onPointerDownOutside:Tt(e.onPointerDownOutside,s=>{const i=s.detail.originalEvent,o=i.button===0&&i.ctrlKey===!0;(i.button===2||o)&&s.preventDefault()}),onFocusOutside:Tt(e.onFocusOutside,s=>s.preventDefault())})}),yYt=_.forwardRef((e,t)=>{const r=Cf(yx,e.__scopeDialog),n=_.useRef(!1),a=_.useRef(!1);return p.jsx(SHe,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:s=>{e.onCloseAutoFocus?.(s),s.defaultPrevented||(n.current||r.triggerRef.current?.focus(),s.preventDefault()),n.current=!1,a.current=!1},onInteractOutside:s=>{e.onInteractOutside?.(s),s.defaultPrevented||(n.current=!0,s.detail.originalEvent.type==="pointerdown"&&(a.current=!0));const i=s.target;r.triggerRef.current?.contains(i)&&s.preventDefault(),s.detail.originalEvent.type==="focusin"&&a.current&&s.preventDefault()}})}),SHe=_.forwardRef((e,t)=>{const{__scopeDialog:r,trapFocus:n,onOpenAutoFocus:a,onCloseAutoFocus:s,...i}=e,o=Cf(yx,r),l=_.useRef(null),c=Mr(t,l);return Ase(),p.jsxs(p.Fragment,{children:[p.jsx(Q5,{asChild:!0,loop:!0,trapped:n,onMountAutoFocus:a,onUnmountAutoFocus:s,children:p.jsx(wO,{role:"dialog",id:o.contentId,"aria-describedby":o.descriptionId,"aria-labelledby":o.titleId,"data-state":Loe(o.open),...i,ref:c,onDismiss:()=>o.onOpenChange(!1)})}),p.jsxs(p.Fragment,{children:[p.jsx(vYt,{titleId:o.titleId}),p.jsx(wYt,{contentRef:l,descriptionId:o.descriptionId})]})]})}),joe="DialogTitle",EHe=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Cf(joe,r);return p.jsx(xr.h2,{id:a.titleId,...n,ref:t})});EHe.displayName=joe;var OHe="DialogDescription",_He=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Cf(OHe,r);return p.jsx(xr.p,{id:a.descriptionId,...n,ref:t})});_He.displayName=OHe;var kHe="DialogClose",CHe=_.forwardRef((e,t)=>{const{__scopeDialog:r,...n}=e,a=Cf(kHe,r);return p.jsx(xr.button,{type:"button",...n,ref:t,onClick:Tt(e.onClick,()=>a.onOpenChange(!1))})});CHe.displayName=kHe;function Loe(e){return e?"open":"closed"}var THe="DialogTitleWarning",[bYt,AHe]=b_t(THe,{contentName:yx,titleName:joe,docsSlug:"dialog"}),vYt=({titleId:e})=>{const t=AHe(THe),r=`\`${t.contentName}\` requires a \`${t.titleName}\` for the component to be accessible for screen reader users.
|
|
165
165
|
|
|
166
166
|
If you want to hide the \`${t.titleName}\`, you can wrap it with our VisuallyHidden component.
|
|
@@ -232,7 +232,7 @@ Error message: ${Koe(r)}`,cause:r}),this[RQe]=!0,this.value=t}static isInstance(
|
|
|
232
232
|
]))`;continue}else if(a[c]==="$"){s+=`($|(?=[\r
|
|
233
233
|
]))`;continue}}if(n.s&&a[c]==="."){s+=o?`${a[c]}\r
|
|
234
234
|
`:`[${a[c]}\r
|
|
235
|
-
]`;continue}s+=a[c],a[c]==="\\"?i=!0:o&&a[c]==="]"?o=!1:!o&&a[c]==="["&&(o=!0)}return s}function zQe(e,t){var r,n,a,s,i,o;const l={type:"object",additionalProperties:(r=La(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===oe.ZodString&&((a=e.keyType._def.checks)!=null&&a.length)){const{type:c,...u}=BQe(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((s=e.keyType)==null?void 0:s._def.typeName)===oe.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((i=e.keyType)==null?void 0:i._def.typeName)===oe.ZodBranded&&e.keyType._def.type._def.typeName===oe.ZodString&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){const{type:c,...u}=LQe(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function gir(e,t){if(t.mapStrategy==="record")return zQe(e,t);const r=La(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Wu(),n=La(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Wu();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function yir(e){const t=e.values,n=Object.keys(e.values).filter(s=>typeof t[t[s]]!="number").map(s=>t[s]),a=Array.from(new Set(n.map(s=>typeof s)));return{type:a.length===1?a[0]==="string"?"string":"number":["string","number"],enum:n}}function bir(){return{not:Wu()}}function vir(){return{type:"null"}}var lee={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function xir(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in lee&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((a,s)=>{const i=lee[s._def.typeName];return i&&!a.includes(i)?[...a,i]:a},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((a,s)=>{const i=typeof s._def.value;switch(i){case"string":case"number":case"boolean":return[...a,i];case"bigint":return[...a,"integer"];case"object":if(s._def.value===null)return[...a,"null"];default:return a}},[]);if(n.length===r.length){const a=n.filter((s,i,o)=>o.indexOf(s)===i);return{type:a.length>1?a:a[0],enum:r.reduce((s,i)=>s.includes(i._def.value)?s:[...s,i._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,a)=>[...n,...a._def.values.filter(s=>!n.includes(s))],[])};return wir(e,t)}var wir=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,a)=>La(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${a}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function Sir(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[lee[e.innerType._def.typeName],"null"]};const r=La(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function Eir(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function Oir(e,t){const r={type:"object",properties:{}},n=[],a=e.shape();for(const i in a){let o=a[i];if(o===void 0||o._def===void 0)continue;const l=kir(o),c=La(o._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});c!==void 0&&(r.properties[i]=c,l||n.push(i))}n.length&&(r.required=n);const s=_ir(e,t);return s!==void 0&&(r.additionalProperties=s),r}function _ir(e,t){if(e.catchall._def.typeName!=="ZodNever")return La(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function kir(e){try{return e.isOptional()}catch{return!0}}var Cir=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return La(e.innerType._def,t);const n=La(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Wu()},n]}:Wu()},Tir=(e,t)=>{if(t.pipeStrategy==="input")return La(e.in._def,t);if(t.pipeStrategy==="output")return La(e.out._def,t);const r=La(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=La(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(a=>a!==void 0)}};function Air(e,t){return La(e.type._def,t)}function Dir(e,t){const n={type:"array",uniqueItems:!0,items:La(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function Iir(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>La(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:La(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>La(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function Nir(){return{not:Wu()}}function Rir(){return Wu()}var Pir=(e,t)=>La(e.innerType._def,t),$ir=(e,t,r)=>{switch(t){case oe.ZodString:return BQe(e,r);case oe.ZodNumber:return Eir(e);case oe.ZodObject:return Oir(e,r);case oe.ZodBigInt:return air(e);case oe.ZodBoolean:return sir();case oe.ZodDate:return FQe(e,r);case oe.ZodUndefined:return Nir();case oe.ZodNull:return vir();case oe.ZodArray:return nir(e,r);case oe.ZodUnion:case oe.ZodDiscriminatedUnion:return xir(e,r);case oe.ZodIntersection:return pir(e,r);case oe.ZodTuple:return Iir(e,r);case oe.ZodRecord:return zQe(e,r);case oe.ZodLiteral:return fir(e);case oe.ZodEnum:return uir(e);case oe.ZodNativeEnum:return yir(e);case oe.ZodNullable:return Sir(e,r);case oe.ZodOptional:return Cir(e,r);case oe.ZodMap:return gir(e,r);case oe.ZodSet:return Dir(e,r);case oe.ZodLazy:return()=>e.getter()._def;case oe.ZodPromise:return Air(e,r);case oe.ZodNaN:case oe.ZodNever:return bir();case oe.ZodEffects:return cir(e,r);case oe.ZodAny:return Wu();case oe.ZodUnknown:return Rir();case oe.ZodDefault:return lir(e,r);case oe.ZodBranded:return LQe(e,r);case oe.ZodReadonly:return Pir(e,r);case oe.ZodCatch:return iir(e,r);case oe.ZodPipeline:return Tir(e,r);case oe.ZodFunction:case oe.ZodVoid:case oe.ZodSymbol:return;default:return(n=>{})()}};function La(e,t,r=!1){var n;const a=t.seen.get(e);if(t.override){const l=(n=t.override)==null?void 0:n.call(t,e,t,a,r);if(l!==tir)return l}if(a&&!r){const l=Mir(a,t);if(l!==void 0)return l}const s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);const i=$ir(e,e.typeName,t),o=typeof i=="function"?La(i(),t):i;if(o&&jir(e,t,o),t.postProcess){const l=t.postProcess(o,e,t);return s.jsonSchema=o,l}return s.jsonSchema=o,o}var Mir=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:eir(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Wu()):t.$refStrategy==="seen"?Wu():void 0}},jir=(e,t,r)=>(e.description&&(r.description=e.description),r),Lir=e=>{const t=rir(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,a])=>[a._def,{def:a._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},Fir=(e,t)=>{var r;const n=Lir(t);let a=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var f;return{...c,[u]:(f=La(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0))!=null?f:Wu()}},{}):void 0;const s=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=(r=La(e._def,s===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,s]},!1))!=null?r:Wu(),o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(i.title=o);const l=s===void 0?a?{...i,[n.definitionPath]:a}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,s].join("/"),[n.definitionPath]:{...a,[s]:i}};return l.$schema="http://json-schema.org/draft-07/schema#",l},Bir=Fir;function zir(e,t){var r;const n=(r=void 0)!=null?r:!1;return ele(()=>Bir(e,{$refStrategy:n?"root":"none"}),{validate:async a=>{const s=await e.safeParseAsync(a);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function Uir(e,t){var r;const n=(r=void 0)!=null?r:!1;return ele(()=>UGe(e,{target:"draft-7",io:"output",reused:n?"ref":"inline"}),{validate:async a=>{const s=await Qoe(e,a);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function Vir(e){return"_zod"in e}function c1(e,t){return Vir(e)?Uir(e):zir(e)}var cee=Symbol.for("vercel.ai.schema");function ele(e,{validate:t}={}){return{[cee]:!0,_type:void 0,[Y3]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function qir(e){return typeof e=="object"&&e!==null&&cee in e&&e[cee]===!0&&"jsonSchema"in e&&"validate"in e}function Zir(e){return e==null?ele({properties:{},additionalProperties:!1}):qir(e)?e:typeof e=="function"?e():c1(e)}function Hir(e){return e?.replace(/\/$/,"")}var UQe=JL({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-context.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(f,h)=>{for(var g in h)r(f,g,{get:h[g],enumerable:!0})},o=(f,h,g,y)=>{if(h&&typeof h=="object"||typeof h=="function")for(let b of a(h))!s.call(f,b)&&b!==g&&r(f,b,{get:()=>h[b],enumerable:!(y=n(h,b))||y.enumerable});return f},l=f=>o(r({},"__esModule",{value:!0}),f),c={};i(c,{SYMBOL_FOR_REQ_CONTEXT:()=>u,getContext:()=>d}),t.exports=l(c);var u=Symbol.for("@vercel/request-context");function d(){return globalThis[u]?.get?.()??{}}}}),Gir=JL({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(g,y)=>{for(var b in y)r(g,b,{get:y[b],enumerable:!0})},o=(g,y,b,w)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of a(y))!s.call(g,x)&&x!==b&&r(g,x,{get:()=>y[x],enumerable:!(w=n(y,x))||w.enumerable});return g},l=g=>o(r({},"__esModule",{value:!0}),g),c={};i(c,{getVercelOidcToken:()=>f,getVercelOidcTokenSync:()=>h}),t.exports=l(c);var u=UQe(),d=Osr();async function f(){let g="",y;try{g=h()}catch(b){y=b}try{const[{getTokenPayload:b,isExpired:w},{refreshToken:x}]=await Promise.all([await Fe(()=>import("./token-util-NEHG7TUY-U7CX7GS4-OABXDW2K-DfcMD4TX.js"),__vite__mapDeps([23,24,1]),import.meta.url),await Fe(()=>import("./token-6GSAFR2W-XRCSVUPZ-CDj_xl7O-DebwFlmz.js"),__vite__mapDeps([25,24,1]),import.meta.url)]);(!g||w(b(g)))&&(await x(),g=h())}catch(b){throw y?.message&&b instanceof Error&&(b.message=`${y.message}
|
|
235
|
+
]`;continue}s+=a[c],a[c]==="\\"?i=!0:o&&a[c]==="]"?o=!1:!o&&a[c]==="["&&(o=!0)}return s}function zQe(e,t){var r,n,a,s,i,o;const l={type:"object",additionalProperties:(r=La(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===oe.ZodString&&((a=e.keyType._def.checks)!=null&&a.length)){const{type:c,...u}=BQe(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((s=e.keyType)==null?void 0:s._def.typeName)===oe.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((i=e.keyType)==null?void 0:i._def.typeName)===oe.ZodBranded&&e.keyType._def.type._def.typeName===oe.ZodString&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){const{type:c,...u}=LQe(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function gir(e,t){if(t.mapStrategy==="record")return zQe(e,t);const r=La(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||Wu(),n=La(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||Wu();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function yir(e){const t=e.values,n=Object.keys(e.values).filter(s=>typeof t[t[s]]!="number").map(s=>t[s]),a=Array.from(new Set(n.map(s=>typeof s)));return{type:a.length===1?a[0]==="string"?"string":"number":["string","number"],enum:n}}function bir(){return{not:Wu()}}function vir(){return{type:"null"}}var lee={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function xir(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in lee&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((a,s)=>{const i=lee[s._def.typeName];return i&&!a.includes(i)?[...a,i]:a},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((a,s)=>{const i=typeof s._def.value;switch(i){case"string":case"number":case"boolean":return[...a,i];case"bigint":return[...a,"integer"];case"object":if(s._def.value===null)return[...a,"null"];default:return a}},[]);if(n.length===r.length){const a=n.filter((s,i,o)=>o.indexOf(s)===i);return{type:a.length>1?a:a[0],enum:r.reduce((s,i)=>s.includes(i._def.value)?s:[...s,i._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,a)=>[...n,...a._def.values.filter(s=>!n.includes(s))],[])};return wir(e,t)}var wir=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,a)=>La(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${a}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function Sir(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[lee[e.innerType._def.typeName],"null"]};const r=La(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function Eir(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function Oir(e,t){const r={type:"object",properties:{}},n=[],a=e.shape();for(const i in a){let o=a[i];if(o===void 0||o._def===void 0)continue;const l=kir(o),c=La(o._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});c!==void 0&&(r.properties[i]=c,l||n.push(i))}n.length&&(r.required=n);const s=_ir(e,t);return s!==void 0&&(r.additionalProperties=s),r}function _ir(e,t){if(e.catchall._def.typeName!=="ZodNever")return La(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function kir(e){try{return e.isOptional()}catch{return!0}}var Cir=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return La(e.innerType._def,t);const n=La(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:Wu()},n]}:Wu()},Tir=(e,t)=>{if(t.pipeStrategy==="input")return La(e.in._def,t);if(t.pipeStrategy==="output")return La(e.out._def,t);const r=La(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=La(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(a=>a!==void 0)}};function Air(e,t){return La(e.type._def,t)}function Dir(e,t){const n={type:"array",uniqueItems:!0,items:La(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function Iir(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>La(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:La(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>La(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function Nir(){return{not:Wu()}}function Rir(){return Wu()}var Pir=(e,t)=>La(e.innerType._def,t),$ir=(e,t,r)=>{switch(t){case oe.ZodString:return BQe(e,r);case oe.ZodNumber:return Eir(e);case oe.ZodObject:return Oir(e,r);case oe.ZodBigInt:return air(e);case oe.ZodBoolean:return sir();case oe.ZodDate:return FQe(e,r);case oe.ZodUndefined:return Nir();case oe.ZodNull:return vir();case oe.ZodArray:return nir(e,r);case oe.ZodUnion:case oe.ZodDiscriminatedUnion:return xir(e,r);case oe.ZodIntersection:return pir(e,r);case oe.ZodTuple:return Iir(e,r);case oe.ZodRecord:return zQe(e,r);case oe.ZodLiteral:return fir(e);case oe.ZodEnum:return uir(e);case oe.ZodNativeEnum:return yir(e);case oe.ZodNullable:return Sir(e,r);case oe.ZodOptional:return Cir(e,r);case oe.ZodMap:return gir(e,r);case oe.ZodSet:return Dir(e,r);case oe.ZodLazy:return()=>e.getter()._def;case oe.ZodPromise:return Air(e,r);case oe.ZodNaN:case oe.ZodNever:return bir();case oe.ZodEffects:return cir(e,r);case oe.ZodAny:return Wu();case oe.ZodUnknown:return Rir();case oe.ZodDefault:return lir(e,r);case oe.ZodBranded:return LQe(e,r);case oe.ZodReadonly:return Pir(e,r);case oe.ZodCatch:return iir(e,r);case oe.ZodPipeline:return Tir(e,r);case oe.ZodFunction:case oe.ZodVoid:case oe.ZodSymbol:return;default:return(n=>{})()}};function La(e,t,r=!1){var n;const a=t.seen.get(e);if(t.override){const l=(n=t.override)==null?void 0:n.call(t,e,t,a,r);if(l!==tir)return l}if(a&&!r){const l=Mir(a,t);if(l!==void 0)return l}const s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);const i=$ir(e,e.typeName,t),o=typeof i=="function"?La(i(),t):i;if(o&&jir(e,t,o),t.postProcess){const l=t.postProcess(o,e,t);return s.jsonSchema=o,l}return s.jsonSchema=o,o}var Mir=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:eir(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),Wu()):t.$refStrategy==="seen"?Wu():void 0}},jir=(e,t,r)=>(e.description&&(r.description=e.description),r),Lir=e=>{const t=rir(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,a])=>[a._def,{def:a._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},Fir=(e,t)=>{var r;const n=Lir(t);let a=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var f;return{...c,[u]:(f=La(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0))!=null?f:Wu()}},{}):void 0;const s=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=(r=La(e._def,s===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,s]},!1))!=null?r:Wu(),o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(i.title=o);const l=s===void 0?a?{...i,[n.definitionPath]:a}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,s].join("/"),[n.definitionPath]:{...a,[s]:i}};return l.$schema="http://json-schema.org/draft-07/schema#",l},Bir=Fir;function zir(e,t){var r;const n=(r=void 0)!=null?r:!1;return ele(()=>Bir(e,{$refStrategy:n?"root":"none"}),{validate:async a=>{const s=await e.safeParseAsync(a);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function Uir(e,t){var r;const n=(r=void 0)!=null?r:!1;return ele(()=>UGe(e,{target:"draft-7",io:"output",reused:n?"ref":"inline"}),{validate:async a=>{const s=await Qoe(e,a);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function Vir(e){return"_zod"in e}function c1(e,t){return Vir(e)?Uir(e):zir(e)}var cee=Symbol.for("vercel.ai.schema");function ele(e,{validate:t}={}){return{[cee]:!0,_type:void 0,[Y3]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function qir(e){return typeof e=="object"&&e!==null&&cee in e&&e[cee]===!0&&"jsonSchema"in e&&"validate"in e}function Zir(e){return e==null?ele({properties:{},additionalProperties:!1}):qir(e)?e:typeof e=="function"?e():c1(e)}function Hir(e){return e?.replace(/\/$/,"")}var UQe=JL({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-context.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(f,h)=>{for(var g in h)r(f,g,{get:h[g],enumerable:!0})},o=(f,h,g,y)=>{if(h&&typeof h=="object"||typeof h=="function")for(let b of a(h))!s.call(f,b)&&b!==g&&r(f,b,{get:()=>h[b],enumerable:!(y=n(h,b))||y.enumerable});return f},l=f=>o(r({},"__esModule",{value:!0}),f),c={};i(c,{SYMBOL_FOR_REQ_CONTEXT:()=>u,getContext:()=>d}),t.exports=l(c);var u=Symbol.for("@vercel/request-context");function d(){return globalThis[u]?.get?.()??{}}}}),Gir=JL({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(g,y)=>{for(var b in y)r(g,b,{get:y[b],enumerable:!0})},o=(g,y,b,w)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of a(y))!s.call(g,x)&&x!==b&&r(g,x,{get:()=>y[x],enumerable:!(w=n(y,x))||w.enumerable});return g},l=g=>o(r({},"__esModule",{value:!0}),g),c={};i(c,{getVercelOidcToken:()=>f,getVercelOidcTokenSync:()=>h}),t.exports=l(c);var u=UQe(),d=Osr();async function f(){let g="",y;try{g=h()}catch(b){y=b}try{const[{getTokenPayload:b,isExpired:w},{refreshToken:x}]=await Promise.all([await Fe(()=>import("./token-util-NEHG7TUY-U7CX7GS4-OABXDW2K-BH3AU3Ec.js"),__vite__mapDeps([23,24,1]),import.meta.url),await Fe(()=>import("./token-6GSAFR2W-XRCSVUPZ-CDj_xl7O-VTKn_yTk.js"),__vite__mapDeps([25,24,1]),import.meta.url)]);(!g||w(b(g)))&&(await x(),g=h())}catch(b){throw y?.message&&b instanceof Error&&(b.message=`${y.message}
|
|
236
236
|
${b.message}`),new d.VercelOidcTokenError("Failed to refresh OIDC token",b)}return g}function h(){const g=(0,u.getContext)().headers?.["x-vercel-oidc-token"]??lQe.VERCEL_OIDC_TOKEN;if(!g)throw new Error("The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?");return g}}}),VQe=JL({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/index.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(f,h)=>{for(var g in h)r(f,g,{get:h[g],enumerable:!0})},o=(f,h,g,y)=>{if(h&&typeof h=="object"||typeof h=="function")for(let b of a(h))!s.call(f,b)&&b!==g&&r(f,b,{get:()=>h[b],enumerable:!(y=n(h,b))||y.enumerable});return f},l=f=>o(r({},"__esModule",{value:!0}),f),c={};i(c,{getContext:()=>d.getContext,getVercelOidcToken:()=>u.getVercelOidcToken,getVercelOidcTokenSync:()=>u.getVercelOidcTokenSync}),t.exports=l(c);var u=Gir(),d=UQe()}}),Qir=mQe(VQe()),Wir=mQe(VQe()),Xir="vercel.ai.gateway.error",fG=Symbol.for(Xir),HCe,GCe,Xu=class qQe extends(GCe=Error,HCe=fG,GCe){constructor({message:t,statusCode:r=500,cause:n}){super(t),this[HCe]=!0,this.statusCode=r,this.cause=n}static isInstance(t){return qQe.hasMarker(t)}static hasMarker(t){return typeof t=="object"&&t!==null&&fG in t&&t[fG]===!0}},ZQe="GatewayAuthenticationError",Yir=`vercel.ai.gateway.error.${ZQe}`,QCe=Symbol.for(Yir),WCe,XCe,HQe=class GQe extends(XCe=Xu,WCe=QCe,XCe){constructor({message:t="Authentication failed",statusCode:r=401,cause:n}={}){super({message:t,statusCode:r,cause:n}),this[WCe]=!0,this.name=ZQe,this.type="authentication_error"}static isInstance(t){return Xu.hasMarker(t)&&QCe in t}static createContextualError({apiKeyProvided:t,oidcTokenProvided:r,message:n="Authentication failed",statusCode:a=401,cause:s}){let i;return t?i=`AI Gateway authentication failed: Invalid API key.
|
|
237
237
|
|
|
238
238
|
Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
|
|
@@ -504,7 +504,7 @@ Error message: ${Tde(r)}`,cause:r}),this[jlt]=!0,this.value=t}static isInstance(
|
|
|
504
504
|
]))`;continue}else if(a[c]==="$"){s+=`($|(?=[\r
|
|
505
505
|
]))`;continue}}if(n.s&&a[c]==="."){s+=o?`${a[c]}\r
|
|
506
506
|
`:`[${a[c]}\r
|
|
507
|
-
]`;continue}s+=a[c],a[c]==="\\"?i=!0:o&&a[c]==="]"?o=!1:!o&&a[c]==="["&&(o=!0)}return s}function Zlt(e,t){var r,n,a,s,i,o;const l={type:"object",additionalProperties:(r=Fa(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===oe.ZodString&&((a=e.keyType._def.checks)!=null&&a.length)){const{type:c,...u}=qlt(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((s=e.keyType)==null?void 0:s._def.typeName)===oe.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((i=e.keyType)==null?void 0:i._def.typeName)===oe.ZodBranded&&e.keyType._def.type._def.typeName===oe.ZodString&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){const{type:c,...u}=Ult(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function _Vr(e,t){if(t.mapStrategy==="record")return Zlt(e,t);const r=Fa(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||nd(),n=Fa(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||nd();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function kVr(e){const t=e.values,n=Object.keys(e.values).filter(s=>typeof t[t[s]]!="number").map(s=>t[s]),a=Array.from(new Set(n.map(s=>typeof s)));return{type:a.length===1?a[0]==="string"?"string":"number":["string","number"],enum:n}}function CVr(){return{not:nd()}}function TVr(){return{type:"null"}}var pre={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function AVr(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in pre&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((a,s)=>{const i=pre[s._def.typeName];return i&&!a.includes(i)?[...a,i]:a},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((a,s)=>{const i=typeof s._def.value;switch(i){case"string":case"number":case"boolean":return[...a,i];case"bigint":return[...a,"integer"];case"object":if(s._def.value===null)return[...a,"null"];default:return a}},[]);if(n.length===r.length){const a=n.filter((s,i,o)=>o.indexOf(s)===i);return{type:a.length>1?a:a[0],enum:r.reduce((s,i)=>s.includes(i._def.value)?s:[...s,i._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,a)=>[...n,...a._def.values.filter(s=>!n.includes(s))],[])};return DVr(e,t)}var DVr=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,a)=>Fa(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${a}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function IVr(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[pre[e.innerType._def.typeName],"null"]};const r=Fa(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function NVr(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function RVr(e,t){const r={type:"object",properties:{}},n=[],a=e.shape();for(const i in a){let o=a[i];if(o===void 0||o._def===void 0)continue;const l=$Vr(o),c=Fa(o._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});c!==void 0&&(r.properties[i]=c,l||n.push(i))}n.length&&(r.required=n);const s=PVr(e,t);return s!==void 0&&(r.additionalProperties=s),r}function PVr(e,t){if(e.catchall._def.typeName!=="ZodNever")return Fa(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function $Vr(e){try{return e.isOptional()}catch{return!0}}var MVr=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Fa(e.innerType._def,t);const n=Fa(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:nd()},n]}:nd()},jVr=(e,t)=>{if(t.pipeStrategy==="input")return Fa(e.in._def,t);if(t.pipeStrategy==="output")return Fa(e.out._def,t);const r=Fa(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Fa(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(a=>a!==void 0)}};function LVr(e,t){return Fa(e.type._def,t)}function FVr(e,t){const n={type:"array",uniqueItems:!0,items:Fa(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function BVr(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Fa(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Fa(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Fa(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function zVr(){return{not:nd()}}function UVr(){return nd()}var VVr=(e,t)=>Fa(e.innerType._def,t),qVr=(e,t,r)=>{switch(t){case oe.ZodString:return qlt(e,r);case oe.ZodNumber:return NVr(e);case oe.ZodObject:return RVr(e,r);case oe.ZodBigInt:return fVr(e);case oe.ZodBoolean:return hVr();case oe.ZodDate:return Vlt(e,r);case oe.ZodUndefined:return zVr();case oe.ZodNull:return TVr();case oe.ZodArray:return pVr(e,r);case oe.ZodUnion:case oe.ZodDiscriminatedUnion:return AVr(e,r);case oe.ZodIntersection:return wVr(e,r);case oe.ZodTuple:return BVr(e,r);case oe.ZodRecord:return Zlt(e,r);case oe.ZodLiteral:return SVr(e);case oe.ZodEnum:return vVr(e);case oe.ZodNativeEnum:return kVr(e);case oe.ZodNullable:return IVr(e,r);case oe.ZodOptional:return MVr(e,r);case oe.ZodMap:return _Vr(e,r);case oe.ZodSet:return FVr(e,r);case oe.ZodLazy:return()=>e.getter()._def;case oe.ZodPromise:return LVr(e,r);case oe.ZodNaN:case oe.ZodNever:return CVr();case oe.ZodEffects:return bVr(e,r);case oe.ZodAny:return nd();case oe.ZodUnknown:return UVr();case oe.ZodDefault:return yVr(e,r);case oe.ZodBranded:return Ult(e,r);case oe.ZodReadonly:return VVr(e,r);case oe.ZodCatch:return mVr(e,r);case oe.ZodPipeline:return jVr(e,r);case oe.ZodFunction:case oe.ZodVoid:case oe.ZodSymbol:return;default:return(n=>{})()}};function Fa(e,t,r=!1){var n;const a=t.seen.get(e);if(t.override){const l=(n=t.override)==null?void 0:n.call(t,e,t,a,r);if(l!==uVr)return l}if(a&&!r){const l=ZVr(a,t);if(l!==void 0)return l}const s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);const i=qVr(e,e.typeName,t),o=typeof i=="function"?Fa(i(),t):i;if(o&&HVr(e,t,o),t.postProcess){const l=t.postProcess(o,e,t);return s.jsonSchema=o,l}return s.jsonSchema=o,o}var ZVr=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:cVr(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),nd()):t.$refStrategy==="seen"?nd():void 0}},HVr=(e,t,r)=>(e.description&&(r.description=e.description),r),GVr=e=>{const t=dVr(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,a])=>[a._def,{def:a._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},QVr=(e,t)=>{var r;const n=GVr(t);let a=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var f;return{...c,[u]:(f=Fa(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0))!=null?f:nd()}},{}):void 0;const s=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=(r=Fa(e._def,s===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,s]},!1))!=null?r:nd(),o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(i.title=o);const l=s===void 0?a?{...i,[n.definitionPath]:a}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,s].join("/"),[n.definitionPath]:{...a,[s]:i}};return l.$schema="http://json-schema.org/draft-07/schema#",l},WVr=QVr;function XVr(e,t){var r;const n=(r=void 0)!=null?r:!1;return Dde(()=>WVr(e,{$refStrategy:n?"root":"none"}),{validate:async a=>{const s=await e.safeParseAsync(a);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function YVr(e,t){var r;const n=(r=void 0)!=null?r:!1;return Dde(()=>UGe(e,{target:"draft-7",io:"output",reused:n?"ref":"inline"}),{validate:async a=>{const s=await Qoe(e,a);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function KVr(e){return"_zod"in e}function C1(e,t){return KVr(e)?YVr(e):XVr(e)}var fre=Symbol.for("vercel.ai.schema");function Dde(e,{validate:t}={}){return{[fre]:!0,_type:void 0,[ej]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function JVr(e){return typeof e=="object"&&e!==null&&fre in e&&e[fre]===!0&&"jsonSchema"in e&&"validate"in e}function eqr(e){return e==null?Dde({properties:{},additionalProperties:!1}):JVr(e)?e:typeof e=="function"?e():C1(e)}function tqr(e){return e?.replace(/\/$/,"")}var rqr={},Hlt=uF({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-context.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(f,h)=>{for(var g in h)r(f,g,{get:h[g],enumerable:!0})},o=(f,h,g,y)=>{if(h&&typeof h=="object"||typeof h=="function")for(let b of a(h))!s.call(f,b)&&b!==g&&r(f,b,{get:()=>h[b],enumerable:!(y=n(h,b))||y.enumerable});return f},l=f=>o(r({},"__esModule",{value:!0}),f),c={};i(c,{SYMBOL_FOR_REQ_CONTEXT:()=>u,getContext:()=>d}),t.exports=l(c);var u=Symbol.for("@vercel/request-context");function d(){return globalThis[u]?.get?.()??{}}}}),nqr=uF({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(g,y)=>{for(var b in y)r(g,b,{get:y[b],enumerable:!0})},o=(g,y,b,w)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of a(y))!s.call(g,x)&&x!==b&&r(g,x,{get:()=>y[x],enumerable:!(w=n(y,x))||w.enumerable});return g},l=g=>o(r({},"__esModule",{value:!0}),g),c={};i(c,{getVercelOidcToken:()=>f,getVercelOidcTokenSync:()=>h}),t.exports=l(c);var u=Hlt(),d=IUr();async function f(){let g="",y;try{g=h()}catch(b){y=b}try{const[{getTokenPayload:b,isExpired:w},{refreshToken:x}]=await Promise.all([await Fe(()=>import("./token-util-NEHG7TUY-U7CX7GS4-DQzJqVHl.js"),__vite__mapDeps([26,27,1]),import.meta.url),await Fe(()=>import("./token-6GSAFR2W-XRCSVUPZ-B-9rMbT9.js"),__vite__mapDeps([28,27,1]),import.meta.url)]);(!g||w(b(g)))&&(await x(),g=h())}catch(b){throw y?.message&&b instanceof Error&&(b.message=`${y.message}
|
|
507
|
+
]`;continue}s+=a[c],a[c]==="\\"?i=!0:o&&a[c]==="]"?o=!1:!o&&a[c]==="["&&(o=!0)}return s}function Zlt(e,t){var r,n,a,s,i,o;const l={type:"object",additionalProperties:(r=Fa(e.valueType._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]}))!=null?r:t.allowedAdditionalProperties};if(((n=e.keyType)==null?void 0:n._def.typeName)===oe.ZodString&&((a=e.keyType._def.checks)!=null&&a.length)){const{type:c,...u}=qlt(e.keyType._def,t);return{...l,propertyNames:u}}else{if(((s=e.keyType)==null?void 0:s._def.typeName)===oe.ZodEnum)return{...l,propertyNames:{enum:e.keyType._def.values}};if(((i=e.keyType)==null?void 0:i._def.typeName)===oe.ZodBranded&&e.keyType._def.type._def.typeName===oe.ZodString&&((o=e.keyType._def.type._def.checks)!=null&&o.length)){const{type:c,...u}=Ult(e.keyType._def,t);return{...l,propertyNames:u}}}return l}function _Vr(e,t){if(t.mapStrategy==="record")return Zlt(e,t);const r=Fa(e.keyType._def,{...t,currentPath:[...t.currentPath,"items","items","0"]})||nd(),n=Fa(e.valueType._def,{...t,currentPath:[...t.currentPath,"items","items","1"]})||nd();return{type:"array",maxItems:125,items:{type:"array",items:[r,n],minItems:2,maxItems:2}}}function kVr(e){const t=e.values,n=Object.keys(e.values).filter(s=>typeof t[t[s]]!="number").map(s=>t[s]),a=Array.from(new Set(n.map(s=>typeof s)));return{type:a.length===1?a[0]==="string"?"string":"number":["string","number"],enum:n}}function CVr(){return{not:nd()}}function TVr(){return{type:"null"}}var pre={ZodString:"string",ZodNumber:"number",ZodBigInt:"integer",ZodBoolean:"boolean",ZodNull:"null"};function AVr(e,t){const r=e.options instanceof Map?Array.from(e.options.values()):e.options;if(r.every(n=>n._def.typeName in pre&&(!n._def.checks||!n._def.checks.length))){const n=r.reduce((a,s)=>{const i=pre[s._def.typeName];return i&&!a.includes(i)?[...a,i]:a},[]);return{type:n.length>1?n:n[0]}}else if(r.every(n=>n._def.typeName==="ZodLiteral"&&!n.description)){const n=r.reduce((a,s)=>{const i=typeof s._def.value;switch(i){case"string":case"number":case"boolean":return[...a,i];case"bigint":return[...a,"integer"];case"object":if(s._def.value===null)return[...a,"null"];default:return a}},[]);if(n.length===r.length){const a=n.filter((s,i,o)=>o.indexOf(s)===i);return{type:a.length>1?a:a[0],enum:r.reduce((s,i)=>s.includes(i._def.value)?s:[...s,i._def.value],[])}}}else if(r.every(n=>n._def.typeName==="ZodEnum"))return{type:"string",enum:r.reduce((n,a)=>[...n,...a._def.values.filter(s=>!n.includes(s))],[])};return DVr(e,t)}var DVr=(e,t)=>{const r=(e.options instanceof Map?Array.from(e.options.values()):e.options).map((n,a)=>Fa(n._def,{...t,currentPath:[...t.currentPath,"anyOf",`${a}`]})).filter(n=>!!n&&(!t.strictUnions||typeof n=="object"&&Object.keys(n).length>0));return r.length?{anyOf:r}:void 0};function IVr(e,t){if(["ZodString","ZodNumber","ZodBigInt","ZodBoolean","ZodNull"].includes(e.innerType._def.typeName)&&(!e.innerType._def.checks||!e.innerType._def.checks.length))return{type:[pre[e.innerType._def.typeName],"null"]};const r=Fa(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","0"]});return r&&{anyOf:[r,{type:"null"}]}}function NVr(e){const t={type:"number"};if(!e.checks)return t;for(const r of e.checks)switch(r.kind){case"int":t.type="integer";break;case"min":r.inclusive?t.minimum=r.value:t.exclusiveMinimum=r.value;break;case"max":r.inclusive?t.maximum=r.value:t.exclusiveMaximum=r.value;break;case"multipleOf":t.multipleOf=r.value;break}return t}function RVr(e,t){const r={type:"object",properties:{}},n=[],a=e.shape();for(const i in a){let o=a[i];if(o===void 0||o._def===void 0)continue;const l=$Vr(o),c=Fa(o._def,{...t,currentPath:[...t.currentPath,"properties",i],propertyPath:[...t.currentPath,"properties",i]});c!==void 0&&(r.properties[i]=c,l||n.push(i))}n.length&&(r.required=n);const s=PVr(e,t);return s!==void 0&&(r.additionalProperties=s),r}function PVr(e,t){if(e.catchall._def.typeName!=="ZodNever")return Fa(e.catchall._def,{...t,currentPath:[...t.currentPath,"additionalProperties"]});switch(e.unknownKeys){case"passthrough":return t.allowedAdditionalProperties;case"strict":return t.rejectedAdditionalProperties;case"strip":return t.removeAdditionalStrategy==="strict"?t.allowedAdditionalProperties:t.rejectedAdditionalProperties}}function $Vr(e){try{return e.isOptional()}catch{return!0}}var MVr=(e,t)=>{var r;if(t.currentPath.toString()===((r=t.propertyPath)==null?void 0:r.toString()))return Fa(e.innerType._def,t);const n=Fa(e.innerType._def,{...t,currentPath:[...t.currentPath,"anyOf","1"]});return n?{anyOf:[{not:nd()},n]}:nd()},jVr=(e,t)=>{if(t.pipeStrategy==="input")return Fa(e.in._def,t);if(t.pipeStrategy==="output")return Fa(e.out._def,t);const r=Fa(e.in._def,{...t,currentPath:[...t.currentPath,"allOf","0"]}),n=Fa(e.out._def,{...t,currentPath:[...t.currentPath,"allOf",r?"1":"0"]});return{allOf:[r,n].filter(a=>a!==void 0)}};function LVr(e,t){return Fa(e.type._def,t)}function FVr(e,t){const n={type:"array",uniqueItems:!0,items:Fa(e.valueType._def,{...t,currentPath:[...t.currentPath,"items"]})};return e.minSize&&(n.minItems=e.minSize.value),e.maxSize&&(n.maxItems=e.maxSize.value),n}function BVr(e,t){return e.rest?{type:"array",minItems:e.items.length,items:e.items.map((r,n)=>Fa(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[]),additionalItems:Fa(e.rest._def,{...t,currentPath:[...t.currentPath,"additionalItems"]})}:{type:"array",minItems:e.items.length,maxItems:e.items.length,items:e.items.map((r,n)=>Fa(r._def,{...t,currentPath:[...t.currentPath,"items",`${n}`]})).reduce((r,n)=>n===void 0?r:[...r,n],[])}}function zVr(){return{not:nd()}}function UVr(){return nd()}var VVr=(e,t)=>Fa(e.innerType._def,t),qVr=(e,t,r)=>{switch(t){case oe.ZodString:return qlt(e,r);case oe.ZodNumber:return NVr(e);case oe.ZodObject:return RVr(e,r);case oe.ZodBigInt:return fVr(e);case oe.ZodBoolean:return hVr();case oe.ZodDate:return Vlt(e,r);case oe.ZodUndefined:return zVr();case oe.ZodNull:return TVr();case oe.ZodArray:return pVr(e,r);case oe.ZodUnion:case oe.ZodDiscriminatedUnion:return AVr(e,r);case oe.ZodIntersection:return wVr(e,r);case oe.ZodTuple:return BVr(e,r);case oe.ZodRecord:return Zlt(e,r);case oe.ZodLiteral:return SVr(e);case oe.ZodEnum:return vVr(e);case oe.ZodNativeEnum:return kVr(e);case oe.ZodNullable:return IVr(e,r);case oe.ZodOptional:return MVr(e,r);case oe.ZodMap:return _Vr(e,r);case oe.ZodSet:return FVr(e,r);case oe.ZodLazy:return()=>e.getter()._def;case oe.ZodPromise:return LVr(e,r);case oe.ZodNaN:case oe.ZodNever:return CVr();case oe.ZodEffects:return bVr(e,r);case oe.ZodAny:return nd();case oe.ZodUnknown:return UVr();case oe.ZodDefault:return yVr(e,r);case oe.ZodBranded:return Ult(e,r);case oe.ZodReadonly:return VVr(e,r);case oe.ZodCatch:return mVr(e,r);case oe.ZodPipeline:return jVr(e,r);case oe.ZodFunction:case oe.ZodVoid:case oe.ZodSymbol:return;default:return(n=>{})()}};function Fa(e,t,r=!1){var n;const a=t.seen.get(e);if(t.override){const l=(n=t.override)==null?void 0:n.call(t,e,t,a,r);if(l!==uVr)return l}if(a&&!r){const l=ZVr(a,t);if(l!==void 0)return l}const s={def:e,path:t.currentPath,jsonSchema:void 0};t.seen.set(e,s);const i=qVr(e,e.typeName,t),o=typeof i=="function"?Fa(i(),t):i;if(o&&HVr(e,t,o),t.postProcess){const l=t.postProcess(o,e,t);return s.jsonSchema=o,l}return s.jsonSchema=o,o}var ZVr=(e,t)=>{switch(t.$refStrategy){case"root":return{$ref:e.path.join("/")};case"relative":return{$ref:cVr(t.currentPath,e.path)};case"none":case"seen":return e.path.length<t.currentPath.length&&e.path.every((r,n)=>t.currentPath[n]===r)?(console.warn(`Recursive reference detected at ${t.currentPath.join("/")}! Defaulting to any`),nd()):t.$refStrategy==="seen"?nd():void 0}},HVr=(e,t,r)=>(e.description&&(r.description=e.description),r),GVr=e=>{const t=dVr(e),r=t.name!==void 0?[...t.basePath,t.definitionPath,t.name]:t.basePath;return{...t,currentPath:r,propertyPath:void 0,seen:new Map(Object.entries(t.definitions).map(([n,a])=>[a._def,{def:a._def,path:[...t.basePath,t.definitionPath,n],jsonSchema:void 0}]))}},QVr=(e,t)=>{var r;const n=GVr(t);let a=typeof t=="object"&&t.definitions?Object.entries(t.definitions).reduce((c,[u,d])=>{var f;return{...c,[u]:(f=Fa(d._def,{...n,currentPath:[...n.basePath,n.definitionPath,u]},!0))!=null?f:nd()}},{}):void 0;const s=typeof t=="string"?t:t?.nameStrategy==="title"?void 0:t?.name,i=(r=Fa(e._def,s===void 0?n:{...n,currentPath:[...n.basePath,n.definitionPath,s]},!1))!=null?r:nd(),o=typeof t=="object"&&t.name!==void 0&&t.nameStrategy==="title"?t.name:void 0;o!==void 0&&(i.title=o);const l=s===void 0?a?{...i,[n.definitionPath]:a}:i:{$ref:[...n.$refStrategy==="relative"?[]:n.basePath,n.definitionPath,s].join("/"),[n.definitionPath]:{...a,[s]:i}};return l.$schema="http://json-schema.org/draft-07/schema#",l},WVr=QVr;function XVr(e,t){var r;const n=(r=void 0)!=null?r:!1;return Dde(()=>WVr(e,{$refStrategy:n?"root":"none"}),{validate:async a=>{const s=await e.safeParseAsync(a);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function YVr(e,t){var r;const n=(r=void 0)!=null?r:!1;return Dde(()=>UGe(e,{target:"draft-7",io:"output",reused:n?"ref":"inline"}),{validate:async a=>{const s=await Qoe(e,a);return s.success?{success:!0,value:s.data}:{success:!1,error:s.error}}})}function KVr(e){return"_zod"in e}function C1(e,t){return KVr(e)?YVr(e):XVr(e)}var fre=Symbol.for("vercel.ai.schema");function Dde(e,{validate:t}={}){return{[fre]:!0,_type:void 0,[ej]:!0,get jsonSchema(){return typeof e=="function"&&(e=e()),e},validate:t}}function JVr(e){return typeof e=="object"&&e!==null&&fre in e&&e[fre]===!0&&"jsonSchema"in e&&"validate"in e}function eqr(e){return e==null?Dde({properties:{},additionalProperties:!1}):JVr(e)?e:typeof e=="function"?e():C1(e)}function tqr(e){return e?.replace(/\/$/,"")}var rqr={},Hlt=uF({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-context.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(f,h)=>{for(var g in h)r(f,g,{get:h[g],enumerable:!0})},o=(f,h,g,y)=>{if(h&&typeof h=="object"||typeof h=="function")for(let b of a(h))!s.call(f,b)&&b!==g&&r(f,b,{get:()=>h[b],enumerable:!(y=n(h,b))||y.enumerable});return f},l=f=>o(r({},"__esModule",{value:!0}),f),c={};i(c,{SYMBOL_FOR_REQ_CONTEXT:()=>u,getContext:()=>d}),t.exports=l(c);var u=Symbol.for("@vercel/request-context");function d(){return globalThis[u]?.get?.()??{}}}}),nqr=uF({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/get-vercel-oidc-token.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(g,y)=>{for(var b in y)r(g,b,{get:y[b],enumerable:!0})},o=(g,y,b,w)=>{if(y&&typeof y=="object"||typeof y=="function")for(let x of a(y))!s.call(g,x)&&x!==b&&r(g,x,{get:()=>y[x],enumerable:!(w=n(y,x))||w.enumerable});return g},l=g=>o(r({},"__esModule",{value:!0}),g),c={};i(c,{getVercelOidcToken:()=>f,getVercelOidcTokenSync:()=>h}),t.exports=l(c);var u=Hlt(),d=IUr();async function f(){let g="",y;try{g=h()}catch(b){y=b}try{const[{getTokenPayload:b,isExpired:w},{refreshToken:x}]=await Promise.all([await Fe(()=>import("./token-util-NEHG7TUY-U7CX7GS4-DFtrw2uQ.js"),__vite__mapDeps([26,27,1]),import.meta.url),await Fe(()=>import("./token-6GSAFR2W-XRCSVUPZ-k3nryV4h.js"),__vite__mapDeps([28,27,1]),import.meta.url)]);(!g||w(b(g)))&&(await x(),g=h())}catch(b){throw y?.message&&b instanceof Error&&(b.message=`${y.message}
|
|
508
508
|
${b.message}`),new d.VercelOidcTokenError("Failed to refresh OIDC token",b)}return g}function h(){const g=(0,u.getContext)().headers?.["x-vercel-oidc-token"]??rqr.VERCEL_OIDC_TOKEN;if(!g)throw new Error("The 'x-vercel-oidc-token' header is missing from the request. Do you have the OIDC option enabled in the Vercel project settings?");return g}}}),Glt=uF({"../../../node_modules/.pnpm/@vercel+oidc@3.0.5/node_modules/@vercel/oidc/dist/index.js"(e,t){var r=Object.defineProperty,n=Object.getOwnPropertyDescriptor,a=Object.getOwnPropertyNames,s=Object.prototype.hasOwnProperty,i=(f,h)=>{for(var g in h)r(f,g,{get:h[g],enumerable:!0})},o=(f,h,g,y)=>{if(h&&typeof h=="object"||typeof h=="function")for(let b of a(h))!s.call(f,b)&&b!==g&&r(f,b,{get:()=>h[b],enumerable:!(y=n(h,b))||y.enumerable});return f},l=f=>o(r({},"__esModule",{value:!0}),f),c={};i(c,{getContext:()=>d.getContext,getVercelOidcToken:()=>u.getVercelOidcToken,getVercelOidcTokenSync:()=>u.getVercelOidcTokenSync}),t.exports=l(c);var u=nqr(),d=Hlt()}}),aqr=vlt(Glt()),sqr=vlt(Glt()),iqr="vercel.ai.gateway.error",XW=Symbol.for(iqr),TPe,APe,ad=class Qlt extends(APe=Error,TPe=XW,APe){constructor({message:t,statusCode:r=500,cause:n}){super(t),this[TPe]=!0,this.statusCode=r,this.cause=n}static isInstance(t){return Qlt.hasMarker(t)}static hasMarker(t){return typeof t=="object"&&t!==null&&XW in t&&t[XW]===!0}},Wlt="GatewayAuthenticationError",oqr=`vercel.ai.gateway.error.${Wlt}`,DPe=Symbol.for(oqr),IPe,NPe,Xlt=class Ylt extends(NPe=ad,IPe=DPe,NPe){constructor({message:t="Authentication failed",statusCode:r=401,cause:n}={}){super({message:t,statusCode:r,cause:n}),this[IPe]=!0,this.name=Wlt,this.type="authentication_error"}static isInstance(t){return ad.hasMarker(t)&&DPe in t}static createContextualError({apiKeyProvided:t,oidcTokenProvided:r,message:n="Authentication failed",statusCode:a=401,cause:s}){let i;return t?i=`AI Gateway authentication failed: Invalid API key.
|
|
509
509
|
|
|
510
510
|
Create a new API key: https://vercel.com/d?to=%2F%5Bteam%5D%2F%7E%2Fai%2Fapi-keys
|
|
@@ -594,7 +594,7 @@ You can add a description to the \`${FS}\` by passing a \`${lpt}\` component as
|
|
|
594
594
|
|
|
595
595
|
Alternatively, you can use your own component as a description by assigning it an \`id\` and passing the same value to the \`aria-describedby\` prop in \`${FS}\`. If the description is confusing or duplicative for sighted users, you can use the \`@radix-ui/react-visually-hidden\` primitive as a wrapper around your description component.
|
|
596
596
|
|
|
597
|
-
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},wtn=tpt,Stn=rpt,Etn=npt,fpt=apt,hpt=spt,mpt=upt,gpt=ppt,ypt=opt,bpt=cpt,iI=(e=>(e.AGENT="agent",e.EVAL="eval",e.INPUT_PROCESSOR="input_processor",e.INPUT_STEP_PROCESSOR="input_step_processor",e.OUTPUT_PROCESSOR="output_processor",e.OUTPUT_STEP_PROCESSOR="output_step_processor",e.WORKFLOW_STEP="workflow_step",e.TOOL="tool",e.WORKFLOW_RUN="workflow_run",e))(iI||{}),p$e=1,Otn=.9,_tn=.8,ktn=.17,EX=.1,OX=.999,Ctn=.9999,Ttn=.99,Atn=/[\\\/_+.#"@\[\(\{&]/,Dtn=/[\\\/_+.#"@\[\(\{&]/g,Itn=/[\s-]/,vpt=/[\s-]/g;function Dre(e,t,r,n,a,s,i){if(s===t.length)return a===e.length?p$e:Ttn;var o=`${a},${s}`;if(i[o]!==void 0)return i[o];for(var l=n.charAt(s),c=r.indexOf(l,a),u=0,d,f,h,g;c>=0;)d=Dre(e,t,r,n,c+1,s+1,i),d>u&&(c===a?d*=p$e:Atn.test(e.charAt(c-1))?(d*=_tn,h=e.slice(a,c-1).match(Dtn),h&&a>0&&(d*=Math.pow(OX,h.length))):Itn.test(e.charAt(c-1))?(d*=Otn,g=e.slice(a,c-1).match(vpt),g&&a>0&&(d*=Math.pow(OX,g.length))):(d*=ktn,a>0&&(d*=Math.pow(OX,c-a))),e.charAt(c)!==t.charAt(s)&&(d*=Ctn)),(d<EX&&r.charAt(c-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(c-1)!==n.charAt(s))&&(f=Dre(e,t,r,n,c+1,s+2,i),f*EX>d&&(d=f*EX)),d>u&&(u=d),c=r.indexOf(l,c+1);return i[o]=u,u}function f$e(e){return e.toLowerCase().replace(vpt," ")}function Ntn(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Dre(e,t,f$e(e),f$e(t),0,0,{})}var eC='[cmdk-group=""]',_X='[cmdk-group-items=""]',Rtn='[cmdk-group-heading=""]',xpt='[cmdk-item=""]',h$e=`${xpt}:not([aria-disabled="true"])`,Ire="cmdk-item-select",Zw="data-value",Ptn=(e,t,r)=>Ntn(e,t,r),wpt=_.createContext(void 0),qN=()=>_.useContext(wpt),Spt=_.createContext(void 0),ype=()=>_.useContext(Spt),Ept=_.createContext(void 0),Opt=_.forwardRef((e,t)=>{let r=Hw(()=>{var q,I;return{search:"",value:(I=(q=e.value)!=null?q:e.defaultValue)!=null?I:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Hw(()=>new Set),a=Hw(()=>new Map),s=Hw(()=>new Map),i=Hw(()=>new Set),o=_pt(e),{label:l,children:c,value:u,onValueChange:d,filter:f,shouldFilter:h,loop:g,disablePointerSelection:y=!1,vimBindings:b=!0,...w}=e,x=Wo(),S=Wo(),E=Wo(),C=_.useRef(null),k=Ztn();$x(()=>{if(u!==void 0){let q=u.trim();r.current.value=q,A.emit()}},[u]),$x(()=>{k(6,U)},[]);let A=_.useMemo(()=>({subscribe:q=>(i.current.add(q),()=>i.current.delete(q)),snapshot:()=>r.current,setState:(q,I,Z)=>{var G,J,K,ae;if(!Object.is(r.current[q],I)){if(r.current[q]=I,q==="search")z(),P(),k(1,j);else if(q==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let le=document.getElementById(E);le?le.focus():(G=document.getElementById(x))==null||G.focus()}if(k(7,()=>{var le;r.current.selectedItemId=(le=$())==null?void 0:le.id,A.emit()}),Z||k(5,U),((J=o.current)==null?void 0:J.value)!==void 0){let le=I??"";(ae=(K=o.current).onValueChange)==null||ae.call(K,le);return}}A.emit()}},emit:()=>{i.current.forEach(q=>q())}}),[]),D=_.useMemo(()=>({value:(q,I,Z)=>{var G;I!==((G=s.current.get(q))==null?void 0:G.value)&&(s.current.set(q,{value:I,keywords:Z}),r.current.filtered.items.set(q,N(I,Z)),k(2,()=>{P(),A.emit()}))},item:(q,I)=>(n.current.add(q),I&&(a.current.has(I)?a.current.get(I).add(q):a.current.set(I,new Set([q]))),k(3,()=>{z(),P(),r.current.value||j(),A.emit()}),()=>{s.current.delete(q),n.current.delete(q),r.current.filtered.items.delete(q);let Z=$();k(4,()=>{z(),Z?.getAttribute("id")===q&&j(),A.emit()})}),group:q=>(a.current.has(q)||a.current.set(q,new Set),()=>{s.current.delete(q),a.current.delete(q)}),filter:()=>o.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:x,inputId:E,labelId:S,listInnerRef:C}),[]);function N(q,I){var Z,G;let J=(G=(Z=o.current)==null?void 0:Z.filter)!=null?G:Ptn;return q?J(q,r.current.search,I):0}function P(){if(!r.current.search||o.current.shouldFilter===!1)return;let q=r.current.filtered.items,I=[];r.current.filtered.groups.forEach(G=>{let J=a.current.get(G),K=0;J.forEach(ae=>{let le=q.get(ae);K=Math.max(le,K)}),I.push([G,K])});let Z=C.current;F().sort((G,J)=>{var K,ae;let le=G.getAttribute("id"),ce=J.getAttribute("id");return((K=q.get(ce))!=null?K:0)-((ae=q.get(le))!=null?ae:0)}).forEach(G=>{let J=G.closest(_X);J?J.appendChild(G.parentElement===J?G:G.closest(`${_X} > *`)):Z.appendChild(G.parentElement===Z?G:G.closest(`${_X} > *`))}),I.sort((G,J)=>J[1]-G[1]).forEach(G=>{var J;let K=(J=C.current)==null?void 0:J.querySelector(`${eC}[${Zw}="${encodeURIComponent(G[0])}"]`);K?.parentElement.appendChild(K)})}function j(){let q=F().find(Z=>Z.getAttribute("aria-disabled")!=="true"),I=q?.getAttribute(Zw);A.setState("value",I||void 0)}function z(){var q,I,Z,G;if(!r.current.search||o.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let J=0;for(let K of n.current){let ae=(I=(q=s.current.get(K))==null?void 0:q.value)!=null?I:"",le=(G=(Z=s.current.get(K))==null?void 0:Z.keywords)!=null?G:[],ce=N(ae,le);r.current.filtered.items.set(K,ce),ce>0&&J++}for(let[K,ae]of a.current)for(let le of ae)if(r.current.filtered.items.get(le)>0){r.current.filtered.groups.add(K);break}r.current.filtered.count=J}function U(){var q,I,Z;let G=$();G&&(((q=G.parentElement)==null?void 0:q.firstChild)===G&&((Z=(I=G.closest(eC))==null?void 0:I.querySelector(Rtn))==null||Z.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function $(){var q;return(q=C.current)==null?void 0:q.querySelector(`${xpt}[aria-selected="true"]`)}function F(){var q;return Array.from(((q=C.current)==null?void 0:q.querySelectorAll(h$e))||[])}function V(q){let I=F()[q];I&&A.setState("value",I.getAttribute(Zw))}function H(q){var I;let Z=$(),G=F(),J=G.findIndex(ae=>ae===Z),K=G[J+q];(I=o.current)!=null&&I.loop&&(K=J+q<0?G[G.length-1]:J+q===G.length?G[0]:G[J+q]),K&&A.setState("value",K.getAttribute(Zw))}function B(q){let I=$(),Z=I?.closest(eC),G;for(;Z&&!G;)Z=q>0?Vtn(Z,eC):qtn(Z,eC),G=Z?.querySelector(h$e);G?A.setState("value",G.getAttribute(Zw)):H(q)}let Q=()=>V(F().length-1),M=q=>{q.preventDefault(),q.metaKey?Q():q.altKey?B(1):H(1)},W=q=>{q.preventDefault(),q.metaKey?V(0):q.altKey?B(-1):H(-1)};return _.createElement(Ro.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:q=>{var I;(I=w.onKeyDown)==null||I.call(w,q);let Z=q.nativeEvent.isComposing||q.keyCode===229;if(!(q.defaultPrevented||Z))switch(q.key){case"n":case"j":{b&&q.ctrlKey&&M(q);break}case"ArrowDown":{M(q);break}case"p":case"k":{b&&q.ctrlKey&&W(q);break}case"ArrowUp":{W(q);break}case"Home":{q.preventDefault(),V(0);break}case"End":{q.preventDefault(),Q();break}case"Enter":{q.preventDefault();let G=$();if(G){let J=new Event(Ire);G.dispatchEvent(J)}}}}},_.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:Gtn},l),OF(e,q=>_.createElement(Spt.Provider,{value:A},_.createElement(wpt.Provider,{value:D},q))))}),$tn=_.forwardRef((e,t)=>{var r,n;let a=Wo(),s=_.useRef(null),i=_.useContext(Ept),o=qN(),l=_pt(e),c=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:i?.forceMount;$x(()=>{if(!c)return o.item(a,i?.id)},[c]);let u=kpt(a,s,[e.value,e.children,s],e.keywords),d=ype(),f=lv(k=>k.value&&k.value===u.current),h=lv(k=>c||o.filter()===!1?!0:k.search?k.filtered.items.get(a)>0:!0);_.useEffect(()=>{let k=s.current;if(!(!k||e.disabled))return k.addEventListener(Ire,g),()=>k.removeEventListener(Ire,g)},[h,e.onSelect,e.disabled]);function g(){var k,A;y(),(A=(k=l.current).onSelect)==null||A.call(k,u.current)}function y(){d.setState("value",u.current,!0)}if(!h)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,keywords:E,...C}=e;return _.createElement(Ro.div,{ref:Rb(s,t),...C,id:a,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!f,"data-disabled":!!b,"data-selected":!!f,onPointerMove:b||o.getDisablePointerSelection()?void 0:y,onClick:b?void 0:g},e.children)}),Mtn=_.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...s}=e,i=Wo(),o=_.useRef(null),l=_.useRef(null),c=Wo(),u=qN(),d=lv(h=>a||u.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);$x(()=>u.group(i),[]),kpt(i,o,[e.value,e.heading,l]);let f=_.useMemo(()=>({id:i,forceMount:a}),[a]);return _.createElement(Ro.div,{ref:Rb(o,t),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&_.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),OF(e,h=>_.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},_.createElement(Ept.Provider,{value:f},h))))}),jtn=_.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=_.useRef(null),s=lv(i=>!i.search);return!r&&!s?null:_.createElement(Ro.div,{ref:Rb(a,t),...n,"cmdk-separator":"",role:"separator"})}),Ltn=_.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,s=ype(),i=lv(c=>c.search),o=lv(c=>c.selectedItemId),l=qN();return _.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),_.createElement(Ro.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":o,id:l.inputId,type:"text",value:a?e.value:i,onChange:c=>{a||s.setState("search",c.target.value),r?.(c.target.value)}})}),Ftn=_.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,s=_.useRef(null),i=_.useRef(null),o=lv(c=>c.selectedItemId),l=qN();return _.useEffect(()=>{if(i.current&&s.current){let c=i.current,u=s.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=c.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return f.observe(c),()=>{cancelAnimationFrame(d),f.unobserve(c)}}},[]),_.createElement(Ro.div,{ref:Rb(s,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":n,id:l.listId},OF(e,c=>_.createElement("div",{ref:Rb(i,l.listInnerRef),"cmdk-list-sizer":""},c)))}),Btn=_.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:s,container:i,...o}=e;return _.createElement(zL,{open:r,onOpenChange:n},_.createElement(UL,{container:i},_.createElement(aN,{"cmdk-overlay":"",className:a}),_.createElement(sN,{"aria-label":e.label,"cmdk-dialog":"",className:s},_.createElement(Opt,{ref:t,...o}))))}),ztn=_.forwardRef((e,t)=>lv(r=>r.filtered.count===0)?_.createElement(Ro.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Utn=_.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...s}=e;return _.createElement(Ro.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},OF(e,i=>_.createElement("div",{"aria-hidden":!0},i)))}),tu=Object.assign(Opt,{List:Ftn,Item:$tn,Input:Ltn,Group:Mtn,Separator:jtn,Dialog:Btn,Empty:ztn,Loading:Utn});function Vtn(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function qtn(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function _pt(e){let t=_.useRef(e);return $x(()=>{t.current=e}),t}var $x=typeof window>"u"?_.useEffect:_.useLayoutEffect;function Hw(e){let t=_.useRef();return t.current===void 0&&(t.current=e()),t}function lv(e){let t=ype(),r=()=>e(t.snapshot());return _.useSyncExternalStore(t.subscribe,r,r)}function kpt(e,t,r,n=[]){let a=_.useRef(),s=qN();return $x(()=>{var i;let o=(()=>{var c;for(let u of r){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():a.current}})(),l=n.map(c=>c.trim());s.value(e,o,l),(i=t.current)==null||i.setAttribute(Zw,o),a.current=o}),a}var Ztn=()=>{let[e,t]=_.useState(),r=Hw(()=>new Map);return $x(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function Htn(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function OF({asChild:e,children:t},r){return e&&_.isValidElement(t)?_.cloneElement(Htn(t),{ref:t.ref},r(t.props.children)):r(t)}var Gtn={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},l$={exports:{}},kX,m$e;function _F(){if(m$e)return kX;m$e=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,a=t-6;return kX={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:a,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},kX}var CX,g$e;function kF(){if(g$e)return CX;g$e=1;var e={},t={};return CX=typeof e=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},CX}var y$e;function ZN(){return y$e||(y$e=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:a}=_F(),s=kF();t=e.exports={};const i=t.re=[],o=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",a],[f,n]],g=b=>{for(const[w,x]of h)b=b.split(`${w}*`).join(`${w}{0,${x}}`).split(`${w}+`).join(`${w}{1,${x}}`);return b},y=(b,w,x)=>{const S=g(w),E=d++;s(b,E,w),u[b]=E,l[E]=w,c[E]=S,i[E]=new RegExp(w,x?"g":void 0),o[E]=new RegExp(S,x?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),y("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${f}+`),y("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),y("FULL",`^${l[u.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),y("LOOSE",`^${l[u.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),y("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),y("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),y("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),y("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),y("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),y("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",l[u.COERCE],!0),y("COERCERTLFULL",l[u.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",y("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),y("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",y("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",y("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(l$,l$.exports)),l$.exports}var TX,b$e;function bpe(){if(b$e)return TX;b$e=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return TX=n=>n?typeof n!="object"?e:n:t,TX}var AX,v$e;function Cpt(){if(v$e)return AX;v$e=1;const e=/^[0-9]+$/,t=(n,a)=>{if(typeof n=="number"&&typeof a=="number")return n===a?0:n<a?-1:1;const s=e.test(n),i=e.test(a);return s&&i&&(n=+n,a=+a),n===a?0:s&&!i?-1:i&&!s?1:n<a?-1:1};return AX={compareIdentifiers:t,rcompareIdentifiers:(n,a)=>t(a,n)},AX}var DX,x$e;function tc(){if(x$e)return DX;x$e=1;const e=kF(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=_F(),{safeRe:n,t:a}=ZN(),s=bpe(),{compareIdentifiers:i}=Cpt();class o{constructor(c,u){if(u=s(u),c instanceof o){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?n[a.LOOSE]:n[a.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const h=+f;if(h>=0&&h<r)return h}return f}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof o)){if(typeof c=="string"&&c===this.version)return 0;c=new o(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof o||(c=new o(c,this.options)),this.major<c.major?-1:this.major>c.major?1:this.minor<c.minor?-1:this.minor>c.minor?1:this.patch<c.patch?-1:this.patch>c.patch?1:0}comparePre(c){if(c instanceof o||(c=new o(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let u=0;do{const d=this.prerelease[u],f=c.prerelease[u];if(e("prerelease compare",u,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return i(d,f)}while(++u)}compareBuild(c){c instanceof o||(c=new o(c,this.options));let u=0;do{const d=this.build[u],f=c.build[u];if(e("build compare",u,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return i(d,f)}while(++u)}inc(c,u,d){if(c.startsWith("pre")){if(!u&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const f=`-${u}`.match(this.options.loose?n[a.PRERELEASELOOSE]:n[a.PRERELEASE]);if(!f||f[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,d),this.inc("pre",u,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,d),this.inc("pre",u,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const f=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(u===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(u){let h=[u,f];d===!1&&(h=[u]),i(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=h):this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return DX=o,DX}var IX,w$e;function t_(){if(w$e)return IX;w$e=1;const e=tc();return IX=(r,n,a=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(s){if(!a)return null;throw s}},IX}var NX,S$e;function Qtn(){if(S$e)return NX;S$e=1;const e=t_();return NX=(r,n)=>{const a=e(r,n);return a?a.version:null},NX}var RX,E$e;function Wtn(){if(E$e)return RX;E$e=1;const e=t_();return RX=(r,n)=>{const a=e(r.trim().replace(/^[=v]+/,""),n);return a?a.version:null},RX}var PX,O$e;function Xtn(){if(O$e)return PX;O$e=1;const e=tc();return PX=(r,n,a,s,i)=>{typeof a=="string"&&(i=s,s=a,a=void 0);try{return new e(r instanceof e?r.version:r,a).inc(n,s,i).version}catch{return null}},PX}var $X,_$e;function Ytn(){if(_$e)return $X;_$e=1;const e=t_();return $X=(r,n)=>{const a=e(r,null,!0),s=e(n,null,!0),i=a.compare(s);if(i===0)return null;const o=i>0,l=o?a:s,c=o?s:a,u=!!l.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(l)===0)return c.minor&&!c.patch?"minor":"patch"}const f=u?"pre":"";return a.major!==s.major?f+"major":a.minor!==s.minor?f+"minor":a.patch!==s.patch?f+"patch":"prerelease"},$X}var MX,k$e;function Ktn(){if(k$e)return MX;k$e=1;const e=tc();return MX=(r,n)=>new e(r,n).major,MX}var jX,C$e;function Jtn(){if(C$e)return jX;C$e=1;const e=tc();return jX=(r,n)=>new e(r,n).minor,jX}var LX,T$e;function ern(){if(T$e)return LX;T$e=1;const e=tc();return LX=(r,n)=>new e(r,n).patch,LX}var FX,A$e;function trn(){if(A$e)return FX;A$e=1;const e=t_();return FX=(r,n)=>{const a=e(r,n);return a&&a.prerelease.length?a.prerelease:null},FX}var BX,D$e;function If(){if(D$e)return BX;D$e=1;const e=tc();return BX=(r,n,a)=>new e(r,a).compare(new e(n,a)),BX}var zX,I$e;function rrn(){if(I$e)return zX;I$e=1;const e=If();return zX=(r,n,a)=>e(n,r,a),zX}var UX,N$e;function nrn(){if(N$e)return UX;N$e=1;const e=If();return UX=(r,n)=>e(r,n,!0),UX}var VX,R$e;function vpe(){if(R$e)return VX;R$e=1;const e=tc();return VX=(r,n,a)=>{const s=new e(r,a),i=new e(n,a);return s.compare(i)||s.compareBuild(i)},VX}var qX,P$e;function arn(){if(P$e)return qX;P$e=1;const e=vpe();return qX=(r,n)=>r.sort((a,s)=>e(a,s,n)),qX}var ZX,$$e;function srn(){if($$e)return ZX;$$e=1;const e=vpe();return ZX=(r,n)=>r.sort((a,s)=>e(s,a,n)),ZX}var HX,M$e;function CF(){if(M$e)return HX;M$e=1;const e=If();return HX=(r,n,a)=>e(r,n,a)>0,HX}var GX,j$e;function xpe(){if(j$e)return GX;j$e=1;const e=If();return GX=(r,n,a)=>e(r,n,a)<0,GX}var QX,L$e;function Tpt(){if(L$e)return QX;L$e=1;const e=If();return QX=(r,n,a)=>e(r,n,a)===0,QX}var WX,F$e;function Apt(){if(F$e)return WX;F$e=1;const e=If();return WX=(r,n,a)=>e(r,n,a)!==0,WX}var XX,B$e;function wpe(){if(B$e)return XX;B$e=1;const e=If();return XX=(r,n,a)=>e(r,n,a)>=0,XX}var YX,z$e;function Spe(){if(z$e)return YX;z$e=1;const e=If();return YX=(r,n,a)=>e(r,n,a)<=0,YX}var KX,U$e;function Dpt(){if(U$e)return KX;U$e=1;const e=Tpt(),t=Apt(),r=CF(),n=wpe(),a=xpe(),s=Spe();return KX=(o,l,c,u)=>{switch(l){case"===":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o===c;case"!==":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o!==c;case"":case"=":case"==":return e(o,c,u);case"!=":return t(o,c,u);case">":return r(o,c,u);case">=":return n(o,c,u);case"<":return a(o,c,u);case"<=":return s(o,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}},KX}var JX,V$e;function irn(){if(V$e)return JX;V$e=1;const e=tc(),t=t_(),{safeRe:r,t:n}=ZN();return JX=(s,i)=>{if(s instanceof e)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;i=i||{};let o=null;if(!i.rtl)o=s.match(i.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const h=i.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let g;for(;(g=h.exec(s))&&(!o||o.index+o[0].length!==s.length);)(!o||g.index+g[0].length!==o.index+o[0].length)&&(o=g),h.lastIndex=g.index+g[1].length+g[2].length;h.lastIndex=-1}if(o===null)return null;const l=o[2],c=o[3]||"0",u=o[4]||"0",d=i.includePrerelease&&o[5]?`-${o[5]}`:"",f=i.includePrerelease&&o[6]?`+${o[6]}`:"";return t(`${l}.${c}.${u}${d}${f}`,i)},JX}var eY,q$e;function orn(){if(q$e)return eY;q$e=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(r,n)}return this}}return eY=e,eY}var tY,Z$e;function Nf(){if(Z$e)return tY;Z$e=1;const e=/\s+/g;class t{constructor(F,V){if(V=a(V),F instanceof t)return F.loose===!!V.loose&&F.includePrerelease===!!V.includePrerelease?F:new t(F.raw,V);if(F instanceof s)return this.raw=F.value,this.set=[[F]],this.formatted=void 0,this;if(this.options=V,this.loose=!!V.loose,this.includePrerelease=!!V.includePrerelease,this.raw=F.trim().replace(e," "),this.set=this.raw.split("||").map(H=>this.parseRange(H.trim())).filter(H=>H.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const H=this.set[0];if(this.set=this.set.filter(B=>!y(B[0])),this.set.length===0)this.set=[H];else if(this.set.length>1){for(const B of this.set)if(B.length===1&&b(B[0])){this.set=[B];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let F=0;F<this.set.length;F++){F>0&&(this.formatted+="||");const V=this.set[F];for(let H=0;H<V.length;H++)H>0&&(this.formatted+=" "),this.formatted+=V[H].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(F){const H=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+F,B=n.get(H);if(B)return B;const Q=this.options.loose,M=Q?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];F=F.replace(M,z(this.options.includePrerelease)),i("hyphen replace",F),F=F.replace(l[c.COMPARATORTRIM],u),i("comparator trim",F),F=F.replace(l[c.TILDETRIM],d),i("tilde trim",F),F=F.replace(l[c.CARETTRIM],f),i("caret trim",F);let W=F.split(" ").map(G=>x(G,this.options)).join(" ").split(/\s+/).map(G=>j(G,this.options));Q&&(W=W.filter(G=>(i("loose invalid filter",G,this.options),!!G.match(l[c.COMPARATORLOOSE])))),i("range list",W);const q=new Map,I=W.map(G=>new s(G,this.options));for(const G of I){if(y(G))return[G];q.set(G.value,G)}q.size>1&&q.has("")&&q.delete("");const Z=[...q.values()];return n.set(H,Z),Z}intersects(F,V){if(!(F instanceof t))throw new TypeError("a Range is required");return this.set.some(H=>w(H,V)&&F.set.some(B=>w(B,V)&&H.every(Q=>B.every(M=>Q.intersects(M,V)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new o(F,this.options)}catch{return!1}for(let V=0;V<this.set.length;V++)if(U(this.set[V],F,this.options))return!0;return!1}}tY=t;const r=orn(),n=new r,a=bpe(),s=TF(),i=kF(),o=tc(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=ZN(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=_F(),y=$=>$.value==="<0.0.0-0",b=$=>$.value==="",w=($,F)=>{let V=!0;const H=$.slice();let B=H.pop();for(;V&&H.length;)V=H.every(Q=>B.intersects(Q,F)),B=H.pop();return V},x=($,F)=>($=$.replace(l[c.BUILD],""),i("comp",$,F),$=k($,F),i("caret",$),$=E($,F),i("tildes",$),$=D($,F),i("xrange",$),$=P($,F),i("stars",$),$),S=$=>!$||$.toLowerCase()==="x"||$==="*",E=($,F)=>$.trim().split(/\s+/).map(V=>C(V,F)).join(" "),C=($,F)=>{const V=F.loose?l[c.TILDELOOSE]:l[c.TILDE];return $.replace(V,(H,B,Q,M,W)=>{i("tilde",$,H,B,Q,M,W);let q;return S(B)?q="":S(Q)?q=`>=${B}.0.0 <${+B+1}.0.0-0`:S(M)?q=`>=${B}.${Q}.0 <${B}.${+Q+1}.0-0`:W?(i("replaceTilde pr",W),q=`>=${B}.${Q}.${M}-${W} <${B}.${+Q+1}.0-0`):q=`>=${B}.${Q}.${M} <${B}.${+Q+1}.0-0`,i("tilde return",q),q})},k=($,F)=>$.trim().split(/\s+/).map(V=>A(V,F)).join(" "),A=($,F)=>{i("caret",$,F);const V=F.loose?l[c.CARETLOOSE]:l[c.CARET],H=F.includePrerelease?"-0":"";return $.replace(V,(B,Q,M,W,q)=>{i("caret",$,B,Q,M,W,q);let I;return S(Q)?I="":S(M)?I=`>=${Q}.0.0${H} <${+Q+1}.0.0-0`:S(W)?Q==="0"?I=`>=${Q}.${M}.0${H} <${Q}.${+M+1}.0-0`:I=`>=${Q}.${M}.0${H} <${+Q+1}.0.0-0`:q?(i("replaceCaret pr",q),Q==="0"?M==="0"?I=`>=${Q}.${M}.${W}-${q} <${Q}.${M}.${+W+1}-0`:I=`>=${Q}.${M}.${W}-${q} <${Q}.${+M+1}.0-0`:I=`>=${Q}.${M}.${W}-${q} <${+Q+1}.0.0-0`):(i("no pr"),Q==="0"?M==="0"?I=`>=${Q}.${M}.${W}${H} <${Q}.${M}.${+W+1}-0`:I=`>=${Q}.${M}.${W}${H} <${Q}.${+M+1}.0-0`:I=`>=${Q}.${M}.${W} <${+Q+1}.0.0-0`),i("caret return",I),I})},D=($,F)=>(i("replaceXRanges",$,F),$.split(/\s+/).map(V=>N(V,F)).join(" ")),N=($,F)=>{$=$.trim();const V=F.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return $.replace(V,(H,B,Q,M,W,q)=>{i("xRange",$,H,B,Q,M,W,q);const I=S(Q),Z=I||S(M),G=Z||S(W),J=G;return B==="="&&J&&(B=""),q=F.includePrerelease?"-0":"",I?B===">"||B==="<"?H="<0.0.0-0":H="*":B&&J?(Z&&(M=0),W=0,B===">"?(B=">=",Z?(Q=+Q+1,M=0,W=0):(M=+M+1,W=0)):B==="<="&&(B="<",Z?Q=+Q+1:M=+M+1),B==="<"&&(q="-0"),H=`${B+Q}.${M}.${W}${q}`):Z?H=`>=${Q}.0.0${q} <${+Q+1}.0.0-0`:G&&(H=`>=${Q}.${M}.0${q} <${Q}.${+M+1}.0-0`),i("xRange return",H),H})},P=($,F)=>(i("replaceStars",$,F),$.trim().replace(l[c.STAR],"")),j=($,F)=>(i("replaceGTE0",$,F),$.trim().replace(l[F.includePrerelease?c.GTE0PRE:c.GTE0],"")),z=$=>(F,V,H,B,Q,M,W,q,I,Z,G,J)=>(S(H)?V="":S(B)?V=`>=${H}.0.0${$?"-0":""}`:S(Q)?V=`>=${H}.${B}.0${$?"-0":""}`:M?V=`>=${V}`:V=`>=${V}${$?"-0":""}`,S(I)?q="":S(Z)?q=`<${+I+1}.0.0-0`:S(G)?q=`<${I}.${+Z+1}.0-0`:J?q=`<=${I}.${Z}.${G}-${J}`:$?q=`<${I}.${Z}.${+G+1}-0`:q=`<=${q}`,`${V} ${q}`.trim()),U=($,F,V)=>{for(let H=0;H<$.length;H++)if(!$[H].test(F))return!1;if(F.prerelease.length&&!V.includePrerelease){for(let H=0;H<$.length;H++)if(i($[H].semver),$[H].semver!==s.ANY&&$[H].semver.prerelease.length>0){const B=$[H].semver;if(B.major===F.major&&B.minor===F.minor&&B.patch===F.patch)return!0}return!1}return!0};return tY}var rY,H$e;function TF(){if(H$e)return rY;H$e=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=r(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),i("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,i("comp",this)}parse(u){const d=this.options.loose?n[a.COMPARATORLOOSE]:n[a.COMPARATOR],f=u.match(d);if(!f)throw new TypeError(`Invalid comparator: ${u}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new o(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(i("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new o(u,this.options)}catch{return!1}return s(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,d).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,d).test(u.semver):(d=r(d),d.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||s(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||s(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}rY=t;const r=bpe(),{safeRe:n,t:a}=ZN(),s=Dpt(),i=kF(),o=tc(),l=Nf();return rY}var nY,G$e;function AF(){if(G$e)return nY;G$e=1;const e=Nf();return nY=(r,n,a)=>{try{n=new e(n,a)}catch{return!1}return n.test(r)},nY}var aY,Q$e;function lrn(){if(Q$e)return aY;Q$e=1;const e=Nf();return aY=(r,n)=>new e(r,n).set.map(a=>a.map(s=>s.value).join(" ").trim().split(" ")),aY}var sY,W$e;function crn(){if(W$e)return sY;W$e=1;const e=tc(),t=Nf();return sY=(n,a,s)=>{let i=null,o=null,l=null;try{l=new t(a,s)}catch{return null}return n.forEach(c=>{l.test(c)&&(!i||o.compare(c)===-1)&&(i=c,o=new e(i,s))}),i},sY}var iY,X$e;function urn(){if(X$e)return iY;X$e=1;const e=tc(),t=Nf();return iY=(n,a,s)=>{let i=null,o=null,l=null;try{l=new t(a,s)}catch{return null}return n.forEach(c=>{l.test(c)&&(!i||o.compare(c)===1)&&(i=c,o=new e(i,s))}),i},iY}var oY,Y$e;function drn(){if(Y$e)return oY;Y$e=1;const e=tc(),t=Nf(),r=CF();return oY=(a,s)=>{a=new t(a,s);let i=new e("0.0.0");if(a.test(i)||(i=new e("0.0.0-0"),a.test(i)))return i;i=null;for(let o=0;o<a.set.length;++o){const l=a.set[o];let c=null;l.forEach(u=>{const d=new e(u.semver.version);switch(u.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!c||r(d,c))&&(c=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),c&&(!i||r(i,c))&&(i=c)}return i&&a.test(i)?i:null},oY}var lY,K$e;function prn(){if(K$e)return lY;K$e=1;const e=Nf();return lY=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},lY}var cY,J$e;function Epe(){if(J$e)return cY;J$e=1;const e=tc(),t=TF(),{ANY:r}=t,n=Nf(),a=AF(),s=CF(),i=xpe(),o=Spe(),l=wpe();return cY=(u,d,f,h)=>{u=new e(u,h),d=new n(d,h);let g,y,b,w,x;switch(f){case">":g=s,y=o,b=i,w=">",x=">=";break;case"<":g=i,y=l,b=s,w="<",x="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(u,d,h))return!1;for(let S=0;S<d.set.length;++S){const E=d.set[S];let C=null,k=null;if(E.forEach(A=>{A.semver===r&&(A=new t(">=0.0.0")),C=C||A,k=k||A,g(A.semver,C.semver,h)?C=A:b(A.semver,k.semver,h)&&(k=A)}),C.operator===w||C.operator===x||(!k.operator||k.operator===w)&&y(u,k.semver))return!1;if(k.operator===x&&b(u,k.semver))return!1}return!0},cY}var uY,eMe;function frn(){if(eMe)return uY;eMe=1;const e=Epe();return uY=(r,n,a)=>e(r,n,">",a),uY}var dY,tMe;function hrn(){if(tMe)return dY;tMe=1;const e=Epe();return dY=(r,n,a)=>e(r,n,"<",a),dY}var pY,rMe;function mrn(){if(rMe)return pY;rMe=1;const e=Nf();return pY=(r,n,a)=>(r=new e(r,a),n=new e(n,a),r.intersects(n,a)),pY}var fY,nMe;function grn(){if(nMe)return fY;nMe=1;const e=AF(),t=If();return fY=(r,n,a)=>{const s=[];let i=null,o=null;const l=r.sort((f,h)=>t(f,h,a));for(const f of l)e(f,n,a)?(o=f,i||(i=f)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[f,h]of s)f===h?c.push(f):!h&&f===l[0]?c.push("*"):h?f===l[0]?c.push(`<=${h}`):c.push(`${f} - ${h}`):c.push(`>=${f}`);const u=c.join(" || "),d=typeof n.raw=="string"?n.raw:String(n);return u.length<d.length?u:n},fY}var hY,aMe;function yrn(){if(aMe)return hY;aMe=1;const e=Nf(),t=TF(),{ANY:r}=t,n=AF(),a=If(),s=(d,f,h={})=>{if(d===f)return!0;d=new e(d,h),f=new e(f,h);let g=!1;e:for(const y of d.set){for(const b of f.set){const w=l(y,b,h);if(g=g||w!==null,w)continue e}if(g)return!1}return!0},i=[new t(">=0.0.0-0")],o=[new t(">=0.0.0")],l=(d,f,h)=>{if(d===f)return!0;if(d.length===1&&d[0].semver===r){if(f.length===1&&f[0].semver===r)return!0;h.includePrerelease?d=i:d=o}if(f.length===1&&f[0].semver===r){if(h.includePrerelease)return!0;f=o}const g=new Set;let y,b;for(const D of d)D.operator===">"||D.operator===">="?y=c(y,D,h):D.operator==="<"||D.operator==="<="?b=u(b,D,h):g.add(D.semver);if(g.size>1)return null;let w;if(y&&b){if(w=a(y.semver,b.semver,h),w>0)return null;if(w===0&&(y.operator!==">="||b.operator!=="<="))return null}for(const D of g){if(y&&!n(D,String(y),h)||b&&!n(D,String(b),h))return null;for(const N of f)if(!n(D,String(N),h))return!1;return!0}let x,S,E,C,k=b&&!h.includePrerelease&&b.semver.prerelease.length?b.semver:!1,A=y&&!h.includePrerelease&&y.semver.prerelease.length?y.semver:!1;k&&k.prerelease.length===1&&b.operator==="<"&&k.prerelease[0]===0&&(k=!1);for(const D of f){if(C=C||D.operator===">"||D.operator===">=",E=E||D.operator==="<"||D.operator==="<=",y){if(A&&D.semver.prerelease&&D.semver.prerelease.length&&D.semver.major===A.major&&D.semver.minor===A.minor&&D.semver.patch===A.patch&&(A=!1),D.operator===">"||D.operator===">="){if(x=c(y,D,h),x===D&&x!==y)return!1}else if(y.operator===">="&&!n(y.semver,String(D),h))return!1}if(b){if(k&&D.semver.prerelease&&D.semver.prerelease.length&&D.semver.major===k.major&&D.semver.minor===k.minor&&D.semver.patch===k.patch&&(k=!1),D.operator==="<"||D.operator==="<="){if(S=u(b,D,h),S===D&&S!==b)return!1}else if(b.operator==="<="&&!n(b.semver,String(D),h))return!1}if(!D.operator&&(b||y)&&w!==0)return!1}return!(y&&E&&!b&&w!==0||b&&C&&!y&&w!==0||A||k)},c=(d,f,h)=>{if(!d)return f;const g=a(d.semver,f.semver,h);return g>0?d:g<0||f.operator===">"&&d.operator===">="?f:d},u=(d,f,h)=>{if(!d)return f;const g=a(d.semver,f.semver,h);return g<0?d:g>0||f.operator==="<"&&d.operator==="<="?f:d};return hY=s,hY}var mY,sMe;function brn(){if(sMe)return mY;sMe=1;const e=ZN(),t=_F(),r=tc(),n=Cpt(),a=t_(),s=Qtn(),i=Wtn(),o=Xtn(),l=Ytn(),c=Ktn(),u=Jtn(),d=ern(),f=trn(),h=If(),g=rrn(),y=nrn(),b=vpe(),w=arn(),x=srn(),S=CF(),E=xpe(),C=Tpt(),k=Apt(),A=wpe(),D=Spe(),N=Dpt(),P=irn(),j=TF(),z=Nf(),U=AF(),$=lrn(),F=crn(),V=urn(),H=drn(),B=prn(),Q=Epe(),M=frn(),W=hrn(),q=mrn(),I=grn(),Z=yrn();return mY={parse:a,valid:s,clean:i,inc:o,diff:l,major:c,minor:u,patch:d,prerelease:f,compare:h,rcompare:g,compareLoose:y,compareBuild:b,sort:w,rsort:x,gt:S,lt:E,eq:C,neq:k,gte:A,lte:D,cmp:N,coerce:P,Comparator:j,Range:z,satisfies:U,toComparators:$,maxSatisfying:F,minSatisfying:V,minVersion:H,validRange:B,outside:Q,gtr:M,ltr:W,intersects:q,simplifyRange:I,subset:Z,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},mY}var vrn=brn();const tC=xf(vrn);var xrn=new Set(["observationalMemory","workspaces-v1"]);function wrn(e,t){return t in e&&typeof e[t]=="function"}const el=e=>{const t=["listWorkspaces","getWorkspace"],r=xrn.has("workspaces-v1"),n=t.every(a=>wrn(e,a));return r&&n},Ipt=(e,t)=>!e||typeof e!="object"?!1:"status"in e&&e.status===t||"statusCode"in e&&e.statusCode===t,Nre=e=>{if(Ipt(e,501))return!0;if(e&&typeof e=="object"&&"message"in e){const t=e.message;return t.includes("Workspace v1 not supported")||t.includes("501")}return!1},Srn=e=>Ipt(e,404)?!0:e&&typeof e=="object"&&"message"in e?e.message.includes("status: 404"):!1,A1=(e,t)=>Srn(t)||Nre(t)?!1:e<3;function Npt(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Npt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Rpt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Npt(e))&&(n&&(n+=" "),n+=t);return n}const Ope="-",Ern=e=>{const t=_rn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const o=i.split(Ope);return o[0]===""&&o.length!==1&&o.shift(),Ppt(o,t)||Orn(i)},getConflictingClassGroupIds:(i,o)=>{const l=r[i]||[];return o&&n[i]?[...l,...n[i]]:l}}},Ppt=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Ppt(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(Ope);return t.validators.find(({validator:i})=>i(s))?.classGroupId},iMe=/^\[(.+)\]$/,Orn=e=>{if(iMe.test(e)){const t=iMe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_rn=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)Rre(r[a],n,a,t);return n},Rre=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:oMe(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(krn(a)){Rre(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,i])=>{Rre(i,oMe(t,s),r,n)})})},oMe=(e,t)=>{let r=e;return t.split(Ope).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},krn=e=>e.isThemeGetter,Crn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(s,i)=>{r.set(s,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=n.get(s))!==void 0)return a(s,i),i},set(s,i){r.has(s)?r.set(s,i):a(s,i)}}},Pre="!",$re=":",Trn=$re.length,Arn=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const s=[];let i=0,o=0,l=0,c;for(let g=0;g<a.length;g++){let y=a[g];if(i===0&&o===0){if(y===$re){s.push(a.slice(l,g)),l=g+Trn;continue}if(y==="/"){c=g;continue}}y==="["?i++:y==="]"?i--:y==="("?o++:y===")"&&o--}const u=s.length===0?a:a.substring(l),d=Drn(u),f=d!==u,h=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}};if(t){const a=t+$re,s=n;n=i=>i.startsWith(a)?s(i.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},Drn=e=>e.endsWith(Pre)?e.substring(0,e.length-1):e.startsWith(Pre)?e.substring(1):e,Irn=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let s=[];return n.forEach(i=>{i[0]==="["||t[i]?(a.push(...s.sort(),i),s=[]):s.push(i)}),a.push(...s.sort()),a}},Nrn=e=>({cache:Crn(e.cacheSize),parseClassName:Arn(e),sortModifiers:Irn(e),...Ern(e)}),Rrn=/\s+/,Prn=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=t,i=[],o=e.trim().split(Rrn);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:y}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let b=!!y,w=n(b?g.substring(0,y):g);if(!w){if(!b){l=u+(l.length>0?" "+l:l);continue}if(w=n(g),!w){l=u+(l.length>0?" "+l:l);continue}b=!1}const x=s(f).join(":"),S=h?x+Pre:x,E=S+w;if(i.includes(E))continue;i.push(E);const C=a(w,b);for(let k=0;k<C.length;++k){const A=C[k];i.push(S+A)}l=u+(l.length>0?" "+l:l)}return l};function $rn(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$pt(t))&&(n&&(n+=" "),n+=r);return n}const $pt=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$pt(e[n]))&&(r&&(r+=" "),r+=t);return r};function lMe(e,...t){let r,n,a,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return r=Nrn(c),n=r.cache.get,a=r.cache.set,s=o,o(l)}function o(l){const c=n(l);if(c)return c;const u=Prn(l,r);return a(l,u),u}return function(){return s($rn.apply(null,arguments))}}const ro=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Mpt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jpt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Mrn=/^\d+\/\d+$/,jrn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lrn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Frn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Brn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zrn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Aw=e=>Mrn.test(e),In=e=>!!e&&!Number.isNaN(Number(e)),Ny=e=>!!e&&Number.isInteger(Number(e)),gY=e=>e.endsWith("%")&&In(e.slice(0,-1)),Nm=e=>jrn.test(e),Urn=()=>!0,Vrn=e=>Lrn.test(e)&&!Frn.test(e),Lpt=()=>!1,qrn=e=>Brn.test(e),Zrn=e=>zrn.test(e),Hrn=e=>!sr(e)&&!ir(e),Grn=e=>r_(e,zpt,Lpt),sr=e=>Mpt.test(e),l0=e=>r_(e,Upt,Vrn),yY=e=>r_(e,Krn,In),cMe=e=>r_(e,Fpt,Lpt),Qrn=e=>r_(e,Bpt,Zrn),c$=e=>r_(e,Vpt,qrn),ir=e=>jpt.test(e),rC=e=>n_(e,Upt),Wrn=e=>n_(e,Jrn),uMe=e=>n_(e,Fpt),Xrn=e=>n_(e,zpt),Yrn=e=>n_(e,Bpt),u$=e=>n_(e,Vpt,!0),r_=(e,t,r)=>{const n=Mpt.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},n_=(e,t,r=!1)=>{const n=jpt.exec(e);return n?n[1]?t(n[1]):r:!1},Fpt=e=>e==="position"||e==="percentage",Bpt=e=>e==="image"||e==="url",zpt=e=>e==="length"||e==="size"||e==="bg-size",Upt=e=>e==="length",Krn=e=>e==="number",Jrn=e=>e==="family-name",Vpt=e=>e==="shadow",dMe=()=>{const e=ro("color"),t=ro("font"),r=ro("text"),n=ro("font-weight"),a=ro("tracking"),s=ro("leading"),i=ro("breakpoint"),o=ro("container"),l=ro("spacing"),c=ro("radius"),u=ro("shadow"),d=ro("inset-shadow"),f=ro("text-shadow"),h=ro("drop-shadow"),g=ro("blur"),y=ro("perspective"),b=ro("aspect"),w=ro("ease"),x=ro("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...E(),ir,sr],k=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],D=()=>[ir,sr,l],N=()=>[Aw,"full","auto",...D()],P=()=>[Ny,"none","subgrid",ir,sr],j=()=>["auto",{span:["full",Ny,ir,sr]},Ny,ir,sr],z=()=>[Ny,"auto",ir,sr],U=()=>["auto","min","max","fr",ir,sr],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...D()],H=()=>[Aw,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],B=()=>[e,ir,sr],Q=()=>[...E(),uMe,cMe,{position:[ir,sr]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",Xrn,Grn,{size:[ir,sr]}],q=()=>[gY,rC,l0],I=()=>["","none","full",c,ir,sr],Z=()=>["",In,rC,l0],G=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[In,gY,uMe,cMe],ae=()=>["","none",g,ir,sr],le=()=>["none",In,ir,sr],ce=()=>["none",In,ir,sr],Te=()=>[In,ir,sr],X=()=>[Aw,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Nm],breakpoint:[Nm],color:[Urn],container:[Nm],"drop-shadow":[Nm],ease:["in","out","in-out"],font:[Hrn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Nm],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Nm],shadow:[Nm],spacing:["px",In],text:[Nm],"text-shadow":[Nm],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Aw,sr,ir,b]}],container:["container"],columns:[{columns:[In,sr,ir,o]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Ny,"auto",ir,sr]}],basis:[{basis:[Aw,"full","auto",o,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[In,Aw,"auto","initial","none",sr]}],grow:[{grow:["",In,ir,sr]}],shrink:[{shrink:["",In,ir,sr]}],order:[{order:[Ny,"first","last","none",ir,sr]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[o,"screen",...H()]}],"min-w":[{"min-w":[o,"screen","none",...H()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,rC,l0]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ir,yY]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gY,sr]}],"font-family":[{font:[Wrn,sr,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ir,sr]}],"line-clamp":[{"line-clamp":[In,"none",ir,yY]}],leading:[{leading:[s,...D()]}],"list-image":[{"list-image":["none",ir,sr]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ir,sr]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[In,"from-font","auto",ir,l0]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[In,"auto",ir,sr]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ir,sr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ir,sr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Q()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ny,ir,sr],radial:["",ir,sr],conic:[Ny,ir,sr]},Yrn,Qrn]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[In,ir,sr]}],"outline-w":[{outline:["",In,rC,l0]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",u,u$,c$]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",d,u$,c$]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[In,l0]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",f,u$,c$]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[In,ir,sr]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[In]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[ir,sr]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[In]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Q()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ir,sr]}],filter:[{filter:["","none",ir,sr]}],blur:[{blur:ae()}],brightness:[{brightness:[In,ir,sr]}],contrast:[{contrast:[In,ir,sr]}],"drop-shadow":[{"drop-shadow":["","none",h,u$,c$]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",In,ir,sr]}],"hue-rotate":[{"hue-rotate":[In,ir,sr]}],invert:[{invert:["",In,ir,sr]}],saturate:[{saturate:[In,ir,sr]}],sepia:[{sepia:["",In,ir,sr]}],"backdrop-filter":[{"backdrop-filter":["","none",ir,sr]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[In,ir,sr]}],"backdrop-contrast":[{"backdrop-contrast":[In,ir,sr]}],"backdrop-grayscale":[{"backdrop-grayscale":["",In,ir,sr]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[In,ir,sr]}],"backdrop-invert":[{"backdrop-invert":["",In,ir,sr]}],"backdrop-opacity":[{"backdrop-opacity":[In,ir,sr]}],"backdrop-saturate":[{"backdrop-saturate":[In,ir,sr]}],"backdrop-sepia":[{"backdrop-sepia":["",In,ir,sr]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ir,sr]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[In,"initial",ir,sr]}],ease:[{ease:["linear","initial",w,ir,sr]}],delay:[{delay:[In,ir,sr]}],animate:[{animate:["none",x,ir,sr]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,ir,sr]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[ir,sr,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:X()}],"translate-x":[{"translate-x":X()}],"translate-y":[{"translate-y":X()}],"translate-z":[{"translate-z":X()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ir,sr]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ir,sr]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[In,rC,l0,yY]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},enn=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:a={},override:s={}})=>(RC(e,"cacheSize",t),RC(e,"prefix",r),RC(e,"experimentalParseClassName",n),d$(e.theme,s.theme),d$(e.classGroups,s.classGroups),d$(e.conflictingClassGroups,s.conflictingClassGroups),d$(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),RC(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),p$(e.theme,a.theme),p$(e.classGroups,a.classGroups),p$(e.conflictingClassGroups,a.conflictingClassGroups),p$(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),qpt(e,a,"orderSensitiveModifiers"),e),RC=(e,t,r)=>{r!==void 0&&(e[t]=r)},d$=(e,t)=>{if(t)for(const r in t)RC(e,r,t[r])},p$=(e,t)=>{if(t)for(const r in t)qpt(e,t,r)},qpt=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},tnn=(e,...t)=>typeof e=="function"?lMe(dMe,e,...t):lMe(()=>enn(dMe(),e),...t),rnn=Object.keys({...q7e,...pNt}),nnn=Object.keys(bNt),ann=Object.keys(fNt),snn=Object.keys(hNt),inn=Object.keys(dNt),c0=Object.keys(yNt),onn=Object.keys(mNt).concat(Object.keys(gNt)),lnn=tnn({extend:{theme:{color:rnn,spacing:nnn,radius:inn,leading:snn,shadow:onn},classGroups:{"font-size":[{text:ann}],h:[{h:c0}],w:[{w:c0}],size:[{size:c0}],"min-h":[{"min-h":c0}],"min-w":[{"min-w":c0}],"max-h":[{"max-h":c0}],"max-w":[{"max-w":c0}]}}});function ne(...e){return lnn(Rpt(e))}const Co={sm:"h-form-sm",md:"h-form-md",lg:"h-form-lg"},Rf="focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring transition-shadow duration-normal",cnn="focus-within:outline-none focus-within:ring-1 focus-within:ring-accent1 focus-within:shadow-focus-ring transition-shadow duration-normal",HN="rounded-md",unn={sm:"[&>svg]:h-icon-sm [&>svg]:w-icon-sm",default:"[&>svg]:h-icon-default [&>svg]:w-icon-default",lg:"[&>svg]:h-icon-lg [&>svg]:w-icon-lg"},qe=({children:e,className:t,size:r="default",...n})=>p.jsx("span",{className:ne("block",unn[r],t),...n,children:e}),ru=MNt,fa=jNt,ha=LNt,sa=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>p.jsx(FNt,{children:p.jsx(eBe,{ref:n,sideOffset:t,className:ne("z-50 overflow-hidden rounded-md bg-neutral6 px-3 py-1.5 text-xs text-surface2 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));sa.displayName=eBe.displayName;const dnn={sm:`${Co.sm} w-form-sm`,md:`${Co.md} w-form-md`,lg:`${Co.lg} w-form-lg`},pnn={sm:"sm",md:"default",lg:"lg"},fnn={default:"bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",light:"bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",outline:"bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",ghost:"bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",primary:"bg-accent1 hover:bg-accent1/90 text-surface1 font-medium hover:shadow-glow-accent1 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none"},hnn="border border-border1 inline-flex items-center justify-center rounded-md transition-all duration-normal ease-out-custom active:scale-[0.98]",Xl=we.forwardRef(({className:e,children:t,tooltip:r,size:n="md",variant:a="default",disabled:s,...i},o)=>p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{ref:o,disabled:s,"aria-label":typeof r=="string"?r:void 0,className:ne(hnn,Rf,fnn[a],dnn[n],s&&"active:scale-100",e),...i,children:p.jsx(qe,{size:pnn[n],children:t})})}),p.jsx(sa,{children:r})]}));Xl.displayName="IconButton";const mnn={"ui-xs":"text-ui-xs leading-ui-xs","ui-sm":"text-ui-sm leading-ui-sm","ui-md":"text-ui-md leading-ui-md","ui-lg":"text-ui-lg leading-ui-lg","header-sm":"text-header-sm leading-header-sm","header-md":"text-header-md leading-header-md","header-lg":"text-header-lg leading-header-lg","header-xl":"text-header-xl leading-header-xl"},gnn={mono:"font-mono"},it=({as:e="p",className:t,variant:r="ui-md",font:n,...a})=>p.jsx(e,{className:ne(mnn[r],n&&gnn[n],t),...a}),Wr={colors:"transition-colors duration-normal ease-out-custom",all:"transition-all duration-normal ease-out-custom",opacity:"transition-opacity duration-normal ease-out-custom"},GN={visible:"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"},ynn={sm:"h-avatar-sm w-avatar-sm",md:"h-avatar-md w-avatar-md",lg:"h-avatar-lg w-avatar-lg"},bnn=({src:e,name:t,size:r="sm",interactive:n=!1})=>p.jsx("div",{className:ne(ynn[r],"border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",Wr.all,n&&"cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"),children:e?p.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):p.jsx(it,{variant:"ui-md",className:"text-center text-neutral4",children:t[0].toUpperCase()})}),DF=({copiedDuration:e=1500}={})=>{const[t,r]=_.useState(!1);return{isCopied:t,copyToClipboard:a=>{a&&navigator.clipboard.writeText(a).then(()=>{r(!0),setTimeout(()=>r(!1),e)})}}},vnn=K7t({style:vie.coldarkDark,customStyle:{margin:0,backgroundColor:"black"}}),xnn=()=>p.jsx(gMt,{remarkPlugins:[pze],className:"aui-md",components:Enn}),pMe=_.memo(xnn),wnn=({language:e,code:t})=>{const{isCopied:r,copyToClipboard:n}=DF(),a=()=>{!t||r||n(t)};return p.jsxs("div",{style:{background:"hsl(0 0% 100% / 0.06)",borderTopRightRadius:"0.5rem",borderTopLeftRadius:"0.5rem",marginTop:"0.5rem",border:"1px solid hsl(0 0% 20.4%)",borderBottom:"none"},className:"flex items-center justify-between gap-4 px-4 py-2 text-sm font-semibold text-white",children:[p.jsx("span",{className:"lowercase [&>span]:text-xs",children:e}),p.jsx(Xl,{variant:"light",size:"md",tooltip:"Copy",onClick:a,children:p.jsxs("span",{className:"grid",children:[p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",r?"scale-100":"scale-0"),children:p.jsx(Ao,{size:14})},"checkmark"),p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",r?"scale-0":"scale-100"),children:p.jsx(Jl,{size:14})},"copy")]})})]})},Snn=({alt:e,src:t,...r})=>{const[n,a]=_.useState(!1);return _.useEffect(()=>{a(!1)},[t]),n||!t?p.jsxs("div",{children:[p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",width:"150",height:"150",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})}),p.jsx("p",{className:"text-xs italic text-neutral3 -mt-2.5 mb-2.5",children:"Image link is broken"})]}):p.jsx("img",{src:t,alt:e,...r,onError:()=>{a(!0)}})},Enn=eMt({h1:({className:e,...t})=>p.jsx("h1",{className:ne("mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",e),...t,style:{marginBottom:"2rem"}}),h2:({className:e,...t})=>p.jsx("h2",{className:ne("mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"2rem"}}),h3:({className:e,...t})=>p.jsx("h3",{className:ne("scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h4:({className:e,...t})=>p.jsx("h4",{className:ne("scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h5:({className:e,...t})=>p.jsx("h5",{className:ne("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),h6:({className:e,...t})=>p.jsx("h6",{className:ne("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),p:({className:e,...t})=>p.jsx("p",{className:ne("leading-7 first:mt-0 last:mb-0",e),...t}),a:({className:e,...t})=>p.jsx("a",{className:ne("text-neutral6 font-medium underline underline-offset-4",e),...t}),blockquote:({className:e,...t})=>p.jsx("blockquote",{className:ne("border-l-2 pl-6 italic",e),...t}),ul:({className:e,...t})=>p.jsx("ul",{className:ne("my-5 ml-6 list-disc [&>li]:mt-2",e),...t}),ol:({className:e,...t})=>p.jsx("ol",{className:ne("my-5 ml-6 list-decimal [&>li]:mt-2",e),...t}),hr:({className:e,...t})=>p.jsx("hr",{className:ne("my-5 border-b",e),...t}),table:({className:e,...t})=>p.jsx("table",{className:ne("my-5 w-full border-separate border-spacing-0 overflow-y-auto",e),...t}),th:({className:e,...t})=>p.jsx("th",{className:ne("bg-surface4 px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),td:({className:e,...t})=>p.jsx("td",{className:ne("border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),tr:({className:e,...t})=>p.jsx("tr",{className:ne("m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",e),...t}),sup:({className:e,...t})=>p.jsx("sup",{className:ne("[&>a]:text-xs [&>a]:no-underline",e),...t}),pre:({className:e,...t})=>p.jsx("pre",{...t,style:{borderBottomRightRadius:"0.5rem",borderBottomLeftRadius:"0.5rem",background:"transparent",fontSize:"0.875rem",marginBottom:"0.5rem",border:"1px solid hsl(0 0% 20.4%)"},className:ne("overflow-x-auto p-4 text-white",e)}),code:function({className:t,...r}){const n=BBe();return p.jsxs("pre",{style:{fontSize:"0.875rem",display:"inline"},children:[p.jsx("code",{className:ne(!n&&"bg-surface4 rounded border font-semibold",t),...r,style:{fontWeight:"400",paddingBlock:n?0:"0.1em",paddingInline:n?0:"0.3em"}})," "]})},CodeHeader:wnn,SyntaxHighlighter:vnn,img:Snn}),Onn=({reason:e,tripwire:t})=>{const[r,n]=_.useState(!1),a=t&&(t.retry!==void 0||t.tripwirePayload||t.processorId);return p.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-950/20 overflow-hidden",children:[p.jsxs("div",{className:"flex items-start gap-3 p-4",children:[p.jsx(VI,{className:"w-5 h-5 text-amber-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-sm font-medium text-amber-200 mb-1",children:"Content Blocked"}),p.jsx("p",{className:"text-sm text-amber-300/90",children:e})]})]}),a&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{onClick:()=>n(!r),className:"w-full flex items-center gap-2 px-4 py-2 text-xs text-amber-400/70 hover:text-amber-400 hover:bg-amber-900/20 transition-colors border-t border-amber-500/20",children:[r?p.jsx(ui,{className:"w-3.5 h-3.5"}):p.jsx(Vl,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Details"})]}),r&&p.jsxs("div",{className:"px-4 pb-4 space-y-3 border-t border-amber-500/20 bg-amber-950/10",children:[t.retry!==void 0&&p.jsxs("div",{className:"flex items-center gap-2 pt-3",children:[p.jsx(UI,{className:"w-3.5 h-3.5 text-amber-400/60"}),p.jsxs("span",{className:"text-xs text-amber-300/70",children:["Retry:"," ",t.retry?p.jsx("span",{className:"text-green-400",children:"Allowed"}):p.jsx("span",{className:"text-red-400",children:"Not allowed"})]})]}),t.processorId&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(U7e,{className:"w-3.5 h-3.5 text-amber-400/60"}),p.jsxs("span",{className:"text-xs text-amber-300/70",children:["Processor:"," ",p.jsx("code",{className:"px-1.5 py-0.5 rounded bg-amber-900/30 text-amber-200 font-mono",children:t.processorId})]})]}),t.tripwirePayload!==void 0&&t.tripwirePayload!==null&&p.jsxs("div",{className:"pt-1",children:[p.jsx("p",{className:"text-xs text-amber-400/60 mb-1.5",children:"Metadata:"}),p.jsx("pre",{className:"text-xs text-amber-200/80 bg-amber-900/30 rounded p-2 overflow-x-auto font-mono",children:String(JSON.stringify(t.tripwirePayload,null,2))})]})]})]})]})},No=e=>p.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 15C10.3565 15 12.137 14.2625 13.4497 12.9497C14.7625 11.637 15.5 9.85652 15.5 8C15.5 6.14348 14.7625 4.36301 13.4497 3.05025C12.137 1.7375 10.3565 1 8.5 1C6.64348 1 4.86301 1.7375 3.55025 3.05025C2.2375 4.36301 1.5 6.14348 1.5 8C1.5 9.85652 2.2375 11.637 3.55025 12.9497C4.86301 14.2625 6.64348 15 8.5 15ZM5.621 10.879L4.611 11.889C3.84179 11.1198 3.31794 10.1398 3.1057 9.07291C2.89346 8.00601 3.00236 6.90013 3.41864 5.89512C3.83491 4.89012 4.53986 4.03112 5.44434 3.42676C6.34881 2.8224 7.41219 2.49983 8.5 2.49983C9.58781 2.49983 10.6512 2.8224 11.5557 3.42676C12.4601 4.03112 13.1651 4.89012 13.5814 5.89512C13.9976 6.90013 14.1065 8.00601 13.8943 9.07291C13.6821 10.1398 13.1582 11.1198 12.389 11.889L11.379 10.879C11.1004 10.6003 10.7696 10.3792 10.4055 10.2284C10.0414 10.0776 9.6511 9.99995 9.257 10H7.743C7.3489 9.99995 6.95865 10.0776 6.59455 10.2284C6.23045 10.3792 5.89963 10.6003 5.621 10.879Z",fill:"currentColor"}),p.jsx("path",{d:"M8.5 4C7.96957 4 7.46086 4.21071 7.08579 4.58579C6.71071 4.96086 6.5 5.46957 6.5 6V6.5C6.5 7.03043 6.71071 7.53914 7.08579 7.91421C7.46086 8.28929 7.96957 8.5 8.5 8.5C9.03043 8.5 9.53914 8.28929 9.91421 7.91421C10.2893 7.53914 10.5 7.03043 10.5 6.5V6C10.5 5.46957 10.2893 4.96086 9.91421 4.58579C9.53914 4.21071 9.03043 4 8.5 4Z",fill:"currentColor"})]}),Zpt=e=>p.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),p.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),p.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),p.jsxs("g",{clipPath:"url(#clip0_21421_19519)",children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.5383 47.0955C45.0714 50.3122 53.9322 52.1193 63.1714 52.1193C72.4106 52.1193 81.2714 50.3122 87.8045 47.0955C94.3376 43.8787 98.0078 39.5159 98.0078 34.9668C98.0078 30.4177 94.3376 26.0549 87.8045 22.8381C81.2714 19.6214 72.4106 17.8143 63.1714 17.8143C53.9322 17.8143 45.0714 19.6214 38.5383 22.8381C32.0052 26.0549 28.3349 30.4177 28.3349 34.9668C28.3349 39.5159 32.0052 43.8787 38.5383 47.0955ZM42.9089 34.9668L35.8005 34.9668C35.8004 32.3013 37.4056 29.6956 40.4132 27.4793C43.4207 25.263 47.6956 23.5355 52.6971 22.5154C57.6986 21.4954 63.2022 21.2285 68.5118 21.7485C73.8214 22.2685 78.6986 23.552 82.5266 25.4368C86.3546 27.3216 88.9615 29.723 90.0176 32.3373C91.0737 34.9517 90.5316 37.6614 88.4599 40.1241C86.3881 42.5867 82.8797 44.6915 78.3784 46.1723C73.8771 47.6532 68.585 48.4435 63.1714 48.4435V44.9435C63.1717 43.9778 62.7855 43.0215 62.035 42.1293C61.2845 41.2372 60.1843 40.4265 58.7973 39.7438L53.4695 37.1205C52.0828 36.4376 50.4364 35.8959 48.6244 35.5263C46.8124 35.1568 44.8702 34.9667 42.9089 34.9668Z",fill:"#A9A9A9"}),p.jsx("path",{d:"M77.2474 28.0361C75.3808 27.1171 72.8492 26.6007 70.2094 26.6007C67.5696 26.6007 65.038 27.1171 63.1714 28.0361L61.4119 28.9025C59.5453 29.8215 58.4966 31.068 58.4966 32.3678C58.4966 33.6676 59.5453 34.9141 61.4119 35.8331C63.2785 36.7522 65.8101 37.2685 68.4499 37.2685C71.0897 37.2685 73.6213 36.7522 75.4879 35.8331L77.2474 34.9668C79.114 34.0477 80.1627 32.8012 80.1627 31.5015C80.1627 30.2017 79.114 28.9552 77.2474 28.0361Z",fill:"#A9A9A9"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_21421_19519",children:p.jsx("rect",{width:"62.7591",height:"62.7591",fill:"white",transform:"matrix(0.897148 0.441731 -0.897148 0.441731 63.1714 7.24365)"})})})]}),_nn=e=>p.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M11.0313 7.97578C11.0313 9.34436 9.92183 10.4538 8.55324 10.4538C7.18466 10.4538 6.0752 9.34436 6.0752 7.97578C6.0752 6.60719 7.18466 5.49773 8.55324 5.49773C9.92183 5.49773 11.0313 6.60719 11.0313 7.97578ZM11.0313 7.97578H14.573",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"}),p.jsx("path",{d:"M12.967 4.46154C11.9273 3.14431 10.3165 2.29883 8.50814 2.29883C5.37277 2.29883 2.83105 4.84055 2.83105 7.97591C2.83105 11.1113 5.37277 13.653 8.50814 13.653C10.3165 13.653 11.9273 12.8075 12.967 11.4903",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"})]}),_pe=e=>p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.97865 4.57004C8.22604 4.75795 8.27426 5.11082 8.08635 5.35821L6.05486 8.03279C5.94873 8.17251 5.78348 8.25471 5.60803 8.25505C5.43257 8.2554 5.267 8.17385 5.16032 8.03454L3.80937 6.27034C3.6205 6.02369 3.66733 5.67063 3.91398 5.48176C4.16063 5.29288 4.51369 5.33972 4.70257 5.58637L5.6051 6.76498L7.19048 4.67774C7.37839 4.43036 7.73126 4.38213 7.97865 4.57004Z",fill:"currentColor"})]}),kpe=e=>p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.89741 4.10293C8.11707 4.32261 8.11706 4.67877 7.89738 4.89843L6.79517 6.00058L7.8962 7.10155C8.11588 7.32122 8.11589 7.67737 7.89623 7.89705C7.67656 8.11673 7.32041 8.11674 7.10073 7.89707L5.99965 6.79605L4.89856 7.89707C4.67889 8.11673 4.32273 8.11672 4.10307 7.89704C3.88341 7.67737 3.88342 7.32121 4.10309 7.10155L5.20413 6.00058L4.10191 4.89843C3.88224 4.67877 3.88223 4.32262 4.10189 4.10294C4.32155 3.88326 4.67771 3.88325 4.89738 4.10292L5.99965 5.20511L7.10191 4.10291C7.32159 3.88325 7.67774 3.88326 7.89741 4.10293Z",fill:"currentColor"})]}),Hi=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.1747 3.18598L7.02554 1.95209C7.11557 1.89207 7.31087 1.87106 7.41016 1.90924L12.4139 3.83377C12.4683 3.85467 12.546 3.96798 12.546 4.03118V13.0167C12.546 13.265 12.7473 13.4663 12.9956 13.4663C13.2439 13.4663 13.4452 13.265 13.4452 13.0167V4.03118C13.4452 3.59605 13.1384 3.14906 12.7367 2.99456L7.73293 1.07004C7.36225 0.927472 6.86056 0.981451 6.52679 1.20396L4.20445 2.75219L3.90419 2.95236L3.90647 2.95824C3.69329 3.05449 3.55469 3.27599 3.55469 3.57581V11.7119C3.55469 12.2084 3.93067 12.7499 4.39251 12.9206L9.89804 14.955C10.3608 15.126 10.7359 14.8596 10.7359 14.3659V5.83295C10.7359 5.33662 10.3498 4.81289 9.88389 4.66643L5.1747 3.18598Z",fill:"currentColor"})}),Cpe=e=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("g",{clipPath:"url(#clip0_21999_22095)",children:p.jsx("path",{d:"M7.5 0.75C3.6325 0.75 0.5 3.8825 0.5 7.75C0.5 10.8475 2.50375 13.4637 5.28625 14.3912C5.63625 14.4525 5.7675 14.2425 5.7675 14.0587C5.7675 13.8925 5.75875 13.3412 5.75875 12.755C4 13.0787 3.545 12.3262 3.405 11.9325C3.32625 11.7312 2.985 11.11 2.6875 10.9437C2.4425 10.8125 2.0925 10.4887 2.67875 10.48C3.23 10.4712 3.62375 10.9875 3.755 11.1975C4.385 12.2562 5.39125 11.9587 5.79375 11.775C5.855 11.32 6.03875 11.0137 6.24 10.8387C4.6825 10.6637 3.055 10.06 3.055 7.3825C3.055 6.62125 3.32625 5.99125 3.7725 5.50125C3.7025 5.32625 3.4575 4.60875 3.8425 3.64625C3.8425 3.64625 4.42875 3.4625 5.7675 4.36375C6.3275 4.20625 6.9225 4.1275 7.5175 4.1275C8.1125 4.1275 8.7075 4.20625 9.2675 4.36375C10.6062 3.45375 11.1925 3.64625 11.1925 3.64625C11.5775 4.60875 11.3325 5.32625 11.2625 5.50125C11.7087 5.99125 11.98 6.6125 11.98 7.3825C11.98 10.0687 10.3438 10.6637 8.78625 10.8387C9.04 11.0575 9.25875 11.4775 9.25875 12.1337C9.25875 13.07 9.25 13.8225 9.25 14.0587C9.25 14.2425 9.38125 14.4612 9.73125 14.3912C11.1209 13.9221 12.3284 13.029 13.1839 11.8377C14.0393 10.6463 14.4996 9.21668 14.5 7.75C14.5 3.8825 11.3675 0.75 7.5 0.75Z",fill:"currentColor"})}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_21999_22095",children:p.jsx("rect",{width:"14",height:"14",fill:"currentColor",transform:"translate(0.5 0.75)"})})})]}),knn=e=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsxs("g",{clipPath:"url(#clip0_21999_20513)",children:[p.jsx("path",{d:"M13.5037 7.54867C13.5037 7.1144 13.4648 6.69683 13.3924 6.29596H7.62436V8.66776H10.9204C10.7756 9.43052 10.3413 10.0764 9.68994 10.5106V12.0529H11.6776C12.8356 10.9839 13.5037 9.41382 13.5037 7.54867Z",fill:"white"}),p.jsx("path",{d:"M7.62415 13.5339C9.27773 13.5339 10.6643 12.9882 11.6776 12.0529L9.68994 10.5106C9.14431 10.8781 8.44816 11.1009 7.62415 11.1009C6.03182 11.1009 4.67889 10.0263 4.19451 8.57877H2.15677V10.16C3.1645 12.1587 5.23008 13.5339 7.62415 13.5339Z",fill:"white"}),p.jsx("path",{d:"M4.19472 8.57315C4.07223 8.20569 3.99985 7.81595 3.99985 7.40952C3.99985 7.00308 4.07223 6.61335 4.19472 6.24589V4.66469H2.15698C1.73941 5.4887 1.5 6.41849 1.5 7.40952C1.5 8.40055 1.73941 9.33034 2.15698 10.1543L3.74374 8.91834L4.19472 8.57315Z",fill:"white"}),p.jsx("path",{d:"M7.62415 3.72376C8.5261 3.72376 9.32783 4.03555 9.96811 4.63685L11.7219 2.88306C10.6585 1.89202 9.27773 1.28516 7.62415 1.28516C5.23008 1.28516 3.16471 2.66036 2.15698 4.66469L4.19472 6.24589C4.6791 4.79832 6.03182 3.72376 7.62415 3.72376Z",fill:"white"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_21999_20513",children:p.jsx("rect",{width:"12.2487",height:"12.2487",fill:"white",transform:"translate(1.375 1.28516)"})})})]}),Cnn=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M3.8674 9.19968L4.14554 10.8649C4.23965 11.4283 4.75254 11.8237 5.32137 11.7713L5.58252 11.7472C6.56555 11.6567 7.43309 12.3868 7.51181 13.3708L7.59308 14.3867C7.60422 14.5259 7.71868 14.6342 7.85825 14.6376L9.91053 14.6876C10.1066 14.6924 10.2434 14.4948 10.17 14.3129L8.90452 11.1782C8.80956 10.9429 8.65085 10.7389 8.44626 10.5889L7.90134 10.1895C7.70604 10.0464 7.55223 9.85411 7.45759 9.63124C7.15011 8.90712 6.6579 7.71234 6.37054 6.88944C6.19204 6.3783 5.79931 6.29158 5.45492 6.21553C4.98179 6.11106 4.5999 6.02673 4.99001 4.88985C5.66408 2.92541 8.06015 2.07904 10.6601 3.33088C12.6488 4.2884 13.1187 6.35416 13.0328 7.58237C13.0297 7.62768 13.0214 7.67186 13.0094 7.71566C12.8829 8.17534 12.368 8.40491 11.9415 8.19169L10.3022 7.37201C10.2069 7.32439 10.0927 7.33657 10.0096 7.40322L8.64809 8.49559C8.55405 8.57104 8.52072 8.69931 8.56615 8.811L10.8995 14.5478C10.9404 14.6483 11.0369 14.715 11.1454 14.7177L12.0572 14.7399C12.2581 14.7448 12.3951 14.5382 12.3124 14.3551L11.8681 13.3706C11.4211 12.3803 11.6047 11.2192 12.3354 10.4151L13.4616 9.17575C13.7473 8.86125 13.9224 8.46187 13.9599 8.03858L13.9763 7.85359C14.2866 4.35298 11.377 1.41272 7.87336 1.68639C6.03919 1.82965 4.45399 3.02228 3.80807 4.74492L3.70275 5.02579C3.5828 5.34571 3.62741 5.70411 3.82213 5.98485L3.88946 6.08192C4.12183 6.41695 4.0958 6.86726 3.82637 7.17328L3.06705 8.03572C2.96261 8.15435 2.98058 8.33664 3.10617 8.43259L3.66059 8.85617C3.77064 8.94026 3.84458 9.06307 3.8674 9.19968Z",fill:"currentColor"})}),Tnn=e=>p.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M10.1266 5.67745C10.3409 5.0225 10.2695 4.2961 9.92413 3.70069C9.40017 2.78376 8.34034 2.31934 7.30433 2.53369C6.85182 2.02164 6.18496 1.73584 5.49428 1.73584C4.43445 1.73584 3.50561 2.41461 3.17218 3.4149C2.49342 3.55779 1.90992 3.97458 1.56458 4.5819C1.04062 5.49883 1.1597 6.64202 1.86228 7.42796C1.64793 8.09482 1.73129 8.80931 2.07663 9.40472C2.60059 10.3217 3.66042 10.798 4.69643 10.5717C5.16085 11.0838 5.8158 11.3815 6.50648 11.3815C7.56631 11.3815 8.49515 10.7027 8.82858 9.70243C9.50735 9.55953 10.0908 9.14274 10.4362 8.53542C10.9601 7.61849 10.8411 6.46339 10.1266 5.67745ZM6.50648 10.7503C6.07778 10.7503 5.67291 10.6074 5.35138 10.3336C5.36329 10.3217 5.39902 10.3097 5.41093 10.2978L7.32815 9.19037C7.42341 9.13083 7.48295 9.03557 7.48295 8.91648V6.21332L8.29271 6.67774C8.30462 6.67774 8.30462 6.68965 8.30462 6.70156V8.9403C8.31653 9.94059 7.50677 10.7503 6.50648 10.7503ZM2.62441 9.09511C2.41006 8.72595 2.33861 8.29726 2.41006 7.88047C2.42197 7.89238 2.44578 7.90429 2.4696 7.91619L4.38682 9.02366C4.48209 9.0832 4.60117 9.0832 4.69643 9.02366L7.04235 7.66612V8.60687C7.04235 8.61878 7.04235 8.63069 7.03044 8.63069L5.0894 9.75006C4.23201 10.2502 3.12455 9.9525 2.62441 9.09511ZM2.12426 4.90342C2.33861 4.53427 2.67204 4.26038 3.06501 4.10557V6.39195C3.06501 6.49912 3.12455 6.60629 3.21982 6.66583L5.56573 8.02337L4.75597 8.48779C4.74407 8.48779 4.73216 8.4997 4.73216 8.48779L2.79112 7.36842C1.90992 6.86827 1.62412 5.76081 2.12426 4.90342ZM8.79285 6.45149L6.44694 5.09395L7.2567 4.62953C7.2686 4.62953 7.28051 4.61762 7.28051 4.62953L9.22155 5.7489C10.0908 6.24905 10.3766 7.35651 9.8765 8.2139C9.66215 8.58305 9.32872 8.85694 8.93575 8.99984V6.72538C8.94766 6.6182 8.88812 6.51103 8.79285 6.45149ZM9.5907 5.23685C9.5788 5.22494 9.55498 5.21303 9.53116 5.20113L7.61394 4.09366C7.51868 4.03412 7.39959 4.03412 7.30433 4.09366L4.95841 5.4512V4.51045C4.95841 4.49854 4.95841 4.48663 4.97032 4.48663L6.91136 3.36726C7.78066 2.86712 8.87621 3.16482 9.37636 4.03412C9.5907 4.39137 9.66215 4.82006 9.5907 5.23685ZM4.51781 6.904L3.70805 6.43958C3.69615 6.43958 3.69615 6.42767 3.69615 6.41576V4.17702C3.69615 3.17673 4.5059 2.36697 5.50619 2.36697C5.93489 2.36697 6.33977 2.50987 6.66129 2.78376C6.64938 2.79567 6.62556 2.80758 6.60175 2.81949L4.68453 3.92695C4.58926 3.98649 4.52972 4.08176 4.52972 4.20084V6.904H4.51781ZM4.95841 5.95134L6.00634 5.34402L7.05426 5.95134V7.15407L6.00634 7.76139L4.95841 7.15407V5.95134Z",fill:"currentColor"})}),Tpe=e=>p.jsx("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.40864 11.9983C7.58064 11.9733 6.84164 11.6153 6.31564 11.0563C6.31464 11.0563 6.31464 11.0553 6.31464 11.0553C5.78864 10.4963 5.47564 9.73633 5.50064 8.90833C5.52564 8.08033 5.88464 7.34133 6.44364 6.81533C7.00264 6.28833 7.76264 5.97633 8.59064 6.00133C9.41864 6.02633 10.1576 6.38433 10.6836 6.94333H10.6846C11.2106 7.50333 11.5236 8.26233 11.4986 9.09033C11.4726 9.91833 11.1146 10.6583 10.5556 11.1843C9.99664 11.7103 9.23664 12.0233 8.40864 11.9983ZM16.1266 8.15033L14.3606 7.74033C14.2316 7.14133 14.0146 6.57633 13.7216 6.05733L14.7726 4.57933C14.9116 4.38533 14.8926 4.12033 14.7296 3.94633L13.9206 3.08733C13.7576 2.91333 13.4946 2.87933 13.2916 3.00533L11.7526 3.96533C11.2526 3.64133 10.7016 3.39033 10.1116 3.22633L9.80964 1.43833C9.76964 1.20333 9.56964 1.02833 9.33164 1.02133L8.15264 0.985326C7.91364 0.978326 7.70364 1.14033 7.64964 1.37233L7.24064 3.13933C6.64164 3.26733 6.07664 3.48433 5.55664 3.77733L4.07864 2.72633C3.88464 2.58833 3.61964 2.60633 3.44664 2.76933L2.58664 3.57833C2.41364 3.74133 2.37964 4.00533 2.50564 4.20733L3.46564 5.74633C3.14164 6.24633 2.89064 6.79833 2.72564 7.38833L0.937635 7.68933C0.702635 7.72933 0.528635 7.92933 0.520635 8.16733L0.485635 9.34733C0.477635 9.58533 0.639635 9.79533 0.872635 9.84933L2.63864 10.2583C2.76764 10.8573 2.98464 11.4233 3.27764 11.9423L2.22564 13.4203C2.08764 13.6143 2.10564 13.8793 2.26964 14.0523L3.07864 14.9123C3.24164 15.0853 3.50464 15.1203 3.70664 14.9933L5.24564 14.0333C5.74663 14.3583 6.29764 14.6093 6.88764 14.7733L7.18964 16.5613C7.22864 16.7963 7.42864 16.9713 7.66764 16.9783L8.84663 17.0143C9.08564 17.0213 9.29564 16.8593 9.34964 16.6273L9.75864 14.8603C10.3576 14.7323 10.9226 14.5153 11.4416 14.2213L12.9206 15.2733C13.1146 15.4113 13.3786 15.3933 13.5526 15.2293L14.4116 14.4213C14.5856 14.2573 14.6196 13.9943 14.4936 13.7923L13.5336 12.2533C13.8576 11.7523 14.1086 11.2013 14.2726 10.6113L16.0616 10.3103C16.2966 10.2703 16.4706 10.0703 16.4776 9.83233L16.5136 8.65233C16.5206 8.41433 16.3586 8.20433 16.1266 8.15033Z",fill:"currentColor"})}),Ann=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z",fill:"currentColor"})}),Wc=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5605 1.42351C8.0791 0.904904 8.92215 0.906157 9.4395 1.42351L10.6922 2.67617C11.2108 3.19477 11.2095 4.03782 10.6922 4.55517L9.4395 5.80783C8.9209 6.32643 8.07785 6.32518 7.5605 5.80783L6.30784 4.55517C5.78923 4.03656 5.79049 3.19352 6.30784 2.67617L7.5605 1.42351ZM3.17618 5.80783C3.69478 5.28923 4.53782 5.29048 5.05517 5.80783L6.30784 7.0605C6.82644 7.5791 6.82519 8.42214 6.30784 8.93949L5.05517 10.1922C4.53657 10.7108 3.69353 10.7095 3.17618 10.1922L1.92351 8.93949C1.40491 8.42089 1.40616 7.57785 1.92351 7.0605L3.17618 5.80783ZM11.9448 5.80783C12.4634 5.28923 13.3065 5.29048 13.8238 5.80783L15.0765 7.0605C15.5951 7.5791 15.5938 8.42214 15.0765 8.93949L13.8238 10.1922C13.3052 10.7108 12.4622 10.7095 11.9448 10.1922L10.6922 8.93949C10.1736 8.42089 10.1748 7.57785 10.6922 7.0605L11.9448 5.80783ZM7.5605 10.1922C8.0791 9.67355 8.92215 9.67481 9.4395 10.1922L10.6922 11.4448C11.2108 11.9634 11.2095 12.8065 10.6922 13.3238L9.4395 14.5765C8.9209 15.0951 8.07785 15.0938 7.5605 14.5765L6.30784 13.3238C5.78923 12.8052 5.79049 11.9622 6.30784 11.4448L7.5605 10.1922Z",fill:"currentColor"})}),a_=e=>p.jsx(iNt,{...e}),Xc=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.24388 2.4018C6.24388 2.0394 6.53767 1.74561 6.90008 1.74561H10.0991C10.4614 1.74561 10.7553 2.0394 10.7553 2.4018V4.57546C10.7553 4.93787 10.4614 5.23166 10.0991 5.23166H9.31982V7.35469L10.0033 9.22664C9.90442 9.20146 9.80035 9.1761 9.6915 9.14986L9.62652 9.13422C9.30473 9.05687 8.92256 8.96501 8.61993 8.84491C8.5819 8.82981 8.54147 8.81292 8.49957 8.79391C8.45767 8.81292 8.41724 8.82981 8.3792 8.84491C8.07657 8.96501 7.6944 9.05687 7.37261 9.13422L7.30763 9.14986C7.19879 9.1761 7.09471 9.20146 6.99577 9.22664L7.67932 7.35469V5.23166H6.90008C6.53767 5.23166 6.24388 4.93787 6.24388 4.57546V2.4018ZM6.99577 9.22664C6.99577 9.22664 6.99578 9.22664 6.99577 9.22664L6.43283 10.7683H6.81806C7.18047 10.7683 7.47426 11.0622 7.47426 11.4245V13.5982C7.47426 13.9606 7.18047 14.2544 6.81806 14.2544H3.61909C3.25668 14.2544 2.96289 13.9606 2.96289 13.5982V11.4245C2.96289 11.0622 3.25668 10.7683 3.61909 10.7683H4.26617C4.2921 10.4663 4.32783 10.1494 4.37744 9.85171C4.43762 9.49063 4.52982 9.08135 4.68998 8.76102C4.93975 8.2615 5.44743 8.01751 5.7771 7.88788C6.14684 7.74249 6.57537 7.63889 6.92317 7.55505C7.24707 7.47696 7.49576 7.41679 7.67932 7.35469L6.99577 9.22664ZM6.43283 10.7683L6.99577 9.22664C6.75846 9.28705 6.55067 9.34646 6.37745 9.41458C6.22784 9.47341 6.1623 9.51712 6.14023 9.53254C6.09752 9.63631 6.04409 9.83055 5.99562 10.1214C5.96201 10.3231 5.93498 10.5439 5.91341 10.7683H6.43283ZM10.0033 9.22664L9.31982 7.35469C9.50338 7.41679 9.75206 7.47696 10.076 7.55505C10.4238 7.63889 10.8523 7.74249 11.2221 7.88788C11.5517 8.01751 12.0594 8.2615 12.3091 8.76102C12.4693 9.08135 12.5615 9.49063 12.6217 9.85171C12.6713 10.1494 12.707 10.4663 12.733 10.7683H13.38C13.7424 10.7683 14.0362 11.0622 14.0362 11.4245V13.5982C14.0362 13.9606 13.7424 14.2544 13.38 14.2544H10.1811C9.81867 14.2544 9.52488 13.9606 9.52488 13.5982V11.4245C9.52488 11.0622 9.81867 10.7683 10.1811 10.7683H10.5663L10.0033 9.22664ZM10.0033 9.22664L10.5663 10.7683H11.0857C11.0642 10.5439 11.0372 10.3231 11.0035 10.1214C10.9551 9.83055 10.9016 9.63631 10.8589 9.53254C10.8369 9.51712 10.7713 9.47341 10.6217 9.41458C10.4485 9.34646 10.2407 9.28705 10.0033 9.22664Z",fill:"currentColor"})}),Dnn=e=>p.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),p.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),p.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M74.9374 21.357C76.2127 20.7291 78.2804 20.7291 79.5557 21.357L90.8129 26.8997C92.0882 27.5276 92.0882 28.5458 90.8129 29.1737L83.1638 32.9399C81.8885 33.5678 79.8207 33.5678 78.5454 32.9399L75.8033 31.5898L68.3324 35.2682L64.1502 39.696C63.8908 39.481 63.6138 39.2568 63.3231 39.0227L63.1495 38.883C62.2893 38.1914 61.2677 37.3701 60.6254 36.6376C60.5446 36.5456 60.4618 36.4463 60.3812 36.3407C60.1669 36.3011 59.9652 36.2603 59.7782 36.2205C58.2906 35.9043 56.6225 35.4013 55.2179 34.9777L54.9342 34.8922C54.4589 34.7491 54.0034 34.6127 53.5666 34.4849L62.5594 32.4258L70.0304 28.7473L67.2882 27.3972C66.0129 26.7692 66.0129 25.7512 67.2882 25.1232L74.9374 21.357ZM53.5666 34.4849C53.5666 34.4849 53.5666 34.4849 53.5666 34.4849L46.1603 36.1808L47.516 36.8483C48.7913 37.4762 48.7912 38.4943 47.516 39.1222L39.8668 42.8884C38.5916 43.5163 36.5238 43.5164 35.2485 42.8884L23.9913 37.3457C22.7159 36.7177 22.716 35.6996 23.9913 35.0717L31.6404 31.3055C32.9156 30.6776 34.9834 30.6776 36.2587 31.3055L38.5358 32.4267C39.6899 31.9483 40.9309 31.4611 42.153 31.0313C43.6354 30.5099 45.4001 29.9605 47.091 29.683C49.7278 29.2502 52.3729 29.7072 53.9892 30.0537C55.8019 30.4425 57.6745 31.0055 59.1934 31.4628C60.6081 31.8887 61.6949 32.2154 62.5594 32.4258L53.5666 34.4849ZM46.1603 36.1808L53.5666 34.4849C52.5189 34.1784 51.5786 33.9213 50.7293 33.7392C49.9958 33.5819 49.6114 33.5441 49.4794 33.5326C48.964 33.6384 48.0924 33.8823 46.8983 34.3023C46.0703 34.5936 45.1981 34.9293 44.3325 35.2808L46.1603 36.1808ZM64.1502 39.696L68.3324 35.2682C68.7598 35.6939 69.4232 36.229 70.2883 36.9256C71.2171 37.6735 72.3605 38.5954 73.15 39.488C73.8539 40.2838 74.7818 41.5862 73.9029 42.8844C73.3394 43.717 72.2235 44.5859 71.1648 45.3159C70.2916 45.9175 69.3021 46.5286 68.3305 47.0968L70.6077 48.218C71.8829 48.8459 71.8829 49.864 70.6077 50.4919L62.9585 54.2582C61.6833 54.8861 59.6154 54.8861 58.3402 54.2582L47.083 48.7154C45.8077 48.0875 45.8077 47.0694 47.083 46.4415L54.7321 42.6752C56.0074 42.0474 58.0751 42.0473 59.3505 42.6752L60.7062 43.3428L64.1502 39.696ZM64.1502 39.696L60.7062 43.3428L62.5339 44.2427C63.2478 43.8165 63.9298 43.3871 64.5213 42.9794C65.3742 42.3914 65.8695 41.9622 66.0846 41.7085C66.0613 41.6436 65.9844 41.4543 65.6649 41.0931C65.295 40.6749 64.773 40.212 64.1502 39.696Z",fill:"#A9A9A9"})]}),Og=e=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M6.53918 9.32122C6.34324 9.51508 6.02724 9.51338 5.83338 9.31744C5.63952 9.1215 5.6412 8.80551 5.83713 8.61164L10.1958 4.29931C10.7996 3.70186 10.8017 2.72852 10.2041 2.12839L10.1899 2.11428C9.58767 1.52481 8.62251 1.53208 8.0292 2.13052L2.29396 7.91536C2.0999 8.1111 1.78388 8.11246 1.58813 7.9184C1.39239 7.72433 1.39103 7.40831 1.58509 7.21257L7.32036 1.42774C8.30005 0.439581 9.89369 0.427613 10.8881 1.40094L10.9116 1.42425C11.4942 2.00929 11.7316 2.80913 11.6232 3.56922C12.389 3.44866 13.1999 3.67918 13.7961 4.26273C14.804 5.24929 14.8147 6.86824 13.82 7.86808L8.5531 13.1619C8.50045 13.2148 8.50024 13.3002 8.55263 13.3534L9.65448 14.4717C9.84794 14.668 9.8456 14.984 9.64925 15.1775C9.45291 15.3709 9.13691 15.3686 8.94345 15.1723L7.84163 14.054C7.40505 13.6109 7.40677 12.8988 7.8455 12.4579L13.1124 7.16405C13.7161 6.55727 13.7095 5.57478 13.0979 4.97606C12.4925 4.38347 11.4942 4.40725 10.8978 5.00886L6.53918 9.32122Z",fill:"currentColor"}),p.jsx("path",{d:"M8.84622 2.75411C9.04697 2.56188 9.36555 2.56381 9.56395 2.76076C9.76234 2.95771 9.76658 3.27625 9.57582 3.4784L9.56661 3.48794L5.25912 7.82701C4.67023 8.42022 4.672 9.37798 5.26305 9.96904C5.85624 10.5622 6.81818 10.5615 7.41052 9.9675L11.6299 5.73599L11.6395 5.72671C11.8406 5.53493 12.1592 5.53756 12.3572 5.73496C12.5583 5.93548 12.5587 6.26104 12.3582 6.46214L8.13877 10.6937C7.14498 11.6903 5.53105 11.6915 4.53584 10.6963C3.5442 9.70461 3.54127 8.09774 4.52928 7.10248L8.83677 2.76342L8.84622 2.75411Z",fill:"currentColor"})]}),Inn=e=>p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M1.5 8.5V8C1.5 7.60218 1.65804 7.22064 1.93934 6.93934C2.22064 6.65804 2.60218 6.5 3 6.5H13C13.3978 6.5 13.7794 6.65804 14.0607 6.93934C14.342 7.22064 14.5 7.60218 14.5 8V8.5M8.70667 4.20667L7.29333 2.79333C7.20048 2.70037 7.09022 2.62661 6.96886 2.57628C6.84749 2.52595 6.71739 2.50003 6.586 2.5H3C2.60218 2.5 2.22064 2.65804 1.93934 2.93934C1.65804 3.22064 1.5 3.60218 1.5 4V12C1.5 12.3978 1.65804 12.7794 1.93934 13.0607C2.22064 13.342 2.60218 13.5 3 13.5H13C13.3978 13.5 13.7794 13.342 14.0607 13.0607C14.342 12.7794 14.5 12.3978 14.5 12V6C14.5 5.60218 14.342 5.22064 14.0607 4.93934C13.7794 4.65804 13.3978 4.5 13 4.5H9.414C9.14887 4.49977 8.89402 4.39426 8.70667 4.20667Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Nnn=e=>p.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),p.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),p.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),p.jsx("path",{d:"M51.5215 39.9726C50.5464 40.4477 48.9738 40.4435 48.009 39.9634C47.0442 39.4833 47.0526 38.709 48.0277 38.2339L69.7191 27.6672C72.7243 26.2032 72.7347 23.8181 69.7605 22.3476L69.6898 22.313C66.6927 20.8686 61.8895 20.8864 58.9368 22.3528L30.3946 36.5278C29.4288 37.0074 27.8561 37.0107 26.882 36.5352C25.9078 36.0597 25.901 35.2853 26.8668 34.8057L55.4092 20.6308C60.2847 18.2094 68.2157 18.1801 73.1645 20.5651L73.2814 20.6222C76.1808 22.0558 77.3624 24.0157 76.8227 25.8782C80.6339 25.5828 84.6694 26.1476 87.6364 27.5775C92.6525 29.9949 92.7059 33.962 87.7554 36.4119L61.5441 49.3836C61.282 49.5133 61.281 49.7227 61.5417 49.853L67.0252 52.5932C67.988 53.0743 67.9763 53.8486 66.9992 54.3226C66.0221 54.7966 64.4495 54.7909 63.4867 54.3098L58.0033 51.5695C55.8306 50.4838 55.8392 48.7391 58.0226 47.6585L84.2339 34.6868C87.2382 33.2 87.2058 30.7925 84.1617 29.3254C81.1488 27.8734 76.1811 27.9317 73.2127 29.4058L51.5215 39.9726Z",fill:"#A9A9A9"}),p.jsx("path",{d:"M63.0028 23.8809C64.0019 23.4098 65.5873 23.4146 66.5747 23.8972C67.562 24.3798 67.5831 25.1603 66.6338 25.6556L66.5879 25.679L45.1511 36.3113C42.2204 37.7649 42.2292 40.1117 45.1707 41.56C48.1228 43.0135 52.91 43.0118 55.8578 41.5563L76.8564 31.1875L76.9037 31.1648C77.9049 30.6949 79.4903 30.7013 80.4755 31.185C81.4763 31.6764 81.4785 32.4741 80.4806 32.9669L59.4821 43.3356C54.5363 45.7777 46.5044 45.7806 41.5516 43.342C36.6166 40.9121 36.602 36.9747 41.519 34.5359L62.9558 23.9037L63.0028 23.8809Z",fill:"#A9A9A9"})]}),Rnn=e=>p.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),p.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),p.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M95.8997 32.6647C98.4806 33.9355 98.4744 36.0012 95.8997 37.2689L89.6657 40.3384C87.0848 41.6091 82.8892 41.6061 80.3146 40.3384L74.0805 37.2689C71.4996 35.9981 71.5059 33.9324 74.0805 32.6647L80.3146 29.5952C82.8955 28.3244 87.091 28.3275 89.6657 29.5952L95.8997 32.6647ZM74.0805 21.9215C76.6614 23.1923 76.6552 25.258 74.0805 26.5257L67.8465 29.5952C65.2656 30.866 61.0701 30.8629 58.4954 29.5952L52.2613 26.5257C49.6804 25.255 49.6867 23.1892 52.2613 21.9215L58.4954 18.852C61.0763 17.5813 65.2718 17.5843 67.8465 18.852L74.0805 21.9215ZM74.0805 43.4079C76.6614 44.6786 76.6552 46.7444 74.0805 48.0121L67.8465 51.0816C65.2656 52.3523 61.0701 52.3493 58.4954 51.0816L52.2613 48.0121C49.6804 46.7413 49.6867 44.6756 52.2613 43.4079L58.4954 40.3384C61.0763 39.0676 65.2718 39.0707 67.8465 40.3384L74.0805 43.4079ZM52.2613 32.6647C54.8422 33.9355 54.836 36.0012 52.2613 37.2689L46.0273 40.3384C43.4464 41.6091 39.2509 41.6061 36.6762 40.3384L30.4422 37.2689C27.8613 35.9981 27.8675 33.9324 30.4422 32.6647L36.6762 29.5952C39.2571 28.3244 43.4526 28.3275 46.0273 29.5952L52.2613 32.6647Z",fill:"#A9A9A9"})]});function sO(e){return p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("rect",{width:"16",height:"16",x:"4",y:"4",rx:"2"}),p.jsx("rect",{width:"6",height:"6",x:"9",y:"9",rx:"1"}),p.jsx("path",{d:"M15 2v2"}),p.jsx("path",{d:"M15 20v2"}),p.jsx("path",{d:"M2 15h2"}),p.jsx("path",{d:"M2 9h2"}),p.jsx("path",{d:"M20 15h2"}),p.jsx("path",{d:"M20 9h2"}),p.jsx("path",{d:"M9 2v2"}),p.jsx("path",{d:"M9 20v2"})]})}const Pnn={warning:"bg-accent6Darker border-accent6/30 text-accent6",destructive:"bg-accent2Darker border-accent2/30 text-accent2",info:"bg-accent5Darker border-accent5/30 text-accent5"},$nn={warning:gv,destructive:cb,info:Cc},og=({children:e,variant:t="destructive",className:r})=>{const n=$nn[t];return p.jsx("div",{className:ne(Pnn[t],"p-3 rounded-md border shadow-sm",Wr.all,"animate-in fade-in-0 slide-in-from-top-2 duration-200",r),children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx(qe,{className:"mt-0.5 flex-shrink-0",children:p.jsx(n,{})}),p.jsx("div",{className:"text-neutral4",children:e})]})})},Sb=({children:e,as:t="h5"})=>p.jsx(it,{as:t,variant:"ui-md",className:"font-semibold",children:e}),Mx=({children:e,as:t="p"})=>p.jsx(it,{as:t,variant:"ui-sm",children:e}),Mnn={default:"text-neutral3 bg-surface4",success:"text-accent1 bg-accent1Dark",error:"text-accent2 bg-accent2Dark",info:"text-accent5 bg-accent5Dark",warning:"text-accent6 bg-accent6Dark"},jnn={default:"text-neutral3",success:"text-accent1",error:"text-accent2",info:"text-accent5",warning:"text-accent6"},ur=({icon:e,variant:t="default",className:r,children:n,...a})=>p.jsxs("div",{className:ne("font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-full border border-border1 shrink-0",Wr.colors,e?"pl-2 pr-2.5":"px-2.5",t==="default"&&e?"bg-surface4 text-neutral5":Mnn[t],r),...a,children:[e&&p.jsx("span",{className:jnn[t],children:p.jsx(qe,{children:e})}),n]}),Lnn=()=>{const e=Hn(({part:s})=>s),[t,r]=_.useState(!1),n=e.text||"",a=e.metadata||{};if(a?.status==="tripwire")return p.jsx(Onn,{reason:n,tripwire:a.tripwire});if(a?.status==="warning")return p.jsxs(og,{variant:"warning",children:[p.jsx(Sb,{as:"h5",children:"Warning"}),p.jsx(Mx,{as:"p",children:n})]});if(a?.status==="error")return p.jsxs(og,{variant:"destructive",children:[p.jsx(Sb,{as:"h5",children:"Error"}),p.jsx(Mx,{as:"p",children:n})]});if(a?.mode==="network"&&a?.completionResult)return p.jsxs("div",{className:"mb-2 space-y-2",children:[p.jsxs("button",{onClick:()=>r(s=>!s),className:"flex items-center gap-2",children:[p.jsx(qe,{children:p.jsx(EO,{className:ne("transition-all",t?"rotate-90":"rotate-180")})}),p.jsxs(ur,{variant:"info",icon:p.jsx($At,{}),children:[t?"Show":"Hide"," completion check"]})]}),!t&&p.jsxs(og,{variant:"info",children:[p.jsx(Sb,{as:"h5",children:a.completionResult?.passed?"Complete":"Not Complete"}),p.jsx(pMe,{})]})]});try{const s=n.trim();if(s.startsWith("__ERROR__:")){const i=s.substring(10);return p.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[p.jsx(cb,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),p.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:i})]})]})}else if(s.startsWith("Error:")){const i=s.substring(6).trim();return p.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[p.jsx(cb,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),p.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:i})]})]})}return p.jsx(pMe,{})}catch{return p.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[p.jsx(cb,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),p.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:String(n)})]})]})}},Mp="mastra_workspace",yj={FILESYSTEM:{READ_FILE:`${Mp}_read_file`,WRITE_FILE:`${Mp}_write_file`,EDIT_FILE:`${Mp}_edit_file`,LIST_FILES:`${Mp}_list_files`,DELETE:`${Mp}_delete`,FILE_STAT:`${Mp}_file_stat`,MKDIR:`${Mp}_mkdir`},SANDBOX:{EXECUTE_COMMAND:`${Mp}_execute_command`},SEARCH:{SEARCH:`${Mp}_search`,INDEX:`${Mp}_index`}},Fnn={duration:5e3,cancel:{label:p.jsx(qe,{children:p.jsx(rl,{})}),onClick:()=>{}},unstyled:!0,classNames:{toast:"bg-surface3 w-full h-auto rounded-lg gap-2 border border-border1 px-3 py-2 flex items-center justify-between pointer-events-auto shadow-card [&>[data-content]]:flex-1",title:"text-xs font-medium text-neutral5",description:"text-xs text-neutral3",cancelButton:"!bg-transparent hover:!bg-surface2 !border-none !rounded-md !p-1.5 !m-0 !text-neutral3 hover:!text-neutral6 shrink-0 transition-all",actionButton:"!bg-white flex items-center justify-center font-medium !text-black order-last hover:opacity-80"}};function qu(e){const{classNames:t,...r}=Fnn,{classNames:n,...a}=e||{};return{...r,classNames:{...t,title:ne(t?.title,n?.title),toast:ne(t?.toast,n?.toast),cancelButton:ne(t?.cancelButton,n?.cancelButton),actionButton:ne(t?.actionButton,n?.actionButton),description:ne(t?.description,n?.description)},...a}}const fr=(e,t={})=>{if(Array.isArray(e))return e.forEach(r=>$c(r,qu(t)));if(we.isValidElement(e))return $c(e,qu(t));if(typeof e=="string")return $c(e,qu(t));throw new Error("Invalid message type")};fr.success=(e,t={})=>{const r={...t,icon:p.jsx(qe,{className:"text-accent1 shrink-0",children:p.jsx(k7e,{})}),classNames:{...t.classNames,toast:ne("bg-accent1Darker border-accent1/30 border-l-[3px] border-l-accent1",t.classNames?.toast),title:ne("text-xs text-neutral5",t.classNames?.title),description:ne("text-xs text-neutral4",t.classNames?.description)}};switch(typeof e){case"string":return $c.success(e,qu(r));case"object":return e.forEach(n=>$c.success(n,qu(r)))}};fr.error=(e,t={})=>{const r={...t,icon:p.jsx(qe,{className:"text-accent2 shrink-0",children:p.jsx(lL,{})}),classNames:{...t.classNames,toast:ne("bg-accent2Darker border-accent2/30 border-l-[3px] border-l-accent2",t.classNames?.toast),title:ne("text-xs text-neutral5",t.classNames?.title),description:ne("text-xs text-neutral4",t.classNames?.description)}};switch(typeof e){case"string":return $c.error(e,qu(r));case"object":return e.forEach(n=>$c.error(n,qu(r)))}};fr.warning=(e,t={})=>{const r={...t,icon:p.jsx(qe,{className:"text-accent6 shrink-0",children:p.jsx(cb,{})}),classNames:{...t.classNames,toast:ne("bg-accent6Darker border-accent6/30 border-l-[3px] border-l-accent6",t.classNames?.toast),title:ne("text-xs text-neutral5",t.classNames?.title),description:ne("text-xs text-neutral4",t.classNames?.description)}};switch(typeof e){case"string":return $c.warning(e,qu(r));case"object":return e.forEach(n=>$c.warning(n,qu(r)))}};fr.info=(e,t={})=>{const r={...t,icon:p.jsx(qe,{className:"text-accent3 shrink-0",children:p.jsx(Cc,{})}),classNames:{...t.classNames,toast:ne("bg-accent3Darker border-accent3/30 border-l-[3px] border-l-accent3",t.classNames?.toast),title:ne("text-xs text-neutral5",t.classNames?.title),description:ne("text-xs text-neutral4",t.classNames?.description)}};switch(typeof e){case"string":return $c.info(e,qu(r));case"object":return e.forEach(n=>$c.info(n,qu(r)))}};fr.custom=(e,t={})=>$c(e,qu(t));fr.dismiss=e=>{e&&$c.dismiss(e)};fr.promise=({myPromise:e,loadingMessage:t,successMessage:r,errorMessage:n,onSuccess:a,onError:s,options:i={}})=>$c.promise(e,{loading:t??"Loading...",success:o=>(a?.(o),r),error:o=>(s?.(o),n||o?.message||"Error..."),...qu(i)});function vf({text:e,copyMessage:t="Copied to clipboard!"}){const[r,n]=_.useState(!1),a=_.useRef(null),s=_.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{fr.success(t),n(!0),a.current&&(clearTimeout(a.current),a.current=null),a.current=setTimeout(()=>{n(!1)},2e3)}).catch(()=>{fr.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:r,handleCopy:s}}function Zu({content:e,copyMessage:t,tooltip:r="Copy to clipboard",iconSize:n="default",className:a}){const[s,i]=_.useState(!1),{handleCopy:o}=vf({text:e,copyMessage:t}),l=()=>{o(),i(!0),setTimeout(()=>i(!1),2e3)};return p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{onClick:l,type:"button",className:ne("rounded-lg p-1",Wr.all,GN.visible,"hover:bg-surface4",a),children:p.jsx(qe,{className:ne("text-neutral3",Wr.all,"hover:text-neutral6",s&&"text-accent1"),size:n,children:s?p.jsx(Ao,{}):p.jsx(Jl,{})})})}),p.jsx(sa,{children:s?"Copied!":r})]})}const Bnn=/\{\{([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)\}\}/g,znn=Er.mark({class:"cm-variable-highlight"}),fMe=new fVe({regexp:Bnn,decoration:()=>znn}),Unn=fi.fromClass(class{decorations;constructor(e){this.decorations=fMe.createDeco(e)}update(e){this.decorations=fMe.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}),Vnn=Unn;function qnn(e,t=5){if(!e?.properties)return[];const r=[];function n(a,s,i){if(i>t)return;const o=Array.isArray(a.type)?a.type.join(" | "):a.type;if(r.push({path:s,label:s,description:a.description??a.title,type:o}),a.properties)for(const[l,c]of Object.entries(a.properties))n(c,`${s}.${l}`,i+1);if(a.items?.properties)for(const[l,c]of Object.entries(a.items.properties))n(c,`${s}[].${l}`,i+1)}for(const[a,s]of Object.entries(e.properties))n(s,a,1);return r}function Znn(e){const t=qnn(e);return KVe({override:[Hnn(t)],defaultKeymap:!0,closeOnBlur:!0,icons:!1})}function Hnn(e){return t=>{const n=t.state.sliceDoc(Math.max(0,t.pos-50),t.pos).match(/\{\{([a-zA-Z0-9_.\[\]]*)?$/);if(!n)return null;const a=n[1]??"",s=t.pos-a.length,i=a?e.filter(l=>l.path.toLowerCase().startsWith(a.toLowerCase())):e;if(i.length===0)return null;const o=i.map(l=>({label:l.path,displayLabel:l.path,detail:l.type,info:l.description,apply:(c,u,d,f)=>{const y=c.state.sliceDoc(f,f+2)==="}}"?u.label:`${u.label}}}`;c.dispatch({changes:{from:d,to:f,insert:y},selection:{anchor:d+y.length}})}}));return{from:s,options:o,validFor:/^[a-zA-Z0-9_.\[\]]*$/}}}const Dv=()=>_.useMemo(()=>{const e=Coe({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",gutterForeground:"#939393",background:"transparent"},styles:[{tag:[ee.className,ee.propertyName]},{tag:ee.heading,color:"#ff79c6",fontWeight:"bold"},{tag:[ee.heading1,ee.heading2,ee.heading3,ee.heading4,ee.heading5,ee.heading6],color:"#ff79c6",fontWeight:"bold"},{tag:ee.emphasis,fontStyle:"italic",color:"#f8f8f2"},{tag:ee.strong,fontWeight:"bold",color:"#f8f8f2"},{tag:ee.link,color:"#8be9fd",textDecoration:"underline"},{tag:ee.url,color:"#8be9fd"},{tag:ee.monospace,color:"#f1fa8c"},{tag:ee.strikethrough,textDecoration:"line-through"},{tag:ee.quote,fontStyle:"italic",color:"#6272a4"}]}),t=bt.theme({".cm-editor":{colorScheme:"dark",backgroundColor:"transparent"},".cm-lineNumbers .cm-gutterElement":{color:"#939393"},".cm-tooltip-autocomplete":{backgroundColor:"#282a36",border:"1px solid #44475a",borderRadius:"6px",boxShadow:"0 8px 16px rgba(0, 0, 0, 0.4)"},".cm-tooltip-autocomplete > ul":{fontFamily:"var(--geist-mono)"},".cm-completionLabel":{color:"#f8f8f2"},".cm-completionDetail":{color:"#A1A1AA",fontSize:"0.7rem",marginLeft:"auto",paddingLeft:"12px"},".cm-completionInfo":{backgroundColor:"#282a36",border:"1px solid #44475a",color:"#6272a4",padding:"8px 12px"},".cm-completionIcon":{display:"none"},"ul.cm-completionList li[aria-selected]":{backgroundColor:"#44475a",color:"#f8f8f2"},".cm-line .cm-variable-highlight":{color:"#F59E0B !important",fontWeight:"500"}});return[e,t]},[]),$u=({data:e,value:t,onChange:r,showCopyButton:n=!0,className:a,language:s="json",highlightVariables:i=!1,placeholder:o,wordWrap:l=!1,schema:c,...u})=>{const d=Dv(),f=e?JSON.stringify(e,null,2):t??"",h=_.useMemo(()=>{const g=[];return s==="json"?g.push(Bu):s==="markdown"&&(g.push(koe({base:gx,codeLanguages:xZe})),g.push(bt.lineWrapping)),i&&s==="markdown"&&g.push(Vnn),c&&s==="markdown"&&g.push(Znn(c)),g},[s,i,c]);return p.jsxs("div",{className:ne("rounded-md bg-surface3 p-1 font-mono relative border border-border1 overflow-hidden",a),...u,children:[n&&p.jsx(Zu,{content:f,className:"absolute top-2 right-2 z-20"}),p.jsx(Qu,{value:f,theme:d,extensions:h,onChange:r,"aria-label":"Code editor",placeholder:o,height:"100%",style:{height:"100%"}})]})};async function Gnn(e,t){const{codeToTokens:r,bundledLanguages:n}=await Fe(async()=>{const{codeToTokens:s,bundledLanguages:i}=await import("./index-8MG4r6cz.js");return{codeToTokens:s,bundledLanguages:i}},__vite__mapDeps([29,1]),import.meta.url);if(!(t in n))return null;const{tokens:a}=await r(e,{lang:t,defaultColor:!1,themes:{light:"github-light",dark:"github-dark"}});return a}const IF=({children:e,initialCollapsed:t=!0,icon:r,title:n,collapsible:a=!0,extraInfo:s,"data-testid":i})=>{const[o,l]=_.useState(t);return _.useEffect(()=>{l(t)},[t]),p.jsxs("div",{className:"mb-4","data-testid":i,children:[p.jsxs("div",{className:"flex flex-row gap-2 items-center justify-between",children:[p.jsxs("button",{onClick:a?()=>l(c=>!c):void 0,className:"flex items-center gap-2 disabled:cursor-not-allowed",disabled:!a,type:"button",children:[p.jsx(qe,{children:p.jsx(EO,{className:ne("transition-all",o?"rotate-90":"rotate-180")})}),p.jsx(ur,{icon:r,children:n})]}),s]}),!o&&p.jsx("div",{className:"pt-2",children:p.jsx("div",{className:"p-4 rounded-lg bg-surface2 flex flex-col gap-4",children:e})})]})},zi=zL,Qnn=DHe,Wnn=UL,Hpt=_.forwardRef(({className:e,...t},r)=>p.jsx(aN,{ref:r,className:ne("fixed inset-0 z-50 bg-overlay backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Hpt.displayName=aN.displayName;const Ei=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(Wnn,{children:[p.jsx(Hpt,{}),p.jsxs(sN,{ref:n,className:ne("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]","gap-4 border border-border1 bg-surface3 py-6 shadow-dialog rounded-lg","duration-slow","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...r,children:[t,p.jsxs(ZL,{className:ne("absolute right-4 top-4 rounded-md p-1","text-neutral3 hover:text-neutral6 hover:bg-surface4","transition-all duration-normal ease-out-custom","focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring","disabled:pointer-events-none"),children:[p.jsx(rl,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ei.displayName=sN.displayName;const Ui=({className:e,...t})=>p.jsx("div",{className:ne("flex flex-col space-y-1.5 text-center sm:text-left border-b border-border1 pb-4 px-6",e),...t});Ui.displayName="DialogHeader";const xo=({className:e,...t})=>p.jsx("div",{className:ne("overflow-y-auto px-6 max-h-[50vh]",e),...t});xo.displayName="DialogBody";const Oi=_.forwardRef(({className:e,...t},r)=>p.jsx(VL,{ref:r,className:ne("text-lg font-semibold leading-none tracking-tight",e),...t}));Oi.displayName=VL.displayName;const co=_.forwardRef(({className:e,...t},r)=>p.jsx(qL,{ref:r,className:ne("sr-only",e),...t}));co.displayName=qL.displayName;const Xnn=({selectionReason:e,open:t,onOpenChange:r,input:n})=>{let a=null;if(n)try{a=typeof n=="object"?p.jsx($u,{data:n}):p.jsx($u,{data:JSON.parse(n)})}catch{a=p.jsx("pre",{className:"whitespace-pre-wrap",children:n})}return p.jsx(zi,{open:t,onOpenChange:r,children:p.jsxs(Ei,{children:[p.jsxs(Ui,{children:[p.jsx(Oi,{children:"Agent Network Metadata"}),p.jsx(co,{children:"View the metadata of the agent's network choice."})]}),p.jsxs(xo,{className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(it,{className:"text-neutral3",children:"Selection Reason"}),p.jsx("div",{className:"text-neutral6 text-ui-md",children:e})]}),a&&p.jsxs("div",{className:"space-y-2",children:[p.jsx(it,{className:"text-neutral3",children:"Input"}),p.jsx("div",{className:"text-neutral6 text-ui-md",children:a})]})]})]})})},Ape=({selectionReason:e,input:t})=>{const[r,n]=_.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsx(Xl,{variant:"light",size:"md",tooltip:"Show selection reason",onClick:()=>n(a=>!a),children:p.jsx(ZIt,{className:"text-neutral3 size-5"})}),p.jsx(Xnn,{selectionReason:e||"",open:r,onOpenChange:n,input:t})]})},Gpt={sm:`${Co.sm} gap-1 text-ui-sm`,md:`${Co.md} gap-1`,lg:`${Co.lg} gap-2`},Qpt={default:"bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",light:"bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",outline:"bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",ghost:"bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",primary:"bg-accent1 hover:bg-accent1/90 text-surface1 font-medium hover:shadow-glow-accent1 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none"},Wpt="border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md transition-all duration-normal ease-out-custom active:scale-[0.98]";function Dpe(e){const t=e?.variant||"default",r=e?.size||"md";return ne(Wpt,Rf,Qpt[t],Gpt[r])}const Ye=we.forwardRef(({className:e,as:t,size:r="md",variant:n="default",disabled:a,...s},i)=>{const o=t||"button";return p.jsx(o,{ref:i,disabled:a,className:ne(Wpt,Rf,Qpt[n],Gpt[r],a&&"active:scale-100",e),...s})});Ye.displayName="Button";const Xpt=_.createContext(void 0);function Ynn({children:e,approveToolcall:t,declineToolcall:r,approveToolcallGenerate:n,declineToolcallGenerate:a,approveNetworkToolcall:s,declineNetworkToolcall:i,isRunning:o,toolCallApprovals:l,networkToolCallApprovals:c}){return p.jsx(Xpt.Provider,{value:{approveToolcall:t,declineToolcall:r,approveToolcallGenerate:n,declineToolcallGenerate:a,approveNetworkToolcall:s,declineNetworkToolcall:i,isRunning:o,toolCallApprovals:l,networkToolCallApprovals:c},children:e})}function Knn(){const e=_.useContext(Xpt);if(!e)throw new Error("useToolCall must be used within a ToolCallProvider");return e}const QN=({toolCalled:e,toolCallId:t,toolApprovalMetadata:r,toolName:n,isNetwork:a,isGenerateMode:s})=>{const{approveToolcall:i,declineToolcall:o,approveToolcallGenerate:l,declineToolcallGenerate:c,isRunning:u,toolCallApprovals:d,approveNetworkToolcall:f,declineNetworkToolcall:h,networkToolCallApprovals:g}=Knn(),y=()=>{a?f(n,r?.runId):s?l(t):i(t)},b=()=>{a?h(n,r?.runId):s?c(t):o(t)},w=a?g?.[r?.runId?`${r.runId}-${n}`:n]?.status:d?.[t]?.status;return r&&!e?p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Approval required"}),p.jsxs("div",{className:"flex gap-2 items-center",children:[p.jsxs(Ye,{onClick:y,disabled:u||!!w,className:w==="approved"?"!text-accent1":"",children:[p.jsx(qe,{children:p.jsx(Ao,{})}),"Approve"]}),p.jsxs(Ye,{onClick:b,disabled:u||!!w,className:w==="declined"?"!text-accent2":"",children:[p.jsx(qe,{children:p.jsx(rl,{})}),"Decline"]})]})]}):null},Jnn=({toolName:e,args:t,result:r,metadata:n,toolOutput:a,toolCallId:s,toolApprovalMetadata:i,suspendPayload:o,isNetwork:l,toolCalled:c})=>{let u=null;try{const{__mastraMetadata:b,...w}=typeof t=="object"?t:JSON.parse(t);u=p.jsx($u,{data:w,"data-testid":"tool-args"})}catch{u=p.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:t})}let d=typeof r=="string"?p.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:r}):p.jsx($u,{data:r,"data-testid":"tool-result"}),f=typeof o=="string"?p.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:o}):p.jsx($u,{data:o,"data-testid":"tool-suspend-payload"});const h=n?.mode==="network"?n.selectionReason:void 0,g=n?.mode==="network"?n.agentInput:void 0,y=c??(r||a.length>0);return p.jsx(IF,{"data-testid":"tool-badge",icon:p.jsx(Wc,{className:"text-accent6"}),title:e,extraInfo:n?.mode==="network"&&p.jsx(Ape,{selectionReason:h||"",input:g}),initialCollapsed:!(i??o),children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool arguments"}),u]}),f!==void 0&&o&&p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool suspend payload"}),f]}),d!==void 0&&r&&p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool result"}),d]}),a.length>0&&p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool output"}),p.jsx("div",{className:"h-40 overflow-y-auto",children:p.jsx($u,{data:a,"data-testid":"tool-output"})})]}),p.jsx(QN,{toolCalled:y,toolCallId:s,toolApprovalMetadata:i,toolName:e,isNetwork:l,isGenerateMode:n?.mode==="generate"})]})})},Ypt=_.createContext({Link:_.forwardRef(()=>null),navigate:()=>{},paths:{agentLink:()=>"",agentsLink:()=>"",agentToolLink:()=>"",agentSkillLink:()=>"",agentThreadLink:()=>"",agentNewThreadLink:()=>"",workflowsLink:()=>"",workflowLink:()=>"",networkLink:()=>"",networkNewThreadLink:()=>"",networkThreadLink:()=>"",scorerLink:()=>"",toolLink:()=>"",skillLink:()=>"",workspacesLink:()=>"",workspaceLink:()=>"",workspaceSkillLink:()=>"",processorsLink:()=>"",processorLink:()=>"",mcpServerLink:()=>"",mcpServerToolLink:()=>"",workflowRunLink:()=>""}}),ean=({children:e,Link:t,navigate:r,paths:n})=>p.jsx(Ypt.Provider,{value:{Link:t,navigate:r,paths:n},children:e}),an=()=>{const e=_.useContext(Ypt);if(!e)throw new Error("useLinkComponent must be used within a LinkComponentProvider");return e},tan=e=>{switch(e){case"running":return"bg-green-500";case"starting":case"initializing":return"bg-yellow-500";case"stopped":case"paused":return"bg-gray-500";case"error":case"failed":return"bg-red-500";default:return"bg-accent6"}},ran=(e,t)=>{const[r,n]=_.useState(0),a=_.useRef(null);return _.useEffect(()=>{if(e){a.current=t||Date.now();const s=setInterval(()=>{a.current&&n(Date.now()-a.current)},100);return()=>clearInterval(s)}else a.current=null},[e,t]),r},nan=({command:e,content:t,maxHeight:r="20rem",onCopy:n,isCopied:a})=>{const s=_.useRef(null);return _.useEffect(()=>{s.current&&(s.current.scrollTop=s.current.scrollHeight)},[t]),p.jsxs("div",{className:"rounded-md border border-border1 overflow-hidden",children:[e&&p.jsxs("div",{className:"px-3 py-2 bg-surface3 border-b border-border1 flex items-center justify-between gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx("span",{className:"text-icon6 text-xs shrink-0",children:"$"}),p.jsx("code",{className:"text-xs text-neutral-300 font-mono truncate",children:e})]}),n&&p.jsx(Xl,{variant:"light",size:"sm",tooltip:"Copy output",onClick:n,className:"shrink-0",children:p.jsxs("span",{className:"grid",children:[p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",a?"scale-100":"scale-0"),children:p.jsx(Ao,{size:14})}),p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",a?"scale-0":"scale-100"),children:p.jsx(Jl,{size:14})})]})})]}),p.jsx("pre",{ref:s,style:{maxHeight:r},className:"overflow-x-auto overflow-y-auto p-3 text-sm text-neutral-300 font-mono whitespace-pre-wrap bg-black",children:t||p.jsx("span",{className:"text-icon6 italic",children:"No output"})})]})},aan=({toolName:e,args:t,result:r,metadata:n,toolOutput:a,toolCallId:s,toolApprovalMetadata:i,suspendPayload:o,isNetwork:l,toolCalled:c})=>{const[u,d]=_.useState(!1),{isCopied:f,copyToClipboard:h}=DF(),{Link:g}=an();let y="";try{const Q=typeof t=="object"?t:JSON.parse(t);if(e===yj.SANDBOX.EXECUTE_COMMAND){const M=Q.command||"",W=Q.args?.join(" ")||"";y=`${M} ${W}`.trim()}}catch{y=e}const b=a?.filter(Q=>Q.type==="sandbox-stdout"||Q.type==="sandbox-stderr")||[],w=a?.filter(Q=>(Q.type==="sandbox-stdout"||Q.type==="sandbox-stderr"||Q.type==="sandbox-exit")&&Q.metadata),x=w?.length?w[w.length-1]?.metadata:void 0,S=a?.find(Q=>Q.type==="sandbox-exit"),E=r&&!Array.isArray(r)&&typeof r.exitCode=="number",C=E?r:null,k=!!S||E,A=b.length>0,D=A&&!k,N=c??(k||A),P=b.map(Q=>Q.data||"").join(""),j=A?P:C?[C.stdout,C.stderr].filter(Boolean).join(`
|
|
597
|
+
For more information, see https://radix-ui.com/primitives/docs/components/alert-dialog`;return _.useEffect(()=>{document.getElementById(e.current?.getAttribute("aria-describedby"))||console.warn(t)},[t,e]),null},wtn=tpt,Stn=rpt,Etn=npt,fpt=apt,hpt=spt,mpt=upt,gpt=ppt,ypt=opt,bpt=cpt,iI=(e=>(e.AGENT="agent",e.EVAL="eval",e.INPUT_PROCESSOR="input_processor",e.INPUT_STEP_PROCESSOR="input_step_processor",e.OUTPUT_PROCESSOR="output_processor",e.OUTPUT_STEP_PROCESSOR="output_step_processor",e.WORKFLOW_STEP="workflow_step",e.TOOL="tool",e.WORKFLOW_RUN="workflow_run",e))(iI||{}),p$e=1,Otn=.9,_tn=.8,ktn=.17,EX=.1,OX=.999,Ctn=.9999,Ttn=.99,Atn=/[\\\/_+.#"@\[\(\{&]/,Dtn=/[\\\/_+.#"@\[\(\{&]/g,Itn=/[\s-]/,vpt=/[\s-]/g;function Dre(e,t,r,n,a,s,i){if(s===t.length)return a===e.length?p$e:Ttn;var o=`${a},${s}`;if(i[o]!==void 0)return i[o];for(var l=n.charAt(s),c=r.indexOf(l,a),u=0,d,f,h,g;c>=0;)d=Dre(e,t,r,n,c+1,s+1,i),d>u&&(c===a?d*=p$e:Atn.test(e.charAt(c-1))?(d*=_tn,h=e.slice(a,c-1).match(Dtn),h&&a>0&&(d*=Math.pow(OX,h.length))):Itn.test(e.charAt(c-1))?(d*=Otn,g=e.slice(a,c-1).match(vpt),g&&a>0&&(d*=Math.pow(OX,g.length))):(d*=ktn,a>0&&(d*=Math.pow(OX,c-a))),e.charAt(c)!==t.charAt(s)&&(d*=Ctn)),(d<EX&&r.charAt(c-1)===n.charAt(s+1)||n.charAt(s+1)===n.charAt(s)&&r.charAt(c-1)!==n.charAt(s))&&(f=Dre(e,t,r,n,c+1,s+2,i),f*EX>d&&(d=f*EX)),d>u&&(u=d),c=r.indexOf(l,c+1);return i[o]=u,u}function f$e(e){return e.toLowerCase().replace(vpt," ")}function Ntn(e,t,r){return e=r&&r.length>0?`${e+" "+r.join(" ")}`:e,Dre(e,t,f$e(e),f$e(t),0,0,{})}var eC='[cmdk-group=""]',_X='[cmdk-group-items=""]',Rtn='[cmdk-group-heading=""]',xpt='[cmdk-item=""]',h$e=`${xpt}:not([aria-disabled="true"])`,Ire="cmdk-item-select",Zw="data-value",Ptn=(e,t,r)=>Ntn(e,t,r),wpt=_.createContext(void 0),qN=()=>_.useContext(wpt),Spt=_.createContext(void 0),ype=()=>_.useContext(Spt),Ept=_.createContext(void 0),Opt=_.forwardRef((e,t)=>{let r=Hw(()=>{var q,I;return{search:"",value:(I=(q=e.value)!=null?q:e.defaultValue)!=null?I:"",selectedItemId:void 0,filtered:{count:0,items:new Map,groups:new Set}}}),n=Hw(()=>new Set),a=Hw(()=>new Map),s=Hw(()=>new Map),i=Hw(()=>new Set),o=_pt(e),{label:l,children:c,value:u,onValueChange:d,filter:f,shouldFilter:h,loop:g,disablePointerSelection:y=!1,vimBindings:b=!0,...w}=e,x=Wo(),S=Wo(),E=Wo(),C=_.useRef(null),k=Ztn();$x(()=>{if(u!==void 0){let q=u.trim();r.current.value=q,A.emit()}},[u]),$x(()=>{k(6,U)},[]);let A=_.useMemo(()=>({subscribe:q=>(i.current.add(q),()=>i.current.delete(q)),snapshot:()=>r.current,setState:(q,I,Z)=>{var G,J,K,ae;if(!Object.is(r.current[q],I)){if(r.current[q]=I,q==="search")z(),P(),k(1,j);else if(q==="value"){if(document.activeElement.hasAttribute("cmdk-input")||document.activeElement.hasAttribute("cmdk-root")){let le=document.getElementById(E);le?le.focus():(G=document.getElementById(x))==null||G.focus()}if(k(7,()=>{var le;r.current.selectedItemId=(le=$())==null?void 0:le.id,A.emit()}),Z||k(5,U),((J=o.current)==null?void 0:J.value)!==void 0){let le=I??"";(ae=(K=o.current).onValueChange)==null||ae.call(K,le);return}}A.emit()}},emit:()=>{i.current.forEach(q=>q())}}),[]),D=_.useMemo(()=>({value:(q,I,Z)=>{var G;I!==((G=s.current.get(q))==null?void 0:G.value)&&(s.current.set(q,{value:I,keywords:Z}),r.current.filtered.items.set(q,N(I,Z)),k(2,()=>{P(),A.emit()}))},item:(q,I)=>(n.current.add(q),I&&(a.current.has(I)?a.current.get(I).add(q):a.current.set(I,new Set([q]))),k(3,()=>{z(),P(),r.current.value||j(),A.emit()}),()=>{s.current.delete(q),n.current.delete(q),r.current.filtered.items.delete(q);let Z=$();k(4,()=>{z(),Z?.getAttribute("id")===q&&j(),A.emit()})}),group:q=>(a.current.has(q)||a.current.set(q,new Set),()=>{s.current.delete(q),a.current.delete(q)}),filter:()=>o.current.shouldFilter,label:l||e["aria-label"],getDisablePointerSelection:()=>o.current.disablePointerSelection,listId:x,inputId:E,labelId:S,listInnerRef:C}),[]);function N(q,I){var Z,G;let J=(G=(Z=o.current)==null?void 0:Z.filter)!=null?G:Ptn;return q?J(q,r.current.search,I):0}function P(){if(!r.current.search||o.current.shouldFilter===!1)return;let q=r.current.filtered.items,I=[];r.current.filtered.groups.forEach(G=>{let J=a.current.get(G),K=0;J.forEach(ae=>{let le=q.get(ae);K=Math.max(le,K)}),I.push([G,K])});let Z=C.current;F().sort((G,J)=>{var K,ae;let le=G.getAttribute("id"),ce=J.getAttribute("id");return((K=q.get(ce))!=null?K:0)-((ae=q.get(le))!=null?ae:0)}).forEach(G=>{let J=G.closest(_X);J?J.appendChild(G.parentElement===J?G:G.closest(`${_X} > *`)):Z.appendChild(G.parentElement===Z?G:G.closest(`${_X} > *`))}),I.sort((G,J)=>J[1]-G[1]).forEach(G=>{var J;let K=(J=C.current)==null?void 0:J.querySelector(`${eC}[${Zw}="${encodeURIComponent(G[0])}"]`);K?.parentElement.appendChild(K)})}function j(){let q=F().find(Z=>Z.getAttribute("aria-disabled")!=="true"),I=q?.getAttribute(Zw);A.setState("value",I||void 0)}function z(){var q,I,Z,G;if(!r.current.search||o.current.shouldFilter===!1){r.current.filtered.count=n.current.size;return}r.current.filtered.groups=new Set;let J=0;for(let K of n.current){let ae=(I=(q=s.current.get(K))==null?void 0:q.value)!=null?I:"",le=(G=(Z=s.current.get(K))==null?void 0:Z.keywords)!=null?G:[],ce=N(ae,le);r.current.filtered.items.set(K,ce),ce>0&&J++}for(let[K,ae]of a.current)for(let le of ae)if(r.current.filtered.items.get(le)>0){r.current.filtered.groups.add(K);break}r.current.filtered.count=J}function U(){var q,I,Z;let G=$();G&&(((q=G.parentElement)==null?void 0:q.firstChild)===G&&((Z=(I=G.closest(eC))==null?void 0:I.querySelector(Rtn))==null||Z.scrollIntoView({block:"nearest"})),G.scrollIntoView({block:"nearest"}))}function $(){var q;return(q=C.current)==null?void 0:q.querySelector(`${xpt}[aria-selected="true"]`)}function F(){var q;return Array.from(((q=C.current)==null?void 0:q.querySelectorAll(h$e))||[])}function V(q){let I=F()[q];I&&A.setState("value",I.getAttribute(Zw))}function H(q){var I;let Z=$(),G=F(),J=G.findIndex(ae=>ae===Z),K=G[J+q];(I=o.current)!=null&&I.loop&&(K=J+q<0?G[G.length-1]:J+q===G.length?G[0]:G[J+q]),K&&A.setState("value",K.getAttribute(Zw))}function B(q){let I=$(),Z=I?.closest(eC),G;for(;Z&&!G;)Z=q>0?Vtn(Z,eC):qtn(Z,eC),G=Z?.querySelector(h$e);G?A.setState("value",G.getAttribute(Zw)):H(q)}let Q=()=>V(F().length-1),M=q=>{q.preventDefault(),q.metaKey?Q():q.altKey?B(1):H(1)},W=q=>{q.preventDefault(),q.metaKey?V(0):q.altKey?B(-1):H(-1)};return _.createElement(Ro.div,{ref:t,tabIndex:-1,...w,"cmdk-root":"",onKeyDown:q=>{var I;(I=w.onKeyDown)==null||I.call(w,q);let Z=q.nativeEvent.isComposing||q.keyCode===229;if(!(q.defaultPrevented||Z))switch(q.key){case"n":case"j":{b&&q.ctrlKey&&M(q);break}case"ArrowDown":{M(q);break}case"p":case"k":{b&&q.ctrlKey&&W(q);break}case"ArrowUp":{W(q);break}case"Home":{q.preventDefault(),V(0);break}case"End":{q.preventDefault(),Q();break}case"Enter":{q.preventDefault();let G=$();if(G){let J=new Event(Ire);G.dispatchEvent(J)}}}}},_.createElement("label",{"cmdk-label":"",htmlFor:D.inputId,id:D.labelId,style:Gtn},l),OF(e,q=>_.createElement(Spt.Provider,{value:A},_.createElement(wpt.Provider,{value:D},q))))}),$tn=_.forwardRef((e,t)=>{var r,n;let a=Wo(),s=_.useRef(null),i=_.useContext(Ept),o=qN(),l=_pt(e),c=(n=(r=l.current)==null?void 0:r.forceMount)!=null?n:i?.forceMount;$x(()=>{if(!c)return o.item(a,i?.id)},[c]);let u=kpt(a,s,[e.value,e.children,s],e.keywords),d=ype(),f=lv(k=>k.value&&k.value===u.current),h=lv(k=>c||o.filter()===!1?!0:k.search?k.filtered.items.get(a)>0:!0);_.useEffect(()=>{let k=s.current;if(!(!k||e.disabled))return k.addEventListener(Ire,g),()=>k.removeEventListener(Ire,g)},[h,e.onSelect,e.disabled]);function g(){var k,A;y(),(A=(k=l.current).onSelect)==null||A.call(k,u.current)}function y(){d.setState("value",u.current,!0)}if(!h)return null;let{disabled:b,value:w,onSelect:x,forceMount:S,keywords:E,...C}=e;return _.createElement(Ro.div,{ref:Rb(s,t),...C,id:a,"cmdk-item":"",role:"option","aria-disabled":!!b,"aria-selected":!!f,"data-disabled":!!b,"data-selected":!!f,onPointerMove:b||o.getDisablePointerSelection()?void 0:y,onClick:b?void 0:g},e.children)}),Mtn=_.forwardRef((e,t)=>{let{heading:r,children:n,forceMount:a,...s}=e,i=Wo(),o=_.useRef(null),l=_.useRef(null),c=Wo(),u=qN(),d=lv(h=>a||u.filter()===!1?!0:h.search?h.filtered.groups.has(i):!0);$x(()=>u.group(i),[]),kpt(i,o,[e.value,e.heading,l]);let f=_.useMemo(()=>({id:i,forceMount:a}),[a]);return _.createElement(Ro.div,{ref:Rb(o,t),...s,"cmdk-group":"",role:"presentation",hidden:d?void 0:!0},r&&_.createElement("div",{ref:l,"cmdk-group-heading":"","aria-hidden":!0,id:c},r),OF(e,h=>_.createElement("div",{"cmdk-group-items":"",role:"group","aria-labelledby":r?c:void 0},_.createElement(Ept.Provider,{value:f},h))))}),jtn=_.forwardRef((e,t)=>{let{alwaysRender:r,...n}=e,a=_.useRef(null),s=lv(i=>!i.search);return!r&&!s?null:_.createElement(Ro.div,{ref:Rb(a,t),...n,"cmdk-separator":"",role:"separator"})}),Ltn=_.forwardRef((e,t)=>{let{onValueChange:r,...n}=e,a=e.value!=null,s=ype(),i=lv(c=>c.search),o=lv(c=>c.selectedItemId),l=qN();return _.useEffect(()=>{e.value!=null&&s.setState("search",e.value)},[e.value]),_.createElement(Ro.input,{ref:t,...n,"cmdk-input":"",autoComplete:"off",autoCorrect:"off",spellCheck:!1,"aria-autocomplete":"list",role:"combobox","aria-expanded":!0,"aria-controls":l.listId,"aria-labelledby":l.labelId,"aria-activedescendant":o,id:l.inputId,type:"text",value:a?e.value:i,onChange:c=>{a||s.setState("search",c.target.value),r?.(c.target.value)}})}),Ftn=_.forwardRef((e,t)=>{let{children:r,label:n="Suggestions",...a}=e,s=_.useRef(null),i=_.useRef(null),o=lv(c=>c.selectedItemId),l=qN();return _.useEffect(()=>{if(i.current&&s.current){let c=i.current,u=s.current,d,f=new ResizeObserver(()=>{d=requestAnimationFrame(()=>{let h=c.offsetHeight;u.style.setProperty("--cmdk-list-height",h.toFixed(1)+"px")})});return f.observe(c),()=>{cancelAnimationFrame(d),f.unobserve(c)}}},[]),_.createElement(Ro.div,{ref:Rb(s,t),...a,"cmdk-list":"",role:"listbox",tabIndex:-1,"aria-activedescendant":o,"aria-label":n,id:l.listId},OF(e,c=>_.createElement("div",{ref:Rb(i,l.listInnerRef),"cmdk-list-sizer":""},c)))}),Btn=_.forwardRef((e,t)=>{let{open:r,onOpenChange:n,overlayClassName:a,contentClassName:s,container:i,...o}=e;return _.createElement(zL,{open:r,onOpenChange:n},_.createElement(UL,{container:i},_.createElement(aN,{"cmdk-overlay":"",className:a}),_.createElement(sN,{"aria-label":e.label,"cmdk-dialog":"",className:s},_.createElement(Opt,{ref:t,...o}))))}),ztn=_.forwardRef((e,t)=>lv(r=>r.filtered.count===0)?_.createElement(Ro.div,{ref:t,...e,"cmdk-empty":"",role:"presentation"}):null),Utn=_.forwardRef((e,t)=>{let{progress:r,children:n,label:a="Loading...",...s}=e;return _.createElement(Ro.div,{ref:t,...s,"cmdk-loading":"",role:"progressbar","aria-valuenow":r,"aria-valuemin":0,"aria-valuemax":100,"aria-label":a},OF(e,i=>_.createElement("div",{"aria-hidden":!0},i)))}),tu=Object.assign(Opt,{List:Ftn,Item:$tn,Input:Ltn,Group:Mtn,Separator:jtn,Dialog:Btn,Empty:ztn,Loading:Utn});function Vtn(e,t){let r=e.nextElementSibling;for(;r;){if(r.matches(t))return r;r=r.nextElementSibling}}function qtn(e,t){let r=e.previousElementSibling;for(;r;){if(r.matches(t))return r;r=r.previousElementSibling}}function _pt(e){let t=_.useRef(e);return $x(()=>{t.current=e}),t}var $x=typeof window>"u"?_.useEffect:_.useLayoutEffect;function Hw(e){let t=_.useRef();return t.current===void 0&&(t.current=e()),t}function lv(e){let t=ype(),r=()=>e(t.snapshot());return _.useSyncExternalStore(t.subscribe,r,r)}function kpt(e,t,r,n=[]){let a=_.useRef(),s=qN();return $x(()=>{var i;let o=(()=>{var c;for(let u of r){if(typeof u=="string")return u.trim();if(typeof u=="object"&&"current"in u)return u.current?(c=u.current.textContent)==null?void 0:c.trim():a.current}})(),l=n.map(c=>c.trim());s.value(e,o,l),(i=t.current)==null||i.setAttribute(Zw,o),a.current=o}),a}var Ztn=()=>{let[e,t]=_.useState(),r=Hw(()=>new Map);return $x(()=>{r.current.forEach(n=>n()),r.current=new Map},[e]),(n,a)=>{r.current.set(n,a),t({})}};function Htn(e){let t=e.type;return typeof t=="function"?t(e.props):"render"in t?t.render(e.props):e}function OF({asChild:e,children:t},r){return e&&_.isValidElement(t)?_.cloneElement(Htn(t),{ref:t.ref},r(t.props.children)):r(t)}var Gtn={position:"absolute",width:"1px",height:"1px",padding:"0",margin:"-1px",overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0"},l$={exports:{}},kX,m$e;function _F(){if(m$e)return kX;m$e=1;const e="2.0.0",t=256,r=Number.MAX_SAFE_INTEGER||9007199254740991,n=16,a=t-6;return kX={MAX_LENGTH:t,MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:a,MAX_SAFE_INTEGER:r,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:e,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2},kX}var CX,g$e;function kF(){if(g$e)return CX;g$e=1;var e={},t={};return CX=typeof e=="object"&&t&&t.NODE_DEBUG&&/\bsemver\b/i.test(t.NODE_DEBUG)?(...n)=>console.error("SEMVER",...n):()=>{},CX}var y$e;function ZN(){return y$e||(y$e=1,(function(e,t){const{MAX_SAFE_COMPONENT_LENGTH:r,MAX_SAFE_BUILD_LENGTH:n,MAX_LENGTH:a}=_F(),s=kF();t=e.exports={};const i=t.re=[],o=t.safeRe=[],l=t.src=[],c=t.safeSrc=[],u=t.t={};let d=0;const f="[a-zA-Z0-9-]",h=[["\\s",1],["\\d",a],[f,n]],g=b=>{for(const[w,x]of h)b=b.split(`${w}*`).join(`${w}{0,${x}}`).split(`${w}+`).join(`${w}{1,${x}}`);return b},y=(b,w,x)=>{const S=g(w),E=d++;s(b,E,w),u[b]=E,l[E]=w,c[E]=S,i[E]=new RegExp(w,x?"g":void 0),o[E]=new RegExp(S,x?"g":void 0)};y("NUMERICIDENTIFIER","0|[1-9]\\d*"),y("NUMERICIDENTIFIERLOOSE","\\d+"),y("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${f}*`),y("MAINVERSION",`(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})\\.(${l[u.NUMERICIDENTIFIER]})`),y("MAINVERSIONLOOSE",`(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})\\.(${l[u.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASEIDENTIFIER",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIER]})`),y("PRERELEASEIDENTIFIERLOOSE",`(?:${l[u.NONNUMERICIDENTIFIER]}|${l[u.NUMERICIDENTIFIERLOOSE]})`),y("PRERELEASE",`(?:-(${l[u.PRERELEASEIDENTIFIER]}(?:\\.${l[u.PRERELEASEIDENTIFIER]})*))`),y("PRERELEASELOOSE",`(?:-?(${l[u.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${l[u.PRERELEASEIDENTIFIERLOOSE]})*))`),y("BUILDIDENTIFIER",`${f}+`),y("BUILD",`(?:\\+(${l[u.BUILDIDENTIFIER]}(?:\\.${l[u.BUILDIDENTIFIER]})*))`),y("FULLPLAIN",`v?${l[u.MAINVERSION]}${l[u.PRERELEASE]}?${l[u.BUILD]}?`),y("FULL",`^${l[u.FULLPLAIN]}$`),y("LOOSEPLAIN",`[v=\\s]*${l[u.MAINVERSIONLOOSE]}${l[u.PRERELEASELOOSE]}?${l[u.BUILD]}?`),y("LOOSE",`^${l[u.LOOSEPLAIN]}$`),y("GTLT","((?:<|>)?=?)"),y("XRANGEIDENTIFIERLOOSE",`${l[u.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),y("XRANGEIDENTIFIER",`${l[u.NUMERICIDENTIFIER]}|x|X|\\*`),y("XRANGEPLAIN",`[v=\\s]*(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:\\.(${l[u.XRANGEIDENTIFIER]})(?:${l[u.PRERELEASE]})?${l[u.BUILD]}?)?)?`),y("XRANGEPLAINLOOSE",`[v=\\s]*(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:\\.(${l[u.XRANGEIDENTIFIERLOOSE]})(?:${l[u.PRERELEASELOOSE]})?${l[u.BUILD]}?)?)?`),y("XRANGE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAIN]}$`),y("XRANGELOOSE",`^${l[u.GTLT]}\\s*${l[u.XRANGEPLAINLOOSE]}$`),y("COERCEPLAIN",`(^|[^\\d])(\\d{1,${r}})(?:\\.(\\d{1,${r}}))?(?:\\.(\\d{1,${r}}))?`),y("COERCE",`${l[u.COERCEPLAIN]}(?:$|[^\\d])`),y("COERCEFULL",l[u.COERCEPLAIN]+`(?:${l[u.PRERELEASE]})?(?:${l[u.BUILD]})?(?:$|[^\\d])`),y("COERCERTL",l[u.COERCE],!0),y("COERCERTLFULL",l[u.COERCEFULL],!0),y("LONETILDE","(?:~>?)"),y("TILDETRIM",`(\\s*)${l[u.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",y("TILDE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAIN]}$`),y("TILDELOOSE",`^${l[u.LONETILDE]}${l[u.XRANGEPLAINLOOSE]}$`),y("LONECARET","(?:\\^)"),y("CARETTRIM",`(\\s*)${l[u.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",y("CARET",`^${l[u.LONECARET]}${l[u.XRANGEPLAIN]}$`),y("CARETLOOSE",`^${l[u.LONECARET]}${l[u.XRANGEPLAINLOOSE]}$`),y("COMPARATORLOOSE",`^${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]})$|^$`),y("COMPARATOR",`^${l[u.GTLT]}\\s*(${l[u.FULLPLAIN]})$|^$`),y("COMPARATORTRIM",`(\\s*)${l[u.GTLT]}\\s*(${l[u.LOOSEPLAIN]}|${l[u.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",y("HYPHENRANGE",`^\\s*(${l[u.XRANGEPLAIN]})\\s+-\\s+(${l[u.XRANGEPLAIN]})\\s*$`),y("HYPHENRANGELOOSE",`^\\s*(${l[u.XRANGEPLAINLOOSE]})\\s+-\\s+(${l[u.XRANGEPLAINLOOSE]})\\s*$`),y("STAR","(<|>)?=?\\s*\\*"),y("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),y("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")})(l$,l$.exports)),l$.exports}var TX,b$e;function bpe(){if(b$e)return TX;b$e=1;const e=Object.freeze({loose:!0}),t=Object.freeze({});return TX=n=>n?typeof n!="object"?e:n:t,TX}var AX,v$e;function Cpt(){if(v$e)return AX;v$e=1;const e=/^[0-9]+$/,t=(n,a)=>{if(typeof n=="number"&&typeof a=="number")return n===a?0:n<a?-1:1;const s=e.test(n),i=e.test(a);return s&&i&&(n=+n,a=+a),n===a?0:s&&!i?-1:i&&!s?1:n<a?-1:1};return AX={compareIdentifiers:t,rcompareIdentifiers:(n,a)=>t(a,n)},AX}var DX,x$e;function tc(){if(x$e)return DX;x$e=1;const e=kF(),{MAX_LENGTH:t,MAX_SAFE_INTEGER:r}=_F(),{safeRe:n,t:a}=ZN(),s=bpe(),{compareIdentifiers:i}=Cpt();class o{constructor(c,u){if(u=s(u),c instanceof o){if(c.loose===!!u.loose&&c.includePrerelease===!!u.includePrerelease)return c;c=c.version}else if(typeof c!="string")throw new TypeError(`Invalid version. Must be a string. Got type "${typeof c}".`);if(c.length>t)throw new TypeError(`version is longer than ${t} characters`);e("SemVer",c,u),this.options=u,this.loose=!!u.loose,this.includePrerelease=!!u.includePrerelease;const d=c.trim().match(u.loose?n[a.LOOSE]:n[a.FULL]);if(!d)throw new TypeError(`Invalid Version: ${c}`);if(this.raw=c,this.major=+d[1],this.minor=+d[2],this.patch=+d[3],this.major>r||this.major<0)throw new TypeError("Invalid major version");if(this.minor>r||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>r||this.patch<0)throw new TypeError("Invalid patch version");d[4]?this.prerelease=d[4].split(".").map(f=>{if(/^[0-9]+$/.test(f)){const h=+f;if(h>=0&&h<r)return h}return f}):this.prerelease=[],this.build=d[5]?d[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(c){if(e("SemVer.compare",this.version,this.options,c),!(c instanceof o)){if(typeof c=="string"&&c===this.version)return 0;c=new o(c,this.options)}return c.version===this.version?0:this.compareMain(c)||this.comparePre(c)}compareMain(c){return c instanceof o||(c=new o(c,this.options)),this.major<c.major?-1:this.major>c.major?1:this.minor<c.minor?-1:this.minor>c.minor?1:this.patch<c.patch?-1:this.patch>c.patch?1:0}comparePre(c){if(c instanceof o||(c=new o(c,this.options)),this.prerelease.length&&!c.prerelease.length)return-1;if(!this.prerelease.length&&c.prerelease.length)return 1;if(!this.prerelease.length&&!c.prerelease.length)return 0;let u=0;do{const d=this.prerelease[u],f=c.prerelease[u];if(e("prerelease compare",u,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return i(d,f)}while(++u)}compareBuild(c){c instanceof o||(c=new o(c,this.options));let u=0;do{const d=this.build[u],f=c.build[u];if(e("build compare",u,d,f),d===void 0&&f===void 0)return 0;if(f===void 0)return 1;if(d===void 0)return-1;if(d===f)continue;return i(d,f)}while(++u)}inc(c,u,d){if(c.startsWith("pre")){if(!u&&d===!1)throw new Error("invalid increment argument: identifier is empty");if(u){const f=`-${u}`.match(this.options.loose?n[a.PRERELEASELOOSE]:n[a.PRERELEASE]);if(!f||f[1]!==u)throw new Error(`invalid identifier: ${u}`)}}switch(c){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",u,d);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",u,d);break;case"prepatch":this.prerelease.length=0,this.inc("patch",u,d),this.inc("pre",u,d);break;case"prerelease":this.prerelease.length===0&&this.inc("patch",u,d),this.inc("pre",u,d);break;case"release":if(this.prerelease.length===0)throw new Error(`version ${this.raw} is not a prerelease`);this.prerelease.length=0;break;case"major":(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case"patch":this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case"pre":{const f=Number(d)?1:0;if(this.prerelease.length===0)this.prerelease=[f];else{let h=this.prerelease.length;for(;--h>=0;)typeof this.prerelease[h]=="number"&&(this.prerelease[h]++,h=-2);if(h===-1){if(u===this.prerelease.join(".")&&d===!1)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(f)}}if(u){let h=[u,f];d===!1&&(h=[u]),i(this.prerelease[0],u)===0?isNaN(this.prerelease[1])&&(this.prerelease=h):this.prerelease=h}break}default:throw new Error(`invalid increment argument: ${c}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}return DX=o,DX}var IX,w$e;function t_(){if(w$e)return IX;w$e=1;const e=tc();return IX=(r,n,a=!1)=>{if(r instanceof e)return r;try{return new e(r,n)}catch(s){if(!a)return null;throw s}},IX}var NX,S$e;function Qtn(){if(S$e)return NX;S$e=1;const e=t_();return NX=(r,n)=>{const a=e(r,n);return a?a.version:null},NX}var RX,E$e;function Wtn(){if(E$e)return RX;E$e=1;const e=t_();return RX=(r,n)=>{const a=e(r.trim().replace(/^[=v]+/,""),n);return a?a.version:null},RX}var PX,O$e;function Xtn(){if(O$e)return PX;O$e=1;const e=tc();return PX=(r,n,a,s,i)=>{typeof a=="string"&&(i=s,s=a,a=void 0);try{return new e(r instanceof e?r.version:r,a).inc(n,s,i).version}catch{return null}},PX}var $X,_$e;function Ytn(){if(_$e)return $X;_$e=1;const e=t_();return $X=(r,n)=>{const a=e(r,null,!0),s=e(n,null,!0),i=a.compare(s);if(i===0)return null;const o=i>0,l=o?a:s,c=o?s:a,u=!!l.prerelease.length;if(!!c.prerelease.length&&!u){if(!c.patch&&!c.minor)return"major";if(c.compareMain(l)===0)return c.minor&&!c.patch?"minor":"patch"}const f=u?"pre":"";return a.major!==s.major?f+"major":a.minor!==s.minor?f+"minor":a.patch!==s.patch?f+"patch":"prerelease"},$X}var MX,k$e;function Ktn(){if(k$e)return MX;k$e=1;const e=tc();return MX=(r,n)=>new e(r,n).major,MX}var jX,C$e;function Jtn(){if(C$e)return jX;C$e=1;const e=tc();return jX=(r,n)=>new e(r,n).minor,jX}var LX,T$e;function ern(){if(T$e)return LX;T$e=1;const e=tc();return LX=(r,n)=>new e(r,n).patch,LX}var FX,A$e;function trn(){if(A$e)return FX;A$e=1;const e=t_();return FX=(r,n)=>{const a=e(r,n);return a&&a.prerelease.length?a.prerelease:null},FX}var BX,D$e;function If(){if(D$e)return BX;D$e=1;const e=tc();return BX=(r,n,a)=>new e(r,a).compare(new e(n,a)),BX}var zX,I$e;function rrn(){if(I$e)return zX;I$e=1;const e=If();return zX=(r,n,a)=>e(n,r,a),zX}var UX,N$e;function nrn(){if(N$e)return UX;N$e=1;const e=If();return UX=(r,n)=>e(r,n,!0),UX}var VX,R$e;function vpe(){if(R$e)return VX;R$e=1;const e=tc();return VX=(r,n,a)=>{const s=new e(r,a),i=new e(n,a);return s.compare(i)||s.compareBuild(i)},VX}var qX,P$e;function arn(){if(P$e)return qX;P$e=1;const e=vpe();return qX=(r,n)=>r.sort((a,s)=>e(a,s,n)),qX}var ZX,$$e;function srn(){if($$e)return ZX;$$e=1;const e=vpe();return ZX=(r,n)=>r.sort((a,s)=>e(s,a,n)),ZX}var HX,M$e;function CF(){if(M$e)return HX;M$e=1;const e=If();return HX=(r,n,a)=>e(r,n,a)>0,HX}var GX,j$e;function xpe(){if(j$e)return GX;j$e=1;const e=If();return GX=(r,n,a)=>e(r,n,a)<0,GX}var QX,L$e;function Tpt(){if(L$e)return QX;L$e=1;const e=If();return QX=(r,n,a)=>e(r,n,a)===0,QX}var WX,F$e;function Apt(){if(F$e)return WX;F$e=1;const e=If();return WX=(r,n,a)=>e(r,n,a)!==0,WX}var XX,B$e;function wpe(){if(B$e)return XX;B$e=1;const e=If();return XX=(r,n,a)=>e(r,n,a)>=0,XX}var YX,z$e;function Spe(){if(z$e)return YX;z$e=1;const e=If();return YX=(r,n,a)=>e(r,n,a)<=0,YX}var KX,U$e;function Dpt(){if(U$e)return KX;U$e=1;const e=Tpt(),t=Apt(),r=CF(),n=wpe(),a=xpe(),s=Spe();return KX=(o,l,c,u)=>{switch(l){case"===":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o===c;case"!==":return typeof o=="object"&&(o=o.version),typeof c=="object"&&(c=c.version),o!==c;case"":case"=":case"==":return e(o,c,u);case"!=":return t(o,c,u);case">":return r(o,c,u);case">=":return n(o,c,u);case"<":return a(o,c,u);case"<=":return s(o,c,u);default:throw new TypeError(`Invalid operator: ${l}`)}},KX}var JX,V$e;function irn(){if(V$e)return JX;V$e=1;const e=tc(),t=t_(),{safeRe:r,t:n}=ZN();return JX=(s,i)=>{if(s instanceof e)return s;if(typeof s=="number"&&(s=String(s)),typeof s!="string")return null;i=i||{};let o=null;if(!i.rtl)o=s.match(i.includePrerelease?r[n.COERCEFULL]:r[n.COERCE]);else{const h=i.includePrerelease?r[n.COERCERTLFULL]:r[n.COERCERTL];let g;for(;(g=h.exec(s))&&(!o||o.index+o[0].length!==s.length);)(!o||g.index+g[0].length!==o.index+o[0].length)&&(o=g),h.lastIndex=g.index+g[1].length+g[2].length;h.lastIndex=-1}if(o===null)return null;const l=o[2],c=o[3]||"0",u=o[4]||"0",d=i.includePrerelease&&o[5]?`-${o[5]}`:"",f=i.includePrerelease&&o[6]?`+${o[6]}`:"";return t(`${l}.${c}.${u}${d}${f}`,i)},JX}var eY,q$e;function orn(){if(q$e)return eY;q$e=1;class e{constructor(){this.max=1e3,this.map=new Map}get(r){const n=this.map.get(r);if(n!==void 0)return this.map.delete(r),this.map.set(r,n),n}delete(r){return this.map.delete(r)}set(r,n){if(!this.delete(r)&&n!==void 0){if(this.map.size>=this.max){const s=this.map.keys().next().value;this.delete(s)}this.map.set(r,n)}return this}}return eY=e,eY}var tY,Z$e;function Nf(){if(Z$e)return tY;Z$e=1;const e=/\s+/g;class t{constructor(F,V){if(V=a(V),F instanceof t)return F.loose===!!V.loose&&F.includePrerelease===!!V.includePrerelease?F:new t(F.raw,V);if(F instanceof s)return this.raw=F.value,this.set=[[F]],this.formatted=void 0,this;if(this.options=V,this.loose=!!V.loose,this.includePrerelease=!!V.includePrerelease,this.raw=F.trim().replace(e," "),this.set=this.raw.split("||").map(H=>this.parseRange(H.trim())).filter(H=>H.length),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const H=this.set[0];if(this.set=this.set.filter(B=>!y(B[0])),this.set.length===0)this.set=[H];else if(this.set.length>1){for(const B of this.set)if(B.length===1&&b(B[0])){this.set=[B];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted="";for(let F=0;F<this.set.length;F++){F>0&&(this.formatted+="||");const V=this.set[F];for(let H=0;H<V.length;H++)H>0&&(this.formatted+=" "),this.formatted+=V[H].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(F){const H=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+F,B=n.get(H);if(B)return B;const Q=this.options.loose,M=Q?l[c.HYPHENRANGELOOSE]:l[c.HYPHENRANGE];F=F.replace(M,z(this.options.includePrerelease)),i("hyphen replace",F),F=F.replace(l[c.COMPARATORTRIM],u),i("comparator trim",F),F=F.replace(l[c.TILDETRIM],d),i("tilde trim",F),F=F.replace(l[c.CARETTRIM],f),i("caret trim",F);let W=F.split(" ").map(G=>x(G,this.options)).join(" ").split(/\s+/).map(G=>j(G,this.options));Q&&(W=W.filter(G=>(i("loose invalid filter",G,this.options),!!G.match(l[c.COMPARATORLOOSE])))),i("range list",W);const q=new Map,I=W.map(G=>new s(G,this.options));for(const G of I){if(y(G))return[G];q.set(G.value,G)}q.size>1&&q.has("")&&q.delete("");const Z=[...q.values()];return n.set(H,Z),Z}intersects(F,V){if(!(F instanceof t))throw new TypeError("a Range is required");return this.set.some(H=>w(H,V)&&F.set.some(B=>w(B,V)&&H.every(Q=>B.every(M=>Q.intersects(M,V)))))}test(F){if(!F)return!1;if(typeof F=="string")try{F=new o(F,this.options)}catch{return!1}for(let V=0;V<this.set.length;V++)if(U(this.set[V],F,this.options))return!0;return!1}}tY=t;const r=orn(),n=new r,a=bpe(),s=TF(),i=kF(),o=tc(),{safeRe:l,t:c,comparatorTrimReplace:u,tildeTrimReplace:d,caretTrimReplace:f}=ZN(),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=_F(),y=$=>$.value==="<0.0.0-0",b=$=>$.value==="",w=($,F)=>{let V=!0;const H=$.slice();let B=H.pop();for(;V&&H.length;)V=H.every(Q=>B.intersects(Q,F)),B=H.pop();return V},x=($,F)=>($=$.replace(l[c.BUILD],""),i("comp",$,F),$=k($,F),i("caret",$),$=E($,F),i("tildes",$),$=D($,F),i("xrange",$),$=P($,F),i("stars",$),$),S=$=>!$||$.toLowerCase()==="x"||$==="*",E=($,F)=>$.trim().split(/\s+/).map(V=>C(V,F)).join(" "),C=($,F)=>{const V=F.loose?l[c.TILDELOOSE]:l[c.TILDE];return $.replace(V,(H,B,Q,M,W)=>{i("tilde",$,H,B,Q,M,W);let q;return S(B)?q="":S(Q)?q=`>=${B}.0.0 <${+B+1}.0.0-0`:S(M)?q=`>=${B}.${Q}.0 <${B}.${+Q+1}.0-0`:W?(i("replaceTilde pr",W),q=`>=${B}.${Q}.${M}-${W} <${B}.${+Q+1}.0-0`):q=`>=${B}.${Q}.${M} <${B}.${+Q+1}.0-0`,i("tilde return",q),q})},k=($,F)=>$.trim().split(/\s+/).map(V=>A(V,F)).join(" "),A=($,F)=>{i("caret",$,F);const V=F.loose?l[c.CARETLOOSE]:l[c.CARET],H=F.includePrerelease?"-0":"";return $.replace(V,(B,Q,M,W,q)=>{i("caret",$,B,Q,M,W,q);let I;return S(Q)?I="":S(M)?I=`>=${Q}.0.0${H} <${+Q+1}.0.0-0`:S(W)?Q==="0"?I=`>=${Q}.${M}.0${H} <${Q}.${+M+1}.0-0`:I=`>=${Q}.${M}.0${H} <${+Q+1}.0.0-0`:q?(i("replaceCaret pr",q),Q==="0"?M==="0"?I=`>=${Q}.${M}.${W}-${q} <${Q}.${M}.${+W+1}-0`:I=`>=${Q}.${M}.${W}-${q} <${Q}.${+M+1}.0-0`:I=`>=${Q}.${M}.${W}-${q} <${+Q+1}.0.0-0`):(i("no pr"),Q==="0"?M==="0"?I=`>=${Q}.${M}.${W}${H} <${Q}.${M}.${+W+1}-0`:I=`>=${Q}.${M}.${W}${H} <${Q}.${+M+1}.0-0`:I=`>=${Q}.${M}.${W} <${+Q+1}.0.0-0`),i("caret return",I),I})},D=($,F)=>(i("replaceXRanges",$,F),$.split(/\s+/).map(V=>N(V,F)).join(" ")),N=($,F)=>{$=$.trim();const V=F.loose?l[c.XRANGELOOSE]:l[c.XRANGE];return $.replace(V,(H,B,Q,M,W,q)=>{i("xRange",$,H,B,Q,M,W,q);const I=S(Q),Z=I||S(M),G=Z||S(W),J=G;return B==="="&&J&&(B=""),q=F.includePrerelease?"-0":"",I?B===">"||B==="<"?H="<0.0.0-0":H="*":B&&J?(Z&&(M=0),W=0,B===">"?(B=">=",Z?(Q=+Q+1,M=0,W=0):(M=+M+1,W=0)):B==="<="&&(B="<",Z?Q=+Q+1:M=+M+1),B==="<"&&(q="-0"),H=`${B+Q}.${M}.${W}${q}`):Z?H=`>=${Q}.0.0${q} <${+Q+1}.0.0-0`:G&&(H=`>=${Q}.${M}.0${q} <${Q}.${+M+1}.0-0`),i("xRange return",H),H})},P=($,F)=>(i("replaceStars",$,F),$.trim().replace(l[c.STAR],"")),j=($,F)=>(i("replaceGTE0",$,F),$.trim().replace(l[F.includePrerelease?c.GTE0PRE:c.GTE0],"")),z=$=>(F,V,H,B,Q,M,W,q,I,Z,G,J)=>(S(H)?V="":S(B)?V=`>=${H}.0.0${$?"-0":""}`:S(Q)?V=`>=${H}.${B}.0${$?"-0":""}`:M?V=`>=${V}`:V=`>=${V}${$?"-0":""}`,S(I)?q="":S(Z)?q=`<${+I+1}.0.0-0`:S(G)?q=`<${I}.${+Z+1}.0-0`:J?q=`<=${I}.${Z}.${G}-${J}`:$?q=`<${I}.${Z}.${+G+1}-0`:q=`<=${q}`,`${V} ${q}`.trim()),U=($,F,V)=>{for(let H=0;H<$.length;H++)if(!$[H].test(F))return!1;if(F.prerelease.length&&!V.includePrerelease){for(let H=0;H<$.length;H++)if(i($[H].semver),$[H].semver!==s.ANY&&$[H].semver.prerelease.length>0){const B=$[H].semver;if(B.major===F.major&&B.minor===F.minor&&B.patch===F.patch)return!0}return!1}return!0};return tY}var rY,H$e;function TF(){if(H$e)return rY;H$e=1;const e=Symbol("SemVer ANY");class t{static get ANY(){return e}constructor(u,d){if(d=r(d),u instanceof t){if(u.loose===!!d.loose)return u;u=u.value}u=u.trim().split(/\s+/).join(" "),i("comparator",u,d),this.options=d,this.loose=!!d.loose,this.parse(u),this.semver===e?this.value="":this.value=this.operator+this.semver.version,i("comp",this)}parse(u){const d=this.options.loose?n[a.COMPARATORLOOSE]:n[a.COMPARATOR],f=u.match(d);if(!f)throw new TypeError(`Invalid comparator: ${u}`);this.operator=f[1]!==void 0?f[1]:"",this.operator==="="&&(this.operator=""),f[2]?this.semver=new o(f[2],this.options.loose):this.semver=e}toString(){return this.value}test(u){if(i("Comparator.test",u,this.options.loose),this.semver===e||u===e)return!0;if(typeof u=="string")try{u=new o(u,this.options)}catch{return!1}return s(u,this.operator,this.semver,this.options)}intersects(u,d){if(!(u instanceof t))throw new TypeError("a Comparator is required");return this.operator===""?this.value===""?!0:new l(u.value,d).test(this.value):u.operator===""?u.value===""?!0:new l(this.value,d).test(u.semver):(d=r(d),d.includePrerelease&&(this.value==="<0.0.0-0"||u.value==="<0.0.0-0")||!d.includePrerelease&&(this.value.startsWith("<0.0.0")||u.value.startsWith("<0.0.0"))?!1:!!(this.operator.startsWith(">")&&u.operator.startsWith(">")||this.operator.startsWith("<")&&u.operator.startsWith("<")||this.semver.version===u.semver.version&&this.operator.includes("=")&&u.operator.includes("=")||s(this.semver,"<",u.semver,d)&&this.operator.startsWith(">")&&u.operator.startsWith("<")||s(this.semver,">",u.semver,d)&&this.operator.startsWith("<")&&u.operator.startsWith(">")))}}rY=t;const r=bpe(),{safeRe:n,t:a}=ZN(),s=Dpt(),i=kF(),o=tc(),l=Nf();return rY}var nY,G$e;function AF(){if(G$e)return nY;G$e=1;const e=Nf();return nY=(r,n,a)=>{try{n=new e(n,a)}catch{return!1}return n.test(r)},nY}var aY,Q$e;function lrn(){if(Q$e)return aY;Q$e=1;const e=Nf();return aY=(r,n)=>new e(r,n).set.map(a=>a.map(s=>s.value).join(" ").trim().split(" ")),aY}var sY,W$e;function crn(){if(W$e)return sY;W$e=1;const e=tc(),t=Nf();return sY=(n,a,s)=>{let i=null,o=null,l=null;try{l=new t(a,s)}catch{return null}return n.forEach(c=>{l.test(c)&&(!i||o.compare(c)===-1)&&(i=c,o=new e(i,s))}),i},sY}var iY,X$e;function urn(){if(X$e)return iY;X$e=1;const e=tc(),t=Nf();return iY=(n,a,s)=>{let i=null,o=null,l=null;try{l=new t(a,s)}catch{return null}return n.forEach(c=>{l.test(c)&&(!i||o.compare(c)===1)&&(i=c,o=new e(i,s))}),i},iY}var oY,Y$e;function drn(){if(Y$e)return oY;Y$e=1;const e=tc(),t=Nf(),r=CF();return oY=(a,s)=>{a=new t(a,s);let i=new e("0.0.0");if(a.test(i)||(i=new e("0.0.0-0"),a.test(i)))return i;i=null;for(let o=0;o<a.set.length;++o){const l=a.set[o];let c=null;l.forEach(u=>{const d=new e(u.semver.version);switch(u.operator){case">":d.prerelease.length===0?d.patch++:d.prerelease.push(0),d.raw=d.format();case"":case">=":(!c||r(d,c))&&(c=d);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${u.operator}`)}}),c&&(!i||r(i,c))&&(i=c)}return i&&a.test(i)?i:null},oY}var lY,K$e;function prn(){if(K$e)return lY;K$e=1;const e=Nf();return lY=(r,n)=>{try{return new e(r,n).range||"*"}catch{return null}},lY}var cY,J$e;function Epe(){if(J$e)return cY;J$e=1;const e=tc(),t=TF(),{ANY:r}=t,n=Nf(),a=AF(),s=CF(),i=xpe(),o=Spe(),l=wpe();return cY=(u,d,f,h)=>{u=new e(u,h),d=new n(d,h);let g,y,b,w,x;switch(f){case">":g=s,y=o,b=i,w=">",x=">=";break;case"<":g=i,y=l,b=s,w="<",x="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(u,d,h))return!1;for(let S=0;S<d.set.length;++S){const E=d.set[S];let C=null,k=null;if(E.forEach(A=>{A.semver===r&&(A=new t(">=0.0.0")),C=C||A,k=k||A,g(A.semver,C.semver,h)?C=A:b(A.semver,k.semver,h)&&(k=A)}),C.operator===w||C.operator===x||(!k.operator||k.operator===w)&&y(u,k.semver))return!1;if(k.operator===x&&b(u,k.semver))return!1}return!0},cY}var uY,eMe;function frn(){if(eMe)return uY;eMe=1;const e=Epe();return uY=(r,n,a)=>e(r,n,">",a),uY}var dY,tMe;function hrn(){if(tMe)return dY;tMe=1;const e=Epe();return dY=(r,n,a)=>e(r,n,"<",a),dY}var pY,rMe;function mrn(){if(rMe)return pY;rMe=1;const e=Nf();return pY=(r,n,a)=>(r=new e(r,a),n=new e(n,a),r.intersects(n,a)),pY}var fY,nMe;function grn(){if(nMe)return fY;nMe=1;const e=AF(),t=If();return fY=(r,n,a)=>{const s=[];let i=null,o=null;const l=r.sort((f,h)=>t(f,h,a));for(const f of l)e(f,n,a)?(o=f,i||(i=f)):(o&&s.push([i,o]),o=null,i=null);i&&s.push([i,null]);const c=[];for(const[f,h]of s)f===h?c.push(f):!h&&f===l[0]?c.push("*"):h?f===l[0]?c.push(`<=${h}`):c.push(`${f} - ${h}`):c.push(`>=${f}`);const u=c.join(" || "),d=typeof n.raw=="string"?n.raw:String(n);return u.length<d.length?u:n},fY}var hY,aMe;function yrn(){if(aMe)return hY;aMe=1;const e=Nf(),t=TF(),{ANY:r}=t,n=AF(),a=If(),s=(d,f,h={})=>{if(d===f)return!0;d=new e(d,h),f=new e(f,h);let g=!1;e:for(const y of d.set){for(const b of f.set){const w=l(y,b,h);if(g=g||w!==null,w)continue e}if(g)return!1}return!0},i=[new t(">=0.0.0-0")],o=[new t(">=0.0.0")],l=(d,f,h)=>{if(d===f)return!0;if(d.length===1&&d[0].semver===r){if(f.length===1&&f[0].semver===r)return!0;h.includePrerelease?d=i:d=o}if(f.length===1&&f[0].semver===r){if(h.includePrerelease)return!0;f=o}const g=new Set;let y,b;for(const D of d)D.operator===">"||D.operator===">="?y=c(y,D,h):D.operator==="<"||D.operator==="<="?b=u(b,D,h):g.add(D.semver);if(g.size>1)return null;let w;if(y&&b){if(w=a(y.semver,b.semver,h),w>0)return null;if(w===0&&(y.operator!==">="||b.operator!=="<="))return null}for(const D of g){if(y&&!n(D,String(y),h)||b&&!n(D,String(b),h))return null;for(const N of f)if(!n(D,String(N),h))return!1;return!0}let x,S,E,C,k=b&&!h.includePrerelease&&b.semver.prerelease.length?b.semver:!1,A=y&&!h.includePrerelease&&y.semver.prerelease.length?y.semver:!1;k&&k.prerelease.length===1&&b.operator==="<"&&k.prerelease[0]===0&&(k=!1);for(const D of f){if(C=C||D.operator===">"||D.operator===">=",E=E||D.operator==="<"||D.operator==="<=",y){if(A&&D.semver.prerelease&&D.semver.prerelease.length&&D.semver.major===A.major&&D.semver.minor===A.minor&&D.semver.patch===A.patch&&(A=!1),D.operator===">"||D.operator===">="){if(x=c(y,D,h),x===D&&x!==y)return!1}else if(y.operator===">="&&!n(y.semver,String(D),h))return!1}if(b){if(k&&D.semver.prerelease&&D.semver.prerelease.length&&D.semver.major===k.major&&D.semver.minor===k.minor&&D.semver.patch===k.patch&&(k=!1),D.operator==="<"||D.operator==="<="){if(S=u(b,D,h),S===D&&S!==b)return!1}else if(b.operator==="<="&&!n(b.semver,String(D),h))return!1}if(!D.operator&&(b||y)&&w!==0)return!1}return!(y&&E&&!b&&w!==0||b&&C&&!y&&w!==0||A||k)},c=(d,f,h)=>{if(!d)return f;const g=a(d.semver,f.semver,h);return g>0?d:g<0||f.operator===">"&&d.operator===">="?f:d},u=(d,f,h)=>{if(!d)return f;const g=a(d.semver,f.semver,h);return g<0?d:g>0||f.operator==="<"&&d.operator==="<="?f:d};return hY=s,hY}var mY,sMe;function brn(){if(sMe)return mY;sMe=1;const e=ZN(),t=_F(),r=tc(),n=Cpt(),a=t_(),s=Qtn(),i=Wtn(),o=Xtn(),l=Ytn(),c=Ktn(),u=Jtn(),d=ern(),f=trn(),h=If(),g=rrn(),y=nrn(),b=vpe(),w=arn(),x=srn(),S=CF(),E=xpe(),C=Tpt(),k=Apt(),A=wpe(),D=Spe(),N=Dpt(),P=irn(),j=TF(),z=Nf(),U=AF(),$=lrn(),F=crn(),V=urn(),H=drn(),B=prn(),Q=Epe(),M=frn(),W=hrn(),q=mrn(),I=grn(),Z=yrn();return mY={parse:a,valid:s,clean:i,inc:o,diff:l,major:c,minor:u,patch:d,prerelease:f,compare:h,rcompare:g,compareLoose:y,compareBuild:b,sort:w,rsort:x,gt:S,lt:E,eq:C,neq:k,gte:A,lte:D,cmp:N,coerce:P,Comparator:j,Range:z,satisfies:U,toComparators:$,maxSatisfying:F,minSatisfying:V,minVersion:H,validRange:B,outside:Q,gtr:M,ltr:W,intersects:q,simplifyRange:I,subset:Z,SemVer:r,re:e.re,src:e.src,tokens:e.t,SEMVER_SPEC_VERSION:t.SEMVER_SPEC_VERSION,RELEASE_TYPES:t.RELEASE_TYPES,compareIdentifiers:n.compareIdentifiers,rcompareIdentifiers:n.rcompareIdentifiers},mY}var vrn=brn();const tC=xf(vrn);var xrn=new Set(["observationalMemory","workspaces-v1"]);function wrn(e,t){return t in e&&typeof e[t]=="function"}const el=e=>{const t=["listWorkspaces","getWorkspace"],r=xrn.has("workspaces-v1"),n=t.every(a=>wrn(e,a));return r&&n},Ipt=(e,t)=>!e||typeof e!="object"?!1:"status"in e&&e.status===t||"statusCode"in e&&e.statusCode===t,Nre=e=>{if(Ipt(e,501))return!0;if(e&&typeof e=="object"&&"message"in e){const t=e.message;return t.includes("Workspace v1 not supported")||t.includes("501")}return!1},Srn=e=>Ipt(e,404)?!0:e&&typeof e=="object"&&"message"in e?e.message.includes("status: 404"):!1,A1=(e,t)=>Srn(t)||Nre(t)?!1:e<3;function Npt(e){var t,r,n="";if(typeof e=="string"||typeof e=="number")n+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(t=0;t<a;t++)e[t]&&(r=Npt(e[t]))&&(n&&(n+=" "),n+=r)}else for(r in e)e[r]&&(n&&(n+=" "),n+=r);return n}function Rpt(){for(var e,t,r=0,n="",a=arguments.length;r<a;r++)(e=arguments[r])&&(t=Npt(e))&&(n&&(n+=" "),n+=t);return n}const Ope="-",Ern=e=>{const t=_rn(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:i=>{const o=i.split(Ope);return o[0]===""&&o.length!==1&&o.shift(),Ppt(o,t)||Orn(i)},getConflictingClassGroupIds:(i,o)=>{const l=r[i]||[];return o&&n[i]?[...l,...n[i]]:l}}},Ppt=(e,t)=>{if(e.length===0)return t.classGroupId;const r=e[0],n=t.nextPart.get(r),a=n?Ppt(e.slice(1),n):void 0;if(a)return a;if(t.validators.length===0)return;const s=e.join(Ope);return t.validators.find(({validator:i})=>i(s))?.classGroupId},iMe=/^\[(.+)\]$/,Orn=e=>{if(iMe.test(e)){const t=iMe.exec(e)[1],r=t?.substring(0,t.indexOf(":"));if(r)return"arbitrary.."+r}},_rn=e=>{const{theme:t,classGroups:r}=e,n={nextPart:new Map,validators:[]};for(const a in r)Rre(r[a],n,a,t);return n},Rre=(e,t,r,n)=>{e.forEach(a=>{if(typeof a=="string"){const s=a===""?t:oMe(t,a);s.classGroupId=r;return}if(typeof a=="function"){if(krn(a)){Rre(a(n),t,r,n);return}t.validators.push({validator:a,classGroupId:r});return}Object.entries(a).forEach(([s,i])=>{Rre(i,oMe(t,s),r,n)})})},oMe=(e,t)=>{let r=e;return t.split(Ope).forEach(n=>{r.nextPart.has(n)||r.nextPart.set(n,{nextPart:new Map,validators:[]}),r=r.nextPart.get(n)}),r},krn=e=>e.isThemeGetter,Crn=e=>{if(e<1)return{get:()=>{},set:()=>{}};let t=0,r=new Map,n=new Map;const a=(s,i)=>{r.set(s,i),t++,t>e&&(t=0,n=r,r=new Map)};return{get(s){let i=r.get(s);if(i!==void 0)return i;if((i=n.get(s))!==void 0)return a(s,i),i},set(s,i){r.has(s)?r.set(s,i):a(s,i)}}},Pre="!",$re=":",Trn=$re.length,Arn=e=>{const{prefix:t,experimentalParseClassName:r}=e;let n=a=>{const s=[];let i=0,o=0,l=0,c;for(let g=0;g<a.length;g++){let y=a[g];if(i===0&&o===0){if(y===$re){s.push(a.slice(l,g)),l=g+Trn;continue}if(y==="/"){c=g;continue}}y==="["?i++:y==="]"?i--:y==="("?o++:y===")"&&o--}const u=s.length===0?a:a.substring(l),d=Drn(u),f=d!==u,h=c&&c>l?c-l:void 0;return{modifiers:s,hasImportantModifier:f,baseClassName:d,maybePostfixModifierPosition:h}};if(t){const a=t+$re,s=n;n=i=>i.startsWith(a)?s(i.substring(a.length)):{isExternal:!0,modifiers:[],hasImportantModifier:!1,baseClassName:i,maybePostfixModifierPosition:void 0}}if(r){const a=n;n=s=>r({className:s,parseClassName:a})}return n},Drn=e=>e.endsWith(Pre)?e.substring(0,e.length-1):e.startsWith(Pre)?e.substring(1):e,Irn=e=>{const t=Object.fromEntries(e.orderSensitiveModifiers.map(n=>[n,!0]));return n=>{if(n.length<=1)return n;const a=[];let s=[];return n.forEach(i=>{i[0]==="["||t[i]?(a.push(...s.sort(),i),s=[]):s.push(i)}),a.push(...s.sort()),a}},Nrn=e=>({cache:Crn(e.cacheSize),parseClassName:Arn(e),sortModifiers:Irn(e),...Ern(e)}),Rrn=/\s+/,Prn=(e,t)=>{const{parseClassName:r,getClassGroupId:n,getConflictingClassGroupIds:a,sortModifiers:s}=t,i=[],o=e.trim().split(Rrn);let l="";for(let c=o.length-1;c>=0;c-=1){const u=o[c],{isExternal:d,modifiers:f,hasImportantModifier:h,baseClassName:g,maybePostfixModifierPosition:y}=r(u);if(d){l=u+(l.length>0?" "+l:l);continue}let b=!!y,w=n(b?g.substring(0,y):g);if(!w){if(!b){l=u+(l.length>0?" "+l:l);continue}if(w=n(g),!w){l=u+(l.length>0?" "+l:l);continue}b=!1}const x=s(f).join(":"),S=h?x+Pre:x,E=S+w;if(i.includes(E))continue;i.push(E);const C=a(w,b);for(let k=0;k<C.length;++k){const A=C[k];i.push(S+A)}l=u+(l.length>0?" "+l:l)}return l};function $rn(){let e=0,t,r,n="";for(;e<arguments.length;)(t=arguments[e++])&&(r=$pt(t))&&(n&&(n+=" "),n+=r);return n}const $pt=e=>{if(typeof e=="string")return e;let t,r="";for(let n=0;n<e.length;n++)e[n]&&(t=$pt(e[n]))&&(r&&(r+=" "),r+=t);return r};function lMe(e,...t){let r,n,a,s=i;function i(l){const c=t.reduce((u,d)=>d(u),e());return r=Nrn(c),n=r.cache.get,a=r.cache.set,s=o,o(l)}function o(l){const c=n(l);if(c)return c;const u=Prn(l,r);return a(l,u),u}return function(){return s($rn.apply(null,arguments))}}const ro=e=>{const t=r=>r[e]||[];return t.isThemeGetter=!0,t},Mpt=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,jpt=/^\((?:(\w[\w-]*):)?(.+)\)$/i,Mrn=/^\d+\/\d+$/,jrn=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,Lrn=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,Frn=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,Brn=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,zrn=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,Aw=e=>Mrn.test(e),In=e=>!!e&&!Number.isNaN(Number(e)),Ny=e=>!!e&&Number.isInteger(Number(e)),gY=e=>e.endsWith("%")&&In(e.slice(0,-1)),Nm=e=>jrn.test(e),Urn=()=>!0,Vrn=e=>Lrn.test(e)&&!Frn.test(e),Lpt=()=>!1,qrn=e=>Brn.test(e),Zrn=e=>zrn.test(e),Hrn=e=>!sr(e)&&!ir(e),Grn=e=>r_(e,zpt,Lpt),sr=e=>Mpt.test(e),l0=e=>r_(e,Upt,Vrn),yY=e=>r_(e,Krn,In),cMe=e=>r_(e,Fpt,Lpt),Qrn=e=>r_(e,Bpt,Zrn),c$=e=>r_(e,Vpt,qrn),ir=e=>jpt.test(e),rC=e=>n_(e,Upt),Wrn=e=>n_(e,Jrn),uMe=e=>n_(e,Fpt),Xrn=e=>n_(e,zpt),Yrn=e=>n_(e,Bpt),u$=e=>n_(e,Vpt,!0),r_=(e,t,r)=>{const n=Mpt.exec(e);return n?n[1]?t(n[1]):r(n[2]):!1},n_=(e,t,r=!1)=>{const n=jpt.exec(e);return n?n[1]?t(n[1]):r:!1},Fpt=e=>e==="position"||e==="percentage",Bpt=e=>e==="image"||e==="url",zpt=e=>e==="length"||e==="size"||e==="bg-size",Upt=e=>e==="length",Krn=e=>e==="number",Jrn=e=>e==="family-name",Vpt=e=>e==="shadow",dMe=()=>{const e=ro("color"),t=ro("font"),r=ro("text"),n=ro("font-weight"),a=ro("tracking"),s=ro("leading"),i=ro("breakpoint"),o=ro("container"),l=ro("spacing"),c=ro("radius"),u=ro("shadow"),d=ro("inset-shadow"),f=ro("text-shadow"),h=ro("drop-shadow"),g=ro("blur"),y=ro("perspective"),b=ro("aspect"),w=ro("ease"),x=ro("animate"),S=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...E(),ir,sr],k=()=>["auto","hidden","clip","visible","scroll"],A=()=>["auto","contain","none"],D=()=>[ir,sr,l],N=()=>[Aw,"full","auto",...D()],P=()=>[Ny,"none","subgrid",ir,sr],j=()=>["auto",{span:["full",Ny,ir,sr]},Ny,ir,sr],z=()=>[Ny,"auto",ir,sr],U=()=>["auto","min","max","fr",ir,sr],$=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],F=()=>["start","end","center","stretch","center-safe","end-safe"],V=()=>["auto",...D()],H=()=>[Aw,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...D()],B=()=>[e,ir,sr],Q=()=>[...E(),uMe,cMe,{position:[ir,sr]}],M=()=>["no-repeat",{repeat:["","x","y","space","round"]}],W=()=>["auto","cover","contain",Xrn,Grn,{size:[ir,sr]}],q=()=>[gY,rC,l0],I=()=>["","none","full",c,ir,sr],Z=()=>["",In,rC,l0],G=()=>["solid","dashed","dotted","double"],J=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],K=()=>[In,gY,uMe,cMe],ae=()=>["","none",g,ir,sr],le=()=>["none",In,ir,sr],ce=()=>["none",In,ir,sr],Te=()=>[In,ir,sr],X=()=>[Aw,"full",...D()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Nm],breakpoint:[Nm],color:[Urn],container:[Nm],"drop-shadow":[Nm],ease:["in","out","in-out"],font:[Hrn],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Nm],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Nm],shadow:[Nm],spacing:["px",In],text:[Nm],"text-shadow":[Nm],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",Aw,sr,ir,b]}],container:["container"],columns:[{columns:[In,sr,ir,o]}],"break-after":[{"break-after":S()}],"break-before":[{"break-before":S()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:k()}],"overflow-x":[{"overflow-x":k()}],"overflow-y":[{"overflow-y":k()}],overscroll:[{overscroll:A()}],"overscroll-x":[{"overscroll-x":A()}],"overscroll-y":[{"overscroll-y":A()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:N()}],"inset-x":[{"inset-x":N()}],"inset-y":[{"inset-y":N()}],start:[{start:N()}],end:[{end:N()}],top:[{top:N()}],right:[{right:N()}],bottom:[{bottom:N()}],left:[{left:N()}],visibility:["visible","invisible","collapse"],z:[{z:[Ny,"auto",ir,sr]}],basis:[{basis:[Aw,"full","auto",o,...D()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[In,Aw,"auto","initial","none",sr]}],grow:[{grow:["",In,ir,sr]}],shrink:[{shrink:["",In,ir,sr]}],order:[{order:[Ny,"first","last","none",ir,sr]}],"grid-cols":[{"grid-cols":P()}],"col-start-end":[{col:j()}],"col-start":[{"col-start":z()}],"col-end":[{"col-end":z()}],"grid-rows":[{"grid-rows":P()}],"row-start-end":[{row:j()}],"row-start":[{"row-start":z()}],"row-end":[{"row-end":z()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":U()}],"auto-rows":[{"auto-rows":U()}],gap:[{gap:D()}],"gap-x":[{"gap-x":D()}],"gap-y":[{"gap-y":D()}],"justify-content":[{justify:[...$(),"normal"]}],"justify-items":[{"justify-items":[...F(),"normal"]}],"justify-self":[{"justify-self":["auto",...F()]}],"align-content":[{content:["normal",...$()]}],"align-items":[{items:[...F(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...F(),{baseline:["","last"]}]}],"place-content":[{"place-content":$()}],"place-items":[{"place-items":[...F(),"baseline"]}],"place-self":[{"place-self":["auto",...F()]}],p:[{p:D()}],px:[{px:D()}],py:[{py:D()}],ps:[{ps:D()}],pe:[{pe:D()}],pt:[{pt:D()}],pr:[{pr:D()}],pb:[{pb:D()}],pl:[{pl:D()}],m:[{m:V()}],mx:[{mx:V()}],my:[{my:V()}],ms:[{ms:V()}],me:[{me:V()}],mt:[{mt:V()}],mr:[{mr:V()}],mb:[{mb:V()}],ml:[{ml:V()}],"space-x":[{"space-x":D()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":D()}],"space-y-reverse":["space-y-reverse"],size:[{size:H()}],w:[{w:[o,"screen",...H()]}],"min-w":[{"min-w":[o,"screen","none",...H()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[i]},...H()]}],h:[{h:["screen","lh",...H()]}],"min-h":[{"min-h":["screen","lh","none",...H()]}],"max-h":[{"max-h":["screen","lh",...H()]}],"font-size":[{text:["base",r,rC,l0]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[n,ir,yY]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",gY,sr]}],"font-family":[{font:[Wrn,sr,t]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[a,ir,sr]}],"line-clamp":[{"line-clamp":[In,"none",ir,yY]}],leading:[{leading:[s,...D()]}],"list-image":[{"list-image":["none",ir,sr]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ir,sr]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:B()}],"text-color":[{text:B()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...G(),"wavy"]}],"text-decoration-thickness":[{decoration:[In,"from-font","auto",ir,l0]}],"text-decoration-color":[{decoration:B()}],"underline-offset":[{"underline-offset":[In,"auto",ir,sr]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:D()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ir,sr]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",ir,sr]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:Q()}],"bg-repeat":[{bg:M()}],"bg-size":[{bg:W()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ny,ir,sr],radial:["",ir,sr],conic:[Ny,ir,sr]},Yrn,Qrn]}],"bg-color":[{bg:B()}],"gradient-from-pos":[{from:q()}],"gradient-via-pos":[{via:q()}],"gradient-to-pos":[{to:q()}],"gradient-from":[{from:B()}],"gradient-via":[{via:B()}],"gradient-to":[{to:B()}],rounded:[{rounded:I()}],"rounded-s":[{"rounded-s":I()}],"rounded-e":[{"rounded-e":I()}],"rounded-t":[{"rounded-t":I()}],"rounded-r":[{"rounded-r":I()}],"rounded-b":[{"rounded-b":I()}],"rounded-l":[{"rounded-l":I()}],"rounded-ss":[{"rounded-ss":I()}],"rounded-se":[{"rounded-se":I()}],"rounded-ee":[{"rounded-ee":I()}],"rounded-es":[{"rounded-es":I()}],"rounded-tl":[{"rounded-tl":I()}],"rounded-tr":[{"rounded-tr":I()}],"rounded-br":[{"rounded-br":I()}],"rounded-bl":[{"rounded-bl":I()}],"border-w":[{border:Z()}],"border-w-x":[{"border-x":Z()}],"border-w-y":[{"border-y":Z()}],"border-w-s":[{"border-s":Z()}],"border-w-e":[{"border-e":Z()}],"border-w-t":[{"border-t":Z()}],"border-w-r":[{"border-r":Z()}],"border-w-b":[{"border-b":Z()}],"border-w-l":[{"border-l":Z()}],"divide-x":[{"divide-x":Z()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":Z()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...G(),"hidden","none"]}],"divide-style":[{divide:[...G(),"hidden","none"]}],"border-color":[{border:B()}],"border-color-x":[{"border-x":B()}],"border-color-y":[{"border-y":B()}],"border-color-s":[{"border-s":B()}],"border-color-e":[{"border-e":B()}],"border-color-t":[{"border-t":B()}],"border-color-r":[{"border-r":B()}],"border-color-b":[{"border-b":B()}],"border-color-l":[{"border-l":B()}],"divide-color":[{divide:B()}],"outline-style":[{outline:[...G(),"none","hidden"]}],"outline-offset":[{"outline-offset":[In,ir,sr]}],"outline-w":[{outline:["",In,rC,l0]}],"outline-color":[{outline:B()}],shadow:[{shadow:["","none",u,u$,c$]}],"shadow-color":[{shadow:B()}],"inset-shadow":[{"inset-shadow":["none",d,u$,c$]}],"inset-shadow-color":[{"inset-shadow":B()}],"ring-w":[{ring:Z()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:B()}],"ring-offset-w":[{"ring-offset":[In,l0]}],"ring-offset-color":[{"ring-offset":B()}],"inset-ring-w":[{"inset-ring":Z()}],"inset-ring-color":[{"inset-ring":B()}],"text-shadow":[{"text-shadow":["none",f,u$,c$]}],"text-shadow-color":[{"text-shadow":B()}],opacity:[{opacity:[In,ir,sr]}],"mix-blend":[{"mix-blend":[...J(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":J()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[In]}],"mask-image-linear-from-pos":[{"mask-linear-from":K()}],"mask-image-linear-to-pos":[{"mask-linear-to":K()}],"mask-image-linear-from-color":[{"mask-linear-from":B()}],"mask-image-linear-to-color":[{"mask-linear-to":B()}],"mask-image-t-from-pos":[{"mask-t-from":K()}],"mask-image-t-to-pos":[{"mask-t-to":K()}],"mask-image-t-from-color":[{"mask-t-from":B()}],"mask-image-t-to-color":[{"mask-t-to":B()}],"mask-image-r-from-pos":[{"mask-r-from":K()}],"mask-image-r-to-pos":[{"mask-r-to":K()}],"mask-image-r-from-color":[{"mask-r-from":B()}],"mask-image-r-to-color":[{"mask-r-to":B()}],"mask-image-b-from-pos":[{"mask-b-from":K()}],"mask-image-b-to-pos":[{"mask-b-to":K()}],"mask-image-b-from-color":[{"mask-b-from":B()}],"mask-image-b-to-color":[{"mask-b-to":B()}],"mask-image-l-from-pos":[{"mask-l-from":K()}],"mask-image-l-to-pos":[{"mask-l-to":K()}],"mask-image-l-from-color":[{"mask-l-from":B()}],"mask-image-l-to-color":[{"mask-l-to":B()}],"mask-image-x-from-pos":[{"mask-x-from":K()}],"mask-image-x-to-pos":[{"mask-x-to":K()}],"mask-image-x-from-color":[{"mask-x-from":B()}],"mask-image-x-to-color":[{"mask-x-to":B()}],"mask-image-y-from-pos":[{"mask-y-from":K()}],"mask-image-y-to-pos":[{"mask-y-to":K()}],"mask-image-y-from-color":[{"mask-y-from":B()}],"mask-image-y-to-color":[{"mask-y-to":B()}],"mask-image-radial":[{"mask-radial":[ir,sr]}],"mask-image-radial-from-pos":[{"mask-radial-from":K()}],"mask-image-radial-to-pos":[{"mask-radial-to":K()}],"mask-image-radial-from-color":[{"mask-radial-from":B()}],"mask-image-radial-to-color":[{"mask-radial-to":B()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[In]}],"mask-image-conic-from-pos":[{"mask-conic-from":K()}],"mask-image-conic-to-pos":[{"mask-conic-to":K()}],"mask-image-conic-from-color":[{"mask-conic-from":B()}],"mask-image-conic-to-color":[{"mask-conic-to":B()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:Q()}],"mask-repeat":[{mask:M()}],"mask-size":[{mask:W()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ir,sr]}],filter:[{filter:["","none",ir,sr]}],blur:[{blur:ae()}],brightness:[{brightness:[In,ir,sr]}],contrast:[{contrast:[In,ir,sr]}],"drop-shadow":[{"drop-shadow":["","none",h,u$,c$]}],"drop-shadow-color":[{"drop-shadow":B()}],grayscale:[{grayscale:["",In,ir,sr]}],"hue-rotate":[{"hue-rotate":[In,ir,sr]}],invert:[{invert:["",In,ir,sr]}],saturate:[{saturate:[In,ir,sr]}],sepia:[{sepia:["",In,ir,sr]}],"backdrop-filter":[{"backdrop-filter":["","none",ir,sr]}],"backdrop-blur":[{"backdrop-blur":ae()}],"backdrop-brightness":[{"backdrop-brightness":[In,ir,sr]}],"backdrop-contrast":[{"backdrop-contrast":[In,ir,sr]}],"backdrop-grayscale":[{"backdrop-grayscale":["",In,ir,sr]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[In,ir,sr]}],"backdrop-invert":[{"backdrop-invert":["",In,ir,sr]}],"backdrop-opacity":[{"backdrop-opacity":[In,ir,sr]}],"backdrop-saturate":[{"backdrop-saturate":[In,ir,sr]}],"backdrop-sepia":[{"backdrop-sepia":["",In,ir,sr]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":D()}],"border-spacing-x":[{"border-spacing-x":D()}],"border-spacing-y":[{"border-spacing-y":D()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ir,sr]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[In,"initial",ir,sr]}],ease:[{ease:["linear","initial",w,ir,sr]}],delay:[{delay:[In,ir,sr]}],animate:[{animate:["none",x,ir,sr]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[y,ir,sr]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:le()}],"rotate-x":[{"rotate-x":le()}],"rotate-y":[{"rotate-y":le()}],"rotate-z":[{"rotate-z":le()}],scale:[{scale:ce()}],"scale-x":[{"scale-x":ce()}],"scale-y":[{"scale-y":ce()}],"scale-z":[{"scale-z":ce()}],"scale-3d":["scale-3d"],skew:[{skew:Te()}],"skew-x":[{"skew-x":Te()}],"skew-y":[{"skew-y":Te()}],transform:[{transform:[ir,sr,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:X()}],"translate-x":[{"translate-x":X()}],"translate-y":[{"translate-y":X()}],"translate-z":[{"translate-z":X()}],"translate-none":["translate-none"],accent:[{accent:B()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:B()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",ir,sr]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":D()}],"scroll-mx":[{"scroll-mx":D()}],"scroll-my":[{"scroll-my":D()}],"scroll-ms":[{"scroll-ms":D()}],"scroll-me":[{"scroll-me":D()}],"scroll-mt":[{"scroll-mt":D()}],"scroll-mr":[{"scroll-mr":D()}],"scroll-mb":[{"scroll-mb":D()}],"scroll-ml":[{"scroll-ml":D()}],"scroll-p":[{"scroll-p":D()}],"scroll-px":[{"scroll-px":D()}],"scroll-py":[{"scroll-py":D()}],"scroll-ps":[{"scroll-ps":D()}],"scroll-pe":[{"scroll-pe":D()}],"scroll-pt":[{"scroll-pt":D()}],"scroll-pr":[{"scroll-pr":D()}],"scroll-pb":[{"scroll-pb":D()}],"scroll-pl":[{"scroll-pl":D()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",ir,sr]}],fill:[{fill:["none",...B()]}],"stroke-w":[{stroke:[In,rC,l0,yY]}],stroke:[{stroke:["none",...B()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},enn=(e,{cacheSize:t,prefix:r,experimentalParseClassName:n,extend:a={},override:s={}})=>(RC(e,"cacheSize",t),RC(e,"prefix",r),RC(e,"experimentalParseClassName",n),d$(e.theme,s.theme),d$(e.classGroups,s.classGroups),d$(e.conflictingClassGroups,s.conflictingClassGroups),d$(e.conflictingClassGroupModifiers,s.conflictingClassGroupModifiers),RC(e,"orderSensitiveModifiers",s.orderSensitiveModifiers),p$(e.theme,a.theme),p$(e.classGroups,a.classGroups),p$(e.conflictingClassGroups,a.conflictingClassGroups),p$(e.conflictingClassGroupModifiers,a.conflictingClassGroupModifiers),qpt(e,a,"orderSensitiveModifiers"),e),RC=(e,t,r)=>{r!==void 0&&(e[t]=r)},d$=(e,t)=>{if(t)for(const r in t)RC(e,r,t[r])},p$=(e,t)=>{if(t)for(const r in t)qpt(e,t,r)},qpt=(e,t,r)=>{const n=t[r];n!==void 0&&(e[r]=e[r]?e[r].concat(n):n)},tnn=(e,...t)=>typeof e=="function"?lMe(dMe,e,...t):lMe(()=>enn(dMe(),e),...t),rnn=Object.keys({...q7e,...pNt}),nnn=Object.keys(bNt),ann=Object.keys(fNt),snn=Object.keys(hNt),inn=Object.keys(dNt),c0=Object.keys(yNt),onn=Object.keys(mNt).concat(Object.keys(gNt)),lnn=tnn({extend:{theme:{color:rnn,spacing:nnn,radius:inn,leading:snn,shadow:onn},classGroups:{"font-size":[{text:ann}],h:[{h:c0}],w:[{w:c0}],size:[{size:c0}],"min-h":[{"min-h":c0}],"min-w":[{"min-w":c0}],"max-h":[{"max-h":c0}],"max-w":[{"max-w":c0}]}}});function ne(...e){return lnn(Rpt(e))}const Co={sm:"h-form-sm",md:"h-form-md",lg:"h-form-lg"},Rf="focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring transition-shadow duration-normal",cnn="focus-within:outline-none focus-within:ring-1 focus-within:ring-accent1 focus-within:shadow-focus-ring transition-shadow duration-normal",HN="rounded-md",unn={sm:"[&>svg]:h-icon-sm [&>svg]:w-icon-sm",default:"[&>svg]:h-icon-default [&>svg]:w-icon-default",lg:"[&>svg]:h-icon-lg [&>svg]:w-icon-lg"},qe=({children:e,className:t,size:r="default",...n})=>p.jsx("span",{className:ne("block",unn[r],t),...n,children:e}),ru=MNt,fa=jNt,ha=LNt,sa=_.forwardRef(({className:e,sideOffset:t=4,...r},n)=>p.jsx(FNt,{children:p.jsx(eBe,{ref:n,sideOffset:t,className:ne("z-50 overflow-hidden rounded-md bg-neutral6 px-3 py-1.5 text-xs text-surface2 animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e),...r})}));sa.displayName=eBe.displayName;const dnn={sm:`${Co.sm} w-form-sm`,md:`${Co.md} w-form-md`,lg:`${Co.lg} w-form-lg`},pnn={sm:"sm",md:"default",lg:"lg"},fnn={default:"bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",light:"bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",outline:"bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",ghost:"bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",primary:"bg-accent1 hover:bg-accent1/90 text-surface1 font-medium hover:shadow-glow-accent1 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none"},hnn="border border-border1 inline-flex items-center justify-center rounded-md transition-all duration-normal ease-out-custom active:scale-[0.98]",Xl=we.forwardRef(({className:e,children:t,tooltip:r,size:n="md",variant:a="default",disabled:s,...i},o)=>p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{ref:o,disabled:s,"aria-label":typeof r=="string"?r:void 0,className:ne(hnn,Rf,fnn[a],dnn[n],s&&"active:scale-100",e),...i,children:p.jsx(qe,{size:pnn[n],children:t})})}),p.jsx(sa,{children:r})]}));Xl.displayName="IconButton";const mnn={"ui-xs":"text-ui-xs leading-ui-xs","ui-sm":"text-ui-sm leading-ui-sm","ui-md":"text-ui-md leading-ui-md","ui-lg":"text-ui-lg leading-ui-lg","header-sm":"text-header-sm leading-header-sm","header-md":"text-header-md leading-header-md","header-lg":"text-header-lg leading-header-lg","header-xl":"text-header-xl leading-header-xl"},gnn={mono:"font-mono"},it=({as:e="p",className:t,variant:r="ui-md",font:n,...a})=>p.jsx(e,{className:ne(mnn[r],n&&gnn[n],t),...a}),Wr={colors:"transition-colors duration-normal ease-out-custom",all:"transition-all duration-normal ease-out-custom",opacity:"transition-opacity duration-normal ease-out-custom"},GN={visible:"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-accent1 focus-visible:shadow-focus-ring"},ynn={sm:"h-avatar-sm w-avatar-sm",md:"h-avatar-md w-avatar-md",lg:"h-avatar-lg w-avatar-lg"},bnn=({src:e,name:t,size:r="sm",interactive:n=!1})=>p.jsx("div",{className:ne(ynn[r],"border border-border1 bg-surface3 shrink-0 overflow-hidden rounded-full flex items-center justify-center",Wr.all,n&&"cursor-pointer hover:scale-105 hover:border-neutral2 hover:shadow-sm"),children:e?p.jsx("img",{src:e,alt:t,className:"h-full w-full object-cover"}):p.jsx(it,{variant:"ui-md",className:"text-center text-neutral4",children:t[0].toUpperCase()})}),DF=({copiedDuration:e=1500}={})=>{const[t,r]=_.useState(!1);return{isCopied:t,copyToClipboard:a=>{a&&navigator.clipboard.writeText(a).then(()=>{r(!0),setTimeout(()=>r(!1),e)})}}},vnn=K7t({style:vie.coldarkDark,customStyle:{margin:0,backgroundColor:"black"}}),xnn=()=>p.jsx(gMt,{remarkPlugins:[pze],className:"aui-md",components:Enn}),pMe=_.memo(xnn),wnn=({language:e,code:t})=>{const{isCopied:r,copyToClipboard:n}=DF(),a=()=>{!t||r||n(t)};return p.jsxs("div",{style:{background:"hsl(0 0% 100% / 0.06)",borderTopRightRadius:"0.5rem",borderTopLeftRadius:"0.5rem",marginTop:"0.5rem",border:"1px solid hsl(0 0% 20.4%)",borderBottom:"none"},className:"flex items-center justify-between gap-4 px-4 py-2 text-sm font-semibold text-white",children:[p.jsx("span",{className:"lowercase [&>span]:text-xs",children:e}),p.jsx(Xl,{variant:"light",size:"md",tooltip:"Copy",onClick:a,children:p.jsxs("span",{className:"grid",children:[p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",r?"scale-100":"scale-0"),children:p.jsx(Ao,{size:14})},"checkmark"),p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",r?"scale-0":"scale-100"),children:p.jsx(Jl,{size:14})},"copy")]})})]})},Snn=({alt:e,src:t,...r})=>{const[n,a]=_.useState(!1);return _.useEffect(()=>{a(!1)},[t]),n||!t?p.jsxs("div",{children:[p.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor",width:"150",height:"150",children:p.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m2.25 15.75 5.159-5.159a2.25 2.25 0 0 1 3.182 0l5.159 5.159m-1.5-1.5 1.409-1.409a2.25 2.25 0 0 1 3.182 0l2.909 2.909m-18 3.75h16.5a1.5 1.5 0 0 0 1.5-1.5V6a1.5 1.5 0 0 0-1.5-1.5H3.75A1.5 1.5 0 0 0 2.25 6v12a1.5 1.5 0 0 0 1.5 1.5Zm10.5-11.25h.008v.008h-.008V8.25Zm.375 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"})}),p.jsx("p",{className:"text-xs italic text-neutral3 -mt-2.5 mb-2.5",children:"Image link is broken"})]}):p.jsx("img",{src:t,alt:e,...r,onError:()=>{a(!0)}})},Enn=eMt({h1:({className:e,...t})=>p.jsx("h1",{className:ne("mb-8 scroll-m-20 text-4xl font-extrabold tracking-tight last:mb-0",e),...t,style:{marginBottom:"2rem"}}),h2:({className:e,...t})=>p.jsx("h2",{className:ne("mb-4 mt-8 scroll-m-20 text-3xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"2rem"}}),h3:({className:e,...t})=>p.jsx("h3",{className:ne("scroll-m-20 text-2xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h4:({className:e,...t})=>p.jsx("h4",{className:ne("scroll-m-20 text-xl font-semibold tracking-tight first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1.5rem"}}),h5:({className:e,...t})=>p.jsx("h5",{className:ne("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),h6:({className:e,...t})=>p.jsx("h6",{className:ne("font-semibold first:mt-0 last:mb-0",e),...t,style:{marginBottom:"1rem",marginTop:"1rem"}}),p:({className:e,...t})=>p.jsx("p",{className:ne("leading-7 first:mt-0 last:mb-0",e),...t}),a:({className:e,...t})=>p.jsx("a",{className:ne("text-neutral6 font-medium underline underline-offset-4",e),...t}),blockquote:({className:e,...t})=>p.jsx("blockquote",{className:ne("border-l-2 pl-6 italic",e),...t}),ul:({className:e,...t})=>p.jsx("ul",{className:ne("my-5 ml-6 list-disc [&>li]:mt-2",e),...t}),ol:({className:e,...t})=>p.jsx("ol",{className:ne("my-5 ml-6 list-decimal [&>li]:mt-2",e),...t}),hr:({className:e,...t})=>p.jsx("hr",{className:ne("my-5 border-b",e),...t}),table:({className:e,...t})=>p.jsx("table",{className:ne("my-5 w-full border-separate border-spacing-0 overflow-y-auto",e),...t}),th:({className:e,...t})=>p.jsx("th",{className:ne("bg-surface4 px-4 py-2 text-left font-bold first:rounded-tl-lg last:rounded-tr-lg [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),td:({className:e,...t})=>p.jsx("td",{className:ne("border-b border-l px-4 py-2 text-left last:border-r [&[align=center]]:text-center [&[align=right]]:text-right",e),...t}),tr:({className:e,...t})=>p.jsx("tr",{className:ne("m-0 border-b p-0 first:border-t [&:last-child>td:first-child]:rounded-bl-lg [&:last-child>td:last-child]:rounded-br-lg",e),...t}),sup:({className:e,...t})=>p.jsx("sup",{className:ne("[&>a]:text-xs [&>a]:no-underline",e),...t}),pre:({className:e,...t})=>p.jsx("pre",{...t,style:{borderBottomRightRadius:"0.5rem",borderBottomLeftRadius:"0.5rem",background:"transparent",fontSize:"0.875rem",marginBottom:"0.5rem",border:"1px solid hsl(0 0% 20.4%)"},className:ne("overflow-x-auto p-4 text-white",e)}),code:function({className:t,...r}){const n=BBe();return p.jsxs("pre",{style:{fontSize:"0.875rem",display:"inline"},children:[p.jsx("code",{className:ne(!n&&"bg-surface4 rounded border font-semibold",t),...r,style:{fontWeight:"400",paddingBlock:n?0:"0.1em",paddingInline:n?0:"0.3em"}})," "]})},CodeHeader:wnn,SyntaxHighlighter:vnn,img:Snn}),Onn=({reason:e,tripwire:t})=>{const[r,n]=_.useState(!1),a=t&&(t.retry!==void 0||t.tripwirePayload||t.processorId);return p.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-950/20 overflow-hidden",children:[p.jsxs("div",{className:"flex items-start gap-3 p-4",children:[p.jsx(VI,{className:"w-5 h-5 text-amber-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-sm font-medium text-amber-200 mb-1",children:"Content Blocked"}),p.jsx("p",{className:"text-sm text-amber-300/90",children:e})]})]}),a&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{onClick:()=>n(!r),className:"w-full flex items-center gap-2 px-4 py-2 text-xs text-amber-400/70 hover:text-amber-400 hover:bg-amber-900/20 transition-colors border-t border-amber-500/20",children:[r?p.jsx(ui,{className:"w-3.5 h-3.5"}):p.jsx(Vl,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Details"})]}),r&&p.jsxs("div",{className:"px-4 pb-4 space-y-3 border-t border-amber-500/20 bg-amber-950/10",children:[t.retry!==void 0&&p.jsxs("div",{className:"flex items-center gap-2 pt-3",children:[p.jsx(UI,{className:"w-3.5 h-3.5 text-amber-400/60"}),p.jsxs("span",{className:"text-xs text-amber-300/70",children:["Retry:"," ",t.retry?p.jsx("span",{className:"text-green-400",children:"Allowed"}):p.jsx("span",{className:"text-red-400",children:"Not allowed"})]})]}),t.processorId&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(U7e,{className:"w-3.5 h-3.5 text-amber-400/60"}),p.jsxs("span",{className:"text-xs text-amber-300/70",children:["Processor:"," ",p.jsx("code",{className:"px-1.5 py-0.5 rounded bg-amber-900/30 text-amber-200 font-mono",children:t.processorId})]})]}),t.tripwirePayload!==void 0&&t.tripwirePayload!==null&&p.jsxs("div",{className:"pt-1",children:[p.jsx("p",{className:"text-xs text-amber-400/60 mb-1.5",children:"Metadata:"}),p.jsx("pre",{className:"text-xs text-amber-200/80 bg-amber-900/30 rounded p-2 overflow-x-auto font-mono",children:String(JSON.stringify(t.tripwirePayload,null,2))})]})]})]})]})},No=e=>p.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.5 15C10.3565 15 12.137 14.2625 13.4497 12.9497C14.7625 11.637 15.5 9.85652 15.5 8C15.5 6.14348 14.7625 4.36301 13.4497 3.05025C12.137 1.7375 10.3565 1 8.5 1C6.64348 1 4.86301 1.7375 3.55025 3.05025C2.2375 4.36301 1.5 6.14348 1.5 8C1.5 9.85652 2.2375 11.637 3.55025 12.9497C4.86301 14.2625 6.64348 15 8.5 15ZM5.621 10.879L4.611 11.889C3.84179 11.1198 3.31794 10.1398 3.1057 9.07291C2.89346 8.00601 3.00236 6.90013 3.41864 5.89512C3.83491 4.89012 4.53986 4.03112 5.44434 3.42676C6.34881 2.8224 7.41219 2.49983 8.5 2.49983C9.58781 2.49983 10.6512 2.8224 11.5557 3.42676C12.4601 4.03112 13.1651 4.89012 13.5814 5.89512C13.9976 6.90013 14.1065 8.00601 13.8943 9.07291C13.6821 10.1398 13.1582 11.1198 12.389 11.889L11.379 10.879C11.1004 10.6003 10.7696 10.3792 10.4055 10.2284C10.0414 10.0776 9.6511 9.99995 9.257 10H7.743C7.3489 9.99995 6.95865 10.0776 6.59455 10.2284C6.23045 10.3792 5.89963 10.6003 5.621 10.879Z",fill:"currentColor"}),p.jsx("path",{d:"M8.5 4C7.96957 4 7.46086 4.21071 7.08579 4.58579C6.71071 4.96086 6.5 5.46957 6.5 6V6.5C6.5 7.03043 6.71071 7.53914 7.08579 7.91421C7.46086 8.28929 7.96957 8.5 8.5 8.5C9.03043 8.5 9.53914 8.28929 9.91421 7.91421C10.2893 7.53914 10.5 7.03043 10.5 6.5V6C10.5 5.46957 10.2893 4.96086 9.91421 4.58579C9.53914 4.21071 9.03043 4 8.5 4Z",fill:"currentColor"})]}),Zpt=e=>p.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),p.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),p.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),p.jsxs("g",{clipPath:"url(#clip0_21421_19519)",children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M38.5383 47.0955C45.0714 50.3122 53.9322 52.1193 63.1714 52.1193C72.4106 52.1193 81.2714 50.3122 87.8045 47.0955C94.3376 43.8787 98.0078 39.5159 98.0078 34.9668C98.0078 30.4177 94.3376 26.0549 87.8045 22.8381C81.2714 19.6214 72.4106 17.8143 63.1714 17.8143C53.9322 17.8143 45.0714 19.6214 38.5383 22.8381C32.0052 26.0549 28.3349 30.4177 28.3349 34.9668C28.3349 39.5159 32.0052 43.8787 38.5383 47.0955ZM42.9089 34.9668L35.8005 34.9668C35.8004 32.3013 37.4056 29.6956 40.4132 27.4793C43.4207 25.263 47.6956 23.5355 52.6971 22.5154C57.6986 21.4954 63.2022 21.2285 68.5118 21.7485C73.8214 22.2685 78.6986 23.552 82.5266 25.4368C86.3546 27.3216 88.9615 29.723 90.0176 32.3373C91.0737 34.9517 90.5316 37.6614 88.4599 40.1241C86.3881 42.5867 82.8797 44.6915 78.3784 46.1723C73.8771 47.6532 68.585 48.4435 63.1714 48.4435V44.9435C63.1717 43.9778 62.7855 43.0215 62.035 42.1293C61.2845 41.2372 60.1843 40.4265 58.7973 39.7438L53.4695 37.1205C52.0828 36.4376 50.4364 35.8959 48.6244 35.5263C46.8124 35.1568 44.8702 34.9667 42.9089 34.9668Z",fill:"#A9A9A9"}),p.jsx("path",{d:"M77.2474 28.0361C75.3808 27.1171 72.8492 26.6007 70.2094 26.6007C67.5696 26.6007 65.038 27.1171 63.1714 28.0361L61.4119 28.9025C59.5453 29.8215 58.4966 31.068 58.4966 32.3678C58.4966 33.6676 59.5453 34.9141 61.4119 35.8331C63.2785 36.7522 65.8101 37.2685 68.4499 37.2685C71.0897 37.2685 73.6213 36.7522 75.4879 35.8331L77.2474 34.9668C79.114 34.0477 80.1627 32.8012 80.1627 31.5015C80.1627 30.2017 79.114 28.9552 77.2474 28.0361Z",fill:"#A9A9A9"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_21421_19519",children:p.jsx("rect",{width:"62.7591",height:"62.7591",fill:"white",transform:"matrix(0.897148 0.441731 -0.897148 0.441731 63.1714 7.24365)"})})})]}),_nn=e=>p.jsxs("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M11.0313 7.97578C11.0313 9.34436 9.92183 10.4538 8.55324 10.4538C7.18466 10.4538 6.0752 9.34436 6.0752 7.97578C6.0752 6.60719 7.18466 5.49773 8.55324 5.49773C9.92183 5.49773 11.0313 6.60719 11.0313 7.97578ZM11.0313 7.97578H14.573",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"}),p.jsx("path",{d:"M12.967 4.46154C11.9273 3.14431 10.3165 2.29883 8.50814 2.29883C5.37277 2.29883 2.83105 4.84055 2.83105 7.97591C2.83105 11.1113 5.37277 13.653 8.50814 13.653C10.3165 13.653 11.9273 12.8075 12.967 11.4903",stroke:"currentColor",strokeWidth:"1.33333",strokeLinecap:"round"})]}),_pe=e=>p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.97865 4.57004C8.22604 4.75795 8.27426 5.11082 8.08635 5.35821L6.05486 8.03279C5.94873 8.17251 5.78348 8.25471 5.60803 8.25505C5.43257 8.2554 5.267 8.17385 5.16032 8.03454L3.80937 6.27034C3.6205 6.02369 3.66733 5.67063 3.91398 5.48176C4.16063 5.29288 4.51369 5.33972 4.70257 5.58637L5.6051 6.76498L7.19048 4.67774C7.37839 4.43036 7.73126 4.38213 7.97865 4.57004Z",fill:"currentColor"})]}),kpe=e=>p.jsxs("svg",{width:"12",height:"12",viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.99982 2.0625C3.8252 2.0625 2.06232 3.82538 2.06232 6C2.06232 8.17462 3.8252 9.9375 5.99982 9.9375C8.17444 9.9375 9.93732 8.17462 9.93732 6C9.93732 3.82538 8.17444 2.0625 5.99982 2.0625ZM0.937317 6C0.937317 3.20406 3.20388 0.9375 5.99982 0.9375C8.79576 0.9375 11.0623 3.20406 11.0623 6C11.0623 8.79594 8.79576 11.0625 5.99982 11.0625C3.20388 11.0625 0.937317 8.79594 0.937317 6Z",fill:"currentColor"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.89741 4.10293C8.11707 4.32261 8.11706 4.67877 7.89738 4.89843L6.79517 6.00058L7.8962 7.10155C8.11588 7.32122 8.11589 7.67737 7.89623 7.89705C7.67656 8.11673 7.32041 8.11674 7.10073 7.89707L5.99965 6.79605L4.89856 7.89707C4.67889 8.11673 4.32273 8.11672 4.10307 7.89704C3.88341 7.67737 3.88342 7.32121 4.10309 7.10155L5.20413 6.00058L4.10191 4.89843C3.88224 4.67877 3.88223 4.32262 4.10189 4.10294C4.32155 3.88326 4.67771 3.88325 4.89738 4.10292L5.99965 5.20511L7.10191 4.10291C7.32159 3.88325 7.67774 3.88326 7.89741 4.10293Z",fill:"currentColor"})]}),Hi=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M5.1747 3.18598L7.02554 1.95209C7.11557 1.89207 7.31087 1.87106 7.41016 1.90924L12.4139 3.83377C12.4683 3.85467 12.546 3.96798 12.546 4.03118V13.0167C12.546 13.265 12.7473 13.4663 12.9956 13.4663C13.2439 13.4663 13.4452 13.265 13.4452 13.0167V4.03118C13.4452 3.59605 13.1384 3.14906 12.7367 2.99456L7.73293 1.07004C7.36225 0.927472 6.86056 0.981451 6.52679 1.20396L4.20445 2.75219L3.90419 2.95236L3.90647 2.95824C3.69329 3.05449 3.55469 3.27599 3.55469 3.57581V11.7119C3.55469 12.2084 3.93067 12.7499 4.39251 12.9206L9.89804 14.955C10.3608 15.126 10.7359 14.8596 10.7359 14.3659V5.83295C10.7359 5.33662 10.3498 4.81289 9.88389 4.66643L5.1747 3.18598Z",fill:"currentColor"})}),Cpe=e=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("g",{clipPath:"url(#clip0_21999_22095)",children:p.jsx("path",{d:"M7.5 0.75C3.6325 0.75 0.5 3.8825 0.5 7.75C0.5 10.8475 2.50375 13.4637 5.28625 14.3912C5.63625 14.4525 5.7675 14.2425 5.7675 14.0587C5.7675 13.8925 5.75875 13.3412 5.75875 12.755C4 13.0787 3.545 12.3262 3.405 11.9325C3.32625 11.7312 2.985 11.11 2.6875 10.9437C2.4425 10.8125 2.0925 10.4887 2.67875 10.48C3.23 10.4712 3.62375 10.9875 3.755 11.1975C4.385 12.2562 5.39125 11.9587 5.79375 11.775C5.855 11.32 6.03875 11.0137 6.24 10.8387C4.6825 10.6637 3.055 10.06 3.055 7.3825C3.055 6.62125 3.32625 5.99125 3.7725 5.50125C3.7025 5.32625 3.4575 4.60875 3.8425 3.64625C3.8425 3.64625 4.42875 3.4625 5.7675 4.36375C6.3275 4.20625 6.9225 4.1275 7.5175 4.1275C8.1125 4.1275 8.7075 4.20625 9.2675 4.36375C10.6062 3.45375 11.1925 3.64625 11.1925 3.64625C11.5775 4.60875 11.3325 5.32625 11.2625 5.50125C11.7087 5.99125 11.98 6.6125 11.98 7.3825C11.98 10.0687 10.3438 10.6637 8.78625 10.8387C9.04 11.0575 9.25875 11.4775 9.25875 12.1337C9.25875 13.07 9.25 13.8225 9.25 14.0587C9.25 14.2425 9.38125 14.4612 9.73125 14.3912C11.1209 13.9221 12.3284 13.029 13.1839 11.8377C14.0393 10.6463 14.4996 9.21668 14.5 7.75C14.5 3.8825 11.3675 0.75 7.5 0.75Z",fill:"currentColor"})}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_21999_22095",children:p.jsx("rect",{width:"14",height:"14",fill:"currentColor",transform:"translate(0.5 0.75)"})})})]}),knn=e=>p.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsxs("g",{clipPath:"url(#clip0_21999_20513)",children:[p.jsx("path",{d:"M13.5037 7.54867C13.5037 7.1144 13.4648 6.69683 13.3924 6.29596H7.62436V8.66776H10.9204C10.7756 9.43052 10.3413 10.0764 9.68994 10.5106V12.0529H11.6776C12.8356 10.9839 13.5037 9.41382 13.5037 7.54867Z",fill:"white"}),p.jsx("path",{d:"M7.62415 13.5339C9.27773 13.5339 10.6643 12.9882 11.6776 12.0529L9.68994 10.5106C9.14431 10.8781 8.44816 11.1009 7.62415 11.1009C6.03182 11.1009 4.67889 10.0263 4.19451 8.57877H2.15677V10.16C3.1645 12.1587 5.23008 13.5339 7.62415 13.5339Z",fill:"white"}),p.jsx("path",{d:"M4.19472 8.57315C4.07223 8.20569 3.99985 7.81595 3.99985 7.40952C3.99985 7.00308 4.07223 6.61335 4.19472 6.24589V4.66469H2.15698C1.73941 5.4887 1.5 6.41849 1.5 7.40952C1.5 8.40055 1.73941 9.33034 2.15698 10.1543L3.74374 8.91834L4.19472 8.57315Z",fill:"white"}),p.jsx("path",{d:"M7.62415 3.72376C8.5261 3.72376 9.32783 4.03555 9.96811 4.63685L11.7219 2.88306C10.6585 1.89202 9.27773 1.28516 7.62415 1.28516C5.23008 1.28516 3.16471 2.66036 2.15698 4.66469L4.19472 6.24589C4.6791 4.79832 6.03182 3.72376 7.62415 3.72376Z",fill:"white"})]}),p.jsx("defs",{children:p.jsx("clipPath",{id:"clip0_21999_20513",children:p.jsx("rect",{width:"12.2487",height:"12.2487",fill:"white",transform:"translate(1.375 1.28516)"})})})]}),Cnn=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M3.8674 9.19968L4.14554 10.8649C4.23965 11.4283 4.75254 11.8237 5.32137 11.7713L5.58252 11.7472C6.56555 11.6567 7.43309 12.3868 7.51181 13.3708L7.59308 14.3867C7.60422 14.5259 7.71868 14.6342 7.85825 14.6376L9.91053 14.6876C10.1066 14.6924 10.2434 14.4948 10.17 14.3129L8.90452 11.1782C8.80956 10.9429 8.65085 10.7389 8.44626 10.5889L7.90134 10.1895C7.70604 10.0464 7.55223 9.85411 7.45759 9.63124C7.15011 8.90712 6.6579 7.71234 6.37054 6.88944C6.19204 6.3783 5.79931 6.29158 5.45492 6.21553C4.98179 6.11106 4.5999 6.02673 4.99001 4.88985C5.66408 2.92541 8.06015 2.07904 10.6601 3.33088C12.6488 4.2884 13.1187 6.35416 13.0328 7.58237C13.0297 7.62768 13.0214 7.67186 13.0094 7.71566C12.8829 8.17534 12.368 8.40491 11.9415 8.19169L10.3022 7.37201C10.2069 7.32439 10.0927 7.33657 10.0096 7.40322L8.64809 8.49559C8.55405 8.57104 8.52072 8.69931 8.56615 8.811L10.8995 14.5478C10.9404 14.6483 11.0369 14.715 11.1454 14.7177L12.0572 14.7399C12.2581 14.7448 12.3951 14.5382 12.3124 14.3551L11.8681 13.3706C11.4211 12.3803 11.6047 11.2192 12.3354 10.4151L13.4616 9.17575C13.7473 8.86125 13.9224 8.46187 13.9599 8.03858L13.9763 7.85359C14.2866 4.35298 11.377 1.41272 7.87336 1.68639C6.03919 1.82965 4.45399 3.02228 3.80807 4.74492L3.70275 5.02579C3.5828 5.34571 3.62741 5.70411 3.82213 5.98485L3.88946 6.08192C4.12183 6.41695 4.0958 6.86726 3.82637 7.17328L3.06705 8.03572C2.96261 8.15435 2.98058 8.33664 3.10617 8.43259L3.66059 8.85617C3.77064 8.94026 3.84458 9.06307 3.8674 9.19968Z",fill:"currentColor"})}),Tnn=e=>p.jsx("svg",{width:"12",height:"13",viewBox:"0 0 12 13",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M10.1266 5.67745C10.3409 5.0225 10.2695 4.2961 9.92413 3.70069C9.40017 2.78376 8.34034 2.31934 7.30433 2.53369C6.85182 2.02164 6.18496 1.73584 5.49428 1.73584C4.43445 1.73584 3.50561 2.41461 3.17218 3.4149C2.49342 3.55779 1.90992 3.97458 1.56458 4.5819C1.04062 5.49883 1.1597 6.64202 1.86228 7.42796C1.64793 8.09482 1.73129 8.80931 2.07663 9.40472C2.60059 10.3217 3.66042 10.798 4.69643 10.5717C5.16085 11.0838 5.8158 11.3815 6.50648 11.3815C7.56631 11.3815 8.49515 10.7027 8.82858 9.70243C9.50735 9.55953 10.0908 9.14274 10.4362 8.53542C10.9601 7.61849 10.8411 6.46339 10.1266 5.67745ZM6.50648 10.7503C6.07778 10.7503 5.67291 10.6074 5.35138 10.3336C5.36329 10.3217 5.39902 10.3097 5.41093 10.2978L7.32815 9.19037C7.42341 9.13083 7.48295 9.03557 7.48295 8.91648V6.21332L8.29271 6.67774C8.30462 6.67774 8.30462 6.68965 8.30462 6.70156V8.9403C8.31653 9.94059 7.50677 10.7503 6.50648 10.7503ZM2.62441 9.09511C2.41006 8.72595 2.33861 8.29726 2.41006 7.88047C2.42197 7.89238 2.44578 7.90429 2.4696 7.91619L4.38682 9.02366C4.48209 9.0832 4.60117 9.0832 4.69643 9.02366L7.04235 7.66612V8.60687C7.04235 8.61878 7.04235 8.63069 7.03044 8.63069L5.0894 9.75006C4.23201 10.2502 3.12455 9.9525 2.62441 9.09511ZM2.12426 4.90342C2.33861 4.53427 2.67204 4.26038 3.06501 4.10557V6.39195C3.06501 6.49912 3.12455 6.60629 3.21982 6.66583L5.56573 8.02337L4.75597 8.48779C4.74407 8.48779 4.73216 8.4997 4.73216 8.48779L2.79112 7.36842C1.90992 6.86827 1.62412 5.76081 2.12426 4.90342ZM8.79285 6.45149L6.44694 5.09395L7.2567 4.62953C7.2686 4.62953 7.28051 4.61762 7.28051 4.62953L9.22155 5.7489C10.0908 6.24905 10.3766 7.35651 9.8765 8.2139C9.66215 8.58305 9.32872 8.85694 8.93575 8.99984V6.72538C8.94766 6.6182 8.88812 6.51103 8.79285 6.45149ZM9.5907 5.23685C9.5788 5.22494 9.55498 5.21303 9.53116 5.20113L7.61394 4.09366C7.51868 4.03412 7.39959 4.03412 7.30433 4.09366L4.95841 5.4512V4.51045C4.95841 4.49854 4.95841 4.48663 4.97032 4.48663L6.91136 3.36726C7.78066 2.86712 8.87621 3.16482 9.37636 4.03412C9.5907 4.39137 9.66215 4.82006 9.5907 5.23685ZM4.51781 6.904L3.70805 6.43958C3.69615 6.43958 3.69615 6.42767 3.69615 6.41576V4.17702C3.69615 3.17673 4.5059 2.36697 5.50619 2.36697C5.93489 2.36697 6.33977 2.50987 6.66129 2.78376C6.64938 2.79567 6.62556 2.80758 6.60175 2.81949L4.68453 3.92695C4.58926 3.98649 4.52972 4.08176 4.52972 4.20084V6.904H4.51781ZM4.95841 5.95134L6.00634 5.34402L7.05426 5.95134V7.15407L6.00634 7.76139L4.95841 7.15407V5.95134Z",fill:"currentColor"})}),Tpe=e=>p.jsx("svg",{width:"17",height:"18",viewBox:"0 0 17 18",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.40864 11.9983C7.58064 11.9733 6.84164 11.6153 6.31564 11.0563C6.31464 11.0563 6.31464 11.0553 6.31464 11.0553C5.78864 10.4963 5.47564 9.73633 5.50064 8.90833C5.52564 8.08033 5.88464 7.34133 6.44364 6.81533C7.00264 6.28833 7.76264 5.97633 8.59064 6.00133C9.41864 6.02633 10.1576 6.38433 10.6836 6.94333H10.6846C11.2106 7.50333 11.5236 8.26233 11.4986 9.09033C11.4726 9.91833 11.1146 10.6583 10.5556 11.1843C9.99664 11.7103 9.23664 12.0233 8.40864 11.9983ZM16.1266 8.15033L14.3606 7.74033C14.2316 7.14133 14.0146 6.57633 13.7216 6.05733L14.7726 4.57933C14.9116 4.38533 14.8926 4.12033 14.7296 3.94633L13.9206 3.08733C13.7576 2.91333 13.4946 2.87933 13.2916 3.00533L11.7526 3.96533C11.2526 3.64133 10.7016 3.39033 10.1116 3.22633L9.80964 1.43833C9.76964 1.20333 9.56964 1.02833 9.33164 1.02133L8.15264 0.985326C7.91364 0.978326 7.70364 1.14033 7.64964 1.37233L7.24064 3.13933C6.64164 3.26733 6.07664 3.48433 5.55664 3.77733L4.07864 2.72633C3.88464 2.58833 3.61964 2.60633 3.44664 2.76933L2.58664 3.57833C2.41364 3.74133 2.37964 4.00533 2.50564 4.20733L3.46564 5.74633C3.14164 6.24633 2.89064 6.79833 2.72564 7.38833L0.937635 7.68933C0.702635 7.72933 0.528635 7.92933 0.520635 8.16733L0.485635 9.34733C0.477635 9.58533 0.639635 9.79533 0.872635 9.84933L2.63864 10.2583C2.76764 10.8573 2.98464 11.4233 3.27764 11.9423L2.22564 13.4203C2.08764 13.6143 2.10564 13.8793 2.26964 14.0523L3.07864 14.9123C3.24164 15.0853 3.50464 15.1203 3.70664 14.9933L5.24564 14.0333C5.74663 14.3583 6.29764 14.6093 6.88764 14.7733L7.18964 16.5613C7.22864 16.7963 7.42864 16.9713 7.66764 16.9783L8.84663 17.0143C9.08564 17.0213 9.29564 16.8593 9.34964 16.6273L9.75864 14.8603C10.3576 14.7323 10.9226 14.5153 11.4416 14.2213L12.9206 15.2733C13.1146 15.4113 13.3786 15.3933 13.5526 15.2293L14.4116 14.4213C14.5856 14.2573 14.6196 13.9943 14.4936 13.7923L13.5336 12.2533C13.8576 11.7523 14.1086 11.2013 14.2726 10.6113L16.0616 10.3103C16.2966 10.2703 16.4706 10.0703 16.4776 9.83233L16.5136 8.65233C16.5206 8.41433 16.3586 8.20433 16.1266 8.15033Z",fill:"currentColor"})}),Ann=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M5.25684 12.6387L10.4003 3.36133H11.7432L6.5997 12.6387H5.25684Z",fill:"currentColor"})}),Wc=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.5605 1.42351C8.0791 0.904904 8.92215 0.906157 9.4395 1.42351L10.6922 2.67617C11.2108 3.19477 11.2095 4.03782 10.6922 4.55517L9.4395 5.80783C8.9209 6.32643 8.07785 6.32518 7.5605 5.80783L6.30784 4.55517C5.78923 4.03656 5.79049 3.19352 6.30784 2.67617L7.5605 1.42351ZM3.17618 5.80783C3.69478 5.28923 4.53782 5.29048 5.05517 5.80783L6.30784 7.0605C6.82644 7.5791 6.82519 8.42214 6.30784 8.93949L5.05517 10.1922C4.53657 10.7108 3.69353 10.7095 3.17618 10.1922L1.92351 8.93949C1.40491 8.42089 1.40616 7.57785 1.92351 7.0605L3.17618 5.80783ZM11.9448 5.80783C12.4634 5.28923 13.3065 5.29048 13.8238 5.80783L15.0765 7.0605C15.5951 7.5791 15.5938 8.42214 15.0765 8.93949L13.8238 10.1922C13.3052 10.7108 12.4622 10.7095 11.9448 10.1922L10.6922 8.93949C10.1736 8.42089 10.1748 7.57785 10.6922 7.0605L11.9448 5.80783ZM7.5605 10.1922C8.0791 9.67355 8.92215 9.67481 9.4395 10.1922L10.6922 11.4448C11.2108 11.9634 11.2095 12.8065 10.6922 13.3238L9.4395 14.5765C8.9209 15.0951 8.07785 15.0938 7.5605 14.5765L6.30784 13.3238C5.78923 12.8052 5.79049 11.9622 6.30784 11.4448L7.5605 10.1922Z",fill:"currentColor"})}),a_=e=>p.jsx(iNt,{...e}),Xc=e=>p.jsx("svg",{width:"17",height:"16",viewBox:"0 0 17 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M6.24388 2.4018C6.24388 2.0394 6.53767 1.74561 6.90008 1.74561H10.0991C10.4614 1.74561 10.7553 2.0394 10.7553 2.4018V4.57546C10.7553 4.93787 10.4614 5.23166 10.0991 5.23166H9.31982V7.35469L10.0033 9.22664C9.90442 9.20146 9.80035 9.1761 9.6915 9.14986L9.62652 9.13422C9.30473 9.05687 8.92256 8.96501 8.61993 8.84491C8.5819 8.82981 8.54147 8.81292 8.49957 8.79391C8.45767 8.81292 8.41724 8.82981 8.3792 8.84491C8.07657 8.96501 7.6944 9.05687 7.37261 9.13422L7.30763 9.14986C7.19879 9.1761 7.09471 9.20146 6.99577 9.22664L7.67932 7.35469V5.23166H6.90008C6.53767 5.23166 6.24388 4.93787 6.24388 4.57546V2.4018ZM6.99577 9.22664C6.99577 9.22664 6.99578 9.22664 6.99577 9.22664L6.43283 10.7683H6.81806C7.18047 10.7683 7.47426 11.0622 7.47426 11.4245V13.5982C7.47426 13.9606 7.18047 14.2544 6.81806 14.2544H3.61909C3.25668 14.2544 2.96289 13.9606 2.96289 13.5982V11.4245C2.96289 11.0622 3.25668 10.7683 3.61909 10.7683H4.26617C4.2921 10.4663 4.32783 10.1494 4.37744 9.85171C4.43762 9.49063 4.52982 9.08135 4.68998 8.76102C4.93975 8.2615 5.44743 8.01751 5.7771 7.88788C6.14684 7.74249 6.57537 7.63889 6.92317 7.55505C7.24707 7.47696 7.49576 7.41679 7.67932 7.35469L6.99577 9.22664ZM6.43283 10.7683L6.99577 9.22664C6.75846 9.28705 6.55067 9.34646 6.37745 9.41458C6.22784 9.47341 6.1623 9.51712 6.14023 9.53254C6.09752 9.63631 6.04409 9.83055 5.99562 10.1214C5.96201 10.3231 5.93498 10.5439 5.91341 10.7683H6.43283ZM10.0033 9.22664L9.31982 7.35469C9.50338 7.41679 9.75206 7.47696 10.076 7.55505C10.4238 7.63889 10.8523 7.74249 11.2221 7.88788C11.5517 8.01751 12.0594 8.2615 12.3091 8.76102C12.4693 9.08135 12.5615 9.49063 12.6217 9.85171C12.6713 10.1494 12.707 10.4663 12.733 10.7683H13.38C13.7424 10.7683 14.0362 11.0622 14.0362 11.4245V13.5982C14.0362 13.9606 13.7424 14.2544 13.38 14.2544H10.1811C9.81867 14.2544 9.52488 13.9606 9.52488 13.5982V11.4245C9.52488 11.0622 9.81867 10.7683 10.1811 10.7683H10.5663L10.0033 9.22664ZM10.0033 9.22664L10.5663 10.7683H11.0857C11.0642 10.5439 11.0372 10.3231 11.0035 10.1214C10.9551 9.83055 10.9016 9.63631 10.8589 9.53254C10.8369 9.51712 10.7713 9.47341 10.6217 9.41458C10.4485 9.34646 10.2407 9.28705 10.0033 9.22664Z",fill:"currentColor"})}),Dnn=e=>p.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636V49.8363C6.67773 65.0322 31.894 77.351 62.9998 77.351C94.1055 77.351 119.322 65.0322 119.322 49.8363V35.1636Z",fill:"#2E2E2E",fillOpacity:"0.9"}),p.jsx("path",{d:"M119.322 35.1636C119.322 50.3595 94.1055 62.6782 62.9998 62.6782C31.894 62.6782 6.67773 50.3595 6.67773 35.1636M119.322 35.1636C119.322 19.9677 94.1055 7.64893 62.9998 7.64893C31.894 7.64893 6.67773 19.9677 6.67773 35.1636M119.322 35.1636V49.8363C119.322 65.0322 94.1055 77.351 62.9998 77.351C31.894 77.351 6.67773 65.0322 6.67773 49.8363V35.1636",stroke:"#424242"}),p.jsx("path",{d:"M63.0002 0.968262C28.5152 0.968262 0.55957 15.6484 0.55957 33.7573V51.2428C0.55957 69.3517 28.5152 84.0319 63.0002 84.0319C97.4853 84.0319 125.441 69.3517 125.441 51.2428V33.7573C125.441 15.6484 97.4853 0.968262 63.0002 0.968262Z",stroke:"#707070"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M74.9374 21.357C76.2127 20.7291 78.2804 20.7291 79.5557 21.357L90.8129 26.8997C92.0882 27.5276 92.0882 28.5458 90.8129 29.1737L83.1638 32.9399C81.8885 33.5678 79.8207 33.5678 78.5454 32.9399L75.8033 31.5898L68.3324 35.2682L64.1502 39.696C63.8908 39.481 63.6138 39.2568 63.3231 39.0227L63.1495 38.883C62.2893 38.1914 61.2677 37.3701 60.6254 36.6376C60.5446 36.5456 60.4618 36.4463 60.3812 36.3407C60.1669 36.3011 59.9652 36.2603 59.7782 36.2205C58.2906 35.9043 56.6225 35.4013 55.2179 34.9777L54.9342 34.8922C54.4589 34.7491 54.0034 34.6127 53.5666 34.4849L62.5594 32.4258L70.0304 28.7473L67.2882 27.3972C66.0129 26.7692 66.0129 25.7512 67.2882 25.1232L74.9374 21.357ZM53.5666 34.4849C53.5666 34.4849 53.5666 34.4849 53.5666 34.4849L46.1603 36.1808L47.516 36.8483C48.7913 37.4762 48.7912 38.4943 47.516 39.1222L39.8668 42.8884C38.5916 43.5163 36.5238 43.5164 35.2485 42.8884L23.9913 37.3457C22.7159 36.7177 22.716 35.6996 23.9913 35.0717L31.6404 31.3055C32.9156 30.6776 34.9834 30.6776 36.2587 31.3055L38.5358 32.4267C39.6899 31.9483 40.9309 31.4611 42.153 31.0313C43.6354 30.5099 45.4001 29.9605 47.091 29.683C49.7278 29.2502 52.3729 29.7072 53.9892 30.0537C55.8019 30.4425 57.6745 31.0055 59.1934 31.4628C60.6081 31.8887 61.6949 32.2154 62.5594 32.4258L53.5666 34.4849ZM46.1603 36.1808L53.5666 34.4849C52.5189 34.1784 51.5786 33.9213 50.7293 33.7392C49.9958 33.5819 49.6114 33.5441 49.4794 33.5326C48.964 33.6384 48.0924 33.8823 46.8983 34.3023C46.0703 34.5936 45.1981 34.9293 44.3325 35.2808L46.1603 36.1808ZM64.1502 39.696L68.3324 35.2682C68.7598 35.6939 69.4232 36.229 70.2883 36.9256C71.2171 37.6735 72.3605 38.5954 73.15 39.488C73.8539 40.2838 74.7818 41.5862 73.9029 42.8844C73.3394 43.717 72.2235 44.5859 71.1648 45.3159C70.2916 45.9175 69.3021 46.5286 68.3305 47.0968L70.6077 48.218C71.8829 48.8459 71.8829 49.864 70.6077 50.4919L62.9585 54.2582C61.6833 54.8861 59.6154 54.8861 58.3402 54.2582L47.083 48.7154C45.8077 48.0875 45.8077 47.0694 47.083 46.4415L54.7321 42.6752C56.0074 42.0474 58.0751 42.0473 59.3505 42.6752L60.7062 43.3428L64.1502 39.696ZM64.1502 39.696L60.7062 43.3428L62.5339 44.2427C63.2478 43.8165 63.9298 43.3871 64.5213 42.9794C65.3742 42.3914 65.8695 41.9622 66.0846 41.7085C66.0613 41.6436 65.9844 41.4543 65.6649 41.0931C65.295 40.6749 64.773 40.212 64.1502 39.696Z",fill:"#A9A9A9"})]}),Og=e=>p.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M6.53918 9.32122C6.34324 9.51508 6.02724 9.51338 5.83338 9.31744C5.63952 9.1215 5.6412 8.80551 5.83713 8.61164L10.1958 4.29931C10.7996 3.70186 10.8017 2.72852 10.2041 2.12839L10.1899 2.11428C9.58767 1.52481 8.62251 1.53208 8.0292 2.13052L2.29396 7.91536C2.0999 8.1111 1.78388 8.11246 1.58813 7.9184C1.39239 7.72433 1.39103 7.40831 1.58509 7.21257L7.32036 1.42774C8.30005 0.439581 9.89369 0.427613 10.8881 1.40094L10.9116 1.42425C11.4942 2.00929 11.7316 2.80913 11.6232 3.56922C12.389 3.44866 13.1999 3.67918 13.7961 4.26273C14.804 5.24929 14.8147 6.86824 13.82 7.86808L8.5531 13.1619C8.50045 13.2148 8.50024 13.3002 8.55263 13.3534L9.65448 14.4717C9.84794 14.668 9.8456 14.984 9.64925 15.1775C9.45291 15.3709 9.13691 15.3686 8.94345 15.1723L7.84163 14.054C7.40505 13.6109 7.40677 12.8988 7.8455 12.4579L13.1124 7.16405C13.7161 6.55727 13.7095 5.57478 13.0979 4.97606C12.4925 4.38347 11.4942 4.40725 10.8978 5.00886L6.53918 9.32122Z",fill:"currentColor"}),p.jsx("path",{d:"M8.84622 2.75411C9.04697 2.56188 9.36555 2.56381 9.56395 2.76076C9.76234 2.95771 9.76658 3.27625 9.57582 3.4784L9.56661 3.48794L5.25912 7.82701C4.67023 8.42022 4.672 9.37798 5.26305 9.96904C5.85624 10.5622 6.81818 10.5615 7.41052 9.9675L11.6299 5.73599L11.6395 5.72671C11.8406 5.53493 12.1592 5.53756 12.3572 5.73496C12.5583 5.93548 12.5587 6.26104 12.3582 6.46214L8.13877 10.6937C7.14498 11.6903 5.53105 11.6915 4.53584 10.6963C3.5442 9.70461 3.54127 8.09774 4.52928 7.10248L8.83677 2.76342L8.84622 2.75411Z",fill:"currentColor"})]}),Inn=e=>p.jsx("svg",{width:"16",height:"16",viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:p.jsx("path",{d:"M1.5 8.5V8C1.5 7.60218 1.65804 7.22064 1.93934 6.93934C2.22064 6.65804 2.60218 6.5 3 6.5H13C13.3978 6.5 13.7794 6.65804 14.0607 6.93934C14.342 7.22064 14.5 7.60218 14.5 8V8.5M8.70667 4.20667L7.29333 2.79333C7.20048 2.70037 7.09022 2.62661 6.96886 2.57628C6.84749 2.52595 6.71739 2.50003 6.586 2.5H3C2.60218 2.5 2.22064 2.65804 1.93934 2.93934C1.65804 3.22064 1.5 3.60218 1.5 4V12C1.5 12.3978 1.65804 12.7794 1.93934 13.0607C2.22064 13.342 2.60218 13.5 3 13.5H13C13.3978 13.5 13.7794 13.342 14.0607 13.0607C14.342 12.7794 14.5 12.3978 14.5 12V6C14.5 5.60218 14.342 5.22064 14.0607 4.93934C13.7794 4.65804 13.3978 4.5 13 4.5H9.414C9.14887 4.49977 8.89402 4.39426 8.70667 4.20667Z",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})}),Nnn=e=>p.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),p.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),p.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),p.jsx("path",{d:"M51.5215 39.9726C50.5464 40.4477 48.9738 40.4435 48.009 39.9634C47.0442 39.4833 47.0526 38.709 48.0277 38.2339L69.7191 27.6672C72.7243 26.2032 72.7347 23.8181 69.7605 22.3476L69.6898 22.313C66.6927 20.8686 61.8895 20.8864 58.9368 22.3528L30.3946 36.5278C29.4288 37.0074 27.8561 37.0107 26.882 36.5352C25.9078 36.0597 25.901 35.2853 26.8668 34.8057L55.4092 20.6308C60.2847 18.2094 68.2157 18.1801 73.1645 20.5651L73.2814 20.6222C76.1808 22.0558 77.3624 24.0157 76.8227 25.8782C80.6339 25.5828 84.6694 26.1476 87.6364 27.5775C92.6525 29.9949 92.7059 33.962 87.7554 36.4119L61.5441 49.3836C61.282 49.5133 61.281 49.7227 61.5417 49.853L67.0252 52.5932C67.988 53.0743 67.9763 53.8486 66.9992 54.3226C66.0221 54.7966 64.4495 54.7909 63.4867 54.3098L58.0033 51.5695C55.8306 50.4838 55.8392 48.7391 58.0226 47.6585L84.2339 34.6868C87.2382 33.2 87.2058 30.7925 84.1617 29.3254C81.1488 27.8734 76.1811 27.9317 73.2127 29.4058L51.5215 39.9726Z",fill:"#A9A9A9"}),p.jsx("path",{d:"M63.0028 23.8809C64.0019 23.4098 65.5873 23.4146 66.5747 23.8972C67.562 24.3798 67.5831 25.1603 66.6338 25.6556L66.5879 25.679L45.1511 36.3113C42.2204 37.7649 42.2292 40.1117 45.1707 41.56C48.1228 43.0135 52.91 43.0118 55.8578 41.5563L76.8564 31.1875L76.9037 31.1648C77.9049 30.6949 79.4903 30.7013 80.4755 31.185C81.4763 31.6764 81.4785 32.4741 80.4806 32.9669L59.4821 43.3356C54.5363 45.7777 46.5044 45.7806 41.5516 43.342C36.6166 40.9121 36.602 36.9747 41.519 34.5359L62.9558 23.9037L63.0028 23.8809Z",fill:"#A9A9A9"})]}),Rnn=e=>p.jsxs("svg",{width:"126",height:"85",viewBox:"0 0 126 85",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641V49.8368C6.67773 65.0327 31.894 77.3514 62.9998 77.3514C94.1055 77.3514 119.322 65.0327 119.322 49.8368V35.1641Z",fill:"#2E2E2E",fillOpacity:"0.9"}),p.jsx("path",{d:"M119.322 35.1641C119.322 50.36 94.1055 62.6787 62.9998 62.6787C31.894 62.6787 6.67773 50.36 6.67773 35.1641M119.322 35.1641C119.322 19.9681 94.1055 7.64941 62.9998 7.64941C31.894 7.64941 6.67773 19.9681 6.67773 35.1641M119.322 35.1641V49.8368C119.322 65.0327 94.1055 77.3514 62.9998 77.3514C31.894 77.3514 6.67773 65.0327 6.67773 49.8368V35.1641",stroke:"#424242"}),p.jsx("path",{d:"M63.0002 0.96875C28.5152 0.96875 0.55957 15.6489 0.55957 33.7578V51.2433C0.55957 69.3522 28.5152 84.0323 63.0002 84.0323C97.4853 84.0323 125.441 69.3522 125.441 51.2433V33.7578C125.441 15.6489 97.4853 0.96875 63.0002 0.96875Z",stroke:"#707070"}),p.jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M95.8997 32.6647C98.4806 33.9355 98.4744 36.0012 95.8997 37.2689L89.6657 40.3384C87.0848 41.6091 82.8892 41.6061 80.3146 40.3384L74.0805 37.2689C71.4996 35.9981 71.5059 33.9324 74.0805 32.6647L80.3146 29.5952C82.8955 28.3244 87.091 28.3275 89.6657 29.5952L95.8997 32.6647ZM74.0805 21.9215C76.6614 23.1923 76.6552 25.258 74.0805 26.5257L67.8465 29.5952C65.2656 30.866 61.0701 30.8629 58.4954 29.5952L52.2613 26.5257C49.6804 25.255 49.6867 23.1892 52.2613 21.9215L58.4954 18.852C61.0763 17.5813 65.2718 17.5843 67.8465 18.852L74.0805 21.9215ZM74.0805 43.4079C76.6614 44.6786 76.6552 46.7444 74.0805 48.0121L67.8465 51.0816C65.2656 52.3523 61.0701 52.3493 58.4954 51.0816L52.2613 48.0121C49.6804 46.7413 49.6867 44.6756 52.2613 43.4079L58.4954 40.3384C61.0763 39.0676 65.2718 39.0707 67.8465 40.3384L74.0805 43.4079ZM52.2613 32.6647C54.8422 33.9355 54.836 36.0012 52.2613 37.2689L46.0273 40.3384C43.4464 41.6091 39.2509 41.6061 36.6762 40.3384L30.4422 37.2689C27.8613 35.9981 27.8675 33.9324 30.4422 32.6647L36.6762 29.5952C39.2571 28.3244 43.4526 28.3275 46.0273 29.5952L52.2613 32.6647Z",fill:"#A9A9A9"})]});function sO(e){return p.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",xmlns:"http://www.w3.org/2000/svg",...e,children:[p.jsx("rect",{width:"16",height:"16",x:"4",y:"4",rx:"2"}),p.jsx("rect",{width:"6",height:"6",x:"9",y:"9",rx:"1"}),p.jsx("path",{d:"M15 2v2"}),p.jsx("path",{d:"M15 20v2"}),p.jsx("path",{d:"M2 15h2"}),p.jsx("path",{d:"M2 9h2"}),p.jsx("path",{d:"M20 15h2"}),p.jsx("path",{d:"M20 9h2"}),p.jsx("path",{d:"M9 2v2"}),p.jsx("path",{d:"M9 20v2"})]})}const Pnn={warning:"bg-accent6Darker border-accent6/30 text-accent6",destructive:"bg-accent2Darker border-accent2/30 text-accent2",info:"bg-accent5Darker border-accent5/30 text-accent5"},$nn={warning:gv,destructive:cb,info:Cc},og=({children:e,variant:t="destructive",className:r})=>{const n=$nn[t];return p.jsx("div",{className:ne(Pnn[t],"p-3 rounded-md border shadow-sm",Wr.all,"animate-in fade-in-0 slide-in-from-top-2 duration-200",r),children:p.jsxs("div",{className:"flex items-start gap-2",children:[p.jsx(qe,{className:"mt-0.5 flex-shrink-0",children:p.jsx(n,{})}),p.jsx("div",{className:"text-neutral4",children:e})]})})},Sb=({children:e,as:t="h5"})=>p.jsx(it,{as:t,variant:"ui-md",className:"font-semibold",children:e}),Mx=({children:e,as:t="p"})=>p.jsx(it,{as:t,variant:"ui-sm",children:e}),Mnn={default:"text-neutral3 bg-surface4",success:"text-accent1 bg-accent1Dark",error:"text-accent2 bg-accent2Dark",info:"text-accent5 bg-accent5Dark",warning:"text-accent6 bg-accent6Dark"},jnn={default:"text-neutral3",success:"text-accent1",error:"text-accent2",info:"text-accent5",warning:"text-accent6"},ur=({icon:e,variant:t="default",className:r,children:n,...a})=>p.jsxs("div",{className:ne("font-mono text-ui-sm gap-1 h-badge-default inline-flex items-center rounded-full border border-border1 shrink-0",Wr.colors,e?"pl-2 pr-2.5":"px-2.5",t==="default"&&e?"bg-surface4 text-neutral5":Mnn[t],r),...a,children:[e&&p.jsx("span",{className:jnn[t],children:p.jsx(qe,{children:e})}),n]}),Lnn=()=>{const e=Hn(({part:s})=>s),[t,r]=_.useState(!1),n=e.text||"",a=e.metadata||{};if(a?.status==="tripwire")return p.jsx(Onn,{reason:n,tripwire:a.tripwire});if(a?.status==="warning")return p.jsxs(og,{variant:"warning",children:[p.jsx(Sb,{as:"h5",children:"Warning"}),p.jsx(Mx,{as:"p",children:n})]});if(a?.status==="error")return p.jsxs(og,{variant:"destructive",children:[p.jsx(Sb,{as:"h5",children:"Error"}),p.jsx(Mx,{as:"p",children:n})]});if(a?.mode==="network"&&a?.completionResult)return p.jsxs("div",{className:"mb-2 space-y-2",children:[p.jsxs("button",{onClick:()=>r(s=>!s),className:"flex items-center gap-2",children:[p.jsx(qe,{children:p.jsx(EO,{className:ne("transition-all",t?"rotate-90":"rotate-180")})}),p.jsxs(ur,{variant:"info",icon:p.jsx($At,{}),children:[t?"Show":"Hide"," completion check"]})]}),!t&&p.jsxs(og,{variant:"info",children:[p.jsx(Sb,{as:"h5",children:a.completionResult?.passed?"Complete":"Not Complete"}),p.jsx(pMe,{})]})]});try{const s=n.trim();if(s.startsWith("__ERROR__:")){const i=s.substring(10);return p.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[p.jsx(cb,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),p.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:i})]})]})}else if(s.startsWith("Error:")){const i=s.substring(6).trim();return p.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[p.jsx(cb,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),p.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:i})]})]})}return p.jsx(pMe,{})}catch{return p.jsxs("div",{className:"flex items-start gap-3 p-4 rounded-lg bg-red-50 dark:bg-red-950/20 border border-red-200 dark:border-red-900/50",children:[p.jsx(cb,{className:"w-5 h-5 text-red-500 dark:text-red-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1",children:[p.jsx("p",{className:"text-sm font-medium text-red-800 dark:text-red-200 mb-1",children:"Error"}),p.jsx("p",{className:"text-sm text-red-700 dark:text-red-300",children:String(n)})]})]})}},Mp="mastra_workspace",yj={FILESYSTEM:{READ_FILE:`${Mp}_read_file`,WRITE_FILE:`${Mp}_write_file`,EDIT_FILE:`${Mp}_edit_file`,LIST_FILES:`${Mp}_list_files`,DELETE:`${Mp}_delete`,FILE_STAT:`${Mp}_file_stat`,MKDIR:`${Mp}_mkdir`},SANDBOX:{EXECUTE_COMMAND:`${Mp}_execute_command`},SEARCH:{SEARCH:`${Mp}_search`,INDEX:`${Mp}_index`}},Fnn={duration:5e3,cancel:{label:p.jsx(qe,{children:p.jsx(rl,{})}),onClick:()=>{}},unstyled:!0,classNames:{toast:"bg-surface3 w-full h-auto rounded-lg gap-2 border border-border1 px-3 py-2 flex items-center justify-between pointer-events-auto shadow-card [&>[data-content]]:flex-1",title:"text-xs font-medium text-neutral5",description:"text-xs text-neutral3",cancelButton:"!bg-transparent hover:!bg-surface2 !border-none !rounded-md !p-1.5 !m-0 !text-neutral3 hover:!text-neutral6 shrink-0 transition-all",actionButton:"!bg-white flex items-center justify-center font-medium !text-black order-last hover:opacity-80"}};function qu(e){const{classNames:t,...r}=Fnn,{classNames:n,...a}=e||{};return{...r,classNames:{...t,title:ne(t?.title,n?.title),toast:ne(t?.toast,n?.toast),cancelButton:ne(t?.cancelButton,n?.cancelButton),actionButton:ne(t?.actionButton,n?.actionButton),description:ne(t?.description,n?.description)},...a}}const fr=(e,t={})=>{if(Array.isArray(e))return e.forEach(r=>$c(r,qu(t)));if(we.isValidElement(e))return $c(e,qu(t));if(typeof e=="string")return $c(e,qu(t));throw new Error("Invalid message type")};fr.success=(e,t={})=>{const r={...t,icon:p.jsx(qe,{className:"text-accent1 shrink-0",children:p.jsx(k7e,{})}),classNames:{...t.classNames,toast:ne("bg-accent1Darker border-accent1/30 border-l-[3px] border-l-accent1",t.classNames?.toast),title:ne("text-xs text-neutral5",t.classNames?.title),description:ne("text-xs text-neutral4",t.classNames?.description)}};switch(typeof e){case"string":return $c.success(e,qu(r));case"object":return e.forEach(n=>$c.success(n,qu(r)))}};fr.error=(e,t={})=>{const r={...t,icon:p.jsx(qe,{className:"text-accent2 shrink-0",children:p.jsx(lL,{})}),classNames:{...t.classNames,toast:ne("bg-accent2Darker border-accent2/30 border-l-[3px] border-l-accent2",t.classNames?.toast),title:ne("text-xs text-neutral5",t.classNames?.title),description:ne("text-xs text-neutral4",t.classNames?.description)}};switch(typeof e){case"string":return $c.error(e,qu(r));case"object":return e.forEach(n=>$c.error(n,qu(r)))}};fr.warning=(e,t={})=>{const r={...t,icon:p.jsx(qe,{className:"text-accent6 shrink-0",children:p.jsx(cb,{})}),classNames:{...t.classNames,toast:ne("bg-accent6Darker border-accent6/30 border-l-[3px] border-l-accent6",t.classNames?.toast),title:ne("text-xs text-neutral5",t.classNames?.title),description:ne("text-xs text-neutral4",t.classNames?.description)}};switch(typeof e){case"string":return $c.warning(e,qu(r));case"object":return e.forEach(n=>$c.warning(n,qu(r)))}};fr.info=(e,t={})=>{const r={...t,icon:p.jsx(qe,{className:"text-accent3 shrink-0",children:p.jsx(Cc,{})}),classNames:{...t.classNames,toast:ne("bg-accent3Darker border-accent3/30 border-l-[3px] border-l-accent3",t.classNames?.toast),title:ne("text-xs text-neutral5",t.classNames?.title),description:ne("text-xs text-neutral4",t.classNames?.description)}};switch(typeof e){case"string":return $c.info(e,qu(r));case"object":return e.forEach(n=>$c.info(n,qu(r)))}};fr.custom=(e,t={})=>$c(e,qu(t));fr.dismiss=e=>{e&&$c.dismiss(e)};fr.promise=({myPromise:e,loadingMessage:t,successMessage:r,errorMessage:n,onSuccess:a,onError:s,options:i={}})=>$c.promise(e,{loading:t??"Loading...",success:o=>(a?.(o),r),error:o=>(s?.(o),n||o?.message||"Error..."),...qu(i)});function vf({text:e,copyMessage:t="Copied to clipboard!"}){const[r,n]=_.useState(!1),a=_.useRef(null),s=_.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{fr.success(t),n(!0),a.current&&(clearTimeout(a.current),a.current=null),a.current=setTimeout(()=>{n(!1)},2e3)}).catch(()=>{fr.error("Failed to copy to clipboard.")})},[e,t]);return{isCopied:r,handleCopy:s}}function Zu({content:e,copyMessage:t,tooltip:r="Copy to clipboard",iconSize:n="default",className:a}){const[s,i]=_.useState(!1),{handleCopy:o}=vf({text:e,copyMessage:t}),l=()=>{o(),i(!0),setTimeout(()=>i(!1),2e3)};return p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{onClick:l,type:"button",className:ne("rounded-lg p-1",Wr.all,GN.visible,"hover:bg-surface4",a),children:p.jsx(qe,{className:ne("text-neutral3",Wr.all,"hover:text-neutral6",s&&"text-accent1"),size:n,children:s?p.jsx(Ao,{}):p.jsx(Jl,{})})})}),p.jsx(sa,{children:s?"Copied!":r})]})}const Bnn=/\{\{([a-zA-Z_][a-zA-Z0-9_]*(?:\.[a-zA-Z_][a-zA-Z0-9_]*)*)\}\}/g,znn=Er.mark({class:"cm-variable-highlight"}),fMe=new fVe({regexp:Bnn,decoration:()=>znn}),Unn=fi.fromClass(class{decorations;constructor(e){this.decorations=fMe.createDeco(e)}update(e){this.decorations=fMe.updateDeco(e,this.decorations)}},{decorations:e=>e.decorations}),Vnn=Unn;function qnn(e,t=5){if(!e?.properties)return[];const r=[];function n(a,s,i){if(i>t)return;const o=Array.isArray(a.type)?a.type.join(" | "):a.type;if(r.push({path:s,label:s,description:a.description??a.title,type:o}),a.properties)for(const[l,c]of Object.entries(a.properties))n(c,`${s}.${l}`,i+1);if(a.items?.properties)for(const[l,c]of Object.entries(a.items.properties))n(c,`${s}[].${l}`,i+1)}for(const[a,s]of Object.entries(e.properties))n(s,a,1);return r}function Znn(e){const t=qnn(e);return KVe({override:[Hnn(t)],defaultKeymap:!0,closeOnBlur:!0,icons:!1})}function Hnn(e){return t=>{const n=t.state.sliceDoc(Math.max(0,t.pos-50),t.pos).match(/\{\{([a-zA-Z0-9_.\[\]]*)?$/);if(!n)return null;const a=n[1]??"",s=t.pos-a.length,i=a?e.filter(l=>l.path.toLowerCase().startsWith(a.toLowerCase())):e;if(i.length===0)return null;const o=i.map(l=>({label:l.path,displayLabel:l.path,detail:l.type,info:l.description,apply:(c,u,d,f)=>{const y=c.state.sliceDoc(f,f+2)==="}}"?u.label:`${u.label}}}`;c.dispatch({changes:{from:d,to:f,insert:y},selection:{anchor:d+y.length}})}}));return{from:s,options:o,validFor:/^[a-zA-Z0-9_.\[\]]*$/}}}const Dv=()=>_.useMemo(()=>{const e=Coe({settings:{fontFamily:"var(--geist-mono)",fontSize:"0.8rem",lineHighlight:"transparent",gutterBackground:"transparent",gutterForeground:"#939393",background:"transparent"},styles:[{tag:[ee.className,ee.propertyName]},{tag:ee.heading,color:"#ff79c6",fontWeight:"bold"},{tag:[ee.heading1,ee.heading2,ee.heading3,ee.heading4,ee.heading5,ee.heading6],color:"#ff79c6",fontWeight:"bold"},{tag:ee.emphasis,fontStyle:"italic",color:"#f8f8f2"},{tag:ee.strong,fontWeight:"bold",color:"#f8f8f2"},{tag:ee.link,color:"#8be9fd",textDecoration:"underline"},{tag:ee.url,color:"#8be9fd"},{tag:ee.monospace,color:"#f1fa8c"},{tag:ee.strikethrough,textDecoration:"line-through"},{tag:ee.quote,fontStyle:"italic",color:"#6272a4"}]}),t=bt.theme({".cm-editor":{colorScheme:"dark",backgroundColor:"transparent"},".cm-lineNumbers .cm-gutterElement":{color:"#939393"},".cm-tooltip-autocomplete":{backgroundColor:"#282a36",border:"1px solid #44475a",borderRadius:"6px",boxShadow:"0 8px 16px rgba(0, 0, 0, 0.4)"},".cm-tooltip-autocomplete > ul":{fontFamily:"var(--geist-mono)"},".cm-completionLabel":{color:"#f8f8f2"},".cm-completionDetail":{color:"#A1A1AA",fontSize:"0.7rem",marginLeft:"auto",paddingLeft:"12px"},".cm-completionInfo":{backgroundColor:"#282a36",border:"1px solid #44475a",color:"#6272a4",padding:"8px 12px"},".cm-completionIcon":{display:"none"},"ul.cm-completionList li[aria-selected]":{backgroundColor:"#44475a",color:"#f8f8f2"},".cm-line .cm-variable-highlight":{color:"#F59E0B !important",fontWeight:"500"}});return[e,t]},[]),$u=({data:e,value:t,onChange:r,showCopyButton:n=!0,className:a,language:s="json",highlightVariables:i=!1,placeholder:o,wordWrap:l=!1,schema:c,...u})=>{const d=Dv(),f=e?JSON.stringify(e,null,2):t??"",h=_.useMemo(()=>{const g=[];return s==="json"?g.push(Bu):s==="markdown"&&(g.push(koe({base:gx,codeLanguages:xZe})),g.push(bt.lineWrapping)),i&&s==="markdown"&&g.push(Vnn),c&&s==="markdown"&&g.push(Znn(c)),g},[s,i,c]);return p.jsxs("div",{className:ne("rounded-md bg-surface3 p-1 font-mono relative border border-border1 overflow-hidden",a),...u,children:[n&&p.jsx(Zu,{content:f,className:"absolute top-2 right-2 z-20"}),p.jsx(Qu,{value:f,theme:d,extensions:h,onChange:r,"aria-label":"Code editor",placeholder:o,height:"100%",style:{height:"100%"}})]})};async function Gnn(e,t){const{codeToTokens:r,bundledLanguages:n}=await Fe(async()=>{const{codeToTokens:s,bundledLanguages:i}=await import("./index-C0AURa5c.js");return{codeToTokens:s,bundledLanguages:i}},__vite__mapDeps([29,1]),import.meta.url);if(!(t in n))return null;const{tokens:a}=await r(e,{lang:t,defaultColor:!1,themes:{light:"github-light",dark:"github-dark"}});return a}const IF=({children:e,initialCollapsed:t=!0,icon:r,title:n,collapsible:a=!0,extraInfo:s,"data-testid":i})=>{const[o,l]=_.useState(t);return _.useEffect(()=>{l(t)},[t]),p.jsxs("div",{className:"mb-4","data-testid":i,children:[p.jsxs("div",{className:"flex flex-row gap-2 items-center justify-between",children:[p.jsxs("button",{onClick:a?()=>l(c=>!c):void 0,className:"flex items-center gap-2 disabled:cursor-not-allowed",disabled:!a,type:"button",children:[p.jsx(qe,{children:p.jsx(EO,{className:ne("transition-all",o?"rotate-90":"rotate-180")})}),p.jsx(ur,{icon:r,children:n})]}),s]}),!o&&p.jsx("div",{className:"pt-2",children:p.jsx("div",{className:"p-4 rounded-lg bg-surface2 flex flex-col gap-4",children:e})})]})},zi=zL,Qnn=DHe,Wnn=UL,Hpt=_.forwardRef(({className:e,...t},r)=>p.jsx(aN,{ref:r,className:ne("fixed inset-0 z-50 bg-overlay backdrop-blur-sm","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));Hpt.displayName=aN.displayName;const Ei=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(Wnn,{children:[p.jsx(Hpt,{}),p.jsxs(sN,{ref:n,className:ne("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%]","gap-4 border border-border1 bg-surface3 py-6 shadow-dialog rounded-lg","duration-slow","data-[state=open]:animate-in data-[state=closed]:animate-out","data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0","data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95","data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%]","data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%]",e),...r,children:[t,p.jsxs(ZL,{className:ne("absolute right-4 top-4 rounded-md p-1","text-neutral3 hover:text-neutral6 hover:bg-surface4","transition-all duration-normal ease-out-custom","focus:outline-none focus:ring-1 focus:ring-accent1 focus:shadow-focus-ring","disabled:pointer-events-none"),children:[p.jsx(rl,{className:"h-4 w-4"}),p.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Ei.displayName=sN.displayName;const Ui=({className:e,...t})=>p.jsx("div",{className:ne("flex flex-col space-y-1.5 text-center sm:text-left border-b border-border1 pb-4 px-6",e),...t});Ui.displayName="DialogHeader";const xo=({className:e,...t})=>p.jsx("div",{className:ne("overflow-y-auto px-6 max-h-[50vh]",e),...t});xo.displayName="DialogBody";const Oi=_.forwardRef(({className:e,...t},r)=>p.jsx(VL,{ref:r,className:ne("text-lg font-semibold leading-none tracking-tight",e),...t}));Oi.displayName=VL.displayName;const co=_.forwardRef(({className:e,...t},r)=>p.jsx(qL,{ref:r,className:ne("sr-only",e),...t}));co.displayName=qL.displayName;const Xnn=({selectionReason:e,open:t,onOpenChange:r,input:n})=>{let a=null;if(n)try{a=typeof n=="object"?p.jsx($u,{data:n}):p.jsx($u,{data:JSON.parse(n)})}catch{a=p.jsx("pre",{className:"whitespace-pre-wrap",children:n})}return p.jsx(zi,{open:t,onOpenChange:r,children:p.jsxs(Ei,{children:[p.jsxs(Ui,{children:[p.jsx(Oi,{children:"Agent Network Metadata"}),p.jsx(co,{children:"View the metadata of the agent's network choice."})]}),p.jsxs(xo,{className:"space-y-4",children:[p.jsxs("div",{className:"space-y-2",children:[p.jsx(it,{className:"text-neutral3",children:"Selection Reason"}),p.jsx("div",{className:"text-neutral6 text-ui-md",children:e})]}),a&&p.jsxs("div",{className:"space-y-2",children:[p.jsx(it,{className:"text-neutral3",children:"Input"}),p.jsx("div",{className:"text-neutral6 text-ui-md",children:a})]})]})]})})},Ape=({selectionReason:e,input:t})=>{const[r,n]=_.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsx(Xl,{variant:"light",size:"md",tooltip:"Show selection reason",onClick:()=>n(a=>!a),children:p.jsx(ZIt,{className:"text-neutral3 size-5"})}),p.jsx(Xnn,{selectionReason:e||"",open:r,onOpenChange:n,input:t})]})},Gpt={sm:`${Co.sm} gap-1 text-ui-sm`,md:`${Co.md} gap-1`,lg:`${Co.lg} gap-2`},Qpt={default:"bg-surface2 hover:bg-surface4 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",light:"bg-surface3 hover:bg-surface5 text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",outline:"bg-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",ghost:"bg-transparent border-transparent hover:bg-surface2 text-neutral3 hover:text-neutral6 disabled:opacity-50 disabled:cursor-not-allowed",primary:"bg-accent1 hover:bg-accent1/90 text-surface1 font-medium hover:shadow-glow-accent1 disabled:opacity-50 disabled:cursor-not-allowed disabled:hover:shadow-none"},Wpt="border border-border1 px-2 text-ui-md inline-flex items-center justify-center rounded-md transition-all duration-normal ease-out-custom active:scale-[0.98]";function Dpe(e){const t=e?.variant||"default",r=e?.size||"md";return ne(Wpt,Rf,Qpt[t],Gpt[r])}const Ye=we.forwardRef(({className:e,as:t,size:r="md",variant:n="default",disabled:a,...s},i)=>{const o=t||"button";return p.jsx(o,{ref:i,disabled:a,className:ne(Wpt,Rf,Qpt[n],Gpt[r],a&&"active:scale-100",e),...s})});Ye.displayName="Button";const Xpt=_.createContext(void 0);function Ynn({children:e,approveToolcall:t,declineToolcall:r,approveToolcallGenerate:n,declineToolcallGenerate:a,approveNetworkToolcall:s,declineNetworkToolcall:i,isRunning:o,toolCallApprovals:l,networkToolCallApprovals:c}){return p.jsx(Xpt.Provider,{value:{approveToolcall:t,declineToolcall:r,approveToolcallGenerate:n,declineToolcallGenerate:a,approveNetworkToolcall:s,declineNetworkToolcall:i,isRunning:o,toolCallApprovals:l,networkToolCallApprovals:c},children:e})}function Knn(){const e=_.useContext(Xpt);if(!e)throw new Error("useToolCall must be used within a ToolCallProvider");return e}const QN=({toolCalled:e,toolCallId:t,toolApprovalMetadata:r,toolName:n,isNetwork:a,isGenerateMode:s})=>{const{approveToolcall:i,declineToolcall:o,approveToolcallGenerate:l,declineToolcallGenerate:c,isRunning:u,toolCallApprovals:d,approveNetworkToolcall:f,declineNetworkToolcall:h,networkToolCallApprovals:g}=Knn(),y=()=>{a?f(n,r?.runId):s?l(t):i(t)},b=()=>{a?h(n,r?.runId):s?c(t):o(t)},w=a?g?.[r?.runId?`${r.runId}-${n}`:n]?.status:d?.[t]?.status;return r&&!e?p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Approval required"}),p.jsxs("div",{className:"flex gap-2 items-center",children:[p.jsxs(Ye,{onClick:y,disabled:u||!!w,className:w==="approved"?"!text-accent1":"",children:[p.jsx(qe,{children:p.jsx(Ao,{})}),"Approve"]}),p.jsxs(Ye,{onClick:b,disabled:u||!!w,className:w==="declined"?"!text-accent2":"",children:[p.jsx(qe,{children:p.jsx(rl,{})}),"Decline"]})]})]}):null},Jnn=({toolName:e,args:t,result:r,metadata:n,toolOutput:a,toolCallId:s,toolApprovalMetadata:i,suspendPayload:o,isNetwork:l,toolCalled:c})=>{let u=null;try{const{__mastraMetadata:b,...w}=typeof t=="object"?t:JSON.parse(t);u=p.jsx($u,{data:w,"data-testid":"tool-args"})}catch{u=p.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:t})}let d=typeof r=="string"?p.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:r}):p.jsx($u,{data:r,"data-testid":"tool-result"}),f=typeof o=="string"?p.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:o}):p.jsx($u,{data:o,"data-testid":"tool-suspend-payload"});const h=n?.mode==="network"?n.selectionReason:void 0,g=n?.mode==="network"?n.agentInput:void 0,y=c??(r||a.length>0);return p.jsx(IF,{"data-testid":"tool-badge",icon:p.jsx(Wc,{className:"text-accent6"}),title:e,extraInfo:n?.mode==="network"&&p.jsx(Ape,{selectionReason:h||"",input:g}),initialCollapsed:!(i??o),children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool arguments"}),u]}),f!==void 0&&o&&p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool suspend payload"}),f]}),d!==void 0&&r&&p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool result"}),d]}),a.length>0&&p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool output"}),p.jsx("div",{className:"h-40 overflow-y-auto",children:p.jsx($u,{data:a,"data-testid":"tool-output"})})]}),p.jsx(QN,{toolCalled:y,toolCallId:s,toolApprovalMetadata:i,toolName:e,isNetwork:l,isGenerateMode:n?.mode==="generate"})]})})},Ypt=_.createContext({Link:_.forwardRef(()=>null),navigate:()=>{},paths:{agentLink:()=>"",agentsLink:()=>"",agentToolLink:()=>"",agentSkillLink:()=>"",agentThreadLink:()=>"",agentNewThreadLink:()=>"",workflowsLink:()=>"",workflowLink:()=>"",networkLink:()=>"",networkNewThreadLink:()=>"",networkThreadLink:()=>"",scorerLink:()=>"",toolLink:()=>"",skillLink:()=>"",workspacesLink:()=>"",workspaceLink:()=>"",workspaceSkillLink:()=>"",processorsLink:()=>"",processorLink:()=>"",mcpServerLink:()=>"",mcpServerToolLink:()=>"",workflowRunLink:()=>""}}),ean=({children:e,Link:t,navigate:r,paths:n})=>p.jsx(Ypt.Provider,{value:{Link:t,navigate:r,paths:n},children:e}),an=()=>{const e=_.useContext(Ypt);if(!e)throw new Error("useLinkComponent must be used within a LinkComponentProvider");return e},tan=e=>{switch(e){case"running":return"bg-green-500";case"starting":case"initializing":return"bg-yellow-500";case"stopped":case"paused":return"bg-gray-500";case"error":case"failed":return"bg-red-500";default:return"bg-accent6"}},ran=(e,t)=>{const[r,n]=_.useState(0),a=_.useRef(null);return _.useEffect(()=>{if(e){a.current=t||Date.now();const s=setInterval(()=>{a.current&&n(Date.now()-a.current)},100);return()=>clearInterval(s)}else a.current=null},[e,t]),r},nan=({command:e,content:t,maxHeight:r="20rem",onCopy:n,isCopied:a})=>{const s=_.useRef(null);return _.useEffect(()=>{s.current&&(s.current.scrollTop=s.current.scrollHeight)},[t]),p.jsxs("div",{className:"rounded-md border border-border1 overflow-hidden",children:[e&&p.jsxs("div",{className:"px-3 py-2 bg-surface3 border-b border-border1 flex items-center justify-between gap-2",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsx("span",{className:"text-icon6 text-xs shrink-0",children:"$"}),p.jsx("code",{className:"text-xs text-neutral-300 font-mono truncate",children:e})]}),n&&p.jsx(Xl,{variant:"light",size:"sm",tooltip:"Copy output",onClick:n,className:"shrink-0",children:p.jsxs("span",{className:"grid",children:[p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",a?"scale-100":"scale-0"),children:p.jsx(Ao,{size:14})}),p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",a?"scale-0":"scale-100"),children:p.jsx(Jl,{size:14})})]})})]}),p.jsx("pre",{ref:s,style:{maxHeight:r},className:"overflow-x-auto overflow-y-auto p-3 text-sm text-neutral-300 font-mono whitespace-pre-wrap bg-black",children:t||p.jsx("span",{className:"text-icon6 italic",children:"No output"})})]})},aan=({toolName:e,args:t,result:r,metadata:n,toolOutput:a,toolCallId:s,toolApprovalMetadata:i,suspendPayload:o,isNetwork:l,toolCalled:c})=>{const[u,d]=_.useState(!1),{isCopied:f,copyToClipboard:h}=DF(),{Link:g}=an();let y="";try{const Q=typeof t=="object"?t:JSON.parse(t);if(e===yj.SANDBOX.EXECUTE_COMMAND){const M=Q.command||"",W=Q.args?.join(" ")||"";y=`${M} ${W}`.trim()}}catch{y=e}const b=a?.filter(Q=>Q.type==="sandbox-stdout"||Q.type==="sandbox-stderr")||[],w=a?.filter(Q=>(Q.type==="sandbox-stdout"||Q.type==="sandbox-stderr"||Q.type==="sandbox-exit")&&Q.metadata),x=w?.length?w[w.length-1]?.metadata:void 0,S=a?.find(Q=>Q.type==="sandbox-exit"),E=r&&!Array.isArray(r)&&typeof r.exitCode=="number",C=E?r:null,k=!!S||E,A=b.length>0,D=A&&!k,N=c??(k||A),P=b.map(Q=>Q.data||"").join(""),j=A?P:C?[C.stdout,C.stderr].filter(Boolean).join(`
|
|
598
598
|
`):"",z=S?.exitCode??C?.exitCode,U=S?.success??C?.success,$=S?.executionTimeMs??C?.executionTimeMs,F=e===yj.SANDBOX.EXECUTE_COMMAND?"Execute Command":e,V=b[0]?.timestamp,H=ran(D,V),B=()=>{!j||f||h(j)};return p.jsxs("div",{className:"mb-4","data-testid":"sandbox-execution-badge",children:[p.jsxs("div",{className:"flex items-center gap-2 justify-between",children:[p.jsxs("button",{onClick:()=>d(Q=>!Q),className:"flex items-center gap-2 min-w-0",type:"button",children:[p.jsx(qe,{children:p.jsx(EO,{className:ne("transition-all",u?"rotate-90":"rotate-180")})}),p.jsx(ur,{icon:p.jsx(WIt,{className:"text-accent6",size:16}),children:F}),x?.sandbox?.name&&p.jsxs(g,{href:`/workspace?${new URLSearchParams({...x.workspace?.id&&{workspaceId:x.workspace.id},...x.sandbox.id&&{sandboxId:x.sandbox.id}}).toString()}`,className:"flex items-center gap-1.5 text-xs text-icon6 px-1.5 py-0.5 rounded bg-surface3 border border-border1 hover:bg-surface4 hover:border-border2 transition-colors",onClick:Q=>Q.stopPropagation(),children:[p.jsx("span",{className:ne("w-1.5 h-1.5 rounded-full",tan(x.sandbox.status))}),p.jsx("span",{children:x.sandbox.name}),x.sandbox.id&&p.jsxs("span",{className:"text-icon4 text-[10px]",children:["(",x.sandbox.id.slice(0,8),")"]})]})]}),p.jsx("div",{className:"flex items-center gap-2",children:D?p.jsxs(p.Fragment,{children:[p.jsxs("span",{className:"flex items-center gap-1.5 text-xs text-accent6",children:[p.jsx("span",{className:"w-1.5 h-1.5 bg-accent6 rounded-full animate-pulse"}),p.jsx("span",{className:"animate-pulse",children:"running"})]}),p.jsxs("span",{className:"text-icon6 text-xs tabular-nums",children:[H,"ms"]})]}):p.jsxs(p.Fragment,{children:[z!==void 0&&(U?p.jsx(Ao,{className:"text-green-400",size:14}):p.jsxs("span",{className:"px-1.5 py-0.5 rounded text-[10px] font-medium bg-red-500/20 text-red-400",children:["exit ",z]})),$!==void 0&&p.jsxs("span",{className:"text-icon6 text-xs",children:[$,"ms"]})]})})]}),!u&&p.jsxs("div",{className:"pt-2",children:[(j||y)&&p.jsx(nan,{command:y,content:j,onCopy:j?B:void 0,isCopied:f}),p.jsx(QN,{toolCalled:N,toolCallId:s,toolApprovalMetadata:i,toolName:e,isNetwork:l,isGenerateMode:n?.mode==="generate"})]})]})},san=({toolName:e,args:t,result:r,toolCallId:n,toolApprovalMetadata:a,isNetwork:s,toolCalled:i})=>{const[o,l]=_.useState(!a),{isCopied:c,copyToClipboard:u}=DF();_.useEffect(()=>{l(!a)},[a]);const{Link:d}=an();let f={path:"/"};try{f=typeof t=="object"?t:JSON.parse(t)}catch{}const{path:h="/",maxDepth:g,showHidden:y,dirsOnly:b,exclude:w,extension:x}=f,S=[];g!==void 0&&g!==3&&S.push(`depth: ${g}`),y&&S.push("hidden"),b&&S.push("dirs only"),w&&S.push(`exclude: ${w}`),x&&S.push(`ext: ${x}`);const E=r?.tree||"",C=r?.summary||"",k=!!E,A=i??k,D=r?.metadata,N=()=>{!E||c||u(E)};return p.jsxs("div",{className:"mb-4","data-testid":"file-tree-badge",children:[p.jsxs("div",{className:"flex items-center gap-2 flex-wrap",children:[p.jsxs("button",{onClick:()=>l(P=>!P),className:"flex items-center gap-2 min-w-0",type:"button",children:[p.jsx(qe,{children:p.jsx(EO,{className:ne("transition-all",o?"rotate-90":"rotate-180")})}),p.jsxs(ur,{icon:p.jsx(NDt,{className:"text-accent6",size:16}),children:["List Files ",p.jsx("span",{className:"text-icon6 font-normal ml-1",children:h}),S.length>0&&p.jsxs("span",{className:"text-icon4 font-normal ml-1",children:["(",S.join(", "),")"]})]})]}),D?.filesystem?.name&&p.jsxs(d,{href:`/workspace?${new URLSearchParams({...D.workspace?.id&&{workspaceId:D.workspace.id}}).toString()}`,className:"flex items-center gap-1.5 text-xs text-icon6 px-1.5 py-0.5 rounded bg-surface3 border border-border1 hover:bg-surface4 hover:border-border2 transition-colors",children:[p.jsx(qDt,{className:"size-3"}),p.jsx("span",{children:D.filesystem.name})]}),o&&k&&C&&p.jsx("span",{className:"text-icon6 text-xs",children:C})]}),!o&&p.jsxs("div",{className:"pt-2",children:[a&&!A&&p.jsxs("div",{className:"p-4 rounded-lg bg-surface2 flex flex-col gap-4",children:[p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Tool arguments"}),p.jsx($u,{data:f,"data-testid":"tool-args"})]}),p.jsx(QN,{toolCalled:A,toolCallId:n,toolApprovalMetadata:a,toolName:e,isNetwork:s})]}),A&&k&&p.jsxs("div",{className:"rounded-md border border-border1 bg-surface2 overflow-hidden",children:[p.jsxs("div",{className:"flex items-center justify-between px-3 py-1.5 border-b border-border1 bg-surface3",children:[C&&p.jsx("span",{className:"text-icon6 text-xs",children:C}),p.jsx(Xl,{variant:"light",size:"sm",tooltip:"Copy tree",onClick:N,disabled:!E,children:p.jsxs("span",{className:"grid",children:[p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",c?"scale-100":"scale-0"),children:p.jsx(Ao,{size:14})}),p.jsx("span",{style:{gridArea:"1/1"},className:ne("transition-transform",c?"scale-0":"scale-100"),children:p.jsx(Jl,{size:14})})]})})]}),p.jsx("pre",{className:"p-3 text-xs font-mono text-mastra-el-6 overflow-x-auto whitespace-pre max-h-[300px] overflow-y-auto",children:E})]}),A&&!k&&p.jsx("div",{className:"rounded-md border border-border1 bg-surface2 px-3 py-2",children:p.jsx("span",{className:"text-xs text-icon6",children:"Loading..."})})]})]})};function Mre(e){const t={},r=e.context||{};Object.entries(r).forEach(([i,o])=>{if(i!=="input"&&"status"in o){const l=o,c=l.status==="failed"&&l.tripwire!==void 0;t[i]={status:l.status,output:"output"in l?l.output:void 0,payload:"payload"in l?l.payload:void 0,suspendPayload:"suspendPayload"in l?l.suspendPayload:void 0,suspendOutput:"suspendOutput"in l?l.suspendOutput:void 0,resumePayload:"resumePayload"in l?l.resumePayload:void 0,error:c?void 0:"error"in l?l.error:void 0,tripwire:c?l.tripwire:void 0,startedAt:"startedAt"in l?l.startedAt:Date.now(),endedAt:"endedAt"in l?l.endedAt:void 0,suspendedAt:"suspendedAt"in l?l.suspendedAt:void 0,resumedAt:"resumedAt"in l?l.resumedAt:void 0}}});const n=Object.entries(t).flatMap(([i,o])=>{if(o?.status==="suspended"){const l=o?.suspendPayload?.__workflow_meta?.path;return l?[[i,...l]]:[[i]]}return[]}),a=n?.[0]?.[0],s=a?t[a]?.suspendPayload:void 0;return{input:r.input,steps:t,status:e.status,...e.status==="success"?{result:e.result}:{},...e.status==="failed"?{error:e.error}:{},...e.status==="suspended"?{suspended:n,suspendPayload:s}:{},...e.status==="tripwire"&&e.tripwire?{tripwire:{reason:e.tripwire.reason,retry:e.tripwire.retry,metadata:e.tripwire.metadata,processorId:e.tripwire.processorId}}:{}}}const Kpt=()=>{const[e,t]=_.useState(!1),r=_.useCallback(n=>{if(n){const a=new IntersectionObserver(([s])=>{t(s.isIntersecting)});return a.observe(n),()=>a.disconnect()}},[]);return{inView:e,setRef:r}},Oa=Ese()(nyr(e=>({requestContext:{},setRequestContext:t=>e({requestContext:t})}),{name:"mastra-playground-store"})),WN=e=>{const t=qt(),{requestContext:r}=Oa();return Cn({queryKey:["workflow",e],queryFn:()=>e?t.getWorkflow(e).details(r):null,enabled:!!e,retry:!1,refetchOnWindowFocus:!1,throwOnError:!1})},bY=20,Jpt=(e,{enabled:t=!0}={})=>{const r=qt(),{inView:n,setRef:a}=Kpt(),s=LYe({queryKey:["workflow-runs",e],queryFn:({pageParam:i})=>r.getWorkflow(e).runs({limit:bY,offset:i*bY}),initialPageParam:0,getNextPageParam:(i,o,l)=>{if(!(i.runs.length<bY))return l+1},select:i=>i.pages.flatMap(o=>o.runs),retry:!1,enabled:t,refetchInterval:5e3,gcTime:0,staleTime:0});return _.useEffect(()=>{n&&s.hasNextPage&&!s.isFetchingNextPage&&s.fetchNextPage()},[n,s.hasNextPage,s.isFetchingNextPage]),{...s,setEndOfListElement:a}},eft=(e,t,r)=>{const n=qt();return Cn({queryKey:["workflow-run",e,t],queryFn:()=>n.getWorkflow(e).runById(t),enabled:!!(e&&t),gcTime:0,staleTime:0,refetchInterval:r})},ian=e=>{const t=qt(),r=xl();return Ya({mutationFn:({runId:n})=>t.getWorkflow(e).deleteRunById(n),onSuccess:()=>{r.invalidateQueries({queryKey:["workflow-runs",e]}),fr.success("Workflow run deleted successfully")},onError:()=>{fr.error("Failed to delete workflow run")}})},tft=_.createContext(null);function NF(){const e=_.useContext(tft);if(!e)throw new Error("useWorkflowStepDetail must be used within WorkflowStepDetailProvider");return e}function oan({children:e}){const[t,r]=_.useState(null),n=_.useCallback(({stepName:i,stepId:o,mapConfig:l})=>{r({type:"map-config",stepName:i,stepId:o,mapConfig:l})},[]),a=_.useCallback(({label:i,stepGraph:o,fullStep:l})=>{r({type:"nested-graph",stepName:i,nestedGraph:{label:i,stepGraph:o,fullStep:l}})},[]),s=_.useCallback(()=>{r(null)},[]);return p.jsx(tft.Provider,{value:{stepDetail:t,showMapConfig:n,showNestedGraph:a,closeStepDetail:s},children:e})}function lan({entityId:e,entityType:t}){const[r,n]=_.useState(void 0),a=`tracing-options-${t}:${e}`;return _.useEffect(()=>{try{const o=localStorage.getItem(a);if(o){const l=JSON.parse(o);n(l||void 0)}}catch(o){console.error(o)}},[a]),{settings:r,setSettings:o=>{n(l=>({...l,...o})),localStorage.setItem(a,JSON.stringify({...o,entityId:e,entityType:t}))},resetAll:()=>{n(void 0),localStorage.removeItem(a)},entityType:t}}const rft=_.createContext({setSettings:()=>{},resetAll:()=>{},settings:void 0,entityType:void 0}),nft=({children:e,entityId:t,entityType:r})=>{const n=lan({entityId:t,entityType:r});return p.jsx(rft.Provider,{value:n,children:e})},Ipe=()=>_.useContext(rft),am=_.createContext({});function Npe({children:e,snapshot:t,workflowId:r,initialRunId:n,withoutTimeTravel:a=!1}){const[s,i]=_.useState(()=>t?Mre(t):null),[o,l]=_.useState(()=>t?.context?.input??null),[c,u]=_.useState(()=>n??""),[d,f]=_.useState(!1),[h,g]=_.useState(!1),y=d||["success","failed","canceled","bailed"].includes(s?.status??"")?void 0:5e3,{isLoading:b,data:w}=eft(r,n??"",y),x=_.useMemo(()=>w&&n?{context:{input:w?.payload,...w?.steps},status:w?.status,result:w?.result,error:w?.error,runId:n,serializedStepGraph:w?.serializedStepGraph,value:w?.initialState}:void 0,[w,n]),{data:S,isLoading:E,error:C}=WN(r),{settings:k}=Ipe(),A=Jgr(),{streamWorkflow:D,streamResult:N,isStreaming:P,observeWorkflowStream:j,closeStreamsAndReset:z,resumeWorkflowStream:U,timeTravelWorkflowStream:$}=Kgr({debugMode:h,tracingOptions:k?.tracingOptions,onError:H=>fr.error(H.message)}),F=eyr(),V=()=>{i(null),l(null)};return _.useEffect(()=>{f(!1)},[n]),_.useEffect(()=>{x?.runId&&(i(Mre(x)),x.value&&Object.keys(x.value).length>0?l({initialState:x.value,inputData:x.context?.input}):l(x.context?.input),u(x.runId))},[x]),p.jsx(am.Provider,{value:{workflowId:r,result:s,setResult:i,payload:o,setPayload:l,clearData:V,snapshot:t,runId:c,setRunId:u,workflowError:C??null,workflow:S??void 0,isLoading:E,createWorkflowRun:A.mutateAsync,streamWorkflow:H=>(f(!0),D.mutateAsync(H)),resumeWorkflow:H=>(f(!0),U.mutateAsync(H)),streamResult:N,isStreamingWorkflow:P,isCancellingWorkflowRun:F.isPending,cancelWorkflowRun:F.mutateAsync,observeWorkflowStream:H=>(f(!0),j.mutate(H)),closeStreamsAndReset:z,timeTravelWorkflowStream:H=>(f(!0),$.mutateAsync(H)),runSnapshot:x,isLoadingRunExecutionResult:b,withoutTimeTravel:a,debugMode:h,setDebugMode:g},children:p.jsx(oan,{children:e})})}function Gr({className:e,...t}){return p.jsx("div",{className:ne("rounded-md bg-surface4 relative overflow-hidden","before:absolute before:inset-0","before:translate-x-[-100%]","before:animate-[shimmer_2s_infinite]","before:bg-gradient-to-r before:from-transparent before:via-surface5/20 before:to-transparent",e),...t})}const can=e=>e.replace(/[-_\s]+(.)?/g,(r,n)=>n?n.toUpperCase():"").replace(/^(.)/,r=>r.toLowerCase()).replace(/([A-Z])/g," $1").replace(/^./,r=>r.toUpperCase()).trim(),uan=(e,t,r)=>{if(!e.startsWith("mapping_"))return e;const n=l=>l.split(" ").map(c=>c.charAt(0).toUpperCase()+c.slice(1)).join(" "),a=l=>{const c=l.replace(/Step$/,"").replace(/[-_]/g," ").trim();return n(c)},s=(l,c)=>l.length===0?c?"End":"Start":l.length===1?a(l[0]):`${l.length} Steps`,i=s(t,!1),o=s(r,!0);return`${i} → ${o} Map`},dan=(e,t)=>{const r=new uIe.graphlib.Graph().setDefaultEdgeLabel(()=>({}));r.setGraph({rankdir:"TB"}),t.forEach(s=>r.setEdge(s.source,s.target)),e.forEach(s=>r.setNode(s.id,{...s,width:s.measured?.width??274,height:s.measured?.height??(s?.data?.isLarge?260:100)})),uIe.layout(r);const n=r.graph()?.width?r.graph().width/2:0,a=r.graph()?.height?r.graph().height/2:0;return{nodes:e.map(s=>{const i=r.node(s.id),o=i.x-(s.measured?.width??274)/2,l=i.y-(s.measured?.height??(s?.data?.isLarge?260:100))/2;return{...s,position:{x:o,y:l}}}),edges:t,fullWidth:n,fullHeight:a}},Rp={animated:!0,markerEnd:{type:hD.ArrowClosed,width:20,height:20,color:"#8e8e8e"}},jre=({stepFlow:e,xIndex:t,yIndex:r,prevNodeIds:n,prevStepIds:a,nextStepFlow:s,condition:i,allPrevNodeIds:o})=>{let l=[],c=[];if((s?.type==="step"||s?.type==="foreach"||s?.type==="loop")&&(l=[o?.includes(s.step.id)?`${s.step.id}-${r+1}`:s.step.id],c=[s.step.id]),(s?.type==="sleep"||s?.type==="sleepUntil")&&(l=[o?.includes(s.id)?`${s.id}-${r+1}`:s.id],c=[s.id]),s?.type==="parallel"&&(l=s?.steps.map(u=>{const d=u.step.id;return o?.includes(d)?`${d}-${r+1}`:d})||[],c=s?.steps.map(u=>u.step.id)||[]),s?.type==="conditional"&&(l=s?.serializedConditions.map(u=>u.id)||[],c=s?.steps?.map(u=>u.step.id)||[]),e.type==="step"||e.type==="foreach"){const u=e.step.component==="WORKFLOW",d=o?.includes(e.step.id)?`${e.step.id}-${r}`:e.step.id,f=[...i?[{id:i.id,position:{x:t*300,y:r*100},type:"condition-node",data:{label:i.id,previousStepId:a[a.length-1],nextStepId:e.step.id,withoutTopHandle:!n.length,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:"when",fnString:i.fn}]}}]:[],{id:d,position:{x:t*300,y:(r+(i?1:0))*100},type:u?"nested-node":"default-node",data:{label:uan(e.step.id,a,c),stepId:e.step.id,description:e.step.description,withoutTopHandle:i?!1:!n.length,withoutBottomHandle:!l.length,stepGraph:u?e.step.serializedStepFlow:void 0,mapConfig:e.step.mapConfig,canSuspend:e.step.canSuspend,isForEach:e.type==="foreach"}}],h=[...i?[...(n||[]).map((g,y)=>({id:`e${g}-${i.id}`,source:g,data:{previousStepId:a[y],nextStepId:e.step.id},target:i.id,...Rp})),{id:`e${i.id}-${d}`,source:i.id,data:{previousStepId:a[a.length-1],nextStepId:e.step.id,conditionNode:!0},target:d,...Rp}]:(n||[]).map((g,y)=>({id:`e${g}-${d}`,source:g,data:{previousStepId:a[y],nextStepId:e.step.id},target:d,...Rp})),...(l||[]).map((g,y)=>({id:`e${d}-${g}`,source:d,data:{previousStepId:e.step.id,nextStepId:c[y]},target:g,...Rp}))];return{nodes:f,edges:h,nextPrevNodeIds:[d],nextPrevStepIds:[e.step.id]}}if(e.type==="sleep"||e.type==="sleepUntil"){const u=o?.includes(e.id)?`${e.id}-${r}`:e.id,d=[...i?[{id:i.id,position:{x:t*300,y:r*100},type:"condition-node",data:{label:i.id,previousStepId:a[a.length-1],nextStepId:e.id,withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:"when",fnString:i.fn}]}}]:[],{id:u,position:{x:t*300,y:(r+(i?1:0))*100},type:"default-node",data:{label:e.id,withoutTopHandle:i?!1:!n.length,withoutBottomHandle:!l.length,...e.type==="sleepUntil"?{date:e.date}:{duration:e.duration}}}],f=[...n.length?i?[...n.map((h,g)=>({id:`e${h}-${i.id}`,source:h,data:{previousStepId:a[g],nextStepId:e.id},target:i.id,...Rp})),{id:`e${i.id}-${u}`,source:i.id,data:{previousStepId:a[a.length-1],nextStepId:e.id},target:u,...Rp}]:n.map((h,g)=>({id:`e${h}-${u}`,source:h,data:{previousStepId:a[g],nextStepId:e.id},target:u,...Rp})):[],...l.length?l.map((h,g)=>({id:`e${u}-${h}`,source:u,data:{previousStepId:e.id,nextStepId:c[g]},target:h,...Rp})):[]];return{nodes:d,edges:f,nextPrevNodeIds:[u],nextPrevStepIds:[e.id]}}if(e.type==="loop"){const{step:u,serializedCondition:d,loopType:f}=e,h=u.component==="WORKFLOW",g=[{id:u.id,position:{x:t*300,y:r*100},type:h?"nested-node":"default-node",data:{label:u.id,description:u.description,withoutTopHandle:!n.length,withoutBottomHandle:!1,stepGraph:h?u.serializedStepFlow:void 0,canSuspend:u.canSuspend}},{id:d.id,position:{x:t*300,y:(r+1)*100},type:"condition-node",data:{label:d.id,previousStepId:u.id,nextStepId:c[0],withoutTopHandle:!1,withoutBottomHandle:!l.length,isLarge:!0,conditions:[{type:f,fnString:d.fn}]}}],y=[...n.length?n.map((b,w)=>({id:`e${b}-${u.id}`,source:b,data:{previousStepId:a[w],nextStepId:u.id},target:u.id,...Rp})):[],{id:`e${u.id}-${d.id}`,source:u.id,data:{previousStepId:u.id,nextStepId:c[0]},target:d.id,...Rp},...l.length?l.map((b,w)=>({id:`e${d.id}-${b}`,source:d.id,data:{previousStepId:u.id,nextStepId:c[w]},target:b,...Rp})):[]];return{nodes:g,edges:y,nextPrevNodeIds:[d.id],nextPrevStepIds:[u.id]}}if(e.type==="parallel"){let u=[],d=[],f=[];return e.steps.forEach((h,g)=>{const{nodes:y,edges:b,nextPrevStepIds:w}=jre({stepFlow:h,xIndex:g,yIndex:r,prevNodeIds:n,prevStepIds:a,nextStepFlow:s,allPrevNodeIds:o}),x=y.map(S=>({...S,data:{...S.data,isParallel:!0}}));u.push(...x),d.push(...b),f.push(...w)}),{nodes:u,edges:d,nextPrevNodeIds:u.map(h=>h.id),nextPrevStepIds:f}}if(e.type==="conditional"){let u=[],d=[],f=[];return e.steps.forEach((h,g)=>{const{nodes:y,edges:b,nextPrevStepIds:w}=jre({stepFlow:h,xIndex:g,yIndex:r,prevNodeIds:n,prevStepIds:a,nextStepFlow:s,condition:e.serializedConditions[g],allPrevNodeIds:o});u.push(...y),d.push(...b),f.push(...w)}),{nodes:u,edges:d,nextPrevNodeIds:u.filter(({type:h})=>h!=="condition-node").map(h=>h.id),nextPrevStepIds:f}}return{nodes:[],edges:[],nextPrevNodeIds:[],nextPrevStepIds:[]}},aft=({stepGraph:e})=>{if(!e)return{nodes:[],edges:[]};if(e.length===0)return{nodes:[],edges:[]};let t=[],r=[],n=[],a=[],s=[];for(let l=0;l<e.length;l++){const{nodes:c,edges:u,nextPrevNodeIds:d,nextPrevStepIds:f}=jre({stepFlow:e[l],xIndex:l,yIndex:l,prevNodeIds:n,prevStepIds:a,nextStepFlow:l===e.length-1?void 0:e[l+1],allPrevNodeIds:s});t.push(...c),r.push(...u),n=d,a=f,s.push(...n)}const{nodes:i,edges:o}=dan(t,r);return{nodes:i,edges:o}},XN=OOr,s_=we.forwardRef(({className:e,children:t,...r},n)=>p.jsx(sce,{ref:n,className:ne("-outline-offset-2",Wr.colors,GN.visible,"hover:text-neutral5","[&>svg]:transition-transform [&>svg]:duration-normal [&>svg]:ease-out-custom","[&[data-state=open]>svg]:rotate-90",e),...r,children:t}));s_.displayName=sce.displayName;const i_=we.forwardRef(({className:e,children:t,...r},n)=>p.jsx(oce,{ref:n,className:ne("overflow-hidden","data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:slide-in-from-top-1","data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:slide-out-to-top-1","duration-normal ease-out-custom",e),...r,children:t}));i_.displayName=oce.displayName;const ki={sleep:"#A855F7",forEach:"#F97316",map:"#F97316",parallel:"#3B82F6",suspend:"#EC4899",after:"#14B8A6",workflow:"#8B5CF6",when:"#ECB047",dountil:"#8B5CF6",dowhile:"#06B6D4",until:"#F59E0B",while:"#10B981",if:"#3B82F6",else:"#6B7280"},po={sleep:yK,sleepUntil:hAt,forEach:gK,map:gK,parallel:V7e,suspend:ZAt,after:A7e,workflow:eIt,when:j7e,dountil:PIt,dowhile:MIt,until:yK,while:UI,if:P7e,else:cDt},hMe=e=>{switch(e){case"when":return{icon:po.when,color:ki.when};case"dountil":return{icon:po.dountil,color:ki.dountil};case"dowhile":return{icon:po.dowhile,color:ki.dowhile};case"until":return{icon:po.until,color:ki.until};case"while":return{icon:po.while,color:ki.while};case"if":return{icon:po.if,color:ki.if};case"else":return{icon:po.else,color:ki.else};default:return{icon:void 0,color:void 0}}},sft=e=>{const t=!!(e.duration||e.date),r=!!e.isForEach,n=!!(e.mapConfig&&!e.isForEach),a=!!e.stepGraph,s=t||e.canSuspend||e.isParallel||r||n||a;return{isSleepNode:t,isForEachNode:r,isMapNode:n,isNestedWorkflow:a,hasSpecialBadge:s}},ift=(e,{enabled:t=!0})=>{const r=_.useRef(t);we.useEffect(()=>{if(!t||!e?.current)return;const n=e.current,a=new MutationObserver(()=>{r.current&&n.scrollTo({top:n.scrollHeight,behavior:"smooth"})});a.observe(n,{childList:!0,subtree:!0,characterData:!0});const s=i=>{const o=i.target,l=o.scrollTop+o.clientHeight,c=o.scrollHeight;l>=c-1?r.current=!0:r.current=!1};return n.addEventListener("scroll",s),()=>{n.removeEventListener("scroll",s),a.disconnect()}},[t,e])},Lh=_.forwardRef(({className:e,children:t,viewPortClassName:r,maxHeight:n,autoScroll:a=!1,...s},i)=>{const o=_.useRef(null);return ift(o,{enabled:a}),p.jsxs(net,{ref:i,className:ne("relative overflow-hidden",e),...s,children:[p.jsx(jOr,{ref:o,className:ne("h-full w-full rounded-[inherit] [&>div]:!block",r),style:n?{maxHeight:n}:void 0,children:t}),p.jsx(oft,{}),p.jsx(LOr,{})]})});Lh.displayName=net.displayName;const oft=_.forwardRef(({className:e,orientation:t="vertical",...r},n)=>p.jsx(uce,{ref:n,orientation:t,className:ne("flex touch-none select-none transition-all duration-normal ease-out-custom","opacity-0 hover:opacity-100 data-[state=visible]:opacity-100",t==="vertical"&&"h-full w-2.5 border-l border-l-transparent p-px",t==="horizontal"&&"h-2.5 flex-col border-t border-t-transparent p-px",e),...r,children:p.jsx(KJe,{className:"relative flex-1 rounded-full bg-neutral2 hover:bg-neutral3 transition-colors duration-normal"})}));oft.displayName=uce.displayName;const YN=()=>{const e=_.useContext(am),t=e.result?.steps??{};return{steps:Object.entries(t).reduce((n,[a,s])=>{const i="tripwire"in s&&s.tripwire;return{...n,[a]:{error:i?void 0:"error"in s?s.error:void 0,tripwire:i?s.tripwire:void 0,startedAt:s.startedAt,endedAt:"endedAt"in s?s.endedAt:void 0,status:s.status,output:"output"in s?s.output:void 0,input:s.payload,resumeData:"resumePayload"in s?s.resumePayload:void 0,suspendOutput:"suspendOutput"in s?s.suspendOutput:void 0,suspendPayload:"suspendPayload"in s?s.suspendPayload:void 0}}},{}),runId:e.runId}},Gw=({data:e,language:t="auto"})=>{const r=Dv(),n=i=>{if(t==="javascript")return[D3(),bt.lineWrapping];if(t==="json")return[Bu,bt.lineWrapping];try{return JSON.parse(i),[Bu,bt.lineWrapping]}catch{return i.includes("=>")||i.includes("function")||i.includes("const ")||i.includes("return ")?[D3(),bt.lineWrapping]:[bt.lineWrapping]}};if(typeof e!="string"){const i=JSON.stringify(e,null,2);return p.jsxs("div",{className:"max-h-[500px] overflow-auto relative",children:[p.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:p.jsx(Zu,{content:i})}),p.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:p.jsx(Qu,{value:i,theme:r,extensions:[Bu,bt.lineWrapping]})})]})}const a=n(e);let s=e;try{const i=JSON.parse(e);s=JSON.stringify(i,null,2)}catch{}return p.jsxs("div",{className:"max-h-[500px] overflow-auto relative",children:[p.jsx("div",{className:"absolute right-2 top-2 bg-surface4 rounded-full z-10",children:p.jsx(Zu,{content:e})}),p.jsx("div",{className:"bg-surface4 rounded-lg p-4",children:p.jsx(Qu,{value:s,theme:r,extensions:a})})]})},pan=we.forwardRef(({children:e,...t},r)=>p.jsx("form",{ref:r,className:"space-y-4",...t,children:e})),fan=["boolean","object","array"],han=({label:e,children:t,id:r,field:n,error:a})=>{const s=fan.includes(n.type);return p.jsxs("div",{className:"pb-4 last:pb-0",children:[!s&&p.jsxs(it,{as:"label",variant:"ui-sm",className:"text-neutral3 pb-1 block",htmlFor:r,children:[e,n.required&&p.jsx("span",{className:"text-accent2",children:" *"})]}),t,n.fieldConfig?.description&&p.jsx(it,{as:"p",variant:"ui-sm",className:"text-neutral6",children:n.fieldConfig.description}),a&&p.jsx(it,{as:"p",variant:"ui-sm",className:"text-accent2",children:a})]})},man=({error:e})=>p.jsx(og,{variant:"destructive",children:p.jsx(Sb,{children:e})}),gan=({children:e})=>p.jsx(Ye,{type:"submit",children:e}),mMe=e=>typeof e=="boolean"?`${e}`:e===0?"0":e,gMe=Rpt,lft=(e,t)=>r=>{var n;if(t?.variants==null)return gMe(e,r?.class,r?.className);const{variants:a,defaultVariants:s}=t,i=Object.keys(a).map(c=>{const u=r?.[c],d=s?.[c];if(u===null)return null;const f=mMe(u)||mMe(d);return a[c][f]}),o=r&&Object.entries(r).reduce((c,u)=>{let[d,f]=u;return f===void 0||(c[d]=f),c},{}),l=t==null||(n=t.compoundVariants)===null||n===void 0?void 0:n.reduce((c,u)=>{let{class:d,className:f,...h}=u;return Object.entries(h).every(g=>{let[y,b]=g;return Array.isArray(b)?b.includes({...s,...o}[y]):{...s,...o}[y]===b})?[...c,d,f]:c},[]);return gMe(e,i,l,r?.class,r?.className)},yan=lft(ne("flex w-full text-neutral6 border bg-transparent","transition-all duration-normal ease-out-custom","disabled:cursor-not-allowed disabled:opacity-50","placeholder:text-neutral2 placeholder:transition-opacity placeholder:duration-normal","focus:placeholder:opacity-70",HN,Rf),{variants:{variant:{default:"border border-border1 hover:border-border2",filled:"border bg-surface2 border-border1 hover:border-border2",unstyled:"border-0 bg-transparent shadow-none focus:shadow-none focus:ring-0"},size:{sm:`${Co.sm} px-2 text-ui-sm`,md:`${Co.md} px-3 text-ui-sm`,lg:`${Co.lg} px-4 text-ui-sm`}},defaultVariants:{variant:"default",size:"md"}}),Ps=_.forwardRef(({className:e,size:t,testId:r,variant:n,type:a,error:s,...i},o)=>p.jsx("input",{type:a,className:ne(yan({variant:n,size:t}),s&&"border-error focus:ring-error focus:shadow-glow-accent2",e),"data-testid":r,ref:o,"aria-invalid":s,...i}));Ps.displayName="Input";const ban=({inputProps:e,error:t,field:r,id:n})=>{const{key:a,...s}=e;return p.jsx(Ps,{id:n,className:t?"border-accent2":"",...s,defaultValue:r.default})},van=({inputProps:e,error:t,field:r,id:n})=>{const{key:a,...s}=e;return p.jsx(Ps,{id:n,type:"number",className:t?"border-accent2":"",...s,defaultValue:r.default!==void 0?Number(r.default):void 0,onChange:i=>{const o=i.target.value;o!==""&&!isNaN(Number(o))&&s.onChange({target:{value:o,name:e.name}})},onBlur:i=>{const o=i.target.value;o!==""&&!isNaN(Number(o))&&s.onChange({target:{value:Number(o),name:e.name}})}})},o_=_.forwardRef(({className:e,...t},r)=>p.jsx(hce,{ref:r,className:ne("peer h-4 w-4 shrink-0 rounded-sm border border-neutral3","shadow-sm",Wr.all,"hover:border-neutral5 hover:shadow-md",Rf,"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm","data-[state=checked]:bg-accent1 data-[state=checked]:border-accent1 data-[state=checked]:text-surface1","data-[state=checked]:shadow-glow-accent1",e),...t,children:p.jsx(oet,{className:ne("flex items-center justify-center text-current","data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"),children:p.jsx(Ao,{className:"h-3.5 w-3.5 stroke-[3]"})})}));o_.displayName=hce.displayName;const xan=({field:e,label:t,id:r,inputProps:n,value:a})=>p.jsxs("div",{className:"flex items-center space-x-2",children:[p.jsx(o_,{id:r,onCheckedChange:s=>{const i={target:{name:n.name,value:s}};n.onChange(i)},defaultChecked:e.default,disabled:n.disabled||n.readOnly}),p.jsxs(it,{as:"label",variant:"ui-sm",className:"text-neutral3",htmlFor:r,children:[t,e.required&&p.jsx("span",{className:"text-accent2",children:" *"})]})]});function cft({className:e,classNames:t,showOutsideDays:r=!0,...n}){return p.jsx(ACr,{showOutsideDays:r,className:ne("p-3",e),classNames:{months:"flex flex-col space-y-4 sm:space-y-0 ",month:"space-y-4 text-ui-sm ",caption:"flex justify-between pt-1 items-center pl-2",caption_label:"text-text font-medium ",nav:"flex items-center",nav_button_previous:ne("flex justify-center items-center h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),nav_button_next:ne("flex justify-center items-center h-7 w-7 bg-transparent p-0 opacity-50 hover:opacity-100"),dropdown_month:"w-full border-collapse space-y-1",weeknumber:"flex",day:ne("relative p-0 text-center focus-within:relative focus-within:z-20 [&:has([aria-selected])]:bg-surface5 [&:has([aria-selected].day-outside)]:bg-surface5/50 [&:has([aria-selected].day-range-end)]:rounded-r-md",n.mode==="range"?"[&:has(>.day-range-end)]:rounded-r-md [&:has(>.day-range-start)]:rounded-l-md first:[&:has([aria-selected])]:rounded-l-md last:[&:has([aria-selected])]:rounded-r-md":"[&:has([aria-selected])]:rounded-md","h-8 w-8 p-0 hover:bg-lightGray-7/50 font-normal aria-selected:opacity-100"),day_range_start:"day-range-start",day_range_end:"day-range-end",day_selected:"!bg-neutral6/50 !text-surface2 hover:bg-neutral6 rounded-md hover:text-surface2 focus:bg-neutral6 focus:text-surface2",day_today:"bg-neutral6/10 text-neutral5",day_outside:"day-outside text-neutral3 opacity-50 aria-selected:bg-surface5/50 aria-selected:text-neutral3 aria-selected:opacity-30",day_disabled:"text-neutral3 opacity-50",day_range_middle:"aria-selected:bg-surface5 aria-selected:text-neutral5",day_hidden:"invisible",head_cell:"text-ui-xs text-neutral3",...t},...n})}const KN=eTt,JN=tTt,l_=_.forwardRef(({className:e,align:t="center",sideOffset:r=4,...n},a)=>p.jsx(rTt,{children:p.jsx(Y8e,{ref:a,align:t,sideOffset:r,className:ne("z-50 w-72 rounded-md border border-border1 bg-surface3 text-neutral5 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",e&&/\bp-\S+/.test(e)?!1:"p-4",e),...n})}));l_.displayName=Y8e.displayName;const iO=tTr,oO=rTr,wan={sm:`${Co.sm} px-2 text-ui-sm`,md:`${Co.md} px-3 text-ui-sm`,lg:`${Co.lg} px-3 text-ui-sm`},jx=_.forwardRef(({className:e,children:t,size:r="md",...n},a)=>p.jsxs(rtt,{ref:a,className:ne("flex w-full items-center justify-between border border-border1 bg-transparent py-2 shadow-sm placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50",HN,Rf,Wr.all,"hover:border-neutral2",wan[r],e),...n,children:[t,p.jsx(nTr,{asChild:!0,children:p.jsx(ui,{className:ne("h-4 w-4 text-neutral3",Wr.colors)})})]}));jx.displayName=rtt.displayName;const Lx=_.forwardRef(({className:e,children:t,position:r="popper",...n},a)=>p.jsx(aTr,{children:p.jsx(ntt,{ref:a,className:ne("relative z-50 min-w-[8rem] max-h-dropdown-max-height overflow-y-auto overflow-x-hidden rounded-md border border-border1 bg-surface3 text-neutral5 shadow-md data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2",r==="popper"&&"data-[side=bottom]:translate-y-1 data-[side=left]:-translate-x-1 data-[side=right]:translate-x-1 data-[side=top]:-translate-y-1",e),position:r,...n,children:p.jsx(sTr,{className:ne("p-1",r==="popper"&&"h-[var(--radix-select-trigger-height)] w-full min-w-[var(--radix-select-trigger-width)]"),children:t})})}));Lx.displayName=ntt.displayName;const Fx=_.forwardRef(({className:e,children:t,...r},n)=>p.jsxs(att,{ref:n,className:ne("relative flex w-full cursor-default select-none items-center rounded-sm py-1.5 pl-2 pr-8 text-neutral5 text-sm",Wr.colors,"hover:bg-surface5 hover:text-neutral5","focus:bg-surface5 focus:text-neutral5","data-[state=checked]:bg-accent1Dark data-[state=checked]:text-accent1","data-[disabled]:pointer-events-none data-[disabled]:opacity-50",e),...r,children:[p.jsx("span",{className:"absolute right-2 flex h-3.5 w-3.5 items-center justify-center",children:p.jsx(oTr,{children:p.jsx(Ao,{className:"h-4 w-4 text-accent1"})})}),p.jsx(iTr,{children:t})]}));Fx.displayName=att.displayName;function vY({name:e,onChange:t,value:r,options:n,placeholder:a}){return p.jsxs(iO,{name:e,onValueChange:t,value:r,children:[p.jsx(jx,{children:p.jsx(oO,{placeholder:a||"Select..."})}),p.jsx(Lx,{children:(n||[]).map((s,i)=>p.jsx(Fx,{value:`${i}`,children:p.jsx("div",{className:"flex items-center gap-2 [&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:text-neutral3",children:s})},s))})]})}const xY=["12","1","2","3","4","5","6","7","8","9","10","11"],f$=["00","15","30","45","59"],h$=["AM","PM"];function San({defaultValue:e,onValueChange:t,className:r}){const[n,a]=_.useState("12"),[s,i]=_.useState("00"),[o,l]=_.useState("AM");_.useEffect(()=>{if(e){const f=/^(\d{1,2}):(\d{2})(?::\d{2})?\s*(AM|PM|am|pm)?$/,h=e.match(f);if(h){let g=parseInt(h[1],10);const y=parseInt(h[2],10),b=h[3]?.toUpperCase();g>=1&&g<=12&&y>=0&&y<=59&&(a(g.toString()),i(y===0?"00":y.toString()),l(b||"AM"))}}},[e]);const c=f=>{a(f),t(`${xY[+f]}:${s} ${o}`.trim())},u=f=>{i(f$[+f]),t(`${n}:${f$[+f]} ${o}`.trim())},d=f=>{l(h$[+f]),t(`${n}:${s} ${h$[+f]}`.trim())};return p.jsxs("div",{className:ne("flex gap-2 items-center",r),children:[p.jsx(vY,{name:"hour",value:xY.indexOf(n).toString(),onChange:c,options:xY}),":",p.jsx(vY,{name:"minute",value:f$.indexOf(s).toString(),onChange:u,options:f$}),p.jsx(vY,{name:"period",value:h$.indexOf(o).toString(),onChange:d,options:h$})]})}const Ean={sm:`${Co.sm} px-2`,md:`${Co.md} px-3`,lg:`${Co.lg} px-3 py-2`};function cv({name:e,value:t,label:r,labelIsHidden:n=!1,className:a,testId:s,required:i,disabled:o,helpMsg:l,error:c,errorMsg:u,size:d="lg",...f}){const h=({children:g})=>n?p.jsx(of,{children:g}):g;return p.jsxs("div",{className:ne("grid gap-2",{"grid-rows-[auto_1fr]":!n&&!l,"grid-rows-[auto_1fr_auto]":!n&&l},a),children:[p.jsx(h,{children:p.jsxs("label",{htmlFor:`input-${e}`,className:ne("text-ui-sm text-neutral3 flex justify-between items-center"),children:[r,i&&p.jsx("i",{className:"text-neutral2 text-xs",children:"(required)"})]})}),p.jsx("input",{id:`input-${e}`,name:e,value:t,className:ne("flex grow items-center cursor-pointer text-ui-md text-neutral5 border border-border1 leading-none bg-transparent w-full",HN,Rf,Ean[d],"placeholder:text-neutral3 placeholder:text-ui-sm",{"cursor-not-allowed opacity-50":o,"border-red-800 focus:border-border1":c||u}),"data-testid":s,...f}),l&&p.jsx("p",{className:"text-neutral3 text-ui-sm",children:l}),u&&p.jsxs("p",{className:ne("text-ui-sm text-neutral4 flex items-center gap-2","[&>svg]:w-[1.2em] [&>svg]:h-[1.2em] [&>svg]:opacity-70 [&>svg]:text-red-400"),children:[p.jsx(gv,{})," ",u]})]})}function uft({onReset:e,...t}){return p.jsxs("div",{className:"relative",children:[p.jsx(cv,{labelIsHidden:!0,...t,className:"[&>input]:pl-10",style:{background:`url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' fill='gray' viewBox='0 0 24 24'><path d='M21 20l-5.6-5.6a7 7 0 1 0-1.4 1.4L20 21zM4 10a6 6 0 1 1 12 0 6 6 0 0 1-12 0z'/></svg>") no-repeat 8px center`,backgroundSize:"1.5rem 1.5rem",paddingRight:e?"3rem":void 0}}),e&&t.value&&p.jsx("button",{type:"button",onClick:e,className:ne("absolute top-1/2 right-2 -translate-y-1/2 p-1 rounded",Wr.all,"hover:bg-surface4","[&>svg]:transition-colors [&>svg]:duration-normal","[&:hover>svg]:text-neutral5"),children:p.jsx(rl,{className:"text-neutral3 w-[1rem] h-[1rem]"})})]})}function Bx({name:e,value:t,label:r,className:n,required:a,disabled:s,helpMsg:i,options:o,onValueChange:l,placeholder:c="Select an option",size:u="lg"}){return p.jsxs("div",{className:ne("flex gap-2 items-center",{"grid-rows-[auto_1fr]":r,"grid-rows-[auto_1fr_auto]":i},n),children:[r&&p.jsxs("label",{className:ne("text-ui-sm text-neutral3 flex justify-between items-center shrink-0"),children:[r,a&&p.jsx("i",{className:"text-neutral2",children:"(required)"})]}),p.jsxs(iO,{name:e,value:t,onValueChange:l,disabled:s,children:[p.jsx(jx,{id:"select-dataset",size:u,className:ne("w-full border border-border1 min-w-20 gap-2",HN,Rf),children:p.jsx(oO,{placeholder:c})}),p.jsx(Lx,{children:o.map(d=>p.jsx(Fx,{value:d.value,children:p.jsx("span",{className:"whitespace-nowrap truncate block",children:d.label})},d.label))})]}),i&&p.jsx("p",{className:"text-neutral3 text-ui-sm",children:i})]})}const yMe=({value:e,minValue:t,maxValue:r,defaultTimeStrValue:n,onValueChange:a,children:s,className:i,placeholder:o,...l})=>{const[c,u]=_.useState(!1);return p.jsxs(KN,{open:c,onOpenChange:u,children:[p.jsx(JN,{asChild:!0,children:s||p.jsx(_an,{value:e,placeholder:o,className:i,"data-testid":"datepicker-button"})}),p.jsx(l_,{className:"backdrop-blur-4xl w-auto !p-0 bg-surface4 max-w-[16.5rem]",align:"start","data-testid":"datepicker-calendar",children:p.jsx(Oan,{value:e,minValue:t,maxValue:r,onValueChange:a,setOpenPopover:u,defaultTimeStrValue:n,...l})})]})};function m$({date:e,timeStr:t=""}){if(!ab(e))return null;if(t){const r=ja(e,"yyyy-MM-dd"),n=new Date(`${r} ${t}`);if(ab(n))return n}return e}const Oan=({value:e,minValue:t,maxValue:r,onValueChange:n,setOpenPopover:a,placeholder:s,className:i,defaultTimeStrValue:o,...l})=>{const[c,u]=_.useState(null),[d,f]=_.useState(e?ja(m$({date:e,timeStr:o})||"","PP p"):""),[h,g]=_.useState(o||""),[y,b]=_.useState(e?new Date(e):void 0),w=C6(U=>{ab(U)&&(b(U),n?.(U),a?.(!1))},500),x=U=>{f(U.currentTarget.value);const $=new Date(U.currentTarget.value);w($)},S=U=>{ab(U)?r&&U>r?(u(`The selected date should be before ${ja(r,"PP p")}`),f("")):t&&U<t?(u(`The selected date should be after ${ja(t,"PP p")}`),f("")):(f(ja(U,"PP p")),u("")):(f(""),u(""))},E=new Date(d),C=ab(E),k=C&&E.getTime()!==e?.getTime(),A=U=>{if(b(U),U){const $=m$({date:U,timeStr:h});S($||"")}else S("")},D=U=>{if(b(U),U){const $=m$({date:U,timeStr:h});S($||"")}else S("")},N=U=>{if(g(U),C){const $=m$({date:E,timeStr:U});S($||"")}},P=()=>{a?.(!1)},j=()=>{ab(E)&&n(E),a?.(!1)},z=()=>{n(void 0),b(void 0),f(""),g(""),a?.(!1)};return p.jsxs("div",{"aria-label":"Choose date",className:ne("relative flex flex-col",i),onKeyDown:U=>{U.stopPropagation(),U.key==="Escape"&&a?.(!1)},children:[p.jsx(cv,{type:"text",value:d,onChange:x,placeholder:s,className:"m-4 mb-0 !w-auto"}),c&&p.jsxs("div",{className:ne("text-ui-md m-4 mb-0 text-neutral3","[&>svg]:w-[1.1em] [&>svg]:h-[1.1em] [&>svg]:mt-0.5 [&>svg]:text-red-500 [&>svg]:float-left [&>svg]:mr-2"),children:[p.jsx(cb,{})," ",c]}),p.jsx(cft,{mode:"single",month:y,selected:y,onMonthChange:D,onSelect:A,...l}),p.jsx(San,{onValueChange:N,className:"m-4 mt-0 w-auto",defaultValue:e?ja(new Date(e),"hh:mm a"):o}),p.jsxs("div",{className:"grid grid-cols-[1fr_auto] gap-2 m-4 mt-0",children:[p.jsx(Ye,{variant:"light",size:"lg",tabIndex:0,onClick:()=>{C?j():P()},children:k?"Apply":"Cancel"}),k&&p.jsx(Ye,{tabIndex:0,onClick:z,children:"Clear"})]})]})},_an=_.forwardRef(({value:e,placeholder:t,className:r,...n},a)=>p.jsxs(Ye,{ref:a,className:ne("justify-start",r),variant:"light",size:"lg",...n,children:[p.jsx(O7e,{className:"h-4 w-4"}),e?p.jsx("span",{className:"text-white",children:ja(e,"PP p")}):p.jsx("span",{className:"text-gray",children:t??"Pick a date"})]})),kan=({inputProps:e,field:t,error:r,id:n})=>{const{key:a,...s}=e,[i,o]=_.useState(void 0),[l,c]=_.useState(!1);_.useEffect(()=>{if(t.default){const f=new Date(t.default);ab(f)&&o(f)}},[t]);const u=f=>{o(f),f&&s.onChange({target:{value:f.toISOString(),name:e.name}}),c(!1)},d=()=>{o(void 0),s.onChange({target:{value:"",name:e.name}}),c(!1)};return p.jsxs(KN,{open:l,onOpenChange:c,children:[p.jsx(JN,{asChild:!0,children:p.jsxs(Ye,{id:n,variant:"light",size:"lg",className:ne("w-full",r?"border-accent2":""),children:[p.jsx(O7e,{className:"h-4 w-4"}),i?p.jsx("span",{className:"text-white",children:ja(i,"PPP")}):p.jsx("span",{className:"text-gray",children:"Pick a date"})]})}),p.jsxs(l_,{className:"w-auto p-0 bg-surface4",align:"start",children:[p.jsx(cft,{mode:"single",selected:i,onSelect:u,month:i,onMonthChange:o}),i&&p.jsx("div",{className:"p-3 pt-0",children:p.jsx(Ye,{variant:"light",size:"lg",className:"w-full",onClick:d,children:"Clear"})})]})]})},Can=({field:e,inputProps:t,error:r,id:n,value:a})=>{const{key:s,...i}=t;return p.jsxs(iO,{...i,value:a,onValueChange:o=>{const l={target:{value:o,name:t.name}};i.onChange(l)},children:[p.jsx(jx,{id:n,className:r?"border-accent2":"",children:p.jsx(oO,{placeholder:"Select an option"})}),p.jsx(Lx,{children:(e.options||[]).map(([o,l])=>p.jsx(Fx,{value:o,children:l},o))})]})},Tan=({label:e,children:t})=>{const r=e!==""&&e!=="",[n,a]=_.useState(!1);return p.jsxs("div",{className:"",children:[p.jsxs("div",{className:"flex items-center",children:[r&&p.jsxs(it,{as:"h3",variant:"ui-sm",className:"text-neutral3 flex items-center gap-1 pb-2",children:[p.jsx(qe,{size:"sm",children:p.jsx(ax,{})}),e]}),p.jsx(Ye,{onClick:()=>a(!n),type:"button",className:"ml-auto",children:p.jsx(qe,{size:"sm",children:p.jsx(ui,{className:ne("transition-all",n?"rotate-180":"rotate-0")})})})]}),n&&p.jsx("div",{className:r?"flex flex-col gap-1 [&>*]:border-dashed [&>*]:border-l [&>*]:border-l-border1 [&>*]:pl-4":"",children:t})]})},Aan=({label:e,children:t,onAddItem:r})=>p.jsxs("div",{children:[p.jsxs("div",{className:"flex gap-2 justify-between",children:[p.jsxs(it,{as:"h3",variant:"ui-sm",className:"text-neutral3 pb-2 flex items-center gap-1",children:[p.jsx(qe,{size:"sm",children:p.jsx(uAt,{})}),e]}),p.jsx(ru,{children:p.jsxs(fa,{delayDuration:0,children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{onClick:r,type:"button",className:"text-neutral3 bg-surface3 rounded-md p-1 hover:bg-surface4 hover:text-neutral6 h-icon-sm w-icon-sm",children:p.jsx(qe,{size:"sm",children:p.jsx(Vh,{})})})}),p.jsx(sa,{children:"Add item"})]})})]}),p.jsx("div",{className:"flex flex-col gap-1",children:t})]}),Dan=({children:e,onRemove:t})=>p.jsxs("div",{className:"pl-4 border-l border-border1",children:[e,p.jsxs(Ye,{onClick:t,type:"button",children:[p.jsx(qe,{size:"sm",children:p.jsx(Xse,{})}),"Delete"]})]}),Ian=({inputProps:e,field:t,error:r,id:n})=>{const{key:a,onChange:s,...i}=e,[o,l]=_.useState(()=>Object.entries(t.default||{}).map(([g,y])=>({id:g||Eo(),key:g,value:y})));_.useEffect(()=>{o.length===0&&l([{id:Eo(),key:"",value:""}])},[o]);const c=_.useCallback(g=>{const y=g.reduce((b,w)=>(w.key&&(b[w.key]=w.value),b),{});s?.({target:{value:y,name:e.name}})},[s,e.name]),u=(g,y,b)=>{l(w=>w.map(x=>x.id===g?{...x,[y]:b}:x))},d=()=>{c(o)},f=()=>{const g=[...o,{id:Eo(),key:"",value:""}];l(g),c(g)},h=g=>{const y=o.filter(b=>b.id!==g);y.length===0&&y.push({id:Eo(),key:"",value:""}),l(y),c(y)};return p.jsxs("div",{className:"space-y-3",children:[o.map(g=>p.jsxs("div",{className:"relative space-y-2 rounded-lg border p-4",children:[p.jsx(Ye,{type:"button",className:"absolute right-2 top-2",onClick:()=>h(g.id),children:p.jsx(Xse,{className:"h-4 w-4"})}),p.jsxs("div",{className:"space-y-2 pt-6",children:[p.jsx(Ps,{placeholder:"Key",value:g.key,onChange:y=>u(g.id,"key",y.target.value),onBlur:d}),p.jsx(Ps,{placeholder:"Value",value:g.value,onChange:y=>u(g.id,"value",y.target.value),onBlur:d})]})]},g.id)),p.jsxs(Ye,{type:"button",className:"w-full",onClick:f,children:[p.jsx(Vh,{className:"mr-2 h-4 w-4"}),"Add Key-Value Pair"]})]})},Nan=({field:e,path:t})=>{const{uiComponents:r}=jce();return p.jsx(r.ObjectWrapper,{label:R4(e),field:e,children:Object.entries(e.schema).map(([n,a])=>p.jsx(K0,{field:a,path:[...t,a.key]},`${t.join(".")}.${a.key}`))})},Ran=({field:e,path:t})=>{const{uiComponents:r}=jce(),{control:n}=f1(),{fields:a,append:s,remove:i}=ATr({control:n,name:t.join(".")}),o=e.schema?.[0]?.type;let l;return o==="object"?l={}:o==="array"?l=[]:l=null,p.jsx(r.ArrayWrapper,{label:R4(e),field:e,onAddItem:()=>s(l),children:a.map((c,u)=>p.jsx(r.ArrayElementWrapper,{onRemove:()=>i(u),index:u,children:p.jsx(K0,{field:e.schema[0],path:[...t,u.toString()]})},c.id))})},K0=({field:e,path:t})=>{const{formComponents:r,uiComponents:n}=jce(),{register:a,formState:{errors:s},getValues:i}=f1(),o=t.join("."),l=lAr(s,t)?.message,c=i(o),u=e.fieldConfig?.fieldWrapper||n.FieldWrapper;let d=()=>p.jsx(n.ErrorMessage,{error:`[AutoForm Configuration Error] No component found for type "${e.type}" nor a fallback`});return e.type==="array"?d=Ran:e.type==="object"?d=Nan:e.type in r?d=r[e.type]:"fallback"in r&&(d=r.fallback),p.jsx(u,{label:R4(e),error:l,id:o,field:e,children:p.jsx(d,{label:R4(e),field:e,value:c,error:l,id:o,path:t,inputProps:{required:e.required,error:l,key:`${o}-input`,...e.fieldConfig?.inputProps,...a(o)}},o)})},Pan=({field:e,inputProps:t})=>{const r=t.name?.split(".")??[];return e.schema?.map((n,a)=>p.jsxs("div",{children:[p.jsx(K0,{field:n,path:r},r.join(".")),a<(e.schema?.length??0)-1&&p.jsx(it,{variant:"ui-xs",className:"text-center",children:"OR"})]},n.key))},$an=({field:e,path:t})=>{const{watch:r}=f1(),n=t.join("."),a=r(n),i=(e.schema?.flatMap(f=>f.schema||[])||[])?.filter(f=>f.fieldConfig?.customData?.isLiteral)||[],o=i[0],l=i?.reduce((f,h)=>{const g=(h.fieldConfig?.customData?.literalValues??[]).map(y=>[y,y]);return f.options?.push(...g),f},{key:o.key,required:o.required,type:"select",default:o.default,description:o.description,options:[],fieldConfig:o.fieldConfig}),c=e.schema?.reduce((f,h)=>{const g=h.schema?.find(w=>w.fieldConfig?.customData?.isLiteral),y=g?.fieldConfig?.customData?.literalValues?.[0],b=h.schema?.filter(w=>w.key!==g?.key)??[];return y&&(f[y]=b),f},{}),u=e.schema?.filter(f=>!f.schema?.find(g=>g.fieldConfig?.customData?.isLiteral)),d=a?.[l.key];return p.jsxs("div",{children:[p.jsx(K0,{field:l,path:[...t,l.key]},`${n}.${l.key}`),d&&c?.[d]&&c[d].map(f=>p.jsx(K0,{field:f,path:[...t,f.key]},`${n}.${f.key}`)),u&&u.map(f=>p.jsx(K0,{field:f,path:[...t,f.key]},`${n}.${f.key}`))]},e.key)};function bj(e){const t={};for(const r in e){const n=e[r];if(![null,void 0,"",[],{}].includes(n))if(Array.isArray(n)){const s=n.map(i=>{if(typeof i=="object"){const o=bj(i);return Object.keys(o).length>0?o:null}return i}).filter(i=>i!==null);s.length>0&&(t[r]=s)}else if(typeof n=="object"){const a=bj(n);Object.keys(a).length>0&&(t[r]=a)}else t[r]=n}return t}function _g(e){return Function("z",`"use strict";return (${e});`)(ZT)}function Man({schema:e,onSubmit:t=()=>{},defaultValues:r,values:n,children:a,uiComponents:s,formComponents:i,withSubmit:o=!1,onFormInit:l=()=>{},formProps:c={}}){const u=_.useMemo(()=>ITr(e),[e]),d=ytt({defaultValues:{...NTr(e),...r},values:n});_.useEffect(()=>{l&&l(d)},[l,d]);const f=_.useCallback(async g=>{const y=bj(g),b=e.validateSchema(y);if(b.success)await t(b.data,d);else{d.clearErrors();let w=!1;b.errors?.forEach(x=>{const S=x.path.join(".");d.setError(S,{type:"custom",message:x.message},{shouldFocus:!w}),w=!0;const E=x.path?.slice?.(0,-1);E?.length>0&&d.setError(E.join("."),{type:"custom",message:x.message})})}},[e,t,d]),h=_.useMemo(()=>({schema:u,uiComponents:s,formComponents:i}),[u,s,i]);return p.jsx(uTr,{...d,children:p.jsx(zTr,{value:h,children:p.jsxs(s.Form,{onSubmit:d.handleSubmit(f),...c,children:[u.fields.map(g=>p.jsx(K0,{field:g,path:[g.key]},g.key)),a,o&&p.jsx(s.SubmitButton,{children:"Submit"})]})})})}const jan={Form:pan,FieldWrapper:han,ErrorMessage:man,SubmitButton:gan,ObjectWrapper:Tan,ArrayWrapper:Aan,ArrayElementWrapper:Dan};function Lan({uiComponents:e,formComponents:t,readOnly:r,...n}){const a=_.useMemo(()=>({...jan,...e}),[e]),s=_.useMemo(()=>{const i=o=>r===void 0?o:{...o,readOnly:r};return{string:o=>p.jsx(ban,{...o,inputProps:i(o.inputProps)}),number:o=>p.jsx(van,{...o,inputProps:i(o.inputProps)}),boolean:o=>p.jsx(xan,{...o,inputProps:i(o.inputProps)}),date:o=>p.jsx(kan,{...o,inputProps:i(o.inputProps)}),select:o=>p.jsx(Can,{...o,inputProps:i(o.inputProps)}),record:o=>p.jsx(Ian,{...o,inputProps:i(o.inputProps)}),union:o=>p.jsx(Pan,{...o,inputProps:i(o.inputProps)}),"discriminated-union":o=>p.jsx($an,{...o,inputProps:i(o.inputProps)}),...t}},[r,t]);return p.jsx(Man,{...n,uiComponents:a,formComponents:s})}const Fan=lft("text-sm leading-none peer-disabled:cursor-not-allowed peer-disabled:opacity-70"),Hs=_.forwardRef(({className:e,...t},r)=>p.jsx($tt,{ref:r,className:ne(Fan(),e),...t}));Hs.displayName=$tt.displayName;function Ban(e,t){if(t?.fieldType)return t.fieldType;if(e instanceof Sf||e instanceof vO)return"object";if(e instanceof Gx)return"number";if(e instanceof Wx)return"boolean";if(e instanceof Hx)return(e._zod.def.checks||[]).some(a=>a._zod.def.check==="string_format"&&a._zod.def.format==="datetime")?"date":"string";if(e instanceof Nb||e instanceof dte)return"select";if(e instanceof Xx)return"array";if(e instanceof xO)return"record";if(e instanceof Kx)return e._zod.def.options.every(a=>"shape"in a._zod.def?Object.values(a._zod.def.shape).some(s=>s instanceof KS):!1)?"discriminated-union":"union";if(e instanceof M5)return"discriminated-union";if(e instanceof KS){const r=e._zod?.def?.values,n=e._def?.value,a=r!==void 0?Array.isArray(r)?r[0]:r:n;return typeof a=="number"?"number":typeof a=="boolean"?"boolean":"string"}return"string"}function DT(e){if(e instanceof ZT.core.$ZodDefault)return e._zod.def.defaultValue;if(e instanceof ZT.core.$ZodLiteral){const t=e._zod.def.values;return Array.isArray(t)?t[0]:t}else{if("innerType"in e._zod.def)return DT(e._zod.def.innerType);if("shape"in e._zod.def)return NM(e);if("left"in e._zod.def&&"right"in e._zod.def){const t=e._zod.def.left,r=e._zod.def.right,n="shape"in t?NM(t):DT(t),a="shape"in r?NM(r):DT(r);return{...n,...a}}}}function NM(e){const t=e._zod.def.shape,r={};for(const[n,a]of Object.entries(t)){const s=DT(a);s!==void 0&&(r[n]=s)}return r}function Ly(e,t){const r=Lre(t),n=jtt(t);let a=Ban(r,n);const s=DT(t),i=r._zod.def?.entries;let o=[];i&&(Array.isArray(i)?o=i.map(d=>[d,d]):o=Object.entries(i));let l=[];if((r instanceof Bi||r instanceof Sf)&&(l=Object.entries(r.shape).map(([d,f])=>Ly(d,f))),(r instanceof OD||r instanceof Kx)&&(l=Object.entries(r.def.options).map(([d,f])=>Ly(d,f))),r instanceof _D||r instanceof vO){const d="left"in r.def?r.def.left:null,f="right"in r.def?r.def.right:null;let h=[],g=[];if(d)if("shape"in d&&d.shape)g=Object.entries(d.shape).map(([y,b])=>Ly(y,b));else{const y=Ly(e,d);g=y.schema??[y],a=y.type}if(f)if("shape"in f&&f.shape)h=Object.entries(f.shape).map(([y,b])=>Ly(y,b));else{const y=Ly(e,f);h=y.schema??[y],a=y.type}l=[...g,...h]}(r instanceof rf||r instanceof Xx)&&(l=[Ly("0",r._zod.def.element)]);const c=r instanceof KS,u=c?r._zod.def.values:void 0;return{key:e,type:a,required:!t.optional(),default:s,description:r.description,fieldConfig:c||Object.keys(n??{})?.length>0?{...n,customData:{...n?.customData??{},...c?{isLiteral:c,literalValues:u}:{}}}:void 0,options:o,schema:l}}function Lre(e){return"innerType"in e._zod.def?Lre(e._zod.def.innerType):"schema"in e._zod.def?Lre(e._zod.def.schema):e}function zan(e){const t=e.shape;return{fields:Object.entries(t).map(([n,a])=>Ly(n,a))}}class Uan extends hAr{_schema;constructor(t){super(t),this._schema=t}getDefaultValues(){return NM(this._schema)}validateSchema(t){const r=bj(t);try{const n=this._schema.safeParse(r);return n.success?{success:!0,data:n.data}:{success:!1,errors:n.error.issues.map(a=>({path:a.path,message:a.message}))}}catch(n){throw n}}parseSchema(){return zan(this._schema)}}function Fre(e){return e instanceof Sf?Object.keys(e.shape).length===0:e instanceof vO?Fre(e._def.left)||Fre(e._def.right):!1}function Rpe({schema:e,onSubmit:t,onValuesChange:r,defaultValues:n,isSubmitLoading:a,submitButtonLabel:s,className:i,readOnly:o,children:l}){const c=_.useRef(null),u=!(e instanceof Sf),d=_.useRef(r);_.useEffect(()=>{d.current=r},[r]),_.useEffect(()=>()=>{c.current?.unsubscribe()},[]);const f=_.useCallback(S=>{c.current?.unsubscribe(),d.current&&(c.current=S.watch(E=>{const C=u?E&&Object.prototype.hasOwnProperty.call(E,"")?E[""]:{}:E;d.current?.(C)}))},[u]),h=_.useMemo(()=>{if(!e)return null;const S=E=>Fre(E)?ZT.object({}):u?ZT.object({"":E}):E;return new Uan(S(e))},[e,u]),g=_.useMemo(()=>({SubmitButton:({children:S})=>t?p.jsx(Ye,{variant:"light",className:"w-full",size:"md",disabled:a,children:a?p.jsx(qe,{children:p.jsx(Ai,{className:"animate-spin"})}):s||S}):null}),[t,a,s]),y=_.useMemo(()=>({Label:({value:S})=>p.jsx(Hs,{className:"text-sm font-normal",children:S})}),[]),b=_.useMemo(()=>({className:i,noValidate:!0}),[i]),w=_.useMemo(()=>u?n===void 0?void 0:{"":n}:n,[u,n]),x=_.useCallback(async S=>{const E=u?S&&Object.prototype.hasOwnProperty.call(S,"")?S[""]:{}:S;await t?.(E)},[t,u]);return h?p.jsx(Lan,{schema:h,onSubmit:x,onFormInit:f,defaultValues:w,formProps:b,uiComponents:g,formComponents:y,withSubmit:!0,readOnly:o,children:l}):(console.error("no form schema found"),null)}const eR=_.forwardRef(({className:e,...t},r)=>p.jsx(ort,{className:ne("grid gap-2",e),...t,ref:r}));eR.displayName=ort.displayName;const Mu=_.forwardRef(({className:e,...t},r)=>p.jsx(lrt,{ref:r,className:ne("aspect-square h-4 w-4 rounded-full border border-neutral3 text-neutral6","shadow-sm",Wr.all,"hover:border-neutral5 hover:shadow-md",Rf,"disabled:cursor-not-allowed disabled:opacity-50 disabled:hover:border-neutral3 disabled:hover:shadow-sm","data-[state=checked]:border-accent1 data-[state=checked]:shadow-glow-accent1",e),...t,children:p.jsx(iDr,{className:ne("flex items-center justify-center","data-[state=checked]:animate-in data-[state=checked]:zoom-in-50 data-[state=checked]:duration-150"),children:p.jsx(YAt,{className:"h-2 w-2 fill-accent1 text-accent1"})})}));Mu.displayName=lrt.displayName;const Ppe=({schema:e,defaultValues:t,withoutSubmit:r,isSubmitLoading:n,submitButtonLabel:a,onSubmit:s,children:i,isProcessorWorkflow:o})=>{const[l,c]=_.useState(o?"simple":"form"),[u,d]=_.useState(!1);return _.useEffect(()=>{d(!0)},[]),u?p.jsxs("div",{children:[p.jsx(eR,{disabled:n,value:l,onValueChange:f=>c(f),className:"pb-4",children:p.jsxs("div",{className:"flex flex-row gap-4",children:[o&&p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Mu,{value:"simple",id:"simple"}),p.jsx(Hs,{htmlFor:"simple",className:"!text-neutral3 text-ui-sm",children:"Simple"})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Mu,{value:"form",id:"form"}),p.jsx(Hs,{htmlFor:"form",className:"!text-neutral3 text-ui-sm",children:"Form"})]}),p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsx(Mu,{value:"json",id:"json"}),p.jsx(Hs,{htmlFor:"json",className:"!text-neutral3 text-ui-sm",children:"JSON"})]})]})}),p.jsx("div",{className:ne({"opacity-50 pointer-events-none":n}),children:l==="simple"&&o?p.jsx(qan,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:a,onSubmit:s,withoutSubmit:r,children:i}):l==="form"?p.jsx(Rpe,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:a,onSubmit:r?void 0:s,children:i}):p.jsx(Van,{schema:e,defaultValues:t,isSubmitLoading:n,submitButtonLabel:a,onSubmit:s,withoutSubmit:r,children:i})})]}):null},Van=({schema:e,defaultValues:t,isSubmitLoading:r,submitButtonLabel:n,onSubmit:a,withoutSubmit:s,children:i})=>{const[o,l]=_.useState([]),[c,u]=_.useState(()=>JSON.stringify(t??{},null,2)),d=()=>{l([]);try{const h=e.safeParse(JSON.parse(c));h.success?a(h.data):l(h.error.issues.map(g=>`[${g.path.join(".")}] ${g.message}`))}catch{l(["Invalid JSON provided"])}};let f={};try{f=JSON.parse(c)}catch{f={}}return p.jsxs("div",{className:"flex flex-col gap-4",children:[o.length>0&&p.jsxs("div",{className:"border border-accent2 rounded-lg p-2",children:[p.jsxs(it,{as:"p",variant:"ui-md",className:"text-accent2 font-semibold",children:[o.length," errors found"]}),p.jsx("ul",{className:"list-disc list-inside",children:o.map((h,g)=>p.jsx("li",{className:"text-ui-sm text-accent2",children:h},g))})]}),p.jsx($u,{data:f,onChange:u}),i,s?null:p.jsx(Ye,{variant:"light",onClick:d,className:"w-full",size:"lg",children:r?p.jsx(Ai,{className:"animate-spin"}):n})]})},bMe=[{value:"input",label:"Input - Process input messages before LLM"},{value:"inputStep",label:"Input Step - Process at each agentic loop step"},{value:"outputStream",label:"Output Stream - Process streaming chunks"},{value:"outputResult",label:"Output Result - Process complete output"},{value:"outputStep",label:"Output Step - Process after each LLM response"}],qan=({schema:e,defaultValues:t,isSubmitLoading:r,submitButtonLabel:n,onSubmit:a,withoutSubmit:s,children:i})=>{const[o,l]=_.useState("Hello, this is a test message."),[c,u]=_.useState("input"),[d,f]=_.useState([]),h=()=>{f([]);const y=c==="outputStep"||c==="outputResult"?"assistant":"user",b={messages:[{id:crypto.randomUUID(),role:y,createdAt:new Date().toISOString(),content:{format:2,parts:[{type:"text",text:o}]}}],phase:c};try{const w=e.safeParse(b);w.success?a(w.data):f(w.error.issues.map(x=>`[${x.path.join(".")}] ${x.message}`))}catch{f(["Error processing input"])}};return p.jsxs("div",{className:"flex flex-col gap-4",children:[d.length>0&&p.jsxs("div",{className:"border border-accent2 rounded-lg p-2",children:[p.jsxs(it,{as:"p",variant:"ui-md",className:"text-accent2 font-semibold",children:[d.length," errors found"]}),p.jsx("ul",{className:"list-disc list-inside",children:d.map((g,y)=>p.jsx("li",{className:"text-ui-sm text-accent2",children:g},y))})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(it,{as:"label",variant:"ui-sm",className:"text-neutral3",children:"Phase"}),p.jsxs(iO,{value:c,onValueChange:u,children:[p.jsx(jx,{className:"w-full",children:p.jsx(oO,{placeholder:"Select phase"})}),p.jsx(Lx,{children:bMe.map(g=>p.jsx(Fx,{value:g.value,children:g.value},g.value))})]}),p.jsx(it,{variant:"ui-xs",className:"text-icon4",children:bMe.find(g=>g.value===c)?.label})]}),p.jsxs("div",{className:"space-y-2",children:[p.jsx(it,{as:"label",variant:"ui-sm",className:"text-neutral3",children:"Test Message"}),p.jsx("textarea",{value:o,onChange:g=>l(g.target.value),placeholder:"Enter a test message...",rows:4,className:"w-full bg-transparent border border-border1 rounded-md p-3 text-ui-sm text-neutral6 placeholder:text-neutral3 focus:outline-none focus:ring-2 focus:ring-accent1"})]}),i,s?null:p.jsx(Ye,{variant:"light",onClick:h,className:"w-full",size:"lg",children:r?p.jsx(Ai,{className:"animate-spin"}):n})]})},oI=async e=>await crt.format(e,{semi:!1,parser:"json",printWidth:80,tabWidth:2,plugins:[unt,Hnt]}),lI=e=>{try{const t=JSON.parse(e);return!!t&&typeof t=="object"}catch{return!1}},$pe=_.createContext(null);function Mpe({children:e}){const{requestContext:t}=Oa(),[r,n]=_.useState(t),a=i=>n(i),s=()=>{n({})};return p.jsx($pe.Provider,{value:{schemaValues:r,setSchemaValues:a,clearSchemaValues:s},children:e})}function dft(){const e=_.useContext($pe);if(!e)throw new Error("useSchemaRequestContext must be used within a SchemaRequestContextProvider");return e}function RF(){const{requestContext:e}=Oa(),r=_.useContext($pe)?.schemaValues??{};return{...e??{},...r}}const nC="text-neutral3 hover:text-neutral6",vMe=e=>{try{return e==null?"{}":JSON.stringify(e,null,2)}catch{return"{}"}},wY=({label:e,value:t,onChange:r,helperText:n,exampleCode:a})=>{const s=Dv(),{handleCopy:i}=vf({text:t}),{handleCopy:o}=vf({text:a??"{}"}),[l,c]=_.useState(null),[u,d]=_.useState(!1),[f,h]=_.useState(!1),g=async()=>{if(c(null),!t.trim()){r("{}");return}if(!lI(t)){c("Invalid JSON");return}try{const y=await oI(t);r(y)}catch{c("Unable to format JSON")}};return p.jsxs(p.Fragment,{children:[f&&p.jsxs("div",{className:"border border-border1 rounded-lg bg-surface3 p-3 space-y-2",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(it,{as:"p",variant:"ui-sm",className:"text-neutral3",children:["Example ",e]}),p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{type:"button",onClick:o,className:nC,"aria-label":"Copy example JSON",children:p.jsx(qe,{children:p.jsx(Jl,{})})})}),p.jsx(sa,{children:"Copy example JSON"})]})]}),p.jsx(Qu,{value:a,theme:s,extensions:[Bu],className:"h-[150px] w-full overflow-y-scroll bg-surface3 rounded-lg overflow-scroll p-3"})]}),p.jsxs(XN,{className:"border border-border1 rounded-lg bg-surface3",open:u,onOpenChange:d,children:[p.jsxs("div",{className:"flex items-center justify-between w-full px-3",children:[p.jsxs("div",{children:[p.jsx(it,{as:"label",variant:"ui-md",className:"text-neutral3",children:e}),n&&p.jsx(it,{variant:"ui-xs",className:"text-neutral3",children:n})]}),p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{type:"button",onClick:g,className:nC,"aria-label":"Format JSON",children:p.jsx(qe,{children:p.jsx(ax,{})})})}),p.jsx(sa,{children:"Format JSON"})]}),p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{type:"button",onClick:i,className:nC,"aria-label":"Copy JSON",children:p.jsx(qe,{children:p.jsx(Jl,{})})})}),p.jsx(sa,{children:"Copy JSON"})]}),a&&p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{type:"button",onClick:()=>h(!f),className:nC,"aria-label":f?"Hide example JSON":"View example JSON",children:p.jsx(qe,{children:f?p.jsx(gDt,{}):p.jsx(bh,{})})})}),p.jsx(sa,{children:"View example JSON"})]}),p.jsx(s_,{asChild:!0,children:p.jsx("button",{type:"button",className:nC,"aria-label":u?`Collapse ${e}`:`Expand ${e}`,children:p.jsx(qe,{className:ne("transition-transform",u?"rotate-0":"-rotate-90"),children:p.jsx(ui,{})})})})]})]}),p.jsxs(i_,{className:"space-y-2",children:[p.jsx(Qu,{value:t,onChange:r,theme:s,extensions:[Bu],className:"h-[260px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"}),l&&p.jsx(it,{variant:"ui-sm",className:"text-accent2",children:l})]})]})]})},SY=({stepKey:e,closeModal:t,isPerStepRun:r,isContinueRun:n,buttonText:a="Start time travel",inputData:s})=>{const{result:i,workflow:o,timeTravelWorkflowStream:l,runId:c,workflowId:u,setDebugMode:d}=_.useContext(am),f=RF(),h=s?{payload:s}:i?.steps?.[e],[g,y]=_.useState(()=>"{}"),[b,w]=_.useState(()=>"{}"),[x,S]=_.useState(()=>"{}"),[E,C]=_.useState(null),[k,A]=_.useState(!1),D=o?.allSteps?.[e],{schema:N}=_.useMemo(()=>{if(!D?.inputSchema)return{schema:YS(tx(),zT())};try{const j=av(D.inputSchema),z=o?.stateSchema?_g(Eg(av(o.stateSchema))):null,U=_g(Eg(j));return{schema:z?Yx({inputData:U,initialState:z.optional()}):U,schemaError:null}}catch(j){return console.error("Failed to parse step schema",j),{schema:YS(tx(),zT())}}},[D?.inputSchema,o?.stateSchema]),P=async j=>{C(null),A(!0);try{const z=g.trim()?JSON.parse(g):{},U=b.trim()?JSON.parse(b):{},$=x.trim()?JSON.parse(x):{},{initialState:F,inputData:V}=j??{},H=o?.stateSchema?V:j,B={runId:c,workflowId:u,step:e,inputData:H,initialState:F,resumeData:Object.keys(z)?.length>0?z:void 0,context:Object.keys(U)?.length>0?U:void 0,nestedStepsContext:Object.keys($)?.length>0?$:void 0,requestContext:f,...n?{perStep:!1}:{}};n&&d(!1),l(B),t()}catch(z){console.error("Invalid JSON provided",z),C(z instanceof Error?z.message:"Error time traveling workflow")}finally{A(!1)}};return p.jsx(ru,{children:p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx(it,{as:"p",variant:"ui-lg",className:"text-neutral3",children:"Input data"}),p.jsxs(it,{variant:"ui-xs",className:"text-neutral3",children:["Step: ",e]})]}),p.jsx(Ppe,{schema:N,defaultValues:h?.payload,isSubmitLoading:k,submitButtonLabel:a,onSubmit:P,children:p.jsxs("div",{className:"space-y-4 pb-4",children:[r||n?null:p.jsxs(p.Fragment,{children:[p.jsx(wY,{label:"Resume Data (JSON)",value:g,onChange:y,helperText:"Provide any resume payloads that should be passed to the step."}),p.jsx(wY,{label:"Context (JSON)",value:b,onChange:w,helperText:"Only include top level steps (no nested workflow steps) that are required in the time travel execution.",exampleCode:vMe({stepId:{status:"success",payload:{value:"test value"},output:{value:"test output"}}})}),p.jsx(wY,{label:"Nested Step Context (JSON)",value:x,onChange:S,helperText:"Includes nested workflow steps that are required in the time travel execution.",exampleCode:vMe({nestedWorkflowId:{stepId:{status:"success",payload:{value:"test value"},output:{value:"test output"}}}})})]}),E&&p.jsx(it,{variant:"ui-sm",className:"text-accent2",children:E})]})})]})})},jpe=({input:e,output:t,resumeData:r,suspendOutput:n,error:a,tripwire:s,mapConfig:i,stepName:o,stepId:l,onShowNestedGraph:c,status:u,stepKey:d,stepsFlow:f})=>{const[h,g]=_.useState(!1),[y,b]=_.useState(!1),[w,x]=_.useState(!1),[S,E]=_.useState(!1),[C,k]=_.useState(!1),[A,D]=_.useState(!1),[N,P]=_.useState(!1),[j,z]=_.useState(!1),{withoutTimeTravel:U,debugMode:$,result:F,runSnapshot:V,timeTravelWorkflowStream:H,runId:B,workflowId:Q,setDebugMode:M}=_.useContext(am),{showMapConfig:W,stepDetail:q,closeStepDetail:I}=NF(),Z=RF(),G=F?.status??V?.status,J="max-w-4xl w-full",K=!U&&d&&!i&&G!=="running"&&G!=="paused",ae=d&&$&&G==="paused",le=_.useMemo(()=>{if(!d||!ae)return;const ye=f?.[d]??[];if(ye.length===0)return;if(ye.length>1)return{hasMultiSteps:!0,input:ye.reduce((Ae,ie)=>(F?.steps?.[ie]?.status==="success"&&(Ae[ie]=F?.steps?.[ie].output),Ae),{})};const Ge=ye[0];if(F?.steps?.[Ge]?.status==="success")return{hasMultiSteps:!1,input:F?.steps?.[Ge].output}},[d,f,ae,F]),ce=ae&&le&&!F?.steps[d],Te=q?.type==="map-config"&&q?.stepName===o,X=q?.type==="nested-graph"&&q?.stepName===o,se="ring-2 ring-accent1 ring-offset-1 ring-offset-transparent",te=()=>{Te?I():W({stepName:o,stepId:l,mapConfig:i})},ve=()=>{X?I():c?.()},ue=ye=>{const Ge={runId:B,workflowId:Q,step:d,inputData:le?.hasMultiSteps?void 0:le?.input,requestContext:Z,...ye?{perStep:!1}:{},...le?.hasMultiSteps?{context:Object.keys(le.input)?.reduce((Ae,ie)=>(Ae[ie]={output:le.input[ie]},Ae),{})}:{}};ye&&M(!1),H(Ge)};return p.jsx(p.Fragment,{children:(e||t||a||s||i||r||c||K||ce)&&p.jsxs("div",{className:ne("flex flex-wrap items-center bg-surface4 border-t border-border1 px-2 py-1 gap-2 rounded-b-lg",u==="success"&&"bg-accent1Dark",u==="failed"&&"bg-accent2Dark",u==="tripwire"&&"bg-amber-900/40 border-amber-500/20",u==="suspended"&&"bg-accent3Dark",u==="waiting"&&"bg-accent5Dark",u==="running"&&"bg-accent6Dark"),children:[c&&p.jsx(Ye,{onClick:ve,className:ne(X&&se),size:"sm",children:"View nested graph"}),K&&p.jsxs(p.Fragment,{children:[p.jsx(Ye,{onClick:()=>D(!0),size:"sm",children:"Time travel"}),p.jsx(zi,{open:A,onOpenChange:D,children:p.jsxs(Ei,{className:J,children:[p.jsxs(Ui,{children:[p.jsxs(Oi,{children:["Time travel to ",d]}),p.jsx(co,{children:"Time travel to a specific workflow step"})]}),p.jsx(xo,{className:"max-h-[600px]",children:p.jsx(SY,{stepKey:d,closeModal:()=>D(!1)})})]})})]}),ce&&p.jsxs(p.Fragment,{children:[p.jsx(Ye,{onClick:()=>{i?ue():z(!0)},size:"sm",children:"Run step"}),p.jsx(zi,{open:j,onOpenChange:z,children:p.jsxs(Ei,{className:J,children:[p.jsxs(Ui,{children:[p.jsxs(Oi,{children:["Run step ",d]}),p.jsx(co,{children:"Run a specific workflow step"})]}),p.jsx(xo,{className:"max-h-[600px]",children:p.jsx(SY,{stepKey:d,closeModal:()=>z(!1),isPerStepRun:!0,buttonText:"Run step",inputData:le?.input})})]})}),p.jsx(Ye,{onClick:()=>{i?ue(!0):P(!0)},size:"sm",children:"Continue run"}),p.jsx(zi,{open:N,onOpenChange:P,children:p.jsxs(Ei,{className:J,children:[p.jsxs(Ui,{children:[p.jsxs(Oi,{children:["Continue run ",d]}),p.jsx(co,{children:"Continue the workflow run from this step"})]}),p.jsx(xo,{className:"max-h-[600px]",children:p.jsx(SY,{stepKey:d,closeModal:()=>P(!1),isContinueRun:!0,buttonText:"Continue run",inputData:le?.input})})]})})]}),i&&p.jsx(Ye,{onClick:te,className:ne(Te&&se),size:"sm",children:"Map config"}),e&&p.jsxs(p.Fragment,{children:[p.jsx(Ye,{onClick:()=>g(!0),size:"sm",children:"Input"}),p.jsx(zi,{open:h,onOpenChange:g,children:p.jsxs(Ei,{className:J,children:[p.jsxs(Ui,{children:[p.jsxs(Oi,{children:[o," input"]}),p.jsx(co,{children:"View the input data for this step"})]}),p.jsx(xo,{children:p.jsx(Gw,{data:e})})]})})]}),r&&p.jsxs(p.Fragment,{children:[p.jsx(Ye,{onClick:()=>x(!0),size:"sm",children:"Resume data"}),p.jsx(zi,{open:w,onOpenChange:x,children:p.jsxs(Ei,{className:J,children:[p.jsxs(Ui,{children:[p.jsxs(Oi,{children:[o," resume data"]}),p.jsx(co,{children:"View the resume data for this step"})]}),p.jsx(xo,{children:p.jsx(Gw,{data:r})})]})})]}),(t??n)&&p.jsxs(p.Fragment,{children:[p.jsx(Ye,{onClick:()=>b(!0),size:"sm",children:"Output"}),p.jsx(zi,{open:y,onOpenChange:b,children:p.jsxs(Ei,{className:J,children:[p.jsxs(Ui,{children:[p.jsxs(Oi,{children:[o," output"]}),p.jsx(co,{children:"View the output data for this step"})]}),p.jsx(xo,{children:p.jsx(Gw,{data:t??n})})]})})]}),a&&p.jsxs(p.Fragment,{children:[p.jsx(Ye,{onClick:()=>E(!0),size:"sm",children:"Error"}),p.jsx(zi,{open:S,onOpenChange:E,children:p.jsxs(Ei,{className:J,children:[p.jsxs(Ui,{children:[p.jsxs(Oi,{children:[o," error"]}),p.jsx(co,{children:"View the error details for this step"})]}),p.jsx(xo,{children:p.jsx(Gw,{data:a})})]})})]}),s&&p.jsxs(p.Fragment,{children:[p.jsx(Ye,{onClick:()=>k(!0),className:"text-amber-400 hover:text-amber-300",size:"sm",children:"Tripwire"}),p.jsx(zi,{open:C,onOpenChange:k,children:p.jsxs(Ei,{className:J,children:[p.jsxs(Ui,{children:[p.jsxs(Oi,{children:[o," tripwire"]}),p.jsx(co,{children:"View the tripwire details for this step"})]}),p.jsx(xo,{children:p.jsx(Gw,{data:{reason:s.reason,retry:s.retry,metadata:s.metadata,processorId:s.processorId}})})]})})]})]})})};function pft({data:e}){const{conditions:t,previousStepId:r,nextStepId:n,withoutTopHandle:a}=e,[s,i]=_.useState(!0),[o,l]=_.useState(!1),c=t[0]?.type,u=(t.some(x=>x.fnString)||t?.length>1)&&c!=="else",{steps:d}=YN(),f=d[r],h=d[n],g=f?.status==="failed"&&f?.tripwire!==void 0,y=g?"tripwire":f?.status,{icon:b,color:w}=hMe(c);return p.jsxs(p.Fragment,{children:[!a&&p.jsx(Zc,{type:"target",position:cr.Top,style:{visibility:"hidden"}}),p.jsxs("div",{"data-workflow-node":!0,"data-workflow-step-status":y,"data-testid":"workflow-condition-node",className:ne("bg-surface3 rounded-lg w-[300px] border border-border1",y==="success"&&h&&"bg-accent1Darker",y==="failed"&&h&&"bg-accent2Darker",y==="tripwire"&&h&&"bg-amber-950/40 border-amber-500/30",!f&&!!h?.status&&"bg-accent1Darker"),children:[p.jsxs(XN,{open:u?s:!0,onOpenChange:x=>{u&&i(x)},children:[p.jsxs(s_,{className:"flex items-center justify-between w-full px-3 py-2",children:[p.jsx(ur,{icon:b?p.jsx(b,{className:"text-current",...w?{style:{color:w}}:{}}):null,children:c?.toUpperCase()}),u&&p.jsx(qe,{children:p.jsx(ui,{className:ne("transition-transform text-neutral3",{"transform rotate-180":s})})})]}),c==="else"?null:p.jsx(i_,{className:"flex flex-col gap-2 pb-2",children:t.map((x,S)=>{const E=x.conj||c,{icon:C,color:k}=hMe(E),A=S===0?null:p.jsx(ur,{icon:C?p.jsx(C,{className:"text-current",...k?{style:{color:k}}:{}}):null,children:x.conj?.toLocaleUpperCase()||"WHEN"});return x.fnString?p.jsxs("div",{className:"px-3",children:[p.jsx(mIe,{theme:Wee.oneDark,code:String(x.fnString).trim(),language:"javascript",children:({className:D,style:N,tokens:P,getLineProps:j,getTokenProps:z})=>p.jsx("pre",{className:ne("relative font-mono p-3 w-full cursor-pointer rounded-lg text-xs !bg-surface4 whitespace-pre-wrap break-words",D,y==="success"&&h&&"!bg-accent1Dark",y==="failed"&&h&&"!bg-accent2Dark",y==="tripwire"&&h&&"!bg-amber-900/40"),onClick:()=>l(!0),style:N,children:P.map((U,$)=>p.jsxs("div",{...j({line:U}),children:[p.jsx("span",{className:"inline-block mr-2 text-neutral3",children:$+1}),U.map((F,V)=>p.jsx("span",{...z({token:F})},V))]},$))})}),p.jsx(zi,{open:o,onOpenChange:l,children:p.jsxs(Ei,{className:"max-w-[30rem]",children:[p.jsxs(Ui,{children:[p.jsx(Oi,{className:"sr-only",children:"Condition Function"}),p.jsx(co,{children:"View the condition function code"})]}),p.jsx(xo,{children:p.jsx(Lh,{className:"w-full",maxHeight:"400px",children:p.jsx(mIe,{theme:Wee.oneDark,code:String(x.fnString).trim(),language:"javascript",children:({className:D,style:N,tokens:P,getLineProps:j,getTokenProps:z})=>p.jsx("pre",{className:`${D} relative font-mono text-sm overflow-x-auto p-3 w-full rounded-lg mt-2 dark:bg-zinc-800`,style:{...N,backgroundColor:"#121212",padding:"0 0.75rem 0 0"},children:P.map((U,$)=>p.jsxs("div",{...j({line:U}),children:[p.jsx("span",{className:"inline-block mr-2 text-neutral3",children:$+1}),U.map((F,V)=>p.jsx("span",{...z({token:F})},V))]},$))})})})})]})})]},`${x.fnString}-${S}`):p.jsx(_.Fragment,{children:x.ref?.step?p.jsxs("div",{className:"flex items-center gap-1",children:[A,p.jsxs(it,{variant:"ui-xs",className:" text-neutral3 flex-1",children:[x.ref.step.id||x.ref.step,"'s ",x.ref.path," ",Object.entries(x.query).map(([D,N])=>`${D} ${String(N)}`)]})]}):null},`${x.ref?.path}-${S}`)})})]}),p.jsx(jpe,{stepName:n,input:f?.output,mapConfig:e.mapConfig,tripwire:g?f?.tripwire:void 0,status:h?y:void 0})]}),p.jsx(Zc,{type:"source",position:cr.Bottom,style:{visibility:"hidden"}})]})}const Zan=(e,t)=>Number(e.toPrecision(t)),fft=({startedAt:e,endedAt:t})=>{const[r,n]=_.useState(e);_.useEffect(()=>{const s=setInterval(()=>{n(Date.now())},100);return()=>clearInterval(s)},[e]);const a=t?t-e:r-e;return p.jsxs("span",{className:"text-xs text-neutral3",children:[Zan(a,3),"ms"]})};function hft({data:e,parentWorkflowName:t,stepsFlow:r}){const{steps:n}=YN(),{label:a,stepId:s,description:i,withoutTopHandle:o,withoutBottomHandle:l,mapConfig:c,duration:u,date:d,isParallel:f,canSuspend:h,isForEach:g}=e,y=t?`${t}.${s||a}`:s||a,b=n[y],w=b?.status==="failed"&&b?.tripwire!==void 0,x=w?"tripwire":b?.status,{isSleepNode:S,isForEachNode:E,isMapNode:C,hasSpecialBadge:k}=sft({duration:u,date:d,isForEach:g,mapConfig:c,canSuspend:h,isParallel:f});return p.jsxs(p.Fragment,{children:[!o&&p.jsx(Zc,{type:"target",position:cr.Top,style:{visibility:"hidden"}}),p.jsxs("div",{"data-workflow-node":!0,"data-workflow-step-status":x??"idle","data-testid":"workflow-default-node",className:ne("bg-surface3 rounded-lg w-[274px] border border-border1",k?"pt-0":"pt-2",x==="success"&&"bg-accent1Darker",x==="failed"&&"bg-accent2Darker",x==="tripwire"&&"bg-amber-950/40 border-amber-500/30",x==="suspended"&&"bg-accent3Darker",x==="waiting"&&"bg-accent5Darker",x==="running"&&"bg-accent6Darker"),children:[k&&p.jsxs("div",{className:"px-3 pt-2 pb-1 flex gap-1.5 flex-wrap",children:[S&&p.jsx(ur,{icon:d?p.jsx(po.sleepUntil,{className:"text-current",style:{color:ki.sleep}}):p.jsx(po.sleep,{className:"text-current",style:{color:ki.sleep}}),children:d?"SLEEP UNTIL":"SLEEP"}),h&&p.jsx(ur,{icon:p.jsx(po.suspend,{className:"text-current",style:{color:ki.suspend}}),children:"SUSPEND/RESUME"}),f&&p.jsx(ur,{icon:p.jsx(po.parallel,{className:"text-current",style:{color:ki.parallel}}),children:"PARALLEL"}),E&&p.jsx(ur,{icon:p.jsx(po.forEach,{className:"text-current",style:{color:ki.forEach}}),children:"FOREACH"}),C&&p.jsx(ur,{icon:p.jsx(po.map,{className:"text-current",style:{color:ki.map}}),children:"MAP"})]}),p.jsxs("div",{className:ne("flex items-center gap-2 px-3",!i&&"pb-2"),children:[p.jsxs(qe,{children:[x==="tripwire"&&p.jsx(VI,{className:"text-amber-400"}),x==="failed"&&p.jsx(kpe,{className:"text-accent2"}),x==="success"&&p.jsx(_pe,{className:"text-accent1"}),x==="suspended"&&p.jsx(B7e,{className:"text-accent3"}),x==="waiting"&&p.jsx(Wse,{className:"text-accent5"}),x==="running"&&p.jsx(Ai,{className:"text-accent6 animate-spin"}),!b&&p.jsx(Hse,{className:"text-neutral2"})]}),p.jsxs(it,{variant:"ui-lg",className:"text-neutral6 font-medium inline-flex items-center gap-1 justify-between w-full",children:[a," ",b?.startedAt&&p.jsx(fft,{startedAt:b.startedAt,endedAt:b.endedAt})]})]}),i&&p.jsx(it,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:i}),u&&p.jsxs(it,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:["sleeps for ",p.jsxs("strong",{children:[u,"ms"]})]}),d&&p.jsxs(it,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:["sleeps until ",p.jsx("strong",{children:new Date(d).toLocaleString()})]}),p.jsx(jpe,{stepName:a,stepId:s,input:b?.input,resumeData:b?.resumeData,output:b?.output,suspendOutput:b?.suspendOutput,error:w?void 0:b?.error,tripwire:w?b?.tripwire:void 0,mapConfig:c,status:x,stepKey:y,stepsFlow:r})]}),!l&&p.jsx(Zc,{type:"source",position:cr.Bottom,style:{visibility:"hidden",color:"red"}})]})}function mft({data:e}){const{steps:t}=e,[r,n]=_.useState(!0);return p.jsxs(XN,{open:r,onOpenChange:n,className:ne("bg-surface4 rounded-md w-[274px] flex flex-col p-2 gap-2"),children:[p.jsx(Zc,{type:"target",position:cr.Top,style:{visibility:"hidden"}}),p.jsxs(s_,{className:"flex items-center justify-between w-full",children:[p.jsx(ur,{icon:p.jsx(po.after,{className:"text-current",style:{color:ki.after}}),children:"AFTER"}),p.jsx(qe,{children:p.jsx(ui,{className:ne("transition-transform text-neutral3",{"transform rotate-180":r})})})]}),p.jsx(i_,{className:"flex flex-col gap-2",children:t.map(a=>p.jsxs("div",{className:"text-sm bg-surface5 flex items-center gap-1.5 rounded-sm p-2",children:[p.jsx(R7e,{className:"text-current w-4 h-4"}),p.jsx(it,{variant:"ui-xs",className:"text-neutral6 capitalize",children:a})]},a))}),p.jsx(Zc,{type:"source",position:cr.Bottom,style:{visibility:"hidden"}})]})}function gft({data:e}){const{result:t}=e;return p.jsxs("div",{"data-testid":"workflow-loop-result-node","data-workflow-step-status":t?"success":"failed",className:ne("bg-surface4 rounded-md w-[274px]"),"data-workflow-node":!0,children:[p.jsx(Zc,{type:"target",position:cr.Top,style:{visibility:"hidden"}}),p.jsx("div",{className:"p-2",children:p.jsxs("div",{className:"text-sm bg-surface5 flex items-center gap-1.5 rounded-sm p-2",children:[t?p.jsx(k7e,{className:"text-current w-4 h-4"}):p.jsx(lL,{className:"text-current w-4 h-4"}),p.jsx(it,{variant:"ui-xs",className:"text-neutral6 capitalize",children:String(t)})]})}),p.jsx(Zc,{type:"source",position:cr.Bottom,style:{visibility:"hidden"}})]})}function yft({data:e,parentWorkflowName:t,stepsFlow:r}){const{steps:n}=YN(),{showNestedGraph:a}=NF(),{label:s,stepId:i,description:o,withoutTopHandle:l,withoutBottomHandle:c,stepGraph:u,mapConfig:d,isParallel:f,canSuspend:h,isForEach:g}=e,y=t?`${t}.${s}`:s,b=t?`${t}.${i||s}`:i||s,w=n[b],x=w?.status==="failed"&&w?.tripwire!==void 0,S=x?"tripwire":w?.status,{isForEachNode:E,isMapNode:C,isNestedWorkflow:k,hasSpecialBadge:A}=sft({isForEach:g,mapConfig:d,canSuspend:h,isParallel:f,stepGraph:u});return p.jsxs(p.Fragment,{children:[!l&&p.jsx(Zc,{type:"target",position:cr.Top,style:{visibility:"hidden"}}),p.jsxs("div",{"data-testid":"workflow-nested-node","data-workflow-node":!0,"data-workflow-step-status":S,className:ne("bg-surface3 rounded-lg w-[274px] border border-border1",A?"pt-0":"pt-2",S==="success"&&"bg-accent1Darker",S==="failed"&&"bg-accent2Darker",S==="tripwire"&&"bg-amber-950/40 border-amber-500/30",S==="suspended"&&"bg-accent3Darker",S==="waiting"&&"bg-accent5Darker",S==="running"&&"bg-accent6Darker"),children:[A&&p.jsxs("div",{className:"px-3 pt-2 pb-1 flex gap-1.5 flex-wrap",children:[h&&p.jsx(ur,{icon:p.jsx(po.suspend,{className:"text-current",style:{color:ki.suspend}}),children:"SUSPEND/RESUME"}),f&&p.jsx(ur,{icon:p.jsx(po.parallel,{className:"text-current",style:{color:ki.parallel}}),children:"PARALLEL"}),k&&p.jsx(ur,{icon:p.jsx(po.workflow,{className:"text-current",style:{color:ki.workflow}}),children:"WORKFLOW"}),E&&p.jsx(ur,{icon:p.jsx(po.forEach,{className:"text-current",style:{color:ki.forEach}}),children:"FOREACH"}),C&&p.jsx(ur,{icon:p.jsx(po.map,{className:"text-current",style:{color:ki.map}}),children:"MAP"})]}),p.jsxs("div",{className:ne("flex items-center gap-2 px-3",!o&&"pb-2"),children:[p.jsxs(qe,{children:[S==="failed"&&p.jsx(kpe,{className:"text-accent2"}),S==="success"&&p.jsx(_pe,{className:"text-accent1"}),S==="tripwire"&&p.jsx(VI,{className:"text-amber-400"}),S==="suspended"&&p.jsx(B7e,{className:"text-accent3"}),S==="waiting"&&p.jsx(Wse,{className:"text-accent5"}),S==="running"&&p.jsx(Ai,{className:"text-accent6 animate-spin"}),!w&&p.jsx(Hse,{className:"text-neutral2"})]}),p.jsxs(it,{variant:"ui-lg",className:"text-neutral6 font-medium inline-flex items-center gap-1 justify-between w-full",children:[s," ",w?.startedAt&&p.jsx(fft,{startedAt:w.startedAt,endedAt:w.endedAt})]})]}),o&&p.jsx(it,{variant:"ui-sm",className:"text-neutral3 px-3 pb-2",children:o}),p.jsx(jpe,{stepName:s,stepId:i,input:w?.input,resumeData:w?.resumeData,output:w?.output,suspendOutput:w?.suspendOutput,error:w?.error,tripwire:x?w?.tripwire:void 0,mapConfig:d,onShowNestedGraph:()=>a({label:s,fullStep:y,stepGraph:u}),status:S,stepKey:b,stepsFlow:r})]}),!c&&p.jsx(Zc,{type:"source",position:cr.Bottom,style:{visibility:"hidden"}})]})}const vj=_.forwardRef(({className:e,...t},r)=>p.jsxs(Dit,{ref:r,className:ne("relative flex w-full touch-none select-none items-center group",e),...t,children:[p.jsx(_9r,{className:ne("relative h-1.5 w-full grow overflow-hidden rounded-full bg-neutral2",Wr.colors),children:p.jsx(k9r,{className:ne("absolute h-full bg-accent1",Wr.all)})}),p.jsx(C9r,{className:ne("block h-4 w-4 rounded-full border-2 border-accent1 bg-white shadow-md","transition-all duration-normal ease-out-custom",Rf,"hover:scale-110 hover:shadow-lg","active:scale-95","disabled:pointer-events-none disabled:opacity-50")})]}));vj.displayName=Dit.displayName;const Lpe=_.forwardRef(({className:e,...t})=>{const{zoom:r}=lSr(),{zoomTo:n,zoomIn:a,zoomOut:s,fitView:i}=b6();return p.jsxs(vN,{className:ne("flex gap-1 rounded-md bg-surface2 p-1 text-neutral6",e),...t,children:[p.jsx(Ye,{onClick:()=>s({duration:300}),children:p.jsx(fIt,{className:"h-4 w-4"})}),p.jsx(vj,{className:"w-[140px]",value:[r],min:.01,max:1,step:.01,onValueChange:o=>{n(o[0])}}),p.jsx(Ye,{onClick:()=>a({duration:300}),children:p.jsx(Vh,{className:"h-4 w-4"})}),p.jsxs(Ye,{className:"min-w-20 tabular-nums",onClick:()=>n(1,{duration:300}),children:[(100*r).toFixed(0),"%"]}),p.jsx(Ye,{onClick:()=>i({duration:300,maxZoom:1}),children:p.jsx(cIt,{className:"h-4 w-4"})})]})});Lpe.displayName="ZoomSlider";function Han({workflow:e}){const{nodes:t,edges:r}=aft(e),[n,a,s]=_Je(t),[i]=kJe(r),{steps:o}=YN(),l=_.useMemo(()=>r.reduce((u,d)=>{if(d.data){const f=d.data.nextStepId,h=d.data.previousStepId;return{...u,[f]:[...new Set([...u[f]||[],h])]}}return u},{}),[r]),c={"default-node":u=>p.jsx(hft,{...u,stepsFlow:l}),"condition-node":pft,"after-node":mft,"loop-result-node":gft,"nested-node":u=>p.jsx(yft,{...u,stepsFlow:l})};return p.jsx("div",{className:"w-full h-full bg-surface1",children:p.jsxs(OJe,{nodes:n,edges:i.map(u=>({...u,style:{...u.style,stroke:o[u.data?.previousStepId]?.status==="success"&&o[u.data?.nextStepId]||u.data?.conditionNode&&!o[u.data?.previousStepId]&&o[u.data?.nextStepId]?.status?"#22c55e":void 0}})),nodeTypes:c,onNodesChange:s,fitView:!0,fitViewOptions:{maxZoom:1},minZoom:.01,maxZoom:1,children:[p.jsx(Lpe,{position:"bottom-left"}),p.jsx(TJe,{variant:Sh.Dots,gap:12,size:.5})]})})}function bft({workflowId:e,workflow:t,isLoading:r}){const{snapshot:n}=_.useContext(am);return r?p.jsx("div",{className:"p-4",children:p.jsx(Gr,{className:"h-full"})}):t?p.jsx(tce,{children:p.jsx(Han,{workflow:n?.serializedStepGraph?{stepGraph:n?.serializedStepGraph}:t})}):p.jsx("div",{className:"grid h-full place-items-center",children:p.jsxs("div",{className:"flex flex-col items-center gap-2",children:[p.jsx(cb,{}),p.jsxs("div",{children:["We couldn't find ",can(e)," workflow."]})]})})}const Gan=e=>e&&Object.keys(e).length===0&&e.constructor===Object;function Qan(e,t){return _.useMemo(()=>Object.entries(e?.steps||{}).filter(([r,{status:n}])=>n==="suspended").map(([r,{suspendPayload:n}])=>({stepId:r,runId:t,suspendPayload:n,isLoading:!1})),[e?.steps,t])}function Wan(e){return _.useMemo(()=>{const t=e?.inputSchema,r=e?.stateSchema,n=t?_g(Eg(av(t))):null,a=r?_g(Eg(av(r))):null;return{zodSchemaToUse:a?Yx({inputData:n,initialState:a.optional()}):n,hasStateSchema:!!r}},[e?.inputSchema,e?.stateSchema])}function Xan({zodSchema:e,isStreaming:t,onExecute:r,defaultValues:n,isViewingRun:a,isProcessorWorkflow:s}){return e?p.jsx(Ppe,{schema:e,defaultValues:n,isSubmitLoading:t,submitButtonLabel:"Run",onSubmit:r,withoutSubmit:a,isProcessorWorkflow:s}):a?null:p.jsx(Ye,{className:"w-full",variant:"light",disabled:t,onClick:()=>r(null),children:t?p.jsx(qe,{children:p.jsx(Ai,{className:"animate-spin"})}):"Trigger"})}function Yan({suspendedSteps:e,workflow:t,isStreaming:r,onResume:n}){return r||e.length===0?null:p.jsx(p.Fragment,{children:e.map(a=>{const s=t.allSteps[a.stepId];if(!s||s.isWorkflow)return null;const i=s?.resumeSchema?_g(Eg(av(s.resumeSchema))):YS(tx(),zT());return p.jsxs("div",{className:"flex flex-col px-4",children:[p.jsx(it,{variant:"ui-xs",className:"text-neutral3",children:a.stepId}),a.suspendPayload&&p.jsx("div",{"data-testid":"suspended-payload",children:p.jsx($u,{data:a.suspendPayload,className:"w-full overflow-x-auto p-2",showCopyButton:!1})}),p.jsx(Ppe,{schema:i,isSubmitLoading:r,submitButtonLabel:"Resume workflow",onSubmit:o=>{const l=a.stepId?.split(".");n({stepId:l,runId:a.runId,suspendPayload:a.suspendPayload,resumeData:o,isLoading:!1})}})]},a.stepId)})})}const Kan=["success","failed","canceled","tripwire"];function Jan({status:e,cancelMessage:t,isCancelling:r,onCancel:n}){return e!=="running"?null:p.jsxs(Ye,{variant:"light",className:"w-full",onClick:n,disabled:!!t||r||e&&Kan.includes(e),children:[r?p.jsx(qe,{children:p.jsx(Ai,{className:"animate-spin"})}):p.jsx(qe,{children:p.jsx(T7e,{})}),t||"Cancel Workflow Run"]})}const esn=({header:e,children:t,footer:r})=>{const[n,a]=_.useState(!1);return p.jsxs("div",{className:"rounded-lg border border-border1 bg-surface4",children:[p.jsxs("button",{className:"py-1 px-2 flex items-center gap-3 justify-between w-full",onClick:()=>a(s=>!s),children:[p.jsx("div",{className:"w-full",children:e}),p.jsx(qe,{children:p.jsx(ui,{className:ne("text-neutral3 transition-transform -rotate-90",n&&"rotate-0")})})]}),t&&n&&p.jsx("div",{className:"border-t border-border1 max-h-[400px] overflow-y-auto",children:t}),r&&p.jsx("div",{className:"py-1 px-2 border-t border-border1",children:r})]})},tsn=({stepId:e,status:t,result:r,tripwire:n})=>{const[a,s]=_.useState(!1),i=t==="tripwire",o=!!(n&&(n.retry!==void 0||n.metadata!==void 0||n.processorId!==void 0));return p.jsx(esn,{header:p.jsxs("div",{className:"flex items-center gap-3",children:[p.jsxs(qe,{children:[t==="success"&&p.jsx(_pe,{className:"text-accent1"}),t==="failed"&&p.jsx(kpe,{className:"text-accent2"}),t==="tripwire"&&p.jsx(VI,{className:"text-amber-400"}),t==="suspended"&&p.jsx(C7e,{className:"text-accent3"}),t==="waiting"&&p.jsx(Wse,{className:"text-accent5"}),t==="running"&&p.jsx(Ai,{className:"text-accent6 animate-spin"})]}),p.jsx(it,{as:"span",variant:"ui-lg",className:"text-neutral6 font-medium",children:e.charAt(0).toUpperCase()+e.slice(1)})]}),children:i&&n?p.jsx(rsn,{tripwire:n,isExpanded:a,onToggleExpand:()=>s(!a),hasMetadata:o}):p.jsx($u,{data:r})})},rsn=({tripwire:e,isExpanded:t,onToggleExpand:r,hasMetadata:n})=>p.jsxs("div",{className:"rounded-lg border border-amber-500/30 bg-amber-950/20 overflow-hidden",children:[p.jsxs("div",{className:"flex items-start gap-3 p-4",children:[p.jsx(VI,{className:"w-5 h-5 text-amber-400 mt-0.5 flex-shrink-0"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("p",{className:"text-sm font-medium text-amber-200 mb-1",children:"Content Blocked"}),p.jsx("p",{className:"text-sm text-amber-300/90",children:e.reason||"Tripwire triggered"})]})]}),n&&p.jsxs(p.Fragment,{children:[p.jsxs("button",{onClick:r,className:"w-full flex items-center gap-2 px-4 py-2 text-xs text-amber-400/70 hover:text-amber-400 hover:bg-amber-900/20 transition-colors border-t border-amber-500/20",children:[t?p.jsx(ui,{className:"w-3.5 h-3.5"}):p.jsx(Vl,{className:"w-3.5 h-3.5"}),p.jsx("span",{children:"Details"})]}),t&&p.jsxs("div",{className:"px-4 pb-4 space-y-3 border-t border-amber-500/20 bg-amber-950/10",children:[e.retry!==void 0&&p.jsxs("div",{className:"flex items-center gap-2 pt-3",children:[p.jsx(UI,{className:"w-3.5 h-3.5 text-amber-400/60"}),p.jsxs("span",{className:"text-xs text-amber-300/70",children:["Retry:"," ",e.retry?p.jsx("span",{className:"text-green-400",children:"Allowed"}):p.jsx("span",{className:"text-red-400",children:"Not allowed"})]})]}),e.processorId&&p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx(U7e,{className:"w-3.5 h-3.5 text-amber-400/60"}),p.jsxs("span",{className:"text-xs text-amber-300/70",children:["Processor:"," ",p.jsx("code",{className:"px-1.5 py-0.5 rounded bg-amber-900/30 text-amber-200 font-mono",children:e.processorId})]})]}),e.metadata!==void 0&&e.metadata!==null&&p.jsxs("div",{className:"pt-1",children:[p.jsx("p",{className:"text-xs text-amber-400/60 mb-1.5",children:"Metadata:"}),p.jsx("pre",{className:"text-xs text-amber-200/80 bg-amber-900/30 rounded p-2 overflow-x-auto font-mono",children:String(JSON.stringify(e.metadata,null,2))})]})]})]})]});function nsn({steps:e,workflowResult:t}){const r=Object.entries(e).filter(([n,a])=>n!=="input"&&!n.endsWith(".input"));return r.length===0?null:p.jsxs("div",{className:"flex flex-col gap-2 pt-5 border-t border-border1",children:[p.jsx(it,{variant:"ui-xs",className:"text-neutral3",children:"Status"}),p.jsx("div",{className:"flex flex-col gap-4",children:r.map(([n,a])=>{const{status:s}=a;let i,o,l;a.status==="suspended"&&(o=a.suspendOutput),a.status==="success"&&(i=a.output),a.status==="failed"&&(l=a.error);const c=a.status==="failed"&&a.tripwire?a.tripwire:t?.status==="tripwire"?{reason:t?.tripwire?.reason,retry:t?.tripwire?.retry,metadata:t?.tripwire?.metadata,processorId:t?.tripwire?.processorId}:void 0,u=a.status==="failed"&&a.tripwire?"tripwire":s;return p.jsx(tsn,{stepId:n,status:u,result:i??o??l??{},tripwire:c},n)})})]})}function vft({workflowId:e,paramsRunId:t,setRunId:r,workflow:n,isLoading:a,createWorkflowRun:s,resumeWorkflow:i,streamWorkflow:o,observeWorkflowStream:l,isStreamingWorkflow:c,streamResult:u,isCancellingWorkflowRun:d,cancelWorkflowRun:f}){const h=RF(),{result:g,setResult:y,payload:b,setPayload:w,setRunId:x}=_.useContext(am),[S,E]=_.useState(""),[C,k]=_.useState(null),A=g??u,D=Qan(A,S),{zodSchemaToUse:N,hasStateSchema:P}=Wan(n),j=async H=>{try{if(!n)return;k(null),y(null);const B=await s({workflowId:e});r?.(B.runId),E(B.runId),x(B.runId);const{initialState:Q,inputData:M}=H??{},W=P?M:H;o({workflowId:e,runId:B.runId,inputData:W,initialState:Q,requestContext:h})}catch{fr.error("Error executing workflow")}},z=async H=>{if(!n)return;k(null);const{stepId:B,runId:Q,resumeData:M}=H,W=await s({workflowId:e,prevRunId:Q});await i({step:B,runId:W.runId,resumeData:M,workflowId:e,requestContext:h})},U=async()=>{const H=await f({workflowId:e,runId:S});k(H)};if(_.useEffect(()=>{t&&l&&(l({workflowId:e,runId:t}),E(t),x(t))},[t]),_.useEffect(()=>{u&&y(u)},[u]),a)return p.jsx(Lh,{className:"h-[calc(100vh-126px)] pt-2 px-4 pb-4 text-xs",children:p.jsxs("div",{className:"space-y-4",children:[p.jsx(Gr,{className:"h-10"}),p.jsx(Gr,{className:"h-10"})]})});if(!n)return null;const $=D.length>0,F=A?.steps??{},V=Object.values(F).length>0;return p.jsxs("div",{className:"h-full pt-3 overflow-y-auto",children:[p.jsxs("div",{className:"space-y-4 px-5 pb-5 border-b border-border1",children:[$&&c&&p.jsxs("div",{className:"py-2 px-5 flex items-center gap-2 bg-surface5 -mx-5 -mt-5 border-b border-border1",children:[p.jsx(qe,{children:p.jsx(Ai,{className:"animate-spin text-neutral6"})}),p.jsx(it,{children:"Resuming workflow"})]}),!$&&p.jsx(Xan,{zodSchema:N,defaultValues:b,isStreaming:c,onExecute:H=>{w(H),j(H)},isViewingRun:!!t,isProcessorWorkflow:n?.isProcessorWorkflow}),p.jsx(Yan,{suspendedSteps:D,workflow:n,isStreaming:c,onResume:z}),p.jsx(Jan,{status:g?.status,cancelMessage:C?.message??null,isCancelling:d,onCancel:U}),V&&p.jsx(nsn,{steps:F,workflowResult:A})]}),g&&!Gan(g)&&p.jsx("div",{className:"p-5 border-b border-border1",children:p.jsx(asn,{result:g})})]})}const asn=({result:e})=>{const[t,r]=_.useState(!1);return p.jsxs(p.Fragment,{children:[p.jsxs(Ye,{variant:"light",onClick:()=>r(!0),className:"w-full truncate",children:[p.jsx(qe,{children:p.jsx(ax,{className:"text-neutral3"})}),"Open Workflow Execution (JSON)"]}),p.jsx(zi,{open:t,onOpenChange:r,children:p.jsxs(Ei,{className:"max-w-6xl",children:[p.jsxs(Ui,{children:[p.jsx(Oi,{children:"Workflow Execution (JSON)"}),p.jsx(co,{children:"JSON view of the workflow execution result"})]}),p.jsx(xo,{className:"max-h-[90vh]",children:p.jsx($u,{data:e,className:"p-4"})})]})})]})},ssn=({workflowId:e,runId:t,observeWorkflowStream:r,...n})=>{const{runSnapshot:a,isLoadingRunExecutionResult:s}=_.useContext(am);if(s)return p.jsx("div",{className:"p-4",children:p.jsx(Gr,{className:"h-[600px]"})});if(!a||!t)return p.jsx("div",{className:"p-4",children:p.jsx(it,{variant:"ui-md",className:"text-neutral6 text-center",children:"No previous run"})});const i=Mre(a),o=i?.status;if(t)return p.jsx("div",{className:"h-full grid grid-rows-[1fr_auto]",children:p.jsx(vft,{...n,paramsRunId:t,workflowId:e,observeWorkflowStream:()=>{o!=="success"&&o!=="failed"&&o!=="canceled"&&r?.({workflowId:e,runId:t,storeRunResult:i})}})})};function c_({iconSlot:e,titleSlot:t,descriptionSlot:r,actionSlot:n,className:a,as:s="h3"}){return p.jsxs("div",{className:ne("flex flex-col items-center justify-center text-center py-10 px-6","transition-opacity duration-normal ease-out-custom",a),children:[e&&p.jsx("div",{className:"mb-4",children:e}),p.jsx(s,{className:"font-medium text-neutral5 text-ui-md",children:t}),r&&p.jsx("p",{className:"mt-1.5 text-neutral3 text-ui-sm max-w-md",children:r}),n&&p.jsx("div",{className:"mt-5",children:n})]})}const isn={default:"[&>tbody>tr]:h-table-row",small:"[&>tbody>tr]:h-table-row-small"},dp=({className:e,children:t,size:r="default",style:n})=>p.jsx("table",{className:ne("w-full",isn[r],e),style:n,children:t}),pp=({className:e,children:t})=>p.jsx("thead",{children:p.jsx("tr",{className:ne("h-table-header border-b border-border1 bg-surface2/80",e),children:t})}),Wi=({className:e,children:t,...r})=>p.jsx("th",{className:ne("text-neutral2 text-ui-xs h-full whitespace-nowrap text-left font-medium uppercase tracking-wide first:pl-3 last:pr-3",e),...r,children:t}),fp=({className:e,children:t,...r})=>p.jsx("tbody",{className:ne("",e),...r,children:t}),hp=_.forwardRef(({className:e,children:t,selected:r=!1,style:n,onClick:a,isActive:s=!1,...i},o)=>{const l=_.useRef(null);_.useEffect(()=>{o&&(typeof o=="function"?o(l.current):o.current=l.current)},[o]),_.useEffect(()=>{s&&l.current&&(l.current.focus(),l.current.scrollIntoView({block:"nearest"}))},[s]);const c=u=>{u.key==="Enter"&&a&&a()};return p.jsx("tr",{className:ne("border-b border-border1","transition-colors duration-normal ease-out-custom","hover:bg-surface3","focus:bg-surface3 focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent1/50",r&&"bg-surface4",a&&"cursor-pointer",e),style:n,onClick:a,ref:l,tabIndex:a?0:void 0,onKeyDown:c,"data-active":s||void 0,...i,children:t})}),Gs=({className:e,children:t,...r})=>p.jsx("td",{className:ne("text-neutral5 first:pl-3 last:pr-3",e),...r,children:p.jsx("div",{className:ne("flex h-full w-full shrink-0 items-center"),children:t})}),u_=({name:e,description:t,icon:r,meta:n,...a})=>p.jsx(Gs,{...a,children:p.jsxs("div",{className:"flex items-center gap-3.5",children:[r&&p.jsx(qe,{size:"lg",className:"text-neutral5",children:r}),p.jsxs("div",{className:"flex flex-col gap-0",children:[p.jsx(it,{as:"span",variant:"ui-md",className:"text-neutral6 !leading-tight",children:e}),t&&p.jsx(it,{as:"span",variant:"ui-xs",className:"text-neutral3 w-full max-w-[300px] truncate !leading-tight pt-1",children:t})]}),n]})});function d_({itemCount:e,initialIndex:t=-1,wrap:r=!1,onSelect:n,global:a=!1}){const[s,i]=_.useState(t),o=_.useCallback(c=>{if(e!==0)switch(c.key){case"ArrowDown":{c.preventDefault(),i(u=>u===-1?0:u>=e-1?r?0:e-1:u+1);break}case"ArrowUp":{c.preventDefault(),i(u=>u===-1?e-1:u<=0?r?e-1:0:u-1);break}case"Home":{c.preventDefault(),i(0);break}case"End":{c.preventDefault(),i(e-1);break}case"Enter":{s>=0&&n&&(c.preventDefault(),n(s));break}}},[e,r,s,n]);_.useEffect(()=>{if(a)return document.addEventListener("keydown",o),()=>{document.removeEventListener("keydown",o)}},[a,o]);const l=_.useCallback(()=>a?null:{onKeyDown:o,tabIndex:0},[a,o]);return{activeIndex:s,setActiveIndex:i,getKeyboardProps:l}}const xMe=40,g$=150,wMe=10,p_=({className:e,children:t,scrollSpeed:r=100,scrollIntervalTime:n=20})=>{const a=_.useRef(null),s=_.useRef(null),[i,o]=_.useState(0),[l,c]=_.useState(0),[u,d]=_.useState(0),[f,h]=_.useState(0),[g,y]=_.useState(!1),[b,w]=_.useState(!1);_.useEffect(()=>{const C=()=>{if(!a.current)return;const N=a.current.scrollLeft<a.current.scrollWidth-a.current.clientWidth;y(N),o(a.current.clientHeight);const P=a.current.getBoundingClientRect();c(P.right),h(P.left),d(P.top)};C();const k=new ResizeObserver(C);a.current&&k.observe(a.current);const A=()=>{if(!a.current)return;const N=a.current.scrollLeft>0,P=a.current.scrollLeft<a.current.scrollWidth-a.current.clientWidth;w(N),y(P),C()};a?.current?.addEventListener("scroll",A);const D=a.current;return()=>{D&&(k.unobserve(D),D.removeEventListener("scroll",A))}},[]);const x=({isVisible:C,position:k,containerHeight:A,containerTop:D,containerRight:N,onStartScrolling:P,onStopScrolling:j})=>{if(!C)return null;const z={top:A<g$?D:D+(A-g$)/2,width:xMe,height:A<g$?`${A}px`:`${g$}px`};return p.jsxs("button",{onMouseDown:P,onTouchStart:P,onMouseUp:j,onTouchEnd:j,onTouchCancel:j,className:"bg-surface4 text-neutral3 border-surface5 hover:border-neutral3 fixed z-10 flex items-center justify-center rounded-lg border text-2xl hover:text-white",style:{...z,left:k==="left"?f+wMe:N-xMe-wMe},children:[" ",k==="left"?"«":"»"]})},S=_.useCallback((C,k)=>{k?.preventDefault(),k?.stopPropagation(),s.current&&(clearInterval(s.current),s.current=null),a.current&&a.current.scrollBy({left:C==="right"?r*2:-r*2,behavior:"smooth"}),s.current=setInterval(()=>{a.current&&a.current.scrollBy({left:C==="right"?r:-r,behavior:"smooth"})},n)},[r,n]),E=_.useCallback(()=>{s.current&&(clearInterval(s.current),s.current=null)},[]);return p.jsxs("div",{ref:a,className:ne("relative max-h-full overflow-auto",e),children:[t,p.jsx(x,{isVisible:b,position:"left",containerHeight:i,containerTop:u,containerRight:l,onStartScrolling:C=>S("left",C),onStopScrolling:E}),p.jsx(x,{isVisible:g,position:"right",containerHeight:i,containerTop:u,containerRight:l,onStartScrolling:C=>S("right",C),onStopScrolling:E})]})},osn=[{id:"name",header:"Name",cell:({row:e})=>{const{Link:t,paths:r}=an(),n=e.original;return p.jsx(u_,{name:p.jsx(t,{href:r.workflowLink(e.original.id),children:e.original.name}),description:n.description,meta:void 0})},meta:{width:"auto"}},{id:"stepsCount",header:"Steps",size:300,cell:({row:e})=>{const t=e.original,r=Object.keys(t.steps??{}).length;return p.jsx(Gs,{children:p.jsx("div",{className:"flex justify-end items-center gap-2",children:p.jsxs(ur,{icon:p.jsx(R7e,{}),className:"!h-form-sm",children:[r," step",r>1?"s":""]})})})}}],SMe={sm:Co.sm,md:Co.md,lg:Co.lg},f_=({onSearch:e,label:t,placeholder:r,debounceMs:n=300,size:a="md"})=>{const s=_.useId(),i=_.useRef(null),o=C6(c=>{e(c)},n);_.useEffect(()=>()=>{o.cancel()},[o]),_.useEffect(()=>{const c=i.current;if(!c)return;const u=d=>{d.key.toLowerCase()==="f"&&d.shiftKey&&(d.ctrlKey||d.metaKey)&&(d.preventDefault(),c.focus())};return window.addEventListener("keydown",u),()=>{window.removeEventListener("keydown",u)}},[]);const l=c=>{o(c.target.value)};return p.jsxs("div",{className:ne("border border-border1 flex w-full items-center gap-2 overflow-hidden pl-2 pr-1",HN,cnn,Wr.all,"hover:border-neutral2",SMe[a]),children:[p.jsx(Tg,{className:ne("text-neutral3 h-4 w-4",Wr.colors)}),p.jsxs("div",{className:"flex-1",children:[p.jsx("label",{htmlFor:s,className:"sr-only",children:t}),p.jsx("input",{id:s,type:"text",placeholder:r,className:ne("bg-transparent text-ui-md placeholder:text-neutral3 block w-full px-2 outline-none",SMe[a]),name:s,ref:i,onChange:l})]})]})},h_=({children:e})=>p.jsx("div",{className:"px-3 py-2.5 border-b border-border1",children:e});function lsn({workflows:e,isLoading:t}){const[r,n]=_.useState(""),{navigate:a,paths:s}=an(),i=_.useMemo(()=>Object.keys(e??{}).map(h=>{const g=e[h];return{id:h,...g}}),[e]),o=_.useMemo(()=>i.filter(f=>f.name.toLowerCase().includes(r.toLowerCase())),[i,r]),{activeIndex:l}=d_({itemCount:o.length,global:!0,onSelect:f=>{const h=o[f];h&&a(s.workflowLink(h.id))}}),c=WO({data:o,columns:osn,getCoreRowModel:QO()}),u=c.getHeaderGroups()[0],d=c.getRowModel().rows;return i.length===0&&!t?p.jsx(usn,{}):p.jsxs("div",{children:[p.jsx(h_,{children:p.jsx(f_,{onSearch:n,label:"Search workflows",placeholder:"Search workflows"})}),t?p.jsx(csn,{}):p.jsx(p_,{children:p.jsxs(dp,{children:[p.jsx(pp,{className:"sticky top-0",children:u.headers.map(f=>p.jsx(Wi,{style:{width:f.index===0?"auto":f.column.getSize()},children:tp(f.column.columnDef.header,f.getContext())},f.id))}),p.jsx(fp,{children:d.map((f,h)=>p.jsx(hp,{isActive:h===l,onClick:()=>a(s.workflowLink(f.original.id)),children:f.getVisibleCells().map(g=>p.jsx(we.Fragment,{children:tp(g.column.columnDef.cell,g.getContext())},g.id))},f.id))})]})})]})}const csn=()=>p.jsxs(dp,{children:[p.jsxs(pp,{children:[p.jsx(Wi,{children:"Name"}),p.jsx(Wi,{width:300,children:"Steps"})]}),p.jsx(fp,{children:Array.from({length:3}).map((e,t)=>p.jsxs(hp,{children:[p.jsx(Gs,{children:p.jsx(Gr,{className:"h-4 w-1/2"})}),p.jsx(Gs,{width:300,children:p.jsx(Gr,{className:"h-4 w-1/2"})})]},t))})]}),usn=()=>p.jsx("div",{className:"flex h-full items-center justify-center",children:p.jsx(c_,{iconSlot:p.jsx(Dnn,{}),titleSlot:"Configure Workflows",descriptionSlot:"Mastra workflows are not configured yet. You can find more information in the documentation.",actionSlot:p.jsxs(Ye,{size:"lg",className:"w-full",variant:"light",as:"a",href:"https://mastra.ai/en/docs/workflows/overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Xc,{})}),"Docs"]})})}),xft=({icon:e,title:t,isLoading:r,children:n})=>p.jsxs("div",{className:"p-5 w-full overflow-x-hidden",children:[p.jsxs("div",{className:"text-neutral6 flex items-center gap-2",children:[p.jsx(qe,{size:"lg",className:"bg-surface4 rounded-md p-1",children:e}),r?p.jsx(Gr,{className:"h-3 w-1/3"}):p.jsx("div",{className:"flex min-w-0 items-center gap-4",children:p.jsx(it,{variant:"header-md",as:"h2",className:"truncate font-medium",children:t})})]}),n&&p.jsx("div",{className:"pt-2",children:n})]}),PF=({children:e,defaultTab:t,value:r,onValueChange:n,className:a})=>{const[s,i]=_.useState(t),o=r!==void 0&&n!==void 0,l=o?r:s,c=u=>{const d=u;o?n(d):i(d)};return p.jsx(v8r,{value:l,onValueChange:c,className:ne("overflow-y-auto",a),children:e})},$F=({children:e,variant:t="default",className:r})=>p.jsx("div",{className:ne("w-full overflow-x-auto",r),children:p.jsx(x8r,{className:ne("flex items-center relative",{"text-ui-lg":t==="default","[&>button]:py-2 [&>button]:px-6 [&>button]:font-normal [&>button]:text-neutral3 [&>button]:flex-1 [&>button]:border-b [&>button]:border-border1":t==="default",[`[&>button]:${Wr.colors} [&>button]:hover:text-neutral4`]:t==="default","[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:border-accent1":t==="default","border border-border1 flex justify-stretch rounded-md overflow-hidden text-ui-md min-h-[2.5rem]":t==="buttons",[`[&>button]:flex-1 [&>button]:py-2 [&>button]:px-4 [&>button]:text-neutral3 [&>button]:${Wr.all}`]:t==="buttons","[&>button]:hover:text-neutral4 [&>button]:hover:bg-surface3":t==="buttons","[&>button[data-state=active]]:text-neutral5 [&>button[data-state=active]]:bg-surface4 [&>button[data-state=active]]:shadow-inner":t==="buttons"},r),children:e})}),Iu=({children:e,value:t,onClick:r,onClose:n,className:a})=>p.jsxs(w8r,{value:t,className:ne("text-xs p-3 text-neutral3 whitespace-nowrap flex-shrink-0 flex items-center justify-center gap-1.5",Wr.all,GN.visible,"hover:text-neutral4","data-[state=active]:text-neutral5 data-[state=active]:border-b-2 data-[state=active]:border-accent1",a),onClick:r,children:[e,n&&p.jsx("button",{onClick:s=>{s.stopPropagation(),n()},className:ne("p-0.5 hover:bg-surface4 rounded",Wr.colors,"hover:text-neutral5"),"aria-label":"Close tab",children:p.jsx(rl,{className:"w-3 h-3"})})]}),Zp=({children:e,value:t,className:r})=>p.jsx(S8r,{value:t,className:ne("grid py-3 overflow-y-auto ring-offset-background",GN.visible,r),children:e}),dsn=()=>{const{debugMode:e,setDebugMode:t}=_.useContext(am);return p.jsxs(p.Fragment,{children:[p.jsx(it,{as:"h3",variant:"ui-md",className:"text-neutral3",children:"Debug Mode"}),p.jsx(o_,{checked:e,onCheckedChange:r=>t(r)})]})},wft=()=>{const e=Dv(),{settings:t,setSettings:r,entityType:n}=Ipe(),a=i=>{if(!i)return r({...t,tracingOptions:void 0});try{const o=JSON.parse(i);typeof o=="object"&&o!==null&&r({...t,tracingOptions:o})}catch{}};let s="{}";try{s=JSON.stringify(t?.tracingOptions,null,2)}catch{}return p.jsxs("div",{className:"space-y-2 px-5 py-2",children:[p.jsx(it,{as:"h3",variant:"ui-md",className:"text-neutral3",children:"Tracing Options"}),p.jsx(Qu,{value:s,onChange:a,theme:e,extensions:[Bu],className:"h-[400px] overflow-y-scroll bg-surface3 rounded-lg overflow-hidden p-3"}),n==="workflow"&&p.jsx(dsn,{})]})},psn={sm:"w-4 h-4",md:"w-6 h-6",lg:"w-8 h-8"};function Qs({color:e,className:t,size:r="md"}){return p.jsx("svg",{className:ne("animate-spin",psn[r],t),style:{animationDuration:"800ms",animationTimingFunction:"cubic-bezier(0.4, 0, 0.2, 1)"},xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:p.jsx("path",{d:"M21 12a9 9 0 1 1-6.219-8.56",stroke:e||"currentColor",className:"text-accent1"})})}function fsn({stepGraph:e,open:t,workflowName:r}){const{nodes:n,edges:a}=aft({stepGraph:e}),[s,i]=_.useState(!1),[o,l,c]=_Je(n),[u]=kJe(a),{steps:d}=YN(),f=_.useMemo(()=>a.reduce((g,y)=>{if(y.data){const b=y.data.nextStepId,w=y.data.previousStepId;return{...g,[b]:[...new Set([...g[b]||[],w])]}}return g},{}),[a]),h={"default-node":g=>p.jsx(hft,{parentWorkflowName:r,...g,stepsFlow:f}),"condition-node":pft,"after-node":mft,"loop-result-node":gft,"nested-node":g=>p.jsx(yft,{parentWorkflowName:r,...g,stepsFlow:f})};return _.useEffect(()=>{t&&setTimeout(()=>{i(!0)},500)},[t]),p.jsx("div",{className:"w-full h-full relative bg-surface1",children:s?p.jsxs(OJe,{nodes:o,edges:u.map(g=>({...g,style:{...g.style,stroke:d[`${r}.${g.data?.previousStepId}`]?.status==="success"&&d[`${r}.${g.data?.nextStepId}`]||g.data?.conditionNode&&!d[`${r}.${g.data?.previousStepId}`]&&d[`${r}.${g.data?.nextStepId}`]?.status?"#22c55e":void 0}})),fitView:!0,fitViewOptions:{maxZoom:1},minZoom:.01,maxZoom:1,nodeTypes:h,onNodesChange:c,children:[p.jsx(Lpe,{position:"bottom-left"}),p.jsx(TJe,{variant:Sh.Lines,gap:12,size:.5})]}):p.jsx("div",{className:"w-full h-full flex items-center justify-center",children:p.jsx(Qs,{})})})}function hsn(){const{stepDetail:e,closeStepDetail:t}=NF();return e?p.jsxs("div",{className:"flex flex-col h-full",children:[p.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-border1 bg-surface1",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[e.type==="map-config"&&p.jsx(gK,{className:"w-4 h-4",style:{color:ki.map}}),e.type==="nested-graph"&&p.jsx(Xc,{className:"w-4 h-4",style:{color:ki.workflow}}),p.jsxs("div",{className:"flex flex-col",children:[p.jsx(it,{variant:"ui-md",className:"text-neutral6 font-medium",children:e.type==="map-config"?`${e.stepName} Config`:`${e.stepName} Workflow`}),e.type==="map-config"&&e.stepId&&e.stepId!==e.stepName&&p.jsx(it,{variant:"ui-xs",className:"text-neutral3",children:e.stepId})]})]}),p.jsx("button",{onClick:t,className:"p-1 hover:bg-surface3 rounded transition-colors","aria-label":"Close",children:p.jsx(rl,{className:"w-4 h-4 text-neutral3"})})]}),p.jsxs("div",{className:"flex-1 overflow-auto",children:[e.type==="map-config"&&e.mapConfig&&p.jsx(Gw,{data:e.mapConfig}),e.type==="nested-graph"&&e.nestedGraph&&p.jsx("div",{className:"h-full min-h-[400px]",children:p.jsx(tce,{children:p.jsx(fsn,{stepGraph:e.nestedGraph.stepGraph,open:!0,workflowName:e.nestedGraph.fullStep})},e.nestedGraph.fullStep)})]})]}):null}const Fpe=({requestContextSchema:e})=>{const{setSchemaValues:t,schemaValues:r}=dft(),n=JSON.stringify(r),a=_.useMemo(()=>{try{const s=av(e);return _g(Eg(s))}catch(s){return console.error("Failed to parse requestContextSchema:",s),null}},[e]);return a?p.jsxs("div",{className:"space-y-4",children:[p.jsxs("div",{className:"flex items-center justify-between",children:[p.jsx(it,{as:"span",variant:"ui-md",className:"text-neutral3",children:"Request Context"}),p.jsx(Zu,{content:n})]}),p.jsx(Rpe,{schema:a,onValuesChange:t,defaultValues:r})]}):p.jsx("div",{className:"text-neutral3",children:p.jsx(it,{variant:"ui-sm",children:"Failed to parse request context schema"})})};function msn({workflowId:e,initialRunId:t}){const{data:r,isLoading:n,error:a}=WN(e),{createWorkflowRun:s,streamWorkflow:i,streamResult:o,isStreamingWorkflow:l,observeWorkflowStream:c,closeStreamsAndReset:u,resumeWorkflow:d,cancelWorkflowRun:f,isCancellingWorkflowRun:h}=_.useContext(am),{stepDetail:g,closeStepDetail:y}=NF(),[b,w]=_.useState("current-run"),[x,S]=_.useState(""),{handleCopy:E}=vf({text:e}),C=Object.keys(r?.steps??{}).length,k=_.useMemo(()=>g?g.type==="map-config"?"Map Config":g.type==="nested-graph"?"Nested Workflow":"Node":null,[g]);_.useEffect(()=>{!x&&!t&&u()},[x,t]),_.useEffect(()=>{if(a){const D=a instanceof Error?a.message:"Failed to load workflow";fr.error(`Error loading workflow: ${D}`)}},[a]),_.useEffect(()=>{g?w("node-details"):b==="node-details"&&w("current-run")},[g]);const A=D=>{b==="node-details"&&D!=="node-details"&&y(),w(D)};return a?null:p.jsxs("div",{className:"grid grid-rows-[auto_1fr] h-full overflow-y-auto",children:[p.jsx(xft,{icon:p.jsx(Xc,{}),title:r?.name||"",isLoading:n,children:p.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[p.jsxs(fa,{children:[p.jsx(ha,{asChild:!0,children:p.jsx("button",{onClick:E,className:"h-badge-default",children:p.jsx(ur,{icon:p.jsx(Jl,{}),variant:"default",children:e})})}),p.jsx(sa,{children:"Copy Workflow ID for use in code"})]}),p.jsxs(ur,{children:[C," step",C>1?"s":""]}),r?.isProcessorWorkflow&&p.jsx(ur,{icon:p.jsx(YT,{className:"h-3 w-3"}),className:"bg-violet-500/20 text-violet-400",children:"Processor"})]})}),p.jsx("div",{className:"flex-1 overflow-auto border-t border-border1 flex flex-col",children:p.jsxs(PF,{defaultTab:"current-run",value:b,onValueChange:A,className:"h-full",children:[p.jsxs($F,{children:[p.jsx(Iu,{value:"current-run",children:"Current Run"}),r?.requestContextSchema&&p.jsx(Iu,{value:"request-context",children:"Request Context"}),p.jsx(Iu,{value:"run-options",children:"Run Options"}),g&&k&&p.jsxs(Iu,{value:"node-details",onClose:()=>{y(),w("current-run")},children:[k," Details"]})]}),p.jsx(Zp,{value:"current-run",children:e?t?p.jsx(ssn,{workflowId:e,runId:t,setRunId:S,workflow:r??void 0,isLoading:n,createWorkflowRun:s,streamWorkflow:i,resumeWorkflow:d,streamResult:o,isStreamingWorkflow:l,isCancellingWorkflowRun:h,cancelWorkflowRun:f,observeWorkflowStream:c}):p.jsx(vft,{workflowId:e,setRunId:S,workflow:r??void 0,isLoading:n,createWorkflowRun:s,streamWorkflow:i,resumeWorkflow:d,streamResult:o,isStreamingWorkflow:l,isCancellingWorkflowRun:h,cancelWorkflowRun:f}):null}),r?.requestContextSchema&&p.jsx(Zp,{value:"request-context",children:p.jsx("div",{className:"p-5",children:p.jsx(Fpe,{requestContextSchema:r.requestContextSchema})})}),p.jsx(Zp,{value:"run-options",children:p.jsx(wft,{})}),g&&p.jsx(Zp,{value:"node-details",children:p.jsx(hsn,{})})]})})]})}const ji={root:"flex flex-col gap-1.5",trigger:"w-full min-w-32 justify-between",triggerError:"border-accent2",chevron:"ml-2 h-4 w-4 shrink-0 opacity-50",popup:ne("min-w-[var(--anchor-width)] w-max rounded-md bg-surface3 text-neutral5","shadow-elevated","origin-[var(--transform-origin)]","transition-[transform,scale,opacity] duration-150 ease-out","data-[starting-style]:scale-95 data-[starting-style]:opacity-0","data-[ending-style]:scale-95 data-[ending-style]:opacity-0"),positioner:"z-[100]",searchContainer:ne("flex items-center border-b border-border1 px-3 py-2",Wr.colors),searchIcon:ne("mr-2 h-4 w-4 shrink-0 text-neutral3",Wr.colors),searchInput:ne("flex h-8 w-full rounded-md bg-transparent py-1 text-sm","placeholder:text-neutral3 disabled:cursor-not-allowed disabled:opacity-50","outline-none",Wr.colors),empty:"[&:not(:empty)]:block hidden py-6 text-center text-sm text-neutral3",list:"max-h-dropdown-max-height overflow-y-auto overflow-x-hidden p-1",item:ne("relative flex cursor-pointer select-none items-center rounded-sm px-2 py-1.5 text-sm",Wr.colors,"data-[highlighted]:bg-surface5 data-[highlighted]:text-neutral5"),itemSelected:"data-[selected]:bg-accent1Dark data-[selected]:text-accent1",checkContainer:"mr-2 flex h-4 w-4 shrink-0 items-center justify-center",checkIcon:ne("h-4 w-4 text-accent1",Wr.opacity),optionContent:"whitespace-nowrap flex items-center gap-2 w-full",optionText:"flex flex-col gap-0.5",optionDescription:"text-xs text-neutral3",optionEnd:"ml-auto",error:"text-xs text-accent2"};function Iv({options:e,value:t,onValueChange:r,placeholder:n="Select option...",searchPlaceholder:a="Search...",emptyText:s="No option found.",className:i,disabled:o=!1,variant:l="default",size:c="md",open:u,onOpenChange:d,container:f,error:h}){const g=e.find(b=>b.value===t)??null,y=b=>{b&&r?.(b.value)};return p.jsxs("div",{className:ji.root,children:[p.jsxs(ZBr,{items:e,value:g,onValueChange:y,disabled:o,open:u,onOpenChange:d,children:[p.jsxs(ozr,{className:ne(Dpe({variant:l,size:c}),ji.trigger,h&&ji.triggerError,i),children:[p.jsxs("span",{className:"truncate flex items-center gap-2",children:[g?.start,p.jsx(HBr,{placeholder:n})]}),p.jsx(Zse,{className:ji.chevron})]}),p.jsx(bzr,{container:f,children:p.jsx(Rzr,{align:"start",sideOffset:4,className:ji.positioner,children:p.jsxs(Mzr,{className:ji.popup,children:[p.jsxs("div",{className:ji.searchContainer,children:[p.jsx(Tg,{className:ji.searchIcon}),p.jsx(tzr,{className:ji.searchInput,placeholder:a})]}),p.jsx(Vzr,{className:ji.empty,children:s}),p.jsx(gzr,{className:ji.list,children:b=>p.jsxs(Bzr,{value:b,className:ne(ji.item,ji.itemSelected),children:[p.jsx("span",{className:ji.checkContainer,children:p.jsx(zzr,{children:p.jsx(Ao,{className:ji.checkIcon})})}),p.jsxs("span",{className:ji.optionContent,children:[b.start,p.jsxs("span",{className:ji.optionText,children:[p.jsx("span",{children:b.label}),b.description&&p.jsx("span",{className:ji.optionDescription,children:b.description})]}),b.end?p.jsx("div",{className:ji.optionEnd,children:b.end}):null]})]},b.value)})]})})})]}),h&&p.jsx("span",{className:ji.error,children:h})]})}const m_=()=>{const e=qt(),{requestContext:t}=Oa();return Cn({queryKey:["workflows",t],queryFn:async()=>{const r=await e.listWorkflows(t);return Object.fromEntries(Object.entries(r).filter(([n,a])=>!a.isProcessorWorkflow))}})};function gsn({value:e,onValueChange:t,placeholder:r="Select a workflow...",searchPlaceholder:n="Search workflows...",emptyText:a="No workflows found.",className:s,disabled:i=!1,variant:o="default"}){const{data:l={},isLoading:c,isError:u,error:d}=m_(),{navigate:f,paths:h}=an();_.useEffect(()=>{if(u){const b=d instanceof Error?d.message:"Failed to load workflows";fr.error(`Error loading workflows: ${b}`)}},[u,d]);const g=Object.keys(l).map(b=>({label:l[b]?.name||b,value:b})),y=b=>{t?t(b):b&&b!==e&&f(h.workflowLink(b))};return p.jsx(Iv,{options:g,value:e,onValueChange:y,placeholder:c?"Loading workflows...":r,searchPlaceholder:n,emptyText:a,className:s,disabled:i||c||u,variant:o})}function Fs({children:e,className:t,style:r}){const n=Sft("MainContentLayout");return p.jsx("main",{className:ne("grid grid-rows-[auto_1fr] h-full items-start content-start",t),style:{...r,...n?{border:"3px dotted red"}:{}},children:e})}function sd({children:e,className:t,isCentered:r=!1,isDivided:n=!1,hasLeftServiceColumn:a=!1,style:s}){const i=Sft("MainContentContent"),o=Bpe({isCentered:r,isDivided:n,hasLeftServiceColumn:a,className:t});return p.jsx("div",{className:o,style:{...s,...i?{border:"3px dotted orange"}:{}},children:e})}const Bpe=({isCentered:e,isDivided:t,hasLeftServiceColumn:r,className:n})=>ne("grid overflow-y-auto h-full ","overflow-x-auto min-w-[min-content]",{"items-start content-start":!e&&!t&&!r,"grid place-items-center":e,"grid-cols-[1fr_1fr]":t&&!r,"grid-cols-[12rem_1fr_1fr]":t&&r,"grid-cols-[auto_1fr]":!t&&r},n);function Sft(e){try{const t=localStorage.getItem("add-dev-style-to-components");return t?t.split(",").map(n=>n.trim()).filter(Boolean).includes(e):!1}catch(t){return console.error("Error reading or parsing localStorage:",t),!1}}const xj=()=>p.jsx(_Ur,{className:ne("w-1.5 bg-surface3","[&[data-separator='hover']]:!bg-surface4","[&[data-separator='active']]:!bg-surface5","focus:outline-none")}),wj=({collapsedSize:e,children:t,direction:r,...n})=>{const[a,s]=_.useState(!1),i=EUr(),o=()=>{i.current&&i.current.expand()};return p.jsx(Cde,{panelRef:i,collapsedSize:e,...n,onResize:l=>{e&&typeof e=="number"&&(l.inPixels<=e?s(!0):a&&s(!1))},children:a?p.jsxs(fa,{children:[p.jsx("div",{className:"flex items-center justify-center h-full",children:p.jsx(ha,{asChild:!0,children:p.jsx(Ye,{onClick:o,className:"!h-48 border-none",children:p.jsx(qe,{children:r==="left"?p.jsx(vS,{}):p.jsx(w7e,{})})})})}),p.jsx(sa,{children:"Expand"})]}):t})},ysn=({workflowId:e,children:t,leftSlot:r,rightSlot:n})=>{const{defaultLayout:a,onLayoutChange:s}=glt({id:`workflow-layout-${e}`,storage:localStorage}),i=Bpe({isCentered:!1,isDivided:!0,hasLeftServiceColumn:!!r});return p.jsxs(mlt,{className:i,defaultLayout:a,onLayoutChange:s,children:[r&&p.jsxs(p.Fragment,{children:[p.jsx(wj,{direction:"left",id:"left-slot",minSize:200,maxSize:"30%",defaultSize:200,collapsedSize:60,collapsible:!0,children:r}),p.jsx(xj,{})]}),p.jsx(Cde,{id:"main-slot",children:t}),n&&p.jsxs(p.Fragment,{children:[p.jsx(xj,{}),p.jsx(wj,{direction:"right",id:"right-slot",minSize:300,maxSize:"50%",defaultSize:300,collapsedSize:60,collapsible:!0,children:n})]})]})},zpe=()=>p.jsx(IF,{icon:p.jsx(Qs,{color:q7e.neutral3}),title:p.jsx(Gr,{className:"ml-2 w-12 h-2"}),collapsible:!1}),bsn=({result:e,workflowId:t,isStreaming:r,metadata:n,toolCallId:a,toolApprovalMetadata:s,suspendPayload:i,toolName:o,isNetwork:l,toolCalled:c})=>{const{runId:u,status:d}=e||{},{data:f,isLoading:h}=WN(t),{data:g,isLoading:y}=Jpt(t,{enabled:!!u&&!r}),b=g?.find(k=>k.runId===u),w=y||!b,x=typeof b?.snapshot=="object"?b?.snapshot:void 0,S=n?.mode==="network"?n.selectionReason:void 0,E=n?.mode==="network"?n.agentInput:void 0;let C=typeof i=="string"?p.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:i}):p.jsx($u,{data:i,"data-testid":"tool-suspend-payload"});return h||!f?p.jsx(zpe,{}):p.jsxs(IF,{"data-testid":"workflow-badge",icon:p.jsx(Xc,{className:"text-accent3"}),title:f.name,initialCollapsed:!1,extraInfo:n?.mode==="network"&&p.jsx(Ape,{selectionReason:S??"",input:E}),children:[!r&&!w&&p.jsx(Npe,{snapshot:x,workflowId:t,initialRunId:u,withoutTimeTravel:!0,children:p.jsx(EMe,{workflowId:t,workflow:f,runId:u})}),r&&p.jsx(EMe,{workflowId:t,workflow:f,runId:u}),C!==void 0&&i&&p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Workflow suspend payload"}),C]}),p.jsx(QN,{toolCalled:c??!!d,toolCallId:a,toolApprovalMetadata:s,toolName:o,isNetwork:l,isGenerateMode:n?.mode==="generate"})]})},EMe=({workflowId:e,workflow:t,runId:r})=>{const{Link:n}=an();return p.jsxs(p.Fragment,{children:[p.jsxs("div",{className:"flex items-center gap-2 pb-2",children:[p.jsx(Ye,{as:n,href:`/workflows/${e}/graph`,children:"Go to workflow"}),r&&p.jsx(Ye,{as:n,href:`/workflows/${e}/graph/${r}`,children:"See run"})]}),p.jsx("div",{className:"rounded-md overflow-hidden h-[60vh] w-full",children:p.jsx(bft,{workflowId:e,workflow:t})})]})},vsn=e=>{const{setResult:t}=_.useContext(am);_.useEffect(()=>{e&&t(e)},[e])},xsn=({agentId:e,messages:t=[],metadata:r,toolCallId:n,toolApprovalMetadata:a,toolName:s,isNetwork:i,suspendPayload:o,toolCalled:l})=>{const c=r?.mode==="network"?r.selectionReason:void 0,u=r?.mode==="network"?r.agentInput:void 0;let d=t.length>0;i&&(d=l??t.every(h=>h.type==="text"?!0:!!h.toolOutput));let f=typeof o=="string"?p.jsx("pre",{className:"whitespace-pre bg-surface4 p-4 rounded-md overflow-x-auto",children:o}):p.jsx($u,{data:o,"data-testid":"tool-suspend-payload"});return p.jsxs(IF,{"data-testid":"agent-badge",icon:p.jsx(No,{className:"text-accent1"}),title:e,initialCollapsed:!1,extraInfo:r?.mode==="network"&&p.jsx(Ape,{selectionReason:c??"",input:u}),children:[t.map((h,g)=>{if(h.type==="text")return p.jsx(Eut,{children:h.content},g);let y;try{y=typeof h.toolOutput=="string"?JSON.parse(h.toolOutput):h.toolOutput}catch{y=h.toolOutput}return p.jsx(we.Fragment,{children:p.jsx(Tft,{toolName:h.toolName,argsText:typeof h.args=="string"?h.args:JSON.stringify(h.args),result:y,args:h.args,status:{type:"complete"},type:"tool-call",toolCallId:h.toolCallId,addResult:()=>{},resume:()=>{},metadata:{mode:"stream"}})},g)}),f!==void 0&&o&&p.jsxs("div",{children:[p.jsx("p",{className:"font-medium pb-2",children:"Agent suspend payload"}),f]}),p.jsx(QN,{toolCalled:d,toolCallId:n,toolApprovalMetadata:a,toolName:s,isNetwork:i,isGenerateMode:r?.mode==="generate"})]})},Eft=({threadId:e,agentId:t,memory:r})=>{const n=qt(),{requestContext:a}=Oa();return Cn({queryKey:["memory","messages",e,t,"requestContext"],queryFn:async()=>e?await n.listThreadMessages(e,{agentId:t,requestContext:a}):null,enabled:r&&!!e,staleTime:0,gcTime:0,retry:!1,refetchOnWindowFocus:!1})},wsn=({agentId:e,result:t,metadata:r,toolCallId:n,toolApprovalMetadata:a,toolName:s,isNetwork:i,suspendPayload:o,toolCalled:l})=>{const{data:c,isLoading:u}=Eft({threadId:t?.subAgentThreadId,agentId:e,memory:!0});if(u)return p.jsx(zpe,{});const d=c?.messages?Sut(c.messages):[],f=t?.childMessages??dsr(d);return p.jsx(xsn,{agentId:e,messages:f,metadata:r,toolCallId:n,toolApprovalMetadata:a,toolName:s,isNetwork:i,suspendPayload:o,toolCalled:l})};function lO({children:e}){const t=e.replace(/\\n/g,`
|
|
599
599
|
`);return p.jsx(Eut,{remarkPlugins:[pze],components:Esn,className:"space-y-3",children:t})}const Oft=we.memo(({children:e,language:t,...r})=>{const[n,a]=_.useState([]);return _.useEffect(()=>{Gnn(e,t).then(s=>{s&&a(s)})},[e,t]),n.length?p.jsx("pre",{...r,children:p.jsx("code",{children:n.map((s,i)=>p.jsxs(p.Fragment,{children:[p.jsx("span",{children:s.map((o,l)=>{const c=typeof o.htmlStyle=="string"?void 0:o.htmlStyle;return p.jsx("span",{className:"text-shiki-light bg-shiki-light-bg dark:text-shiki-dark dark:bg-shiki-dark-bg",style:c,children:o.content},l)})},i),i!==n.length-1&&`
|
|
600
600
|
`]}))})}):p.jsx("pre",{...r,children:e})});Oft.displayName="HighlightedCode";const Ssn=({children:e,className:t,language:r,...n})=>{const a=typeof e=="string"?e:Bre(e),s=ne("overflow-x-scroll rounded-md border bg-surface1/50 p-4 font-mono text-sm [scrollbar-width:none]",t);return p.jsxs("div",{className:"group/code relative mb-4",children:[p.jsx(_.Suspense,{fallback:p.jsx("pre",{className:s,...n,children:e}),children:p.jsx(Oft,{language:r,className:s,children:a})}),p.jsx("div",{className:"invisible absolute right-2 top-2 flex space-x-1 rounded-lg p-1 opacity-0 transition-all duration-200 group-hover/code:visible group-hover/code:opacity-100",children:p.jsx(Zu,{content:a,copyMessage:"Copied code to clipboard"})})]})};function Bre(e){if(typeof e=="string")return e;if(e?.props?.children){let t=e.props.children;return Array.isArray(t)?t.map(r=>Bre(r)).join(""):Bre(t)}return""}const Esn={h1:({children:e,...t})=>p.jsx("h1",{className:"text-2xl font-semibold",...t,children:e}),h2:({children:e,...t})=>p.jsx("h2",{className:"font-semibold text-xl",...t,children:e}),h3:({children:e,...t})=>p.jsx("h3",{className:"font-semibold text-lg",...t,children:e}),h4:({children:e,...t})=>p.jsx("h4",{className:"font-semibold text-base",...t,children:e}),h5:({children:e,...t})=>p.jsx("h5",{className:"font-medium",...t,children:e}),strong:({children:e,...t})=>p.jsx("strong",{className:"font-semibold",...t,children:e}),a:({children:e,...t})=>p.jsx("a",{className:"underline underline-offset-2",...t,children:e}),blockquote:({children:e,...t})=>p.jsx("blockquote",{className:"border-l-2 border-neutral6 pl-4",...t,children:e}),code:({children:e,className:t,...r})=>{const n=/language-(\w+)/.exec(t||"");return n?p.jsx(Ssn,{className:t,language:n[1],...r,children:e}):p.jsx("code",{className:ne("font-mono [:not(pre)>&]:rounded-md [:not(pre)>&]:bg-surface1/50 [:not(pre)>&]:px-1 [:not(pre)>&]:py-0.5"),...r,children:e})},pre:({children:e})=>e,ol:({children:e,...t})=>p.jsx("ol",{className:"list-decimal space-y-2 pl-6",...t,children:e}),ul:({children:e,...t})=>p.jsx("ul",{className:"list-disc space-y-2 pl-6",...t,children:e}),li:({children:e,...t})=>p.jsx("li",{className:"my-1.5",...t,children:e}),table:({children:e,...t})=>p.jsx("table",{className:"w-full border-collapse overflow-y-auto rounded-md border border-neutral6/20",...t,children:e}),th:({children:e,...t})=>p.jsx("th",{className:"border border-neutral6/20 px-4 py-2 text-left font-bold [&[align=center]]:text-center [&[align=right]]:text-right",...t,children:e}),td:({children:e,...t})=>p.jsx("td",{className:"border border-neutral6/20 px-4 py-2 text-left [&[align=center]]:text-center [&[align=right]]:text-right",...t,children:e}),tr:({children:e,...t})=>p.jsx("tr",{className:"m-0 border-t p-0 even:bg-surface4",...t,children:e}),p:({children:e,...t})=>p.jsx("p",{className:"whitespace-pre-wrap leading-relaxed",...t,children:e}),hr:({...e})=>p.jsx("hr",{className:"border-neutral6/20",...e})},Osn={"🔴":"text-foreground","🟡":"text-foreground","🟢":"text-foreground"},_sn={"🔴":"bg-purple-500/15","🟡":"bg-blue-500/15","🟢":"bg-green-500/15"},ksn={"🔴":"border-l-purple-500","🟡":"border-l-blue-500","🟢":"border-l-green-500"};function Csn(e,t=!1){const r=e.trim();if(!r)return null;if(r.startsWith("* ->")||r.startsWith("->"))return{priority:null,time:null,content:r.replace(/^\*?\s*->\s*/,""),children:[],isNested:!0};const n=r.match(/^\*\s*(🔴|🟡|🟢)?\s*(?:\((\d{1,2}:\d{2})\))?\s*(.+)$/);if(n){const[,a,s,i]=n;return{priority:a||null,time:s||null,content:i.trim(),children:[],isNested:t}}return r.startsWith("*")?{priority:null,time:null,content:r.replace(/^\*\s*/,""),children:[],isNested:t}:null}function Tsn(e){const t={threads:[]},r=e.match(/<current-task>\s*([\s\S]*?)\s*<\/current-task>/);r&&(t.currentTask=r[1].trim());const n=e.match(/<suggested-response>\s*([\s\S]*?)\s*<\/suggested-response>/);n&&(t.suggestedResponse=n[1].trim());const a=e.match(/<observations>\s*([\s\S]*?)\s*<\/observations>/),i=(a?a[1]:e).split(/(?=Thread [a-f0-9]+:)/i);for(const o of i){const l=o.trim();if(!l)continue;const c=l.match(/^Thread ([a-f0-9]+):/i),u=c?c[1]:"default",d=c?l.replace(/^Thread [a-f0-9]+:\s*/i,""):l,f={threadId:u,dateBlocks:[]},h=d.split(`
|
|
@@ -616,4 +616,4 @@ Token usage: ${r} input + ${n} output = ${a} total`:`The model stopped generatin
|
|
|
616
616
|
`),l=s;l<o.length;l++){var c=o[l];if(!(c.length>1024)){var u=QMe.test(c)?c.replace(QMe,"$1"):c;if(!u.match(/\S*Error: /)){for(var d of r){var f=d(u,e);if(f){i.push(f);break}}if(i.length>=WMe)break}}}return(function(h){if(!h.length)return[];var g=Array.from(h);return g.reverse(),g.slice(0,WMe).map((y=>{return tr({},y,{filename:y.filename||(b=g,b[b.length-1]||{}).filename,function:y.function||uO});var b}))})(i)}}class dpn{match(t){return this.isDOMException(t)||this.isDOMError(t)}coerce(t,r){var n=fo(t.stack);return{type:this.getType(t),value:this.getValue(t),stack:n?t.stack:void 0,cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return this.isDOMError(t)?"DOMError":"DOMException"}getValue(t){var r=t.name||(this.isDOMError(t)?"DOMError":"DOMException");return t.message?r+": "+t.message:r}isDOMException(t){return Tj(t,"DOMException")}isDOMError(t){return Tj(t,"DOMError")}}class ppn{match(t){return(r=>r instanceof Error)(t)}coerce(t,r){return{type:this.getType(t),value:this.getMessage(t,r),stack:this.getStack(t),cause:t.cause?r.next(t.cause):void 0,synthetic:!1}}getType(t){return t.name||t.constructor.name}getMessage(t,r){var n=t.message;return n.error&&typeof n.error.message=="string"?String(n.error.message):String(n)}getStack(t){return t.stacktrace||t.stack||void 0}}class fpn{constructor(){}match(t){return Tj(t,"ErrorEvent")&&t.error!=null}coerce(t,r){var n,a=r.apply(t.error);return a||{type:"ErrorEvent",value:t.message,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}var hpn=/^(?:[Uu]ncaught (?:exception: )?)?(?:((?:Eval|Internal|Range|Reference|Syntax|Type|URI|)Error): )?(.*)$/i;class mpn{match(t){return typeof t=="string"}coerce(t,r){var n,[a,s]=this.getInfos(t);return{type:a??"Error",value:s??t,stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}getInfos(t){var r="Error",n=t,a=t.match(hpn);return a&&(r=a[1],n=a[2]),[r,n]}}var gpn=["fatal","error","warning","log","info","debug"];function Uht(e,t){t===void 0&&(t=40);var r=Object.keys(e);if(r.sort(),!r.length)return"[object has no keys]";for(var n=r.length;n>0;n--){var a=r.slice(0,n).join(", ");if(!(a.length>t))return n===r.length||a.length<=t?a:a.slice(0,t)+"..."}return""}class ypn{match(t){return typeof t=="object"&&t!==null}coerce(t,r){var n,a=this.getErrorPropertyFromObject(t);return a?r.apply(a):{type:this.getType(t),value:this.getValue(t),stack:(n=r.syntheticException)==null?void 0:n.stack,level:this.isSeverityLevel(t.level)?t.level:"error",synthetic:!0}}getType(t){return Bht(t)?t.constructor.name:"Error"}getValue(t){if("name"in t&&typeof t.name=="string"){var r="'"+t.name+"' captured as exception";return"message"in t&&typeof t.message=="string"&&(r+=" with message: '"+t.message+"'"),r}if("message"in t&&typeof t.message=="string")return t.message;var n=this.getObjectClassName(t);return(n&&n!=="Object"?"'"+n+"'":"Object")+" captured as exception with keys: "+Uht(t)}isSeverityLevel(t){return fo(t)&&!Qre(t)&&gpn.indexOf(t)>=0}getErrorPropertyFromObject(t){for(var r in t)if(Object.prototype.hasOwnProperty.call(t,r)){var n=t[r];if(epn(n))return n}}getObjectClassName(t){try{var r=Object.getPrototypeOf(t);return r?r.constructor.name:void 0}catch{return}}}class bpn{match(t){return Bht(t)}coerce(t,r){var n,a=t.constructor.name;return{type:a,value:a+" captured as exception with keys: "+Uht(t),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class vpn{match(t){return Wre(t)}coerce(t,r){var n;return{type:"Error",value:"Primitive value captured as exception: "+String(t),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}}}class xpn{match(t){return Tj(t,"PromiseRejectionEvent")}coerce(t,r){var n,a=this.getUnhandledRejectionReason(t);return Wre(a)?{type:"UnhandledRejection",value:"Non-Error promise rejection captured with value: "+String(a),stack:(n=r.syntheticException)==null?void 0:n.stack,synthetic:!0}:r.apply(a)}getUnhandledRejectionReason(t){if(Wre(t))return t;try{if("reason"in t)return t.reason;if("detail"in t&&"reason"in t.detail)return t.detail.reason}catch{}return t}}var Vht=function(e,t){var{debugEnabled:r}=t===void 0?{}:t,n={k:function(a){if(He&&(Um.DEBUG||Qr.POSTHOG_DEBUG||r)&&!Ut(He.console)&&He.console){for(var s=("__rrweb_original__"in He.console[a])?He.console[a].__rrweb_original__:He.console[a],i=arguments.length,o=new Array(i>1?i-1:0),l=1;l<i;l++)o[l-1]=arguments[l];s(e,...o)}},info:function(){for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];n.k("log",...s)},warn:function(){for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];n.k("warn",...s)},error:function(){for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];n.k("error",...s)},critical:function(){for(var a=arguments.length,s=new Array(a),i=0;i<a;i++)s[i]=arguments[i];console.error(e,...s)},uninitializedWarning:a=>{n.error("You must initialize PostHog before calling "+a)},createLogger:(a,s)=>Vht(e+" "+a,s)};return n},Ht=Vht("[PostHog.js]"),go=Ht.createLogger,wpn=go("[ExternalScriptsLoader]"),XMe=(e,t,r)=>{if(e.config.disable_external_dependency_loading)return wpn.warn(t+" was requested but loading of external scripts is disabled."),r("Loading of external scripts is disabled");var n=Zt?.querySelectorAll("script");if(n){for(var a,s=function(){if(n[i].src===t){var l=n[i];return l.__posthog_loading_callback_fired?{v:r()}:(l.addEventListener("load",(c=>{l.__posthog_loading_callback_fired=!0,r(void 0,c)})),l.onerror=c=>r(c),{v:void 0})}},i=0;i<n.length;i++)if(a=s())return a.v}var o=()=>{if(!Zt)return r("document not found");var l=Zt.createElement("script");if(l.type="text/javascript",l.crossOrigin="anonymous",l.src=t,l.onload=d=>{l.__posthog_loading_callback_fired=!0,r(void 0,d)},l.onerror=d=>r(d),e.config.prepare_external_dependency_script&&(l=e.config.prepare_external_dependency_script(l)),!l)return r("prepare_external_dependency_script returned null");var c,u=Zt.querySelectorAll("body > script");u.length>0?(c=u[0].parentNode)==null||c.insertBefore(l,u[0]):Zt.body.appendChild(l)};Zt!=null&&Zt.body?o():Zt?.addEventListener("DOMContentLoaded",o)};Qr.__PosthogExtensions__=Qr.__PosthogExtensions__||{},Qr.__PosthogExtensions__.loadExternalDependency=(e,t,r)=>{var n="/static/"+t+".js?v="+e.version;if(t==="remote-config"&&(n="/array/"+e.config.token+"/config.js"),t==="toolbar"){var a=3e5;n=n+"&t="+Math.floor(Date.now()/a)*a}var s=e.requestRouter.endpointFor("assets",n);XMe(e,s,r)},Qr.__PosthogExtensions__.loadSiteApp=(e,t,r)=>{var n=e.requestRouter.endpointFor("api",t);XMe(e,n,r)};var Aj={};function kb(e,t,r){if(as(e)){if(zMe&&e.forEach===zMe)e.forEach(t,r);else if("length"in e&&e.length===+e.length){for(var n=0,a=e.length;n<a;n++)if(n in e&&t.call(r,e[n],n)===Aj)return}}}function hs(e,t,r){if(!Ga(e)){if(as(e))return kb(e,t,r);if(Wdn(e)){for(var n of e.entries())if(t.call(r,n[1],n[0])===Aj)return}else for(var a in e)if(Fht.call(e,a)&&t.call(r,e[a],a)===Aj)return}}var Ci=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return kb(r,(function(a){for(var s in a)a[s]!==void 0&&(e[s]=a[s])})),e},b_=function(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return kb(r,(function(a){kb(a,(function(s){e.push(s)}))})),e};function PM(e){for(var t=Object.keys(e),r=t.length,n=new Array(r);r--;)n[r]=[t[r],e[t[r]]];return n}var YMe=function(e){try{return e()}catch{return}},Spn=function(e){return function(){try{for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return e.apply(this,r)}catch(a){Ht.critical("Implementation error. Please turn on debug mode and open a ticket on https://app.posthog.com/home#panel=support%3Asupport%3A."),Ht.critical(a)}}},rfe=function(e){var t={};return hs(e,(function(r,n){(fo(r)&&r.length>0||Fh(r))&&(t[n]=r)})),t};function Epn(e,t){return r=e,n=s=>fo(s)&&!qg(t)?s.slice(0,t):s,a=new Set,(function s(i,o){return i!==Object(i)?n?n(i,o):i:a.has(i)?void 0:(a.add(i),as(i)?(l=[],kb(i,(c=>{l.push(s(c))}))):(l={},hs(i,((c,u)=>{a.has(c)||(l[u]=s(c,u))}))),l);var l})(r);var r,n,a}var Opn=["herokuapp.com","vercel.app","netlify.app"];function _pn(e){var t=e?.hostname;if(!fo(t))return!1;var r=t.split(".").slice(-2).join(".");for(var n of Opn)if(r===n)return!1;return!0}function qht(e,t){for(var r=0;r<e.length;r++)if(t(e[r]))return e[r]}function qi(e,t,r,n){var{capture:a=!1,passive:s=!0}=n??{};e?.addEventListener(t,r,{capture:a,passive:s})}var Zht="$people_distinct_id",PC="__alias",$C="__timers",KMe="$autocapture_disabled_server_side",Yre="$heatmaps_enabled_server_side",JMe="$exception_capture_enabled_server_side",Kre="$error_tracking_suppression_rules",e3e="$error_tracking_capture_extension_exceptions",t3e="$web_vitals_enabled_server_side",Hht="$dead_clicks_enabled_server_side",r3e="$web_vitals_allowed_metrics",DY="$session_recording_remote_config",Dj="$sesid",Ght="$session_is_sampled",pS="$enabled_feature_flags",MC="$early_access_features",Jre="$feature_flag_details",jC="$stored_person_properties",v0="$stored_group_properties",ene="$surveys",E$="$surveys_activated",Ij="$flag_call_reported",Vm="$user_state",tne="$client_session_props",rne="$capture_rate_limit",nne="$initial_campaign_params",ane="$initial_referrer_info",Nj="$initial_person_info",Rj="$epp",Qht="__POSTHOG_TOOLBAR__",aC="$posthog_cookieless",kpn=[Zht,PC,"__cmpns",$C,"$session_recording_enabled_server_side",Yre,Dj,pS,Kre,Vm,MC,Jre,v0,jC,ene,Ij,tne,rne,nne,ane,Rj,Nj];function n3e(e){return e instanceof Element&&(e.id===Qht||!(e.closest==null||!e.closest(".toolbar-global-fade-container")))}function UF(e){return!!e&&e.nodeType===1}function Cb(e,t){return!!e&&!!e.tagName&&e.tagName.toLowerCase()===t.toLowerCase()}function Wht(e){return!!e&&e.nodeType===3}function Xht(e){return!!e&&e.nodeType===11}function nfe(e){return e?BF(e).split(/\s+/):[]}function a3e(e){var t=He?.location.href;return!!(t&&e&&e.some((r=>t.match(r))))}function Pj(e){var t="";switch(typeof e.className){case"string":t=e.className;break;case"object":t=(e.className&&"baseVal"in e.className?e.className.baseVal:null)||e.getAttribute("class")||"";break;default:t=""}return nfe(t)}function Yht(e){return Ga(e)?null:BF(e).split(/(\s+)/).filter((t=>cI(t))).join("").replace(/[\r\n]/g," ").replace(/[ ]+/g," ").substring(0,255)}function nR(e){var t="";return sne(e)&&!rmt(e)&&e.childNodes&&e.childNodes.length&&hs(e.childNodes,(function(r){var n;Wht(r)&&r.textContent&&(t+=(n=Yht(r.textContent))!==null&&n!==void 0?n:"")})),BF(t)}function Kht(e){return Ut(e.target)?e.srcElement||null:(t=e.target)!=null&&t.shadowRoot?e.composedPath()[0]||null:e.target||null;var t}var afe=["a","button","form","input","select","textarea","label"];function Jht(e,t){if(Ut(t))return!0;var r,n=function(s){if(t.some((i=>s.matches(i))))return{v:!0}};for(var a of e)if(r=n(a))return r.v;return!1}function emt(e){var t=e.parentNode;return!(!t||!UF(t))&&t}var Cpn=["next","previous","prev",">","<"],s3e=10,i3e=[".ph-no-rageclick",".ph-no-capture"];function Tpn(e,t){if(!He||sfe(e))return!1;var r,n,a;if(_b(t)?(r=!!t&&i3e,n=void 0):(r=(a=t?.css_selector_ignorelist)!==null&&a!==void 0?a:i3e,n=t?.content_ignorelist),r===!1)return!1;var{targetElementList:s}=tmt(e,!1);return!(function(i,o){if(i===!1||Ut(i))return!1;var l;if(i===!0)l=Cpn;else{if(!as(i))return!1;if(i.length>s3e)return Ht.error("[PostHog] content_ignorelist array cannot exceed "+s3e+" items. Use css_selector_ignorelist for more complex matching."),!1;l=i.map((c=>c.toLowerCase()))}return o.some((c=>{var{safeText:u,ariaLabel:d}=c;return l.some((f=>u.includes(f)||d.includes(f)))}))})(n,s.map((i=>{var o;return{safeText:nR(i).toLowerCase(),ariaLabel:((o=i.getAttribute("aria-label"))==null?void 0:o.toLowerCase().trim())||""}})))&&!Jht(s,r)}var sfe=e=>!e||Cb(e,"html")||!UF(e),tmt=(e,t)=>{if(!He||sfe(e))return{parentIsUsefulElement:!1,targetElementList:[]};for(var r=!1,n=[e],a=e;a.parentNode&&!Cb(a,"body");)if(Xht(a.parentNode))n.push(a.parentNode.host),a=a.parentNode.host;else{var s=emt(a);if(!s)break;if(t||afe.indexOf(s.tagName.toLowerCase())>-1)r=!0;else{var i=He.getComputedStyle(s);i&&i.getPropertyValue("cursor")==="pointer"&&(r=!0)}n.push(s),a=s}return{parentIsUsefulElement:r,targetElementList:n}};function Apn(e,t,r,n,a){var s,i,o,l;if(r===void 0&&(r=void 0),!He||sfe(e)||(s=r)!=null&&s.url_allowlist&&!a3e(r.url_allowlist)||(i=r)!=null&&i.url_ignorelist&&a3e(r.url_ignorelist))return!1;if((o=r)!=null&&o.dom_event_allowlist){var c=r.dom_event_allowlist;if(c&&!c.some((g=>t.type===g)))return!1}var{parentIsUsefulElement:u,targetElementList:d}=tmt(e,n);if(!(function(g,y){var b=y?.element_allowlist;if(Ut(b))return!0;var w,x=function(E){if(b.some((C=>E.tagName.toLowerCase()===C)))return{v:!0}};for(var S of g)if(w=x(S))return w.v;return!1})(d,r)||!Jht(d,(l=r)==null?void 0:l.css_selector_allowlist))return!1;var f=He.getComputedStyle(e);if(f&&f.getPropertyValue("cursor")==="pointer"&&t.type==="click")return!0;var h=e.tagName.toLowerCase();switch(h){case"html":return!1;case"form":return(a||["submit"]).indexOf(t.type)>=0;case"input":case"select":case"textarea":return(a||["change","click"]).indexOf(t.type)>=0;default:return u?(a||["click"]).indexOf(t.type)>=0:(a||["click"]).indexOf(t.type)>=0&&(afe.indexOf(h)>-1||e.getAttribute("contenteditable")==="true")}}function sne(e){for(var t=e;t.parentNode&&!Cb(t,"body");t=t.parentNode){var r=Pj(t);if(Fn(r,"ph-sensitive")||Fn(r,"ph-no-capture"))return!1}if(Fn(Pj(e),"ph-include"))return!0;var n=e.type||"";if(fo(n))switch(n.toLowerCase()){case"hidden":case"password":return!1}var a=e.name||e.id||"";return!(fo(a)&&/^cc|cardnum|ccnum|creditcard|csc|cvc|cvv|exp|pass|pwd|routing|seccode|securitycode|securitynum|socialsec|socsec|ssn/i.test(a.replace(/[^a-zA-Z0-9]/g,"")))}function rmt(e){return!!(Cb(e,"input")&&!["button","checkbox","submit","reset"].includes(e.type)||Cb(e,"select")||Cb(e,"textarea")||e.getAttribute("contenteditable")==="true")}var nmt="(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11})",Dpn=new RegExp("^(?:"+nmt+")$"),Ipn=new RegExp(nmt),amt="\\d{3}-?\\d{2}-?\\d{4}",Npn=new RegExp("^("+amt+")$"),Rpn=new RegExp("("+amt+")");function cI(e,t){return t===void 0&&(t=!0),!(Ga(e)||fo(e)&&(e=BF(e),(t?Dpn:Ipn).test((e||"").replace(/[- ]/g,""))||(t?Npn:Rpn).test(e)))}function smt(e){var t=nR(e);return cI(t=(t+" "+imt(e)).trim())?t:""}function imt(e){var t="";return e&&e.childNodes&&e.childNodes.length&&hs(e.childNodes,(function(r){var n;if(r&&((n=r.tagName)==null?void 0:n.toLowerCase())==="span")try{var a=nR(r);t=(t+" "+a).trim(),r.childNodes&&r.childNodes.length&&(t=(t+" "+imt(r)).trim())}catch(s){Ht.error("[AutoCapture]",s)}})),t}function Ppn(e){return(function(t){var r=t.map((n=>{var a,s,i="";if(n.tag_name&&(i+=n.tag_name),n.attr_class)for(var o of(n.attr_class.sort(),n.attr_class))i+="."+o.replace(/"/g,"");var l=tr({},n.text?{text:n.text}:{},{"nth-child":(a=n.nth_child)!==null&&a!==void 0?a:0,"nth-of-type":(s=n.nth_of_type)!==null&&s!==void 0?s:0},n.href?{href:n.href}:{},n.attr_id?{attr_id:n.attr_id}:{},n.attributes),c={};return PM(l).sort(((u,d)=>{var[f]=u,[h]=d;return f.localeCompare(h)})).forEach((u=>{var[d,f]=u;return c[o3e(d.toString())]=o3e(f.toString())})),i+=":",i+=PM(c).map((u=>{var[d,f]=u;return d+'="'+f+'"'})).join("")}));return r.join(";")})((function(t){return t.map((r=>{var n,a,s={text:(n=r.$el_text)==null?void 0:n.slice(0,400),tag_name:r.tag_name,href:(a=r.attr__href)==null?void 0:a.slice(0,2048),attr_class:$pn(r),attr_id:r.attr__id,nth_child:r.nth_child,nth_of_type:r.nth_of_type,attributes:{}};return PM(r).filter((i=>{var[o]=i;return o.indexOf("attr__")===0})).forEach((i=>{var[o,l]=i;return s.attributes[o]=l})),s}))})(e))}function o3e(e){return e.replace(/"|\\"/g,'\\"')}function $pn(e){var t=e.attr__class;return t?as(t)?t:nfe(t):void 0}class omt{constructor(t){this.disabled=t===!1;var r=wo(t)?t:{};this.thresholdPx=r.threshold_px||30,this.timeoutMs=r.timeout_ms||1e3,this.clickCount=r.click_count||3,this.clicks=[]}isRageClick(t,r,n){if(this.disabled)return!1;var a=this.clicks[this.clicks.length-1];if(a&&Math.abs(t-a.x)+Math.abs(r-a.y)<this.thresholdPx&&n-a.timestamp<this.timeoutMs){if(this.clicks.push({x:t,y:r,timestamp:n}),this.clicks.length===this.clickCount)return!0}else this.clicks=[{x:t,y:r,timestamp:n}];return!1}}var IY="$copy_autocapture",Ym=(function(e){return e.GZipJS="gzip-js",e.Base64="base64",e})({}),$j=e=>{var t=Zt?.createElement("a");return Ut(t)?null:(t.href=e,t)},Mpn=function(e,t){var r,n;t===void 0&&(t="&");var a=[];return hs(e,(function(s,i){Ut(s)||Ut(i)||i==="undefined"||(r=encodeURIComponent((o=>o instanceof File)(s)?s.name:s.toString()),n=encodeURIComponent(i),a[a.length]=n+"="+r)})),a.join(t)},Mj=function(e,t){for(var r,n=((e.split("#")[0]||"").split(/\?(.*)/)[1]||"").replace(/^\?+/g,"").split("&"),a=0;a<n.length;a++){var s=n[a].split("=");if(s[0]===t){r=s;break}}if(!as(r)||r.length<2)return"";var i=r[1];try{i=decodeURIComponent(i)}catch{Ht.error("Skipping decoding for malformed query param: "+i)}return i.replace(/\+/g," ")},aR=function(e,t,r){if(!e||!t||!t.length)return e;for(var n=e.split("#"),a=n[0]||"",s=n[1],i=a.split("?"),o=i[1],l=i[0],c=(o||"").split("&"),u=[],d=0;d<c.length;d++){var f=c[d].split("=");as(f)&&(t.includes(f[0])?u.push(f[0]+"="+r):u.push(c[d]))}var h=l;return o!=null&&(h+="?"+u.join("&")),s!=null&&(h+="#"+s),h},jj=function(e,t){var r=e.match(new RegExp(t+"=([^&]*)"));return r?r[1]:null},l3e=go("[AutoCapture]");function NY(e,t){return t.length>e?t.slice(0,e)+"...":t}function jpn(e){if(e.previousElementSibling)return e.previousElementSibling;var t=e;do t=t.previousSibling;while(t&&!UF(t));return t}function Lpn(e,t,r,n){var a=e.tagName.toLowerCase(),s={tag_name:a};afe.indexOf(a)>-1&&!r&&(a.toLowerCase()==="a"||a.toLowerCase()==="button"?s.$el_text=NY(1024,smt(e)):s.$el_text=NY(1024,nR(e)));var i=Pj(e);i.length>0&&(s.classes=i.filter((function(u){return u!==""}))),hs(e.attributes,(function(u){var d;if((!rmt(e)||["name","id","class","aria-label"].indexOf(u.name)!==-1)&&(n==null||!n.includes(u.name))&&!t&&cI(u.value)&&(d=u.name,!fo(d)||d.substring(0,10)!=="_ngcontent"&&d.substring(0,7)!=="_nghost")){var f=u.value;u.name==="class"&&(f=nfe(f).join(" ")),s["attr__"+u.name]=NY(1024,f)}}));for(var o=1,l=1,c=e;c=jpn(c);)o++,c.tagName===e.tagName&&l++;return s.nth_child=o,s.nth_of_type=l,s}function Fpn(e,t){for(var r,n,{e:a,maskAllElementAttributes:s,maskAllText:i,elementAttributeIgnoreList:o,elementsChainAsString:l}=t,c=[e],u=e;u.parentNode&&!Cb(u,"body");)Xht(u.parentNode)?(c.push(u.parentNode.host),u=u.parentNode.host):(c.push(u.parentNode),u=u.parentNode);var d,f=[],h={},g=!1,y=!1;if(hs(c,(E=>{var C=sne(E);E.tagName.toLowerCase()==="a"&&(g=E.getAttribute("href"),g=C&&g&&cI(g)&&g),Fn(Pj(E),"ph-no-capture")&&(y=!0),f.push(Lpn(E,s,i,o));var k=(function(A){if(!sne(A))return{};var D={};return hs(A.attributes,(function(N){if(N.name&&N.name.indexOf("data-ph-capture-attribute")===0){var P=N.name.replace("data-ph-capture-attribute-",""),j=N.value;P&&j&&cI(j)&&(D[P]=j)}})),D})(E);Ci(h,k)})),y)return{props:{},explicitNoCapture:y};if(i||(e.tagName.toLowerCase()==="a"||e.tagName.toLowerCase()==="button"?f[0].$el_text=smt(e):f[0].$el_text=nR(e)),g){var b,w;f[0].attr__href=g;var x=(b=$j(g))==null?void 0:b.host,S=He==null||(w=He.location)==null?void 0:w.host;x&&S&&x!==S&&(d=g)}return{props:Ci({$event_type:a.type,$ce_version:1},l?{}:{$elements:f},{$elements_chain:Ppn(f)},(r=f[0])!=null&&r.$el_text?{$el_text:(n=f[0])==null?void 0:n.$el_text}:{},d&&a.type==="click"?{$external_click_url:d}:{},h)}}class Bpn{constructor(t){this.P=!1,this.T=null,this.R=!1,this.instance=t,this.rageclicks=new omt(t.config.rageclick),this.I=null}get F(){var t,r,n=wo(this.instance.config.autocapture)?this.instance.config.autocapture:{};return n.url_allowlist=(t=n.url_allowlist)==null?void 0:t.map((a=>new RegExp(a))),n.url_ignorelist=(r=n.url_ignorelist)==null?void 0:r.map((a=>new RegExp(a))),n}C(){if(this.isBrowserSupported()){if(He&&Zt){var t=n=>{n=n||He?.event;try{this.M(n)}catch(a){l3e.error("Failed to capture event",a)}};if(qi(Zt,"submit",t,{capture:!0}),qi(Zt,"change",t,{capture:!0}),qi(Zt,"click",t,{capture:!0}),this.F.capture_copied_text){var r=n=>{n=n||He?.event,this.M(n,IY)};qi(Zt,"copy",r,{capture:!0}),qi(Zt,"cut",r,{capture:!0})}}}else l3e.info("Disabling Automatic Event Collection because this browser is not supported")}startIfEnabled(){this.isEnabled&&!this.P&&(this.C(),this.P=!0)}onRemoteConfig(t){t.elementsChainAsString&&(this.R=t.elementsChainAsString),this.instance.persistence&&this.instance.persistence.register({[KMe]:!!t.autocapture_opt_out}),this.T=!!t.autocapture_opt_out,this.startIfEnabled()}setElementSelectors(t){this.I=t}getElementSelectors(t){var r,n=[];return(r=this.I)==null||r.forEach((a=>{var s=Zt?.querySelectorAll(a);s?.forEach((i=>{t===i&&n.push(a)}))})),n}get isEnabled(){var t,r,n=(t=this.instance.persistence)==null?void 0:t.props[KMe],a=this.T;if(qg(a)&&!_b(n)&&!this.instance.O())return!1;var s=(r=this.T)!==null&&r!==void 0?r:!!n;return!!this.instance.config.autocapture&&!s}M(t,r){if(r===void 0&&(r="$autocapture"),this.isEnabled){var n,a=Kht(t);Wht(a)&&(a=a.parentNode||null),r==="$autocapture"&&t.type==="click"&&t instanceof MouseEvent&&this.instance.config.rageclick&&(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,t.timeStamp||new Date().getTime())&&Tpn(a,this.instance.config.rageclick)&&this.M(t,"$rageclick");var s=r===IY;if(a&&Apn(a,t,this.F,s,s?["copy","cut"]:void 0)){var{props:i,explicitNoCapture:o}=Fpn(a,{e:t,maskAllElementAttributes:this.instance.config.mask_all_element_attributes,maskAllText:this.instance.config.mask_all_text,elementAttributeIgnoreList:this.F.element_attribute_ignorelist,elementsChainAsString:this.R});if(o)return!1;var l=this.getElementSelectors(a);if(l&&l.length>0&&(i.$element_selectors=l),r===IY){var c,u=Yht(He==null||(c=He.getSelection())==null?void 0:c.toString()),d=t.type||"clipboard";if(!u)return!1;i.$selected_content=u,i.$copy_type=d}return this.instance.capture(r,i),!0}}}isBrowserSupported(){return Ob(Zt?.querySelectorAll)}}Math.trunc||(Math.trunc=function(e){return e<0?Math.ceil(e):Math.floor(e)}),Number.isInteger||(Number.isInteger=function(e){return Fh(e)&&isFinite(e)&&Math.floor(e)===e});var c3e="0123456789abcdef";class Lj{constructor(t){if(this.bytes=t,t.length!==16)throw new TypeError("not 128-bit length")}static fromFieldsV7(t,r,n,a){if(!Number.isInteger(t)||!Number.isInteger(r)||!Number.isInteger(n)||!Number.isInteger(a)||t<0||r<0||n<0||a<0||t>0xffffffffffff||r>4095||n>1073741823||a>4294967295)throw new RangeError("invalid field value");var s=new Uint8Array(16);return s[0]=t/Math.pow(2,40),s[1]=t/Math.pow(2,32),s[2]=t/Math.pow(2,24),s[3]=t/Math.pow(2,16),s[4]=t/Math.pow(2,8),s[5]=t,s[6]=112|r>>>8,s[7]=r,s[8]=128|n>>>24,s[9]=n>>>16,s[10]=n>>>8,s[11]=n,s[12]=a>>>24,s[13]=a>>>16,s[14]=a>>>8,s[15]=a,new Lj(s)}toString(){for(var t="",r=0;r<this.bytes.length;r++)t=t+c3e.charAt(this.bytes[r]>>>4)+c3e.charAt(15&this.bytes[r]),r!==3&&r!==5&&r!==7&&r!==9||(t+="-");if(t.length!==36)throw new Error("Invalid UUIDv7 was generated");return t}clone(){return new Lj(this.bytes.slice(0))}equals(t){return this.compareTo(t)===0}compareTo(t){for(var r=0;r<16;r++){var n=this.bytes[r]-t.bytes[r];if(n!==0)return Math.sign(n)}return 0}}class zpn{constructor(){this.A=0,this.D=0,this.j=new Upn}generate(){var t=this.generateOrAbort();if(Ut(t)){this.A=0;var r=this.generateOrAbort();if(Ut(r))throw new Error("Could not generate UUID after timestamp reset");return r}return t}generateOrAbort(){var t=Date.now();if(t>this.A)this.A=t,this.L();else{if(!(t+1e4>this.A))return;this.D++,this.D>4398046511103&&(this.A++,this.L())}return Lj.fromFieldsV7(this.A,Math.trunc(this.D/Math.pow(2,30)),this.D&Math.pow(2,30)-1,this.j.nextUint32())}L(){this.D=1024*this.j.nextUint32()+(1023&this.j.nextUint32())}}var u3e,lmt=e=>{if(typeof UUIDV7_DENY_WEAK_RNG<"u"&&UUIDV7_DENY_WEAK_RNG)throw new Error("no cryptographically strong RNG available");for(var t=0;t<e.length;t++)e[t]=65536*Math.trunc(65536*Math.random())+Math.trunc(65536*Math.random());return e};He&&!Ut(He.crypto)&&crypto.getRandomValues&&(lmt=e=>crypto.getRandomValues(e));class Upn{constructor(){this.N=new Uint32Array(8),this.U=1/0}nextUint32(){return this.U>=this.N.length&&(lmt(this.N),this.U=0),this.N[this.U++]}}var ob=()=>Vpn().toString(),Vpn=()=>(u3e||(u3e=new zpn)).generate(),sC="",qpn=/[a-z0-9][a-z0-9-]+\.[a-z]{2,}$/i;function Zpn(e,t){if(t){var r=(function(a,s){if(s===void 0&&(s=Zt),sC)return sC;if(!s||["localhost","127.0.0.1"].includes(a))return"";for(var i=a.split("."),o=Math.min(i.length,8),l="dmn_chk_"+ob();!sC&&o--;){var c=i.slice(o).join("."),u=l+"=1;domain=."+c+";path=/";s.cookie=u+";max-age=3",s.cookie.includes(l)&&(s.cookie=u+";max-age=0",sC=c)}return sC})(e);if(!r){var n=(a=>{var s=a.match(qpn);return s?s[0]:""})(e);n!==r&&Ht.info("Warning: cookie subdomain discovery mismatch",n,r),r=n}return r?"; domain=."+r:""}return""}var _h={H:()=>!!Zt,B:function(e){Ht.error("cookieStore error: "+e)},q:function(e){if(Zt){try{for(var t=e+"=",r=Zt.cookie.split(";").filter((s=>s.length)),n=0;n<r.length;n++){for(var a=r[n];a.charAt(0)==" ";)a=a.substring(1,a.length);if(a.indexOf(t)===0)return decodeURIComponent(a.substring(t.length,a.length))}}catch{}return null}},W:function(e){var t;try{t=JSON.parse(_h.q(e))||{}}catch{}return t},G:function(e,t,r,n,a){if(Zt)try{var s="",i="",o=Zpn(Zt.location.hostname,n);if(r){var l=new Date;l.setTime(l.getTime()+24*r*60*60*1e3),s="; expires="+l.toUTCString()}a&&(i="; secure");var c=e+"="+encodeURIComponent(JSON.stringify(t))+s+"; SameSite=Lax; path=/"+o+i;return c.length>3686.4&&Ht.warn("cookieStore warning: large cookie, len="+c.length),Zt.cookie=c,c}catch{return}},V:function(e,t){if(Zt!=null&&Zt.cookie)try{_h.G(e,"",-1,t)}catch{return}}},RY=null,Zs={H:function(){if(!qg(RY))return RY;var e=!0;if(Ut(He))e=!1;else try{var t="__mplssupport__";Zs.G(t,"xyz"),Zs.q(t)!=='"xyz"'&&(e=!1),Zs.V(t)}catch{e=!1}return e||Ht.error("localStorage unsupported; falling back to cookie store"),RY=e,e},B:function(e){Ht.error("localStorage error: "+e)},q:function(e){try{return He?.localStorage.getItem(e)}catch(t){Zs.B(t)}return null},W:function(e){try{return JSON.parse(Zs.q(e))||{}}catch{}return null},G:function(e,t){try{He?.localStorage.setItem(e,JSON.stringify(t))}catch(r){Zs.B(r)}},V:function(e){try{He?.localStorage.removeItem(e)}catch(t){Zs.B(t)}}},Hpn=["distinct_id",Dj,Ght,Rj,Nj],O$=tr({},Zs,{W:function(e){try{var t={};try{t=_h.W(e)||{}}catch{}var r=Ci(t,JSON.parse(Zs.q(e)||"{}"));return Zs.G(e,r),r}catch{}return null},G:function(e,t,r,n,a,s){try{Zs.G(e,t,void 0,void 0,s);var i={};Hpn.forEach((o=>{t[o]&&(i[o]=t[o])})),Object.keys(i).length&&_h.G(e,i,r,n,a,s)}catch(o){Zs.B(o)}},V:function(e,t){try{He?.localStorage.removeItem(e),_h.V(e,t)}catch(r){Zs.B(r)}}}),_$={},Gpn={H:function(){return!0},B:function(e){Ht.error("memoryStorage error: "+e)},q:function(e){return _$[e]||null},W:function(e){return _$[e]||null},G:function(e,t){_$[e]=t},V:function(e){delete _$[e]}},u0=null,Vo={H:function(){if(!qg(u0))return u0;if(u0=!0,Ut(He))u0=!1;else try{var e="__support__";Vo.G(e,"xyz"),Vo.q(e)!=='"xyz"'&&(u0=!1),Vo.V(e)}catch{u0=!1}return u0},B:function(e){Ht.error("sessionStorage error: ",e)},q:function(e){try{return He?.sessionStorage.getItem(e)}catch(t){Vo.B(t)}return null},W:function(e){try{return JSON.parse(Vo.q(e))||null}catch{}return null},G:function(e,t){try{He?.sessionStorage.setItem(e,JSON.stringify(t))}catch(r){Vo.B(r)}},V:function(e){try{He?.sessionStorage.removeItem(e)}catch(t){Vo.B(t)}}},qm=(function(e){return e[e.PENDING=-1]="PENDING",e[e.DENIED=0]="DENIED",e[e.GRANTED=1]="GRANTED",e})({});class Qpn{constructor(t){this._instance=t}get F(){return this._instance.config}get consent(){return this.J()?qm.DENIED:this.K}isOptedOut(){return this.F.cookieless_mode==="always"||this.consent===qm.DENIED||this.consent===qm.PENDING&&(this.F.opt_out_capturing_by_default||this.F.cookieless_mode==="on_reject")}isOptedIn(){return!this.isOptedOut()}isExplicitlyOptedOut(){return this.consent===qm.DENIED}optInOut(t){this.Y.G(this.X,t?1:0,this.F.cookie_expiration,this.F.cross_subdomain_cookie,this.F.secure_cookie)}reset(){this.Y.V(this.X,this.F.cross_subdomain_cookie)}get X(){var{token:t,opt_out_capturing_cookie_prefix:r,consent_persistence_name:n}=this._instance.config;return n||(r?r+t:"__ph_opt_in_out_"+t)}get K(){var t=this.Y.q(this.X);return TY(t)?qm.GRANTED:Fn(Kdn,t)?qm.DENIED:qm.PENDING}get Y(){if(!this.Z){var t=this.F.opt_out_capturing_persistence_type;this.Z=t==="localStorage"?Zs:_h;var r=t==="localStorage"?_h:Zs;r.q(this.X)&&(this.Z.q(this.X)||this.optInOut(TY(r.q(this.X))),r.V(this.X,this.F.cross_subdomain_cookie))}return this.Z}J(){return!!this.F.respect_dnt&&!!qht([ju?.doNotTrack,ju?.msDoNotTrack,Qr.doNotTrack],(t=>TY(t)))}}var k$=go("[Dead Clicks]"),Wpn=()=>!0,Xpn=e=>{var t,r=!((t=e.instance.persistence)==null||!t.get_property(Hht)),n=e.instance.config.capture_dead_clicks;return _b(n)?n:!!wo(n)||r};class cmt{get lazyLoadedDeadClicksAutocapture(){return this.tt}constructor(t,r,n){this.instance=t,this.isEnabled=r,this.onCapture=n,this.startIfEnabled()}onRemoteConfig(t){this.instance.persistence&&this.instance.persistence.register({[Hht]:t?.captureDeadClicks}),this.startIfEnabled()}startIfEnabled(){this.isEnabled(this)&&this.it((()=>{this.et()}))}it(t){var r,n;(r=Qr.__PosthogExtensions__)!=null&&r.initDeadClicksAutocapture&&t(),(n=Qr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this.instance,"dead-clicks-autocapture",(a=>{a?k$.error("failed to load script",a):t()}))}et(){var t;if(Zt){if(!this.tt&&(t=Qr.__PosthogExtensions__)!=null&&t.initDeadClicksAutocapture){var r=wo(this.instance.config.capture_dead_clicks)?this.instance.config.capture_dead_clicks:{};r.__onCapture=this.onCapture,this.tt=Qr.__PosthogExtensions__.initDeadClicksAutocapture(this.instance,r),this.tt.start(Zt),k$.info("starting...")}}else k$.error("`document` not found. Cannot start.")}stop(){this.tt&&(this.tt.stop(),this.tt=void 0,k$.info("stopping..."))}}var iC=go("[ExceptionAutocapture]");class Ypn{constructor(t){var r,n,a;this.rt=()=>{var s;if(He&&this.isEnabled&&(s=Qr.__PosthogExtensions__)!=null&&s.errorWrappingFunctions){var i=Qr.__PosthogExtensions__.errorWrappingFunctions.wrapOnError,o=Qr.__PosthogExtensions__.errorWrappingFunctions.wrapUnhandledRejection,l=Qr.__PosthogExtensions__.errorWrappingFunctions.wrapConsoleError;try{!this.st&&this.F.capture_unhandled_errors&&(this.st=i(this.captureException.bind(this))),!this.nt&&this.F.capture_unhandled_rejections&&(this.nt=o(this.captureException.bind(this))),!this.ot&&this.F.capture_console_errors&&(this.ot=l(this.captureException.bind(this)))}catch(c){iC.error("failed to start",c),this.lt()}}},this._instance=t,this.ut=!((r=this._instance.persistence)==null||!r.props[JMe]),this.F=this.ht(),this.vt=new Jdn({refillRate:(n=this._instance.config.error_tracking.__exceptionRateLimiterRefillRate)!==null&&n!==void 0?n:1,bucketSize:(a=this._instance.config.error_tracking.__exceptionRateLimiterBucketSize)!==null&&a!==void 0?a:10,refillInterval:1e4,h:iC}),this.startIfEnabled()}ht(){var t=this._instance.config.capture_exceptions,r={capture_unhandled_errors:!1,capture_unhandled_rejections:!1,capture_console_errors:!1};return wo(t)?r=tr({},r,t):(Ut(t)?this.ut:t)&&(r=tr({},r,{capture_unhandled_errors:!0,capture_unhandled_rejections:!0})),r}get isEnabled(){return this.F.capture_console_errors||this.F.capture_unhandled_errors||this.F.capture_unhandled_rejections}startIfEnabled(){this.isEnabled&&(iC.info("enabled"),this.it(this.rt))}it(t){var r,n;(r=Qr.__PosthogExtensions__)!=null&&r.errorWrappingFunctions&&t(),(n=Qr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"exception-autocapture",(a=>{if(a)return iC.error("failed to load script",a);t()}))}lt(){var t,r,n;(t=this.st)==null||t.call(this),this.st=void 0,(r=this.nt)==null||r.call(this),this.nt=void 0,(n=this.ot)==null||n.call(this),this.ot=void 0}onRemoteConfig(t){var r=t.autocaptureExceptions;this.ut=!!r||!1,this.F=this.ht(),this._instance.persistence&&this._instance.persistence.register({[JMe]:this.ut}),this.startIfEnabled()}captureException(t){var r,n,a=(r=t==null||(n=t.$exception_list)==null||(n=n[0])==null?void 0:n.type)!==null&&r!==void 0?r:"Exception";this.vt.consumeRateLimit(a)?iC.info("Skipping exception capture because of client rate limiting.",{exception:a}):this._instance.exceptions.sendExceptionEvent(t)}}function d3e(e,t,r){try{if(!(t in e))return()=>{};var n=e[t],a=r(n);return Ob(a)&&(a.prototype=a.prototype||{},Object.defineProperties(a,{__posthog_wrapped__:{enumerable:!1,value:!0}})),e[t]=a,()=>{e[t]=n}}catch{return()=>{}}}class Kpn{constructor(t){var r;this._instance=t,this.dt=(He==null||(r=He.location)==null?void 0:r.pathname)||""}get isEnabled(){return this._instance.config.capture_pageview==="history_change"}startIfEnabled(){this.isEnabled&&(Ht.info("History API monitoring enabled, starting..."),this.monitorHistoryChanges())}stop(){this.ct&&this.ct(),this.ct=void 0,Ht.info("History API monitoring stopped")}monitorHistoryChanges(){var t,r;if(He&&He.history){var n=this;(t=He.history.pushState)!=null&&t.__posthog_wrapped__||d3e(He.history,"pushState",(a=>function(s,i,o){a.call(this,s,i,o),n.ft("pushState")})),(r=He.history.replaceState)!=null&&r.__posthog_wrapped__||d3e(He.history,"replaceState",(a=>function(s,i,o){a.call(this,s,i,o),n.ft("replaceState")})),this.gt()}}ft(t){try{var r,n=He==null||(r=He.location)==null?void 0:r.pathname;if(!n)return;n!==this.dt&&this.isEnabled&&this._instance.capture("$pageview",{navigation_type:t}),this.dt=n}catch(a){Ht.error("Error capturing "+t+" pageview",a)}}gt(){if(!this.ct){var t=()=>{this.ft("popstate")};qi(He,"popstate",t),this.ct=()=>{He&&He.removeEventListener("popstate",t)}}}}var PY=go("[SegmentIntegration]");function Jpn(e,t){var r=e.config.segment;if(!r)return t();(function(n,a){var s=n.config.segment;if(!s)return a();var i=l=>{var c=()=>l.anonymousId()||ob();n.config.get_device_id=c,l.id()&&(n.register({distinct_id:l.id(),$device_id:c()}),n.persistence.set_property(Vm,"identified")),a()},o=s.user();"then"in o&&Ob(o.then)?o.then((l=>i(l))):i(o)})(e,(()=>{r.register((n=>{Promise&&Promise.resolve||PY.warn("This browser does not have Promise support, and can not use the segment integration");var a=(s,i)=>{if(!i)return s;s.event.userId||s.event.anonymousId===n.get_distinct_id()||(PY.info("No userId set, resetting PostHog"),n.reset()),s.event.userId&&s.event.userId!==n.get_distinct_id()&&(PY.info("UserId set, identifying with PostHog"),n.identify(s.event.userId));var o=n.calculateEventProperties(i,s.event.properties);return s.event.properties=Object.assign({},o,s.event.properties),s};return{name:"PostHog JS",type:"enrichment",version:"1.0.0",isLoaded:()=>!0,load:()=>Promise.resolve(),track:s=>a(s,s.event.event),page:s=>a(s,"$pageview"),identify:s=>a(s,"$identify"),screen:s=>a(s,"$screen")}})(e)).then((()=>{t()}))}))}var umt="posthog-js";function dmt(e,t){var{organization:r,projectId:n,prefix:a,severityAllowList:s=["error"],sendExceptionsToPostHog:i=!0}=t===void 0?{}:t;return o=>{var l,c,u,d,f;if(!(s==="*"||s.includes(o.level))||!e.__loaded)return o;o.tags||(o.tags={});var h=e.requestRouter.endpointFor("ui","/project/"+e.config.token+"/person/"+e.get_distinct_id());o.tags["PostHog Person URL"]=h,e.sessionRecordingStarted()&&(o.tags["PostHog Recording URL"]=e.get_session_replay_url({withTimestamp:!0}));var g=((l=o.exception)==null?void 0:l.values)||[],y=g.map((w=>tr({},w,{stacktrace:w.stacktrace?tr({},w.stacktrace,{type:"raw",frames:(w.stacktrace.frames||[]).map((x=>tr({},x,{platform:"web:javascript"})))}):void 0}))),b={$exception_message:((c=g[0])==null?void 0:c.value)||o.message,$exception_type:(u=g[0])==null?void 0:u.type,$exception_level:o.level,$exception_list:y,$sentry_event_id:o.event_id,$sentry_exception:o.exception,$sentry_exception_message:((d=g[0])==null?void 0:d.value)||o.message,$sentry_exception_type:(f=g[0])==null?void 0:f.type,$sentry_tags:o.tags};return r&&n&&(b.$sentry_url=(a||"https://sentry.io/organizations/")+r+"/issues/?project="+n+"&query="+o.event_id),i&&e.exceptions.sendExceptionEvent(b),o}}class efn{constructor(t,r,n,a,s,i){this.name=umt,this.setupOnce=function(o){o(dmt(t,{organization:r,projectId:n,prefix:a,severityAllowList:s,sendExceptionsToPostHog:i==null||i}))}}}var tfn=He!=null&&He.location?jj(He.location.hash,"__posthog")||jj(location.hash,"state"):null,p3e="_postHogToolbarParams",f3e=go("[Toolbar]"),zy=(function(e){return e[e.UNINITIALIZED=0]="UNINITIALIZED",e[e.LOADING=1]="LOADING",e[e.LOADED=2]="LOADED",e})(zy||{});class rfn{constructor(t){this.instance=t}_t(t){Qr.ph_toolbar_state=t}yt(){var t;return(t=Qr.ph_toolbar_state)!==null&&t!==void 0?t:zy.UNINITIALIZED}maybeLoadToolbar(t,r,n){if(t===void 0&&(t=void 0),r===void 0&&(r=void 0),n===void 0&&(n=void 0),!He||!Zt)return!1;t=t??He.location,n=n??He.history;try{if(!r){try{He.localStorage.setItem("test","test"),He.localStorage.removeItem("test")}catch{return!1}r=He?.localStorage}var a,s=tfn||jj(t.hash,"__posthog")||jj(t.hash,"state"),i=s?YMe((()=>JSON.parse(atob(decodeURIComponent(s)))))||YMe((()=>JSON.parse(decodeURIComponent(s)))):null;return i&&i.action==="ph_authorize"?((a=i).source="url",a&&Object.keys(a).length>0&&(i.desiredHash?t.hash=i.desiredHash:n?n.replaceState(n.state,"",t.pathname+t.search):t.hash="")):((a=JSON.parse(r.getItem(p3e)||"{}")).source="localstorage",delete a.userIntent),!(!a.token||this.instance.config.token!==a.token)&&(this.loadToolbar(a),!0)}catch{return!1}}bt(t){var r=Qr.ph_load_toolbar||Qr.ph_load_editor;!Ga(r)&&Ob(r)?r(t,this.instance):f3e.warn("No toolbar load function found")}loadToolbar(t){var r=!(Zt==null||!Zt.getElementById(Qht));if(!He||r)return!1;var n=this.instance.requestRouter.region==="custom"&&this.instance.config.advanced_disable_toolbar_metrics,a=tr({token:this.instance.config.token},t,{apiURL:this.instance.requestRouter.endpointFor("ui")},n?{instrument:!1}:{});if(He.localStorage.setItem(p3e,JSON.stringify(tr({},a,{source:void 0}))),this.yt()===zy.LOADED)this.bt(a);else if(this.yt()===zy.UNINITIALIZED){var s;this._t(zy.LOADING),(s=Qr.__PosthogExtensions__)==null||s.loadExternalDependency==null||s.loadExternalDependency(this.instance,"toolbar",(i=>{if(i)return f3e.error("[Toolbar] Failed to load",i),void this._t(zy.UNINITIALIZED);this._t(zy.LOADED),this.bt(a)})),qi(He,"turbolinks:load",(()=>{this._t(zy.UNINITIALIZED),this.loadToolbar(a)}))}return!0}wt(t){return this.loadToolbar(t)}maybeLoadEditor(t,r,n){return t===void 0&&(t=void 0),r===void 0&&(r=void 0),n===void 0&&(n=void 0),this.maybeLoadToolbar(t,r,n)}}var nfn=go("[TracingHeaders]");class afn{constructor(t){this.xt=void 0,this.St=void 0,this.rt=()=>{var r,n;Ut(this.xt)&&((r=Qr.__PosthogExtensions__)==null||(r=r.tracingHeadersPatchFns)==null||r._patchXHR(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager)),Ut(this.St)&&((n=Qr.__PosthogExtensions__)==null||(n=n.tracingHeadersPatchFns)==null||n._patchFetch(this._instance.config.__add_tracing_headers||[],this._instance.get_distinct_id(),this._instance.sessionManager))},this._instance=t}it(t){var r,n;(r=Qr.__PosthogExtensions__)!=null&&r.tracingHeadersPatchFns&&t(),(n=Qr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"tracing-headers",(a=>{if(a)return nfn.error("failed to load script",a);t()}))}startIfEnabledOrStop(){var t,r;this._instance.config.__add_tracing_headers?this.it(this.rt):((t=this.xt)==null||t.call(this),(r=this.St)==null||r.call(this),this.xt=void 0,this.St=void 0)}}var qd="Mobile",Fj="iOS",mh="Android",uI="Tablet",pmt=mh+" "+uI,fmt="iPad",hmt="Apple",mmt=hmt+" Watch",dI="Safari",dO="BlackBerry",gmt="Samsung",ymt=gmt+"Browser",bmt=gmt+" Internet",zx="Chrome",sfn=zx+" OS",vmt=zx+" "+Fj,ife="Internet Explorer",xmt=ife+" "+qd,ofe="Opera",ifn=ofe+" Mini",lfe="Edge",wmt="Microsoft "+lfe,BS="Firefox",Smt=BS+" "+Fj,pI="Nintendo",fI="PlayStation",zS="Xbox",Emt=mh+" "+qd,Omt=qd+" "+dI,LC="Windows",ine=LC+" Phone",h3e="Nokia",one="Ouya",_mt="Generic",ofn=_mt+" "+qd.toLowerCase(),kmt=_mt+" "+uI.toLowerCase(),lne="Konqueror",Pl="(\\d+(\\.\\d+)?)",$Y=new RegExp("Version/"+Pl),lfn=new RegExp(zS,"i"),cfn=new RegExp(fI+" \\w+","i"),ufn=new RegExp(pI+" \\w+","i"),cfe=new RegExp(dO+"|PlayBook|BB10","i"),dfn={"NT3.51":"NT 3.11","NT4.0":"NT 4.0","5.0":"2000",5.1:"XP",5.2:"XP","6.0":"Vista",6.1:"7",6.2:"8",6.3:"8.1",6.4:"10","10.0":"10"},pfn=(e,t)=>t&&Fn(t,hmt)||(function(r){return Fn(r,dI)&&!Fn(r,zx)&&!Fn(r,mh)})(e),Cmt=function(e,t){return t=t||"",Fn(e," OPR/")&&Fn(e,"Mini")?ifn:Fn(e," OPR/")?ofe:cfe.test(e)?dO:Fn(e,"IE"+qd)||Fn(e,"WPDesktop")?xmt:Fn(e,ymt)?bmt:Fn(e,lfe)||Fn(e,"Edg/")?wmt:Fn(e,"FBIOS")?"Facebook "+qd:Fn(e,"UCWEB")||Fn(e,"UCBrowser")?"UC Browser":Fn(e,"CriOS")?vmt:Fn(e,"CrMo")||Fn(e,zx)?zx:Fn(e,mh)&&Fn(e,dI)?Emt:Fn(e,"FxiOS")?Smt:Fn(e.toLowerCase(),lne.toLowerCase())?lne:pfn(e,t)?Fn(e,qd)?Omt:dI:Fn(e,BS)?BS:Fn(e,"MSIE")||Fn(e,"Trident/")?ife:Fn(e,"Gecko")?BS:""},ffn={[xmt]:[new RegExp("rv:"+Pl)],[wmt]:[new RegExp(lfe+"?\\/"+Pl)],[zx]:[new RegExp("("+zx+"|CrMo)\\/"+Pl)],[vmt]:[new RegExp("CriOS\\/"+Pl)],"UC Browser":[new RegExp("(UCBrowser|UCWEB)\\/"+Pl)],[dI]:[$Y],[Omt]:[$Y],[ofe]:[new RegExp("(Opera|OPR)\\/"+Pl)],[BS]:[new RegExp(BS+"\\/"+Pl)],[Smt]:[new RegExp("FxiOS\\/"+Pl)],[lne]:[new RegExp("Konqueror[:/]?"+Pl,"i")],[dO]:[new RegExp(dO+" "+Pl),$Y],[Emt]:[new RegExp("android\\s"+Pl,"i")],[bmt]:[new RegExp(ymt+"\\/"+Pl)],[ife]:[new RegExp("(rv:|MSIE )"+Pl)],Mozilla:[new RegExp("rv:"+Pl)]},hfn=function(e,t){var r=Cmt(e,t),n=ffn[r];if(Ut(n))return null;for(var a=0;a<n.length;a++){var s=n[a],i=e.match(s);if(i)return parseFloat(i[i.length-2])}return null},m3e=[[new RegExp(zS+"; "+zS+" (.*?)[);]","i"),e=>[zS,e&&e[1]||""]],[new RegExp(pI,"i"),[pI,""]],[new RegExp(fI,"i"),[fI,""]],[cfe,[dO,""]],[new RegExp(LC,"i"),(e,t)=>{if(/Phone/.test(t)||/WPDesktop/.test(t))return[ine,""];if(new RegExp(qd).test(t)&&!/IEMobile\b/.test(t))return[LC+" "+qd,""];var r=/Windows NT ([0-9.]+)/i.exec(t);if(r&&r[1]){var n=r[1],a=dfn[n]||"";return/arm/i.test(t)&&(a="RT"),[LC,a]}return[LC,""]}],[/((iPhone|iPad|iPod).*?OS (\d+)_(\d+)_?(\d+)?|iPhone)/,e=>{if(e&&e[3]){var t=[e[3],e[4],e[5]||"0"];return[Fj,t.join(".")]}return[Fj,""]}],[/(watch.*\/(\d+\.\d+\.\d+)|watch os,(\d+\.\d+),)/i,e=>{var t="";return e&&e.length>=3&&(t=Ut(e[2])?e[3]:e[2]),["watchOS",t]}],[new RegExp("("+mh+" (\\d+)\\.(\\d+)\\.?(\\d+)?|"+mh+")","i"),e=>{if(e&&e[2]){var t=[e[2],e[3],e[4]||"0"];return[mh,t.join(".")]}return[mh,""]}],[/Mac OS X (\d+)[_.](\d+)[_.]?(\d+)?/i,e=>{var t=["Mac OS X",""];if(e&&e[1]){var r=[e[1],e[2],e[3]||"0"];t[1]=r.join(".")}return t}],[/Mac/i,["Mac OS X",""]],[/CrOS/,[sfn,""]],[/Linux|debian/i,["Linux",""]]],g3e=function(e){return ufn.test(e)?pI:cfn.test(e)?fI:lfn.test(e)?zS:new RegExp(one,"i").test(e)?one:new RegExp("("+ine+"|WPDesktop)","i").test(e)?ine:/iPad/.test(e)?fmt:/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(watch)(?: ?os[,/]|\d,\d\/)[\d.]+/i.test(e)?mmt:cfe.test(e)?dO:/(kobo)\s(ereader|touch)/i.test(e)?"Kobo":new RegExp(h3e,"i").test(e)?h3e:/(kf[a-z]{2}wi|aeo[c-r]{2})( bui|\))/i.test(e)||/(kf[a-z]+)( bui|\)).+silk\//i.test(e)?"Kindle Fire":/(Android|ZTE)/i.test(e)?!new RegExp(qd).test(e)||/(9138B|TB782B|Nexus [97]|pixel c|HUAWEISHT|BTV|noble nook|smart ultra 6)/i.test(e)?/pixel[\daxl ]{1,6}/i.test(e)&&!/pixel c/i.test(e)||/(huaweimed-al00|tah-|APA|SM-G92|i980|zte|U304AA)/i.test(e)||/lmy47v/i.test(e)&&!/QTAQZ3/i.test(e)?mh:pmt:mh:new RegExp("(pda|"+qd+")","i").test(e)?ofn:new RegExp(uI,"i").test(e)&&!new RegExp(uI+" pc","i").test(e)?kmt:""},C$="https?://(.*)",v_=["gclid","gclsrc","dclid","gbraid","wbraid","fbclid","msclkid","twclid","li_fat_id","igshid","ttclid","rdt_cid","epik","qclid","sccid","irclid","_kx"],mfn=b_(["utm_source","utm_medium","utm_campaign","utm_content","utm_term","gad_source","mc_cid"],v_),sR="<masked>",gfn=["li_fat_id"];function Tmt(e,t,r){if(!Zt)return{};var n,a=t?b_([],v_,r||[]):[],s=Amt(aR(Zt.URL,a,sR),e),i=(n={},hs(gfn,(function(o){var l=_h.q(o);n[o]=l||null})),n);return Ci(i,s)}function Amt(e,t){var r=mfn.concat(t||[]),n={};return hs(r,(function(a){var s=Mj(e,a);n[a]=s||null})),n}function Dmt(e){var t=(function(s){return s?s.search(C$+"google.([^/?]*)")===0?"google":s.search(C$+"bing.com")===0?"bing":s.search(C$+"yahoo.com")===0?"yahoo":s.search(C$+"duckduckgo.com")===0?"duckduckgo":null:null})(e),r=t!="yahoo"?"q":"p",n={};if(!qg(t)){n.$search_engine=t;var a=Zt?Mj(Zt.referrer,r):"";a.length&&(n.ph_keyword=a)}return n}function y3e(){return navigator.language||navigator.userLanguage}function Imt(){return Zt?.referrer||"$direct"}function Nmt(e,t){var r=e?b_([],v_,t||[]):[],n=Ec?.href.substring(0,1e3);return{r:Imt().substring(0,1e3),u:n?aR(n,r,sR):void 0}}function Rmt(e){var t,{r,u:n}=e,a={$referrer:r,$referring_domain:r==null?void 0:r=="$direct"?"$direct":(t=$j(r))==null?void 0:t.host};if(n){a.$current_url=n;var s=$j(n);a.$host=s?.host,a.$pathname=s?.pathname;var i=Amt(n);Ci(a,i)}if(r){var o=Dmt(r);Ci(a,o)}return a}function Pmt(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone}catch{return}}function yfn(){try{return new Date().getTimezoneOffset()}catch{return}}function bfn(e,t){if(!gc)return{};var r,n,a,s=e?b_([],v_,t||[]):[],[i,o]=(function(l){for(var c=0;c<m3e.length;c++){var[u,d]=m3e[c],f=u.exec(l),h=f&&(Ob(d)?d(f,l):d);if(h)return h}return["",""]})(gc);return Ci(rfe({$os:i,$os_version:o,$browser:Cmt(gc,navigator.vendor),$device:g3e(gc),$device_type:(n=gc,a=g3e(n),a===fmt||a===pmt||a==="Kobo"||a==="Kindle Fire"||a===kmt?uI:a===pI||a===zS||a===fI||a===one?"Console":a===mmt?"Wearable":a?qd:"Desktop"),$timezone:Pmt(),$timezone_offset:yfn()}),{$current_url:aR(Ec?.href,s,sR),$host:Ec?.host,$pathname:Ec?.pathname,$raw_user_agent:gc.length>1e3?gc.substring(0,997)+"...":gc,$browser_version:hfn(gc,navigator.vendor),$browser_language:y3e(),$browser_language_prefix:(r=y3e(),typeof r=="string"?r.split("-")[0]:void 0),$screen_height:He?.screen.height,$screen_width:He?.screen.width,$viewport_height:He?.innerHeight,$viewport_width:He?.innerWidth,$lib:"web",$lib_version:Um.LIB_VERSION,$insert_id:Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10),$time:Date.now()/1e3})}var Ry=go("[Web Vitals]"),b3e=9e5;class vfn{constructor(t){var r;this.Et=!1,this.P=!1,this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0},this.$t=()=>{clearTimeout(this.kt),this.N.metrics.length!==0&&(this._instance.capture("$web_vitals",this.N.metrics.reduce(((n,a)=>tr({},n,{["$web_vitals_"+a.name+"_event"]:tr({},a),["$web_vitals_"+a.name+"_value"]:a.value})),{})),this.N={url:void 0,metrics:[],firstMetricTimestamp:void 0})},this.Pt=n=>{var a,s=(a=this._instance.sessionManager)==null?void 0:a.checkAndGetSessionAndWindowId(!0);if(Ut(s))Ry.error("Could not read session ID. Dropping metrics!");else{this.N=this.N||{url:void 0,metrics:[],firstMetricTimestamp:void 0};var i=this.Tt();Ut(i)||(Ga(n?.name)||Ga(n?.value)?Ry.error("Invalid metric received",n):this.Rt&&n.value>=this.Rt?Ry.error("Ignoring metric with value >= "+this.Rt,n):(this.N.url!==i&&(this.$t(),this.kt=setTimeout(this.$t,this.flushToCaptureTimeoutMs)),Ut(this.N.url)&&(this.N.url=i),this.N.firstMetricTimestamp=Ut(this.N.firstMetricTimestamp)?Date.now():this.N.firstMetricTimestamp,n.attribution&&n.attribution.interactionTargetElement&&(n.attribution.interactionTargetElement=void 0),this.N.metrics.push(tr({},n,{$current_url:i,$session_id:s.sessionId,$window_id:s.windowId,timestamp:Date.now()})),this.N.metrics.length===this.allowedMetrics.length&&this.$t()))}},this.rt=()=>{var n,a,s,i,o=Qr.__PosthogExtensions__;Ut(o)||Ut(o.postHogWebVitalsCallbacks)||({onLCP:n,onCLS:a,onFCP:s,onINP:i}=o.postHogWebVitalsCallbacks),n&&a&&s&&i?(this.allowedMetrics.indexOf("LCP")>-1&&n(this.Pt.bind(this)),this.allowedMetrics.indexOf("CLS")>-1&&a(this.Pt.bind(this)),this.allowedMetrics.indexOf("FCP")>-1&&s(this.Pt.bind(this)),this.allowedMetrics.indexOf("INP")>-1&&i(this.Pt.bind(this)),this.P=!0):Ry.error("web vitals callbacks not loaded - not starting")},this._instance=t,this.Et=!((r=this._instance.persistence)==null||!r.props[t3e]),this.startIfEnabled()}get allowedMetrics(){var t,r,n=wo(this._instance.config.capture_performance)?(t=this._instance.config.capture_performance)==null?void 0:t.web_vitals_allowed_metrics:void 0;return Ut(n)?((r=this._instance.persistence)==null?void 0:r.props[r3e])||["CLS","FCP","INP","LCP"]:n}get flushToCaptureTimeoutMs(){return(wo(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals_delayed_flush_ms:void 0)||5e3}get Rt(){var t=wo(this._instance.config.capture_performance)&&Fh(this._instance.config.capture_performance.__web_vitals_max_value)?this._instance.config.capture_performance.__web_vitals_max_value:b3e;return 0<t&&t<=6e4?b3e:t}get isEnabled(){var t=Ec?.protocol;if(t!=="http:"&&t!=="https:")return Ry.info("Web Vitals are disabled on non-http/https protocols"),!1;var r=wo(this._instance.config.capture_performance)?this._instance.config.capture_performance.web_vitals:_b(this._instance.config.capture_performance)?this._instance.config.capture_performance:void 0;return _b(r)?r:this.Et}startIfEnabled(){this.isEnabled&&!this.P&&(Ry.info("enabled, starting..."),this.it(this.rt))}onRemoteConfig(t){var r=wo(t.capturePerformance)&&!!t.capturePerformance.web_vitals,n=wo(t.capturePerformance)?t.capturePerformance.web_vitals_allowed_metrics:void 0;this._instance.persistence&&(this._instance.persistence.register({[t3e]:r}),this._instance.persistence.register({[r3e]:n})),this.Et=r,this.startIfEnabled()}it(t){var r,n;(r=Qr.__PosthogExtensions__)!=null&&r.postHogWebVitalsCallbacks&&t(),(n=Qr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"web-vitals",(a=>{a?Ry.error("failed to load script",a):t()}))}Tt(){var t=He?He.location.href:void 0;if(t){var r=this._instance.config.mask_personal_data_properties,n=this._instance.config.custom_personal_data_properties,a=r?b_([],v_,n||[]):[];return aR(t,a,sR)}Ry.error("Could not determine current URL")}}var xfn=go("[Heatmaps]");function v3e(e){return wo(e)&&"clientX"in e&&"clientY"in e&&Fh(e.clientX)&&Fh(e.clientY)}class wfn{constructor(t){var r;this.Et=!1,this.P=!1,this.It=null,this.instance=t,this.Et=!((r=this.instance.persistence)==null||!r.props[Yre]),this.rageclicks=new omt(t.config.rageclick)}get flushIntervalMilliseconds(){var t=5e3;return wo(this.instance.config.capture_heatmaps)&&this.instance.config.capture_heatmaps.flush_interval_milliseconds&&(t=this.instance.config.capture_heatmaps.flush_interval_milliseconds),t}get isEnabled(){return Ut(this.instance.config.capture_heatmaps)?Ut(this.instance.config.enable_heatmaps)?this.Et:this.instance.config.enable_heatmaps:this.instance.config.capture_heatmaps!==!1}startIfEnabled(){if(this.isEnabled){if(this.P)return;xfn.info("starting..."),this.Ft(),this.Ct()}else{var t;clearInterval((t=this.It)!==null&&t!==void 0?t:void 0),this.Mt(),this.getAndClearBuffer()}}onRemoteConfig(t){var r=!!t.heatmaps;this.instance.persistence&&this.instance.persistence.register({[Yre]:r}),this.Et=r,this.startIfEnabled()}getAndClearBuffer(){var t=this.N;return this.N=void 0,t}Ot(t){this.At(t.originalEvent,"deadclick")}Ct(){this.It&&clearInterval(this.It),this.It=(function(t){return t?.visibilityState==="visible"})(Zt)?setInterval(this.Dt.bind(this),this.flushIntervalMilliseconds):null}Ft(){He&&Zt&&(this.jt=this.Dt.bind(this),qi(He,"beforeunload",this.jt),this.Lt=t=>this.At(t||He?.event),qi(Zt,"click",this.Lt,{capture:!0}),this.Nt=t=>this.Ut(t||He?.event),qi(Zt,"mousemove",this.Nt,{capture:!0}),this.zt=new cmt(this.instance,Wpn,this.Ot.bind(this)),this.zt.startIfEnabled(),this.Ht=this.Ct.bind(this),qi(Zt,"visibilitychange",this.Ht),this.P=!0)}Mt(){var t;He&&Zt&&(this.jt&&He.removeEventListener("beforeunload",this.jt),this.Lt&&Zt.removeEventListener("click",this.Lt,{capture:!0}),this.Nt&&Zt.removeEventListener("mousemove",this.Nt,{capture:!0}),this.Ht&&Zt.removeEventListener("visibilitychange",this.Ht),clearTimeout(this.Bt),(t=this.zt)==null||t.stop(),this.P=!1)}qt(t,r){var n=this.instance.scrollManager.scrollY(),a=this.instance.scrollManager.scrollX(),s=this.instance.scrollManager.scrollElement(),i=(function(o,l,c){for(var u=o;u&&UF(u)&&!Cb(u,"body");){if(u===c)return!1;if(Fn(l,He?.getComputedStyle(u).position))return!0;u=emt(u)}return!1})(Kht(t),["fixed","sticky"],s);return{x:t.clientX+(i?0:a),y:t.clientY+(i?0:n),target_fixed:i,type:r}}At(t,r){var n;if(r===void 0&&(r="click"),!n3e(t.target)&&v3e(t)){var a=this.qt(t,r);(n=this.rageclicks)!=null&&n.isRageClick(t.clientX,t.clientY,new Date().getTime())&&this.Wt(tr({},a,{type:"rageclick"})),this.Wt(a)}}Ut(t){!n3e(t.target)&&v3e(t)&&(clearTimeout(this.Bt),this.Bt=setTimeout((()=>{this.Wt(this.qt(t,"mousemove"))}),500))}Wt(t){if(He){var r=He.location.href,n=this.instance.config.mask_personal_data_properties,a=this.instance.config.custom_personal_data_properties,s=n?b_([],v_,a||[]):[],i=aR(r,s,sR);this.N=this.N||{},this.N[i]||(this.N[i]=[]),this.N[i].push(t)}}Dt(){this.N&&!dS(this.N)&&this.instance.capture("$$heatmap",{$heatmap_data:this.getAndClearBuffer()})}}class Sfn{constructor(t){this._instance=t}doPageView(t,r){var n,a=this.Gt(t,r);return this.Vt={pathname:(n=He?.location.pathname)!==null&&n!==void 0?n:"",pageViewId:r,timestamp:t},this._instance.scrollManager.resetContext(),a}doPageLeave(t){var r;return this.Gt(t,(r=this.Vt)==null?void 0:r.pageViewId)}doEvent(){var t;return{$pageview_id:(t=this.Vt)==null?void 0:t.pageViewId}}Gt(t,r){var n=this.Vt;if(!n)return{$pageview_id:r};var a={$pageview_id:r,$prev_pageview_id:n.pageViewId},s=this._instance.scrollManager.getContext();if(s&&!this._instance.config.disable_scroll_properties){var{maxScrollHeight:i,lastScrollY:o,maxScrollY:l,maxContentHeight:c,lastContentY:u,maxContentY:d}=s;if(!(Ut(i)||Ut(o)||Ut(l)||Ut(c)||Ut(u)||Ut(d))){i=Math.ceil(i),o=Math.ceil(o),l=Math.ceil(l),c=Math.ceil(c),u=Math.ceil(u),d=Math.ceil(d);var f=i<=1?1:hh(o/i,0,1,Ht),h=i<=1?1:hh(l/i,0,1,Ht),g=c<=1?1:hh(u/c,0,1,Ht),y=c<=1?1:hh(d/c,0,1,Ht);a=Ci(a,{$prev_pageview_last_scroll:o,$prev_pageview_last_scroll_percentage:f,$prev_pageview_max_scroll:l,$prev_pageview_max_scroll_percentage:h,$prev_pageview_last_content:u,$prev_pageview_last_content_percentage:g,$prev_pageview_max_content:d,$prev_pageview_max_content_percentage:y})}}return n.pathname&&(a.$prev_pageview_pathname=n.pathname),n.timestamp&&(a.$prev_pageview_duration=(t.getTime()-n.timestamp.getTime())/1e3),a}}var Zd=Uint8Array,Pc=Uint16Array,pO=Uint32Array,ufe=new Zd([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),dfe=new Zd([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),x3e=new Zd([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),$mt=function(e,t){for(var r=new Pc(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var a=new pO(r[30]);for(n=1;n<30;++n)for(var s=r[n];s<r[n+1];++s)a[s]=s-r[n]<<5|n;return[r,a]},Mmt=$mt(ufe,2),Efn=Mmt[0],cne=Mmt[1];Efn[28]=258,cne[258]=28;for(var w3e=$mt(dfe,0)[1],jmt=new Pc(32768),Ts=0;Ts<32768;++Ts){var d0=(43690&Ts)>>>1|(21845&Ts)<<1;d0=(61680&(d0=(52428&d0)>>>2|(13107&d0)<<2))>>>4|(3855&d0)<<4,jmt[Ts]=((65280&d0)>>>8|(255&d0)<<8)>>>1}var NT=function(e,t,r){for(var n=e.length,a=0,s=new Pc(t);a<n;++a)++s[e[a]-1];var i,o=new Pc(t);for(a=0;a<t;++a)o[a]=o[a-1]+s[a-1]<<1;for(i=new Pc(n),a=0;a<n;++a)i[a]=jmt[o[e[a]-1]++]>>>15-e[a];return i},Ux=new Zd(288);for(Ts=0;Ts<144;++Ts)Ux[Ts]=8;for(Ts=144;Ts<256;++Ts)Ux[Ts]=9;for(Ts=256;Ts<280;++Ts)Ux[Ts]=7;for(Ts=280;Ts<288;++Ts)Ux[Ts]=8;var Bj=new Zd(32);for(Ts=0;Ts<32;++Ts)Bj[Ts]=5;var Ofn=NT(Ux,9),_fn=NT(Bj,5),Lmt=function(e){return(e/8>>0)+(7&e&&1)},Fmt=function(e,t,r){(r==null||r>e.length)&&(r=e.length);var n=new(e instanceof Pc?Pc:e instanceof pO?pO:Zd)(r-t);return n.set(e.subarray(t,r)),n},Rm=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8},oC=function(e,t,r){r<<=7&t;var n=t/8>>0;e[n]|=r,e[n+1]|=r>>>8,e[n+2]|=r>>>16},MY=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var a=r.length,s=r.slice();if(!a)return[new Zd(0),0];if(a==1){var i=new Zd(r[0].s+1);return i[r[0].s]=1,[i,1]}r.sort((function(C,k){return C.f-k.f})),r.push({s:-1,f:25001});var o=r[0],l=r[1],c=0,u=1,d=2;for(r[0]={s:-1,f:o.f+l.f,l:o,r:l};u!=a-1;)o=r[r[c].f<r[d].f?c++:d++],l=r[c!=u&&r[c].f<r[d].f?c++:d++],r[u++]={s:-1,f:o.f+l.f,l:o,r:l};var f=s[0].s;for(n=1;n<a;++n)s[n].s>f&&(f=s[n].s);var h=new Pc(f+1),g=une(r[u-1],h,0);if(g>t){n=0;var y=0,b=g-t,w=1<<b;for(s.sort((function(C,k){return h[k.s]-h[C.s]||C.f-k.f}));n<a;++n){var x=s[n].s;if(!(h[x]>t))break;y+=w-(1<<g-h[x]),h[x]=t}for(y>>>=b;y>0;){var S=s[n].s;h[S]<t?y-=1<<t-h[S]++-1:++n}for(;n>=0&&y;--n){var E=s[n].s;h[E]==t&&(--h[E],++y)}g=t}return[new Zd(h),g]},une=function(e,t,r){return e.s==-1?Math.max(une(e.l,t,r+1),une(e.r,t,r+1)):t[e.s]=r},S3e=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new Pc(++t),n=0,a=e[0],s=1,i=function(l){r[n++]=l},o=1;o<=t;++o)if(e[o]==a&&o!=t)++s;else{if(!a&&s>2){for(;s>138;s-=138)i(32754);s>2&&(i(s>10?s-11<<5|28690:s-3<<5|12305),s=0)}else if(s>3){for(i(a),--s;s>6;s-=6)i(8304);s>2&&(i(s-3<<5|8208),s=0)}for(;s--;)i(a);s=1,a=e[o]}return[r.subarray(0,n),t]},lC=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},dne=function(e,t,r){var n=r.length,a=Lmt(t+2);e[a]=255&n,e[a+1]=n>>>8,e[a+2]=255^e[a],e[a+3]=255^e[a+1];for(var s=0;s<n;++s)e[a+s+4]=r[s];return 8*(a+4+n)},E3e=function(e,t,r,n,a,s,i,o,l,c,u){Rm(t,u++,r),++a[256];for(var d=MY(a,15),f=d[0],h=d[1],g=MY(s,15),y=g[0],b=g[1],w=S3e(f),x=w[0],S=w[1],E=S3e(y),C=E[0],k=E[1],A=new Pc(19),D=0;D<x.length;++D)A[31&x[D]]++;for(D=0;D<C.length;++D)A[31&C[D]]++;for(var N=MY(A,7),P=N[0],j=N[1],z=19;z>4&&!P[x3e[z-1]];--z);var U,$,F,V,H=c+5<<3,B=lC(a,Ux)+lC(s,Bj)+i,Q=lC(a,f)+lC(s,y)+i+14+3*z+lC(A,P)+(2*A[16]+3*A[17]+7*A[18]);if(H<=B&&H<=Q)return dne(t,u,e.subarray(l,l+c));if(Rm(t,u,1+(Q<B)),u+=2,Q<B){U=NT(f,h),$=f,F=NT(y,b),V=y;var M=NT(P,j);for(Rm(t,u,S-257),Rm(t,u+5,k-1),Rm(t,u+10,z-4),u+=14,D=0;D<z;++D)Rm(t,u+3*D,P[x3e[D]]);u+=3*z;for(var W=[x,C],q=0;q<2;++q){var I=W[q];for(D=0;D<I.length;++D){var Z=31&I[D];Rm(t,u,M[Z]),u+=P[Z],Z>15&&(Rm(t,u,I[D]>>>5&127),u+=I[D]>>>12)}}}else U=Ofn,$=Ux,F=_fn,V=Bj;for(D=0;D<o;++D)if(n[D]>255){Z=n[D]>>>18&31,oC(t,u,U[Z+257]),u+=$[Z+257],Z>7&&(Rm(t,u,n[D]>>>23&31),u+=ufe[Z]);var G=31&n[D];oC(t,u,F[G]),u+=V[G],G>3&&(oC(t,u,n[D]>>>5&8191),u+=dfe[G])}else oC(t,u,U[n[D]]),u+=$[n[D]];return oC(t,u,U[256]),u+$[256]},kfn=new pO([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),Cfn=(function(){for(var e=new pO(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(1&r&&3988292384)^r>>>1;e[t]=r}return e})(),Tfn=function(e,t,r,n,a){return(function(s,i,o,l,c,u){var d=s.length,f=new Zd(l+d+5*(1+Math.floor(d/7e3))+c),h=f.subarray(l,f.length-c),g=0;if(!i||d<8)for(var y=0;y<=d;y+=65535){var b=y+65535;b<d?g=dne(h,g,s.subarray(y,b)):(h[y]=u,g=dne(h,g,s.subarray(y,d)))}else{for(var w=kfn[i-1],x=w>>>13,S=8191&w,E=(1<<o)-1,C=new Pc(32768),k=new Pc(E+1),A=Math.ceil(o/3),D=2*A,N=function(ye){return(s[ye]^s[ye+1]<<A^s[ye+2]<<D)&E},P=new pO(25e3),j=new Pc(288),z=new Pc(32),U=0,$=0,F=(y=0,0),V=0,H=0;y<d;++y){var B=N(y),Q=32767&y,M=k[B];if(C[Q]=M,k[B]=Q,V<=y){var W=d-y;if((U>7e3||F>24576)&&W>423){g=E3e(s,h,0,P,j,z,$,F,H,y-H,g),F=U=$=0,H=y;for(var q=0;q<286;++q)j[q]=0;for(q=0;q<30;++q)z[q]=0}var I=2,Z=0,G=S,J=Q-M&32767;if(W>2&&B==N(y-J))for(var K=Math.min(x,W)-1,ae=Math.min(32767,y),le=Math.min(258,W);J<=ae&&--G&&Q!=M;){if(s[y+I]==s[y+I-J]){for(var ce=0;ce<le&&s[y+ce]==s[y+ce-J];++ce);if(ce>I){if(I=ce,Z=J,ce>K)break;var Te=Math.min(J,ce-2),X=0;for(q=0;q<Te;++q){var se=y-J+q+32768&32767,te=se-C[se]+32768&32767;te>X&&(X=te,M=se)}}}J+=(Q=M)-(M=C[Q])+32768&32767}if(Z){P[F++]=268435456|cne[I]<<18|w3e[Z];var ve=31&cne[I],ue=31&w3e[Z];$+=ufe[ve]+dfe[ue],++j[257+ve],++z[ue],V=y+I,++U}else P[F++]=s[y],++j[s[y]]}}g=E3e(s,h,u,P,j,z,$,F,H,y-H,g)}return Fmt(f,0,l+Lmt(g)+c)})(e,t.level==null?6:t.level,t.mem==null?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):12+t.mem,r,n,!0)},jY=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function Afn(e,t){t===void 0&&(t={});var r=(function(){var o=4294967295;return{p:function(l){for(var c=o,u=0;u<l.length;++u)c=Cfn[255&c^l[u]]^c>>>8;o=c},d:function(){return 4294967295^o}}})(),n=e.length;r.p(e);var a,s=Tfn(e,t,10+((a=t).filename&&a.filename.length+1||0),8),i=s.length;return(function(o,l){var c=l.filename;if(o[0]=31,o[1]=139,o[2]=8,o[8]=l.level<2?4:l.level==9?2:0,o[9]=3,l.mtime!=0&&jY(o,4,Math.floor(new Date(l.mtime||Date.now())/1e3)),c){o[3]=8;for(var u=0;u<=c.length;++u)o[u+10]=c.charCodeAt(u)}})(s,t),jY(s,i-8,r.d()),jY(s,i-4,n),s}var Dfn=function(e){var t,r,n,a,s="";for(t=r=0,n=(e=(e+"").replace(/\r\n/g,`
|
|
617
617
|
`).replace(/\r/g,`
|
|
618
618
|
`)).length,a=0;a<n;a++){var i=e.charCodeAt(a),o=null;i<128?r++:o=i>127&&i<2048?String.fromCharCode(i>>6|192,63&i|128):String.fromCharCode(i>>12|224,i>>6&63|128,63&i|128),qg(o)||(r>t&&(s+=e.substring(t,r)),s+=o,t=r=a+1)}return r>t&&(s+=e.substring(t,e.length)),s},Ifn=!!Hre||!!Zre,O3e="text/plain",zj=function(e,t,r){var n;r===void 0&&(r=!0);var[a,s]=e.split("?"),i=tr({},t),o=(n=s?.split("&").map((c=>{var u,[d,f]=c.split("="),h=r&&(u=i[d])!==null&&u!==void 0?u:f;return delete i[d],d+"="+h})))!==null&&n!==void 0?n:[],l=Mpn(i);return l&&o.push(l),a+"?"+o.join("&")},FC=(e,t)=>JSON.stringify(e,((r,n)=>typeof n=="bigint"?n.toString():n),t),LY=e=>{var{data:t,compression:r}=e;if(t){if(r===Ym.GZipJS){var n=Afn((function(l,c){var u=l.length;if(typeof TextEncoder<"u")return new TextEncoder().encode(l);for(var d=new Zd(l.length+(l.length>>>1)),f=0,h=function(w){d[f++]=w},g=0;g<u;++g){if(f+5>d.length){var y=new Zd(f+8+(u-g<<1));y.set(d),d=y}var b=l.charCodeAt(g);b<128||c?h(b):b<2048?(h(192|b>>>6),h(128|63&b)):b>55295&&b<57344?(h(240|(b=65536+(1047552&b)|1023&l.charCodeAt(++g))>>>18),h(128|b>>>12&63),h(128|b>>>6&63),h(128|63&b)):(h(224|b>>>12),h(128|b>>>6&63),h(128|63&b))}return Fmt(d,0,f)})(FC(t)),{mtime:0}),a=new Blob([n],{type:O3e});return{contentType:O3e,body:a,estimatedSize:a.size}}if(r===Ym.Base64){var s=(function(l){var c,u,d,f,h,g="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",y=0,b=0,w="",x=[];if(!l)return l;l=Dfn(l);do c=(h=l.charCodeAt(y++)<<16|l.charCodeAt(y++)<<8|l.charCodeAt(y++))>>18&63,u=h>>12&63,d=h>>6&63,f=63&h,x[b++]=g.charAt(c)+g.charAt(u)+g.charAt(d)+g.charAt(f);while(y<l.length);switch(w=x.join(""),l.length%3){case 1:w=w.slice(0,-2)+"==";break;case 2:w=w.slice(0,-1)+"="}return w})(FC(t)),i=(l=>"data="+encodeURIComponent(typeof l=="string"?l:FC(l)))(s);return{contentType:"application/x-www-form-urlencoded",body:i,estimatedSize:new Blob([i]).size}}var o=FC(t);return{contentType:"application/json",body:o,estimatedSize:new Blob([o]).size}}},$M=[];Zre&&$M.push({transport:"fetch",method:e=>{var t,r,{contentType:n,body:a,estimatedSize:s}=(t=LY(e))!==null&&t!==void 0?t:{},i=new Headers;hs(e.headers,(function(u,d){i.append(d,u)})),n&&i.append("Content-Type",n);var o=e.url,l=null;if(VMe){var c=new VMe;l={signal:c.signal,timeout:setTimeout((()=>c.abort()),e.timeout)}}Zre(o,tr({method:e?.method||"GET",headers:i,keepalive:e.method==="POST"&&(s||0)<52428.8,body:a,signal:(r=l)==null?void 0:r.signal},e.fetchOptions)).then((u=>u.text().then((d=>{var f={statusCode:u.status,text:d};if(u.status===200)try{f.json=JSON.parse(d)}catch(h){Ht.error(h)}e.callback==null||e.callback(f)})))).catch((u=>{Ht.error(u),e.callback==null||e.callback({statusCode:0,text:u})})).finally((()=>l?clearTimeout(l.timeout):null))}}),Hre&&$M.push({transport:"XHR",method:e=>{var t,r=new Hre;r.open(e.method||"GET",e.url,!0);var{contentType:n,body:a}=(t=LY(e))!==null&&t!==void 0?t:{};hs(e.headers,(function(s,i){r.setRequestHeader(i,s)})),n&&r.setRequestHeader("Content-Type",n),e.timeout&&(r.timeout=e.timeout),e.disableXHRCredentials||(r.withCredentials=!0),r.onreadystatechange=()=>{if(r.readyState===4){var s={statusCode:r.status,text:r.responseText};if(r.status===200)try{s.json=JSON.parse(r.responseText)}catch{}e.callback==null||e.callback(s)}},r.send(a)}}),ju!=null&&ju.sendBeacon&&$M.push({transport:"sendBeacon",method:e=>{var t=zj(e.url,{beacon:"1"});try{var r,{contentType:n,body:a}=(r=LY(e))!==null&&r!==void 0?r:{},s=typeof a=="string"?new Blob([a],{type:n}):a;ju.sendBeacon(t,s)}catch{}}});var Uj=function(e,t){if(!(function(r){try{new RegExp(r)}catch{return!1}return!0})(t))return!1;try{return new RegExp(t).test(e)}catch{return!1}};function _3e(e,t,r){return FC({distinct_id:e,userPropertiesToSet:t,userPropertiesToSetOnce:r})}var Bmt={exact:(e,t)=>t.some((r=>e.some((n=>r===n)))),is_not:(e,t)=>t.every((r=>e.every((n=>r!==n)))),regex:(e,t)=>t.some((r=>e.some((n=>Uj(r,n))))),not_regex:(e,t)=>t.every((r=>e.every((n=>!Uj(r,n))))),icontains:(e,t)=>t.map(T$).some((r=>e.map(T$).some((n=>r.includes(n))))),not_icontains:(e,t)=>t.map(T$).every((r=>e.map(T$).every((n=>!r.includes(n)))))},T$=e=>e.toLowerCase();function zmt(e,t){return!e||Object.entries(e).every((r=>{var[n,a]=r,s=t?.[n];if(Ut(s)||qg(s))return!1;var i=[String(s)],o=Bmt[a.operator];return!!o&&o(a.values,i)}))}var FY=go("[Error tracking]");class Nfn{constructor(t){var r,n;this.Jt=[],this.Kt=new rpn([new dpn,new xpn,new fpn,new ppn,new bpn,new ypn,new mpn,new vpn],upn("web:javascript",ipn,cpn)),this._instance=t,this.Jt=(r=(n=this._instance.persistence)==null?void 0:n.get_property(Kre))!==null&&r!==void 0?r:[]}onRemoteConfig(t){var r,n,a,s=(r=(n=t.errorTracking)==null?void 0:n.suppressionRules)!==null&&r!==void 0?r:[],i=(a=t.errorTracking)==null?void 0:a.captureExtensionExceptions;this.Jt=s,this._instance.persistence&&this._instance.persistence.register({[Kre]:this.Jt,[e3e]:i})}get Yt(){var t,r=!!this._instance.get_property(e3e),n=this._instance.config.error_tracking.captureExtensionExceptions;return(t=n??r)!==null&&t!==void 0&&t}buildProperties(t,r){return this.Kt.buildFromUnknown(t,{syntheticException:r?.syntheticException,mechanism:{handled:r?.handled}})}sendExceptionEvent(t){var r=t.$exception_list;if(this.Xt(r)){if(this.Qt(r))return void FY.info("Skipping exception capture because a suppression rule matched");if(!this.Yt&&this.Zt(r))return void FY.info("Skipping exception capture because it was thrown by an extension");if(!this._instance.config.error_tracking.__capturePostHogExceptions&&this.ti(r))return void FY.info("Skipping exception capture because it was thrown by the PostHog SDK")}return this._instance.capture("$exception",t,{_noTruncate:!0,_batchKey:"exceptionEvent"})}Qt(t){if(t.length===0)return!1;var r=t.reduce(((n,a)=>{var{type:s,value:i}=a;return fo(s)&&s.length>0&&n.$exception_types.push(s),fo(i)&&i.length>0&&n.$exception_values.push(i),n}),{$exception_types:[],$exception_values:[]});return this.Jt.some((n=>{var a=n.values.map((s=>{var i,o=Bmt[s.operator],l=as(s.value)?s.value:[s.value],c=(i=r[s.key])!==null&&i!==void 0?i:[];return l.length>0&&o(l,c)}));return n.type==="OR"?a.some(Boolean):a.every(Boolean)}))}Zt(t){return t.flatMap((r=>{var n,a;return(n=(a=r.stacktrace)==null?void 0:a.frames)!==null&&n!==void 0?n:[]})).some((r=>r.filename&&r.filename.startsWith("chrome-extension://")))}ti(t){if(t.length>0){var r,n,a,s,i=(r=(n=t[0].stacktrace)==null?void 0:n.frames)!==null&&r!==void 0?r:[],o=i[i.length-1];return(a=o==null||(s=o.filename)==null?void 0:s.includes("posthog.com/static"))!==null&&a!==void 0&&a}return!1}Xt(t){return!Ga(t)&&as(t)}}var jp=go("[FeatureFlags]"),cC=go("[FeatureFlags]",{debugEnabled:!0}),BY="$active_feature_flags",Iw="$override_feature_flags",k3e="$feature_flag_payloads",uC="$override_feature_flag_payloads",C3e="$feature_flag_request_id",T3e="$feature_flag_evaluated_at",A3e=e=>{var t={};for(var[r,n]of PM(e||{}))n&&(t[r]=n);return t},Rfn=e=>{var t=e.flags;return t?(e.featureFlags=Object.fromEntries(Object.keys(t).map((r=>{var n;return[r,(n=t[r].variant)!==null&&n!==void 0?n:t[r].enabled]}))),e.featureFlagPayloads=Object.fromEntries(Object.keys(t).filter((r=>t[r].enabled)).filter((r=>{var n;return(n=t[r].metadata)==null?void 0:n.payload})).map((r=>{var n;return[r,(n=t[r].metadata)==null?void 0:n.payload]})))):jp.warn("Using an older version of the feature flags endpoint. Please upgrade your PostHog server to the latest version"),e},Pfn=(function(e){return e.FeatureFlags="feature_flags",e.Recordings="recordings",e})({});class $fn{constructor(t){this.ii=!1,this.ei=!1,this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this._instance=t,this.featureFlagEventHandlers=[]}li(){var t=this._instance.config.evaluation_environments;return t!=null&&t.length?t.filter((r=>{var n=r&&typeof r=="string"&&r.trim().length>0;return n||jp.error("Invalid evaluation environment found:",r,"Expected non-empty string"),n})):[]}ui(){return this.li().length>0}flags(){if(this._instance.config.__preview_remote_config)this.oi=!0;else{var t=!this.hi&&(this._instance.config.advanced_disable_feature_flags||this._instance.config.advanced_disable_feature_flags_on_first_load);this.vi({disableFlags:t})}}get hasLoadedFlags(){return this.ei}getFlags(){return Object.keys(this.getFlagVariants())}getFlagsWithDetails(){var t=this._instance.get_property(Jre),r=this._instance.get_property(Iw),n=this._instance.get_property(uC);if(!n&&!r)return t||{};var a=Ci({},t||{}),s=[...new Set([...Object.keys(n||{}),...Object.keys(r||{})])];for(var i of s){var o,l,c=a[i],u=r?.[i],d=Ut(u)?(o=c?.enabled)!==null&&o!==void 0&&o:!!u,f=Ut(u)?c.variant:typeof u=="string"?u:void 0,h=n?.[i],g=tr({},c,{enabled:d,variant:d?f??c?.variant:void 0});d!==c?.enabled&&(g.original_enabled=c?.enabled),f!==c?.variant&&(g.original_variant=c?.variant),h&&(g.metadata=tr({},c?.metadata,{payload:h,original_payload:c==null||(l=c.metadata)==null?void 0:l.payload})),a[i]=g}return this.ii||(jp.warn(" Overriding feature flag details!",{flagDetails:t,overriddenPayloads:n,finalDetails:a}),this.ii=!0),a}getFlagVariants(){var t=this._instance.get_property(pS),r=this._instance.get_property(Iw);if(!r)return t||{};for(var n=Ci({},t),a=Object.keys(r),s=0;s<a.length;s++)n[a[s]]=r[a[s]];return this.ii||(jp.warn(" Overriding feature flags!",{enabledFlags:t,overriddenFlags:r,finalFlags:n}),this.ii=!0),n}getFlagPayloads(){var t=this._instance.get_property(k3e),r=this._instance.get_property(uC);if(!r)return t||{};for(var n=Ci({},t||{}),a=Object.keys(r),s=0;s<a.length;s++)n[a[s]]=r[a[s]];return this.ii||(jp.warn(" Overriding feature flag payloads!",{flagPayloads:t,overriddenPayloads:r,finalPayloads:n}),this.ii=!0),n}reloadFeatureFlags(){this.si||this._instance.config.advanced_disable_feature_flags||this.hi||(this.hi=setTimeout((()=>{this.vi()}),5))}di(){clearTimeout(this.hi),this.hi=void 0}ensureFlagsLoaded(){this.ei||this.ri||this.hi||this.reloadFeatureFlags()}setAnonymousDistinctId(t){this.$anon_distinct_id=t}setReloadingPaused(t){this.si=t}vi(t){var r;if(this.di(),!this._instance.O())if(this.ri)this.ni=!0;else{var n={token:this._instance.config.token,distinct_id:this._instance.get_distinct_id(),groups:this._instance.getGroups(),$anon_distinct_id:this.$anon_distinct_id,person_properties:tr({},((r=this._instance.persistence)==null?void 0:r.get_initial_props())||{},this._instance.get_property(jC)||{}),group_properties:this._instance.get_property(v0)};(t!=null&&t.disableFlags||this._instance.config.advanced_disable_feature_flags)&&(n.disable_flags=!0),this.ui()&&(n.evaluation_environments=this.li());var a=this._instance.config.__preview_remote_config,s=a?"/flags/?v=2":"/flags/?v=2&config=true",i=this._instance.config.advanced_only_evaluate_survey_feature_flags?"&only_evaluate_survey_feature_flags=true":"",o=this._instance.requestRouter.endpointFor("flags",s+i);a&&(n.timezone=Pmt()),this.ri=!0,this._instance.ci({method:"POST",url:o,data:n,compression:this._instance.config.disable_compression?void 0:Ym.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:l=>{var c,u,d=!0;if(l.statusCode===200&&(this.ni||(this.$anon_distinct_id=void 0),d=!1),this.ri=!1,this.oi||(this.oi=!0,this._instance.fi((u=l.json)!==null&&u!==void 0?u:{})),!n.disable_flags||this.ni)if(this.ai=!d,l.json&&(c=l.json.quotaLimited)!=null&&c.includes(Pfn.FeatureFlags))jp.warn("You have hit your feature flags quota limit, and will not be able to load feature flags until the quota is reset. Please visit https://posthog.com/docs/billing/limits-alerts to learn more.");else{var f;n.disable_flags||this.receivedFeatureFlags((f=l.json)!==null&&f!==void 0?f:{},d),this.ni&&(this.ni=!1,this.vi())}}})}}getFeatureFlag(t,r){if(r===void 0&&(r={}),this.ei||this.getFlags()&&this.getFlags().length>0){var n=this.getFlagVariants()[t],a=""+n,s=this._instance.get_property(C3e)||void 0,i=this._instance.get_property(T3e)||void 0,o=this._instance.get_property(Ij)||{};if((r.send_event||!("send_event"in r))&&(!(t in o)||!o[t].includes(a))){var l,c,u,d,f,h,g,y,b;as(o[t])?o[t].push(a):o[t]=[a],(l=this._instance.persistence)==null||l.register({[Ij]:o});var w=this.getFeatureFlagDetails(t),x={$feature_flag:t,$feature_flag_response:n,$feature_flag_payload:this.getFeatureFlagPayload(t)||null,$feature_flag_request_id:s,$feature_flag_evaluated_at:i,$feature_flag_bootstrapped_response:((c=this._instance.config.bootstrap)==null||(c=c.featureFlags)==null?void 0:c[t])||null,$feature_flag_bootstrapped_payload:((u=this._instance.config.bootstrap)==null||(u=u.featureFlagPayloads)==null?void 0:u[t])||null,$used_bootstrap_value:!this.ai};Ut(w==null||(d=w.metadata)==null?void 0:d.version)||(x.$feature_flag_version=w.metadata.version);var S,E=(f=w==null||(h=w.reason)==null?void 0:h.description)!==null&&f!==void 0?f:w==null||(g=w.reason)==null?void 0:g.code;E&&(x.$feature_flag_reason=E),w!=null&&(y=w.metadata)!=null&&y.id&&(x.$feature_flag_id=w.metadata.id),Ut(w?.original_variant)&&Ut(w?.original_enabled)||(x.$feature_flag_original_response=Ut(w.original_variant)?w.original_enabled:w.original_variant),w!=null&&(b=w.metadata)!=null&&b.original_payload&&(x.$feature_flag_original_payload=w==null||(S=w.metadata)==null?void 0:S.original_payload),this._instance.capture("$feature_flag_called",x)}return n}jp.warn('getFeatureFlag for key "'+t+`" failed. Feature flags didn't load in time.`)}getFeatureFlagDetails(t){return this.getFlagsWithDetails()[t]}getFeatureFlagPayload(t){return this.getFlagPayloads()[t]}getRemoteConfigPayload(t,r){var n=this._instance.config.token,a={distinct_id:this._instance.get_distinct_id(),token:n};this.ui()&&(a.evaluation_environments=this.li()),this._instance.ci({method:"POST",url:this._instance.requestRouter.endpointFor("flags","/flags/?v=2&config=true"),data:a,compression:this._instance.config.disable_compression?void 0:Ym.Base64,timeout:this._instance.config.feature_flag_request_timeout_ms,callback:s=>{var i,o=(i=s.json)==null?void 0:i.featureFlagPayloads;r(o?.[t]||void 0)}})}isFeatureEnabled(t,r){if(r===void 0&&(r={}),this.ei||this.getFlags()&&this.getFlags().length>0){var n=this.getFeatureFlag(t,r);return Ut(n)?void 0:!!n}jp.warn('isFeatureEnabled for key "'+t+`" failed. Feature flags didn't load in time.`)}addFeatureFlagsHandler(t){this.featureFlagEventHandlers.push(t)}removeFeatureFlagsHandler(t){this.featureFlagEventHandlers=this.featureFlagEventHandlers.filter((r=>r!==t))}receivedFeatureFlags(t,r){if(this._instance.persistence){this.ei=!0;var n=this.getFlagVariants(),a=this.getFlagPayloads(),s=this.getFlagsWithDetails();(function(i,o,l,c,u){l===void 0&&(l={}),c===void 0&&(c={}),u===void 0&&(u={});var d=Rfn(i),f=d.flags,h=d.featureFlags,g=d.featureFlagPayloads;if(h){var y=i.requestId,b=i.evaluatedAt;if(as(h)){jp.warn("v1 of the feature flags endpoint is deprecated. Please use the latest version.");var w={};if(h)for(var x=0;x<h.length;x++)w[h[x]]=!0;o&&o.register({[BY]:h,[pS]:w})}else{var S=h,E=g,C=f;i.errorsWhileComputingFlags&&(S=tr({},l,S),E=tr({},c,E),C=tr({},u,C)),o&&o.register(tr({[BY]:Object.keys(A3e(S)),[pS]:S||{},[k3e]:E||{},[Jre]:C||{}},y?{[C3e]:y}:{},b?{[T3e]:b}:{}))}}})(t,this._instance.persistence,n,a,s),this.pi(r)}}override(t,r){r===void 0&&(r=!1),jp.warn("override is deprecated. Please use overrideFeatureFlags instead."),this.overrideFeatureFlags({flags:t,suppressWarning:r})}overrideFeatureFlags(t){if(!this._instance.__loaded||!this._instance.persistence)return jp.uninitializedWarning("posthog.featureFlags.overrideFeatureFlags");if(t===!1)return this._instance.persistence.unregister(Iw),this._instance.persistence.unregister(uC),this.pi(),cC.info("All overrides cleared");if(t&&typeof t=="object"&&("flags"in t||"payloads"in t)){var r,n=t;if(this.ii=!!((r=n.suppressWarning)!==null&&r!==void 0&&r),"flags"in n){if(n.flags===!1)this._instance.persistence.unregister(Iw),cC.info("Flag overrides cleared");else if(n.flags){if(as(n.flags)){for(var a={},s=0;s<n.flags.length;s++)a[n.flags[s]]=!0;this._instance.persistence.register({[Iw]:a})}else this._instance.persistence.register({[Iw]:n.flags});cC.info("Flag overrides set",{flags:n.flags})}}return"payloads"in n&&(n.payloads===!1?(this._instance.persistence.unregister(uC),cC.info("Payload overrides cleared")):n.payloads&&(this._instance.persistence.register({[uC]:n.payloads}),cC.info("Payload overrides set",{payloads:n.payloads}))),void this.pi()}this.pi()}onFeatureFlags(t){if(this.addFeatureFlagsHandler(t),this.ei){var{flags:r,flagVariants:n}=this.gi();t(r,n)}return()=>this.removeFeatureFlagsHandler(t)}updateEarlyAccessFeatureEnrollment(t,r,n){var a,s=(this._instance.get_property(MC)||[]).find((c=>c.flagKey===t)),i={["$feature_enrollment/"+t]:r},o={$feature_flag:t,$feature_enrollment:r,$set:i};s&&(o.$early_access_feature_name=s.name),n&&(o.$feature_enrollment_stage=n),this._instance.capture("$feature_enrollment_update",o),this.setPersonPropertiesForFlags(i,!1);var l=tr({},this.getFlagVariants(),{[t]:r});(a=this._instance.persistence)==null||a.register({[BY]:Object.keys(A3e(l)),[pS]:l}),this.pi()}getEarlyAccessFeatures(t,r,n){r===void 0&&(r=!1);var a=this._instance.get_property(MC),s=n?"&"+n.map((i=>"stage="+i)).join("&"):"";if(a&&!r)return t(a);this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/early_access_features/?token="+this._instance.config.token+s),method:"GET",callback:i=>{var o,l;if(i.json){var c=i.json.earlyAccessFeatures;return(o=this._instance.persistence)==null||o.unregister(MC),(l=this._instance.persistence)==null||l.register({[MC]:c}),t(c)}}})}gi(){var t=this.getFlags(),r=this.getFlagVariants();return{flags:t.filter((n=>r[n])),flagVariants:Object.keys(r).filter((n=>r[n])).reduce(((n,a)=>(n[a]=r[a],n)),{})}}pi(t){var{flags:r,flagVariants:n}=this.gi();this.featureFlagEventHandlers.forEach((a=>a(r,n,{errorsLoading:t})))}setPersonPropertiesForFlags(t,r){r===void 0&&(r=!0);var n=this._instance.get_property(jC)||{};this._instance.register({[jC]:tr({},n,t)}),r&&this._instance.reloadFeatureFlags()}resetPersonPropertiesForFlags(){this._instance.unregister(jC)}setGroupPropertiesForFlags(t,r){r===void 0&&(r=!0);var n=this._instance.get_property(v0)||{};Object.keys(n).length!==0&&Object.keys(n).forEach((a=>{n[a]=tr({},n[a],t[a]),delete t[a]})),this._instance.register({[v0]:tr({},n,t)}),r&&this._instance.reloadFeatureFlags()}resetGroupPropertiesForFlags(t){if(t){var r=this._instance.get_property(v0)||{};this._instance.register({[v0]:tr({},r,{[t]:{}})})}else this._instance.unregister(v0)}reset(){this.ei=!1,this.ri=!1,this.si=!1,this.ni=!1,this.oi=!1,this.ai=!1,this.$anon_distinct_id=void 0,this.di(),this.ii=!1}}var Mfn=["cookie","localstorage","localstorage+cookie","sessionstorage","memory"];class zY{constructor(t,r){this.F=t,this.props={},this.mi=!1,this.yi=(n=>{var a="";return n.token&&(a=n.token.replace(/\+/g,"PL").replace(/\//g,"SL").replace(/=/g,"EQ")),n.persistence_name?"ph_"+n.persistence_name:"ph_"+a+"_posthog"})(t),this.Y=this.bi(t),this.load(),t.debug&&Ht.info("Persistence loaded",t.persistence,tr({},this.props)),this.update_config(t,t,r),this.save()}isDisabled(){return!!this.wi}bi(t){Mfn.indexOf(t.persistence.toLowerCase())===-1&&(Ht.critical("Unknown persistence type "+t.persistence+"; falling back to localStorage+cookie"),t.persistence="localStorage+cookie");var r=t.persistence.toLowerCase();return r==="localstorage"&&Zs.H()?Zs:r==="localstorage+cookie"&&O$.H()?O$:r==="sessionstorage"&&Vo.H()?Vo:r==="memory"?Gpn:r==="cookie"?_h:O$.H()?O$:_h}properties(){var t={};return hs(this.props,(function(r,n){if(n===pS&&wo(r))for(var a=Object.keys(r),s=0;s<a.length;s++)t["$feature/"+a[s]]=r[a[s]];else o=n,l=!1,(qg(i=kpn)?l:UMe&&i.indexOf===UMe?i.indexOf(o)!=-1:(hs(i,(function(c){if(l||(l=c===o))return Aj})),l))||(t[n]=r);var i,o,l})),t}load(){if(!this.wi){var t=this.Y.W(this.yi);t&&(this.props=Ci({},t))}}save(){this.wi||this.Y.G(this.yi,this.props,this.xi,this.Si,this.Ei,this.F.debug)}remove(){this.Y.V(this.yi,!1),this.Y.V(this.yi,!0)}clear(){this.remove(),this.props={}}register_once(t,r,n){if(wo(t)){Ut(r)&&(r="None"),this.xi=Ut(n)?this.$i:n;var a=!1;if(hs(t,((s,i)=>{this.props.hasOwnProperty(i)&&this.props[i]!==r||(this.props[i]=s,a=!0)})),a)return this.save(),!0}return!1}register(t,r){if(wo(t)){this.xi=Ut(r)?this.$i:r;var n=!1;if(hs(t,((a,s)=>{t.hasOwnProperty(s)&&this.props[s]!==a&&(this.props[s]=a,n=!0)})),n)return this.save(),!0}return!1}unregister(t){t in this.props&&(delete this.props[t],this.save())}update_campaign_params(){if(!this.mi){var t=Tmt(this.F.custom_campaign_params,this.F.mask_personal_data_properties,this.F.custom_personal_data_properties);dS(rfe(t))||this.register(t),this.mi=!0}}update_search_keyword(){var t;this.register((t=Zt?.referrer)?Dmt(t):{})}update_referrer_info(){var t;this.register_once({$referrer:Imt(),$referring_domain:Zt!=null&&Zt.referrer&&((t=$j(Zt.referrer))==null?void 0:t.host)||"$direct"},void 0)}set_initial_person_info(){this.props[nne]||this.props[ane]||this.register_once({[Nj]:Nmt(this.F.mask_personal_data_properties,this.F.custom_personal_data_properties)},void 0)}get_initial_props(){var t={};hs([ane,nne],(i=>{var o=this.props[i];o&&hs(o,(function(l,c){t["$initial_"+Gre(c)]=l}))}));var r,n,a=this.props[Nj];if(a){var s=(r=Rmt(a),n={},hs(r,(function(i,o){n["$initial_"+Gre(o)]=i})),n);Ci(t,s)}return t}safe_merge(t){return hs(this.props,(function(r,n){n in t||(t[n]=r)})),t}update_config(t,r,n){if(this.$i=this.xi=t.cookie_expiration,this.set_disabled(t.disable_persistence||!!n),this.set_cross_subdomain(t.cross_subdomain_cookie),this.set_secure(t.secure_cookie),t.persistence!==r.persistence){var a=this.bi(t),s=this.props;this.clear(),this.Y=a,this.props=s,this.save()}}set_disabled(t){this.wi=t,this.wi?this.remove():this.save()}set_cross_subdomain(t){t!==this.Si&&(this.Si=t,this.remove(),this.save())}set_secure(t){t!==this.Ei&&(this.Ei=t,this.remove(),this.save())}set_event_timer(t,r){var n=this.props[$C]||{};n[t]=r,this.props[$C]=n,this.save()}remove_event_timer(t){var r=(this.props[$C]||{})[t];return Ut(r)||(delete this.props[$C][t],this.save()),r}get_property(t){return this.props[t]}set_property(t,r){this.props[t]=r,this.save()}}var dC=(function(e){return e.Activation="events",e.Cancellation="cancelEvents",e})({});(function(e){return e.Button="button",e.Tab="tab",e.Selector="selector",e})({});(function(e){return e.TopLeft="top_left",e.TopRight="top_right",e.TopCenter="top_center",e.MiddleLeft="middle_left",e.MiddleRight="middle_right",e.MiddleCenter="middle_center",e.Left="left",e.Center="center",e.Right="right",e.NextToTrigger="next_to_trigger",e})({});(function(e){return e.Top="top",e.Left="left",e.Right="right",e.Bottom="bottom",e})({});var UY=(function(e){return e.Popover="popover",e.API="api",e.Widget="widget",e.ExternalSurvey="external_survey",e})({});(function(e){return e.Open="open",e.MultipleChoice="multiple_choice",e.SingleChoice="single_choice",e.Rating="rating",e.Link="link",e})({});(function(e){return e.NextQuestion="next_question",e.End="end",e.ResponseBased="response_based",e.SpecificQuestion="specific_question",e})({});(function(e){return e.Once="once",e.Recurring="recurring",e.Always="always",e})({});var MM=(function(e){return e.SHOWN="survey shown",e.DISMISSED="survey dismissed",e.SENT="survey sent",e})({}),D3e=(function(e){return e.SURVEY_ID="$survey_id",e.SURVEY_NAME="$survey_name",e.SURVEY_RESPONSE="$survey_response",e.SURVEY_ITERATION="$survey_iteration",e.SURVEY_ITERATION_START_DATE="$survey_iteration_start_date",e.SURVEY_PARTIALLY_COMPLETED="$survey_partially_completed",e.SURVEY_SUBMISSION_ID="$survey_submission_id",e.SURVEY_QUESTIONS="$survey_questions",e.SURVEY_COMPLETED="$survey_completed",e})({}),Umt=(function(e){return e.Popover="popover",e.Inline="inline",e})({});class pfe{constructor(){this.ki={},this.ki={}}on(t,r){return this.ki[t]||(this.ki[t]=[]),this.ki[t].push(r),()=>{this.ki[t]=this.ki[t].filter((n=>n!==r))}}emit(t,r){for(var n of this.ki[t]||[])n(r);for(var a of this.ki["*"]||[])a(t,r)}}function Nw(e,t,r){if(Ga(e))return!1;switch(r){case"exact":return e===t;case"contains":var n=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/_/g,".").replace(/%/g,".*");return new RegExp(n,"i").test(e);case"regex":try{return new RegExp(t).test(e)}catch{return!1}default:return!1}}class jfn{constructor(t){this.Pi=new pfe,this.Ti=(r,n)=>this.Ri(r,n)&&this.Ii(r,n)&&this.Fi(r,n)&&this.Ci(r,n),this.Ri=(r,n)=>n==null||!n.event||r?.event===n?.event,this._instance=t,this.Mi=new Set,this.Oi=new Set}init(){var t;if(!Ut((t=this._instance)==null?void 0:t.Ai)){var r;(r=this._instance)==null||r.Ai(((n,a)=>{this.on(n,a)}))}}register(t){var r,n;if(!Ut((r=this._instance)==null?void 0:r.Ai)&&(t.forEach((i=>{var o,l;(o=this.Oi)==null||o.add(i),(l=i.steps)==null||l.forEach((c=>{var u;(u=this.Mi)==null||u.add(c?.event||"")}))})),(n=this._instance)!=null&&n.autocapture)){var a,s=new Set;t.forEach((i=>{var o;(o=i.steps)==null||o.forEach((l=>{l!=null&&l.selector&&s.add(l?.selector)}))})),(a=this._instance)==null||a.autocapture.setElementSelectors(s)}}on(t,r){var n;r!=null&&t.length!=0&&(this.Mi.has(t)||this.Mi.has(r?.event))&&this.Oi&&((n=this.Oi)==null?void 0:n.size)>0&&this.Oi.forEach((a=>{this.Di(r,a)&&this.Pi.emit("actionCaptured",a.name)}))}ji(t){this.onAction("actionCaptured",(r=>t(r)))}Di(t,r){if(r?.steps==null)return!1;for(var n of r.steps)if(this.Ti(t,n))return!0;return!1}onAction(t,r){return this.Pi.on(t,r)}Ii(t,r){if(r!=null&&r.url){var n,a=t==null||(n=t.properties)==null?void 0:n.$current_url;if(!a||typeof a!="string"||!Nw(a,r.url,r.url_matching||"contains"))return!1}return!0}Fi(t,r){return!!this.Li(t,r)&&!!this.Ni(t,r)&&!!this.Ui(t,r)}Li(t,r){var n;if(r==null||!r.href)return!0;var a=this.zi(t);if(a.length>0)return a.some((o=>Nw(o.href,r.href,r.href_matching||"exact")));var s,i=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!i&&Nw((s=i.match(/(?::|")href="(.*?)"/))?s[1]:"",r.href,r.href_matching||"exact")}Ni(t,r){var n;if(r==null||!r.text)return!0;var a=this.zi(t);if(a.length>0)return a.some((c=>Nw(c.text,r.text,r.text_matching||"exact")||Nw(c.$el_text,r.text,r.text_matching||"exact")));var s,i,o,l=(t==null||(n=t.properties)==null?void 0:n.$elements_chain)||"";return!!l&&(s=(function(c){for(var u,d=[],f=/(?::|")text="(.*?)"/g;!Ga(u=f.exec(c));)d.includes(u[1])||d.push(u[1]);return d})(l),i=r.text,o=r.text_matching||"exact",s.some((c=>Nw(c,i,o))))}Ui(t,r){var n,a;if(r==null||!r.selector)return!0;var s=t==null||(n=t.properties)==null?void 0:n.$element_selectors;if(s!=null&&s.includes(r.selector))return!0;var i=(t==null||(a=t.properties)==null?void 0:a.$elements_chain)||"";if(r.selector_regex&&i)try{return new RegExp(r.selector_regex).test(i)}catch{return!1}return!1}zi(t){var r;return(t==null||(r=t.properties)==null?void 0:r.$elements)==null?[]:t?.properties.$elements}Ci(t,r){return r==null||!r.properties||r.properties.length===0||zmt(r.properties.reduce(((n,a)=>{var s=as(a.value)?a.value.map(String):a.value!=null?[String(a.value)]:[];return n[a.key]={values:s,operator:a.operator||"exact"},n}),{}),t?.properties)}}var Da=go("[Surveys]"),pne="seenSurvey_",Lfn=(e,t)=>{var r="$survey_"+t+"/"+e.id;return e.current_iteration&&e.current_iteration>0&&(r="$survey_"+t+"/"+e.id+"/"+e.current_iteration),r},I3e=e=>{var t=""+pne+e.id;return e.current_iteration&&e.current_iteration>0&&(t=""+pne+e.id+"_"+e.current_iteration),t},Ffn=[UY.Popover,UY.Widget,UY.API],Bfn={ignoreConditions:!1,ignoreDelay:!1,displayType:Umt.Popover};class zfn{constructor(t){this._instance=t,this.Hi=new Map,this.Bi=new Map,this.qi=new Map}Wi(t,r){return!!t&&zmt(t.propertyFilters,r?.properties)}Gi(t,r){var n=new Map;return t.forEach((a=>{var s;(s=a.conditions)==null||(s=s[r])==null||(s=s.values)==null||s.forEach((i=>{if(i!=null&&i.name){var o=n.get(i.name)||[];o.push(a.id),n.set(i.name,o)}}))})),n}Vi(t,r,n){var a,s=(n===dC.Activation?this.Hi:this.Bi).get(t),i=[];return(a=this._instance)==null||a.getSurveys((o=>{i=o.filter((l=>s?.includes(l.id)))})),i.filter((o=>{var l,c=(l=o.conditions)==null||(l=l[n])==null||(l=l.values)==null?void 0:l.find((u=>u.name===t));return this.Wi(c,r)}))}register(t){var r;Ut((r=this._instance)==null?void 0:r.Ai)||(this.Ji(t),this.Ki(t))}Ki(t){var r=t.filter((n=>{var a,s;return((a=n.conditions)==null?void 0:a.actions)&&((s=n.conditions)==null||(s=s.actions)==null||(s=s.values)==null?void 0:s.length)>0}));r.length!==0&&(this.Yi==null&&(this.Yi=new jfn(this._instance),this.Yi.init(),this.Yi.ji((n=>{this.onAction(n)}))),r.forEach((n=>{var a,s,i,o,l;n.conditions&&(a=n.conditions)!=null&&a.actions&&(s=n.conditions)!=null&&(s=s.actions)!=null&&s.values&&((i=n.conditions)==null||(i=i.actions)==null||(i=i.values)==null?void 0:i.length)>0&&((o=this.Yi)==null||o.register(n.conditions.actions.values),(l=n.conditions)==null||(l=l.actions)==null||(l=l.values)==null||l.forEach((c=>{if(c&&c.name){var u=this.qi.get(c.name);u&&u.push(n.id),this.qi.set(c.name,u||[n.id])}})))})))}Ji(t){var r,n=t.filter((s=>{var i,o;return((i=s.conditions)==null?void 0:i.events)&&((o=s.conditions)==null||(o=o.events)==null||(o=o.values)==null?void 0:o.length)>0})),a=t.filter((s=>{var i,o;return((i=s.conditions)==null?void 0:i.cancelEvents)&&((o=s.conditions)==null||(o=o.cancelEvents)==null||(o=o.values)==null?void 0:o.length)>0}));(n.length!==0||a.length!==0)&&((r=this._instance)==null||r.Ai(((s,i)=>{this.onEvent(s,i)})),this.Hi=this.Gi(t,dC.Activation),this.Bi=this.Gi(t,dC.Cancellation))}onEvent(t,r){var n,a=((n=this._instance)==null||(n=n.persistence)==null?void 0:n.props[E$])||[];if(MM.SHOWN===t&&r&&a.length>0){var s;Da.info("survey event matched, removing survey from activated surveys",{event:t,eventPayload:r,existingActivatedSurveys:a});var i=r==null||(s=r.properties)==null?void 0:s.$survey_id;if(i){var o=a.indexOf(i);o>=0&&(a.splice(o,1),this.Xi(a))}}else{if(this.Bi.has(t)){var l=this.Vi(t,r,dC.Cancellation);l.length>0&&(Da.info("cancel event matched, cancelling surveys",{event:t,surveysToCancel:l.map((u=>u.id))}),l.forEach((u=>{var d,f=a.indexOf(u.id);f>=0&&a.splice(f,1),(d=this._instance)==null||d.cancelPendingSurvey(u.id)})),this.Xi(a))}if(this.Hi.has(t)){Da.info("survey event name matched",{event:t,eventPayload:r,surveys:this.Hi.get(t)});var c=this.Vi(t,r,dC.Activation);this.Xi(a.concat(c.map((u=>u.id))||[]))}}}onAction(t){var r,n=((r=this._instance)==null||(r=r.persistence)==null?void 0:r.props[E$])||[];this.qi.has(t)&&this.Xi(n.concat(this.qi.get(t)||[]))}Xi(t){var r;Da.info("updating activated surveys",{activatedSurveys:t}),(r=this._instance)==null||(r=r.persistence)==null||r.register({[E$]:[...new Set(t)]})}getSurveys(){var t,r=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.props[E$];return r||[]}getEventToSurveys(){return this.Hi}Qi(){return this.Yi}}class Ufn{constructor(t){this.Zi=void 0,this._surveyManager=null,this.te=!1,this.ie=!1,this.ee=[],this._instance=t,this._surveyEventReceiver=null}onRemoteConfig(t){if(!this._instance.config.disable_surveys){var r=t.surveys;if(Ga(r))return Da.warn("Flags not loaded yet. Not loading surveys.");var n=as(r);this.Zi=n?r.length>0:r,Da.info("flags response received, isSurveysEnabled: "+this.Zi),this.loadIfEnabled()}}reset(){localStorage.removeItem("lastSeenSurveyDate");for(var t=[],r=0;r<localStorage.length;r++){var n=localStorage.key(r);(n!=null&&n.startsWith(pne)||n!=null&&n.startsWith("inProgressSurvey_"))&&t.push(n)}t.forEach((a=>localStorage.removeItem(a)))}loadIfEnabled(){if(!this._surveyManager)if(this.ie)Da.info("Already initializing surveys, skipping...");else if(this._instance.config.disable_surveys)Da.info("Disabled. Not loading surveys.");else if(this._instance.config.cookieless_mode&&this._instance.consent.isOptedOut())Da.info("Not loading surveys in cookieless mode without consent.");else{var t=Qr?.__PosthogExtensions__;if(t){if(!Ut(this.Zi)||this._instance.config.advanced_enable_surveys){var r=this.Zi||this._instance.config.advanced_enable_surveys;this.ie=!0;try{var n=t.generateSurveys;if(n)return void this.re(n,r);var a=t.loadExternalDependency;if(!a)return void this.se("PostHog loadExternalDependency extension not found.");a(this._instance,"surveys",(s=>{s||!t.generateSurveys?this.se("Could not load surveys script",s):this.re(t.generateSurveys,r)}))}catch(s){throw this.se("Error initializing surveys",s),s}finally{this.ie=!1}}}else Da.error("PostHog Extensions not found.")}}re(t,r){this._surveyManager=t(this._instance,r),this._surveyEventReceiver=new zfn(this._instance),Da.info("Surveys loaded successfully"),this.ne({isLoaded:!0})}se(t,r){Da.error(t,r),this.ne({isLoaded:!1,error:t})}onSurveysLoaded(t){return this.ee.push(t),this._surveyManager&&this.ne({isLoaded:!0}),()=>{this.ee=this.ee.filter((r=>r!==t))}}getSurveys(t,r){if(r===void 0&&(r=!1),this._instance.config.disable_surveys)return Da.info("Disabled. Not loading surveys."),t([]);var n=this._instance.get_property(ene);if(n&&!r)return t(n,{isLoaded:!0});if(this.te)return t([],{isLoaded:!1,error:"Surveys are already being loaded"});try{this.te=!0,this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/surveys/?token="+this._instance.config.token),method:"GET",timeout:this._instance.config.surveys_request_timeout_ms,callback:a=>{var s;this.te=!1;var i=a.statusCode;if(i!==200||!a.json){var o="Surveys API could not be loaded, status: "+i;return Da.error(o),t([],{isLoaded:!1,error:o})}var l,c=a.json.surveys||[],u=c.filter((d=>(function(f){return!(!f.start_date||f.end_date)})(d)&&((function(f){var h;return!((h=f.conditions)==null||(h=h.events)==null||(h=h.values)==null||!h.length)})(d)||(function(f){var h;return!((h=f.conditions)==null||(h=h.actions)==null||(h=h.values)==null||!h.length)})(d))));return u.length>0&&((l=this._surveyEventReceiver)==null||l.register(u)),(s=this._instance.persistence)==null||s.register({[ene]:c}),t(c,{isLoaded:!0})}})}catch(a){throw this.te=!1,a}}ne(t){for(var r of this.ee)try{if(!t.isLoaded)return r([],t);this.getSurveys(r)}catch(n){Da.error("Error in survey callback",n)}}getActiveMatchingSurveys(t,r){if(r===void 0&&(r=!1),!Ga(this._surveyManager))return this._surveyManager.getActiveMatchingSurveys(t,r);Da.warn("init was not called")}oe(t){var r=null;return this.getSurveys((n=>{var a;r=(a=n.find((s=>s.id===t)))!==null&&a!==void 0?a:null})),r}ae(t){if(Ga(this._surveyManager))return{eligible:!1,reason:"SDK is not enabled or survey functionality is not yet loaded"};var r=typeof t=="string"?this.oe(t):t;return r?this._surveyManager.checkSurveyEligibility(r):{eligible:!1,reason:"Survey not found"}}canRenderSurvey(t){if(Ga(this._surveyManager))return Da.warn("init was not called"),{visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"};var r=this.ae(t);return{visible:r.eligible,disabledReason:r.reason}}canRenderSurveyAsync(t,r){return Ga(this._surveyManager)?(Da.warn("init was not called"),Promise.resolve({visible:!1,disabledReason:"SDK is not enabled or survey functionality is not yet loaded"})):new Promise((n=>{this.getSurveys((a=>{var s,i=(s=a.find((l=>l.id===t)))!==null&&s!==void 0?s:null;if(i){var o=this.ae(i);n({visible:o.eligible,disabledReason:o.reason})}else n({visible:!1,disabledReason:"Survey not found"})}),r)}))}renderSurvey(t,r){var n;if(Ga(this._surveyManager))Da.warn("init was not called");else{var a=typeof t=="string"?this.oe(t):t;if(a!=null&&a.id)if(Ffn.includes(a.type)){var s=Zt?.querySelector(r);if(s)return(n=a.appearance)!=null&&n.surveyPopupDelaySeconds?(Da.info("Rendering survey "+a.id+" with delay of "+a.appearance.surveyPopupDelaySeconds+" seconds"),void setTimeout((()=>{var i,o;Da.info("Rendering survey "+a.id+" with delay of "+((i=a.appearance)==null?void 0:i.surveyPopupDelaySeconds)+" seconds"),(o=this._surveyManager)==null||o.renderSurvey(a,s),Da.info("Survey "+a.id+" rendered")}),1e3*a.appearance.surveyPopupDelaySeconds)):void this._surveyManager.renderSurvey(a,s);Da.warn("Survey element not found")}else Da.warn("Surveys of type "+a.type+" cannot be rendered in the app");else Da.warn("Survey not found")}}displaySurvey(t,r){var n;if(Ga(this._surveyManager))Da.warn("init was not called");else{var a=this.oe(t);if(a){var s=a;if((n=a.appearance)!=null&&n.surveyPopupDelaySeconds&&r.ignoreDelay&&(s=tr({},a,{appearance:tr({},a.appearance,{surveyPopupDelaySeconds:0})})),r.ignoreConditions===!1){var i=this.canRenderSurvey(a);if(!i.visible)return void Da.warn("Survey is not eligible to be displayed: ",i.disabledReason)}r.displayType!==Umt.Inline?this._surveyManager.handlePopoverSurvey(s):this.renderSurvey(s,r.selector)}else Da.warn("Survey not found")}}cancelPendingSurvey(t){Ga(this._surveyManager)?Da.warn("init was not called"):this._surveyManager.cancelSurvey(t)}}var N3e=go("[RateLimiter]");class Vfn{constructor(t){var r,n;this.serverLimits={},this.lastEventRateLimited=!1,this.checkForLimiting=a=>{var s=a.text;if(s&&s.length)try{(JSON.parse(s).quota_limited||[]).forEach((i=>{N3e.info((i||"events")+" is quota limited."),this.serverLimits[i]=new Date().getTime()+6e4}))}catch(i){return void N3e.warn('could not rate limit - continuing. Error: "'+i?.message+'"',{text:s})}},this.instance=t,this.captureEventsPerSecond=((r=t.config.rate_limiting)==null?void 0:r.events_per_second)||10,this.captureEventsBurstLimit=Math.max(((n=t.config.rate_limiting)==null?void 0:n.events_burst_limit)||10*this.captureEventsPerSecond,this.captureEventsPerSecond),this.lastEventRateLimited=this.clientRateLimitContext(!0).isRateLimited}clientRateLimitContext(t){var r,n,a;t===void 0&&(t=!1);var s=new Date().getTime(),i=(r=(n=this.instance.persistence)==null?void 0:n.get_property(rne))!==null&&r!==void 0?r:{tokens:this.captureEventsBurstLimit,last:s};i.tokens+=(s-i.last)/1e3*this.captureEventsPerSecond,i.last=s,i.tokens>this.captureEventsBurstLimit&&(i.tokens=this.captureEventsBurstLimit);var o=i.tokens<1;return o||t||(i.tokens=Math.max(0,i.tokens-1)),!o||this.lastEventRateLimited||t||this.instance.capture("$$client_ingestion_warning",{$$client_ingestion_warning_message:"posthog-js client rate limited. Config is set to "+this.captureEventsPerSecond+" events per second and "+this.captureEventsBurstLimit+" events burst limit."},{skip_client_rate_limiting:!0}),this.lastEventRateLimited=o,(a=this.instance.persistence)==null||a.set_property(rne,i),{isRateLimited:o,remainingTokens:i.tokens}}isServerRateLimited(t){var r=this.serverLimits[t||"events"]||!1;return r!==!1&&new Date().getTime()<r}}var p0=go("[RemoteConfig]");class qfn{constructor(t){this._instance=t}get remoteConfig(){var t;return(t=Qr._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.config}le(t){var r,n;(r=Qr.__PosthogExtensions__)!=null&&r.loadExternalDependency?(n=Qr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,"remote-config",(()=>t(this.remoteConfig))):(p0.error("PostHog Extensions not found. Cannot load remote config."),t())}ue(t){this._instance.ci({method:"GET",url:this._instance.requestRouter.endpointFor("assets","/array/"+this._instance.config.token+"/config"),callback:r=>{t(r.json)}})}load(){try{if(this.remoteConfig)return p0.info("Using preloaded remote config",this.remoteConfig),void this.fi(this.remoteConfig);if(this._instance.O())return void p0.warn("Remote config is disabled. Falling back to local config.");this.le((t=>{if(!t)return p0.info("No config found after loading remote JS config. Falling back to JSON."),void this.ue((r=>{this.fi(r)}));this.fi(t)}))}catch(t){p0.error("Error loading remote config",t)}}fi(t){t?this._instance.config.__preview_remote_config?(this._instance.fi(t),t.hasFeatureFlags!==!1&&this._instance.featureFlags.ensureFlagsLoaded()):p0.info("__preview_remote_config is disabled. Logging config instead",t):p0.error("Failed to fetch remote config from PostHog.")}}var fne=3e3;class Zfn{constructor(t,r){this.he=!0,this.ve=[],this.de=hh(r?.flush_interval_ms||fne,250,5e3,Ht.createLogger("flush interval"),fne),this.ce=t}enqueue(t){this.ve.push(t),this.fe||this.pe()}unload(){this.ge();var t=this.ve.length>0?this._e():{},r=Object.values(t);[...r.filter((n=>n.url.indexOf("/e")===0)),...r.filter((n=>n.url.indexOf("/e")!==0))].map((n=>{this.ce(tr({},n,{transport:"sendBeacon"}))}))}enable(){this.he=!1,this.pe()}pe(){var t=this;this.he||(this.fe=setTimeout((()=>{if(this.ge(),this.ve.length>0){var r=this._e(),n=function(){var s=r[a],i=new Date().getTime();s.data&&as(s.data)&&hs(s.data,(o=>{o.offset=Math.abs(o.timestamp-i),delete o.timestamp})),t.ce(s)};for(var a in r)n()}}),this.de))}ge(){clearTimeout(this.fe),this.fe=void 0}_e(){var t={};return hs(this.ve,(r=>{var n,a=r,s=(a?a.batchKey:null)||a.url;Ut(t[s])&&(t[s]=tr({},a,{data:[]})),(n=t[s].data)==null||n.push(a.data)})),this.ve=[],t}}var Hfn=["retriesPerformedSoFar"];class Gfn{constructor(t){this.me=!1,this.ye=3e3,this.ve=[],this._instance=t,this.ve=[],this.be=!0,!Ut(He)&&"onLine"in He.navigator&&(this.be=He.navigator.onLine,this.we=()=>{this.be=!0,this.Dt()},this.xe=()=>{this.be=!1},qi(He,"online",this.we),qi(He,"offline",this.xe))}get length(){return this.ve.length}retriableRequest(t){var{retriesPerformedSoFar:r}=t,n=jht(t,Hfn);Fh(r)&&r>0&&(n.url=zj(n.url,{retry_count:r})),this._instance.ci(tr({},n,{callback:a=>{a.statusCode!==200&&(a.statusCode<400||a.statusCode>=500)&&(r??0)<10?this.Se(tr({retriesPerformedSoFar:r},n)):n.callback==null||n.callback(a)}}))}Se(t){var r=t.retriesPerformedSoFar||0;t.retriesPerformedSoFar=r+1;var n=(function(i){var o=3e3*Math.pow(2,i),l=o/2,c=Math.min(18e5,o),u=(Math.random()-.5)*(c-l);return Math.ceil(c+u)})(r),a=Date.now()+n;this.ve.push({retryAt:a,requestOptions:t});var s="Enqueued failed request for retry in "+n;navigator.onLine||(s+=" (Browser is offline)"),Ht.warn(s),this.me||(this.me=!0,this.Ee())}Ee(){if(this.$e&&clearTimeout(this.$e),this.ve.length===0)return this.me=!1,void(this.$e=void 0);this.$e=setTimeout((()=>{this.be&&this.ve.length>0&&this.Dt(),this.Ee()}),this.ye)}Dt(){var t=Date.now(),r=[],n=this.ve.filter((s=>s.retryAt<t||(r.push(s),!1)));if(this.ve=r,n.length>0)for(var{requestOptions:a}of n)this.retriableRequest(a)}unload(){for(var{requestOptions:t}of(this.$e&&(clearTimeout(this.$e),this.$e=void 0),this.me=!1,Ut(He)||(this.we&&(He.removeEventListener("online",this.we),this.we=void 0),this.xe&&(He.removeEventListener("offline",this.xe),this.xe=void 0)),this.ve))try{this._instance.ci(tr({},t,{transport:"sendBeacon"}))}catch(r){Ht.error(r)}this.ve=[]}}class Qfn{constructor(t){this.ke=()=>{var r,n,a,s;this.Pe||(this.Pe={});var i=this.scrollElement(),o=this.scrollY(),l=i?Math.max(0,i.scrollHeight-i.clientHeight):0,c=o+(i?.clientHeight||0),u=i?.scrollHeight||0;this.Pe.lastScrollY=Math.ceil(o),this.Pe.maxScrollY=Math.max(o,(r=this.Pe.maxScrollY)!==null&&r!==void 0?r:0),this.Pe.maxScrollHeight=Math.max(l,(n=this.Pe.maxScrollHeight)!==null&&n!==void 0?n:0),this.Pe.lastContentY=c,this.Pe.maxContentY=Math.max(c,(a=this.Pe.maxContentY)!==null&&a!==void 0?a:0),this.Pe.maxContentHeight=Math.max(u,(s=this.Pe.maxContentHeight)!==null&&s!==void 0?s:0)},this._instance=t}getContext(){return this.Pe}resetContext(){var t=this.Pe;return setTimeout(this.ke,0),t}startMeasuringScrollPosition(){qi(He,"scroll",this.ke,{capture:!0}),qi(He,"scrollend",this.ke,{capture:!0}),qi(He,"resize",this.ke)}scrollElement(){if(!this._instance.config.scroll_root_selector)return He?.document.documentElement;var t=as(this._instance.config.scroll_root_selector)?this._instance.config.scroll_root_selector:[this._instance.config.scroll_root_selector];for(var r of t){var n=He?.document.querySelector(r);if(n)return n}}scrollY(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollTop||0}return He&&(He.scrollY||He.pageYOffset||He.document.documentElement.scrollTop)||0}scrollX(){if(this._instance.config.scroll_root_selector){var t=this.scrollElement();return t&&t.scrollLeft||0}return He&&(He.scrollX||He.pageXOffset||He.document.documentElement.scrollLeft)||0}}var Wfn=e=>Nmt(e?.config.mask_personal_data_properties,e?.config.custom_personal_data_properties);class R3e{constructor(t,r,n,a){this.Te=s=>{var i=this.Re();if(!i||i.sessionId!==s){var o={sessionId:s,props:this.Ie(this._instance)};this.Fe.register({[tne]:o})}},this._instance=t,this.Ce=r,this.Fe=n,this.Ie=a||Wfn,this.Ce.onSessionId(this.Te)}Re(){return this.Fe.props[tne]}getSetOnceProps(){var t,r=(t=this.Re())==null?void 0:t.props;return r?"r"in r?Rmt(r):{$referring_domain:r.referringDomain,$pathname:r.initialPathName,utm_source:r.utm_source,utm_campaign:r.utm_campaign,utm_medium:r.utm_medium,utm_content:r.utm_content,utm_term:r.utm_term}:{}}getSessionProps(){var t={};return hs(rfe(this.getSetOnceProps()),((r,n)=>{n==="$current_url"&&(n="url"),t["$session_entry_"+Gre(n)]=r})),t}}var VY=go("[SessionId]");class P3e{on(t,r){return this.Me.on(t,r)}constructor(t,r,n){var a;if(this.Oe=[],this.Ae=void 0,this.Me=new pfe,this.De=(u,d)=>Math.abs(u-d)>this.sessionTimeoutMs,!t.persistence)throw new Error("SessionIdManager requires a PostHogPersistence instance");if(t.config.cookieless_mode==="always")throw new Error('SessionIdManager cannot be used with cookieless_mode="always"');this.F=t.config,this.Fe=t.persistence,this.je=void 0,this.Le=void 0,this._sessionStartTimestamp=null,this._sessionActivityTimestamp=null,this.Ne=r||ob,this.Ue=n||ob;var s=this.F.persistence_name||this.F.token,i=this.F.session_idle_timeout_seconds||1800;if(this._sessionTimeoutMs=1e3*hh(i,60,36e3,VY.createLogger("session_idle_timeout_seconds"),1800),t.register({$configured_session_timeout_ms:this._sessionTimeoutMs}),this.ze(),this.He="ph_"+s+"_window_id",this.Be="ph_"+s+"_primary_window_exists",this.qe()){var o=Vo.W(this.He),l=Vo.W(this.Be);o&&!l?this.je=o:Vo.V(this.He),Vo.G(this.Be,!0)}if((a=this.F.bootstrap)!=null&&a.sessionID)try{var c=(u=>{var d=u.replace(/-/g,"");if(d.length!==32)throw new Error("Not a valid UUID");if(d[12]!=="7")throw new Error("Not a UUIDv7");return parseInt(d.substring(0,12),16)})(this.F.bootstrap.sessionID);this.We(this.F.bootstrap.sessionID,new Date().getTime(),c)}catch(u){VY.error("Invalid sessionID in bootstrap",u)}this.Ge()}get sessionTimeoutMs(){return this._sessionTimeoutMs}onSessionId(t){return Ut(this.Oe)&&(this.Oe=[]),this.Oe.push(t),this.Le&&t(this.Le,this.je),()=>{this.Oe=this.Oe.filter((r=>r!==t))}}qe(){return this.F.persistence!=="memory"&&!this.Fe.wi&&Vo.H()}Ve(t){t!==this.je&&(this.je=t,this.qe()&&Vo.G(this.He,t))}Je(){return this.je?this.je:this.qe()?Vo.W(this.He):null}We(t,r,n){t===this.Le&&r===this._sessionActivityTimestamp&&n===this._sessionStartTimestamp||(this._sessionStartTimestamp=n,this._sessionActivityTimestamp=r,this.Le=t,this.Fe.register({[Dj]:[r,t,n]}))}Ke(){var t=this.Fe.props[Dj];return as(t)&&t.length===2&&t.push(t[0]),t||[0,null,0]}resetSessionId(){this.We(null,null,null)}destroy(){clearTimeout(this.Ye),this.Ye=void 0,this.Ae&&He&&(He.removeEventListener("beforeunload",this.Ae,{capture:!1}),this.Ae=void 0),this.Oe=[]}Ge(){this.Ae=()=>{this.qe()&&Vo.V(this.Be)},qi(He,"beforeunload",this.Ae,{capture:!1})}checkAndGetSessionAndWindowId(t,r){if(t===void 0&&(t=!1),r===void 0&&(r=null),this.F.cookieless_mode==="always")throw new Error('checkAndGetSessionAndWindowId should not be called with cookieless_mode="always"');var n=r||new Date().getTime(),[a,s,i]=this.Ke(),o=this.Je(),l=Fh(i)&&i>0&&Math.abs(n-i)>864e5,c=!1,u=!s,d=!u&&!t&&this.De(n,a);u||d||l?(s=this.Ne(),o=this.Ue(),VY.info("new session ID generated",{sessionId:s,windowId:o,changeReason:{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}}),i=n,c=!0):o||(o=this.Ue(),c=!0);var f=a===0||!t||l?n:a,h=i===0?new Date().getTime():i;return this.Ve(o),this.We(s,f,h),t||this.ze(),c&&this.Oe.forEach((g=>g(s,o,c?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}:void 0))),{sessionId:s,windowId:o,sessionStartTimestamp:h,changeReason:c?{noSessionId:u,activityTimeout:d,sessionPastMaximumLength:l}:void 0,lastActivityTimestamp:a}}ze(){clearTimeout(this.Ye),this.Ye=setTimeout((()=>{var[t]=this.Ke();if(this.De(new Date().getTime(),t)){var r=this.Le;this.resetSessionId(),this.Me.emit("forcedIdleReset",{idleSessionId:r})}}),1.1*this.sessionTimeoutMs)}}var Xfn=["$set_once","$set"],Py=go("[SiteApps]");class Yfn{constructor(t){this._instance=t,this.Xe=[],this.apps={}}get isEnabled(){return!!this._instance.config.opt_in_site_apps}Qe(t,r){if(r){var n=this.globalsForEvent(r);this.Xe.push(n),this.Xe.length>1e3&&(this.Xe=this.Xe.slice(10))}}get siteAppLoaders(){var t;return(t=Qr._POSTHOG_REMOTE_CONFIG)==null||(t=t[this._instance.config.token])==null?void 0:t.siteApps}init(){if(this.isEnabled){var t=this._instance.Ai(this.Qe.bind(this));this.Ze=()=>{t(),this.Xe=[],this.Ze=void 0}}}globalsForEvent(t){var r,n,a,s,i,o,l;if(!t)throw new Error("Event payload is required");var c={},u=this._instance.get_property("$groups")||[],d=this._instance.get_property("$stored_group_properties")||{};for(var[f,h]of Object.entries(d))c[f]={id:u[f],type:f,properties:h};var{$set_once:g,$set:y}=t;return{event:tr({},jht(t,Xfn),{properties:tr({},t.properties,y?{$set:tr({},(r=(n=t.properties)==null?void 0:n.$set)!==null&&r!==void 0?r:{},y)}:{},g?{$set_once:tr({},(a=(s=t.properties)==null?void 0:s.$set_once)!==null&&a!==void 0?a:{},g)}:{}),elements_chain:(i=(o=t.properties)==null?void 0:o.$elements_chain)!==null&&i!==void 0?i:"",distinct_id:(l=t.properties)==null?void 0:l.distinct_id}),person:{properties:this._instance.get_property("$stored_person_properties")},groups:c}}setupSiteApp(t){var r=this.apps[t.id],n=()=>{var o;!r.errored&&this.Xe.length&&(Py.info("Processing "+this.Xe.length+" events for site app with id "+t.id),this.Xe.forEach((l=>r.processEvent==null?void 0:r.processEvent(l))),r.processedBuffer=!0),Object.values(this.apps).every((l=>l.processedBuffer||l.errored))&&((o=this.Ze)==null||o.call(this))},a=!1,s=o=>{r.errored=!o,r.loaded=!0,Py.info("Site app with id "+t.id+" "+(o?"loaded":"errored")),a&&n()};try{var{processEvent:i}=t.init({posthog:this._instance,callback:o=>{s(o)}});i&&(r.processEvent=i),a=!0}catch(o){Py.error("Error while initializing PostHog app with config id "+t.id,o),s(!1)}if(a&&r.loaded)try{n()}catch(o){Py.error("Error while processing buffered events PostHog app with config id "+t.id,o),r.errored=!0}}tr(){var t=this.siteAppLoaders||[];for(var r of t)this.apps[r.id]={id:r.id,loaded:!1,errored:!1,processedBuffer:!1};for(var n of t)this.setupSiteApp(n)}ir(t){if(Object.keys(this.apps).length!==0){var r=this.globalsForEvent(t);for(var n of Object.values(this.apps))try{n.processEvent==null||n.processEvent(r)}catch(a){Py.error("Error while processing event "+t.event+" for site app "+n.id,a)}}}onRemoteConfig(t){var r,n,a,s=this;if((r=this.siteAppLoaders)!=null&&r.length)return this.isEnabled?(this.tr(),void this._instance.on("eventCaptured",(c=>this.ir(c)))):void Py.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.');if((n=this.Ze)==null||n.call(this),(a=t.siteApps)!=null&&a.length)if(this.isEnabled){var i=function(c){var u;Qr["__$$ph_site_app_"+c]=s._instance,(u=Qr.__PosthogExtensions__)==null||u.loadSiteApp==null||u.loadSiteApp(s._instance,l,(d=>{if(d)return Py.error("Error while initializing PostHog app with config id "+c,d)}))};for(var{id:o,url:l}of t.siteApps)i(o)}else Py.error('PostHog site apps are disabled. Enable the "opt_in_site_apps" config to proceed.')}}var Vmt=function(e,t){if(!e)return!1;var r=e.userAgent;if(r&&HMe(r,t))return!0;try{var n=e?.userAgentData;if(n!=null&&n.brands&&n.brands.some((a=>HMe(a?.brand,t))))return!0}catch{}return!!e.webdriver},BC=(function(e){return e.US="us",e.EU="eu",e.CUSTOM="custom",e})({}),$3e="i.posthog.com";class Kfn{constructor(t){this.er={},this.instance=t}get apiHost(){var t=this.instance.config.api_host.trim().replace(/\/$/,"");return t==="https://app.posthog.com"?"https://us.i.posthog.com":t}get flagsApiHost(){var t=this.instance.config.flags_api_host;return t?t.trim().replace(/\/$/,""):this.apiHost}get uiHost(){var t,r=(t=this.instance.config.ui_host)==null?void 0:t.replace(/\/$/,"");return r||(r=this.apiHost.replace("."+$3e,".posthog.com")),r==="https://app.posthog.com"?"https://us.posthog.com":r}get region(){return this.er[this.apiHost]||(/https:\/\/(app|us|us-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.er[this.apiHost]=BC.US:/https:\/\/(eu|eu-assets)(\.i)?\.posthog\.com/i.test(this.apiHost)?this.er[this.apiHost]=BC.EU:this.er[this.apiHost]=BC.CUSTOM),this.er[this.apiHost]}endpointFor(t,r){if(r===void 0&&(r=""),r&&(r=r[0]==="/"?r:"/"+r),t==="ui")return this.uiHost+r;if(t==="flags")return this.flagsApiHost+r;if(this.region===BC.CUSTOM)return this.apiHost+r;var n=$3e+r;switch(t){case"assets":return"https://"+this.region+"-assets."+n;case"api":return"https://"+this.region+"."+n}}}var Jfn={icontains:(e,t)=>!!He&&t.href.toLowerCase().indexOf(e.toLowerCase())>-1,not_icontains:(e,t)=>!!He&&t.href.toLowerCase().indexOf(e.toLowerCase())===-1,regex:(e,t)=>!!He&&Uj(t.href,e),not_regex:(e,t)=>!!He&&!Uj(t.href,e),exact:(e,t)=>t.href===e,is_not:(e,t)=>t.href!==e};class sl{constructor(t){var r=this;this.getWebExperimentsAndEvaluateDisplayLogic=function(n){n===void 0&&(n=!1),r.getWebExperiments((a=>{sl.rr("retrieved web experiments from the server"),r.sr=new Map,a.forEach((s=>{if(s.feature_flag_key){var i;r.sr&&(sl.rr("setting flag key ",s.feature_flag_key," to web experiment ",s),(i=r.sr)==null||i.set(s.feature_flag_key,s));var o=r._instance.getFeatureFlag(s.feature_flag_key);fo(o)&&s.variants[o]&&r.nr(s.name,o,s.variants[o].transforms)}else if(s.variants)for(var l in s.variants){var c=s.variants[l];sl.ar(c)&&r.nr(s.name,l,c.transforms)}}))}),n)},this._instance=t,this._instance.onFeatureFlags((n=>{this.onFeatureFlags(n)}))}onFeatureFlags(t){if(this._is_bot())sl.rr("Refusing to render web experiment since the viewer is a likely bot");else if(!this._instance.config.disable_web_experiments){if(Ga(this.sr))return this.sr=new Map,this.loadIfEnabled(),void this.previewWebExperiment();sl.rr("applying feature flags",t),t.forEach((r=>{var n;if(this.sr&&(n=this.sr)!=null&&n.has(r)){var a,s=this._instance.getFeatureFlag(r),i=(a=this.sr)==null?void 0:a.get(r);s&&i!=null&&i.variants[s]&&this.nr(i.name,s,i.variants[s].transforms)}}))}}previewWebExperiment(){var t=sl.getWindowLocation();if(t!=null&&t.search){var r=Mj(t?.search,"__experiment_id"),n=Mj(t?.search,"__experiment_variant");r&&n&&(sl.rr("previewing web experiments "+r+" && "+n),this.getWebExperiments((a=>{this.lr(parseInt(r),n,a)}),!1,!0))}}loadIfEnabled(){this._instance.config.disable_web_experiments||this.getWebExperimentsAndEvaluateDisplayLogic()}getWebExperiments(t,r,n){if(this._instance.config.disable_web_experiments&&!n)return t([]);var a=this._instance.get_property("$web_experiments");if(a&&!r)return t(a);this._instance.ci({url:this._instance.requestRouter.endpointFor("api","/api/web_experiments/?token="+this._instance.config.token),method:"GET",callback:s=>{if(s.statusCode!==200||!s.json)return t([]);var i=s.json.experiments||[];return t(i)}})}lr(t,r,n){var a=n.filter((s=>s.id===t));a&&a.length>0&&(sl.rr("Previewing web experiment ["+a[0].name+"] with variant ["+r+"]"),this.nr(a[0].name,r,a[0].variants[r].transforms))}static ar(t){return!Ga(t.conditions)&&sl.ur(t)&&sl.hr(t)}static ur(t){var r;if(Ga(t.conditions)||Ga((r=t.conditions)==null?void 0:r.url))return!0;var n,a,s,i=sl.getWindowLocation();return!!i&&((n=t.conditions)==null||!n.url||Jfn[(a=(s=t.conditions)==null?void 0:s.urlMatchType)!==null&&a!==void 0?a:"icontains"](t.conditions.url,i))}static getWindowLocation(){return He?.location}static hr(t){var r;if(Ga(t.conditions)||Ga((r=t.conditions)==null?void 0:r.utm))return!0;var n=Tmt();if(n.utm_source){var a,s,i,o,l,c,u,d,f=(a=t.conditions)==null||(a=a.utm)==null||!a.utm_campaign||((s=t.conditions)==null||(s=s.utm)==null?void 0:s.utm_campaign)==n.utm_campaign,h=(i=t.conditions)==null||(i=i.utm)==null||!i.utm_source||((o=t.conditions)==null||(o=o.utm)==null?void 0:o.utm_source)==n.utm_source,g=(l=t.conditions)==null||(l=l.utm)==null||!l.utm_medium||((c=t.conditions)==null||(c=c.utm)==null?void 0:c.utm_medium)==n.utm_medium,y=(u=t.conditions)==null||(u=u.utm)==null||!u.utm_term||((d=t.conditions)==null||(d=d.utm)==null?void 0:d.utm_term)==n.utm_term;return f&&g&&y&&h}return!1}static rr(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];Ht.info("[WebExperiments] "+t,n)}nr(t,r,n){this._is_bot()?sl.rr("Refusing to render web experiment since the viewer is a likely bot"):r!=="control"?n.forEach((a=>{if(a.selector){var s;sl.rr("applying transform of variant "+r+" for experiment "+t+" ",a);var i=(s=document)==null?void 0:s.querySelectorAll(a.selector);i?.forEach((o=>{var l=o;a.html&&(l.innerHTML=a.html),a.css&&l.setAttribute("style",a.css)}))}})):sl.rr("Control variants leave the page unmodified.")}_is_bot(){return ju&&this._instance?Vmt(ju,this._instance.config.custom_blocked_useragents):void 0}}var ehn=go("[PostHog ExternalIntegrations]"),thn={intercom:"intercom-integration",crispChat:"crisp-chat-integration"};class rhn{constructor(t){this._instance=t}it(t,r){var n;(n=Qr.__PosthogExtensions__)==null||n.loadExternalDependency==null||n.loadExternalDependency(this._instance,t,(a=>{if(a)return ehn.error("failed to load script",a);r()}))}startIfEnabledOrStop(){var t=this,r=function(i){var o,l,c;!a||(o=Qr.__PosthogExtensions__)!=null&&(o=o.integrations)!=null&&o[i]||t.it(thn[i],(()=>{var u;(u=Qr.__PosthogExtensions__)==null||(u=u.integrations)==null||(u=u[i])==null||u.start(t._instance)})),!a&&(l=Qr.__PosthogExtensions__)!=null&&(l=l.integrations)!=null&&l[i]&&((c=Qr.__PosthogExtensions__)==null||(c=c.integrations)==null||(c=c[i])==null||c.stop())};for(var[n,a]of Object.entries((s=this._instance.config.integrations)!==null&&s!==void 0?s:{})){var s;r(n)}}}var hne="[SessionRecording]",pC=go(hne);class M3e{get started(){var t;return!((t=this.vr)==null||!t.isStarted)}get status(){return this.vr?this.vr.status:this.dr&&!this.cr?"disabled":"lazy_loading"}constructor(t){if(this._forceAllowLocalhostNetworkCapture=!1,this.dr=!1,this.pr=void 0,this._instance=t,!this._instance.sessionManager)throw pC.error("started without valid sessionManager"),new Error(hne+" started without valid sessionManager. This is a bug.");if(this._instance.config.cookieless_mode==="always")throw new Error(hne+' cannot be used with cookieless_mode="always"')}get cr(){var t,r=!((t=this._instance.get_property(DY))==null||!t.enabled),n=!this._instance.config.disable_session_recording,a=this._instance.config.disable_session_recording||this._instance.consent.isOptedOut();return He&&r&&n&&!a}startIfEnabledOrStop(t){var r;if(!this.cr||(r=this.vr)==null||!r.isStarted){var n=!Ut(Object.assign)&&!Ut(Array.from);this.cr&&n?(this.gr(t),pC.info("starting")):this.stopRecording()}}gr(t){var r,n,a;this.cr&&(Qr!=null&&(r=Qr.__PosthogExtensions__)!=null&&(r=r.rrweb)!=null&&r.record&&(n=Qr.__PosthogExtensions__)!=null&&n.initSessionRecording?this._r(t):(a=Qr.__PosthogExtensions__)==null||a.loadExternalDependency==null||a.loadExternalDependency(this._instance,this.mr,(s=>{if(s)return pC.error("could not load recorder",s);this._r(t)})))}stopRecording(){var t,r;(t=this.pr)==null||t.call(this),this.pr=void 0,(r=this.vr)==null||r.stop()}yr(){var t;(t=this._instance.persistence)==null||t.unregister(Ght)}br(t){if(this._instance.persistence){var r,n,a=this._instance.persistence,s=()=>{var i=t.sessionRecording===!1?void 0:t.sessionRecording,o=i?.sampleRate,l=Ga(o)?null:parseFloat(o);Ga(l)&&this.yr();var c=i?.minimumDurationMilliseconds;a.register({[DY]:tr({enabled:!!i},i,{networkPayloadCapture:tr({capturePerformance:t.capturePerformance},i?.networkPayloadCapture),canvasRecording:{enabled:i?.recordCanvas,fps:i?.canvasFps,quality:i?.canvasQuality},sampleRate:l,minimumDurationMilliseconds:Ut(c)?null:c,endpoint:i?.endpoint,triggerMatchType:i?.triggerMatchType,masking:i?.masking,urlTriggers:i?.urlTriggers})})};s(),(r=this.pr)==null||r.call(this),this.pr=(n=this._instance.sessionManager)==null?void 0:n.onSessionId(s)}}onRemoteConfig(t){"sessionRecording"in t?t.sessionRecording!==!1?(this.br(t),this.dr=!0,this.startIfEnabledOrStop()):this.dr=!0:pC.info("skipping remote config with no sessionRecording",t)}log(t,r){var n;r===void 0&&(r="log"),(n=this.vr)!=null&&n.log?this.vr.log(t,r):pC.warn("log called before recorder was ready")}get mr(){var t,r,n=(t=this._instance)==null||(t=t.persistence)==null?void 0:t.get_property(DY);return(n==null||(r=n.scriptConfig)==null?void 0:r.script)||"lazy-recorder"}_r(t){var r,n;if((r=Qr.__PosthogExtensions__)==null||!r.initSessionRecording)throw Error("Called on script loaded before session recording is available");this.vr||(this.vr=(n=Qr.__PosthogExtensions__)==null?void 0:n.initSessionRecording(this._instance),this.vr._forceAllowLocalhostNetworkCapture=this._forceAllowLocalhostNetworkCapture),this.vr.start(t)}onRRwebEmit(t){var r;(r=this.vr)==null||r.onRRwebEmit==null||r.onRRwebEmit(t)}overrideLinkedFlag(){var t,r;this.vr||(r=this._instance.persistence)==null||r.register({$replay_override_linked_flag:!0}),(t=this.vr)==null||t.overrideLinkedFlag()}overrideSampling(){var t,r;this.vr||(r=this._instance.persistence)==null||r.register({$replay_override_sampling:!0}),(t=this.vr)==null||t.overrideSampling()}overrideTrigger(t){var r,n;this.vr||(n=this._instance.persistence)==null||n.register({[t==="url"?"$replay_override_url_trigger":"$replay_override_event_trigger"]:!0}),(r=this.vr)==null||r.overrideTrigger(t)}get sdkDebugProperties(){var t;return((t=this.vr)==null?void 0:t.sdkDebugProperties)||{$recording_status:this.status}}tryAddCustomEvent(t,r){var n;return!((n=this.vr)==null||!n.tryAddCustomEvent(t,r))}}var RT={},mne=()=>{},Qw="posthog",qmt=!Ifn&&gc?.indexOf("MSIE")===-1&&gc?.indexOf("Mozilla")===-1,j3e=e=>{var t;return tr({api_host:"https://us.i.posthog.com",flags_api_host:null,ui_host:null,token:"",autocapture:!0,cross_subdomain_cookie:_pn(Zt?.location),persistence:"localStorage+cookie",persistence_name:"",loaded:mne,save_campaign_params:!0,custom_campaign_params:[],custom_blocked_useragents:[],save_referrer:!0,capture_pageleave:"if_capture_pageview",defaults:e??"unset",__preview_deferred_init_extensions:!1,debug:Ec&&fo(Ec?.search)&&Ec.search.indexOf("__posthog_debug=true")!==-1||!1,cookie_expiration:365,upgrade:!1,disable_session_recording:!1,disable_persistence:!1,disable_web_experiments:!0,disable_surveys:!1,disable_surveys_automatic_display:!1,disable_external_dependency_loading:!1,enable_recording_console_log:void 0,secure_cookie:(He==null||(t=He.location)==null?void 0:t.protocol)==="https:",ip:!1,opt_out_capturing_by_default:!1,opt_out_persistence_by_default:!1,opt_out_useragent_filter:!1,opt_out_capturing_persistence_type:"localStorage",consent_persistence_name:null,opt_out_capturing_cookie_prefix:null,opt_in_site_apps:!1,property_denylist:[],respect_dnt:!1,sanitize_properties:null,request_headers:{},request_batching:!0,properties_string_max_length:65535,mask_all_element_attributes:!1,mask_all_text:!1,mask_personal_data_properties:!1,custom_personal_data_properties:[],advanced_disable_flags:!1,advanced_disable_decide:!1,advanced_disable_feature_flags:!1,advanced_disable_feature_flags_on_first_load:!1,advanced_only_evaluate_survey_feature_flags:!1,advanced_enable_surveys:!1,advanced_disable_toolbar_metrics:!1,feature_flag_request_timeout_ms:3e3,surveys_request_timeout_ms:1e4,on_request_error:r=>{var n="Bad HTTP status: "+r.statusCode+" "+r.text;Ht.error(n)},get_device_id:r=>r,capture_performance:void 0,name:"posthog",bootstrap:{},disable_compression:!1,session_idle_timeout_seconds:1800,person_profiles:"identified_only",before_send:void 0,request_queue_config:{flush_interval_ms:fne},error_tracking:{},_onCapture:mne,__preview_eager_load_replay:!1},(r=>({rageclick:!(r&&r>="2025-11-30")||{content_ignorelist:!0},capture_pageview:!(r&&r>="2025-05-24")||"history_change",session_recording:r&&r>="2025-11-30"?{strictMinimumDuration:!0}:{}}))(e))},L3e=e=>{var t={};Ut(e.process_person)||(t.person_profiles=e.process_person),Ut(e.xhr_headers)||(t.request_headers=e.xhr_headers),Ut(e.cookie_name)||(t.persistence_name=e.cookie_name),Ut(e.disable_cookie)||(t.disable_persistence=e.disable_cookie),Ut(e.store_google)||(t.save_campaign_params=e.store_google),Ut(e.verbose)||(t.debug=e.verbose);var r=Ci({},t,e);return as(e.property_blacklist)&&(Ut(e.property_denylist)?r.property_denylist=e.property_blacklist:as(e.property_denylist)?r.property_denylist=[...e.property_blacklist,...e.property_denylist]:Ht.error("Invalid value for property_denylist config: "+e.property_denylist)),r};class nhn{constructor(){this.__forceAllowLocalhost=!1}get wr(){return this.__forceAllowLocalhost}set wr(t){Ht.error("WebPerformanceObserver is deprecated and has no impact on network capture. Use `_forceAllowLocalhostNetworkCapture` on `posthog.sessionRecording`"),this.__forceAllowLocalhost=t}}class VF{get decideEndpointWasHit(){var t,r;return(t=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&t!==void 0&&t}get flagsEndpointWasHit(){var t,r;return(t=(r=this.featureFlags)==null?void 0:r.hasLoadedFlags)!==null&&t!==void 0&&t}constructor(){this.webPerformance=new nhn,this.Sr=!1,this.version=Um.LIB_VERSION,this.Er=new pfe,this._calculate_event_properties=this.calculateEventProperties.bind(this),this.config=j3e(),this.SentryIntegration=efn,this.sentryIntegration=t=>(function(r,n){var a=dmt(r,n);return{name:umt,processEvent:s=>a(s)}})(this,t),this.__request_queue=[],this.__loaded=!1,this.analyticsDefaultEndpoint="/e/",this.$r=!1,this.kr=null,this.Pr=null,this.Tr=null,this.featureFlags=new $fn(this),this.toolbar=new rfn(this),this.scrollManager=new Qfn(this),this.pageViewManager=new Sfn(this),this.surveys=new Ufn(this),this.experiments=new sl(this),this.exceptions=new Nfn(this),this.rateLimiter=new Vfn(this),this.requestRouter=new Kfn(this),this.consent=new Qpn(this),this.externalIntegrations=new rhn(this),this.people={set:(t,r,n)=>{var a=fo(t)?{[t]:r}:t;this.setPersonProperties(a),n?.({})},set_once:(t,r,n)=>{var a=fo(t)?{[t]:r}:t;this.setPersonProperties(void 0,a),n?.({})}},this.on("eventCaptured",(t=>Ht.info('send "'+t?.event+'"',t)))}init(t,r,n){if(n&&n!==Qw){var a,s=(a=RT[n])!==null&&a!==void 0?a:new VF;return s._init(t,r,n),RT[n]=s,RT[Qw][n]=s,s}return this._init(t,r,n)}_init(t,r,n){var a;if(r===void 0&&(r={}),Ut(t)||Qre(t))return Ht.critical("PostHog was initialized without a token. This likely indicates a misconfiguration. Please check the first argument passed to posthog.init()"),this;if(this.__loaded)return console.warn("[PostHog.js]","You have already initialized PostHog! Re-initializing is a no-op"),this;this.__loaded=!0,this.config={},r.debug=this.Rr(r.debug),this.Ir=r,this.Fr=[],r.person_profiles&&(this.Pr=r.person_profiles),this.set_config(Ci({},j3e(r.defaults),L3e(r),{name:n,token:t})),this.config.on_xhr_error&&Ht.error("on_xhr_error is deprecated. Use on_request_error instead"),this.compression=r.disable_compression?void 0:Ym.GZipJS;var s=this.Cr();this.persistence=new zY(this.config,s),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new zY(tr({},this.config,{persistence:"sessionStorage"}),s);var i=tr({},this.persistence.props),o=tr({},this.sessionPersistence.props);this.register({$initialization_time:new Date().toISOString()}),this.Mr=new Zfn((x=>this.Or(x)),this.config.request_queue_config),this.Ar=new Gfn(this),this.__request_queue=[];var l=this.config.cookieless_mode==="always"||this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut();if(l||(this.sessionManager=new P3e(this),this.sessionPropsManager=new R3e(this,this.sessionManager,this.persistence)),this.config.__preview_deferred_init_extensions?(Ht.info("Deferring extension initialization to improve startup performance"),setTimeout((()=>{this.Dr(l)}),0)):(Ht.info("Initializing extensions synchronously"),this.Dr(l)),Um.DEBUG=Um.DEBUG||this.config.debug,Um.DEBUG&&Ht.info("Starting in debug mode",{this:this,config:r,thisC:tr({},this.config),p:i,s:o}),((a=r.bootstrap)==null?void 0:a.distinctID)!==void 0){var c,u,d=this.config.get_device_id(ob()),f=(c=r.bootstrap)!=null&&c.isIdentifiedID?d:r.bootstrap.distinctID;this.persistence.set_property(Vm,(u=r.bootstrap)!=null&&u.isIdentifiedID?"identified":"anonymous"),this.register({distinct_id:r.bootstrap.distinctID,$device_id:f})}if(this.jr()){var h,g,y=Object.keys(((h=r.bootstrap)==null?void 0:h.featureFlags)||{}).filter((x=>{var S;return!((S=r.bootstrap)==null||(S=S.featureFlags)==null||!S[x])})).reduce(((x,S)=>{var E;return x[S]=((E=r.bootstrap)==null||(E=E.featureFlags)==null?void 0:E[S])||!1,x}),{}),b=Object.keys(((g=r.bootstrap)==null?void 0:g.featureFlagPayloads)||{}).filter((x=>y[x])).reduce(((x,S)=>{var E,C;return(E=r.bootstrap)!=null&&(E=E.featureFlagPayloads)!=null&&E[S]&&(x[S]=(C=r.bootstrap)==null||(C=C.featureFlagPayloads)==null?void 0:C[S]),x}),{});this.featureFlags.receivedFeatureFlags({featureFlags:y,featureFlagPayloads:b})}if(l)this.register_once({distinct_id:aC,$device_id:null},"");else if(!this.get_distinct_id()){var w=this.config.get_device_id(ob());this.register_once({distinct_id:w,$device_id:w},""),this.persistence.set_property(Vm,"anonymous")}return qi(He,"onpagehide"in self?"pagehide":"unload",this._handle_unload.bind(this),{passive:!1}),this.toolbar.maybeLoadToolbar(),r.segment?Jpn(this,(()=>this.Lr())):this.Lr(),Ob(this.config._onCapture)&&this.config._onCapture!==mne&&(Ht.warn("onCapture is deprecated. Please use `before_send` instead"),this.on("eventCaptured",(x=>this.config._onCapture(x.event,x)))),this.config.ip&&Ht.warn('The `ip` config option has NO EFFECT AT ALL and has been deprecated. Use a custom transformation or "Discard IP data" project setting instead. See https://posthog.com/tutorials/web-redact-properties#hiding-customer-ip-address for more information.'),this}Dr(t){var r=performance.now();this.historyAutocapture=new Kpn(this),this.historyAutocapture.startIfEnabled();var n=[];n.push((()=>{new afn(this).startIfEnabledOrStop()})),n.push((()=>{var a;this.siteApps=new Yfn(this),(a=this.siteApps)==null||a.init()})),t||n.push((()=>{this.sessionRecording=new M3e(this),this.sessionRecording.startIfEnabledOrStop()})),this.config.disable_scroll_properties||n.push((()=>{this.scrollManager.startMeasuringScrollPosition()})),n.push((()=>{this.autocapture=new Bpn(this),this.autocapture.startIfEnabled()})),n.push((()=>{this.surveys.loadIfEnabled()})),n.push((()=>{this.heatmaps=new wfn(this),this.heatmaps.startIfEnabled()})),n.push((()=>{this.webVitalsAutocapture=new vfn(this)})),n.push((()=>{this.exceptionObserver=new Ypn(this),this.exceptionObserver.startIfEnabled()})),n.push((()=>{this.deadClicksAutocapture=new cmt(this,Xpn),this.deadClicksAutocapture.startIfEnabled()})),n.push((()=>{if(this.Nr){var a=this.Nr;this.Nr=void 0,this.fi(a)}})),this.Ur(n,r)}Ur(t,r){for(;t.length>0;){if(this.config.__preview_deferred_init_extensions&&performance.now()-r>=30&&t.length>0)return void setTimeout((()=>{this.Ur(t,r)}),0);var n=t.shift();if(n)try{n()}catch(s){Ht.error("Error initializing extension:",s)}}var a=Math.round(performance.now()-r);this.register_for_session({$sdk_debug_extensions_init_method:this.config.__preview_deferred_init_extensions?"deferred":"synchronous",$sdk_debug_extensions_init_time_ms:a}),this.config.__preview_deferred_init_extensions&&Ht.info("PostHog extensions initialized ("+a+"ms)")}fi(t){var r,n,a,s,i,o,l,c;if(!Zt||!Zt.body)return Ht.info("document not ready yet, trying again in 500 milliseconds..."),void setTimeout((()=>{this.fi(t)}),500);this.config.__preview_deferred_init_extensions&&(this.Nr=t),this.compression=void 0,t.supportedCompression&&!this.config.disable_compression&&(this.compression=Fn(t.supportedCompression,Ym.GZipJS)?Ym.GZipJS:Fn(t.supportedCompression,Ym.Base64)?Ym.Base64:void 0),(r=t.analytics)!=null&&r.endpoint&&(this.analyticsDefaultEndpoint=t.analytics.endpoint),this.set_config({person_profiles:this.Pr?this.Pr:"identified_only"}),(n=this.siteApps)==null||n.onRemoteConfig(t),(a=this.sessionRecording)==null||a.onRemoteConfig(t),(s=this.autocapture)==null||s.onRemoteConfig(t),(i=this.heatmaps)==null||i.onRemoteConfig(t),this.surveys.onRemoteConfig(t),(o=this.webVitalsAutocapture)==null||o.onRemoteConfig(t),(l=this.exceptionObserver)==null||l.onRemoteConfig(t),this.exceptions.onRemoteConfig(t),(c=this.deadClicksAutocapture)==null||c.onRemoteConfig(t)}Lr(){try{this.config.loaded(this)}catch(t){Ht.critical("`loaded` function failed",t)}this.zr(),this.config.capture_pageview&&setTimeout((()=>{(this.consent.isOptedIn()||this.config.cookieless_mode==="always")&&this.Hr()}),1),new qfn(this).load(),this.featureFlags.flags()}zr(){var t;this.is_capturing()&&this.config.request_batching&&((t=this.Mr)==null||t.enable())}_dom_loaded(){this.is_capturing()&&kb(this.__request_queue,(t=>this.Or(t))),this.__request_queue=[],this.zr()}_handle_unload(){var t,r;this.config.request_batching?(this.Br()&&this.capture("$pageleave"),(t=this.Mr)==null||t.unload(),(r=this.Ar)==null||r.unload()):this.Br()&&this.capture("$pageleave",null,{transport:"sendBeacon"})}ci(t){this.__loaded&&(qmt?this.__request_queue.push(t):this.rateLimiter.isServerRateLimited(t.batchKey)||(t.transport=t.transport||this.config.api_transport,t.url=zj(t.url,{ip:this.config.ip?1:0}),t.headers=tr({},this.config.request_headers),t.compression=t.compression==="best-available"?this.compression:t.compression,t.disableXHRCredentials=this.config.__preview_disable_xhr_credentials,this.config.__preview_disable_beacon&&(t.disableTransport=["sendBeacon"]),t.fetchOptions=t.fetchOptions||this.config.fetch_options,(r=>{var n,a,s,i=tr({},r);i.timeout=i.timeout||6e4,i.url=zj(i.url,{_:new Date().getTime().toString(),ver:Um.LIB_VERSION,compression:i.compression});var o=(n=i.transport)!==null&&n!==void 0?n:"fetch",l=$M.filter((u=>!i.disableTransport||!u.transport||!i.disableTransport.includes(u.transport))),c=(a=(s=qht(l,(u=>u.transport===o)))==null?void 0:s.method)!==null&&a!==void 0?a:l[0].method;if(!c)throw new Error("No available transport method");c(i)})(tr({},t,{callback:r=>{var n,a;this.rateLimiter.checkForLimiting(r),r.statusCode>=400&&((n=(a=this.config).on_request_error)==null||n.call(a,r)),t.callback==null||t.callback(r)}}))))}Or(t){this.Ar?this.Ar.retriableRequest(t):this.ci(t)}_execute_array(t){var r,n=[],a=[],s=[];kb(t,(o=>{o&&(r=o[0],as(r)?s.push(o):Ob(o)?o.call(this):as(o)&&r==="alias"?n.push(o):as(o)&&r.indexOf("capture")!==-1&&Ob(this[r])?s.push(o):a.push(o))}));var i=function(o,l){kb(o,(function(c){if(as(c[0])){var u=l;hs(c,(function(d){u=u[d[0]].apply(u,d.slice(1))}))}else this[c[0]].apply(this,c.slice(1))}),l)};i(n,this),i(a,this),i(s,this)}jr(){var t,r;return((t=this.config.bootstrap)==null?void 0:t.featureFlags)&&Object.keys((r=this.config.bootstrap)==null?void 0:r.featureFlags).length>0||!1}push(t){this._execute_array([t])}capture(t,r,n){var a;if(this.__loaded&&this.persistence&&this.sessionPersistence&&this.Mr){if(this.is_capturing())if(!Ut(t)&&fo(t)){var s=!this.config.opt_out_useragent_filter&&this._is_bot();if(!(s&&!this.config.__preview_capture_bot_pageviews)){var i=n!=null&&n.skip_client_rate_limiting?void 0:this.rateLimiter.clientRateLimitContext();if(i==null||!i.isRateLimited){r!=null&&r.$current_url&&!fo(r?.$current_url)&&(Ht.error("Invalid `$current_url` property provided to `posthog.capture`. Input must be a string. Ignoring provided value."),r==null||delete r.$current_url),this.sessionPersistence.update_search_keyword(),this.config.save_campaign_params&&this.sessionPersistence.update_campaign_params(),this.config.save_referrer&&this.sessionPersistence.update_referrer_info(),(this.config.save_campaign_params||this.config.save_referrer)&&this.persistence.set_initial_person_info();var o=new Date,l=n?.timestamp||o,c=ob(),u={uuid:c,event:t,properties:this.calculateEventProperties(t,r||{},l,c)};t==="$pageview"&&this.config.__preview_capture_bot_pageviews&&s&&(u.event="$bot_pageview",u.properties.$browser_type="bot"),i&&(u.properties.$lib_rate_limit_remaining_tokens=i.remainingTokens),n?.$set&&(u.$set=n?.$set);var d,f=this.qr(n?.$set_once);if(f&&(u.$set_once=f),(u=Epn(u,n!=null&&n._noTruncate?null:this.config.properties_string_max_length)).timestamp=l,Ut(n?.timestamp)||(u.properties.$event_time_override_provided=!0,u.properties.$event_time_override_system_time=o),t===MM.DISMISSED||t===MM.SENT){var h=r?.[D3e.SURVEY_ID],g=r?.[D3e.SURVEY_ITERATION];d={id:h,current_iteration:g},localStorage.getItem(I3e(d))||localStorage.setItem(I3e(d),"true"),u.$set=tr({},u.$set,{[Lfn({id:h,current_iteration:g},t===MM.SENT?"responded":"dismissed")]:!0})}var y=tr({},u.properties.$set,u.$set);if(dS(y)||this.setPersonPropertiesForFlags(y),!Ga(this.config.before_send)){var b=this.Wr(u);if(!b)return;u=b}this.Er.emit("eventCaptured",u);var w={method:"POST",url:(a=n?._url)!==null&&a!==void 0?a:this.requestRouter.endpointFor("api",this.analyticsDefaultEndpoint),data:u,compression:"best-available",batchKey:n?._batchKey};return!this.config.request_batching||n&&(n==null||!n._batchKey)||n!=null&&n.send_instantly?this.Or(w):this.Mr.enqueue(w),u}Ht.critical("This capture call is ignored due to client rate limiting.")}}else Ht.error("No event name provided to posthog.capture")}else Ht.uninitializedWarning("posthog.capture")}Ai(t){return this.on("eventCaptured",(r=>t(r.event,r)))}calculateEventProperties(t,r,n,a,s){if(n=n||new Date,!this.persistence||!this.sessionPersistence)return r;var i=s?void 0:this.persistence.remove_event_timer(t),o=tr({},r);if(o.token=this.config.token,o.$config_defaults=this.config.defaults,(this.config.cookieless_mode=="always"||this.config.cookieless_mode=="on_reject"&&this.consent.isExplicitlyOptedOut())&&(o.$cookieless_mode=!0),t==="$snapshot"){var l=tr({},this.persistence.properties(),this.sessionPersistence.properties());return o.distinct_id=l.distinct_id,(!fo(o.distinct_id)&&!Fh(o.distinct_id)||Qre(o.distinct_id))&&Ht.error("Invalid distinct_id for replay event. This indicates a bug in your implementation"),o}var c,u=bfn(this.config.mask_personal_data_properties,this.config.custom_personal_data_properties);if(this.sessionManager){var{sessionId:d,windowId:f}=this.sessionManager.checkAndGetSessionAndWindowId(s,n.getTime());o.$session_id=d,o.$window_id=f}this.sessionPropsManager&&Ci(o,this.sessionPropsManager.getSessionProps());try{var h;this.sessionRecording&&Ci(o,this.sessionRecording.sdkDebugProperties),o.$sdk_debug_retry_queue_size=(h=this.Ar)==null?void 0:h.length}catch(w){o.$sdk_debug_error_capturing_properties=String(w)}if(this.requestRouter.region===BC.CUSTOM&&(o.$lib_custom_api_host=this.config.api_host),c=t!=="$pageview"||s?t!=="$pageleave"||s?this.pageViewManager.doEvent():this.pageViewManager.doPageLeave(n):this.pageViewManager.doPageView(n,a),o=Ci(o,c),t==="$pageview"&&Zt&&(o.title=Zt.title),!Ut(i)){var g=n.getTime()-i;o.$duration=parseFloat((g/1e3).toFixed(3))}gc&&this.config.opt_out_useragent_filter&&(o.$browser_type=this._is_bot()?"bot":"browser"),(o=Ci({},u,this.persistence.properties(),this.sessionPersistence.properties(),o)).$is_identified=this._isIdentified(),as(this.config.property_denylist)?hs(this.config.property_denylist,(function(w){delete o[w]})):Ht.error("Invalid value for property_denylist config: "+this.config.property_denylist+" or property_blacklist config: "+this.config.property_blacklist);var y=this.config.sanitize_properties;y&&(Ht.error("sanitize_properties is deprecated. Use before_send instead"),o=y(o,t));var b=this.Gr();return o.$process_person_profile=b,b&&!s&&this.Vr("_calculate_event_properties"),o}qr(t){var r;if(!this.persistence||!this.Gr()||this.Sr)return t;var n=this.persistence.get_initial_props(),a=(r=this.sessionPropsManager)==null?void 0:r.getSetOnceProps(),s=Ci({},n,a||{},t||{}),i=this.config.sanitize_properties;return i&&(Ht.error("sanitize_properties is deprecated. Use before_send instead"),s=i(s,"$set_once")),this.Sr=!0,dS(s)?void 0:s}register(t,r){var n;(n=this.persistence)==null||n.register(t,r)}register_once(t,r,n){var a;(a=this.persistence)==null||a.register_once(t,r,n)}register_for_session(t){var r;(r=this.sessionPersistence)==null||r.register(t)}unregister(t){var r;(r=this.persistence)==null||r.unregister(t)}unregister_for_session(t){var r;(r=this.sessionPersistence)==null||r.unregister(t)}Jr(t,r){this.register({[t]:r})}getFeatureFlag(t,r){return this.featureFlags.getFeatureFlag(t,r)}getFeatureFlagPayload(t){var r=this.featureFlags.getFeatureFlagPayload(t);try{return JSON.parse(r)}catch{return r}}isFeatureEnabled(t,r){return this.featureFlags.isFeatureEnabled(t,r)}reloadFeatureFlags(){this.featureFlags.reloadFeatureFlags()}updateEarlyAccessFeatureEnrollment(t,r,n){this.featureFlags.updateEarlyAccessFeatureEnrollment(t,r,n)}getEarlyAccessFeatures(t,r,n){return r===void 0&&(r=!1),this.featureFlags.getEarlyAccessFeatures(t,r,n)}on(t,r){return this.Er.on(t,r)}onFeatureFlags(t){return this.featureFlags.onFeatureFlags(t)}onSurveysLoaded(t){return this.surveys.onSurveysLoaded(t)}onSessionId(t){var r,n;return(r=(n=this.sessionManager)==null?void 0:n.onSessionId(t))!==null&&r!==void 0?r:()=>{}}getSurveys(t,r){r===void 0&&(r=!1),this.surveys.getSurveys(t,r)}getActiveMatchingSurveys(t,r){r===void 0&&(r=!1),this.surveys.getActiveMatchingSurveys(t,r)}renderSurvey(t,r){this.surveys.renderSurvey(t,r)}displaySurvey(t,r){r===void 0&&(r=Bfn),this.surveys.displaySurvey(t,r)}cancelPendingSurvey(t){this.surveys.cancelPendingSurvey(t)}canRenderSurvey(t){return this.surveys.canRenderSurvey(t)}canRenderSurveyAsync(t,r){return r===void 0&&(r=!1),this.surveys.canRenderSurveyAsync(t,r)}identify(t,r,n){if(!this.__loaded||!this.persistence)return Ht.uninitializedWarning("posthog.identify");if(Fh(t)&&(t=t.toString(),Ht.warn("The first argument to posthog.identify was a number, but it should be a string. It has been converted to a string.")),t)if(["distinct_id","distinctid"].includes(t.toLowerCase()))Ht.critical('The string "'+t+'" was set in posthog.identify which indicates an error. This ID should be unique to the user and not a hardcoded string.');else if(t!==aC){if(this.Vr("posthog.identify")){var a=this.get_distinct_id();if(this.register({$user_id:t}),!this.get_property("$device_id")){var s=a;this.register_once({$had_persisted_distinct_id:!0,$device_id:s},"")}t!==a&&t!==this.get_property(PC)&&(this.unregister(PC),this.register({distinct_id:t}));var i=(this.persistence.get_property(Vm)||"anonymous")==="anonymous";t!==a&&i?(this.persistence.set_property(Vm,"identified"),this.setPersonPropertiesForFlags(tr({},n||{},r||{}),!1),this.capture("$identify",{distinct_id:t,$anon_distinct_id:a},{$set:r||{},$set_once:n||{}}),this.Tr=_3e(t,r,n),this.featureFlags.setAnonymousDistinctId(a)):(r||n)&&this.setPersonProperties(r,n),t!==a&&(this.reloadFeatureFlags(),this.unregister(Ij))}}else Ht.critical('The string "'+aC+'" was set in posthog.identify which indicates an error. This ID is only used as a sentinel value.');else Ht.error("Unique user id has not been set in posthog.identify")}setPersonProperties(t,r){if((t||r)&&this.Vr("posthog.setPersonProperties")){var n=_3e(this.get_distinct_id(),t,r);this.Tr!==n?(this.setPersonPropertiesForFlags(tr({},r||{},t||{})),this.capture("$set",{$set:t||{},$set_once:r||{}}),this.Tr=n):Ht.info("A duplicate setPersonProperties call was made with the same properties. It has been ignored.")}}group(t,r,n){if(t&&r){if(this.Vr("posthog.group")){var a=this.getGroups();a[t]!==r&&this.resetGroupPropertiesForFlags(t),this.register({$groups:tr({},a,{[t]:r})}),n&&(this.capture("$groupidentify",{$group_type:t,$group_key:r,$group_set:n}),this.setGroupPropertiesForFlags({[t]:n})),a[t]===r||n||this.reloadFeatureFlags()}}else Ht.error("posthog.group requires a group type and group key")}resetGroups(){this.register({$groups:{}}),this.resetGroupPropertiesForFlags(),this.reloadFeatureFlags()}setPersonPropertiesForFlags(t,r){r===void 0&&(r=!0),this.featureFlags.setPersonPropertiesForFlags(t,r)}resetPersonPropertiesForFlags(){this.featureFlags.resetPersonPropertiesForFlags()}setGroupPropertiesForFlags(t,r){r===void 0&&(r=!0),this.Vr("posthog.setGroupPropertiesForFlags")&&this.featureFlags.setGroupPropertiesForFlags(t,r)}resetGroupPropertiesForFlags(t){this.featureFlags.resetGroupPropertiesForFlags(t)}reset(t){var r,n,a,s;if(Ht.info("reset"),!this.__loaded)return Ht.uninitializedWarning("posthog.reset");var i=this.get_property("$device_id");if(this.consent.reset(),(r=this.persistence)==null||r.clear(),(n=this.sessionPersistence)==null||n.clear(),this.surveys.reset(),this.featureFlags.reset(),(a=this.persistence)==null||a.set_property(Vm,"anonymous"),(s=this.sessionManager)==null||s.resetSessionId(),this.Tr=null,this.config.cookieless_mode==="always")this.register_once({distinct_id:aC,$device_id:null},"");else{var o=this.config.get_device_id(ob());this.register_once({distinct_id:o,$device_id:t?o:i},"")}this.register({$last_posthog_reset:new Date().toISOString()},1)}get_distinct_id(){return this.get_property("distinct_id")}getGroups(){return this.get_property("$groups")||{}}get_session_id(){var t,r;return(t=(r=this.sessionManager)==null?void 0:r.checkAndGetSessionAndWindowId(!0).sessionId)!==null&&t!==void 0?t:""}get_session_replay_url(t){if(!this.sessionManager)return"";var{sessionId:r,sessionStartTimestamp:n}=this.sessionManager.checkAndGetSessionAndWindowId(!0),a=this.requestRouter.endpointFor("ui","/project/"+this.config.token+"/replay/"+r);if(t!=null&&t.withTimestamp&&n){var s,i=(s=t.timestampLookBack)!==null&&s!==void 0?s:10;if(!n)return a;a+="?t="+Math.max(Math.floor((new Date().getTime()-n)/1e3)-i,0)}return a}alias(t,r){return t===this.get_property(Zht)?(Ht.critical("Attempting to create alias for existing People user - aborting."),-2):this.Vr("posthog.alias")?(Ut(r)&&(r=this.get_distinct_id()),t!==r?(this.Jr(PC,t),this.capture("$create_alias",{alias:t,distinct_id:r})):(Ht.warn("alias matches current distinct_id - skipping api call."),this.identify(t),-1)):void 0}set_config(t){var r=tr({},this.config);if(wo(t)){var n,a,s,i,o;Ci(this.config,L3e(t));var l=this.Cr();(n=this.persistence)==null||n.update_config(this.config,r,l),this.sessionPersistence=this.config.persistence==="sessionStorage"||this.config.persistence==="memory"?this.persistence:new zY(tr({},this.config,{persistence:"sessionStorage"}),l);var c=this.Rr(this.config.debug);_b(c)&&(this.config.debug=c),_b(this.config.debug)&&(this.config.debug?(Um.DEBUG=!0,Zs.H()&&Zs.G("ph_debug","true"),Ht.info("set_config",{config:t,oldConfig:r,newConfig:tr({},this.config)})):(Um.DEBUG=!1,Zs.H()&&Zs.V("ph_debug"))),(a=this.sessionRecording)==null||a.startIfEnabledOrStop(),(s=this.autocapture)==null||s.startIfEnabled(),(i=this.heatmaps)==null||i.startIfEnabled(),this.surveys.loadIfEnabled(),this.Kr(),(o=this.externalIntegrations)==null||o.startIfEnabledOrStop()}}startSessionRecording(t){var r=t===!0,n={sampling:r||!(t==null||!t.sampling),linked_flag:r||!(t==null||!t.linked_flag),url_trigger:r||!(t==null||!t.url_trigger),event_trigger:r||!(t==null||!t.event_trigger)};if(Object.values(n).some(Boolean)){var a,s,i,o,l;(a=this.sessionManager)==null||a.checkAndGetSessionAndWindowId(),n.sampling&&((s=this.sessionRecording)==null||s.overrideSampling()),n.linked_flag&&((i=this.sessionRecording)==null||i.overrideLinkedFlag()),n.url_trigger&&((o=this.sessionRecording)==null||o.overrideTrigger("url")),n.event_trigger&&((l=this.sessionRecording)==null||l.overrideTrigger("event"))}this.set_config({disable_session_recording:!1})}stopSessionRecording(){this.set_config({disable_session_recording:!0})}sessionRecordingStarted(){var t;return!((t=this.sessionRecording)==null||!t.started)}captureException(t,r){var n=new Error("PostHog syntheticException"),a=this.exceptions.buildProperties(t,{handled:!0,syntheticException:n});return this.exceptions.sendExceptionEvent(tr({},a,r))}loadToolbar(t){return this.toolbar.loadToolbar(t)}get_property(t){var r;return(r=this.persistence)==null?void 0:r.props[t]}getSessionProperty(t){var r;return(r=this.sessionPersistence)==null?void 0:r.props[t]}toString(){var t,r=(t=this.config.name)!==null&&t!==void 0?t:Qw;return r!==Qw&&(r=Qw+"."+r),r}_isIdentified(){var t,r;return((t=this.persistence)==null?void 0:t.get_property(Vm))==="identified"||((r=this.sessionPersistence)==null?void 0:r.get_property(Vm))==="identified"}Gr(){var t,r;return!(this.config.person_profiles==="never"||this.config.person_profiles==="identified_only"&&!this._isIdentified()&&dS(this.getGroups())&&((t=this.persistence)==null||(t=t.props)==null||!t[PC])&&((r=this.persistence)==null||(r=r.props)==null||!r[Rj]))}Br(){return this.config.capture_pageleave===!0||this.config.capture_pageleave==="if_capture_pageview"&&(this.config.capture_pageview===!0||this.config.capture_pageview==="history_change")}createPersonProfile(){this.Gr()||this.Vr("posthog.createPersonProfile")&&this.setPersonProperties({},{})}Vr(t){return this.config.person_profiles==="never"?(Ht.error(t+' was called, but process_person is set to "never". This call will be ignored.'),!1):(this.Jr(Rj,!0),!0)}Cr(){if(this.config.cookieless_mode==="always")return!0;var t=this.consent.isOptedOut(),r=this.config.opt_out_persistence_by_default||this.config.cookieless_mode==="on_reject";return this.config.disable_persistence||t&&!!r}Kr(){var t,r,n,a,s=this.Cr();return((t=this.persistence)==null?void 0:t.wi)!==s&&((n=this.persistence)==null||n.set_disabled(s)),((r=this.sessionPersistence)==null?void 0:r.wi)!==s&&((a=this.sessionPersistence)==null||a.set_disabled(s)),s}opt_in_capturing(t){var r;if(this.config.cookieless_mode!=="always"){var n,a;this.config.cookieless_mode==="on_reject"&&this.consent.isExplicitlyOptedOut()&&(this.reset(!0),(n=this.sessionManager)==null||n.destroy(),this.sessionManager=new P3e(this),this.persistence&&(this.sessionPropsManager=new R3e(this,this.sessionManager,this.persistence)),this.sessionRecording=new M3e(this),this.sessionRecording.startIfEnabledOrStop()),this.consent.optInOut(!0),this.Kr(),this.zr(),(r=this.sessionRecording)==null||r.startIfEnabledOrStop(),this.config.cookieless_mode=="on_reject"&&this.surveys.loadIfEnabled(),(Ut(t?.captureEventName)||t!=null&&t.captureEventName)&&this.capture((a=t?.captureEventName)!==null&&a!==void 0?a:"$opt_in",t?.captureProperties,{send_instantly:!0}),this.config.capture_pageview&&this.Hr()}else Ht.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}opt_out_capturing(){var t,r;this.config.cookieless_mode!=="always"?(this.config.cookieless_mode==="on_reject"&&this.consent.isOptedIn()&&this.reset(!0),this.consent.optInOut(!1),this.Kr(),this.config.cookieless_mode==="on_reject"&&(this.register({distinct_id:aC,$device_id:null}),(t=this.sessionManager)==null||t.destroy(),this.sessionManager=void 0,this.sessionPropsManager=void 0,(r=this.sessionRecording)==null||r.stopRecording(),this.sessionRecording=void 0,this.Hr())):Ht.warn('Consent opt in/out is not valid with cookieless_mode="always" and will be ignored')}has_opted_in_capturing(){return this.consent.isOptedIn()}has_opted_out_capturing(){return this.consent.isOptedOut()}get_explicit_consent_status(){var t=this.consent.consent;return t===qm.GRANTED?"granted":t===qm.DENIED?"denied":"pending"}is_capturing(){return this.config.cookieless_mode==="always"||(this.config.cookieless_mode==="on_reject"?this.consent.isExplicitlyOptedOut()||this.consent.isOptedIn():!this.has_opted_out_capturing())}clear_opt_in_out_capturing(){this.consent.reset(),this.Kr()}_is_bot(){return ju?Vmt(ju,this.config.custom_blocked_useragents):void 0}Hr(){Zt&&(Zt.visibilityState==="visible"?this.$r||(this.$r=!0,this.capture("$pageview",{title:Zt.title},{send_instantly:!0}),this.kr&&(Zt.removeEventListener("visibilitychange",this.kr),this.kr=null)):this.kr||(this.kr=this.Hr.bind(this),qi(Zt,"visibilitychange",this.kr)))}debug(t){t===!1?(He?.console.log("You've disabled debug mode."),this.set_config({debug:!1})):(He?.console.log("You're now in debug mode. All calls to PostHog will be logged in your console.\nYou can disable this with `posthog.debug(false)`."),this.set_config({debug:!0}))}O(){var t,r,n,a,s,i,o,l=this.Ir||{};return"advanced_disable_flags"in l?!!l.advanced_disable_flags:this.config.advanced_disable_flags!==!1?!!this.config.advanced_disable_flags:this.config.advanced_disable_decide===!0?(Ht.warn("Config field 'advanced_disable_decide' is deprecated. Please use 'advanced_disable_flags' instead. The old field will be removed in a future major version."),!0):(n="advanced_disable_decide",a=!1,s=Ht,i=(r="advanced_disable_flags")in(t=l)&&!Ut(t[r]),o=n in t&&!Ut(t[n]),i?t[r]:o?(s&&s.warn("Config field '"+n+"' is deprecated. Please use '"+r+"' instead. The old field will be removed in a future major version."),t[n]):a)}Wr(t){if(Ga(this.config.before_send))return t;var r=as(this.config.before_send)?this.config.before_send:[this.config.before_send],n=t;for(var a of r){if(n=a(n),Ga(n)){var s="Event '"+t.event+"' was rejected in beforeSend function";return Xdn(t.event)?Ht.warn(s+". This can cause unexpected behavior."):Ht.info(s),null}n.properties&&!dS(n.properties)||Ht.warn("Event '"+t.event+"' has no properties after beforeSend function, this is likely an error.")}return n}getPageViewId(){var t;return(t=this.pageViewManager.Vt)==null?void 0:t.pageViewId}captureTraceFeedback(t,r){this.capture("$ai_feedback",{$ai_trace_id:String(t),$ai_feedback_text:r})}captureTraceMetric(t,r,n){this.capture("$ai_metric",{$ai_trace_id:String(t),$ai_metric_name:r,$ai_metric_value:String(n)})}Rr(t){var r=_b(t)&&!t,n=Zs.H()&&Zs.q("ph_debug")==="true";return!r&&(!!n||t)}}(function(e,t){for(var r=0;r<t.length;r++)e.prototype[t[r]]=Spn(e.prototype[t[r]])})(VF,["identify"]);var F3e,Km=(F3e=RT[Qw]=new VF,(function(){function e(){e.done||(e.done=!0,qmt=!1,hs(RT,(function(t){t._dom_loaded()})))}Zt!=null&&Zt.addEventListener?Zt.readyState==="complete"?e():qi(Zt,"DOMContentLoaded",e,{capture:!1}):He&&Ht.error("Browser doesn't support `document.addEventListener` so PostHog couldn't be initialized")})(),F3e),Zmt=_.createContext({client:Km,bootstrap:void 0});function Hmt(e,t,r){if(r===void 0&&(r=new WeakMap),e===t)return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;if(r.has(e)&&r.get(e)===t)return!0;r.set(e,t);var n=Object.keys(e),a=Object.keys(t);if(n.length!==a.length)return!1;for(var s=0,i=n;s<i.length;s++){var o=i[s];if(!a.includes(o)||!Hmt(e[o],t[o],r))return!1}return!0}function ahn(e){var t,r,n=e.children,a=e.client,s=e.apiKey,i=e.options,o=_.useRef(null),l=_.useMemo(function(){return a?(s&&console.warn("[PostHog.js] You have provided both `client` and `apiKey` to `PostHogProvider`. `apiKey` will be ignored in favour of `client`."),i&&console.warn("[PostHog.js] You have provided both `client` and `options` to `PostHogProvider`. `options` will be ignored in favour of `client`."),a):(s||console.warn("[PostHog.js] No `apiKey` or `client` were provided to `PostHogProvider`. Using default global `window.posthog` instance. You must initialize it manually. This is not recommended behavior."),Km)},[a,s,JSON.stringify(i)]);return _.useEffect(function(){if(!a){var c=o.current;c?(s!==c.apiKey&&console.warn("[PostHog.js] You have provided a different `apiKey` to `PostHogProvider` than the one that was already initialized. This is not supported by our provider and we'll keep using the previous key. If you need to toggle between API Keys you need to control the `client` yourself and pass it in as a prop rather than an `apiKey` prop."),i&&!Hmt(i,c.options)&&Km.set_config(i),o.current={apiKey:s,options:i??{}}):(Km.__loaded&&console.warn("[PostHog.js] `posthog` was already loaded elsewhere. This may cause issues."),Km.init(s,i),o.current={apiKey:s,options:i??{}})}},[a,s,JSON.stringify(i)]),we.createElement(Zmt.Provider,{value:{client:l,bootstrap:(t=i?.bootstrap)!==null&&t!==void 0?t:(r=a?.config)===null||r===void 0?void 0:r.bootstrap}},n)}var qY=function(e){return typeof e=="function"},gne=function(e,t){return gne=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(r,n){r.__proto__=n}||function(r,n){for(var a in n)Object.prototype.hasOwnProperty.call(n,a)&&(r[a]=n[a])},gne(e,t)};function shn(e,t){if(typeof t!="function"&&t!==null)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");gne(e,t);function r(){this.constructor=e}e.prototype=t===null?Object.create(t):(r.prototype=t.prototype,new r)}var ihn={componentStack:null,exceptionEvent:null,error:null},ohn={INVALID_FALLBACK:"[PostHog.js][PostHogErrorBoundary] Invalid fallback prop, provide a valid React element or a function that returns a valid React element."};(function(e){shn(t,e);function t(r){var n=e.call(this,r)||this;return n.state=ihn,n}return t.prototype.componentDidCatch=function(r,n){var a=this.props.additionalProperties,s;qY(a)?s=a(r):typeof a=="object"&&(s=a);var i=this.context.client,o=i.captureException(r,s),l=n.componentStack;this.setState({error:r,componentStack:l,exceptionEvent:o})},t.prototype.render=function(){var r=this.props,n=r.children,a=r.fallback,s=this.state;if(s.componentStack==null)return qY(n)?n():n;var i=qY(a)?we.createElement(a,{error:s.error,componentStack:s.componentStack,exceptionEvent:s.exceptionEvent}):a;return we.isValidElement(i)?i:(console.warn(ohn.INVALID_FALLBACK),we.createElement(we.Fragment,null))},t.contextType=Zmt,t})(we.Component);function lhn({children:e}){return _.useEffect(()=>{if("brave"in navigator){console.info("[Analytics]: Telemetry is disabled for browser constraints.");return}if(window.MASTRA_TELEMETRY_DISABLED){console.info("[Analytics]: Telemetry is disabled.");return}Km.init("phc_SBLpZVAB6jmHOct9CABq3PF0Yn5FU3G2FgT4xUr2XrT",{api_host:"https://us.posthog.com"}),Km.register({mastraSource:"playground"})},[]),p.jsx(ahn,{client:Km,children:e})}function chn(){return p.jsxs(Fs,{children:[p.jsx(Ka,{children:p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(m4e,{})}),"Request Context"]})}),p.jsx(sd,{children:p.jsx(fon,{children:p.jsx(pon,{})})})]})}const uhn=()=>{const{data:e=[],isLoading:t}=rR(),r=!t&&e.length===0;return p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(Og,{})}),"MCP Servers"]}),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/tools-mcp/mcp-overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"MCP documentation"]})})]}),p.jsx(sd,{isCentered:r,children:p.jsx(vun,{mcpServers:e,isLoading:t})})]})},dhn=()=>{const{data:e}=rR(),{serverId:t,toolId:r}=id(),{data:n,isLoading:a}=Tht(t,r),s=e?.find(l=>l.id===t),i=n?.name,o=s?.name||"";return a||!n?null:p.jsxs("div",{className:"h-full w-full bg-surface2 overflow-y-hidden",children:[p.jsxs(Ka,{children:[p.jsxs(np,{children:[p.jsxs(Wa,{as:en,to:"/mcps",children:[p.jsx(qe,{children:p.jsx(Og,{})}),"MCP Servers"]}),p.jsx(Wa,{as:en,to:`/mcps/${t}`,children:o}),p.jsx(Wa,{as:"span",to:"",isCurrent:!0,children:i})]}),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/tools-mcp/mcp-overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"MCP documentation"]})})]}),p.jsx(Eun,{toolId:r,serverId:t})]})},phn=()=>{const{serverId:e}=id(),{data:t=[],isLoading:r}=rR(),n=t.find(a=>a.id===e);return p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[p.jsxs(np,{children:[p.jsxs(Wa,{as:en,to:"/mcps",children:[p.jsx(qe,{children:p.jsx(Og,{})}),"MCP Servers"]}),p.jsx(Wa,{as:"span",to:"",isCurrent:!0,children:p.jsx(Cun,{value:e,variant:"ghost"})})]}),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/tools-mcp/mcp-overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"MCP documentation"]})})]}),p.jsx(Oun,{isLoading:r,server:n})]})},fhn=_.forwardRef(({children:e,href:t,...r},n)=>p.jsx(en,{ref:n,to:t,viewTransition:!0,...r,children:e}));function hhn(){const{data:e={},isLoading:t}=y_();return p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(zM,{})}),"Scorers"]}),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/evals/overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"Scorers documentation"]})})]}),p.jsx(sd,{isCentered:!t&&Object.keys(e||{}).length===0,children:p.jsx(zon,{isLoading:t,scorers:e})})]})}function mhn(){const{scorerId:e}=id(),[t,r]=mO(),[n,a]=_.useState(),[s,i]=_.useState(0),[o,l]=_.useState(!1),[c,u]=_.useState({value:"all",label:"All",type:"ALL"}),{scorer:d,isLoading:f,error:h}=jon(e),{data:g={},isLoading:y,error:b}=Vg(),{data:w,isLoading:x,error:S}=m_(),{data:E,isLoading:C,error:k}=Mon({scorerId:e,page:s,entityId:c?.value==="all"?void 0:c?.value,entityType:c?.type==="ALL"?void 0:c?.type}),A=d?.agentIds?.filter(M=>g[M]).map(M=>({value:M,label:g[M].name,type:"AGENT"}))||[],D=d?.workflowIds?.map(M=>({value:M,label:M,type:"WORKFLOW"}))||[],N=[{value:"all",label:"All",type:"ALL"},...A,...D];if(_.useEffect(()=>{if(N){const M=t.get("entity"),W=N.find(q=>q.value===M);W&&W.value!==c?.value&&u(W)}},[t,c,N]),_.useEffect(()=>{if(h){const M=h instanceof Error?h.message:"Failed to load scorer";fr.error(`Error loading scorer: ${M}`)}},[h]),_.useEffect(()=>{if(b){const M=b instanceof Error?b.message:"Failed to load agents";fr.error(`Error loading agents: ${M}`)}},[b]),_.useEffect(()=>{if(S){const M=S instanceof Error?S.message:"Failed to load workflows";fr.error(`Error loading workflows: ${M}`)}},[S]),f||h||b||S)return null;const P=d?.agentIds?.map(M=>({name:M,id:Object.entries(g).find(([W,q])=>q.name===M)?.[0]}))||[],j=d?.workflowIds?.map(M=>({name:M,id:Object.entries(w||{}).find(([W,q])=>q.name===M)?.[0]}))||[],U=[{key:"entities",label:"Entities",value:([...P.map(M=>({id:M.id,name:M.name,type:"AGENT"})),...j.map(M=>({id:M.id,name:M.name,type:"WORKFLOW"}))]||[]).map(M=>({id:M.id,name:M.name||M.id,path:`${M.type==="AGENT"?"/agents":"/workflows"}/${M.name}`}))}],$=M=>{M?.value&&r({entity:M?.value})},F=E?.scores||[],V=E?.pagination,H=M=>{a(M),l(!0)},B=Gpe({entries:F,id:n,update:a}),Q=Qpe({entries:F,id:n,update:a});return p.jsxs(p.Fragment,{children:[p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[p.jsxs(np,{children:[p.jsxs(Wa,{as:en,to:"/scorers",children:[p.jsx(qe,{children:p.jsx(zM,{})}),"Scorers"]}),p.jsx(Wa,{as:"span",to:"",isCurrent:!0,children:p.jsx(Lon,{value:e,variant:"ghost"})})]}),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/evals/overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"Scorers documentation"]})})]}),p.jsx("div",{className:ne("grid overflow-y-auto h-full"),children:p.jsxs("div",{className:ne("max-w-[100rem] w-full px-12 mx-auto grid content-start gap-8 h-full"),children:[p.jsx(IT,{title:d?.scorer?.config?.name||"loading",description:d?.scorer?.config?.description||"loading",icon:p.jsx(zM,{})}),p.jsx(N1,{data:U,LinkComponent:en,isLoading:y||x}),p.jsx($on,{selectedEntity:c,entityOptions:N,onEntityChange:$,onReset:()=>r({entity:"all"}),isLoading:C||y||x}),C?p.jsx("div",{className:"h-full w-full flex items-center justify-center",children:p.jsx(Qs,{})}):p.jsx(Son,{scores:F,selectedScoreId:n,pagination:{total:V?.total||0,hasMore:V?.hasMore||!1,perPage:V?.perPage||0,page:V?.page||0},onScoreClick:H,onPageChange:i,errorMsg:k?.message})]})})]}),p.jsx(Yft,{scorerName:d?.scorer?.config?.name,score:ghn(F.find(M=>M.id===n)),isOpen:o,onClose:()=>l(!1),onNext:B,onPrevious:Q,computeTraceLink:(M,W)=>`/observability?traceId=${M}${W?`&spanId=${W}`:""}`})]})}const ghn=e=>{if(e)return{...e,createdAt:new Date(e.createdAt),updatedAt:new Date(e.updatedAt)}},yhn=async({client:e,page:t,perPage:r,filters:n})=>(await e.listTraces({pagination:{page:t,perPage:r},filters:n})).spans||[],bhn=({filters:e})=>{const t=qt(),{inView:r,setRef:n}=Kpt(),a=LYe({queryKey:["traces",e],queryFn:({pageParam:s})=>yhn({client:t,page:s,perPage:25,filters:e}),initialPageParam:0,getNextPageParam:(s,i,o)=>{if(s?.length)return o+1},staleTime:0,gcTime:0,select:s=>s.pages.flatMap(i=>i),retry:!1,refetchInterval:3e3});return _.useEffect(()=>{r&&a.hasNextPage&&!a.isFetchingNextPage&&a.fetchNextPage()},[r,a.hasNextPage,a.isFetchingNextPage]),{...a,setEndOfListElement:n}},vhn=(e,t)=>{const r=qt();return Cn({queryKey:["trace",e],queryFn:async()=>{if(!e)throw new Error("Trace ID is required");return await r.getTrace(e)},enabled:!!e,refetchInterval:3e3,...t})};function xhn(){const e=qx(),[t,r]=mO(),[n,a]=_.useState(),[s,i]=_.useState({value:"all",label:"All",type:"all"}),[o,l]=_.useState(void 0),[c,u]=_.useState(void 0),[d,f]=_.useState(!1),{data:h={},isLoading:g}=Vg(),{data:y,isLoading:b}=m_(),{data:w={},isLoading:x}=y_(),{data:S,isLoading:E}=vhn(n,{enabled:!!n}),C=t.get("traceId"),k=t.get("spanId"),A=t.get("tab"),D=t.get("scoreId"),{data:N=[],isLoading:P,isFetchingNextPage:j,hasNextPage:z,setEndOfListElement:U,error:$,isError:F}=bhn({filters:{...s?.type!=="all"&&{entityId:s?.value,entityType:s?.type},...o&&{startedAt:{start:o}},...c&&{endedAt:{end:c}}}});_.useEffect(()=>{C&&(a(C),f(!0))},[C]);const V=(Object.entries(h)||[]).map(([K,ae])=>({value:ae.id,label:ae.name,type:iI.AGENT})),H=(Object.entries(y||{})||[]).map(([,K])=>({value:K.name,label:K.name,type:iI.WORKFLOW_RUN})),B=[{value:"all",label:"All",type:"all"},...V,...H];_.useEffect(()=>{if(B){const K=t.get("entity"),ae=B.find(le=>le.value===K);ae&&ae.value!==s?.value&&i(ae)}},[t,s,B]);const Q=()=>{a(void 0),r({entity:"all",traceId:""}),f(!1),l(void 0),u(void 0)},M=(K,ae)=>{if(ae==="from")return l(K);u(K)},W=K=>{K?.value&&r({entity:K?.value})},q=K=>{if(K===n)return a(void 0);a(K),f(!0)},I=F?fun($):void 0,Z=s?.value!=="all"||o||c,G=Gpe({entries:N.map(K=>({id:K.traceId})),id:n,update:a}),J=Qpe({entries:N.map(K=>({id:K.traceId})),id:n,update:a});return p.jsxs(p.Fragment,{children:[p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(jT,{})}),"Observability"]}),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/observability/tracing/overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"Observability documentation"]})})]}),p.jsx("div",{className:ne("grid overflow-y-auto h-full"),children:p.jsxs("div",{className:ne("max-w-[100rem] px-12 mx-auto grid content-start gap-8 h-full"),children:[p.jsx(IT,{title:"Observability",description:"Explore observability traces for your entities",icon:p.jsx(jT,{})}),p.jsx(qcn,{onEntityChange:W,onReset:Q,selectedEntity:s,entityOptions:B,onDateChange:M,selectedDateFrom:o,selectedDateTo:c,isLoading:P||g||b}),P?p.jsx(Wft,{columns:RM}):p.jsx(Zcn,{traces:N,selectedTraceId:n,onTraceClick:q,errorMsg:I?.error,setEndOfListElement:U,filtersApplied:!!Z,isFetchingNextPage:j,hasNextPage:z})]})})]}),p.jsx(Vcn,{traceSpans:S?.spans,traceId:n,initialSpanId:k||void 0,initialSpanTab:A==="scores"?"scores":"details",initialScoreId:D||void 0,traceDetails:N.find(K=>K.traceId===n),isOpen:d,onClose:()=>{e("/observability"),f(!1)},onNext:G,onPrevious:J,isLoadingSpans:E,computeTraceLink:(K,ae)=>`/observability?traceId=${K}${ae?`&spanId=${ae}`:""}`,scorers:w,isLoadingScorers:x})]})}function B3e(){const{workspaceId:e}=id(),[t,r]=mO(),n=qx(),[a,s]=_.useState(!1),[i,o]=_.useState(!1),[l,c]=_.useState(!1),[u,d]=_.useState(null),[f,h]=_.useState(null),[g,y]=_.useState(!1),b=t.get("path")||"/",w=t.get("file"),x=t.get("tab"),{data:S,error:E}=ydn(),C=S?.workspaces??[],k=e??C[0]?.id,{data:A,isLoading:D,error:N}=gdn(k),P=Nre(E)||Nre(N),j=k?C.find(ze=>ze.id===k):void 0,z=ze=>{const ft=new URLSearchParams(t);for(const[vt,yr]of Object.entries(ze))yr===null?ft.delete(vt):ft.set(vt,yr);r(ft)},U=ze=>{y(!1),n(`/workspaces/${ze}`)},$=ze=>{z({path:ze,file:null})},F=ze=>{z({file:ze})},V=ze=>{z({tab:ze})},H=b,B=w,{data:Q,isLoading:M,error:W,refetch:q}=bdn(H,{enabled:A?.isWorkspaceConfigured&&A?.capabilities?.hasFilesystem,workspaceId:k}),I=vdn(),Z=xdn(),G=wdn(),{data:J,isLoading:K}=Pht(B??"",{enabled:!!B,workspaceId:k}),{data:ae,isLoading:le,refetch:ce}=Sdn({workspaceId:k}),Te=_dn(),X=ddn(),se=pdn(),te=fdn(),ve=A?.isWorkspaceConfigured??!1,ue=A?.capabilities?.hasFilesystem??!1,ye=A?.capabilities?.hasSkills??!1,Ge=A?.capabilities?.canBM25??!1,Ae=A?.capabilities?.canVector??!1,ie=j?.safety?.readOnly??!1,de=ue&&!ie,fe=_.useCallback(ze=>{k&&X.mutate({...ze,workspaceId:k},{onSuccess:async ft=>{if(ft.success){c(!1);const{data:vt,error:yr}=await ce();if(yr||!vt){fr.success(`Skill "${ft.skillName}" installed successfully (${ft.filesWritten} files)`);return}vt.skills.some(Jt=>Jt.name===ft.skillName)?fr.success(`Skill "${ft.skillName}" installed successfully (${ft.filesWritten} files)`):(y(!0),fr.warning(`Skill "${ft.skillName}" installed to .agents/skills but not discovered. Add .agents/skills to your workspace skills paths.`))}else fr.error("Failed to install skill")},onError:ft=>{fr.error(`Failed to install skill: ${ft instanceof Error?ft.message:"Unknown error"}`)}})},[k,X,ce]),ke=_.useCallback(ze=>{k&&(h(ze),se.mutate({workspaceId:k,skillName:ze},{onSuccess:ft=>{if(h(null),ft.updated.length>0){const vt=ft.updated[0];vt.success?(fr.success(`Skill "${ze}" updated successfully (${vt.filesWritten} files)`),ce()):fr.error(`Failed to update skill: ${vt.error??"Unknown error"}`)}else fr.error("Failed to update skill: No update result returned")},onError:ft=>{h(null),fr.error(`Failed to update skill: ${ft instanceof Error?ft.message:"Unknown error"}`)}}))},[k,se,ce]),Ie=_.useCallback(ze=>{k&&(d(ze),te.mutate({workspaceId:k,skillName:ze},{onSuccess:ft=>{d(null),ft.success?(fr.success(`Skill "${ft.skillName}" removed successfully`),ce()):fr.error(`Failed to remove skill "${ft.skillName}"`)},onError:ft=>{d(null),fr.error(`Failed to remove skill: ${ft instanceof Error?ft.message:"Unknown error"}`)}}))},[k,te,ce]),pe=x==="files"&&ue?"files":x==="skills"&&ye?"skills":ue?"files":ye?"skills":"files",_e=ae?.skills??[],Be=ae?.isSkillsConfigured??!1,Ze=Q?.entries??[];return P?p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(Uy,{className:"h-4 w-4"})}),"Workspace"]}),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/workspace/overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"Documentation"]})})]}),p.jsx("div",{className:"grid overflow-y-auto h-full",children:p.jsxs("div",{className:"max-w-[100rem] px-[3rem] mx-auto grid content-start h-full w-full",children:[p.jsx(IT,{title:"Workspace",description:"Manage files, skills, and search your workspace",icon:p.jsx(Uy,{})}),p.jsxs("div",{className:"flex flex-col items-center justify-center py-16 text-center",children:[p.jsx("div",{className:"flex items-center justify-center w-16 h-16 rounded-full bg-amber-500/10 mb-6",children:p.jsx(K0t,{className:"h-8 w-8 text-amber-500"})}),p.jsx("h2",{className:"text-xl font-semibold text-icon6 mb-2",children:"Workspace Not Supported"}),p.jsxs("p",{className:"text-icon4 max-w-md mb-6",children:["The workspace feature requires a newer version of ",p.jsx("code",{className:"text-icon5",children:"@mastra/core"}),". Please upgrade your dependencies to enable workspace functionality."]}),p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/workspace/overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"Learn More"]})]})]})})]}):!D&&!ve?p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(Uy,{className:"h-4 w-4"})}),"Workspace"]}),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/workspace/overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"Documentation"]})})]}),p.jsx("div",{className:"grid overflow-y-auto h-full",children:p.jsxs("div",{className:"max-w-[100rem] px-[3rem] mx-auto grid content-start h-full w-full",children:[p.jsx(IT,{title:"Workspace",description:"Manage files, skills, and search your workspace",icon:p.jsx(Uy,{})}),p.jsx(Qun,{})]})})]}):p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(Uy,{className:"h-4 w-4"})}),"Workspace"]}),p.jsxs(ho,{children:[(ue||ye)&&p.jsxs(Ye,{variant:"light",onClick:()=>s(!a),children:[p.jsx(qe,{children:p.jsx(G0t,{className:"h-4 w-4"})}),"Search"]}),p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/workspace/overview",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"Documentation"]})]})]}),p.jsx("div",{className:"grid overflow-y-auto h-full",children:p.jsxs("div",{className:"max-w-[100rem] px-[3rem] mx-auto grid content-start gap-6 h-full w-full",children:[p.jsx(IT,{title:"Workspace",description:"Manage files, skills, and search your workspace",icon:p.jsx(Uy,{})}),C.length>1&&p.jsxs("div",{className:"relative",children:[p.jsxs("button",{onClick:()=>o(!i),className:"flex items-center gap-2 px-3 py-2 text-sm border border-border1 rounded-lg bg-surface2 hover:bg-surface3 transition-colors w-full max-w-md",children:[j?.source==="agent"?p.jsx(P$,{className:"h-4 w-4 text-accent1"}):p.jsx(a7,{className:"h-4 w-4 text-icon4"}),p.jsxs("span",{className:"flex-1 text-left truncate",children:[j?.name??"Select workspace",j?.source==="agent"&&j.agentName&&p.jsxs("span",{className:"text-icon4 ml-1",children:["(",j.agentName,")"]})]}),p.jsx(A0t,{className:`h-4 w-4 text-icon4 transition-transform ${i?"rotate-180":""}`})]}),i&&p.jsx("div",{className:"absolute z-50 mt-1 w-full max-w-md bg-surface2 border border-border1 rounded-lg shadow-lg overflow-hidden",children:C.map(ze=>p.jsxs("button",{onClick:()=>{U(ze.id),o(!1)},className:`flex items-center gap-3 px-3 py-2 w-full text-left hover:bg-surface3 transition-colors ${j?.id===ze.id?"bg-surface3":""}`,children:[ze.source==="agent"?p.jsx(P$,{className:"h-4 w-4 text-accent1 flex-shrink-0"}):p.jsx(a7,{className:"h-4 w-4 text-icon4 flex-shrink-0"}),p.jsxs("div",{className:"flex-1 min-w-0",children:[p.jsx("div",{className:"text-sm font-medium text-icon6 truncate",children:ze.name}),p.jsx("div",{className:"text-xs text-icon4 truncate",children:ze.source==="agent"?`Agent: ${ze.agentName}`:"Global workspace"})]}),p.jsxs("div",{className:"flex gap-1 flex-shrink-0",children:[ze.safety?.readOnly&&p.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-500/20 text-amber-400",children:"Read-only"}),ze.capabilities.hasFilesystem&&p.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-surface4 text-icon4",children:"FS"}),ze.capabilities.hasSandbox&&p.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-surface4 text-icon4",children:"Sandbox"}),ze.capabilities.hasSkills&&p.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-surface4 text-icon4",children:"Skills"})]})]},ze.id))})]}),C.length===1&&j&&p.jsxs("div",{className:"flex items-center gap-2 text-sm text-icon4",children:[j.source==="agent"?p.jsx(P$,{className:"h-4 w-4 text-accent1"}):p.jsx(a7,{className:"h-4 w-4"}),p.jsx("span",{children:j.name}),j.source==="agent"&&j.agentName&&p.jsxs("span",{className:"text-icon3",children:["(",j.agentName,")"]}),ie&&p.jsx("span",{className:"text-[10px] px-1.5 py-0.5 rounded bg-amber-500/20 text-amber-400",children:"Read-only"})]}),a&&p.jsxs("div",{className:"border border-border1 rounded-lg p-4 bg-surface2 space-y-4",children:[ue&&(Ge||Ae)&&p.jsxs("div",{children:[p.jsxs("h3",{className:"text-sm font-medium text-icon5 mb-3 flex items-center gap-2",children:[p.jsx(Eye,{className:"h-4 w-4"}),"Search Files"]}),p.jsx(Wun,{onSearch:ze=>G.mutate({...ze,workspaceId:k}),isSearching:G.isPending,searchResults:G.data,canBM25:Ge,canVector:Ae,onViewResult:ze=>F(ze)})]}),ye&&Be&&_e.length>0&&p.jsxs("div",{children:[p.jsxs("h3",{className:"text-sm font-medium text-icon5 mb-3 flex items-center gap-2",children:[p.jsx(UM,{className:"h-4 w-4"}),"Search Skills"]}),p.jsx(Yun,{onSearch:ze=>Te.mutate({...ze,workspaceId:k}),results:Te.data?.results??[],isSearching:Te.isPending})]})]}),p.jsxs("div",{className:"flex gap-2 border-b border-border1",children:[ue&&p.jsxs("button",{onClick:()=>V("files"),className:`flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors ${pe==="files"?"border-accent1 text-icon6":"border-transparent text-icon4 hover:text-icon5"}`,children:[p.jsx(Eye,{className:"h-4 w-4"}),"Files"]}),ye&&p.jsxs("button",{onClick:()=>V("skills"),className:`flex items-center gap-2 px-4 py-2 text-sm font-medium border-b-2 transition-colors ${pe==="skills"?"border-accent1 text-icon6":"border-transparent text-icon4 hover:text-icon5"}`,children:[p.jsx(UM,{className:"h-4 w-4"}),"Skills",Be&&_e.length>0&&p.jsx("span",{className:"text-xs px-1.5 py-0.5 rounded bg-surface4 text-icon4",children:_e.length})]})]}),p.jsxs("div",{className:"pb-8",children:[pe==="files"&&ue&&p.jsx("div",{className:"space-y-4",children:p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-4",children:[p.jsx(qun,{entries:Ze,currentPath:H,isLoading:M,error:W,onNavigate:$,onFileSelect:F,onRefresh:()=>q(),onCreateDirectory:ie?void 0:ze=>Z.mutate({path:ze,workspaceId:k}),onDelete:ie?void 0:ze=>I.mutate({path:ze,recursive:!0,force:!0,workspaceId:k})}),B&&p.jsx(Gun,{path:B,content:J?.content??"",isLoading:K,mimeType:J?.mimeType,onClose:()=>F(null)})]})}),pe==="skills"&&ye&&p.jsx(rdn,{skills:_e,isLoading:le,isSkillsConfigured:Be,hasUndiscoveredAgentSkills:g,basePath:k?`/workspaces/${k}/skills`:"/workspaces",onAddSkill:de?()=>c(!0):void 0,onUpdateSkill:de?ke:void 0,onRemoveSkill:de?Ie:void 0,updatingSkillName:f??void 0,removingSkillName:u??void 0}),!ue&&!ye&&p.jsx("div",{className:"py-12 text-center text-icon4",children:p.jsx("p",{children:"No workspace capabilities are configured."})})]})]})}),k&&de&&p.jsx(mdn,{open:l,onOpenChange:c,workspaceId:k,onInstall:fe,isInstalling:X.isPending,installedSkillNames:_e.map(ze=>ze.name)})]})}function whn(){const{skillName:e,workspaceId:t}=id(),[r]=mO(),n=e?decodeURIComponent(e):"",a=r.get("agentId"),s=a?decodeURIComponent(a):null,i=s?`/agents/${s}`:t?`/workspaces/${t}?tab=skills`:"/workspaces",[o,l]=_.useState(null),{data:c,isLoading:u,error:d}=Edn(n,{workspaceId:t}),{data:f}=Pht(c?.path?`${c.path}/SKILL.md`:"",{enabled:!!c?.path,workspaceId:t}),{data:h,isLoading:g}=Odn(n,o??"",{enabled:!!o,workspaceId:t}),y=b=>s?p.jsxs(np,{children:[p.jsxs(Wa,{as:en,to:i,children:[p.jsx(qe,{children:p.jsx(P$,{className:"h-4 w-4"})}),s]}),p.jsxs(Wa,{as:"span",to:"",isCurrent:!0,children:[p.jsx(qe,{children:p.jsx(UM,{className:"h-4 w-4"})}),b]})]}):p.jsxs(np,{children:[p.jsxs(Wa,{as:en,to:i,children:[p.jsx(qe,{children:p.jsx(Uy,{className:"h-4 w-4"})}),"Workspace"]}),p.jsxs(Wa,{as:en,to:i,children:[p.jsx(qe,{children:p.jsx(UM,{className:"h-4 w-4"})}),"Skills"]}),p.jsx(Wa,{as:"span",to:"",isCurrent:!0,children:b})]});return u?p.jsxs(Fs,{children:[p.jsx(Ka,{children:y("Loading...")}),p.jsx("div",{className:"grid place-items-center h-full",children:p.jsx("div",{className:"h-8 w-8 border-2 border-accent1 border-t-transparent rounded-full animate-spin"})})]}):d||!c?p.jsxs(Fs,{children:[p.jsx(Ka,{children:y("Error")}),p.jsx("div",{className:"grid place-items-center h-full",children:p.jsxs("div",{className:"text-center",children:[p.jsx("p",{className:"text-red-400 mb-2",children:"Failed to load skill"}),p.jsx("p",{className:"text-sm text-icon3",children:d?.message??"Skill not found"})]})})]}):p.jsxs(Fs,{children:[p.jsxs(Ka,{children:[y(n),p.jsx(ho,{children:p.jsxs(Ye,{as:en,to:"https://mastra.ai/en/docs/workspace/skills",target:"_blank",children:[p.jsx(qe,{children:p.jsx(Hi,{})}),"Documentation"]})})]}),p.jsx("div",{className:"grid overflow-y-auto overflow-x-hidden h-full",children:p.jsx("div",{className:"max-w-[100rem] px-[3rem] mx-auto py-8 h-full w-full overflow-x-hidden",children:p.jsx(idn,{skill:c,rawSkillMd:f?.content,onReferenceClick:l})})}),p.jsx(odn,{open:!!o,onOpenChange:b=>!b&&l(null),skillName:n,referencePath:o??"",content:h?.content,isLoading:g})]})}async function Gmt(){const e=await fetch("https://mastra.ai/api/templates.json");if(!e.ok)throw new Error(`Failed to fetch templates: ${e.statusText}`);const t=await e.json(),r=[{title:"Weather Agent",slug:"weather-agent",githubUrl:"https://github.com/mastra-ai/weather-agent",description:"Get weather information of any city.",longDescription:"One Agent, one Workflow and one Tool to bring you the weather in your city.",imageURL:"",tags:["Agent","Workflow","Tool"],useCase:"",supportedProviders:["openai","anthropic","google","groq"],agents:["weatherAgent"],tools:["weatherTool"],workflows:["weatherWorkflow"]},...t],n=Array.from(new Set(r.flatMap(s=>s.tags))),a=Array.from(new Set(r.flatMap(s=>s.supportedProviders)));return{templates:r,tags:n,providers:a}}async function Shn({repo:e,owner:t}){const r=await fetch(`https://api.github.com/repos/${t}/${e}`);if(!r.ok)throw new Error(`Failed to fetch template: ${r.statusText}`);const n=await r.json();if(!n.is_template)throw new Error("Repo is not a template, please update the repo settings to make it a template");return{title:n.name,slug:n.name,description:n.description??"",imageURL:"",tags:[],useCase:"",longDescription:n.description??"",githubUrl:n.html_url,supportedProviders:[]}}async function Ehn({repoOrSlug:e,owner:t}){const{templates:r}=await Gmt(),n=r.find(a=>a.slug===e);if(!n){if(e.startsWith("template-")){const s=r.find(i=>`template-${i.slug}`===e);if(s)return s}const a=await Shn({repo:e,owner:t});if(a)return a;throw new Error(`Template ${e} not found`)}return n}async function Ohn({repo:e,owner:t,branch:r}){const n=`https://raw.githubusercontent.com/${t}/${e}/${r}/.env.example`,a=await fetch(n);return a.ok?(await a.text()).split(`
|
|
619
|
-
`).reduce((o,l)=>{if(!l||l.startsWith("#"))return o;const[c,u]=l.split("=");return c&&(o[c]=u?.split("")?.every(d=>d==="*")?"":u?.replaceAll('"',"")),o},{}):{}}const _hn=()=>Cn({queryKey:["mastra-templates"],queryFn:Gmt}),khn=({repoOrSlug:e,owner:t})=>Cn({queryKey:["template-repo",e,t],queryFn:()=>Ehn({repoOrSlug:e,owner:t})}),Chn=({repo:e,owner:t,branch:r})=>Cn({queryKey:["template-repo-env-vars",e,t,r],queryFn:()=>Ohn({repo:e,owner:t,branch:r})}),Thn=()=>{const e=qt();return Cn({queryKey:["agent-builder-workflow"],queryFn:async()=>await e.getAgentBuilderAction("merge-template").details()})},Ahn=()=>{const e=qt();return Ya({mutationFn:async({runId:t})=>await e.getAgentBuilderAction("merge-template").createRun({runId:t})})},Dhn=()=>{const e=qt();return Ya({mutationFn:async({runId:t})=>await e.getAgentBuilderAction("merge-template").runById(t)})},z3e=(e,t,r)=>{let n={...t};if(!(n.payload?.workflowState?.steps&&Object.keys(n.payload.workflowState.steps).length>0)&&r?.allSteps&&(n.payload={...n.payload,workflowState:{...n.payload?.workflowState,steps:Object.keys(r.allSteps).reduce((s,i)=>(s[i]={id:i,description:r.allSteps[i].description,status:"pending"},s),{})}}),e.type==="start"||e.type==="workflow-start"){const s={};r?.allSteps&&Object.entries(r.allSteps).forEach(([o,l])=>{s[o]={id:l.id,description:l.description,status:"pending"}});const i=e.runId||e.payload?.runId;n={...n,runId:i,eventTimestamp:new Date().toISOString(),status:"running",phase:"initializing",payload:{workflowState:{status:"running",steps:s},currentStep:null}}}if(e.type==="step-start"||e.type==="workflow-step-start"){const s=e.payload.id;n={...n,phase:"processing",payload:{...n.payload,currentStep:{id:s,status:"running",startTime:new Date,...e.payload},workflowState:{...n.payload.workflowState,steps:{...n.payload.workflowState.steps,[s]:{...n.payload.workflowState.steps[s],status:"running",startTime:new Date,...e.payload}}}}}}if(e.type==="step-result"||e.type==="workflow-step-result"){const s=e.payload.id,i=e.payload.status,o=e.payload.error;n={...n,payload:{...n.payload,currentStep:{...n.payload.currentStep,status:e.payload.status,output:e.payload.output,error:e.payload.error,endTime:new Date},workflowState:{...n.payload.workflowState,steps:{...n.payload.workflowState.steps,[s]:{...n.payload.workflowState.steps[s],status:e.payload.status,output:e.payload.output,error:e.payload.error,endTime:new Date}}}}},i==="failed"&&o&&(n={...n,status:"failed",error:o,phase:"error",failedStep:{id:s,error:o,description:e.payload.description||s},payload:{...n.payload,workflowState:{...n.payload.workflowState,status:"failed"}},errorTimestamp:new Date})}return(e.type==="step-finish"||e.type==="workflow-step-finish")&&(n={...n,payload:{...n.payload,currentStep:null}}),(e.type==="finish"||e.type==="workflow-finish")&&(n.phase==="error"||n.status==="failed"?n={...n,completedAt:new Date}:n={...n,status:e.payload.status||"completed",phase:"completed",payload:{...n.payload,currentStep:null,workflowState:{...n.payload.workflowState,status:e.payload.status||"completed"}},completedAt:new Date}),e.type==="error"&&(n={...n,status:"failed",error:e.payload.error,phase:"error",payload:{...n.payload,workflowState:{...n.payload.workflowState,status:"failed"}},errorTimestamp:new Date}),{newState:n}},Ihn=(e,t)=>{try{localStorage.setItem(`template-install-${e}`,JSON.stringify({state:t,timestamp:Date.now()}))}catch(r){console.warn("Failed to save template state to localStorage:",r)}},Qmt=(e,t)=>{const[r,n]=_.useState({}),[a,s]=_.useState(!1);return{streamResult:r,isStreaming:a,processStream:async(o,l)=>{if(s(!0),n({}),!o)throw new Error("No stream returned");const c=o.getReader();let u={runId:l||t,eventTimestamp:new Date().toISOString(),phase:"running",payload:{workflowState:{steps:{}},currentStep:null}};try{for(;;){const{done:d,value:f}=await c.read();if(d)break;const{newState:h}=z3e(f,u,e);if(u=h,n(h),f.runId||l||t){const g=f.runId||l||t;Ihn(g,h)}}}catch(d){console.error("💥 [processStream] Error processing template installation stream:",d);const{newState:f}=z3e({type:"error",payload:{error:d instanceof Error?d.message:"Unknown error"}},u,e);n(f)}finally{s(!1),c.releaseLock()}}}},Nhn=e=>{const t=qt(),{streamResult:r,isStreaming:n,processStream:a}=Qmt(e);return{streamInstall:Ya({mutationFn:async({inputData:i,selectedModel:o,runId:l})=>{for(let u=1;u<=3;u++)try{const d=t.getAgentBuilderAction("merge-template"),f=new Jm;f.set("selectedModel",o);const h=await d.stream({inputData:i,requestContext:f},l);await a(h,l);return}catch(d){console.error(`💥 [streamInstall] Attempt ${u} failed:`,d);const f=d?.message?.includes("Failed to fetch")||d?.message?.includes("NetworkError")||d?.message?.includes("network error")||d?.message?.includes("fetch")||d?.code==="NETWORK_ERROR"||d?.name==="TypeError";if(console.warn(`Stream attempt ${u}/3 failed:`,d),f){const h=l?`Network error during template installation (likely hot reload). Please refresh the page to resume from where you left off using runId: ${l}`:"Network error during template installation (likely hot reload). Please try again.";throw console.error("🔌 Stream network error:",h),new Error(h)}throw console.error("❌ [streamInstall] Non-network error or max retries reached, throwing:",d),d}}}),streamResult:r,isStreaming:n}},Rhn=e=>{const t=qt(),{streamResult:r,isStreaming:n,processStream:a}=Qmt(e);return{observeInstall:Ya({mutationFn:async({runId:i})=>{for(let c=1;c<=3;c++)try{const d=await t.getAgentBuilderAction("merge-template").observeStream({runId:i});await a(d,i);return}catch(u){console.error(`💥 [observeInstall] Attempt ${c} failed:`,u);const d=u?.message?.includes("Failed to fetch")||u?.message?.includes("NetworkError")||u?.message?.includes("network error")||u?.message?.includes("fetch")||u?.code==="NETWORK_ERROR"||u?.name==="TypeError";if(console.warn(`ObserveStream attempt ${c}/3 failed:`,u),d&&c<3){console.log(`🔄 ObserveStream network error detected (likely hot reload), retrying in 2000ms... (attempt ${c+1}/3)`),await new Promise(f=>setTimeout(f,2e3));continue}throw console.error("❌ [observeInstall] Non-network error or max retries reached, throwing:",u),u}}}),streamResult:r,isStreaming:n}};function Phn(){const{data:e,isLoading:t}=_hn(),{templates:r,tags:n,providers:a}=e??{templates:[],tags:[],providers:[]},[s,i]=_.useState("all"),[o,l]=_.useState("all"),[c,u]=_.useState(""),d=[{value:"all",label:"All"}];(n||[]).forEach(x=>{d.push({value:x,label:x})});const f=[{value:"all",label:"All"}];(a||[]).forEach(x=>{f.push({value:x,label:x})});const h=(x,S)=>{S==="tag"?i(x):S==="provider"&&l(x)},g=x=>{u(x)},y=()=>{i("all"),l("all"),u("")},b=r.filter(x=>!(c&&!x.title.toLowerCase().includes(c)&&!x.description.toLowerCase().includes(c)||s!=="all"&&!x.tags.includes(s)||o!=="all"&&!x.supportedProviders.includes(o))),w=c||s!=="all"||o!=="all";return p.jsxs(Fs,{children:[p.jsx(Ka,{children:p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(Cne,{})}),"Templates"]})}),p.jsxs("div",{className:ne("overflow-y-auto w-full h-full px-8 pb-12 z-10"),children:[p.jsx(hcn,{selectedTag:s,onTagChange:x=>h(x,"tag"),tagOptions:d,selectedProvider:o,onProviderChange:x=>h(x,"provider"),providerOptions:f,searchTerm:c,onSearchChange:g,onReset:w?y:void 0,className:"max-w-[80rem]",isLoading:t}),p.jsx(gcn,{templates:b,linkComponent:en,className:"max-w-[80rem] mx-auto",isLoading:t})]})]})}const $hn="1.2.0-alpha.1";function Mhn(){const{templateSlug:e}=id(),[t,r]=mO(),[n,a]=_.useState(""),[s,i]=_.useState(""),[o,l]=_.useState(""),[c,u]=_.useState({}),[d,f]=_.useState([]),[h,g]=_.useState(null),[y,b]=_.useState(!1),[w,x]=_.useState(""),[S,E]=_.useState(!1),[C,k]=_.useState(!1),[A,D]=_.useState([]),{data:N,isLoading:P}=khn({repoOrSlug:e,owner:"mastra-ai"}),z=$hn?.includes("beta")??!1?"beta":"main",{data:U,isLoading:$}=Chn({repo:N?.githubUrl?new URL(N.githubUrl).pathname.split("/")[2]:`template-${e}`,owner:"mastra-ai",branch:z}),{data:F,isLoading:V}=Thn(),{mutateAsync:H,isPending:B}=Ahn(),{mutateAsync:Q,isPending:M}=Dhn(),{streamInstall:W,streamResult:q,isStreaming:I}=Nhn(F),{observeInstall:Z,streamResult:G,isStreaming:J}=Rhn(F);_.useEffect(()=>{const te=t.get("runId");te&&!y&&!h&&!I&&!J&&(console.log("🔄 Checking completed run after hot reload:",{runId:te}),x(te),Q({runId:te}).then(ve=>{const ue=ve.snapshot;if(ue?.status==="success"&&ue?.result?.success)b(!0);else if(ue?.result?.success===!1)if(ue?.result?.validationResults&&!ue?.result?.validationResults?.valid&&ue?.result?.validationResults?.remainingErrors>0){const{remainingErrors:Ge,errors:Ae}=ue.result.validationResults,ie=`Template installation completed but ${Ge} validation issue${Ge>1?"s":""} remain unresolved.`;g(ie),D(Ae||[])}else g(ue?.result?.message||ue?.result?.error||"Template installation failed")}).catch(ve=>{console.error("❌ Failed to fetch run details:",ve),g("Failed to retrieve installation status after reload")}))},[t,y,h,I,J,Q]),_.useEffect(()=>{const te=t.get("runId"),ve=t.get("resume"),ue=t.get("provider");if(te&&ve==="true"&&ue&&!I&&!J&&!S&&!C&&F){x(te),E(!0);try{Q({runId:te}).then(ye=>{if(ye.snapshot?.status==="running")return Z.mutateAsync({runId:te})}).then(()=>{r(ye=>{const Ge=new URLSearchParams(ye);return Ge.delete("resume"),Ge})}).catch(ye=>{console.error("❌ Failed to resume template installation:",ye),ye.message?.includes("404")||ye.message?.includes("not found")?g("Template installation run not found. It may have expired or been completed."):g("Failed to resume template installation. Please try again.")})}catch(ye){console.error("❌ Auto-resume failed with error:",ye),g("Failed to resume template installation. Please refresh and try again.")}}},[t,e,I,J,S,C,F,Q,Z,r]);const K=[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"groq",label:"Groq"},{value:"google",label:"Google"}],ae=[{key:"tools",label:"Tools",value:N?.tools?.length?N.tools.map(te=>te).join(", "):"n/a",icon:p.jsx(Wc,{})},{key:"agents",label:"Agents",value:N?.agents?.length?N.agents.map(te=>te).join(", "):"n/a",icon:p.jsx(No,{})},{key:"workflows",label:"Workflows",value:N?.workflows?.length?N.workflows.map(te=>te).join(", "):"n/a",icon:p.jsx(txt,{})},{key:"providers",label:"Providers",value:N?.supportedProviders?.length?N.supportedProviders.join(", "):"n/a",icon:p.jsx(C0t,{})},{key:"tags",label:"Tags",value:N?.tags?.length?N.tags.join(", "):"n/a",icon:p.jsx(X0t,{})}],le=[{...ae[0]},{...ae[1]},{...ae[2]}].filter(te=>te.value!=="n/a");_.useEffect(()=>{U&&u(U)},[U]),_.useEffect(()=>{const te=q||G;te?.phase==="error"&&te?.error&&g(te.error)},[q?.phase,q?.error,G?.phase,G?.error]);const ce=te=>{a(te)},Te=async te=>(i(te.provider),l(te.modelId),{message:"Model updated successfully"}),X=async()=>{const te=Object.entries(c).reduce((ve,[ue,ye])=>(ye===""&&ve.push(ue),ve),[]);if(te.length>0){f(te);return}if(N){g(null),b(!1),x(""),k(!0);try{const ue={repo:N.githubUrl||`https://github.com/mastra-ai/template-${N.slug}`,ref:z,slug:N.slug,variables:c},{runId:ye}=await H({});x(ye),r(Ge=>{const Ae=new URLSearchParams(Ge);return Ae.set("runId",ye),Ae.set("resume","true"),Ae.set("provider",n||"openai"),Ae}),await W.mutateAsync({inputData:ue,selectedModel:{provider:s,modelId:o},runId:ye})}catch(ve){k(!1),g(ve?.message||"Template installation failed"),console.error("Template installation failed",ve)}}},se=te=>{const{name:ve,value:ue}=te.target;ue.trim()===""?f(ye=>[...ye,ve]):f(ye=>ye.filter(Ge=>Ge!==ve)),u(ye=>({...ye,[ve]:ue}))};return p.jsxs(Fs,{children:[p.jsx(Ka,{children:p.jsxs(np,{children:[p.jsxs(Wa,{as:en,to:"/templates",children:[p.jsx(qe,{children:p.jsx(Cne,{})}),"Templates"]}),p.jsx(Wa,{as:en,to:`/templates/${N?.slug}`,isCurrent:!0,children:N?.title&&N.title})]})}),p.jsx("div",{className:ne("w-full lg:px-12 h-full overflow-y-scroll"),children:p.jsxs("div",{className:"p-6 w-full max-w-[80rem] mx-auto grid gap-y-4",children:[p.jsx(ycn,{isLoading:P,title:N?.title,description:N?.longDescription,imageURL:N?.imageURL,githubUrl:N?.githubUrl,infoData:ae,templateSlug:e}),N&&p.jsxs(p.Fragment,{children:[(I||J)&&p.jsx(Ecn,{name:N.title,streamResult:J?G:q,runId:w,workflowInfo:F}),y&&p.jsx(Ocn,{name:N.title,installedEntities:le,linkComponent:en}),h&&p.jsx(_cn,{errorMsg:h,validationErrors:A.length>0?A:q?.validationResults?.errors||G?.validationResults?.errors}),!I&&!J&&!y&&!h&&p.jsx(bcn,{providerOptions:K,selectedProvider:n,onProviderChange:ce,variables:c,setVariables:u,errors:d,setErrors:f,handleInstallTemplate:X,handleVariableChange:se,isLoadingEnvVars:$||V,isInstalling:B,defaultModelProvider:s,defaultModelId:o,onModelUpdate:Te})]})]})})]})}const jhn=()=>{const{baseUrl:e,headers:t}=efe();return p.jsxs(Fs,{children:[p.jsx(Ka,{children:p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(Tpe,{})}),"Settings"]})}),p.jsx(sd,{children:p.jsx("div",{className:"p-5",children:p.jsx("div",{className:"max-w-2xl p-5 w-full bg-surface3 border border-border1 rounded-lg",children:p.jsx(Dht,{initialConfig:{baseUrl:e,headers:t}})})})})]})},Lhn={agentLink:e=>`/agents/${e}`,agentToolLink:(e,t)=>`/agents/${e}/tools/${t}`,agentSkillLink:(e,t,r)=>r?`/workspaces/${r}/skills/${t}?agentId=${encodeURIComponent(e)}`:"/workspaces",agentsLink:()=>"/agents",agentNewThreadLink:e=>`/agents/${e}/chat/${Eo()}?new=true`,agentThreadLink:(e,t,r)=>r?`/agents/${e}/chat/${t}?messageId=${r}`:`/agents/${e}/chat/${t}`,workflowsLink:()=>"/workflows",workflowLink:e=>`/workflows/${e}`,networkLink:e=>`/networks/v-next/${e}/chat`,networkNewThreadLink:e=>`/networks/v-next/${e}/chat/${Eo()}`,networkThreadLink:(e,t)=>`/networks/v-next/${e}/chat/${t}`,scorerLink:e=>`/scorers/${e}`,toolLink:e=>`/tools/${e}`,skillLink:(e,t)=>t?`/workspaces/${t}/skills/${e}`:"/workspaces",workspaceLink:e=>e?`/workspaces/${e}`:"/workspaces",workspaceSkillLink:(e,t)=>t?`/workspaces/${t}/skills/${e}`:"/workspaces",workspacesLink:()=>"/workspaces",processorsLink:()=>"/processors",processorLink:e=>`/processors/${e}`,mcpServerLink:e=>`/mcps/${e}`,mcpServerToolLink:(e,t)=>`/mcps/${e}/tools/${t}`,workflowRunLink:(e,t)=>`/workflows/${e}/graph/${t}`},Fhn=()=>{const e=qx(),t=r=>e(r,{viewTransition:!0});return p.jsx(ean,{Link:fhn,navigate:t,paths:Lhn,children:p.jsx(Rdn,{children:p.jsx(WY,{})})})},Bhn=!!window.MASTRA_CLOUD_API_ENDPOINT,zhn=[{element:p.jsx(Fhn,{}),children:[...Bhn?[]:[{path:"/settings",element:p.jsx(jhn,{})},{path:"/templates",element:p.jsx(Phn,{})},{path:"/templates/:templateSlug",element:p.jsx(Mhn,{})}],{path:"/scorers",element:p.jsx(hhn,{})},{path:"/scorers/:scorerId",element:p.jsx(mhn,{})},{path:"/observability",element:p.jsx(xhn,{})},{path:"/agents",element:p.jsx(Fdn,{})},{path:"/agents/:agentId/tools/:toolId",element:p.jsx(zdn,{})},{path:"/agents/:agentId",element:p.jsx($dn,{children:p.jsx(WY,{})}),children:[{index:!0,loader:({params:e})=>e7(`/agents/${e.agentId}/chat`)},{path:"chat",element:p.jsx(FMe,{})},{path:"chat/:threadId",element:p.jsx(FMe,{})}]},{path:"/tools",element:p.jsx(Mdn,{})},{path:"/tools/:toolId",element:p.jsx(Udn,{})},{path:"/processors",element:p.jsx(jdn,{})},{path:"/processors/:processorId",element:p.jsx(Ldn,{})},{path:"/mcps",element:p.jsx(uhn,{})},{path:"/mcps/:serverId",element:p.jsx(phn,{})},{path:"/mcps/:serverId/tools/:toolId",element:p.jsx(dhn,{})},{path:"/workspaces",element:p.jsx(B3e,{})},{path:"/workspaces/:workspaceId",element:p.jsx(B3e,{})},{path:"/workspaces/:workspaceId/skills/:skillName",element:p.jsx(whn,{})},{path:"/workflows",element:p.jsx(Vdn,{})},{path:"/workflows/:workflowId",element:p.jsx(Zdn,{children:p.jsx(WY,{})}),children:[{index:!0,loader:({params:e})=>e7(`/workflows/${e.workflowId}/graph`)},{path:"graph",element:p.jsx(BMe,{})},{path:"graph/:runId",element:p.jsx(BMe,{})}]},{index:!0,loader:()=>e7("/agents")},{path:"/request-context",element:p.jsx(chn,{})}]}];function Uhn(){const e=window.MASTRA_STUDIO_BASE_PATH||"",{baseUrl:t,headers:r,apiPrefix:n,isLoading:a}=efe();if(a)return null;if(!t)return p.jsx(Bun,{});const s=i0t(zhn,{basename:e});return p.jsx(osr,{baseUrl:t,headers:r,apiPrefix:n,children:p.jsx(lhn,{children:p.jsx(Nvt,{router:s})})})}function Vhn(){const e=window.MASTRA_SERVER_PROTOCOL||"http",t=window.MASTRA_SERVER_HOST||"localhost",r=window.MASTRA_SERVER_PORT||4111,n=window.MASTRA_API_PREFIX||"/api",s=window.MASTRA_CLOUD_API_ENDPOINT||""||`${e}://${t}:${r}`;return p.jsx(pun,{children:p.jsx(Dun,{endpoint:s,defaultApiPrefix:n,children:p.jsx(Uhn,{})})})}sbt.createRoot(document.getElementById("root")).render(p.jsx(_.StrictMode,{children:p.jsx(Vhn,{})}));const Cyn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{We as A,iZe as B,zze as C,Fze as D,cd as E,jqe as F,PVe as G,Bd as H,ms as I,uF as J,wyn as K,dx as L,IUr as M,Lze as N,Cyn as O,JL as _,BNt as a,rRt as b,Xhn as c,_ve as d,Qmn as e,KNt as f,ix as g,tRt as h,fx as i,a1 as j,s1 as k,n1 as l,CS as m,Cqt as n,UVe as o,Ja as p,zVt as q,Osr as r,eie as s,ee as t,UVt as u,Jie as v,ZNt as w,f3 as x,pc as y,bt as z};
|
|
619
|
+
`).reduce((o,l)=>{if(!l||l.startsWith("#"))return o;const[c,u]=l.split("=");return c&&(o[c]=u?.split("")?.every(d=>d==="*")?"":u?.replaceAll('"',"")),o},{}):{}}const _hn=()=>Cn({queryKey:["mastra-templates"],queryFn:Gmt}),khn=({repoOrSlug:e,owner:t})=>Cn({queryKey:["template-repo",e,t],queryFn:()=>Ehn({repoOrSlug:e,owner:t})}),Chn=({repo:e,owner:t,branch:r})=>Cn({queryKey:["template-repo-env-vars",e,t,r],queryFn:()=>Ohn({repo:e,owner:t,branch:r})}),Thn=()=>{const e=qt();return Cn({queryKey:["agent-builder-workflow"],queryFn:async()=>await e.getAgentBuilderAction("merge-template").details()})},Ahn=()=>{const e=qt();return Ya({mutationFn:async({runId:t})=>await e.getAgentBuilderAction("merge-template").createRun({runId:t})})},Dhn=()=>{const e=qt();return Ya({mutationFn:async({runId:t})=>await e.getAgentBuilderAction("merge-template").runById(t)})},z3e=(e,t,r)=>{let n={...t};if(!(n.payload?.workflowState?.steps&&Object.keys(n.payload.workflowState.steps).length>0)&&r?.allSteps&&(n.payload={...n.payload,workflowState:{...n.payload?.workflowState,steps:Object.keys(r.allSteps).reduce((s,i)=>(s[i]={id:i,description:r.allSteps[i].description,status:"pending"},s),{})}}),e.type==="start"||e.type==="workflow-start"){const s={};r?.allSteps&&Object.entries(r.allSteps).forEach(([o,l])=>{s[o]={id:l.id,description:l.description,status:"pending"}});const i=e.runId||e.payload?.runId;n={...n,runId:i,eventTimestamp:new Date().toISOString(),status:"running",phase:"initializing",payload:{workflowState:{status:"running",steps:s},currentStep:null}}}if(e.type==="step-start"||e.type==="workflow-step-start"){const s=e.payload.id;n={...n,phase:"processing",payload:{...n.payload,currentStep:{id:s,status:"running",startTime:new Date,...e.payload},workflowState:{...n.payload.workflowState,steps:{...n.payload.workflowState.steps,[s]:{...n.payload.workflowState.steps[s],status:"running",startTime:new Date,...e.payload}}}}}}if(e.type==="step-result"||e.type==="workflow-step-result"){const s=e.payload.id,i=e.payload.status,o=e.payload.error;n={...n,payload:{...n.payload,currentStep:{...n.payload.currentStep,status:e.payload.status,output:e.payload.output,error:e.payload.error,endTime:new Date},workflowState:{...n.payload.workflowState,steps:{...n.payload.workflowState.steps,[s]:{...n.payload.workflowState.steps[s],status:e.payload.status,output:e.payload.output,error:e.payload.error,endTime:new Date}}}}},i==="failed"&&o&&(n={...n,status:"failed",error:o,phase:"error",failedStep:{id:s,error:o,description:e.payload.description||s},payload:{...n.payload,workflowState:{...n.payload.workflowState,status:"failed"}},errorTimestamp:new Date})}return(e.type==="step-finish"||e.type==="workflow-step-finish")&&(n={...n,payload:{...n.payload,currentStep:null}}),(e.type==="finish"||e.type==="workflow-finish")&&(n.phase==="error"||n.status==="failed"?n={...n,completedAt:new Date}:n={...n,status:e.payload.status||"completed",phase:"completed",payload:{...n.payload,currentStep:null,workflowState:{...n.payload.workflowState,status:e.payload.status||"completed"}},completedAt:new Date}),e.type==="error"&&(n={...n,status:"failed",error:e.payload.error,phase:"error",payload:{...n.payload,workflowState:{...n.payload.workflowState,status:"failed"}},errorTimestamp:new Date}),{newState:n}},Ihn=(e,t)=>{try{localStorage.setItem(`template-install-${e}`,JSON.stringify({state:t,timestamp:Date.now()}))}catch(r){console.warn("Failed to save template state to localStorage:",r)}},Qmt=(e,t)=>{const[r,n]=_.useState({}),[a,s]=_.useState(!1);return{streamResult:r,isStreaming:a,processStream:async(o,l)=>{if(s(!0),n({}),!o)throw new Error("No stream returned");const c=o.getReader();let u={runId:l||t,eventTimestamp:new Date().toISOString(),phase:"running",payload:{workflowState:{steps:{}},currentStep:null}};try{for(;;){const{done:d,value:f}=await c.read();if(d)break;const{newState:h}=z3e(f,u,e);if(u=h,n(h),f.runId||l||t){const g=f.runId||l||t;Ihn(g,h)}}}catch(d){console.error("💥 [processStream] Error processing template installation stream:",d);const{newState:f}=z3e({type:"error",payload:{error:d instanceof Error?d.message:"Unknown error"}},u,e);n(f)}finally{s(!1),c.releaseLock()}}}},Nhn=e=>{const t=qt(),{streamResult:r,isStreaming:n,processStream:a}=Qmt(e);return{streamInstall:Ya({mutationFn:async({inputData:i,selectedModel:o,runId:l})=>{for(let u=1;u<=3;u++)try{const d=t.getAgentBuilderAction("merge-template"),f=new Jm;f.set("selectedModel",o);const h=await d.stream({inputData:i,requestContext:f},l);await a(h,l);return}catch(d){console.error(`💥 [streamInstall] Attempt ${u} failed:`,d);const f=d?.message?.includes("Failed to fetch")||d?.message?.includes("NetworkError")||d?.message?.includes("network error")||d?.message?.includes("fetch")||d?.code==="NETWORK_ERROR"||d?.name==="TypeError";if(console.warn(`Stream attempt ${u}/3 failed:`,d),f){const h=l?`Network error during template installation (likely hot reload). Please refresh the page to resume from where you left off using runId: ${l}`:"Network error during template installation (likely hot reload). Please try again.";throw console.error("🔌 Stream network error:",h),new Error(h)}throw console.error("❌ [streamInstall] Non-network error or max retries reached, throwing:",d),d}}}),streamResult:r,isStreaming:n}},Rhn=e=>{const t=qt(),{streamResult:r,isStreaming:n,processStream:a}=Qmt(e);return{observeInstall:Ya({mutationFn:async({runId:i})=>{for(let c=1;c<=3;c++)try{const d=await t.getAgentBuilderAction("merge-template").observeStream({runId:i});await a(d,i);return}catch(u){console.error(`💥 [observeInstall] Attempt ${c} failed:`,u);const d=u?.message?.includes("Failed to fetch")||u?.message?.includes("NetworkError")||u?.message?.includes("network error")||u?.message?.includes("fetch")||u?.code==="NETWORK_ERROR"||u?.name==="TypeError";if(console.warn(`ObserveStream attempt ${c}/3 failed:`,u),d&&c<3){console.log(`🔄 ObserveStream network error detected (likely hot reload), retrying in 2000ms... (attempt ${c+1}/3)`),await new Promise(f=>setTimeout(f,2e3));continue}throw console.error("❌ [observeInstall] Non-network error or max retries reached, throwing:",u),u}}}),streamResult:r,isStreaming:n}};function Phn(){const{data:e,isLoading:t}=_hn(),{templates:r,tags:n,providers:a}=e??{templates:[],tags:[],providers:[]},[s,i]=_.useState("all"),[o,l]=_.useState("all"),[c,u]=_.useState(""),d=[{value:"all",label:"All"}];(n||[]).forEach(x=>{d.push({value:x,label:x})});const f=[{value:"all",label:"All"}];(a||[]).forEach(x=>{f.push({value:x,label:x})});const h=(x,S)=>{S==="tag"?i(x):S==="provider"&&l(x)},g=x=>{u(x)},y=()=>{i("all"),l("all"),u("")},b=r.filter(x=>!(c&&!x.title.toLowerCase().includes(c)&&!x.description.toLowerCase().includes(c)||s!=="all"&&!x.tags.includes(s)||o!=="all"&&!x.supportedProviders.includes(o))),w=c||s!=="all"||o!=="all";return p.jsxs(Fs,{children:[p.jsx(Ka,{children:p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(Cne,{})}),"Templates"]})}),p.jsxs("div",{className:ne("overflow-y-auto w-full h-full px-8 pb-12 z-10"),children:[p.jsx(hcn,{selectedTag:s,onTagChange:x=>h(x,"tag"),tagOptions:d,selectedProvider:o,onProviderChange:x=>h(x,"provider"),providerOptions:f,searchTerm:c,onSearchChange:g,onReset:w?y:void 0,className:"max-w-[80rem]",isLoading:t}),p.jsx(gcn,{templates:b,linkComponent:en,className:"max-w-[80rem] mx-auto",isLoading:t})]})]})}const $hn="1.2.0";function Mhn(){const{templateSlug:e}=id(),[t,r]=mO(),[n,a]=_.useState(""),[s,i]=_.useState(""),[o,l]=_.useState(""),[c,u]=_.useState({}),[d,f]=_.useState([]),[h,g]=_.useState(null),[y,b]=_.useState(!1),[w,x]=_.useState(""),[S,E]=_.useState(!1),[C,k]=_.useState(!1),[A,D]=_.useState([]),{data:N,isLoading:P}=khn({repoOrSlug:e,owner:"mastra-ai"}),z=$hn?.includes("beta")??!1?"beta":"main",{data:U,isLoading:$}=Chn({repo:N?.githubUrl?new URL(N.githubUrl).pathname.split("/")[2]:`template-${e}`,owner:"mastra-ai",branch:z}),{data:F,isLoading:V}=Thn(),{mutateAsync:H,isPending:B}=Ahn(),{mutateAsync:Q,isPending:M}=Dhn(),{streamInstall:W,streamResult:q,isStreaming:I}=Nhn(F),{observeInstall:Z,streamResult:G,isStreaming:J}=Rhn(F);_.useEffect(()=>{const te=t.get("runId");te&&!y&&!h&&!I&&!J&&(console.log("🔄 Checking completed run after hot reload:",{runId:te}),x(te),Q({runId:te}).then(ve=>{const ue=ve.snapshot;if(ue?.status==="success"&&ue?.result?.success)b(!0);else if(ue?.result?.success===!1)if(ue?.result?.validationResults&&!ue?.result?.validationResults?.valid&&ue?.result?.validationResults?.remainingErrors>0){const{remainingErrors:Ge,errors:Ae}=ue.result.validationResults,ie=`Template installation completed but ${Ge} validation issue${Ge>1?"s":""} remain unresolved.`;g(ie),D(Ae||[])}else g(ue?.result?.message||ue?.result?.error||"Template installation failed")}).catch(ve=>{console.error("❌ Failed to fetch run details:",ve),g("Failed to retrieve installation status after reload")}))},[t,y,h,I,J,Q]),_.useEffect(()=>{const te=t.get("runId"),ve=t.get("resume"),ue=t.get("provider");if(te&&ve==="true"&&ue&&!I&&!J&&!S&&!C&&F){x(te),E(!0);try{Q({runId:te}).then(ye=>{if(ye.snapshot?.status==="running")return Z.mutateAsync({runId:te})}).then(()=>{r(ye=>{const Ge=new URLSearchParams(ye);return Ge.delete("resume"),Ge})}).catch(ye=>{console.error("❌ Failed to resume template installation:",ye),ye.message?.includes("404")||ye.message?.includes("not found")?g("Template installation run not found. It may have expired or been completed."):g("Failed to resume template installation. Please try again.")})}catch(ye){console.error("❌ Auto-resume failed with error:",ye),g("Failed to resume template installation. Please refresh and try again.")}}},[t,e,I,J,S,C,F,Q,Z,r]);const K=[{value:"openai",label:"OpenAI"},{value:"anthropic",label:"Anthropic"},{value:"groq",label:"Groq"},{value:"google",label:"Google"}],ae=[{key:"tools",label:"Tools",value:N?.tools?.length?N.tools.map(te=>te).join(", "):"n/a",icon:p.jsx(Wc,{})},{key:"agents",label:"Agents",value:N?.agents?.length?N.agents.map(te=>te).join(", "):"n/a",icon:p.jsx(No,{})},{key:"workflows",label:"Workflows",value:N?.workflows?.length?N.workflows.map(te=>te).join(", "):"n/a",icon:p.jsx(txt,{})},{key:"providers",label:"Providers",value:N?.supportedProviders?.length?N.supportedProviders.join(", "):"n/a",icon:p.jsx(C0t,{})},{key:"tags",label:"Tags",value:N?.tags?.length?N.tags.join(", "):"n/a",icon:p.jsx(X0t,{})}],le=[{...ae[0]},{...ae[1]},{...ae[2]}].filter(te=>te.value!=="n/a");_.useEffect(()=>{U&&u(U)},[U]),_.useEffect(()=>{const te=q||G;te?.phase==="error"&&te?.error&&g(te.error)},[q?.phase,q?.error,G?.phase,G?.error]);const ce=te=>{a(te)},Te=async te=>(i(te.provider),l(te.modelId),{message:"Model updated successfully"}),X=async()=>{const te=Object.entries(c).reduce((ve,[ue,ye])=>(ye===""&&ve.push(ue),ve),[]);if(te.length>0){f(te);return}if(N){g(null),b(!1),x(""),k(!0);try{const ue={repo:N.githubUrl||`https://github.com/mastra-ai/template-${N.slug}`,ref:z,slug:N.slug,variables:c},{runId:ye}=await H({});x(ye),r(Ge=>{const Ae=new URLSearchParams(Ge);return Ae.set("runId",ye),Ae.set("resume","true"),Ae.set("provider",n||"openai"),Ae}),await W.mutateAsync({inputData:ue,selectedModel:{provider:s,modelId:o},runId:ye})}catch(ve){k(!1),g(ve?.message||"Template installation failed"),console.error("Template installation failed",ve)}}},se=te=>{const{name:ve,value:ue}=te.target;ue.trim()===""?f(ye=>[...ye,ve]):f(ye=>ye.filter(Ge=>Ge!==ve)),u(ye=>({...ye,[ve]:ue}))};return p.jsxs(Fs,{children:[p.jsx(Ka,{children:p.jsxs(np,{children:[p.jsxs(Wa,{as:en,to:"/templates",children:[p.jsx(qe,{children:p.jsx(Cne,{})}),"Templates"]}),p.jsx(Wa,{as:en,to:`/templates/${N?.slug}`,isCurrent:!0,children:N?.title&&N.title})]})}),p.jsx("div",{className:ne("w-full lg:px-12 h-full overflow-y-scroll"),children:p.jsxs("div",{className:"p-6 w-full max-w-[80rem] mx-auto grid gap-y-4",children:[p.jsx(ycn,{isLoading:P,title:N?.title,description:N?.longDescription,imageURL:N?.imageURL,githubUrl:N?.githubUrl,infoData:ae,templateSlug:e}),N&&p.jsxs(p.Fragment,{children:[(I||J)&&p.jsx(Ecn,{name:N.title,streamResult:J?G:q,runId:w,workflowInfo:F}),y&&p.jsx(Ocn,{name:N.title,installedEntities:le,linkComponent:en}),h&&p.jsx(_cn,{errorMsg:h,validationErrors:A.length>0?A:q?.validationResults?.errors||G?.validationResults?.errors}),!I&&!J&&!y&&!h&&p.jsx(bcn,{providerOptions:K,selectedProvider:n,onProviderChange:ce,variables:c,setVariables:u,errors:d,setErrors:f,handleInstallTemplate:X,handleVariableChange:se,isLoadingEnvVars:$||V,isInstalling:B,defaultModelProvider:s,defaultModelId:o,onModelUpdate:Te})]})]})})]})}const jhn=()=>{const{baseUrl:e,headers:t}=efe();return p.jsxs(Fs,{children:[p.jsx(Ka,{children:p.jsxs(Yl,{children:[p.jsx(qe,{children:p.jsx(Tpe,{})}),"Settings"]})}),p.jsx(sd,{children:p.jsx("div",{className:"p-5",children:p.jsx("div",{className:"max-w-2xl p-5 w-full bg-surface3 border border-border1 rounded-lg",children:p.jsx(Dht,{initialConfig:{baseUrl:e,headers:t}})})})})]})},Lhn={agentLink:e=>`/agents/${e}`,agentToolLink:(e,t)=>`/agents/${e}/tools/${t}`,agentSkillLink:(e,t,r)=>r?`/workspaces/${r}/skills/${t}?agentId=${encodeURIComponent(e)}`:"/workspaces",agentsLink:()=>"/agents",agentNewThreadLink:e=>`/agents/${e}/chat/${Eo()}?new=true`,agentThreadLink:(e,t,r)=>r?`/agents/${e}/chat/${t}?messageId=${r}`:`/agents/${e}/chat/${t}`,workflowsLink:()=>"/workflows",workflowLink:e=>`/workflows/${e}`,networkLink:e=>`/networks/v-next/${e}/chat`,networkNewThreadLink:e=>`/networks/v-next/${e}/chat/${Eo()}`,networkThreadLink:(e,t)=>`/networks/v-next/${e}/chat/${t}`,scorerLink:e=>`/scorers/${e}`,toolLink:e=>`/tools/${e}`,skillLink:(e,t)=>t?`/workspaces/${t}/skills/${e}`:"/workspaces",workspaceLink:e=>e?`/workspaces/${e}`:"/workspaces",workspaceSkillLink:(e,t)=>t?`/workspaces/${t}/skills/${e}`:"/workspaces",workspacesLink:()=>"/workspaces",processorsLink:()=>"/processors",processorLink:e=>`/processors/${e}`,mcpServerLink:e=>`/mcps/${e}`,mcpServerToolLink:(e,t)=>`/mcps/${e}/tools/${t}`,workflowRunLink:(e,t)=>`/workflows/${e}/graph/${t}`},Fhn=()=>{const e=qx(),t=r=>e(r,{viewTransition:!0});return p.jsx(ean,{Link:fhn,navigate:t,paths:Lhn,children:p.jsx(Rdn,{children:p.jsx(WY,{})})})},Bhn=!!window.MASTRA_CLOUD_API_ENDPOINT,zhn=[{element:p.jsx(Fhn,{}),children:[...Bhn?[]:[{path:"/settings",element:p.jsx(jhn,{})},{path:"/templates",element:p.jsx(Phn,{})},{path:"/templates/:templateSlug",element:p.jsx(Mhn,{})}],{path:"/scorers",element:p.jsx(hhn,{})},{path:"/scorers/:scorerId",element:p.jsx(mhn,{})},{path:"/observability",element:p.jsx(xhn,{})},{path:"/agents",element:p.jsx(Fdn,{})},{path:"/agents/:agentId/tools/:toolId",element:p.jsx(zdn,{})},{path:"/agents/:agentId",element:p.jsx($dn,{children:p.jsx(WY,{})}),children:[{index:!0,loader:({params:e})=>e7(`/agents/${e.agentId}/chat`)},{path:"chat",element:p.jsx(FMe,{})},{path:"chat/:threadId",element:p.jsx(FMe,{})}]},{path:"/tools",element:p.jsx(Mdn,{})},{path:"/tools/:toolId",element:p.jsx(Udn,{})},{path:"/processors",element:p.jsx(jdn,{})},{path:"/processors/:processorId",element:p.jsx(Ldn,{})},{path:"/mcps",element:p.jsx(uhn,{})},{path:"/mcps/:serverId",element:p.jsx(phn,{})},{path:"/mcps/:serverId/tools/:toolId",element:p.jsx(dhn,{})},{path:"/workspaces",element:p.jsx(B3e,{})},{path:"/workspaces/:workspaceId",element:p.jsx(B3e,{})},{path:"/workspaces/:workspaceId/skills/:skillName",element:p.jsx(whn,{})},{path:"/workflows",element:p.jsx(Vdn,{})},{path:"/workflows/:workflowId",element:p.jsx(Zdn,{children:p.jsx(WY,{})}),children:[{index:!0,loader:({params:e})=>e7(`/workflows/${e.workflowId}/graph`)},{path:"graph",element:p.jsx(BMe,{})},{path:"graph/:runId",element:p.jsx(BMe,{})}]},{index:!0,loader:()=>e7("/agents")},{path:"/request-context",element:p.jsx(chn,{})}]}];function Uhn(){const e=window.MASTRA_STUDIO_BASE_PATH||"",{baseUrl:t,headers:r,apiPrefix:n,isLoading:a}=efe();if(a)return null;if(!t)return p.jsx(Bun,{});const s=i0t(zhn,{basename:e});return p.jsx(osr,{baseUrl:t,headers:r,apiPrefix:n,children:p.jsx(lhn,{children:p.jsx(Nvt,{router:s})})})}function Vhn(){const e=window.MASTRA_SERVER_PROTOCOL||"http",t=window.MASTRA_SERVER_HOST||"localhost",r=window.MASTRA_SERVER_PORT||4111,n=window.MASTRA_API_PREFIX||"/api",s=window.MASTRA_CLOUD_API_ENDPOINT||""||`${e}://${t}:${r}`;return p.jsx(pun,{children:p.jsx(Dun,{endpoint:s,defaultApiPrefix:n,children:p.jsx(Uhn,{})})})}sbt.createRoot(document.getElementById("root")).render(p.jsx(_.StrictMode,{children:p.jsx(Vhn,{})}));const Cyn=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));export{We as A,iZe as B,zze as C,Fze as D,cd as E,jqe as F,PVe as G,Bd as H,ms as I,uF as J,wyn as K,dx as L,IUr as M,Lze as N,Cyn as O,JL as _,BNt as a,rRt as b,Xhn as c,_ve as d,Qmn as e,KNt as f,ix as g,tRt as h,fx as i,a1 as j,s1 as k,n1 as l,CS as m,Cqt as n,UVe as o,Ja as p,zVt as q,Osr as r,eie as s,ee as t,UVt as u,Jie as v,ZNt as w,f3 as x,pc as y,bt as z};
|