@ainyc/canonry 1.10.0 → 1.10.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,243 @@
1
+ function ow(t,n){for(var a=0;a<n.length;a++){const l=n[a];if(typeof l!="string"&&!Array.isArray(l)){for(const o in l)if(o!=="default"&&!(o in t)){const c=Object.getOwnPropertyDescriptor(l,o);c&&Object.defineProperty(t,o,c.get?c:{enumerable:!0,get:()=>l[o]})}}}return Object.freeze(Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}))}(function(){const n=document.createElement("link").relList;if(n&&n.supports&&n.supports("modulepreload"))return;for(const o of document.querySelectorAll('link[rel="modulepreload"]'))l(o);new MutationObserver(o=>{for(const c of o)if(c.type==="childList")for(const f of c.addedNodes)f.tagName==="LINK"&&f.rel==="modulepreload"&&l(f)}).observe(document,{childList:!0,subtree:!0});function a(o){const c={};return o.integrity&&(c.integrity=o.integrity),o.referrerPolicy&&(c.referrerPolicy=o.referrerPolicy),o.crossOrigin==="use-credentials"?c.credentials="include":o.crossOrigin==="anonymous"?c.credentials="omit":c.credentials="same-origin",c}function l(o){if(o.ep)return;o.ep=!0;const c=a(o);fetch(o.href,c)}})();function rv(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var bd={exports:{}},yl={};var Ig;function cw(){if(Ig)return yl;Ig=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.fragment");function a(l,o,c){var f=null;if(c!==void 0&&(f=""+c),o.key!==void 0&&(f=""+o.key),"key"in o){c={};for(var m in o)m!=="key"&&(c[m]=o[m])}else c=o;return o=c.ref,{$$typeof:t,type:l,key:f,ref:o!==void 0?o:null,props:c}}return yl.Fragment=n,yl.jsx=a,yl.jsxs=a,yl}var Kg;function uw(){return Kg||(Kg=1,bd.exports=cw()),bd.exports}var u=uw(),xd={exports:{}},Se={};var Gg;function dw(){if(Gg)return Se;Gg=1;var t=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),a=Symbol.for("react.fragment"),l=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),c=Symbol.for("react.consumer"),f=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),p=Symbol.for("react.memo"),b=Symbol.for("react.lazy"),v=Symbol.for("react.activity"),x=Symbol.iterator;function j(C){return C===null||typeof C!="object"?null:(C=x&&C[x]||C["@@iterator"],typeof C=="function"?C:null)}var z={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,_={};function E(C,K,te){this.props=C,this.context=K,this.refs=_,this.updater=te||z}E.prototype.isReactComponent={},E.prototype.setState=function(C,K){if(typeof C!="object"&&typeof C!="function"&&C!=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,C,K,"setState")},E.prototype.forceUpdate=function(C){this.updater.enqueueForceUpdate(this,C,"forceUpdate")};function O(){}O.prototype=E.prototype;function T(C,K,te){this.props=C,this.context=K,this.refs=_,this.updater=te||z}var D=T.prototype=new O;D.constructor=T,w(D,E.prototype),D.isPureReactComponent=!0;var L=Array.isArray;function I(){}var G={H:null,A:null,T:null,S:null},M=Object.prototype.hasOwnProperty;function F(C,K,te){var ie=te.ref;return{$$typeof:t,type:C,key:K,ref:ie!==void 0?ie:null,props:te}}function xe(C,K){return F(C.type,K,C.props)}function X(C){return typeof C=="object"&&C!==null&&C.$$typeof===t}function le(C){var K={"=":"=0",":":"=2"};return"$"+C.replace(/[=:]/g,function(te){return K[te]})}var $e=/\/+/g;function Ke(C,K){return typeof C=="object"&&C!==null&&C.key!=null?le(""+C.key):K.toString(36)}function he(C){switch(C.status){case"fulfilled":return C.value;case"rejected":throw C.reason;default:switch(typeof C.status=="string"?C.then(I,I):(C.status="pending",C.then(function(K){C.status==="pending"&&(C.status="fulfilled",C.value=K)},function(K){C.status==="pending"&&(C.status="rejected",C.reason=K)})),C.status){case"fulfilled":return C.value;case"rejected":throw C.reason}}throw C}function U(C,K,te,ie,V){var re=typeof C;(re==="undefined"||re==="boolean")&&(C=null);var q=!1;if(C===null)q=!0;else switch(re){case"bigint":case"string":case"number":q=!0;break;case"object":switch(C.$$typeof){case t:case n:q=!0;break;case b:return q=C._init,U(q(C._payload),K,te,ie,V)}}if(q)return V=V(C),q=ie===""?"."+Ke(C,0):ie,L(V)?(te="",q!=null&&(te=q.replace($e,"$&/")+"/"),U(V,K,te,"",function(et){return et})):V!=null&&(X(V)&&(V=xe(V,te+(V.key==null||C&&C.key===V.key?"":(""+V.key).replace($e,"$&/")+"/")+q)),K.push(V)),1;q=0;var de=ie===""?".":ie+":";if(L(C))for(var me=0;me<C.length;me++)ie=C[me],re=de+Ke(ie,me),q+=U(ie,K,te,re,V);else if(me=j(C),typeof me=="function")for(C=me.call(C),me=0;!(ie=C.next()).done;)ie=ie.value,re=de+Ke(ie,me++),q+=U(ie,K,te,re,V);else if(re==="object"){if(typeof C.then=="function")return U(he(C),K,te,ie,V);throw K=String(C),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(C).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.")}return q}function W(C,K,te){if(C==null)return C;var ie=[],V=0;return U(C,ie,"","",function(re){return K.call(te,re,V++)}),ie}function se(C){if(C._status===-1){var K=C._result;K=K(),K.then(function(te){(C._status===0||C._status===-1)&&(C._status=1,C._result=te)},function(te){(C._status===0||C._status===-1)&&(C._status=2,C._result=te)}),C._status===-1&&(C._status=0,C._result=K)}if(C._status===1)return C._result.default;throw C._result}var ve=typeof reportError=="function"?reportError:function(C){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var K=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof C=="object"&&C!==null&&typeof C.message=="string"?String(C.message):String(C),error:C});if(!window.dispatchEvent(K))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",C);return}console.error(C)},ee={map:W,forEach:function(C,K,te){W(C,function(){K.apply(this,arguments)},te)},count:function(C){var K=0;return W(C,function(){K++}),K},toArray:function(C){return W(C,function(K){return K})||[]},only:function(C){if(!X(C))throw Error("React.Children.only expected to receive a single React element child.");return C}};return Se.Activity=v,Se.Children=ee,Se.Component=E,Se.Fragment=a,Se.Profiler=o,Se.PureComponent=T,Se.StrictMode=l,Se.Suspense=g,Se.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=G,Se.__COMPILER_RUNTIME={__proto__:null,c:function(C){return G.H.useMemoCache(C)}},Se.cache=function(C){return function(){return C.apply(null,arguments)}},Se.cacheSignal=function(){return null},Se.cloneElement=function(C,K,te){if(C==null)throw Error("The argument must be a React element, but you passed "+C+".");var ie=w({},C.props),V=C.key;if(K!=null)for(re in K.key!==void 0&&(V=""+K.key),K)!M.call(K,re)||re==="key"||re==="__self"||re==="__source"||re==="ref"&&K.ref===void 0||(ie[re]=K[re]);var re=arguments.length-2;if(re===1)ie.children=te;else if(1<re){for(var q=Array(re),de=0;de<re;de++)q[de]=arguments[de+2];ie.children=q}return F(C.type,V,ie)},Se.createContext=function(C){return C={$$typeof:f,_currentValue:C,_currentValue2:C,_threadCount:0,Provider:null,Consumer:null},C.Provider=C,C.Consumer={$$typeof:c,_context:C},C},Se.createElement=function(C,K,te){var ie,V={},re=null;if(K!=null)for(ie in K.key!==void 0&&(re=""+K.key),K)M.call(K,ie)&&ie!=="key"&&ie!=="__self"&&ie!=="__source"&&(V[ie]=K[ie]);var q=arguments.length-2;if(q===1)V.children=te;else if(1<q){for(var de=Array(q),me=0;me<q;me++)de[me]=arguments[me+2];V.children=de}if(C&&C.defaultProps)for(ie in q=C.defaultProps,q)V[ie]===void 0&&(V[ie]=q[ie]);return F(C,re,V)},Se.createRef=function(){return{current:null}},Se.forwardRef=function(C){return{$$typeof:m,render:C}},Se.isValidElement=X,Se.lazy=function(C){return{$$typeof:b,_payload:{_status:-1,_result:C},_init:se}},Se.memo=function(C,K){return{$$typeof:p,type:C,compare:K===void 0?null:K}},Se.startTransition=function(C){var K=G.T,te={};G.T=te;try{var ie=C(),V=G.S;V!==null&&V(te,ie),typeof ie=="object"&&ie!==null&&typeof ie.then=="function"&&ie.then(I,ve)}catch(re){ve(re)}finally{K!==null&&te.types!==null&&(K.types=te.types),G.T=K}},Se.unstable_useCacheRefresh=function(){return G.H.useCacheRefresh()},Se.use=function(C){return G.H.use(C)},Se.useActionState=function(C,K,te){return G.H.useActionState(C,K,te)},Se.useCallback=function(C,K){return G.H.useCallback(C,K)},Se.useContext=function(C){return G.H.useContext(C)},Se.useDebugValue=function(){},Se.useDeferredValue=function(C,K){return G.H.useDeferredValue(C,K)},Se.useEffect=function(C,K){return G.H.useEffect(C,K)},Se.useEffectEvent=function(C){return G.H.useEffectEvent(C)},Se.useId=function(){return G.H.useId()},Se.useImperativeHandle=function(C,K,te){return G.H.useImperativeHandle(C,K,te)},Se.useInsertionEffect=function(C,K){return G.H.useInsertionEffect(C,K)},Se.useLayoutEffect=function(C,K){return G.H.useLayoutEffect(C,K)},Se.useMemo=function(C,K){return G.H.useMemo(C,K)},Se.useOptimistic=function(C,K){return G.H.useOptimistic(C,K)},Se.useReducer=function(C,K,te){return G.H.useReducer(C,K,te)},Se.useRef=function(C){return G.H.useRef(C)},Se.useState=function(C){return G.H.useState(C)},Se.useSyncExternalStore=function(C,K,te){return G.H.useSyncExternalStore(C,K,te)},Se.useTransition=function(){return G.H.useTransition()},Se.version="19.2.4",Se}var Yg;function rf(){return Yg||(Yg=1,xd.exports=dw()),xd.exports}var N=rf();const fw=rv(N),of=ow({__proto__:null,default:fw},[N]);var Sd={exports:{}},vl={},wd={exports:{}},Nd={};var Vg;function hw(){return Vg||(Vg=1,(function(t){function n(U,W){var se=U.length;U.push(W);e:for(;0<se;){var ve=se-1>>>1,ee=U[ve];if(0<o(ee,W))U[ve]=W,U[se]=ee,se=ve;else break e}}function a(U){return U.length===0?null:U[0]}function l(U){if(U.length===0)return null;var W=U[0],se=U.pop();if(se!==W){U[0]=se;e:for(var ve=0,ee=U.length,C=ee>>>1;ve<C;){var K=2*(ve+1)-1,te=U[K],ie=K+1,V=U[ie];if(0>o(te,se))ie<ee&&0>o(V,te)?(U[ve]=V,U[ie]=se,ve=ie):(U[ve]=te,U[K]=se,ve=K);else if(ie<ee&&0>o(V,se))U[ve]=V,U[ie]=se,ve=ie;else break e}}return W}function o(U,W){var se=U.sortIndex-W.sortIndex;return se!==0?se:U.id-W.id}if(t.unstable_now=void 0,typeof performance=="object"&&typeof performance.now=="function"){var c=performance;t.unstable_now=function(){return c.now()}}else{var f=Date,m=f.now();t.unstable_now=function(){return f.now()-m}}var g=[],p=[],b=1,v=null,x=3,j=!1,z=!1,w=!1,_=!1,E=typeof setTimeout=="function"?setTimeout:null,O=typeof clearTimeout=="function"?clearTimeout:null,T=typeof setImmediate<"u"?setImmediate:null;function D(U){for(var W=a(p);W!==null;){if(W.callback===null)l(p);else if(W.startTime<=U)l(p),W.sortIndex=W.expirationTime,n(g,W);else break;W=a(p)}}function L(U){if(w=!1,D(U),!z)if(a(g)!==null)z=!0,I||(I=!0,le());else{var W=a(p);W!==null&&he(L,W.startTime-U)}}var I=!1,G=-1,M=5,F=-1;function xe(){return _?!0:!(t.unstable_now()-F<M)}function X(){if(_=!1,I){var U=t.unstable_now();F=U;var W=!0;try{e:{z=!1,w&&(w=!1,O(G),G=-1),j=!0;var se=x;try{t:{for(D(U),v=a(g);v!==null&&!(v.expirationTime>U&&xe());){var ve=v.callback;if(typeof ve=="function"){v.callback=null,x=v.priorityLevel;var ee=ve(v.expirationTime<=U);if(U=t.unstable_now(),typeof ee=="function"){v.callback=ee,D(U),W=!0;break t}v===a(g)&&l(g),D(U)}else l(g);v=a(g)}if(v!==null)W=!0;else{var C=a(p);C!==null&&he(L,C.startTime-U),W=!1}}break e}finally{v=null,x=se,j=!1}W=void 0}}finally{W?le():I=!1}}}var le;if(typeof T=="function")le=function(){T(X)};else if(typeof MessageChannel<"u"){var $e=new MessageChannel,Ke=$e.port2;$e.port1.onmessage=X,le=function(){Ke.postMessage(null)}}else le=function(){E(X,0)};function he(U,W){G=E(function(){U(t.unstable_now())},W)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(U){U.callback=null},t.unstable_forceFrameRate=function(U){0>U||125<U?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):M=0<U?Math.floor(1e3/U):5},t.unstable_getCurrentPriorityLevel=function(){return x},t.unstable_next=function(U){switch(x){case 1:case 2:case 3:var W=3;break;default:W=x}var se=x;x=W;try{return U()}finally{x=se}},t.unstable_requestPaint=function(){_=!0},t.unstable_runWithPriority=function(U,W){switch(U){case 1:case 2:case 3:case 4:case 5:break;default:U=3}var se=x;x=U;try{return W()}finally{x=se}},t.unstable_scheduleCallback=function(U,W,se){var ve=t.unstable_now();switch(typeof se=="object"&&se!==null?(se=se.delay,se=typeof se=="number"&&0<se?ve+se:ve):se=ve,U){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=se+ee,U={id:b++,callback:W,priorityLevel:U,startTime:se,expirationTime:ee,sortIndex:-1},se>ve?(U.sortIndex=se,n(p,U),a(g)===null&&U===a(p)&&(w?(O(G),G=-1):w=!0,he(L,se-ve))):(U.sortIndex=ee,n(g,U),z||j||(z=!0,I||(I=!0,le()))),U},t.unstable_shouldYield=xe,t.unstable_wrapCallback=function(U){var W=x;return function(){var se=x;x=W;try{return U.apply(this,arguments)}finally{x=se}}}})(Nd)),Nd}var Pg;function mw(){return Pg||(Pg=1,wd.exports=hw()),wd.exports}var jd={exports:{}},_t={};var Qg;function pw(){if(Qg)return _t;Qg=1;var t=rf();function n(g){var p="https://react.dev/errors/"+g;if(1<arguments.length){p+="?args[]="+encodeURIComponent(arguments[1]);for(var b=2;b<arguments.length;b++)p+="&args[]="+encodeURIComponent(arguments[b])}return"Minified React error #"+g+"; visit "+p+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function a(){}var l={d:{f:a,r:function(){throw Error(n(522))},D:a,C:a,L:a,m:a,X:a,S:a,M:a},p:0,findDOMNode:null},o=Symbol.for("react.portal");function c(g,p,b){var v=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:o,key:v==null?null:""+v,children:g,containerInfo:p,implementation:b}}var f=t.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE;function m(g,p){if(g==="font")return"";if(typeof p=="string")return p==="use-credentials"?p:""}return _t.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=l,_t.createPortal=function(g,p){var b=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!p||p.nodeType!==1&&p.nodeType!==9&&p.nodeType!==11)throw Error(n(299));return c(g,p,null,b)},_t.flushSync=function(g){var p=f.T,b=l.p;try{if(f.T=null,l.p=2,g)return g()}finally{f.T=p,l.p=b,l.d.f()}},_t.preconnect=function(g,p){typeof g=="string"&&(p?(p=p.crossOrigin,p=typeof p=="string"?p==="use-credentials"?p:"":void 0):p=null,l.d.C(g,p))},_t.prefetchDNS=function(g){typeof g=="string"&&l.d.D(g)},_t.preinit=function(g,p){if(typeof g=="string"&&p&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin),x=typeof p.integrity=="string"?p.integrity:void 0,j=typeof p.fetchPriority=="string"?p.fetchPriority:void 0;b==="style"?l.d.S(g,typeof p.precedence=="string"?p.precedence:void 0,{crossOrigin:v,integrity:x,fetchPriority:j}):b==="script"&&l.d.X(g,{crossOrigin:v,integrity:x,fetchPriority:j,nonce:typeof p.nonce=="string"?p.nonce:void 0})}},_t.preinitModule=function(g,p){if(typeof g=="string")if(typeof p=="object"&&p!==null){if(p.as==null||p.as==="script"){var b=m(p.as,p.crossOrigin);l.d.M(g,{crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0})}}else p==null&&l.d.M(g)},_t.preload=function(g,p){if(typeof g=="string"&&typeof p=="object"&&p!==null&&typeof p.as=="string"){var b=p.as,v=m(b,p.crossOrigin);l.d.L(g,b,{crossOrigin:v,integrity:typeof p.integrity=="string"?p.integrity:void 0,nonce:typeof p.nonce=="string"?p.nonce:void 0,type:typeof p.type=="string"?p.type:void 0,fetchPriority:typeof p.fetchPriority=="string"?p.fetchPriority:void 0,referrerPolicy:typeof p.referrerPolicy=="string"?p.referrerPolicy:void 0,imageSrcSet:typeof p.imageSrcSet=="string"?p.imageSrcSet:void 0,imageSizes:typeof p.imageSizes=="string"?p.imageSizes:void 0,media:typeof p.media=="string"?p.media:void 0})}},_t.preloadModule=function(g,p){if(typeof g=="string")if(p){var b=m(p.as,p.crossOrigin);l.d.m(g,{as:typeof p.as=="string"&&p.as!=="script"?p.as:void 0,crossOrigin:b,integrity:typeof p.integrity=="string"?p.integrity:void 0})}else l.d.m(g)},_t.requestFormReset=function(g){l.d.r(g)},_t.unstable_batchedUpdates=function(g,p){return g(p)},_t.useFormState=function(g,p,b){return f.H.useFormState(g,p,b)},_t.useFormStatus=function(){return f.H.useHostTransitionStatus()},_t.version="19.2.4",_t}var Xg;function ov(){if(Xg)return jd.exports;Xg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),jd.exports=pw(),jd.exports}var Jg;function gw(){if(Jg)return vl;Jg=1;var t=mw(),n=rf(),a=ov();function l(e){var i="https://react.dev/errors/"+e;if(1<arguments.length){i+="?args[]="+encodeURIComponent(arguments[1]);for(var s=2;s<arguments.length;s++)i+="&args[]="+encodeURIComponent(arguments[s])}return"Minified React error #"+e+"; visit "+i+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}function o(e){return!(!e||e.nodeType!==1&&e.nodeType!==9&&e.nodeType!==11)}function c(e){var i=e,s=e;if(e.alternate)for(;i.return;)i=i.return;else{e=i;do i=e,(i.flags&4098)!==0&&(s=i.return),e=i.return;while(e)}return i.tag===3?s:null}function f(e){if(e.tag===13){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function m(e){if(e.tag===31){var i=e.memoizedState;if(i===null&&(e=e.alternate,e!==null&&(i=e.memoizedState)),i!==null)return i.dehydrated}return null}function g(e){if(c(e)!==e)throw Error(l(188))}function p(e){var i=e.alternate;if(!i){if(i=c(e),i===null)throw Error(l(188));return i!==e?null:e}for(var s=e,r=i;;){var d=s.return;if(d===null)break;var h=d.alternate;if(h===null){if(r=d.return,r!==null){s=r;continue}break}if(d.child===h.child){for(h=d.child;h;){if(h===s)return g(d),e;if(h===r)return g(d),i;h=h.sibling}throw Error(l(188))}if(s.return!==r.return)s=d,r=h;else{for(var y=!1,S=d.child;S;){if(S===s){y=!0,s=d,r=h;break}if(S===r){y=!0,r=d,s=h;break}S=S.sibling}if(!y){for(S=h.child;S;){if(S===s){y=!0,s=h,r=d;break}if(S===r){y=!0,r=h,s=d;break}S=S.sibling}if(!y)throw Error(l(189))}}if(s.alternate!==r)throw Error(l(190))}if(s.tag!==3)throw Error(l(188));return s.stateNode.current===s?e:i}function b(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e;for(e=e.child;e!==null;){if(i=b(e),i!==null)return i;e=e.sibling}return null}var v=Object.assign,x=Symbol.for("react.element"),j=Symbol.for("react.transitional.element"),z=Symbol.for("react.portal"),w=Symbol.for("react.fragment"),_=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),O=Symbol.for("react.consumer"),T=Symbol.for("react.context"),D=Symbol.for("react.forward_ref"),L=Symbol.for("react.suspense"),I=Symbol.for("react.suspense_list"),G=Symbol.for("react.memo"),M=Symbol.for("react.lazy"),F=Symbol.for("react.activity"),xe=Symbol.for("react.memo_cache_sentinel"),X=Symbol.iterator;function le(e){return e===null||typeof e!="object"?null:(e=X&&e[X]||e["@@iterator"],typeof e=="function"?e:null)}var $e=Symbol.for("react.client.reference");function Ke(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===$e?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case w:return"Fragment";case E:return"Profiler";case _:return"StrictMode";case L:return"Suspense";case I:return"SuspenseList";case F:return"Activity"}if(typeof e=="object")switch(e.$$typeof){case z:return"Portal";case T:return e.displayName||"Context";case O:return(e._context.displayName||"Context")+".Consumer";case D:var i=e.render;return e=e.displayName,e||(e=i.displayName||i.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case G:return i=e.displayName||null,i!==null?i:Ke(e.type)||"Memo";case M:i=e._payload,e=e._init;try{return Ke(e(i))}catch{}}return null}var he=Array.isArray,U=n.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,W=a.__DOM_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,se={pending:!1,data:null,method:null,action:null},ve=[],ee=-1;function C(e){return{current:e}}function K(e){0>ee||(e.current=ve[ee],ve[ee]=null,ee--)}function te(e,i){ee++,ve[ee]=e.current,e.current=i}var ie=C(null),V=C(null),re=C(null),q=C(null);function de(e,i){switch(te(re,i),te(V,e),te(ie,null),i.nodeType){case 9:case 11:e=(e=i.documentElement)&&(e=e.namespaceURI)?fg(e):0;break;default:if(e=i.tagName,i=i.namespaceURI)i=fg(i),e=hg(i,e);else switch(e){case"svg":e=1;break;case"math":e=2;break;default:e=0}}K(ie),te(ie,e)}function me(){K(ie),K(V),K(re)}function et(e){e.memoizedState!==null&&te(q,e);var i=ie.current,s=hg(i,e.type);i!==s&&(te(V,e),te(ie,s))}function jt(e){V.current===e&&(K(ie),K(V)),q.current===e&&(K(q),hl._currentValue=se)}var Zt,Tn;function Tt(e){if(Zt===void 0)try{throw Error()}catch(s){var i=s.stack.trim().match(/\n( *(at )?)/);Zt=i&&i[1]||"",Tn=-1<s.stack.indexOf(`
2
+ at`)?" (<anonymous>)":-1<s.stack.indexOf("@")?"@unknown:0:0":""}return`
3
+ `+Zt+e+Tn}var ma=!1;function pa(e,i){if(!e||ma)return"";ma=!0;var s=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{var r={DetermineComponentFrameRoot:function(){try{if(i){var J=function(){throw Error()};if(Object.defineProperty(J.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(J,[])}catch(H){var Z=H}Reflect.construct(e,[],J)}else{try{J.call()}catch(H){Z=H}e.call(J.prototype)}}else{try{throw Error()}catch(H){Z=H}(J=e())&&typeof J.catch=="function"&&J.catch(function(){})}}catch(H){if(H&&Z&&typeof H.stack=="string")return[H.stack,Z.stack]}return[null,null]}};r.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var d=Object.getOwnPropertyDescriptor(r.DetermineComponentFrameRoot,"name");d&&d.configurable&&Object.defineProperty(r.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var h=r.DetermineComponentFrameRoot(),y=h[0],S=h[1];if(y&&S){var k=y.split(`
4
+ `),B=S.split(`
5
+ `);for(d=r=0;r<k.length&&!k[r].includes("DetermineComponentFrameRoot");)r++;for(;d<B.length&&!B[d].includes("DetermineComponentFrameRoot");)d++;if(r===k.length||d===B.length)for(r=k.length-1,d=B.length-1;1<=r&&0<=d&&k[r]!==B[d];)d--;for(;1<=r&&0<=d;r--,d--)if(k[r]!==B[d]){if(r!==1||d!==1)do if(r--,d--,0>d||k[r]!==B[d]){var Y=`
6
+ `+k[r].replace(" at new "," at ");return e.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",e.displayName)),Y}while(1<=r&&0<=d);break}}}finally{ma=!1,Error.prepareStackTrace=s}return(s=e?e.displayName||e.name:"")?Tt(s):""}function Ml(e,i){switch(e.tag){case 26:case 27:case 5:return Tt(e.type);case 16:return Tt("Lazy");case 13:return e.child!==i&&i!==null?Tt("Suspense Fallback"):Tt("Suspense");case 19:return Tt("SuspenseList");case 0:case 15:return pa(e.type,!1);case 11:return pa(e.type.render,!1);case 1:return pa(e.type,!0);case 31:return Tt("Activity");default:return""}}function js(e){try{var i="",s=null;do i+=Ml(e,s),s=e,e=e.return;while(e);return i}catch(r){return`
7
+ Error generating stack: `+r.message+`
8
+ `+r.stack}}var pn=Object.prototype.hasOwnProperty,Jt=t.unstable_scheduleCallback,On=t.unstable_cancelCallback,ic=t.unstable_shouldYield,ac=t.unstable_requestPaint,kt=t.unstable_now,sc=t.unstable_getCurrentPriorityLevel,Ll=t.unstable_ImmediatePriority,Ul=t.unstable_UserBlockingPriority,Ft=t.unstable_NormalPriority,lc=t.unstable_LowPriority,ae=t.unstable_IdlePriority,Dn=t.log,G0=t.unstable_setDisableYieldValue,_s=null,qt=null;function ni(e){if(typeof Dn=="function"&&G0(e),qt&&typeof qt.setStrictMode=="function")try{qt.setStrictMode(_s,e)}catch{}}var Ht=Math.clz32?Math.clz32:P0,Y0=Math.log,V0=Math.LN2;function P0(e){return e>>>=0,e===0?32:31-(Y0(e)/V0|0)|0}var $l=256,Bl=262144,Zl=4194304;function Zi(e){var i=e&42;if(i!==0)return i;switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:return 64;case 128:return 128;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:return e&261888;case 262144:case 524288:case 1048576:case 2097152:return e&3932160;case 4194304:case 8388608:case 16777216:case 33554432:return e&62914560;case 67108864:return 67108864;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 0;default:return e}}function ql(e,i,s){var r=e.pendingLanes;if(r===0)return 0;var d=0,h=e.suspendedLanes,y=e.pingedLanes;e=e.warmLanes;var S=r&134217727;return S!==0?(r=S&~h,r!==0?d=Zi(r):(y&=S,y!==0?d=Zi(y):s||(s=S&~e,s!==0&&(d=Zi(s))))):(S=r&~h,S!==0?d=Zi(S):y!==0?d=Zi(y):s||(s=r&~e,s!==0&&(d=Zi(s)))),d===0?0:i!==0&&i!==d&&(i&h)===0&&(h=d&-d,s=i&-i,h>=s||h===32&&(s&4194048)!==0)?i:d}function ks(e,i){return(e.pendingLanes&~(e.suspendedLanes&~e.pingedLanes)&i)===0}function Q0(e,i){switch(e){case 1:case 2:case 4:case 8:case 64:return i+250;case 16:case 32:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i+5e3;case 4194304:case 8388608:case 16777216:case 33554432:return-1;case 67108864:case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function Vf(){var e=Zl;return Zl<<=1,(Zl&62914560)===0&&(Zl=4194304),e}function rc(e){for(var i=[],s=0;31>s;s++)i.push(e);return i}function zs(e,i){e.pendingLanes|=i,i!==268435456&&(e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0)}function X0(e,i,s,r,d,h){var y=e.pendingLanes;e.pendingLanes=s,e.suspendedLanes=0,e.pingedLanes=0,e.warmLanes=0,e.expiredLanes&=s,e.entangledLanes&=s,e.errorRecoveryDisabledLanes&=s,e.shellSuspendCounter=0;var S=e.entanglements,k=e.expirationTimes,B=e.hiddenUpdates;for(s=y&~s;0<s;){var Y=31-Ht(s),J=1<<Y;S[Y]=0,k[Y]=-1;var Z=B[Y];if(Z!==null)for(B[Y]=null,Y=0;Y<Z.length;Y++){var H=Z[Y];H!==null&&(H.lane&=-536870913)}s&=~J}r!==0&&Pf(e,r,0),h!==0&&d===0&&e.tag!==0&&(e.suspendedLanes|=h&~(y&~i))}function Pf(e,i,s){e.pendingLanes|=i,e.suspendedLanes&=~i;var r=31-Ht(i);e.entangledLanes|=i,e.entanglements[r]=e.entanglements[r]|1073741824|s&261930}function Qf(e,i){var s=e.entangledLanes|=i;for(e=e.entanglements;s;){var r=31-Ht(s),d=1<<r;d&i|e[r]&i&&(e[r]|=i),s&=~d}}function Xf(e,i){var s=i&-i;return s=(s&42)!==0?1:oc(s),(s&(e.suspendedLanes|i))!==0?0:s}function oc(e){switch(e){case 2:e=1;break;case 8:e=4;break;case 32:e=16;break;case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:e=128;break;case 268435456:e=134217728;break;default:e=0}return e}function cc(e){return e&=-e,2<e?8<e?(e&134217727)!==0?32:268435456:8:2}function Jf(){var e=W.p;return e!==0?e:(e=window.event,e===void 0?32:Lg(e.type))}function Ff(e,i){var s=W.p;try{return W.p=e,i()}finally{W.p=s}}var ii=Math.random().toString(36).slice(2),bt="__reactFiber$"+ii,Ot="__reactProps$"+ii,ga="__reactContainer$"+ii,uc="__reactEvents$"+ii,J0="__reactListeners$"+ii,F0="__reactHandles$"+ii,Wf="__reactResources$"+ii,Es="__reactMarker$"+ii;function dc(e){delete e[bt],delete e[Ot],delete e[uc],delete e[J0],delete e[F0]}function ya(e){var i=e[bt];if(i)return i;for(var s=e.parentNode;s;){if(i=s[ga]||s[bt]){if(s=i.alternate,i.child!==null||s!==null&&s.child!==null)for(e=xg(e);e!==null;){if(s=e[bt])return s;e=xg(e)}return i}e=s,s=e.parentNode}return null}function va(e){if(e=e[bt]||e[ga]){var i=e.tag;if(i===5||i===6||i===13||i===31||i===26||i===27||i===3)return e}return null}function Cs(e){var i=e.tag;if(i===5||i===26||i===27||i===6)return e.stateNode;throw Error(l(33))}function ba(e){var i=e[Wf];return i||(i=e[Wf]={hoistableStyles:new Map,hoistableScripts:new Map}),i}function pt(e){e[Es]=!0}var eh=new Set,th={};function qi(e,i){xa(e,i),xa(e+"Capture",i)}function xa(e,i){for(th[e]=i,e=0;e<i.length;e++)eh.add(i[e])}var W0=RegExp("^[:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD][:A-Z_a-z\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD\\-.0-9\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$"),nh={},ih={};function ex(e){return pn.call(ih,e)?!0:pn.call(nh,e)?!1:W0.test(e)?ih[e]=!0:(nh[e]=!0,!1)}function Hl(e,i,s){if(ex(i))if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":e.removeAttribute(i);return;case"boolean":var r=i.toLowerCase().slice(0,5);if(r!=="data-"&&r!=="aria-"){e.removeAttribute(i);return}}e.setAttribute(i,""+s)}}function Il(e,i,s){if(s===null)e.removeAttribute(i);else{switch(typeof s){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(i);return}e.setAttribute(i,""+s)}}function Rn(e,i,s,r){if(r===null)e.removeAttribute(s);else{switch(typeof r){case"undefined":case"function":case"symbol":case"boolean":e.removeAttribute(s);return}e.setAttributeNS(i,s,""+r)}}function Wt(e){switch(typeof e){case"bigint":case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function ah(e){var i=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(i==="checkbox"||i==="radio")}function tx(e,i,s){var r=Object.getOwnPropertyDescriptor(e.constructor.prototype,i);if(!e.hasOwnProperty(i)&&typeof r<"u"&&typeof r.get=="function"&&typeof r.set=="function"){var d=r.get,h=r.set;return Object.defineProperty(e,i,{configurable:!0,get:function(){return d.call(this)},set:function(y){s=""+y,h.call(this,y)}}),Object.defineProperty(e,i,{enumerable:r.enumerable}),{getValue:function(){return s},setValue:function(y){s=""+y},stopTracking:function(){e._valueTracker=null,delete e[i]}}}}function fc(e){if(!e._valueTracker){var i=ah(e)?"checked":"value";e._valueTracker=tx(e,i,""+e[i])}}function sh(e){if(!e)return!1;var i=e._valueTracker;if(!i)return!0;var s=i.getValue(),r="";return e&&(r=ah(e)?e.checked?"true":"false":e.value),e=r,e!==s?(i.setValue(e),!0):!1}function Kl(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}var nx=/[\n"\\]/g;function en(e){return e.replace(nx,function(i){return"\\"+i.charCodeAt(0).toString(16)+" "})}function hc(e,i,s,r,d,h,y,S){e.name="",y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"?e.type=y:e.removeAttribute("type"),i!=null?y==="number"?(i===0&&e.value===""||e.value!=i)&&(e.value=""+Wt(i)):e.value!==""+Wt(i)&&(e.value=""+Wt(i)):y!=="submit"&&y!=="reset"||e.removeAttribute("value"),i!=null?mc(e,y,Wt(i)):s!=null?mc(e,y,Wt(s)):r!=null&&e.removeAttribute("value"),d==null&&h!=null&&(e.defaultChecked=!!h),d!=null&&(e.checked=d&&typeof d!="function"&&typeof d!="symbol"),S!=null&&typeof S!="function"&&typeof S!="symbol"&&typeof S!="boolean"?e.name=""+Wt(S):e.removeAttribute("name")}function lh(e,i,s,r,d,h,y,S){if(h!=null&&typeof h!="function"&&typeof h!="symbol"&&typeof h!="boolean"&&(e.type=h),i!=null||s!=null){if(!(h!=="submit"&&h!=="reset"||i!=null)){fc(e);return}s=s!=null?""+Wt(s):"",i=i!=null?""+Wt(i):s,S||i===e.value||(e.value=i),e.defaultValue=i}r=r??d,r=typeof r!="function"&&typeof r!="symbol"&&!!r,e.checked=S?e.checked:!!r,e.defaultChecked=!!r,y!=null&&typeof y!="function"&&typeof y!="symbol"&&typeof y!="boolean"&&(e.name=y),fc(e)}function mc(e,i,s){i==="number"&&Kl(e.ownerDocument)===e||e.defaultValue===""+s||(e.defaultValue=""+s)}function Sa(e,i,s,r){if(e=e.options,i){i={};for(var d=0;d<s.length;d++)i["$"+s[d]]=!0;for(s=0;s<e.length;s++)d=i.hasOwnProperty("$"+e[s].value),e[s].selected!==d&&(e[s].selected=d),d&&r&&(e[s].defaultSelected=!0)}else{for(s=""+Wt(s),i=null,d=0;d<e.length;d++){if(e[d].value===s){e[d].selected=!0,r&&(e[d].defaultSelected=!0);return}i!==null||e[d].disabled||(i=e[d])}i!==null&&(i.selected=!0)}}function rh(e,i,s){if(i!=null&&(i=""+Wt(i),i!==e.value&&(e.value=i),s==null)){e.defaultValue!==i&&(e.defaultValue=i);return}e.defaultValue=s!=null?""+Wt(s):""}function oh(e,i,s,r){if(i==null){if(r!=null){if(s!=null)throw Error(l(92));if(he(r)){if(1<r.length)throw Error(l(93));r=r[0]}s=r}s==null&&(s=""),i=s}s=Wt(i),e.defaultValue=s,r=e.textContent,r===s&&r!==""&&r!==null&&(e.value=r),fc(e)}function wa(e,i){if(i){var s=e.firstChild;if(s&&s===e.lastChild&&s.nodeType===3){s.nodeValue=i;return}}e.textContent=i}var ix=new Set("animationIterationCount aspectRatio borderImageOutset borderImageSlice borderImageWidth boxFlex boxFlexGroup boxOrdinalGroup columnCount columns flex flexGrow flexPositive flexShrink flexNegative flexOrder gridArea gridRow gridRowEnd gridRowSpan gridRowStart gridColumn gridColumnEnd gridColumnSpan gridColumnStart fontWeight lineClamp lineHeight opacity order orphans scale tabSize widows zIndex zoom fillOpacity floodOpacity stopOpacity strokeDasharray strokeDashoffset strokeMiterlimit strokeOpacity strokeWidth MozAnimationIterationCount MozBoxFlex MozBoxFlexGroup MozLineClamp msAnimationIterationCount msFlex msZoom msFlexGrow msFlexNegative msFlexOrder msFlexPositive msFlexShrink msGridColumn msGridColumnSpan msGridRow msGridRowSpan WebkitAnimationIterationCount WebkitBoxFlex WebKitBoxFlexGroup WebkitBoxOrdinalGroup WebkitColumnCount WebkitColumns WebkitFlex WebkitFlexGrow WebkitFlexPositive WebkitFlexShrink WebkitLineClamp".split(" "));function ch(e,i,s){var r=i.indexOf("--")===0;s==null||typeof s=="boolean"||s===""?r?e.setProperty(i,""):i==="float"?e.cssFloat="":e[i]="":r?e.setProperty(i,s):typeof s!="number"||s===0||ix.has(i)?i==="float"?e.cssFloat=s:e[i]=(""+s).trim():e[i]=s+"px"}function uh(e,i,s){if(i!=null&&typeof i!="object")throw Error(l(62));if(e=e.style,s!=null){for(var r in s)!s.hasOwnProperty(r)||i!=null&&i.hasOwnProperty(r)||(r.indexOf("--")===0?e.setProperty(r,""):r==="float"?e.cssFloat="":e[r]="");for(var d in i)r=i[d],i.hasOwnProperty(d)&&s[d]!==r&&ch(e,d,r)}else for(var h in i)i.hasOwnProperty(h)&&ch(e,h,i[h])}function pc(e){if(e.indexOf("-")===-1)return!1;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var ax=new Map([["acceptCharset","accept-charset"],["htmlFor","for"],["httpEquiv","http-equiv"],["crossOrigin","crossorigin"],["accentHeight","accent-height"],["alignmentBaseline","alignment-baseline"],["arabicForm","arabic-form"],["baselineShift","baseline-shift"],["capHeight","cap-height"],["clipPath","clip-path"],["clipRule","clip-rule"],["colorInterpolation","color-interpolation"],["colorInterpolationFilters","color-interpolation-filters"],["colorProfile","color-profile"],["colorRendering","color-rendering"],["dominantBaseline","dominant-baseline"],["enableBackground","enable-background"],["fillOpacity","fill-opacity"],["fillRule","fill-rule"],["floodColor","flood-color"],["floodOpacity","flood-opacity"],["fontFamily","font-family"],["fontSize","font-size"],["fontSizeAdjust","font-size-adjust"],["fontStretch","font-stretch"],["fontStyle","font-style"],["fontVariant","font-variant"],["fontWeight","font-weight"],["glyphName","glyph-name"],["glyphOrientationHorizontal","glyph-orientation-horizontal"],["glyphOrientationVertical","glyph-orientation-vertical"],["horizAdvX","horiz-adv-x"],["horizOriginX","horiz-origin-x"],["imageRendering","image-rendering"],["letterSpacing","letter-spacing"],["lightingColor","lighting-color"],["markerEnd","marker-end"],["markerMid","marker-mid"],["markerStart","marker-start"],["overlinePosition","overline-position"],["overlineThickness","overline-thickness"],["paintOrder","paint-order"],["panose-1","panose-1"],["pointerEvents","pointer-events"],["renderingIntent","rendering-intent"],["shapeRendering","shape-rendering"],["stopColor","stop-color"],["stopOpacity","stop-opacity"],["strikethroughPosition","strikethrough-position"],["strikethroughThickness","strikethrough-thickness"],["strokeDasharray","stroke-dasharray"],["strokeDashoffset","stroke-dashoffset"],["strokeLinecap","stroke-linecap"],["strokeLinejoin","stroke-linejoin"],["strokeMiterlimit","stroke-miterlimit"],["strokeOpacity","stroke-opacity"],["strokeWidth","stroke-width"],["textAnchor","text-anchor"],["textDecoration","text-decoration"],["textRendering","text-rendering"],["transformOrigin","transform-origin"],["underlinePosition","underline-position"],["underlineThickness","underline-thickness"],["unicodeBidi","unicode-bidi"],["unicodeRange","unicode-range"],["unitsPerEm","units-per-em"],["vAlphabetic","v-alphabetic"],["vHanging","v-hanging"],["vIdeographic","v-ideographic"],["vMathematical","v-mathematical"],["vectorEffect","vector-effect"],["vertAdvY","vert-adv-y"],["vertOriginX","vert-origin-x"],["vertOriginY","vert-origin-y"],["wordSpacing","word-spacing"],["writingMode","writing-mode"],["xmlnsXlink","xmlns:xlink"],["xHeight","x-height"]]),sx=/^[\u0000-\u001F ]*j[\r\n\t]*a[\r\n\t]*v[\r\n\t]*a[\r\n\t]*s[\r\n\t]*c[\r\n\t]*r[\r\n\t]*i[\r\n\t]*p[\r\n\t]*t[\r\n\t]*:/i;function Gl(e){return sx.test(""+e)?"javascript:throw new Error('React has blocked a javascript: URL as a security precaution.')":e}function Mn(){}var gc=null;function yc(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Na=null,ja=null;function dh(e){var i=va(e);if(i&&(e=i.stateNode)){var s=e[Ot]||null;e:switch(e=i.stateNode,i.type){case"input":if(hc(e,s.value,s.defaultValue,s.defaultValue,s.checked,s.defaultChecked,s.type,s.name),i=s.name,s.type==="radio"&&i!=null){for(s=e;s.parentNode;)s=s.parentNode;for(s=s.querySelectorAll('input[name="'+en(""+i)+'"][type="radio"]'),i=0;i<s.length;i++){var r=s[i];if(r!==e&&r.form===e.form){var d=r[Ot]||null;if(!d)throw Error(l(90));hc(r,d.value,d.defaultValue,d.defaultValue,d.checked,d.defaultChecked,d.type,d.name)}}for(i=0;i<s.length;i++)r=s[i],r.form===e.form&&sh(r)}break e;case"textarea":rh(e,s.value,s.defaultValue);break e;case"select":i=s.value,i!=null&&Sa(e,!!s.multiple,i,!1)}}}var vc=!1;function fh(e,i,s){if(vc)return e(i,s);vc=!0;try{var r=e(i);return r}finally{if(vc=!1,(Na!==null||ja!==null)&&(Or(),Na&&(i=Na,e=ja,ja=Na=null,dh(i),e)))for(i=0;i<e.length;i++)dh(e[i])}}function As(e,i){var s=e.stateNode;if(s===null)return null;var r=s[Ot]||null;if(r===null)return null;s=r[i];e:switch(i){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(e=e.type,r=!(e==="button"||e==="input"||e==="select"||e==="textarea")),e=!r;break e;default:e=!1}if(e)return null;if(s&&typeof s!="function")throw Error(l(231,i,typeof s));return s}var Ln=!(typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),bc=!1;if(Ln)try{var Ts={};Object.defineProperty(Ts,"passive",{get:function(){bc=!0}}),window.addEventListener("test",Ts,Ts),window.removeEventListener("test",Ts,Ts)}catch{bc=!1}var ai=null,xc=null,Yl=null;function hh(){if(Yl)return Yl;var e,i=xc,s=i.length,r,d="value"in ai?ai.value:ai.textContent,h=d.length;for(e=0;e<s&&i[e]===d[e];e++);var y=s-e;for(r=1;r<=y&&i[s-r]===d[h-r];r++);return Yl=d.slice(e,1<r?1-r:void 0)}function Vl(e){var i=e.keyCode;return"charCode"in e?(e=e.charCode,e===0&&i===13&&(e=13)):e=i,e===10&&(e=13),32<=e||e===13?e:0}function Pl(){return!0}function mh(){return!1}function Dt(e){function i(s,r,d,h,y){this._reactName=s,this._targetInst=d,this.type=r,this.nativeEvent=h,this.target=y,this.currentTarget=null;for(var S in e)e.hasOwnProperty(S)&&(s=e[S],this[S]=s?s(h):h[S]);return this.isDefaultPrevented=(h.defaultPrevented!=null?h.defaultPrevented:h.returnValue===!1)?Pl:mh,this.isPropagationStopped=mh,this}return v(i.prototype,{preventDefault:function(){this.defaultPrevented=!0;var s=this.nativeEvent;s&&(s.preventDefault?s.preventDefault():typeof s.returnValue!="unknown"&&(s.returnValue=!1),this.isDefaultPrevented=Pl)},stopPropagation:function(){var s=this.nativeEvent;s&&(s.stopPropagation?s.stopPropagation():typeof s.cancelBubble!="unknown"&&(s.cancelBubble=!0),this.isPropagationStopped=Pl)},persist:function(){},isPersistent:Pl}),i}var Hi={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Ql=Dt(Hi),Os=v({},Hi,{view:0,detail:0}),lx=Dt(Os),Sc,wc,Ds,Xl=v({},Os,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:jc,button:0,buttons:0,relatedTarget:function(e){return e.relatedTarget===void 0?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==Ds&&(Ds&&e.type==="mousemove"?(Sc=e.screenX-Ds.screenX,wc=e.screenY-Ds.screenY):wc=Sc=0,Ds=e),Sc)},movementY:function(e){return"movementY"in e?e.movementY:wc}}),ph=Dt(Xl),rx=v({},Xl,{dataTransfer:0}),ox=Dt(rx),cx=v({},Os,{relatedTarget:0}),Nc=Dt(cx),ux=v({},Hi,{animationName:0,elapsedTime:0,pseudoElement:0}),dx=Dt(ux),fx=v({},Hi,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),hx=Dt(fx),mx=v({},Hi,{data:0}),gh=Dt(mx),px={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},gx={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},yx={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vx(e){var i=this.nativeEvent;return i.getModifierState?i.getModifierState(e):(e=yx[e])?!!i[e]:!1}function jc(){return vx}var bx=v({},Os,{key:function(e){if(e.key){var i=px[e.key]||e.key;if(i!=="Unidentified")return i}return e.type==="keypress"?(e=Vl(e),e===13?"Enter":String.fromCharCode(e)):e.type==="keydown"||e.type==="keyup"?gx[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:jc,charCode:function(e){return e.type==="keypress"?Vl(e):0},keyCode:function(e){return e.type==="keydown"||e.type==="keyup"?e.keyCode:0},which:function(e){return e.type==="keypress"?Vl(e):e.type==="keydown"||e.type==="keyup"?e.keyCode:0}}),xx=Dt(bx),Sx=v({},Xl,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),yh=Dt(Sx),wx=v({},Os,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:jc}),Nx=Dt(wx),jx=v({},Hi,{propertyName:0,elapsedTime:0,pseudoElement:0}),_x=Dt(jx),kx=v({},Xl,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),zx=Dt(kx),Ex=v({},Hi,{newState:0,oldState:0}),Cx=Dt(Ex),Ax=[9,13,27,32],_c=Ln&&"CompositionEvent"in window,Rs=null;Ln&&"documentMode"in document&&(Rs=document.documentMode);var Tx=Ln&&"TextEvent"in window&&!Rs,vh=Ln&&(!_c||Rs&&8<Rs&&11>=Rs),bh=" ",xh=!1;function Sh(e,i){switch(e){case"keyup":return Ax.indexOf(i.keyCode)!==-1;case"keydown":return i.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wh(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var _a=!1;function Ox(e,i){switch(e){case"compositionend":return wh(i);case"keypress":return i.which!==32?null:(xh=!0,bh);case"textInput":return e=i.data,e===bh&&xh?null:e;default:return null}}function Dx(e,i){if(_a)return e==="compositionend"||!_c&&Sh(e,i)?(e=hh(),Yl=xc=ai=null,_a=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(i.ctrlKey||i.altKey||i.metaKey)||i.ctrlKey&&i.altKey){if(i.char&&1<i.char.length)return i.char;if(i.which)return String.fromCharCode(i.which)}return null;case"compositionend":return vh&&i.locale!=="ko"?null:i.data;default:return null}}var Rx={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Nh(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i==="input"?!!Rx[e.type]:i==="textarea"}function jh(e,i,s,r){Na?ja?ja.push(r):ja=[r]:Na=r,i=Br(i,"onChange"),0<i.length&&(s=new Ql("onChange","change",null,s,r),e.push({event:s,listeners:i}))}var Ms=null,Ls=null;function Mx(e){lg(e,0)}function Jl(e){var i=Cs(e);if(sh(i))return e}function _h(e,i){if(e==="change")return i}var kh=!1;if(Ln){var kc;if(Ln){var zc="oninput"in document;if(!zc){var zh=document.createElement("div");zh.setAttribute("oninput","return;"),zc=typeof zh.oninput=="function"}kc=zc}else kc=!1;kh=kc&&(!document.documentMode||9<document.documentMode)}function Eh(){Ms&&(Ms.detachEvent("onpropertychange",Ch),Ls=Ms=null)}function Ch(e){if(e.propertyName==="value"&&Jl(Ls)){var i=[];jh(i,Ls,e,yc(e)),fh(Mx,i)}}function Lx(e,i,s){e==="focusin"?(Eh(),Ms=i,Ls=s,Ms.attachEvent("onpropertychange",Ch)):e==="focusout"&&Eh()}function Ux(e){if(e==="selectionchange"||e==="keyup"||e==="keydown")return Jl(Ls)}function $x(e,i){if(e==="click")return Jl(i)}function Bx(e,i){if(e==="input"||e==="change")return Jl(i)}function Zx(e,i){return e===i&&(e!==0||1/e===1/i)||e!==e&&i!==i}var It=typeof Object.is=="function"?Object.is:Zx;function Us(e,i){if(It(e,i))return!0;if(typeof e!="object"||e===null||typeof i!="object"||i===null)return!1;var s=Object.keys(e),r=Object.keys(i);if(s.length!==r.length)return!1;for(r=0;r<s.length;r++){var d=s[r];if(!pn.call(i,d)||!It(e[d],i[d]))return!1}return!0}function Ah(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function Th(e,i){var s=Ah(e);e=0;for(var r;s;){if(s.nodeType===3){if(r=e+s.textContent.length,e<=i&&r>=i)return{node:s,offset:i-e};e=r}e:{for(;s;){if(s.nextSibling){s=s.nextSibling;break e}s=s.parentNode}s=void 0}s=Ah(s)}}function Oh(e,i){return e&&i?e===i?!0:e&&e.nodeType===3?!1:i&&i.nodeType===3?Oh(e,i.parentNode):"contains"in e?e.contains(i):e.compareDocumentPosition?!!(e.compareDocumentPosition(i)&16):!1:!1}function Dh(e){e=e!=null&&e.ownerDocument!=null&&e.ownerDocument.defaultView!=null?e.ownerDocument.defaultView:window;for(var i=Kl(e.document);i instanceof e.HTMLIFrameElement;){try{var s=typeof i.contentWindow.location.href=="string"}catch{s=!1}if(s)e=i.contentWindow;else break;i=Kl(e.document)}return i}function Ec(e){var i=e&&e.nodeName&&e.nodeName.toLowerCase();return i&&(i==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||i==="textarea"||e.contentEditable==="true")}var qx=Ln&&"documentMode"in document&&11>=document.documentMode,ka=null,Cc=null,$s=null,Ac=!1;function Rh(e,i,s){var r=s.window===s?s.document:s.nodeType===9?s:s.ownerDocument;Ac||ka==null||ka!==Kl(r)||(r=ka,"selectionStart"in r&&Ec(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),$s&&Us($s,r)||($s=r,r=Br(Cc,"onSelect"),0<r.length&&(i=new Ql("onSelect","select",null,i,s),e.push({event:i,listeners:r}),i.target=ka)))}function Ii(e,i){var s={};return s[e.toLowerCase()]=i.toLowerCase(),s["Webkit"+e]="webkit"+i,s["Moz"+e]="moz"+i,s}var za={animationend:Ii("Animation","AnimationEnd"),animationiteration:Ii("Animation","AnimationIteration"),animationstart:Ii("Animation","AnimationStart"),transitionrun:Ii("Transition","TransitionRun"),transitionstart:Ii("Transition","TransitionStart"),transitioncancel:Ii("Transition","TransitionCancel"),transitionend:Ii("Transition","TransitionEnd")},Tc={},Mh={};Ln&&(Mh=document.createElement("div").style,"AnimationEvent"in window||(delete za.animationend.animation,delete za.animationiteration.animation,delete za.animationstart.animation),"TransitionEvent"in window||delete za.transitionend.transition);function Ki(e){if(Tc[e])return Tc[e];if(!za[e])return e;var i=za[e],s;for(s in i)if(i.hasOwnProperty(s)&&s in Mh)return Tc[e]=i[s];return e}var Lh=Ki("animationend"),Uh=Ki("animationiteration"),$h=Ki("animationstart"),Hx=Ki("transitionrun"),Ix=Ki("transitionstart"),Kx=Ki("transitioncancel"),Bh=Ki("transitionend"),Zh=new Map,Oc="abort auxClick beforeToggle cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");Oc.push("scrollEnd");function gn(e,i){Zh.set(e,i),qi(i,[e])}var Fl=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var i=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(i))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},tn=[],Ea=0,Dc=0;function Wl(){for(var e=Ea,i=Dc=Ea=0;i<e;){var s=tn[i];tn[i++]=null;var r=tn[i];tn[i++]=null;var d=tn[i];tn[i++]=null;var h=tn[i];if(tn[i++]=null,r!==null&&d!==null){var y=r.pending;y===null?d.next=d:(d.next=y.next,y.next=d),r.pending=d}h!==0&&qh(s,d,h)}}function er(e,i,s,r){tn[Ea++]=e,tn[Ea++]=i,tn[Ea++]=s,tn[Ea++]=r,Dc|=r,e.lanes|=r,e=e.alternate,e!==null&&(e.lanes|=r)}function Rc(e,i,s,r){return er(e,i,s,r),tr(e)}function Gi(e,i){return er(e,null,null,i),tr(e)}function qh(e,i,s){e.lanes|=s;var r=e.alternate;r!==null&&(r.lanes|=s);for(var d=!1,h=e.return;h!==null;)h.childLanes|=s,r=h.alternate,r!==null&&(r.childLanes|=s),h.tag===22&&(e=h.stateNode,e===null||e._visibility&1||(d=!0)),e=h,h=h.return;return e.tag===3?(h=e.stateNode,d&&i!==null&&(d=31-Ht(s),e=h.hiddenUpdates,r=e[d],r===null?e[d]=[i]:r.push(i),i.lane=s|536870912),h):null}function tr(e){if(50<ll)throw ll=0,Iu=null,Error(l(185));for(var i=e.return;i!==null;)e=i,i=e.return;return e.tag===3?e.stateNode:null}var Ca={};function Gx(e,i,s,r){this.tag=e,this.key=s,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.refCleanup=this.ref=null,this.pendingProps=i,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Kt(e,i,s,r){return new Gx(e,i,s,r)}function Mc(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Un(e,i){var s=e.alternate;return s===null?(s=Kt(e.tag,i,e.key,e.mode),s.elementType=e.elementType,s.type=e.type,s.stateNode=e.stateNode,s.alternate=e,e.alternate=s):(s.pendingProps=i,s.type=e.type,s.flags=0,s.subtreeFlags=0,s.deletions=null),s.flags=e.flags&65011712,s.childLanes=e.childLanes,s.lanes=e.lanes,s.child=e.child,s.memoizedProps=e.memoizedProps,s.memoizedState=e.memoizedState,s.updateQueue=e.updateQueue,i=e.dependencies,s.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext},s.sibling=e.sibling,s.index=e.index,s.ref=e.ref,s.refCleanup=e.refCleanup,s}function Hh(e,i){e.flags&=65011714;var s=e.alternate;return s===null?(e.childLanes=0,e.lanes=i,e.child=null,e.subtreeFlags=0,e.memoizedProps=null,e.memoizedState=null,e.updateQueue=null,e.dependencies=null,e.stateNode=null):(e.childLanes=s.childLanes,e.lanes=s.lanes,e.child=s.child,e.subtreeFlags=0,e.deletions=null,e.memoizedProps=s.memoizedProps,e.memoizedState=s.memoizedState,e.updateQueue=s.updateQueue,e.type=s.type,i=s.dependencies,e.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),e}function nr(e,i,s,r,d,h){var y=0;if(r=e,typeof e=="function")Mc(e)&&(y=1);else if(typeof e=="string")y=XS(e,s,ie.current)?26:e==="html"||e==="head"||e==="body"?27:5;else e:switch(e){case F:return e=Kt(31,s,i,d),e.elementType=F,e.lanes=h,e;case w:return Yi(s.children,d,h,i);case _:y=8,d|=24;break;case E:return e=Kt(12,s,i,d|2),e.elementType=E,e.lanes=h,e;case L:return e=Kt(13,s,i,d),e.elementType=L,e.lanes=h,e;case I:return e=Kt(19,s,i,d),e.elementType=I,e.lanes=h,e;default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case T:y=10;break e;case O:y=9;break e;case D:y=11;break e;case G:y=14;break e;case M:y=16,r=null;break e}y=29,s=Error(l(130,e===null?"null":typeof e,"")),r=null}return i=Kt(y,s,i,d),i.elementType=e,i.type=r,i.lanes=h,i}function Yi(e,i,s,r){return e=Kt(7,e,r,i),e.lanes=s,e}function Lc(e,i,s){return e=Kt(6,e,null,i),e.lanes=s,e}function Ih(e){var i=Kt(18,null,null,0);return i.stateNode=e,i}function Uc(e,i,s){return i=Kt(4,e.children!==null?e.children:[],e.key,i),i.lanes=s,i.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},i}var Kh=new WeakMap;function nn(e,i){if(typeof e=="object"&&e!==null){var s=Kh.get(e);return s!==void 0?s:(i={value:e,source:i,stack:js(i)},Kh.set(e,i),i)}return{value:e,source:i,stack:js(i)}}var Aa=[],Ta=0,ir=null,Bs=0,an=[],sn=0,si=null,_n=1,kn="";function $n(e,i){Aa[Ta++]=Bs,Aa[Ta++]=ir,ir=e,Bs=i}function Gh(e,i,s){an[sn++]=_n,an[sn++]=kn,an[sn++]=si,si=e;var r=_n;e=kn;var d=32-Ht(r)-1;r&=~(1<<d),s+=1;var h=32-Ht(i)+d;if(30<h){var y=d-d%5;h=(r&(1<<y)-1).toString(32),r>>=y,d-=y,_n=1<<32-Ht(i)+d|s<<d|r,kn=h+e}else _n=1<<h|s<<d|r,kn=e}function $c(e){e.return!==null&&($n(e,1),Gh(e,1,0))}function Bc(e){for(;e===ir;)ir=Aa[--Ta],Aa[Ta]=null,Bs=Aa[--Ta],Aa[Ta]=null;for(;e===si;)si=an[--sn],an[sn]=null,kn=an[--sn],an[sn]=null,_n=an[--sn],an[sn]=null}function Yh(e,i){an[sn++]=_n,an[sn++]=kn,an[sn++]=si,_n=i.id,kn=i.overflow,si=e}var xt=null,Ge=null,Ae=!1,li=null,ln=!1,Zc=Error(l(519));function ri(e){var i=Error(l(418,1<arguments.length&&arguments[1]!==void 0&&arguments[1]?"text":"HTML",""));throw Zs(nn(i,e)),Zc}function Vh(e){var i=e.stateNode,s=e.type,r=e.memoizedProps;switch(i[bt]=e,i[Ot]=r,s){case"dialog":ze("cancel",i),ze("close",i);break;case"iframe":case"object":case"embed":ze("load",i);break;case"video":case"audio":for(s=0;s<ol.length;s++)ze(ol[s],i);break;case"source":ze("error",i);break;case"img":case"image":case"link":ze("error",i),ze("load",i);break;case"details":ze("toggle",i);break;case"input":ze("invalid",i),lh(i,r.value,r.defaultValue,r.checked,r.defaultChecked,r.type,r.name,!0);break;case"select":ze("invalid",i);break;case"textarea":ze("invalid",i),oh(i,r.value,r.defaultValue,r.children)}s=r.children,typeof s!="string"&&typeof s!="number"&&typeof s!="bigint"||i.textContent===""+s||r.suppressHydrationWarning===!0||ug(i.textContent,s)?(r.popover!=null&&(ze("beforetoggle",i),ze("toggle",i)),r.onScroll!=null&&ze("scroll",i),r.onScrollEnd!=null&&ze("scrollend",i),r.onClick!=null&&(i.onclick=Mn),i=!0):i=!1,i||ri(e,!0)}function Ph(e){for(xt=e.return;xt;)switch(xt.tag){case 5:case 31:case 13:ln=!1;return;case 27:case 3:ln=!0;return;default:xt=xt.return}}function Oa(e){if(e!==xt)return!1;if(!Ae)return Ph(e),Ae=!0,!1;var i=e.tag,s;if((s=i!==3&&i!==27)&&((s=i===5)&&(s=e.type,s=!(s!=="form"&&s!=="button")||ad(e.type,e.memoizedProps)),s=!s),s&&Ge&&ri(e),Ph(e),i===13){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ge=bg(e)}else if(i===31){if(e=e.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(317));Ge=bg(e)}else i===27?(i=Ge,Si(e.type)?(e=cd,cd=null,Ge=e):Ge=i):Ge=xt?on(e.stateNode.nextSibling):null;return!0}function Vi(){Ge=xt=null,Ae=!1}function qc(){var e=li;return e!==null&&(Ut===null?Ut=e:Ut.push.apply(Ut,e),li=null),e}function Zs(e){li===null?li=[e]:li.push(e)}var Hc=C(null),Pi=null,Bn=null;function oi(e,i,s){te(Hc,i._currentValue),i._currentValue=s}function Zn(e){e._currentValue=Hc.current,K(Hc)}function Ic(e,i,s){for(;e!==null;){var r=e.alternate;if((e.childLanes&i)!==i?(e.childLanes|=i,r!==null&&(r.childLanes|=i)):r!==null&&(r.childLanes&i)!==i&&(r.childLanes|=i),e===s)break;e=e.return}}function Kc(e,i,s,r){var d=e.child;for(d!==null&&(d.return=e);d!==null;){var h=d.dependencies;if(h!==null){var y=d.child;h=h.firstContext;e:for(;h!==null;){var S=h;h=d;for(var k=0;k<i.length;k++)if(S.context===i[k]){h.lanes|=s,S=h.alternate,S!==null&&(S.lanes|=s),Ic(h.return,s,e),r||(y=null);break e}h=S.next}}else if(d.tag===18){if(y=d.return,y===null)throw Error(l(341));y.lanes|=s,h=y.alternate,h!==null&&(h.lanes|=s),Ic(y,s,e),y=null}else y=d.child;if(y!==null)y.return=d;else for(y=d;y!==null;){if(y===e){y=null;break}if(d=y.sibling,d!==null){d.return=y.return,y=d;break}y=y.return}d=y}}function Da(e,i,s,r){e=null;for(var d=i,h=!1;d!==null;){if(!h){if((d.flags&524288)!==0)h=!0;else if((d.flags&262144)!==0)break}if(d.tag===10){var y=d.alternate;if(y===null)throw Error(l(387));if(y=y.memoizedProps,y!==null){var S=d.type;It(d.pendingProps.value,y.value)||(e!==null?e.push(S):e=[S])}}else if(d===q.current){if(y=d.alternate,y===null)throw Error(l(387));y.memoizedState.memoizedState!==d.memoizedState.memoizedState&&(e!==null?e.push(hl):e=[hl])}d=d.return}e!==null&&Kc(i,e,s,r),i.flags|=262144}function ar(e){for(e=e.firstContext;e!==null;){if(!It(e.context._currentValue,e.memoizedValue))return!0;e=e.next}return!1}function Qi(e){Pi=e,Bn=null,e=e.dependencies,e!==null&&(e.firstContext=null)}function St(e){return Qh(Pi,e)}function sr(e,i){return Pi===null&&Qi(e),Qh(e,i)}function Qh(e,i){var s=i._currentValue;if(i={context:i,memoizedValue:s,next:null},Bn===null){if(e===null)throw Error(l(308));Bn=i,e.dependencies={lanes:0,firstContext:i},e.flags|=524288}else Bn=Bn.next=i;return s}var Yx=typeof AbortController<"u"?AbortController:function(){var e=[],i=this.signal={aborted:!1,addEventListener:function(s,r){e.push(r)}};this.abort=function(){i.aborted=!0,e.forEach(function(s){return s()})}},Vx=t.unstable_scheduleCallback,Px=t.unstable_NormalPriority,lt={$$typeof:T,Consumer:null,Provider:null,_currentValue:null,_currentValue2:null,_threadCount:0};function Gc(){return{controller:new Yx,data:new Map,refCount:0}}function qs(e){e.refCount--,e.refCount===0&&Vx(Px,function(){e.controller.abort()})}var Hs=null,Yc=0,Ra=0,Ma=null;function Qx(e,i){if(Hs===null){var s=Hs=[];Yc=0,Ra=Qu(),Ma={status:"pending",value:void 0,then:function(r){s.push(r)}}}return Yc++,i.then(Xh,Xh),i}function Xh(){if(--Yc===0&&Hs!==null){Ma!==null&&(Ma.status="fulfilled");var e=Hs;Hs=null,Ra=0,Ma=null;for(var i=0;i<e.length;i++)(0,e[i])()}}function Xx(e,i){var s=[],r={status:"pending",value:null,reason:null,then:function(d){s.push(d)}};return e.then(function(){r.status="fulfilled",r.value=i;for(var d=0;d<s.length;d++)(0,s[d])(i)},function(d){for(r.status="rejected",r.reason=d,d=0;d<s.length;d++)(0,s[d])(void 0)}),r}var Jh=U.S;U.S=function(e,i){Rp=kt(),typeof i=="object"&&i!==null&&typeof i.then=="function"&&Qx(e,i),Jh!==null&&Jh(e,i)};var Xi=C(null);function Vc(){var e=Xi.current;return e!==null?e:He.pooledCache}function lr(e,i){i===null?te(Xi,Xi.current):te(Xi,i.pool)}function Fh(){var e=Vc();return e===null?null:{parent:lt._currentValue,pool:e}}var La=Error(l(460)),Pc=Error(l(474)),rr=Error(l(542)),or={then:function(){}};function Wh(e){return e=e.status,e==="fulfilled"||e==="rejected"}function em(e,i,s){switch(s=e[s],s===void 0?e.push(i):s!==i&&(i.then(Mn,Mn),i=s),i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,nm(e),e;default:if(typeof i.status=="string")i.then(Mn,Mn);else{if(e=He,e!==null&&100<e.shellSuspendCounter)throw Error(l(482));e=i,e.status="pending",e.then(function(r){if(i.status==="pending"){var d=i;d.status="fulfilled",d.value=r}},function(r){if(i.status==="pending"){var d=i;d.status="rejected",d.reason=r}})}switch(i.status){case"fulfilled":return i.value;case"rejected":throw e=i.reason,nm(e),e}throw Fi=i,La}}function Ji(e){try{var i=e._init;return i(e._payload)}catch(s){throw s!==null&&typeof s=="object"&&typeof s.then=="function"?(Fi=s,La):s}}var Fi=null;function tm(){if(Fi===null)throw Error(l(459));var e=Fi;return Fi=null,e}function nm(e){if(e===La||e===rr)throw Error(l(483))}var Ua=null,Is=0;function cr(e){var i=Is;return Is+=1,Ua===null&&(Ua=[]),em(Ua,e,i)}function Ks(e,i){i=i.props.ref,e.ref=i!==void 0?i:null}function ur(e,i){throw i.$$typeof===x?Error(l(525)):(e=Object.prototype.toString.call(i),Error(l(31,e==="[object Object]"?"object with keys {"+Object.keys(i).join(", ")+"}":e)))}function im(e){function i(R,A){if(e){var $=R.deletions;$===null?(R.deletions=[A],R.flags|=16):$.push(A)}}function s(R,A){if(!e)return null;for(;A!==null;)i(R,A),A=A.sibling;return null}function r(R){for(var A=new Map;R!==null;)R.key!==null?A.set(R.key,R):A.set(R.index,R),R=R.sibling;return A}function d(R,A){return R=Un(R,A),R.index=0,R.sibling=null,R}function h(R,A,$){return R.index=$,e?($=R.alternate,$!==null?($=$.index,$<A?(R.flags|=67108866,A):$):(R.flags|=67108866,A)):(R.flags|=1048576,A)}function y(R){return e&&R.alternate===null&&(R.flags|=67108866),R}function S(R,A,$,P){return A===null||A.tag!==6?(A=Lc($,R.mode,P),A.return=R,A):(A=d(A,$),A.return=R,A)}function k(R,A,$,P){var ye=$.type;return ye===w?Y(R,A,$.props.children,P,$.key):A!==null&&(A.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===M&&Ji(ye)===A.type)?(A=d(A,$.props),Ks(A,$),A.return=R,A):(A=nr($.type,$.key,$.props,null,R.mode,P),Ks(A,$),A.return=R,A)}function B(R,A,$,P){return A===null||A.tag!==4||A.stateNode.containerInfo!==$.containerInfo||A.stateNode.implementation!==$.implementation?(A=Uc($,R.mode,P),A.return=R,A):(A=d(A,$.children||[]),A.return=R,A)}function Y(R,A,$,P,ye){return A===null||A.tag!==7?(A=Yi($,R.mode,P,ye),A.return=R,A):(A=d(A,$),A.return=R,A)}function J(R,A,$){if(typeof A=="string"&&A!==""||typeof A=="number"||typeof A=="bigint")return A=Lc(""+A,R.mode,$),A.return=R,A;if(typeof A=="object"&&A!==null){switch(A.$$typeof){case j:return $=nr(A.type,A.key,A.props,null,R.mode,$),Ks($,A),$.return=R,$;case z:return A=Uc(A,R.mode,$),A.return=R,A;case M:return A=Ji(A),J(R,A,$)}if(he(A)||le(A))return A=Yi(A,R.mode,$,null),A.return=R,A;if(typeof A.then=="function")return J(R,cr(A),$);if(A.$$typeof===T)return J(R,sr(R,A),$);ur(R,A)}return null}function Z(R,A,$,P){var ye=A!==null?A.key:null;if(typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint")return ye!==null?null:S(R,A,""+$,P);if(typeof $=="object"&&$!==null){switch($.$$typeof){case j:return $.key===ye?k(R,A,$,P):null;case z:return $.key===ye?B(R,A,$,P):null;case M:return $=Ji($),Z(R,A,$,P)}if(he($)||le($))return ye!==null?null:Y(R,A,$,P,null);if(typeof $.then=="function")return Z(R,A,cr($),P);if($.$$typeof===T)return Z(R,A,sr(R,$),P);ur(R,$)}return null}function H(R,A,$,P,ye){if(typeof P=="string"&&P!==""||typeof P=="number"||typeof P=="bigint")return R=R.get($)||null,S(A,R,""+P,ye);if(typeof P=="object"&&P!==null){switch(P.$$typeof){case j:return R=R.get(P.key===null?$:P.key)||null,k(A,R,P,ye);case z:return R=R.get(P.key===null?$:P.key)||null,B(A,R,P,ye);case M:return P=Ji(P),H(R,A,$,P,ye)}if(he(P)||le(P))return R=R.get($)||null,Y(A,R,P,ye,null);if(typeof P.then=="function")return H(R,A,$,cr(P),ye);if(P.$$typeof===T)return H(R,A,$,sr(A,P),ye);ur(A,P)}return null}function oe(R,A,$,P){for(var ye=null,Te=null,fe=A,je=A=0,Ce=null;fe!==null&&je<$.length;je++){fe.index>je?(Ce=fe,fe=null):Ce=fe.sibling;var Oe=Z(R,fe,$[je],P);if(Oe===null){fe===null&&(fe=Ce);break}e&&fe&&Oe.alternate===null&&i(R,fe),A=h(Oe,A,je),Te===null?ye=Oe:Te.sibling=Oe,Te=Oe,fe=Ce}if(je===$.length)return s(R,fe),Ae&&$n(R,je),ye;if(fe===null){for(;je<$.length;je++)fe=J(R,$[je],P),fe!==null&&(A=h(fe,A,je),Te===null?ye=fe:Te.sibling=fe,Te=fe);return Ae&&$n(R,je),ye}for(fe=r(fe);je<$.length;je++)Ce=H(fe,R,je,$[je],P),Ce!==null&&(e&&Ce.alternate!==null&&fe.delete(Ce.key===null?je:Ce.key),A=h(Ce,A,je),Te===null?ye=Ce:Te.sibling=Ce,Te=Ce);return e&&fe.forEach(function(ki){return i(R,ki)}),Ae&&$n(R,je),ye}function be(R,A,$,P){if($==null)throw Error(l(151));for(var ye=null,Te=null,fe=A,je=A=0,Ce=null,Oe=$.next();fe!==null&&!Oe.done;je++,Oe=$.next()){fe.index>je?(Ce=fe,fe=null):Ce=fe.sibling;var ki=Z(R,fe,Oe.value,P);if(ki===null){fe===null&&(fe=Ce);break}e&&fe&&ki.alternate===null&&i(R,fe),A=h(ki,A,je),Te===null?ye=ki:Te.sibling=ki,Te=ki,fe=Ce}if(Oe.done)return s(R,fe),Ae&&$n(R,je),ye;if(fe===null){for(;!Oe.done;je++,Oe=$.next())Oe=J(R,Oe.value,P),Oe!==null&&(A=h(Oe,A,je),Te===null?ye=Oe:Te.sibling=Oe,Te=Oe);return Ae&&$n(R,je),ye}for(fe=r(fe);!Oe.done;je++,Oe=$.next())Oe=H(fe,R,je,Oe.value,P),Oe!==null&&(e&&Oe.alternate!==null&&fe.delete(Oe.key===null?je:Oe.key),A=h(Oe,A,je),Te===null?ye=Oe:Te.sibling=Oe,Te=Oe);return e&&fe.forEach(function(rw){return i(R,rw)}),Ae&&$n(R,je),ye}function qe(R,A,$,P){if(typeof $=="object"&&$!==null&&$.type===w&&$.key===null&&($=$.props.children),typeof $=="object"&&$!==null){switch($.$$typeof){case j:e:{for(var ye=$.key;A!==null;){if(A.key===ye){if(ye=$.type,ye===w){if(A.tag===7){s(R,A.sibling),P=d(A,$.props.children),P.return=R,R=P;break e}}else if(A.elementType===ye||typeof ye=="object"&&ye!==null&&ye.$$typeof===M&&Ji(ye)===A.type){s(R,A.sibling),P=d(A,$.props),Ks(P,$),P.return=R,R=P;break e}s(R,A);break}else i(R,A);A=A.sibling}$.type===w?(P=Yi($.props.children,R.mode,P,$.key),P.return=R,R=P):(P=nr($.type,$.key,$.props,null,R.mode,P),Ks(P,$),P.return=R,R=P)}return y(R);case z:e:{for(ye=$.key;A!==null;){if(A.key===ye)if(A.tag===4&&A.stateNode.containerInfo===$.containerInfo&&A.stateNode.implementation===$.implementation){s(R,A.sibling),P=d(A,$.children||[]),P.return=R,R=P;break e}else{s(R,A);break}else i(R,A);A=A.sibling}P=Uc($,R.mode,P),P.return=R,R=P}return y(R);case M:return $=Ji($),qe(R,A,$,P)}if(he($))return oe(R,A,$,P);if(le($)){if(ye=le($),typeof ye!="function")throw Error(l(150));return $=ye.call($),be(R,A,$,P)}if(typeof $.then=="function")return qe(R,A,cr($),P);if($.$$typeof===T)return qe(R,A,sr(R,$),P);ur(R,$)}return typeof $=="string"&&$!==""||typeof $=="number"||typeof $=="bigint"?($=""+$,A!==null&&A.tag===6?(s(R,A.sibling),P=d(A,$),P.return=R,R=P):(s(R,A),P=Lc($,R.mode,P),P.return=R,R=P),y(R)):s(R,A)}return function(R,A,$,P){try{Is=0;var ye=qe(R,A,$,P);return Ua=null,ye}catch(fe){if(fe===La||fe===rr)throw fe;var Te=Kt(29,fe,null,R.mode);return Te.lanes=P,Te.return=R,Te}}}var Wi=im(!0),am=im(!1),ci=!1;function Qc(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,lanes:0,hiddenCallbacks:null},callbacks:null}}function Xc(e,i){e=e.updateQueue,i.updateQueue===e&&(i.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,callbacks:null})}function ui(e){return{lane:e,tag:0,payload:null,callback:null,next:null}}function di(e,i,s){var r=e.updateQueue;if(r===null)return null;if(r=r.shared,(De&2)!==0){var d=r.pending;return d===null?i.next=i:(i.next=d.next,d.next=i),r.pending=i,i=tr(e),qh(e,null,s),i}return er(e,r,i,s),tr(e)}function Gs(e,i,s){if(i=i.updateQueue,i!==null&&(i=i.shared,(s&4194048)!==0)){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,Qf(e,s)}}function Jc(e,i){var s=e.updateQueue,r=e.alternate;if(r!==null&&(r=r.updateQueue,s===r)){var d=null,h=null;if(s=s.firstBaseUpdate,s!==null){do{var y={lane:s.lane,tag:s.tag,payload:s.payload,callback:null,next:null};h===null?d=h=y:h=h.next=y,s=s.next}while(s!==null);h===null?d=h=i:h=h.next=i}else d=h=i;s={baseState:r.baseState,firstBaseUpdate:d,lastBaseUpdate:h,shared:r.shared,callbacks:r.callbacks},e.updateQueue=s;return}e=s.lastBaseUpdate,e===null?s.firstBaseUpdate=i:e.next=i,s.lastBaseUpdate=i}var Fc=!1;function Ys(){if(Fc){var e=Ma;if(e!==null)throw e}}function Vs(e,i,s,r){Fc=!1;var d=e.updateQueue;ci=!1;var h=d.firstBaseUpdate,y=d.lastBaseUpdate,S=d.shared.pending;if(S!==null){d.shared.pending=null;var k=S,B=k.next;k.next=null,y===null?h=B:y.next=B,y=k;var Y=e.alternate;Y!==null&&(Y=Y.updateQueue,S=Y.lastBaseUpdate,S!==y&&(S===null?Y.firstBaseUpdate=B:S.next=B,Y.lastBaseUpdate=k))}if(h!==null){var J=d.baseState;y=0,Y=B=k=null,S=h;do{var Z=S.lane&-536870913,H=Z!==S.lane;if(H?(Ee&Z)===Z:(r&Z)===Z){Z!==0&&Z===Ra&&(Fc=!0),Y!==null&&(Y=Y.next={lane:0,tag:S.tag,payload:S.payload,callback:null,next:null});e:{var oe=e,be=S;Z=i;var qe=s;switch(be.tag){case 1:if(oe=be.payload,typeof oe=="function"){J=oe.call(qe,J,Z);break e}J=oe;break e;case 3:oe.flags=oe.flags&-65537|128;case 0:if(oe=be.payload,Z=typeof oe=="function"?oe.call(qe,J,Z):oe,Z==null)break e;J=v({},J,Z);break e;case 2:ci=!0}}Z=S.callback,Z!==null&&(e.flags|=64,H&&(e.flags|=8192),H=d.callbacks,H===null?d.callbacks=[Z]:H.push(Z))}else H={lane:Z,tag:S.tag,payload:S.payload,callback:S.callback,next:null},Y===null?(B=Y=H,k=J):Y=Y.next=H,y|=Z;if(S=S.next,S===null){if(S=d.shared.pending,S===null)break;H=S,S=H.next,H.next=null,d.lastBaseUpdate=H,d.shared.pending=null}}while(!0);Y===null&&(k=J),d.baseState=k,d.firstBaseUpdate=B,d.lastBaseUpdate=Y,h===null&&(d.shared.lanes=0),gi|=y,e.lanes=y,e.memoizedState=J}}function sm(e,i){if(typeof e!="function")throw Error(l(191,e));e.call(i)}function lm(e,i){var s=e.callbacks;if(s!==null)for(e.callbacks=null,e=0;e<s.length;e++)sm(s[e],i)}var $a=C(null),dr=C(0);function rm(e,i){e=Qn,te(dr,e),te($a,i),Qn=e|i.baseLanes}function Wc(){te(dr,Qn),te($a,$a.current)}function eu(){Qn=dr.current,K($a),K(dr)}var Gt=C(null),rn=null;function fi(e){var i=e.alternate;te(tt,tt.current&1),te(Gt,e),rn===null&&(i===null||$a.current!==null||i.memoizedState!==null)&&(rn=e)}function tu(e){te(tt,tt.current),te(Gt,e),rn===null&&(rn=e)}function om(e){e.tag===22?(te(tt,tt.current),te(Gt,e),rn===null&&(rn=e)):hi()}function hi(){te(tt,tt.current),te(Gt,Gt.current)}function Yt(e){K(Gt),rn===e&&(rn=null),K(tt)}var tt=C(0);function fr(e){for(var i=e;i!==null;){if(i.tag===13){var s=i.memoizedState;if(s!==null&&(s=s.dehydrated,s===null||rd(s)||od(s)))return i}else if(i.tag===19&&(i.memoizedProps.revealOrder==="forwards"||i.memoizedProps.revealOrder==="backwards"||i.memoizedProps.revealOrder==="unstable_legacy-backwards"||i.memoizedProps.revealOrder==="together")){if((i.flags&128)!==0)return i}else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return null;i=i.return}i.sibling.return=i.return,i=i.sibling}return null}var qn=0,Ne=null,Be=null,rt=null,hr=!1,Ba=!1,ea=!1,mr=0,Ps=0,Za=null,Jx=0;function Fe(){throw Error(l(321))}function nu(e,i){if(i===null)return!1;for(var s=0;s<i.length&&s<e.length;s++)if(!It(e[s],i[s]))return!1;return!0}function iu(e,i,s,r,d,h){return qn=h,Ne=i,i.memoizedState=null,i.updateQueue=null,i.lanes=0,U.H=e===null||e.memoizedState===null?Gm:vu,ea=!1,h=s(r,d),ea=!1,Ba&&(h=um(i,s,r,d)),cm(e),h}function cm(e){U.H=Js;var i=Be!==null&&Be.next!==null;if(qn=0,rt=Be=Ne=null,hr=!1,Ps=0,Za=null,i)throw Error(l(300));e===null||ot||(e=e.dependencies,e!==null&&ar(e)&&(ot=!0))}function um(e,i,s,r){Ne=e;var d=0;do{if(Ba&&(Za=null),Ps=0,Ba=!1,25<=d)throw Error(l(301));if(d+=1,rt=Be=null,e.updateQueue!=null){var h=e.updateQueue;h.lastEffect=null,h.events=null,h.stores=null,h.memoCache!=null&&(h.memoCache.index=0)}U.H=Ym,h=i(s,r)}while(Ba);return h}function Fx(){var e=U.H,i=e.useState()[0];return i=typeof i.then=="function"?Qs(i):i,e=e.useState()[0],(Be!==null?Be.memoizedState:null)!==e&&(Ne.flags|=1024),i}function au(){var e=mr!==0;return mr=0,e}function su(e,i,s){i.updateQueue=e.updateQueue,i.flags&=-2053,e.lanes&=~s}function lu(e){if(hr){for(e=e.memoizedState;e!==null;){var i=e.queue;i!==null&&(i.pending=null),e=e.next}hr=!1}qn=0,rt=Be=Ne=null,Ba=!1,Ps=mr=0,Za=null}function zt(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return rt===null?Ne.memoizedState=rt=e:rt=rt.next=e,rt}function nt(){if(Be===null){var e=Ne.alternate;e=e!==null?e.memoizedState:null}else e=Be.next;var i=rt===null?Ne.memoizedState:rt.next;if(i!==null)rt=i,Be=e;else{if(e===null)throw Ne.alternate===null?Error(l(467)):Error(l(310));Be=e,e={memoizedState:Be.memoizedState,baseState:Be.baseState,baseQueue:Be.baseQueue,queue:Be.queue,next:null},rt===null?Ne.memoizedState=rt=e:rt=rt.next=e}return rt}function pr(){return{lastEffect:null,events:null,stores:null,memoCache:null}}function Qs(e){var i=Ps;return Ps+=1,Za===null&&(Za=[]),e=em(Za,e,i),i=Ne,(rt===null?i.memoizedState:rt.next)===null&&(i=i.alternate,U.H=i===null||i.memoizedState===null?Gm:vu),e}function gr(e){if(e!==null&&typeof e=="object"){if(typeof e.then=="function")return Qs(e);if(e.$$typeof===T)return St(e)}throw Error(l(438,String(e)))}function ru(e){var i=null,s=Ne.updateQueue;if(s!==null&&(i=s.memoCache),i==null){var r=Ne.alternate;r!==null&&(r=r.updateQueue,r!==null&&(r=r.memoCache,r!=null&&(i={data:r.data.map(function(d){return d.slice()}),index:0})))}if(i==null&&(i={data:[],index:0}),s===null&&(s=pr(),Ne.updateQueue=s),s.memoCache=i,s=i.data[i.index],s===void 0)for(s=i.data[i.index]=Array(e),r=0;r<e;r++)s[r]=xe;return i.index++,s}function Hn(e,i){return typeof i=="function"?i(e):i}function yr(e){var i=nt();return ou(i,Be,e)}function ou(e,i,s){var r=e.queue;if(r===null)throw Error(l(311));r.lastRenderedReducer=s;var d=e.baseQueue,h=r.pending;if(h!==null){if(d!==null){var y=d.next;d.next=h.next,h.next=y}i.baseQueue=d=h,r.pending=null}if(h=e.baseState,d===null)e.memoizedState=h;else{i=d.next;var S=y=null,k=null,B=i,Y=!1;do{var J=B.lane&-536870913;if(J!==B.lane?(Ee&J)===J:(qn&J)===J){var Z=B.revertLane;if(Z===0)k!==null&&(k=k.next={lane:0,revertLane:0,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null}),J===Ra&&(Y=!0);else if((qn&Z)===Z){B=B.next,Z===Ra&&(Y=!0);continue}else J={lane:0,revertLane:B.revertLane,gesture:null,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},k===null?(S=k=J,y=h):k=k.next=J,Ne.lanes|=Z,gi|=Z;J=B.action,ea&&s(h,J),h=B.hasEagerState?B.eagerState:s(h,J)}else Z={lane:J,revertLane:B.revertLane,gesture:B.gesture,action:B.action,hasEagerState:B.hasEagerState,eagerState:B.eagerState,next:null},k===null?(S=k=Z,y=h):k=k.next=Z,Ne.lanes|=J,gi|=J;B=B.next}while(B!==null&&B!==i);if(k===null?y=h:k.next=S,!It(h,e.memoizedState)&&(ot=!0,Y&&(s=Ma,s!==null)))throw s;e.memoizedState=h,e.baseState=y,e.baseQueue=k,r.lastRenderedState=h}return d===null&&(r.lanes=0),[e.memoizedState,r.dispatch]}function cu(e){var i=nt(),s=i.queue;if(s===null)throw Error(l(311));s.lastRenderedReducer=e;var r=s.dispatch,d=s.pending,h=i.memoizedState;if(d!==null){s.pending=null;var y=d=d.next;do h=e(h,y.action),y=y.next;while(y!==d);It(h,i.memoizedState)||(ot=!0),i.memoizedState=h,i.baseQueue===null&&(i.baseState=h),s.lastRenderedState=h}return[h,r]}function dm(e,i,s){var r=Ne,d=nt(),h=Ae;if(h){if(s===void 0)throw Error(l(407));s=s()}else s=i();var y=!It((Be||d).memoizedState,s);if(y&&(d.memoizedState=s,ot=!0),d=d.queue,fu(mm.bind(null,r,d,e),[e]),d.getSnapshot!==i||y||rt!==null&&rt.memoizedState.tag&1){if(r.flags|=2048,qa(9,{destroy:void 0},hm.bind(null,r,d,s,i),null),He===null)throw Error(l(349));h||(qn&127)!==0||fm(r,i,s)}return s}function fm(e,i,s){e.flags|=16384,e={getSnapshot:i,value:s},i=Ne.updateQueue,i===null?(i=pr(),Ne.updateQueue=i,i.stores=[e]):(s=i.stores,s===null?i.stores=[e]:s.push(e))}function hm(e,i,s,r){i.value=s,i.getSnapshot=r,pm(i)&&gm(e)}function mm(e,i,s){return s(function(){pm(i)&&gm(e)})}function pm(e){var i=e.getSnapshot;e=e.value;try{var s=i();return!It(e,s)}catch{return!0}}function gm(e){var i=Gi(e,2);i!==null&&$t(i,e,2)}function uu(e){var i=zt();if(typeof e=="function"){var s=e;if(e=s(),ea){ni(!0);try{s()}finally{ni(!1)}}}return i.memoizedState=i.baseState=e,i.queue={pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:e},i}function ym(e,i,s,r){return e.baseState=s,ou(e,Be,typeof r=="function"?r:Hn)}function Wx(e,i,s,r,d){if(xr(e))throw Error(l(485));if(e=i.action,e!==null){var h={payload:d,action:e,next:null,isTransition:!0,status:"pending",value:null,reason:null,listeners:[],then:function(y){h.listeners.push(y)}};U.T!==null?s(!0):h.isTransition=!1,r(h),s=i.pending,s===null?(h.next=i.pending=h,vm(i,h)):(h.next=s.next,i.pending=s.next=h)}}function vm(e,i){var s=i.action,r=i.payload,d=e.state;if(i.isTransition){var h=U.T,y={};U.T=y;try{var S=s(d,r),k=U.S;k!==null&&k(y,S),bm(e,i,S)}catch(B){du(e,i,B)}finally{h!==null&&y.types!==null&&(h.types=y.types),U.T=h}}else try{h=s(d,r),bm(e,i,h)}catch(B){du(e,i,B)}}function bm(e,i,s){s!==null&&typeof s=="object"&&typeof s.then=="function"?s.then(function(r){xm(e,i,r)},function(r){return du(e,i,r)}):xm(e,i,s)}function xm(e,i,s){i.status="fulfilled",i.value=s,Sm(i),e.state=s,i=e.pending,i!==null&&(s=i.next,s===i?e.pending=null:(s=s.next,i.next=s,vm(e,s)))}function du(e,i,s){var r=e.pending;if(e.pending=null,r!==null){r=r.next;do i.status="rejected",i.reason=s,Sm(i),i=i.next;while(i!==r)}e.action=null}function Sm(e){e=e.listeners;for(var i=0;i<e.length;i++)(0,e[i])()}function wm(e,i){return i}function Nm(e,i){if(Ae){var s=He.formState;if(s!==null){e:{var r=Ne;if(Ae){if(Ge){t:{for(var d=Ge,h=ln;d.nodeType!==8;){if(!h){d=null;break t}if(d=on(d.nextSibling),d===null){d=null;break t}}h=d.data,d=h==="F!"||h==="F"?d:null}if(d){Ge=on(d.nextSibling),r=d.data==="F!";break e}}ri(r)}r=!1}r&&(i=s[0])}}return s=zt(),s.memoizedState=s.baseState=i,r={pending:null,lanes:0,dispatch:null,lastRenderedReducer:wm,lastRenderedState:i},s.queue=r,s=Hm.bind(null,Ne,r),r.dispatch=s,r=uu(!1),h=yu.bind(null,Ne,!1,r.queue),r=zt(),d={state:i,dispatch:null,action:e,pending:null},r.queue=d,s=Wx.bind(null,Ne,d,h,s),d.dispatch=s,r.memoizedState=e,[i,s,!1]}function jm(e){var i=nt();return _m(i,Be,e)}function _m(e,i,s){if(i=ou(e,i,wm)[0],e=yr(Hn)[0],typeof i=="object"&&i!==null&&typeof i.then=="function")try{var r=Qs(i)}catch(y){throw y===La?rr:y}else r=i;i=nt();var d=i.queue,h=d.dispatch;return s!==i.memoizedState&&(Ne.flags|=2048,qa(9,{destroy:void 0},eS.bind(null,d,s),null)),[r,h,e]}function eS(e,i){e.action=i}function km(e){var i=nt(),s=Be;if(s!==null)return _m(i,s,e);nt(),i=i.memoizedState,s=nt();var r=s.queue.dispatch;return s.memoizedState=e,[i,r,!1]}function qa(e,i,s,r){return e={tag:e,create:s,deps:r,inst:i,next:null},i=Ne.updateQueue,i===null&&(i=pr(),Ne.updateQueue=i),s=i.lastEffect,s===null?i.lastEffect=e.next=e:(r=s.next,s.next=e,e.next=r,i.lastEffect=e),e}function zm(){return nt().memoizedState}function vr(e,i,s,r){var d=zt();Ne.flags|=e,d.memoizedState=qa(1|i,{destroy:void 0},s,r===void 0?null:r)}function br(e,i,s,r){var d=nt();r=r===void 0?null:r;var h=d.memoizedState.inst;Be!==null&&r!==null&&nu(r,Be.memoizedState.deps)?d.memoizedState=qa(i,h,s,r):(Ne.flags|=e,d.memoizedState=qa(1|i,h,s,r))}function Em(e,i){vr(8390656,8,e,i)}function fu(e,i){br(2048,8,e,i)}function tS(e){Ne.flags|=4;var i=Ne.updateQueue;if(i===null)i=pr(),Ne.updateQueue=i,i.events=[e];else{var s=i.events;s===null?i.events=[e]:s.push(e)}}function Cm(e){var i=nt().memoizedState;return tS({ref:i,nextImpl:e}),function(){if((De&2)!==0)throw Error(l(440));return i.impl.apply(void 0,arguments)}}function Am(e,i){return br(4,2,e,i)}function Tm(e,i){return br(4,4,e,i)}function Om(e,i){if(typeof i=="function"){e=e();var s=i(e);return function(){typeof s=="function"?s():i(null)}}if(i!=null)return e=e(),i.current=e,function(){i.current=null}}function Dm(e,i,s){s=s!=null?s.concat([e]):null,br(4,4,Om.bind(null,i,e),s)}function hu(){}function Rm(e,i){var s=nt();i=i===void 0?null:i;var r=s.memoizedState;return i!==null&&nu(i,r[1])?r[0]:(s.memoizedState=[e,i],e)}function Mm(e,i){var s=nt();i=i===void 0?null:i;var r=s.memoizedState;if(i!==null&&nu(i,r[1]))return r[0];if(r=e(),ea){ni(!0);try{e()}finally{ni(!1)}}return s.memoizedState=[r,i],r}function mu(e,i,s){return s===void 0||(qn&1073741824)!==0&&(Ee&261930)===0?e.memoizedState=i:(e.memoizedState=s,e=Lp(),Ne.lanes|=e,gi|=e,s)}function Lm(e,i,s,r){return It(s,i)?s:$a.current!==null?(e=mu(e,s,r),It(e,i)||(ot=!0),e):(qn&42)===0||(qn&1073741824)!==0&&(Ee&261930)===0?(ot=!0,e.memoizedState=s):(e=Lp(),Ne.lanes|=e,gi|=e,i)}function Um(e,i,s,r,d){var h=W.p;W.p=h!==0&&8>h?h:8;var y=U.T,S={};U.T=S,yu(e,!1,i,s);try{var k=d(),B=U.S;if(B!==null&&B(S,k),k!==null&&typeof k=="object"&&typeof k.then=="function"){var Y=Xx(k,r);Xs(e,i,Y,Qt(e))}else Xs(e,i,r,Qt(e))}catch(J){Xs(e,i,{then:function(){},status:"rejected",reason:J},Qt())}finally{W.p=h,y!==null&&S.types!==null&&(y.types=S.types),U.T=y}}function nS(){}function pu(e,i,s,r){if(e.tag!==5)throw Error(l(476));var d=$m(e).queue;Um(e,d,i,se,s===null?nS:function(){return Bm(e),s(r)})}function $m(e){var i=e.memoizedState;if(i!==null)return i;i={memoizedState:se,baseState:se,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:se},next:null};var s={};return i.next={memoizedState:s,baseState:s,baseQueue:null,queue:{pending:null,lanes:0,dispatch:null,lastRenderedReducer:Hn,lastRenderedState:s},next:null},e.memoizedState=i,e=e.alternate,e!==null&&(e.memoizedState=i),i}function Bm(e){var i=$m(e);i.next===null&&(i=e.alternate.memoizedState),Xs(e,i.next.queue,{},Qt())}function gu(){return St(hl)}function Zm(){return nt().memoizedState}function qm(){return nt().memoizedState}function iS(e){for(var i=e.return;i!==null;){switch(i.tag){case 24:case 3:var s=Qt();e=ui(s);var r=di(i,e,s);r!==null&&($t(r,i,s),Gs(r,i,s)),i={cache:Gc()},e.payload=i;return}i=i.return}}function aS(e,i,s){var r=Qt();s={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null},xr(e)?Im(i,s):(s=Rc(e,i,s,r),s!==null&&($t(s,e,r),Km(s,i,r)))}function Hm(e,i,s){var r=Qt();Xs(e,i,s,r)}function Xs(e,i,s,r){var d={lane:r,revertLane:0,gesture:null,action:s,hasEagerState:!1,eagerState:null,next:null};if(xr(e))Im(i,d);else{var h=e.alternate;if(e.lanes===0&&(h===null||h.lanes===0)&&(h=i.lastRenderedReducer,h!==null))try{var y=i.lastRenderedState,S=h(y,s);if(d.hasEagerState=!0,d.eagerState=S,It(S,y))return er(e,i,d,0),He===null&&Wl(),!1}catch{}if(s=Rc(e,i,d,r),s!==null)return $t(s,e,r),Km(s,i,r),!0}return!1}function yu(e,i,s,r){if(r={lane:2,revertLane:Qu(),gesture:null,action:r,hasEagerState:!1,eagerState:null,next:null},xr(e)){if(i)throw Error(l(479))}else i=Rc(e,s,r,2),i!==null&&$t(i,e,2)}function xr(e){var i=e.alternate;return e===Ne||i!==null&&i===Ne}function Im(e,i){Ba=hr=!0;var s=e.pending;s===null?i.next=i:(i.next=s.next,s.next=i),e.pending=i}function Km(e,i,s){if((s&4194048)!==0){var r=i.lanes;r&=e.pendingLanes,s|=r,i.lanes=s,Qf(e,s)}}var Js={readContext:St,use:gr,useCallback:Fe,useContext:Fe,useEffect:Fe,useImperativeHandle:Fe,useLayoutEffect:Fe,useInsertionEffect:Fe,useMemo:Fe,useReducer:Fe,useRef:Fe,useState:Fe,useDebugValue:Fe,useDeferredValue:Fe,useTransition:Fe,useSyncExternalStore:Fe,useId:Fe,useHostTransitionStatus:Fe,useFormState:Fe,useActionState:Fe,useOptimistic:Fe,useMemoCache:Fe,useCacheRefresh:Fe};Js.useEffectEvent=Fe;var Gm={readContext:St,use:gr,useCallback:function(e,i){return zt().memoizedState=[e,i===void 0?null:i],e},useContext:St,useEffect:Em,useImperativeHandle:function(e,i,s){s=s!=null?s.concat([e]):null,vr(4194308,4,Om.bind(null,i,e),s)},useLayoutEffect:function(e,i){return vr(4194308,4,e,i)},useInsertionEffect:function(e,i){vr(4,2,e,i)},useMemo:function(e,i){var s=zt();i=i===void 0?null:i;var r=e();if(ea){ni(!0);try{e()}finally{ni(!1)}}return s.memoizedState=[r,i],r},useReducer:function(e,i,s){var r=zt();if(s!==void 0){var d=s(i);if(ea){ni(!0);try{s(i)}finally{ni(!1)}}}else d=i;return r.memoizedState=r.baseState=d,e={pending:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:d},r.queue=e,e=e.dispatch=aS.bind(null,Ne,e),[r.memoizedState,e]},useRef:function(e){var i=zt();return e={current:e},i.memoizedState=e},useState:function(e){e=uu(e);var i=e.queue,s=Hm.bind(null,Ne,i);return i.dispatch=s,[e.memoizedState,s]},useDebugValue:hu,useDeferredValue:function(e,i){var s=zt();return mu(s,e,i)},useTransition:function(){var e=uu(!1);return e=Um.bind(null,Ne,e.queue,!0,!1),zt().memoizedState=e,[!1,e]},useSyncExternalStore:function(e,i,s){var r=Ne,d=zt();if(Ae){if(s===void 0)throw Error(l(407));s=s()}else{if(s=i(),He===null)throw Error(l(349));(Ee&127)!==0||fm(r,i,s)}d.memoizedState=s;var h={value:s,getSnapshot:i};return d.queue=h,Em(mm.bind(null,r,h,e),[e]),r.flags|=2048,qa(9,{destroy:void 0},hm.bind(null,r,h,s,i),null),s},useId:function(){var e=zt(),i=He.identifierPrefix;if(Ae){var s=kn,r=_n;s=(r&~(1<<32-Ht(r)-1)).toString(32)+s,i="_"+i+"R_"+s,s=mr++,0<s&&(i+="H"+s.toString(32)),i+="_"}else s=Jx++,i="_"+i+"r_"+s.toString(32)+"_";return e.memoizedState=i},useHostTransitionStatus:gu,useFormState:Nm,useActionState:Nm,useOptimistic:function(e){var i=zt();i.memoizedState=i.baseState=e;var s={pending:null,lanes:0,dispatch:null,lastRenderedReducer:null,lastRenderedState:null};return i.queue=s,i=yu.bind(null,Ne,!0,s),s.dispatch=i,[e,i]},useMemoCache:ru,useCacheRefresh:function(){return zt().memoizedState=iS.bind(null,Ne)},useEffectEvent:function(e){var i=zt(),s={impl:e};return i.memoizedState=s,function(){if((De&2)!==0)throw Error(l(440));return s.impl.apply(void 0,arguments)}}},vu={readContext:St,use:gr,useCallback:Rm,useContext:St,useEffect:fu,useImperativeHandle:Dm,useInsertionEffect:Am,useLayoutEffect:Tm,useMemo:Mm,useReducer:yr,useRef:zm,useState:function(){return yr(Hn)},useDebugValue:hu,useDeferredValue:function(e,i){var s=nt();return Lm(s,Be.memoizedState,e,i)},useTransition:function(){var e=yr(Hn)[0],i=nt().memoizedState;return[typeof e=="boolean"?e:Qs(e),i]},useSyncExternalStore:dm,useId:Zm,useHostTransitionStatus:gu,useFormState:jm,useActionState:jm,useOptimistic:function(e,i){var s=nt();return ym(s,Be,e,i)},useMemoCache:ru,useCacheRefresh:qm};vu.useEffectEvent=Cm;var Ym={readContext:St,use:gr,useCallback:Rm,useContext:St,useEffect:fu,useImperativeHandle:Dm,useInsertionEffect:Am,useLayoutEffect:Tm,useMemo:Mm,useReducer:cu,useRef:zm,useState:function(){return cu(Hn)},useDebugValue:hu,useDeferredValue:function(e,i){var s=nt();return Be===null?mu(s,e,i):Lm(s,Be.memoizedState,e,i)},useTransition:function(){var e=cu(Hn)[0],i=nt().memoizedState;return[typeof e=="boolean"?e:Qs(e),i]},useSyncExternalStore:dm,useId:Zm,useHostTransitionStatus:gu,useFormState:km,useActionState:km,useOptimistic:function(e,i){var s=nt();return Be!==null?ym(s,Be,e,i):(s.baseState=e,[e,s.queue.dispatch])},useMemoCache:ru,useCacheRefresh:qm};Ym.useEffectEvent=Cm;function bu(e,i,s,r){i=e.memoizedState,s=s(r,i),s=s==null?i:v({},i,s),e.memoizedState=s,e.lanes===0&&(e.updateQueue.baseState=s)}var xu={enqueueSetState:function(e,i,s){e=e._reactInternals;var r=Qt(),d=ui(r);d.payload=i,s!=null&&(d.callback=s),i=di(e,d,r),i!==null&&($t(i,e,r),Gs(i,e,r))},enqueueReplaceState:function(e,i,s){e=e._reactInternals;var r=Qt(),d=ui(r);d.tag=1,d.payload=i,s!=null&&(d.callback=s),i=di(e,d,r),i!==null&&($t(i,e,r),Gs(i,e,r))},enqueueForceUpdate:function(e,i){e=e._reactInternals;var s=Qt(),r=ui(s);r.tag=2,i!=null&&(r.callback=i),i=di(e,r,s),i!==null&&($t(i,e,s),Gs(i,e,s))}};function Vm(e,i,s,r,d,h,y){return e=e.stateNode,typeof e.shouldComponentUpdate=="function"?e.shouldComponentUpdate(r,h,y):i.prototype&&i.prototype.isPureReactComponent?!Us(s,r)||!Us(d,h):!0}function Pm(e,i,s,r){e=i.state,typeof i.componentWillReceiveProps=="function"&&i.componentWillReceiveProps(s,r),typeof i.UNSAFE_componentWillReceiveProps=="function"&&i.UNSAFE_componentWillReceiveProps(s,r),i.state!==e&&xu.enqueueReplaceState(i,i.state,null)}function ta(e,i){var s=i;if("ref"in i){s={};for(var r in i)r!=="ref"&&(s[r]=i[r])}if(e=e.defaultProps){s===i&&(s=v({},s));for(var d in e)s[d]===void 0&&(s[d]=e[d])}return s}function Qm(e){Fl(e)}function Xm(e){console.error(e)}function Jm(e){Fl(e)}function Sr(e,i){try{var s=e.onUncaughtError;s(i.value,{componentStack:i.stack})}catch(r){setTimeout(function(){throw r})}}function Fm(e,i,s){try{var r=e.onCaughtError;r(s.value,{componentStack:s.stack,errorBoundary:i.tag===1?i.stateNode:null})}catch(d){setTimeout(function(){throw d})}}function Su(e,i,s){return s=ui(s),s.tag=3,s.payload={element:null},s.callback=function(){Sr(e,i)},s}function Wm(e){return e=ui(e),e.tag=3,e}function ep(e,i,s,r){var d=s.type.getDerivedStateFromError;if(typeof d=="function"){var h=r.value;e.payload=function(){return d(h)},e.callback=function(){Fm(i,s,r)}}var y=s.stateNode;y!==null&&typeof y.componentDidCatch=="function"&&(e.callback=function(){Fm(i,s,r),typeof d!="function"&&(yi===null?yi=new Set([this]):yi.add(this));var S=r.stack;this.componentDidCatch(r.value,{componentStack:S!==null?S:""})})}function sS(e,i,s,r,d){if(s.flags|=32768,r!==null&&typeof r=="object"&&typeof r.then=="function"){if(i=s.alternate,i!==null&&Da(i,s,d,!0),s=Gt.current,s!==null){switch(s.tag){case 31:case 13:return rn===null?Dr():s.alternate===null&&We===0&&(We=3),s.flags&=-257,s.flags|=65536,s.lanes=d,r===or?s.flags|=16384:(i=s.updateQueue,i===null?s.updateQueue=new Set([r]):i.add(r),Yu(e,r,d)),!1;case 22:return s.flags|=65536,r===or?s.flags|=16384:(i=s.updateQueue,i===null?(i={transitions:null,markerInstances:null,retryQueue:new Set([r])},s.updateQueue=i):(s=i.retryQueue,s===null?i.retryQueue=new Set([r]):s.add(r)),Yu(e,r,d)),!1}throw Error(l(435,s.tag))}return Yu(e,r,d),Dr(),!1}if(Ae)return i=Gt.current,i!==null?((i.flags&65536)===0&&(i.flags|=256),i.flags|=65536,i.lanes=d,r!==Zc&&(e=Error(l(422),{cause:r}),Zs(nn(e,s)))):(r!==Zc&&(i=Error(l(423),{cause:r}),Zs(nn(i,s))),e=e.current.alternate,e.flags|=65536,d&=-d,e.lanes|=d,r=nn(r,s),d=Su(e.stateNode,r,d),Jc(e,d),We!==4&&(We=2)),!1;var h=Error(l(520),{cause:r});if(h=nn(h,s),sl===null?sl=[h]:sl.push(h),We!==4&&(We=2),i===null)return!0;r=nn(r,s),s=i;do{switch(s.tag){case 3:return s.flags|=65536,e=d&-d,s.lanes|=e,e=Su(s.stateNode,r,e),Jc(s,e),!1;case 1:if(i=s.type,h=s.stateNode,(s.flags&128)===0&&(typeof i.getDerivedStateFromError=="function"||h!==null&&typeof h.componentDidCatch=="function"&&(yi===null||!yi.has(h))))return s.flags|=65536,d&=-d,s.lanes|=d,d=Wm(d),ep(d,e,s,r),Jc(s,d),!1}s=s.return}while(s!==null);return!1}var wu=Error(l(461)),ot=!1;function wt(e,i,s,r){i.child=e===null?am(i,null,s,r):Wi(i,e.child,s,r)}function tp(e,i,s,r,d){s=s.render;var h=i.ref;if("ref"in r){var y={};for(var S in r)S!=="ref"&&(y[S]=r[S])}else y=r;return Qi(i),r=iu(e,i,s,y,h,d),S=au(),e!==null&&!ot?(su(e,i,d),In(e,i,d)):(Ae&&S&&$c(i),i.flags|=1,wt(e,i,r,d),i.child)}function np(e,i,s,r,d){if(e===null){var h=s.type;return typeof h=="function"&&!Mc(h)&&h.defaultProps===void 0&&s.compare===null?(i.tag=15,i.type=h,ip(e,i,h,r,d)):(e=nr(s.type,null,r,i,i.mode,d),e.ref=i.ref,e.return=i,i.child=e)}if(h=e.child,!Au(e,d)){var y=h.memoizedProps;if(s=s.compare,s=s!==null?s:Us,s(y,r)&&e.ref===i.ref)return In(e,i,d)}return i.flags|=1,e=Un(h,r),e.ref=i.ref,e.return=i,i.child=e}function ip(e,i,s,r,d){if(e!==null){var h=e.memoizedProps;if(Us(h,r)&&e.ref===i.ref)if(ot=!1,i.pendingProps=r=h,Au(e,d))(e.flags&131072)!==0&&(ot=!0);else return i.lanes=e.lanes,In(e,i,d)}return Nu(e,i,s,r,d)}function ap(e,i,s,r){var d=r.children,h=e!==null?e.memoizedState:null;if(e===null&&i.stateNode===null&&(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),r.mode==="hidden"){if((i.flags&128)!==0){if(h=h!==null?h.baseLanes|s:s,e!==null){for(r=i.child=e.child,d=0;r!==null;)d=d|r.lanes|r.childLanes,r=r.sibling;r=d&~h}else r=0,i.child=null;return sp(e,i,h,s,r)}if((s&536870912)!==0)i.memoizedState={baseLanes:0,cachePool:null},e!==null&&lr(i,h!==null?h.cachePool:null),h!==null?rm(i,h):Wc(),om(i);else return r=i.lanes=536870912,sp(e,i,h!==null?h.baseLanes|s:s,s,r)}else h!==null?(lr(i,h.cachePool),rm(i,h),hi(),i.memoizedState=null):(e!==null&&lr(i,null),Wc(),hi());return wt(e,i,d,s),i.child}function Fs(e,i){return e!==null&&e.tag===22||i.stateNode!==null||(i.stateNode={_visibility:1,_pendingMarkers:null,_retryCache:null,_transitions:null}),i.sibling}function sp(e,i,s,r,d){var h=Vc();return h=h===null?null:{parent:lt._currentValue,pool:h},i.memoizedState={baseLanes:s,cachePool:h},e!==null&&lr(i,null),Wc(),om(i),e!==null&&Da(e,i,r,!0),i.childLanes=d,null}function wr(e,i){return i=jr({mode:i.mode,children:i.children},e.mode),i.ref=e.ref,e.child=i,i.return=e,i}function lp(e,i,s){return Wi(i,e.child,null,s),e=wr(i,i.pendingProps),e.flags|=2,Yt(i),i.memoizedState=null,e}function lS(e,i,s){var r=i.pendingProps,d=(i.flags&128)!==0;if(i.flags&=-129,e===null){if(Ae){if(r.mode==="hidden")return e=wr(i,r),i.lanes=536870912,Fs(null,e);if(tu(i),(e=Ge)?(e=vg(e,ln),e=e!==null&&e.data==="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:si!==null?{id:_n,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},s=Ih(e),s.return=i,i.child=s,xt=i,Ge=null)):e=null,e===null)throw ri(i);return i.lanes=536870912,null}return wr(i,r)}var h=e.memoizedState;if(h!==null){var y=h.dehydrated;if(tu(i),d)if(i.flags&256)i.flags&=-257,i=lp(e,i,s);else if(i.memoizedState!==null)i.child=e.child,i.flags|=128,i=null;else throw Error(l(558));else if(ot||Da(e,i,s,!1),d=(s&e.childLanes)!==0,ot||d){if(r=He,r!==null&&(y=Xf(r,s),y!==0&&y!==h.retryLane))throw h.retryLane=y,Gi(e,y),$t(r,e,y),wu;Dr(),i=lp(e,i,s)}else e=h.treeContext,Ge=on(y.nextSibling),xt=i,Ae=!0,li=null,ln=!1,e!==null&&Yh(i,e),i=wr(i,r),i.flags|=4096;return i}return e=Un(e.child,{mode:r.mode,children:r.children}),e.ref=i.ref,i.child=e,e.return=i,e}function Nr(e,i){var s=i.ref;if(s===null)e!==null&&e.ref!==null&&(i.flags|=4194816);else{if(typeof s!="function"&&typeof s!="object")throw Error(l(284));(e===null||e.ref!==s)&&(i.flags|=4194816)}}function Nu(e,i,s,r,d){return Qi(i),s=iu(e,i,s,r,void 0,d),r=au(),e!==null&&!ot?(su(e,i,d),In(e,i,d)):(Ae&&r&&$c(i),i.flags|=1,wt(e,i,s,d),i.child)}function rp(e,i,s,r,d,h){return Qi(i),i.updateQueue=null,s=um(i,r,s,d),cm(e),r=au(),e!==null&&!ot?(su(e,i,h),In(e,i,h)):(Ae&&r&&$c(i),i.flags|=1,wt(e,i,s,h),i.child)}function op(e,i,s,r,d){if(Qi(i),i.stateNode===null){var h=Ca,y=s.contextType;typeof y=="object"&&y!==null&&(h=St(y)),h=new s(r,h),i.memoizedState=h.state!==null&&h.state!==void 0?h.state:null,h.updater=xu,i.stateNode=h,h._reactInternals=i,h=i.stateNode,h.props=r,h.state=i.memoizedState,h.refs={},Qc(i),y=s.contextType,h.context=typeof y=="object"&&y!==null?St(y):Ca,h.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(bu(i,s,y,r),h.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof h.getSnapshotBeforeUpdate=="function"||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(y=h.state,typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount(),y!==h.state&&xu.enqueueReplaceState(h,h.state,null),Vs(i,r,h,d),Ys(),h.state=i.memoizedState),typeof h.componentDidMount=="function"&&(i.flags|=4194308),r=!0}else if(e===null){h=i.stateNode;var S=i.memoizedProps,k=ta(s,S);h.props=k;var B=h.context,Y=s.contextType;y=Ca,typeof Y=="object"&&Y!==null&&(y=St(Y));var J=s.getDerivedStateFromProps;Y=typeof J=="function"||typeof h.getSnapshotBeforeUpdate=="function",S=i.pendingProps!==S,Y||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(S||B!==y)&&Pm(i,h,r,y),ci=!1;var Z=i.memoizedState;h.state=Z,Vs(i,r,h,d),Ys(),B=i.memoizedState,S||Z!==B||ci?(typeof J=="function"&&(bu(i,s,J,r),B=i.memoizedState),(k=ci||Vm(i,s,k,r,Z,B,y))?(Y||typeof h.UNSAFE_componentWillMount!="function"&&typeof h.componentWillMount!="function"||(typeof h.componentWillMount=="function"&&h.componentWillMount(),typeof h.UNSAFE_componentWillMount=="function"&&h.UNSAFE_componentWillMount()),typeof h.componentDidMount=="function"&&(i.flags|=4194308)):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),i.memoizedProps=r,i.memoizedState=B),h.props=r,h.state=B,h.context=y,r=k):(typeof h.componentDidMount=="function"&&(i.flags|=4194308),r=!1)}else{h=i.stateNode,Xc(e,i),y=i.memoizedProps,Y=ta(s,y),h.props=Y,J=i.pendingProps,Z=h.context,B=s.contextType,k=Ca,typeof B=="object"&&B!==null&&(k=St(B)),S=s.getDerivedStateFromProps,(B=typeof S=="function"||typeof h.getSnapshotBeforeUpdate=="function")||typeof h.UNSAFE_componentWillReceiveProps!="function"&&typeof h.componentWillReceiveProps!="function"||(y!==J||Z!==k)&&Pm(i,h,r,k),ci=!1,Z=i.memoizedState,h.state=Z,Vs(i,r,h,d),Ys();var H=i.memoizedState;y!==J||Z!==H||ci||e!==null&&e.dependencies!==null&&ar(e.dependencies)?(typeof S=="function"&&(bu(i,s,S,r),H=i.memoizedState),(Y=ci||Vm(i,s,Y,r,Z,H,k)||e!==null&&e.dependencies!==null&&ar(e.dependencies))?(B||typeof h.UNSAFE_componentWillUpdate!="function"&&typeof h.componentWillUpdate!="function"||(typeof h.componentWillUpdate=="function"&&h.componentWillUpdate(r,H,k),typeof h.UNSAFE_componentWillUpdate=="function"&&h.UNSAFE_componentWillUpdate(r,H,k)),typeof h.componentDidUpdate=="function"&&(i.flags|=4),typeof h.getSnapshotBeforeUpdate=="function"&&(i.flags|=1024)):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&Z===e.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Z===e.memoizedState||(i.flags|=1024),i.memoizedProps=r,i.memoizedState=H),h.props=r,h.state=H,h.context=k,r=Y):(typeof h.componentDidUpdate!="function"||y===e.memoizedProps&&Z===e.memoizedState||(i.flags|=4),typeof h.getSnapshotBeforeUpdate!="function"||y===e.memoizedProps&&Z===e.memoizedState||(i.flags|=1024),r=!1)}return h=r,Nr(e,i),r=(i.flags&128)!==0,h||r?(h=i.stateNode,s=r&&typeof s.getDerivedStateFromError!="function"?null:h.render(),i.flags|=1,e!==null&&r?(i.child=Wi(i,e.child,null,d),i.child=Wi(i,null,s,d)):wt(e,i,s,d),i.memoizedState=h.state,e=i.child):e=In(e,i,d),e}function cp(e,i,s,r){return Vi(),i.flags|=256,wt(e,i,s,r),i.child}var ju={dehydrated:null,treeContext:null,retryLane:0,hydrationErrors:null};function _u(e){return{baseLanes:e,cachePool:Fh()}}function ku(e,i,s){return e=e!==null?e.childLanes&~s:0,i&&(e|=Pt),e}function up(e,i,s){var r=i.pendingProps,d=!1,h=(i.flags&128)!==0,y;if((y=h)||(y=e!==null&&e.memoizedState===null?!1:(tt.current&2)!==0),y&&(d=!0,i.flags&=-129),y=(i.flags&32)!==0,i.flags&=-33,e===null){if(Ae){if(d?fi(i):hi(),(e=Ge)?(e=vg(e,ln),e=e!==null&&e.data!=="&"?e:null,e!==null&&(i.memoizedState={dehydrated:e,treeContext:si!==null?{id:_n,overflow:kn}:null,retryLane:536870912,hydrationErrors:null},s=Ih(e),s.return=i,i.child=s,xt=i,Ge=null)):e=null,e===null)throw ri(i);return od(e)?i.lanes=32:i.lanes=536870912,null}var S=r.children;return r=r.fallback,d?(hi(),d=i.mode,S=jr({mode:"hidden",children:S},d),r=Yi(r,d,s,null),S.return=i,r.return=i,S.sibling=r,i.child=S,r=i.child,r.memoizedState=_u(s),r.childLanes=ku(e,y,s),i.memoizedState=ju,Fs(null,r)):(fi(i),zu(i,S))}var k=e.memoizedState;if(k!==null&&(S=k.dehydrated,S!==null)){if(h)i.flags&256?(fi(i),i.flags&=-257,i=Eu(e,i,s)):i.memoizedState!==null?(hi(),i.child=e.child,i.flags|=128,i=null):(hi(),S=r.fallback,d=i.mode,r=jr({mode:"visible",children:r.children},d),S=Yi(S,d,s,null),S.flags|=2,r.return=i,S.return=i,r.sibling=S,i.child=r,Wi(i,e.child,null,s),r=i.child,r.memoizedState=_u(s),r.childLanes=ku(e,y,s),i.memoizedState=ju,i=Fs(null,r));else if(fi(i),od(S)){if(y=S.nextSibling&&S.nextSibling.dataset,y)var B=y.dgst;y=B,r=Error(l(419)),r.stack="",r.digest=y,Zs({value:r,source:null,stack:null}),i=Eu(e,i,s)}else if(ot||Da(e,i,s,!1),y=(s&e.childLanes)!==0,ot||y){if(y=He,y!==null&&(r=Xf(y,s),r!==0&&r!==k.retryLane))throw k.retryLane=r,Gi(e,r),$t(y,e,r),wu;rd(S)||Dr(),i=Eu(e,i,s)}else rd(S)?(i.flags|=192,i.child=e.child,i=null):(e=k.treeContext,Ge=on(S.nextSibling),xt=i,Ae=!0,li=null,ln=!1,e!==null&&Yh(i,e),i=zu(i,r.children),i.flags|=4096);return i}return d?(hi(),S=r.fallback,d=i.mode,k=e.child,B=k.sibling,r=Un(k,{mode:"hidden",children:r.children}),r.subtreeFlags=k.subtreeFlags&65011712,B!==null?S=Un(B,S):(S=Yi(S,d,s,null),S.flags|=2),S.return=i,r.return=i,r.sibling=S,i.child=r,Fs(null,r),r=i.child,S=e.child.memoizedState,S===null?S=_u(s):(d=S.cachePool,d!==null?(k=lt._currentValue,d=d.parent!==k?{parent:k,pool:k}:d):d=Fh(),S={baseLanes:S.baseLanes|s,cachePool:d}),r.memoizedState=S,r.childLanes=ku(e,y,s),i.memoizedState=ju,Fs(e.child,r)):(fi(i),s=e.child,e=s.sibling,s=Un(s,{mode:"visible",children:r.children}),s.return=i,s.sibling=null,e!==null&&(y=i.deletions,y===null?(i.deletions=[e],i.flags|=16):y.push(e)),i.child=s,i.memoizedState=null,s)}function zu(e,i){return i=jr({mode:"visible",children:i},e.mode),i.return=e,e.child=i}function jr(e,i){return e=Kt(22,e,null,i),e.lanes=0,e}function Eu(e,i,s){return Wi(i,e.child,null,s),e=zu(i,i.pendingProps.children),e.flags|=2,i.memoizedState=null,e}function dp(e,i,s){e.lanes|=i;var r=e.alternate;r!==null&&(r.lanes|=i),Ic(e.return,i,s)}function Cu(e,i,s,r,d,h){var y=e.memoizedState;y===null?e.memoizedState={isBackwards:i,rendering:null,renderingStartTime:0,last:r,tail:s,tailMode:d,treeForkCount:h}:(y.isBackwards=i,y.rendering=null,y.renderingStartTime=0,y.last=r,y.tail=s,y.tailMode=d,y.treeForkCount=h)}function fp(e,i,s){var r=i.pendingProps,d=r.revealOrder,h=r.tail;r=r.children;var y=tt.current,S=(y&2)!==0;if(S?(y=y&1|2,i.flags|=128):y&=1,te(tt,y),wt(e,i,r,s),r=Ae?Bs:0,!S&&e!==null&&(e.flags&128)!==0)e:for(e=i.child;e!==null;){if(e.tag===13)e.memoizedState!==null&&dp(e,s,i);else if(e.tag===19)dp(e,s,i);else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===i)break e;for(;e.sibling===null;){if(e.return===null||e.return===i)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}switch(d){case"forwards":for(s=i.child,d=null;s!==null;)e=s.alternate,e!==null&&fr(e)===null&&(d=s),s=s.sibling;s=d,s===null?(d=i.child,i.child=null):(d=s.sibling,s.sibling=null),Cu(i,!1,d,s,h,r);break;case"backwards":case"unstable_legacy-backwards":for(s=null,d=i.child,i.child=null;d!==null;){if(e=d.alternate,e!==null&&fr(e)===null){i.child=d;break}e=d.sibling,d.sibling=s,s=d,d=e}Cu(i,!0,s,null,h,r);break;case"together":Cu(i,!1,null,null,void 0,r);break;default:i.memoizedState=null}return i.child}function In(e,i,s){if(e!==null&&(i.dependencies=e.dependencies),gi|=i.lanes,(s&i.childLanes)===0)if(e!==null){if(Da(e,i,s,!1),(s&i.childLanes)===0)return null}else return null;if(e!==null&&i.child!==e.child)throw Error(l(153));if(i.child!==null){for(e=i.child,s=Un(e,e.pendingProps),i.child=s,s.return=i;e.sibling!==null;)e=e.sibling,s=s.sibling=Un(e,e.pendingProps),s.return=i;s.sibling=null}return i.child}function Au(e,i){return(e.lanes&i)!==0?!0:(e=e.dependencies,!!(e!==null&&ar(e)))}function rS(e,i,s){switch(i.tag){case 3:de(i,i.stateNode.containerInfo),oi(i,lt,e.memoizedState.cache),Vi();break;case 27:case 5:et(i);break;case 4:de(i,i.stateNode.containerInfo);break;case 10:oi(i,i.type,i.memoizedProps.value);break;case 31:if(i.memoizedState!==null)return i.flags|=128,tu(i),null;break;case 13:var r=i.memoizedState;if(r!==null)return r.dehydrated!==null?(fi(i),i.flags|=128,null):(s&i.child.childLanes)!==0?up(e,i,s):(fi(i),e=In(e,i,s),e!==null?e.sibling:null);fi(i);break;case 19:var d=(e.flags&128)!==0;if(r=(s&i.childLanes)!==0,r||(Da(e,i,s,!1),r=(s&i.childLanes)!==0),d){if(r)return fp(e,i,s);i.flags|=128}if(d=i.memoizedState,d!==null&&(d.rendering=null,d.tail=null,d.lastEffect=null),te(tt,tt.current),r)break;return null;case 22:return i.lanes=0,ap(e,i,s,i.pendingProps);case 24:oi(i,lt,e.memoizedState.cache)}return In(e,i,s)}function hp(e,i,s){if(e!==null)if(e.memoizedProps!==i.pendingProps)ot=!0;else{if(!Au(e,s)&&(i.flags&128)===0)return ot=!1,rS(e,i,s);ot=(e.flags&131072)!==0}else ot=!1,Ae&&(i.flags&1048576)!==0&&Gh(i,Bs,i.index);switch(i.lanes=0,i.tag){case 16:e:{var r=i.pendingProps;if(e=Ji(i.elementType),i.type=e,typeof e=="function")Mc(e)?(r=ta(e,r),i.tag=1,i=op(null,i,e,r,s)):(i.tag=0,i=Nu(null,i,e,r,s));else{if(e!=null){var d=e.$$typeof;if(d===D){i.tag=11,i=tp(null,i,e,r,s);break e}else if(d===G){i.tag=14,i=np(null,i,e,r,s);break e}}throw i=Ke(e)||e,Error(l(306,i,""))}}return i;case 0:return Nu(e,i,i.type,i.pendingProps,s);case 1:return r=i.type,d=ta(r,i.pendingProps),op(e,i,r,d,s);case 3:e:{if(de(i,i.stateNode.containerInfo),e===null)throw Error(l(387));r=i.pendingProps;var h=i.memoizedState;d=h.element,Xc(e,i),Vs(i,r,null,s);var y=i.memoizedState;if(r=y.cache,oi(i,lt,r),r!==h.cache&&Kc(i,[lt],s,!0),Ys(),r=y.element,h.isDehydrated)if(h={element:r,isDehydrated:!1,cache:y.cache},i.updateQueue.baseState=h,i.memoizedState=h,i.flags&256){i=cp(e,i,r,s);break e}else if(r!==d){d=nn(Error(l(424)),i),Zs(d),i=cp(e,i,r,s);break e}else for(e=i.stateNode.containerInfo,e.nodeType===9?e=e.body:e=e.nodeName==="HTML"?e.ownerDocument.body:e,Ge=on(e.firstChild),xt=i,Ae=!0,li=null,ln=!0,s=am(i,null,r,s),i.child=s;s;)s.flags=s.flags&-3|4096,s=s.sibling;else{if(Vi(),r===d){i=In(e,i,s);break e}wt(e,i,r,s)}i=i.child}return i;case 26:return Nr(e,i),e===null?(s=jg(i.type,null,i.pendingProps,null))?i.memoizedState=s:Ae||(s=i.type,e=i.pendingProps,r=Zr(re.current).createElement(s),r[bt]=i,r[Ot]=e,Nt(r,s,e),pt(r),i.stateNode=r):i.memoizedState=jg(i.type,e.memoizedProps,i.pendingProps,e.memoizedState),null;case 27:return et(i),e===null&&Ae&&(r=i.stateNode=Sg(i.type,i.pendingProps,re.current),xt=i,ln=!0,d=Ge,Si(i.type)?(cd=d,Ge=on(r.firstChild)):Ge=d),wt(e,i,i.pendingProps.children,s),Nr(e,i),e===null&&(i.flags|=4194304),i.child;case 5:return e===null&&Ae&&((d=r=Ge)&&(r=US(r,i.type,i.pendingProps,ln),r!==null?(i.stateNode=r,xt=i,Ge=on(r.firstChild),ln=!1,d=!0):d=!1),d||ri(i)),et(i),d=i.type,h=i.pendingProps,y=e!==null?e.memoizedProps:null,r=h.children,ad(d,h)?r=null:y!==null&&ad(d,y)&&(i.flags|=32),i.memoizedState!==null&&(d=iu(e,i,Fx,null,null,s),hl._currentValue=d),Nr(e,i),wt(e,i,r,s),i.child;case 6:return e===null&&Ae&&((e=s=Ge)&&(s=$S(s,i.pendingProps,ln),s!==null?(i.stateNode=s,xt=i,Ge=null,e=!0):e=!1),e||ri(i)),null;case 13:return up(e,i,s);case 4:return de(i,i.stateNode.containerInfo),r=i.pendingProps,e===null?i.child=Wi(i,null,r,s):wt(e,i,r,s),i.child;case 11:return tp(e,i,i.type,i.pendingProps,s);case 7:return wt(e,i,i.pendingProps,s),i.child;case 8:return wt(e,i,i.pendingProps.children,s),i.child;case 12:return wt(e,i,i.pendingProps.children,s),i.child;case 10:return r=i.pendingProps,oi(i,i.type,r.value),wt(e,i,r.children,s),i.child;case 9:return d=i.type._context,r=i.pendingProps.children,Qi(i),d=St(d),r=r(d),i.flags|=1,wt(e,i,r,s),i.child;case 14:return np(e,i,i.type,i.pendingProps,s);case 15:return ip(e,i,i.type,i.pendingProps,s);case 19:return fp(e,i,s);case 31:return lS(e,i,s);case 22:return ap(e,i,s,i.pendingProps);case 24:return Qi(i),r=St(lt),e===null?(d=Vc(),d===null&&(d=He,h=Gc(),d.pooledCache=h,h.refCount++,h!==null&&(d.pooledCacheLanes|=s),d=h),i.memoizedState={parent:r,cache:d},Qc(i),oi(i,lt,d)):((e.lanes&s)!==0&&(Xc(e,i),Vs(i,null,null,s),Ys()),d=e.memoizedState,h=i.memoizedState,d.parent!==r?(d={parent:r,cache:r},i.memoizedState=d,i.lanes===0&&(i.memoizedState=i.updateQueue.baseState=d),oi(i,lt,r)):(r=h.cache,oi(i,lt,r),r!==d.cache&&Kc(i,[lt],s,!0))),wt(e,i,i.pendingProps.children,s),i.child;case 29:throw i.pendingProps}throw Error(l(156,i.tag))}function Kn(e){e.flags|=4}function Tu(e,i,s,r,d){if((i=(e.mode&32)!==0)&&(i=!1),i){if(e.flags|=16777216,(d&335544128)===d)if(e.stateNode.complete)e.flags|=8192;else if(Zp())e.flags|=8192;else throw Fi=or,Pc}else e.flags&=-16777217}function mp(e,i){if(i.type!=="stylesheet"||(i.state.loading&4)!==0)e.flags&=-16777217;else if(e.flags|=16777216,!Cg(i))if(Zp())e.flags|=8192;else throw Fi=or,Pc}function _r(e,i){i!==null&&(e.flags|=4),e.flags&16384&&(i=e.tag!==22?Vf():536870912,e.lanes|=i,Ga|=i)}function Ws(e,i){if(!Ae)switch(e.tailMode){case"hidden":i=e.tail;for(var s=null;i!==null;)i.alternate!==null&&(s=i),i=i.sibling;s===null?e.tail=null:s.sibling=null;break;case"collapsed":s=e.tail;for(var r=null;s!==null;)s.alternate!==null&&(r=s),s=s.sibling;r===null?i||e.tail===null?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ye(e){var i=e.alternate!==null&&e.alternate.child===e.child,s=0,r=0;if(i)for(var d=e.child;d!==null;)s|=d.lanes|d.childLanes,r|=d.subtreeFlags&65011712,r|=d.flags&65011712,d.return=e,d=d.sibling;else for(d=e.child;d!==null;)s|=d.lanes|d.childLanes,r|=d.subtreeFlags,r|=d.flags,d.return=e,d=d.sibling;return e.subtreeFlags|=r,e.childLanes=s,i}function oS(e,i,s){var r=i.pendingProps;switch(Bc(i),i.tag){case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ye(i),null;case 1:return Ye(i),null;case 3:return s=i.stateNode,r=null,e!==null&&(r=e.memoizedState.cache),i.memoizedState.cache!==r&&(i.flags|=2048),Zn(lt),me(),s.pendingContext&&(s.context=s.pendingContext,s.pendingContext=null),(e===null||e.child===null)&&(Oa(i)?Kn(i):e===null||e.memoizedState.isDehydrated&&(i.flags&256)===0||(i.flags|=1024,qc())),Ye(i),null;case 26:var d=i.type,h=i.memoizedState;return e===null?(Kn(i),h!==null?(Ye(i),mp(i,h)):(Ye(i),Tu(i,d,null,r,s))):h?h!==e.memoizedState?(Kn(i),Ye(i),mp(i,h)):(Ye(i),i.flags&=-16777217):(e=e.memoizedProps,e!==r&&Kn(i),Ye(i),Tu(i,d,e,r,s)),null;case 27:if(jt(i),s=re.current,d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&Kn(i);else{if(!r){if(i.stateNode===null)throw Error(l(166));return Ye(i),null}e=ie.current,Oa(i)?Vh(i):(e=Sg(d,r,s),i.stateNode=e,Kn(i))}return Ye(i),null;case 5:if(jt(i),d=i.type,e!==null&&i.stateNode!=null)e.memoizedProps!==r&&Kn(i);else{if(!r){if(i.stateNode===null)throw Error(l(166));return Ye(i),null}if(h=ie.current,Oa(i))Vh(i);else{var y=Zr(re.current);switch(h){case 1:h=y.createElementNS("http://www.w3.org/2000/svg",d);break;case 2:h=y.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;default:switch(d){case"svg":h=y.createElementNS("http://www.w3.org/2000/svg",d);break;case"math":h=y.createElementNS("http://www.w3.org/1998/Math/MathML",d);break;case"script":h=y.createElement("div"),h.innerHTML="<script><\/script>",h=h.removeChild(h.firstChild);break;case"select":h=typeof r.is=="string"?y.createElement("select",{is:r.is}):y.createElement("select"),r.multiple?h.multiple=!0:r.size&&(h.size=r.size);break;default:h=typeof r.is=="string"?y.createElement(d,{is:r.is}):y.createElement(d)}}h[bt]=i,h[Ot]=r;e:for(y=i.child;y!==null;){if(y.tag===5||y.tag===6)h.appendChild(y.stateNode);else if(y.tag!==4&&y.tag!==27&&y.child!==null){y.child.return=y,y=y.child;continue}if(y===i)break e;for(;y.sibling===null;){if(y.return===null||y.return===i)break e;y=y.return}y.sibling.return=y.return,y=y.sibling}i.stateNode=h;e:switch(Nt(h,d,r),d){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}r&&Kn(i)}}return Ye(i),Tu(i,i.type,e===null?null:e.memoizedProps,i.pendingProps,s),null;case 6:if(e&&i.stateNode!=null)e.memoizedProps!==r&&Kn(i);else{if(typeof r!="string"&&i.stateNode===null)throw Error(l(166));if(e=re.current,Oa(i)){if(e=i.stateNode,s=i.memoizedProps,r=null,d=xt,d!==null)switch(d.tag){case 27:case 5:r=d.memoizedProps}e[bt]=i,e=!!(e.nodeValue===s||r!==null&&r.suppressHydrationWarning===!0||ug(e.nodeValue,s)),e||ri(i,!0)}else e=Zr(e).createTextNode(r),e[bt]=i,i.stateNode=e}return Ye(i),null;case 31:if(s=i.memoizedState,e===null||e.memoizedState!==null){if(r=Oa(i),s!==null){if(e===null){if(!r)throw Error(l(318));if(e=i.memoizedState,e=e!==null?e.dehydrated:null,!e)throw Error(l(557));e[bt]=i}else Vi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ye(i),e=!1}else s=qc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=s),e=!0;if(!e)return i.flags&256?(Yt(i),i):(Yt(i),null);if((i.flags&128)!==0)throw Error(l(558))}return Ye(i),null;case 13:if(r=i.memoizedState,e===null||e.memoizedState!==null&&e.memoizedState.dehydrated!==null){if(d=Oa(i),r!==null&&r.dehydrated!==null){if(e===null){if(!d)throw Error(l(318));if(d=i.memoizedState,d=d!==null?d.dehydrated:null,!d)throw Error(l(317));d[bt]=i}else Vi(),(i.flags&128)===0&&(i.memoizedState=null),i.flags|=4;Ye(i),d=!1}else d=qc(),e!==null&&e.memoizedState!==null&&(e.memoizedState.hydrationErrors=d),d=!0;if(!d)return i.flags&256?(Yt(i),i):(Yt(i),null)}return Yt(i),(i.flags&128)!==0?(i.lanes=s,i):(s=r!==null,e=e!==null&&e.memoizedState!==null,s&&(r=i.child,d=null,r.alternate!==null&&r.alternate.memoizedState!==null&&r.alternate.memoizedState.cachePool!==null&&(d=r.alternate.memoizedState.cachePool.pool),h=null,r.memoizedState!==null&&r.memoizedState.cachePool!==null&&(h=r.memoizedState.cachePool.pool),h!==d&&(r.flags|=2048)),s!==e&&s&&(i.child.flags|=8192),_r(i,i.updateQueue),Ye(i),null);case 4:return me(),e===null&&Wu(i.stateNode.containerInfo),Ye(i),null;case 10:return Zn(i.type),Ye(i),null;case 19:if(K(tt),r=i.memoizedState,r===null)return Ye(i),null;if(d=(i.flags&128)!==0,h=r.rendering,h===null)if(d)Ws(r,!1);else{if(We!==0||e!==null&&(e.flags&128)!==0)for(e=i.child;e!==null;){if(h=fr(e),h!==null){for(i.flags|=128,Ws(r,!1),e=h.updateQueue,i.updateQueue=e,_r(i,e),i.subtreeFlags=0,e=s,s=i.child;s!==null;)Hh(s,e),s=s.sibling;return te(tt,tt.current&1|2),Ae&&$n(i,r.treeForkCount),i.child}e=e.sibling}r.tail!==null&&kt()>Ar&&(i.flags|=128,d=!0,Ws(r,!1),i.lanes=4194304)}else{if(!d)if(e=fr(h),e!==null){if(i.flags|=128,d=!0,e=e.updateQueue,i.updateQueue=e,_r(i,e),Ws(r,!0),r.tail===null&&r.tailMode==="hidden"&&!h.alternate&&!Ae)return Ye(i),null}else 2*kt()-r.renderingStartTime>Ar&&s!==536870912&&(i.flags|=128,d=!0,Ws(r,!1),i.lanes=4194304);r.isBackwards?(h.sibling=i.child,i.child=h):(e=r.last,e!==null?e.sibling=h:i.child=h,r.last=h)}return r.tail!==null?(e=r.tail,r.rendering=e,r.tail=e.sibling,r.renderingStartTime=kt(),e.sibling=null,s=tt.current,te(tt,d?s&1|2:s&1),Ae&&$n(i,r.treeForkCount),e):(Ye(i),null);case 22:case 23:return Yt(i),eu(),r=i.memoizedState!==null,e!==null?e.memoizedState!==null!==r&&(i.flags|=8192):r&&(i.flags|=8192),r?(s&536870912)!==0&&(i.flags&128)===0&&(Ye(i),i.subtreeFlags&6&&(i.flags|=8192)):Ye(i),s=i.updateQueue,s!==null&&_r(i,s.retryQueue),s=null,e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),r=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(r=i.memoizedState.cachePool.pool),r!==s&&(i.flags|=2048),e!==null&&K(Xi),null;case 24:return s=null,e!==null&&(s=e.memoizedState.cache),i.memoizedState.cache!==s&&(i.flags|=2048),Zn(lt),Ye(i),null;case 25:return null;case 30:return null}throw Error(l(156,i.tag))}function cS(e,i){switch(Bc(i),i.tag){case 1:return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 3:return Zn(lt),me(),e=i.flags,(e&65536)!==0&&(e&128)===0?(i.flags=e&-65537|128,i):null;case 26:case 27:case 5:return jt(i),null;case 31:if(i.memoizedState!==null){if(Yt(i),i.alternate===null)throw Error(l(340));Vi()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 13:if(Yt(i),e=i.memoizedState,e!==null&&e.dehydrated!==null){if(i.alternate===null)throw Error(l(340));Vi()}return e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 19:return K(tt),null;case 4:return me(),null;case 10:return Zn(i.type),null;case 22:case 23:return Yt(i),eu(),e!==null&&K(Xi),e=i.flags,e&65536?(i.flags=e&-65537|128,i):null;case 24:return Zn(lt),null;case 25:return null;default:return null}}function pp(e,i){switch(Bc(i),i.tag){case 3:Zn(lt),me();break;case 26:case 27:case 5:jt(i);break;case 4:me();break;case 31:i.memoizedState!==null&&Yt(i);break;case 13:Yt(i);break;case 19:K(tt);break;case 10:Zn(i.type);break;case 22:case 23:Yt(i),eu(),e!==null&&K(Xi);break;case 24:Zn(lt)}}function el(e,i){try{var s=i.updateQueue,r=s!==null?s.lastEffect:null;if(r!==null){var d=r.next;s=d;do{if((s.tag&e)===e){r=void 0;var h=s.create,y=s.inst;r=h(),y.destroy=r}s=s.next}while(s!==d)}}catch(S){Le(i,i.return,S)}}function mi(e,i,s){try{var r=i.updateQueue,d=r!==null?r.lastEffect:null;if(d!==null){var h=d.next;r=h;do{if((r.tag&e)===e){var y=r.inst,S=y.destroy;if(S!==void 0){y.destroy=void 0,d=i;var k=s,B=S;try{B()}catch(Y){Le(d,k,Y)}}}r=r.next}while(r!==h)}}catch(Y){Le(i,i.return,Y)}}function gp(e){var i=e.updateQueue;if(i!==null){var s=e.stateNode;try{lm(i,s)}catch(r){Le(e,e.return,r)}}}function yp(e,i,s){s.props=ta(e.type,e.memoizedProps),s.state=e.memoizedState;try{s.componentWillUnmount()}catch(r){Le(e,i,r)}}function tl(e,i){try{var s=e.ref;if(s!==null){switch(e.tag){case 26:case 27:case 5:var r=e.stateNode;break;case 30:r=e.stateNode;break;default:r=e.stateNode}typeof s=="function"?e.refCleanup=s(r):s.current=r}}catch(d){Le(e,i,d)}}function zn(e,i){var s=e.ref,r=e.refCleanup;if(s!==null)if(typeof r=="function")try{r()}catch(d){Le(e,i,d)}finally{e.refCleanup=null,e=e.alternate,e!=null&&(e.refCleanup=null)}else if(typeof s=="function")try{s(null)}catch(d){Le(e,i,d)}else s.current=null}function vp(e){var i=e.type,s=e.memoizedProps,r=e.stateNode;try{e:switch(i){case"button":case"input":case"select":case"textarea":s.autoFocus&&r.focus();break e;case"img":s.src?r.src=s.src:s.srcSet&&(r.srcset=s.srcSet)}}catch(d){Le(e,e.return,d)}}function Ou(e,i,s){try{var r=e.stateNode;TS(r,e.type,s,i),r[Ot]=i}catch(d){Le(e,e.return,d)}}function bp(e){return e.tag===5||e.tag===3||e.tag===26||e.tag===27&&Si(e.type)||e.tag===4}function Du(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||bp(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.tag===27&&Si(e.type)||e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ru(e,i,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,i?(s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s).insertBefore(e,i):(i=s.nodeType===9?s.body:s.nodeName==="HTML"?s.ownerDocument.body:s,i.appendChild(e),s=s._reactRootContainer,s!=null||i.onclick!==null||(i.onclick=Mn));else if(r!==4&&(r===27&&Si(e.type)&&(s=e.stateNode,i=null),e=e.child,e!==null))for(Ru(e,i,s),e=e.sibling;e!==null;)Ru(e,i,s),e=e.sibling}function kr(e,i,s){var r=e.tag;if(r===5||r===6)e=e.stateNode,i?s.insertBefore(e,i):s.appendChild(e);else if(r!==4&&(r===27&&Si(e.type)&&(s=e.stateNode),e=e.child,e!==null))for(kr(e,i,s),e=e.sibling;e!==null;)kr(e,i,s),e=e.sibling}function xp(e){var i=e.stateNode,s=e.memoizedProps;try{for(var r=e.type,d=i.attributes;d.length;)i.removeAttributeNode(d[0]);Nt(i,r,s),i[bt]=e,i[Ot]=s}catch(h){Le(e,e.return,h)}}var Gn=!1,ct=!1,Mu=!1,Sp=typeof WeakSet=="function"?WeakSet:Set,gt=null;function uS(e,i){if(e=e.containerInfo,nd=Vr,e=Dh(e),Ec(e)){if("selectionStart"in e)var s={start:e.selectionStart,end:e.selectionEnd};else e:{s=(s=e.ownerDocument)&&s.defaultView||window;var r=s.getSelection&&s.getSelection();if(r&&r.rangeCount!==0){s=r.anchorNode;var d=r.anchorOffset,h=r.focusNode;r=r.focusOffset;try{s.nodeType,h.nodeType}catch{s=null;break e}var y=0,S=-1,k=-1,B=0,Y=0,J=e,Z=null;t:for(;;){for(var H;J!==s||d!==0&&J.nodeType!==3||(S=y+d),J!==h||r!==0&&J.nodeType!==3||(k=y+r),J.nodeType===3&&(y+=J.nodeValue.length),(H=J.firstChild)!==null;)Z=J,J=H;for(;;){if(J===e)break t;if(Z===s&&++B===d&&(S=y),Z===h&&++Y===r&&(k=y),(H=J.nextSibling)!==null)break;J=Z,Z=J.parentNode}J=H}s=S===-1||k===-1?null:{start:S,end:k}}else s=null}s=s||{start:0,end:0}}else s=null;for(id={focusedElem:e,selectionRange:s},Vr=!1,gt=i;gt!==null;)if(i=gt,e=i.child,(i.subtreeFlags&1028)!==0&&e!==null)e.return=i,gt=e;else for(;gt!==null;){switch(i=gt,h=i.alternate,e=i.flags,i.tag){case 0:if((e&4)!==0&&(e=i.updateQueue,e=e!==null?e.events:null,e!==null))for(s=0;s<e.length;s++)d=e[s],d.ref.impl=d.nextImpl;break;case 11:case 15:break;case 1:if((e&1024)!==0&&h!==null){e=void 0,s=i,d=h.memoizedProps,h=h.memoizedState,r=s.stateNode;try{var oe=ta(s.type,d);e=r.getSnapshotBeforeUpdate(oe,h),r.__reactInternalSnapshotBeforeUpdate=e}catch(be){Le(s,s.return,be)}}break;case 3:if((e&1024)!==0){if(e=i.stateNode.containerInfo,s=e.nodeType,s===9)ld(e);else if(s===1)switch(e.nodeName){case"HEAD":case"HTML":case"BODY":ld(e);break;default:e.textContent=""}}break;case 5:case 26:case 27:case 6:case 4:case 17:break;default:if((e&1024)!==0)throw Error(l(163))}if(e=i.sibling,e!==null){e.return=i.return,gt=e;break}gt=i.return}}function wp(e,i,s){var r=s.flags;switch(s.tag){case 0:case 11:case 15:Vn(e,s),r&4&&el(5,s);break;case 1:if(Vn(e,s),r&4)if(e=s.stateNode,i===null)try{e.componentDidMount()}catch(y){Le(s,s.return,y)}else{var d=ta(s.type,i.memoizedProps);i=i.memoizedState;try{e.componentDidUpdate(d,i,e.__reactInternalSnapshotBeforeUpdate)}catch(y){Le(s,s.return,y)}}r&64&&gp(s),r&512&&tl(s,s.return);break;case 3:if(Vn(e,s),r&64&&(e=s.updateQueue,e!==null)){if(i=null,s.child!==null)switch(s.child.tag){case 27:case 5:i=s.child.stateNode;break;case 1:i=s.child.stateNode}try{lm(e,i)}catch(y){Le(s,s.return,y)}}break;case 27:i===null&&r&4&&xp(s);case 26:case 5:Vn(e,s),i===null&&r&4&&vp(s),r&512&&tl(s,s.return);break;case 12:Vn(e,s);break;case 31:Vn(e,s),r&4&&_p(e,s);break;case 13:Vn(e,s),r&4&&kp(e,s),r&64&&(e=s.memoizedState,e!==null&&(e=e.dehydrated,e!==null&&(s=bS.bind(null,s),BS(e,s))));break;case 22:if(r=s.memoizedState!==null||Gn,!r){i=i!==null&&i.memoizedState!==null||ct,d=Gn;var h=ct;Gn=r,(ct=i)&&!h?Pn(e,s,(s.subtreeFlags&8772)!==0):Vn(e,s),Gn=d,ct=h}break;case 30:break;default:Vn(e,s)}}function Np(e){var i=e.alternate;i!==null&&(e.alternate=null,Np(i)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(i=e.stateNode,i!==null&&dc(i)),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}var Ve=null,Rt=!1;function Yn(e,i,s){for(s=s.child;s!==null;)jp(e,i,s),s=s.sibling}function jp(e,i,s){if(qt&&typeof qt.onCommitFiberUnmount=="function")try{qt.onCommitFiberUnmount(_s,s)}catch{}switch(s.tag){case 26:ct||zn(s,i),Yn(e,i,s),s.memoizedState?s.memoizedState.count--:s.stateNode&&(s=s.stateNode,s.parentNode.removeChild(s));break;case 27:ct||zn(s,i);var r=Ve,d=Rt;Si(s.type)&&(Ve=s.stateNode,Rt=!1),Yn(e,i,s),ul(s.stateNode),Ve=r,Rt=d;break;case 5:ct||zn(s,i);case 6:if(r=Ve,d=Rt,Ve=null,Yn(e,i,s),Ve=r,Rt=d,Ve!==null)if(Rt)try{(Ve.nodeType===9?Ve.body:Ve.nodeName==="HTML"?Ve.ownerDocument.body:Ve).removeChild(s.stateNode)}catch(h){Le(s,i,h)}else try{Ve.removeChild(s.stateNode)}catch(h){Le(s,i,h)}break;case 18:Ve!==null&&(Rt?(e=Ve,gg(e.nodeType===9?e.body:e.nodeName==="HTML"?e.ownerDocument.body:e,s.stateNode),Wa(e)):gg(Ve,s.stateNode));break;case 4:r=Ve,d=Rt,Ve=s.stateNode.containerInfo,Rt=!0,Yn(e,i,s),Ve=r,Rt=d;break;case 0:case 11:case 14:case 15:mi(2,s,i),ct||mi(4,s,i),Yn(e,i,s);break;case 1:ct||(zn(s,i),r=s.stateNode,typeof r.componentWillUnmount=="function"&&yp(s,i,r)),Yn(e,i,s);break;case 21:Yn(e,i,s);break;case 22:ct=(r=ct)||s.memoizedState!==null,Yn(e,i,s),ct=r;break;default:Yn(e,i,s)}}function _p(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null))){e=e.dehydrated;try{Wa(e)}catch(s){Le(i,i.return,s)}}}function kp(e,i){if(i.memoizedState===null&&(e=i.alternate,e!==null&&(e=e.memoizedState,e!==null&&(e=e.dehydrated,e!==null))))try{Wa(e)}catch(s){Le(i,i.return,s)}}function dS(e){switch(e.tag){case 31:case 13:case 19:var i=e.stateNode;return i===null&&(i=e.stateNode=new Sp),i;case 22:return e=e.stateNode,i=e._retryCache,i===null&&(i=e._retryCache=new Sp),i;default:throw Error(l(435,e.tag))}}function zr(e,i){var s=dS(e);i.forEach(function(r){if(!s.has(r)){s.add(r);var d=xS.bind(null,e,r);r.then(d,d)}})}function Mt(e,i){var s=i.deletions;if(s!==null)for(var r=0;r<s.length;r++){var d=s[r],h=e,y=i,S=y;e:for(;S!==null;){switch(S.tag){case 27:if(Si(S.type)){Ve=S.stateNode,Rt=!1;break e}break;case 5:Ve=S.stateNode,Rt=!1;break e;case 3:case 4:Ve=S.stateNode.containerInfo,Rt=!0;break e}S=S.return}if(Ve===null)throw Error(l(160));jp(h,y,d),Ve=null,Rt=!1,h=d.alternate,h!==null&&(h.return=null),d.return=null}if(i.subtreeFlags&13886)for(i=i.child;i!==null;)zp(i,e),i=i.sibling}var yn=null;function zp(e,i){var s=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:Mt(i,e),Lt(e),r&4&&(mi(3,e,e.return),el(3,e),mi(5,e,e.return));break;case 1:Mt(i,e),Lt(e),r&512&&(ct||s===null||zn(s,s.return)),r&64&&Gn&&(e=e.updateQueue,e!==null&&(r=e.callbacks,r!==null&&(s=e.shared.hiddenCallbacks,e.shared.hiddenCallbacks=s===null?r:s.concat(r))));break;case 26:var d=yn;if(Mt(i,e),Lt(e),r&512&&(ct||s===null||zn(s,s.return)),r&4){var h=s!==null?s.memoizedState:null;if(r=e.memoizedState,s===null)if(r===null)if(e.stateNode===null){e:{r=e.type,s=e.memoizedProps,d=d.ownerDocument||d;t:switch(r){case"title":h=d.getElementsByTagName("title")[0],(!h||h[Es]||h[bt]||h.namespaceURI==="http://www.w3.org/2000/svg"||h.hasAttribute("itemprop"))&&(h=d.createElement(r),d.head.insertBefore(h,d.querySelector("head > title"))),Nt(h,r,s),h[bt]=e,pt(h),r=h;break e;case"link":var y=zg("link","href",d).get(r+(s.href||""));if(y){for(var S=0;S<y.length;S++)if(h=y[S],h.getAttribute("href")===(s.href==null||s.href===""?null:s.href)&&h.getAttribute("rel")===(s.rel==null?null:s.rel)&&h.getAttribute("title")===(s.title==null?null:s.title)&&h.getAttribute("crossorigin")===(s.crossOrigin==null?null:s.crossOrigin)){y.splice(S,1);break t}}h=d.createElement(r),Nt(h,r,s),d.head.appendChild(h);break;case"meta":if(y=zg("meta","content",d).get(r+(s.content||""))){for(S=0;S<y.length;S++)if(h=y[S],h.getAttribute("content")===(s.content==null?null:""+s.content)&&h.getAttribute("name")===(s.name==null?null:s.name)&&h.getAttribute("property")===(s.property==null?null:s.property)&&h.getAttribute("http-equiv")===(s.httpEquiv==null?null:s.httpEquiv)&&h.getAttribute("charset")===(s.charSet==null?null:s.charSet)){y.splice(S,1);break t}}h=d.createElement(r),Nt(h,r,s),d.head.appendChild(h);break;default:throw Error(l(468,r))}h[bt]=e,pt(h),r=h}e.stateNode=r}else Eg(d,e.type,e.stateNode);else e.stateNode=kg(d,r,e.memoizedProps);else h!==r?(h===null?s.stateNode!==null&&(s=s.stateNode,s.parentNode.removeChild(s)):h.count--,r===null?Eg(d,e.type,e.stateNode):kg(d,r,e.memoizedProps)):r===null&&e.stateNode!==null&&Ou(e,e.memoizedProps,s.memoizedProps)}break;case 27:Mt(i,e),Lt(e),r&512&&(ct||s===null||zn(s,s.return)),s!==null&&r&4&&Ou(e,e.memoizedProps,s.memoizedProps);break;case 5:if(Mt(i,e),Lt(e),r&512&&(ct||s===null||zn(s,s.return)),e.flags&32){d=e.stateNode;try{wa(d,"")}catch(oe){Le(e,e.return,oe)}}r&4&&e.stateNode!=null&&(d=e.memoizedProps,Ou(e,d,s!==null?s.memoizedProps:d)),r&1024&&(Mu=!0);break;case 6:if(Mt(i,e),Lt(e),r&4){if(e.stateNode===null)throw Error(l(162));r=e.memoizedProps,s=e.stateNode;try{s.nodeValue=r}catch(oe){Le(e,e.return,oe)}}break;case 3:if(Ir=null,d=yn,yn=qr(i.containerInfo),Mt(i,e),yn=d,Lt(e),r&4&&s!==null&&s.memoizedState.isDehydrated)try{Wa(i.containerInfo)}catch(oe){Le(e,e.return,oe)}Mu&&(Mu=!1,Ep(e));break;case 4:r=yn,yn=qr(e.stateNode.containerInfo),Mt(i,e),Lt(e),yn=r;break;case 12:Mt(i,e),Lt(e);break;case 31:Mt(i,e),Lt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,zr(e,r)));break;case 13:Mt(i,e),Lt(e),e.child.flags&8192&&e.memoizedState!==null!=(s!==null&&s.memoizedState!==null)&&(Cr=kt()),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,zr(e,r)));break;case 22:d=e.memoizedState!==null;var k=s!==null&&s.memoizedState!==null,B=Gn,Y=ct;if(Gn=B||d,ct=Y||k,Mt(i,e),ct=Y,Gn=B,Lt(e),r&8192)e:for(i=e.stateNode,i._visibility=d?i._visibility&-2:i._visibility|1,d&&(s===null||k||Gn||ct||na(e)),s=null,i=e;;){if(i.tag===5||i.tag===26){if(s===null){k=s=i;try{if(h=k.stateNode,d)y=h.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none";else{S=k.stateNode;var J=k.memoizedProps.style,Z=J!=null&&J.hasOwnProperty("display")?J.display:null;S.style.display=Z==null||typeof Z=="boolean"?"":(""+Z).trim()}}catch(oe){Le(k,k.return,oe)}}}else if(i.tag===6){if(s===null){k=i;try{k.stateNode.nodeValue=d?"":k.memoizedProps}catch(oe){Le(k,k.return,oe)}}}else if(i.tag===18){if(s===null){k=i;try{var H=k.stateNode;d?yg(H,!0):yg(k.stateNode,!1)}catch(oe){Le(k,k.return,oe)}}}else if((i.tag!==22&&i.tag!==23||i.memoizedState===null||i===e)&&i.child!==null){i.child.return=i,i=i.child;continue}if(i===e)break e;for(;i.sibling===null;){if(i.return===null||i.return===e)break e;s===i&&(s=null),i=i.return}s===i&&(s=null),i.sibling.return=i.return,i=i.sibling}r&4&&(r=e.updateQueue,r!==null&&(s=r.retryQueue,s!==null&&(r.retryQueue=null,zr(e,s))));break;case 19:Mt(i,e),Lt(e),r&4&&(r=e.updateQueue,r!==null&&(e.updateQueue=null,zr(e,r)));break;case 30:break;case 21:break;default:Mt(i,e),Lt(e)}}function Lt(e){var i=e.flags;if(i&2){try{for(var s,r=e.return;r!==null;){if(bp(r)){s=r;break}r=r.return}if(s==null)throw Error(l(160));switch(s.tag){case 27:var d=s.stateNode,h=Du(e);kr(e,h,d);break;case 5:var y=s.stateNode;s.flags&32&&(wa(y,""),s.flags&=-33);var S=Du(e);kr(e,S,y);break;case 3:case 4:var k=s.stateNode.containerInfo,B=Du(e);Ru(e,B,k);break;default:throw Error(l(161))}}catch(Y){Le(e,e.return,Y)}e.flags&=-3}i&4096&&(e.flags&=-4097)}function Ep(e){if(e.subtreeFlags&1024)for(e=e.child;e!==null;){var i=e;Ep(i),i.tag===5&&i.flags&1024&&i.stateNode.reset(),e=e.sibling}}function Vn(e,i){if(i.subtreeFlags&8772)for(i=i.child;i!==null;)wp(e,i.alternate,i),i=i.sibling}function na(e){for(e=e.child;e!==null;){var i=e;switch(i.tag){case 0:case 11:case 14:case 15:mi(4,i,i.return),na(i);break;case 1:zn(i,i.return);var s=i.stateNode;typeof s.componentWillUnmount=="function"&&yp(i,i.return,s),na(i);break;case 27:ul(i.stateNode);case 26:case 5:zn(i,i.return),na(i);break;case 22:i.memoizedState===null&&na(i);break;case 30:na(i);break;default:na(i)}e=e.sibling}}function Pn(e,i,s){for(s=s&&(i.subtreeFlags&8772)!==0,i=i.child;i!==null;){var r=i.alternate,d=e,h=i,y=h.flags;switch(h.tag){case 0:case 11:case 15:Pn(d,h,s),el(4,h);break;case 1:if(Pn(d,h,s),r=h,d=r.stateNode,typeof d.componentDidMount=="function")try{d.componentDidMount()}catch(B){Le(r,r.return,B)}if(r=h,d=r.updateQueue,d!==null){var S=r.stateNode;try{var k=d.shared.hiddenCallbacks;if(k!==null)for(d.shared.hiddenCallbacks=null,d=0;d<k.length;d++)sm(k[d],S)}catch(B){Le(r,r.return,B)}}s&&y&64&&gp(h),tl(h,h.return);break;case 27:xp(h);case 26:case 5:Pn(d,h,s),s&&r===null&&y&4&&vp(h),tl(h,h.return);break;case 12:Pn(d,h,s);break;case 31:Pn(d,h,s),s&&y&4&&_p(d,h);break;case 13:Pn(d,h,s),s&&y&4&&kp(d,h);break;case 22:h.memoizedState===null&&Pn(d,h,s),tl(h,h.return);break;case 30:break;default:Pn(d,h,s)}i=i.sibling}}function Lu(e,i){var s=null;e!==null&&e.memoizedState!==null&&e.memoizedState.cachePool!==null&&(s=e.memoizedState.cachePool.pool),e=null,i.memoizedState!==null&&i.memoizedState.cachePool!==null&&(e=i.memoizedState.cachePool.pool),e!==s&&(e!=null&&e.refCount++,s!=null&&qs(s))}function Uu(e,i){e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&qs(e))}function vn(e,i,s,r){if(i.subtreeFlags&10256)for(i=i.child;i!==null;)Cp(e,i,s,r),i=i.sibling}function Cp(e,i,s,r){var d=i.flags;switch(i.tag){case 0:case 11:case 15:vn(e,i,s,r),d&2048&&el(9,i);break;case 1:vn(e,i,s,r);break;case 3:vn(e,i,s,r),d&2048&&(e=null,i.alternate!==null&&(e=i.alternate.memoizedState.cache),i=i.memoizedState.cache,i!==e&&(i.refCount++,e!=null&&qs(e)));break;case 12:if(d&2048){vn(e,i,s,r),e=i.stateNode;try{var h=i.memoizedProps,y=h.id,S=h.onPostCommit;typeof S=="function"&&S(y,i.alternate===null?"mount":"update",e.passiveEffectDuration,-0)}catch(k){Le(i,i.return,k)}}else vn(e,i,s,r);break;case 31:vn(e,i,s,r);break;case 13:vn(e,i,s,r);break;case 23:break;case 22:h=i.stateNode,y=i.alternate,i.memoizedState!==null?h._visibility&2?vn(e,i,s,r):nl(e,i):h._visibility&2?vn(e,i,s,r):(h._visibility|=2,Ha(e,i,s,r,(i.subtreeFlags&10256)!==0||!1)),d&2048&&Lu(y,i);break;case 24:vn(e,i,s,r),d&2048&&Uu(i.alternate,i);break;default:vn(e,i,s,r)}}function Ha(e,i,s,r,d){for(d=d&&((i.subtreeFlags&10256)!==0||!1),i=i.child;i!==null;){var h=e,y=i,S=s,k=r,B=y.flags;switch(y.tag){case 0:case 11:case 15:Ha(h,y,S,k,d),el(8,y);break;case 23:break;case 22:var Y=y.stateNode;y.memoizedState!==null?Y._visibility&2?Ha(h,y,S,k,d):nl(h,y):(Y._visibility|=2,Ha(h,y,S,k,d)),d&&B&2048&&Lu(y.alternate,y);break;case 24:Ha(h,y,S,k,d),d&&B&2048&&Uu(y.alternate,y);break;default:Ha(h,y,S,k,d)}i=i.sibling}}function nl(e,i){if(i.subtreeFlags&10256)for(i=i.child;i!==null;){var s=e,r=i,d=r.flags;switch(r.tag){case 22:nl(s,r),d&2048&&Lu(r.alternate,r);break;case 24:nl(s,r),d&2048&&Uu(r.alternate,r);break;default:nl(s,r)}i=i.sibling}}var il=8192;function Ia(e,i,s){if(e.subtreeFlags&il)for(e=e.child;e!==null;)Ap(e,i,s),e=e.sibling}function Ap(e,i,s){switch(e.tag){case 26:Ia(e,i,s),e.flags&il&&e.memoizedState!==null&&JS(s,yn,e.memoizedState,e.memoizedProps);break;case 5:Ia(e,i,s);break;case 3:case 4:var r=yn;yn=qr(e.stateNode.containerInfo),Ia(e,i,s),yn=r;break;case 22:e.memoizedState===null&&(r=e.alternate,r!==null&&r.memoizedState!==null?(r=il,il=16777216,Ia(e,i,s),il=r):Ia(e,i,s));break;default:Ia(e,i,s)}}function Tp(e){var i=e.alternate;if(i!==null&&(e=i.child,e!==null)){i.child=null;do i=e.sibling,e.sibling=null,e=i;while(e!==null)}}function al(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];gt=r,Dp(r,e)}Tp(e)}if(e.subtreeFlags&10256)for(e=e.child;e!==null;)Op(e),e=e.sibling}function Op(e){switch(e.tag){case 0:case 11:case 15:al(e),e.flags&2048&&mi(9,e,e.return);break;case 3:al(e);break;case 12:al(e);break;case 22:var i=e.stateNode;e.memoizedState!==null&&i._visibility&2&&(e.return===null||e.return.tag!==13)?(i._visibility&=-3,Er(e)):al(e);break;default:al(e)}}function Er(e){var i=e.deletions;if((e.flags&16)!==0){if(i!==null)for(var s=0;s<i.length;s++){var r=i[s];gt=r,Dp(r,e)}Tp(e)}for(e=e.child;e!==null;){switch(i=e,i.tag){case 0:case 11:case 15:mi(8,i,i.return),Er(i);break;case 22:s=i.stateNode,s._visibility&2&&(s._visibility&=-3,Er(i));break;default:Er(i)}e=e.sibling}}function Dp(e,i){for(;gt!==null;){var s=gt;switch(s.tag){case 0:case 11:case 15:mi(8,s,i);break;case 23:case 22:if(s.memoizedState!==null&&s.memoizedState.cachePool!==null){var r=s.memoizedState.cachePool.pool;r!=null&&r.refCount++}break;case 24:qs(s.memoizedState.cache)}if(r=s.child,r!==null)r.return=s,gt=r;else e:for(s=e;gt!==null;){r=gt;var d=r.sibling,h=r.return;if(Np(r),r===s){gt=null;break e}if(d!==null){d.return=h,gt=d;break e}gt=h}}}var fS={getCacheForType:function(e){var i=St(lt),s=i.data.get(e);return s===void 0&&(s=e(),i.data.set(e,s)),s},cacheSignal:function(){return St(lt).controller.signal}},hS=typeof WeakMap=="function"?WeakMap:Map,De=0,He=null,ke=null,Ee=0,Me=0,Vt=null,pi=!1,Ka=!1,$u=!1,Qn=0,We=0,gi=0,ia=0,Bu=0,Pt=0,Ga=0,sl=null,Ut=null,Zu=!1,Cr=0,Rp=0,Ar=1/0,Tr=null,yi=null,ft=0,vi=null,Ya=null,Xn=0,qu=0,Hu=null,Mp=null,ll=0,Iu=null;function Qt(){return(De&2)!==0&&Ee!==0?Ee&-Ee:U.T!==null?Qu():Jf()}function Lp(){if(Pt===0)if((Ee&536870912)===0||Ae){var e=Bl;Bl<<=1,(Bl&3932160)===0&&(Bl=262144),Pt=e}else Pt=536870912;return e=Gt.current,e!==null&&(e.flags|=32),Pt}function $t(e,i,s){(e===He&&(Me===2||Me===9)||e.cancelPendingCommit!==null)&&(Va(e,0),bi(e,Ee,Pt,!1)),zs(e,s),((De&2)===0||e!==He)&&(e===He&&((De&2)===0&&(ia|=s),We===4&&bi(e,Ee,Pt,!1)),En(e))}function Up(e,i,s){if((De&6)!==0)throw Error(l(327));var r=!s&&(i&127)===0&&(i&e.expiredLanes)===0||ks(e,i),d=r?gS(e,i):Gu(e,i,!0),h=r;do{if(d===0){Ka&&!r&&bi(e,i,0,!1);break}else{if(s=e.current.alternate,h&&!mS(s)){d=Gu(e,i,!1),h=!1;continue}if(d===2){if(h=i,e.errorRecoveryDisabledLanes&h)var y=0;else y=e.pendingLanes&-536870913,y=y!==0?y:y&536870912?536870912:0;if(y!==0){i=y;e:{var S=e;d=sl;var k=S.current.memoizedState.isDehydrated;if(k&&(Va(S,y).flags|=256),y=Gu(S,y,!1),y!==2){if($u&&!k){S.errorRecoveryDisabledLanes|=h,ia|=h,d=4;break e}h=Ut,Ut=d,h!==null&&(Ut===null?Ut=h:Ut.push.apply(Ut,h))}d=y}if(h=!1,d!==2)continue}}if(d===1){Va(e,0),bi(e,i,0,!0);break}e:{switch(r=e,h=d,h){case 0:case 1:throw Error(l(345));case 4:if((i&4194048)!==i)break;case 6:bi(r,i,Pt,!pi);break e;case 2:Ut=null;break;case 3:case 5:break;default:throw Error(l(329))}if((i&62914560)===i&&(d=Cr+300-kt(),10<d)){if(bi(r,i,Pt,!pi),ql(r,0,!0)!==0)break e;Xn=i,r.timeoutHandle=mg($p.bind(null,r,s,Ut,Tr,Zu,i,Pt,ia,Ga,pi,h,"Throttled",-0,0),d);break e}$p(r,s,Ut,Tr,Zu,i,Pt,ia,Ga,pi,h,null,-0,0)}}break}while(!0);En(e)}function $p(e,i,s,r,d,h,y,S,k,B,Y,J,Z,H){if(e.timeoutHandle=-1,J=i.subtreeFlags,J&8192||(J&16785408)===16785408){J={stylesheets:null,count:0,imgCount:0,imgBytes:0,suspenseyImages:[],waitingForImages:!0,waitingForViewTransition:!1,unsuspend:Mn},Ap(i,h,J);var oe=(h&62914560)===h?Cr-kt():(h&4194048)===h?Rp-kt():0;if(oe=FS(J,oe),oe!==null){Xn=h,e.cancelPendingCommit=oe(Yp.bind(null,e,i,h,s,r,d,y,S,k,Y,J,null,Z,H)),bi(e,h,y,!B);return}}Yp(e,i,h,s,r,d,y,S,k)}function mS(e){for(var i=e;;){var s=i.tag;if((s===0||s===11||s===15)&&i.flags&16384&&(s=i.updateQueue,s!==null&&(s=s.stores,s!==null)))for(var r=0;r<s.length;r++){var d=s[r],h=d.getSnapshot;d=d.value;try{if(!It(h(),d))return!1}catch{return!1}}if(s=i.child,i.subtreeFlags&16384&&s!==null)s.return=i,i=s;else{if(i===e)break;for(;i.sibling===null;){if(i.return===null||i.return===e)return!0;i=i.return}i.sibling.return=i.return,i=i.sibling}}return!0}function bi(e,i,s,r){i&=~Bu,i&=~ia,e.suspendedLanes|=i,e.pingedLanes&=~i,r&&(e.warmLanes|=i),r=e.expirationTimes;for(var d=i;0<d;){var h=31-Ht(d),y=1<<h;r[h]=-1,d&=~y}s!==0&&Pf(e,s,i)}function Or(){return(De&6)===0?(rl(0),!1):!0}function Ku(){if(ke!==null){if(Me===0)var e=ke.return;else e=ke,Bn=Pi=null,lu(e),Ua=null,Is=0,e=ke;for(;e!==null;)pp(e.alternate,e),e=e.return;ke=null}}function Va(e,i){var s=e.timeoutHandle;s!==-1&&(e.timeoutHandle=-1,RS(s)),s=e.cancelPendingCommit,s!==null&&(e.cancelPendingCommit=null,s()),Xn=0,Ku(),He=e,ke=s=Un(e.current,null),Ee=i,Me=0,Vt=null,pi=!1,Ka=ks(e,i),$u=!1,Ga=Pt=Bu=ia=gi=We=0,Ut=sl=null,Zu=!1,(i&8)!==0&&(i|=i&32);var r=e.entangledLanes;if(r!==0)for(e=e.entanglements,r&=i;0<r;){var d=31-Ht(r),h=1<<d;i|=e[d],r&=~h}return Qn=i,Wl(),s}function Bp(e,i){Ne=null,U.H=Js,i===La||i===rr?(i=tm(),Me=3):i===Pc?(i=tm(),Me=4):Me=i===wu?8:i!==null&&typeof i=="object"&&typeof i.then=="function"?6:1,Vt=i,ke===null&&(We=1,Sr(e,nn(i,e.current)))}function Zp(){var e=Gt.current;return e===null?!0:(Ee&4194048)===Ee?rn===null:(Ee&62914560)===Ee||(Ee&536870912)!==0?e===rn:!1}function qp(){var e=U.H;return U.H=Js,e===null?Js:e}function Hp(){var e=U.A;return U.A=fS,e}function Dr(){We=4,pi||(Ee&4194048)!==Ee&&Gt.current!==null||(Ka=!0),(gi&134217727)===0&&(ia&134217727)===0||He===null||bi(He,Ee,Pt,!1)}function Gu(e,i,s){var r=De;De|=2;var d=qp(),h=Hp();(He!==e||Ee!==i)&&(Tr=null,Va(e,i)),i=!1;var y=We;e:do try{if(Me!==0&&ke!==null){var S=ke,k=Vt;switch(Me){case 8:Ku(),y=6;break e;case 3:case 2:case 9:case 6:Gt.current===null&&(i=!0);var B=Me;if(Me=0,Vt=null,Pa(e,S,k,B),s&&Ka){y=0;break e}break;default:B=Me,Me=0,Vt=null,Pa(e,S,k,B)}}pS(),y=We;break}catch(Y){Bp(e,Y)}while(!0);return i&&e.shellSuspendCounter++,Bn=Pi=null,De=r,U.H=d,U.A=h,ke===null&&(He=null,Ee=0,Wl()),y}function pS(){for(;ke!==null;)Ip(ke)}function gS(e,i){var s=De;De|=2;var r=qp(),d=Hp();He!==e||Ee!==i?(Tr=null,Ar=kt()+500,Va(e,i)):Ka=ks(e,i);e:do try{if(Me!==0&&ke!==null){i=ke;var h=Vt;t:switch(Me){case 1:Me=0,Vt=null,Pa(e,i,h,1);break;case 2:case 9:if(Wh(h)){Me=0,Vt=null,Kp(i);break}i=function(){Me!==2&&Me!==9||He!==e||(Me=7),En(e)},h.then(i,i);break e;case 3:Me=7;break e;case 4:Me=5;break e;case 7:Wh(h)?(Me=0,Vt=null,Kp(i)):(Me=0,Vt=null,Pa(e,i,h,7));break;case 5:var y=null;switch(ke.tag){case 26:y=ke.memoizedState;case 5:case 27:var S=ke;if(y?Cg(y):S.stateNode.complete){Me=0,Vt=null;var k=S.sibling;if(k!==null)ke=k;else{var B=S.return;B!==null?(ke=B,Rr(B)):ke=null}break t}}Me=0,Vt=null,Pa(e,i,h,5);break;case 6:Me=0,Vt=null,Pa(e,i,h,6);break;case 8:Ku(),We=6;break e;default:throw Error(l(462))}}yS();break}catch(Y){Bp(e,Y)}while(!0);return Bn=Pi=null,U.H=r,U.A=d,De=s,ke!==null?0:(He=null,Ee=0,Wl(),We)}function yS(){for(;ke!==null&&!ic();)Ip(ke)}function Ip(e){var i=hp(e.alternate,e,Qn);e.memoizedProps=e.pendingProps,i===null?Rr(e):ke=i}function Kp(e){var i=e,s=i.alternate;switch(i.tag){case 15:case 0:i=rp(s,i,i.pendingProps,i.type,void 0,Ee);break;case 11:i=rp(s,i,i.pendingProps,i.type.render,i.ref,Ee);break;case 5:lu(i);default:pp(s,i),i=ke=Hh(i,Qn),i=hp(s,i,Qn)}e.memoizedProps=e.pendingProps,i===null?Rr(e):ke=i}function Pa(e,i,s,r){Bn=Pi=null,lu(i),Ua=null,Is=0;var d=i.return;try{if(sS(e,d,i,s,Ee)){We=1,Sr(e,nn(s,e.current)),ke=null;return}}catch(h){if(d!==null)throw ke=d,h;We=1,Sr(e,nn(s,e.current)),ke=null;return}i.flags&32768?(Ae||r===1?e=!0:Ka||(Ee&536870912)!==0?e=!1:(pi=e=!0,(r===2||r===9||r===3||r===6)&&(r=Gt.current,r!==null&&r.tag===13&&(r.flags|=16384))),Gp(i,e)):Rr(i)}function Rr(e){var i=e;do{if((i.flags&32768)!==0){Gp(i,pi);return}e=i.return;var s=oS(i.alternate,i,Qn);if(s!==null){ke=s;return}if(i=i.sibling,i!==null){ke=i;return}ke=i=e}while(i!==null);We===0&&(We=5)}function Gp(e,i){do{var s=cS(e.alternate,e);if(s!==null){s.flags&=32767,ke=s;return}if(s=e.return,s!==null&&(s.flags|=32768,s.subtreeFlags=0,s.deletions=null),!i&&(e=e.sibling,e!==null)){ke=e;return}ke=e=s}while(e!==null);We=6,ke=null}function Yp(e,i,s,r,d,h,y,S,k){e.cancelPendingCommit=null;do Mr();while(ft!==0);if((De&6)!==0)throw Error(l(327));if(i!==null){if(i===e.current)throw Error(l(177));if(h=i.lanes|i.childLanes,h|=Dc,X0(e,s,h,y,S,k),e===He&&(ke=He=null,Ee=0),Ya=i,vi=e,Xn=s,qu=h,Hu=d,Mp=r,(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?(e.callbackNode=null,e.callbackPriority=0,SS(Ft,function(){return Jp(),null})):(e.callbackNode=null,e.callbackPriority=0),r=(i.flags&13878)!==0,(i.subtreeFlags&13878)!==0||r){r=U.T,U.T=null,d=W.p,W.p=2,y=De,De|=4;try{uS(e,i,s)}finally{De=y,W.p=d,U.T=r}}ft=1,Vp(),Pp(),Qp()}}function Vp(){if(ft===1){ft=0;var e=vi,i=Ya,s=(i.flags&13878)!==0;if((i.subtreeFlags&13878)!==0||s){s=U.T,U.T=null;var r=W.p;W.p=2;var d=De;De|=4;try{zp(i,e);var h=id,y=Dh(e.containerInfo),S=h.focusedElem,k=h.selectionRange;if(y!==S&&S&&S.ownerDocument&&Oh(S.ownerDocument.documentElement,S)){if(k!==null&&Ec(S)){var B=k.start,Y=k.end;if(Y===void 0&&(Y=B),"selectionStart"in S)S.selectionStart=B,S.selectionEnd=Math.min(Y,S.value.length);else{var J=S.ownerDocument||document,Z=J&&J.defaultView||window;if(Z.getSelection){var H=Z.getSelection(),oe=S.textContent.length,be=Math.min(k.start,oe),qe=k.end===void 0?be:Math.min(k.end,oe);!H.extend&&be>qe&&(y=qe,qe=be,be=y);var R=Th(S,be),A=Th(S,qe);if(R&&A&&(H.rangeCount!==1||H.anchorNode!==R.node||H.anchorOffset!==R.offset||H.focusNode!==A.node||H.focusOffset!==A.offset)){var $=J.createRange();$.setStart(R.node,R.offset),H.removeAllRanges(),be>qe?(H.addRange($),H.extend(A.node,A.offset)):($.setEnd(A.node,A.offset),H.addRange($))}}}}for(J=[],H=S;H=H.parentNode;)H.nodeType===1&&J.push({element:H,left:H.scrollLeft,top:H.scrollTop});for(typeof S.focus=="function"&&S.focus(),S=0;S<J.length;S++){var P=J[S];P.element.scrollLeft=P.left,P.element.scrollTop=P.top}}Vr=!!nd,id=nd=null}finally{De=d,W.p=r,U.T=s}}e.current=i,ft=2}}function Pp(){if(ft===2){ft=0;var e=vi,i=Ya,s=(i.flags&8772)!==0;if((i.subtreeFlags&8772)!==0||s){s=U.T,U.T=null;var r=W.p;W.p=2;var d=De;De|=4;try{wp(e,i.alternate,i)}finally{De=d,W.p=r,U.T=s}}ft=3}}function Qp(){if(ft===4||ft===3){ft=0,ac();var e=vi,i=Ya,s=Xn,r=Mp;(i.subtreeFlags&10256)!==0||(i.flags&10256)!==0?ft=5:(ft=0,Ya=vi=null,Xp(e,e.pendingLanes));var d=e.pendingLanes;if(d===0&&(yi=null),cc(s),i=i.stateNode,qt&&typeof qt.onCommitFiberRoot=="function")try{qt.onCommitFiberRoot(_s,i,void 0,(i.current.flags&128)===128)}catch{}if(r!==null){i=U.T,d=W.p,W.p=2,U.T=null;try{for(var h=e.onRecoverableError,y=0;y<r.length;y++){var S=r[y];h(S.value,{componentStack:S.stack})}}finally{U.T=i,W.p=d}}(Xn&3)!==0&&Mr(),En(e),d=e.pendingLanes,(s&261930)!==0&&(d&42)!==0?e===Iu?ll++:(ll=0,Iu=e):ll=0,rl(0)}}function Xp(e,i){(e.pooledCacheLanes&=i)===0&&(i=e.pooledCache,i!=null&&(e.pooledCache=null,qs(i)))}function Mr(){return Vp(),Pp(),Qp(),Jp()}function Jp(){if(ft!==5)return!1;var e=vi,i=qu;qu=0;var s=cc(Xn),r=U.T,d=W.p;try{W.p=32>s?32:s,U.T=null,s=Hu,Hu=null;var h=vi,y=Xn;if(ft=0,Ya=vi=null,Xn=0,(De&6)!==0)throw Error(l(331));var S=De;if(De|=4,Op(h.current),Cp(h,h.current,y,s),De=S,rl(0,!1),qt&&typeof qt.onPostCommitFiberRoot=="function")try{qt.onPostCommitFiberRoot(_s,h)}catch{}return!0}finally{W.p=d,U.T=r,Xp(e,i)}}function Fp(e,i,s){i=nn(s,i),i=Su(e.stateNode,i,2),e=di(e,i,2),e!==null&&(zs(e,2),En(e))}function Le(e,i,s){if(e.tag===3)Fp(e,e,s);else for(;i!==null;){if(i.tag===3){Fp(i,e,s);break}else if(i.tag===1){var r=i.stateNode;if(typeof i.type.getDerivedStateFromError=="function"||typeof r.componentDidCatch=="function"&&(yi===null||!yi.has(r))){e=nn(s,e),s=Wm(2),r=di(i,s,2),r!==null&&(ep(s,r,i,e),zs(r,2),En(r));break}}i=i.return}}function Yu(e,i,s){var r=e.pingCache;if(r===null){r=e.pingCache=new hS;var d=new Set;r.set(i,d)}else d=r.get(i),d===void 0&&(d=new Set,r.set(i,d));d.has(s)||($u=!0,d.add(s),e=vS.bind(null,e,i,s),i.then(e,e))}function vS(e,i,s){var r=e.pingCache;r!==null&&r.delete(i),e.pingedLanes|=e.suspendedLanes&s,e.warmLanes&=~s,He===e&&(Ee&s)===s&&(We===4||We===3&&(Ee&62914560)===Ee&&300>kt()-Cr?(De&2)===0&&Va(e,0):Bu|=s,Ga===Ee&&(Ga=0)),En(e)}function Wp(e,i){i===0&&(i=Vf()),e=Gi(e,i),e!==null&&(zs(e,i),En(e))}function bS(e){var i=e.memoizedState,s=0;i!==null&&(s=i.retryLane),Wp(e,s)}function xS(e,i){var s=0;switch(e.tag){case 31:case 13:var r=e.stateNode,d=e.memoizedState;d!==null&&(s=d.retryLane);break;case 19:r=e.stateNode;break;case 22:r=e.stateNode._retryCache;break;default:throw Error(l(314))}r!==null&&r.delete(i),Wp(e,s)}function SS(e,i){return Jt(e,i)}var Lr=null,Qa=null,Vu=!1,Ur=!1,Pu=!1,xi=0;function En(e){e!==Qa&&e.next===null&&(Qa===null?Lr=Qa=e:Qa=Qa.next=e),Ur=!0,Vu||(Vu=!0,NS())}function rl(e,i){if(!Pu&&Ur){Pu=!0;do for(var s=!1,r=Lr;r!==null;){if(e!==0){var d=r.pendingLanes;if(d===0)var h=0;else{var y=r.suspendedLanes,S=r.pingedLanes;h=(1<<31-Ht(42|e)+1)-1,h&=d&~(y&~S),h=h&201326741?h&201326741|1:h?h|2:0}h!==0&&(s=!0,ig(r,h))}else h=Ee,h=ql(r,r===He?h:0,r.cancelPendingCommit!==null||r.timeoutHandle!==-1),(h&3)===0||ks(r,h)||(s=!0,ig(r,h));r=r.next}while(s);Pu=!1}}function wS(){eg()}function eg(){Ur=Vu=!1;var e=0;xi!==0&&DS()&&(e=xi);for(var i=kt(),s=null,r=Lr;r!==null;){var d=r.next,h=tg(r,i);h===0?(r.next=null,s===null?Lr=d:s.next=d,d===null&&(Qa=s)):(s=r,(e!==0||(h&3)!==0)&&(Ur=!0)),r=d}ft!==0&&ft!==5||rl(e),xi!==0&&(xi=0)}function tg(e,i){for(var s=e.suspendedLanes,r=e.pingedLanes,d=e.expirationTimes,h=e.pendingLanes&-62914561;0<h;){var y=31-Ht(h),S=1<<y,k=d[y];k===-1?((S&s)===0||(S&r)!==0)&&(d[y]=Q0(S,i)):k<=i&&(e.expiredLanes|=S),h&=~S}if(i=He,s=Ee,s=ql(e,e===i?s:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r=e.callbackNode,s===0||e===i&&(Me===2||Me===9)||e.cancelPendingCommit!==null)return r!==null&&r!==null&&On(r),e.callbackNode=null,e.callbackPriority=0;if((s&3)===0||ks(e,s)){if(i=s&-s,i===e.callbackPriority)return i;switch(r!==null&&On(r),cc(s)){case 2:case 8:s=Ul;break;case 32:s=Ft;break;case 268435456:s=ae;break;default:s=Ft}return r=ng.bind(null,e),s=Jt(s,r),e.callbackPriority=i,e.callbackNode=s,i}return r!==null&&r!==null&&On(r),e.callbackPriority=2,e.callbackNode=null,2}function ng(e,i){if(ft!==0&&ft!==5)return e.callbackNode=null,e.callbackPriority=0,null;var s=e.callbackNode;if(Mr()&&e.callbackNode!==s)return null;var r=Ee;return r=ql(e,e===He?r:0,e.cancelPendingCommit!==null||e.timeoutHandle!==-1),r===0?null:(Up(e,r,i),tg(e,kt()),e.callbackNode!=null&&e.callbackNode===s?ng.bind(null,e):null)}function ig(e,i){if(Mr())return null;Up(e,i,!0)}function NS(){MS(function(){(De&6)!==0?Jt(Ll,wS):eg()})}function Qu(){if(xi===0){var e=Ra;e===0&&(e=$l,$l<<=1,($l&261888)===0&&($l=256)),xi=e}return xi}function ag(e){return e==null||typeof e=="symbol"||typeof e=="boolean"?null:typeof e=="function"?e:Gl(""+e)}function sg(e,i){var s=i.ownerDocument.createElement("input");return s.name=i.name,s.value=i.value,e.id&&s.setAttribute("form",e.id),i.parentNode.insertBefore(s,i),e=new FormData(e),s.parentNode.removeChild(s),e}function jS(e,i,s,r,d){if(i==="submit"&&s&&s.stateNode===d){var h=ag((d[Ot]||null).action),y=r.submitter;y&&(i=(i=y[Ot]||null)?ag(i.formAction):y.getAttribute("formAction"),i!==null&&(h=i,y=null));var S=new Ql("action","action",null,r,d);e.push({event:S,listeners:[{instance:null,listener:function(){if(r.defaultPrevented){if(xi!==0){var k=y?sg(d,y):new FormData(d);pu(s,{pending:!0,data:k,method:d.method,action:h},null,k)}}else typeof h=="function"&&(S.preventDefault(),k=y?sg(d,y):new FormData(d),pu(s,{pending:!0,data:k,method:d.method,action:h},h,k))},currentTarget:d}]})}}for(var Xu=0;Xu<Oc.length;Xu++){var Ju=Oc[Xu],_S=Ju.toLowerCase(),kS=Ju[0].toUpperCase()+Ju.slice(1);gn(_S,"on"+kS)}gn(Lh,"onAnimationEnd"),gn(Uh,"onAnimationIteration"),gn($h,"onAnimationStart"),gn("dblclick","onDoubleClick"),gn("focusin","onFocus"),gn("focusout","onBlur"),gn(Hx,"onTransitionRun"),gn(Ix,"onTransitionStart"),gn(Kx,"onTransitionCancel"),gn(Bh,"onTransitionEnd"),xa("onMouseEnter",["mouseout","mouseover"]),xa("onMouseLeave",["mouseout","mouseover"]),xa("onPointerEnter",["pointerout","pointerover"]),xa("onPointerLeave",["pointerout","pointerover"]),qi("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),qi("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),qi("onBeforeInput",["compositionend","keypress","textInput","paste"]),qi("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),qi("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var ol="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),zS=new Set("beforetoggle cancel close invalid load scroll scrollend toggle".split(" ").concat(ol));function lg(e,i){i=(i&4)!==0;for(var s=0;s<e.length;s++){var r=e[s],d=r.event;r=r.listeners;e:{var h=void 0;if(i)for(var y=r.length-1;0<=y;y--){var S=r[y],k=S.instance,B=S.currentTarget;if(S=S.listener,k!==h&&d.isPropagationStopped())break e;h=S,d.currentTarget=B;try{h(d)}catch(Y){Fl(Y)}d.currentTarget=null,h=k}else for(y=0;y<r.length;y++){if(S=r[y],k=S.instance,B=S.currentTarget,S=S.listener,k!==h&&d.isPropagationStopped())break e;h=S,d.currentTarget=B;try{h(d)}catch(Y){Fl(Y)}d.currentTarget=null,h=k}}}}function ze(e,i){var s=i[uc];s===void 0&&(s=i[uc]=new Set);var r=e+"__bubble";s.has(r)||(rg(i,e,2,!1),s.add(r))}function Fu(e,i,s){var r=0;i&&(r|=4),rg(s,e,r,i)}var $r="_reactListening"+Math.random().toString(36).slice(2);function Wu(e){if(!e[$r]){e[$r]=!0,eh.forEach(function(s){s!=="selectionchange"&&(zS.has(s)||Fu(s,!1,e),Fu(s,!0,e))});var i=e.nodeType===9?e:e.ownerDocument;i===null||i[$r]||(i[$r]=!0,Fu("selectionchange",!1,i))}}function rg(e,i,s,r){switch(Lg(i)){case 2:var d=tw;break;case 8:d=nw;break;default:d=md}s=d.bind(null,i,s,e),d=void 0,!bc||i!=="touchstart"&&i!=="touchmove"&&i!=="wheel"||(d=!0),r?d!==void 0?e.addEventListener(i,s,{capture:!0,passive:d}):e.addEventListener(i,s,!0):d!==void 0?e.addEventListener(i,s,{passive:d}):e.addEventListener(i,s,!1)}function ed(e,i,s,r,d){var h=r;if((i&1)===0&&(i&2)===0&&r!==null)e:for(;;){if(r===null)return;var y=r.tag;if(y===3||y===4){var S=r.stateNode.containerInfo;if(S===d)break;if(y===4)for(y=r.return;y!==null;){var k=y.tag;if((k===3||k===4)&&y.stateNode.containerInfo===d)return;y=y.return}for(;S!==null;){if(y=ya(S),y===null)return;if(k=y.tag,k===5||k===6||k===26||k===27){r=h=y;continue e}S=S.parentNode}}r=r.return}fh(function(){var B=h,Y=yc(s),J=[];e:{var Z=Zh.get(e);if(Z!==void 0){var H=Ql,oe=e;switch(e){case"keypress":if(Vl(s)===0)break e;case"keydown":case"keyup":H=xx;break;case"focusin":oe="focus",H=Nc;break;case"focusout":oe="blur",H=Nc;break;case"beforeblur":case"afterblur":H=Nc;break;case"click":if(s.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":H=ph;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":H=ox;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":H=Nx;break;case Lh:case Uh:case $h:H=dx;break;case Bh:H=_x;break;case"scroll":case"scrollend":H=lx;break;case"wheel":H=zx;break;case"copy":case"cut":case"paste":H=hx;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":H=yh;break;case"toggle":case"beforetoggle":H=Cx}var be=(i&4)!==0,qe=!be&&(e==="scroll"||e==="scrollend"),R=be?Z!==null?Z+"Capture":null:Z;be=[];for(var A=B,$;A!==null;){var P=A;if($=P.stateNode,P=P.tag,P!==5&&P!==26&&P!==27||$===null||R===null||(P=As(A,R),P!=null&&be.push(cl(A,P,$))),qe)break;A=A.return}0<be.length&&(Z=new H(Z,oe,null,s,Y),J.push({event:Z,listeners:be}))}}if((i&7)===0){e:{if(Z=e==="mouseover"||e==="pointerover",H=e==="mouseout"||e==="pointerout",Z&&s!==gc&&(oe=s.relatedTarget||s.fromElement)&&(ya(oe)||oe[ga]))break e;if((H||Z)&&(Z=Y.window===Y?Y:(Z=Y.ownerDocument)?Z.defaultView||Z.parentWindow:window,H?(oe=s.relatedTarget||s.toElement,H=B,oe=oe?ya(oe):null,oe!==null&&(qe=c(oe),be=oe.tag,oe!==qe||be!==5&&be!==27&&be!==6)&&(oe=null)):(H=null,oe=B),H!==oe)){if(be=ph,P="onMouseLeave",R="onMouseEnter",A="mouse",(e==="pointerout"||e==="pointerover")&&(be=yh,P="onPointerLeave",R="onPointerEnter",A="pointer"),qe=H==null?Z:Cs(H),$=oe==null?Z:Cs(oe),Z=new be(P,A+"leave",H,s,Y),Z.target=qe,Z.relatedTarget=$,P=null,ya(Y)===B&&(be=new be(R,A+"enter",oe,s,Y),be.target=$,be.relatedTarget=qe,P=be),qe=P,H&&oe)t:{for(be=ES,R=H,A=oe,$=0,P=R;P;P=be(P))$++;P=0;for(var ye=A;ye;ye=be(ye))P++;for(;0<$-P;)R=be(R),$--;for(;0<P-$;)A=be(A),P--;for(;$--;){if(R===A||A!==null&&R===A.alternate){be=R;break t}R=be(R),A=be(A)}be=null}else be=null;H!==null&&og(J,Z,H,be,!1),oe!==null&&qe!==null&&og(J,qe,oe,be,!0)}}e:{if(Z=B?Cs(B):window,H=Z.nodeName&&Z.nodeName.toLowerCase(),H==="select"||H==="input"&&Z.type==="file")var Te=_h;else if(Nh(Z))if(kh)Te=Bx;else{Te=Ux;var fe=Lx}else H=Z.nodeName,!H||H.toLowerCase()!=="input"||Z.type!=="checkbox"&&Z.type!=="radio"?B&&pc(B.elementType)&&(Te=_h):Te=$x;if(Te&&(Te=Te(e,B))){jh(J,Te,s,Y);break e}fe&&fe(e,Z,B),e==="focusout"&&B&&Z.type==="number"&&B.memoizedProps.value!=null&&mc(Z,"number",Z.value)}switch(fe=B?Cs(B):window,e){case"focusin":(Nh(fe)||fe.contentEditable==="true")&&(ka=fe,Cc=B,$s=null);break;case"focusout":$s=Cc=ka=null;break;case"mousedown":Ac=!0;break;case"contextmenu":case"mouseup":case"dragend":Ac=!1,Rh(J,s,Y);break;case"selectionchange":if(qx)break;case"keydown":case"keyup":Rh(J,s,Y)}var je;if(_c)e:{switch(e){case"compositionstart":var Ce="onCompositionStart";break e;case"compositionend":Ce="onCompositionEnd";break e;case"compositionupdate":Ce="onCompositionUpdate";break e}Ce=void 0}else _a?Sh(e,s)&&(Ce="onCompositionEnd"):e==="keydown"&&s.keyCode===229&&(Ce="onCompositionStart");Ce&&(vh&&s.locale!=="ko"&&(_a||Ce!=="onCompositionStart"?Ce==="onCompositionEnd"&&_a&&(je=hh()):(ai=Y,xc="value"in ai?ai.value:ai.textContent,_a=!0)),fe=Br(B,Ce),0<fe.length&&(Ce=new gh(Ce,e,null,s,Y),J.push({event:Ce,listeners:fe}),je?Ce.data=je:(je=wh(s),je!==null&&(Ce.data=je)))),(je=Tx?Ox(e,s):Dx(e,s))&&(Ce=Br(B,"onBeforeInput"),0<Ce.length&&(fe=new gh("onBeforeInput","beforeinput",null,s,Y),J.push({event:fe,listeners:Ce}),fe.data=je)),jS(J,e,B,s,Y)}lg(J,i)})}function cl(e,i,s){return{instance:e,listener:i,currentTarget:s}}function Br(e,i){for(var s=i+"Capture",r=[];e!==null;){var d=e,h=d.stateNode;if(d=d.tag,d!==5&&d!==26&&d!==27||h===null||(d=As(e,s),d!=null&&r.unshift(cl(e,d,h)),d=As(e,i),d!=null&&r.push(cl(e,d,h))),e.tag===3)return r;e=e.return}return[]}function ES(e){if(e===null)return null;do e=e.return;while(e&&e.tag!==5&&e.tag!==27);return e||null}function og(e,i,s,r,d){for(var h=i._reactName,y=[];s!==null&&s!==r;){var S=s,k=S.alternate,B=S.stateNode;if(S=S.tag,k!==null&&k===r)break;S!==5&&S!==26&&S!==27||B===null||(k=B,d?(B=As(s,h),B!=null&&y.unshift(cl(s,B,k))):d||(B=As(s,h),B!=null&&y.push(cl(s,B,k)))),s=s.return}y.length!==0&&e.push({event:i,listeners:y})}var CS=/\r\n?/g,AS=/\u0000|\uFFFD/g;function cg(e){return(typeof e=="string"?e:""+e).replace(CS,`
9
+ `).replace(AS,"")}function ug(e,i){return i=cg(i),cg(e)===i}function Ze(e,i,s,r,d,h){switch(s){case"children":typeof r=="string"?i==="body"||i==="textarea"&&r===""||wa(e,r):(typeof r=="number"||typeof r=="bigint")&&i!=="body"&&wa(e,""+r);break;case"className":Il(e,"class",r);break;case"tabIndex":Il(e,"tabindex",r);break;case"dir":case"role":case"viewBox":case"width":case"height":Il(e,s,r);break;case"style":uh(e,r,h);break;case"data":if(i!=="object"){Il(e,"data",r);break}case"src":case"href":if(r===""&&(i!=="a"||s!=="href")){e.removeAttribute(s);break}if(r==null||typeof r=="function"||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=Gl(""+r),e.setAttribute(s,r);break;case"action":case"formAction":if(typeof r=="function"){e.setAttribute(s,"javascript:throw new Error('A React form was unexpectedly submitted. If you called form.submit() manually, consider using form.requestSubmit() instead. If you\\'re trying to use event.stopPropagation() in a submit event handler, consider also calling event.preventDefault().')");break}else typeof h=="function"&&(s==="formAction"?(i!=="input"&&Ze(e,i,"name",d.name,d,null),Ze(e,i,"formEncType",d.formEncType,d,null),Ze(e,i,"formMethod",d.formMethod,d,null),Ze(e,i,"formTarget",d.formTarget,d,null)):(Ze(e,i,"encType",d.encType,d,null),Ze(e,i,"method",d.method,d,null),Ze(e,i,"target",d.target,d,null)));if(r==null||typeof r=="symbol"||typeof r=="boolean"){e.removeAttribute(s);break}r=Gl(""+r),e.setAttribute(s,r);break;case"onClick":r!=null&&(e.onclick=Mn);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(l(61));if(s=r.__html,s!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=s}}break;case"multiple":e.multiple=r&&typeof r!="function"&&typeof r!="symbol";break;case"muted":e.muted=r&&typeof r!="function"&&typeof r!="symbol";break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"defaultValue":case"defaultChecked":case"innerHTML":case"ref":break;case"autoFocus":break;case"xlinkHref":if(r==null||typeof r=="function"||typeof r=="boolean"||typeof r=="symbol"){e.removeAttribute("xlink:href");break}s=Gl(""+r),e.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",s);break;case"contentEditable":case"spellCheck":case"draggable":case"value":case"autoReverse":case"externalResourcesRequired":case"focusable":case"preserveAlpha":r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,""+r):e.removeAttribute(s);break;case"inert":case"allowFullScreen":case"async":case"autoPlay":case"controls":case"default":case"defer":case"disabled":case"disablePictureInPicture":case"disableRemotePlayback":case"formNoValidate":case"hidden":case"loop":case"noModule":case"noValidate":case"open":case"playsInline":case"readOnly":case"required":case"reversed":case"scoped":case"seamless":case"itemScope":r&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,""):e.removeAttribute(s);break;case"capture":case"download":r===!0?e.setAttribute(s,""):r!==!1&&r!=null&&typeof r!="function"&&typeof r!="symbol"?e.setAttribute(s,r):e.removeAttribute(s);break;case"cols":case"rows":case"size":case"span":r!=null&&typeof r!="function"&&typeof r!="symbol"&&!isNaN(r)&&1<=r?e.setAttribute(s,r):e.removeAttribute(s);break;case"rowSpan":case"start":r==null||typeof r=="function"||typeof r=="symbol"||isNaN(r)?e.removeAttribute(s):e.setAttribute(s,r);break;case"popover":ze("beforetoggle",e),ze("toggle",e),Hl(e,"popover",r);break;case"xlinkActuate":Rn(e,"http://www.w3.org/1999/xlink","xlink:actuate",r);break;case"xlinkArcrole":Rn(e,"http://www.w3.org/1999/xlink","xlink:arcrole",r);break;case"xlinkRole":Rn(e,"http://www.w3.org/1999/xlink","xlink:role",r);break;case"xlinkShow":Rn(e,"http://www.w3.org/1999/xlink","xlink:show",r);break;case"xlinkTitle":Rn(e,"http://www.w3.org/1999/xlink","xlink:title",r);break;case"xlinkType":Rn(e,"http://www.w3.org/1999/xlink","xlink:type",r);break;case"xmlBase":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:base",r);break;case"xmlLang":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:lang",r);break;case"xmlSpace":Rn(e,"http://www.w3.org/XML/1998/namespace","xml:space",r);break;case"is":Hl(e,"is",r);break;case"innerText":case"textContent":break;default:(!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(s=ax.get(s)||s,Hl(e,s,r))}}function td(e,i,s,r,d,h){switch(s){case"style":uh(e,r,h);break;case"dangerouslySetInnerHTML":if(r!=null){if(typeof r!="object"||!("__html"in r))throw Error(l(61));if(s=r.__html,s!=null){if(d.children!=null)throw Error(l(60));e.innerHTML=s}}break;case"children":typeof r=="string"?wa(e,r):(typeof r=="number"||typeof r=="bigint")&&wa(e,""+r);break;case"onScroll":r!=null&&ze("scroll",e);break;case"onScrollEnd":r!=null&&ze("scrollend",e);break;case"onClick":r!=null&&(e.onclick=Mn);break;case"suppressContentEditableWarning":case"suppressHydrationWarning":case"innerHTML":case"ref":break;case"innerText":case"textContent":break;default:if(!th.hasOwnProperty(s))e:{if(s[0]==="o"&&s[1]==="n"&&(d=s.endsWith("Capture"),i=s.slice(2,d?s.length-7:void 0),h=e[Ot]||null,h=h!=null?h[s]:null,typeof h=="function"&&e.removeEventListener(i,h,d),typeof r=="function")){typeof h!="function"&&h!==null&&(s in e?e[s]=null:e.hasAttribute(s)&&e.removeAttribute(s)),e.addEventListener(i,r,d);break e}s in e?e[s]=r:r===!0?e.setAttribute(s,""):Hl(e,s,r)}}}function Nt(e,i,s){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"img":ze("error",e),ze("load",e);var r=!1,d=!1,h;for(h in s)if(s.hasOwnProperty(h)){var y=s[h];if(y!=null)switch(h){case"src":r=!0;break;case"srcSet":d=!0;break;case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Ze(e,i,h,y,s,null)}}d&&Ze(e,i,"srcSet",s.srcSet,s,null),r&&Ze(e,i,"src",s.src,s,null);return;case"input":ze("invalid",e);var S=h=y=d=null,k=null,B=null;for(r in s)if(s.hasOwnProperty(r)){var Y=s[r];if(Y!=null)switch(r){case"name":d=Y;break;case"type":y=Y;break;case"checked":k=Y;break;case"defaultChecked":B=Y;break;case"value":h=Y;break;case"defaultValue":S=Y;break;case"children":case"dangerouslySetInnerHTML":if(Y!=null)throw Error(l(137,i));break;default:Ze(e,i,r,Y,s,null)}}lh(e,h,S,k,B,y,d,!1);return;case"select":ze("invalid",e),r=y=h=null;for(d in s)if(s.hasOwnProperty(d)&&(S=s[d],S!=null))switch(d){case"value":h=S;break;case"defaultValue":y=S;break;case"multiple":r=S;default:Ze(e,i,d,S,s,null)}i=h,s=y,e.multiple=!!r,i!=null?Sa(e,!!r,i,!1):s!=null&&Sa(e,!!r,s,!0);return;case"textarea":ze("invalid",e),h=d=r=null;for(y in s)if(s.hasOwnProperty(y)&&(S=s[y],S!=null))switch(y){case"value":r=S;break;case"defaultValue":d=S;break;case"children":h=S;break;case"dangerouslySetInnerHTML":if(S!=null)throw Error(l(91));break;default:Ze(e,i,y,S,s,null)}oh(e,r,d,h);return;case"option":for(k in s)s.hasOwnProperty(k)&&(r=s[k],r!=null)&&(k==="selected"?e.selected=r&&typeof r!="function"&&typeof r!="symbol":Ze(e,i,k,r,s,null));return;case"dialog":ze("beforetoggle",e),ze("toggle",e),ze("cancel",e),ze("close",e);break;case"iframe":case"object":ze("load",e);break;case"video":case"audio":for(r=0;r<ol.length;r++)ze(ol[r],e);break;case"image":ze("error",e),ze("load",e);break;case"details":ze("toggle",e);break;case"embed":case"source":case"link":ze("error",e),ze("load",e);case"area":case"base":case"br":case"col":case"hr":case"keygen":case"meta":case"param":case"track":case"wbr":case"menuitem":for(B in s)if(s.hasOwnProperty(B)&&(r=s[B],r!=null))switch(B){case"children":case"dangerouslySetInnerHTML":throw Error(l(137,i));default:Ze(e,i,B,r,s,null)}return;default:if(pc(i)){for(Y in s)s.hasOwnProperty(Y)&&(r=s[Y],r!==void 0&&td(e,i,Y,r,s,void 0));return}}for(S in s)s.hasOwnProperty(S)&&(r=s[S],r!=null&&Ze(e,i,S,r,s,null))}function TS(e,i,s,r){switch(i){case"div":case"span":case"svg":case"path":case"a":case"g":case"p":case"li":break;case"input":var d=null,h=null,y=null,S=null,k=null,B=null,Y=null;for(H in s){var J=s[H];if(s.hasOwnProperty(H)&&J!=null)switch(H){case"checked":break;case"value":break;case"defaultValue":k=J;default:r.hasOwnProperty(H)||Ze(e,i,H,null,r,J)}}for(var Z in r){var H=r[Z];if(J=s[Z],r.hasOwnProperty(Z)&&(H!=null||J!=null))switch(Z){case"type":h=H;break;case"name":d=H;break;case"checked":B=H;break;case"defaultChecked":Y=H;break;case"value":y=H;break;case"defaultValue":S=H;break;case"children":case"dangerouslySetInnerHTML":if(H!=null)throw Error(l(137,i));break;default:H!==J&&Ze(e,i,Z,H,r,J)}}hc(e,y,S,k,B,Y,h,d);return;case"select":H=y=S=Z=null;for(h in s)if(k=s[h],s.hasOwnProperty(h)&&k!=null)switch(h){case"value":break;case"multiple":H=k;default:r.hasOwnProperty(h)||Ze(e,i,h,null,r,k)}for(d in r)if(h=r[d],k=s[d],r.hasOwnProperty(d)&&(h!=null||k!=null))switch(d){case"value":Z=h;break;case"defaultValue":S=h;break;case"multiple":y=h;default:h!==k&&Ze(e,i,d,h,r,k)}i=S,s=y,r=H,Z!=null?Sa(e,!!s,Z,!1):!!r!=!!s&&(i!=null?Sa(e,!!s,i,!0):Sa(e,!!s,s?[]:"",!1));return;case"textarea":H=Z=null;for(S in s)if(d=s[S],s.hasOwnProperty(S)&&d!=null&&!r.hasOwnProperty(S))switch(S){case"value":break;case"children":break;default:Ze(e,i,S,null,r,d)}for(y in r)if(d=r[y],h=s[y],r.hasOwnProperty(y)&&(d!=null||h!=null))switch(y){case"value":Z=d;break;case"defaultValue":H=d;break;case"children":break;case"dangerouslySetInnerHTML":if(d!=null)throw Error(l(91));break;default:d!==h&&Ze(e,i,y,d,r,h)}rh(e,Z,H);return;case"option":for(var oe in s)Z=s[oe],s.hasOwnProperty(oe)&&Z!=null&&!r.hasOwnProperty(oe)&&(oe==="selected"?e.selected=!1:Ze(e,i,oe,null,r,Z));for(k in r)Z=r[k],H=s[k],r.hasOwnProperty(k)&&Z!==H&&(Z!=null||H!=null)&&(k==="selected"?e.selected=Z&&typeof Z!="function"&&typeof Z!="symbol":Ze(e,i,k,Z,r,H));return;case"img":case"link":case"area":case"base":case"br":case"col":case"embed":case"hr":case"keygen":case"meta":case"param":case"source":case"track":case"wbr":case"menuitem":for(var be in s)Z=s[be],s.hasOwnProperty(be)&&Z!=null&&!r.hasOwnProperty(be)&&Ze(e,i,be,null,r,Z);for(B in r)if(Z=r[B],H=s[B],r.hasOwnProperty(B)&&Z!==H&&(Z!=null||H!=null))switch(B){case"children":case"dangerouslySetInnerHTML":if(Z!=null)throw Error(l(137,i));break;default:Ze(e,i,B,Z,r,H)}return;default:if(pc(i)){for(var qe in s)Z=s[qe],s.hasOwnProperty(qe)&&Z!==void 0&&!r.hasOwnProperty(qe)&&td(e,i,qe,void 0,r,Z);for(Y in r)Z=r[Y],H=s[Y],!r.hasOwnProperty(Y)||Z===H||Z===void 0&&H===void 0||td(e,i,Y,Z,r,H);return}}for(var R in s)Z=s[R],s.hasOwnProperty(R)&&Z!=null&&!r.hasOwnProperty(R)&&Ze(e,i,R,null,r,Z);for(J in r)Z=r[J],H=s[J],!r.hasOwnProperty(J)||Z===H||Z==null&&H==null||Ze(e,i,J,Z,r,H)}function dg(e){switch(e){case"css":case"script":case"font":case"img":case"image":case"input":case"link":return!0;default:return!1}}function OS(){if(typeof performance.getEntriesByType=="function"){for(var e=0,i=0,s=performance.getEntriesByType("resource"),r=0;r<s.length;r++){var d=s[r],h=d.transferSize,y=d.initiatorType,S=d.duration;if(h&&S&&dg(y)){for(y=0,S=d.responseEnd,r+=1;r<s.length;r++){var k=s[r],B=k.startTime;if(B>S)break;var Y=k.transferSize,J=k.initiatorType;Y&&dg(J)&&(k=k.responseEnd,y+=Y*(k<S?1:(S-B)/(k-B)))}if(--r,i+=8*(h+y)/(d.duration/1e3),e++,10<e)break}}if(0<e)return i/e/1e6}return navigator.connection&&(e=navigator.connection.downlink,typeof e=="number")?e:5}var nd=null,id=null;function Zr(e){return e.nodeType===9?e:e.ownerDocument}function fg(e){switch(e){case"http://www.w3.org/2000/svg":return 1;case"http://www.w3.org/1998/Math/MathML":return 2;default:return 0}}function hg(e,i){if(e===0)switch(i){case"svg":return 1;case"math":return 2;default:return 0}return e===1&&i==="foreignObject"?0:e}function ad(e,i){return e==="textarea"||e==="noscript"||typeof i.children=="string"||typeof i.children=="number"||typeof i.children=="bigint"||typeof i.dangerouslySetInnerHTML=="object"&&i.dangerouslySetInnerHTML!==null&&i.dangerouslySetInnerHTML.__html!=null}var sd=null;function DS(){var e=window.event;return e&&e.type==="popstate"?e===sd?!1:(sd=e,!0):(sd=null,!1)}var mg=typeof setTimeout=="function"?setTimeout:void 0,RS=typeof clearTimeout=="function"?clearTimeout:void 0,pg=typeof Promise=="function"?Promise:void 0,MS=typeof queueMicrotask=="function"?queueMicrotask:typeof pg<"u"?function(e){return pg.resolve(null).then(e).catch(LS)}:mg;function LS(e){setTimeout(function(){throw e})}function Si(e){return e==="head"}function gg(e,i){var s=i,r=0;do{var d=s.nextSibling;if(e.removeChild(s),d&&d.nodeType===8)if(s=d.data,s==="/$"||s==="/&"){if(r===0){e.removeChild(d),Wa(i);return}r--}else if(s==="$"||s==="$?"||s==="$~"||s==="$!"||s==="&")r++;else if(s==="html")ul(e.ownerDocument.documentElement);else if(s==="head"){s=e.ownerDocument.head,ul(s);for(var h=s.firstChild;h;){var y=h.nextSibling,S=h.nodeName;h[Es]||S==="SCRIPT"||S==="STYLE"||S==="LINK"&&h.rel.toLowerCase()==="stylesheet"||s.removeChild(h),h=y}}else s==="body"&&ul(e.ownerDocument.body);s=d}while(s);Wa(i)}function yg(e,i){var s=e;e=0;do{var r=s.nextSibling;if(s.nodeType===1?i?(s._stashedDisplay=s.style.display,s.style.display="none"):(s.style.display=s._stashedDisplay||"",s.getAttribute("style")===""&&s.removeAttribute("style")):s.nodeType===3&&(i?(s._stashedText=s.nodeValue,s.nodeValue=""):s.nodeValue=s._stashedText||""),r&&r.nodeType===8)if(s=r.data,s==="/$"){if(e===0)break;e--}else s!=="$"&&s!=="$?"&&s!=="$~"&&s!=="$!"||e++;s=r}while(s)}function ld(e){var i=e.firstChild;for(i&&i.nodeType===10&&(i=i.nextSibling);i;){var s=i;switch(i=i.nextSibling,s.nodeName){case"HTML":case"HEAD":case"BODY":ld(s),dc(s);continue;case"SCRIPT":case"STYLE":continue;case"LINK":if(s.rel.toLowerCase()==="stylesheet")continue}e.removeChild(s)}}function US(e,i,s,r){for(;e.nodeType===1;){var d=s;if(e.nodeName.toLowerCase()!==i.toLowerCase()){if(!r&&(e.nodeName!=="INPUT"||e.type!=="hidden"))break}else if(r){if(!e[Es])switch(i){case"meta":if(!e.hasAttribute("itemprop"))break;return e;case"link":if(h=e.getAttribute("rel"),h==="stylesheet"&&e.hasAttribute("data-precedence"))break;if(h!==d.rel||e.getAttribute("href")!==(d.href==null||d.href===""?null:d.href)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin)||e.getAttribute("title")!==(d.title==null?null:d.title))break;return e;case"style":if(e.hasAttribute("data-precedence"))break;return e;case"script":if(h=e.getAttribute("src"),(h!==(d.src==null?null:d.src)||e.getAttribute("type")!==(d.type==null?null:d.type)||e.getAttribute("crossorigin")!==(d.crossOrigin==null?null:d.crossOrigin))&&h&&e.hasAttribute("async")&&!e.hasAttribute("itemprop"))break;return e;default:return e}}else if(i==="input"&&e.type==="hidden"){var h=d.name==null?null:""+d.name;if(d.type==="hidden"&&e.getAttribute("name")===h)return e}else return e;if(e=on(e.nextSibling),e===null)break}return null}function $S(e,i,s){if(i==="")return null;for(;e.nodeType!==3;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!s||(e=on(e.nextSibling),e===null))return null;return e}function vg(e,i){for(;e.nodeType!==8;)if((e.nodeType!==1||e.nodeName!=="INPUT"||e.type!=="hidden")&&!i||(e=on(e.nextSibling),e===null))return null;return e}function rd(e){return e.data==="$?"||e.data==="$~"}function od(e){return e.data==="$!"||e.data==="$?"&&e.ownerDocument.readyState!=="loading"}function BS(e,i){var s=e.ownerDocument;if(e.data==="$~")e._reactRetry=i;else if(e.data!=="$?"||s.readyState!=="loading")i();else{var r=function(){i(),s.removeEventListener("DOMContentLoaded",r)};s.addEventListener("DOMContentLoaded",r),e._reactRetry=r}}function on(e){for(;e!=null;e=e.nextSibling){var i=e.nodeType;if(i===1||i===3)break;if(i===8){if(i=e.data,i==="$"||i==="$!"||i==="$?"||i==="$~"||i==="&"||i==="F!"||i==="F")break;if(i==="/$"||i==="/&")return null}}return e}var cd=null;function bg(e){e=e.nextSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="/$"||s==="/&"){if(i===0)return on(e.nextSibling);i--}else s!=="$"&&s!=="$!"&&s!=="$?"&&s!=="$~"&&s!=="&"||i++}e=e.nextSibling}return null}function xg(e){e=e.previousSibling;for(var i=0;e;){if(e.nodeType===8){var s=e.data;if(s==="$"||s==="$!"||s==="$?"||s==="$~"||s==="&"){if(i===0)return e;i--}else s!=="/$"&&s!=="/&"||i++}e=e.previousSibling}return null}function Sg(e,i,s){switch(i=Zr(s),e){case"html":if(e=i.documentElement,!e)throw Error(l(452));return e;case"head":if(e=i.head,!e)throw Error(l(453));return e;case"body":if(e=i.body,!e)throw Error(l(454));return e;default:throw Error(l(451))}}function ul(e){for(var i=e.attributes;i.length;)e.removeAttributeNode(i[0]);dc(e)}var cn=new Map,wg=new Set;function qr(e){return typeof e.getRootNode=="function"?e.getRootNode():e.nodeType===9?e:e.ownerDocument}var Jn=W.d;W.d={f:ZS,r:qS,D:HS,C:IS,L:KS,m:GS,X:VS,S:YS,M:PS};function ZS(){var e=Jn.f(),i=Or();return e||i}function qS(e){var i=va(e);i!==null&&i.tag===5&&i.type==="form"?Bm(i):Jn.r(e)}var Xa=typeof document>"u"?null:document;function Ng(e,i,s){var r=Xa;if(r&&typeof i=="string"&&i){var d=en(i);d='link[rel="'+e+'"][href="'+d+'"]',typeof s=="string"&&(d+='[crossorigin="'+s+'"]'),wg.has(d)||(wg.add(d),e={rel:e,crossOrigin:s,href:i},r.querySelector(d)===null&&(i=r.createElement("link"),Nt(i,"link",e),pt(i),r.head.appendChild(i)))}}function HS(e){Jn.D(e),Ng("dns-prefetch",e,null)}function IS(e,i){Jn.C(e,i),Ng("preconnect",e,i)}function KS(e,i,s){Jn.L(e,i,s);var r=Xa;if(r&&e&&i){var d='link[rel="preload"][as="'+en(i)+'"]';i==="image"&&s&&s.imageSrcSet?(d+='[imagesrcset="'+en(s.imageSrcSet)+'"]',typeof s.imageSizes=="string"&&(d+='[imagesizes="'+en(s.imageSizes)+'"]')):d+='[href="'+en(e)+'"]';var h=d;switch(i){case"style":h=Ja(e);break;case"script":h=Fa(e)}cn.has(h)||(e=v({rel:"preload",href:i==="image"&&s&&s.imageSrcSet?void 0:e,as:i},s),cn.set(h,e),r.querySelector(d)!==null||i==="style"&&r.querySelector(dl(h))||i==="script"&&r.querySelector(fl(h))||(i=r.createElement("link"),Nt(i,"link",e),pt(i),r.head.appendChild(i)))}}function GS(e,i){Jn.m(e,i);var s=Xa;if(s&&e){var r=i&&typeof i.as=="string"?i.as:"script",d='link[rel="modulepreload"][as="'+en(r)+'"][href="'+en(e)+'"]',h=d;switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":h=Fa(e)}if(!cn.has(h)&&(e=v({rel:"modulepreload",href:e},i),cn.set(h,e),s.querySelector(d)===null)){switch(r){case"audioworklet":case"paintworklet":case"serviceworker":case"sharedworker":case"worker":case"script":if(s.querySelector(fl(h)))return}r=s.createElement("link"),Nt(r,"link",e),pt(r),s.head.appendChild(r)}}}function YS(e,i,s){Jn.S(e,i,s);var r=Xa;if(r&&e){var d=ba(r).hoistableStyles,h=Ja(e);i=i||"default";var y=d.get(h);if(!y){var S={loading:0,preload:null};if(y=r.querySelector(dl(h)))S.loading=5;else{e=v({rel:"stylesheet",href:e,"data-precedence":i},s),(s=cn.get(h))&&ud(e,s);var k=y=r.createElement("link");pt(k),Nt(k,"link",e),k._p=new Promise(function(B,Y){k.onload=B,k.onerror=Y}),k.addEventListener("load",function(){S.loading|=1}),k.addEventListener("error",function(){S.loading|=2}),S.loading|=4,Hr(y,i,r)}y={type:"stylesheet",instance:y,count:1,state:S},d.set(h,y)}}}function VS(e,i){Jn.X(e,i);var s=Xa;if(s&&e){var r=ba(s).hoistableScripts,d=Fa(e),h=r.get(d);h||(h=s.querySelector(fl(d)),h||(e=v({src:e,async:!0},i),(i=cn.get(d))&&dd(e,i),h=s.createElement("script"),pt(h),Nt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(d,h))}}function PS(e,i){Jn.M(e,i);var s=Xa;if(s&&e){var r=ba(s).hoistableScripts,d=Fa(e),h=r.get(d);h||(h=s.querySelector(fl(d)),h||(e=v({src:e,async:!0,type:"module"},i),(i=cn.get(d))&&dd(e,i),h=s.createElement("script"),pt(h),Nt(h,"link",e),s.head.appendChild(h)),h={type:"script",instance:h,count:1,state:null},r.set(d,h))}}function jg(e,i,s,r){var d=(d=re.current)?qr(d):null;if(!d)throw Error(l(446));switch(e){case"meta":case"title":return null;case"style":return typeof s.precedence=="string"&&typeof s.href=="string"?(i=Ja(s.href),s=ba(d).hoistableStyles,r=s.get(i),r||(r={type:"style",instance:null,count:0,state:null},s.set(i,r)),r):{type:"void",instance:null,count:0,state:null};case"link":if(s.rel==="stylesheet"&&typeof s.href=="string"&&typeof s.precedence=="string"){e=Ja(s.href);var h=ba(d).hoistableStyles,y=h.get(e);if(y||(d=d.ownerDocument||d,y={type:"stylesheet",instance:null,count:0,state:{loading:0,preload:null}},h.set(e,y),(h=d.querySelector(dl(e)))&&!h._p&&(y.instance=h,y.state.loading=5),cn.has(e)||(s={rel:"preload",as:"style",href:s.href,crossOrigin:s.crossOrigin,integrity:s.integrity,media:s.media,hrefLang:s.hrefLang,referrerPolicy:s.referrerPolicy},cn.set(e,s),h||QS(d,e,s,y.state))),i&&r===null)throw Error(l(528,""));return y}if(i&&r!==null)throw Error(l(529,""));return null;case"script":return i=s.async,s=s.src,typeof s=="string"&&i&&typeof i!="function"&&typeof i!="symbol"?(i=Fa(s),s=ba(d).hoistableScripts,r=s.get(i),r||(r={type:"script",instance:null,count:0,state:null},s.set(i,r)),r):{type:"void",instance:null,count:0,state:null};default:throw Error(l(444,e))}}function Ja(e){return'href="'+en(e)+'"'}function dl(e){return'link[rel="stylesheet"]['+e+"]"}function _g(e){return v({},e,{"data-precedence":e.precedence,precedence:null})}function QS(e,i,s,r){e.querySelector('link[rel="preload"][as="style"]['+i+"]")?r.loading=1:(i=e.createElement("link"),r.preload=i,i.addEventListener("load",function(){return r.loading|=1}),i.addEventListener("error",function(){return r.loading|=2}),Nt(i,"link",s),pt(i),e.head.appendChild(i))}function Fa(e){return'[src="'+en(e)+'"]'}function fl(e){return"script[async]"+e}function kg(e,i,s){if(i.count++,i.instance===null)switch(i.type){case"style":var r=e.querySelector('style[data-href~="'+en(s.href)+'"]');if(r)return i.instance=r,pt(r),r;var d=v({},s,{"data-href":s.href,"data-precedence":s.precedence,href:null,precedence:null});return r=(e.ownerDocument||e).createElement("style"),pt(r),Nt(r,"style",d),Hr(r,s.precedence,e),i.instance=r;case"stylesheet":d=Ja(s.href);var h=e.querySelector(dl(d));if(h)return i.state.loading|=4,i.instance=h,pt(h),h;r=_g(s),(d=cn.get(d))&&ud(r,d),h=(e.ownerDocument||e).createElement("link"),pt(h);var y=h;return y._p=new Promise(function(S,k){y.onload=S,y.onerror=k}),Nt(h,"link",r),i.state.loading|=4,Hr(h,s.precedence,e),i.instance=h;case"script":return h=Fa(s.src),(d=e.querySelector(fl(h)))?(i.instance=d,pt(d),d):(r=s,(d=cn.get(h))&&(r=v({},s),dd(r,d)),e=e.ownerDocument||e,d=e.createElement("script"),pt(d),Nt(d,"link",r),e.head.appendChild(d),i.instance=d);case"void":return null;default:throw Error(l(443,i.type))}else i.type==="stylesheet"&&(i.state.loading&4)===0&&(r=i.instance,i.state.loading|=4,Hr(r,s.precedence,e));return i.instance}function Hr(e,i,s){for(var r=s.querySelectorAll('link[rel="stylesheet"][data-precedence],style[data-precedence]'),d=r.length?r[r.length-1]:null,h=d,y=0;y<r.length;y++){var S=r[y];if(S.dataset.precedence===i)h=S;else if(h!==d)break}h?h.parentNode.insertBefore(e,h.nextSibling):(i=s.nodeType===9?s.head:s,i.insertBefore(e,i.firstChild))}function ud(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.title==null&&(e.title=i.title)}function dd(e,i){e.crossOrigin==null&&(e.crossOrigin=i.crossOrigin),e.referrerPolicy==null&&(e.referrerPolicy=i.referrerPolicy),e.integrity==null&&(e.integrity=i.integrity)}var Ir=null;function zg(e,i,s){if(Ir===null){var r=new Map,d=Ir=new Map;d.set(s,r)}else d=Ir,r=d.get(s),r||(r=new Map,d.set(s,r));if(r.has(e))return r;for(r.set(e,null),s=s.getElementsByTagName(e),d=0;d<s.length;d++){var h=s[d];if(!(h[Es]||h[bt]||e==="link"&&h.getAttribute("rel")==="stylesheet")&&h.namespaceURI!=="http://www.w3.org/2000/svg"){var y=h.getAttribute(i)||"";y=e+y;var S=r.get(y);S?S.push(h):r.set(y,[h])}}return r}function Eg(e,i,s){e=e.ownerDocument||e,e.head.insertBefore(s,i==="title"?e.querySelector("head > title"):null)}function XS(e,i,s){if(s===1||i.itemProp!=null)return!1;switch(e){case"meta":case"title":return!0;case"style":if(typeof i.precedence!="string"||typeof i.href!="string"||i.href==="")break;return!0;case"link":if(typeof i.rel!="string"||typeof i.href!="string"||i.href===""||i.onLoad||i.onError)break;return i.rel==="stylesheet"?(e=i.disabled,typeof i.precedence=="string"&&e==null):!0;case"script":if(i.async&&typeof i.async!="function"&&typeof i.async!="symbol"&&!i.onLoad&&!i.onError&&i.src&&typeof i.src=="string")return!0}return!1}function Cg(e){return!(e.type==="stylesheet"&&(e.state.loading&3)===0)}function JS(e,i,s,r){if(s.type==="stylesheet"&&(typeof r.media!="string"||matchMedia(r.media).matches!==!1)&&(s.state.loading&4)===0){if(s.instance===null){var d=Ja(r.href),h=i.querySelector(dl(d));if(h){i=h._p,i!==null&&typeof i=="object"&&typeof i.then=="function"&&(e.count++,e=Kr.bind(e),i.then(e,e)),s.state.loading|=4,s.instance=h,pt(h);return}h=i.ownerDocument||i,r=_g(r),(d=cn.get(d))&&ud(r,d),h=h.createElement("link"),pt(h);var y=h;y._p=new Promise(function(S,k){y.onload=S,y.onerror=k}),Nt(h,"link",r),s.instance=h}e.stylesheets===null&&(e.stylesheets=new Map),e.stylesheets.set(s,i),(i=s.state.preload)&&(s.state.loading&3)===0&&(e.count++,s=Kr.bind(e),i.addEventListener("load",s),i.addEventListener("error",s))}}var fd=0;function FS(e,i){return e.stylesheets&&e.count===0&&Yr(e,e.stylesheets),0<e.count||0<e.imgCount?function(s){var r=setTimeout(function(){if(e.stylesheets&&Yr(e,e.stylesheets),e.unsuspend){var h=e.unsuspend;e.unsuspend=null,h()}},6e4+i);0<e.imgBytes&&fd===0&&(fd=62500*OS());var d=setTimeout(function(){if(e.waitingForImages=!1,e.count===0&&(e.stylesheets&&Yr(e,e.stylesheets),e.unsuspend)){var h=e.unsuspend;e.unsuspend=null,h()}},(e.imgBytes>fd?50:800)+i);return e.unsuspend=s,function(){e.unsuspend=null,clearTimeout(r),clearTimeout(d)}}:null}function Kr(){if(this.count--,this.count===0&&(this.imgCount===0||!this.waitingForImages)){if(this.stylesheets)Yr(this,this.stylesheets);else if(this.unsuspend){var e=this.unsuspend;this.unsuspend=null,e()}}}var Gr=null;function Yr(e,i){e.stylesheets=null,e.unsuspend!==null&&(e.count++,Gr=new Map,i.forEach(WS,e),Gr=null,Kr.call(e))}function WS(e,i){if(!(i.state.loading&4)){var s=Gr.get(e);if(s)var r=s.get(null);else{s=new Map,Gr.set(e,s);for(var d=e.querySelectorAll("link[data-precedence],style[data-precedence]"),h=0;h<d.length;h++){var y=d[h];(y.nodeName==="LINK"||y.getAttribute("media")!=="not all")&&(s.set(y.dataset.precedence,y),r=y)}r&&s.set(null,r)}d=i.instance,y=d.getAttribute("data-precedence"),h=s.get(y)||r,h===r&&s.set(null,d),s.set(y,d),this.count++,r=Kr.bind(this),d.addEventListener("load",r),d.addEventListener("error",r),h?h.parentNode.insertBefore(d,h.nextSibling):(e=e.nodeType===9?e.head:e,e.insertBefore(d,e.firstChild)),i.state.loading|=4}}var hl={$$typeof:T,Provider:null,Consumer:null,_currentValue:se,_currentValue2:se,_threadCount:0};function ew(e,i,s,r,d,h,y,S,k){this.tag=1,this.containerInfo=e,this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.next=this.pendingContext=this.context=this.cancelPendingCommit=null,this.callbackPriority=0,this.expirationTimes=rc(-1),this.entangledLanes=this.shellSuspendCounter=this.errorRecoveryDisabledLanes=this.expiredLanes=this.warmLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=rc(0),this.hiddenUpdates=rc(null),this.identifierPrefix=r,this.onUncaughtError=d,this.onCaughtError=h,this.onRecoverableError=y,this.pooledCache=null,this.pooledCacheLanes=0,this.formState=k,this.incompleteTransitions=new Map}function Ag(e,i,s,r,d,h,y,S,k,B,Y,J){return e=new ew(e,i,s,y,k,B,Y,J,S),i=1,h===!0&&(i|=24),h=Kt(3,null,null,i),e.current=h,h.stateNode=e,i=Gc(),i.refCount++,e.pooledCache=i,i.refCount++,h.memoizedState={element:r,isDehydrated:s,cache:i},Qc(h),e}function Tg(e){return e?(e=Ca,e):Ca}function Og(e,i,s,r,d,h){d=Tg(d),r.context===null?r.context=d:r.pendingContext=d,r=ui(i),r.payload={element:s},h=h===void 0?null:h,h!==null&&(r.callback=h),s=di(e,r,i),s!==null&&($t(s,e,i),Gs(s,e,i))}function Dg(e,i){if(e=e.memoizedState,e!==null&&e.dehydrated!==null){var s=e.retryLane;e.retryLane=s!==0&&s<i?s:i}}function hd(e,i){Dg(e,i),(e=e.alternate)&&Dg(e,i)}function Rg(e){if(e.tag===13||e.tag===31){var i=Gi(e,67108864);i!==null&&$t(i,e,67108864),hd(e,67108864)}}function Mg(e){if(e.tag===13||e.tag===31){var i=Qt();i=oc(i);var s=Gi(e,i);s!==null&&$t(s,e,i),hd(e,i)}}var Vr=!0;function tw(e,i,s,r){var d=U.T;U.T=null;var h=W.p;try{W.p=2,md(e,i,s,r)}finally{W.p=h,U.T=d}}function nw(e,i,s,r){var d=U.T;U.T=null;var h=W.p;try{W.p=8,md(e,i,s,r)}finally{W.p=h,U.T=d}}function md(e,i,s,r){if(Vr){var d=pd(r);if(d===null)ed(e,i,r,Pr,s),Ug(e,r);else if(aw(d,e,i,s,r))r.stopPropagation();else if(Ug(e,r),i&4&&-1<iw.indexOf(e)){for(;d!==null;){var h=va(d);if(h!==null)switch(h.tag){case 3:if(h=h.stateNode,h.current.memoizedState.isDehydrated){var y=Zi(h.pendingLanes);if(y!==0){var S=h;for(S.pendingLanes|=2,S.entangledLanes|=2;y;){var k=1<<31-Ht(y);S.entanglements[1]|=k,y&=~k}En(h),(De&6)===0&&(Ar=kt()+500,rl(0))}}break;case 31:case 13:S=Gi(h,2),S!==null&&$t(S,h,2),Or(),hd(h,2)}if(h=pd(r),h===null&&ed(e,i,r,Pr,s),h===d)break;d=h}d!==null&&r.stopPropagation()}else ed(e,i,r,null,s)}}function pd(e){return e=yc(e),gd(e)}var Pr=null;function gd(e){if(Pr=null,e=ya(e),e!==null){var i=c(e);if(i===null)e=null;else{var s=i.tag;if(s===13){if(e=f(i),e!==null)return e;e=null}else if(s===31){if(e=m(i),e!==null)return e;e=null}else if(s===3){if(i.stateNode.current.memoizedState.isDehydrated)return i.tag===3?i.stateNode.containerInfo:null;e=null}else i!==e&&(e=null)}}return Pr=e,null}function Lg(e){switch(e){case"beforetoggle":case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"toggle":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 2;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 8;case"message":switch(sc()){case Ll:return 2;case Ul:return 8;case Ft:case lc:return 32;case ae:return 268435456;default:return 32}default:return 32}}var yd=!1,wi=null,Ni=null,ji=null,ml=new Map,pl=new Map,_i=[],iw="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset".split(" ");function Ug(e,i){switch(e){case"focusin":case"focusout":wi=null;break;case"dragenter":case"dragleave":Ni=null;break;case"mouseover":case"mouseout":ji=null;break;case"pointerover":case"pointerout":ml.delete(i.pointerId);break;case"gotpointercapture":case"lostpointercapture":pl.delete(i.pointerId)}}function gl(e,i,s,r,d,h){return e===null||e.nativeEvent!==h?(e={blockedOn:i,domEventName:s,eventSystemFlags:r,nativeEvent:h,targetContainers:[d]},i!==null&&(i=va(i),i!==null&&Rg(i)),e):(e.eventSystemFlags|=r,i=e.targetContainers,d!==null&&i.indexOf(d)===-1&&i.push(d),e)}function aw(e,i,s,r,d){switch(i){case"focusin":return wi=gl(wi,e,i,s,r,d),!0;case"dragenter":return Ni=gl(Ni,e,i,s,r,d),!0;case"mouseover":return ji=gl(ji,e,i,s,r,d),!0;case"pointerover":var h=d.pointerId;return ml.set(h,gl(ml.get(h)||null,e,i,s,r,d)),!0;case"gotpointercapture":return h=d.pointerId,pl.set(h,gl(pl.get(h)||null,e,i,s,r,d)),!0}return!1}function $g(e){var i=ya(e.target);if(i!==null){var s=c(i);if(s!==null){if(i=s.tag,i===13){if(i=f(s),i!==null){e.blockedOn=i,Ff(e.priority,function(){Mg(s)});return}}else if(i===31){if(i=m(s),i!==null){e.blockedOn=i,Ff(e.priority,function(){Mg(s)});return}}else if(i===3&&s.stateNode.current.memoizedState.isDehydrated){e.blockedOn=s.tag===3?s.stateNode.containerInfo:null;return}}}e.blockedOn=null}function Qr(e){if(e.blockedOn!==null)return!1;for(var i=e.targetContainers;0<i.length;){var s=pd(e.nativeEvent);if(s===null){s=e.nativeEvent;var r=new s.constructor(s.type,s);gc=r,s.target.dispatchEvent(r),gc=null}else return i=va(s),i!==null&&Rg(i),e.blockedOn=s,!1;i.shift()}return!0}function Bg(e,i,s){Qr(e)&&s.delete(i)}function sw(){yd=!1,wi!==null&&Qr(wi)&&(wi=null),Ni!==null&&Qr(Ni)&&(Ni=null),ji!==null&&Qr(ji)&&(ji=null),ml.forEach(Bg),pl.forEach(Bg)}function Xr(e,i){e.blockedOn===i&&(e.blockedOn=null,yd||(yd=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,sw)))}var Jr=null;function Zg(e){Jr!==e&&(Jr=e,t.unstable_scheduleCallback(t.unstable_NormalPriority,function(){Jr===e&&(Jr=null);for(var i=0;i<e.length;i+=3){var s=e[i],r=e[i+1],d=e[i+2];if(typeof r!="function"){if(gd(r||s)===null)continue;break}var h=va(s);h!==null&&(e.splice(i,3),i-=3,pu(h,{pending:!0,data:d,method:s.method,action:r},r,d))}}))}function Wa(e){function i(k){return Xr(k,e)}wi!==null&&Xr(wi,e),Ni!==null&&Xr(Ni,e),ji!==null&&Xr(ji,e),ml.forEach(i),pl.forEach(i);for(var s=0;s<_i.length;s++){var r=_i[s];r.blockedOn===e&&(r.blockedOn=null)}for(;0<_i.length&&(s=_i[0],s.blockedOn===null);)$g(s),s.blockedOn===null&&_i.shift();if(s=(e.ownerDocument||e).$$reactFormReplay,s!=null)for(r=0;r<s.length;r+=3){var d=s[r],h=s[r+1],y=d[Ot]||null;if(typeof h=="function")y||Zg(s);else if(y){var S=null;if(h&&h.hasAttribute("formAction")){if(d=h,y=h[Ot]||null)S=y.formAction;else if(gd(d)!==null)continue}else S=y.action;typeof S=="function"?s[r+1]=S:(s.splice(r,3),r-=3),Zg(s)}}}function qg(){function e(h){h.canIntercept&&h.info==="react-transition"&&h.intercept({handler:function(){return new Promise(function(y){return d=y})},focusReset:"manual",scroll:"manual"})}function i(){d!==null&&(d(),d=null),r||setTimeout(s,20)}function s(){if(!r&&!navigation.transition){var h=navigation.currentEntry;h&&h.url!=null&&navigation.navigate(h.url,{state:h.getState(),info:"react-transition",history:"replace"})}}if(typeof navigation=="object"){var r=!1,d=null;return navigation.addEventListener("navigate",e),navigation.addEventListener("navigatesuccess",i),navigation.addEventListener("navigateerror",i),setTimeout(s,100),function(){r=!0,navigation.removeEventListener("navigate",e),navigation.removeEventListener("navigatesuccess",i),navigation.removeEventListener("navigateerror",i),d!==null&&(d(),d=null)}}}function vd(e){this._internalRoot=e}Fr.prototype.render=vd.prototype.render=function(e){var i=this._internalRoot;if(i===null)throw Error(l(409));var s=i.current,r=Qt();Og(s,r,e,i,null,null)},Fr.prototype.unmount=vd.prototype.unmount=function(){var e=this._internalRoot;if(e!==null){this._internalRoot=null;var i=e.containerInfo;Og(e.current,2,null,e,null,null),Or(),i[ga]=null}};function Fr(e){this._internalRoot=e}Fr.prototype.unstable_scheduleHydration=function(e){if(e){var i=Jf();e={blockedOn:null,target:e,priority:i};for(var s=0;s<_i.length&&i!==0&&i<_i[s].priority;s++);_i.splice(s,0,e),s===0&&$g(e)}};var Hg=n.version;if(Hg!=="19.2.4")throw Error(l(527,Hg,"19.2.4"));W.findDOMNode=function(e){var i=e._reactInternals;if(i===void 0)throw typeof e.render=="function"?Error(l(188)):(e=Object.keys(e).join(","),Error(l(268,e)));return e=p(i),e=e!==null?b(e):null,e=e===null?null:e.stateNode,e};var lw={bundleType:0,version:"19.2.4",rendererPackageName:"react-dom",currentDispatcherRef:U,reconcilerVersion:"19.2.4"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"){var Wr=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Wr.isDisabled&&Wr.supportsFiber)try{_s=Wr.inject(lw),qt=Wr}catch{}}return vl.createRoot=function(e,i){if(!o(e))throw Error(l(299));var s=!1,r="",d=Qm,h=Xm,y=Jm;return i!=null&&(i.unstable_strictMode===!0&&(s=!0),i.identifierPrefix!==void 0&&(r=i.identifierPrefix),i.onUncaughtError!==void 0&&(d=i.onUncaughtError),i.onCaughtError!==void 0&&(h=i.onCaughtError),i.onRecoverableError!==void 0&&(y=i.onRecoverableError)),i=Ag(e,1,!1,null,null,s,r,null,d,h,y,qg),e[ga]=i.current,Wu(e),new vd(i)},vl.hydrateRoot=function(e,i,s){if(!o(e))throw Error(l(299));var r=!1,d="",h=Qm,y=Xm,S=Jm,k=null;return s!=null&&(s.unstable_strictMode===!0&&(r=!0),s.identifierPrefix!==void 0&&(d=s.identifierPrefix),s.onUncaughtError!==void 0&&(h=s.onUncaughtError),s.onCaughtError!==void 0&&(y=s.onCaughtError),s.onRecoverableError!==void 0&&(S=s.onRecoverableError),s.formState!==void 0&&(k=s.formState)),i=Ag(e,1,!0,i,s??null,r,d,k,h,y,S,qg),i.context=Tg(null),s=i.current,r=Qt(),r=oc(r),d=ui(r),d.callback=null,di(s,d,r),s=r,i.current.lanes=s,zs(i,s),En(i),e[ga]=i.current,Wu(e),new Fr(i)},vl.version="19.2.4",vl}var Fg;function yw(){if(Fg)return Sd.exports;Fg=1;function t(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(t)}catch(n){console.error(n)}}return t(),Sd.exports=gw(),Sd.exports}var vw=yw();const cf=Symbol.for("yaml.alias"),Kd=Symbol.for("yaml.document"),Di=Symbol.for("yaml.map"),cv=Symbol.for("yaml.pair"),An=Symbol.for("yaml.scalar"),bs=Symbol.for("yaml.seq"),fn=Symbol.for("yaml.node.type"),ua=t=>!!t&&typeof t=="object"&&t[fn]===cf,Lo=t=>!!t&&typeof t=="object"&&t[fn]===Kd,Tl=t=>!!t&&typeof t=="object"&&t[fn]===Di,st=t=>!!t&&typeof t=="object"&&t[fn]===cv,Ie=t=>!!t&&typeof t=="object"&&t[fn]===An,Ol=t=>!!t&&typeof t=="object"&&t[fn]===bs;function it(t){if(t&&typeof t=="object")switch(t[fn]){case Di:case bs:return!0}return!1}function at(t){if(t&&typeof t=="object")switch(t[fn]){case cf:case Di:case An:case bs:return!0}return!1}const uv=t=>(Ie(t)||it(t))&&!!t.anchor,sa=Symbol("break visit"),bw=Symbol("skip children"),Nl=Symbol("remove node");function xs(t,n){const a=xw(n);Lo(t)?ss(null,t.contents,a,Object.freeze([t]))===Nl&&(t.contents=null):ss(null,t,a,Object.freeze([]))}xs.BREAK=sa;xs.SKIP=bw;xs.REMOVE=Nl;function ss(t,n,a,l){const o=Sw(t,n,a,l);if(at(o)||st(o))return ww(t,l,o),ss(t,o,a,l);if(typeof o!="symbol"){if(it(n)){l=Object.freeze(l.concat(n));for(let c=0;c<n.items.length;++c){const f=ss(c,n.items[c],a,l);if(typeof f=="number")c=f-1;else{if(f===sa)return sa;f===Nl&&(n.items.splice(c,1),c-=1)}}}else if(st(n)){l=Object.freeze(l.concat(n));const c=ss("key",n.key,a,l);if(c===sa)return sa;c===Nl&&(n.key=null);const f=ss("value",n.value,a,l);if(f===sa)return sa;f===Nl&&(n.value=null)}}return o}function xw(t){return typeof t=="object"&&(t.Collection||t.Node||t.Value)?Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t):t}function Sw(t,n,a,l){if(typeof a=="function")return a(t,n,l);if(Tl(n))return a.Map?.(t,n,l);if(Ol(n))return a.Seq?.(t,n,l);if(st(n))return a.Pair?.(t,n,l);if(Ie(n))return a.Scalar?.(t,n,l);if(ua(n))return a.Alias?.(t,n,l)}function ww(t,n,a){const l=n[n.length-1];if(it(l))l.items[t]=a;else if(st(l))t==="key"?l.key=a:l.value=a;else if(Lo(l))l.contents=a;else{const o=ua(l)?"alias":"scalar";throw new Error(`Cannot replace node with ${o} parent`)}}const Nw={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},jw=t=>t.replace(/[!,[\]{}]/g,n=>Nw[n]);class Ct{constructor(n,a){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},Ct.defaultYaml,n),this.tags=Object.assign({},Ct.defaultTags,a)}clone(){const n=new Ct(this.yaml,this.tags);return n.docStart=this.docStart,n}atDocument(){const n=new Ct(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:Ct.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},Ct.defaultTags);break}return n}add(n,a){this.atNextDocument&&(this.yaml={explicit:Ct.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},Ct.defaultTags),this.atNextDocument=!1);const l=n.trim().split(/[ \t]+/),o=l.shift();switch(o){case"%TAG":{if(l.length!==2&&(a(0,"%TAG directive should contain exactly two parts"),l.length<2))return!1;const[c,f]=l;return this.tags[c]=f,!0}case"%YAML":{if(this.yaml.explicit=!0,l.length!==1)return a(0,"%YAML directive should contain exactly one part"),!1;const[c]=l;if(c==="1.1"||c==="1.2")return this.yaml.version=c,!0;{const f=/^\d+\.\d+$/.test(c);return a(6,`Unsupported YAML version ${c}`,f),!1}}default:return a(0,`Unknown directive ${o}`,!0),!1}}tagName(n,a){if(n==="!")return"!";if(n[0]!=="!")return a(`Not a valid tag: ${n}`),null;if(n[1]==="<"){const f=n.slice(2,-1);return f==="!"||f==="!!"?(a(`Verbatim tags aren't resolved, so ${n} is invalid.`),null):(n[n.length-1]!==">"&&a("Verbatim tags must end with a >"),f)}const[,l,o]=n.match(/^(.*!)([^!]*)$/s);o||a(`The ${n} tag has no suffix`);const c=this.tags[l];if(c)try{return c+decodeURIComponent(o)}catch(f){return a(String(f)),null}return l==="!"?n:(a(`Could not resolve tag: ${n}`),null)}tagString(n){for(const[a,l]of Object.entries(this.tags))if(n.startsWith(l))return a+jw(n.substring(l.length));return n[0]==="!"?n:`!<${n}>`}toString(n){const a=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],l=Object.entries(this.tags);let o;if(n&&l.length>0&&at(n.contents)){const c={};xs(n.contents,(f,m)=>{at(m)&&m.tag&&(c[m.tag]=!0)}),o=Object.keys(c)}else o=[];for(const[c,f]of l)c==="!!"&&f==="tag:yaml.org,2002:"||(!n||o.some(m=>m.startsWith(f)))&&a.push(`%TAG ${c} ${f}`);return a.join(`
10
+ `)}}Ct.defaultYaml={explicit:!1,version:"1.2"};Ct.defaultTags={"!!":"tag:yaml.org,2002:"};function dv(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const a=`Anchor must not contain whitespace or control characters: ${JSON.stringify(t)}`;throw new Error(a)}return!0}function fv(t){const n=new Set;return xs(t,{Value(a,l){l.anchor&&n.add(l.anchor)}}),n}function hv(t,n){for(let a=1;;++a){const l=`${t}${a}`;if(!n.has(l))return l}}function _w(t,n){const a=[],l=new Map;let o=null;return{onAnchor:c=>{a.push(c),o??(o=fv(t));const f=hv(n,o);return o.add(f),f},setAnchors:()=>{for(const c of a){const f=l.get(c);if(typeof f=="object"&&f.anchor&&(Ie(f.node)||it(f.node)))f.node.anchor=f.anchor;else{const m=new Error("Failed to resolve repeated object (this should not happen)");throw m.source=c,m}}},sourceObjects:l}}function ls(t,n,a,l){if(l&&typeof l=="object")if(Array.isArray(l))for(let o=0,c=l.length;o<c;++o){const f=l[o],m=ls(t,l,String(o),f);m===void 0?delete l[o]:m!==f&&(l[o]=m)}else if(l instanceof Map)for(const o of Array.from(l.keys())){const c=l.get(o),f=ls(t,l,o,c);f===void 0?l.delete(o):f!==c&&l.set(o,f)}else if(l instanceof Set)for(const o of Array.from(l)){const c=ls(t,l,o,o);c===void 0?l.delete(o):c!==o&&(l.delete(o),l.add(c))}else for(const[o,c]of Object.entries(l)){const f=ls(t,l,o,c);f===void 0?delete l[o]:f!==c&&(l[o]=f)}return t.call(n,a,l)}function dn(t,n,a){if(Array.isArray(t))return t.map((l,o)=>dn(l,String(o),a));if(t&&typeof t.toJSON=="function"){if(!a||!uv(t))return t.toJSON(n,a);const l={aliasCount:0,count:1,res:void 0};a.anchors.set(t,l),a.onCreate=c=>{l.res=c,delete a.onCreate};const o=t.toJSON(n,a);return a.onCreate&&a.onCreate(o),o}return typeof t=="bigint"&&!a?.keep?Number(t):t}class uf{constructor(n){Object.defineProperty(this,fn,{value:n})}clone(){const n=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return this.range&&(n.range=this.range.slice()),n}toJS(n,{mapAsMap:a,maxAliasCount:l,onAnchor:o,reviver:c}={}){if(!Lo(n))throw new TypeError("A document argument is required");const f={anchors:new Map,doc:n,keep:!0,mapAsMap:a===!0,mapKeyWarned:!1,maxAliasCount:typeof l=="number"?l:100},m=dn(this,"",f);if(typeof o=="function")for(const{count:g,res:p}of f.anchors.values())o(p,g);return typeof c=="function"?ls(c,{"":m},"",m):m}}class df extends uf{constructor(n){super(cf),this.source=n,Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(n,a){let l;a?.aliasResolveCache?l=a.aliasResolveCache:(l=[],xs(n,{Node:(c,f)=>{(ua(f)||uv(f))&&l.push(f)}}),a&&(a.aliasResolveCache=l));let o;for(const c of l){if(c===this)break;c.anchor===this.source&&(o=c)}return o}toJSON(n,a){if(!a)return{source:this.source};const{anchors:l,doc:o,maxAliasCount:c}=a,f=this.resolve(o,a);if(!f){const g=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(g)}let m=l.get(f);if(m||(dn(f,null,a),m=l.get(f)),m?.res===void 0){const g="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(g)}if(c>=0&&(m.count+=1,m.aliasCount===0&&(m.aliasCount=vo(o,f,l)),m.count*m.aliasCount>c)){const g="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(g)}return m.res}toString(n,a,l){const o=`*${this.source}`;if(n){if(dv(this.source),n.options.verifyAliasOrder&&!n.anchors.has(this.source)){const c=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(c)}if(n.implicitKey)return`${o} `}return o}}function vo(t,n,a){if(ua(n)){const l=n.resolve(t),o=a&&l&&a.get(l);return o?o.count*o.aliasCount:0}else if(it(n)){let l=0;for(const o of n.items){const c=vo(t,o,a);c>l&&(l=c)}return l}else if(st(n)){const l=vo(t,n.key,a),o=vo(t,n.value,a);return Math.max(l,o)}return 1}const mv=t=>!t||typeof t!="function"&&typeof t!="object";class we extends uf{constructor(n){super(An),this.value=n}toJSON(n,a){return a?.keep?this.value:dn(this.value,n,a)}toString(){return String(this.value)}}we.BLOCK_FOLDED="BLOCK_FOLDED";we.BLOCK_LITERAL="BLOCK_LITERAL";we.PLAIN="PLAIN";we.QUOTE_DOUBLE="QUOTE_DOUBLE";we.QUOTE_SINGLE="QUOTE_SINGLE";const kw="tag:yaml.org,2002:";function zw(t,n,a){if(n){const l=a.filter(c=>c.tag===n),o=l.find(c=>!c.format)??l[0];if(!o)throw new Error(`Tag ${n} not found`);return o}return a.find(l=>l.identify?.(t)&&!l.format)}function _l(t,n,a){if(Lo(t)&&(t=t.contents),at(t))return t;if(st(t)){const v=a.schema[Di].createNode?.(a.schema,null,a);return v.items.push(t),v}(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt<"u"&&t instanceof BigInt)&&(t=t.valueOf());const{aliasDuplicateObjects:l,onAnchor:o,onTagObj:c,schema:f,sourceObjects:m}=a;let g;if(l&&t&&typeof t=="object"){if(g=m.get(t),g)return g.anchor??(g.anchor=o(t)),new df(g.anchor);g={anchor:null,node:null},m.set(t,g)}n?.startsWith("!!")&&(n=kw+n.slice(2));let p=zw(t,n,f.tags);if(!p){if(t&&typeof t.toJSON=="function"&&(t=t.toJSON()),!t||typeof t!="object"){const v=new we(t);return g&&(g.node=v),v}p=t instanceof Map?f[Di]:Symbol.iterator in Object(t)?f[bs]:f[Di]}c&&(c(p),delete a.onTagObj);const b=p?.createNode?p.createNode(a.schema,t,a):typeof p?.nodeClass?.from=="function"?p.nodeClass.from(a.schema,t,a):new we(t);return n?b.tag=n:p.default||(b.tag=p.tag),g&&(g.node=b),b}function No(t,n,a){let l=a;for(let o=n.length-1;o>=0;--o){const c=n[o];if(typeof c=="number"&&Number.isInteger(c)&&c>=0){const f=[];f[c]=l,l=f}else l=new Map([[c,l]])}return _l(l,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const Sl=t=>t==null||typeof t=="object"&&!!t[Symbol.iterator]().next().done;class pv extends uf{constructor(n,a){super(n),Object.defineProperty(this,"schema",{value:a,configurable:!0,enumerable:!1,writable:!0})}clone(n){const a=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));return n&&(a.schema=n),a.items=a.items.map(l=>at(l)||st(l)?l.clone(n):l),this.range&&(a.range=this.range.slice()),a}addIn(n,a){if(Sl(n))this.add(a);else{const[l,...o]=n,c=this.get(l,!0);if(it(c))c.addIn(o,a);else if(c===void 0&&this.schema)this.set(l,No(this.schema,o,a));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}deleteIn(n){const[a,...l]=n;if(l.length===0)return this.delete(a);const o=this.get(a,!0);if(it(o))return o.deleteIn(l);throw new Error(`Expected YAML collection at ${a}. Remaining path: ${l}`)}getIn(n,a){const[l,...o]=n,c=this.get(l,!0);return o.length===0?!a&&Ie(c)?c.value:c:it(c)?c.getIn(o,a):void 0}hasAllNullValues(n){return this.items.every(a=>{if(!st(a))return!1;const l=a.value;return l==null||n&&Ie(l)&&l.value==null&&!l.commentBefore&&!l.comment&&!l.tag})}hasIn(n){const[a,...l]=n;if(l.length===0)return this.has(a);const o=this.get(a,!0);return it(o)?o.hasIn(l):!1}setIn(n,a){const[l,...o]=n;if(o.length===0)this.set(l,a);else{const c=this.get(l,!0);if(it(c))c.setIn(o,a);else if(c===void 0&&this.schema)this.set(l,No(this.schema,o,a));else throw new Error(`Expected YAML collection at ${l}. Remaining path: ${o}`)}}}const Ew=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function Wn(t,n){return/^\n+$/.test(t)?t.substring(1):n?t.replace(/^(?! *$)/gm,n):t}const la=(t,n,a)=>t.endsWith(`
11
+ `)?Wn(a,n):a.includes(`
12
+ `)?`
13
+ `+Wn(a,n):(t.endsWith(" ")?"":" ")+a,gv="flow",Gd="block",bo="quoted";function Uo(t,n,a="flow",{indentAtStart:l,lineWidth:o=80,minContentWidth:c=20,onFold:f,onOverflow:m}={}){if(!o||o<0)return t;o<c&&(c=0);const g=Math.max(1+c,1+o-n.length);if(t.length<=g)return t;const p=[],b={};let v=o-n.length;typeof l=="number"&&(l>o-Math.max(2,c)?p.push(0):v=o-l);let x,j,z=!1,w=-1,_=-1,E=-1;a===Gd&&(w=Wg(t,w,n.length),w!==-1&&(v=w+g));for(let T;T=t[w+=1];){if(a===bo&&T==="\\"){switch(_=w,t[w+1]){case"x":w+=3;break;case"u":w+=5;break;case"U":w+=9;break;default:w+=1}E=w}if(T===`
14
+ `)a===Gd&&(w=Wg(t,w,n.length)),v=w+n.length+g,x=void 0;else{if(T===" "&&j&&j!==" "&&j!==`
15
+ `&&j!==" "){const D=t[w+1];D&&D!==" "&&D!==`
16
+ `&&D!==" "&&(x=w)}if(w>=v)if(x)p.push(x),v=x+g,x=void 0;else if(a===bo){for(;j===" "||j===" ";)j=T,T=t[w+=1],z=!0;const D=w>E+1?w-2:_-1;if(b[D])return t;p.push(D),b[D]=!0,v=D+g,x=void 0}else z=!0}j=T}if(z&&m&&m(),p.length===0)return t;f&&f();let O=t.slice(0,p[0]);for(let T=0;T<p.length;++T){const D=p[T],L=p[T+1]||t.length;D===0?O=`
17
+ ${n}${t.slice(0,L)}`:(a===bo&&b[D]&&(O+=`${t[D]}\\`),O+=`
18
+ ${n}${t.slice(D+1,L)}`)}return O}function Wg(t,n,a){let l=n,o=n+1,c=t[o];for(;c===" "||c===" ";)if(n<o+a)c=t[++n];else{do c=t[++n];while(c&&c!==`
19
+ `);l=n,o=n+1,c=t[o]}return l}const $o=(t,n)=>({indentAtStart:n?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth}),Bo=t=>/^(%|---|\.\.\.)/m.test(t);function Cw(t,n,a){if(!n||n<0)return!1;const l=n-a,o=t.length;if(o<=l)return!1;for(let c=0,f=0;c<o;++c)if(t[c]===`
20
+ `){if(c-f>l)return!0;if(f=c+1,o-f<=l)return!1}return!0}function jl(t,n){const a=JSON.stringify(t);if(n.options.doubleQuotedAsJSON)return a;const{implicitKey:l}=n,o=n.options.doubleQuotedMinMultiLineLength,c=n.indent||(Bo(t)?" ":"");let f="",m=0;for(let g=0,p=a[g];p;p=a[++g])if(p===" "&&a[g+1]==="\\"&&a[g+2]==="n"&&(f+=a.slice(m,g)+"\\ ",g+=1,m=g,p="\\"),p==="\\")switch(a[g+1]){case"u":{f+=a.slice(m,g);const b=a.substr(g+2,4);switch(b){case"0000":f+="\\0";break;case"0007":f+="\\a";break;case"000b":f+="\\v";break;case"001b":f+="\\e";break;case"0085":f+="\\N";break;case"00a0":f+="\\_";break;case"2028":f+="\\L";break;case"2029":f+="\\P";break;default:b.substr(0,2)==="00"?f+="\\x"+b.substr(2):f+=a.substr(g,6)}g+=5,m=g+1}break;case"n":if(l||a[g+2]==='"'||a.length<o)g+=1;else{for(f+=a.slice(m,g)+`
21
+
22
+ `;a[g+2]==="\\"&&a[g+3]==="n"&&a[g+4]!=='"';)f+=`
23
+ `,g+=2;f+=c,a[g+2]===" "&&(f+="\\"),g+=1,m=g+1}break;default:g+=1}return f=m?f+a.slice(m):a,l?f:Uo(f,c,bo,$o(n,!1))}function Yd(t,n){if(n.options.singleQuote===!1||n.implicitKey&&t.includes(`
24
+ `)||/[ \t]\n|\n[ \t]/.test(t))return jl(t,n);const a=n.indent||(Bo(t)?" ":""),l="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&
25
+ ${a}`)+"'";return n.implicitKey?l:Uo(l,a,gv,$o(n,!1))}function rs(t,n){const{singleQuote:a}=n.options;let l;if(a===!1)l=jl;else{const o=t.includes('"'),c=t.includes("'");o&&!c?l=Yd:c&&!o?l=jl:l=a?Yd:jl}return l(t,n)}let Vd;try{Vd=new RegExp(`(^|(?<!
26
+ ))
27
+ +(?!
28
+ |$)`,"g")}catch{Vd=/\n+(?!\n|$)/g}function xo({comment:t,type:n,value:a},l,o,c){const{blockQuote:f,commentString:m,lineWidth:g}=l.options;if(!f||/\n[\t ]+$/.test(a))return rs(a,l);const p=l.indent||(l.forceBlockIndent||Bo(a)?" ":""),b=f==="literal"?!0:f==="folded"||n===we.BLOCK_FOLDED?!1:n===we.BLOCK_LITERAL?!0:!Cw(a,g,p.length);if(!a)return b?`|
29
+ `:`>
30
+ `;let v,x;for(x=a.length;x>0;--x){const L=a[x-1];if(L!==`
31
+ `&&L!==" "&&L!==" ")break}let j=a.substring(x);const z=j.indexOf(`
32
+ `);z===-1?v="-":a===j||z!==j.length-1?(v="+",c&&c()):v="",j&&(a=a.slice(0,-j.length),j[j.length-1]===`
33
+ `&&(j=j.slice(0,-1)),j=j.replace(Vd,`$&${p}`));let w=!1,_,E=-1;for(_=0;_<a.length;++_){const L=a[_];if(L===" ")w=!0;else if(L===`
34
+ `)E=_;else break}let O=a.substring(0,E<_?E+1:_);O&&(a=a.substring(O.length),O=O.replace(/\n+/g,`$&${p}`));let D=(w?p?"2":"1":"")+v;if(t&&(D+=" "+m(t.replace(/ ?[\r\n]+/g," ")),o&&o()),!b){const L=a.replace(/\n+/g,`
35
+ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${p}`);let I=!1;const G=$o(l,!0);f!=="folded"&&n!==we.BLOCK_FOLDED&&(G.onOverflow=()=>{I=!0});const M=Uo(`${O}${L}${j}`,p,Gd,G);if(!I)return`>${D}
36
+ ${p}${M}`}return a=a.replace(/\n+/g,`$&${p}`),`|${D}
37
+ ${p}${O}${a}${j}`}function Aw(t,n,a,l){const{type:o,value:c}=t,{actualString:f,implicitKey:m,indent:g,indentStep:p,inFlow:b}=n;if(m&&c.includes(`
38
+ `)||b&&/[[\]{},]/.test(c))return rs(c,n);if(/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(c))return m||b||!c.includes(`
39
+ `)?rs(c,n):xo(t,n,a,l);if(!m&&!b&&o!==we.PLAIN&&c.includes(`
40
+ `))return xo(t,n,a,l);if(Bo(c)){if(g==="")return n.forceBlockIndent=!0,xo(t,n,a,l);if(m&&g===p)return rs(c,n)}const v=c.replace(/\n+/g,`$&
41
+ ${g}`);if(f){const x=w=>w.default&&w.tag!=="tag:yaml.org,2002:str"&&w.test?.test(v),{compat:j,tags:z}=n.doc.schema;if(z.some(x)||j?.some(x))return rs(c,n)}return m?v:Uo(v,g,gv,$o(n,!1))}function ff(t,n,a,l){const{implicitKey:o,inFlow:c}=n,f=typeof t.value=="string"?t:Object.assign({},t,{value:String(t.value)});let{type:m}=t;m!==we.QUOTE_DOUBLE&&/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(f.value)&&(m=we.QUOTE_DOUBLE);const g=b=>{switch(b){case we.BLOCK_FOLDED:case we.BLOCK_LITERAL:return o||c?rs(f.value,n):xo(f,n,a,l);case we.QUOTE_DOUBLE:return jl(f.value,n);case we.QUOTE_SINGLE:return Yd(f.value,n);case we.PLAIN:return Aw(f,n,a,l);default:return null}};let p=g(m);if(p===null){const{defaultKeyType:b,defaultStringType:v}=n.options,x=o&&b||v;if(p=g(x),p===null)throw new Error(`Unsupported default string type ${x}`)}return p}function yv(t,n){const a=Object.assign({blockQuote:!0,commentString:Ew,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:!1,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:!0,indentSeq:!0,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:!1,singleQuote:null,trueStr:"true",verifyAliasOrder:!0},t.schema.toStringOptions,n);let l;switch(a.collectionStyle){case"block":l=!1;break;case"flow":l=!0;break;default:l=null}return{anchors:new Set,doc:t,flowCollectionPadding:a.flowCollectionPadding?" ":"",indent:"",indentStep:typeof a.indent=="number"?" ".repeat(a.indent):" ",inFlow:l,options:a}}function Tw(t,n){if(n.tag){const o=t.filter(c=>c.tag===n.tag);if(o.length>0)return o.find(c=>c.format===n.format)??o[0]}let a,l;if(Ie(n)){l=n.value;let o=t.filter(c=>c.identify?.(l));if(o.length>1){const c=o.filter(f=>f.test);c.length>0&&(o=c)}a=o.find(c=>c.format===n.format)??o.find(c=>!c.format)}else l=n,a=t.find(o=>o.nodeClass&&l instanceof o.nodeClass);if(!a){const o=l?.constructor?.name??(l===null?"null":typeof l);throw new Error(`Tag not resolved for ${o} value`)}return a}function Ow(t,n,{anchors:a,doc:l}){if(!l.directives)return"";const o=[],c=(Ie(t)||it(t))&&t.anchor;c&&dv(c)&&(a.add(c),o.push(`&${c}`));const f=t.tag??(n.default?null:n.tag);return f&&o.push(l.directives.tagString(f)),o.join(" ")}function ps(t,n,a,l){if(st(t))return t.toString(n,a,l);if(ua(t)){if(n.doc.directives)return t.toString(n);if(n.resolvedAliases?.has(t))throw new TypeError("Cannot stringify circular structure without alias nodes");n.resolvedAliases?n.resolvedAliases.add(t):n.resolvedAliases=new Set([t]),t=t.resolve(n.doc)}let o;const c=at(t)?t:n.doc.createNode(t,{onTagObj:g=>o=g});o??(o=Tw(n.doc.schema.tags,c));const f=Ow(c,o,n);f.length>0&&(n.indentAtStart=(n.indentAtStart??0)+f.length+1);const m=typeof o.stringify=="function"?o.stringify(c,n,a,l):Ie(c)?ff(c,n,a,l):c.toString(n,a,l);return f?Ie(c)||m[0]==="{"||m[0]==="["?`${f} ${m}`:`${f}
42
+ ${n.indent}${m}`:m}function Dw({key:t,value:n},a,l,o){const{allNullValues:c,doc:f,indent:m,indentStep:g,options:{commentString:p,indentSeq:b,simpleKeys:v}}=a;let x=at(t)&&t.comment||null;if(v){if(x)throw new Error("With simple keys, key nodes cannot have comments");if(it(t)||!at(t)&&typeof t=="object"){const G="With simple keys, collection cannot be used as a key value";throw new Error(G)}}let j=!v&&(!t||x&&n==null&&!a.inFlow||it(t)||(Ie(t)?t.type===we.BLOCK_FOLDED||t.type===we.BLOCK_LITERAL:typeof t=="object"));a=Object.assign({},a,{allNullValues:!1,implicitKey:!j&&(v||!c),indent:m+g});let z=!1,w=!1,_=ps(t,a,()=>z=!0,()=>w=!0);if(!j&&!a.inFlow&&_.length>1024){if(v)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");j=!0}if(a.inFlow){if(c||n==null)return z&&l&&l(),_===""?"?":j?`? ${_}`:_}else if(c&&!v||n==null&&j)return _=`? ${_}`,x&&!z?_+=la(_,a.indent,p(x)):w&&o&&o(),_;z&&(x=null),j?(x&&(_+=la(_,a.indent,p(x))),_=`? ${_}
43
+ ${m}:`):(_=`${_}:`,x&&(_+=la(_,a.indent,p(x))));let E,O,T;at(n)?(E=!!n.spaceBefore,O=n.commentBefore,T=n.comment):(E=!1,O=null,T=null,n&&typeof n=="object"&&(n=f.createNode(n))),a.implicitKey=!1,!j&&!x&&Ie(n)&&(a.indentAtStart=_.length+1),w=!1,!b&&g.length>=2&&!a.inFlow&&!j&&Ol(n)&&!n.flow&&!n.tag&&!n.anchor&&(a.indent=a.indent.substring(2));let D=!1;const L=ps(n,a,()=>D=!0,()=>w=!0);let I=" ";if(x||E||O){if(I=E?`
44
+ `:"",O){const G=p(O);I+=`
45
+ ${Wn(G,a.indent)}`}L===""&&!a.inFlow?I===`
46
+ `&&T&&(I=`
47
+
48
+ `):I+=`
49
+ ${a.indent}`}else if(!j&&it(n)){const G=L[0],M=L.indexOf(`
50
+ `),F=M!==-1,xe=a.inFlow??n.flow??n.items.length===0;if(F||!xe){let X=!1;if(F&&(G==="&"||G==="!")){let le=L.indexOf(" ");G==="&"&&le!==-1&&le<M&&L[le+1]==="!"&&(le=L.indexOf(" ",le+1)),(le===-1||M<le)&&(X=!0)}X||(I=`
51
+ ${a.indent}`)}}else(L===""||L[0]===`
52
+ `)&&(I="");return _+=I+L,a.inFlow?D&&l&&l():T&&!D?_+=la(_,a.indent,p(T)):w&&o&&o(),_}function Rw(t,n){(t==="debug"||t==="warn")&&console.warn(n)}const eo="<<",ei={identify:t=>t===eo||typeof t=="symbol"&&t.description===eo,default:"key",tag:"tag:yaml.org,2002:merge",test:/^<<$/,resolve:()=>Object.assign(new we(Symbol(eo)),{addToJSMap:vv}),stringify:()=>eo},Mw=(t,n)=>(ei.identify(n)||Ie(n)&&(!n.type||n.type===we.PLAIN)&&ei.identify(n.value))&&t?.doc.schema.tags.some(a=>a.tag===ei.tag&&a.default);function vv(t,n,a){if(a=t&&ua(a)?a.resolve(t.doc):a,Ol(a))for(const l of a.items)_d(t,n,l);else if(Array.isArray(a))for(const l of a)_d(t,n,l);else _d(t,n,a)}function _d(t,n,a){const l=t&&ua(a)?a.resolve(t.doc):a;if(!Tl(l))throw new Error("Merge sources must be maps or map aliases");const o=l.toJSON(null,t,Map);for(const[c,f]of o)n instanceof Map?n.has(c)||n.set(c,f):n instanceof Set?n.add(c):Object.prototype.hasOwnProperty.call(n,c)||Object.defineProperty(n,c,{value:f,writable:!0,enumerable:!0,configurable:!0});return n}function bv(t,n,{key:a,value:l}){if(at(a)&&a.addToJSMap)a.addToJSMap(t,n,l);else if(Mw(t,a))vv(t,n,l);else{const o=dn(a,"",t);if(n instanceof Map)n.set(o,dn(l,o,t));else if(n instanceof Set)n.add(o);else{const c=Lw(a,o,t),f=dn(l,c,t);c in n?Object.defineProperty(n,c,{value:f,writable:!0,enumerable:!0,configurable:!0}):n[c]=f}}return n}function Lw(t,n,a){if(n===null)return"";if(typeof n!="object")return String(n);if(at(t)&&a?.doc){const l=yv(a.doc,{});l.anchors=new Set;for(const c of a.anchors.keys())l.anchors.add(c.anchor);l.inFlow=!0,l.inStringifyKey=!0;const o=t.toString(l);if(!a.mapKeyWarned){let c=JSON.stringify(o);c.length>40&&(c=c.substring(0,36)+'..."'),Rw(a.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${c}. Set mapAsMap: true to use object keys.`),a.mapKeyWarned=!0}return o}return JSON.stringify(n)}function hf(t,n,a){const l=_l(t,void 0,a),o=_l(n,void 0,a);return new At(l,o)}class At{constructor(n,a=null){Object.defineProperty(this,fn,{value:cv}),this.key=n,this.value=a}clone(n){let{key:a,value:l}=this;return at(a)&&(a=a.clone(n)),at(l)&&(l=l.clone(n)),new At(a,l)}toJSON(n,a){const l=a?.mapAsMap?new Map:{};return bv(a,l,this)}toString(n,a,l){return n?.doc?Dw(this,n,a,l):JSON.stringify(this)}}function xv(t,n,a){return(n.inFlow??t.flow?$w:Uw)(t,n,a)}function Uw({comment:t,items:n},a,{blockItemPrefix:l,flowChars:o,itemIndent:c,onChompKeep:f,onComment:m}){const{indent:g,options:{commentString:p}}=a,b=Object.assign({},a,{indent:c,type:null});let v=!1;const x=[];for(let z=0;z<n.length;++z){const w=n[z];let _=null;if(at(w))!v&&w.spaceBefore&&x.push(""),jo(a,x,w.commentBefore,v),w.comment&&(_=w.comment);else if(st(w)){const O=at(w.key)?w.key:null;O&&(!v&&O.spaceBefore&&x.push(""),jo(a,x,O.commentBefore,v))}v=!1;let E=ps(w,b,()=>_=null,()=>v=!0);_&&(E+=la(E,c,p(_))),v&&_&&(v=!1),x.push(l+E)}let j;if(x.length===0)j=o.start+o.end;else{j=x[0];for(let z=1;z<x.length;++z){const w=x[z];j+=w?`
53
+ ${g}${w}`:`
54
+ `}}return t?(j+=`
55
+ `+Wn(p(t),g),m&&m()):v&&f&&f(),j}function $w({items:t},n,{flowChars:a,itemIndent:l}){const{indent:o,indentStep:c,flowCollectionPadding:f,options:{commentString:m}}=n;l+=c;const g=Object.assign({},n,{indent:l,inFlow:!0,type:null});let p=!1,b=0;const v=[];for(let z=0;z<t.length;++z){const w=t[z];let _=null;if(at(w))w.spaceBefore&&v.push(""),jo(n,v,w.commentBefore,!1),w.comment&&(_=w.comment);else if(st(w)){const O=at(w.key)?w.key:null;O&&(O.spaceBefore&&v.push(""),jo(n,v,O.commentBefore,!1),O.comment&&(p=!0));const T=at(w.value)?w.value:null;T?(T.comment&&(_=T.comment),T.commentBefore&&(p=!0)):w.value==null&&O?.comment&&(_=O.comment)}_&&(p=!0);let E=ps(w,g,()=>_=null);z<t.length-1&&(E+=","),_&&(E+=la(E,l,m(_))),!p&&(v.length>b||E.includes(`
56
+ `))&&(p=!0),v.push(E),b=v.length}const{start:x,end:j}=a;if(v.length===0)return x+j;if(!p){const z=v.reduce((w,_)=>w+_.length+2,2);p=n.options.lineWidth>0&&z>n.options.lineWidth}if(p){let z=x;for(const w of v)z+=w?`
57
+ ${c}${o}${w}`:`
58
+ `;return`${z}
59
+ ${o}${j}`}else return`${x}${f}${v.join(" ")}${f}${j}`}function jo({indent:t,options:{commentString:n}},a,l,o){if(l&&o&&(l=l.replace(/^\n+/,"")),l){const c=Wn(n(l),t);a.push(c.trimStart())}}function ra(t,n){const a=Ie(n)?n.value:n;for(const l of t)if(st(l)&&(l.key===n||l.key===a||Ie(l.key)&&l.key.value===a))return l}class un extends pv{static get tagName(){return"tag:yaml.org,2002:map"}constructor(n){super(Di,n),this.items=[]}static from(n,a,l){const{keepUndefined:o,replacer:c}=l,f=new this(n),m=(g,p)=>{if(typeof c=="function")p=c.call(a,g,p);else if(Array.isArray(c)&&!c.includes(g))return;(p!==void 0||o)&&f.items.push(hf(g,p,l))};if(a instanceof Map)for(const[g,p]of a)m(g,p);else if(a&&typeof a=="object")for(const g of Object.keys(a))m(g,a[g]);return typeof n.sortMapEntries=="function"&&f.items.sort(n.sortMapEntries),f}add(n,a){let l;st(n)?l=n:!n||typeof n!="object"||!("key"in n)?l=new At(n,n?.value):l=new At(n.key,n.value);const o=ra(this.items,l.key),c=this.schema?.sortMapEntries;if(o){if(!a)throw new Error(`Key ${l.key} already set`);Ie(o.value)&&mv(l.value)?o.value.value=l.value:o.value=l.value}else if(c){const f=this.items.findIndex(m=>c(l,m)<0);f===-1?this.items.push(l):this.items.splice(f,0,l)}else this.items.push(l)}delete(n){const a=ra(this.items,n);return a?this.items.splice(this.items.indexOf(a),1).length>0:!1}get(n,a){const o=ra(this.items,n)?.value;return(!a&&Ie(o)?o.value:o)??void 0}has(n){return!!ra(this.items,n)}set(n,a){this.add(new At(n,a),!0)}toJSON(n,a,l){const o=l?new l:a?.mapAsMap?new Map:{};a?.onCreate&&a.onCreate(o);for(const c of this.items)bv(a,o,c);return o}toString(n,a,l){if(!n)return JSON.stringify(this);for(const o of this.items)if(!st(o))throw new Error(`Map items must all be pairs; found ${JSON.stringify(o)} instead`);return!n.allNullValues&&this.hasAllNullValues(!1)&&(n=Object.assign({},n,{allNullValues:!0})),xv(this,n,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:n.indent||"",onChompKeep:l,onComment:a})}}const Ss={collection:"map",default:!0,nodeClass:un,tag:"tag:yaml.org,2002:map",resolve(t,n){return Tl(t)||n("Expected a mapping for this tag"),t},createNode:(t,n,a)=>un.from(t,n,a)};class oa extends pv{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(n){super(bs,n),this.items=[]}add(n){this.items.push(n)}delete(n){const a=to(n);return typeof a!="number"?!1:this.items.splice(a,1).length>0}get(n,a){const l=to(n);if(typeof l!="number")return;const o=this.items[l];return!a&&Ie(o)?o.value:o}has(n){const a=to(n);return typeof a=="number"&&a<this.items.length}set(n,a){const l=to(n);if(typeof l!="number")throw new Error(`Expected a valid index, not ${n}.`);const o=this.items[l];Ie(o)&&mv(a)?o.value=a:this.items[l]=a}toJSON(n,a){const l=[];a?.onCreate&&a.onCreate(l);let o=0;for(const c of this.items)l.push(dn(c,String(o++),a));return l}toString(n,a,l){return n?xv(this,n,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(n.indent||"")+" ",onChompKeep:l,onComment:a}):JSON.stringify(this)}static from(n,a,l){const{replacer:o}=l,c=new this(n);if(a&&Symbol.iterator in Object(a)){let f=0;for(let m of a){if(typeof o=="function"){const g=a instanceof Set?m:String(f++);m=o.call(a,g,m)}c.items.push(_l(m,void 0,l))}}return c}}function to(t){let n=Ie(t)?t.value:t;return n&&typeof n=="string"&&(n=Number(n)),typeof n=="number"&&Number.isInteger(n)&&n>=0?n:null}const ws={collection:"seq",default:!0,nodeClass:oa,tag:"tag:yaml.org,2002:seq",resolve(t,n){return Ol(t)||n("Expected a sequence for this tag"),t},createNode:(t,n,a)=>oa.from(t,n,a)},Zo={identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,n,a,l){return n=Object.assign({actualString:!0},n),ff(t,n,a,l)}},qo={identify:t=>t==null,createNode:()=>new we(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new we(null),stringify:({source:t},n)=>typeof t=="string"&&qo.test.test(t)?t:n.options.nullStr},mf={identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new we(t[0]==="t"||t[0]==="T"),stringify({source:t,value:n},a){if(t&&mf.test.test(t)){const l=t[0]==="t"||t[0]==="T";if(n===l)return t}return n?a.options.trueStr:a.options.falseStr}};function Sn({format:t,minFractionDigits:n,tag:a,value:l}){if(typeof l=="bigint")return String(l);const o=typeof l=="number"?l:Number(l);if(!isFinite(o))return isNaN(o)?".nan":o<0?"-.inf":".inf";let c=Object.is(l,-0)?"-0":JSON.stringify(l);if(!t&&n&&(!a||a==="tag:yaml.org,2002:float")&&/^\d/.test(c)){let f=c.indexOf(".");f<0&&(f=c.length,c+=".");let m=n-(c.length-f-1);for(;m-- >0;)c+="0"}return c}const Sv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Sn},wv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const n=Number(t.value);return isFinite(n)?n.toExponential():Sn(t)}},Nv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const n=new we(parseFloat(t)),a=t.indexOf(".");return a!==-1&&t[t.length-1]==="0"&&(n.minFractionDigits=t.length-a-1),n},stringify:Sn},Ho=t=>typeof t=="bigint"||Number.isInteger(t),pf=(t,n,a,{intAsBigInt:l})=>l?BigInt(t):parseInt(t.substring(n),a);function jv(t,n,a){const{value:l}=t;return Ho(l)&&l>=0?a+l.toString(n):Sn(t)}const _v={identify:t=>Ho(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,n,a)=>pf(t,2,8,a),stringify:t=>jv(t,8,"0o")},kv={identify:Ho,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,n,a)=>pf(t,0,10,a),stringify:Sn},zv={identify:t=>Ho(t)&&t>=0,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,n,a)=>pf(t,2,16,a),stringify:t=>jv(t,16,"0x")},Bw=[Ss,ws,Zo,qo,mf,_v,kv,zv,Sv,wv,Nv];function ey(t){return typeof t=="bigint"||Number.isInteger(t)}const no=({value:t})=>JSON.stringify(t),Zw=[{identify:t=>typeof t=="string",default:!0,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:no},{identify:t=>t==null,createNode:()=>new we(null),default:!0,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:no},{identify:t=>typeof t=="boolean",default:!0,tag:"tag:yaml.org,2002:bool",test:/^true$|^false$/,resolve:t=>t==="true",stringify:no},{identify:ey,default:!0,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,n,{intAsBigInt:a})=>a?BigInt(t):parseInt(t,10),stringify:({value:t})=>ey(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:no}],qw={default:!0,tag:"",test:/^/,resolve(t,n){return n(`Unresolved plain scalar ${JSON.stringify(t)}`),t}},Hw=[Ss,ws].concat(Zw,qw),gf={identify:t=>t instanceof Uint8Array,default:!1,tag:"tag:yaml.org,2002:binary",resolve(t,n){if(typeof atob=="function"){const a=atob(t.replace(/[\n\r]/g,"")),l=new Uint8Array(a.length);for(let o=0;o<a.length;++o)l[o]=a.charCodeAt(o);return l}else return n("This environment does not support reading binary tags; either Buffer or atob is required"),t},stringify({comment:t,type:n,value:a},l,o,c){if(!a)return"";const f=a;let m;if(typeof btoa=="function"){let g="";for(let p=0;p<f.length;++p)g+=String.fromCharCode(f[p]);m=btoa(g)}else throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required");if(n??(n=we.BLOCK_LITERAL),n!==we.QUOTE_DOUBLE){const g=Math.max(l.options.lineWidth-l.indent.length,l.options.minContentWidth),p=Math.ceil(m.length/g),b=new Array(p);for(let v=0,x=0;v<p;++v,x+=g)b[v]=m.substr(x,g);m=b.join(n===we.BLOCK_LITERAL?`
60
+ `:" ")}return ff({comment:t,type:n,value:m},l,o,c)}};function Ev(t,n){if(Ol(t))for(let a=0;a<t.items.length;++a){let l=t.items[a];if(!st(l)){if(Tl(l)){l.items.length>1&&n("Each pair must have its own sequence indicator");const o=l.items[0]||new At(new we(null));if(l.commentBefore&&(o.key.commentBefore=o.key.commentBefore?`${l.commentBefore}
61
+ ${o.key.commentBefore}`:l.commentBefore),l.comment){const c=o.value??o.key;c.comment=c.comment?`${l.comment}
62
+ ${c.comment}`:l.comment}l=o}t.items[a]=st(l)?l:new At(l)}}else n("Expected a sequence for this tag");return t}function Cv(t,n,a){const{replacer:l}=a,o=new oa(t);o.tag="tag:yaml.org,2002:pairs";let c=0;if(n&&Symbol.iterator in Object(n))for(let f of n){typeof l=="function"&&(f=l.call(n,String(c++),f));let m,g;if(Array.isArray(f))if(f.length===2)m=f[0],g=f[1];else throw new TypeError(`Expected [key, value] tuple: ${f}`);else if(f&&f instanceof Object){const p=Object.keys(f);if(p.length===1)m=p[0],g=f[m];else throw new TypeError(`Expected tuple with one key, not ${p.length} keys`)}else m=f;o.items.push(hf(m,g,a))}return o}const yf={collection:"seq",default:!1,tag:"tag:yaml.org,2002:pairs",resolve:Ev,createNode:Cv};class us extends oa{constructor(){super(),this.add=un.prototype.add.bind(this),this.delete=un.prototype.delete.bind(this),this.get=un.prototype.get.bind(this),this.has=un.prototype.has.bind(this),this.set=un.prototype.set.bind(this),this.tag=us.tag}toJSON(n,a){if(!a)return super.toJSON(n);const l=new Map;a?.onCreate&&a.onCreate(l);for(const o of this.items){let c,f;if(st(o)?(c=dn(o.key,"",a),f=dn(o.value,c,a)):c=dn(o,"",a),l.has(c))throw new Error("Ordered maps must not include duplicate keys");l.set(c,f)}return l}static from(n,a,l){const o=Cv(n,a,l),c=new this;return c.items=o.items,c}}us.tag="tag:yaml.org,2002:omap";const vf={collection:"seq",identify:t=>t instanceof Map,nodeClass:us,default:!1,tag:"tag:yaml.org,2002:omap",resolve(t,n){const a=Ev(t,n),l=[];for(const{key:o}of a.items)Ie(o)&&(l.includes(o.value)?n(`Ordered maps must not include duplicate keys: ${o.value}`):l.push(o.value));return Object.assign(new us,a)},createNode:(t,n,a)=>us.from(t,n,a)};function Av({value:t,source:n},a){return n&&(t?Tv:Ov).test.test(n)?n:t?a.options.trueStr:a.options.falseStr}const Tv={identify:t=>t===!0,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new we(!0),stringify:Av},Ov={identify:t=>t===!1,default:!0,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/,resolve:()=>new we(!1),stringify:Av},Iw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF)|\.nan|\.NaN|\.NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:Sn},Kw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const n=Number(t.value);return isFinite(n)?n.toExponential():Sn(t)}},Gw={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const n=new we(parseFloat(t.replace(/_/g,""))),a=t.indexOf(".");if(a!==-1){const l=t.substring(a+1).replace(/_/g,"");l[l.length-1]==="0"&&(n.minFractionDigits=l.length)}return n},stringify:Sn},Dl=t=>typeof t=="bigint"||Number.isInteger(t);function Io(t,n,a,{intAsBigInt:l}){const o=t[0];if((o==="-"||o==="+")&&(n+=1),t=t.substring(n).replace(/_/g,""),l){switch(a){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const f=BigInt(t);return o==="-"?BigInt(-1)*f:f}const c=parseInt(t,a);return o==="-"?-1*c:c}function bf(t,n,a){const{value:l}=t;if(Dl(l)){const o=l.toString(n);return l<0?"-"+a+o.substr(1):a+o}return Sn(t)}const Yw={identify:Dl,default:!0,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,n,a)=>Io(t,2,2,a),stringify:t=>bf(t,2,"0b")},Vw={identify:Dl,default:!0,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,n,a)=>Io(t,1,8,a),stringify:t=>bf(t,8,"0")},Pw={identify:Dl,default:!0,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,n,a)=>Io(t,0,10,a),stringify:Sn},Qw={identify:Dl,default:!0,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,n,a)=>Io(t,2,16,a),stringify:t=>bf(t,16,"0x")};class ds extends un{constructor(n){super(n),this.tag=ds.tag}add(n){let a;st(n)?a=n:n&&typeof n=="object"&&"key"in n&&"value"in n&&n.value===null?a=new At(n.key,null):a=new At(n,null),ra(this.items,a.key)||this.items.push(a)}get(n,a){const l=ra(this.items,n);return!a&&st(l)?Ie(l.key)?l.key.value:l.key:l}set(n,a){if(typeof a!="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof a}`);const l=ra(this.items,n);l&&!a?this.items.splice(this.items.indexOf(l),1):!l&&a&&this.items.push(new At(n))}toJSON(n,a){return super.toJSON(n,a,Set)}toString(n,a,l){if(!n)return JSON.stringify(this);if(this.hasAllNullValues(!0))return super.toString(Object.assign({},n,{allNullValues:!0}),a,l);throw new Error("Set items must all have null values")}static from(n,a,l){const{replacer:o}=l,c=new this(n);if(a&&Symbol.iterator in Object(a))for(let f of a)typeof o=="function"&&(f=o.call(a,f,f)),c.items.push(hf(f,null,l));return c}}ds.tag="tag:yaml.org,2002:set";const xf={collection:"map",identify:t=>t instanceof Set,nodeClass:ds,default:!1,tag:"tag:yaml.org,2002:set",createNode:(t,n,a)=>ds.from(t,n,a),resolve(t,n){if(Tl(t)){if(t.hasAllNullValues(!0))return Object.assign(new ds,t);n("Set items must all have null values")}else n("Expected a mapping for this tag");return t}};function Sf(t,n){const a=t[0],l=a==="-"||a==="+"?t.substring(1):t,o=f=>n?BigInt(f):Number(f),c=l.replace(/_/g,"").split(":").reduce((f,m)=>f*o(60)+o(m),o(0));return a==="-"?o(-1)*c:c}function Dv(t){let{value:n}=t,a=f=>f;if(typeof n=="bigint")a=f=>BigInt(f);else if(isNaN(n)||!isFinite(n))return Sn(t);let l="";n<0&&(l="-",n*=a(-1));const o=a(60),c=[n%o];return n<60?c.unshift(0):(n=(n-c[0])/o,c.unshift(n%o),n>=60&&(n=(n-c[0])/o,c.unshift(n))),l+c.map(f=>String(f).padStart(2,"0")).join(":").replace(/000000\d*$/,"")}const Rv={identify:t=>typeof t=="bigint"||Number.isInteger(t),default:!0,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,n,{intAsBigInt:a})=>Sf(t,a),stringify:Dv},Mv={identify:t=>typeof t=="number",default:!0,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>Sf(t,!1),stringify:Dv},Ko={identify:t=>t instanceof Date,default:!0,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})(?:(?:t|T|[ \\t]+)([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?)?$"),resolve(t){const n=t.match(Ko.test);if(!n)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,a,l,o,c,f,m]=n.map(Number),g=n[7]?Number((n[7]+"00").substr(1,3)):0;let p=Date.UTC(a,l-1,o,c||0,f||0,m||0,g);const b=n[8];if(b&&b!=="Z"){let v=Sf(b,!1);Math.abs(v)<30&&(v*=60),p-=6e4*v}return new Date(p)},stringify:({value:t})=>t?.toISOString().replace(/(T00:00:00)?\.000Z$/,"")??""},ty=[Ss,ws,Zo,qo,Tv,Ov,Yw,Vw,Pw,Qw,Iw,Kw,Gw,gf,ei,vf,yf,xf,Rv,Mv,Ko],ny=new Map([["core",Bw],["failsafe",[Ss,ws,Zo]],["json",Hw],["yaml11",ty],["yaml-1.1",ty]]),iy={binary:gf,bool:mf,float:Nv,floatExp:wv,floatNaN:Sv,floatTime:Mv,int:kv,intHex:zv,intOct:_v,intTime:Rv,map:Ss,merge:ei,null:qo,omap:vf,pairs:yf,seq:ws,set:xf,timestamp:Ko},Xw={"tag:yaml.org,2002:binary":gf,"tag:yaml.org,2002:merge":ei,"tag:yaml.org,2002:omap":vf,"tag:yaml.org,2002:pairs":yf,"tag:yaml.org,2002:set":xf,"tag:yaml.org,2002:timestamp":Ko};function kd(t,n,a){const l=ny.get(n);if(l&&!t)return a&&!l.includes(ei)?l.concat(ei):l.slice();let o=l;if(!o)if(Array.isArray(t))o=[];else{const c=Array.from(ny.keys()).filter(f=>f!=="yaml11").map(f=>JSON.stringify(f)).join(", ");throw new Error(`Unknown schema "${n}"; use one of ${c} or define customTags array`)}if(Array.isArray(t))for(const c of t)o=o.concat(c);else typeof t=="function"&&(o=t(o.slice()));return a&&(o=o.concat(ei)),o.reduce((c,f)=>{const m=typeof f=="string"?iy[f]:f;if(!m){const g=JSON.stringify(f),p=Object.keys(iy).map(b=>JSON.stringify(b)).join(", ");throw new Error(`Unknown custom tag ${g}; use one of ${p}`)}return c.includes(m)||c.push(m),c},[])}const Jw=(t,n)=>t.key<n.key?-1:t.key>n.key?1:0;class wf{constructor({compat:n,customTags:a,merge:l,resolveKnownTags:o,schema:c,sortMapEntries:f,toStringDefaults:m}){this.compat=Array.isArray(n)?kd(n,"compat"):n?kd(null,n):null,this.name=typeof c=="string"&&c||"core",this.knownTags=o?Xw:{},this.tags=kd(a,this.name,l),this.toStringOptions=m??null,Object.defineProperty(this,Di,{value:Ss}),Object.defineProperty(this,An,{value:Zo}),Object.defineProperty(this,bs,{value:ws}),this.sortMapEntries=typeof f=="function"?f:f===!0?Jw:null}clone(){const n=Object.create(wf.prototype,Object.getOwnPropertyDescriptors(this));return n.tags=this.tags.slice(),n}}function Fw(t,n){const a=[];let l=n.directives===!0;if(n.directives!==!1&&t.directives){const g=t.directives.toString(t);g?(a.push(g),l=!0):t.directives.docStart&&(l=!0)}l&&a.push("---");const o=yv(t,n),{commentString:c}=o.options;if(t.commentBefore){a.length!==1&&a.unshift("");const g=c(t.commentBefore);a.unshift(Wn(g,""))}let f=!1,m=null;if(t.contents){if(at(t.contents)){if(t.contents.spaceBefore&&l&&a.push(""),t.contents.commentBefore){const b=c(t.contents.commentBefore);a.push(Wn(b,""))}o.forceBlockIndent=!!t.comment,m=t.contents.comment}const g=m?void 0:()=>f=!0;let p=ps(t.contents,o,()=>m=null,g);m&&(p+=la(p,"",c(m))),(p[0]==="|"||p[0]===">")&&a[a.length-1]==="---"?a[a.length-1]=`--- ${p}`:a.push(p)}else a.push(ps(t.contents,o));if(t.directives?.docEnd)if(t.comment){const g=c(t.comment);g.includes(`
63
+ `)?(a.push("..."),a.push(Wn(g,""))):a.push(`... ${g}`)}else a.push("...");else{let g=t.comment;g&&f&&(g=g.replace(/^\n+/,"")),g&&((!f||m)&&a[a.length-1]!==""&&a.push(""),a.push(Wn(c(g),"")))}return a.join(`
64
+ `)+`
65
+ `}class Go{constructor(n,a,l){this.commentBefore=null,this.comment=null,this.errors=[],this.warnings=[],Object.defineProperty(this,fn,{value:Kd});let o=null;typeof a=="function"||Array.isArray(a)?o=a:l===void 0&&a&&(l=a,a=void 0);const c=Object.assign({intAsBigInt:!1,keepSourceTokens:!1,logLevel:"warn",prettyErrors:!0,strict:!0,stringKeys:!1,uniqueKeys:!0,version:"1.2"},l);this.options=c;let{version:f}=c;l?._directives?(this.directives=l._directives.atDocument(),this.directives.yaml.explicit&&(f=this.directives.yaml.version)):this.directives=new Ct({version:f}),this.setSchema(f,l),this.contents=n===void 0?null:this.createNode(n,o,l)}clone(){const n=Object.create(Go.prototype,{[fn]:{value:Kd}});return n.commentBefore=this.commentBefore,n.comment=this.comment,n.errors=this.errors.slice(),n.warnings=this.warnings.slice(),n.options=Object.assign({},this.options),this.directives&&(n.directives=this.directives.clone()),n.schema=this.schema.clone(),n.contents=at(this.contents)?this.contents.clone(n.schema):this.contents,this.range&&(n.range=this.range.slice()),n}add(n){es(this.contents)&&this.contents.add(n)}addIn(n,a){es(this.contents)&&this.contents.addIn(n,a)}createAlias(n,a){if(!n.anchor){const l=fv(this);n.anchor=!a||l.has(a)?hv(a||"a",l):a}return new df(n.anchor)}createNode(n,a,l){let o;if(typeof a=="function")n=a.call({"":n},"",n),o=a;else if(Array.isArray(a)){const _=O=>typeof O=="number"||O instanceof String||O instanceof Number,E=a.filter(_).map(String);E.length>0&&(a=a.concat(E)),o=a}else l===void 0&&a&&(l=a,a=void 0);const{aliasDuplicateObjects:c,anchorPrefix:f,flow:m,keepUndefined:g,onTagObj:p,tag:b}=l??{},{onAnchor:v,setAnchors:x,sourceObjects:j}=_w(this,f||"a"),z={aliasDuplicateObjects:c??!0,keepUndefined:g??!1,onAnchor:v,onTagObj:p,replacer:o,schema:this.schema,sourceObjects:j},w=_l(n,b,z);return m&&it(w)&&(w.flow=!0),x(),w}createPair(n,a,l={}){const o=this.createNode(n,null,l),c=this.createNode(a,null,l);return new At(o,c)}delete(n){return es(this.contents)?this.contents.delete(n):!1}deleteIn(n){return Sl(n)?this.contents==null?!1:(this.contents=null,!0):es(this.contents)?this.contents.deleteIn(n):!1}get(n,a){return it(this.contents)?this.contents.get(n,a):void 0}getIn(n,a){return Sl(n)?!a&&Ie(this.contents)?this.contents.value:this.contents:it(this.contents)?this.contents.getIn(n,a):void 0}has(n){return it(this.contents)?this.contents.has(n):!1}hasIn(n){return Sl(n)?this.contents!==void 0:it(this.contents)?this.contents.hasIn(n):!1}set(n,a){this.contents==null?this.contents=No(this.schema,[n],a):es(this.contents)&&this.contents.set(n,a)}setIn(n,a){Sl(n)?this.contents=a:this.contents==null?this.contents=No(this.schema,Array.from(n),a):es(this.contents)&&this.contents.setIn(n,a)}setSchema(n,a={}){typeof n=="number"&&(n=String(n));let l;switch(n){case"1.1":this.directives?this.directives.yaml.version="1.1":this.directives=new Ct({version:"1.1"}),l={resolveKnownTags:!1,schema:"yaml-1.1"};break;case"1.2":case"next":this.directives?this.directives.yaml.version=n:this.directives=new Ct({version:n}),l={resolveKnownTags:!0,schema:"core"};break;case null:this.directives&&delete this.directives,l=null;break;default:{const o=JSON.stringify(n);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${o}`)}}if(a.schema instanceof Object)this.schema=a.schema;else if(l)this.schema=new wf(Object.assign(l,a));else throw new Error("With a null YAML version, the { schema: Schema } option is required")}toJS({json:n,jsonArg:a,mapAsMap:l,maxAliasCount:o,onAnchor:c,reviver:f}={}){const m={anchors:new Map,doc:this,keep:!n,mapAsMap:l===!0,mapKeyWarned:!1,maxAliasCount:typeof o=="number"?o:100},g=dn(this.contents,a??"",m);if(typeof c=="function")for(const{count:p,res:b}of m.anchors.values())c(b,p);return typeof f=="function"?ls(f,{"":g},"",g):g}toJSON(n,a){return this.toJS({json:!0,jsonArg:n,mapAsMap:!1,onAnchor:a})}toString(n={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in n&&(!Number.isInteger(n.indent)||Number(n.indent)<=0)){const a=JSON.stringify(n.indent);throw new Error(`"indent" option must be a positive integer, not ${a}`)}return Fw(this,n)}}function es(t){if(it(t))return!0;throw new Error("Expected a YAML collection as document contents")}class Lv extends Error{constructor(n,a,l,o){super(),this.name=n,this.code=l,this.message=o,this.pos=a}}class io extends Lv{constructor(n,a,l){super("YAMLParseError",n,a,l)}}class Ww extends Lv{constructor(n,a,l){super("YAMLWarning",n,a,l)}}const ay=(t,n)=>a=>{if(a.pos[0]===-1)return;a.linePos=a.pos.map(m=>n.linePos(m));const{line:l,col:o}=a.linePos[0];a.message+=` at line ${l}, column ${o}`;let c=o-1,f=t.substring(n.lineStarts[l-1],n.lineStarts[l]).replace(/[\n\r]+$/,"");if(c>=60&&f.length>80){const m=Math.min(c-39,f.length-79);f="…"+f.substring(m),c-=m-1}if(f.length>80&&(f=f.substring(0,79)+"…"),l>1&&/^ *$/.test(f.substring(0,c))){let m=t.substring(n.lineStarts[l-2],n.lineStarts[l-1]);m.length>80&&(m=m.substring(0,79)+`…
66
+ `),f=m+f}if(/[^ ]/.test(f)){let m=1;const g=a.linePos[1];g?.line===l&&g.col>o&&(m=Math.max(1,Math.min(g.col-o,80-c)));const p=" ".repeat(c)+"^".repeat(m);a.message+=`:
67
+
68
+ ${f}
69
+ ${p}
70
+ `}};function gs(t,{flow:n,indicator:a,next:l,offset:o,onError:c,parentIndent:f,startOnNewline:m}){let g=!1,p=m,b=m,v="",x="",j=!1,z=!1,w=null,_=null,E=null,O=null,T=null,D=null,L=null;for(const M of t)switch(z&&(M.type!=="space"&&M.type!=="newline"&&M.type!=="comma"&&c(M.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),z=!1),w&&(p&&M.type!=="comment"&&M.type!=="newline"&&c(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),w=null),M.type){case"space":!n&&(a!=="doc-start"||l?.type!=="flow-collection")&&M.source.includes(" ")&&(w=M),b=!0;break;case"comment":{b||c(M,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const F=M.source.substring(1)||" ";v?v+=x+F:v=F,x="",p=!1;break}case"newline":p?v?v+=M.source:(!D||a!=="seq-item-ind")&&(g=!0):x+=M.source,p=!0,j=!0,(_||E)&&(O=M),b=!0;break;case"anchor":_&&c(M,"MULTIPLE_ANCHORS","A node can have at most one anchor"),M.source.endsWith(":")&&c(M.offset+M.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",!0),_=M,L??(L=M.offset),p=!1,b=!1,z=!0;break;case"tag":{E&&c(M,"MULTIPLE_TAGS","A node can have at most one tag"),E=M,L??(L=M.offset),p=!1,b=!1,z=!0;break}case a:(_||E)&&c(M,"BAD_PROP_ORDER",`Anchors and tags must be after the ${M.source} indicator`),D&&c(M,"UNEXPECTED_TOKEN",`Unexpected ${M.source} in ${n??"collection"}`),D=M,p=a==="seq-item-ind"||a==="explicit-key-ind",b=!1;break;case"comma":if(n){T&&c(M,"UNEXPECTED_TOKEN",`Unexpected , in ${n}`),T=M,p=!1,b=!1;break}default:c(M,"UNEXPECTED_TOKEN",`Unexpected ${M.type} token`),p=!1,b=!1}const I=t[t.length-1],G=I?I.offset+I.source.length:o;return z&&l&&l.type!=="space"&&l.type!=="newline"&&l.type!=="comma"&&(l.type!=="scalar"||l.source!=="")&&c(l.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space"),w&&(p&&w.indent<=f||l?.type==="block-map"||l?.type==="block-seq")&&c(w,"TAB_AS_INDENT","Tabs are not allowed as indentation"),{comma:T,found:D,spaceBefore:g,comment:v,hasNewline:j,anchor:_,tag:E,newlineAfterProp:O,end:G,start:L??G}}function kl(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes(`
71
+ `))return!0;if(t.end){for(const n of t.end)if(n.type==="newline")return!0}return!1;case"flow-collection":for(const n of t.items){for(const a of n.start)if(a.type==="newline")return!0;if(n.sep){for(const a of n.sep)if(a.type==="newline")return!0}if(kl(n.key)||kl(n.value))return!0}return!1;default:return!0}}function Pd(t,n,a){if(n?.type==="flow-collection"){const l=n.end[0];l.indent===t&&(l.source==="]"||l.source==="}")&&kl(n)&&a(l,"BAD_INDENT","Flow end indicator should be more indented than parent",!0)}}function Uv(t,n,a){const{uniqueKeys:l}=t.options;if(l===!1)return!1;const o=typeof l=="function"?l:(c,f)=>c===f||Ie(c)&&Ie(f)&&c.value===f.value;return n.some(c=>o(c.key,a))}const sy="All mapping items must start at the same column";function e1({composeNode:t,composeEmptyNode:n},a,l,o,c){const f=c?.nodeClass??un,m=new f(a.schema);a.atRoot&&(a.atRoot=!1);let g=l.offset,p=null;for(const b of l.items){const{start:v,key:x,sep:j,value:z}=b,w=gs(v,{indicator:"explicit-key-ind",next:x??j?.[0],offset:g,onError:o,parentIndent:l.indent,startOnNewline:!0}),_=!w.found;if(_){if(x&&(x.type==="block-seq"?o(g,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key"):"indent"in x&&x.indent!==l.indent&&o(g,"BAD_INDENT",sy)),!w.anchor&&!w.tag&&!j){p=w.end,w.comment&&(m.comment?m.comment+=`
72
+ `+w.comment:m.comment=w.comment);continue}(w.newlineAfterProp||kl(x))&&o(x??v[v.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}else w.found?.indent!==l.indent&&o(g,"BAD_INDENT",sy);a.atKey=!0;const E=w.end,O=x?t(a,x,w,o):n(a,E,v,null,w,o);a.schema.compat&&Pd(l.indent,x,o),a.atKey=!1,Uv(a,m.items,O)&&o(E,"DUPLICATE_KEY","Map keys must be unique");const T=gs(j??[],{indicator:"map-value-ind",next:z,offset:O.range[2],onError:o,parentIndent:l.indent,startOnNewline:!x||x.type==="block-scalar"});if(g=T.end,T.found){_&&(z?.type==="block-map"&&!T.hasNewline&&o(g,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings"),a.options.strict&&w.start<T.found.offset-1024&&o(O.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key"));const D=z?t(a,z,T,o):n(a,g,j,null,T,o);a.schema.compat&&Pd(l.indent,z,o),g=D.range[2];const L=new At(O,D);a.options.keepSourceTokens&&(L.srcToken=b),m.items.push(L)}else{_&&o(O.range,"MISSING_CHAR","Implicit map keys need to be followed by map values"),T.comment&&(O.comment?O.comment+=`
73
+ `+T.comment:O.comment=T.comment);const D=new At(O);a.options.keepSourceTokens&&(D.srcToken=b),m.items.push(D)}}return p&&p<g&&o(p,"IMPOSSIBLE","Map comment with trailing content"),m.range=[l.offset,g,p??g],m}function t1({composeNode:t,composeEmptyNode:n},a,l,o,c){const f=c?.nodeClass??oa,m=new f(a.schema);a.atRoot&&(a.atRoot=!1),a.atKey&&(a.atKey=!1);let g=l.offset,p=null;for(const{start:b,value:v}of l.items){const x=gs(b,{indicator:"seq-item-ind",next:v,offset:g,onError:o,parentIndent:l.indent,startOnNewline:!0});if(!x.found)if(x.anchor||x.tag||v)v?.type==="block-seq"?o(x.end,"BAD_INDENT","All sequence items must start at the same column"):o(g,"MISSING_CHAR","Sequence item without - indicator");else{p=x.end,x.comment&&(m.comment=x.comment);continue}const j=v?t(a,v,x,o):n(a,x.end,b,null,x,o);a.schema.compat&&Pd(l.indent,v,o),g=j.range[2],m.items.push(j)}return m.range=[l.offset,g,p??g],m}function Rl(t,n,a,l){let o="";if(t){let c=!1,f="";for(const m of t){const{source:g,type:p}=m;switch(p){case"space":c=!0;break;case"comment":{a&&!c&&l(m,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const b=g.substring(1)||" ";o?o+=f+b:o=b,f="";break}case"newline":o&&(f+=g),c=!0;break;default:l(m,"UNEXPECTED_TOKEN",`Unexpected ${p} at node end`)}n+=g.length}}return{comment:o,offset:n}}const zd="Block collections are not allowed within flow collections",Ed=t=>t&&(t.type==="block-map"||t.type==="block-seq");function n1({composeNode:t,composeEmptyNode:n},a,l,o,c){const f=l.start.source==="{",m=f?"flow map":"flow sequence",g=c?.nodeClass??(f?un:oa),p=new g(a.schema);p.flow=!0;const b=a.atRoot;b&&(a.atRoot=!1),a.atKey&&(a.atKey=!1);let v=l.offset+l.start.source.length;for(let _=0;_<l.items.length;++_){const E=l.items[_],{start:O,key:T,sep:D,value:L}=E,I=gs(O,{flow:m,indicator:"explicit-key-ind",next:T??D?.[0],offset:v,onError:o,parentIndent:l.indent,startOnNewline:!1});if(!I.found){if(!I.anchor&&!I.tag&&!D&&!L){_===0&&I.comma?o(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`):_<l.items.length-1&&o(I.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${m}`),I.comment&&(p.comment?p.comment+=`
74
+ `+I.comment:p.comment=I.comment),v=I.end;continue}!f&&a.options.strict&&kl(T)&&o(T,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(_===0)I.comma&&o(I.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${m}`);else if(I.comma||o(I.start,"MISSING_CHAR",`Missing , between ${m} items`),I.comment){let G="";e:for(const M of O)switch(M.type){case"comma":case"space":break;case"comment":G=M.source.substring(1);break e;default:break e}if(G){let M=p.items[p.items.length-1];st(M)&&(M=M.value??M.key),M.comment?M.comment+=`
75
+ `+G:M.comment=G,I.comment=I.comment.substring(G.length+1)}}if(!f&&!D&&!I.found){const G=L?t(a,L,I,o):n(a,I.end,D,null,I,o);p.items.push(G),v=G.range[2],Ed(L)&&o(G.range,"BLOCK_IN_FLOW",zd)}else{a.atKey=!0;const G=I.end,M=T?t(a,T,I,o):n(a,G,O,null,I,o);Ed(T)&&o(M.range,"BLOCK_IN_FLOW",zd),a.atKey=!1;const F=gs(D??[],{flow:m,indicator:"map-value-ind",next:L,offset:M.range[2],onError:o,parentIndent:l.indent,startOnNewline:!1});if(F.found){if(!f&&!I.found&&a.options.strict){if(D)for(const le of D){if(le===F.found)break;if(le.type==="newline"){o(le,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}I.start<F.found.offset-1024&&o(F.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else L&&("source"in L&&L.source?.[0]===":"?o(L,"MISSING_CHAR",`Missing space after : in ${m}`):o(F.start,"MISSING_CHAR",`Missing , or : between ${m} items`));const xe=L?t(a,L,F,o):F.found?n(a,F.end,D,null,F,o):null;xe?Ed(L)&&o(xe.range,"BLOCK_IN_FLOW",zd):F.comment&&(M.comment?M.comment+=`
76
+ `+F.comment:M.comment=F.comment);const X=new At(M,xe);if(a.options.keepSourceTokens&&(X.srcToken=E),f){const le=p;Uv(a,le.items,M)&&o(G,"DUPLICATE_KEY","Map keys must be unique"),le.items.push(X)}else{const le=new un(a.schema);le.flow=!0,le.items.push(X);const $e=(xe??M).range;le.range=[M.range[0],$e[1],$e[2]],p.items.push(le)}v=xe?xe.range[2]:F.end}}const x=f?"}":"]",[j,...z]=l.end;let w=v;if(j?.source===x)w=j.offset+j.source.length;else{const _=m[0].toUpperCase()+m.substring(1),E=b?`${_} must end with a ${x}`:`${_} in block collection must be sufficiently indented and end with a ${x}`;o(v,b?"MISSING_CHAR":"BAD_INDENT",E),j&&j.source.length!==1&&z.unshift(j)}if(z.length>0){const _=Rl(z,w,a.options.strict,o);_.comment&&(p.comment?p.comment+=`
77
+ `+_.comment:p.comment=_.comment),p.range=[l.offset,w,_.offset]}else p.range=[l.offset,w,w];return p}function Cd(t,n,a,l,o,c){const f=a.type==="block-map"?e1(t,n,a,l,c):a.type==="block-seq"?t1(t,n,a,l,c):n1(t,n,a,l,c),m=f.constructor;return o==="!"||o===m.tagName?(f.tag=m.tagName,f):(o&&(f.tag=o),f)}function i1(t,n,a,l,o){const c=l.tag,f=c?n.directives.tagName(c.source,x=>o(c,"TAG_RESOLVE_FAILED",x)):null;if(a.type==="block-seq"){const{anchor:x,newlineAfterProp:j}=l,z=x&&c?x.offset>c.offset?x:c:x??c;z&&(!j||j.offset<z.offset)&&o(z,"MISSING_CHAR","Missing newline after block sequence props")}const m=a.type==="block-map"?"map":a.type==="block-seq"?"seq":a.start.source==="{"?"map":"seq";if(!c||!f||f==="!"||f===un.tagName&&m==="map"||f===oa.tagName&&m==="seq")return Cd(t,n,a,o,f);let g=n.schema.tags.find(x=>x.tag===f&&x.collection===m);if(!g){const x=n.schema.knownTags[f];if(x?.collection===m)n.schema.tags.push(Object.assign({},x,{default:!1})),g=x;else return x?o(c,"BAD_COLLECTION_TYPE",`${x.tag} used for ${m} collection, but expects ${x.collection??"scalar"}`,!0):o(c,"TAG_RESOLVE_FAILED",`Unresolved tag: ${f}`,!0),Cd(t,n,a,o,f)}const p=Cd(t,n,a,o,f,g),b=g.resolve?.(p,x=>o(c,"TAG_RESOLVE_FAILED",x),n.options)??p,v=at(b)?b:new we(b);return v.range=p.range,v.tag=f,g?.format&&(v.format=g.format),v}function a1(t,n,a){const l=n.offset,o=s1(n,t.options.strict,a);if(!o)return{value:"",type:null,comment:"",range:[l,l,l]};const c=o.mode===">"?we.BLOCK_FOLDED:we.BLOCK_LITERAL,f=n.source?l1(n.source):[];let m=f.length;for(let w=f.length-1;w>=0;--w){const _=f[w][1];if(_===""||_==="\r")m=w;else break}if(m===0){const w=o.chomp==="+"&&f.length>0?`
78
+ `.repeat(Math.max(1,f.length-1)):"";let _=l+o.length;return n.source&&(_+=n.source.length),{value:w,type:c,comment:o.comment,range:[l,_,_]}}let g=n.indent+o.indent,p=n.offset+o.length,b=0;for(let w=0;w<m;++w){const[_,E]=f[w];if(E===""||E==="\r")o.indent===0&&_.length>g&&(g=_.length);else{_.length<g&&a(p+_.length,"MISSING_CHAR","Block scalars with more-indented leading empty lines must use an explicit indentation indicator"),o.indent===0&&(g=_.length),b=w,g===0&&!t.atRoot&&a(p,"BAD_INDENT","Block scalar values in collections must be indented");break}p+=_.length+E.length+1}for(let w=f.length-1;w>=m;--w)f[w][0].length>g&&(m=w+1);let v="",x="",j=!1;for(let w=0;w<b;++w)v+=f[w][0].slice(g)+`
79
+ `;for(let w=b;w<m;++w){let[_,E]=f[w];p+=_.length+E.length+1;const O=E[E.length-1]==="\r";if(O&&(E=E.slice(0,-1)),E&&_.length<g){const D=`Block scalar lines must not be less indented than their ${o.indent?"explicit indentation indicator":"first line"}`;a(p-E.length-(O?2:1),"BAD_INDENT",D),_=""}c===we.BLOCK_LITERAL?(v+=x+_.slice(g)+E,x=`
80
+ `):_.length>g||E[0]===" "?(x===" "?x=`
81
+ `:!j&&x===`
82
+ `&&(x=`
83
+
84
+ `),v+=x+_.slice(g)+E,x=`
85
+ `,j=!0):E===""?x===`
86
+ `?v+=`
87
+ `:x=`
88
+ `:(v+=x+E,x=" ",j=!1)}switch(o.chomp){case"-":break;case"+":for(let w=m;w<f.length;++w)v+=`
89
+ `+f[w][0].slice(g);v[v.length-1]!==`
90
+ `&&(v+=`
91
+ `);break;default:v+=`
92
+ `}const z=l+o.length+n.source.length;return{value:v,type:c,comment:o.comment,range:[l,z,z]}}function s1({offset:t,props:n},a,l){if(n[0].type!=="block-scalar-header")return l(n[0],"IMPOSSIBLE","Block scalar header not found"),null;const{source:o}=n[0],c=o[0];let f=0,m="",g=-1;for(let x=1;x<o.length;++x){const j=o[x];if(!m&&(j==="-"||j==="+"))m=j;else{const z=Number(j);!f&&z?f=z:g===-1&&(g=t+x)}}g!==-1&&l(g,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${o}`);let p=!1,b="",v=o.length;for(let x=1;x<n.length;++x){const j=n[x];switch(j.type){case"space":p=!0;case"newline":v+=j.source.length;break;case"comment":a&&!p&&l(j,"MISSING_CHAR","Comments must be separated from other tokens by white space characters"),v+=j.source.length,b=j.source.substring(1);break;case"error":l(j,"UNEXPECTED_TOKEN",j.message),v+=j.source.length;break;default:{const z=`Unexpected token in block scalar header: ${j.type}`;l(j,"UNEXPECTED_TOKEN",z);const w=j.source;w&&typeof w=="string"&&(v+=w.length)}}}return{mode:c,indent:f,chomp:m,comment:b,length:v}}function l1(t){const n=t.split(/\n( *)/),a=n[0],l=a.match(/^( *)/),c=[l?.[1]?[l[1],a.slice(l[1].length)]:["",a]];for(let f=1;f<n.length;f+=2)c.push([n[f],n[f+1]]);return c}function r1(t,n,a){const{offset:l,type:o,source:c,end:f}=t;let m,g;const p=(x,j,z)=>a(l+x,j,z);switch(o){case"scalar":m=we.PLAIN,g=o1(c,p);break;case"single-quoted-scalar":m=we.QUOTE_SINGLE,g=c1(c,p);break;case"double-quoted-scalar":m=we.QUOTE_DOUBLE,g=u1(c,p);break;default:return a(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${o}`),{value:"",type:null,comment:"",range:[l,l+c.length,l+c.length]}}const b=l+c.length,v=Rl(f,b,n,a);return{value:g,type:m,comment:v.comment,range:[l,b,v.offset]}}function o1(t,n){let a="";switch(t[0]){case" ":a="a tab character";break;case",":a="flow indicator character ,";break;case"%":a="directive indicator character %";break;case"|":case">":{a=`block scalar indicator ${t[0]}`;break}case"@":case"`":{a=`reserved character ${t[0]}`;break}}return a&&n(0,"BAD_SCALAR_START",`Plain value cannot start with ${a}`),$v(t)}function c1(t,n){return(t[t.length-1]!=="'"||t.length===1)&&n(t.length,"MISSING_CHAR","Missing closing 'quote"),$v(t.slice(1,-1)).replace(/''/g,"'")}function $v(t){let n,a;try{n=new RegExp(`(.*?)(?<![ ])[ ]*\r?
93
+ `,"sy"),a=new RegExp(`[ ]*(.*?)(?:(?<![ ])[ ]*)?\r?
94
+ `,"sy")}catch{n=/(.*?)[ \t]*\r?\n/sy,a=/[ \t]*(.*?)[ \t]*\r?\n/sy}let l=n.exec(t);if(!l)return t;let o=l[1],c=" ",f=n.lastIndex;for(a.lastIndex=f;l=a.exec(t);)l[1]===""?c===`
95
+ `?o+=c:c=`
96
+ `:(o+=c+l[1],c=" "),f=a.lastIndex;const m=/[ \t]*(.*)/sy;return m.lastIndex=f,l=m.exec(t),o+c+(l?.[1]??"")}function u1(t,n){let a="";for(let l=1;l<t.length-1;++l){const o=t[l];if(!(o==="\r"&&t[l+1]===`
97
+ `))if(o===`
98
+ `){const{fold:c,offset:f}=d1(t,l);a+=c,l=f}else if(o==="\\"){let c=t[++l];const f=f1[c];if(f)a+=f;else if(c===`
99
+ `)for(c=t[l+1];c===" "||c===" ";)c=t[++l+1];else if(c==="\r"&&t[l+1]===`
100
+ `)for(c=t[++l+1];c===" "||c===" ";)c=t[++l+1];else if(c==="x"||c==="u"||c==="U"){const m={x:2,u:4,U:8}[c];a+=h1(t,l+1,m,n),l+=m}else{const m=t.substr(l-1,2);n(l-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),a+=m}}else if(o===" "||o===" "){const c=l;let f=t[l+1];for(;f===" "||f===" ";)f=t[++l+1];f!==`
101
+ `&&!(f==="\r"&&t[l+2]===`
102
+ `)&&(a+=l>c?t.slice(c,l+1):o)}else a+=o}return(t[t.length-1]!=='"'||t.length===1)&&n(t.length,"MISSING_CHAR",'Missing closing "quote'),a}function d1(t,n){let a="",l=t[n+1];for(;(l===" "||l===" "||l===`
103
+ `||l==="\r")&&!(l==="\r"&&t[n+2]!==`
104
+ `);)l===`
105
+ `&&(a+=`
106
+ `),n+=1,l=t[n+1];return a||(a=" "),{fold:a,offset:n}}const f1={0:"\0",a:"\x07",b:"\b",e:"\x1B",f:"\f",n:`
107
+ `,r:"\r",t:" ",v:"\v",N:"…",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\"," ":" "};function h1(t,n,a,l){const o=t.substr(n,a),f=o.length===a&&/^[0-9a-fA-F]+$/.test(o)?parseInt(o,16):NaN;if(isNaN(f)){const m=t.substr(n-2,a+2);return l(n-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${m}`),m}return String.fromCodePoint(f)}function Bv(t,n,a,l){const{value:o,type:c,comment:f,range:m}=n.type==="block-scalar"?a1(t,n,l):r1(n,t.options.strict,l),g=a?t.directives.tagName(a.source,v=>l(a,"TAG_RESOLVE_FAILED",v)):null;let p;t.options.stringKeys&&t.atKey?p=t.schema[An]:g?p=m1(t.schema,o,g,a,l):n.type==="scalar"?p=p1(t,o,n,l):p=t.schema[An];let b;try{const v=p.resolve(o,x=>l(a??n,"TAG_RESOLVE_FAILED",x),t.options);b=Ie(v)?v:new we(v)}catch(v){const x=v instanceof Error?v.message:String(v);l(a??n,"TAG_RESOLVE_FAILED",x),b=new we(o)}return b.range=m,b.source=o,c&&(b.type=c),g&&(b.tag=g),p.format&&(b.format=p.format),f&&(b.comment=f),b}function m1(t,n,a,l,o){if(a==="!")return t[An];const c=[];for(const m of t.tags)if(!m.collection&&m.tag===a)if(m.default&&m.test)c.push(m);else return m;for(const m of c)if(m.test?.test(n))return m;const f=t.knownTags[a];return f&&!f.collection?(t.tags.push(Object.assign({},f,{default:!1,test:void 0})),f):(o(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${a}`,a!=="tag:yaml.org,2002:str"),t[An])}function p1({atKey:t,directives:n,schema:a},l,o,c){const f=a.tags.find(m=>(m.default===!0||t&&m.default==="key")&&m.test?.test(l))||a[An];if(a.compat){const m=a.compat.find(g=>g.default&&g.test?.test(l))??a[An];if(f.tag!==m.tag){const g=n.tagString(f.tag),p=n.tagString(m.tag),b=`Value may be parsed as either ${g} or ${p}`;c(o,"TAG_RESOLVE_FAILED",b,!0)}}return f}function g1(t,n,a){if(n){a??(a=n.length);for(let l=a-1;l>=0;--l){let o=n[l];switch(o.type){case"space":case"comment":case"newline":t-=o.source.length;continue}for(o=n[++l];o?.type==="space";)t+=o.source.length,o=n[++l];break}}return t}const y1={composeNode:Zv,composeEmptyNode:Nf};function Zv(t,n,a,l){const o=t.atKey,{spaceBefore:c,comment:f,anchor:m,tag:g}=a;let p,b=!0;switch(n.type){case"alias":p=v1(t,n,l),(m||g)&&l(n,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=Bv(t,n,g,l),m&&(p.anchor=m.source.substring(1));break;case"block-map":case"block-seq":case"flow-collection":p=i1(y1,t,n,a,l),m&&(p.anchor=m.source.substring(1));break;default:{const v=n.type==="error"?n.message:`Unsupported token (type: ${n.type})`;l(n,"UNEXPECTED_TOKEN",v),p=Nf(t,n.offset,void 0,null,a,l),b=!1}}return m&&p.anchor===""&&l(m,"BAD_ALIAS","Anchor cannot be an empty string"),o&&t.options.stringKeys&&(!Ie(p)||typeof p.value!="string"||p.tag&&p.tag!=="tag:yaml.org,2002:str")&&l(g??n,"NON_STRING_KEY","With stringKeys, all keys must be strings"),c&&(p.spaceBefore=!0),f&&(n.type==="scalar"&&n.source===""?p.comment=f:p.commentBefore=f),t.options.keepSourceTokens&&b&&(p.srcToken=n),p}function Nf(t,n,a,l,{spaceBefore:o,comment:c,anchor:f,tag:m,end:g},p){const b={type:"scalar",offset:g1(n,a,l),indent:-1,source:""},v=Bv(t,b,m,p);return f&&(v.anchor=f.source.substring(1),v.anchor===""&&p(f,"BAD_ALIAS","Anchor cannot be an empty string")),o&&(v.spaceBefore=!0),c&&(v.comment=c,v.range[2]=g),v}function v1({options:t},{offset:n,source:a,end:l},o){const c=new df(a.substring(1));c.source===""&&o(n,"BAD_ALIAS","Alias cannot be an empty string"),c.source.endsWith(":")&&o(n+a.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",!0);const f=n+a.length,m=Rl(l,f,t.strict,o);return c.range=[n,f,m.offset],m.comment&&(c.comment=m.comment),c}function b1(t,n,{offset:a,start:l,value:o,end:c},f){const m=Object.assign({_directives:n},t),g=new Go(void 0,m),p={atKey:!1,atRoot:!0,directives:g.directives,options:g.options,schema:g.schema},b=gs(l,{indicator:"doc-start",next:o??c?.[0],offset:a,onError:f,parentIndent:0,startOnNewline:!0});b.found&&(g.directives.docStart=!0,o&&(o.type==="block-map"||o.type==="block-seq")&&!b.hasNewline&&f(b.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")),g.contents=o?Zv(p,o,b,f):Nf(p,b.end,l,null,b,f);const v=g.contents.range[2],x=Rl(c,v,!1,f);return x.comment&&(g.comment=x.comment),g.range=[a,v,x.offset],g}function bl(t){if(typeof t=="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:n,source:a}=t;return[n,n+(typeof a=="string"?a.length:1)]}function ly(t){let n="",a=!1,l=!1;for(let o=0;o<t.length;++o){const c=t[o];switch(c[0]){case"#":n+=(n===""?"":l?`
108
+
109
+ `:`
110
+ `)+(c.substring(1)||" "),a=!0,l=!1;break;case"%":t[o+1]?.[0]!=="#"&&(o+=1),a=!1;break;default:a||(l=!0),a=!1}}return{comment:n,afterEmptyLine:l}}class x1{constructor(n={}){this.doc=null,this.atDirectives=!1,this.prelude=[],this.errors=[],this.warnings=[],this.onError=(a,l,o,c)=>{const f=bl(a);c?this.warnings.push(new Ww(f,l,o)):this.errors.push(new io(f,l,o))},this.directives=new Ct({version:n.version||"1.2"}),this.options=n}decorate(n,a){const{comment:l,afterEmptyLine:o}=ly(this.prelude);if(l){const c=n.contents;if(a)n.comment=n.comment?`${n.comment}
111
+ ${l}`:l;else if(o||n.directives.docStart||!c)n.commentBefore=l;else if(it(c)&&!c.flow&&c.items.length>0){let f=c.items[0];st(f)&&(f=f.key);const m=f.commentBefore;f.commentBefore=m?`${l}
112
+ ${m}`:l}else{const f=c.commentBefore;c.commentBefore=f?`${l}
113
+ ${f}`:l}}a?(Array.prototype.push.apply(n.errors,this.errors),Array.prototype.push.apply(n.warnings,this.warnings)):(n.errors=this.errors,n.warnings=this.warnings),this.prelude=[],this.errors=[],this.warnings=[]}streamInfo(){return{comment:ly(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(n,a=!1,l=-1){for(const o of n)yield*this.next(o);yield*this.end(a,l)}*next(n){switch(n.type){case"directive":this.directives.add(n.source,(a,l,o)=>{const c=bl(n);c[0]+=a,this.onError(c,"BAD_DIRECTIVE",l,o)}),this.prelude.push(n.source),this.atDirectives=!0;break;case"document":{const a=b1(this.options,this.directives,n,this.onError);this.atDirectives&&!a.directives.docStart&&this.onError(n,"MISSING_CHAR","Missing directives-end/doc-start indicator line"),this.decorate(a,!1),this.doc&&(yield this.doc),this.doc=a,this.atDirectives=!1;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(n.source);break;case"error":{const a=n.source?`${n.message}: ${JSON.stringify(n.source)}`:n.message,l=new io(bl(n),"UNEXPECTED_TOKEN",a);this.atDirectives||!this.doc?this.errors.push(l):this.doc.errors.push(l);break}case"doc-end":{if(!this.doc){const l="Unexpected doc-end without preceding document";this.errors.push(new io(bl(n),"UNEXPECTED_TOKEN",l));break}this.doc.directives.docEnd=!0;const a=Rl(n.end,n.offset+n.source.length,this.doc.options.strict,this.onError);if(this.decorate(this.doc,!0),a.comment){const l=this.doc.comment;this.doc.comment=l?`${l}
114
+ ${a.comment}`:a.comment}this.doc.range[2]=a.offset;break}default:this.errors.push(new io(bl(n),"UNEXPECTED_TOKEN",`Unsupported token ${n.type}`))}}*end(n=!1,a=-1){if(this.doc)this.decorate(this.doc,!0),yield this.doc,this.doc=null;else if(n){const l=Object.assign({_directives:this.directives},this.options),o=new Go(void 0,l);this.atDirectives&&this.onError(a,"MISSING_CHAR","Missing directives-end indicator line"),o.range=[0,a,a],this.decorate(o,!1),yield o}}}const qv="\uFEFF",Hv="",Iv="",Qd="";function S1(t){switch(t){case qv:return"byte-order-mark";case Hv:return"doc-mode";case Iv:return"flow-error-end";case Qd:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case`
115
+ `:case`\r
116
+ `:return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case" ":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}function bn(t){switch(t){case void 0:case" ":case`
117
+ `:case"\r":case" ":return!0;default:return!1}}const ry=new Set("0123456789ABCDEFabcdef"),w1=new Set("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()"),ao=new Set(",[]{}"),N1=new Set(` ,[]{}
118
+ \r `),Ad=t=>!t||N1.has(t);class j1{constructor(){this.atEnd=!1,this.blockScalarIndent=-1,this.blockScalarKeep=!1,this.buffer="",this.flowKey=!1,this.flowLevel=0,this.indentNext=0,this.indentValue=0,this.lineEndPos=null,this.next=null,this.pos=0}*lex(n,a=!1){if(n){if(typeof n!="string")throw TypeError("source is not a string");this.buffer=this.buffer?this.buffer+n:n,this.lineEndPos=null}this.atEnd=!a;let l=this.next??"stream";for(;l&&(a||this.hasChars(1));)l=yield*this.parseNext(l)}atLineEnd(){let n=this.pos,a=this.buffer[n];for(;a===" "||a===" ";)a=this.buffer[++n];return!a||a==="#"||a===`
119
+ `?!0:a==="\r"?this.buffer[n+1]===`
120
+ `:!1}charAt(n){return this.buffer[this.pos+n]}continueScalar(n){let a=this.buffer[n];if(this.indentNext>0){let l=0;for(;a===" ";)a=this.buffer[++l+n];if(a==="\r"){const o=this.buffer[l+n+1];if(o===`
121
+ `||!o&&!this.atEnd)return n+l+1}return a===`
122
+ `||l>=this.indentNext||!a&&!this.atEnd?n+l:-1}if(a==="-"||a==="."){const l=this.buffer.substr(n,3);if((l==="---"||l==="...")&&bn(this.buffer[n+3]))return-1}return n}getLine(){let n=this.lineEndPos;return(typeof n!="number"||n!==-1&&n<this.pos)&&(n=this.buffer.indexOf(`
123
+ `,this.pos),this.lineEndPos=n),n===-1?this.atEnd?this.buffer.substring(this.pos):null:(this.buffer[n-1]==="\r"&&(n-=1),this.buffer.substring(this.pos,n))}hasChars(n){return this.pos+n<=this.buffer.length}setNext(n){return this.buffer=this.buffer.substring(this.pos),this.pos=0,this.lineEndPos=null,this.next=n,null}peek(n){return this.buffer.substr(this.pos,n)}*parseNext(n){switch(n){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let n=this.getLine();if(n===null)return this.setNext("stream");if(n[0]===qv&&(yield*this.pushCount(1),n=n.substring(1)),n[0]==="%"){let a=n.length,l=n.indexOf("#");for(;l!==-1;){const c=n[l-1];if(c===" "||c===" "){a=l-1;break}else l=n.indexOf("#",l+1)}for(;;){const c=n[a-1];if(c===" "||c===" ")a-=1;else break}const o=(yield*this.pushCount(a))+(yield*this.pushSpaces(!0));return yield*this.pushCount(n.length-o),this.pushNewline(),"stream"}if(this.atLineEnd()){const a=yield*this.pushSpaces(!0);return yield*this.pushCount(n.length-a),yield*this.pushNewline(),"stream"}return yield Hv,yield*this.parseLineStart()}*parseLineStart(){const n=this.charAt(0);if(!n&&!this.atEnd)return this.setNext("line-start");if(n==="-"||n==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const a=this.peek(3);if((a==="---"||a==="...")&&bn(this.charAt(3)))return yield*this.pushCount(3),this.indentValue=0,this.indentNext=0,a==="---"?"doc":"stream"}return this.indentValue=yield*this.pushSpaces(!1),this.indentNext>this.indentValue&&!bn(this.charAt(1))&&(this.indentNext=this.indentValue),yield*this.parseBlockStart()}*parseBlockStart(){const[n,a]=this.peek(2);if(!a&&!this.atEnd)return this.setNext("block-start");if((n==="-"||n==="?"||n===":")&&bn(a)){const l=(yield*this.pushCount(1))+(yield*this.pushSpaces(!0));return this.indentNext=this.indentValue+1,this.indentValue+=l,yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(!0);const n=this.getLine();if(n===null)return this.setNext("doc");let a=yield*this.pushIndicators();switch(n[a]){case"#":yield*this.pushCount(n.length-a);case void 0:return yield*this.pushNewline(),yield*this.parseLineStart();case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel=1,"flow";case"}":case"]":return yield*this.pushCount(1),"doc";case"*":return yield*this.pushUntil(Ad),"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":return a+=yield*this.parseBlockScalarHeader(),a+=yield*this.pushSpaces(!0),yield*this.pushCount(n.length-a),yield*this.pushNewline(),yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let n,a,l=-1;do n=yield*this.pushNewline(),n>0?(a=yield*this.pushSpaces(!1),this.indentValue=l=a):a=0,a+=yield*this.pushSpaces(!0);while(n+a>0);const o=this.getLine();if(o===null)return this.setNext("flow");if((l!==-1&&l<this.indentNext&&o[0]!=="#"||l===0&&(o.startsWith("---")||o.startsWith("..."))&&bn(o[3]))&&!(l===this.indentNext-1&&this.flowLevel===1&&(o[0]==="]"||o[0]==="}")))return this.flowLevel=0,yield Iv,yield*this.parseLineStart();let c=0;for(;o[c]===",";)c+=yield*this.pushCount(1),c+=yield*this.pushSpaces(!0),this.flowKey=!1;switch(c+=yield*this.pushIndicators(),o[c]){case void 0:return"flow";case"#":return yield*this.pushCount(o.length-c),"flow";case"{":case"[":return yield*this.pushCount(1),this.flowKey=!1,this.flowLevel+=1,"flow";case"}":case"]":return yield*this.pushCount(1),this.flowKey=!0,this.flowLevel-=1,this.flowLevel?"flow":"doc";case"*":return yield*this.pushUntil(Ad),"flow";case'"':case"'":return this.flowKey=!0,yield*this.parseQuotedScalar();case":":{const f=this.charAt(1);if(this.flowKey||bn(f)||f===",")return this.flowKey=!1,yield*this.pushCount(1),yield*this.pushSpaces(!0),"flow"}default:return this.flowKey=!1,yield*this.parsePlainScalar()}}*parseQuotedScalar(){const n=this.charAt(0);let a=this.buffer.indexOf(n,this.pos+1);if(n==="'")for(;a!==-1&&this.buffer[a+1]==="'";)a=this.buffer.indexOf("'",a+2);else for(;a!==-1;){let c=0;for(;this.buffer[a-1-c]==="\\";)c+=1;if(c%2===0)break;a=this.buffer.indexOf('"',a+1)}const l=this.buffer.substring(0,a);let o=l.indexOf(`
124
+ `,this.pos);if(o!==-1){for(;o!==-1;){const c=this.continueScalar(o+1);if(c===-1)break;o=l.indexOf(`
125
+ `,c)}o!==-1&&(a=o-(l[o-1]==="\r"?2:1))}if(a===-1){if(!this.atEnd)return this.setNext("quoted-scalar");a=this.buffer.length}return yield*this.pushToIndex(a+1,!1),this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1,this.blockScalarKeep=!1;let n=this.pos;for(;;){const a=this.buffer[++n];if(a==="+")this.blockScalarKeep=!0;else if(a>"0"&&a<="9")this.blockScalarIndent=Number(a)-1;else if(a!=="-")break}return yield*this.pushUntil(a=>bn(a)||a==="#")}*parseBlockScalar(){let n=this.pos-1,a=0,l;e:for(let c=this.pos;l=this.buffer[c];++c)switch(l){case" ":a+=1;break;case`
126
+ `:n=c,a=0;break;case"\r":{const f=this.buffer[c+1];if(!f&&!this.atEnd)return this.setNext("block-scalar");if(f===`
127
+ `)break}default:break e}if(!l&&!this.atEnd)return this.setNext("block-scalar");if(a>=this.indentNext){this.blockScalarIndent===-1?this.indentNext=a:this.indentNext=this.blockScalarIndent+(this.indentNext===0?1:this.indentNext);do{const c=this.continueScalar(n+1);if(c===-1)break;n=this.buffer.indexOf(`
128
+ `,c)}while(n!==-1);if(n===-1){if(!this.atEnd)return this.setNext("block-scalar");n=this.buffer.length}}let o=n+1;for(l=this.buffer[o];l===" ";)l=this.buffer[++o];if(l===" "){for(;l===" "||l===" "||l==="\r"||l===`
129
+ `;)l=this.buffer[++o];n=o-1}else if(!this.blockScalarKeep)do{let c=n-1,f=this.buffer[c];f==="\r"&&(f=this.buffer[--c]);const m=c;for(;f===" ";)f=this.buffer[--c];if(f===`
130
+ `&&c>=this.pos&&c+1+a>m)n=c;else break}while(!0);return yield Qd,yield*this.pushToIndex(n+1,!0),yield*this.parseLineStart()}*parsePlainScalar(){const n=this.flowLevel>0;let a=this.pos-1,l=this.pos-1,o;for(;o=this.buffer[++l];)if(o===":"){const c=this.buffer[l+1];if(bn(c)||n&&ao.has(c))break;a=l}else if(bn(o)){let c=this.buffer[l+1];if(o==="\r"&&(c===`
131
+ `?(l+=1,o=`
132
+ `,c=this.buffer[l+1]):a=l),c==="#"||n&&ao.has(c))break;if(o===`
133
+ `){const f=this.continueScalar(l+1);if(f===-1)break;l=Math.max(l,f-2)}}else{if(n&&ao.has(o))break;a=l}return!o&&!this.atEnd?this.setNext("plain-scalar"):(yield Qd,yield*this.pushToIndex(a+1,!0),n?"flow":"doc")}*pushCount(n){return n>0?(yield this.buffer.substr(this.pos,n),this.pos+=n,n):0}*pushToIndex(n,a){const l=this.buffer.slice(this.pos,n);return l?(yield l,this.pos+=l.length,l.length):(a&&(yield""),0)}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(Ad))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators());case"-":case"?":case":":{const n=this.flowLevel>0,a=this.charAt(1);if(bn(a)||n&&ao.has(a))return n?this.flowKey&&(this.flowKey=!1):this.indentNext=this.indentValue+1,(yield*this.pushCount(1))+(yield*this.pushSpaces(!0))+(yield*this.pushIndicators())}}return 0}*pushTag(){if(this.charAt(1)==="<"){let n=this.pos+2,a=this.buffer[n];for(;!bn(a)&&a!==">";)a=this.buffer[++n];return yield*this.pushToIndex(a===">"?n+1:n,!1)}else{let n=this.pos+1,a=this.buffer[n];for(;a;)if(w1.has(a))a=this.buffer[++n];else if(a==="%"&&ry.has(this.buffer[n+1])&&ry.has(this.buffer[n+2]))a=this.buffer[n+=3];else break;return yield*this.pushToIndex(n,!1)}}*pushNewline(){const n=this.buffer[this.pos];return n===`
134
+ `?yield*this.pushCount(1):n==="\r"&&this.charAt(1)===`
135
+ `?yield*this.pushCount(2):0}*pushSpaces(n){let a=this.pos-1,l;do l=this.buffer[++a];while(l===" "||n&&l===" ");const o=a-this.pos;return o>0&&(yield this.buffer.substr(this.pos,o),this.pos=a),o}*pushUntil(n){let a=this.pos,l=this.buffer[a];for(;!n(l);)l=this.buffer[++a];return yield*this.pushToIndex(a,!1)}}class _1{constructor(){this.lineStarts=[],this.addNewLine=n=>this.lineStarts.push(n),this.linePos=n=>{let a=0,l=this.lineStarts.length;for(;a<l;){const c=a+l>>1;this.lineStarts[c]<n?a=c+1:l=c}if(this.lineStarts[a]===n)return{line:a+1,col:1};if(a===0)return{line:0,col:n};const o=this.lineStarts[a-1];return{line:a,col:n-o+1}}}}function Ai(t,n){for(let a=0;a<t.length;++a)if(t[a].type===n)return!0;return!1}function oy(t){for(let n=0;n<t.length;++n)switch(t[n].type){case"space":case"comment":case"newline":break;default:return n}return-1}function Kv(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return!0;default:return!1}}function so(t){switch(t.type){case"document":return t.start;case"block-map":{const n=t.items[t.items.length-1];return n.sep??n.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function ts(t){if(t.length===0)return[];let n=t.length;e:for(;--n>=0;)switch(t[n].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}for(;t[++n]?.type==="space";);return t.splice(n,t.length)}function cy(t){if(t.start.type==="flow-seq-start")for(const n of t.items)n.sep&&!n.value&&!Ai(n.start,"explicit-key-ind")&&!Ai(n.sep,"map-value-ind")&&(n.key&&(n.value=n.key),delete n.key,Kv(n.value)?n.value.end?Array.prototype.push.apply(n.value.end,n.sep):n.value.end=n.sep:Array.prototype.push.apply(n.start,n.sep),delete n.sep)}class k1{constructor(n){this.atNewLine=!0,this.atScalar=!1,this.indent=0,this.offset=0,this.onKeyLine=!1,this.stack=[],this.source="",this.type="",this.lexer=new j1,this.onNewLine=n}*parse(n,a=!1){this.onNewLine&&this.offset===0&&this.onNewLine(0);for(const l of this.lexer.lex(n,a))yield*this.next(l);a||(yield*this.end())}*next(n){if(this.source=n,this.atScalar){this.atScalar=!1,yield*this.step(),this.offset+=n.length;return}const a=S1(n);if(a)if(a==="scalar")this.atNewLine=!1,this.atScalar=!0,this.type="scalar";else{switch(this.type=a,yield*this.step(),a){case"newline":this.atNewLine=!0,this.indent=0,this.onNewLine&&this.onNewLine(this.offset+n.length);break;case"space":this.atNewLine&&n[0]===" "&&(this.indent+=n.length);break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":this.atNewLine&&(this.indent+=n.length);break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=!1}this.offset+=n.length}else{const l=`Not a YAML token: ${n}`;yield*this.pop({type:"error",offset:this.offset,message:l,source:n}),this.offset+=n.length}}*end(){for(;this.stack.length>0;)yield*this.pop()}get sourceToken(){return{type:this.type,offset:this.offset,indent:this.indent,source:this.source}}*step(){const n=this.peek(1);if(this.type==="doc-end"&&n?.type!=="doc-end"){for(;this.stack.length>0;)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!n)return yield*this.stream();switch(n.type){case"document":return yield*this.document(n);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(n);case"block-scalar":return yield*this.blockScalar(n);case"block-map":return yield*this.blockMap(n);case"block-seq":return yield*this.blockSequence(n);case"flow-collection":return yield*this.flowCollection(n);case"doc-end":return yield*this.documentEnd(n)}yield*this.pop()}peek(n){return this.stack[this.stack.length-n]}*pop(n){const a=n??this.stack.pop();if(!a)yield{type:"error",offset:this.offset,source:"",message:"Tried to pop an empty stack"};else if(this.stack.length===0)yield a;else{const l=this.peek(1);switch(a.type==="block-scalar"?a.indent="indent"in l?l.indent:0:a.type==="flow-collection"&&l.type==="document"&&(a.indent=0),a.type==="flow-collection"&&cy(a),l.type){case"document":l.value=a;break;case"block-scalar":l.props.push(a);break;case"block-map":{const o=l.items[l.items.length-1];if(o.value){l.items.push({start:[],key:a,sep:[]}),this.onKeyLine=!0;return}else if(o.sep)o.value=a;else{Object.assign(o,{key:a,sep:[]}),this.onKeyLine=!o.explicitKey;return}break}case"block-seq":{const o=l.items[l.items.length-1];o.value?l.items.push({start:[],value:a}):o.value=a;break}case"flow-collection":{const o=l.items[l.items.length-1];!o||o.value?l.items.push({start:[],key:a,sep:[]}):o.sep?o.value=a:Object.assign(o,{key:a,sep:[]});return}default:yield*this.pop(),yield*this.pop(a)}if((l.type==="document"||l.type==="block-map"||l.type==="block-seq")&&(a.type==="block-map"||a.type==="block-seq")){const o=a.items[a.items.length-1];o&&!o.sep&&!o.value&&o.start.length>0&&oy(o.start)===-1&&(a.indent===0||o.start.every(c=>c.type!=="comment"||c.indent<a.indent))&&(l.type==="document"?l.end=o.start:l.items.push({start:o.start}),a.items.splice(-1,1))}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const n={type:"document",offset:this.offset,start:[]};this.type==="doc-start"&&n.start.push(this.sourceToken),this.stack.push(n);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(n){if(n.value)return yield*this.lineEnd(n);switch(this.type){case"doc-start":{oy(n.start)!==-1?(yield*this.pop(),yield*this.step()):n.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":n.start.push(this.sourceToken);return}const a=this.startBlockValue(n);a?this.stack.push(a):yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}*scalar(n){if(this.type==="map-value-ind"){const a=so(this.peek(2)),l=ts(a);let o;n.end?(o=n.end,o.push(this.sourceToken),delete n.end):o=[this.sourceToken];const c={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:l,key:n,sep:o}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=c}else yield*this.lineEnd(n)}*blockScalar(n){switch(this.type){case"space":case"comment":case"newline":n.props.push(this.sourceToken);return;case"scalar":if(n.source=this.source,this.atNewLine=!0,this.indent=0,this.onNewLine){let a=this.source.indexOf(`
136
+ `)+1;for(;a!==0;)this.onNewLine(this.offset+a),a=this.source.indexOf(`
137
+ `,a)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(n){const a=n.items[n.items.length-1];switch(this.type){case"newline":if(this.onKeyLine=!1,a.value){const l="end"in a.value?a.value.end:void 0;(Array.isArray(l)?l[l.length-1]:void 0)?.type==="comment"?l?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"space":case"comment":if(a.value)n.items.push({start:[this.sourceToken]});else if(a.sep)a.sep.push(this.sourceToken);else{if(this.atIndentedComment(a.start,n.indent)){const o=n.items[n.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,a.start),o.push(this.sourceToken),n.items.pop();return}}a.start.push(this.sourceToken)}return}if(this.indent>=n.indent){const l=!this.onKeyLine&&this.indent===n.indent,o=l&&(a.sep||a.explicitKey)&&this.type!=="seq-item-ind";let c=[];if(o&&a.sep&&!a.value){const f=[];for(let m=0;m<a.sep.length;++m){const g=a.sep[m];switch(g.type){case"newline":f.push(m);break;case"space":break;case"comment":g.indent>n.indent&&(f.length=0);break;default:f.length=0}}f.length>=2&&(c=a.sep.splice(f[1]))}switch(this.type){case"anchor":case"tag":o||a.value?(c.push(this.sourceToken),n.items.push({start:c}),this.onKeyLine=!0):a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"explicit-key-ind":!a.sep&&!a.explicitKey?(a.start.push(this.sourceToken),a.explicitKey=!0):o||a.value?(c.push(this.sourceToken),n.items.push({start:c,explicitKey:!0})):this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case"map-value-ind":if(a.explicitKey)if(a.sep)if(a.value)n.items.push({start:[],key:null,sep:[this.sourceToken]});else if(Ai(a.sep,"map-value-ind"))this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:c,key:null,sep:[this.sourceToken]}]});else if(Kv(a.key)&&!Ai(a.sep,"newline")){const f=ts(a.start),m=a.key,g=a.sep;g.push(this.sourceToken),delete a.key,delete a.sep,this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:m,sep:g}]})}else c.length>0?a.sep=a.sep.concat(c,this.sourceToken):a.sep.push(this.sourceToken);else if(Ai(a.start,"newline"))Object.assign(a,{key:null,sep:[this.sourceToken]});else{const f=ts(a.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:f,key:null,sep:[this.sourceToken]}]})}else a.sep?a.value||o?n.items.push({start:c,key:null,sep:[this.sourceToken]}):Ai(a.sep,"map-value-ind")?this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):a.sep.push(this.sourceToken):Object.assign(a,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const f=this.flowScalar(this.type);o||a.value?(n.items.push({start:c,key:f,sep:[]}),this.onKeyLine=!0):a.sep?this.stack.push(f):(Object.assign(a,{key:f,sep:[]}),this.onKeyLine=!0);return}default:{const f=this.startBlockValue(n);if(f){if(f.type==="block-seq"){if(!a.explicitKey&&a.sep&&!Ai(a.sep,"newline")){yield*this.pop({type:"error",offset:this.offset,message:"Unexpected block-seq-ind on same line with key",source:this.source});return}}else l&&n.items.push({start:c});this.stack.push(f);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(n){const a=n.items[n.items.length-1];switch(this.type){case"newline":if(a.value){const l="end"in a.value?a.value.end:void 0;(Array.isArray(l)?l[l.length-1]:void 0)?.type==="comment"?l?.push(this.sourceToken):n.items.push({start:[this.sourceToken]})}else a.start.push(this.sourceToken);return;case"space":case"comment":if(a.value)n.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(a.start,n.indent)){const o=n.items[n.items.length-2]?.value?.end;if(Array.isArray(o)){Array.prototype.push.apply(o,a.start),o.push(this.sourceToken),n.items.pop();return}}a.start.push(this.sourceToken)}return;case"anchor":case"tag":if(a.value||this.indent<=n.indent)break;a.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==n.indent)break;a.value||Ai(a.start,"seq-item-ind")?n.items.push({start:[this.sourceToken]}):a.start.push(this.sourceToken);return}if(this.indent>n.indent){const l=this.startBlockValue(n);if(l){this.stack.push(l);return}}yield*this.pop(),yield*this.step()}*flowCollection(n){const a=n.items[n.items.length-1];if(this.type==="flow-error-end"){let l;do yield*this.pop(),l=this.peek(1);while(l?.type==="flow-collection")}else if(n.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":!a||a.sep?n.items.push({start:[this.sourceToken]}):a.start.push(this.sourceToken);return;case"map-value-ind":!a||a.value?n.items.push({start:[],key:null,sep:[this.sourceToken]}):a.sep?a.sep.push(this.sourceToken):Object.assign(a,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":!a||a.value?n.items.push({start:[this.sourceToken]}):a.sep?a.sep.push(this.sourceToken):a.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const o=this.flowScalar(this.type);!a||a.value?n.items.push({start:[],key:o,sep:[]}):a.sep?this.stack.push(o):Object.assign(a,{key:o,sep:[]});return}case"flow-map-end":case"flow-seq-end":n.end.push(this.sourceToken);return}const l=this.startBlockValue(n);l?this.stack.push(l):(yield*this.pop(),yield*this.step())}else{const l=this.peek(2);if(l.type==="block-map"&&(this.type==="map-value-ind"&&l.indent===n.indent||this.type==="newline"&&!l.items[l.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type==="map-value-ind"&&l.type!=="flow-collection"){const o=so(l),c=ts(o);cy(n);const f=n.end.splice(1,n.end.length);f.push(this.sourceToken);const m={type:"block-map",offset:n.offset,indent:n.indent,items:[{start:c,key:n,sep:f}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=m}else yield*this.lineEnd(n)}}flowScalar(n){if(this.onNewLine){let a=this.source.indexOf(`
138
+ `)+1;for(;a!==0;)this.onNewLine(this.offset+a),a=this.source.indexOf(`
139
+ `,a)+1}return{type:n,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(n){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=!0;const a=so(n),l=ts(a);return l.push(this.sourceToken),{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,explicitKey:!0}]}}case"map-value-ind":{this.onKeyLine=!0;const a=so(n),l=ts(a);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:l,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(n,a){return this.type!=="comment"||this.indent<=a?!1:n.every(l=>l.type==="newline"||l.type==="space")}*documentEnd(n){this.type!=="doc-mode"&&(n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop()))}*lineEnd(n){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop(),yield*this.step();break;case"newline":this.onKeyLine=!1;default:n.end?n.end.push(this.sourceToken):n.end=[this.sourceToken],this.type==="newline"&&(yield*this.pop())}}}function z1(t){const n=t.prettyErrors!==!1;return{lineCounter:t.lineCounter||n&&new _1||null,prettyErrors:n}}function E1(t,n={}){const{lineCounter:a,prettyErrors:l}=z1(n),o=new k1(a?.addNewLine),c=new x1(n),f=Array.from(c.compose(o.parse(t)));if(l&&a)for(const m of f)m.errors.forEach(ay(t,a)),m.warnings.forEach(ay(t,a));return f.length>0?f:Object.assign([],{empty:!0},c.streamInfo())}function Ri(t,n,{checkForDefaultPrevented:a=!0}={}){return function(o){if(t?.(o),a===!1||!o.defaultPrevented)return n?.(o)}}function uy(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}function jf(...t){return n=>{let a=!1;const l=t.map(o=>{const c=uy(o,n);return!a&&typeof c=="function"&&(a=!0),c});if(a)return()=>{for(let o=0;o<l.length;o++){const c=l[o];typeof c=="function"?c():uy(t[o],null)}}}}function da(...t){return N.useCallback(jf(...t),t)}function C1(t,n){const a=N.createContext(n),l=c=>{const{children:f,...m}=c,g=N.useMemo(()=>m,Object.values(m));return u.jsx(a.Provider,{value:g,children:f})};l.displayName=t+"Provider";function o(c){const f=N.useContext(a);if(f)return f;if(n!==void 0)return n;throw new Error(`\`${c}\` must be used within \`${t}\``)}return[l,o]}function A1(t,n=[]){let a=[];function l(c,f){const m=N.createContext(f),g=a.length;a=[...a,f];const p=v=>{const{scope:x,children:j,...z}=v,w=x?.[t]?.[g]||m,_=N.useMemo(()=>z,Object.values(z));return u.jsx(w.Provider,{value:_,children:j})};p.displayName=c+"Provider";function b(v,x){const j=x?.[t]?.[g]||m,z=N.useContext(j);if(z)return z;if(f!==void 0)return f;throw new Error(`\`${v}\` must be used within \`${c}\``)}return[p,b]}const o=()=>{const c=a.map(f=>N.createContext(f));return function(m){const g=m?.[t]||c;return N.useMemo(()=>({[`__scope${t}`]:{...m,[t]:g}}),[m,g])}};return o.scopeName=t,[l,T1(o,...n)]}function T1(...t){const n=t[0];if(t.length===1)return n;const a=()=>{const l=t.map(o=>({useScope:o(),scopeName:o.scopeName}));return function(c){const f=l.reduce((m,{useScope:g,scopeName:p})=>{const v=g(c)[`__scope${p}`];return{...m,...v}},{});return N.useMemo(()=>({[`__scope${n.scopeName}`]:f}),[f])}};return a.scopeName=n.scopeName,a}var zl=globalThis?.document?N.useLayoutEffect:()=>{},O1=of[" useId ".trim().toString()]||(()=>{}),D1=0;function Td(t){const[n,a]=N.useState(O1());return zl(()=>{a(l=>l??String(D1++))},[t]),t||(n?`radix-${n}`:"")}var R1=of[" useInsertionEffect ".trim().toString()]||zl;function M1({prop:t,defaultProp:n,onChange:a=()=>{},caller:l}){const[o,c,f]=L1({defaultProp:n,onChange:a}),m=t!==void 0,g=m?t:o;{const b=N.useRef(t!==void 0);N.useEffect(()=>{const v=b.current;v!==m&&console.warn(`${l} is changing from ${v?"controlled":"uncontrolled"} to ${m?"controlled":"uncontrolled"}. Components should not switch from controlled to uncontrolled (or vice versa). Decide between using a controlled or uncontrolled value for the lifetime of the component.`),b.current=m},[m,l])}const p=N.useCallback(b=>{if(m){const v=U1(b)?b(t):b;v!==t&&f.current?.(v)}else c(b)},[m,t,c,f]);return[g,p]}function L1({defaultProp:t,onChange:n}){const[a,l]=N.useState(t),o=N.useRef(a),c=N.useRef(n);return R1(()=>{c.current=n},[n]),N.useEffect(()=>{o.current!==a&&(c.current?.(a),o.current=a)},[a,o]),[a,l,c]}function U1(t){return typeof t=="function"}var Gv=ov();const $1=rv(Gv);function Yv(t){const n=B1(t),a=N.forwardRef((l,o)=>{const{children:c,...f}=l,m=N.Children.toArray(c),g=m.find(q1);if(g){const p=g.props.children,b=m.map(v=>v===g?N.Children.count(p)>1?N.Children.only(null):N.isValidElement(p)?p.props.children:null:v);return u.jsx(n,{...f,ref:o,children:N.isValidElement(p)?N.cloneElement(p,void 0,b):null})}return u.jsx(n,{...f,ref:o,children:c})});return a.displayName=`${t}.Slot`,a}function B1(t){const n=N.forwardRef((a,l)=>{const{children:o,...c}=a;if(N.isValidElement(o)){const f=I1(o),m=H1(c,o.props);return o.type!==N.Fragment&&(m.ref=l?jf(l,f):f),N.cloneElement(o,m)}return N.Children.count(o)>1?N.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var Z1=Symbol("radix.slottable");function q1(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Z1}function H1(t,n){const a={...n};for(const l in n){const o=t[l],c=n[l];/^on[A-Z]/.test(l)?o&&c?a[l]=(...m)=>{const g=c(...m);return o(...m),g}:o&&(a[l]=o):l==="style"?a[l]={...o,...c}:l==="className"&&(a[l]=[o,c].filter(Boolean).join(" "))}return{...t,...a}}function I1(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var K1=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","select","span","svg","ul"],ti=K1.reduce((t,n)=>{const a=Yv(`Primitive.${n}`),l=N.forwardRef((o,c)=>{const{asChild:f,...m}=o,g=f?a:n;return typeof window<"u"&&(window[Symbol.for("radix-ui")]=!0),u.jsx(g,{...m,ref:c})});return l.displayName=`Primitive.${n}`,{...t,[n]:l}},{});function G1(t,n){t&&Gv.flushSync(()=>t.dispatchEvent(n))}function El(t){const n=N.useRef(t);return N.useEffect(()=>{n.current=t}),N.useMemo(()=>(...a)=>n.current?.(...a),[])}function Y1(t,n=globalThis?.document){const a=El(t);N.useEffect(()=>{const l=o=>{o.key==="Escape"&&a(o)};return n.addEventListener("keydown",l,{capture:!0}),()=>n.removeEventListener("keydown",l,{capture:!0})},[a,n])}var V1="DismissableLayer",Xd="dismissableLayer.update",P1="dismissableLayer.pointerDownOutside",Q1="dismissableLayer.focusOutside",dy,Vv=N.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),Pv=N.forwardRef((t,n)=>{const{disableOutsidePointerEvents:a=!1,onEscapeKeyDown:l,onPointerDownOutside:o,onFocusOutside:c,onInteractOutside:f,onDismiss:m,...g}=t,p=N.useContext(Vv),[b,v]=N.useState(null),x=b?.ownerDocument??globalThis?.document,[,j]=N.useState({}),z=da(n,G=>v(G)),w=Array.from(p.layers),[_]=[...p.layersWithOutsidePointerEventsDisabled].slice(-1),E=w.indexOf(_),O=b?w.indexOf(b):-1,T=p.layersWithOutsidePointerEventsDisabled.size>0,D=O>=E,L=F1(G=>{const M=G.target,F=[...p.branches].some(xe=>xe.contains(M));!D||F||(o?.(G),f?.(G),G.defaultPrevented||m?.())},x),I=W1(G=>{const M=G.target;[...p.branches].some(xe=>xe.contains(M))||(c?.(G),f?.(G),G.defaultPrevented||m?.())},x);return Y1(G=>{O===p.layers.size-1&&(l?.(G),!G.defaultPrevented&&m&&(G.preventDefault(),m()))},x),N.useEffect(()=>{if(b)return a&&(p.layersWithOutsidePointerEventsDisabled.size===0&&(dy=x.body.style.pointerEvents,x.body.style.pointerEvents="none"),p.layersWithOutsidePointerEventsDisabled.add(b)),p.layers.add(b),fy(),()=>{a&&p.layersWithOutsidePointerEventsDisabled.size===1&&(x.body.style.pointerEvents=dy)}},[b,x,a,p]),N.useEffect(()=>()=>{b&&(p.layers.delete(b),p.layersWithOutsidePointerEventsDisabled.delete(b),fy())},[b,p]),N.useEffect(()=>{const G=()=>j({});return document.addEventListener(Xd,G),()=>document.removeEventListener(Xd,G)},[]),u.jsx(ti.div,{...g,ref:z,style:{pointerEvents:T?D?"auto":"none":void 0,...t.style},onFocusCapture:Ri(t.onFocusCapture,I.onFocusCapture),onBlurCapture:Ri(t.onBlurCapture,I.onBlurCapture),onPointerDownCapture:Ri(t.onPointerDownCapture,L.onPointerDownCapture)})});Pv.displayName=V1;var X1="DismissableLayerBranch",J1=N.forwardRef((t,n)=>{const a=N.useContext(Vv),l=N.useRef(null),o=da(n,l);return N.useEffect(()=>{const c=l.current;if(c)return a.branches.add(c),()=>{a.branches.delete(c)}},[a.branches]),u.jsx(ti.div,{...t,ref:o})});J1.displayName=X1;function F1(t,n=globalThis?.document){const a=El(t),l=N.useRef(!1),o=N.useRef(()=>{});return N.useEffect(()=>{const c=m=>{if(m.target&&!l.current){let g=function(){Qv(P1,a,p,{discrete:!0})};const p={originalEvent:m};m.pointerType==="touch"?(n.removeEventListener("click",o.current),o.current=g,n.addEventListener("click",o.current,{once:!0})):g()}else n.removeEventListener("click",o.current);l.current=!1},f=window.setTimeout(()=>{n.addEventListener("pointerdown",c)},0);return()=>{window.clearTimeout(f),n.removeEventListener("pointerdown",c),n.removeEventListener("click",o.current)}},[n,a]),{onPointerDownCapture:()=>l.current=!0}}function W1(t,n=globalThis?.document){const a=El(t),l=N.useRef(!1);return N.useEffect(()=>{const o=c=>{c.target&&!l.current&&Qv(Q1,a,{originalEvent:c},{discrete:!1})};return n.addEventListener("focusin",o),()=>n.removeEventListener("focusin",o)},[n,a]),{onFocusCapture:()=>l.current=!0,onBlurCapture:()=>l.current=!1}}function fy(){const t=new CustomEvent(Xd);document.dispatchEvent(t)}function Qv(t,n,a,{discrete:l}){const o=a.originalEvent.target,c=new CustomEvent(t,{bubbles:!1,cancelable:!0,detail:a});n&&o.addEventListener(t,n,{once:!0}),l?G1(o,c):o.dispatchEvent(c)}var Od="focusScope.autoFocusOnMount",Dd="focusScope.autoFocusOnUnmount",hy={bubbles:!1,cancelable:!0},eN="FocusScope",Xv=N.forwardRef((t,n)=>{const{loop:a=!1,trapped:l=!1,onMountAutoFocus:o,onUnmountAutoFocus:c,...f}=t,[m,g]=N.useState(null),p=El(o),b=El(c),v=N.useRef(null),x=da(n,w=>g(w)),j=N.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;N.useEffect(()=>{if(l){let w=function(T){if(j.paused||!m)return;const D=T.target;m.contains(D)?v.current=D:Ci(v.current,{select:!0})},_=function(T){if(j.paused||!m)return;const D=T.relatedTarget;D!==null&&(m.contains(D)||Ci(v.current,{select:!0}))},E=function(T){if(document.activeElement===document.body)for(const L of T)L.removedNodes.length>0&&Ci(m)};document.addEventListener("focusin",w),document.addEventListener("focusout",_);const O=new MutationObserver(E);return m&&O.observe(m,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",w),document.removeEventListener("focusout",_),O.disconnect()}}},[l,m,j.paused]),N.useEffect(()=>{if(m){py.add(j);const w=document.activeElement;if(!m.contains(w)){const E=new CustomEvent(Od,hy);m.addEventListener(Od,p),m.dispatchEvent(E),E.defaultPrevented||(tN(lN(Jv(m)),{select:!0}),document.activeElement===w&&Ci(m))}return()=>{m.removeEventListener(Od,p),setTimeout(()=>{const E=new CustomEvent(Dd,hy);m.addEventListener(Dd,b),m.dispatchEvent(E),E.defaultPrevented||Ci(w??document.body,{select:!0}),m.removeEventListener(Dd,b),py.remove(j)},0)}}},[m,p,b,j]);const z=N.useCallback(w=>{if(!a&&!l||j.paused)return;const _=w.key==="Tab"&&!w.altKey&&!w.ctrlKey&&!w.metaKey,E=document.activeElement;if(_&&E){const O=w.currentTarget,[T,D]=nN(O);T&&D?!w.shiftKey&&E===D?(w.preventDefault(),a&&Ci(T,{select:!0})):w.shiftKey&&E===T&&(w.preventDefault(),a&&Ci(D,{select:!0})):E===O&&w.preventDefault()}},[a,l,j.paused]);return u.jsx(ti.div,{tabIndex:-1,...f,ref:x,onKeyDown:z})});Xv.displayName=eN;function tN(t,{select:n=!1}={}){const a=document.activeElement;for(const l of t)if(Ci(l,{select:n}),document.activeElement!==a)return}function nN(t){const n=Jv(t),a=my(n,t),l=my(n.reverse(),t);return[a,l]}function Jv(t){const n=[],a=document.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode:l=>{const o=l.tagName==="INPUT"&&l.type==="hidden";return l.disabled||l.hidden||o?NodeFilter.FILTER_SKIP:l.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;a.nextNode();)n.push(a.currentNode);return n}function my(t,n){for(const a of t)if(!iN(a,{upTo:n}))return a}function iN(t,{upTo:n}){if(getComputedStyle(t).visibility==="hidden")return!0;for(;t;){if(n!==void 0&&t===n)return!1;if(getComputedStyle(t).display==="none")return!0;t=t.parentElement}return!1}function aN(t){return t instanceof HTMLInputElement&&"select"in t}function Ci(t,{select:n=!1}={}){if(t&&t.focus){const a=document.activeElement;t.focus({preventScroll:!0}),t!==a&&aN(t)&&n&&t.select()}}var py=sN();function sN(){let t=[];return{add(n){const a=t[0];n!==a&&a?.pause(),t=gy(t,n),t.unshift(n)},remove(n){t=gy(t,n),t[0]?.resume()}}}function gy(t,n){const a=[...t],l=a.indexOf(n);return l!==-1&&a.splice(l,1),a}function lN(t){return t.filter(n=>n.tagName!=="A")}var rN="Portal",Fv=N.forwardRef((t,n)=>{const{container:a,...l}=t,[o,c]=N.useState(!1);zl(()=>c(!0),[]);const f=a||o&&globalThis?.document?.body;return f?$1.createPortal(u.jsx(ti.div,{...l,ref:n}),f):null});Fv.displayName=rN;function oN(t,n){return N.useReducer((a,l)=>n[a][l]??a,t)}var Yo=t=>{const{present:n,children:a}=t,l=cN(n),o=typeof a=="function"?a({present:l.isPresent}):N.Children.only(a),c=da(l.ref,uN(o));return typeof a=="function"||l.isPresent?N.cloneElement(o,{ref:c}):null};Yo.displayName="Presence";function cN(t){const[n,a]=N.useState(),l=N.useRef(null),o=N.useRef(t),c=N.useRef("none"),f=t?"mounted":"unmounted",[m,g]=oN(f,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return N.useEffect(()=>{const p=lo(l.current);c.current=m==="mounted"?p:"none"},[m]),zl(()=>{const p=l.current,b=o.current;if(b!==t){const x=c.current,j=lo(p);t?g("MOUNT"):j==="none"||p?.display==="none"?g("UNMOUNT"):g(b&&x!==j?"ANIMATION_OUT":"UNMOUNT"),o.current=t}},[t,g]),zl(()=>{if(n){let p;const b=n.ownerDocument.defaultView??window,v=j=>{const w=lo(l.current).includes(CSS.escape(j.animationName));if(j.target===n&&w&&(g("ANIMATION_END"),!o.current)){const _=n.style.animationFillMode;n.style.animationFillMode="forwards",p=b.setTimeout(()=>{n.style.animationFillMode==="forwards"&&(n.style.animationFillMode=_)})}},x=j=>{j.target===n&&(c.current=lo(l.current))};return n.addEventListener("animationstart",x),n.addEventListener("animationcancel",v),n.addEventListener("animationend",v),()=>{b.clearTimeout(p),n.removeEventListener("animationstart",x),n.removeEventListener("animationcancel",v),n.removeEventListener("animationend",v)}}else g("ANIMATION_END")},[n,g]),{isPresent:["mounted","unmountSuspended"].includes(m),ref:N.useCallback(p=>{l.current=p?getComputedStyle(p):null,a(p)},[])}}function lo(t){return t?.animationName||"none"}function uN(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}var Rd=0;function dN(){N.useEffect(()=>{const t=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",t[0]??yy()),document.body.insertAdjacentElement("beforeend",t[1]??yy()),Rd++,()=>{Rd===1&&document.querySelectorAll("[data-radix-focus-guard]").forEach(n=>n.remove()),Rd--}},[])}function yy(){const t=document.createElement("span");return t.setAttribute("data-radix-focus-guard",""),t.tabIndex=0,t.style.outline="none",t.style.opacity="0",t.style.position="fixed",t.style.pointerEvents="none",t}var Cn=function(){return Cn=Object.assign||function(n){for(var a,l=1,o=arguments.length;l<o;l++){a=arguments[l];for(var c in a)Object.prototype.hasOwnProperty.call(a,c)&&(n[c]=a[c])}return n},Cn.apply(this,arguments)};function Wv(t,n){var a={};for(var l in t)Object.prototype.hasOwnProperty.call(t,l)&&n.indexOf(l)<0&&(a[l]=t[l]);if(t!=null&&typeof Object.getOwnPropertySymbols=="function")for(var o=0,l=Object.getOwnPropertySymbols(t);o<l.length;o++)n.indexOf(l[o])<0&&Object.prototype.propertyIsEnumerable.call(t,l[o])&&(a[l[o]]=t[l[o]]);return a}function fN(t,n,a){if(a||arguments.length===2)for(var l=0,o=n.length,c;l<o;l++)(c||!(l in n))&&(c||(c=Array.prototype.slice.call(n,0,l)),c[l]=n[l]);return t.concat(c||Array.prototype.slice.call(n))}var So="right-scroll-bar-position",wo="width-before-scroll-bar",hN="with-scroll-bars-hidden",mN="--removed-body-scroll-bar-size";function Md(t,n){return typeof t=="function"?t(n):t&&(t.current=n),t}function pN(t,n){var a=N.useState(function(){return{value:t,callback:n,facade:{get current(){return a.value},set current(l){var o=a.value;o!==l&&(a.value=l,a.callback(l,o))}}}})[0];return a.callback=n,a.facade}var gN=typeof window<"u"?N.useLayoutEffect:N.useEffect,vy=new WeakMap;function yN(t,n){var a=pN(null,function(l){return t.forEach(function(o){return Md(o,l)})});return gN(function(){var l=vy.get(a);if(l){var o=new Set(l),c=new Set(t),f=a.current;o.forEach(function(m){c.has(m)||Md(m,null)}),c.forEach(function(m){o.has(m)||Md(m,f)})}vy.set(a,t)},[t]),a}function vN(t){return t}function bN(t,n){n===void 0&&(n=vN);var a=[],l=!1,o={read:function(){if(l)throw new Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return a.length?a[a.length-1]:t},useMedium:function(c){var f=n(c,l);return a.push(f),function(){a=a.filter(function(m){return m!==f})}},assignSyncMedium:function(c){for(l=!0;a.length;){var f=a;a=[],f.forEach(c)}a={push:function(m){return c(m)},filter:function(){return a}}},assignMedium:function(c){l=!0;var f=[];if(a.length){var m=a;a=[],m.forEach(c),f=a}var g=function(){var b=f;f=[],b.forEach(c)},p=function(){return Promise.resolve().then(g)};p(),a={push:function(b){f.push(b),p()},filter:function(b){return f=f.filter(b),a}}}};return o}function xN(t){t===void 0&&(t={});var n=bN(null);return n.options=Cn({async:!0,ssr:!1},t),n}var eb=function(t){var n=t.sideCar,a=Wv(t,["sideCar"]);if(!n)throw new Error("Sidecar: please provide `sideCar` property to import the right car");var l=n.read();if(!l)throw new Error("Sidecar medium not found");return N.createElement(l,Cn({},a))};eb.isSideCarExport=!0;function SN(t,n){return t.useMedium(n),eb}var tb=xN(),Ld=function(){},Vo=N.forwardRef(function(t,n){var a=N.useRef(null),l=N.useState({onScrollCapture:Ld,onWheelCapture:Ld,onTouchMoveCapture:Ld}),o=l[0],c=l[1],f=t.forwardProps,m=t.children,g=t.className,p=t.removeScrollBar,b=t.enabled,v=t.shards,x=t.sideCar,j=t.noRelative,z=t.noIsolation,w=t.inert,_=t.allowPinchZoom,E=t.as,O=E===void 0?"div":E,T=t.gapMode,D=Wv(t,["forwardProps","children","className","removeScrollBar","enabled","shards","sideCar","noRelative","noIsolation","inert","allowPinchZoom","as","gapMode"]),L=x,I=yN([a,n]),G=Cn(Cn({},D),o);return N.createElement(N.Fragment,null,b&&N.createElement(L,{sideCar:tb,removeScrollBar:p,shards:v,noRelative:j,noIsolation:z,inert:w,setCallbacks:c,allowPinchZoom:!!_,lockRef:a,gapMode:T}),f?N.cloneElement(N.Children.only(m),Cn(Cn({},G),{ref:I})):N.createElement(O,Cn({},G,{className:g,ref:I}),m))});Vo.defaultProps={enabled:!0,removeScrollBar:!0,inert:!1};Vo.classNames={fullWidth:wo,zeroRight:So};var wN=function(){if(typeof __webpack_nonce__<"u")return __webpack_nonce__};function NN(){if(!document)return null;var t=document.createElement("style");t.type="text/css";var n=wN();return n&&t.setAttribute("nonce",n),t}function jN(t,n){t.styleSheet?t.styleSheet.cssText=n:t.appendChild(document.createTextNode(n))}function _N(t){var n=document.head||document.getElementsByTagName("head")[0];n.appendChild(t)}var kN=function(){var t=0,n=null;return{add:function(a){t==0&&(n=NN())&&(jN(n,a),_N(n)),t++},remove:function(){t--,!t&&n&&(n.parentNode&&n.parentNode.removeChild(n),n=null)}}},zN=function(){var t=kN();return function(n,a){N.useEffect(function(){return t.add(n),function(){t.remove()}},[n&&a])}},nb=function(){var t=zN(),n=function(a){var l=a.styles,o=a.dynamic;return t(l,o),null};return n},EN={left:0,top:0,right:0,gap:0},Ud=function(t){return parseInt(t||"",10)||0},CN=function(t){var n=window.getComputedStyle(document.body),a=n[t==="padding"?"paddingLeft":"marginLeft"],l=n[t==="padding"?"paddingTop":"marginTop"],o=n[t==="padding"?"paddingRight":"marginRight"];return[Ud(a),Ud(l),Ud(o)]},AN=function(t){if(t===void 0&&(t="margin"),typeof window>"u")return EN;var n=CN(t),a=document.documentElement.clientWidth,l=window.innerWidth;return{left:n[0],top:n[1],right:n[2],gap:Math.max(0,l-a+n[2]-n[0])}},TN=nb(),fs="data-scroll-locked",ON=function(t,n,a,l){var o=t.left,c=t.top,f=t.right,m=t.gap;return a===void 0&&(a="margin"),`
140
+ .`.concat(hN,` {
141
+ overflow: hidden `).concat(l,`;
142
+ padding-right: `).concat(m,"px ").concat(l,`;
143
+ }
144
+ body[`).concat(fs,`] {
145
+ overflow: hidden `).concat(l,`;
146
+ overscroll-behavior: contain;
147
+ `).concat([n&&"position: relative ".concat(l,";"),a==="margin"&&`
148
+ padding-left: `.concat(o,`px;
149
+ padding-top: `).concat(c,`px;
150
+ padding-right: `).concat(f,`px;
151
+ margin-left:0;
152
+ margin-top:0;
153
+ margin-right: `).concat(m,"px ").concat(l,`;
154
+ `),a==="padding"&&"padding-right: ".concat(m,"px ").concat(l,";")].filter(Boolean).join(""),`
155
+ }
156
+
157
+ .`).concat(So,` {
158
+ right: `).concat(m,"px ").concat(l,`;
159
+ }
160
+
161
+ .`).concat(wo,` {
162
+ margin-right: `).concat(m,"px ").concat(l,`;
163
+ }
164
+
165
+ .`).concat(So," .").concat(So,` {
166
+ right: 0 `).concat(l,`;
167
+ }
168
+
169
+ .`).concat(wo," .").concat(wo,` {
170
+ margin-right: 0 `).concat(l,`;
171
+ }
172
+
173
+ body[`).concat(fs,`] {
174
+ `).concat(mN,": ").concat(m,`px;
175
+ }
176
+ `)},by=function(){var t=parseInt(document.body.getAttribute(fs)||"0",10);return isFinite(t)?t:0},DN=function(){N.useEffect(function(){return document.body.setAttribute(fs,(by()+1).toString()),function(){var t=by()-1;t<=0?document.body.removeAttribute(fs):document.body.setAttribute(fs,t.toString())}},[])},RN=function(t){var n=t.noRelative,a=t.noImportant,l=t.gapMode,o=l===void 0?"margin":l;DN();var c=N.useMemo(function(){return AN(o)},[o]);return N.createElement(TN,{styles:ON(c,!n,o,a?"":"!important")})},Jd=!1;if(typeof window<"u")try{var ro=Object.defineProperty({},"passive",{get:function(){return Jd=!0,!0}});window.addEventListener("test",ro,ro),window.removeEventListener("test",ro,ro)}catch{Jd=!1}var ns=Jd?{passive:!1}:!1,MN=function(t){return t.tagName==="TEXTAREA"},ib=function(t,n){if(!(t instanceof Element))return!1;var a=window.getComputedStyle(t);return a[n]!=="hidden"&&!(a.overflowY===a.overflowX&&!MN(t)&&a[n]==="visible")},LN=function(t){return ib(t,"overflowY")},UN=function(t){return ib(t,"overflowX")},xy=function(t,n){var a=n.ownerDocument,l=n;do{typeof ShadowRoot<"u"&&l instanceof ShadowRoot&&(l=l.host);var o=ab(t,l);if(o){var c=sb(t,l),f=c[1],m=c[2];if(f>m)return!0}l=l.parentNode}while(l&&l!==a.body);return!1},$N=function(t){var n=t.scrollTop,a=t.scrollHeight,l=t.clientHeight;return[n,a,l]},BN=function(t){var n=t.scrollLeft,a=t.scrollWidth,l=t.clientWidth;return[n,a,l]},ab=function(t,n){return t==="v"?LN(n):UN(n)},sb=function(t,n){return t==="v"?$N(n):BN(n)},ZN=function(t,n){return t==="h"&&n==="rtl"?-1:1},qN=function(t,n,a,l,o){var c=ZN(t,window.getComputedStyle(n).direction),f=c*l,m=a.target,g=n.contains(m),p=!1,b=f>0,v=0,x=0;do{if(!m)break;var j=sb(t,m),z=j[0],w=j[1],_=j[2],E=w-_-c*z;(z||E)&&ab(t,m)&&(v+=E,x+=z);var O=m.parentNode;m=O&&O.nodeType===Node.DOCUMENT_FRAGMENT_NODE?O.host:O}while(!g&&m!==document.body||g&&(n.contains(m)||n===m));return(b&&Math.abs(v)<1||!b&&Math.abs(x)<1)&&(p=!0),p},oo=function(t){return"changedTouches"in t?[t.changedTouches[0].clientX,t.changedTouches[0].clientY]:[0,0]},Sy=function(t){return[t.deltaX,t.deltaY]},wy=function(t){return t&&"current"in t?t.current:t},HN=function(t,n){return t[0]===n[0]&&t[1]===n[1]},IN=function(t){return`
177
+ .block-interactivity-`.concat(t,` {pointer-events: none;}
178
+ .allow-interactivity-`).concat(t,` {pointer-events: all;}
179
+ `)},KN=0,is=[];function GN(t){var n=N.useRef([]),a=N.useRef([0,0]),l=N.useRef(),o=N.useState(KN++)[0],c=N.useState(nb)[0],f=N.useRef(t);N.useEffect(function(){f.current=t},[t]),N.useEffect(function(){if(t.inert){document.body.classList.add("block-interactivity-".concat(o));var w=fN([t.lockRef.current],(t.shards||[]).map(wy),!0).filter(Boolean);return w.forEach(function(_){return _.classList.add("allow-interactivity-".concat(o))}),function(){document.body.classList.remove("block-interactivity-".concat(o)),w.forEach(function(_){return _.classList.remove("allow-interactivity-".concat(o))})}}},[t.inert,t.lockRef.current,t.shards]);var m=N.useCallback(function(w,_){if("touches"in w&&w.touches.length===2||w.type==="wheel"&&w.ctrlKey)return!f.current.allowPinchZoom;var E=oo(w),O=a.current,T="deltaX"in w?w.deltaX:O[0]-E[0],D="deltaY"in w?w.deltaY:O[1]-E[1],L,I=w.target,G=Math.abs(T)>Math.abs(D)?"h":"v";if("touches"in w&&G==="h"&&I.type==="range")return!1;var M=window.getSelection(),F=M&&M.anchorNode,xe=F?F===I||F.contains(I):!1;if(xe)return!1;var X=xy(G,I);if(!X)return!0;if(X?L=G:(L=G==="v"?"h":"v",X=xy(G,I)),!X)return!1;if(!l.current&&"changedTouches"in w&&(T||D)&&(l.current=L),!L)return!0;var le=l.current||L;return qN(le,_,w,le==="h"?T:D)},[]),g=N.useCallback(function(w){var _=w;if(!(!is.length||is[is.length-1]!==c)){var E="deltaY"in _?Sy(_):oo(_),O=n.current.filter(function(L){return L.name===_.type&&(L.target===_.target||_.target===L.shadowParent)&&HN(L.delta,E)})[0];if(O&&O.should){_.cancelable&&_.preventDefault();return}if(!O){var T=(f.current.shards||[]).map(wy).filter(Boolean).filter(function(L){return L.contains(_.target)}),D=T.length>0?m(_,T[0]):!f.current.noIsolation;D&&_.cancelable&&_.preventDefault()}}},[]),p=N.useCallback(function(w,_,E,O){var T={name:w,delta:_,target:E,should:O,shadowParent:YN(E)};n.current.push(T),setTimeout(function(){n.current=n.current.filter(function(D){return D!==T})},1)},[]),b=N.useCallback(function(w){a.current=oo(w),l.current=void 0},[]),v=N.useCallback(function(w){p(w.type,Sy(w),w.target,m(w,t.lockRef.current))},[]),x=N.useCallback(function(w){p(w.type,oo(w),w.target,m(w,t.lockRef.current))},[]);N.useEffect(function(){return is.push(c),t.setCallbacks({onScrollCapture:v,onWheelCapture:v,onTouchMoveCapture:x}),document.addEventListener("wheel",g,ns),document.addEventListener("touchmove",g,ns),document.addEventListener("touchstart",b,ns),function(){is=is.filter(function(w){return w!==c}),document.removeEventListener("wheel",g,ns),document.removeEventListener("touchmove",g,ns),document.removeEventListener("touchstart",b,ns)}},[]);var j=t.removeScrollBar,z=t.inert;return N.createElement(N.Fragment,null,z?N.createElement(c,{styles:IN(o)}):null,j?N.createElement(RN,{noRelative:t.noRelative,gapMode:t.gapMode}):null)}function YN(t){for(var n=null;t!==null;)t instanceof ShadowRoot&&(n=t.host,t=t.host),t=t.parentNode;return n}const VN=SN(tb,GN);var lb=N.forwardRef(function(t,n){return N.createElement(Vo,Cn({},t,{ref:n,sideCar:VN}))});lb.classNames=Vo.classNames;var PN=function(t){if(typeof document>"u")return null;var n=Array.isArray(t)?t[0]:t;return n.ownerDocument.body},as=new WeakMap,co=new WeakMap,uo={},$d=0,rb=function(t){return t&&(t.host||rb(t.parentNode))},QN=function(t,n){return n.map(function(a){if(t.contains(a))return a;var l=rb(a);return l&&t.contains(l)?l:(console.error("aria-hidden",a,"in not contained inside",t,". Doing nothing"),null)}).filter(function(a){return!!a})},XN=function(t,n,a,l){var o=QN(n,Array.isArray(t)?t:[t]);uo[a]||(uo[a]=new WeakMap);var c=uo[a],f=[],m=new Set,g=new Set(o),p=function(v){!v||m.has(v)||(m.add(v),p(v.parentNode))};o.forEach(p);var b=function(v){!v||g.has(v)||Array.prototype.forEach.call(v.children,function(x){if(m.has(x))b(x);else try{var j=x.getAttribute(l),z=j!==null&&j!=="false",w=(as.get(x)||0)+1,_=(c.get(x)||0)+1;as.set(x,w),c.set(x,_),f.push(x),w===1&&z&&co.set(x,!0),_===1&&x.setAttribute(a,"true"),z||x.setAttribute(l,"true")}catch(E){console.error("aria-hidden: cannot operate on ",x,E)}})};return b(n),m.clear(),$d++,function(){f.forEach(function(v){var x=as.get(v)-1,j=c.get(v)-1;as.set(v,x),c.set(v,j),x||(co.has(v)||v.removeAttribute(l),co.delete(v)),j||v.removeAttribute(a)}),$d--,$d||(as=new WeakMap,as=new WeakMap,co=new WeakMap,uo={})}},JN=function(t,n,a){a===void 0&&(a="data-aria-hidden");var l=Array.from(Array.isArray(t)?t:[t]),o=PN(t);return o?(l.push.apply(l,Array.from(o.querySelectorAll("[aria-live], script"))),XN(l,o,a,"aria-hidden")):function(){return null}},Po="Dialog",[ob]=A1(Po),[FN,wn]=ob(Po),cb=t=>{const{__scopeDialog:n,children:a,open:l,defaultOpen:o,onOpenChange:c,modal:f=!0}=t,m=N.useRef(null),g=N.useRef(null),[p,b]=M1({prop:l,defaultProp:o??!1,onChange:c,caller:Po});return u.jsx(FN,{scope:n,triggerRef:m,contentRef:g,contentId:Td(),titleId:Td(),descriptionId:Td(),open:p,onOpenChange:b,onOpenToggle:N.useCallback(()=>b(v=>!v),[b]),modal:f,children:a})};cb.displayName=Po;var ub="DialogTrigger",WN=N.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=wn(ub,a),c=da(n,o.triggerRef);return u.jsx(ti.button,{type:"button","aria-haspopup":"dialog","aria-expanded":o.open,"aria-controls":o.contentId,"data-state":zf(o.open),...l,ref:c,onClick:Ri(t.onClick,o.onOpenToggle)})});WN.displayName=ub;var _f="DialogPortal",[ej,db]=ob(_f,{forceMount:void 0}),fb=t=>{const{__scopeDialog:n,forceMount:a,children:l,container:o}=t,c=wn(_f,n);return u.jsx(ej,{scope:n,forceMount:a,children:N.Children.map(l,f=>u.jsx(Yo,{present:a||c.open,children:u.jsx(Fv,{asChild:!0,container:o,children:f})}))})};fb.displayName=_f;var _o="DialogOverlay",hb=N.forwardRef((t,n)=>{const a=db(_o,t.__scopeDialog),{forceMount:l=a.forceMount,...o}=t,c=wn(_o,t.__scopeDialog);return c.modal?u.jsx(Yo,{present:l||c.open,children:u.jsx(nj,{...o,ref:n})}):null});hb.displayName=_o;var tj=Yv("DialogOverlay.RemoveScroll"),nj=N.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=wn(_o,a);return u.jsx(lb,{as:tj,allowPinchZoom:!0,shards:[o.contentRef],children:u.jsx(ti.div,{"data-state":zf(o.open),...l,ref:n,style:{pointerEvents:"auto",...l.style}})})}),ca="DialogContent",mb=N.forwardRef((t,n)=>{const a=db(ca,t.__scopeDialog),{forceMount:l=a.forceMount,...o}=t,c=wn(ca,t.__scopeDialog);return u.jsx(Yo,{present:l||c.open,children:c.modal?u.jsx(ij,{...o,ref:n}):u.jsx(aj,{...o,ref:n})})});mb.displayName=ca;var ij=N.forwardRef((t,n)=>{const a=wn(ca,t.__scopeDialog),l=N.useRef(null),o=da(n,a.contentRef,l);return N.useEffect(()=>{const c=l.current;if(c)return JN(c)},[]),u.jsx(pb,{...t,ref:o,trapFocus:a.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:Ri(t.onCloseAutoFocus,c=>{c.preventDefault(),a.triggerRef.current?.focus()}),onPointerDownOutside:Ri(t.onPointerDownOutside,c=>{const f=c.detail.originalEvent,m=f.button===0&&f.ctrlKey===!0;(f.button===2||m)&&c.preventDefault()}),onFocusOutside:Ri(t.onFocusOutside,c=>c.preventDefault())})}),aj=N.forwardRef((t,n)=>{const a=wn(ca,t.__scopeDialog),l=N.useRef(!1),o=N.useRef(!1);return u.jsx(pb,{...t,ref:n,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:c=>{t.onCloseAutoFocus?.(c),c.defaultPrevented||(l.current||a.triggerRef.current?.focus(),c.preventDefault()),l.current=!1,o.current=!1},onInteractOutside:c=>{t.onInteractOutside?.(c),c.defaultPrevented||(l.current=!0,c.detail.originalEvent.type==="pointerdown"&&(o.current=!0));const f=c.target;a.triggerRef.current?.contains(f)&&c.preventDefault(),c.detail.originalEvent.type==="focusin"&&o.current&&c.preventDefault()}})}),pb=N.forwardRef((t,n)=>{const{__scopeDialog:a,trapFocus:l,onOpenAutoFocus:o,onCloseAutoFocus:c,...f}=t,m=wn(ca,a),g=N.useRef(null),p=da(n,g);return dN(),u.jsxs(u.Fragment,{children:[u.jsx(Xv,{asChild:!0,loop:!0,trapped:l,onMountAutoFocus:o,onUnmountAutoFocus:c,children:u.jsx(Pv,{role:"dialog",id:m.contentId,"aria-describedby":m.descriptionId,"aria-labelledby":m.titleId,"data-state":zf(m.open),...f,ref:p,onDismiss:()=>m.onOpenChange(!1)})}),u.jsxs(u.Fragment,{children:[u.jsx(sj,{titleId:m.titleId}),u.jsx(rj,{contentRef:g,descriptionId:m.descriptionId})]})]})}),kf="DialogTitle",gb=N.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=wn(kf,a);return u.jsx(ti.h2,{id:o.titleId,...l,ref:n})});gb.displayName=kf;var yb="DialogDescription",vb=N.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=wn(yb,a);return u.jsx(ti.p,{id:o.descriptionId,...l,ref:n})});vb.displayName=yb;var bb="DialogClose",xb=N.forwardRef((t,n)=>{const{__scopeDialog:a,...l}=t,o=wn(bb,a);return u.jsx(ti.button,{type:"button",...l,ref:n,onClick:Ri(t.onClick,()=>o.onOpenChange(!1))})});xb.displayName=bb;function zf(t){return t?"open":"closed"}var Sb="DialogTitleWarning",[zT,wb]=C1(Sb,{contentName:ca,titleName:kf,docsSlug:"dialog"}),sj=({titleId:t})=>{const n=wb(Sb),a=`\`${n.contentName}\` requires a \`${n.titleName}\` for the component to be accessible for screen reader users.
180
+
181
+ If you want to hide the \`${n.titleName}\`, you can wrap it with our VisuallyHidden component.
182
+
183
+ For more information, see https://radix-ui.com/primitives/docs/components/${n.docsSlug}`;return N.useEffect(()=>{t&&(document.getElementById(t)||console.error(a))},[a,t]),null},lj="DialogDescriptionWarning",rj=({contentRef:t,descriptionId:n})=>{const l=`Warning: Missing \`Description\` or \`aria-describedby={undefined}\` for {${wb(lj).contentName}}.`;return N.useEffect(()=>{const o=t.current?.getAttribute("aria-describedby");n&&o&&(document.getElementById(n)||console.warn(l))},[l,t,n]),null},Nb=cb,jb=fb,Ef=hb,Cf=mb,Af=gb,_b=vb,kb=xb;const oj=t=>t.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),cj=t=>t.replace(/^([A-Z])|[\s-_]+(\w)/g,(n,a,l)=>l?l.toUpperCase():a.toLowerCase()),Ny=t=>{const n=cj(t);return n.charAt(0).toUpperCase()+n.slice(1)},zb=(...t)=>t.filter((n,a,l)=>!!n&&n.trim()!==""&&l.indexOf(n)===a).join(" ").trim(),uj=t=>{for(const n in t)if(n.startsWith("aria-")||n==="role"||n==="title")return!0};var dj={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const fj=N.forwardRef(({color:t="currentColor",size:n=24,strokeWidth:a=2,absoluteStrokeWidth:l,className:o="",children:c,iconNode:f,...m},g)=>N.createElement("svg",{ref:g,...dj,width:n,height:n,stroke:t,strokeWidth:l?Number(a)*24/Number(n):a,className:zb("lucide",o),...!c&&!uj(m)&&{"aria-hidden":"true"},...m},[...f.map(([p,b])=>N.createElement(p,b)),...Array.isArray(c)?c:[c]]));const Nn=(t,n)=>{const a=N.forwardRef(({className:l,...o},c)=>N.createElement(fj,{ref:c,iconNode:n,className:zb(`lucide-${oj(Ny(t))}`,`lucide-${t}`,l),...o}));return a.displayName=Ny(t),a};const hj=[["path",{d:"m9 18 6-6-6-6",key:"mthhwq"}]],Tf=Nn("chevron-right",hj);const mj=[["path",{d:"M12 15V3",key:"m9g1x1"}],["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["path",{d:"m7 10 5 5 5-5",key:"brsn70"}]],pj=Nn("download",mj);const gj=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20",key:"13o1zl"}],["path",{d:"M2 12h20",key:"9i4pu4"}]],yj=Nn("globe",gj);const vj=[["rect",{width:"7",height:"9",x:"3",y:"3",rx:"1",key:"10lvy0"}],["rect",{width:"7",height:"5",x:"14",y:"3",rx:"1",key:"16une8"}],["rect",{width:"7",height:"9",x:"14",y:"12",rx:"1",key:"1hutg5"}],["rect",{width:"7",height:"5",x:"3",y:"16",rx:"1",key:"ldoo1y"}]],bj=Nn("layout-dashboard",vj);const xj=[["path",{d:"M4 12h16",key:"1lakjw"}],["path",{d:"M4 18h16",key:"19g7jn"}],["path",{d:"M4 6h16",key:"1o0s65"}]],Sj=Nn("menu",xj);const wj=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],Nj=Nn("play",wj);const jj=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],jy=Nn("plus",jj);const _j=[["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09z",key:"m3kijz"}],["path",{d:"m12 15-3-3a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.35 22.35 0 0 1-4 2z",key:"1fmvmk"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 0 5 0",key:"1f8sc4"}],["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}]],kj=Nn("rocket",_j);const zj=[["path",{d:"M9.671 4.136a2.34 2.34 0 0 1 4.659 0 2.34 2.34 0 0 0 3.319 1.915 2.34 2.34 0 0 1 2.33 4.033 2.34 2.34 0 0 0 0 3.831 2.34 2.34 0 0 1-2.33 4.033 2.34 2.34 0 0 0-3.319 1.915 2.34 2.34 0 0 1-4.659 0 2.34 2.34 0 0 0-3.32-1.915 2.34 2.34 0 0 1-2.33-4.033 2.34 2.34 0 0 0 0-3.831A2.34 2.34 0 0 1 6.35 6.051a2.34 2.34 0 0 0 3.319-1.915",key:"1i5ecw"}],["circle",{cx:"12",cy:"12",r:"3",key:"1v7zrd"}]],Ej=Nn("settings",zj);const Cj=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],Aj=Nn("trash-2",Cj);const Tj=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],Of=Nn("x",Tj);function Q(t,n,a){function l(m,g){if(m._zod||Object.defineProperty(m,"_zod",{value:{def:g,constr:f,traits:new Set},enumerable:!1}),m._zod.traits.has(t))return;m._zod.traits.add(t),n(m,g);const p=f.prototype,b=Object.keys(p);for(let v=0;v<b.length;v++){const x=b[v];x in m||(m[x]=p[x].bind(m))}}const o=a?.Parent??Object;class c extends o{}Object.defineProperty(c,"name",{value:t});function f(m){var g;const p=a?.Parent?new c:this;l(p,m),(g=p._zod).deferred??(g.deferred=[]);for(const b of p._zod.deferred)b();return p}return Object.defineProperty(f,"init",{value:l}),Object.defineProperty(f,Symbol.hasInstance,{value:m=>a?.Parent&&m instanceof a.Parent?!0:m?._zod?.traits?.has(t)}),Object.defineProperty(f,"name",{value:t}),f}class hs extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}class Eb extends Error{constructor(n){super(`Encountered unidirectional transform during encode: ${n}`),this.name="ZodEncodeError"}}const Cb={};function Mi(t){return Cb}function Ab(t){const n=Object.values(t).filter(l=>typeof l=="number");return Object.entries(t).filter(([l,o])=>n.indexOf(+l)===-1).map(([l,o])=>o)}function Fd(t,n){return typeof n=="bigint"?n.toString():n}function Df(t){return{get value(){{const n=t();return Object.defineProperty(this,"value",{value:n}),n}}}}function Rf(t){return t==null}function Mf(t){const n=t.startsWith("^")?1:0,a=t.endsWith("$")?t.length-1:t.length;return t.slice(n,a)}function Oj(t,n){const a=(t.toString().split(".")[1]||"").length,l=n.toString();let o=(l.split(".")[1]||"").length;if(o===0&&/\d?e-\d?/.test(l)){const g=l.match(/\d?e-(\d?)/);g?.[1]&&(o=Number.parseInt(g[1]))}const c=a>o?a:o,f=Number.parseInt(t.toFixed(c).replace(".","")),m=Number.parseInt(n.toFixed(c).replace(".",""));return f%m/10**c}const _y=Symbol("evaluating");function Ue(t,n,a){let l;Object.defineProperty(t,n,{get(){if(l!==_y)return l===void 0&&(l=_y,l=a()),l},set(o){Object.defineProperty(t,n,{value:o})},configurable:!0})}function fa(t,n,a){Object.defineProperty(t,n,{value:a,writable:!0,enumerable:!0,configurable:!0})}function Ui(...t){const n={};for(const a of t){const l=Object.getOwnPropertyDescriptors(a);Object.assign(n,l)}return Object.defineProperties({},n)}function ky(t){return JSON.stringify(t)}function Dj(t){return t.toLowerCase().trim().replace(/[^\w\s-]/g,"").replace(/[\s_-]+/g,"-").replace(/^-+|-+$/g,"")}const Tb="captureStackTrace"in Error?Error.captureStackTrace:(...t)=>{};function ko(t){return typeof t=="object"&&t!==null&&!Array.isArray(t)}const Rj=Df(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{const t=Function;return new t(""),!0}catch{return!1}});function ys(t){if(ko(t)===!1)return!1;const n=t.constructor;if(n===void 0||typeof n!="function")return!0;const a=n.prototype;return!(ko(a)===!1||Object.prototype.hasOwnProperty.call(a,"isPrototypeOf")===!1)}function Ob(t){return ys(t)?{...t}:Array.isArray(t)?[...t]:t}const Mj=new Set(["string","number","symbol"]);function vs(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function $i(t,n,a){const l=new t._zod.constr(n??t._zod.def);return(!n||a?.parent)&&(l._zod.parent=t),l}function ge(t){const n=t;if(!n)return{};if(typeof n=="string")return{error:()=>n};if(n?.message!==void 0){if(n?.error!==void 0)throw new Error("Cannot specify both `message` and `error` params");n.error=n.message}return delete n.message,typeof n.error=="string"?{...n,error:()=>n.error}:n}function Lj(t){return Object.keys(t).filter(n=>t[n]._zod.optin==="optional"&&t[n]._zod.optout==="optional")}const Uj={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]};function $j(t,n){const a=t._zod.def,l=a.checks;if(l&&l.length>0)throw new Error(".pick() cannot be used on object schemas containing refinements");const c=Ui(t._zod.def,{get shape(){const f={};for(const m in n){if(!(m in a.shape))throw new Error(`Unrecognized key: "${m}"`);n[m]&&(f[m]=a.shape[m])}return fa(this,"shape",f),f},checks:[]});return $i(t,c)}function Bj(t,n){const a=t._zod.def,l=a.checks;if(l&&l.length>0)throw new Error(".omit() cannot be used on object schemas containing refinements");const c=Ui(t._zod.def,{get shape(){const f={...t._zod.def.shape};for(const m in n){if(!(m in a.shape))throw new Error(`Unrecognized key: "${m}"`);n[m]&&delete f[m]}return fa(this,"shape",f),f},checks:[]});return $i(t,c)}function Zj(t,n){if(!ys(n))throw new Error("Invalid input to extend: expected a plain object");const a=t._zod.def.checks;if(a&&a.length>0){const c=t._zod.def.shape;for(const f in n)if(Object.getOwnPropertyDescriptor(c,f)!==void 0)throw new Error("Cannot overwrite keys on object schemas containing refinements. Use `.safeExtend()` instead.")}const o=Ui(t._zod.def,{get shape(){const c={...t._zod.def.shape,...n};return fa(this,"shape",c),c}});return $i(t,o)}function qj(t,n){if(!ys(n))throw new Error("Invalid input to safeExtend: expected a plain object");const a=Ui(t._zod.def,{get shape(){const l={...t._zod.def.shape,...n};return fa(this,"shape",l),l}});return $i(t,a)}function Hj(t,n){const a=Ui(t._zod.def,{get shape(){const l={...t._zod.def.shape,...n._zod.def.shape};return fa(this,"shape",l),l},get catchall(){return n._zod.def.catchall},checks:[]});return $i(t,a)}function Ij(t,n,a){const o=n._zod.def.checks;if(o&&o.length>0)throw new Error(".partial() cannot be used on object schemas containing refinements");const f=Ui(n._zod.def,{get shape(){const m=n._zod.def.shape,g={...m};if(a)for(const p in a){if(!(p in m))throw new Error(`Unrecognized key: "${p}"`);a[p]&&(g[p]=t?new t({type:"optional",innerType:m[p]}):m[p])}else for(const p in m)g[p]=t?new t({type:"optional",innerType:m[p]}):m[p];return fa(this,"shape",g),g},checks:[]});return $i(n,f)}function Kj(t,n,a){const l=Ui(n._zod.def,{get shape(){const o=n._zod.def.shape,c={...o};if(a)for(const f in a){if(!(f in c))throw new Error(`Unrecognized key: "${f}"`);a[f]&&(c[f]=new t({type:"nonoptional",innerType:o[f]}))}else for(const f in o)c[f]=new t({type:"nonoptional",innerType:o[f]});return fa(this,"shape",c),c}});return $i(n,l)}function os(t,n=0){if(t.aborted===!0)return!0;for(let a=n;a<t.issues.length;a++)if(t.issues[a]?.continue!==!0)return!0;return!1}function cs(t,n){return n.map(a=>{var l;return(l=a).path??(l.path=[]),a.path.unshift(t),a})}function fo(t){return typeof t=="string"?t:t?.message}function Li(t,n,a){const l={...t,path:t.path??[]};if(!t.message){const o=fo(t.inst?._zod.def?.error?.(t))??fo(n?.error?.(t))??fo(a.customError?.(t))??fo(a.localeError?.(t))??"Invalid input";l.message=o}return delete l.inst,delete l.continue,n?.reportInput||delete l.input,l}function Lf(t){return Array.isArray(t)?"array":typeof t=="string"?"string":"unknown"}function Cl(...t){const[n,a,l]=t;return typeof n=="string"?{message:n,code:"custom",input:a,inst:l}:{...n}}const Db=(t,n)=>{t.name="$ZodError",Object.defineProperty(t,"_zod",{value:t._zod,enumerable:!1}),Object.defineProperty(t,"issues",{value:n,enumerable:!1}),t.message=JSON.stringify(n,Fd,2),Object.defineProperty(t,"toString",{value:()=>t.message,enumerable:!1})},Rb=Q("$ZodError",Db),Mb=Q("$ZodError",Db,{Parent:Error});function Gj(t,n=a=>a.message){const a={},l=[];for(const o of t.issues)o.path.length>0?(a[o.path[0]]=a[o.path[0]]||[],a[o.path[0]].push(n(o))):l.push(n(o));return{formErrors:l,fieldErrors:a}}function Yj(t,n=a=>a.message){const a={_errors:[]},l=o=>{for(const c of o.issues)if(c.code==="invalid_union"&&c.errors.length)c.errors.map(f=>l({issues:f}));else if(c.code==="invalid_key")l({issues:c.issues});else if(c.code==="invalid_element")l({issues:c.issues});else if(c.path.length===0)a._errors.push(n(c));else{let f=a,m=0;for(;m<c.path.length;){const g=c.path[m];m===c.path.length-1?(f[g]=f[g]||{_errors:[]},f[g]._errors.push(n(c))):f[g]=f[g]||{_errors:[]},f=f[g],m++}}};return l(t),a}const Uf=t=>(n,a,l,o)=>{const c=l?Object.assign(l,{async:!1}):{async:!1},f=n._zod.run({value:a,issues:[]},c);if(f instanceof Promise)throw new hs;if(f.issues.length){const m=new(o?.Err??t)(f.issues.map(g=>Li(g,c,Mi())));throw Tb(m,o?.callee),m}return f.value},$f=t=>async(n,a,l,o)=>{const c=l?Object.assign(l,{async:!0}):{async:!0};let f=n._zod.run({value:a,issues:[]},c);if(f instanceof Promise&&(f=await f),f.issues.length){const m=new(o?.Err??t)(f.issues.map(g=>Li(g,c,Mi())));throw Tb(m,o?.callee),m}return f.value},Qo=t=>(n,a,l)=>{const o=l?{...l,async:!1}:{async:!1},c=n._zod.run({value:a,issues:[]},o);if(c instanceof Promise)throw new hs;return c.issues.length?{success:!1,error:new(t??Rb)(c.issues.map(f=>Li(f,o,Mi())))}:{success:!0,data:c.value}},Vj=Qo(Mb),Xo=t=>async(n,a,l)=>{const o=l?Object.assign(l,{async:!0}):{async:!0};let c=n._zod.run({value:a,issues:[]},o);return c instanceof Promise&&(c=await c),c.issues.length?{success:!1,error:new t(c.issues.map(f=>Li(f,o,Mi())))}:{success:!0,data:c.value}},Pj=Xo(Mb),Qj=t=>(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Uf(t)(n,a,o)},Xj=t=>(n,a,l)=>Uf(t)(n,a,l),Jj=t=>async(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return $f(t)(n,a,o)},Fj=t=>async(n,a,l)=>$f(t)(n,a,l),Wj=t=>(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Qo(t)(n,a,o)},e_=t=>(n,a,l)=>Qo(t)(n,a,l),t_=t=>async(n,a,l)=>{const o=l?Object.assign(l,{direction:"backward"}):{direction:"backward"};return Xo(t)(n,a,o)},n_=t=>async(n,a,l)=>Xo(t)(n,a,l),i_=/^[cC][^\s-]{8,}$/,a_=/^[0-9a-z]+$/,s_=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,l_=/^[0-9a-vA-V]{20}$/,r_=/^[A-Za-z0-9]{27}$/,o_=/^[a-zA-Z0-9_-]{21}$/,c_=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,u_=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,zy=t=>t?new RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${t}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,d_=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,f_="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function h_(){return new RegExp(f_,"u")}const m_=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,p_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,g_=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,y_=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,v_=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,Lb=/^[A-Za-z0-9_-]*$/,b_=/^\+[1-9]\d{6,14}$/,Ub="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",x_=new RegExp(`^${Ub}$`);function $b(t){const n="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof t.precision=="number"?t.precision===-1?`${n}`:t.precision===0?`${n}:[0-5]\\d`:`${n}:[0-5]\\d\\.\\d{${t.precision}}`:`${n}(?::[0-5]\\d(?:\\.\\d+)?)?`}function S_(t){return new RegExp(`^${$b(t)}$`)}function w_(t){const n=$b({precision:t.precision}),a=["Z"];t.local&&a.push(""),t.offset&&a.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");const l=`${n}(?:${a.join("|")})`;return new RegExp(`^${Ub}T(?:${l})$`)}const N_=t=>{const n=t?`[\\s\\S]{${t?.minimum??0},${t?.maximum??""}}`:"[\\s\\S]*";return new RegExp(`^${n}$`)},j_=/^-?\d+$/,Bb=/^-?\d+(?:\.\d+)?$/,__=/^(?:true|false)$/i,k_=/^[^A-Z]*$/,z_=/^[^a-z]*$/,Bt=Q("$ZodCheck",(t,n)=>{var a;t._zod??(t._zod={}),t._zod.def=n,(a=t._zod).onattach??(a.onattach=[])}),Zb={number:"number",bigint:"bigint",object:"date"},qb=Q("$ZodCheckLessThan",(t,n)=>{Bt.init(t,n);const a=Zb[typeof n.value];t._zod.onattach.push(l=>{const o=l._zod.bag,c=(n.inclusive?o.maximum:o.exclusiveMaximum)??Number.POSITIVE_INFINITY;n.value<c&&(n.inclusive?o.maximum=n.value:o.exclusiveMaximum=n.value)}),t._zod.check=l=>{(n.inclusive?l.value<=n.value:l.value<n.value)||l.issues.push({origin:a,code:"too_big",maximum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:t,continue:!n.abort})}}),Hb=Q("$ZodCheckGreaterThan",(t,n)=>{Bt.init(t,n);const a=Zb[typeof n.value];t._zod.onattach.push(l=>{const o=l._zod.bag,c=(n.inclusive?o.minimum:o.exclusiveMinimum)??Number.NEGATIVE_INFINITY;n.value>c&&(n.inclusive?o.minimum=n.value:o.exclusiveMinimum=n.value)}),t._zod.check=l=>{(n.inclusive?l.value>=n.value:l.value>n.value)||l.issues.push({origin:a,code:"too_small",minimum:typeof n.value=="object"?n.value.getTime():n.value,input:l.value,inclusive:n.inclusive,inst:t,continue:!n.abort})}}),E_=Q("$ZodCheckMultipleOf",(t,n)=>{Bt.init(t,n),t._zod.onattach.push(a=>{var l;(l=a._zod.bag).multipleOf??(l.multipleOf=n.value)}),t._zod.check=a=>{if(typeof a.value!=typeof n.value)throw new Error("Cannot mix number and bigint in multiple_of check.");(typeof a.value=="bigint"?a.value%n.value===BigInt(0):Oj(a.value,n.value)===0)||a.issues.push({origin:typeof a.value,code:"not_multiple_of",divisor:n.value,input:a.value,inst:t,continue:!n.abort})}}),C_=Q("$ZodCheckNumberFormat",(t,n)=>{Bt.init(t,n),n.format=n.format||"float64";const a=n.format?.includes("int"),l=a?"int":"number",[o,c]=Uj[n.format];t._zod.onattach.push(f=>{const m=f._zod.bag;m.format=n.format,m.minimum=o,m.maximum=c,a&&(m.pattern=j_)}),t._zod.check=f=>{const m=f.value;if(a){if(!Number.isInteger(m)){f.issues.push({expected:l,format:n.format,code:"invalid_type",continue:!1,input:m,inst:t});return}if(!Number.isSafeInteger(m)){m>0?f.issues.push({input:m,code:"too_big",maximum:Number.MAX_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,inclusive:!0,continue:!n.abort}):f.issues.push({input:m,code:"too_small",minimum:Number.MIN_SAFE_INTEGER,note:"Integers must be within the safe integer range.",inst:t,origin:l,inclusive:!0,continue:!n.abort});return}}m<o&&f.issues.push({origin:"number",input:m,code:"too_small",minimum:o,inclusive:!0,inst:t,continue:!n.abort}),m>c&&f.issues.push({origin:"number",input:m,code:"too_big",maximum:c,inclusive:!0,inst:t,continue:!n.abort})}}),A_=Q("$ZodCheckMaxLength",(t,n)=>{var a;Bt.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!Rf(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag.maximum??Number.POSITIVE_INFINITY;n.maximum<o&&(l._zod.bag.maximum=n.maximum)}),t._zod.check=l=>{const o=l.value;if(o.length<=n.maximum)return;const f=Lf(o);l.issues.push({origin:f,code:"too_big",maximum:n.maximum,inclusive:!0,input:o,inst:t,continue:!n.abort})}}),T_=Q("$ZodCheckMinLength",(t,n)=>{var a;Bt.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!Rf(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag.minimum??Number.NEGATIVE_INFINITY;n.minimum>o&&(l._zod.bag.minimum=n.minimum)}),t._zod.check=l=>{const o=l.value;if(o.length>=n.minimum)return;const f=Lf(o);l.issues.push({origin:f,code:"too_small",minimum:n.minimum,inclusive:!0,input:o,inst:t,continue:!n.abort})}}),O_=Q("$ZodCheckLengthEquals",(t,n)=>{var a;Bt.init(t,n),(a=t._zod.def).when??(a.when=l=>{const o=l.value;return!Rf(o)&&o.length!==void 0}),t._zod.onattach.push(l=>{const o=l._zod.bag;o.minimum=n.length,o.maximum=n.length,o.length=n.length}),t._zod.check=l=>{const o=l.value,c=o.length;if(c===n.length)return;const f=Lf(o),m=c>n.length;l.issues.push({origin:f,...m?{code:"too_big",maximum:n.length}:{code:"too_small",minimum:n.length},inclusive:!0,exact:!0,input:l.value,inst:t,continue:!n.abort})}}),Jo=Q("$ZodCheckStringFormat",(t,n)=>{var a,l;Bt.init(t,n),t._zod.onattach.push(o=>{const c=o._zod.bag;c.format=n.format,n.pattern&&(c.patterns??(c.patterns=new Set),c.patterns.add(n.pattern))}),n.pattern?(a=t._zod).check??(a.check=o=>{n.pattern.lastIndex=0,!n.pattern.test(o.value)&&o.issues.push({origin:"string",code:"invalid_format",format:n.format,input:o.value,...n.pattern?{pattern:n.pattern.toString()}:{},inst:t,continue:!n.abort})}):(l=t._zod).check??(l.check=()=>{})}),D_=Q("$ZodCheckRegex",(t,n)=>{Jo.init(t,n),t._zod.check=a=>{n.pattern.lastIndex=0,!n.pattern.test(a.value)&&a.issues.push({origin:"string",code:"invalid_format",format:"regex",input:a.value,pattern:n.pattern.toString(),inst:t,continue:!n.abort})}}),R_=Q("$ZodCheckLowerCase",(t,n)=>{n.pattern??(n.pattern=k_),Jo.init(t,n)}),M_=Q("$ZodCheckUpperCase",(t,n)=>{n.pattern??(n.pattern=z_),Jo.init(t,n)}),L_=Q("$ZodCheckIncludes",(t,n)=>{Bt.init(t,n);const a=vs(n.includes),l=new RegExp(typeof n.position=="number"?`^.{${n.position}}${a}`:a);n.pattern=l,t._zod.onattach.push(o=>{const c=o._zod.bag;c.patterns??(c.patterns=new Set),c.patterns.add(l)}),t._zod.check=o=>{o.value.includes(n.includes,n.position)||o.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:n.includes,input:o.value,inst:t,continue:!n.abort})}}),U_=Q("$ZodCheckStartsWith",(t,n)=>{Bt.init(t,n);const a=new RegExp(`^${vs(n.prefix)}.*`);n.pattern??(n.pattern=a),t._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),t._zod.check=l=>{l.value.startsWith(n.prefix)||l.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:n.prefix,input:l.value,inst:t,continue:!n.abort})}}),$_=Q("$ZodCheckEndsWith",(t,n)=>{Bt.init(t,n);const a=new RegExp(`.*${vs(n.suffix)}$`);n.pattern??(n.pattern=a),t._zod.onattach.push(l=>{const o=l._zod.bag;o.patterns??(o.patterns=new Set),o.patterns.add(a)}),t._zod.check=l=>{l.value.endsWith(n.suffix)||l.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:n.suffix,input:l.value,inst:t,continue:!n.abort})}}),B_=Q("$ZodCheckOverwrite",(t,n)=>{Bt.init(t,n),t._zod.check=a=>{a.value=n.tx(a.value)}});class Z_{constructor(n=[]){this.content=[],this.indent=0,this&&(this.args=n)}indented(n){this.indent+=1,n(this),this.indent-=1}write(n){if(typeof n=="function"){n(this,{execution:"sync"}),n(this,{execution:"async"});return}const l=n.split(`
184
+ `).filter(f=>f),o=Math.min(...l.map(f=>f.length-f.trimStart().length)),c=l.map(f=>f.slice(o)).map(f=>" ".repeat(this.indent*2)+f);for(const f of c)this.content.push(f)}compile(){const n=Function,a=this?.args,o=[...(this?.content??[""]).map(c=>` ${c}`)];return new n(...a,o.join(`
185
+ `))}}const q_={major:4,minor:3,patch:6},Qe=Q("$ZodType",(t,n)=>{var a;t??(t={}),t._zod.def=n,t._zod.bag=t._zod.bag||{},t._zod.version=q_;const l=[...t._zod.def.checks??[]];t._zod.traits.has("$ZodCheck")&&l.unshift(t);for(const o of l)for(const c of o._zod.onattach)c(t);if(l.length===0)(a=t._zod).deferred??(a.deferred=[]),t._zod.deferred?.push(()=>{t._zod.run=t._zod.parse});else{const o=(f,m,g)=>{let p=os(f),b;for(const v of m){if(v._zod.def.when){if(!v._zod.def.when(f))continue}else if(p)continue;const x=f.issues.length,j=v._zod.check(f);if(j instanceof Promise&&g?.async===!1)throw new hs;if(b||j instanceof Promise)b=(b??Promise.resolve()).then(async()=>{await j,f.issues.length!==x&&(p||(p=os(f,x)))});else{if(f.issues.length===x)continue;p||(p=os(f,x))}}return b?b.then(()=>f):f},c=(f,m,g)=>{if(os(f))return f.aborted=!0,f;const p=o(m,l,g);if(p instanceof Promise){if(g.async===!1)throw new hs;return p.then(b=>t._zod.parse(b,g))}return t._zod.parse(p,g)};t._zod.run=(f,m)=>{if(m.skipChecks)return t._zod.parse(f,m);if(m.direction==="backward"){const p=t._zod.parse({value:f.value,issues:[]},{...m,skipChecks:!0});return p instanceof Promise?p.then(b=>c(b,f,m)):c(p,f,m)}const g=t._zod.parse(f,m);if(g instanceof Promise){if(m.async===!1)throw new hs;return g.then(p=>o(p,l,m))}return o(g,l,m)}}Ue(t,"~standard",()=>({validate:o=>{try{const c=Vj(t,o);return c.success?{value:c.data}:{issues:c.error?.issues}}catch{return Pj(t,o).then(f=>f.success?{value:f.data}:{issues:f.error?.issues})}},vendor:"zod",version:1}))}),Bf=Q("$ZodString",(t,n)=>{Qe.init(t,n),t._zod.pattern=[...t?._zod.bag?.patterns??[]].pop()??N_(t._zod.bag),t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=String(a.value)}catch{}return typeof a.value=="string"||a.issues.push({expected:"string",code:"invalid_type",input:a.value,inst:t}),a}}),Pe=Q("$ZodStringFormat",(t,n)=>{Jo.init(t,n),Bf.init(t,n)}),H_=Q("$ZodGUID",(t,n)=>{n.pattern??(n.pattern=u_),Pe.init(t,n)}),I_=Q("$ZodUUID",(t,n)=>{if(n.version){const l={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[n.version];if(l===void 0)throw new Error(`Invalid UUID version: "${n.version}"`);n.pattern??(n.pattern=zy(l))}else n.pattern??(n.pattern=zy());Pe.init(t,n)}),K_=Q("$ZodEmail",(t,n)=>{n.pattern??(n.pattern=d_),Pe.init(t,n)}),G_=Q("$ZodURL",(t,n)=>{Pe.init(t,n),t._zod.check=a=>{try{const l=a.value.trim(),o=new URL(l);n.hostname&&(n.hostname.lastIndex=0,n.hostname.test(o.hostname)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:n.hostname.source,input:a.value,inst:t,continue:!n.abort})),n.protocol&&(n.protocol.lastIndex=0,n.protocol.test(o.protocol.endsWith(":")?o.protocol.slice(0,-1):o.protocol)||a.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:n.protocol.source,input:a.value,inst:t,continue:!n.abort})),n.normalize?a.value=o.href:a.value=l;return}catch{a.issues.push({code:"invalid_format",format:"url",input:a.value,inst:t,continue:!n.abort})}}}),Y_=Q("$ZodEmoji",(t,n)=>{n.pattern??(n.pattern=h_()),Pe.init(t,n)}),V_=Q("$ZodNanoID",(t,n)=>{n.pattern??(n.pattern=o_),Pe.init(t,n)}),P_=Q("$ZodCUID",(t,n)=>{n.pattern??(n.pattern=i_),Pe.init(t,n)}),Q_=Q("$ZodCUID2",(t,n)=>{n.pattern??(n.pattern=a_),Pe.init(t,n)}),X_=Q("$ZodULID",(t,n)=>{n.pattern??(n.pattern=s_),Pe.init(t,n)}),J_=Q("$ZodXID",(t,n)=>{n.pattern??(n.pattern=l_),Pe.init(t,n)}),F_=Q("$ZodKSUID",(t,n)=>{n.pattern??(n.pattern=r_),Pe.init(t,n)}),W_=Q("$ZodISODateTime",(t,n)=>{n.pattern??(n.pattern=w_(n)),Pe.init(t,n)}),ek=Q("$ZodISODate",(t,n)=>{n.pattern??(n.pattern=x_),Pe.init(t,n)}),tk=Q("$ZodISOTime",(t,n)=>{n.pattern??(n.pattern=S_(n)),Pe.init(t,n)}),nk=Q("$ZodISODuration",(t,n)=>{n.pattern??(n.pattern=c_),Pe.init(t,n)}),ik=Q("$ZodIPv4",(t,n)=>{n.pattern??(n.pattern=m_),Pe.init(t,n),t._zod.bag.format="ipv4"}),ak=Q("$ZodIPv6",(t,n)=>{n.pattern??(n.pattern=p_),Pe.init(t,n),t._zod.bag.format="ipv6",t._zod.check=a=>{try{new URL(`http://[${a.value}]`)}catch{a.issues.push({code:"invalid_format",format:"ipv6",input:a.value,inst:t,continue:!n.abort})}}}),sk=Q("$ZodCIDRv4",(t,n)=>{n.pattern??(n.pattern=g_),Pe.init(t,n)}),lk=Q("$ZodCIDRv6",(t,n)=>{n.pattern??(n.pattern=y_),Pe.init(t,n),t._zod.check=a=>{const l=a.value.split("/");try{if(l.length!==2)throw new Error;const[o,c]=l;if(!c)throw new Error;const f=Number(c);if(`${f}`!==c)throw new Error;if(f<0||f>128)throw new Error;new URL(`http://[${o}]`)}catch{a.issues.push({code:"invalid_format",format:"cidrv6",input:a.value,inst:t,continue:!n.abort})}}});function Ib(t){if(t==="")return!0;if(t.length%4!==0)return!1;try{return atob(t),!0}catch{return!1}}const rk=Q("$ZodBase64",(t,n)=>{n.pattern??(n.pattern=v_),Pe.init(t,n),t._zod.bag.contentEncoding="base64",t._zod.check=a=>{Ib(a.value)||a.issues.push({code:"invalid_format",format:"base64",input:a.value,inst:t,continue:!n.abort})}});function ok(t){if(!Lb.test(t))return!1;const n=t.replace(/[-_]/g,l=>l==="-"?"+":"/"),a=n.padEnd(Math.ceil(n.length/4)*4,"=");return Ib(a)}const ck=Q("$ZodBase64URL",(t,n)=>{n.pattern??(n.pattern=Lb),Pe.init(t,n),t._zod.bag.contentEncoding="base64url",t._zod.check=a=>{ok(a.value)||a.issues.push({code:"invalid_format",format:"base64url",input:a.value,inst:t,continue:!n.abort})}}),uk=Q("$ZodE164",(t,n)=>{n.pattern??(n.pattern=b_),Pe.init(t,n)});function dk(t,n=null){try{const a=t.split(".");if(a.length!==3)return!1;const[l]=a;if(!l)return!1;const o=JSON.parse(atob(l));return!("typ"in o&&o?.typ!=="JWT"||!o.alg||n&&(!("alg"in o)||o.alg!==n))}catch{return!1}}const fk=Q("$ZodJWT",(t,n)=>{Pe.init(t,n),t._zod.check=a=>{dk(a.value,n.alg)||a.issues.push({code:"invalid_format",format:"jwt",input:a.value,inst:t,continue:!n.abort})}}),Kb=Q("$ZodNumber",(t,n)=>{Qe.init(t,n),t._zod.pattern=t._zod.bag.pattern??Bb,t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=Number(a.value)}catch{}const o=a.value;if(typeof o=="number"&&!Number.isNaN(o)&&Number.isFinite(o))return a;const c=typeof o=="number"?Number.isNaN(o)?"NaN":Number.isFinite(o)?void 0:"Infinity":void 0;return a.issues.push({expected:"number",code:"invalid_type",input:o,inst:t,...c?{received:c}:{}}),a}}),hk=Q("$ZodNumberFormat",(t,n)=>{C_.init(t,n),Kb.init(t,n)}),mk=Q("$ZodBoolean",(t,n)=>{Qe.init(t,n),t._zod.pattern=__,t._zod.parse=(a,l)=>{if(n.coerce)try{a.value=!!a.value}catch{}const o=a.value;return typeof o=="boolean"||a.issues.push({expected:"boolean",code:"invalid_type",input:o,inst:t}),a}}),pk=Q("$ZodUnknown",(t,n)=>{Qe.init(t,n),t._zod.parse=a=>a}),gk=Q("$ZodNever",(t,n)=>{Qe.init(t,n),t._zod.parse=(a,l)=>(a.issues.push({expected:"never",code:"invalid_type",input:a.value,inst:t}),a)});function Ey(t,n,a){t.issues.length&&n.issues.push(...cs(a,t.issues)),n.value[a]=t.value}const yk=Q("$ZodArray",(t,n)=>{Qe.init(t,n),t._zod.parse=(a,l)=>{const o=a.value;if(!Array.isArray(o))return a.issues.push({expected:"array",code:"invalid_type",input:o,inst:t}),a;a.value=Array(o.length);const c=[];for(let f=0;f<o.length;f++){const m=o[f],g=n.element._zod.run({value:m,issues:[]},l);g instanceof Promise?c.push(g.then(p=>Ey(p,a,f))):Ey(g,a,f)}return c.length?Promise.all(c).then(()=>a):a}});function zo(t,n,a,l,o){if(t.issues.length){if(o&&!(a in l))return;n.issues.push(...cs(a,t.issues))}t.value===void 0?a in l&&(n.value[a]=void 0):n.value[a]=t.value}function Gb(t){const n=Object.keys(t.shape);for(const l of n)if(!t.shape?.[l]?._zod?.traits?.has("$ZodType"))throw new Error(`Invalid element at key "${l}": expected a Zod schema`);const a=Lj(t.shape);return{...t,keys:n,keySet:new Set(n),numKeys:n.length,optionalKeys:new Set(a)}}function Yb(t,n,a,l,o,c){const f=[],m=o.keySet,g=o.catchall._zod,p=g.def.type,b=g.optout==="optional";for(const v in n){if(m.has(v))continue;if(p==="never"){f.push(v);continue}const x=g.run({value:n[v],issues:[]},l);x instanceof Promise?t.push(x.then(j=>zo(j,a,v,n,b))):zo(x,a,v,n,b)}return f.length&&a.issues.push({code:"unrecognized_keys",keys:f,input:n,inst:c}),t.length?Promise.all(t).then(()=>a):a}const vk=Q("$ZodObject",(t,n)=>{if(Qe.init(t,n),!Object.getOwnPropertyDescriptor(n,"shape")?.get){const m=n.shape;Object.defineProperty(n,"shape",{get:()=>{const g={...m};return Object.defineProperty(n,"shape",{value:g}),g}})}const l=Df(()=>Gb(n));Ue(t._zod,"propValues",()=>{const m=n.shape,g={};for(const p in m){const b=m[p]._zod;if(b.values){g[p]??(g[p]=new Set);for(const v of b.values)g[p].add(v)}}return g});const o=ko,c=n.catchall;let f;t._zod.parse=(m,g)=>{f??(f=l.value);const p=m.value;if(!o(p))return m.issues.push({expected:"object",code:"invalid_type",input:p,inst:t}),m;m.value={};const b=[],v=f.shape;for(const x of f.keys){const j=v[x],z=j._zod.optout==="optional",w=j._zod.run({value:p[x],issues:[]},g);w instanceof Promise?b.push(w.then(_=>zo(_,m,x,p,z))):zo(w,m,x,p,z)}return c?Yb(b,p,m,g,l.value,t):b.length?Promise.all(b).then(()=>m):m}}),bk=Q("$ZodObjectJIT",(t,n)=>{vk.init(t,n);const a=t._zod.parse,l=Df(()=>Gb(n)),o=x=>{const j=new Z_(["shape","payload","ctx"]),z=l.value,w=T=>{const D=ky(T);return`shape[${D}]._zod.run({ value: input[${D}], issues: [] }, ctx)`};j.write("const input = payload.value;");const _=Object.create(null);let E=0;for(const T of z.keys)_[T]=`key_${E++}`;j.write("const newResult = {};");for(const T of z.keys){const D=_[T],L=ky(T),G=x[T]?._zod?.optout==="optional";j.write(`const ${D} = ${w(T)};`),G?j.write(`
186
+ if (${D}.issues.length) {
187
+ if (${L} in input) {
188
+ payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
189
+ ...iss,
190
+ path: iss.path ? [${L}, ...iss.path] : [${L}]
191
+ })));
192
+ }
193
+ }
194
+
195
+ if (${D}.value === undefined) {
196
+ if (${L} in input) {
197
+ newResult[${L}] = undefined;
198
+ }
199
+ } else {
200
+ newResult[${L}] = ${D}.value;
201
+ }
202
+
203
+ `):j.write(`
204
+ if (${D}.issues.length) {
205
+ payload.issues = payload.issues.concat(${D}.issues.map(iss => ({
206
+ ...iss,
207
+ path: iss.path ? [${L}, ...iss.path] : [${L}]
208
+ })));
209
+ }
210
+
211
+ if (${D}.value === undefined) {
212
+ if (${L} in input) {
213
+ newResult[${L}] = undefined;
214
+ }
215
+ } else {
216
+ newResult[${L}] = ${D}.value;
217
+ }
218
+
219
+ `)}j.write("payload.value = newResult;"),j.write("return payload;");const O=j.compile();return(T,D)=>O(x,T,D)};let c;const f=ko,m=!Cb.jitless,p=m&&Rj.value,b=n.catchall;let v;t._zod.parse=(x,j)=>{v??(v=l.value);const z=x.value;return f(z)?m&&p&&j?.async===!1&&j.jitless!==!0?(c||(c=o(n.shape)),x=c(x,j),b?Yb([],z,x,j,v,t):x):a(x,j):(x.issues.push({expected:"object",code:"invalid_type",input:z,inst:t}),x)}});function Cy(t,n,a,l){for(const c of t)if(c.issues.length===0)return n.value=c.value,n;const o=t.filter(c=>!os(c));return o.length===1?(n.value=o[0].value,o[0]):(n.issues.push({code:"invalid_union",input:n.value,inst:a,errors:t.map(c=>c.issues.map(f=>Li(f,l,Mi())))}),n)}const xk=Q("$ZodUnion",(t,n)=>{Qe.init(t,n),Ue(t._zod,"optin",()=>n.options.some(o=>o._zod.optin==="optional")?"optional":void 0),Ue(t._zod,"optout",()=>n.options.some(o=>o._zod.optout==="optional")?"optional":void 0),Ue(t._zod,"values",()=>{if(n.options.every(o=>o._zod.values))return new Set(n.options.flatMap(o=>Array.from(o._zod.values)))}),Ue(t._zod,"pattern",()=>{if(n.options.every(o=>o._zod.pattern)){const o=n.options.map(c=>c._zod.pattern);return new RegExp(`^(${o.map(c=>Mf(c.source)).join("|")})$`)}});const a=n.options.length===1,l=n.options[0]._zod.run;t._zod.parse=(o,c)=>{if(a)return l(o,c);let f=!1;const m=[];for(const g of n.options){const p=g._zod.run({value:o.value,issues:[]},c);if(p instanceof Promise)m.push(p),f=!0;else{if(p.issues.length===0)return p;m.push(p)}}return f?Promise.all(m).then(g=>Cy(g,o,t,c)):Cy(m,o,t,c)}}),Sk=Q("$ZodIntersection",(t,n)=>{Qe.init(t,n),t._zod.parse=(a,l)=>{const o=a.value,c=n.left._zod.run({value:o,issues:[]},l),f=n.right._zod.run({value:o,issues:[]},l);return c instanceof Promise||f instanceof Promise?Promise.all([c,f]).then(([g,p])=>Ay(a,g,p)):Ay(a,c,f)}});function Wd(t,n){if(t===n)return{valid:!0,data:t};if(t instanceof Date&&n instanceof Date&&+t==+n)return{valid:!0,data:t};if(ys(t)&&ys(n)){const a=Object.keys(n),l=Object.keys(t).filter(c=>a.indexOf(c)!==-1),o={...t,...n};for(const c of l){const f=Wd(t[c],n[c]);if(!f.valid)return{valid:!1,mergeErrorPath:[c,...f.mergeErrorPath]};o[c]=f.data}return{valid:!0,data:o}}if(Array.isArray(t)&&Array.isArray(n)){if(t.length!==n.length)return{valid:!1,mergeErrorPath:[]};const a=[];for(let l=0;l<t.length;l++){const o=t[l],c=n[l],f=Wd(o,c);if(!f.valid)return{valid:!1,mergeErrorPath:[l,...f.mergeErrorPath]};a.push(f.data)}return{valid:!0,data:a}}return{valid:!1,mergeErrorPath:[]}}function Ay(t,n,a){const l=new Map;let o;for(const m of n.issues)if(m.code==="unrecognized_keys"){o??(o=m);for(const g of m.keys)l.has(g)||l.set(g,{}),l.get(g).l=!0}else t.issues.push(m);for(const m of a.issues)if(m.code==="unrecognized_keys")for(const g of m.keys)l.has(g)||l.set(g,{}),l.get(g).r=!0;else t.issues.push(m);const c=[...l].filter(([,m])=>m.l&&m.r).map(([m])=>m);if(c.length&&o&&t.issues.push({...o,keys:c}),os(t))return t;const f=Wd(n.value,a.value);if(!f.valid)throw new Error(`Unmergable intersection. Error path: ${JSON.stringify(f.mergeErrorPath)}`);return t.value=f.data,t}const wk=Q("$ZodRecord",(t,n)=>{Qe.init(t,n),t._zod.parse=(a,l)=>{const o=a.value;if(!ys(o))return a.issues.push({expected:"record",code:"invalid_type",input:o,inst:t}),a;const c=[],f=n.keyType._zod.values;if(f){a.value={};const m=new Set;for(const p of f)if(typeof p=="string"||typeof p=="number"||typeof p=="symbol"){m.add(typeof p=="number"?p.toString():p);const b=n.valueType._zod.run({value:o[p],issues:[]},l);b instanceof Promise?c.push(b.then(v=>{v.issues.length&&a.issues.push(...cs(p,v.issues)),a.value[p]=v.value})):(b.issues.length&&a.issues.push(...cs(p,b.issues)),a.value[p]=b.value)}let g;for(const p in o)m.has(p)||(g=g??[],g.push(p));g&&g.length>0&&a.issues.push({code:"unrecognized_keys",input:o,inst:t,keys:g})}else{a.value={};for(const m of Reflect.ownKeys(o)){if(m==="__proto__")continue;let g=n.keyType._zod.run({value:m,issues:[]},l);if(g instanceof Promise)throw new Error("Async schemas not supported in object keys currently");if(typeof m=="string"&&Bb.test(m)&&g.issues.length){const v=n.keyType._zod.run({value:Number(m),issues:[]},l);if(v instanceof Promise)throw new Error("Async schemas not supported in object keys currently");v.issues.length===0&&(g=v)}if(g.issues.length){n.mode==="loose"?a.value[m]=o[m]:a.issues.push({code:"invalid_key",origin:"record",issues:g.issues.map(v=>Li(v,l,Mi())),input:m,path:[m],inst:t});continue}const b=n.valueType._zod.run({value:o[m],issues:[]},l);b instanceof Promise?c.push(b.then(v=>{v.issues.length&&a.issues.push(...cs(m,v.issues)),a.value[g.value]=v.value})):(b.issues.length&&a.issues.push(...cs(m,b.issues)),a.value[g.value]=b.value)}}return c.length?Promise.all(c).then(()=>a):a}}),Nk=Q("$ZodEnum",(t,n)=>{Qe.init(t,n);const a=Ab(n.entries),l=new Set(a);t._zod.values=l,t._zod.pattern=new RegExp(`^(${a.filter(o=>Mj.has(typeof o)).map(o=>typeof o=="string"?vs(o):o.toString()).join("|")})$`),t._zod.parse=(o,c)=>{const f=o.value;return l.has(f)||o.issues.push({code:"invalid_value",values:a,input:f,inst:t}),o}}),jk=Q("$ZodLiteral",(t,n)=>{if(Qe.init(t,n),n.values.length===0)throw new Error("Cannot create literal schema with no valid values");const a=new Set(n.values);t._zod.values=a,t._zod.pattern=new RegExp(`^(${n.values.map(l=>typeof l=="string"?vs(l):l?vs(l.toString()):String(l)).join("|")})$`),t._zod.parse=(l,o)=>{const c=l.value;return a.has(c)||l.issues.push({code:"invalid_value",values:n.values,input:c,inst:t}),l}}),_k=Q("$ZodTransform",(t,n)=>{Qe.init(t,n),t._zod.parse=(a,l)=>{if(l.direction==="backward")throw new Eb(t.constructor.name);const o=n.transform(a.value,a);if(l.async)return(o instanceof Promise?o:Promise.resolve(o)).then(f=>(a.value=f,a));if(o instanceof Promise)throw new hs;return a.value=o,a}});function Ty(t,n){return t.issues.length&&n===void 0?{issues:[],value:void 0}:t}const Vb=Q("$ZodOptional",(t,n)=>{Qe.init(t,n),t._zod.optin="optional",t._zod.optout="optional",Ue(t._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,void 0]):void 0),Ue(t._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${Mf(a.source)})?$`):void 0}),t._zod.parse=(a,l)=>{if(n.innerType._zod.optin==="optional"){const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(c=>Ty(c,a.value)):Ty(o,a.value)}return a.value===void 0?a:n.innerType._zod.run(a,l)}}),kk=Q("$ZodExactOptional",(t,n)=>{Vb.init(t,n),Ue(t._zod,"values",()=>n.innerType._zod.values),Ue(t._zod,"pattern",()=>n.innerType._zod.pattern),t._zod.parse=(a,l)=>n.innerType._zod.run(a,l)}),zk=Q("$ZodNullable",(t,n)=>{Qe.init(t,n),Ue(t._zod,"optin",()=>n.innerType._zod.optin),Ue(t._zod,"optout",()=>n.innerType._zod.optout),Ue(t._zod,"pattern",()=>{const a=n.innerType._zod.pattern;return a?new RegExp(`^(${Mf(a.source)}|null)$`):void 0}),Ue(t._zod,"values",()=>n.innerType._zod.values?new Set([...n.innerType._zod.values,null]):void 0),t._zod.parse=(a,l)=>a.value===null?a:n.innerType._zod.run(a,l)}),Ek=Q("$ZodDefault",(t,n)=>{Qe.init(t,n),t._zod.optin="optional",Ue(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);if(a.value===void 0)return a.value=n.defaultValue,a;const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(c=>Oy(c,n)):Oy(o,n)}});function Oy(t,n){return t.value===void 0&&(t.value=n.defaultValue),t}const Ck=Q("$ZodPrefault",(t,n)=>{Qe.init(t,n),t._zod.optin="optional",Ue(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>(l.direction==="backward"||a.value===void 0&&(a.value=n.defaultValue),n.innerType._zod.run(a,l))}),Ak=Q("$ZodNonOptional",(t,n)=>{Qe.init(t,n),Ue(t._zod,"values",()=>{const a=n.innerType._zod.values;return a?new Set([...a].filter(l=>l!==void 0)):void 0}),t._zod.parse=(a,l)=>{const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(c=>Dy(c,t)):Dy(o,t)}});function Dy(t,n){return!t.issues.length&&t.value===void 0&&t.issues.push({code:"invalid_type",expected:"nonoptional",input:t.value,inst:n}),t}const Tk=Q("$ZodCatch",(t,n)=>{Qe.init(t,n),Ue(t._zod,"optin",()=>n.innerType._zod.optin),Ue(t._zod,"optout",()=>n.innerType._zod.optout),Ue(t._zod,"values",()=>n.innerType._zod.values),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(c=>(a.value=c.value,c.issues.length&&(a.value=n.catchValue({...a,error:{issues:c.issues.map(f=>Li(f,l,Mi()))},input:a.value}),a.issues=[]),a)):(a.value=o.value,o.issues.length&&(a.value=n.catchValue({...a,error:{issues:o.issues.map(c=>Li(c,l,Mi()))},input:a.value}),a.issues=[]),a)}}),Ok=Q("$ZodPipe",(t,n)=>{Qe.init(t,n),Ue(t._zod,"values",()=>n.in._zod.values),Ue(t._zod,"optin",()=>n.in._zod.optin),Ue(t._zod,"optout",()=>n.out._zod.optout),Ue(t._zod,"propValues",()=>n.in._zod.propValues),t._zod.parse=(a,l)=>{if(l.direction==="backward"){const c=n.out._zod.run(a,l);return c instanceof Promise?c.then(f=>ho(f,n.in,l)):ho(c,n.in,l)}const o=n.in._zod.run(a,l);return o instanceof Promise?o.then(c=>ho(c,n.out,l)):ho(o,n.out,l)}});function ho(t,n,a){return t.issues.length?(t.aborted=!0,t):n._zod.run({value:t.value,issues:t.issues},a)}const Dk=Q("$ZodReadonly",(t,n)=>{Qe.init(t,n),Ue(t._zod,"propValues",()=>n.innerType._zod.propValues),Ue(t._zod,"values",()=>n.innerType._zod.values),Ue(t._zod,"optin",()=>n.innerType?._zod?.optin),Ue(t._zod,"optout",()=>n.innerType?._zod?.optout),t._zod.parse=(a,l)=>{if(l.direction==="backward")return n.innerType._zod.run(a,l);const o=n.innerType._zod.run(a,l);return o instanceof Promise?o.then(Ry):Ry(o)}});function Ry(t){return t.value=Object.freeze(t.value),t}const Rk=Q("$ZodCustom",(t,n)=>{Bt.init(t,n),Qe.init(t,n),t._zod.parse=(a,l)=>a,t._zod.check=a=>{const l=a.value,o=n.fn(l);if(o instanceof Promise)return o.then(c=>My(c,a,l,t));My(o,a,l,t)}});function My(t,n,a,l){if(!t){const o={code:"custom",input:a,inst:l,path:[...l._zod.def.path??[]],continue:!l._zod.def.abort};l._zod.def.params&&(o.params=l._zod.def.params),n.issues.push(Cl(o))}}var Ly;class Mk{constructor(){this._map=new WeakMap,this._idmap=new Map}add(n,...a){const l=a[0];return this._map.set(n,l),l&&typeof l=="object"&&"id"in l&&this._idmap.set(l.id,n),this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(n){const a=this._map.get(n);return a&&typeof a=="object"&&"id"in a&&this._idmap.delete(a.id),this._map.delete(n),this}get(n){const a=n._zod.parent;if(a){const l={...this.get(a)??{}};delete l.id;const o={...l,...this._map.get(n)};return Object.keys(o).length?o:void 0}return this._map.get(n)}has(n){return this._map.has(n)}}function Lk(){return new Mk}(Ly=globalThis).__zod_globalRegistry??(Ly.__zod_globalRegistry=Lk());const wl=globalThis.__zod_globalRegistry;function Uk(t,n){return new t({type:"string",...ge(n)})}function $k(t,n){return new t({type:"string",format:"email",check:"string_format",abort:!1,...ge(n)})}function Uy(t,n){return new t({type:"string",format:"guid",check:"string_format",abort:!1,...ge(n)})}function Bk(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,...ge(n)})}function Zk(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...ge(n)})}function qk(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...ge(n)})}function Hk(t,n){return new t({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...ge(n)})}function Ik(t,n){return new t({type:"string",format:"url",check:"string_format",abort:!1,...ge(n)})}function Kk(t,n){return new t({type:"string",format:"emoji",check:"string_format",abort:!1,...ge(n)})}function Gk(t,n){return new t({type:"string",format:"nanoid",check:"string_format",abort:!1,...ge(n)})}function Yk(t,n){return new t({type:"string",format:"cuid",check:"string_format",abort:!1,...ge(n)})}function Vk(t,n){return new t({type:"string",format:"cuid2",check:"string_format",abort:!1,...ge(n)})}function Pk(t,n){return new t({type:"string",format:"ulid",check:"string_format",abort:!1,...ge(n)})}function Qk(t,n){return new t({type:"string",format:"xid",check:"string_format",abort:!1,...ge(n)})}function Xk(t,n){return new t({type:"string",format:"ksuid",check:"string_format",abort:!1,...ge(n)})}function Jk(t,n){return new t({type:"string",format:"ipv4",check:"string_format",abort:!1,...ge(n)})}function Fk(t,n){return new t({type:"string",format:"ipv6",check:"string_format",abort:!1,...ge(n)})}function Wk(t,n){return new t({type:"string",format:"cidrv4",check:"string_format",abort:!1,...ge(n)})}function e2(t,n){return new t({type:"string",format:"cidrv6",check:"string_format",abort:!1,...ge(n)})}function t2(t,n){return new t({type:"string",format:"base64",check:"string_format",abort:!1,...ge(n)})}function n2(t,n){return new t({type:"string",format:"base64url",check:"string_format",abort:!1,...ge(n)})}function i2(t,n){return new t({type:"string",format:"e164",check:"string_format",abort:!1,...ge(n)})}function a2(t,n){return new t({type:"string",format:"jwt",check:"string_format",abort:!1,...ge(n)})}function s2(t,n){return new t({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...ge(n)})}function l2(t,n){return new t({type:"string",format:"date",check:"string_format",...ge(n)})}function r2(t,n){return new t({type:"string",format:"time",check:"string_format",precision:null,...ge(n)})}function o2(t,n){return new t({type:"string",format:"duration",check:"string_format",...ge(n)})}function c2(t,n){return new t({type:"number",checks:[],...ge(n)})}function u2(t,n){return new t({type:"number",check:"number_format",abort:!1,format:"safeint",...ge(n)})}function d2(t,n){return new t({type:"boolean",...ge(n)})}function f2(t){return new t({type:"unknown"})}function h2(t,n){return new t({type:"never",...ge(n)})}function $y(t,n){return new qb({check:"less_than",...ge(n),value:t,inclusive:!1})}function Bd(t,n){return new qb({check:"less_than",...ge(n),value:t,inclusive:!0})}function By(t,n){return new Hb({check:"greater_than",...ge(n),value:t,inclusive:!1})}function Zd(t,n){return new Hb({check:"greater_than",...ge(n),value:t,inclusive:!0})}function Zy(t,n){return new E_({check:"multiple_of",...ge(n),value:t})}function Pb(t,n){return new A_({check:"max_length",...ge(n),maximum:t})}function Eo(t,n){return new T_({check:"min_length",...ge(n),minimum:t})}function Qb(t,n){return new O_({check:"length_equals",...ge(n),length:t})}function m2(t,n){return new D_({check:"string_format",format:"regex",...ge(n),pattern:t})}function p2(t){return new R_({check:"string_format",format:"lowercase",...ge(t)})}function g2(t){return new M_({check:"string_format",format:"uppercase",...ge(t)})}function y2(t,n){return new L_({check:"string_format",format:"includes",...ge(n),includes:t})}function v2(t,n){return new U_({check:"string_format",format:"starts_with",...ge(n),prefix:t})}function b2(t,n){return new $_({check:"string_format",format:"ends_with",...ge(n),suffix:t})}function Ns(t){return new B_({check:"overwrite",tx:t})}function x2(t){return Ns(n=>n.normalize(t))}function S2(){return Ns(t=>t.trim())}function w2(){return Ns(t=>t.toLowerCase())}function N2(){return Ns(t=>t.toUpperCase())}function j2(){return Ns(t=>Dj(t))}function _2(t,n,a){return new t({type:"array",element:n,...ge(a)})}function k2(t,n,a){return new t({type:"custom",check:"custom",fn:n,...ge(a)})}function z2(t){const n=E2(a=>(a.addIssue=l=>{if(typeof l=="string")a.issues.push(Cl(l,a.value,n._zod.def));else{const o=l;o.fatal&&(o.continue=!1),o.code??(o.code="custom"),o.input??(o.input=a.value),o.inst??(o.inst=n),o.continue??(o.continue=!n._zod.def.abort),a.issues.push(Cl(o))}},t(a.value,a)));return n}function E2(t,n){const a=new Bt({check:"custom",...ge(n)});return a._zod.check=t,a}function Xb(t){let n=t?.target??"draft-2020-12";return n==="draft-4"&&(n="draft-04"),n==="draft-7"&&(n="draft-07"),{processors:t.processors??{},metadataRegistry:t?.metadata??wl,target:n,unrepresentable:t?.unrepresentable??"throw",override:t?.override??(()=>{}),io:t?.io??"output",counter:0,seen:new Map,cycles:t?.cycles??"ref",reused:t?.reused??"inline",external:t?.external??void 0}}function dt(t,n,a={path:[],schemaPath:[]}){var l;const o=t._zod.def,c=n.seen.get(t);if(c)return c.count++,a.schemaPath.includes(t)&&(c.cycle=a.path),c.schema;const f={schema:{},count:1,cycle:void 0,path:a.path};n.seen.set(t,f);const m=t._zod.toJSONSchema?.();if(m)f.schema=m;else{const b={...a,schemaPath:[...a.schemaPath,t],path:a.path};if(t._zod.processJSONSchema)t._zod.processJSONSchema(n,f.schema,b);else{const x=f.schema,j=n.processors[o.type];if(!j)throw new Error(`[toJSONSchema]: Non-representable type encountered: ${o.type}`);j(t,n,x,b)}const v=t._zod.parent;v&&(f.ref||(f.ref=v),dt(v,n,b),n.seen.get(v).isParent=!0)}const g=n.metadataRegistry.get(t);return g&&Object.assign(f.schema,g),n.io==="input"&&Et(t)&&(delete f.schema.examples,delete f.schema.default),n.io==="input"&&f.schema._prefault&&((l=f.schema).default??(l.default=f.schema._prefault)),delete f.schema._prefault,n.seen.get(t).schema}function Jb(t,n){const a=t.seen.get(n);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=new Map;for(const f of t.seen.entries()){const m=t.metadataRegistry.get(f[0])?.id;if(m){const g=l.get(m);if(g&&g!==f[0])throw new Error(`Duplicate schema id "${m}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);l.set(m,f[0])}}const o=f=>{const m=t.target==="draft-2020-12"?"$defs":"definitions";if(t.external){const v=t.external.registry.get(f[0])?.id,x=t.external.uri??(z=>z);if(v)return{ref:x(v)};const j=f[1].defId??f[1].schema.id??`schema${t.counter++}`;return f[1].defId=j,{defId:j,ref:`${x("__shared")}#/${m}/${j}`}}if(f[1]===a)return{ref:"#"};const p=`#/${m}/`,b=f[1].schema.id??`__schema${t.counter++}`;return{defId:b,ref:p+b}},c=f=>{if(f[1].schema.$ref)return;const m=f[1],{ref:g,defId:p}=o(f);m.def={...m.schema},p&&(m.defId=p);const b=m.schema;for(const v in b)delete b[v];b.$ref=g};if(t.cycles==="throw")for(const f of t.seen.entries()){const m=f[1];if(m.cycle)throw new Error(`Cycle detected: #/${m.cycle?.join("/")}/<root>
220
+
221
+ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.`)}for(const f of t.seen.entries()){const m=f[1];if(n===f[0]){c(f);continue}if(t.external){const p=t.external.registry.get(f[0])?.id;if(n!==f[0]&&p){c(f);continue}}if(t.metadataRegistry.get(f[0])?.id){c(f);continue}if(m.cycle){c(f);continue}if(m.count>1&&t.reused==="ref"){c(f);continue}}}function Fb(t,n){const a=t.seen.get(n);if(!a)throw new Error("Unprocessed schema. This is a bug in Zod.");const l=f=>{const m=t.seen.get(f);if(m.ref===null)return;const g=m.def??m.schema,p={...g},b=m.ref;if(m.ref=null,b){l(b);const x=t.seen.get(b),j=x.schema;if(j.$ref&&(t.target==="draft-07"||t.target==="draft-04"||t.target==="openapi-3.0")?(g.allOf=g.allOf??[],g.allOf.push(j)):Object.assign(g,j),Object.assign(g,p),f._zod.parent===b)for(const w in g)w==="$ref"||w==="allOf"||w in p||delete g[w];if(j.$ref&&x.def)for(const w in g)w==="$ref"||w==="allOf"||w in x.def&&JSON.stringify(g[w])===JSON.stringify(x.def[w])&&delete g[w]}const v=f._zod.parent;if(v&&v!==b){l(v);const x=t.seen.get(v);if(x?.schema.$ref&&(g.$ref=x.schema.$ref,x.def))for(const j in g)j==="$ref"||j==="allOf"||j in x.def&&JSON.stringify(g[j])===JSON.stringify(x.def[j])&&delete g[j]}t.override({zodSchema:f,jsonSchema:g,path:m.path??[]})};for(const f of[...t.seen.entries()].reverse())l(f[0]);const o={};if(t.target==="draft-2020-12"?o.$schema="https://json-schema.org/draft/2020-12/schema":t.target==="draft-07"?o.$schema="http://json-schema.org/draft-07/schema#":t.target==="draft-04"?o.$schema="http://json-schema.org/draft-04/schema#":t.target,t.external?.uri){const f=t.external.registry.get(n)?.id;if(!f)throw new Error("Schema is missing an `id` property");o.$id=t.external.uri(f)}Object.assign(o,a.def??a.schema);const c=t.external?.defs??{};for(const f of t.seen.entries()){const m=f[1];m.def&&m.defId&&(c[m.defId]=m.def)}t.external||Object.keys(c).length>0&&(t.target==="draft-2020-12"?o.$defs=c:o.definitions=c);try{const f=JSON.parse(JSON.stringify(o));return Object.defineProperty(f,"~standard",{value:{...n["~standard"],jsonSchema:{input:Co(n,"input",t.processors),output:Co(n,"output",t.processors)}},enumerable:!1,writable:!1}),f}catch{throw new Error("Error converting schema to JSON.")}}function Et(t,n){const a=n??{seen:new Set};if(a.seen.has(t))return!1;a.seen.add(t);const l=t._zod.def;if(l.type==="transform")return!0;if(l.type==="array")return Et(l.element,a);if(l.type==="set")return Et(l.valueType,a);if(l.type==="lazy")return Et(l.getter(),a);if(l.type==="promise"||l.type==="optional"||l.type==="nonoptional"||l.type==="nullable"||l.type==="readonly"||l.type==="default"||l.type==="prefault")return Et(l.innerType,a);if(l.type==="intersection")return Et(l.left,a)||Et(l.right,a);if(l.type==="record"||l.type==="map")return Et(l.keyType,a)||Et(l.valueType,a);if(l.type==="pipe")return Et(l.in,a)||Et(l.out,a);if(l.type==="object"){for(const o in l.shape)if(Et(l.shape[o],a))return!0;return!1}if(l.type==="union"){for(const o of l.options)if(Et(o,a))return!0;return!1}if(l.type==="tuple"){for(const o of l.items)if(Et(o,a))return!0;return!!(l.rest&&Et(l.rest,a))}return!1}const C2=(t,n={})=>a=>{const l=Xb({...a,processors:n});return dt(t,l),Jb(l,t),Fb(l,t)},Co=(t,n,a={})=>l=>{const{libraryOptions:o,target:c}=l??{},f=Xb({...o??{},target:c,io:n,processors:a});return dt(t,f),Jb(f,t),Fb(f,t)},A2={guid:"uuid",url:"uri",datetime:"date-time",json_string:"json-string",regex:""},T2=(t,n,a,l)=>{const o=a;o.type="string";const{minimum:c,maximum:f,format:m,patterns:g,contentEncoding:p}=t._zod.bag;if(typeof c=="number"&&(o.minLength=c),typeof f=="number"&&(o.maxLength=f),m&&(o.format=A2[m]??m,o.format===""&&delete o.format,m==="time"&&delete o.format),p&&(o.contentEncoding=p),g&&g.size>0){const b=[...g];b.length===1?o.pattern=b[0].source:b.length>1&&(o.allOf=[...b.map(v=>({...n.target==="draft-07"||n.target==="draft-04"||n.target==="openapi-3.0"?{type:"string"}:{},pattern:v.source}))])}},O2=(t,n,a,l)=>{const o=a,{minimum:c,maximum:f,format:m,multipleOf:g,exclusiveMaximum:p,exclusiveMinimum:b}=t._zod.bag;typeof m=="string"&&m.includes("int")?o.type="integer":o.type="number",typeof b=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.minimum=b,o.exclusiveMinimum=!0):o.exclusiveMinimum=b),typeof c=="number"&&(o.minimum=c,typeof b=="number"&&n.target!=="draft-04"&&(b>=c?delete o.minimum:delete o.exclusiveMinimum)),typeof p=="number"&&(n.target==="draft-04"||n.target==="openapi-3.0"?(o.maximum=p,o.exclusiveMaximum=!0):o.exclusiveMaximum=p),typeof f=="number"&&(o.maximum=f,typeof p=="number"&&n.target!=="draft-04"&&(p<=f?delete o.maximum:delete o.exclusiveMaximum)),typeof g=="number"&&(o.multipleOf=g)},D2=(t,n,a,l)=>{a.type="boolean"},R2=(t,n,a,l)=>{a.not={}},M2=(t,n,a,l)=>{},L2=(t,n,a,l)=>{const o=t._zod.def,c=Ab(o.entries);c.every(f=>typeof f=="number")&&(a.type="number"),c.every(f=>typeof f=="string")&&(a.type="string"),a.enum=c},U2=(t,n,a,l)=>{const o=t._zod.def,c=[];for(const f of o.values)if(f===void 0){if(n.unrepresentable==="throw")throw new Error("Literal `undefined` cannot be represented in JSON Schema")}else if(typeof f=="bigint"){if(n.unrepresentable==="throw")throw new Error("BigInt literals cannot be represented in JSON Schema");c.push(Number(f))}else c.push(f);if(c.length!==0)if(c.length===1){const f=c[0];a.type=f===null?"null":typeof f,n.target==="draft-04"||n.target==="openapi-3.0"?a.enum=[f]:a.const=f}else c.every(f=>typeof f=="number")&&(a.type="number"),c.every(f=>typeof f=="string")&&(a.type="string"),c.every(f=>typeof f=="boolean")&&(a.type="boolean"),c.every(f=>f===null)&&(a.type="null"),a.enum=c},$2=(t,n,a,l)=>{if(n.unrepresentable==="throw")throw new Error("Custom types cannot be represented in JSON Schema")},B2=(t,n,a,l)=>{if(n.unrepresentable==="throw")throw new Error("Transforms cannot be represented in JSON Schema")},Z2=(t,n,a,l)=>{const o=a,c=t._zod.def,{minimum:f,maximum:m}=t._zod.bag;typeof f=="number"&&(o.minItems=f),typeof m=="number"&&(o.maxItems=m),o.type="array",o.items=dt(c.element,n,{...l,path:[...l.path,"items"]})},q2=(t,n,a,l)=>{const o=a,c=t._zod.def;o.type="object",o.properties={};const f=c.shape;for(const p in f)o.properties[p]=dt(f[p],n,{...l,path:[...l.path,"properties",p]});const m=new Set(Object.keys(f)),g=new Set([...m].filter(p=>{const b=c.shape[p]._zod;return n.io==="input"?b.optin===void 0:b.optout===void 0}));g.size>0&&(o.required=Array.from(g)),c.catchall?._zod.def.type==="never"?o.additionalProperties=!1:c.catchall?c.catchall&&(o.additionalProperties=dt(c.catchall,n,{...l,path:[...l.path,"additionalProperties"]})):n.io==="output"&&(o.additionalProperties=!1)},H2=(t,n,a,l)=>{const o=t._zod.def,c=o.inclusive===!1,f=o.options.map((m,g)=>dt(m,n,{...l,path:[...l.path,c?"oneOf":"anyOf",g]}));c?a.oneOf=f:a.anyOf=f},I2=(t,n,a,l)=>{const o=t._zod.def,c=dt(o.left,n,{...l,path:[...l.path,"allOf",0]}),f=dt(o.right,n,{...l,path:[...l.path,"allOf",1]}),m=p=>"allOf"in p&&Object.keys(p).length===1,g=[...m(c)?c.allOf:[c],...m(f)?f.allOf:[f]];a.allOf=g},K2=(t,n,a,l)=>{const o=a,c=t._zod.def;o.type="object";const f=c.keyType,g=f._zod.bag?.patterns;if(c.mode==="loose"&&g&&g.size>0){const b=dt(c.valueType,n,{...l,path:[...l.path,"patternProperties","*"]});o.patternProperties={};for(const v of g)o.patternProperties[v.source]=b}else(n.target==="draft-07"||n.target==="draft-2020-12")&&(o.propertyNames=dt(c.keyType,n,{...l,path:[...l.path,"propertyNames"]})),o.additionalProperties=dt(c.valueType,n,{...l,path:[...l.path,"additionalProperties"]});const p=f._zod.values;if(p){const b=[...p].filter(v=>typeof v=="string"||typeof v=="number");b.length>0&&(o.required=b)}},G2=(t,n,a,l)=>{const o=t._zod.def,c=dt(o.innerType,n,l),f=n.seen.get(t);n.target==="openapi-3.0"?(f.ref=o.innerType,a.nullable=!0):a.anyOf=[c,{type:"null"}]},Y2=(t,n,a,l)=>{const o=t._zod.def;dt(o.innerType,n,l);const c=n.seen.get(t);c.ref=o.innerType},V2=(t,n,a,l)=>{const o=t._zod.def;dt(o.innerType,n,l);const c=n.seen.get(t);c.ref=o.innerType,a.default=JSON.parse(JSON.stringify(o.defaultValue))},P2=(t,n,a,l)=>{const o=t._zod.def;dt(o.innerType,n,l);const c=n.seen.get(t);c.ref=o.innerType,n.io==="input"&&(a._prefault=JSON.parse(JSON.stringify(o.defaultValue)))},Q2=(t,n,a,l)=>{const o=t._zod.def;dt(o.innerType,n,l);const c=n.seen.get(t);c.ref=o.innerType;let f;try{f=o.catchValue(void 0)}catch{throw new Error("Dynamic catch values are not supported in JSON Schema")}a.default=f},X2=(t,n,a,l)=>{const o=t._zod.def,c=n.io==="input"?o.in._zod.def.type==="transform"?o.out:o.in:o.out;dt(c,n,l);const f=n.seen.get(t);f.ref=c},J2=(t,n,a,l)=>{const o=t._zod.def;dt(o.innerType,n,l);const c=n.seen.get(t);c.ref=o.innerType,a.readOnly=!0},Wb=(t,n,a,l)=>{const o=t._zod.def;dt(o.innerType,n,l);const c=n.seen.get(t);c.ref=o.innerType},F2=Q("ZodISODateTime",(t,n)=>{W_.init(t,n),Je.init(t,n)});function W2(t){return s2(F2,t)}const ez=Q("ZodISODate",(t,n)=>{ek.init(t,n),Je.init(t,n)});function tz(t){return l2(ez,t)}const nz=Q("ZodISOTime",(t,n)=>{tk.init(t,n),Je.init(t,n)});function iz(t){return r2(nz,t)}const az=Q("ZodISODuration",(t,n)=>{nk.init(t,n),Je.init(t,n)});function sz(t){return o2(az,t)}const lz=(t,n)=>{Rb.init(t,n),t.name="ZodError",Object.defineProperties(t,{format:{value:a=>Yj(t,a)},flatten:{value:a=>Gj(t,a)},addIssue:{value:a=>{t.issues.push(a),t.message=JSON.stringify(t.issues,Fd,2)}},addIssues:{value:a=>{t.issues.push(...a),t.message=JSON.stringify(t.issues,Fd,2)}},isEmpty:{get(){return t.issues.length===0}}})},hn=Q("ZodError",lz,{Parent:Error}),rz=Uf(hn),oz=$f(hn),cz=Qo(hn),uz=Xo(hn),dz=Qj(hn),fz=Xj(hn),hz=Jj(hn),mz=Fj(hn),pz=Wj(hn),gz=e_(hn),yz=t_(hn),vz=n_(hn),Xe=Q("ZodType",(t,n)=>(Qe.init(t,n),Object.assign(t["~standard"],{jsonSchema:{input:Co(t,"input"),output:Co(t,"output")}}),t.toJSONSchema=C2(t,{}),t.def=n,t.type=n.type,Object.defineProperty(t,"_def",{value:n}),t.check=(...a)=>t.clone(Ui(n,{checks:[...n.checks??[],...a.map(l=>typeof l=="function"?{_zod:{check:l,def:{check:"custom"},onattach:[]}}:l)]}),{parent:!0}),t.with=t.check,t.clone=(a,l)=>$i(t,a,l),t.brand=()=>t,t.register=((a,l)=>(a.add(t,l),t)),t.parse=(a,l)=>rz(t,a,l,{callee:t.parse}),t.safeParse=(a,l)=>cz(t,a,l),t.parseAsync=async(a,l)=>oz(t,a,l,{callee:t.parseAsync}),t.safeParseAsync=async(a,l)=>uz(t,a,l),t.spa=t.safeParseAsync,t.encode=(a,l)=>dz(t,a,l),t.decode=(a,l)=>fz(t,a,l),t.encodeAsync=async(a,l)=>hz(t,a,l),t.decodeAsync=async(a,l)=>mz(t,a,l),t.safeEncode=(a,l)=>pz(t,a,l),t.safeDecode=(a,l)=>gz(t,a,l),t.safeEncodeAsync=async(a,l)=>yz(t,a,l),t.safeDecodeAsync=async(a,l)=>vz(t,a,l),t.refine=(a,l)=>t.check(fE(a,l)),t.superRefine=a=>t.check(hE(a)),t.overwrite=a=>t.check(Ns(a)),t.optional=()=>Iy(t),t.exactOptional=()=>Wz(t),t.nullable=()=>Ky(t),t.nullish=()=>Iy(Ky(t)),t.nonoptional=a=>sE(t,a),t.array=()=>vt(t),t.or=a=>Gz([t,a]),t.and=a=>Vz(t,a),t.transform=a=>Gy(t,Jz(a)),t.default=a=>nE(t,a),t.prefault=a=>aE(t,a),t.catch=a=>rE(t,a),t.pipe=a=>Gy(t,a),t.readonly=()=>uE(t),t.describe=a=>{const l=t.clone();return wl.add(l,{description:a}),l},Object.defineProperty(t,"description",{get(){return wl.get(t)?.description},configurable:!0}),t.meta=(...a)=>{if(a.length===0)return wl.get(t);const l=t.clone();return wl.add(l,a[0]),l},t.isOptional=()=>t.safeParse(void 0).success,t.isNullable=()=>t.safeParse(null).success,t.apply=a=>a(t),t)),e0=Q("_ZodString",(t,n)=>{Bf.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(l,o,c)=>T2(t,l,o);const a=t._zod.bag;t.format=a.format??null,t.minLength=a.minimum??null,t.maxLength=a.maximum??null,t.regex=(...l)=>t.check(m2(...l)),t.includes=(...l)=>t.check(y2(...l)),t.startsWith=(...l)=>t.check(v2(...l)),t.endsWith=(...l)=>t.check(b2(...l)),t.min=(...l)=>t.check(Eo(...l)),t.max=(...l)=>t.check(Pb(...l)),t.length=(...l)=>t.check(Qb(...l)),t.nonempty=(...l)=>t.check(Eo(1,...l)),t.lowercase=l=>t.check(p2(l)),t.uppercase=l=>t.check(g2(l)),t.trim=()=>t.check(S2()),t.normalize=(...l)=>t.check(x2(...l)),t.toLowerCase=()=>t.check(w2()),t.toUpperCase=()=>t.check(N2()),t.slugify=()=>t.check(j2())}),bz=Q("ZodString",(t,n)=>{Bf.init(t,n),e0.init(t,n),t.email=a=>t.check($k(xz,a)),t.url=a=>t.check(Ik(Sz,a)),t.jwt=a=>t.check(a2(Lz,a)),t.emoji=a=>t.check(Kk(wz,a)),t.guid=a=>t.check(Uy(qy,a)),t.uuid=a=>t.check(Bk(mo,a)),t.uuidv4=a=>t.check(Zk(mo,a)),t.uuidv6=a=>t.check(qk(mo,a)),t.uuidv7=a=>t.check(Hk(mo,a)),t.nanoid=a=>t.check(Gk(Nz,a)),t.guid=a=>t.check(Uy(qy,a)),t.cuid=a=>t.check(Yk(jz,a)),t.cuid2=a=>t.check(Vk(_z,a)),t.ulid=a=>t.check(Pk(kz,a)),t.base64=a=>t.check(t2(Dz,a)),t.base64url=a=>t.check(n2(Rz,a)),t.xid=a=>t.check(Qk(zz,a)),t.ksuid=a=>t.check(Xk(Ez,a)),t.ipv4=a=>t.check(Jk(Cz,a)),t.ipv6=a=>t.check(Fk(Az,a)),t.cidrv4=a=>t.check(Wk(Tz,a)),t.cidrv6=a=>t.check(e2(Oz,a)),t.e164=a=>t.check(i2(Mz,a)),t.datetime=a=>t.check(W2(a)),t.date=a=>t.check(tz(a)),t.time=a=>t.check(iz(a)),t.duration=a=>t.check(sz(a))});function ne(t){return Uk(bz,t)}const Je=Q("ZodStringFormat",(t,n)=>{Pe.init(t,n),e0.init(t,n)}),xz=Q("ZodEmail",(t,n)=>{K_.init(t,n),Je.init(t,n)}),qy=Q("ZodGUID",(t,n)=>{H_.init(t,n),Je.init(t,n)}),mo=Q("ZodUUID",(t,n)=>{I_.init(t,n),Je.init(t,n)}),Sz=Q("ZodURL",(t,n)=>{G_.init(t,n),Je.init(t,n)}),wz=Q("ZodEmoji",(t,n)=>{Y_.init(t,n),Je.init(t,n)}),Nz=Q("ZodNanoID",(t,n)=>{V_.init(t,n),Je.init(t,n)}),jz=Q("ZodCUID",(t,n)=>{P_.init(t,n),Je.init(t,n)}),_z=Q("ZodCUID2",(t,n)=>{Q_.init(t,n),Je.init(t,n)}),kz=Q("ZodULID",(t,n)=>{X_.init(t,n),Je.init(t,n)}),zz=Q("ZodXID",(t,n)=>{J_.init(t,n),Je.init(t,n)}),Ez=Q("ZodKSUID",(t,n)=>{F_.init(t,n),Je.init(t,n)}),Cz=Q("ZodIPv4",(t,n)=>{ik.init(t,n),Je.init(t,n)}),Az=Q("ZodIPv6",(t,n)=>{ak.init(t,n),Je.init(t,n)}),Tz=Q("ZodCIDRv4",(t,n)=>{sk.init(t,n),Je.init(t,n)}),Oz=Q("ZodCIDRv6",(t,n)=>{lk.init(t,n),Je.init(t,n)}),Dz=Q("ZodBase64",(t,n)=>{rk.init(t,n),Je.init(t,n)}),Rz=Q("ZodBase64URL",(t,n)=>{ck.init(t,n),Je.init(t,n)}),Mz=Q("ZodE164",(t,n)=>{uk.init(t,n),Je.init(t,n)}),Lz=Q("ZodJWT",(t,n)=>{fk.init(t,n),Je.init(t,n)}),t0=Q("ZodNumber",(t,n)=>{Kb.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(l,o,c)=>O2(t,l,o),t.gt=(l,o)=>t.check(By(l,o)),t.gte=(l,o)=>t.check(Zd(l,o)),t.min=(l,o)=>t.check(Zd(l,o)),t.lt=(l,o)=>t.check($y(l,o)),t.lte=(l,o)=>t.check(Bd(l,o)),t.max=(l,o)=>t.check(Bd(l,o)),t.int=l=>t.check(Hy(l)),t.safe=l=>t.check(Hy(l)),t.positive=l=>t.check(By(0,l)),t.nonnegative=l=>t.check(Zd(0,l)),t.negative=l=>t.check($y(0,l)),t.nonpositive=l=>t.check(Bd(0,l)),t.multipleOf=(l,o)=>t.check(Zy(l,o)),t.step=(l,o)=>t.check(Zy(l,o)),t.finite=()=>t;const a=t._zod.bag;t.minValue=Math.max(a.minimum??Number.NEGATIVE_INFINITY,a.exclusiveMinimum??Number.NEGATIVE_INFINITY)??null,t.maxValue=Math.min(a.maximum??Number.POSITIVE_INFINITY,a.exclusiveMaximum??Number.POSITIVE_INFINITY)??null,t.isInt=(a.format??"").includes("int")||Number.isSafeInteger(a.multipleOf??.5),t.isFinite=!0,t.format=a.format??null});function Oi(t){return c2(t0,t)}const Uz=Q("ZodNumberFormat",(t,n)=>{hk.init(t,n),t0.init(t,n)});function Hy(t){return u2(Uz,t)}const $z=Q("ZodBoolean",(t,n)=>{mk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>D2(t,a,l)});function Zf(t){return d2($z,t)}const Bz=Q("ZodUnknown",(t,n)=>{pk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>M2()});function ef(){return f2(Bz)}const Zz=Q("ZodNever",(t,n)=>{gk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>R2(t,a,l)});function qz(t){return h2(Zz,t)}const Hz=Q("ZodArray",(t,n)=>{yk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Z2(t,a,l,o),t.element=n.element,t.min=(a,l)=>t.check(Eo(a,l)),t.nonempty=a=>t.check(Eo(1,a)),t.max=(a,l)=>t.check(Pb(a,l)),t.length=(a,l)=>t.check(Qb(a,l)),t.unwrap=()=>t.element});function vt(t,n){return _2(Hz,t,n)}const Iz=Q("ZodObject",(t,n)=>{bk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>q2(t,a,l,o),Ue(t,"shape",()=>n.shape),t.keyof=()=>jn(Object.keys(t._zod.def.shape)),t.catchall=a=>t.clone({...t._zod.def,catchall:a}),t.passthrough=()=>t.clone({...t._zod.def,catchall:ef()}),t.loose=()=>t.clone({...t._zod.def,catchall:ef()}),t.strict=()=>t.clone({...t._zod.def,catchall:qz()}),t.strip=()=>t.clone({...t._zod.def,catchall:void 0}),t.extend=a=>Zj(t,a),t.safeExtend=a=>qj(t,a),t.merge=a=>Hj(t,a),t.pick=a=>$j(t,a),t.omit=a=>Bj(t,a),t.partial=(...a)=>Ij(i0,t,a[0]),t.required=(...a)=>Kj(a0,t,a[0])});function mt(t,n){const a={type:"object",shape:t??{},...ge(n)};return new Iz(a)}const Kz=Q("ZodUnion",(t,n)=>{xk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>H2(t,a,l,o),t.options=n.options});function Gz(t,n){return new Kz({type:"union",options:t,...ge(n)})}const Yz=Q("ZodIntersection",(t,n)=>{Sk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>I2(t,a,l,o)});function Vz(t,n){return new Yz({type:"intersection",left:t,right:n})}const Pz=Q("ZodRecord",(t,n)=>{wk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>K2(t,a,l,o),t.keyType=n.keyType,t.valueType=n.valueType});function n0(t,n,a){return new Pz({type:"record",keyType:t,valueType:n,...ge(a)})}const tf=Q("ZodEnum",(t,n)=>{Nk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(l,o,c)=>L2(t,l,o),t.enum=n.entries,t.options=Object.values(n.entries);const a=new Set(Object.keys(n.entries));t.extract=(l,o)=>{const c={};for(const f of l)if(a.has(f))c[f]=n.entries[f];else throw new Error(`Key ${f} not found in enum`);return new tf({...n,checks:[],...ge(o),entries:c})},t.exclude=(l,o)=>{const c={...n.entries};for(const f of l)if(a.has(f))delete c[f];else throw new Error(`Key ${f} not found in enum`);return new tf({...n,checks:[],...ge(o),entries:c})}});function jn(t,n){const a=Array.isArray(t)?Object.fromEntries(t.map(l=>[l,l])):t;return new tf({type:"enum",entries:a,...ge(n)})}const Qz=Q("ZodLiteral",(t,n)=>{jk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>U2(t,a,l),t.values=new Set(n.values),Object.defineProperty(t,"value",{get(){if(n.values.length>1)throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");return n.values[0]}})});function Ao(t,n){return new Qz({type:"literal",values:Array.isArray(t)?t:[t],...ge(n)})}const Xz=Q("ZodTransform",(t,n)=>{_k.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>B2(t,a),t._zod.parse=(a,l)=>{if(l.direction==="backward")throw new Eb(t.constructor.name);a.addIssue=c=>{if(typeof c=="string")a.issues.push(Cl(c,a.value,n));else{const f=c;f.fatal&&(f.continue=!1),f.code??(f.code="custom"),f.input??(f.input=a.value),f.inst??(f.inst=t),a.issues.push(Cl(f))}};const o=n.transform(a.value,a);return o instanceof Promise?o.then(c=>(a.value=c,a)):(a.value=o,a)}});function Jz(t){return new Xz({type:"transform",transform:t})}const i0=Q("ZodOptional",(t,n)=>{Vb.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Wb(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Iy(t){return new i0({type:"optional",innerType:t})}const Fz=Q("ZodExactOptional",(t,n)=>{kk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Wb(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Wz(t){return new Fz({type:"optional",innerType:t})}const eE=Q("ZodNullable",(t,n)=>{zk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>G2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function Ky(t){return new eE({type:"nullable",innerType:t})}const tE=Q("ZodDefault",(t,n)=>{Ek.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>V2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType,t.removeDefault=t.unwrap});function nE(t,n){return new tE({type:"default",innerType:t,get defaultValue(){return typeof n=="function"?n():Ob(n)}})}const iE=Q("ZodPrefault",(t,n)=>{Ck.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>P2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function aE(t,n){return new iE({type:"prefault",innerType:t,get defaultValue(){return typeof n=="function"?n():Ob(n)}})}const a0=Q("ZodNonOptional",(t,n)=>{Ak.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Y2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function sE(t,n){return new a0({type:"nonoptional",innerType:t,...ge(n)})}const lE=Q("ZodCatch",(t,n)=>{Tk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>Q2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType,t.removeCatch=t.unwrap});function rE(t,n){return new lE({type:"catch",innerType:t,catchValue:typeof n=="function"?n:()=>n})}const oE=Q("ZodPipe",(t,n)=>{Ok.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>X2(t,a,l,o),t.in=n.in,t.out=n.out});function Gy(t,n){return new oE({type:"pipe",in:t,out:n})}const cE=Q("ZodReadonly",(t,n)=>{Dk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>J2(t,a,l,o),t.unwrap=()=>t._zod.def.innerType});function uE(t){return new cE({type:"readonly",innerType:t})}const dE=Q("ZodCustom",(t,n)=>{Rk.init(t,n),Xe.init(t,n),t._zod.processJSONSchema=(a,l,o)=>$2(t,a)});function fE(t,n={}){return k2(dE,t,n)}function hE(t){return z2(t)}mt({maxConcurrency:Oi().int().positive(),maxRequestsPerMinute:Oi().int().positive(),maxRequestsPerDay:Oi().int().positive()});const mE=["gemini","openai","claude","local"],Fo=jn(mE),s0=jn(["citation.lost","citation.gained","run.completed","run.failed"]);mt({id:ne(),projectId:ne(),channel:Ao("webhook"),url:ne().url(),events:vt(s0),enabled:Zf().default(!0),webhookSecret:ne().optional(),createdAt:ne(),updatedAt:ne()});const pE=mt({name:ne().min(1).max(63).regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?$/,{message:"Name must be a lowercase slug (letters, numbers, hyphens)"}),labels:n0(ne(),ne()).optional().default({})}),gE=mt({preset:ne().optional(),cron:ne().optional(),timezone:ne().optional().default("UTC"),providers:vt(Fo).optional().default([])}).refine(t=>t.preset&&!t.cron||!t.preset&&t.cron,{message:'Exactly one of "preset" or "cron" must be provided'}).optional(),yE=mt({channel:Ao("webhook"),url:ne().url(),events:vt(s0).min(1)}),vE=mt({gsc:mt({propertyUrl:ne()}).optional(),syncSchedule:mt({preset:ne().optional(),cron:ne().optional()}).optional()}).optional(),bE=mt({displayName:ne().min(1),canonicalDomain:ne().min(1),ownedDomains:vt(ne().min(1)).optional().default([]),country:ne().length(2),language:ne().min(2),keywords:vt(ne().min(1)).optional().default([]),competitors:vt(ne().min(1)).optional().default([]),providers:vt(Fo).optional().default([]),schedule:gE,notifications:vt(yE).optional().default([]),google:vE});mt({apiVersion:Ao("canonry/v1"),kind:Ao("Project"),metadata:pE,spec:bE});const xE=jn(["gsc","ga4"]);mt({id:ne(),domain:ne(),connectionType:xE,propertyId:ne().nullable().optional(),scopes:vt(ne()).default([]),createdAt:ne(),updatedAt:ne()});mt({date:ne(),query:ne(),page:ne(),country:ne().nullable().optional(),device:ne().nullable().optional(),clicks:Oi(),impressions:Oi(),ctr:Oi(),position:Oi()});mt({id:ne(),url:ne(),indexingState:ne().nullable().optional(),verdict:ne().nullable().optional(),coverageState:ne().nullable().optional(),pageFetchState:ne().nullable().optional(),robotsTxtState:ne().nullable().optional(),crawlTime:ne().nullable().optional(),lastCrawlResult:ne().nullable().optional(),isMobileFriendly:Zf().nullable().optional(),richResults:vt(ne()).default([]),inspectedAt:ne()});jn(["stable","reindexed","deindexed","still-missing","new"]);const SE=jn(["cli","api","config-file"]);mt({id:ne(),name:ne(),displayName:ne().optional(),canonicalDomain:ne(),ownedDomains:vt(ne()).default([]),country:ne().length(2),language:ne().min(2),tags:vt(ne()).default([]),labels:n0(ne(),ne()).default({}),configSource:SE.default("cli"),configRevision:Oi().int().positive().default(1),createdAt:ne().optional(),updatedAt:ne().optional()});function nf(t){let n=t.trim().toLowerCase();try{n.includes("://")&&(n=new URL(n).hostname.toLowerCase())}catch{}return n.replace(/^www\./,"")}function wE(t){const n=[t.canonicalDomain,...t.ownedDomains??[]],a=new Set,l=[];for(const o of n){const c=o.trim();if(!c)continue;const f=nf(c);a.has(f)||(a.add(f),l.push(c))}return l}const NE=jn(["queued","running","completed","partial","failed"]),jE=jn(["answer-visibility","site-audit","gsc-sync"]),_E=jn(["manual","scheduled","config-apply"]),kE=jn(["cited","not-cited"]),zE=jn(["new","cited","lost","emerging","not-cited"]);mt({id:ne(),projectId:ne(),kind:jE,status:NE,trigger:_E.default("manual"),startedAt:ne().nullable().optional(),finishedAt:ne().nullable().optional(),error:ne().nullable().optional(),createdAt:ne()});const EE=mt({uri:ne(),title:ne()});mt({id:ne(),runId:ne(),keywordId:ne(),keyword:ne().optional(),provider:Fo,citationState:kE,transition:zE.optional(),answerText:ne().nullable().optional(),citedDomains:vt(ne()).default([]),competitorOverlap:vt(ne()).default([]),groundingSources:vt(EE).default([]),searchQueries:vt(ne()).default([]),model:ne().nullable().optional(),createdAt:ne()});mt({id:ne(),projectId:ne().nullable().optional(),actor:ne(),action:ne(),entityType:ne(),entityId:ne().nullable().optional(),diff:ef().optional(),createdAt:ne()});mt({id:ne(),projectId:ne(),cronExpr:ne(),preset:ne().nullable().optional(),timezone:ne().default("UTC"),enabled:Zf().default(!0),providers:vt(Fo).default([]),lastRunAt:ne().nullable().optional(),nextRunAt:ne().nullable().optional(),createdAt:ne(),updatedAt:ne()});function l0(t){var n,a,l="";if(typeof t=="string"||typeof t=="number")l+=t;else if(typeof t=="object")if(Array.isArray(t)){var o=t.length;for(n=0;n<o;n++)t[n]&&(a=l0(t[n]))&&(l&&(l+=" "),l+=a)}else for(a in t)t[a]&&(l&&(l+=" "),l+=a);return l}function r0(){for(var t,n,a=0,l="",o=arguments.length;a<o;a++)(t=arguments[a])&&(n=l0(t))&&(l&&(l+=" "),l+=n);return l}const Yy=t=>typeof t=="boolean"?`${t}`:t===0?"0":t,Vy=r0,o0=(t,n)=>a=>{var l;if(n?.variants==null)return Vy(t,a?.class,a?.className);const{variants:o,defaultVariants:c}=n,f=Object.keys(o).map(p=>{const b=a?.[p],v=c?.[p];if(b===null)return null;const x=Yy(b)||Yy(v);return o[p][x]}),m=a&&Object.entries(a).reduce((p,b)=>{let[v,x]=b;return x===void 0||(p[v]=x),p},{}),g=n==null||(l=n.compoundVariants)===null||l===void 0?void 0:l.reduce((p,b)=>{let{class:v,className:x,...j}=b;return Object.entries(j).every(z=>{let[w,_]=z;return Array.isArray(_)?_.includes({...c,...m}[w]):{...c,...m}[w]===_})?[...p,v,x]:p},[]);return Vy(t,f,g,a?.class,a?.className)},CE=(t,n)=>{const a=new Array(t.length+n.length);for(let l=0;l<t.length;l++)a[l]=t[l];for(let l=0;l<n.length;l++)a[t.length+l]=n[l];return a},AE=(t,n)=>({classGroupId:t,validator:n}),c0=(t=new Map,n=null,a)=>({nextPart:t,validators:n,classGroupId:a}),To="-",Py=[],TE="arbitrary..",OE=t=>{const n=RE(t),{conflictingClassGroups:a,conflictingClassGroupModifiers:l}=t;return{getClassGroupId:f=>{if(f.startsWith("[")&&f.endsWith("]"))return DE(f);const m=f.split(To),g=m[0]===""&&m.length>1?1:0;return u0(m,g,n)},getConflictingClassGroupIds:(f,m)=>{if(m){const g=l[f],p=a[f];return g?p?CE(p,g):g:p||Py}return a[f]||Py}}},u0=(t,n,a)=>{if(t.length-n===0)return a.classGroupId;const o=t[n],c=a.nextPart.get(o);if(c){const p=u0(t,n+1,c);if(p)return p}const f=a.validators;if(f===null)return;const m=n===0?t.join(To):t.slice(n).join(To),g=f.length;for(let p=0;p<g;p++){const b=f[p];if(b.validator(m))return b.classGroupId}},DE=t=>t.slice(1,-1).indexOf(":")===-1?void 0:(()=>{const n=t.slice(1,-1),a=n.indexOf(":"),l=n.slice(0,a);return l?TE+l:void 0})(),RE=t=>{const{theme:n,classGroups:a}=t;return ME(a,n)},ME=(t,n)=>{const a=c0();for(const l in t){const o=t[l];qf(o,a,l,n)}return a},qf=(t,n,a,l)=>{const o=t.length;for(let c=0;c<o;c++){const f=t[c];LE(f,n,a,l)}},LE=(t,n,a,l)=>{if(typeof t=="string"){UE(t,n,a);return}if(typeof t=="function"){$E(t,n,a,l);return}BE(t,n,a,l)},UE=(t,n,a)=>{const l=t===""?n:d0(n,t);l.classGroupId=a},$E=(t,n,a,l)=>{if(ZE(t)){qf(t(l),n,a,l);return}n.validators===null&&(n.validators=[]),n.validators.push(AE(a,t))},BE=(t,n,a,l)=>{const o=Object.entries(t),c=o.length;for(let f=0;f<c;f++){const[m,g]=o[f];qf(g,d0(n,m),a,l)}},d0=(t,n)=>{let a=t;const l=n.split(To),o=l.length;for(let c=0;c<o;c++){const f=l[c];let m=a.nextPart.get(f);m||(m=c0(),a.nextPart.set(f,m)),a=m}return a},ZE=t=>"isThemeGetter"in t&&t.isThemeGetter===!0,qE=t=>{if(t<1)return{get:()=>{},set:()=>{}};let n=0,a=Object.create(null),l=Object.create(null);const o=(c,f)=>{a[c]=f,n++,n>t&&(n=0,l=a,a=Object.create(null))};return{get(c){let f=a[c];if(f!==void 0)return f;if((f=l[c])!==void 0)return o(c,f),f},set(c,f){c in a?a[c]=f:o(c,f)}}},af="!",Qy=":",HE=[],Xy=(t,n,a,l,o)=>({modifiers:t,hasImportantModifier:n,baseClassName:a,maybePostfixModifierPosition:l,isExternal:o}),IE=t=>{const{prefix:n,experimentalParseClassName:a}=t;let l=o=>{const c=[];let f=0,m=0,g=0,p;const b=o.length;for(let w=0;w<b;w++){const _=o[w];if(f===0&&m===0){if(_===Qy){c.push(o.slice(g,w)),g=w+1;continue}if(_==="/"){p=w;continue}}_==="["?f++:_==="]"?f--:_==="("?m++:_===")"&&m--}const v=c.length===0?o:o.slice(g);let x=v,j=!1;v.endsWith(af)?(x=v.slice(0,-1),j=!0):v.startsWith(af)&&(x=v.slice(1),j=!0);const z=p&&p>g?p-g:void 0;return Xy(c,j,x,z)};if(n){const o=n+Qy,c=l;l=f=>f.startsWith(o)?c(f.slice(o.length)):Xy(HE,!1,f,void 0,!0)}if(a){const o=l;l=c=>a({className:c,parseClassName:o})}return l},KE=t=>{const n=new Map;return t.orderSensitiveModifiers.forEach((a,l)=>{n.set(a,1e6+l)}),a=>{const l=[];let o=[];for(let c=0;c<a.length;c++){const f=a[c],m=f[0]==="[",g=n.has(f);m||g?(o.length>0&&(o.sort(),l.push(...o),o=[]),l.push(f)):o.push(f)}return o.length>0&&(o.sort(),l.push(...o)),l}},GE=t=>({cache:qE(t.cacheSize),parseClassName:IE(t),sortModifiers:KE(t),...OE(t)}),YE=/\s+/,VE=(t,n)=>{const{parseClassName:a,getClassGroupId:l,getConflictingClassGroupIds:o,sortModifiers:c}=n,f=[],m=t.trim().split(YE);let g="";for(let p=m.length-1;p>=0;p-=1){const b=m[p],{isExternal:v,modifiers:x,hasImportantModifier:j,baseClassName:z,maybePostfixModifierPosition:w}=a(b);if(v){g=b+(g.length>0?" "+g:g);continue}let _=!!w,E=l(_?z.substring(0,w):z);if(!E){if(!_){g=b+(g.length>0?" "+g:g);continue}if(E=l(z),!E){g=b+(g.length>0?" "+g:g);continue}_=!1}const O=x.length===0?"":x.length===1?x[0]:c(x).join(":"),T=j?O+af:O,D=T+E;if(f.indexOf(D)>-1)continue;f.push(D);const L=o(E,_);for(let I=0;I<L.length;++I){const G=L[I];f.push(T+G)}g=b+(g.length>0?" "+g:g)}return g},PE=(...t)=>{let n=0,a,l,o="";for(;n<t.length;)(a=t[n++])&&(l=f0(a))&&(o&&(o+=" "),o+=l);return o},f0=t=>{if(typeof t=="string")return t;let n,a="";for(let l=0;l<t.length;l++)t[l]&&(n=f0(t[l]))&&(a&&(a+=" "),a+=n);return a},QE=(t,...n)=>{let a,l,o,c;const f=g=>{const p=n.reduce((b,v)=>v(b),t());return a=GE(p),l=a.cache.get,o=a.cache.set,c=m,m(g)},m=g=>{const p=l(g);if(p)return p;const b=VE(g,a);return o(g,b),b};return c=f,(...g)=>c(PE(...g))},XE=[],ht=t=>{const n=a=>a[t]||XE;return n.isThemeGetter=!0,n},h0=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,m0=/^\((?:(\w[\w-]*):)?(.+)\)$/i,JE=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,FE=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,WE=/\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$/,eC=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,tC=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,nC=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,zi=t=>JE.test(t),_e=t=>!!t&&!Number.isNaN(Number(t)),Ei=t=>!!t&&Number.isInteger(Number(t)),qd=t=>t.endsWith("%")&&_e(t.slice(0,-1)),Fn=t=>FE.test(t),p0=()=>!0,iC=t=>WE.test(t)&&!eC.test(t),Hf=()=>!1,aC=t=>tC.test(t),sC=t=>nC.test(t),lC=t=>!ce(t)&&!ue(t),rC=t=>Bi(t,v0,Hf),ce=t=>h0.test(t),aa=t=>Bi(t,b0,iC),Jy=t=>Bi(t,pC,_e),oC=t=>Bi(t,S0,p0),cC=t=>Bi(t,x0,Hf),Fy=t=>Bi(t,g0,Hf),uC=t=>Bi(t,y0,sC),po=t=>Bi(t,w0,aC),ue=t=>m0.test(t),xl=t=>ha(t,b0),dC=t=>ha(t,x0),Wy=t=>ha(t,g0),fC=t=>ha(t,v0),hC=t=>ha(t,y0),go=t=>ha(t,w0,!0),mC=t=>ha(t,S0,!0),Bi=(t,n,a)=>{const l=h0.exec(t);return l?l[1]?n(l[1]):a(l[2]):!1},ha=(t,n,a=!1)=>{const l=m0.exec(t);return l?l[1]?n(l[1]):a:!1},g0=t=>t==="position"||t==="percentage",y0=t=>t==="image"||t==="url",v0=t=>t==="length"||t==="size"||t==="bg-size",b0=t=>t==="length",pC=t=>t==="number",x0=t=>t==="family-name",S0=t=>t==="number"||t==="weight",w0=t=>t==="shadow",gC=()=>{const t=ht("color"),n=ht("font"),a=ht("text"),l=ht("font-weight"),o=ht("tracking"),c=ht("leading"),f=ht("breakpoint"),m=ht("container"),g=ht("spacing"),p=ht("radius"),b=ht("shadow"),v=ht("inset-shadow"),x=ht("text-shadow"),j=ht("drop-shadow"),z=ht("blur"),w=ht("perspective"),_=ht("aspect"),E=ht("ease"),O=ht("animate"),T=()=>["auto","avoid","all","avoid-page","page","left","right","column"],D=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],L=()=>[...D(),ue,ce],I=()=>["auto","hidden","clip","visible","scroll"],G=()=>["auto","contain","none"],M=()=>[ue,ce,g],F=()=>[zi,"full","auto",...M()],xe=()=>[Ei,"none","subgrid",ue,ce],X=()=>["auto",{span:["full",Ei,ue,ce]},Ei,ue,ce],le=()=>[Ei,"auto",ue,ce],$e=()=>["auto","min","max","fr",ue,ce],Ke=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],he=()=>["start","end","center","stretch","center-safe","end-safe"],U=()=>["auto",...M()],W=()=>[zi,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...M()],se=()=>[zi,"screen","full","dvw","lvw","svw","min","max","fit",...M()],ve=()=>[zi,"screen","full","lh","dvh","lvh","svh","min","max","fit",...M()],ee=()=>[t,ue,ce],C=()=>[...D(),Wy,Fy,{position:[ue,ce]}],K=()=>["no-repeat",{repeat:["","x","y","space","round"]}],te=()=>["auto","cover","contain",fC,rC,{size:[ue,ce]}],ie=()=>[qd,xl,aa],V=()=>["","none","full",p,ue,ce],re=()=>["",_e,xl,aa],q=()=>["solid","dashed","dotted","double"],de=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],me=()=>[_e,qd,Wy,Fy],et=()=>["","none",z,ue,ce],jt=()=>["none",_e,ue,ce],Zt=()=>["none",_e,ue,ce],Tn=()=>[_e,ue,ce],Tt=()=>[zi,"full",...M()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[Fn],breakpoint:[Fn],color:[p0],container:[Fn],"drop-shadow":[Fn],ease:["in","out","in-out"],font:[lC],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[Fn],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[Fn],shadow:[Fn],spacing:["px",_e],text:[Fn],"text-shadow":[Fn],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",zi,ce,ue,_]}],container:["container"],columns:[{columns:[_e,ce,ue,m]}],"break-after":[{"break-after":T()}],"break-before":[{"break-before":T()}],"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:L()}],overflow:[{overflow:I()}],"overflow-x":[{"overflow-x":I()}],"overflow-y":[{"overflow-y":I()}],overscroll:[{overscroll:G()}],"overscroll-x":[{"overscroll-x":G()}],"overscroll-y":[{"overscroll-y":G()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:F()}],"inset-x":[{"inset-x":F()}],"inset-y":[{"inset-y":F()}],start:[{"inset-s":F(),start:F()}],end:[{"inset-e":F(),end:F()}],"inset-bs":[{"inset-bs":F()}],"inset-be":[{"inset-be":F()}],top:[{top:F()}],right:[{right:F()}],bottom:[{bottom:F()}],left:[{left:F()}],visibility:["visible","invisible","collapse"],z:[{z:[Ei,"auto",ue,ce]}],basis:[{basis:[zi,"full","auto",m,...M()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[_e,zi,"auto","initial","none",ce]}],grow:[{grow:["",_e,ue,ce]}],shrink:[{shrink:["",_e,ue,ce]}],order:[{order:[Ei,"first","last","none",ue,ce]}],"grid-cols":[{"grid-cols":xe()}],"col-start-end":[{col:X()}],"col-start":[{"col-start":le()}],"col-end":[{"col-end":le()}],"grid-rows":[{"grid-rows":xe()}],"row-start-end":[{row:X()}],"row-start":[{"row-start":le()}],"row-end":[{"row-end":le()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":$e()}],"auto-rows":[{"auto-rows":$e()}],gap:[{gap:M()}],"gap-x":[{"gap-x":M()}],"gap-y":[{"gap-y":M()}],"justify-content":[{justify:[...Ke(),"normal"]}],"justify-items":[{"justify-items":[...he(),"normal"]}],"justify-self":[{"justify-self":["auto",...he()]}],"align-content":[{content:["normal",...Ke()]}],"align-items":[{items:[...he(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...he(),{baseline:["","last"]}]}],"place-content":[{"place-content":Ke()}],"place-items":[{"place-items":[...he(),"baseline"]}],"place-self":[{"place-self":["auto",...he()]}],p:[{p:M()}],px:[{px:M()}],py:[{py:M()}],ps:[{ps:M()}],pe:[{pe:M()}],pbs:[{pbs:M()}],pbe:[{pbe:M()}],pt:[{pt:M()}],pr:[{pr:M()}],pb:[{pb:M()}],pl:[{pl:M()}],m:[{m:U()}],mx:[{mx:U()}],my:[{my:U()}],ms:[{ms:U()}],me:[{me:U()}],mbs:[{mbs:U()}],mbe:[{mbe:U()}],mt:[{mt:U()}],mr:[{mr:U()}],mb:[{mb:U()}],ml:[{ml:U()}],"space-x":[{"space-x":M()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":M()}],"space-y-reverse":["space-y-reverse"],size:[{size:W()}],"inline-size":[{inline:["auto",...se()]}],"min-inline-size":[{"min-inline":["auto",...se()]}],"max-inline-size":[{"max-inline":["none",...se()]}],"block-size":[{block:["auto",...ve()]}],"min-block-size":[{"min-block":["auto",...ve()]}],"max-block-size":[{"max-block":["none",...ve()]}],w:[{w:[m,"screen",...W()]}],"min-w":[{"min-w":[m,"screen","none",...W()]}],"max-w":[{"max-w":[m,"screen","none","prose",{screen:[f]},...W()]}],h:[{h:["screen","lh",...W()]}],"min-h":[{"min-h":["screen","lh","none",...W()]}],"max-h":[{"max-h":["screen","lh",...W()]}],"font-size":[{text:["base",a,xl,aa]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[l,mC,oC]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",qd,ce]}],"font-family":[{font:[dC,cC,n]}],"font-features":[{"font-features":[ce]}],"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:[o,ue,ce]}],"line-clamp":[{"line-clamp":[_e,"none",ue,Jy]}],leading:[{leading:[c,...M()]}],"list-image":[{"list-image":["none",ue,ce]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",ue,ce]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:ee()}],"text-color":[{text:ee()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...q(),"wavy"]}],"text-decoration-thickness":[{decoration:[_e,"from-font","auto",ue,aa]}],"text-decoration-color":[{decoration:ee()}],"underline-offset":[{"underline-offset":[_e,"auto",ue,ce]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:M()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",ue,ce]}],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",ue,ce]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:C()}],"bg-repeat":[{bg:K()}],"bg-size":[{bg:te()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},Ei,ue,ce],radial:["",ue,ce],conic:[Ei,ue,ce]},hC,uC]}],"bg-color":[{bg:ee()}],"gradient-from-pos":[{from:ie()}],"gradient-via-pos":[{via:ie()}],"gradient-to-pos":[{to:ie()}],"gradient-from":[{from:ee()}],"gradient-via":[{via:ee()}],"gradient-to":[{to:ee()}],rounded:[{rounded:V()}],"rounded-s":[{"rounded-s":V()}],"rounded-e":[{"rounded-e":V()}],"rounded-t":[{"rounded-t":V()}],"rounded-r":[{"rounded-r":V()}],"rounded-b":[{"rounded-b":V()}],"rounded-l":[{"rounded-l":V()}],"rounded-ss":[{"rounded-ss":V()}],"rounded-se":[{"rounded-se":V()}],"rounded-ee":[{"rounded-ee":V()}],"rounded-es":[{"rounded-es":V()}],"rounded-tl":[{"rounded-tl":V()}],"rounded-tr":[{"rounded-tr":V()}],"rounded-br":[{"rounded-br":V()}],"rounded-bl":[{"rounded-bl":V()}],"border-w":[{border:re()}],"border-w-x":[{"border-x":re()}],"border-w-y":[{"border-y":re()}],"border-w-s":[{"border-s":re()}],"border-w-e":[{"border-e":re()}],"border-w-bs":[{"border-bs":re()}],"border-w-be":[{"border-be":re()}],"border-w-t":[{"border-t":re()}],"border-w-r":[{"border-r":re()}],"border-w-b":[{"border-b":re()}],"border-w-l":[{"border-l":re()}],"divide-x":[{"divide-x":re()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":re()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...q(),"hidden","none"]}],"divide-style":[{divide:[...q(),"hidden","none"]}],"border-color":[{border:ee()}],"border-color-x":[{"border-x":ee()}],"border-color-y":[{"border-y":ee()}],"border-color-s":[{"border-s":ee()}],"border-color-e":[{"border-e":ee()}],"border-color-bs":[{"border-bs":ee()}],"border-color-be":[{"border-be":ee()}],"border-color-t":[{"border-t":ee()}],"border-color-r":[{"border-r":ee()}],"border-color-b":[{"border-b":ee()}],"border-color-l":[{"border-l":ee()}],"divide-color":[{divide:ee()}],"outline-style":[{outline:[...q(),"none","hidden"]}],"outline-offset":[{"outline-offset":[_e,ue,ce]}],"outline-w":[{outline:["",_e,xl,aa]}],"outline-color":[{outline:ee()}],shadow:[{shadow:["","none",b,go,po]}],"shadow-color":[{shadow:ee()}],"inset-shadow":[{"inset-shadow":["none",v,go,po]}],"inset-shadow-color":[{"inset-shadow":ee()}],"ring-w":[{ring:re()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:ee()}],"ring-offset-w":[{"ring-offset":[_e,aa]}],"ring-offset-color":[{"ring-offset":ee()}],"inset-ring-w":[{"inset-ring":re()}],"inset-ring-color":[{"inset-ring":ee()}],"text-shadow":[{"text-shadow":["none",x,go,po]}],"text-shadow-color":[{"text-shadow":ee()}],opacity:[{opacity:[_e,ue,ce]}],"mix-blend":[{"mix-blend":[...de(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":de()}],"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":[_e]}],"mask-image-linear-from-pos":[{"mask-linear-from":me()}],"mask-image-linear-to-pos":[{"mask-linear-to":me()}],"mask-image-linear-from-color":[{"mask-linear-from":ee()}],"mask-image-linear-to-color":[{"mask-linear-to":ee()}],"mask-image-t-from-pos":[{"mask-t-from":me()}],"mask-image-t-to-pos":[{"mask-t-to":me()}],"mask-image-t-from-color":[{"mask-t-from":ee()}],"mask-image-t-to-color":[{"mask-t-to":ee()}],"mask-image-r-from-pos":[{"mask-r-from":me()}],"mask-image-r-to-pos":[{"mask-r-to":me()}],"mask-image-r-from-color":[{"mask-r-from":ee()}],"mask-image-r-to-color":[{"mask-r-to":ee()}],"mask-image-b-from-pos":[{"mask-b-from":me()}],"mask-image-b-to-pos":[{"mask-b-to":me()}],"mask-image-b-from-color":[{"mask-b-from":ee()}],"mask-image-b-to-color":[{"mask-b-to":ee()}],"mask-image-l-from-pos":[{"mask-l-from":me()}],"mask-image-l-to-pos":[{"mask-l-to":me()}],"mask-image-l-from-color":[{"mask-l-from":ee()}],"mask-image-l-to-color":[{"mask-l-to":ee()}],"mask-image-x-from-pos":[{"mask-x-from":me()}],"mask-image-x-to-pos":[{"mask-x-to":me()}],"mask-image-x-from-color":[{"mask-x-from":ee()}],"mask-image-x-to-color":[{"mask-x-to":ee()}],"mask-image-y-from-pos":[{"mask-y-from":me()}],"mask-image-y-to-pos":[{"mask-y-to":me()}],"mask-image-y-from-color":[{"mask-y-from":ee()}],"mask-image-y-to-color":[{"mask-y-to":ee()}],"mask-image-radial":[{"mask-radial":[ue,ce]}],"mask-image-radial-from-pos":[{"mask-radial-from":me()}],"mask-image-radial-to-pos":[{"mask-radial-to":me()}],"mask-image-radial-from-color":[{"mask-radial-from":ee()}],"mask-image-radial-to-color":[{"mask-radial-to":ee()}],"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":D()}],"mask-image-conic-pos":[{"mask-conic":[_e]}],"mask-image-conic-from-pos":[{"mask-conic-from":me()}],"mask-image-conic-to-pos":[{"mask-conic-to":me()}],"mask-image-conic-from-color":[{"mask-conic-from":ee()}],"mask-image-conic-to-color":[{"mask-conic-to":ee()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:C()}],"mask-repeat":[{mask:K()}],"mask-size":[{mask:te()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",ue,ce]}],filter:[{filter:["","none",ue,ce]}],blur:[{blur:et()}],brightness:[{brightness:[_e,ue,ce]}],contrast:[{contrast:[_e,ue,ce]}],"drop-shadow":[{"drop-shadow":["","none",j,go,po]}],"drop-shadow-color":[{"drop-shadow":ee()}],grayscale:[{grayscale:["",_e,ue,ce]}],"hue-rotate":[{"hue-rotate":[_e,ue,ce]}],invert:[{invert:["",_e,ue,ce]}],saturate:[{saturate:[_e,ue,ce]}],sepia:[{sepia:["",_e,ue,ce]}],"backdrop-filter":[{"backdrop-filter":["","none",ue,ce]}],"backdrop-blur":[{"backdrop-blur":et()}],"backdrop-brightness":[{"backdrop-brightness":[_e,ue,ce]}],"backdrop-contrast":[{"backdrop-contrast":[_e,ue,ce]}],"backdrop-grayscale":[{"backdrop-grayscale":["",_e,ue,ce]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[_e,ue,ce]}],"backdrop-invert":[{"backdrop-invert":["",_e,ue,ce]}],"backdrop-opacity":[{"backdrop-opacity":[_e,ue,ce]}],"backdrop-saturate":[{"backdrop-saturate":[_e,ue,ce]}],"backdrop-sepia":[{"backdrop-sepia":["",_e,ue,ce]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":M()}],"border-spacing-x":[{"border-spacing-x":M()}],"border-spacing-y":[{"border-spacing-y":M()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",ue,ce]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[_e,"initial",ue,ce]}],ease:[{ease:["linear","initial",E,ue,ce]}],delay:[{delay:[_e,ue,ce]}],animate:[{animate:["none",O,ue,ce]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[w,ue,ce]}],"perspective-origin":[{"perspective-origin":L()}],rotate:[{rotate:jt()}],"rotate-x":[{"rotate-x":jt()}],"rotate-y":[{"rotate-y":jt()}],"rotate-z":[{"rotate-z":jt()}],scale:[{scale:Zt()}],"scale-x":[{"scale-x":Zt()}],"scale-y":[{"scale-y":Zt()}],"scale-z":[{"scale-z":Zt()}],"scale-3d":["scale-3d"],skew:[{skew:Tn()}],"skew-x":[{"skew-x":Tn()}],"skew-y":[{"skew-y":Tn()}],transform:[{transform:[ue,ce,"","none","gpu","cpu"]}],"transform-origin":[{origin:L()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:Tt()}],"translate-x":[{"translate-x":Tt()}],"translate-y":[{"translate-y":Tt()}],"translate-z":[{"translate-z":Tt()}],"translate-none":["translate-none"],accent:[{accent:ee()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:ee()}],"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",ue,ce]}],"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":M()}],"scroll-mx":[{"scroll-mx":M()}],"scroll-my":[{"scroll-my":M()}],"scroll-ms":[{"scroll-ms":M()}],"scroll-me":[{"scroll-me":M()}],"scroll-mbs":[{"scroll-mbs":M()}],"scroll-mbe":[{"scroll-mbe":M()}],"scroll-mt":[{"scroll-mt":M()}],"scroll-mr":[{"scroll-mr":M()}],"scroll-mb":[{"scroll-mb":M()}],"scroll-ml":[{"scroll-ml":M()}],"scroll-p":[{"scroll-p":M()}],"scroll-px":[{"scroll-px":M()}],"scroll-py":[{"scroll-py":M()}],"scroll-ps":[{"scroll-ps":M()}],"scroll-pe":[{"scroll-pe":M()}],"scroll-pbs":[{"scroll-pbs":M()}],"scroll-pbe":[{"scroll-pbe":M()}],"scroll-pt":[{"scroll-pt":M()}],"scroll-pr":[{"scroll-pr":M()}],"scroll-pb":[{"scroll-pb":M()}],"scroll-pl":[{"scroll-pl":M()}],"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",ue,ce]}],fill:[{fill:["none",...ee()]}],"stroke-w":[{stroke:[_e,xl,aa,Jy]}],stroke:[{stroke:["none",...ee()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}},yC=QE(gC);function mn(...t){return yC(r0(t))}const vC=o0("inline-flex items-center rounded-md border px-2 py-0.5 text-[11px] font-medium tracking-wide",{variants:{variant:{neutral:"border-zinc-800 bg-zinc-950 text-zinc-300",success:"border-emerald-500/25 bg-emerald-500/10 text-emerald-300",warning:"border-amber-500/25 bg-amber-500/10 text-amber-300",destructive:"border-rose-500/25 bg-rose-500/10 text-rose-300"}},defaultVariants:{variant:"neutral"}});function N0({className:t,variant:n,...a}){return u.jsx("div",{className:mn(vC({variant:n}),t),...a})}var bC=Symbol.for("react.lazy"),Oo=of[" use ".trim().toString()];function xC(t){return typeof t=="object"&&t!==null&&"then"in t}function j0(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===bC&&"_payload"in t&&xC(t._payload)}function SC(t){const n=NC(t),a=N.forwardRef((l,o)=>{let{children:c,...f}=l;j0(c)&&typeof Oo=="function"&&(c=Oo(c._payload));const m=N.Children.toArray(c),g=m.find(_C);if(g){const p=g.props.children,b=m.map(v=>v===g?N.Children.count(p)>1?N.Children.only(null):N.isValidElement(p)?p.props.children:null:v);return u.jsx(n,{...f,ref:o,children:N.isValidElement(p)?N.cloneElement(p,void 0,b):null})}return u.jsx(n,{...f,ref:o,children:c})});return a.displayName=`${t}.Slot`,a}var wC=SC("Slot");function NC(t){const n=N.forwardRef((a,l)=>{let{children:o,...c}=a;if(j0(o)&&typeof Oo=="function"&&(o=Oo(o._payload)),N.isValidElement(o)){const f=zC(o),m=kC(c,o.props);return o.type!==N.Fragment&&(m.ref=l?jf(l,f):f),N.cloneElement(o,m)}return N.Children.count(o)>1?N.Children.only(null):null});return n.displayName=`${t}.SlotClone`,n}var jC=Symbol("radix.slottable");function _C(t){return N.isValidElement(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===jC}function kC(t,n){const a={...n};for(const l in n){const o=t[l],c=n[l];/^on[A-Z]/.test(l)?o&&c?a[l]=(...m)=>{const g=c(...m);return o(...m),g}:o&&(a[l]=o):l==="style"?a[l]={...o,...c}:l==="className"&&(a[l]=[o,c].filter(Boolean).join(" "))}return{...t,...a}}function zC(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}const EC=o0("inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 focus-visible:ring-offset-2 focus-visible:ring-offset-black disabled:pointer-events-none disabled:opacity-50",{variants:{variant:{default:"bg-zinc-50 text-black hover:bg-zinc-200",secondary:"border border-zinc-800 bg-zinc-950 text-zinc-100 hover:bg-zinc-900",ghost:"text-zinc-400 hover:bg-zinc-900 hover:text-zinc-50",outline:"border border-zinc-800 bg-transparent text-zinc-100 hover:bg-zinc-900",destructive:"bg-rose-600 text-white hover:bg-rose-700"},size:{default:"h-9 px-4",sm:"h-8 px-3 text-xs",icon:"size-9"}},defaultVariants:{variant:"default",size:"default"}}),pe=N.forwardRef(({className:t,variant:n,size:a,asChild:l=!1,...o},c)=>{const f=l?wC:"button";return u.jsx(f,{ref:c,className:mn(EC({variant:n,size:a,className:t})),...o})});pe.displayName="Button";const ut=N.forwardRef(({className:t,...n},a)=>u.jsx("div",{ref:a,className:mn("rounded-xl border border-zinc-800 bg-zinc-950/75 shadow-[0_0_0_1px_rgba(255,255,255,0.01)] backdrop-blur",t),...n}));ut.displayName="Card";const CC=N.forwardRef(({className:t,...n},a)=>u.jsx("div",{ref:a,className:mn("flex flex-col gap-1.5 p-5",t),...n}));CC.displayName="CardHeader";const AC=N.forwardRef(({className:t,...n},a)=>u.jsx("h3",{ref:a,className:mn("font-medium tracking-tight text-zinc-50",t),...n}));AC.displayName="CardTitle";const TC=N.forwardRef(({className:t,...n},a)=>u.jsx("p",{ref:a,className:mn("text-sm text-zinc-500",t),...n}));TC.displayName="CardDescription";const OC=N.forwardRef(({className:t,...n},a)=>u.jsx("div",{ref:a,className:mn("p-5 pt-0",t),...n}));OC.displayName="CardContent";const DC=Nb,RC=jb,_0=N.forwardRef(({className:t,...n},a)=>u.jsx(Ef,{ref:a,className:mn("fixed inset-0 z-50 bg-black/70 backdrop-blur-sm",t),...n}));_0.displayName=Ef.displayName;const MC=400,LC=1200,UC=720,k0=N.forwardRef(({className:t,children:n,...a},l)=>{const[o,c]=N.useState(UC),f=N.useRef(!1),m=N.useRef(0),g=N.useRef(0),p=N.useCallback(x=>{f.current=!0,m.current=x.clientX,g.current=o,x.target.setPointerCapture(x.pointerId),x.preventDefault()},[o]),b=N.useCallback(x=>{if(!f.current)return;const j=m.current-x.clientX,z=Math.min(LC,Math.max(MC,g.current+j));c(z)},[]),v=N.useCallback(()=>{f.current=!1},[]);return u.jsxs(RC,{children:[u.jsx(_0,{}),u.jsxs(Cf,{ref:l,className:mn("fixed z-50 flex flex-col bg-zinc-950 px-5 py-4 shadow-2xl overflow-hidden","max-md:inset-x-0 max-md:bottom-0 max-md:top-auto max-md:max-h-[88vh] max-md:rounded-t-2xl max-md:border-t","md:inset-y-0 md:right-0 md:h-full md:border-l","border-zinc-800",t),style:{width:`min(${o}px, 100vw)`},...a,children:[u.jsx("div",{className:"absolute inset-y-0 left-0 w-1.5 cursor-col-resize hover:bg-zinc-700/50 active:bg-zinc-600/50 transition-colors max-md:hidden",onPointerDown:p,onPointerMove:b,onPointerUp:v}),n,u.jsxs(kb,{className:"absolute right-4 top-4 inline-flex size-8 items-center justify-center rounded-md text-zinc-500 transition hover:bg-zinc-900 hover:text-zinc-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400",children:[u.jsx(Of,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]})]})});k0.displayName=Cf.displayName;const $C=({className:t,...n})=>u.jsx("div",{className:mn("flex flex-col gap-1.5 pr-10",t),...n}),z0=N.forwardRef(({className:t,...n},a)=>u.jsx(Af,{ref:a,className:mn("text-lg font-medium text-zinc-50",t),...n}));z0.displayName=Af.displayName;const E0=N.forwardRef(({className:t,...n},a)=>u.jsx(_b,{ref:a,className:mn("text-sm text-zinc-500",t),...n}));E0.displayName=_b.displayName;function xn(t){const n=new Date("2026-02-20");return t.map((a,l)=>({runId:`run_mock_${l+1}`,citationState:a,createdAt:new Date(n.getTime()+l*2*24*60*60*1e3).toISOString()}))}const ms=[{id:"project_citypoint",name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",ownedDomains:[],country:"US",language:"en",tags:["local intent","priority"],labels:{},configSource:"cli",configRevision:1},{id:"project_harbor",name:"Harbor Legal Group",canonicalDomain:"harborlegal.com",ownedDomains:[],country:"US",language:"en",tags:["lead gen"],labels:{},configSource:"cli",configRevision:1},{id:"project_northstar",name:"Northstar Orthopedics",canonicalDomain:"northstarortho.com",ownedDomains:[],country:"US",language:"en",tags:["multi-location"],labels:{},configSource:"cli",configRevision:1}];function Wo(t){return{id:t.id,projectId:t.projectId,projectName:t.projectName,kind:t.kind,kindLabel:t.kindLabel,status:t.status,trigger:t.trigger??"manual",createdAt:t.createdAt,startedAt:t.startedAt,duration:t.duration,statusDetail:t.statusDetail,summary:t.summary,triggerLabel:t.triggerLabel}}const Do=Wo({id:"run_citypoint_visibility_20260308",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T12:15:00.000Z",startedAt:"Mar 8, 12:15 PM",duration:"6m 12s",statusDetail:"18 tracked queries checked; 3 citation losses detected on emergency-intent prompts.",summary:"Citation losses on emergency-intent prompts",triggerLabel:"Scheduled"}),If=Wo({id:"run_citypoint_queued_20260309",projectId:"project_citypoint",projectName:"Citypoint Dental NYC",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"queued",createdAt:"2026-03-09T08:05:00.000Z",startedAt:"Mar 9, 8:05 AM",duration:"Waiting for slot",statusDetail:"Ready to enqueue after the next provider rate window clears.",summary:"Queued follow-up after local ranking movement",triggerLabel:"Manual"}),Kf=Wo({id:"run_harbor_visibility_20260308",projectId:"project_harbor",projectName:"Harbor Legal Group",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"completed",createdAt:"2026-03-08T11:05:00.000Z",startedAt:"Mar 8, 11:05 AM",duration:"5m 07s",statusDetail:"12 tracked queries checked; local-intent visibility held steady across branded prompts.",summary:"Branded prompts remain stable",triggerLabel:"Scheduled"}),Ro=Wo({id:"run_northstar_visibility_20260308",projectId:"project_northstar",projectName:"Northstar Orthopedics",kind:"answer-visibility",kindLabel:"Answer visibility sweep",status:"running",createdAt:"2026-03-08T13:40:00.000Z",startedAt:"Mar 8, 1:40 PM",duration:"3m 10s",statusDetail:"Provider responses still in flight for 9 multi-location prompts.",summary:"Mid-run on treatment-location prompts",triggerLabel:"Manual"}),BC=[If,Do,Kf,Ro],ZC=[{id:"evidence_citypoint_emergency_gemini",keyword:"emergency dentist brooklyn",provider:"gemini",model:"gemini-3-flash",citationState:"lost",changeLabel:"Lost since Mar 5",answerSnippet:"For urgent dental care in Brooklyn, Downtown Smiles and Harbor Dental are now cited first for emergency availability and same-day booking.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:["https://downtownsmiles.com/emergency-dentist-brooklyn","https://harbordental.com/same-day-emergency-care"],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing on the emergency service page","llms.txt not found during latest site audit","Location pages link weakly into the emergency care hub"],summary:"AI answers now cite two competitors while your emergency page is no longer grounded.",runHistory:xn(["cited","cited","cited","cited","cited","cited","cited","not-cited","not-cited"])},{id:"evidence_citypoint_emergency_openai",keyword:"emergency dentist brooklyn",provider:"openai",model:"gpt-5.4",citationState:"cited",changeLabel:"Cited for 6 runs",answerSnippet:"Citypoint Dental is listed as a top emergency dentist in Brooklyn for same-day appointments and walk-in availability.",citedDomains:["citypointdental.com","downtownsmiles.com"],evidenceUrls:["https://citypointdental.com/emergency-dentist-brooklyn"],competitorDomains:["downtownsmiles.com"],groundingSources:[],relatedTechnicalSignals:["Emergency page indexed with structured data"],summary:"OpenAI cites your emergency page consistently alongside one competitor.",runHistory:xn(["not-cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_emergency_claude",keyword:"emergency dentist brooklyn",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"Based on the search results, top-rated emergency dental practices in Brooklyn include Downtown Smiles and Harbor Dental.",citedDomains:["downtownsmiles.com","harbordental.com"],evidenceUrls:[],competitorDomains:["downtownsmiles.com","harbordental.com"],groundingSources:[],relatedTechnicalSignals:["FAQ schema missing","llms.txt not found"],summary:"Claude does not cite your domain for this emergency query.",runHistory:xn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_invisalign_openai",keyword:"best invisalign dentist downtown brooklyn",provider:"openai",model:"gpt-5.4",citationState:"emerging",changeLabel:"First citation in 7 days",answerSnippet:"Citypoint Dental appears as an emerging recommendation for Invisalign in Downtown Brooklyn, supported by recent before-and-after case pages.",citedDomains:["citypointdental.com","clearlineortho.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn","https://citypointdental.com/case-studies/invisalign-open-bite"],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["Structured data now present on two case-study pages","Internal links from service pages to case studies improved crawl depth"],summary:"Fresh case-study content is starting to earn citations on Invisalign prompts.",runHistory:xn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","cited"])},{id:"evidence_citypoint_invisalign_gemini",keyword:"best invisalign dentist downtown brooklyn",provider:"gemini",model:"gemini-3-flash",citationState:"cited",changeLabel:"Cited for 8 runs",answerSnippet:"Citypoint Dental in Downtown Brooklyn is highlighted for its Invisalign expertise and patient outcomes.",citedDomains:["citypointdental.com"],evidenceUrls:["https://citypointdental.com/invisalign-downtown-brooklyn"],competitorDomains:[],groundingSources:[],relatedTechnicalSignals:["Case study pages well-indexed"],summary:"Gemini consistently cites your Invisalign page with no competitor overlap.",runHistory:xn(["cited","cited","cited","cited","cited","cited","cited","cited"])},{id:"evidence_citypoint_invisalign_claude",keyword:"best invisalign dentist downtown brooklyn",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For Invisalign in Downtown Brooklyn, Clear Line Ortho and Brooklyn Smiles are frequently recommended for their experienced orthodontists.",citedDomains:["clearlineortho.com","brooklynsmiles.com"],evidenceUrls:[],competitorDomains:["clearlineortho.com"],groundingSources:[],relatedTechnicalSignals:["No before/after schema on case study pages"],summary:"Claude does not surface your Invisalign content despite strong page quality.",runHistory:xn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_claude",keyword:"pediatric dentist brooklyn heights",provider:"claude",model:"claude-sonnet-4-6",citationState:"not-cited",changeLabel:"No citation across 4 runs",answerSnippet:"Answers cite neighborhood-specific pediatric practices with stronger family-focused FAQ content and clearer insurance details.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:["https://brightkidsdental.com/pediatric-dentist-brooklyn-heights","https://parkpediatricdental.com/insurance"],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric service page exists for Brooklyn Heights","Insurance content is buried three clicks deep"],summary:"Coverage gap is content-driven, not purely technical.",runHistory:xn(["not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_gemini",keyword:"pediatric dentist brooklyn heights",provider:"gemini",model:"gemini-3-flash",citationState:"not-cited",changeLabel:"No citation across 12 runs",answerSnippet:"For pediatric dentistry in Brooklyn Heights, Bright Kids Dental and Park Pediatric Dental are cited for family-friendly care.",citedDomains:["brightkidsdental.com","parkpediatricdental.com"],evidenceUrls:[],competitorDomains:["brightkidsdental.com","parkpediatricdental.com"],groundingSources:[],relatedTechnicalSignals:["No dedicated pediatric page for Brooklyn Heights"],summary:"Gemini does not surface your domain for pediatric queries in this area.",runHistory:xn(["not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited","not-cited"])},{id:"evidence_citypoint_children_openai",keyword:"pediatric dentist brooklyn heights",provider:"openai",model:"gpt-5.4",citationState:"cited",changeLabel:"First citation this month",answerSnippet:"Citypoint Dental is mentioned as offering pediatric services in Brooklyn, though specialized pediatric-only practices are also highlighted.",citedDomains:["citypointdental.com","brightkidsdental.com"],evidenceUrls:["https://citypointdental.com/family-dentistry"],competitorDomains:["brightkidsdental.com"],groundingSources:[],relatedTechnicalSignals:["Family dentistry page recently updated"],summary:"OpenAI recently started citing your family dentistry page for this query.",runHistory:xn(["not-cited","not-cited","not-cited","not-cited","not-cited","cited"])}],qC=[{project:ms[0],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Local-intent monitoring",visibilitySummary:{label:"Answer Visibility",value:"61 / 100",delta:"-8 this week",tone:"caution",description:"Lost citation share on emergency-intent prompts while Invisalign visibility improved.",trend:[73,71,69,66,61]},providerScores:[{provider:"gemini",model:"gemini-3-flash",score:55,cited:5,total:9},{provider:"openai",model:"gpt-5.4",score:67,cited:6,total:9},{provider:"claude",model:"claude-sonnet-4-6",score:44,cited:4,total:9}],competitorPressure:{label:"Competitor Pressure",value:"High",delta:"2 rivals moved up",tone:"negative",description:"Downtown Smiles and Harbor Dental now own the highest-intent local prompts.",trend:[54,58,61,65,69]},runStatus:{label:"Run Status",value:"Partial",delta:"1 queued follow-up",tone:"caution",description:"Latest visibility sweep completed; next sweep is queued.",trend:[76,74,72,68,67]},insights:[{id:"insight_citypoint_lost_citations",tone:"negative",title:"Lost citation on 1 key phrase",detail:"Emergency-intent prompts stopped grounding Citypoint after competitors refreshed.",actionLabel:"Lost",affectedPhrases:[{keyword:"emergency dentist brooklyn",evidenceId:"evidence_citypoint_emergency_gemini",provider:"gemini",citationState:"lost"}]},{id:"insight_citypoint_emerging",tone:"positive",title:"New citation on 1 key phrase",detail:"Case-study content is earning citations on Invisalign prompts.",actionLabel:"Emerging",affectedPhrases:[{keyword:"best invisalign dentist downtown brooklyn",evidenceId:"evidence_citypoint_invisalign_openai",provider:"openai",citationState:"emerging"}]},{id:"insight_citypoint_content_gap",tone:"caution",title:"1 key phrase not cited by any provider",detail:"No dedicated neighborhood page to support pediatric queries.",actionLabel:"Gap",affectedPhrases:[{keyword:"pediatric dentist brooklyn heights",evidenceId:"evidence_citypoint_children_claude",provider:"claude",citationState:"not-cited"}]}],visibilityEvidence:ZC,competitors:[{id:"competitor_citypoint_downtown",domain:"downtownsmiles.com",citationCount:4,totalKeywords:8,pressureLabel:"High",citedKeywords:["emergency dentist","same-day dental","walk-in dentist","tooth pain"],movement:"Up on emergency and availability prompts",notes:"Recently added same-day booking proof and FAQ content."},{id:"competitor_citypoint_harbor",domain:"harbordental.com",citationCount:2,totalKeywords:8,pressureLabel:"Moderate",citedKeywords:["family dentist","emergency dentist"],movement:"Holding citations on family and emergency intents",notes:"Strong appointment and insurance content keeps answers grounded."},{id:"competitor_citypoint_clearline",domain:"clearlineortho.com",citationCount:1,totalKeywords:8,pressureLabel:"Low",citedKeywords:["invisalign near me"],movement:"Softening on Invisalign prompts",notes:"Case-study content is aging, opening room for Citypoint."}],recentRuns:[If,Do]},{project:ms[1],dateRangeLabel:"Last 14 days",contextLabel:"US / English / Service-area legal prompts",visibilitySummary:{label:"Answer Visibility",value:"74 / 100",delta:"+2 this week",tone:"positive",description:"Branded prompts are stable and informational queries are gradually improving.",trend:[68,70,71,73,74]},providerScores:[{provider:"gemini",model:"gemini-3-flash",score:75,cited:3,total:4},{provider:"openai",model:"gpt-5.4",score:50,cited:2,total:4}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Steady",tone:"neutral",description:"Competitors are stable; no new citation displacement was detected.",trend:[44,46,45,46,46]},runStatus:{label:"Run Status",value:"Healthy",delta:"No failures in 14 days",tone:"positive",description:"Latest visibility runs completed without issues.",trend:[88,89,90,90,91]},insights:[{id:"insight_harbor_cluster",tone:"positive",title:"Practice-area clustering is paying off",detail:"Merged legal service pages now ground broader informational prompts.",actionLabel:"Cited",affectedPhrases:[{keyword:"brooklyn personal injury lawyer",evidenceId:"evidence_harbor_personal_injury",provider:"gemini",citationState:"cited"}]},{id:"insight_harbor_local",tone:"neutral",title:"No significant changes",detail:"No new displacement on borough-specific injury prompts this week.",actionLabel:"Stable",affectedPhrases:[]}],visibilityEvidence:[{id:"evidence_harbor_personal_injury",keyword:"brooklyn personal injury lawyer",provider:"gemini",model:"gemini-3-flash",citationState:"cited",changeLabel:"Held for 5 runs",answerSnippet:"Harbor Legal Group remains cited for borough-specific personal injury queries due to clear practice-area and case-result content.",citedDomains:["harborlegal.com"],evidenceUrls:["https://harborlegal.com/personal-injury/brooklyn"],competitorDomains:["shorelineinjury.com"],groundingSources:[],relatedTechnicalSignals:["Practice-area schema intact","Case results link directly from service pages"],summary:"Grounding remains durable after the service-page consolidation.",runHistory:xn(["cited","cited","cited","cited","cited"])}],competitors:[{id:"competitor_harbor_shoreline",domain:"shorelineinjury.com",citationCount:2,totalKeywords:6,pressureLabel:"Moderate",citedKeywords:["personal injury lawyer","car accident attorney"],movement:"Stable",notes:"Strong case-result pages keep it in rotation."}],recentRuns:[Kf]},{project:ms[2],dateRangeLabel:"Last 7 days",contextLabel:"US / English / Multi-location treatment prompts",visibilitySummary:{label:"Answer Visibility",value:"58 / 100",delta:"Run in progress",tone:"neutral",description:"The current run is measuring whether treatment-location pages improved citation breadth.",trend:[52,54,55,57,58]},providerScores:[{provider:"openai",model:"gpt-5.4",score:58,cited:4,total:7}],competitorPressure:{label:"Competitor Pressure",value:"Moderate",delta:"Watching 1 chain",tone:"caution",description:"Regional chain competitors are winning on broad treatment questions.",trend:[49,51,52,54,56]},runStatus:{label:"Run Status",value:"Running",delta:"9 prompts remaining",tone:"neutral",description:"Current answer-visibility sweep is still collecting provider responses.",trend:[63,64,65,67,68]},insights:[{id:"insight_northstar_location_depth",tone:"caution",title:"Location pages need stronger proof",detail:"Answers prefer competitors with physician-specific evidence.",actionLabel:"Gap",affectedPhrases:[{keyword:"knee replacement surgeon westchester",evidenceId:"evidence_northstar_knee",provider:"openai",citationState:"emerging"}]}],visibilityEvidence:[{id:"evidence_northstar_knee",keyword:"knee replacement surgeon westchester",provider:"openai",model:"gpt-5.4",citationState:"emerging",changeLabel:"Improving",answerSnippet:"Northstar Orthopedics is beginning to appear on location-sensitive treatment prompts when physician bios and treatment pages are tightly linked.",citedDomains:["northstarortho.com","regionaljointcare.com"],evidenceUrls:["https://northstarortho.com/locations/westchester/knee-replacement"],competitorDomains:["regionaljointcare.com"],groundingSources:[],relatedTechnicalSignals:["Physician bios now linked from treatment pages"],summary:"Template cleanup is helping, but proof depth still matters.",runHistory:xn(["not-cited","not-cited","not-cited","cited"])}],competitors:[{id:"competitor_northstar_regional",domain:"regionaljointcare.com",citationCount:5,totalKeywords:7,pressureLabel:"High",citedKeywords:["knee replacement","hip surgery","joint pain treatment","orthopedic surgeon","sports medicine"],movement:"Winning broad treatment prompts",notes:"Heavy physician proof and patient-story content."}],recentRuns:[Ro]}],HC={portfolioOverview:{projects:[{project:ms[0],visibilityScore:61,visibilityDelta:"-8 this week",lastRun:Do,insight:"Lost emergency-intent citations after competitors refreshed availability pages.",trend:[73,71,69,66,61],competitorPressureLabel:"High"},{project:ms[1],visibilityScore:74,visibilityDelta:"+2 this week",lastRun:Kf,insight:"Practice-area consolidation is stabilizing branded and informational prompts.",trend:[68,70,71,73,74],competitorPressureLabel:"Moderate"},{project:ms[2],visibilityScore:58,visibilityDelta:"Run in progress",lastRun:Ro,insight:"Location pages are improving, but local treatment proof still trails competitors.",trend:[52,54,55,57,58],competitorPressureLabel:"Moderate"}],attentionItems:[{id:"attention_citypoint",tone:"negative",title:"Citypoint Dental lost emergency-intent citations",detail:"Three high-intent prompts now cite competitors first.",actionLabel:"Open project",href:"/projects/project_citypoint"},{id:"attention_worker",tone:"neutral",title:"One follow-up run is queued",detail:"Citypoint has a queued visibility sweep waiting on provider quota.",actionLabel:"Open runs",href:"/runs"},{id:"attention_northstar",tone:"caution",title:"Northstar run still in progress",detail:"Nine prompts remain before the current treatment-location sweep finishes.",actionLabel:"View timeline",href:"/runs"}],recentRuns:[If,Ro,Do],systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Healthy",meta:"phase-1 · database configured"},{id:"worker",label:"Worker",tone:"positive",detail:"Healthy",meta:"heartbeat moments ago"},{id:"providers",label:"Providers",tone:"positive",detail:"2 of 3 configured",meta:"Gemini · OpenAI"}],lastUpdatedAt:"Mar 9, 8:08 AM ET"},projects:qC,runs:BC,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"Primary control plane is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"worker",label:"Worker heartbeats received",detail:"Background execution loop is alive.",state:"ready",guidance:"Required before any answer-visibility run can start."},{id:"provider",label:"Provider configured",detail:"Gemini key and quota defaults are present.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"Citypoint Dental NYC",canonicalDomain:"citypointdental.com",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:18,preview:["emergency dentist brooklyn","best invisalign dentist downtown brooklyn","pediatric dentist brooklyn heights"]},competitorDraft:{domains:["downtownsmiles.com","harbordental.com","clearlineortho.com"],notes:"Start with the domains that already displace the project on money prompts."},launchState:{enabled:!0,ctaLabel:"Launch first run",summary:"Queue a visibility sweep first, then follow with a site audit to explain movement."}},settings:{providerStatuses:[{name:"Gemini",model:"gemini-3-flash",state:"ready",detail:"API key detected and conservative quota defaults are active.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"OpenAI",model:"gpt-5.4",state:"ready",detail:"API key configured.",quota:{maxConcurrency:2,maxRequestsPerMinute:10,maxRequestsPerDay:1e3}},{name:"Claude",model:"claude-sonnet-4-6",state:"needs-config",detail:"API key is missing."}],selfHostNotes:["Run behind a reverse proxy before exposing the dashboard outside a trusted network.","Keep bootstrap and provider secrets out of source control.","Use persistent Postgres storage before treating run history as durable."],bootstrapNote:"Bootstrap/admin secrets stay in the environment; they do not belong in the UI."}},IC={apiStatus:{label:"API",state:"ok",detail:"phase-1 · database configured",version:"phase-1",databaseConfigured:!0},workerStatus:{label:"Worker",state:"ok",detail:"phase-1 · database configured · heartbeat 2026-03-09T08:07:00.000Z",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T08:07:00.000Z"}};function KC(t={}){const n=structuredClone(HC),a=structuredClone(IC);if(t.emptyPortfolio&&(n.portfolioOverview.projects=[],n.portfolioOverview.attentionItems=[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Start the guided setup flow to add a domain, import keywords, and launch the first run.",actionLabel:"Open setup",href:"/setup"}],n.portfolioOverview.recentRuns=[],n.portfolioOverview.emptyState={title:"No projects yet",detail:"Canonry becomes useful after one project, a small keyword set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}),t.runScenario==="partial"&&(n.runs[0].status="partial",n.runs[0].duration="7m 24s",n.runs[0].statusDetail="Quota window closed mid-run; 14 of 18 prompts completed before the worker paused.",n.runs[0].summary="Partial visibility sweep after quota cap",n.portfolioOverview.recentRuns[0]=n.runs[0]),t.runScenario==="failed"&&(n.runs[0].status="failed",n.runs[0].duration="1m 43s",n.runs[0].statusDetail="Worker could not reach the provider after repeated retry exhaustion.",n.runs[0].summary="Provider retries exhausted before results were captured",n.portfolioOverview.recentRuns[0]=n.runs[0],n.portfolioOverview.attentionItems.unshift({id:"attention_failed_run",tone:"negative",title:"One queued follow-up failed to start cleanly",detail:"Worker retries exhausted before the provider returned a response.",actionLabel:"Open runs",href:"/runs"})),t.degradedWorker&&(a.workerStatus={label:"Worker",state:"error",detail:"heartbeat stale · last seen 12m ago",version:"phase-1",databaseConfigured:!0,lastHeartbeatAt:"2026-03-09T07:55:00.000Z"}),t.providerNeedsConfig&&(n.settings.providerStatuses=n.settings.providerStatuses.map(l=>({...l,state:"needs-config",detail:"API key is missing, so answer-visibility sweeps are blocked."}))),t.visibilityDropProjectId){const l=n.projects.find(c=>c.project.id===t.visibilityDropProjectId),o=n.portfolioOverview.projects.find(c=>c.project.id===t.visibilityDropProjectId);l&&(l.visibilitySummary.value="49 / 100",l.visibilitySummary.delta="-12 in 48h",l.visibilitySummary.tone="negative",l.visibilitySummary.description="A sharper drop than normal; citations slipped across both local and service-intent prompts.",l.insights.unshift({id:`${l.project.id}_drop`,tone:"negative",title:"Sharp citation drop detected",detail:"Answers that previously cited the domain now ground competitors on both local and service-intent prompts.",actionLabel:"Lost",affectedPhrases:l.visibilityEvidence.filter(c=>c.citationState==="lost").slice(0,5).map(c=>({keyword:c.keyword,evidenceId:c.id,provider:c.provider||void 0,citationState:c.citationState}))})),o&&(o.visibilityScore=49,o.visibilityDelta="-12 in 48h",o.insight="Sharp citation drop detected; grounding now prefers competitors on multiple high-intent prompts.")}return{dashboard:n,health:a}}function C0(t,n){return t.projects.find(a=>a.project.id===n)}function GC(t,n){return t.runs.find(a=>a.id===n)}function YC(t,n){for(const a of t.projects){const l=a.visibilityEvidence.find(o=>o.id===n);if(l)return{project:a,evidence:l}}}const VC="/api/v1";function PC(){return typeof window<"u"&&window.__CANONRY_CONFIG__?.apiKey?window.__CANONRY_CONFIG__.apiKey:""}async function Re(t,n){const a=PC(),l=await fetch(`${VC}${t}`,{...n,headers:{"Content-Type":"application/json",...a?{Authorization:`Bearer ${a}`}:{},...n?.headers}});if(!l.ok)throw new Error(`API ${l.status}: ${l.statusText}`);if(l.status!==204)return l.json()}function QC(){return Re("/projects")}function A0(t){return Re(`/projects/${encodeURIComponent(t)}`)}function XC(){return Re("/runs")}function Al(t){return Re(`/runs/${encodeURIComponent(t)}`)}function JC(t){return Re(`/projects/${encodeURIComponent(t)}/keywords`)}function T0(t){return Re(`/projects/${encodeURIComponent(t)}/competitors`)}function FC(t){return Re(`/projects/${encodeURIComponent(t)}/timeline`)}function ec(t,n){return Re(`/projects/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}function WC(t,n){return Re(`/projects/${encodeURIComponent(t)}/keywords`,{method:"PUT",body:JSON.stringify({keywords:n})})}function eA(t,n){return Re(`/projects/${encodeURIComponent(t)}/keywords`,{method:"POST",body:JSON.stringify({keywords:n})})}function O0(t,n){return Re(`/projects/${encodeURIComponent(t)}/competitors`,{method:"PUT",body:JSON.stringify({competitors:n})})}async function tA(t,n){const a=await A0(t);return ec(t,{displayName:a.displayName,canonicalDomain:a.canonicalDomain,ownedDomains:n,country:a.country,language:a.language,tags:a.tags,labels:a.labels,providers:a.providers})}async function nA(t,n){const a=await A0(t);return ec(t,{displayName:n.displayName??a.displayName,canonicalDomain:n.canonicalDomain??a.canonicalDomain,ownedDomains:n.ownedDomains??a.ownedDomains,country:n.country??a.country,language:n.language??a.language,tags:a.tags,labels:a.labels,providers:a.providers})}function D0(t){return Re(`/projects/${encodeURIComponent(t)}/runs`,{method:"POST",body:"{}"})}async function iA(t){await Re(`/projects/${encodeURIComponent(t)}`,{method:"DELETE",body:"{}"})}function aA(t){return Re(`/projects/${encodeURIComponent(t)}/export`)}function sA(){return Re("/settings")}function lA(t,n){return Re(`/settings/providers/${encodeURIComponent(t)}`,{method:"PUT",body:JSON.stringify(n)})}async function rA(t){try{return await Re(`/projects/${encodeURIComponent(t)}/schedule`)}catch(n){if(n instanceof Error&&n.message.includes("404"))return null;throw n}}function ev(t,n){return Re(`/projects/${encodeURIComponent(t)}/schedule`,{method:"PUT",body:JSON.stringify(n)})}async function oA(t){await Re(`/projects/${encodeURIComponent(t)}/schedule`,{method:"DELETE",body:"{}"})}function cA(t){return Re(`/projects/${encodeURIComponent(t)}/notifications`)}function uA(t,n){return Re(`/projects/${encodeURIComponent(t)}/notifications`,{method:"POST",body:JSON.stringify(n)})}async function dA(t,n){await Re(`/projects/${encodeURIComponent(t)}/notifications/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function fA(t,n){return Re(`/projects/${encodeURIComponent(t)}/notifications/${encodeURIComponent(n)}/test`,{method:"POST",body:"{}"})}function hA(t,n,a){return Re(`/projects/${encodeURIComponent(t)}/keywords/generate`,{method:"POST",body:JSON.stringify({provider:n,count:a})})}function mA(t){return Re("/apply",{method:"POST",body:JSON.stringify(t)})}function pA(t){return Re("/runs",{method:"POST",body:JSON.stringify({})})}function gA(t){return Re(`/projects/${encodeURIComponent(t)}/google/connections`)}function yA(t,n){return Re(`/projects/${encodeURIComponent(t)}/google/connect`,{method:"POST",body:JSON.stringify({type:n})})}function vA(t,n){return Re(`/projects/${encodeURIComponent(t)}/google/connections/${encodeURIComponent(n)}`,{method:"DELETE",body:"{}"})}function bA(t,n){return Re(`/projects/${encodeURIComponent(t)}/google/gsc/sync`,{method:"POST",body:JSON.stringify({})})}function xA(t,n){const a=new URLSearchParams;n?.startDate&&a.set("startDate",n.startDate),n?.endDate&&a.set("endDate",n.endDate),n?.query&&a.set("query",n.query),n?.page&&a.set("page",n.page),a.set("limit",String(n.limit));const l=a.toString()?`?${a.toString()}`:"";return Re(`/projects/${encodeURIComponent(t)}/google/gsc/performance${l}`)}function R0(t){return{id:t.id,name:t.name,displayName:t.displayName,canonicalDomain:t.canonicalDomain,ownedDomains:t.ownedDomains??[],country:t.country,language:t.language,tags:t.tags,labels:t.labels,configSource:t.configSource,configRevision:t.configRevision,createdAt:t.createdAt,updatedAt:t.updatedAt}}function tv(t){try{return new Date(t).toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit"})}catch{return t}}function SA(t,n){if(!t)return"Waiting";if(!n)return"Running";const a=new Date(n).getTime()-new Date(t).getTime();if(a<1e3)return"<1s";const l=Math.floor(a/1e3);if(l<60)return`${l}s`;const o=Math.floor(l/60),c=l%60;return`${o}m ${c}s`}function M0(t){return t==="answer-visibility"?"Answer visibility sweep":t}function wA(t){return t==="manual"?"Manual":t==="scheduled"?"Scheduled":t==="config-apply"?"Config apply":t}function Gf(t,n){return{id:t.id,projectId:t.projectId,projectName:n,kind:t.kind,kindLabel:M0(t.kind),status:t.status,trigger:t.trigger??"manual",createdAt:t.createdAt,startedAt:t.startedAt?tv(t.startedAt):tv(t.createdAt),duration:SA(t.startedAt,t.finishedAt),statusDetail:t.error?L0(t.error):NA(t),summary:jA(t),triggerLabel:wA(t.trigger)}}function L0(t){try{const a=JSON.parse(t);if(typeof a=="object"&&a!==null){const l=a.message??a.error?.message??a[0]?.error?.message;if(typeof l=="string"&&l.length>0)return l.length>200?l.slice(0,200)+"…":l}}catch{}const n=t.match(/\[.*?\]\s*(.+)/);if(n){const a=n[1];return a.length>200?a.slice(0,200)+"…":a}return t.length>200?t.slice(0,200)+"…":t}function NA(t){switch(t.status){case"queued":return"Waiting for execution slot.";case"running":return"Provider queries in progress.";case"completed":return"All key phrases checked.";case"partial":return"Run completed with some key phrases skipped.";case"failed":return t.error?L0(t.error):"Run failed.";default:return""}}function jA(t){switch(t.status){case"queued":return"Queued for execution";case"running":return"In progress";case"completed":return"Visibility sweep completed";case"partial":return"Partial completion";case"failed":return"Run failed";default:return t.status}}function U0(t){if(t.length===0)return{score:0,citedCount:0,totalCount:0};const n=new Map;for(const c of t){const f=c.keyword??c.id;n.has(f)||n.set(f,!1),c.citationState==="cited"&&n.set(f,!0)}const a=n.size,l=[...n.values()].filter(Boolean).length;return{score:a>0?Math.round(l/a*100):0,citedCount:l,totalCount:a}}function _A(t){return t>=70?"positive":t>=40?"caution":"negative"}function kA(t){return t==="High"?"negative":t==="Moderate"?"caution":"neutral"}function $0(t,n){if(t.length===0||n.length===0)return{label:"None",count:0};const a=new Set(n);let l=0;for(const c of t)c.competitorOverlap.some(f=>a.has(f))&&l++;const o=l/t.length;return o>=.5?{label:"High",count:l}:o>=.2?{label:"Moderate",count:l}:{label:"Low",count:l}}function zA(t,n,a,l){const o=[];let c=0;const f=new Set;if(a){const m=new Map;for(const p of a.snapshots)if(p.keyword){const b=`${p.keyword}::${p.provider}`;m.set(b,p)}const g=[...new Set(a.snapshots.map(p=>p.provider))].sort();g.length===0&&g.push("gemini");for(const p of n){if(p.runs.length===0)continue;f.add(p.keyword);const v=p.runs.at(-1)?.transition??"not-cited",x=v==="lost"?"lost":v==="emerging"?"emerging":v==="cited"?"cited":"not-cited";for(const j of g){const z=m.get(`${p.keyword}::${j}`);if(!z&&g.length>1)continue;const w=z?.model??null,_=w?`${j}:${w}`:null,E=_?p.modelRuns?.[_]:void 0,O=p.providerRuns?.[j],T=(E?.length?E:null)??(O?.length?O:null),D=T?T.at(-1).transition:v,L=D==="lost"?"lost":D==="emerging"?"emerging":z?z.citationState==="cited"?"cited":"not-cited":x,I=sf(T||p.runs),G=(T??p.runs).map(M=>({runId:M.runId,citationState:M.citationState,createdAt:M.createdAt}));o.push({id:`evidence_${t}_${c++}`,keyword:p.keyword,provider:z?.provider??j,model:z?.model??null,citationState:L,changeLabel:EA(D,I),answerSnippet:z?.answerText??"",citedDomains:z?.citedDomains??[],evidenceUrls:[],competitorDomains:z?.competitorOverlap??[],relatedTechnicalSignals:[],groundingSources:z?.groundingSources??[],summary:CA(L,p.keyword),runHistory:G})}}}for(const m of l)f.has(m.keyword)||o.push({id:`evidence_${t}_${c++}`,keyword:m.keyword,provider:"",model:null,citationState:"pending",changeLabel:"Awaiting first run",answerSnippet:"",citedDomains:[],evidenceUrls:[],competitorDomains:[],relatedTechnicalSignals:[],groundingSources:[],summary:`"${m.keyword}" has been added but no visibility run has been triggered yet.`,runHistory:[]});return o}function sf(t){if(t.length===0)return 0;const n=t[t.length-1].citationState;let a=0;for(let l=t.length-1;l>=0&&t[l].citationState===n;l--)a++;return a}function EA(t,n){switch(t){case"new":return"First observation";case"cited":return n<=1?"Cited in latest run":`Cited for ${n} runs`;case"lost":return"Lost since last run";case"emerging":return"First citation";case"not-cited":return n<=1?"Not cited in latest run":`Not cited across ${n} runs`;default:return t}}function CA(t,n){switch(t){case"cited":return`Your domain is cited in AI answers for "${n}".`;case"lost":return`Citation was lost for "${n}". Competitors may have gained ground.`;case"emerging":return`Your domain is starting to appear in answers for "${n}".`;case"not-cited":return`No citation detected for "${n}".`;case"pending":return`"${n}" has been added but no visibility run has been triggered yet.`}}function nv(t,n){const a=new Set(n),l=new Map;for(const o of t)if(o.keyword)for(const c of o.competitorOverlap){if(!a.has(c))continue;const f=l.get(c)??new Set;f.add(o.keyword),l.set(c,f)}return l}const Hd=3;function AA(t){const{evidence:n,timeline:a,latestSnapshots:l,previousSnapshots:o,trackedCompetitors:c}=t,f=[],m=[],g=new Set;for(const E of n)E.citationState==="lost"&&(g.has(E.keyword)||(g.add(E.keyword),m.push({keyword:E.keyword,evidenceId:E.id,provider:E.provider,citationState:"lost"})));m.length>0&&f.push({id:"insight_lost",tone:"negative",title:`Lost citation on ${m.length} keyword${m.length>1?"s":""}`,detail:"Citations dropped since the last run.",actionLabel:"Lost",affectedPhrases:m});const p=nv(l,c),b=nv(o,c);for(const E of c){const O=p.get(E)??new Set,T=b.get(E)??new Set,D=[...O].filter(L=>!T.has(L));D.length>0&&f.push({id:`insight_comp_gained_${E}`,tone:"negative",title:`${E} appeared on ${D.length} keyword${D.length>1?"s":""}`,detail:"A tracked competitor gained new citations.",actionLabel:"Competitor",affectedPhrases:D.map(L=>{const I=n.find(G=>G.keyword===L);return{keyword:L,evidenceId:I?.id??"",citationState:"cited"}})})}const v=new Map;for(const E of a){const O=E.runs.at(-1);O&&v.set(E.keyword,{transition:O.transition,citationState:O.citationState})}const x=[],j=[],z=new Set;for(const[E,{transition:O,citationState:T}]of v){if(!(O==="emerging"||O==="new"&&T==="cited"))continue;z.add(E);const L=n.find(I=>I.keyword===E&&(I.citationState==="emerging"||I.citationState==="cited"));x.push({keyword:E,evidenceId:L?.id??"",provider:L?.provider,citationState:"emerging"})}for(const E of n)E.citationState==="emerging"&&(z.has(E.keyword)||j.push({keyword:E.keyword,evidenceId:E.id,provider:E.provider,citationState:"emerging"}));if(j.length>0){const E=new Set(j.map(O=>O.keyword)).size;f.push({id:"insight_provider_pickup",tone:"positive",title:`Picked up by new provider on ${E} keyword${E>1?"s":""}`,detail:"Your domain started appearing on additional providers.",actionLabel:"Pickup",affectedPhrases:j})}x.length>0&&f.push({id:"insight_first_citation",tone:"positive",title:`First citation on ${z.size} keyword${z.size>1?"s":""}`,detail:"Your domain appeared in AI answers for the first time.",actionLabel:"New",affectedPhrases:x});const w=new Set(n.map(E=>E.keyword)),_=[];for(const E of a){if(!w.has(E.keyword)||E.runs.length<Hd||E.runs.at(-1)?.citationState!=="not-cited")continue;if(sf(E.runs)>=Hd){const D=n.find(L=>L.keyword===E.keyword);_.push({keyword:E.keyword,evidenceId:D?.id??"",citationState:"not-cited"})}}_.length>0&&f.push({id:"insight_persistent_gap",tone:"caution",title:`${_.length} keyword${_.length>1?"s":""} uncited for ${Hd}+ runs`,detail:"These keywords have not been cited by any provider across multiple consecutive runs.",actionLabel:"Gap",affectedPhrases:_});for(const E of c){const O=p.get(E)??new Set,D=[...b.get(E)??new Set].filter(L=>!O.has(L));D.length>0&&f.push({id:`insight_comp_lost_${E}`,tone:"neutral",title:`${E} dropped from ${D.length} keyword${D.length>1?"s":""}`,detail:"A tracked competitor lost citations.",actionLabel:"Competitor",affectedPhrases:D.map(L=>{const I=n.find(G=>G.keyword===L);return{keyword:L,evidenceId:I?.id??"",citationState:"not-cited"}})})}return f.length===0&&f.push({id:"insight_stable",tone:"neutral",title:"No significant changes",detail:"Citation state is stable across all tracked key phrases.",actionLabel:"Stable",affectedPhrases:[]}),f}function TA(t){const n=t[0];if(!n)return{label:"Run Status",value:"None",delta:"No runs yet",tone:"neutral",description:"Trigger a visibility sweep to start tracking.",tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]};const a=n.status==="completed"?"Healthy":n.status==="running"?"Running":n.status==="queued"?"Queued":n.status==="partial"?"Partial":"Failed",l=n.status==="completed"?"positive":n.status==="failed"?"negative":n.status==="partial"?"caution":"neutral";return{label:"Run Status",value:a,delta:`${t.length} total runs`,tone:l,description:`Latest: ${M0(n.kind)} — ${n.status}`,tooltip:"Current execution state of visibility sweeps. Shows the status of the most recent run and total run count.",trend:[]}}function OA(t){const n=R0(t.project),a=zA(n.name,t.timeline,t.latestRunDetail,t.keywords),l=t.latestRunDetail?.snapshots??[],o=U0(l),c=$0(l,t.competitors.map(v=>v.domain)),f=AA({evidence:a,timeline:t.timeline,latestSnapshots:t.latestRunDetail?.snapshots??[],previousSnapshots:t.previousRunDetail?.snapshots??[],trackedCompetitors:t.competitors.map(v=>v.domain)}),m=[...t.runs].sort((v,x)=>x.createdAt.localeCompare(v.createdAt)),g=m.map(v=>Gf(v,t.project.displayName||t.project.name)),p=new Map;for(const v of l){const x=v.provider||"gemini",j=v.model??null,z=`${x}::${j??"unknown"}`,w=p.get(z)??{provider:x,model:j,cited:0,total:0};w.total++,v.citationState==="cited"&&w.cited++,p.set(z,w)}const b=[...p.values()].sort((v,x)=>v.provider.localeCompare(x.provider)||(v.model??"").localeCompare(x.model??"")).map(({provider:v,model:x,cited:j,total:z})=>({provider:v,model:x,score:z>0?Math.round(j/z*100):0,cited:j,total:z}));return{project:n,dateRangeLabel:"All time",contextLabel:`${n.country} / ${n.language.toUpperCase()}`,visibilitySummary:{label:"Answer Visibility",value:l.length>0?`${o.score}`:"No data",delta:l.length>0?`${o.citedCount} of ${o.totalCount} key phrases visible`:"Run a sweep first",tone:l.length>0?_A(o.score):"neutral",description:l.length>0?`${o.citedCount} of ${o.totalCount} tracked key phrases found your domain in at least one AI answer engine.`:"No visibility data yet. Trigger a run to start tracking.",tooltip:'Percentage of tracked key phrases where your domain is cited by at least one AI answer engine. A key phrase is "visible" if any configured provider includes your site in its response.',trend:[]},providerScores:b,competitorPressure:{label:"Competitor Pressure",value:c.label,delta:c.count>0?`${c.count} overlapping citations`:"No overlap detected",tone:kA(c.label),description:t.competitors.length>0?`${t.competitors.length} competitor${t.competitors.length>1?"s":""} tracked.`:"No competitors configured.",tooltip:"How often competitor domains appear alongside yours in AI answers. High pressure means competitors are frequently cited for the same key phrases.",trend:[]},runStatus:TA(m),insights:f,visibilityEvidence:a,competitors:t.competitors.map((v,x)=>{const j=new Set;for(const O of l)(O.competitorOverlap.includes(v.domain)||O.citedDomains.includes(v.domain))&&O.keyword&&j.add(O.keyword);const z=[...j],w=new Set(l.map(O=>O.keyword).filter(Boolean)),_=w.size>0?z.length/w.size:0,E=_>=.5?"High":_>=.2?"Moderate":z.length>0?"Low":"None";return{id:v.id||`comp_${x}`,domain:v.domain,citationCount:z.length,totalKeywords:w.size,pressureLabel:E,citedKeywords:z,movement:"",notes:""}}),recentRuns:g.slice(0,5)}}function DA(t){const n=R0(t.project),a=t.latestRunDetail?.snapshots??[],l=U0(a),o=$0(a,t.competitors.map(g=>g.domain)),f=[...t.runs].sort((g,p)=>p.createdAt.localeCompare(g.createdAt))[0],m=f?Gf(f,t.project.displayName||t.project.name):{id:"none",projectId:t.project.id,projectName:t.project.displayName||t.project.name,kind:"answer-visibility",kindLabel:"No runs yet",status:"queued",trigger:"manual",createdAt:"",startedAt:"",duration:"",statusDetail:"",summary:"No runs yet",triggerLabel:""};return{project:n,visibilityScore:l.score,visibilityDelta:a.length>0?`${l.citedCount} of ${l.totalCount} key phrases`:"No data",lastRun:m,insight:a.length>0?`${l.citedCount} of ${l.totalCount} key phrases visible across ${new Set(a.map(g=>g.provider)).size} provider${new Set(a.map(g=>g.provider)).size>1?"s":""}.`:"No runs completed yet.",trend:[],competitorPressureLabel:o.label}}function RA(t,n){const a=[],l=[],o=[];for(const f of t){l.push(OA(f)),o.push(DA(f));const m=[...f.runs].sort((g,p)=>p.createdAt.localeCompare(g.createdAt));for(const g of m)a.push(Gf(g,f.project.displayName||f.project.name))}a.sort((f,m)=>m.createdAt.localeCompare(f.createdAt));const c=t.length>0;return{portfolioOverview:{projects:o,attentionItems:c?MA(l):[{id:"attention_setup",tone:"neutral",title:"No projects yet",detail:"Create your first project using the setup wizard, CLI, or API.",actionLabel:"Open setup",href:"/setup"}],recentRuns:a.slice(0,5),systemHealth:[{id:"api",label:"API",tone:"positive",detail:"Connected",meta:"Real-time data"},{id:"provider",label:"Gemini",tone:"positive",detail:"Configured",meta:"Provider active"}],lastUpdatedAt:new Date().toLocaleString("en-US",{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",timeZoneName:"short"}),...c?{}:{emptyState:{title:"No projects yet",detail:"Canonry becomes useful after one project, a small key phrase set, and one competitor list are in place.",ctaLabel:"Launch setup",ctaHref:"/setup"}}},projects:l,runs:a,setup:{healthChecks:[{id:"api",label:"API reachable",detail:"API is responding.",state:"ready",guidance:"Required for project creation and run history."},{id:"provider",label:"Provider configured",detail:"Gemini key is configured.",state:"ready",guidance:"Required for answer-visibility sweeps."}],projectDraft:{name:"",canonicalDomain:"",country:"US",language:"en"},keywordImportState:{mode:"paste",keywordCount:0,preview:[]},competitorDraft:{domains:[],notes:"Use the CLI to add competitors."},launchState:{enabled:c,ctaLabel:c?"Trigger run":"Create a project first",summary:c?"Ready to run.":"Create a project first to launch a run."}},settings:{providerStatuses:(n?.providers??[]).map(f=>({name:f.name,model:f.model,state:f.configured?"ready":"needs-config",detail:f.configured?"Provider is configured.":"API key is missing.",quota:f.quota})),selfHostNotes:["Configuration is stored in ~/.canonry/config.yaml.","Database is SQLite at ~/.canonry/data.db.","API key was auto-generated during canonry init."],bootstrapNote:"Manage settings via ~/.canonry/config.yaml and restart the server."}}}function MA(t){const n=[];for(const a of t){const l=a.visibilityEvidence.filter(c=>c.citationState==="lost");l.length>0&&n.push({id:`attention_${a.project.id}_lost`,tone:"negative",title:`${a.project.displayName||a.project.name} lost citations`,detail:`${l.length} key phrase${l.length>1?"s":""} lost citation.`,actionLabel:"Open project",href:`/projects/${a.project.id}`});const o=a.recentRuns.filter(c=>c.status==="running"||c.status==="queued");o.length>0&&n.push({id:`attention_${a.project.id}_active`,tone:"neutral",title:`${a.project.displayName||a.project.name} has active runs`,detail:`${o.length} run${o.length>1?"s":""} in progress.`,actionLabel:"View runs",href:"/runs"})}return n.length===0&&n.push({id:"attention_stable",tone:"positive",title:"All projects stable",detail:"No citation losses or active runs to flag.",actionLabel:"View portfolio",href:"/"}),n}const iv=[{label:"Architecture",href:"https://github.com/AINYC/canonry/blob/main/docs/architecture.md"},{label:"Testing Guide",href:"https://github.com/AINYC/canonry/blob/main/docs/testing.md"}],LA=KC(),av=t=>({label:t,state:"checking",detail:"Checking service health"}),UA={apiStatus:av("API"),workerStatus:av("Worker")};async function $A(t,n){try{const a=await fetch(t);if(!a.ok)return{label:n,state:"error",detail:`HTTP ${a.status}`};const l=await a.json(),o=typeof l.version=="string"?l.version:"unknown",c=typeof l.databaseUrlConfigured=="boolean"?l.databaseUrlConfigured:void 0,f=typeof l.lastHeartbeatAt=="string"?l.lastHeartbeatAt:void 0,m=[o,c===!1?"database not configured":"database configured",f?`heartbeat ${f}`:void 0].filter(Boolean).join(" · ");return{label:n,state:"ok",detail:m,version:o,databaseConfigured:c,lastHeartbeatAt:f}}catch(a){return{label:n,state:"error",detail:a instanceof Error?a.message:"unreachable"}}}function Ti(t){if(!t)return"/";const n=t.split("?")[0]??"/";return n===""?"/":n.length>1&&n.endsWith("/")?n.slice(0,-1):n}function BA(t,n){const a=Ti(t);if(a==="/")return{kind:"overview",path:"/"};if(a==="/runs")return{kind:"runs",path:"/runs"};if(a==="/settings")return{kind:"settings",path:"/settings"};if(a==="/setup")return{kind:"setup",path:"/setup"};if(a==="/projects")return{kind:"projects",path:"/projects"};if(a.startsWith("/projects/")){const l=a.slice(10);return C0(n,l)?{kind:"project",path:a,projectId:l}:{kind:"not-found",path:a}}return{kind:"not-found",path:a}}function ZA(t){return t?Ti(t):typeof window<"u"?Ti(window.location.pathname):"/"}function Mo(t){return t.state==="ok"?"positive":t.state==="checking"?"neutral":"negative"}function B0(t){switch(t){case"completed":return"positive";case"partial":return"caution";case"failed":return"negative";case"queued":case"running":return"neutral"}}function qA(t){switch(t){case"cited":return"positive";case"emerging":return"positive";case"not-cited":return"caution";case"lost":return"negative";case"pending":return"neutral"}}function HA(t){const n=t.match(/^(\[.*?\])\s*(.+)/);if(n){const a=n[1],l=n[2],o=l.indexOf("{");if(o>=0){const c=l.slice(0,o).trim(),f=l.slice(o);try{const m=JSON.parse(f);return`${a} ${c}
222
+
223
+ ${JSON.stringify(m,null,2)}`}catch{}}return`${a}
224
+ ${l}`}try{const a=JSON.parse(t);return JSON.stringify(a,null,2)}catch{return t}}function tc(t){return t.split("-").map(n=>n.charAt(0).toUpperCase()+n.slice(1)).join(" ")}function IA(t,n,a){return t.map(l=>{if(l.id==="api")return{...l,tone:Mo(n.apiStatus),detail:n.apiStatus.state==="ok"?"Healthy":"Needs attention",meta:n.apiStatus.detail};if(l.id==="worker")return{...l,tone:Mo(n.workerStatus),detail:n.workerStatus.state==="ok"?"Healthy":"Needs attention",meta:n.workerStatus.detail};const o=a.providerStatuses.filter(g=>g.state==="ready").length,c=a.providerStatuses.length,f=o>0,m=a.providerStatuses.filter(g=>g.state==="ready").map(g=>I0[g.name]??g.name).join(" · ");return{...l,label:"Providers",tone:f?"positive":"caution",detail:`${o} of ${c} configured`,meta:m||"None configured"}})}function KA(t,n){if(t.apiStatus.state!=="ok")return"Launch is blocked until the API responds cleanly.";if(t.apiStatus.databaseConfigured===!1)return"Launch is blocked until the API has a database connection configured.";if(t.workerStatus.state!=="ok")return"Launch is blocked until the worker is healthy and heartbeats are current.";if(!n.providerStatuses.some(a=>a.state==="ready"))return"Launch is blocked until at least one provider is configured."}function GA(t,n,a){const l=KA(n,a),o=structuredClone(t);return o.healthChecks=o.healthChecks.map(c=>{if(c.id==="api")return{...c,detail:n.apiStatus.detail,state:n.apiStatus.state==="ok"?"ready":"attention"};if(c.id==="worker")return{...c,detail:n.workerStatus.detail,state:n.workerStatus.state==="ok"?"ready":"attention"};const f=a.providerStatuses.some(m=>m.state==="ready");return{...c,detail:f?"At least one provider configured.":"No providers configured.",state:f?"ready":"attention"}}),o.launchState.enabled=l===void 0,o.launchState.blockedReason=l,o.launchState.summary=l??"Queue a visibility sweep first, then follow with a site audit to explain movement.",o}function Xt(t,n){return a=>{a.preventDefault(),a.stopPropagation(),t(n)}}function yo(t,n){return n==="projects"?t.kind==="projects"||t.kind==="project":n==="project"?t.kind==="project":t.kind===n}function YA({points:t,tone:n}){const a=N.useId();if(t.length===0)return null;const l=42,o=132,c=5,f=Math.min(...t),g=Math.max(...t)-f||1,p=o-c*2,b=l-c*2,v=t.map((x,j)=>{const z=c+j/Math.max(t.length-1,1)*p,w=c+(1-(x-f)/g)*b;return`${z},${w}`}).join(" ");return u.jsxs("svg",{className:`sparkline sparkline-${n}`,viewBox:`0 0 ${o} ${l}`,"aria-hidden":"true",children:[u.jsx("defs",{children:u.jsx("clipPath",{id:a,children:u.jsx("rect",{x:c,y:c,width:p,height:b,rx:"8"})})}),u.jsx("line",{className:"sparkline-guide",x1:c,x2:o-c,y1:l-c,y2:l-c}),u.jsx("polyline",{clipPath:`url(#${a})`,points:v,vectorEffect:"non-scaling-stroke"})]})}function Z0({text:t}){return u.jsxs("span",{className:"info-tooltip-wrapper",children:[u.jsxs("svg",{className:"info-tooltip-icon",viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[u.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M8 7v4M8 5.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]}),u.jsx("span",{className:"info-tooltip-bubble",role:"tooltip",children:t})]})}function Id({value:t,label:n,delta:a,tone:l,description:o,tooltip:c,isNumeric:f=!0}){const p=2*Math.PI*48,b=Number.parseInt(t,10),v=f&&!Number.isNaN(b)?Math.min(b/100,1):.5,x=p*(1-v);return u.jsxs("div",{className:"score-gauge",children:[u.jsxs("div",{className:"gauge-ring-wrapper",children:[u.jsxs("svg",{className:"gauge-ring",viewBox:"0 0 120 120","aria-hidden":"true",children:[u.jsx("circle",{className:"gauge-bg",cx:"60",cy:"60",r:48,strokeWidth:6}),u.jsx("circle",{className:`gauge-fill gauge-fill-${l}`,cx:"60",cy:"60",r:48,strokeWidth:6,strokeDasharray:p,strokeDashoffset:x,transform:"rotate(-90 60 60)"})]}),u.jsx("div",{className:"gauge-center",children:u.jsx("span",{className:f?"gauge-value":"gauge-value-text",children:t.split(" / ")[0]})})]}),u.jsxs("p",{className:"gauge-label",children:[n,c&&u.jsx(Z0,{text:c})]}),u.jsx("p",{className:"gauge-delta",children:a}),u.jsx("p",{className:"gauge-description",children:o})]})}function yt({tone:t,children:n}){const a=t==="positive"?"success":t==="caution"?"warning":t==="negative"?"destructive":"neutral";return u.jsx(N0,{variant:a,children:n})}function nc({status:t}){return u.jsx(yt,{tone:B0(t),children:tc(t)})}function q0({state:t}){return u.jsx(yt,{tone:qA(t),children:tc(t)})}function H0({run:t,onOpen:n}){return u.jsxs("article",{className:"run-row",children:[u.jsxs("div",{className:"run-row-main",children:[u.jsxs("div",{className:"run-row-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:t.summary}),u.jsxs("p",{className:"run-row-subtitle",children:[t.projectName," · ",t.kindLabel]})]}),u.jsx(nc,{status:t.status})]}),u.jsx("p",{className:"run-row-detail",children:t.statusDetail})]}),u.jsxs("dl",{className:"run-row-meta",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Started"}),u.jsx("dd",{children:t.startedAt})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Duration"}),u.jsx("dd",{children:t.duration})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Trigger"}),u.jsx("dd",{children:t.triggerLabel})]})]}),u.jsx(pe,{variant:"outline",size:"sm",type:"button",onClick:()=>n(t.id),children:"View run"})]})}function Yf({provider:t}){const n={gemini:"border-blue-800/50 bg-blue-950/40 text-blue-300",openai:"border-green-800/50 bg-green-950/40 text-green-300",claude:"border-amber-800/50 bg-amber-950/40 text-amber-300",local:"border-purple-800/50 bg-purple-950/40 text-purple-300"};return u.jsx("span",{className:`inline-flex items-center rounded-full border px-2 py-0.5 text-[10px] font-medium uppercase tracking-wide ${n[t]??"border-zinc-700 bg-zinc-800 text-zinc-300"}`,children:t})}function VA({insights:t,onOpenEvidence:n}){const[a,l]=N.useState(null);return u.jsx("div",{className:"insight-list",children:t.map(o=>{const c=a===o.id,f=o.affectedPhrases.length>0;return u.jsxs("div",{children:[u.jsxs("div",{className:`insight-row insight-row-${o.tone} ${f?"cursor-pointer":""}`,onClick:f?()=>l(c?null:o.id):void 0,children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[f&&u.jsx(Tf,{size:12,className:`shrink-0 text-zinc-500 transition-transform duration-150 ${c?"rotate-90":""}`}),u.jsx(yt,{tone:o.tone,children:o.actionLabel}),u.jsx("span",{className:"text-sm font-medium text-zinc-100 truncate",children:o.title}),u.jsx("span",{className:"hidden sm:inline text-xs text-zinc-500 truncate",children:o.detail})]}),f&&u.jsxs("span",{className:"text-[11px] text-zinc-600 whitespace-nowrap",children:[o.affectedPhrases.length," phrase",o.affectedPhrases.length>1?"s":""]})]}),c&&u.jsx("div",{className:"divide-y divide-zinc-800/20",children:o.affectedPhrases.map(m=>u.jsxs("div",{className:"flex items-center justify-between gap-3 px-4 py-2 pl-9 bg-zinc-900/40",children:[u.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[u.jsx(q0,{state:m.citationState}),u.jsx("span",{className:"text-sm text-zinc-200 truncate",children:m.keyword}),u.jsx("div",{className:"hidden sm:flex gap-1",children:m.provider&&u.jsx(Yf,{provider:m.provider})})]}),u.jsx("button",{type:"button",className:"text-xs text-zinc-400 hover:text-zinc-200 whitespace-nowrap transition-colors",onClick:g=>{g.stopPropagation(),n(m.evidenceId)},children:"View →"})]},m.evidenceId))})]},o.id)})})}function PA({history:t,maxDots:n=12}){const a=t.slice(-n);if(a.length===0)return u.jsx("span",{className:"text-[11px] text-zinc-600",children:"No data"});const l={cited:"bg-emerald-400","not-cited":"bg-zinc-600",lost:"bg-rose-400",emerging:"bg-emerald-400 ring-1 ring-emerald-300/60"};return u.jsx("div",{className:"flex items-center gap-[3px]",title:`${a.length} runs`,children:a.map((o,c)=>u.jsx("div",{className:`h-2.5 w-2.5 rounded-sm ${l[o.citationState]??"bg-zinc-700"}`,title:`${o.citationState} — ${new Date(o.createdAt).toLocaleDateString()}`},c))})}function QA(t){const n=new Map;for(const l of t)for(const o of l.runHistory){const c=n.get(o.createdAt);c?c.states.push(o.citationState):n.set(o.createdAt,{states:[o.citationState],runId:o.runId})}return[...n.entries()].sort(([l],[o])=>l.localeCompare(o)).map(([l,{states:o,runId:c}])=>({runId:c,createdAt:l,citationState:o.includes("cited")?"cited":o.includes("emerging")?"emerging":"not-cited"}))}function XA({phrase:t,items:n,onOpenEvidence:a}){const l=n.map(b=>b.citationState),o=l.includes("cited")?"cited":l.includes("emerging")?"emerging":l.includes("lost")?"lost":l.every(b=>b==="pending")?"pending":"not-cited",c=QA(n),f=n.filter(b=>b.citationState==="cited"||b.citationState==="emerging").length,m=(()=>{if(c.length<4)return"flat";const b=c.slice(-3),v=c.slice(-6,-3);if(v.length===0)return"flat";const x=b.filter(z=>z.citationState==="cited"||z.citationState==="emerging").length,j=v.filter(z=>z.citationState==="cited"||z.citationState==="emerging").length;return x>j?"up":x<j?"down":"flat"})(),g=(()=>{if(c.length===0)return"Awaiting first run";if(c.length===1)return"First observation";const b=c[c.length-1].citationState,v=c[c.length-2].citationState,x=b==="cited"||b==="emerging",j=v==="cited"||v==="emerging";if(!j&&x)return"Newly cited";if(j&&!x)return"Lost citation";let z=0;for(let w=c.length-1;w>=0;w--){const _=c[w].citationState;if((_==="cited"||_==="emerging")===x)z++;else break}return x?z<=1?"Cited in latest run":`Cited ${z} runs in a row`:z<=1?"Missed in latest run":`Missed for ${z} runs`})(),p=m==="up"?"↑":m==="down"?"↓":"→";return u.jsxs("div",{className:`evidence-phrase-card evidence-phrase-card--${o}`,children:[u.jsx("div",{className:"evidence-card-header",children:u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsx("p",{className:"evidence-card-keyword",children:t}),u.jsxs("div",{className:"evidence-card-status-row",children:[u.jsx(q0,{state:o}),u.jsxs("span",{className:`evidence-card-trend evidence-card-trend--${m}`,children:[u.jsx("span",{"aria-hidden":"true",children:p}),u.jsx("span",{children:g})]})]})]})}),u.jsxs("div",{className:"evidence-card-timeline-row",children:[u.jsx(PA,{history:c,maxDots:14}),u.jsxs("span",{className:"evidence-card-ratio",children:[f,"/",n.length," provider",n.length!==1?"s":""]})]}),u.jsxs("div",{className:"evidence-card-providers",children:[n.filter(b=>b.citationState!=="pending").map(b=>u.jsxs("button",{type:"button",className:`evidence-provider-btn evidence-provider-btn--${b.citationState}`,onClick:()=>a(b.id),title:`View ${b.provider} evidence for "${t}"`,children:[u.jsx("span",{className:"capitalize",children:b.provider}),u.jsx("span",{"aria-hidden":"true",className:"font-bold",children:b.citationState==="cited"||b.citationState==="emerging"?"✓":b.citationState==="lost"?"✗":"–"}),u.jsx("span",{className:"opacity-50 text-[10px]",children:"View →"})]},b.id)),n.every(b=>b.citationState==="pending")&&u.jsx("span",{className:"text-xs text-zinc-500 italic py-1",children:"Awaiting first run"})]})]})}function JA({evidence:t,onOpenEvidence:n}){const a=N.useMemo(()=>{const l=new Map;for(const o of t){const c=l.get(o.keyword)??[];l.set(o.keyword,[...c,o])}return[...l.entries()].map(([o,c])=>({phrase:o,items:c}))},[t]);return a.length===0?u.jsx("p",{className:"supporting-copy",children:"No key phrases tracked yet."}):u.jsx("div",{className:"evidence-card-grid",children:a.map(({phrase:l,items:o})=>u.jsx(XA,{phrase:l,items:o,onOpenEvidence:n},l))})}function FA(t){return t==="High"?"negative":t==="Moderate"?"caution":"neutral"}function WA({competitors:t}){return t.length===0?u.jsx("p",{className:"text-sm text-zinc-500",children:"No competitors configured. Add competitors to track overlap."}):u.jsx("div",{className:"competitor-table-wrap",children:u.jsxs("table",{className:"competitor-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Domain"}),u.jsx("th",{children:"Pressure"}),u.jsx("th",{children:"Citations"}),u.jsx("th",{children:"Key Phrases"})]})}),u.jsx("tbody",{children:t.map(n=>u.jsxs("tr",{children:[u.jsx("td",{className:"font-medium text-zinc-100",children:n.domain}),u.jsx("td",{children:u.jsx(yt,{tone:FA(n.pressureLabel),children:n.pressureLabel})}),u.jsx("td",{className:"text-zinc-300 tabular-nums",children:n.totalKeywords>0?`${n.citationCount} / ${n.totalKeywords}`:"—"}),u.jsx("td",{className:"text-zinc-500 text-xs",children:n.citedKeywords.length>0?n.citedKeywords.join(", "):"Not cited"})]},n.id))})]})})}function eT({project:t,onNavigate:n}){const a=`/projects/${t.project.id}`;return u.jsxs("a",{className:"project-row cursor-pointer",href:a,onClick:Xt(n,a),children:[u.jsxs("div",{className:"project-row-primary",children:[u.jsxs("div",{children:[u.jsx("p",{className:"project-name",children:t.project.name}),u.jsx("p",{className:"project-domain",children:t.project.canonicalDomain})]}),u.jsx("p",{className:"project-insight",children:t.insight})]}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Answer Visibility"}),u.jsx("p",{className:"metric-inline-value",children:t.visibilityScore}),u.jsx("p",{className:"metric-inline-delta",children:t.visibilityDelta})]})}),u.jsx("div",{className:"project-row-stat",children:u.jsxs("div",{className:"metric-inline-block",children:[u.jsx("p",{className:"metric-inline-label",children:"Competitor Pressure"}),u.jsx("p",{className:"metric-inline-value",children:t.competitorPressureLabel}),u.jsxs("p",{className:"metric-inline-delta",children:[t.lastRun.kindLabel," · ",tc(t.lastRun.status)]})]})}),u.jsx("div",{className:"project-row-chart",children:u.jsx(YA,{points:t.trend,tone:B0(t.lastRun.status)})}),u.jsx("span",{className:"project-row-link",children:u.jsx(Tf,{className:"h-4 w-4 text-zinc-500"})})]})}function tT({model:t,systemHealth:n,onNavigate:a,onOpenRun:l}){return u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Portfolio"}),u.jsx("p",{className:"page-subtitle",children:"Visibility and execution state across all projects"})]}),u.jsx("div",{className:"page-header-right",children:u.jsx("p",{className:"text-[11px] text-zinc-600",children:t.lastUpdatedAt})})]}),t.projects.length>0?u.jsx("div",{className:"project-list project-list-scrollable",children:t.projects.map(o=>u.jsx(eT,{project:o,onNavigate:a},o.project.id))}):u.jsxs(ut,{className:"surface-card empty-card",children:[u.jsx("h3",{children:t.emptyState?.title??"No projects yet"}),u.jsx("p",{className:"supporting-copy",children:t.emptyState?.detail}),u.jsx(pe,{size:"sm",asChild:!0,children:u.jsx("a",{href:t.emptyState?.ctaHref??"/setup",onClick:Xt(a,t.emptyState?.ctaHref??"/setup"),children:t.emptyState?.ctaLabel??"Launch setup"})})]}),u.jsxs("div",{className:"overview-secondary-grid",children:[t.attentionItems.length>0&&u.jsxs("section",{className:"overview-secondary-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Needs attention"}),u.jsx("h2",{className:"section-title-sm",children:"What changed"})]})}),u.jsx("div",{className:"attention-list attention-list-scrollable",children:t.attentionItems.map(o=>u.jsxs("a",{className:`attention-item attention-item-${o.tone}`,href:o.href,onClick:Xt(a,o.href),children:[u.jsxs("div",{children:[u.jsx("p",{className:"attention-title",children:o.title}),u.jsx("p",{className:"attention-detail",children:o.detail})]}),u.jsx("span",{className:"attention-action",children:o.actionLabel})]},o.id))})]}),u.jsxs("section",{className:"overview-secondary-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Recent runs"}),u.jsx("h2",{className:"section-title-sm",children:"Activity"})]})}),u.jsx("div",{className:"compact-stack compact-stack-scrollable",children:t.recentRuns.length>0?t.recentRuns.map(o=>u.jsxs("button",{className:"compact-run",type:"button",onClick:()=>l(o.id),children:[u.jsxs("div",{children:[u.jsx("p",{className:"compact-run-title",children:o.projectName}),u.jsx("p",{className:"compact-run-detail",children:o.summary})]}),u.jsx(nc,{status:o.status})]},o.id)):u.jsx("p",{className:"supporting-copy",children:"Run history appears here after the first launch."})})]})]}),u.jsxs("section",{className:"page-section",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"System health"}),u.jsx("h2",{className:"section-title-sm",children:"Infrastructure"})]})}),u.jsx("div",{className:"health-grid",children:n.map(o=>u.jsxs(ut,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:o.label}),u.jsx("h3",{children:o.detail})]}),u.jsx(yt,{tone:o.tone,children:o.label})]}),u.jsx("p",{className:"supporting-copy",children:o.meta})]},o.id))})]})]})}function nT({projects:t,onNavigate:n,onProjectCreated:a}){const[l,o]=N.useState(!1),[c,f]=N.useState(""),[m,g]=N.useState(""),[p,b]=N.useState(""),[v,x]=N.useState("US"),[j,z]=N.useState("en"),[w,_]=N.useState(!1),[E,O]=N.useState(null),T=c.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),D=async()=>{if(!(!T||!p)){_(!0),O(null);try{const L=await ec(T,{displayName:m||c,canonicalDomain:p,country:v,language:j});a(),f(""),g(""),b(""),x("US"),z("en"),o(!1),n(`/projects/${L.id}`)}catch(L){O(L instanceof Error?L.message:"Failed to create project")}finally{_(!1)}}};return u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Projects"}),u.jsxs("p",{className:"page-subtitle",children:[t.length," project",t.length!==1?"s":""," tracked"]})]}),u.jsx("div",{className:"page-header-right",children:u.jsxs(pe,{type:"button",onClick:()=>o(L=>!L),children:[u.jsx(jy,{className:"size-4 mr-1.5"}),"Add project"]})})]}),l?u.jsxs(ut,{className:"surface-card mb-6",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"New project"}),u.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Create a new monitoring project"})]})}),u.jsxs("div",{className:"compact-stack mt-4",children:[u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-project-name",children:"Project name"}),u.jsx("input",{id:"new-project-name",className:"setup-input",type:"text",placeholder:"my-project",value:c,onChange:L=>f(L.target.value)}),T&&T!==c?u.jsxs("p",{className:"supporting-copy",children:["Slug: ",T]}):null]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-display-name",children:"Display name"}),u.jsx("input",{id:"new-display-name",className:"setup-input",type:"text",placeholder:"My Project",value:m,onChange:L=>g(L.target.value)})]})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-domain",children:"Canonical domain"}),u.jsx("input",{id:"new-domain",className:"setup-input",type:"text",placeholder:"example.com",value:p,onChange:L=>b(L.target.value)})]}),u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-country",children:"Country"}),u.jsx("input",{id:"new-country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:v,onChange:L=>x(L.target.value.toUpperCase())})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"new-language",children:"Language"}),u.jsx("input",{id:"new-language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:j,onChange:L=>z(L.target.value.toLowerCase())})]})]})]}),E?u.jsx("p",{className:"text-rose-400 text-sm mt-3",children:E}):null,u.jsxs("div",{className:"flex items-center gap-3 mt-4",children:[u.jsx(pe,{type:"button",disabled:!T||!p||w,onClick:D,children:w?"Creating...":"Create project"}),u.jsx(pe,{type:"button",variant:"ghost",onClick:()=>o(!1),children:"Cancel"})]})]}):null,t.length>0?u.jsx("div",{className:"data-table-wrapper",children:u.jsxs("table",{className:"data-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"Name"}),u.jsx("th",{children:"Domain"}),u.jsx("th",{children:"Visibility"}),u.jsx("th",{children:"Last run"}),u.jsx("th",{className:"text-right",children:"Country"})]})}),u.jsx("tbody",{children:t.map(L=>{const I=`/projects/${L.project.id}`,G=L.recentRuns[0];return u.jsxs("tr",{className:"cursor-pointer",onClick:()=>n(I),children:[u.jsxs("td",{children:[u.jsx("a",{className:"text-zinc-100 font-medium hover:underline",href:I,onClick:Xt(n,I),children:L.project.displayName||L.project.name}),u.jsx("p",{className:"text-[11px] text-zinc-500",children:L.project.name})]}),u.jsx("td",{className:"text-zinc-400",children:L.project.canonicalDomain}),u.jsx("td",{children:u.jsx(yt,{tone:L.visibilitySummary.tone,children:L.visibilitySummary.value})}),u.jsx("td",{className:"text-zinc-500 text-sm",children:G?u.jsx(nc,{status:G.status}):u.jsx("span",{className:"text-zinc-600",children:"No runs"})}),u.jsx("td",{className:"text-right text-zinc-500",children:L.project.country})]},L.project.id)})})]})}):l?null:u.jsxs(ut,{className:"surface-card empty-card",children:[u.jsx("h3",{children:"No projects yet"}),u.jsx("p",{className:"supporting-copy",children:"Create your first monitoring project to start tracking AI visibility."}),u.jsxs(pe,{type:"button",onClick:()=>o(!0),children:[u.jsx(jy,{className:"size-4 mr-1.5"}),"Add project"]})]}),u.jsx(iT,{onApplied:a})]})}function iT({onApplied:t}){const[n,a]=N.useState(""),[l,o]=N.useState(!1),[c,f]=N.useState([]),[m,g]=N.useState([]),p=async()=>{if(!n.trim())return;o(!0),f([]),g([]);const b=E1(n),v=[],x=[];for(let j=0;j<b.length;j++){const z=b[j];if(z.errors.length>0){v.push(`Document ${j+1}: ${z.errors[0]?.message}`);continue}const w=z.toJSON();if(!(!w||typeof w!="object"))try{const _=await mA(w);x.push(`Applied "${_.displayName||_.name}" (revision ${_.configRevision})`)}catch(_){v.push(`Document ${j+1}: ${_ instanceof Error?_.message:String(_)}`)}}f(x),g(v),o(!1),x.length>0&&t()};return u.jsxs("section",{className:"mt-8",children:[u.jsx("div",{className:"page-section-divider"}),u.jsx("div",{className:"section-head mt-6",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Config as code"}),u.jsx("h2",{className:"text-sm font-medium text-zinc-200",children:"Apply YAML"})]})}),u.jsxs("p",{className:"text-zinc-500 text-sm mb-3",children:["Paste a ",u.jsx("code",{className:"text-zinc-400",children:"canonry.yaml"})," config (multi-document YAML with ",u.jsx("code",{className:"text-zinc-400",children:"---"})," separators supported)."]}),u.jsx("textarea",{className:"setup-input w-full font-mono text-xs",rows:10,placeholder:`apiVersion: canonry/v1
225
+ kind: Project
226
+ metadata:
227
+ name: my-project
228
+ spec:
229
+ canonicalDomain: example.com
230
+ country: US
231
+ language: en
232
+ keywords: []`,value:n,onChange:b=>a(b.target.value)}),c.length>0&&u.jsx("ul",{className:"mt-2 space-y-1",children:c.map((b,v)=>u.jsx("li",{className:"text-emerald-400 text-sm",children:b},v))}),m.length>0&&u.jsx("ul",{className:"mt-2 space-y-1",children:m.map((b,v)=>u.jsx("li",{className:"text-rose-400 text-sm",children:b},v))}),u.jsx("div",{className:"mt-3",children:u.jsx(pe,{type:"button",disabled:!n.trim()||l,onClick:p,children:l?"Applying...":"Apply"})})]})}function aT({model:t,onOpenEvidence:n,onOpenRun:a,onTriggerRun:l,onDeleteProject:o,onAddKeywords:c,onAddCompetitors:f,onUpdateOwnedDomains:m,onUpdateProject:g}){const[p,b]=N.useState(!1),[v,x]=N.useState(!1),[j,z]=N.useState(!1),[w,_]=N.useState(null),[E,O]=N.useState(!1),[T,D]=N.useState(""),[L,I]=N.useState(!1),[G,M]=N.useState(!1),[F,xe]=N.useState(""),[X,le]=N.useState(!1),[$e,Ke]=N.useState(!1),[he,U]=N.useState(""),[W,se]=N.useState(!1);async function ve(){const V=await aA(t.project.name),re=typeof V=="string"?V:JSON.stringify(V,null,2),q=new Blob([re],{type:"text/yaml"}),de=URL.createObjectURL(q),me=document.createElement("a");me.href=de,me.download=`${t.project.name}.yaml`,me.click(),URL.revokeObjectURL(de)}async function ee(){const V=T.split(`
233
+ `).map(re=>re.trim()).filter(Boolean);if(V.length!==0){I(!0);try{await c(t.project.name,V),D(""),O(!1)}finally{I(!1)}}}async function C(){const V=F.trim();if(V){le(!0);try{await f(t.project.name,[V]),xe(""),M(!1)}finally{le(!1)}}}async function K(){const V=he.trim();if(V){se(!0);try{const re=t.project.ownedDomains??[];await m(t.project.name,[...re,V]),U(""),Ke(!1)}finally{se(!1)}}}async function te(V){se(!0);try{const re=t.project.ownedDomains??[];await m(t.project.name,re.filter(q=>q!==V))}finally{se(!1)}}const ie=V=>!Number.isNaN(Number.parseInt(V,10));return u.jsxs("div",{className:"page-container",children:[p?u.jsxs(ut,{className:"surface-card p-6 mb-6 border-rose-800/60",children:[u.jsx("h3",{className:"text-base font-semibold text-rose-400 mb-2",children:"Delete project?"}),u.jsxs("p",{className:"text-sm text-zinc-400 mb-4",children:["This will permanently delete ",u.jsx("strong",{className:"text-zinc-200",children:t.project.displayName||t.project.name})," and all its key phrases, competitors, runs, and snapshots. This cannot be undone."]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsx(pe,{type:"button",variant:"destructive",disabled:v,onClick:async()=>{x(!0),o(t.project.name)},children:v?"Deleting...":"Yes, delete project"}),u.jsx(pe,{type:"button",variant:"outline",disabled:v,onClick:()=>b(!1),children:"Cancel"})]})]}):null,u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:t.project.displayName||t.project.name}),u.jsxs("p",{className:"page-subtitle",children:[t.project.canonicalDomain,(t.project.ownedDomains??[]).length===0&&!$e&&u.jsx("button",{type:"button",className:"ml-2 text-[10px] uppercase tracking-wide text-zinc-600 hover:text-zinc-400 transition-colors",onClick:()=>Ke(!0),children:"+ add domain"})," "," · ",t.contextLabel]}),u.jsxs("div",{className:"tag-row",children:[u.jsx("span",{className:"tag",children:t.project.country}),u.jsx("span",{className:"tag",children:t.project.language.toUpperCase()}),t.project.tags.map(V=>u.jsx("span",{className:"tag",children:V},V))]}),((t.project.ownedDomains??[]).length>0||$e)&&u.jsxs("div",{className:"mt-1.5 flex flex-wrap items-center gap-1.5",children:[u.jsx("span",{className:"text-[10px] uppercase tracking-wide text-zinc-500 mr-1",children:"Also tracking"}),(t.project.ownedDomains??[]).map(V=>u.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:[V,u.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",disabled:W,onClick:()=>te(V),"aria-label":`Remove ${V}`,children:"×"})]},V)),$e?u.jsxs("span",{className:"inline-flex items-center gap-1",children:[u.jsx("input",{className:"rounded border border-zinc-700 bg-transparent px-1.5 py-0.5 text-xs text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none w-40",type:"text",placeholder:"docs.example.com",value:he,onChange:V=>U(V.target.value),onKeyDown:V=>V.key==="Enter"&&K(),autoFocus:!0}),u.jsx(pe,{type:"button",size:"sm",disabled:!he.trim()||W,onClick:K,children:W?"...":"Add"}),u.jsx("button",{type:"button",className:"text-xs text-zinc-500 hover:text-zinc-300",onClick:()=>{Ke(!1),U("")},children:"Cancel"})]}):u.jsx("button",{type:"button",className:"rounded-full border border-dashed border-zinc-700 px-2 py-0.5 text-[10px] uppercase tracking-wide text-zinc-500 hover:text-zinc-300 hover:border-zinc-500 transition-colors",onClick:()=>Ke(!0),children:"+ domain"})]})]}),u.jsxs("div",{className:"page-header-right",children:[u.jsx("p",{className:"text-sm text-zinc-500",children:t.dateRangeLabel}),u.jsxs("div",{className:"flex items-center gap-2",children:[u.jsx(pe,{type:"button",variant:"outline",size:"icon",onClick:ve,"aria-label":"Export project as YAML",children:u.jsx(pj,{className:"h-4 w-4 text-zinc-400"})}),u.jsx(pe,{type:"button",variant:"outline",size:"icon",onClick:()=>b(!0),"aria-label":"Delete project",children:u.jsx(Aj,{className:"h-4 w-4 text-zinc-400"})}),u.jsx(pe,{type:"button",disabled:j,onClick:async()=>{z(!0),_(null);try{await l(t.project.name)}catch(V){_(V instanceof Error?V.message:"Failed to trigger run")}finally{z(!1)}},children:j?"Starting...":"Run now"})]})]})]}),w&&u.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[w,u.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>_(null),children:"×"})]}),u.jsxs("section",{className:"gauge-row",children:[u.jsx(Id,{value:t.visibilitySummary.value,label:t.visibilitySummary.label,delta:t.visibilitySummary.delta,tone:t.visibilitySummary.tone,description:t.visibilitySummary.description,tooltip:t.visibilitySummary.tooltip,isNumeric:ie(t.visibilitySummary.value)}),u.jsx(Id,{value:t.competitorPressure.value,label:t.competitorPressure.label,delta:t.competitorPressure.delta,tone:t.competitorPressure.tone,description:t.competitorPressure.description,tooltip:t.competitorPressure.tooltip,isNumeric:ie(t.competitorPressure.value)}),u.jsx(Id,{value:t.runStatus.value,label:t.runStatus.label,delta:t.runStatus.delta,tone:t.runStatus.tone,description:t.runStatus.description,tooltip:t.runStatus.tooltip,isNumeric:ie(t.runStatus.value)})]}),t.providerScores.length>1&&u.jsxs("section",{className:"page-section-divider",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Model breakdown"}),u.jsxs("h2",{children:["Visibility by model ",u.jsx(Z0,{text:"Per-model citation rate. Shows how often each AI model cites your domain across all tracked key phrases. Switching models can significantly affect citation rates."})]})]})}),u.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 lg:grid-cols-4 gap-3",children:t.providerScores.map(V=>u.jsxs(ut,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsx(Yf,{provider:V.provider}),u.jsxs("span",{className:`text-lg font-semibold ${V.score>=70?"text-emerald-400":V.score>=40?"text-amber-400":"text-rose-400"}`,children:[V.score,"%"]})]}),V.model&&u.jsx("p",{className:"mt-0.5 text-[11px] font-mono text-zinc-500 truncate",children:V.model}),u.jsxs("p",{className:"mt-1 text-xs text-zinc-500",children:[V.cited," of ",V.total," key phrases cited"]})]},`${V.provider}::${V.model??"unknown"}`))})]}),u.jsxs("section",{className:"page-section-divider",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"What changed"}),u.jsx("h2",{children:"Citation signals"})]})}),u.jsx(VA,{insights:t.insights,onOpenEvidence:n})]}),u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Visibility evidence"}),u.jsx("h2",{children:"Key phrase citation tracking"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("p",{className:"supporting-copy",children:[new Set(t.visibilityEvidence.map(V=>V.keyword)).size," key phrases tracked"]}),u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:()=>O(!E),children:E?"Cancel":"+ Add key phrases"})]})]}),E&&u.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[u.jsx("textarea",{className:"w-full resize-none rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",rows:3,placeholder:"Enter key phrases, one per line",value:T,onChange:V=>D(V.target.value)}),u.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[u.jsxs("p",{className:"text-xs text-zinc-500",children:[T.split(`
234
+ `).filter(V=>V.trim()).length," key phrases"]}),u.jsx(pe,{type:"button",size:"sm",disabled:!T.trim()||L,onClick:ee,children:L?"Adding...":"Add key phrases"})]})]}),u.jsx(JA,{evidence:t.visibilityEvidence,onOpenEvidence:n})]}),u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Competitors"}),u.jsx("h2",{children:"Competitive landscape"})]}),u.jsxs("div",{className:"flex items-center gap-3",children:[u.jsxs("p",{className:"supporting-copy",children:[t.competitors.length," tracked"]}),u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:()=>M(!G),children:G?"Cancel":"+ Add competitor"})]})]}),G&&u.jsxs("div",{className:"mb-3 flex gap-2 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3",children:[u.jsx("input",{className:"flex-1 rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"competitor.com",value:F,onChange:V=>xe(V.target.value),onKeyDown:V=>V.key==="Enter"&&C()}),u.jsx(pe,{type:"button",size:"sm",disabled:!F.trim()||X,onClick:C,children:X?"Adding...":"Add"})]}),u.jsx(WA,{competitors:t.competitors})]}),u.jsxs("section",{className:"page-section-divider",children:[u.jsx("div",{className:"section-head section-head-inline",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Run timeline"}),u.jsx("h2",{children:"Recent execution history"})]})}),u.jsx("div",{className:"run-list",children:t.recentRuns.map(V=>u.jsx(H0,{run:V,onOpen:a},V.id))})]}),u.jsx(lT,{project:{...t.project,displayName:t.project.displayName??t.project.name},onUpdateProject:g}),u.jsx(dT,{projectName:t.project.name}),u.jsx(hT,{projectName:t.project.name}),u.jsx(sT,{projectName:t.project.name})]})}function sT({projectName:t}){const[n,a]=N.useState([]),[l,o]=N.useState([]),[c,f]=N.useState(!0),[m,g]=N.useState(!1),[p,b]=N.useState(!1),[v,x]=N.useState(null);N.useEffect(()=>{f(!0),gA(t).then(E=>(a(E),E.find(T=>T.connectionType==="gsc")?xA(t,{limit:20}):[])).then(E=>o(E)).catch(()=>o([])).finally(()=>f(!1))},[t]);const j=n.find(E=>E.connectionType==="gsc");async function z(){b(!0),x(null);try{const{authUrl:E}=await yA(t,"gsc");window.open(E,"_blank","width=600,height=700")}catch(E){x(E instanceof Error?E.message:"Failed to start OAuth flow")}finally{b(!1)}}async function w(){x(null);try{await vA(t,"gsc"),a(E=>E.filter(O=>O.connectionType!=="gsc")),o([])}catch(E){x(E instanceof Error?E.message:"Failed to disconnect")}}async function _(){g(!0),x(null);try{await bA(t)}catch(E){x(E instanceof Error?E.message:"Failed to trigger sync")}finally{g(!1)}}return u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Search Console"}),u.jsx("h2",{children:"Google Search Console"})]}),j&&u.jsx(pe,{type:"button",variant:"outline",size:"sm",disabled:m,onClick:_,children:m?"Syncing...":"Sync data"})]}),v&&u.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[v,u.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>x(null),children:"×"})]}),c?u.jsx("p",{className:"text-sm text-zinc-500",children:"Loading…"}):j?u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"mb-4 flex items-center gap-3 rounded-lg border border-zinc-800/60 bg-zinc-900/30 px-4 py-3",children:[u.jsx("span",{className:"h-2 w-2 rounded-full bg-emerald-500"}),u.jsx("span",{className:"text-sm text-zinc-300",children:"Connected"}),j.propertyId&&u.jsx("span",{className:"text-xs text-zinc-500",children:j.propertyId}),u.jsx("button",{type:"button",className:"ml-auto text-xs text-zinc-500 hover:text-rose-400 transition-colors",onClick:w,children:"Disconnect"})]}),l.length>0?u.jsx("div",{className:"overflow-x-auto",children:u.jsxs("table",{className:"data-table w-full text-sm",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{className:"text-left",children:"Query"}),u.jsx("th",{className:"text-right",children:"Clicks"}),u.jsx("th",{className:"text-right",children:"Impressions"}),u.jsx("th",{className:"text-right",children:"CTR"}),u.jsx("th",{className:"text-right",children:"Position"})]})}),u.jsx("tbody",{children:l.map((E,O)=>u.jsxs("tr",{children:[u.jsx("td",{className:"truncate max-w-xs text-zinc-200",children:E.query}),u.jsx("td",{className:"text-right tabular-nums text-zinc-300",children:E.clicks.toLocaleString()}),u.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:E.impressions.toLocaleString()}),u.jsxs("td",{className:"text-right tabular-nums text-zinc-400",children:[(E.ctr*100).toFixed(1),"%"]}),u.jsx("td",{className:"text-right tabular-nums text-zinc-400",children:E.position.toFixed(1)})]},O))})]})}):u.jsx("p",{className:"text-sm text-zinc-500",children:"No performance data yet. Run a GSC sync to import data."})]}):u.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 px-4 py-6 text-center",children:[u.jsx("p",{className:"text-sm text-zinc-400 mb-3",children:"Connect Google Search Console to import search performance data for this project."}),u.jsx(pe,{type:"button",variant:"outline",size:"sm",disabled:p,onClick:z,children:p?"Opening…":"Connect Google Search Console"})]})]})}function lT({project:t,onUpdateProject:n}){const[a,l]=N.useState(!1),[o,c]=N.useState(!1),[f,m]=N.useState(null),[g,p]=N.useState(t.displayName),[b,v]=N.useState(t.canonicalDomain),[x,j]=N.useState(t.country),[z,w]=N.useState(t.language),[_,E]=N.useState(t.ownedDomains??[]),[O,T]=N.useState("");N.useEffect(()=>{a||(p(t.displayName),v(t.canonicalDomain),j(t.country),w(t.language),E(t.ownedDomains??[]))},[t,a]);function D(){l(!1),m(null),p(t.displayName),v(t.canonicalDomain),j(t.country),w(t.language),E(t.ownedDomains??[]),T("")}function L(){const X=O.trim();X&&(_.includes(X)||E([..._,X]),T(""))}function I(X){E(_.filter(le=>le!==X))}async function G(){if(!(!g.trim()||!b.trim()||!x.trim()||!z.trim())){c(!0),m(null);try{await n(t.name,{displayName:g.trim(),canonicalDomain:b.trim(),ownedDomains:_,country:x.trim(),language:z.trim()}),l(!1)}catch(X){m(X instanceof Error?X.message:"Failed to save")}finally{c(!1)}}}const M=g!==t.displayName||b!==t.canonicalDomain||x!==t.country||z!==t.language||JSON.stringify(_)!==JSON.stringify(t.ownedDomains??[]),F="w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",xe="block text-xs font-medium text-zinc-400 mb-1";return u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Configuration"}),u.jsx("h2",{children:"Project settings"})]}),!a&&u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:()=>l(!0),children:"Edit settings"})]}),f&&u.jsxs("div",{className:"mb-3 rounded-lg border border-rose-800/40 bg-rose-950/20 px-3 py-2 text-sm text-rose-300",children:[f,u.jsx("button",{type:"button",className:"ml-2 text-rose-400 hover:text-rose-200",onClick:()=>m(null),children:"×"})]}),a?u.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-4",children:[u.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[u.jsxs("div",{children:[u.jsx("label",{className:xe,children:"Display name"}),u.jsx("input",{className:F,type:"text",value:g,onChange:X=>p(X.target.value),placeholder:"My Project"})]}),u.jsxs("div",{children:[u.jsx("label",{className:xe,children:"Canonical domain"}),u.jsx("input",{className:F,type:"text",value:b,onChange:X=>v(X.target.value),placeholder:"example.com"})]}),u.jsxs("div",{children:[u.jsx("label",{className:xe,children:"Country"}),u.jsx("input",{className:F,type:"text",value:x,onChange:X=>j(X.target.value),placeholder:"US",maxLength:2})]}),u.jsxs("div",{children:[u.jsx("label",{className:xe,children:"Language"}),u.jsx("input",{className:F,type:"text",value:z,onChange:X=>w(X.target.value),placeholder:"en"})]})]}),u.jsxs("div",{children:[u.jsx("label",{className:xe,children:"Owned domains"}),u.jsx("div",{className:"flex flex-wrap gap-1.5 mb-2",children:_.map(X=>u.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:[X,u.jsx("button",{type:"button",className:"ml-0.5 text-zinc-500 hover:text-zinc-200 transition-colors",onClick:()=>I(X),"aria-label":`Remove ${X}`,children:"×"})]},X))}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx("input",{className:`${F} flex-1`,type:"text",placeholder:"docs.example.com",value:O,onChange:X=>T(X.target.value),onKeyDown:X=>X.key==="Enter"&&(X.preventDefault(),L())}),u.jsx(pe,{type:"button",variant:"outline",size:"sm",disabled:!O.trim(),onClick:L,children:"Add"})]})]}),u.jsxs("div",{className:"flex items-center gap-2 pt-2 border-t border-zinc-800/60",children:[u.jsx(pe,{type:"button",disabled:o||!M||!g.trim()||!b.trim(),onClick:G,children:o?"Saving...":"Save changes"}),u.jsx(pe,{type:"button",variant:"outline",disabled:o,onClick:D,children:"Cancel"})]})]}):u.jsx("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 overflow-hidden",children:u.jsx("table",{className:"w-full text-sm",children:u.jsxs("tbody",{children:[u.jsxs("tr",{className:"border-b border-zinc-800/40",children:[u.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium w-40",children:"Display name"}),u.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.displayName||"—"})]}),u.jsxs("tr",{className:"border-b border-zinc-800/40",children:[u.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Canonical domain"}),u.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.canonicalDomain})]}),u.jsxs("tr",{className:"border-b border-zinc-800/40",children:[u.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Owned domains"}),u.jsx("td",{className:"px-4 py-2.5",children:(t.ownedDomains??[]).length>0?u.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.ownedDomains.map(X=>u.jsx("span",{className:"rounded-full border border-zinc-700/60 bg-zinc-800/40 px-2 py-0.5 text-xs text-zinc-300",children:X},X))}):u.jsx("span",{className:"text-zinc-500",children:"—"})})]}),u.jsxs("tr",{className:"border-b border-zinc-800/40",children:[u.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Country"}),u.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.country})]}),u.jsxs("tr",{children:[u.jsx("td",{className:"px-4 py-2.5 text-zinc-500 font-medium",children:"Language"}),u.jsx("td",{className:"px-4 py-2.5 text-zinc-200",children:t.language})]})]})})})]})}const rT=[{value:"daily",label:"Every day"},{value:"weekly@mon",label:"Every Monday"},{value:"weekly@wed",label:"Every Wednesday"},{value:"weekly@fri",label:"Every Friday"},{value:"twice-daily",label:"Twice a day (6am & 6pm)"},{value:"custom",label:"Custom cron expression"}],sv=["UTC","America/New_York","America/Chicago","America/Denver","America/Los_Angeles","America/Toronto","America/Vancouver","Europe/London","Europe/Paris","Europe/Berlin","Asia/Tokyo","Asia/Shanghai","Asia/Singapore","Australia/Sydney"];function lf(t){return t===0?"12:00 AM":t<12?`${t}:00 AM`:t===12?"12:00 PM":`${t-12}:00 PM`}function oT(t,n){return t==="twice-daily"?"twice-daily":t.startsWith("weekly@")?`${t}@${n}`:`daily@${n}`}function cT(t,n){if(!t)return{freq:"custom",hour:6,customCron:n};if(t==="twice-daily")return{freq:"twice-daily",hour:6,customCron:""};const a=t.match(/^daily(?:@(\d+))?$/);if(a)return{freq:"daily",hour:a[1]?parseInt(a[1]):6,customCron:""};const l=t.match(/^(weekly@(?:mon|tue|wed|thu|fri|sat|sun))(?:@(\d+))?$/);return l?{freq:l[1],hour:l[2]?parseInt(l[2]):6,customCron:""}:{freq:"custom",hour:6,customCron:n}}function uT(t,n,a){const l=a==="UTC"?"UTC":a.split("/").pop()?.replace(/_/g," ")??a;if(!t)return`Custom: ${n} · ${l}`;if(t==="twice-daily")return`Twice a day (6am & 6pm) · ${l}`;const o=t.match(/^daily(?:@(\d+))?$/);if(o){const f=o[1]?parseInt(o[1]):6;return`Every day at ${lf(f)} · ${l}`}const c=t.match(/^weekly@(mon|tue|wed|thu|fri|sat|sun)(?:@(\d+))?$/);if(c){const f={mon:"Monday",tue:"Tuesday",wed:"Wednesday",thu:"Thursday",fri:"Friday",sat:"Saturday",sun:"Sunday"},m=c[2]?parseInt(c[2]):6;return`Every ${f[c[1]]} at ${lf(m)} · ${l}`}return`${t} · ${l}`}function dT({projectName:t}){const[n,a]=N.useState("loading"),[l,o]=N.useState(!1),[c,f]=N.useState("daily"),[m,g]=N.useState(6),[p,b]=N.useState(""),[v,x]=N.useState("UTC"),[j,z]=N.useState(!1),[w,_]=N.useState(""),[E,O]=N.useState(!1),[T,D]=N.useState(!1),[L,I]=N.useState(null);N.useEffect(()=>{rA(t).then(a).catch(()=>a(null))},[t]);const G=()=>{if(n&&n!=="loading"){const X=cT(n.preset??null,n.cronExpr);f(X.freq),g(X.hour),b(X.customCron);const le=sv.includes(n.timezone);x(le?n.timezone:"Other"),z(!le),_(le?"":n.timezone)}else f("daily"),g(6),b(""),x("UTC"),z(!1),_("");I(null),o(!0)},M=async()=>{O(!0),I(null);try{const le={timezone:j?w.trim()||"UTC":v};c==="custom"?le.cron=p.trim():le.preset=oT(c,m);const $e=await ev(t,le);a($e),o(!1)}catch(X){I(X instanceof Error?X.message:"Failed to save schedule")}finally{O(!1)}},F=async()=>{if(!(!n||n==="loading")){O(!0),I(null);try{const X={timezone:n.timezone,enabled:!n.enabled};n.preset?X.preset=n.preset:X.cron=n.cronExpr,a(await ev(t,X))}catch(X){I(X instanceof Error?X.message:"Failed to update schedule")}finally{O(!1)}}},xe=async()=>{D(!0),I(null);try{await oA(t),a(null),o(!1)}catch(X){I(X instanceof Error?X.message:"Failed to remove schedule")}finally{D(!1)}};return u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),u.jsx("h2",{children:"Scheduled runs"})]}),n!=="loading"&&!l&&u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:G,children:n?"Edit schedule":"+ Set schedule"})]}),n==="loading"&&u.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&!l&&n===null&&u.jsx(ut,{className:"surface-card compact-card",children:u.jsx("p",{className:"supporting-copy",children:"No schedule configured. Set one to automatically trigger visibility sweeps."})}),n!=="loading"&&!l&&n!==null&&u.jsxs(ut,{className:"surface-card compact-card",children:[u.jsxs("div",{className:"flex items-start justify-between gap-4",children:[u.jsxs("div",{className:"space-y-1",children:[u.jsx("p",{className:"text-sm font-medium text-zinc-200",children:uT(n.preset??null,n.cronExpr,n.timezone)}),u.jsxs("p",{className:"text-xs text-zinc-500",children:["Cron: ",u.jsx("span",{className:"font-mono",children:n.cronExpr})]}),n.nextRunAt&&u.jsxs("p",{className:"text-xs text-zinc-500",children:["Next run: ",new Date(n.nextRunAt).toLocaleString()]}),n.lastRunAt&&u.jsxs("p",{className:"text-xs text-zinc-500",children:["Last run: ",new Date(n.lastRunAt).toLocaleString()]})]}),u.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[u.jsx(yt,{tone:n.enabled?"positive":"neutral",children:n.enabled?"Active":"Paused"}),u.jsx(pe,{type:"button",variant:"outline",size:"sm",disabled:E,onClick:F,children:n.enabled?"Pause":"Resume"}),u.jsx(pe,{type:"button",variant:"ghost",size:"sm",disabled:T,onClick:xe,children:T?"Removing...":"Remove"})]})]}),L&&u.jsx("p",{className:"text-rose-400 text-sm mt-2",children:L})]}),l&&u.jsxs("div",{className:"rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[u.jsxs("div",{className:"grid grid-cols-2 gap-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Frequency"}),u.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:c,onChange:X=>f(X.target.value),children:rT.map(X=>u.jsx("option",{value:X.value,children:X.label},X.value))})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Time"}),u.jsx("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none disabled:opacity-40",value:m,disabled:c==="twice-daily"||c==="custom",onChange:X=>g(parseInt(X.target.value)),children:Array.from({length:24},(X,le)=>u.jsx("option",{value:le,children:lf(le)},le))})]})]}),c==="custom"&&u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Cron expression"}),u.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 font-mono focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"0 9 * * 1-5",value:p,onChange:X=>b(X.target.value)})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Timezone"}),u.jsxs("select",{className:"w-full rounded border border-zinc-700 bg-zinc-900 px-2 py-1.5 text-sm text-zinc-200 focus:border-zinc-500 focus:outline-none",value:j?"Other":v,onChange:X=>{X.target.value==="Other"?(z(!0),x("Other")):(z(!1),x(X.target.value))},children:[sv.map(X=>u.jsx("option",{value:X,children:X},X)),u.jsx("option",{value:"Other",children:"Other (enter manually)…"})]}),j&&u.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"text",placeholder:"e.g. America/New_York",value:w,onChange:X=>_(X.target.value)})]}),L&&u.jsx("p",{className:"text-rose-400 text-sm",children:L}),u.jsxs("div",{className:"flex gap-2 justify-end",children:[u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),I(null)},children:"Cancel"}),u.jsx(pe,{type:"button",size:"sm",disabled:E||c==="custom"&&!p.trim(),onClick:M,children:E?"Saving...":"Save schedule"})]})]})]})}const fT=[{value:"citation.lost",label:"Citation lost"},{value:"citation.gained",label:"Citation gained"},{value:"run.completed",label:"Run completed"},{value:"run.failed",label:"Run failed"}];function hT({projectName:t}){const[n,a]=N.useState("loading"),[l,o]=N.useState(!1),[c,f]=N.useState(""),[m,g]=N.useState(["citation.lost","citation.gained"]),[p,b]=N.useState(!1),[v,x]=N.useState(null),[j,z]=N.useState({});N.useEffect(()=>{cA(t).then(a).catch(()=>a([]))},[t]);const w=T=>{g(D=>D.includes(T)?D.filter(L=>L!==T):[...D,T])},_=async()=>{if(!(!c.trim()||m.length===0)){b(!0),x(null);try{const T=await uA(t,{channel:"webhook",url:c.trim(),events:m});a(D=>D==="loading"?[T]:[...D,T]),f(""),g(["citation.lost","citation.gained"]),o(!1)}catch(T){x(T instanceof Error?T.message:"Failed to add webhook")}finally{b(!1)}}},E=async T=>{try{await dA(t,T),a(D=>D==="loading"?D:D.filter(L=>L.id!==T))}catch(D){x(D instanceof Error?D.message:"Failed to remove webhook")}},O=async T=>{z(D=>({...D,[T]:{state:"testing"}}));try{const D=await fA(t,T);z(L=>({...L,[T]:{state:D.ok?"ok":"fail",status:D.status}}))}catch{z(D=>({...D,[T]:{state:"fail"}}))}};return u.jsxs("section",{className:"page-section-divider",children:[u.jsxs("div",{className:"section-head section-head-inline",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Automation"}),u.jsx("h2",{children:"Notifications"})]}),n!=="loading"&&u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!l),x(null)},children:l?"Cancel":"+ Add webhook"})]}),l&&u.jsxs("div",{className:"mb-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-4 space-y-3",children:[u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Webhook URL"}),u.jsx("input",{className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",type:"url",placeholder:"https://hooks.example.com/canonry",value:c,onChange:T=>f(T.target.value)})]}),u.jsxs("div",{className:"space-y-1.5",children:[u.jsx("label",{className:"text-xs font-medium text-zinc-400",children:"Trigger on"}),u.jsx("div",{className:"flex flex-wrap gap-3",children:fT.map(T=>u.jsxs("label",{className:"flex items-center gap-1.5 cursor-pointer select-none",children:[u.jsx("input",{type:"checkbox",className:"rounded border-zinc-600 bg-zinc-800",checked:m.includes(T.value),onChange:()=>w(T.value)}),u.jsx("span",{className:"text-sm text-zinc-300",children:T.label})]},T.value))})]}),v&&u.jsx("p",{className:"text-rose-400 text-sm",children:v}),u.jsxs("div",{className:"flex gap-2 justify-end",children:[u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:()=>{o(!1),x(null)},children:"Cancel"}),u.jsx(pe,{type:"button",size:"sm",disabled:p||!c.trim()||m.length===0,onClick:_,children:p?"Adding...":"Add webhook"})]})]}),n==="loading"&&u.jsx("p",{className:"supporting-copy",children:"Loading..."}),n!=="loading"&&n.length===0&&!l&&u.jsx(ut,{className:"surface-card compact-card",children:u.jsx("p",{className:"supporting-copy",children:"No webhooks configured. Add one to get alerted when citations change or runs complete."})}),n!=="loading"&&n.length>0&&u.jsxs("div",{className:"evidence-table-wrap",children:[u.jsxs("table",{className:"evidence-table",children:[u.jsx("thead",{children:u.jsxs("tr",{children:[u.jsx("th",{children:"URL"}),u.jsx("th",{children:"Events"}),u.jsx("th",{children:"Status"}),u.jsx("th",{})]})}),u.jsx("tbody",{children:n.map(T=>u.jsxs("tr",{children:[u.jsx("td",{className:"evidence-keyword-cell",children:u.jsx("span",{className:"font-mono text-xs text-zinc-300 break-all",children:T.url})}),u.jsx("td",{children:u.jsx("div",{className:"flex flex-wrap gap-1",children:T.events.map(D=>u.jsx("span",{className:"inline-flex items-center rounded-full border border-zinc-700 bg-zinc-800/60 px-2 py-0.5 text-[10px] font-medium text-zinc-400 uppercase tracking-wide",children:D.replace("."," ")},D))})}),u.jsx("td",{children:u.jsx(yt,{tone:T.enabled?"positive":"neutral",children:T.enabled?"Active":"Paused"})}),u.jsx("td",{children:u.jsxs("div",{className:"flex items-center gap-1 justify-end",children:[j[T.id]&&(()=>{const D=j[T.id],L=D.state==="testing"?"Sending…":D.state==="ok"?`Delivered${D.status?` (${D.status})`:""}`:`Failed${D.status?` (${D.status})`:""}`;return u.jsx(yt,{tone:D.state==="ok"?"positive":D.state==="fail"?"negative":"neutral",children:L})})(),u.jsx(pe,{variant:"ghost",size:"sm",type:"button",disabled:j[T.id]?.state==="testing",onClick:()=>O(T.id),children:"Test"}),u.jsx(pe,{variant:"ghost",size:"sm",type:"button",onClick:()=>E(T.id),children:"Remove"})]})})]},T.id))})]}),v&&u.jsx("p",{className:"text-rose-400 text-sm mt-2",children:v})]})]})}function mT({runs:t,onOpenRun:n,onTriggerAll:a}){const[l,o]=N.useState("all"),c=l==="all"?t:t.filter(f=>f.status===l);return u.jsxs("div",{className:"page-container",children:[u.jsxs("div",{className:"page-header",children:[u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Runs"}),u.jsx("p",{className:"page-subtitle",children:"Status, type, project, duration, and the shortest explanation that makes the outcome trustworthy."})]}),a&&u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:a,children:"Run all projects"})]}),u.jsxs("section",{children:[u.jsx("div",{className:"filter-row",role:"toolbar","aria-label":"Run filters",children:["all","queued","running","completed","partial","failed"].map(f=>u.jsx("button",{className:`filter-chip ${l===f?"filter-chip-active":""}`,type:"button","aria-pressed":l===f,onClick:()=>o(f),children:f==="all"?"All runs":tc(f)},f))}),u.jsx("div",{className:"run-list",children:c.length>0?c.map(f=>u.jsx(H0,{run:f,onOpen:n},f.id)):u.jsxs(ut,{className:"surface-card empty-card",children:[u.jsx("h2",{children:"No runs match this filter"}),u.jsx("p",{children:"Try another status filter or queue a new run from a project command center."})]})})]})]})}const pT={openai:"https://platform.openai.com/api-keys",claude:"https://platform.claude.com/settings/keys"},I0={gemini:"Gemini",openai:"OpenAI",claude:"Claude",local:"Local"},gT={gemini:"e.g. gemini-3-flash",openai:"e.g. gpt-5.4",claude:"e.g. claude-sonnet-4-6",local:"e.g. llama3, mistral"};function yT({providerName:t,onSaved:n}){const a=t.toLowerCase()==="local",[l,o]=N.useState(""),[c,f]=N.useState(""),[m,g]=N.useState(""),[p,b]=N.useState(""),[v,x]=N.useState(""),[j,z]=N.useState(""),[w,_]=N.useState(!1),[E,O]=N.useState(null),[T,D]=N.useState(!1),L=a?c.trim().length>0:l.trim().length>0;async function I(){if(L){_(!0),O(null),D(!1);try{const F={};p.trim()&&(F.maxConcurrency=parseInt(p.trim(),10)),v.trim()&&(F.maxRequestsPerMinute=parseInt(v.trim(),10)),j.trim()&&(F.maxRequestsPerDay=parseInt(j.trim(),10)),await lA(t.toLowerCase(),{...l.trim()?{apiKey:l.trim()}:{},...c.trim()?{baseUrl:c.trim()}:{},...m.trim()?{model:m.trim()}:{},...Object.keys(F).length>0?{quota:F}:{}}),o(""),f(""),g(""),b(""),x(""),z(""),D(!0),n()}catch(F){O(F instanceof Error?F.message:"Failed to update provider")}finally{_(!1)}}}const G=pT[t.toLowerCase()],M=gT[t.toLowerCase()]??"Use default model";return u.jsxs("div",{className:"mt-3 rounded-lg border border-zinc-800 bg-zinc-900/40 p-3 space-y-2",children:[a&&u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`base-url-${t}`,children:"Base URL"}),u.jsx("input",{id:`base-url-${t}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"http://localhost:11434/v1",value:c,onChange:F=>f(F.target.value)}),u.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Any OpenAI-compatible endpoint — Ollama, LM Studio, llama.cpp, vLLM"})]}),u.jsxs("div",{children:[u.jsxs("div",{className:"flex items-center justify-between",children:[u.jsxs("label",{className:"text-xs text-zinc-500",htmlFor:`api-key-${t}`,children:["API Key",a?" (optional)":""]}),G&&u.jsx("a",{href:G,target:"_blank",rel:"noopener noreferrer",className:"text-[10px] text-zinc-500 hover:text-zinc-300 underline underline-offset-2",children:"Get API key ↗"})]}),u.jsx("input",{id:`api-key-${t}`,type:"password",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:a?"Optional — most local servers don't need one":`Enter ${t} API key`,value:l,onChange:F=>o(F.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-zinc-500",htmlFor:`model-${t}`,children:"Model (optional)"}),u.jsx("input",{id:`model-${t}`,type:"text",className:"mt-0.5 w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:M,value:m,onChange:F=>g(F.target.value)})]}),u.jsxs("div",{children:[u.jsx("label",{className:"text-xs text-zinc-500",children:"Quota (optional)"}),u.jsxs("div",{className:"mt-0.5 grid grid-cols-3 gap-1.5",children:[u.jsxs("div",{children:[u.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"Concurrent",value:p,onChange:F=>b(F.target.value)}),u.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Max concurrent"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"/min",value:v,onChange:F=>x(F.target.value)}),u.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Per minute"})]}),u.jsxs("div",{children:[u.jsx("input",{type:"number",min:"1",className:"w-full rounded border border-zinc-700 bg-transparent px-2 py-1.5 text-sm text-zinc-200 placeholder-zinc-600 focus:border-zinc-500 focus:outline-none",placeholder:"/day",value:j,onChange:F=>z(F.target.value)}),u.jsx("p",{className:"mt-0.5 text-[10px] text-zinc-600",children:"Per day"})]})]})]}),E&&u.jsx("p",{className:"text-xs text-rose-400",children:E}),T&&u.jsx("p",{className:"text-xs text-emerald-400",children:"Provider updated."}),u.jsx(pe,{type:"button",size:"sm",disabled:!L||w,onClick:I,children:w?"Saving...":"Save"})]})}function vT({settings:t,healthSnapshot:n,onSettingsChanged:a}){const[l,o]=N.useState(null);return u.jsxs("div",{className:"page-container",children:[u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Settings"}),u.jsx("p",{className:"page-subtitle",children:"Provider state, quotas, and service health."})]})}),u.jsxs("section",{className:"settings-grid",children:[t.providerStatuses.map(c=>u.jsxs(ut,{className:"surface-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Provider"}),u.jsx("h2",{children:c.name})]}),u.jsx(yt,{tone:c.state==="ready"?"positive":"caution",children:c.state==="ready"?"Ready":"Needs config"})]}),u.jsxs("dl",{className:"definition-list mt-3",children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Model"}),u.jsx("dd",{className:"font-mono text-xs",children:c.model})]}),c.quota&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{children:[u.jsx("dt",{children:"Concurrency"}),u.jsx("dd",{children:c.quota.maxConcurrency})]}),u.jsxs("div",{children:[u.jsx("dt",{children:"Rate limit"}),u.jsxs("dd",{children:[c.quota.maxRequestsPerMinute,"/min · ",c.quota.maxRequestsPerDay,"/day"]})]})]})]}),u.jsx("p",{className:"mt-2 text-sm text-zinc-500",children:c.detail}),u.jsx("div",{className:"mt-2",children:u.jsx(pe,{type:"button",variant:"outline",size:"sm",onClick:()=>o(l===c.name?null:c.name),children:l===c.name?"Cancel":c.state==="ready"?c.name.toLowerCase()==="local"?"Update config":"Update key":"Configure"})}),l===c.name&&u.jsx(yT,{providerName:c.name,onSaved:()=>{o(null),a?.()}})]},c.name)),u.jsxs(ut,{className:"surface-card",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Service health"}),u.jsx("h2",{children:"API and worker"})]})}),u.jsxs("div",{className:"compact-stack",children:[u.jsxs("div",{className:"health-row",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:"API"}),u.jsx("p",{className:"supporting-copy",children:n.apiStatus.detail})]}),u.jsx(yt,{tone:Mo(n.apiStatus),children:n.apiStatus.state==="ok"?"Healthy":"Attention"})]}),u.jsxs("div",{className:"health-row",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:"Worker"}),u.jsx("p",{className:"supporting-copy",children:n.workerStatus.detail})]}),u.jsx(yt,{tone:Mo(n.workerStatus),children:n.workerStatus.state==="ok"?"Healthy":"Attention"})]})]})]})]}),u.jsx("section",{className:"page-section",children:u.jsxs(ut,{className:"surface-card",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Self-host notes"}),u.jsx("h2",{children:"Operational guidance"})]})}),u.jsx("ul",{className:"detail-list",children:t.selfHostNotes.map(c=>u.jsx("li",{children:c},c))}),u.jsx("p",{className:"supporting-copy",children:t.bootstrapNote})]})})]})}const bT=[{label:"System check",description:"Verify your instance is ready"},{label:"Create project",description:"Name, domain, and locale"},{label:"Key phrases",description:"Add key phrases to track"},{label:"Competitors",description:"Add competitor domains"},{label:"Launch",description:"Start your first visibility sweep"}];function xT({current:t,labels:n}){return u.jsx("div",{className:"setup-steps",role:"list","aria-label":"Setup progress",children:n.map((a,l)=>{const o=l<t,c=l===t;return u.jsxs("div",{className:`setup-step ${o?"setup-step-done":""} ${c?"setup-step-active":""}`,role:"listitem","aria-current":c?"step":void 0,children:[u.jsx("span",{className:"setup-step-number",children:o?"✓":l+1}),u.jsx("span",{className:"setup-step-label",children:a.label})]},a.label)})})}function ST({model:t,settings:n,onProjectCreated:a,onNavigate:l}){const[o,c]=N.useState(0),[f,m]=N.useState(""),[g,p]=N.useState(""),[b,v]=N.useState(""),[x,j]=N.useState("US"),[z,w]=N.useState("en"),[_,E]=N.useState(null),[O,T]=N.useState(null),[D,L]=N.useState(null),[I,G]=N.useState(!1),[M,F]=N.useState(""),[xe,X]=N.useState(!1),[le,$e]=N.useState(null),[Ke,he]=N.useState(!1),U=n.providerStatuses.filter(ae=>ae.state==="ready"),[W,se]=N.useState(U[0]?.name??""),[ve,ee]=N.useState(5),[C,K]=N.useState(!1),[te,ie]=N.useState(null),[V,re]=N.useState(""),[q,de]=N.useState(!1),[me,et]=N.useState(null),[jt,Zt]=N.useState(!1),[Tn,Tt]=N.useState(!1),[ma,pa]=N.useState(null),[Ml,js]=N.useState(!1),pn=f.toLowerCase().replace(/[^a-z0-9-]/g,"-").replace(/-+/g,"-").replace(/^-|-$/g,""),Jt=M.split(`
235
+ `).map(ae=>ae.trim()).filter(Boolean),On=V.split(`
236
+ `).map(ae=>ae.trim()).filter(Boolean),ic=t.healthChecks.some(ae=>ae.id==="api"&&ae.state==="ready"),ac=async()=>{if(!(!pn||!b)){G(!0),L(null);try{const ae=await ec(pn,{displayName:g||f,canonicalDomain:b,country:x,language:z});E(pn),T(ae.id),a(),c(2)}catch(ae){L(ae instanceof Error?ae.message:"Failed to create project")}finally{G(!1)}}},kt=async()=>{if(!_)return;const ae=Jt;if(ae.length!==0){he(!0),$e(null);try{await WC(_,ae),X(!0),a(),c(3)}catch(Dn){$e(Dn instanceof Error?Dn.message:"Failed to save key phrases")}finally{he(!1)}}},sc=async()=>{if(!(!_||!W)){K(!0),ie(null);try{const ae=await hA(_,W,ve);if(ae.keywords.length>0){const Dn=M?M.trimEnd()+`
237
+ `+ae.keywords.join(`
238
+ `):ae.keywords.join(`
239
+ `);F(Dn)}}catch(ae){ie(ae instanceof Error?ae.message:"Failed to generate key phrases")}finally{K(!1)}}},Ll=async()=>{if(!_)return;const ae=On;if(ae.length!==0){Zt(!0),et(null);try{await O0(_,ae),de(!0),a(),c(4)}catch(Dn){et(Dn instanceof Error?Dn.message:"Failed to save competitors")}finally{Zt(!1)}}},Ul=async()=>{if(_){js(!0),pa(null);try{await D0(_),Tt(!0),a()}catch(ae){pa(ae instanceof Error?ae.message:"Failed to trigger run")}finally{js(!1)}}},Ft=()=>c(ae=>Math.max(0,ae-1)),lc=(()=>{switch(o){case 0:return u.jsxs(ut,{className:"surface-card step-card",children:[u.jsx("div",{className:"section-head",children:u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 1 of 5"}),u.jsx("h2",{children:"System ready"})]})}),u.jsx("p",{className:"supporting-copy",children:"Checking that your Canonry instance is configured and reachable."}),u.jsx("div",{className:"compact-stack",children:t.healthChecks.map(ae=>u.jsxs("div",{className:"health-check-row",children:[u.jsxs("div",{children:[u.jsx("p",{className:"run-row-title",children:ae.label}),u.jsx("p",{className:"supporting-copy",children:ae.detail}),ae.id==="provider"&&ae.state!=="ready"&&u.jsx("button",{type:"button",className:"text-emerald-400 hover:text-emerald-300 text-sm mt-1 underline underline-offset-2 cursor-pointer bg-transparent border-none p-0",onClick:()=>l("/settings"),children:"Configure providers"})]}),u.jsx(yt,{tone:ae.state==="ready"?"positive":"caution",children:ae.state==="ready"?"Ready":"Attention"})]},ae.id))}),u.jsxs("div",{className:"setup-nav",children:[u.jsx("span",{}),u.jsx(pe,{type:"button",disabled:!ic,onClick:()=>c(1),children:"Continue"})]})]});case 1:return u.jsxs(ut,{className:"surface-card step-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 2 of 5"}),u.jsx("h2",{children:"Create project"})]}),_?u.jsx(yt,{tone:"positive",children:"Created"}):null]}),_?u.jsxs("div",{className:"compact-stack",children:[u.jsxs("p",{className:"text-zinc-300",children:["Project ",u.jsx("span",{className:"text-zinc-100 font-medium",children:_})," created successfully."]}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(pe,{type:"button",variant:"outline",onClick:Ft,children:"Back"}),u.jsx(pe,{type:"button",onClick:()=>c(2),children:"Continue"})]})]}):u.jsxs("div",{className:"compact-stack",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"project-name",children:"Project name"}),u.jsx("input",{id:"project-name",className:"setup-input",type:"text",placeholder:"my-website",value:f,onChange:ae=>m(ae.target.value)}),pn&&pn!==f?u.jsxs("p",{className:"supporting-copy",children:["Slug: ",pn]}):null]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"display-name",children:"Display name (optional)"}),u.jsx("input",{id:"display-name",className:"setup-input",type:"text",placeholder:"My Website",value:g,onChange:ae=>p(ae.target.value)})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"domain",children:"Canonical domain"}),u.jsx("input",{id:"domain",className:"setup-input",type:"text",placeholder:"example.com",value:b,onChange:ae=>v(ae.target.value)})]}),u.jsxs("div",{className:"setup-field-row",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"country",children:"Country"}),u.jsx("input",{id:"country",className:"setup-input",type:"text",placeholder:"US",maxLength:2,value:x,onChange:ae=>j(ae.target.value.toUpperCase())})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"language",children:"Language"}),u.jsx("input",{id:"language",className:"setup-input",type:"text",placeholder:"en",maxLength:5,value:z,onChange:ae=>w(ae.target.value.toLowerCase())})]})]}),D?u.jsx("p",{className:"text-rose-400 text-sm",children:D}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(pe,{type:"button",variant:"outline",onClick:Ft,children:"Back"}),u.jsx(pe,{type:"button",disabled:!pn||!b||I,onClick:ac,children:I?"Creating...":"Create project"})]})]})]});case 2:return u.jsxs(ut,{className:"surface-card step-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 3 of 5"}),u.jsx("h2",{children:"Add key phrases"})]}),xe?u.jsxs(yt,{tone:"positive",children:[Jt.length," saved"]}):u.jsxs(yt,{tone:"neutral",children:[Jt.length," key phrase",Jt.length!==1?"s":""]})]}),u.jsx("p",{className:"supporting-copy",children:"Enter the search queries you want to track. One per line."}),xe?u.jsxs("div",{className:"compact-stack",children:[u.jsx("ul",{className:"detail-list",children:Jt.map(ae=>u.jsx("li",{children:ae},ae))}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(pe,{type:"button",variant:"outline",onClick:Ft,children:"Back"}),u.jsx(pe,{type:"button",onClick:()=>c(3),children:"Continue"})]})]}):u.jsxs("div",{className:"compact-stack",children:[U.length>0?u.jsxs("div",{className:"compact-stack",children:[u.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[u.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"auto-generate",u.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),u.jsxs("div",{className:"flex items-end gap-2",children:[u.jsxs("div",{className:"setup-field flex-1",children:[u.jsx("label",{className:"setup-label",htmlFor:"gen-provider",children:"Provider"}),u.jsx("select",{id:"gen-provider",className:"setup-input",value:W,onChange:ae=>se(ae.target.value),children:U.map(ae=>u.jsxs("option",{value:ae.name,children:[I0[ae.name]??ae.name,ae.model?` (${ae.model})`:""]},ae.name))})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"gen-count",children:"Count"}),u.jsx("select",{id:"gen-count",className:"setup-input",value:ve,onChange:ae=>ee(Number(ae.target.value)),children:[3,5,10,15,20].map(ae=>u.jsx("option",{value:ae,children:ae},ae))})]}),u.jsx(pe,{type:"button",variant:"outline",disabled:C||!W,onClick:sc,children:C?"Analyzing site...":"Generate"})]}),te?u.jsx("p",{className:"text-rose-400 text-sm",children:te}):null]}):null,u.jsxs("div",{className:"flex items-center gap-2 text-zinc-500 text-xs uppercase tracking-wide",children:[u.jsx("span",{className:"flex-1 border-t border-zinc-800"}),"or type manually",u.jsx("span",{className:"flex-1 border-t border-zinc-800"})]}),u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"keywords",children:"Key phrases (one per line)"}),u.jsx("textarea",{id:"keywords",className:"setup-textarea",rows:6,placeholder:`emergency dentist brooklyn
240
+ best invisalign downtown brooklyn
241
+ pediatric dentist brooklyn heights`,value:M,onChange:ae=>F(ae.target.value)})]}),le?u.jsx("p",{className:"text-rose-400 text-sm",children:le}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(pe,{type:"button",variant:"outline",onClick:Ft,children:"Back"}),u.jsx(pe,{type:"button",disabled:Jt.length===0||Ke,onClick:kt,children:Ke?"Saving...":`Save ${Jt.length} key phrase${Jt.length!==1?"s":""}`})]})]})]});case 3:return u.jsxs(ut,{className:"surface-card step-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 4 of 5"}),u.jsx("h2",{children:"Add competitors"})]}),q?u.jsx(yt,{tone:"positive",children:"Saved"}):null]}),u.jsx("p",{className:"supporting-copy",children:"Domains that compete for the same key phrases. One per line."}),q?u.jsxs("div",{className:"compact-stack",children:[u.jsx("ul",{className:"detail-list",children:On.map(ae=>u.jsx("li",{children:ae},ae))}),u.jsxs("div",{className:"setup-nav",children:[u.jsx(pe,{type:"button",variant:"outline",onClick:Ft,children:"Back"}),u.jsx(pe,{type:"button",onClick:()=>c(4),children:"Continue"})]})]}):u.jsxs("div",{className:"compact-stack",children:[u.jsxs("div",{className:"setup-field",children:[u.jsx("label",{className:"setup-label",htmlFor:"competitors",children:"Competitor domains (one per line)"}),u.jsx("textarea",{id:"competitors",className:"setup-textarea",rows:4,placeholder:`competitor1.com
242
+ competitor2.com`,value:V,onChange:ae=>re(ae.target.value)})]}),me?u.jsx("p",{className:"text-rose-400 text-sm",children:me}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(pe,{type:"button",variant:"outline",onClick:Ft,children:"Back"}),u.jsxs("div",{className:"flex gap-2",children:[u.jsx(pe,{type:"button",variant:"outline",onClick:()=>c(4),children:"Skip"}),u.jsx(pe,{type:"button",disabled:On.length===0||jt,onClick:Ll,children:jt?"Saving...":`Save ${On.length} competitor${On.length!==1?"s":""}`})]})]})]})]});case 4:return u.jsxs(ut,{className:"surface-card step-card",children:[u.jsxs("div",{className:"section-head",children:[u.jsxs("div",{children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:"Step 5 of 5"}),u.jsx("h2",{children:"Launch first run"})]}),Tn?u.jsx(yt,{tone:"positive",children:"Queued"}):null]}),Tn?u.jsxs("div",{className:"compact-stack",children:[u.jsx("p",{className:"text-zinc-300",children:"Visibility sweep has been queued. View progress on the project page."}),u.jsxs("div",{className:"setup-nav",children:[u.jsx("span",{}),u.jsx(pe,{type:"button",onClick:()=>l(O?`/projects/${O}`:"/"),children:"Open project"})]})]}):u.jsxs("div",{className:"compact-stack",children:[u.jsxs("p",{className:"supporting-copy",children:["Everything is configured. Launch an answer-visibility sweep to start tracking citations for ",u.jsx("span",{className:"text-zinc-100 font-medium",children:_}),"."]}),ma?u.jsx("p",{className:"text-rose-400 text-sm",children:ma}):null,u.jsxs("div",{className:"setup-nav",children:[u.jsx(pe,{type:"button",variant:"outline",onClick:Ft,children:"Back"}),u.jsx(pe,{type:"button",disabled:Ml,onClick:Ul,children:Ml?"Launching...":"Launch visibility sweep"})]})]})]});default:return null}})();return u.jsxs("div",{className:"page-container",children:[u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Setup"}),u.jsx("p",{className:"page-subtitle",children:"Create a project, add key phrases, add competitors, and launch the first run."})]})}),u.jsx(xT,{current:o,labels:bT}),u.jsx("section",{className:"setup-wizard",children:lc})]})}function wT({onNavigate:t}){return u.jsx("div",{className:"page-container",children:u.jsx("section",{className:"page-section",children:u.jsxs(ut,{className:"surface-card empty-card",children:[u.jsx("h1",{children:"Route not found"}),u.jsx("p",{children:"The current path does not map to a dashboard view."}),u.jsx(pe,{asChild:!0,children:u.jsx("a",{href:"/",onClick:Xt(t,"/"),children:"Return to overview"})})]})})})}function NT({title:t,subtitle:n,children:a,open:l,onClose:o}){return u.jsx(DC,{open:l,onOpenChange:c=>c?void 0:o(),children:u.jsxs(k0,{children:[u.jsxs($C,{className:"drawer-head",children:[u.jsx("p",{className:"eyebrow eyebrow-soft",children:n}),u.jsx(z0,{id:"drawer-title",children:t}),u.jsx(E0,{className:"sr-only",children:n})]}),u.jsx("div",{className:"drawer-body",children:a})]})})}function lv(t,n){const a=n.filter(f=>f.trim().length>1),l=t.split(/(\*\*[^*]+\*\*)/).filter(Boolean).map(f=>f.startsWith("**")&&f.endsWith("**")?{type:"bold",value:f.slice(2,-2)}:{type:"text",value:f});if(a.length===0)return l.map((f,m)=>f.type==="bold"?u.jsx("strong",{className:"text-zinc-200 font-semibold",children:f.value},`b-${m}`):f.value).filter(Boolean);const o=a.map(f=>f.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")),c=new RegExp(`(${o.join("|")})`,"gi");return l.flatMap((f,m)=>f.value.split(c).map((p,b)=>p?b%2===1?f.type==="bold"?u.jsx("mark",{className:"answer-highlight",children:u.jsx("strong",{className:"text-zinc-200 font-semibold",children:p})},`hl-${m}-${b}`):u.jsx("mark",{className:"answer-highlight",children:p},`hl-${m}-${b}`):f.type==="bold"?u.jsx("strong",{className:"text-zinc-200 font-semibold",children:p},`b-${m}-${b}`):p:null)).filter(Boolean)}function jT({evidence:t,project:n,onClose:a}){const[l,o]=N.useState(!1),[c,f]=N.useState(-1),[m,g]=N.useState(null),[p,b]=N.useState(!1),[v,x]=N.useState({}),j=wE(n.project),z=new Set(j.map(nf)),w=t.runHistory,_=w.length>1,E=c>=0&&m!==null,O=E?m:{citationState:t.citationState,provider:t.provider,model:t.model,answerSnippet:t.answerSnippet,citedDomains:t.citedDomains,competitorDomains:t.competitorDomains,groundingSources:t.groundingSources,evidenceUrls:t.evidenceUrls,changeLabel:t.changeLabel,summary:t.summary},T=O.citationState==="cited"||O.citationState==="emerging",L=O.citedDomains.findIndex(he=>z.has(he.toLowerCase().replace(/^www\./,"")))+1,I=O.citedDomains.length,G=n.project.displayName||n.project.name,M=[...j.map(nf),G,G.split(" ").slice(0,2).join(" ")].filter(he=>he.trim().length>2),F=T?"cited":O.citationState==="lost"?"lost":O.citationState==="pending"?"pending":"not-cited",xe=N.useRef(0),X=N.useCallback(async he=>{const U=++xe.current;if(he===-1||he===w.length-1){f(-1),g(null),o(!1);return}f(he),o(!1);const W=w[he],se=`${W.runId}::${t.keyword}::${t.provider}`;if(v[se]){g(v[se]);return}b(!0);try{const ve=await Al(W.runId);if(U!==xe.current)return;const ee=ve.snapshots.find(K=>K.keyword===t.keyword&&K.provider===t.provider)??ve.snapshots.find(K=>K.keyword===t.keyword),C=ee?{citationState:ee.citationState,provider:ee.provider,model:ee.model??null,answerSnippet:ee.answerText??"",citedDomains:ee.citedDomains,competitorDomains:ee.competitorOverlap,groundingSources:ee.groundingSources,evidenceUrls:[],changeLabel:W.citationState,summary:""}:{citationState:W.citationState,provider:t.provider,model:null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:W.citationState,summary:"Snapshot data not available for this run."};x(K=>({...K,[se]:C})),g(C)}catch{if(U!==xe.current)return;g({citationState:W.citationState,provider:t.provider,model:null,answerSnippet:"",citedDomains:[],competitorDomains:[],groundingSources:[],evidenceUrls:[],changeLabel:W.citationState,summary:"Failed to load historical run data."})}finally{U===xe.current&&b(!1)}},[w,t.keyword,t.provider,v]),le=O.model?`${O.provider} (${O.model}) · ${O.changeLabel.toLowerCase()}`:`${O.provider} · ${O.changeLabel.toLowerCase()}`,$e=T&&L>0?{label:"Citation confirmed",title:`Cited #${L} of ${I} domain${I!==1?"s":""}`,meta:le}:T?{label:"Citation confirmed",title:"Cited in this answer",meta:le}:O.citationState==="lost"?{label:"Citation lost",title:I>0?`${I} domain${I!==1?"s":""} cited instead`:"No longer appearing in this answer",meta:le}:O.citationState==="pending"?{label:"Pending",title:"Awaiting first visibility run",meta:"No provider data yet"}:{label:"Not in this answer",title:I>0?`${I} domain${I!==1?"s":""} cited instead`:"No domains cited for this query",meta:le},Ke=()=>{if(!O.answerSnippet)return null;const he=O.answerSnippet.split(`
243
+ `),U=[];let W=[],se=0;const ve=()=>{if(W.length===0)return;const ee=W.join(" ").trim();ee&&U.push(u.jsx("p",{className:U.length>0?"mt-2.5":"",children:lv(ee,M)},se++)),W=[]};for(const ee of he){const C=ee.trim();if(/^[-–—]{3,}$/.test(C)){ve(),U.push(u.jsx("hr",{className:"border-zinc-800/60 my-3"},se++));continue}const K=C.match(/^(#{1,3})\s+(.+)$/);if(K){ve();const te=K[1].length,ie=K[2].replace(/^[\p{Emoji}\p{Emoji_Component}\s#]+/u,"").trim()||K[2],V=te===1?"text-[13px] font-semibold text-zinc-100 mt-4 mb-1":te===2?"text-xs font-semibold text-zinc-200 mt-3 mb-0.5":"text-xs font-medium text-zinc-300 mt-2";U.push(u.jsx("p",{className:V,children:lv(ie,M)},se++));continue}if(C===""){ve();continue}W.push(C)}return ve(),U};return u.jsx(Nb,{open:!0,onOpenChange:he=>{he||a()},children:u.jsxs(jb,{children:[u.jsx(Ef,{className:"fixed inset-0 z-50 bg-black/80 backdrop-blur-sm"}),u.jsxs(Cf,{className:"evidence-modal","aria-describedby":void 0,children:[u.jsxs("div",{className:"evidence-modal-header",children:[u.jsxs("div",{className:"min-w-0 flex-1",children:[u.jsxs("p",{className:"eyebrow eyebrow-soft",children:[n.project.name," · ",O.provider||"All providers"]}),u.jsx(Af,{className:"text-lg font-semibold text-zinc-50 truncate",children:t.keyword})]}),u.jsxs(kb,{className:"inline-flex size-8 items-center justify-center rounded-md text-zinc-500 transition hover:bg-zinc-800 hover:text-zinc-100 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-zinc-400 shrink-0",children:[u.jsx(Of,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Close"})]})]}),_&&u.jsxs("div",{className:"evidence-modal-timeline",children:[u.jsx("p",{className:"drawer-section-label mb-1.5",children:"Run history"}),u.jsx("div",{className:"flex items-center gap-1 overflow-x-auto pb-1",children:w.map((he,U)=>{const W=c===-1&&U===w.length-1||c===U,se=he.citationState==="cited"||he.citationState==="emerging"?"bg-emerald-400":he.citationState==="lost"?"bg-rose-400":"bg-zinc-600",ee=new Date(he.createdAt).toLocaleDateString(void 0,{month:"short",day:"numeric"});return u.jsxs("button",{type:"button",className:`evidence-run-dot ${W?"evidence-run-dot--selected":""}`,onClick:()=>X(U===w.length-1?-1:U),"aria-label":`Run ${ee}: ${he.citationState}`,"aria-pressed":W,children:[u.jsx("span",{className:`size-2 rounded-full ${se}`,"aria-hidden":"true"}),u.jsx("span",{className:"text-[10px] text-zinc-500",children:ee})]},U)})}),c>=0&&c<w.length&&u.jsxs("p",{className:"text-[11px] text-zinc-500 mt-1",children:["Viewing run from ",new Date(w[c].createdAt).toLocaleString()," — ",u.jsx("span",{className:"capitalize",children:w[c].citationState}),u.jsx("button",{type:"button",className:"text-zinc-400 hover:text-zinc-200 ml-2",onClick:()=>X(-1),children:"← Back to latest"})]})]}),u.jsxs("div",{className:"evidence-modal-body",children:[p&&u.jsx("div",{className:"md:col-span-2 flex items-center justify-center py-12 text-zinc-500 text-sm",children:"Loading historical run data…"}),!p&&u.jsxs(u.Fragment,{children:[u.jsxs("div",{className:"evidence-modal-main",children:[u.jsxs("div",{className:`evidence-position-hero evidence-position-hero--${F}`,children:[u.jsx("p",{className:`evidence-position-label evidence-position-label--${F}`,children:$e.label}),u.jsx("p",{className:`evidence-position-title evidence-position-title--${F}`,children:$e.title}),u.jsx("p",{className:"evidence-position-meta",children:$e.meta})]}),O.answerSnippet&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:"What the AI said"}),u.jsx("div",{className:`answer-snippet-block ${l?"evidence-answer-expanded":"evidence-answer-collapsed"}`,children:Ke()}),O.answerSnippet.length>280&&u.jsx("button",{type:"button",className:"mt-1.5 text-xs text-zinc-500 hover:text-zinc-300 transition-colors",onClick:()=>o(!l),children:l?"↑ Collapse":"↓ Show full answer"})]}),!O.answerSnippet&&!p&&u.jsx("div",{className:"rounded-lg border border-zinc-800/40 bg-zinc-900/20 px-4 py-8 text-center text-zinc-600 text-sm",children:"No answer text recorded for this run"}),!E&&t.relatedTechnicalSignals.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:T?"Why you're cited":"What to fix"}),u.jsx("div",{className:"action-items-list",children:t.relatedTechnicalSignals.map((he,U)=>u.jsxs("div",{className:"action-item",children:[u.jsx("svg",{className:`action-item-icon ${T?"text-emerald-400":"text-amber-400"}`,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:T?u.jsx("path",{d:"M3 8l3.5 3.5L13 4.5",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"}):u.jsxs(u.Fragment,{children:[u.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),u.jsx("path",{d:"M8 5v3.5M8 10.5v0",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})]})}),u.jsx("span",{className:"action-item-text",children:he})]},U))})]}),O.summary&&u.jsx("p",{className:"text-xs text-zinc-600 border-t border-zinc-800/40 pt-3 mt-1",children:O.summary})]}),u.jsxs("div",{className:"evidence-modal-sidebar",children:[O.citedDomains.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:"Who was cited — in order"}),u.jsxs("div",{className:"citation-leaderboard",children:[O.citedDomains.map((he,U)=>{const W=he.toLowerCase().replace(/^www\./,""),se=z.has(W),ve=!se&&O.competitorDomains.some(C=>C.toLowerCase().replace(/^www\./,"")===W),ee=se?"you":ve?"competitor":"other";return u.jsxs("div",{className:`citation-leaderboard-item citation-leaderboard-item--${ee}`,children:[u.jsxs("span",{className:"citation-leaderboard-rank",children:["#",U+1]}),u.jsx("span",{className:"citation-leaderboard-domain",children:he}),se&&u.jsx("span",{className:"citation-leaderboard-tag",children:"You"}),ve&&u.jsx("span",{className:"citation-leaderboard-tag",children:"Competitor"})]},he)}),!T&&u.jsxs("div",{className:"citation-leaderboard-item citation-leaderboard-item--not-cited border-dashed",children:[u.jsx("span",{className:"citation-leaderboard-rank text-zinc-600",children:"—"}),u.jsx("span",{className:"citation-leaderboard-domain text-zinc-600",children:n.project.canonicalDomain}),u.jsx("span",{className:"citation-leaderboard-tag text-zinc-600",children:"Not cited"})]})]})]}),O.groundingSources.length>0&&u.jsxs("div",{children:[u.jsxs("p",{className:"drawer-section-label",children:["Grounding sources (",O.groundingSources.length,")"]}),u.jsx("ul",{className:"grid gap-0.5",children:O.groundingSources.map((he,U)=>u.jsx("li",{className:"truncate text-sm",children:u.jsx("a",{href:he.uri,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:he.title||he.uri})},U))})]}),O.evidenceUrls.length>0&&u.jsxs("div",{children:[u.jsx("p",{className:"drawer-section-label",children:"Evidence URLs"}),u.jsx("ul",{className:"grid gap-1",children:O.evidenceUrls.map(he=>u.jsx("li",{className:"truncate text-sm",children:u.jsx("a",{href:he,target:"_blank",rel:"noreferrer",className:"text-zinc-400 hover:text-zinc-200 transition-colors",children:he})},he))})]}),O.citedDomains.length===0&&O.groundingSources.length===0&&O.evidenceUrls.length===0&&u.jsxs("div",{className:"flex items-center justify-center h-24 text-zinc-600 text-sm",children:["No citation data ",E?"for this run":"yet"]})]})]})]})]})]})})}async function _T(){try{const[t,n,a]=await Promise.all([QC(),XC(),sA().catch(()=>null)]),l=await Promise.all(t.map(async o=>{const c=n.filter(x=>x.projectId===o.id),f=c.filter(x=>x.status==="completed"||x.status==="partial").sort((x,j)=>j.createdAt.localeCompare(x.createdAt)),[m,g,p,b,v]=await Promise.all([JC(o.name).catch(()=>[]),T0(o.name).catch(()=>[]),FC(o.name).catch(()=>[]),f[0]?Al(f[0].id).catch(()=>null):Promise.resolve(null),f[1]?Al(f[1].id).catch(()=>null):Promise.resolve(null)]);return{project:o,runs:c,keywords:m,competitors:g,timeline:p,latestRunDetail:b,previousRunDetail:v}}));return RA(l,a)}catch{return null}}function kT({initialPathname:t,initialDashboard:n,initialHealthSnapshot:a,enableLiveStatus:l=!0}){const[o,c]=N.useState(n??null),[f,m]=N.useState(!n),[g,p]=N.useState(n?!0:null),[b,v]=N.useState(()=>ZA(t)),[x,j]=N.useState(!1),[z,w]=N.useState(null),[_,E]=N.useState(null),[O,T]=N.useState(!1),[D,L]=N.useState(a??UA),I=N.useCallback(async()=>{const q=await _T();q?(c(q),p(!0)):p(!1),m(!1)},[]);N.useEffect(()=>{n||I()},[n,I]);const G=o?.runs.some(q=>q.status==="running"||q.status==="queued")??!1;if(N.useEffect(()=>{if(!G)return;const q=setInterval(()=>{I()},3e3);return()=>clearInterval(q)},[G,I]),N.useEffect(()=>{if(typeof window>"u")return;const q=()=>{v(Ti(window.location.pathname))};return window.addEventListener("popstate",q),()=>{window.removeEventListener("popstate",q)}},[]),N.useEffect(()=>{j(!1),w(null)},[b]),N.useEffect(()=>{if(f||!o)return;const q=o.projects.length>0;if(b==="/setup"&&q)typeof window<"u"&&Ti(window.location.pathname)!=="/"&&window.history.replaceState({},"","/"),v("/");else if(b==="/"&&!q){const de="/setup";typeof window<"u"&&Ti(window.location.pathname)!==de&&window.history.replaceState({},"",de),v(de)}},[f,o,b]),N.useEffect(()=>{if(typeof window>"u"||z===null)return;const q=de=>{de.key==="Escape"&&w(null)};return window.addEventListener("keydown",q),()=>{window.removeEventListener("keydown",q)}},[z]),N.useEffect(()=>{if(!l||typeof window>"u")return;let q=!0;const de=async()=>{const et=await $A("/health","API"),jt=et.state==="ok"?{label:"Runner",state:"ok",detail:"In-process job runner"}:{label:"Runner",state:et.state,detail:"Depends on API"};q&&L({apiStatus:et,workerStatus:jt})};de();const me=window.setInterval(()=>{de()},15e3);return()=>{q=!1,window.clearInterval(me)}},[l]),!f&&!o&&g===!1)return u.jsx("div",{className:"app-shell",children:u.jsx("div",{className:"main-area",style:{gridColumn:"1 / -1"},children:u.jsx("main",{id:"content",className:"page-shell",children:u.jsxs("div",{className:"page-container",children:[u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Cannot connect to API"}),u.jsxs("p",{className:"page-subtitle",children:["The dashboard could not reach the Canonry API. Make sure ",u.jsx("code",{children:"canonry serve"})," is running and try refreshing the page."]})]})}),u.jsx(pe,{type:"button",onClick:()=>{m(!0),I()},children:"Retry connection"})]})})})});const M=o??LA.dashboard,F=BA(b,M),xe=F.kind==="project"?C0(M,F.projectId):void 0,X=q=>{const de=Ti(q);if(typeof window>"u"){v(de);return}Ti(window.location.pathname)!==de&&window.history.pushState({},"",de),v(de)},le=q=>{if(!q)return;w({kind:"run",runId:q}),E(null),T(!0);const de=q;Al(q).then(me=>{w(et=>(et?.kind==="run"&&et.runId===de&&E(me),et))}).catch(()=>{w(me=>(me?.kind==="run"&&me.runId===de&&E(null),me))}).finally(()=>T(!1))},$e=()=>{pA().catch(q=>{console.error("Failed to trigger all runs",q)}).finally(()=>{I()})};N.useEffect(()=>{if(z?.kind!=="run"||!_||_.status!=="running"&&_.status!=="queued")return;const q=setInterval(()=>{Al(z.runId).then(de=>{E(de),de.status!=="running"&&de.status!=="queued"&&I()}).catch(()=>{})},3e3);return()=>clearInterval(q)},[z,_?.status,_?.snapshots.length,I]);const Ke=q=>{w({kind:"evidence",evidenceId:q})},he=async q=>{await D0(q),I()},U=async q=>{try{await iA(q),X("/"),I()}catch(de){console.error("Failed to delete project:",de)}},W=async(q,de)=>{await eA(q,de),await I()},se=async(q,de)=>{const et=(await T0(q)).map(Zt=>Zt.domain),jt=[...new Set([...et,...de])];await O0(q,jt),await I()},ve=async(q,de)=>{await tA(q,de),await I()},ee=async(q,de)=>{await nA(q,de),await I()},C=IA(M.portfolioOverview.systemHealth,D,M.settings),K=GA(M.setup,D,M.settings),te=z?.kind==="run"?GC(M,z.runId):void 0,ie=z?.kind==="evidence"?YC(M,z.evidenceId):void 0,V=[{label:"Overview",href:"/",icon:bj,active:yo(F,"overview")},{label:"Projects",href:"/projects",icon:yj,active:yo(F,"projects")},{label:"Runs",href:"/runs",icon:Nj,active:yo(F,"runs")},{label:"Settings",href:"/settings",icon:Ej,active:yo(F,"settings")}],re=F.kind==="overview"?"Portfolio":F.kind==="projects"?"Projects":F.kind==="project"&&xe?xe.project.name:F.kind==="runs"?"Runs":F.kind==="settings"?"Settings":F.kind==="setup"?"Setup":"Not found";return u.jsxs("div",{className:"app-shell",children:[u.jsx("a",{className:"skip-link",href:"#content",children:"Skip to content"}),u.jsxs("aside",{className:"sidebar","aria-label":"Primary navigation",children:[u.jsx("div",{className:"sidebar-brand",children:u.jsxs("a",{href:"/",onClick:Xt(X,"/"),children:[u.jsx("span",{className:"brand-mark",children:"Canonry"}),u.jsx("p",{className:"brand-subtitle",children:"AEO Monitor"})]})}),u.jsxs("nav",{className:"sidebar-nav",children:[V.map(q=>u.jsxs("a",{className:`sidebar-link ${q.active?"sidebar-link-active":""}`,href:q.href,"aria-current":q.active?"page":void 0,onClick:Xt(X,q.href),children:[u.jsx(q.icon,{className:"sidebar-icon"}),u.jsx("span",{children:q.label})]},q.label)),M.projects.length>0?u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"sidebar-section-title",children:"Projects"}),M.projects.map(q=>{const de=F.kind==="project"&&xe?.project.id===q.project.id,me=q.visibilitySummary.tone;return u.jsxs("a",{className:`sidebar-project ${de?"sidebar-project-active":""}`,href:`/projects/${q.project.id}`,onClick:Xt(X,`/projects/${q.project.id}`),children:[u.jsx("span",{className:`sidebar-dot sidebar-dot-${me}`}),u.jsx("span",{children:q.project.name})]},q.project.id)})]}):null,M.projects.length===0?u.jsxs(u.Fragment,{children:[u.jsx("p",{className:"sidebar-section-title",children:"Resources"}),u.jsxs("a",{className:"sidebar-link",href:"/setup","aria-current":F.kind==="setup"?"page":void 0,onClick:Xt(X,"/setup"),children:[u.jsx(kj,{className:"sidebar-icon"}),u.jsx("span",{children:"Setup"})]})]}):null]}),u.jsx("div",{className:"sidebar-footer",children:iv.map(q=>u.jsx("a",{className:"sidebar-footer-link",href:q.href,target:"_blank",rel:"noreferrer",children:q.label},q.href))})]}),u.jsxs("div",{className:"main-area",children:[u.jsxs("header",{className:"topbar",children:[u.jsxs("div",{className:"topbar-left",children:[u.jsx("div",{className:"topbar-brand-mobile",children:u.jsx("a",{className:"brand-mark",href:"/",onClick:Xt(X,"/"),children:"Canonry"})}),u.jsxs("nav",{className:"breadcrumb","aria-label":"Breadcrumb",children:[u.jsx("a",{href:"/",onClick:Xt(X,"/"),children:"Home"}),u.jsx(Tf,{className:"breadcrumb-sep size-3"}),u.jsx("span",{className:"breadcrumb-current",children:re})]})]}),u.jsxs("div",{className:"topbar-actions",children:[u.jsxs("div",{className:"health-pill-row",children:[u.jsxs("span",{className:`health-pill health-pill-${D.apiStatus.state}`,children:["API ",D.apiStatus.state==="ok"?"ok":D.apiStatus.state]}),u.jsxs("span",{className:`health-pill health-pill-${D.workerStatus.state}`,children:["Worker ",D.workerStatus.state==="ok"?"ok":D.workerStatus.state]})]}),u.jsxs(pe,{className:"nav-toggle",variant:"secondary",size:"icon",type:"button","aria-expanded":x,"aria-controls":"mobile-nav",onClick:()=>j(q=>!q),children:[u.jsx(Sj,{className:"size-4"}),u.jsx("span",{className:"sr-only",children:"Open navigation"})]})]})]}),u.jsxs("div",{id:"mobile-nav",className:`mobile-nav ${x?"mobile-nav-open":""}`,children:[u.jsxs(pe,{className:"mobile-nav-close",variant:"ghost",size:"icon",type:"button",onClick:()=>j(!1),children:[u.jsx(Of,{className:"size-5"}),u.jsx("span",{className:"sr-only",children:"Close navigation"})]}),V.map(q=>u.jsx("a",{className:`mobile-nav-link ${q.active?"mobile-nav-link-active":""}`,href:q.href,"aria-current":q.active?"page":void 0,onClick:Xt(X,q.href),children:q.label},q.label)),M.projects.length>0?u.jsxs("div",{className:"mobile-nav-section",children:[u.jsx("p",{className:"mobile-nav-section-title",children:"Projects"}),M.projects.map(q=>u.jsx("a",{className:"mobile-nav-link",href:`/projects/${q.project.id}`,onClick:Xt(X,`/projects/${q.project.id}`),children:q.project.name},q.project.id))]}):null]}),u.jsx("main",{id:"content",className:"page-shell",children:f?u.jsx("div",{className:"page-container",children:u.jsx("div",{className:"page-header",children:u.jsxs("div",{className:"page-header-left",children:[u.jsx("h1",{className:"page-title",children:"Loading"}),u.jsx("p",{className:"page-subtitle",children:"Connecting to API and loading dashboard data..."})]})})}):u.jsxs(u.Fragment,{children:[F.kind==="overview"?u.jsx(tT,{model:M.portfolioOverview,systemHealth:C,onNavigate:X,onOpenRun:le}):null,F.kind==="projects"?u.jsx(nT,{projects:M.projects,onNavigate:X,onProjectCreated:I}):null,F.kind==="project"&&xe?u.jsx(aT,{model:xe,onOpenEvidence:Ke,onOpenRun:le,onTriggerRun:he,onDeleteProject:U,onAddKeywords:W,onAddCompetitors:se,onUpdateOwnedDomains:ve,onUpdateProject:ee}):null,F.kind==="runs"?u.jsx(mT,{runs:M.runs,onOpenRun:le,onTriggerAll:$e}):null,F.kind==="settings"?u.jsx(vT,{settings:M.settings,healthSnapshot:D,onSettingsChanged:I}):null,F.kind==="setup"?u.jsx(ST,{model:K,settings:M.settings,onProjectCreated:I,onNavigate:X}):null,F.kind==="not-found"?u.jsx(wT,{onNavigate:X}):null]})}),u.jsxs("footer",{className:"footer",children:[u.jsx("p",{className:"supporting-copy",children:"Technical readiness and answer visibility stay separate."}),u.jsx("div",{className:"footer-links",children:iv.map(q=>u.jsx("a",{href:q.href,target:"_blank",rel:"noreferrer",children:q.label},q.href))})]})]}),te?u.jsxs(NT,{open:te!==void 0,title:te.summary,subtitle:`${te.projectName} · ${te.kindLabel}`,onClose:()=>w(null),children:[u.jsxs("div",{className:"flex flex-wrap items-center gap-x-5 gap-y-1 text-sm",children:[u.jsx(nc,{status:te.status}),u.jsx("span",{className:"text-zinc-400",children:te.startedAt}),u.jsx("span",{className:"text-zinc-500",children:te.duration}),u.jsx("span",{className:"text-zinc-600",children:te.triggerLabel})]}),te.status==="failed"&&te.statusDetail&&u.jsx("p",{className:"text-sm text-rose-300/80 mt-2",children:te.statusDetail}),u.jsxs("div",{className:"mt-4",children:[u.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-wider text-zinc-500 mb-2",children:"Activity Log"}),O?u.jsx("p",{className:"text-sm text-zinc-500",children:"Loading run details..."}):_&&_.snapshots.length>0?u.jsxs("div",{className:"space-y-2",children:[_.snapshots.map(q=>u.jsxs("div",{className:"rounded-lg border border-zinc-800/60 bg-zinc-900/30 p-3",children:[u.jsxs("div",{className:"flex items-center justify-between gap-2 mb-1",children:[u.jsx("p",{className:"text-sm font-medium text-zinc-200 truncate",children:q.keyword??"Unknown key phrase"}),u.jsxs("div",{className:"flex items-center gap-1.5",children:[u.jsx(Yf,{provider:q.provider}),u.jsx(N0,{variant:q.citationState==="cited"?"success":"neutral",children:q.citationState})]})]}),q.model&&u.jsx("p",{className:"text-[11px] text-zinc-500 font-mono",children:q.model}),q.citedDomains.length>0&&u.jsxs("p",{className:"text-xs text-zinc-500 mt-1",children:[u.jsx("span",{className:"text-zinc-400",children:"Sources:"})," ",q.citedDomains.join(", ")]}),q.competitorOverlap.length>0&&u.jsxs("p",{className:"text-xs text-rose-400/80 mt-0.5",children:["Competitor cited: ",q.competitorOverlap.join(", ")]}),q.groundingSources&&q.groundingSources.length>0&&u.jsxs("details",{className:"mt-2",children:[u.jsxs("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:[q.groundingSources.length," grounding source",q.groundingSources.length!==1?"s":""]}),u.jsx("ul",{className:"mt-1 space-y-0.5",children:q.groundingSources.map((de,me)=>u.jsx("li",{className:"text-xs text-zinc-500 truncate",children:u.jsx("a",{href:de.uri,target:"_blank",rel:"noreferrer",className:"hover:text-zinc-300",children:de.title||de.uri})},me))})]}),q.answerText&&u.jsxs("details",{className:"mt-1",children:[u.jsx("summary",{className:"text-xs text-zinc-500 cursor-pointer hover:text-zinc-400",children:"Answer preview"}),u.jsx("p",{className:"mt-1 text-xs text-zinc-400 leading-relaxed whitespace-pre-wrap",children:q.answerText})]})]},q.id)),_.status==="running"&&u.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[u.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Querying remaining key phrases..."]})]}):_&&_.status==="running"?u.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[u.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-amber-500 animate-pulse"}),"Waiting for first key phrase result..."]}):_&&_.status==="queued"?u.jsxs("div",{className:"flex items-center gap-2 p-3 text-sm text-zinc-500",children:[u.jsx("span",{className:"inline-block h-2 w-2 rounded-full bg-zinc-500 animate-pulse"}),"Run queued, waiting for execution slot..."]}):_&&_.error?u.jsxs("div",{className:"rounded-lg border border-rose-800/40 bg-rose-950/20 p-3",children:[u.jsx("p",{className:"text-sm font-medium text-rose-300 mb-2",children:"Run failed"}),u.jsx("pre",{className:"text-xs text-rose-300/80 whitespace-pre-wrap break-words max-h-48 overflow-y-auto font-mono leading-5",children:HA(_.error)})]}):u.jsx("p",{className:"text-sm text-zinc-500",children:"No snapshot data available."})]})]}):null,ie?u.jsx(jT,{evidence:ie.evidence,project:ie.project,onClose:()=>w(null)}):null]})}const K0=document.getElementById("root");if(!K0)throw new Error("Expected #root element for web app bootstrap.");vw.createRoot(K0).render(u.jsx(N.StrictMode,{children:u.jsx(kT,{})}));